Notes, summaries, assignments, exams, and problems

Sort by
Subject
Level

Essential Linux Commands & System Administration Toolkit

Classified in Computers

Written on in English with a size of 7.26 KB

File Operations

  • ls — List files and directories (-a for hidden, -l for detailed)
  • cd [directory] — Change directory
  • mkdir [directory] — Create directory
  • cp [source] [destination] — Copy files/directories (-r for recursive)
  • mv [source] [destination] — Move or rename files/directories
  • rm [file] — Remove files (-r for recursive)
  • chmod [permissions] [file] — Change file permissions
  • chown [user]:[group] [file] — Change file ownership

System Monitoring

  • top / htop — Monitor system processes
  • ps — List running processes
  • df -h — Display disk space usage
  • free -m — Show memory usage

Networking Commands

  • ifconfig / ip a — Display network interfaces
  • ping [host] — Test network connectivity
  • netstat -tuln — List network connections
  • nmap [IP] — Scan
... Continue reading "Essential Linux Commands & System Administration Toolkit" »

Tensors and Variables in PyTorch and TensorFlow

Classified in Computers

Written on in English with a size of 2.4 KB

Tensors and Variables in PyTorch and TensorFlow

Here's a brief explanation of tensors and variables in the context of deep learning frameworks like PyTorch and TensorFlow:

Tensors

  • Definition: A tensor is a multi-dimensional array used to represent data (such as scalars, vectors, matrices, or higher-dimensional data).
  • Common Operations: Tensors can be manipulated with mathematical operations (addition, multiplication, etc.), reshaped, sliced, etc.

In PyTorch, tensors are the core data structure:

import torch
# Create a tensor
a = torch.tensor([[1, 2], [3, 4]])
# Basic operations
b = a + 2         # Adds 2 to each element
c = a * a         # Element-wise multiplication
d = a @ a         # Matrix multiplication

Output:

Tensor `b`: [[3, 4], [5, 6]]
Tensor
... Continue reading "Tensors and Variables in PyTorch and TensorFlow" »

English Past Tense, 'Used To,' and Present Continuous

Classified in English

Written on in English with a size of 5.41 KB

Complete the sentences with the verbs below in Past Simple:

walk, enjoy, like, watch, travel, finish, listen

  1. Lucy liked her birthday presents.
  2. Last weekend I walked in the mountains for 2 hours.
  3. We enjoyed the party very much.
  4. Ken listened to his favorite CD yesterday.
  5. My sister studied Maths for an exam.
  6. They traveled to the USA in 2003.
  7. Dad washed his car last weekend.
  8. The film finished at 11:30.

Write the sentences in negative:

  1. Lucy didn't like her birthday presents.
  2. Last weekend I didn't walk in the mountains for 2 hours.
  3. We didn't enjoy the party very much.
  4. Ken didn't listen to his favorite CD yesterday.
  5. My sister didn't study months for German.
  6. They didn't travel to the USA in 2003.
  7. Dad didn't wash his car last weekend.
  8. The film didn't finish at 11:30.
... Continue reading "English Past Tense, 'Used To,' and Present Continuous" »

Electrolyte Imbalances: Sodium, Potassium, Calcium, Magnesium

Classified in Medicine & Health

Written on in English with a size of 3.93 KB

Sodium Imbalance

Sodium: primary cation in ECF

  • Transport through cells by sodium-potassium pump
  • Secreted into mucous and other secretions

Hyponatremia

Plasma sodium below 135 mEq/L

Causes
  • Losses from excessive sweating, vomiting, diarrhea
  • Certain diuretic drugs with low salt diet
  • Hormonal imbalances (low aldosterone, high ADH)
  • Excessive water intake
Effects
  • Low sodium
  • Decreases osmotic pressure in ECF

Hypernatremia

Plasma sodium above 145 mEq/L

Causes
  • Insufficient ADH
  • Loss of thirst mechanism
  • Watery diarrhea
  • Prolonged periods of rapid respiration
  • Ingesting large amounts of sodium without water balance
Effects
  • Weakness, headache
  • Dry, rough mucous membranes
  • Increased thirst
  • Difficulty swallowing
  • Cerebral edema: leads to seizures

Potassium Imbalance

Potassium: primary cation

... Continue reading "Electrolyte Imbalances: Sodium, Potassium, Calcium, Magnesium" »

A320 Cockpit Components & Flight Operations

Classified in Language

Written on in English with a size of 3.91 KB

Autoflight - Automatic Flight

Captain Seat - Captain's Seat

Glareshield - Autopilot Panel

Center Pedestal - Central Panel

Circuit Breaker - Automatic Circuit

Display - Screen

COMPOUND WORDS

Flight Deck - Flight Cabin

FWD Section - Forward Section

Lever - Control Lever

Overhead Panel - Upper Panel

Pitch Wheel - Nose Wheel

Push Button - Pressure Button

Sidestick - Control Lever

Windshield - Aircraft Windshield

VOCABULARY: APPROACH DELAYS

Headwind - Opposing Wind

A wind that is blowing in the opposite direction to your direction of travel.
Strong headwinds can cause delays for approaching aircraft.

Runway Excursion - Aircraft Veering Off Runway

When an aircraft veers off the active runway surface.
The nose gear steering failed and the aircraft veered off the runway,
... Continue reading "A320 Cockpit Components & Flight Operations" »

Plasmids pBR322 and pUC18/19: Cloning Vectors

Classified in Biology

Written on in English with a size of 1.61 KB

Plasmids pBR322 and pUC18/19

pBR322

pBR322, developed in 1977, is a foundational plasmid in molecular biology. Key features include:

  • Size: ~4,361 base pairs (bp)
  • Origin of Replication: Allows independent replication within bacteria.
  • Selection Markers:
    • ampR: Confers ampicillin resistance.
    • tetR: Confers tetracycline resistance.
  • Cloning Sites: Multiple sites for inserting foreign DNA.
  • Applications: Gene cloning, expression, and manipulation.

pUC18/19

pUC18/19, derived from pBR322 in the early 1980s, simplifies cloning. Key features include:

  • Size: ~2,686 bp
  • Origin of Replication: High-copy-number pMB1 ori for increased yield.
  • Selection Marker:
    • lacZ: Beta-galactosidase gene; enables blue/white screening for insert identification.
  • Cloning Sites: Multiple cloning
... Continue reading "Plasmids pBR322 and pUC18/19: Cloning Vectors" »

Tmux Command Reference: Master Your Terminal Sessions

Classified in Technology

Written on in English with a size of 7.51 KB

Tmux Commands Reference

Introduction to Tmux

Tmux (Terminal Multiplexer) is a powerful terminal multiplexer for Unix-like operating systems. It allows you to manage multiple terminal sessions from a single window, enhancing your command-line productivity.

Basic Tmux Commands

DescriptionCommand
Start a new session
$ tmux
Start a new named session
$ tmux new -s myname
Show all sessions
$ tmux ls
Attach to the last session
$ tmux a
Attach to a named session
$ tmux a -t myname
Kill a session by name
$ tmux kill-ses -t myname
Kill all sessions except the current
$ tmux kill-ses -a
Kill all sessions except 'myname'
$ tmux kill-ses -a -t myname
Reload Tmux configuration
$ tmux source-file ~/.tmux.conf
Show global Tmux options
$ tmux show-options -g
Display Tmux server information
$
... Continue reading "Tmux Command Reference: Master Your Terminal Sessions" »

Exchange Rates, Competitiveness, and Financial Ratios

Classified in Economy

Written on in English with a size of 2.51 KB

Competitiveness and Trade

Nominal Exchange Rates

When our currency's value increases, our competitiveness decreases, and importations increase in relative terms.

Price Levels

  • Our Country: If prices in our country increase, our exports decrease, and imports increase.
  • Foreign Country: If prices in foreign countries increase, our competitiveness increases, benefiting our exports, and our imports decrease.

Foreign Exchange Market

  • Price Determination: The exchange rate between countries is established based on supply and demand.
  • Hedging: Protection against currency fluctuations, safeguarding investors and businesses from losses due to currency appreciation or depreciation.
  • International Finance: Countries can lend and borrow money by converting currencies.
... Continue reading "Exchange Rates, Competitiveness, and Financial Ratios" »

Array and String Algorithms: Core Problem Solutions

Classified in Computers

Written on in English with a size of 6.48 KB


Longest Substring Without Repeating Characters

This problem involves finding the length of the longest substring in a given string that does not contain any repeating characters. A common approach uses a sliding window technique with a Set to efficiently track unique characters.

Strategy:

  • Utilize a Set to store characters within the current window.
  • Iterate through the string with a right pointer, adding characters to the Set.
  • If a duplicate character is encountered, move the left pointer forward, removing characters from the Set, until the duplicate is no longer present.
  • At each step, update the maximum length found.

Java Implementation Snippet

class Solution {
    public int findLongestSubstringWithoutRepeatingCharacter(String str) {
        Set&
... Continue reading "Array and String Algorithms: Core Problem Solutions" »

FIR Low-Pass Filter Design with Window Method

Classified in Technology

Written on in English with a size of 3.63 KB

Load Signal and Parameters

We load the signal we need.

load('tecla_piano.mat');

We calculate the sampling period and the number of samples.

Ts = 1/fs;
N = length(data);
n = 0:N-1;
nTs = n * Ts;

Set the number of frequency points which generate the spectrums. We also generate the frequency vector.

nFFT = 2 * fs;
f = (0:nFFT-1) * fs/(nFFT-1);

Time Domain Signal Representation

We represent the input signal in the time domain.

figure;
plot(nTs,data);
title('Input signal, TIME domain');
xlabel('nT_{S} (s)');
ylabel('data[nT_{S}] (V)');
grid on;

Signal Spectrum Analysis

We calculate and observe the spectrum of the signal. From the magnitude spectrum, we decide that we want to filter the signal up to 1000 Hz and we want to remove it completely from 1500 Hz up.... Continue reading "FIR Low-Pass Filter Design with Window Method" »