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
public static class ControlEx | |
{ | |
public static void Invoke(this System.Windows.Forms.Control @this, Action action) | |
{ | |
if (@this == null) throw new ArgumentNullException("@this"); | |
if (action == null) throw new ArgumentNullException("action"); | |
if (@this.InvokeRequired) | |
{ | |
@this.Invoke(action); | |
} |
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
version: '2' | |
services: | |
web: | |
image: odoo:12.0 | |
depends_on: | |
- mydb | |
ports: | |
- "8069:8069" | |
environment: | |
- HOST=mydb |
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
public class Post | |
{ | |
[XmlRpcMember("post_id")] | |
public string Id { get; set; } | |
[XmlRpcMember("post_type")] | |
public string PostType { get; set; } | |
[XmlRpcMember("post_title")] | |
public string Title { get; set; } |
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
def send_request (doc): | |
with open(doc, 'rb') as file: | |
post_data = {'chat_id': chat_id} | |
post_file = {'document': file} | |
r = requests.post(f'https://api.telegram.org/bot{token}/sendDocument', data=post_data, files=post_file) | |
print(r.text) |
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
curl -fsSL https://get.docker.com -o get-docker.sh | |
sh get-docker.sh |
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
class Node: | |
def __init__(self, name: str, parent: 'Node' = None): | |
self.name = name | |
self.parent = parent | |
self.children = [] | |
def add_child(self, obj: 'Node'): | |
self.children.append(obj) | |
@property |
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
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
datatables_list = { | |
'film_work': FilmWork, | |
'person': Person, | |
'person_film_work': PersonFilmWork, | |
'genre': Genre, | |
'genre_film_work': GenreFilmWork, | |
} | |
for base, schema in datatables_list.items(): |
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 datetime import date, datetime | |
import uuid | |
from dataclasses import dataclass, field | |
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
{ | |
"doc_info": [ | |
{ | |
"doc_type": "TORG_12", | |
"pages": [ | |
{ | |
"page_id": "911f6780-3003-4d59-8fe0-e18e7463328a", | |
"page_orient": 0, | |
"page_num": 1, | |
"page_ml": "1", |
OlderNewer