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
const FtpDeploy = require("ftp-deploy") | |
const ftp = require("basic-ftp") | |
const basicFtpClient = new ftp.Client() | |
const https = require('https'); | |
const LOCAL_BUILD_DIRECTORY = "public" | |
const DEPLOY_DIRECTORY_NAME = "temp" | |
const PRODUCTION_DIRECTORY_NAME = "master" | |
const BROKEN_BUILD = "broken" | |
const PRODUCTION_URL = "https://akjaw.com/" |
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 abc import ABC, abstractmethod | |
from PIL import Image, ImageFile | |
ImageFile.LOAD_TRUNCATED_IMAGES = True | |
from functools import reduce | |
from datetime import datetime | |
import shutil | |
import os | |
class ImageRecovery: | |
def __init__(self, pathToRecoveryDirectory, pathToNewImagesDirectory, imageFilters): |
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
ctrl + i -> implement required methods | |
ctrl + o -> override methods | |
ctrl + p -> show required arguments | |
ctrl + w -> select | |
ctrl + e -> recent files | |
ctrl + space -> suggestions | |
ctrl + b -> view implementation | |
ctrl + n -> find class -- | |
ctrl + h -> show hierarchy | |
ctrl + alt + l -> auto format code |
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
c = console.log | |
//Primitive Immutability | |
// invalid, and also makes no sense | |
//2 = 2.5; | |
var x = 2; | |
x.length = 4; |
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
c = console.log | |
//Mathematical Idempotence | |
function toPower0(x) { | |
return Math.pow( x, 0 ); | |
} | |
function snapUp3(x) { | |
return x - (x % 3) + (x % 3 > 0 && 3); | |
} |
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
const c = console.log | |
function partialRight(fn,...presetArgs) { | |
return function partiallyApplied(...laterArgs){ | |
return fn( ...laterArgs, ...presetArgs ); | |
}; | |
} | |
function reverseArgs(fn) { | |
return function argsReversed(...args){ | |
return fn( ...args.reverse() ); | |
}; |
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
const c = console.log | |
//All for One | |
function unary(fn) { //przekazuje dalej tylko jeden agrument | |
return function onlyOneArg(arg){ | |
return fn( arg ); | |
}; | |
} |