This file contains hidden or 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
| version: '3.8' | |
| services: | |
| kafka: | |
| image: bitnami/kafka:latest | |
| container_name: kafka | |
| ports: | |
| - "9092:9092" | |
| - "29092:29092" # external access, if needed | |
| environment: |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| "time" | |
| ) | |
| func WaitTimeout(wg *sync.WaitGroup, timeout time.Duration) bool { |
This file contains hidden or 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
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "time" | |
| ) | |
| type Result struct{ | |
| val string |
This file contains hidden or 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
| # Задача 2 | |
| p = 1/6 | |
| n = 20 | |
| probability = 0 | |
| for index, k in enumerate(range(5, 20)): | |
| prob_i = comb(n, k) * (p**k) * ((1 - p)**(n - k)) | |
| print(f"Probability of getting {k} in {n}: {prob_i}") | |
| probability += prob_i | |
| print(f'Final probability: {probability}') |
This file contains hidden or 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
| # Задача 2 | |
| p = 1/6 | |
| n = 20 | |
| probability = 0 | |
| for index, k in enumerate(range(5, 20)): | |
| prob_i = comb(n, k) * (p**k) * ((1 - p)**(n - k)) | |
| print(f"Probability of getting {k} in {n}: {prob_i}") | |
| probability += prob_i | |
| print(f'Final probability: {probability}') |
This file contains hidden or 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 odoo import http | |
| from odoo.http import request | |
| class SNT(http.Controller): | |
| @http.route('/snt_members', auth='public', website=True) | |
| def hello(self, **kwargs): | |
| Meeting = http.request.env["snt.meeting"] | |
| meetings = Meeting.search([]) | |
| return request.render('snt_rassvet.hello', {'meetings': meetings}) |
This file contains hidden or 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
| <odoo> | |
| <record id="snt_rassvet.meeting_form" model="ir.ui.view"> | |
| <field name="name">SNT Meeting Form new</field> | |
| <field name="model">snt.meeting</field> | |
| <field name="arch" type="xml"> | |
| <form> | |
| <header> | |
| <button string="Check members" type="object" name="kvorum_check" class="btn-primary"/> | |
| </header> |
This file contains hidden or 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
| <odoo> | |
| <!-- Add a field name="is_available" to a XML ID="library_app.view_form_book" with | |
| name="inherit_id" method --> | |
| <record id="crm_lead_view_form_extended" model="ir.ui.view"> | |
| <field name="name">CRM TEST FORM</field> | |
| <field name="model">crm.lead</field> | |
| <!-- inherit from ref="library_app.view_form_book" --> | |
| <field name="inherit_id" ref="crm.crm_lead_view_form"/> | |
| <field name="arch" type="xml"> |