Khushman

# ============================
# 1. K-MEANS CLUSTERING
# ============================

# Create synthetic 2D data with 3 clusters
X_blobs, y_blobs = make_blobs(n_samples=300, centers=3, random_state=42)

# Fit KMeans
kmeans = KMeans(n_clusters=3, random_state=42, n_init=10)
kmeans.fit(X_blobs)

# Get cluster labels
cluster_labels = kmeans.labels_
centers = kmeans.cluster_centers_

print("KMeans cluster centers:\n", centers)

# Plot clusters
plt.figure(figsize=(6, 5))
plt.scatter(X_blobs[:, 0], X_blobs[:, 1],...

See on Student Notes »

newer

Q1. Inheritance in Java (10 Marks)

Inheritance is an important feature of Object-Oriented Programming which allows one class to acquire the properties and methods of another class. The class that gives its features is called the parent class or superclass, and the class that receives them is called the child class or subclass. In Java, inheritance is implemented using the extends keyword.

There are mainly three types of inheritance in Java:
(1) Single level inheritance – one parent and one child...

See on Wikiteka »

Direito 2

4. Princípios Gerais do Direito

Podem ser:

🔹 De natureza material

  • Segurança jurídica

  • Certeza jurídica

  • Confiança legítima

🔹 De natureza formal

Exemplos:

  • Legalidade (art. 3.º CRP)

  • Universalidade (art. 12.º CRP)

  • Igualdade (art. 13.º CRP)

  • Tutela jurisdicional efetiva (art. 20.º CRP)

  • Aplicação das leis no tempo (art. 12.º CC)

➡️ Podem ser gerais, especiais ou autónomos (ex.: ne bis in idem).

5. Costume

Conjunto de práticas sociais reiteradas com convicção

...

See on Wikiteka »

french

Un accident que j'ai vu
La semaine dernière, j'ai été témoin d'un accident à la maison. C'était l'après-midi et je jouais avec quelques jouets dans le salon. Mon petit frère voulait attraper un bocal sur une étagère et il est monté sur une chaise. Il a perdu l'équilibre et est tombé par terre. Il s'est fait mal au bras et il pleurait beaucoup. J'étais très inquiet. J'ai appelé mes parents. Ma mère a nettoyé la plaie avec du désinfectant et a mis un pansement. Mon père a rangé

...

See on Wikiteka »

Political obligation 3

*Concept of Political Obligation*

Political obligation refers to the moral duty of citizens to obey the laws and rules of their government. It's about the relationship between individuals and the state, and the reasons why citizens should respect and follow authority.

*Theories of Political Obligation:*

- *Social Contract Theory*: Citizens consent to be governed in exchange for protection and services (e.g., Hobbes, Locke, Rousseau).

- *Natural Duty Theory*: Citizens have a moral duty to support

...

See on Student Notes »

odontotecnico

Sistemi dei perni a spillo 1Impronta con due elementi (34 e 35) preparati. 2. Utilizziamo in questo caso dei perni doppi, poiché rispetto a quelli singoli presentano una migliore stabilità e precisione nella base. 3. I perni a spillo vengono inseriti nell’impronta, ricercando un buon parallelismo tra i vari perni (per sfilare agevolmente le future sezioni) e mantenendoli per quanto possibile alla stessa altezza (si possono compensare eventuali piccole differenze affondando più o meno ogni perno

...

See on Wikiteka »

final exam

  • Unique Period: Adolescence is a distinct developmental period (roughly ages 10-25) characterized by rapid biological, cognitive, and social changes. It is the transition from childhood to adulthood .
  • "Storm and Stress" Stereotype:
    • Definition: Coined by G. Stanley Hall (1904), this view depicts adolescence as a time of inevitable turmoil, moodiness, and conflict with parents.
    • Accuracy: It is not accurate to say it is universal or biological "destiny." While adolescents experience more emotional
...

See on Wikiteka »

relatório

O presente relatório visa descrever a Iniciação à Prática Profissional II (IPPII) realizada no Jardim de Infância Cinderela, uma instituição integrada na Santa Casa da Misericórdia. O estágio decorreu no período compreendido entre os dias [Data de Início] e [Data de Fim], na sala destinada às crianças de 3/5 anos. Tive a oportunidade de observar a rotina, participar nas atividades propostas pela educadora e planear e implementar intervenções pedagógicas próprias .

A rotina da instituição

...

See on Wikiteka »

Englishhh

1. Word Stress 

Word stress refers to giving extra emphasis, loudness, or length to one syllable in a word so that it stands out more clearly than the others. English is a stress-timed language, which means correct stress is necessary for clear pronunciation and understanding. Incorrect stress can change the meaning or make the speaker sound unclear or unnatural. For example, words like “juDIcial,” “aPPEAL,” and “conTRACT” (noun) have fixed stress patterns, while the same spelling “conTRACT”...

See on Student Notes »