- Basic syntax
- Variables types:
bool
,int
,float
,str
,byte
,complex
,None
- Conditionals:
if
,else
,elif
,for
,while
,match
- Variables types:
- Functions: simple use, and known what first class citizen is (concept)
Discover gists
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
Adding Bootstrap to Rails 7 | |
Reference: https://www.linkedin.com/pulse/rails-7-bootstrap-52-importmap-md-habibur-rahman-habib/ | |
INSTRUCTIONS | |
1. Add the following to Gemfile: | |
gem "bootstrap" | |
gem "sassc-rails" |
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
# ollama pull gemma:2b | |
from langchain_community.llms import Ollama | |
llm = Ollama(model="gemma:2b") | |
res = llm.invoke("Tell me a joke") | |
print(res) |
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
<?php | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.php |
The ANSI/VT100 terminals and terminal emulators are not just able to display black and white text ; they can display colors and formatted texts thanks to escape sequences. Those sequences are composed of the Escape character (often represented by “^[
” or “<Esc>
”) followed by some other characters: “<Esc>[
FormatCodem
”.
In Bash, the <Esc>
character can be obtained with the following syntaxes:
-
`\e`
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
from telethon.sync import TelegramClient | |
import asyncio | |
from os import path | |
# Logging configuration | |
def login(phone, api_id, api_hash): | |
global client | |
client = TelegramClient(phone, int(api_id), api_hash) |
See also:
Service | Type | Storage | Limitations |
---|---|---|---|
Amazon DynamoDB | 25 GB | ||
Amazon RDS | |||
Azure SQL Database | MS SQL Server | ||
👉 Clever Cloud | PostgreSQL, MySQL, MongoDB, Redis | 256 MB (PostgreSQL) | Max 5 connections (PostgreSQL) |
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
{ | |
config, | |
pkgs, | |
options, | |
... | |
}: let | |
hostname = "oatman-pc"; # to alllow per-machine config | |
in { | |
networking.hostName = hostname; |
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
import { Mark, mergeAttributes } from '@tiptap/core' | |
export const jumpAnchor = Mark.create( { | |
name: "jumpAnchor", | |
addAttributes() { | |
return { | |
id: { | |
default: null, | |
parseHTML: element => element.getAttribute( 'id' ), |
NewerOlder