Notes, summaries, assignments, exams, and problems

Sort by
Subject
Level

Shell script

Classified in Computers

Written on in English with a size of 2.47 KB

Ejercicio de descuentos:

#!/bin/bash

read -p "¿Desea el billete también de vuelta? (s/n): " idavuelta

until [ $idavuelta=="s" ] || [ $idavuelta=="n" ]; do

read -p "¿Desea el billete también de vuelta? (s/n): " idavuelta

done

read -p "¿Tiene carnet joven? (s/n): " carnetjoven

until [ $carnetjoven="s" ] || [ $carnetjoven="n" ]; do

read -p "¿Tiene carnet joven? (s/n): " carnetjoven

done

descuento=0 billete=20

if [ $idavuelta="s" ]; then

descuento=20

billete=" expr $billete \* 2'

fi

if [ $carnetjoven="s" ]j then

descuento=30

fi

costefinal=`expr $billete \* \( 100 - $descuento \) / 100`

echo "El precio final del billete es $costefinal"



Ejercicio de medias:

#!/bin/bash

acu=0

cont=0

read -p "Introduce un numero: " num

while [ $num -ne 0 ]; do

acu=`expr $acu + $num`

cont=... Continue reading "Shell script" »

Count Lucanor - Full Paper

Posted by Javi and classified in Language

Written on in English with a size of 294.6 KB

Foreword

In the name of God amen. Among the many strange and wonderful things that made the Lord God is one that is most striking, as is the fact that there are so many people in the world, none is identical to the traits of the face, although that all have the same elements in it. If the faces that are so small, they show such great variety, it is not surprising that there are large differences in the desires and inclinations of men. So you will see that no man is like another, nor in the will or its inclinations, and so I give some examples so that you can understand it better.

All who love and want to serve God, but want the same, each one serves a different way, as some do in one way and others another way. Likewise, all in the service... Continue reading "Count Lucanor - Full Paper" »

Power control.

Classified in Electronics

Written on in English with a size of 40.96 KB

To control by PWM requires 2 factors:

1-crossing detection signal by 0.

2-? determine the time, every time you walk by 0.

to detect the zero crossing can be performed
through an operational amplifier connected
comparator.

gYQAAAAASUVORK5CYII =

TCA = 785
Pin Symbol Function
1 GND Earth
2 Q2 *Output 2 Inverted
3 Output U QU
4 Q1 * Output 1 Inverted
5 5Synchronizing voltage Vsync (to detect
zero crossing)
6 Inhibitor
7 QZ Z Output
8 8 Vref voltage stabilized (continuous signal for the
integrator)
9 9 ramp resistor R9 (for the integrator)
10 C10 ramp Capacitance (for the integrator)
11 11 V11 Control Voltage (for comparator)
12 12 C12 pulse Extension
13 LLong pulse
14 Q1 Output 1
15 Q2 Output 2
16 l sSupply voltage.
2Q ==

Beowulf: A Mirror of Anglo-Saxon Civilization

Classified in Arts and Humanities

Written on in English with a size of 4.04 KB

The Anglo-Saxon period, spanning from approximately 410 to 1066 AD, was a time of significant social, cultural, artistic, and economic development in England. As a society built on tribal loyalties, warrior honor, and emerging Christian influences, the Anglo-Saxons left a lasting impact on literature, most notably through the epic poem *Beowulf*. This literary masterpiece serves as both a reflection and a preservation of the values and traditions of its time, offering deep insight into Anglo-Saxon life.

Anglo-Saxon Society and Warrior Ethos

Anglo-Saxon society was primarily warrior-based, structured around the concept of the *comitatus*, a mutually beneficial relationship between a king and his warriors. This system emphasized loyalty and protection,... Continue reading "Beowulf: A Mirror of Anglo-Saxon Civilization" »

NLP Techniques: Text Generation, Semantic Search & More

Classified in Electronics

Written on in English with a size of 3.92 KB

Preprocessing the Dataset

a. Normalize the Text

Python

import re
from nltk.tokenize import word_tokenize
import nltk
nltk.download('punkt')

# Preprocessing Function
def preprocess(text):
    text = re.sub(r'[^a-z\s]', '', text.lower())
    return word_tokenize(text)

# Apply Preprocessing
df['Processed'] = df['Sentence'].apply(preprocess)
print(df)


GPT-2 Text Generation

Python

from transformers import pipeline

# Load GPT-2 Model for Text Generation
generator = pipeline('text-generation', model='gpt2')

# Generate Text for a Given Prompt
prompt = "Once upon a time"
result = generator(prompt, max_length=50,
    num_return_sequences=1)
print(result[0]['generated_text'])


GPT-2 for AI Prompts

a. Prompt 1 - Future of AI

Python

prompt = "What is the future
... Continue reading "NLP Techniques: Text Generation, Semantic Search & More" »

Crafting Story Adaptations

Classified in Spanish

Written on in English with a size of 4.3 KB

Story Adaptation Techniques

Structure

  • 1. Introduction: Set the scene or context.
    • Generic phrases:
    • It was a [description] day, and I felt [emotion].
    • I had no idea what was about to happen.
    • The moment I stepped off the plane, I knew this was going to be a special journey.
  • 2. Development: Introduce the main problem or surprising situation.
    • Change the context and the details based on the topic.
    • Example: If the story is about an elephant from Africa that loses a tusk on a plane:
    • As the plane took off, [character] felt a strange sensation in his tusk.
  • 3. Conclusion: End with a resolution or reflection.
    • Generic phrases:
    • In the end, I realized [reflection].
    • That day taught me something I’ll never forget.
    • Now, looking back, I understand why it happened.

Example

Original:

... Continue reading "Crafting Story Adaptations" »

Advanced English Vocabulary: Health, Success, and Society

Classified in Medicine & Health

Written on in English with a size of 5.6 KB

Health and Well-being Vocabulary

  • Burn off
  • Complexion
  • Craze (a popular trend or fashion)
  • Do (something/someone) the world of good
  • Fad (a short-term trend)
  • Get back into shape
  • Mindfulness
  • Pull a muscle
  • Stamina
  • Therapeutic
  • Well-being
  • Wrinkle (a crease or line in the skin)
  • Aches and pains
  • (As) Fit as a fiddle
  • Be the picture of health
  • Be back on your feet
  • Be full of beans
  • Hard of hearing
  • (Have) A frog in your throat
  • Off-colour (slightly ill)
  • Alleviate symptoms
  • Be prescribed medication
  • Consult a specialist
  • Contract an illness
  • Have an operation
  • Have treatment
  • Miss an appointment
  • Sustain an injury (suffer physical damage due to an accident)

Challenges, Progress, and Success Terms

  • A long shot (a remote possibility)
  • Be more than you bargained for
  • On track (making progress and likely
... Continue reading "Advanced English Vocabulary: Health, Success, and Society" »

Jamie Oliver: A Culinary Icon

Classified in English

Written on in English with a size of 7.28 KB

Verb Tenses

Present Continuous vs. Present Simple

1. I'm angry with William. I am not talking / don't talk to him.

2. Listen! My sister is singing / sings in the shower.

3. This cheese tastes / is tasting strange.

4. Are you thinking / Do you think Ann is pretty?

5. Laura is walking / walks to school every day.

Past Simple vs. Past Continuous

1. The sun SETS (set) in the west.

2. Please don't disturb me. I AM STUDYING (study).

3. I still DON’T KNOW (not know) the answer.

4. DO YOU ALWAYS GO (you / always /go) to the cinema on Friday nights?

5. We HAVE (have) a picnic next Sunday.

Present Simple vs. Present Continuous

6. How much DOES THIS PARCEL WEIGH (this parcel / weigh)?

7. Ms Rivers is busy at the moment. She IS TEACHING (teach).

8. Now I REMEMBER (remember)... Continue reading "Jamie Oliver: A Culinary Icon" »

Mastering Verbs: Gerunds, Infinitives & Key Vocabulary

Classified in Training and Employment Advise

Written on in English with a size of 4.5 KB

Verbs Followed by Gerunds

  • ADMIT
  • ADVISE
  • AVOID
  • BEGIN
  • CAN'T HELP
  • CAN'T STAND
  • CAN'T IMAGINE
  • COMPLETE
  • CONSIDER
  • CONTINUE
  • DELAY
  • DETEST
  • DISCUSS
  • DISLIKE
  • DON'T MIND
  • ENJOY
  • FINISH
  • FORGET
  • GIVE UP
  • GO ON
  • HATE
  • IMAGINE
  • INVOLVE
  • KEEP
  • LIKE
  • LOVE
  • MENTION
  • MIND
  • MISS
  • POSTPONE
  • PRACTICE
  • PREFER
  • RECALL
  • RECOMMEND
  • REGRET
  • REMEMBER
  • REPORT
  • RESIST
  • RISK
  • START
  • STOP
  • SUGGEST
  • TRY
  • UNDERSTAND

Verbs Followed by Infinitives

  • AFFORD
  • AGREE
  • APPEAR
  • ARRANGE
  • ASK
  • ATTEMPT
  • BEG
  • BEGIN
  • CHOOSE
  • CONSENT
  • CONTINUE
  • DARE
  • DECIDE
  • DEMAND
  • EXPECT
  • FORGET
  • GET READY
  • GO ON
  • HATE
  • HOPE
  • INTEND
  • LEARN
  • LIKE
  • LOVE
  • MANAGE
  • NEED
  • NECESSITATE
  • OFFER
  • PREPARE
  • PRETEND
  • PROMISE
  • REFUSE
  • REMEMBER
  • SEEM
  • START
  • STOP
  • THREATEN
  • TRY
  • WAIT
  • WANT
  • WISH

Verbs Accepting Both Gerunds and Infinitives

  • LIKE
  • LOVE
  • START
  • HATE
  • BEGIN
  • CONTINUE

Verbs que Canvien de Significat: Gerund vs. Infinitiu

  • FORGET
    • -ING: Oblidar una acció passada (no recordar haver-
... Continue reading "Mastering Verbs: Gerunds, Infinitives & Key Vocabulary" »

Key Terms in Production and Inventory Management

Classified in Design and Engineering

Written on in English with a size of 4.14 KB

Inventory Management

Safety Stock: The amount of inventory carried in addition to the expected demand.

Stock Keeping Unit (SKU): A common term used to identify an inventory item.

Material Requirements Planning (MRP)

Available to Promise: A feature of MRP systems that identifies the difference between the number of units currently included in the master schedule and actual (firm) customer orders.

Bill of Materials (BOM): A computer file that contains the complete product description, listing the materials, parts, and components, and the sequence in which the product is created.

Closed-loop MRP: The use of actual data from the production system to continually update the MRP system. This feedback is provided so that planning can be kept valid at all... Continue reading "Key Terms in Production and Inventory Management" »