domingo, 19 de julho de 2015

Python


4. Glossary

modulus operator
An operator, denoted with a percent sign (%), that works on integers and yields the remainder when one number is divided by another.
boolean expression
An expression that is either true or false.
comparison operator
One of the operators that compares two values: ==, !=, >, <, >=, and <=.
logical operator
One of the operators that combines boolean expressions: and, or, and not.
conditional statement
A statement that controls the flow of execution depending on some condition.
condition
The boolean expression in a conditional statement that determines which branch is executed.
compound statement
A statement that consists of a header and a body. The header ends with a colon (:). The body is indented relative to the header.
block
A group of consecutive statements with the same indentation.
body
The block in a compound statement that follows the header.
nesting
One program structure within another, such as a conditional statement inside a branch of another conditional statement.
recursion
The process of calling the function that is currently executing.
base case
A branch of the conditional statement in a recursive function that does not result in a recursive call.
infinite recursion
A function that calls itself recursively without ever reaching the base case. Eventually, an infinite recursion causes a runtime error.
prompt
A visual cue that tells the user to input data.
.

Python

3. Glossary

function call
A statement that executes a function. It consists of the name of the function followed by a list of arguments enclosed in parentheses.
argument
A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function.
return value
The result of a function. If a function call is used as an expression, the return value is the value of the expression.
type conversion
An explicit statement that takes a value of one type and computes a corresponding value of another type.
type coercion
A type conversion that happens automatically according to Python's coercion rules.
module
A file that contains a collection of related functions and classes.
dot notation
The syntax for calling a function in another module, specifying the module name followed by a dot (period) and the function name.
function
A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result.
function definition
A statement that creates a new function, specifying its name, parameters, and the statements it executes.
flow of execution
The order in which statements are executed during a program run.
parameter
A name used inside a function to refer to the value passed as an argument.
local variable
A variable defined inside a function. A local variable can only be used inside its function.
stack diagram
A graphical representation of a stack of functions, their variables, and the values to which they refer.
frame
A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function.
traceback
A list of the functions that are executing, printed when a runtime error occurs.
 
 
.

Animated Flyover of Pluto’s Icy Mountain and Plains

Python

2. Glossary

value
A number or string (or other thing to be named later) that can be stored in a variable or computed in an expression.
type
A set of values. The type of a value determines how it can be used in expressions. So far, the types you have seen are integers (type int), floating-point numbers (type float), and strings (type string).
floating-point
A format for representing numbers with fractional parts.
variable
A name that refers to a value.
statement
A section of code that represents a command or action. So far, the statements you have seen are assignments and print statements.
assignment
A statement that assigns a value to a variable.
state diagram
A graphical representation of a set of variables and the values to which they refer.
keyword
A reserved word that is used by the compiler to parse a program; you cannot use keywords like if, def, and while as variable names.
operator
A special symbol that represents a simple computation like addition, multiplication, or string concatenation.
operand
One of the values on which an operator operates.
expression
A combination of variables, operators, and values that represents a single result value.
evaluate
To simplify an expression by performing the operations in order to yield a single value.
integer division
An operation that divides one integer by another and yields an integer. Integer division yields only the whole number of times that the numerator is divisible by the denominator and discards any remainder.
rules of precedence
The set of rules governing the order in which expressions involving multiple operators and operands are evaluated.
concatenate
To join two operands end-to-end.
composition
The ability to combine simple expressions and statements into compound statements and expressions in order to represent complex computations concisely.
comment
Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program.
.

Everything But the Girl - Amplified Heart (Full Album)

Python

1. Glossary

problem solving
The process of formulating a problem, finding a solution, and expressing the solution.
high-level language
A programming language like Python that is designed to be easy for humans to read and write.
low-level language
A programming language that is designed to be easy for a computer to execute; also called "machine language" or "assembly language."
portability
A property of a program that can run on more than one kind of computer.
interpret
To execute a program in a high-level language by translating it one line at a time.
compile
To translate a program written in a high-level language into a low-level language all at once, in preparation for later execution.
source code
A program in a high-level language before being compiled.
object code
The output of the compiler after it translates the program.
executable
Another name for object code that is ready to be executed.
script
A program stored in a file (usually one that will be interpreted).
program
A set of instructions that specifies a computation.
algorithm
A general process for solving a category of problems.
bug
An error in a program.
debugging
The process of finding and removing any of the three kinds of programming errors.
syntax
The structure of a program.
syntax error
An error in a program that makes it impossible to parse (and therefore impossible to interpret).
runtime error
An error that does not occur until the program has started to execute but that prevents the program from continuing.
exception
Another name for a runtime error.
semantic error
An error in a program that makes it do something other than what the programmer intended.
semantics
The meaning of a program.
natural language
Any one of the languages that people speak that evolved naturally.
formal language
Any one of the languages that people have designed for specific purposes, such as representing mathematical ideas or computer programs; all programming languages are formal languages.
token
One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language.
parse
To examine a program and analyze the syntactic structure.
print statement
An instruction that causes the Python interpreter to display a value on the screen.


.

MIT 6-189-a-gentle-introduction-to-programming-using-python

 site
# TOPICS HANDOUTS AND EXAMPLES
1 Introduction Getting started (PDF)
raw_input_example.py (PY)
2 Conditionals, loops How to comment code properly (PDF)
height_example.py (PY)
conditional_examples.py (PY)
loop_examples.py (PY)
3 Defining functions lecture3.py (PY)
functions.py (PY)
check_for_vowels.py (PY)
4 Strings, lists, list comprehensions string_examples.py (PY)
list_examples.py (PY)
comprehension_examples.py (PY)
Additional Material Two examples of a rock-paper-scissors program:
rps_example1.py (PY)
rps_example2.py (PY)
How to use while-else loops (suggestion: don't use them at all, but if you do be aware they work differently than you might think):
while_else.py (PY)
Optional lecture Recursion Recursion notes (PDF)
Recursion examples (PY)
Optional problems (PDF)
Solutions to optional problems (PY)
5 Tuples, dictionaries, common Python mistakes tuple_examples.py (PY)
Remember that the keys of a dictionary must be immutable objects, but the values of a dictionary can be either immutable or mutable objects.
Common Python mistakes and misconceptions (PDF)
6 Classes point.py (PY)
7 More about classes wheel.py (PY)
8 Inheritance inheritance_examples.py (PY)


Years & Years - King (Official Video)

Ler on line:



Jose Eduardo Agualusa/A Rainha Ginga (pdf)

Ondas Eletromagnéticas e Fotões; Corpúsculos e Ondas



Principio de Conservação de Partículas



É conveniente remarcar que, diferentemente dos fotões que podem ser emitidos ou absorvidos no decurso de uma experiência, os corpúsculos materiais não podem ser criados ou destruídos: quando um filamento aquecido emite eletrões, estes pré-existem no filamento; da mesma maneira, um eletrão absorvido por um contador não desaparece, mas ele se encontra num átomo ou participa numa corrente elétrica. Na realidade a teoria da relatividade ensina que é possível criar e aniquilar  corpúsculos materiais; por exemplo um fotão de energia suficiente, passando perto de um átomo, pode materializar-se num par eletrão-positrão; inversamente, o positrão, encontrando um eletrão, se aniquila com ele e darão dois fotões.
A necessidade de abandonar esta lei de conservação de partículas da MQ não-relativista é uma das dificuldades importantes que encontramos quando procuramos construir uma mecânica quântica relativista.



.

Valerá a pena pensar:

um método de engenharia eficaz que produza camadas de grafeno em grandes quantidades

sábado, 18 de julho de 2015

Schumann/Liszt Dedication

Sede de cinco pétalas



Se me dizes
no idioma das àguas
que nascem lá muito longe:

"Vem,
e deita-te a meu lado,
tenho sede
de cinco pétalas."

Eu te digo:
Bebamos pela mesma taça.
É nossa a vinha,
o néctar, a vida a sobrar
da auréola do sangue
ao sono de pálpebras abertas.

De face contra face
de têmpora contra têmpora,
de pulso a pulso,
o silêncio intacto,
perfumado,
o tempo liquido,
sulcado,
os dedos como serpentes.
os anéis dos lábios cingidos,
sôfregos ambos,
ambos do mesmo ventre
e a rosa da noite para abrir.



antónio carneiro

The Icy Mountains of Pluto


STEREO : imagem do sol

This image of the sun was taken on July 15, 2015, with the Extreme Ultraviolet Imager onboard NASA's Solar TErrestrial RElations Observatory Ahead (STEREO-A) spacecraft, which collects images in several wavelengths of light that are invisible to the human eye. This image shows the sun in wavelengths of 171 angstroms, typically colorized in blue. 

sexta-feira, 17 de julho de 2015

site: http://www.nobelprize.org/nobel_prizes/themes/physics/karlsson/index.html 

The Nobel Prize in Physics 1901-2000

by Erik B. Karlsson*

What Is Physics?

Physics is considered to be the most basic of the natural sciences. It deals with the fundamental constituents of matter and their interactions as well as the nature of atoms and the build-up of molecules and condensed matter. It tries to give unified descriptions of the behavior of matter as well as of radiation, covering as many types of phenomena as possible. In some of its applications, it comes close to the classical areas of chemistry, and in others there is a clear connection to the phenomena traditionally studied by astronomers. Present trends are even pointing toward a closer approach of some areas of physics and microbiology.
Although chemistry and astronomy are clearly independent scientific disciplines, both use physics as a basis in the treatment of their respective problem areas, concepts and tools. To distinguish what is physics and chemistry in certain overlapping areas is often difficult. This has been illustrated several times in the history of the Nobel Prizes. Therefore, a few awards for chemistry will also be mentioned in the text that follows, particularly when they are closely connected to the works of the Physics Laureates themselves. As for astronomy, the situation is different since it has no Nobel Prizes of its own; it has therefore been natural from the start, to consider discoveries in astrophysics as possible candidates for Prizes in Physics.

A europa não caberia em Plutão


Livro na net

Links para espreitar


Leituras

Jornais