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 calc(x): | |
print("-- Calculating") | |
try: | |
result = 5 / x | |
except ZeroDivisionError: | |
print("-- Expected error, continue") | |
result = 0 | |
print("-- Result ready") | |
return result |
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 python:3 | |
WORKDIR /usr/src/app | |
# COPY requirements.txt ./ | |
# RUN pip install --no-cache-dir -r requirements.txt | |
COPY hello.py . | |
CMD ["python", "./hello.py"] |
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
#!/usr/bin/env python3 | |
# https://docs.python.org/3/library/sqlite3.html | |
import sqlite3 | |
con = sqlite3.connect("tutorial.db") | |
cur = con.cursor() | |
cur.execute("CREATE TABLE movie(title, year, score)") | |
cur.execute(""" |
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
#!/usr/bin/env python3 | |
import os | |
root_path = "/" | |
path_list = [root_path] | |
while len(path_list): | |
path = path_list.pop() | |
try: |
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
<html> | |
<link rel="stylesheet" href="dist/vue-calendar-heatmap.css"/> | |
<script src="https://cdn.jsdelivr.net/npm/vue@2.1.6/dist/vue.js"></script> | |
<script src="dist/vue-calendar-heatmap.browser.js"></script> | |
<body> | |
<div id="example"> | |
<calendar-heatmap :values="[{ date: '2020-9-22', count: 6 }]" end-date="2020-12-1"/> | |
</div> |
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
#!/usr/bin/env python3 | |
import sys | |
from influxdb import InfluxDBClient | |
def process(fname): | |
with open(fname) as infile: | |
json_body = [] | |
for line in infile: | |
d = line.rstrip().split('\t') |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 ce21fbf37a816189d44d8f91844426a9faa7b129 Mon Sep 17 00:00:00 2001 | |
From: Vladimir Yakovlev <nagos@inbox.ru> | |
Date: Sat, 7 Jul 2012 23:52:41 +0400 | |
Subject: [PATCH] tools: Fix mingw tools build | |
mkenvimage does not build due to missed os_support.o and unsupported | |
file modes S_IRGRP S_IWGRP. | |
Tested with mingw 4.2.1 on ubuntu 12.04. | |
Signed-off-by: Vladimir Yakovlev <nagos@inbox.ru> |
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
/* | |
Пример быстрого чтения ножек FT2232H | |
Компилировать командой | |
gcc -Wall ft_test.c -l ftdi -o ft_test | |
Пример работы | |
nagos@VOLODJ:~/1$ ./ft_test | |
write: 1024 | |
read: 1024 |
NewerOlder