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
#!flask/bin/python | |
from flask import Flask, jsonify, abort, request, make_response, url_for | |
from flask.ext.httpauth import HTTPBasicAuth | |
app = Flask(__name__, static_url_path = "") | |
auth = HTTPBasicAuth() | |
@auth.get_password | |
def get_password(username): | |
if username == 'miguel': |
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 re | |
import ast | |
from chameleon.tales import TalesExpr | |
from chameleon.codegen import template | |
from chameleon.astutil import load | |
from chameleon.astutil import Symbol | |
from chameleon.exc import ExpressionError |
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
Sub RenewEquations() | |
' The stupid macro "Touches" each object in the document | |
' and tries to convert it into Equation3. | |
' We suppose it will be useful in adjusting formulas from | |
' Libre office after conversion. | |
For Each iShape In ActiveDocument.InlineShapes | |
iShape.Select | |
iShape.OLEFormat.ConvertTo ClassType:="Equation.3" | |
Next iShape |
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
# Define SciTE settings for Python files. | |
file.patterns.py=*.py;*.pyw | |
file.patterns.scons=SConstruct;SConscript | |
*source.patterns.python=$(file.patterns.py); | |
shbang.python=py | |
filter.python=Python (py pyw)|$(file.patterns.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
# Global initialisation file for SciTE | |
# For Linux, place in $prefix/share/scite | |
# For Windows, place in same directory as SciTE.EXE (or Sc1.EXE) | |
# Documentation at http://www.scintilla.org/SciTEDoc.html | |
# | |
# https://gist.github.com | |
# user:eugeneai | |
# SciTEGlobal.properties python.properties | |
# | |
# Globals |
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 python | |
# a bar plot with errorbars | |
import numpy | |
import gdal | |
import matplotlib.pyplot as plt | |
#import scipy | |
class Hatch(object): | |
"""Defines section data consisting of | |
x1,y1, x2,y2 are points on the section line and |
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 _(f,*args): | |
yield f | |
for a in args: | |
if type(a)==str: | |
yield a | |
else: | |
# yield from a | |
for b in a: | |
yield b |
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 | |
import binascii as ba | |
EXCEPT=( | |
".vault", | |
".exe", | |
".doc", | |
".xls", |
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
(setenv "EPROLOG" "c:/Program Files (x86)/swipl/bin/swipl.exe") | |
(if (eq window-system 'w32) | |
(progn | |
(if (file-directory-p "c:/GNU/bin") | |
(progn | |
(add-to-list 'exec-path "c:/GNU/bin") | |
) | |
) | |
(setq url-proxy-services '(("no_proxy" . "172.27.24.") | |
("http" . "titan.cyber:.......@172.27.100.5:4444"))) |
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
% L=[a,b,c,d,e,3,5,7,2,[8,6,9]]. | |
% L=[X|T], X=a, T=[b,c,d.....]. | |
% [] | |
% X принадл. списку, если он - голова эт списка. | |
member(X, [X|_]). | |
% X принадлежит списку, если X принадл. хвосту списка. | |
member(X, [_|T]):-member(X,T). | |
% +List, -Sum |