OpenLLM-France/wikimedia huggingface dataset:
# AI Art Generation Handbook/Archive

Stable Diffusion / AI Art in general are moving so fast that some of the information here are outdated. I create this page is to let other people dig for outdated info's here.
Fashion Bra SD1.5
Fashion Patterns SDXL
Camera Types (Out of Date infos)
Artist Style (Out of Date infos)
Framing (Out of Date infos)
AI Art Generation Handbook/Archive/Model List (Out of Date infos)
AI Art Generation Handbook/Archive/Settings
# A-level Physics (Advancing Physics)/Digitisation/Worked Solutions

1. Take samples for the signal below every 0.1ms, and then produce a reconstructed signal. How does it differ from the original?
The high frequency elements of the signal have been lost.
2. A signal is sampled for 5 seconds at a sampling rate of 20 kHz. How many samples were taken?
$20\times 10^{3}={\frac {\mbox{No. of samples}}{5}}$
${\mbox{No. of samples}}=20\times 10^{3}\times 5=100000$
3. Most sounds created by human speech except for 'ss' and 'ff' have a maximum frequency of 4 kHz. What is a suitable sampling rate for a low-quality telephone?
$4\times 2=8{\mbox{ kHz}}$
4. Using a sampling rate of 20 kHz and 3 bits, sample the following signal, and then produce a reconstructed signal. What is the maximum frequency that can be perfectly reconstructed using this sampling rate?
First, calculate the length of each sample, by letting the number of samples equal 1:
$20\times 10^{3}={\frac {1}{\mbox{Length of one sample}}}$
${\mbox{Length of one sample}}={\frac {1}{20\times 10^{3}}}=0.00005{\mbox{ s}}=0.05{\mbox{ ms}}$
Then, we can sample the waveform and create a reconstructed signal:
To calculate the maximum frequency that can be perfectly reconstructed using this sampling rate (20 kHz):
${\frac {20}{2}}=10{\mbox{ kHz}}$
# A-level Physics (Advancing Physics)/Diffraction

We have already seen why fringes are visible when light passes through multiple slits. However, this does not explain why, when light is only passing through 1 slit, a pattern such as the one on the right is visible on the screen.
The answer to this lies in phasors. We already know that the phasor arrows add up to give a resultant phasor. By considering the phasor arrows from many paths which light takes through a slit, we can explain why light and dark fringes occur.
At the normal line, where the brightest fringe is shown, all the phasor arrows are pointing in the same direction, and so add up to create the greatest amplitude: a bright fringe.
At other fringes, we can use the same formulæ as for diffraction gratings, as we are effectively treating the single slit as a row of beams of light, coming from a row of slits.
Now consider the central beam of light. By trigonometry:
$\sin {\theta }={\frac {W}{L}}$,
where θ = beam angle (radians), W = beam width and L = distance from slit to screen. Since θ is small, we can approximate sin θ as θ, so:
$\theta \approx {\frac {W}{L}}$
and since λ = d sin θ:
$\theta \approx {\frac {\lambda }{d}}$

## Questions

1. What is the width of the central bright fringe on a screen placed 5m from a single slit, where the slit is 0.01m wide and the wavelength is 500 nm?
And that's all there is to it ... maybe.
Worked Solutions
# A-level Physics (Advancing Physics)/Digital Storage/Logarithms

That formula involved logarithms. If a$^b$ = c, then:
$\log _{a}c=b$
In other words, a logarithm is a way of asking the question, "a to the power of what is c?" a is known as the base of the logarithm. log a is shorthand for log$_{10}$a, and can be calculated using the 'log' button on a scientific calculator.
Just as with indices, there are some laws of logarithms. At present, we are only concerned with this one:
$\log _{a}(c^{n})=n\log _{a}c$
If we apply this to the formula for calculating the number of possible values a pixel can take on (v = 2$^b$), we can rearrange it to get a formula for b by taking the logarithm to the base 10 of both sides:
$\log v=\log(2^{b})$
$\log v=b\log 2$
$b={\frac {\log {v}}{\log {2}}}$
We can then use a scientific calculator to calculate log 2, giving us the formula:
$b\approx {\frac {\log {v}}{0.3}}$
# A-level Physics (Advancing Physics)/Diffraction/Worked Solutions

1. What is the width of the central bright fringe on a screen placed 5m from a single slit, where the slit is 0.01m wide and the wavelength is 500 nm?
${\frac {W}{L}}\approx {\frac {\lambda }{d}}$
${\frac {W}{5}}\approx {\frac {500\times 10^{-9}}{0.01}}$
W = 250μm, but since this is only half the beam, the beam is 500μm wide.
# A-level Physics (Advancing Physics)/Digital Processing/Worked Solutions

1. How could the above methods be applied to a digital sound sample?
By taking the median or mean of the sample and the values on either side of it. This would be unreliable, as sound is a wave, so the samples need to vary quite widely. However, something similar could be used when comparing repeating patterns in a waveform.
2. Which of the above methods would be suitable for smoothing sharp edges? Why?
Mean smoothing - median smoothing would not blur the edges.
3. Use median smoothing to remove noise from the following image of a white cat in a snowstorm (the black pixels have a value of 255):
Before :
| 000 | 255 | 000 | 000 |
| 000 | 000 | 000 | 255 |
| 255 | 000 | 000 | 000 |
| 000 | 000 | 255 | 000 |
After :
| 000 | 000 | 000 | 000 |
| 000 | 000 | 000 | 000 |
| 000 | 000 | 000 | 000 |
| 000 | 000 | 000 | 000 |
4. Why would mean sampling not be appropriate for smoothing the image given in question 3?
It would produce a really blurred mess, instead of an image, as the noise is too dense.
5. Use mean smoothing to remove noise from the following image of a black cat in a coal cellar:
Before :
| 255 | 255 | 255 | 255 |
| 255 | 255 | 000 | 255 |
| 255 | 255 | 255 | 255 |
After :
| 255 | 213 | 213 | 191 |
| 255 | 227 | 227 | 213 |
| 255 | 213 | 213 | 191 |
# A-level Physics (Advancing Physics)/Digital Storage/Worked Solutions

1. An image transmitted down a SVGA video cable is 800 pixels wide, and 600 pixels high. How many pixels are there in the image?
$800\times 600=480000{\mbox{ pixels}}$
2. A grayscale image is encoded using 3 bits. How many possible values can each pixel have?
2$^3$ = 8
3. The characters in a text document are numbered from 0 - 255. How many bits should each character be encoded with?
There are 256 possible values.
$b={\frac {\log {256}}{\log {2}}}=8$
4. A page contains 30 lines of text, with an average of 15 characters on each line. Each character is represented by 4 bits. How many megabytes of uncompressed storage will a book consisting of 650 pages like this fill on a computer's hard disk?
Total number of characters = 650 x 30 x 15 = 292 500
Total amount of information = 292500 x 4 = 1 170 000 bits
$1170000{\mbox{ bits}}={\frac {1170000}{8}}{\mbox{ bytes}}=146250{\mbox{ bytes}}={\frac {146250}{1024^{2}}}{\mbox{ Mbytes}}\approx 0.14{\mbox{ Mbytes}}$
5. A 10 cm wide square image is scanned into a computer. Each pixel is encoded using 3 channels (red, green and blue), and each channel can take on 256 possible values. One pixel is 0.01 mm wide. How much information does the scanned image contain? Express your answer using an appropriate unit.
$10{\mbox{cm}}={\frac {0.1}{0.01\times 10^{-3}}}{\mbox{ pixels}}=10000{\mbox{ pixels}}$
Total number of pixels = 10 000$^2$ = 100 000 000 pixels
$b={\frac {\log {256}}{\log {2}}}=8{\mbox{ bits per. channel per. pixel}}=8\times 3{\mbox{ bits per. pixel}}=24{\mbox{ bits per. pixel}}$
Total information = 24 x 100 000 000 = 2 400 000 000 bits = 300 000 000 bytes
${\frac {300000000}{1024^{2}}}\approx 286{\mbox{ Mbytes}}$ (This is why we usually compress images before storage, or at least use fewer bits per. pixel.)
# A-level Physics (Advancing Physics)/Digitisation

Digitisation of a signal is the process by which an analogue signal is converted to a digital signal.

## Digitisation & Reconstruction

Let us consider the voltage output from a microphone. The signal which enters the microphone (sound) is an analogue signal - it can be any of a potentially infinite range of values, and may look something like this waveform (from an artificial (MIDI) piano):
When the microphone converts this signal to an electrical signal, it samples the signal a number of times, and transmits the level of the signal at that point. The following diagram shows sample times (vertical black lines) and the transmitted signal (the red line):
When we wish to listen to the sound, the digital signal has to be reconstructed. The gaps between the samples are filled in, but, as you can see, the reconstructed signal is not the same as the original sound:

## Sampling Rate

The sampling rate when digitising an analogue signal is defined as the number of samples per. second, and is measured in Hertz (Hz), as it is a frequency. You can calculate the sampling rate using the formula:
${\mbox{Sampling Rate (Hz)}}={\frac {\mbox{No. of samples}}{\mbox{No. of seconds}}}$
The higher the sampling rate, the closer the reconstructed signal is to the original signal, but, unfortunately, we are limited by the bandwidth available. Theoretically, a sampling rate of twice the highest frequency of the original signal will result in a perfect reconstructed signal. In the example given above, the sampling rate is far too low, hence the loss of information.

## Number of Levels

Another factor which may limit the quality of the reconstructed signal is the number of bits with which the signal is encoded. For example, if we use 3 bits per. sample, we only have 8 (2$^3$) levels, so, when sampling, we must take the nearest value represented by one of these levels. This leads to quantization errors - when a sample does not equal the value of the original signal at a given sample point.

## Questions

1. Take samples for the signal below every 0.1ms, and then produce a reconstructed signal. How does it differ from the original?
2. A signal is sampled for 5 seconds at a sampling rate of 20 kHz. How many samples were taken?
3. Most sounds created by human speech except for 'ss' and 'ff' have a maximum frequency of 4 kHz. What is a suitable sampling rate for a low-quality telephone?
4. Using a sampling rate of 20 kHz and 3 bits, sample the following signal, and then produce a reconstructed signal. What is the maximum frequency that can be perfectly reconstructed using this sampling rate?
Worked Solutions
# 360 Assembly/360 Instructions/ORG

    ORG Pseudo instruction - Set value of program counter
The ORG pseudo instruction tells the assembler to set the value of the location counter to the specified address, or to reset the location counter if altered by a prior ORG.

## Format

| Name | Operation | Operands |
| | ORG | [expr] |
| [name] | ORG | [expr] |
| [.symbol] | ORG | [expr] |
where
    name is an optional defined symbol
    or
    .symbol is an optional conditional assembly label
    and
    expr is an optional relocatable address within the current control section

## Description

The ORG pseudo instruction alters the location counter of this control section (the current CSECT, DSECT, or START). If name is specified, the address is adjusted to the value of the previously defined symbolname. If expr is specified, it must not be lower than the lowest address defined for this control section. An ORG statement without an expr value resets the location counter to the highest address used in the current control section.

## Examples

The comma on the last line is used to be sure the assembler does not presume the first word of the comment is interpreted as an argument to that ORG statement
360 Assembler Pseudo Instructions :
| Address Related | ADATA • CNOP • DROP • EQU • LOCTR • LTORG • ORG • USING |
| Code Related | ALIAS • AMODE • CATTR • COM • CSECT • CXD • DSECT • DXD • END • ENTRY • EXTRN • OPSYN • RMODE • RSECT • START • WXTRN • XATTR |
| Data Related | CCW • CCW0 • CCW1 • DC • DS |
| Conditional Assembly and Macro related | ACTR • AGO • AIF • AINSERT • ANOP • AREAD • COPY • GBLA / GBLB / GBLC • LCLA / LCLB / LCLC • MACRO • MEND • MEXIT • MNOTE • SETA / SETB / SETC |
| Listing, output and source related | Comments • *PROCESS • ACONTROL • EJECT • END • EXITCTL •ICTL • ISEQ • POP • PRINT • PUNCH • PUSH • REPRO • SPACE • TITLE |
360 Assembly Language :
| 360 Family | Introduction · Basic FAQ · 360 Family · 360 Architecture |
| 360 Instruction Set | 360 Instructions · Branch Instructions · Data Transfer Instructions · Control Flow Instructions · Arithmetic Instructions · Logic Instructions · Shift and Rotate Instructions · Priveleged Instructions · Other Instructions |
| Syntaxes and Assemblers | 360 Assemblers· Pseudo Instructions |
| Instruction Extensions | Floating Point · High-Level Languages |
# Arithmetic Instructions
## Binary integer arithmetic instructions

Instructions are sorted alphabetically. The instructions marked as "logical" set condition code (CC) field in PSW according to unsigned treating of values. Otherwise, condition codes reflect treating values as 2-complement signed values.
* Add - A
* Add Half - AH
* Add Logical - AL
* Add Logical Register - ALR
* Add Register - AR
* Load Register Complement - LCR
* Subtract - S
* Subtract Half - SH
* Subtract Logical - SL
* Subtract Logical Register - SLR
* Subtract Register - SR
* Multiply - M
* Multiply with Register - MR
* Divide - D
* Divide by Register - DR

## Floating number instructions

360 Assembly Language :
| 360 Family | Introduction · Basic FAQ · 360 Family · 360 Architecture |
| 360 Instruction Set | 360 Instructions · Branch Instructions · Data Transfer Instructions · Control Flow Instructions · Arithmetic Instructions · Logic Instructions · Shift and Rotate Instructions · Priveleged Instructions · Other Instructions |
| Syntaxes and Assemblers | 360 Assemblers· Pseudo Instructions |
| Instruction Extensions | Floating Point · High-Level Languages |
# 360 Assembly/Basic FAQ

This attempts to define terms related to the IBM 360 and similar mainframes.
* Base-displacement. Addresses on the 360 series mainframe which are given in an instruction are given in base-displacement form, in which the address is referenced by a 4-bit number representing one of the 16 registers, numbered 0 to 15, which is used as a base, and a 12-bit index which is added to the contents of that register (unless that base register is register 0), as a displacement. The value of the displacement, plus the contents of the specific register, create the base-displacement address.
* Op code. The first byte of an instruction (or the first two in some later models) determines what instruction it is. The byte (bytes) is (are) called the operation code, or op code.
* Program check. An error in a program that causes hardware to stop its execution as an exception. A program will be terminated unless the program has issued a request to the operating system to trap the exception. Program checks include any of the following:
** Data exception. Program has attempted to perform packed arithmetic upon invalid packed data.
** Divide exception. Program has attempted to divide by zero.
** Execute exception. Program has attempted to use an EXECUTE instruction as the target of an EXECUTE instruction
** Operation exception. Program has attempted to execute an invalid instruction.
** Privileged operation exception. Program has attempted to execute a privileged or I/O instruction.
** Protection exception. Program has attempted to read or write memory it is not allowed to access.
| Previous: Introduction | Next: 360 Family |
360 Assembly Language :
| 360 Family | Introduction · Basic FAQ · 360 Family · 360 Architecture |
| 360 Instruction Set | 360 Instructions · Branch Instructions · Data Transfer Instructions · Control Flow Instructions · Arithmetic Instructions · Logic Instructions · Shift and Rotate Instructions · Priveleged Instructions · Other Instructions |
| Syntaxes and Assemblers | 360 Assemblers· Pseudo Instructions |
| Instruction Extensions | Floating Point · High-Level Languages |
# 360 Assembly/360 Instructions/SR

SR - Subtract Register - Opcode 1B

## Format

    SR 2,1
The specific syntax is
    SR target register, source register.
RR Instruction (2 bytes) :
| Byte 1 | Byte 2 | Byte 2 |
| Byte 1 | target register | source register |
| (8 bits) Opcode 1B | (4 bits) 0..F | (4 bits) 0..F |
* The first argument is a target register which value is affected by the instruction.
* The second argument is the source value register.

## Availability

The SR instruction is available on all models of the 360, 370 and z/System.

## Operation

The SR instruction reads 32-bit integer value from the register specified by the second argument and subtracts it from the value of register specified by the first argument. The register specified by the first argument holds the operation result after the instruction is executed. The Condition Code field in the Program Status Word is changed according to the resulting value.
This instruction can also be used with both register arguments being the same in order to clear that register to zero. The same function occurs if both arguments are the same register in the XR instruction.

## Condition Codes

If signed integer overflow occurs, i.e. difference is not between -2**31 and 2**31-1, CC is set to 3. Otherwise, CC is set to 0, 1 or 2, if difference is equal to zero, below zero or above zero accordingly.

## Exceptions and Faults

* If signed integer overflow is detected and the bit 36 in PSW is set, operation exception occurs.

## Related instructions

* To subtract by double word value from the full 64-bit double word of both registers on the z/Series, see SGR.
* To subtract by word value from the full 64-bit double word of the other register on the z/Series, see SGFR.
* To subtract by full 64-bit double word register on the z/Series from a 64-bit double word in memory, see SG.
* To subtract from full 64-bit double word register on the z/Series from a 32-bit word in memory, see SGF.
* To subtract by word value from memory, see S.
* To subtract by half-word value from memory, see SH.
* To subtract by value and set condition codes according to unsigned arithmetic, or add not most significant part of multi-word integer value, see SL or SLR.
* To subtract 32-bit word floating-point values, see SE, SER, SD or SDR.
* To add a 32-bit word integer value, see AR, A, AH, AL or ALR.
* To check condition code, see BC or BCR.
| Previous Instruction SQXR | 360 Assembly Instructions {{{name}}} | Next Instruction SRA |
| Previous Opcode 1A | 360 Assembly Instructions {{{name}}} | Next Opcode 1C |
360 Assembly Language :
| 360 Family | Introduction · Basic FAQ · 360 Family · 360 Architecture |
| 360 Instruction Set | 360 Instructions · Branch Instructions · Data Transfer Instructions · Control Flow Instructions · Arithmetic Instructions · Logic Instructions · Shift and Rotate Instructions · Priveleged Instructions · Other Instructions |
| Syntaxes and Assemblers | 360 Assemblers· Pseudo Instructions |
| Instruction Extensions | Floating Point · High-Level Languages |
# 360 Assembly/360 Instructions/TRT

TRT - SS - Opcode DD - Scan a data string, looking for 1 or more specific characters.
The TRT instruction scans a field, looking for specific bytes. TRT does not change any data. The D1 field contains the address of the data to be scanned. The D2 field contains the address of a 256 byte table where each byte contains either X'00' or a non-zero byte, at the offset in the HEX table of the byte being searched for. TRT sets the condition code, indicating whether the object character(s) was found.
Availability
The TRT instruction is available on all models.
Caution
TRT changes both registers 1 and 2. TRT is the only instruction that changes reg-2 as part of the operation, so if you use TRT, then don't use reg-2 as your base.
Purpose of Instruction
The TRT instruction searches for specific bytes. For example, if you wanted to find the next occurrence either of C'D' or C'K', you would code:
SRCHTBL DC XL256'00'
Condition code, etc.
If a character is found:
* The scanning terminates
* Register 1 indicates the address of the data character found.
* The byte in the scan table that was non-zero is placed into the low byte of reg-2. The remaining bytes of reg-2 are not changed. This is the only instruction that changes register 2 without reg-2 being specified.
* If the character that is found is the last character of the scanned field, the condition code is set to 2; otherwise, it is set to 1.
Translate and test is implemented in micro code. Checks one byte at a time until either it finds a byte, or the data being scanned is exhausted.
Exceptions and Faults
Example looking for a non-blank on a print line.
- REG-1 CONTAINS ADDRESS OF NON-BLANK CHAR
NONBLANK DC 256C' '
Example testing a packed field.
BRTBL B NOTFOUND
TRTPACK DC 256X'0C'
Related instructions
# 360 Assembly/360 Instructions/SPM

SPM — Set Program Mask — Opcode 04 / Decimal 04 — 2 byte RR Instruction.

## Format

SPM program_mask_register, unused
SPM 1, 0 (Register 1 would contain the new mask, note that only the first 4 bits will be used.)

## Availability

The SPM instruction can be used on the 360, 370, 390, and System/Z.

## Purpose of Instruction

The SPM instruction changes the program mask and so masking arithmetic exceptions against causing an interrupt.
* Bit 0 - Integer overflow
* Bit 1 - Decimal overflow
* Bit 2 - Floating-point underflow
* Bit 3 - Floating-point overflow
# AQA A-Level Physics/Forced Vibrations, Damping and Resonance

Forced Vibrations and Resonance- Free vibrations are where the total energy stays the same over time. This means that the amplitude of the vibrations remain the same. This is a theoretical idea because in the real systems the energy is dissipated to the surroundings over time and the amplitude decays to 0. This dissipation is called dampening.
Free Vibration:
Heavy Damping:
Forced vibrations occur when the object is forced to vibrate at a particular frequency by a periodic input of force. Objects which are free to vibrate will have one or more natural frequencies at which they vibrate. These are the frequencies that the object will vibrate at when left for a time, and they natural reach these frequencies. If an object is being forced to vibrate at its natural frequency, resonance occurs and you will generate very large amplitude vibrations.
The effect of damping on resonance graph: The amplitude of the resonance peak decreases and the peak occurs at a lower frequency. So damping lowers the natural frequency of an object and also decreases the magnitude of the amplitude of the wave.
Phase and resonance: The phase relationship between the driving oscillation and the oscillation of the object being driven is different at different frequencies. -Below resonance they are in phase with each other
-At resonance the phase relationship is 90 degrees
-Above resonance the phase relationship is 180 degrees.
# AQA A-Level Physics/List of formulas

De Broglie wavelength: ${\frac {h}{mv}}$ where h = Planck's Constant
ELECTRICITY
$I={\frac {V}{R}}$
$V={\frac {W}{Q}}$
$I={\frac {Q}{t}}$
Resistors in series
$R=R_{1}+R_{2}+R_{3}+.......$
Resistors in parallel
${\frac {1}{R}}={\frac {1}{R_{1}}}+{\frac {1}{R_{2}}}+{\frac {1}{R_{3}}}+.....$
Resistivity
$\rho ={\frac {RA}{l}}$
$P=IV={\frac {V^{2}}{R}}$
Induced EMF
$\epsilon ={\frac {E}{Q}}$
$\epsilon =I(R+r)$
Alternating current
$I_{rms}={\frac {I_{peak}}{\sqrt {2}}}$
$V_{rms}={\frac {V_{peak}}{\sqrt {2}}}$