This file contains hidden or 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
| -- local pathToThisFile = ... | |
| -- local folderOfThisFile = pathToThisFile:match('(.-)[^%.]+$') | |
| -- print(vim.inspect(folderOfThisFile)) | |
| --local config = require(pathToThisFile .. '.config') -- Load configuration | |
| local config = { | |
| predefined_directories = { | |
| { name = 'nvim config root', path = 'C:\\Users\\Username\\.config\\nvim' }, | |
| { name = 'Repos root', path = 'E:\\prog\\repos' }, | |
| { name = 'My Project', path = 'E:\\prog\\repos\\MyProjectJs' }, | |
| } |
This file contains hidden or 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 cv2 | |
| import matplotlib.pyplot as plt | |
| cb_img = cv2.imread("checkerboard_color.png") | |
| coke_img = cv2.imread("coca-cola-logo.png") | |
| # Use matplotlib imshow() | |
| plt.imshow(cb_img) | |
| plt.title("matplotlib imshow") | |
| plt.show() |
This file contains hidden or 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
| /* | |
| Написать функцию, которая принимает в себя массив чисел > 0 и число. | |
| Эта функция должна вернуть массив массивов с числами, которые | |
| являются всеми возможными вариантами сложения чисел, | |
| чтобы получить число, переданное 2м аргументом. | |
| const numbers = [1, 2, 3, 4, 5]; | |
| const sum = 3; | |
| const result = findCombinations(numbers, sum); |
This file contains hidden or 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
| /// PROMISES EXERCISE | |
| function showCircle(parentEl, cx, cy, radius) { | |
| return new Promise((resolve) => { | |
| const newDiv = document.createElement('div'); | |
| newDiv.style.height = '0'; | |
| newDiv.style.width = '0'; | |
| newDiv.style.left = cx + 'px'; | |
| newDiv.style.top = cy + 'px'; | |
| newDiv.classList.add('animated-circle') |
This file contains hidden or 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
| gci -recurse -dir | ? FullName -notmatch 'hpcourse|Android_studio|3rdparty|thirdparty' | gci -file -include '*.pro' |
This file contains hidden or 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 matplotlib.pyplot as plt | |
| import csv | |
| csvFileName = './GBG-export.csv' | |
| ################################################################################ | |
| class GoodsPerEpochData(object): | |
| def __init__(self, epochName): | |
| self.name = epochName | |
| self.income = 0 |
This file contains hidden or 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/bash | |
| function usage() { printf "Usage:\r\n$0 <dir 1> <dir 2>"; } | |
| if [[ $# -eq 0 ]]; then | |
| usage | |
| exit | |
| fi | |
| if [[ ! -d $1 ]]; then |
This file contains hidden or 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
| # extraction from Marina Mele django tutorial | |
| # source: http://www.marinamele.com/taskbuster-django-tutorial/settings-different-environments-version-control | |
| cd %django_project_dir% | |
| # Requirements | |
| # requirements.txt -> requirements/{dev.txt,production.txt,test.txt,base.txt} | |
| # pip freeze > requirements.txt | |
| mkdir requirements | |
| touch requirements/{dev.txt,production.txt,test.txt,base.txt} |
This file contains hidden or 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
| function snailWalker(r, c, direction) { | |
| if(direction !== 'inside' && direction !== 'outside') { | |
| return null; | |
| } | |
| if(r < 2 || c < 2) { | |
| return null; | |
| } | |
| let result = Array(c); |
This file contains hidden or 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 "winsock2.h" // C:\Program Files (x86)\Windows Phone Kits\8.0\Include\winsock2.h | |
| #include "ws2tcpip.h" // C:\Program Files (x86)\Windows Phone Kits\8.0\Include\ws2tcpip.h | |
| // C:\Program Files (x86)\Windows Phone Kits\8.0\Include\ws2def.h | |
| #include "..\include\defines.h" | |
| #include "..\util\util.h" | |
| #include <string> | |
| #include <memory> | |
| #include <vector> |
NewerOlder