This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ============================================================ | |
# Display of the function | |
# ============================================================ | |
x = np.linspace(-3,3,100) | |
plt.plot(x,np.exp(x)) | |
plt.xlabel('x') | |
plt.ylabel('$e^x$') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ============================================================ | |
// Definition of an object / dictionary | |
// ============================================================ | |
const fruits = { | |
color: 'red', | |
length: 3 | |
} | |
// ============================================================ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ============================================================ | |
# Definition of an array | |
# ============================================================ | |
empty = [] | |
print(empty) # [] | |
fruits = ['apple', 'lemon'] | |
print(fruits) # [ 'apple', 'lemon' ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ============================================================ | |
-- SELECT | |
-- ============================================================ | |
SELECT * | |
FROM humanresources.employee; | |
SELECT jobtitle | |
FROM humanresources.employee; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ============================================================ | |
// Comparison operators | |
// ============================================================ | |
console.log(3 < 2); // false | |
console.log(1 == '1'); // true | |
console.log('Banana' === 'Banana'); // true | |
console.log('Banana' !== 'Apple'); // true | |
console.log('Banana' != 'Apple'); // true | |
console.log(2 <= 3); // true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ============================================================ | |
// O(1) : constant complexity | |
// ============================================================ | |
function constantO(num) { | |
return num; | |
} | |
console.log(constantO(10)); // 10 |
NewerOlder