New pages

From Master of Neuroscience Wiki
New pages
Hide registered users | Hide bots | Show redirects
(newest | oldest) View ( | older 50) (20 | 50 | 100 | 250 | 500)

16 October 2025

  • 16:0416:04, 16 October 2025 The N-dimensional array (ndarray) (hist | edit) [35,281 bytes] Davrot (talk | contribs) (Created page with " == The goal == Class has a very important job as a core container type in Python. It is really hard to find a good overview how to use them in a good practice manner. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Chaining of (ndarray) methods == <syntaxhighlight lang="python">import numpy as np a = np.ones((3, 3)) b = a.mean(axis=1).max() print(b) # -> 1.0</syntaxhighlight> == [https://numpy.org/doc/stable/reference/generated/numpy.ndarray.fill.html n...") Tag: Visual edit
  • 15:4715:47, 16 October 2025 Collection of distinct hashable objects -- set and frozenset (hist | edit) [4,813 bytes] Davrot (talk | contribs) (Created page with " == Top == Questions to [mailto:davrot@uni-bremen.de David Rotermund] '''This is an optional topic!''' = [https://docs.python.org/3/library/stdtypes.html#set-types-set-frozenset Set Types — set, frozenset] = <blockquote>A set object is an unordered collection of distinct hashable objects. Common uses include membership testing, removing duplicates from a sequence, and computing mathematical operations such as intersection, union, difference, and symmetric difference....") Tag: Visual edit
  • 15:3215:32, 16 October 2025 Python Scopes and Namespaces (hist | edit) [4,930 bytes] Davrot (talk | contribs) (Created page with " == The goal == Questions to [mailto:davrot@uni-bremen.de David Rotermund] Shortened quotes from https://docs.python.org/3/tutorial/classes.html == [https://docs.python.org/3/tutorial/classes.html#scopes-and-namespaces-example Scopes and Namespaces Example] == <blockquote>This is an example demonstrating how to reference the different scopes and namespaces, and how [https://docs.python.org/3/reference/simple_stmts.html#global global] and [https://docs.python.org/3/refe...") Tag: Visual edit
  • 15:2515:25, 16 October 2025 Logging (hist | edit) [7,356 bytes] Davrot (talk | contribs) (Created page with " == The goal == We want to log either or onto the screen or file. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == [https://docs.python.org/3/library/logging.html#logging.getLogger logging.getLogger] == <syntaxhighlight lang="python">logging.getLogger(name=None)</syntaxhighlight><blockquote>Return a logger with the specified name or, if name is None, return a logger which is the root logger of the hierarchy. If specified, the name is typically a dot-separa...") Tag: Visual edit
  • 15:2415:24, 16 October 2025 ProcessPoolExecutor: A fast way to implement multiprocessing (hist | edit) [4,544 bytes] Davrot (talk | contribs) (Created page with " == The goal == A fast way (measured in source code length) for multi-processing a function. Is it the best way? No, but it is easily accessable. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == An example == We want to run 4 processes (number_of_cpu_processes = 4) at the same time. The first step is to get rid of most of the arguments of the function function_a. We use [https://docs.python.org/3/library/functools.html#functools.partial functools.partial]...") Tag: Visual edit
  • 15:1115:11, 16 October 2025 Organizing parameters: dataclasses and dataconf (hist | edit) [5,692 bytes] Davrot (talk | contribs) (Created page with " == The goal == In data science we have a lot of parameters in our simulations. Often the parameters are distributed over the whole source code. The combination of dataclass and dataconf allows it very easily to put the parameters in to a config file. dataconf supports many different config types. Among those are json and yaml. Questions to [mailto:davrot@uni-bremen.de David Rotermund]<syntaxhighlight lang="shell">pip install dataconf</syntaxhighlight> == Defining the...") Tag: Visual edit
  • 15:1015:10, 16 October 2025 Dataclass (hist | edit) [14,719 bytes] Davrot (talk | contribs) (Created page with " == The goal == There is a new build-in [https://docs.python.org/3/library/dataclasses.html dataclass] class which is highly interesting for data scientists. Obviously it is a class for storing your data. Who would have guessed… Questions to [mailto:davrot@uni-bremen.de David Rotermund] '''Type annotations required!!!''' This is the first construct in Python that requires type annotation. If we do this, we get this nice error!<syntaxhighlight lang="python">from dat...") Tag: Visual edit
  • 15:0915:09, 16 October 2025 The Python Standard Library​ (hist | edit) [22,763 bytes] Davrot (talk | contribs) (Created page with " == The goal == More than the standard instruction set… Questions to [mailto:davrot@uni-bremen.de David Rotermund] == [https://docs.python.org/3/library/text.html​ Text Processing Services] == <blockquote>The modules described in this chapter provide a wide range of string manipulation operations and other text processing services.</blockquote> {| class="wikitable" |'''[https://docs.python.org/3/library/string.html ​string]''' |'''Common string operations'''​ |...") Tag: Visual edit

15 October 2025

  • 15:2815:28, 15 October 2025 Pickle: save and load Python objects (hist | edit) [4,059 bytes] Davrot (talk | contribs) (Created page with " == The goal == How to store Python objects in files and how to restore them. Questions to [mailto:davrot@uni-bremen.de David Rotermund] '''Warning The pickle module is not secure. Only unpickle data you trust.''' == [https://docs.python.org/3/library/pickle.html#module-pickle pickle] == <blockquote>The [https://docs.python.org/3/library/pickle.html#module-pickle pickle] module implements binary protocols for serializing and de-serializing a Python object structure....") Tag: Visual edit
  • 13:4613:46, 15 October 2025 Built-in Keywords (hist | edit) [1,113 bytes] Davrot (talk | contribs) (Created page with " == The goal == You need to know the keywords for Python because you should not use them as variable, class, or function names. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == [https://docs.python.org/3/library/keyword.html Keywords] == <syntaxhighlight lang="python">import keyword print(keyword.kwlist) print() print(keyword.softkwlist) # -> ['_', 'case', 'match']</syntaxhighlight>Output:<syntaxhighlight lang="python">['False', 'None', 'True', 'and', 'as...") Tag: Visual edit
  • 13:4513:45, 15 October 2025 Built-in Functions (hist | edit) [12,009 bytes] Davrot (talk | contribs) (Created page with " == The goal == Do I need to know what all these functions are doing? No, but you are shouldn’t use these function names for your own functions! However… I marked the one in bold font that you should know. Questions to [mailto:davrot@uni-bremen.de David Rotermund] {| class="wikitable" |[https://docs.python.org/3/library/functions.html#abs '''abs()'''] |Return the absolute value of a number. |- |[https://docs.python.org/3/library/functions.html#aiter aiter()] |Retur...") Tag: Visual edit
  • 13:4413:44, 15 October 2025 Importing Modules (hist | edit) [7,709 bytes] Davrot (talk | contribs) (Created page with " == The goal == Collections of functions can be organized into modules. These modules are then imported into a programm or another module. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == [https://docs.python.org/3/tutorial/modules.html Basics] == <blockquote>A module is a file containing Python definitions and statements. The file name is the module name with the suffix .py appended. Within a module, the module’s name (as a string) is available as the v...") Tag: Visual edit
  • 13:3913:39, 15 October 2025 Exceptions (try / except) (hist | edit) [11,180 bytes] Davrot (talk | contribs) (Created page with " == The goal == The “modern” way (the concept is from the 1960) to deal with errors is to use exceptions. “Normal” errors just kill your program. Exceptions allow you to react to the error (if you want to). Plus, it is standardized and you don’t need to invent your own approach, which is important if source code is exchanged. An exception is thrown (i.e. raised under Python). And the program has to catch and deal with the exception. Questions to [mailto:davro...") Tag: Visual edit
  • 13:3213:32, 15 October 2025 Class (hist | edit) [31,947 bytes] Davrot (talk | contribs) (Created page with " == The goal == Class has a very important job as a core container type in Python. It is really hard to find a good overview how to use them in a good practice manner. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Basics == Class is the core component of object-oriented programming (OOP). A class is an [https://docs.python.org/3/reference/datamodel.html object] that can...") Tag: Visual edit
  • 13:2913:29, 15 October 2025 Finding files in a directory: glob (hist | edit) [2,624 bytes] Davrot (talk | contribs) (Created page with " == Goal == We want to deal with many files in a directory. What is an easy way to get the filename in a directory? Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Creating test files == <syntaxhighlight lang="python">from pathlib import Path Path("Testfile_1.mat").touch() Path("Testfile_2.mat").touch() Path("Testfile_10.mat").touch() Path("Testfile_3.mat").touch()</syntaxhighlight> == Using glob in a for-loop == <syntaxhighlight lang="python">import gl...") Tag: Visual edit
  • 13:2813:28, 15 October 2025 Creating order via sub-directories: os.makedirs (hist | edit) [2,007 bytes] Davrot (talk | contribs) (Created page with " == The goal == How can I make sure that the directory for my output data is always there? We just create it automatically every time via [https://docs.python.org/3/library/os.html#os.makedirs os.makedirs]! Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Creating a directory == <syntaxhighlight lang="python">import os some_path: str = "a_home_for_my_data" os.makedirs(some_path, exist_ok=True)</syntaxhighlight> == Creating a sub-sub-sub-directory == Firs...") Tag: Visual edit
  • 13:2713:27, 15 October 2025 JSON and dict for parameter files (hist | edit) [1,984 bytes] Davrot (talk | contribs) (Created page with " == The goal == A combination of JSON (JavaScript Object Notation) file and dictionaries allows to organize parameters in an external file. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == [https://docs.python.org/3/library/json.html json – JSON encoder and decoder] == === [https://docs.python.org/3/library/json.html#json.dump dump] === <syntaxhighlight lang="python">import json a = dict(one=1, two=2, three=3) with open("data_out.json", "w") as file:...") Tag: Visual edit
  • 13:2613:26, 15 October 2025 Files (hist | edit) [8,169 bytes] Davrot (talk | contribs) (Created page with " == The goal == How to deal with (non-numpy) files under Python? Questions to [mailto:davrot@uni-bremen.de David Rotermund] == [https://docs.python.org/3/library/functions.html#open Open] a file == <syntaxhighlight lang="python">open(file, mode='r', buffering=- 1, encoding=None, errors=None, newline=None, closefd=True, opener=None)</syntaxhighlight>The available modes are: {| class="wikitable" !Character !Meaning |- |'''‘r’''' |'''open for reading (default)'''​ |...") Tag: Visual edit
  • 13:2513:25, 15 October 2025 Type annotations (hist | edit) [12,992 bytes] Davrot (talk | contribs) (Created page with " == Goal == We want to use static type checking and type annotations in our Python code for detecting errors we made. We will use the mypy extension in VS code for that.<syntaxhighlight lang="python">a: int = 0 b: float = 0.0 a = b Incompatible types in assignment (expression has type "float", variable has type "int")</syntaxhighlight>Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Why [https://peps.python.org/pep-0484/ Type hints]? == Why we got type...") Tag: Visual edit
  • 13:1713:17, 15 October 2025 Functions (hist | edit) [11,477 bytes] Davrot (talk | contribs) (Created page with " == The goal == A function allows to separate a part of the code in a logical module that can be reused. Questions to [mailto:davrot@uni-bremen.de David Rotermund] '''Logic blocks need to be indented.​ Preferable with 4 spaces!''' == [https://docs.python.org/3/tutorial/controlflow.html#defining-functions Most simple function] == These three functions are equivalent:<syntaxhighlight lang="python">def my_function(): pass def my_function(): return def my_func...") Tag: Visual edit
  • 13:1513:15, 15 October 2025 Dict​ (hist | edit) [6,718 bytes] Davrot (talk | contribs) (Created page with " == The goal == Questions to [mailto:davrot@uni-bremen.de David Rotermund] == [https://docs.python.org/3/library/stdtypes.html#mapping-types-dict Mapping Types - dict​] == <blockquote>A mapping object maps hashable values to arbitrary objects. Mappings are mutable objects. There is currently only one standard mapping type, the dictionary. A dictionary’s keys are almost arbitrary values. Values that are not hashable, that is, values containing lists, dictionaries or...") Tag: Visual edit
  • 13:1413:14, 15 October 2025 Zip (hist | edit) [1,342 bytes] Davrot (talk | contribs) (Created page with " == Top == Questions to [mailto:davrot@uni-bremen.de David Rotermund] == [https://docs.python.org/3/library/functions.html#zip zip] == <syntaxhighlight lang="python">zip(*iterables, strict=False)</syntaxhighlight><blockquote>Iterate over several iterables in parallel, producing tuples with an item from each one.</blockquote><syntaxhighlight lang="python">a = zip([1, 2, 3], ["sugar", "spice", "everything nice"]) print(a) # -> <zip object at 0x7f34987f4380> for item in...") Tag: Visual edit
  • 13:1313:13, 15 October 2025 Tuple (hist | edit) [4,102 bytes] Davrot (talk | contribs) (Created page with " == The goal == Tuple are a non-mutable container which is typically used for heterogenic data types and is very important for functions with multiple return values. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == [https://docs.python.org/3/library/stdtypes.html#tuple​ Tuples​] == <blockquote>Tuples are immutable sequences, typically used to store collections of heterogeneous data (such as the 2-tuples produced by the enumerate() built-in). Tuples are...") Tag: Visual edit
  • 13:1213:12, 15 October 2025 List Comprehensions​ (hist | edit) [1,365 bytes] Davrot (talk | contribs) (Created page with " == Top == Questions to [mailto:davrot@uni-bremen.de David Rotermund] == [https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions List Comprehension] == <blockquote>List comprehensions provide a concise way to create lists. Common applications are to make new lists where each element is the result of some operations applied to each member of another sequence or iterable, or to create a subsequence of those elements that satisfy a certain condition.</b...") Tag: Visual edit
  • 13:0613:06, 15 October 2025 Lists (hist | edit) [8,504 bytes] Davrot (talk | contribs) (Created page with " == The goal == <blockquote>Lists are '''mutable''' sequences, '''typically''' used to store collections of '''homogeneous''' items (where the precise degree of similarity will vary by application).</blockquote>[https://docs.python.org/3/library/stdtypes.html#lists Quote] Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Example Lists == With homogeneous items:<syntaxhighlight lang="python">primes = [2, 3, 5, 7] collection_of_strings = [ "AA", "BB"...") Tag: Visual edit
  • 11:0211:02, 15 October 2025 Flow Control: match case (hist | edit) [9,242 bytes] Davrot (talk | contribs) (Created page with " == The goal == There is a new flow control in town. A switch case replacement, called match case. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == The [https://docs.python.org/3/reference/compound_stmts.html#the-match-statement match] statement == The match statement is used for pattern matching. Syntax:<syntaxhighlight lang="python">match_stmt ::= 'match' subject_expr ":" NEWLINE INDENT case_block+ DEDENT subject_expr ::= star_named_expression "," st...") Tag: Visual edit
  • 11:0111:01, 15 October 2025 Flow Control: while, pass, break, continue (hist | edit) [2,374 bytes] Davrot (talk | contribs) (Created page with " == The goal == While we wait… Questions to [mailto:davrot@uni-bremen.de David Rotermund] '''Logic blocks need to be indented.​ Preferable with 4 spaces!''' == [https://docs.python.org/3/reference/compound_stmts.html#the-while-statement The while statement] == <syntaxhighlight lang="python">i = 0​ while i < 3:​ print(i)​ i += 1</syntaxhighlight>Output<syntaxhighlight lang="python">0​ 1​ 2</syntaxhighlight> == The full statement == <syntaxhighlig...") Tag: Visual edit
  • 11:0011:00, 15 October 2025 Flow Control: for-loop (hist | edit) [5,320 bytes] Davrot (talk | contribs) (Created page with " == The goal == For what reason… Questions to [mailto:davrot@uni-bremen.de David Rotermund] '''Logic blocks need to be indented.​ Preferable with 4 spaces!''' == [https://docs.python.org/3/reference/compound_stmts.html#the-for-statement The for statement] == <blockquote>The for statement is used to iterate over the elements of a sequence (such as a string, tuple or list) or other iterable object</blockquote> === With range() === <syntaxhighlight lang="python">for...") Tag: Visual edit
  • 10:5910:59, 15 October 2025 Flow Control: if, elif, else (hist | edit) [1,112 bytes] Davrot (talk | contribs) (Created page with " == The goal == If I would have… Questions to [mailto:davrot@uni-bremen.de David Rotermund] '''Logic blocks need to be indented.​ Preferable with 4 spaces!''' == [https://docs.python.org/3/reference/compound_stmts.html#the-if-statement The if statement] == <syntaxhighlight lang="python">if i == 1:​ print("if")​ elif i == 2:​ print("elif brach A")​ elif i == 3:​ print("elif brach B")​ else:​ print("else -- default")​</syntaxhighlight...") Tag: Visual edit
  • 10:5810:58, 15 October 2025 Flow Control Overview (hist | edit) [1,532 bytes] Davrot (talk | contribs) (Created page with " == The goal == Let us look what kind of options we have for flow control in Python. Questions to [mailto:davrot@uni-bremen.de David Rotermund] '''Logic blocks need to be indented. Preferable with 4 spaces!''' There is called a so called [https://docs.python.org/3/reference/index.html The Python Language Reference] {| class="wikitable" !Selection statements |- |[https://docs.python.org/3/reference/compound_stmts.html#the-if-statement if, elif, else​] |- |[https://do...") Tag: Visual edit
  • 10:5610:56, 15 October 2025 Formatted String Literals (hist | edit) [7,845 bytes] Davrot (talk | contribs) (Created page with " == The goal == Using formated string literals is an easy way to produce formated strings from data / variables. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Basic Formatted String Literals == A formatted string literals starts with an f and the variables that you want to print are placed at their intended position embeded into { }. For example:<syntaxhighlight lang="python">import numpy as np a: str = "Hello" b: int = 1 c: float = np.pi mystring: st...") Tag: Visual edit
  • 10:5210:52, 15 October 2025 Truth Value Testing (hist | edit) [3,259 bytes] Davrot (talk | contribs) (Created page with "Questions to [mailto:davrot@uni-bremen.de David Rotermund] [https://docs.python.org/3/library/stdtypes.html#truth-value-testing “Any object can be tested for truth value, for use in an if or while condition or as operand of the Boolean operations below.”] = Common mistake to avoid = For True, False, None we use is and is not for comparisons. They are objects and not values thus we need to use is and is not. Correct<syntaxhighlight lang="python">if a: # "a is True"...") Tag: Visual edit
  • 10:3410:34, 15 October 2025 Basic Math Operations (hist | edit) [8,289 bytes] Davrot (talk | contribs) (Created page with "Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Number is Python == In Python everything is a class. Numbers are classes as well. === Integer === <syntaxhighlight lang="python">a_number = 0​ print(type(a_number))​ # -> <class 'int'>​</syntaxhighlight> == FLOATing point number == <syntaxhighlight lang="python">a_second_number = 3.33​ print(type(a_second_number))​ # -> <class 'float'>​</syntaxhighlight> == Conversion (i.e. casts) between types...") Tag: Visual edit

14 October 2025

  • 16:0416:04, 14 October 2025 Assert (hist | edit) [5,233 bytes] Davrot (talk | contribs) (Created page with " == The goal == assert helps you to check your assumptions and stops the program if they are not met. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == [https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement The assert statement] == <blockquote>Assert statements are a convenient way to insert debugging assertions into a program:</blockquote><syntaxhighlight lang="python">assert_stmt ::= "assert" expression ["," expression]</syntaxhighli...") Tag: Visual edit
  • 16:0216:02, 14 October 2025 Programming Recommendations (hist | edit) [3,528 bytes] Davrot (talk | contribs) (Created page with " == The goal == We want to improve the quality of the code. Questions to [mailto:davrot@uni-bremen.de David Rotermund] = The recommendations = * Comparisons to singletons like None should always be done with is or is not, never the equality operators. *Use is not operator rather than not … is. While both expressions are functionally identical, the former is more readable and preferred: <syntaxhighlight lang="python"># Correct: if foo is not None:</syntaxhighlight>...") Tag: Visual edit
  • 16:0016:00, 14 October 2025 Style Rulez (hist | edit) [20,352 bytes] Davrot (talk | contribs) (Created page with " == The goal == Obviously, you can write your code as YOU want. However, if there is at least a small probability that you will exchange your code with someone (e.g. me!) or the source code is required to accompany a paper then… '''… you should NOT ignore PEP 8.''' A good source code editor (like Visual Studio Code) will try to enforce many of the PEP 8 rules on you automatically. You need to allow it to help you… Don’t work against it! This is one of the main...") Tag: Visual edit
  • 15:5915:59, 14 October 2025 Input, print, string, int, float (hist | edit) [12,692 bytes] Davrot (talk | contribs) (Created page with " == The goal == Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Examples == === Input / Print === <syntaxhighlight lang="python">a = input() # <- test print(a) # -> test</syntaxhighlight> === String to int === <syntaxhighlight lang="python">a = int(5) print(a) # -> 5 print(type(a)) # -> <class 'int'> a = int(-5) print(a) # -> -5 print(type(a)) # -> <class 'int'> a = int("5") print(a) # -> 5 print(type(a)) # -> <class 'int'> a = int("-5") print(a)...") Tag: Visual edit
  • 15:5815:58, 14 October 2025 Hello, Python (hist | edit) [3,368 bytes] Davrot (talk | contribs) (Created page with " == The goal == This is the first step in running something in Python. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == These are the same stings == <syntaxhighlight lang="python">some_string = "this is a string" some_string = 'this is a string'</syntaxhighlight><syntaxhighlight lang="python">print(some_string)​</syntaxhighlight>Output:<syntaxhighlight lang="python">this is a string​</syntaxhighlight> == These are comments == <syntaxhighlight lang="py...") Tag: Visual edit
  • 15:5415:54, 14 October 2025 Overview (hist | edit) [3,747 bytes] Davrot (talk | contribs) (Created page with " == The goal == We have to start somewhere. Why not with an overview? Questions to [mailto:davrot@uni-bremen.de David Rotermund] == [https://www.python.org/ Python​] == <blockquote>Python is a programming language that lets you work quickly and integrate systems more effectively.</blockquote> * There is an offical [https://docs.python.org/3/tutorial/ Python Tutorial] * YouTube: Socratica Channel [https://www.youtube.com/watch?v=bY6m6_IIN94&list=PLi01XoE8jYohWFPpC17Z...") Tag: Visual edit
  • 15:3615:36, 14 October 2025 VS Code Working remotely via ssh (hist | edit) [4,766 bytes] Davrot (talk | contribs) (Created page with " == Top == Develop your code with [https://code.visualstudio.com/docs/remote/ssh VS code remotely via a ssh connection]. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Installation == We need to install the Remote ssh extension<div class="figure"> File:98723h image0.png </div>and these one too:<div class="figure">File:98723h image1.png </div>However, the second one should be installed automatically. == Configuration == <div class="figure"> Fil...") Tag: Visual edit
  • 15:1215:12, 14 October 2025 VS Code Debugging (hist | edit) [9,292 bytes] Davrot (talk | contribs) (Created page with " == The goal == We want to debug our Python source code like professionals. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Simple debugging in cell mode == If we use cells ( # %% ) (i.e. Python Interactive window ) then we can use the Variable button in the interactive Python window to open a variable viewer.<div class="figure"> image1 </div>Also you can interact with the Python kernel directly via the command input line (...") Tag: Visual edit
  • 15:0615:06, 14 October 2025 VS Code Markdown (hist | edit) [1,321 bytes] Davrot (talk | contribs) (Created page with " = Markdown = == The goal == The VS Code Python cell have [https://www.markdownguide.org/basic-syntax/ markdown]! Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Equations == <syntaxhighlight lang="python"># %% [markdown] # $A(t) = \int_0^t f(x) dt$</syntaxhighlight><div class="figure"> image0 </div> == Heading level == <syntaxhighlight lang="python"># %% [markdown] # # Heading level 1 # ## Heading level 2 # ### Heading level 3...") Tag: Visual edit
  • 15:0015:00, 14 October 2025 VS Code Python Interactive window (hist | edit) [2,771 bytes] Davrot (talk | contribs) (Created page with " == The goal == Python Interactive window allows you to interactively develop code with VS Code. Questions to [mailto:davrot@uni-bremen.de David Rotermund] '''Please use # %% with .py files instead of .ipynb Jupyter notebook files for interactive cells!!!''' If you don’t know what I am talking about, please read: [https://code.visualstudio.com/docs/python/jupyter-support-py Python Interactive window] == Executing a cell == In the cell mode (# %%) you can use * SHIF...") Tag: Visual edit
  • 14:5714:57, 14 October 2025 VS Code Microsoft Tutorials (hist | edit) [823 bytes] Davrot (talk | contribs) (Created page with " == The goal == Microsoft provides you already with tutorials for all the interesting topics. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == The tutorials == * [https://code.visualstudio.com/docs/python/python-tutorial Getting Started with Python in VS Code​] * [https://code.visualstudio.com/docs/python/editing Editing Python in Visual Studio Code​] * [https://code.visualstudio.com/docs/python/linting Linting Python in Visual Studio Code​] * [http...") Tag: Visual edit
  • 14:4914:49, 14 October 2025 VS Code configuration (hist | edit) [1,950 bytes] Davrot (talk | contribs) (Created page with " == The goal == Configure VS Code for Python Questions to [mailto:davrot@uni-bremen.de David Rotermund] == The configuration == '''Press Ctrl + Shift + P then “Preference: Open Settings (JSON)”​''' You will need to adapt it to your needs…<syntaxhighlight lang="json">{ // The color theme plus mini map "workbench.colorTheme": "One Dark Pro", // Adding the lines for Python "editor.rulers": [ 80, 120 ], // I don't like the...") Tag: Visual edit
  • 14:3914:39, 14 October 2025 VS Code installation (hist | edit) [2,370 bytes] Davrot (talk | contribs) (Created page with " == The goal == Install VS Code as editor for Python. Questions to [mailto:davrot@uni-bremen.de David Rotermund] '''I assume that you have installed Python.''' == Download and installation == You need to download VS Code before you install it… https://code.visualstudio.com Obviously you want to use the version suitable for your OS. Then install it. So far not very eventful. == Extensions == <div class="figure"> Figure 0 </div> === Python...") Tag: Visual edit
  • 14:2814:28, 14 October 2025 Systematic Programming (hist | edit) [38,731 bytes] Davrot (talk | contribs) (Created page with "Questions to [mailto:davrot@uni-bremen.de David Rotermund] ''By Jan Wiersig, modified by Udo Ernst and translated into English by Daniel Harnack. David Rotermund replaced the Matlab code with Python code.'' Computers are at the same time incredibly fast and incredibly stupid. They will do exactly what they were told, but usually not what you want. To change this or even prevent it from happening, second to the thorough knowledge of the syntax of a programming language...") Tag: Visual edit
  • 14:0514:05, 14 October 2025 Representation of Numbers in the Computer (hist | edit) [10,781 bytes] Davrot (talk | contribs) (Created page with "Questions to [mailto:davrot@uni-bremen.de David Rotermund] ''By Jan Wiersig, modified by Udo Ernst and translated into English by Daniel Harnack. David Rotermund replaced the Matlab code with Python code.'' == Bits and Bytes == In digital computers, information is represented by discrete states of circuit elements. The smallest possible unit of information is one bit (binary digit). It can be in two different states, that may be described differently: {| class="wikitab...") Tag: Visual edit
  • 14:0414:04, 14 October 2025 Basic Structure of a Computer (hist | edit) [4,340 bytes] Davrot (talk | contribs) (Created page with "Questions to [mailto:davrot@uni-bremen.de David Rotermund] ''By Jan Wiersig, modified by Udo Ernst and translated into English by Daniel Harnack.'' == Hardware Architecture == The nowadays generally applied principle, termed '''Von-Neumann-architecture''' following its first description by John von Neumann in 1946, defines the main components of a computer, which are illustrated in figure 1.1. File:Image2.png Figure 1.1.: Schematic illustration of the Von-Neumann-a...") Tag: Visual edit
  • 10:4210:42, 14 October 2025 Python Tutorial (hist | edit) [9,461 bytes] Davrot (talk | contribs) (Created page with "Test")
(newest | oldest) View ( | older 50) (20 | 50 | 100 | 250 | 500)