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
#!/bin/vbash | |
set -e | |
source /opt/vyatta/etc/functions/script-template | |
# Save configuration to backups | |
NOW=`date -I'seconds'` | |
BACKUP_ROOT="/backup" | |
CONFIG_FILE="edgerouter_config_${NOW}.boot" | |
save "${BACKUP_ROOT}/${CONFIG_FILE}" |
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
@fixture(autouse=True, scope='session') | |
def threadsafe_vcrpy() -> None: | |
"""This fixture fixes an known VCR.py bug with threading and force_reset(): | |
https://github.com/kevin1024/vcrpy/issues/212 | |
There was a PR for this: https://github.com/kevin1024/vcrpy/pull/300 | |
But the author was not sure if this fix covers all corner cases, and that's why hadn't merge it. | |
For our needs it's fully enough, that's why we will monkeypatch it until it's not fixed in the lib.""" | |
from vcr.patch import force_reset as original_force_reset |
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
pragma solidity >=0.4.21 <0.7.0; | |
pragma experimental ABIEncoderV2; | |
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; | |
import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol"; | |
contract MultiTransfer { | |
struct Destination { | |
address token; | |
uint256 amount; |
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
pragma solidity >=0.4.21 <0.7.0; | |
pragma experimental ABIEncoderV2; | |
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; | |
import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol"; | |
contract MultiTransfer { | |
struct Destination { | |
address token; | |
uint256 amount; |
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 os | |
from collections import namedtuple | |
import yaml | |
class BotConfigNotFound(Exception): | |
pass | |
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
package main | |
import ( | |
"encoding/json" | |
"errors" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"os" | |
"strings" |
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
-- phpMyAdmin SQL Dump | |
-- version 3.5.8.1 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Хост: localhost | |
-- Время создания: Янв 27 2016 г., 15:17 | |
-- Версия сервера: 5.5.37-0ubuntu0.13.10.1 | |
-- Версия PHP: 5.5.3-1ubuntu2.6 | |
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; |
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
#include <iostream> | |
#include <cmath> | |
#include <cstdlib> | |
using namespace std; | |
// Проверяет, четное ли число | |
bool is_even(int num) | |
{ | |
return num % 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
/* Дана последовательность, для */ | |
#include <iostream> | |
#include <cmath> | |
using namespace std; | |
// Найти значение выражения | |
double get_expr_val(double a, double b, double x, double y, double z) | |
{ | |
double part1 = log(a + b); | |
double part2 = pow(log(x + y), 3) / log(z + 2); |
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
program matr; | |
type | |
matrix = array [1..5, 1..3] of integer; | |
var | |
a: matrix; { двумерный массив } | |
i, j: integer; { индексы массива } | |
{ количество элементов массива, которые без остатка | |
делятся на собственный индекс (строки или столбца } |
NewerOlder