background preloader

2. Built-in Functions

2. Built-in Functions
Open a file, returning an object of the file type described in section File Objects. If the file cannot be opened, IOError is raised. When opening a file, it’s preferable to use open() instead of invoking the file constructor directly. The first two arguments are the same as for stdio‘s fopen(): name is the file name to be opened, and mode is a string indicating how the file is to be opened. The most commonly-used values of mode are 'r' for reading, 'w' for writing (truncating the file if it already exists), and 'a' for appending (which on some Unix systems means that all writes append to the end of the file regardless of the current seek position). The optional buffering argument specifies the file’s desired buffer size: 0 means unbuffered, 1 means line buffered, any other positive value means use a buffer of (approximately) that size (in bytes). Modes 'r+', 'w+' and 'a+' open the file for updating (reading and writing); note that 'w+' truncates the file. Related:  Learning_IT

Python Lists The most basic data structure in Python is the sequence. Each element of a sequence is assigned a number - its position or index. The first index is zero, the second index is one, and so forth. Python has six built-in types of sequences, but the most common ones are lists and tuples, which we would see in this tutorial. There are certain things you can do with all sequence types. Python Lists The list is a most versatile datatype available in Python which can be written as a list of comma-separated values (items) between square brackets. Creating a list is as simple as putting different comma-separated values between square brackets. list1 = ['physics', 'chemistry', 1997, 2000]; list2 = [1, 2, 3, 4, 5 ]; list3 = ["a", "b", "c", "d"]; Similar to string indices, list indices start at 0, and lists can be sliced, concatenated and so on. Accessing Values in Lists #! When the above code is executed, it produces the following result − list1[0]: physics list2[1:5]: [2, 3, 4, 5] Updating Lists #! #!

rubyrep: Features Simple Configuration Complete setup is done via a single simple configuration file. (Expressed in a Domain specific language done in ruby.) Simple Installation Installation can be done either via traditional ruby stack OR JRuby In case of JRuby this means: Installation of a JVM Download and extracting of a zip file Done. Platform independent Runs on both Linux and Windows platforms. Table Design independent All commands work on tables no matter if they have a simple primary key (all data types acceptable), a combined primary key or no primary key at all. rubyrep successfully processes multi-byte texts “big” data types Scan Features rubyrep can scan corresponding tables of left and right database for diverging data. Different output modes: from count of differences over row diffs to full row dumps. Sync Features rubyrep can sync the data in corresponding tables of left and right database. All scan features also apply to syncs Automatically orders table syncs to avoid foreign key conflicts.

Python Lists - Google for Education Python has a great built-in list type named "list". List literals are written within square brackets [ ]. Lists work similarly to strings -- use the len() function and square brackets [ ] to access data, with the first element at index 0. (See the official python.org list docs.) Assignment with an = on lists does not make a copy. The "empty list" is just an empty pair of brackets [ ]. Python's *for* and *in* constructs are extremely useful, and the first use of them we'll see is with lists. If you know what sort of thing is in the list, use a variable name in the loop that captures that information such as "num", or "name", or "url". The *in* construct on its own is an easy way to test if an element appears in a list (or other collection) -- value in collection -- tests if the value is in the collection, returning True/False. The for/in constructs are very commonly used in Python code and work on data types other than list, so you should just memorize their syntax.

5 Things Your e-Learning Content is Probably Missing | eLearning Mind We get it: You finally put the finishing touches on your eLearning module and you think it looks picture perfect; you’re excited to show off all of your hard work. But good-looking graphics and engaging content are two entirely different things. Even if you think your module is good to go, your learners might have a different opinion. Before you close out your design and push your eLearning out for delivery, you might want to take a second look. If your program is missing some of the most effective eLearning strategies, techniques, and best practices, that module could be DOA by the time in lands in your learners’ laps. 1) Relatable Scenarios Your learners are busy, so they need to know exactly what they’re going to get out of a module before they start engaging with the material. 2) Engaging Content It was Mary Poppins who promised that “just a spoonful of sugar helps the medicine go down,” and we think she was definitely talking about eLearning. 3) Better Scripting 5) Mobile Screens

Охлаждение ноутбука Краткое описание Если у вас просто так отключается ноутбук, зависает или просто иногда подтормаживает в играх, тогда эта статья для вас. В данной статье описано как выявить не перегревается ли ноутбук, а также как бороться с перегревом. Введение В данном руководстве пойдет речь о перегреве. Рассмотрим сначала почему же ноутбук перегревается. Система охлаждения плохо спроектирована. Рассмотрим теперь как обычно себя проявляет перегрев. Типичные симптомы перегрева ноутбука: Ноутбук сам по себе отключается отключается;Ноутбук зависает;В играх происходят периодические подтормаживания. Так происходит потому, что срабатывает защита от перегрева. Вполне логично, что для того, чтобы определить перегревается ли ноутбук или нет, нужно просто измерить максимальную температуру процессора, видеокарты и других компонент. Измерение температуры Для измерения температур ноутбука отлично подходит утилита HWMonitor. Важное замечание: как альтернативу утилите HWMonitor можно использовать Open Hardware Monitor.

40 Free Resources Every Designer Should Know Ever wondered where designers get their resources to help them succeed with a project? Here is a list of great resources including sites, PSD. files, actions, UI elements, mock ups et cetera and best of all, they are totally free and available for you to download. Just click on the title or image and it will bring you to the resource. Bookmark this post so that you can always look back at this great list that can help you succeed. Icons for your website, an iPhone mock up or PSD’s for your landing page, Fribbble is the place to be. Many of us struggle when posting a project at Behance. Another great site to get free PSD files, blurred background or UI elements. Struggling to get the perfect colour combination? A great site where you can download free stock images. In need of some high quality patterns? Lets you design a website, for free, without code. Guides can be a pain in the ass when it comes down to web design, here is a simple solution for you! Love this site!

Search - ABC Splash Skip to content Search results 10 items for code.org Search filters Choose your year(s) Primary Foundation (0) Year 1 (4) Year 2 (4) Year 3 (10) Year 4 (10) Year 5 (10) Year 6 (10) Secondary Year 7 (2) Year 8 (2) Year 9 (0) Year 10 (0) Choose learning area(s) English (0) Mathematics (0) Science (0) History (0) Geography (0) STEM (10) The Arts (0) Technologies (10) Choose media type(s) Topics (0) Events (0) Video (10) Games (0) Digibooks (0) Audio clips(0) Links (0) Teaching resources (0) Articles (0) Competitions (0) Competition Galleries (0) List view Grid view Unplugged Activity: What is computer science? Do you know what a computer programmer does? video: 2 mins 4 secs Learning area: Primary: Years F, 1, 2, 3, 4, 5, 6 Unplugged Activity: Graph Paper Programming This video introduces one of code.org's unplugged activities and provides an introduction to programming without the use of computers.... video: 1 min 7 secs Primary: Years 3, 4, 5, 6 video: 1 min 2 secs

Розробка та аналіз алгоритмів. Частина 1 | Prometheus Курс “Розробка та аналіз алгоритмів” присвячений вивченню та побудові програмних алгоритмів. У рамках цього курсу ви зможете познайомитись із різними підходами до розробки алгоритмів, дослідження та порівняння їх ефективності. Курс побудований від простого до складного. Кожного тижня розглядається новий підхід до створення алгоритмів та кілька прикладів алгоритмів в рамках цього підходу. Не залишається поза увагою і питання структур даних, адже ефективний розв’язок різних програмних задач залежить не тільки від алгоритму, але й від структур даних, які даний алгоритм використовує. Курс “Розробка та аналіз алгоритмів” ґрунтується на двох предметах, що викладаються в Київському Політехнічному Інституті для спеціальності “Інформаційні управляючі системи та технології”: “Теорія алгоритмів” та “Дискретна математика. Базові підходи до розробки та аналізу алгоритмів.

Related: