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
| wget -qO- https://check.torproject.org/exit-addresses | grep ExitAddress | cut -d ' ' -f 2 | sed "s/^/deny /g; s/$/;/g" > /etc/nginx/conf.d/tor-block.conf; systemctl reload nginx | |
| #next add the following to your nginx site conf | |
| #In nginx you then just include the blacklist. | |
| include /etc/nginx/conf.d/tor-block.conf; | |
| #The file contains statements like this: |
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 time | |
| import pypredict | |
| import subprocess | |
| satellites = ['NOAA-18','NOAA-19','NOAA-15'] | |
| freqs = [137912500, 137100000, 137620000] | |
| sample = '44100' | |
| wavrate='11025' | |
| def runForDuration(cmdline, duration): |
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
| /* | |
| * tetris.c | |
| * | |
| * compile: gcc -o tetris -lncurses tetris.c | |
| * | |
| * tetrimino types | |
| * 1: #### 2: ## 3: ## 4: ## | |
| * ## ## ## | |
| * | |
| * 5: # 6: # 7: # |
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
| # needs: Python 3.6, requests, tqdm | |
| import asyncio | |
| import csv | |
| import requests | |
| from concurrent.futures import ThreadPoolExecutor | |
| from tqdm import tqdm | |
| def get_token(): |
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
| from tqdm import tqdm | |
| from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor, as_completed | |
| def parallel_process(array, | |
| function, | |
| type_pool: str = 'multithreading', | |
| use_kwargs=False, | |
| n_jobs=16, | |
| front_num=3, |
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 queue | |
| import random | |
| import time | |
| from concurrent.futures import ThreadPoolExecutor, Executor, Future | |
| from contextlib import contextmanager | |
| from threading import Thread | |
| from tqdm import tqdm | |
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
| from glob import glob | |
| import multiprocessing | |
| from concurrent.futures import ProcessPoolExecutor | |
| import cv2 | |
| from PIL import Image | |
| import imagehash | |
| from tqdm import tqdm |
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
| char (*__kaboom)[sizeof( xxx )] = 1; | |
| // xxx can be a variable or a data type | |
| // See https://stackoverflow.com/questions/20979565/how-can-i-print-the-result-of-sizeof-at-compile-time-in-c | |
| // Exemple of code: | |
| // char (*__kaboom)[sizeof( long long )] = 1; | |
| // GCC error: | |
| // error: invalid conversion from 'int' to 'char (*)[8]' [-fpermissive] | |
| // So sizeof(long long) == 8 |
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
Show hidden characters
| // Файл "tsconfig.json": | |
| // - устанавливает корневой каталог проекта TypeScript; | |
| // - выполняет настройку параметров компиляции; | |
| // - устанавливает файлы проекта. | |
| // Присутствие файла "tsconfig.json" в папке указывает TypeScript, что это корневая папка проекта. | |
| // Внутри "tsconfig.json" указываются настройки компилятора TypeScript и корневые файлы проекта. | |
| // Программа компилятора "tsc" ищет файл "tsconfig.json" сначала в папке, где она расположена, затем поднимается выше и ищет в родительских папках согласно их вложенности друг в друга. | |
| // Команда "tsc --project C:\path\to\my\project\folder" берет файл "tsconfig.json" из папки, расположенной по данному пути. | |
| // Файл "tsconfig.json" может быть полностью пустым, тогда компилятор скомпилирует все файлы с настройками заданными по умолчанию. | |
| // Опции компилятора, перечисленные в командной строке перезаписывают собой опции, заданные в файле "tsconfig.json". |