Notes, summaries, assignments, exams, and problems for University

Sort by
Subject
Level

Essential Python Programming Snippets and Algorithms

Classified in Computers

Written on in English with a size of 3.17 KB

Jabber JID to Email Conversion

def jid2email(jid):
    email = jid[:jid.find('/')]
    return email

if __name__ == '__main__':
    jabber = '[email protected]/quertyy'
    print(jid2email(jabber))

Lists vs. Tuples

Lists are mutable and can be changed by internal operations, whereas tuples are immutable.

Remove Duplicates from String

def remove_dup(string):
    result = []
    for char in string:
        if char not in result:
            result.append(char)
    return ''.join(result)

Identical Character Count

def count_max(in_string):
    d = dict()
    for c in in_string:
        d[c] = d.get(c, 0) + 1
    return max(d.items(), key=lambda x: x[1])

# Using collections
from collections import Counter
def counter_max(in_string):
    return Counter(in_
... Continue reading "Essential Python Programming Snippets and Algorithms" »

Understanding Public Policy Models and Theories

Classified in Economy

Written on in English with a size of 2.67 KB

Policy as Institutional Output

  • Governments bestow legitimacy, universality, and mandatory policies.
  • The characteristics of government organizations and institutions influence the types of public policies embraced by officials.
  • Certain issues, problems, and interest groups have more weight than others in government.

Process Model

  • It conceives the political process as a series of political activities: identification of the problem, establishment of the agenda, formulation, legitimation, implementation, and evaluation.

Group Theory Model

  • Policies are the efforts of groups to influence and modify public policies.

Theory of the Elite

  • Public policy reflects the interests and values of the elite rather than the demands of the people.
  • Change in public policy
... Continue reading "Understanding Public Policy Models and Theories" »

Key Business Concepts: From Intermediaries to Multinational Firms

Classified in Economy

Written on in English with a size of 4.92 KB

1- Intermediaries: Buy products from manufacturers and resell them to consumers.

Revenue: Money a business makes from selling its goods.
Profit: A financial gain, especially the difference between the amount earned and the amount spent in buying, operating, or producing something.
Top line (Sales Revenue): Prices go up. Bottom line: Expenses and Profit.
Stakeholders: Groups of people who are affected by the policies and decisions made by an organization.
Micro: Decisions made by individuals and businesses. Macro: National economy and global economy.
GDP: Total dollar value of all goods and services produced by all people.
CPI: Measures the changes in prices of a fixed basket of goods purchased by a consumer.
Fiscal policy: Government influence on the
... Continue reading "Key Business Concepts: From Intermediaries to Multinational Firms" »

Understanding Business Statistics: Concepts and Techniques

Classified in Mathematics

Written on in English with a size of 2.46 KB

1. The role of business statistics is to convert data into meaningful info.

2. The two primary categories of statistical interference tools are estimation and hypothesis testing.
3. The sampling method by which the population is divided into groups that are each intended to be mini-populations is known as cluster sampling.
4. The set of all objects or individuals of interest or the measurements obtained from all objects or individuals of interest is a population.
5. Descriptive numerical measures that are computed from the entire population are called parameters.
6. A sampling technique that selects the items from the population based on accessibility and ease of selection is called convenience sampling
7. In which of the following sampling methods
... Continue reading "Understanding Business Statistics: Concepts and Techniques" »

Effective Strategies for Teaching Reading, Speaking, Writing, and Listening Skills

Classified in Teaching & Education

Written on in English with a size of 3.65 KB

How to Teach the Four Skills: Reading, Speaking, Writing, and Listening

a) How to Teach ReadingActually there are three stages in teaching reading:

  • Pre-reading: In this stage, the teacher starts by contextualizing the topic of the reading process by using proverbs, quotes, pictures, videos, or short discussions, etc. Then, move to explain vocabulary items that students may encounter in the text. After that, he asks for their predictions about the topic of the text they are going to read.
  • While-reading: Teacher gives the text to students and asks them to read it silently and check their predictions (this process called skimming). Then the teacher asks them to read again to answer the comprehension questions (this process called scanning).
  • Post-reading:
... Continue reading "Effective Strategies for Teaching Reading, Speaking, Writing, and Listening Skills" »

Motor Control: Pathways, Neurons, and Muscle Function

Classified in Biology

Written on in English with a size of 4.33 KB

Muscle spindles stimulate stretch, while Golgi tendon organs stimulate muscle contraction. Cerebellar tremor is characterized by low frequency. Motor pathways begin in the cerebral cortex and brainstem. Lower spinal cord motoneurons innervate skeletal muscles, including extrafusal and intrafusal fibers. Stimulation of muscle spindles or Golgi tendon organs is accomplished through the reticulospinal tract.

Muscle Tone and Movement Disorders

  • Hypotonia: Decreased muscle tone
  • Dyskinesia: Atypical, unconscious muscle movement
  • Hypertonia: Increased muscle tone
  • Spasticity: Hyper-contraction of muscles
  • Akinesia: Atypical unconscious posture

Cortical Control of Movement

Layer V contains pyramidal neurons. The primary motor cortex contains smaller and fewer... Continue reading "Motor Control: Pathways, Neurons, and Muscle Function" »

The History of Cork: From Viking Roots to Modern Times

Classified in History

Written on in English with a size of 2.56 KB

Cork, located on Ireland's south coast, is the second-largest city in the Republic of Ireland and the third-largest on the island of Ireland, following Dublin and Belfast. It is the largest city in the province of Munster, with a history dating back to the 6th century.

Origins of Cork

Cork began as a monastic settlement founded by St. Finbar in the 6th century. However, the ancestor of the modern city was established between 915 and 922 by Viking settlers who created a trading community. The Viking leader Ottir Iarla is particularly associated with raiding and conquests in Munster, and the Cogad Gáedel re Gallaib links this to the earliest Viking settlement of Cork. The Norse phase left a legacy of family names, such as Cotter and Coppinger,... Continue reading "The History of Cork: From Viking Roots to Modern Times" »

Data Manipulation and Visualization with R and the nycflights13 Dataset

Classified in Computers

Written on in English with a size of 3.64 KB

library(nycflights13)
library(tidyverse)

Data Manipulation with dplyr

Ordering Rows with arrange()

arrange(flights, year, month, day)
arrange(flights, desc(arr_delay))

Handling NAs

df <- tibble(x = c(5, 2, NA))
arrange(df, x)
arrange(df, desc(x))

Selecting Columns with select()

select(flights, year, month, day)
select(flights, year:day)
select(flights, -(year:day))
rename(flights, mes = month)
select(flights, time_hour, air_time, everything())

Creating New Variables with mutate()

flights_sml <- select(flights, year:day, ends_with("delay"), distance, air_time)
mutate(flights_sml, gain = arr_delay - dep_delay, speed = distance / air_time * 60)

Creating Functions with Vector Arguments

transmute(flights, dep_time, hour = dep_time %/% 100, minute = dep_time %
... Continue reading "Data Manipulation and Visualization with R and the nycflights13 Dataset" »

Second Language Acquisition: Key Processes and Theories

Classified in Electronics

Written on in English with a size of 3.84 KB

L1 Transfer in Second Language Acquisition

L1 Transfer refers to the influence that a learner’s first language (L1) exerts over the acquisition of a second language (L2). This includes positive transfer, negative transfer, overuse, and avoidance.

Theoretical Accounts of L1 Transfer

  • Behaviourism: Errors were viewed as the result of interference. The habits of the L1 were supposed to prevent the learner from learning the habits of the L2.
  • Contrastive Analysis (CA): Comparisons of the two languages were carried out using CA to predict difficulties.
  • Mentalist Accounts: These suggest that only a few errors are the result of L1 transfer.
  • Cognitive Accounts: Transfer is viewed as a cognitive process, with the L1 acting as a kind of input from the inside.
... Continue reading "Second Language Acquisition: Key Processes and Theories" »

Language Variation and Linguistic Analysis

Classified in Social sciences

Written on in English with a size of 2.21 KB

Linguistics and Applied Linguistics: A Complex Relationship

One approach to practical and professional language issues involves connecting them to linguistic principles. Linguistics seeks general patterns in language.

Generative Linguistics and Idealization

Generative linguistics, introduced by Noam Chomsky, emphasizes the representation of language in the mind (competence) over actual language use in everyday life (performance).

Sociolinguistics, Functional Linguistics, and Corpus Linguistics

Sociolinguistics focuses on the relationship between language and society. Functional linguistics examines language as a communication tool. Corpus linguistics has become increasingly important in investigating language use.

Prescribing vs. Describing Language:

... Continue reading "Language Variation and Linguistic Analysis" »