python3 setup.py build
Output: build/lib.macosx-10.11-x86_64-3.5/hello.cpython-35m-darwin.so
-- Load foreign-function-interface handle | |
local ffi = require("ffi") | |
-- Shortcut FFI C namespace | |
local C = ffi.C | |
-- Load Windows kernel32 DLL | |
local kernel32 = ffi.load("kernel32") | |
-- Add C definitions to FFI for usage descriptions of components | |
ffi.cdef([[ | |
// Redefinitions for WinAPI conventions | |
typedef void VOID; |
local bytecodes = {} | |
local BC, run_function = {} | |
local VARG_CONST = {} | |
local lujlu_mt_funcs | |
local lujlu_cache = setmetatable({}, {__mode = "k"}) | |
local lujlu_identifier_mt = { | |
__tostring = function(self) | |
return tostring(lujlu_cache[self].data) | |
end, |
""" | |
Сначала надо поставить библиотеку командой pip install pyodbc | |
""" | |
import pyodbc | |
server = 'localhost' | |
database = 'db_damaged' | |
username = 'sa' | |
password = 'пароль' | |
cnxn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};SERVER='+server+';DATABASE='+database+';UID='+username+';PWD='+ password, autocommit=True) | |
cursor = cnxn.cursor() |
func (p *Parser) parseExpression() ast.Expr { | |
expr := p.parseAndExpr() | |
for p.tok == tokens.OR { | |
op := p.tok | |
p.scan() | |
expr = &ast.BinaryExpr{ | |
Left: expr, | |
Operator: op, | |
Right: p.parseAndExpr(), | |
} |
import pathlib | |
import concurrent.futures | |
def parse(path): | |
cnt = 0 | |
with open(str(path), 'r', encoding='utf-8-sig') as f: | |
for line in f.readlines(): | |
x = line.strip() | |
if x and not x.startswith('//'): | |
cnt += 1 |
import parser | |
import symbol | |
import token | |
from pprint import pprint | |
print('parse tree:') | |
x = parser.expr('1 + 2 * 3') | |
y = x.tolist() |
class ComObject { | |
[__ComObject] $object | |
ComObject($object) { | |
$this.object = $object | |
} | |
[Object] Get($name) { | |
$res = [__ComObject].InvokeMember($name, 'GetProperty', $null, $this.object, $null) |
&НаКлиенте | |
Процедура Test(Команда) | |
ПараметрыВидео = Новый Структура; | |
ПараметрыВидео.Вставить("ЗаписьВидеоAmazonPollyTTSЯзык", "en-US"); | |
ПараметрыВидео.Вставить("ЗаписьВидеоAmazonPollyTTSГолос", "Aditi"); | |
ПараметрыВидео.Вставить("ЗаписьВидеоAmazonPollyTTSДвижок", "standard"); | |
КлючДоступа = "AKIAIOSFODNN7EXAMPLE"; |
// MIT License | |
// Copyright (c) 2019 Tsukanov Alexander | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |