Skip to content

Instantly share code, notes, and snippets.

View SkymanOne's full-sized avatar
🎯
Focusing

Gherman SkymanOne

🎯
Focusing
View GitHub Profile
func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
let task: Task = tasks[indexPath.row]
let action: UIContextualAction = UIContextualAction(style: .destructive, title: "Finish", handler: {
(action, view, completionHandler) in
self.tasks.remove(at: indexPath.row)
tableView.deleteRows(at: [indexPath], with: .fade)
completionHandler(true)
})
using System;
namespace codewars10._06
{
class Program
{
static void Main(string[] args)
{
//set up the field as an array from the example test case
int[,] field = new int[10, 10]
@SkymanOne
SkymanOne / main.py
Created March 20, 2018 15:27
Base telegram bot heroku application
import telebot
import os
from telebot import types
from flask import Flask, request
# если в окуржении есть переменная HEROKU, значит получаем токен из переменной окружения
if 'HEROKU' in list(os.environ.keys()):
TOKEN = str(os.environ.get('TOKEN'))
# иначе импортируем его из скрытого в файлы в папке проекта
else:
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->