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
docker-compose up | |
# optional: open local control center | |
open http://localhost:9021 | |
# demo 1 | |
# ------ | |
# create topic | |
docker exec -it broker kafka-topics --bootstrap-server localhost:9092 --create --topic demo1 --partitions 3 --replication-factor 1 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>brain.js</title> | |
<script src="https://cdn.rawgit.com/BrainJS/brain.js/develop/browser.js"></script> | |
<script> | |
function DrawableCanvas(el) { | |
const px = 10 | |
const ctx = el.getContext('2d') | |
let x = [] |
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 getpass import getpass | |
import json | |
import re | |
import requests # pip3 install requests | |
username = input('Username: ') | |
password = getpass() | |
# username = 'AlexandrM' | |
# password = '********' | |
auth = (username, password) |
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
WITH d AS ( | |
-- should return (cid - user id, vid - item id, rating) | |
SELECT | |
clientId as cid, | |
REGEXP_EXTRACT(page.pagePath, r'/company\d+/vacancy(\d+)') AS vid, | |
MAX( | |
CASE | |
WHEN page.pagePath LIKE '%apply=thanks%' THEN 5 | |
WHEN page.pagePath LIKE '%mode=apply%' THEN 2 |
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
-- docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=P@ssword" -e "MSSQL_PID=Developer" --cap-add SYS_PTRACE -p 1433:1433 --name sql -it --rm -v C:/Users/AlexandrM/Downloads/ml-100k:/ml-100k -v C:/Users/AlexandrM/Downloads/ml-20m:/ml-20m microsoft/mssql-server-linux | |
-- http://files.grouplens.org/datasets/movielens/ml-20m.zip | |
use master; | |
go | |
DROP DATABASE movies; | |
GO | |
-- Create a graph demo database | |
CREATE DATABASE movies; |
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
{"lastUpload":"2017-02-18T18:35:28.986Z","extensionVersion":"v2.4.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
@ECHO OFF | |
REM Remove registry if any | |
REG DELETE "HKEY_CLASSES_ROOT\Directory\shell\WebStorm" /f | |
REM Get WebStorm executable path | |
FOR /F "usebackq tokens=3*" %%A IN (`REG QUERY "HKEY_CLASSES_ROOT\Applications\WebStorm.exe\shell\open\command"`) DO ( | |
SET WEBSTORM=%%A %%B | |
) |
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 | |
# At the end you will have 6 files: | |
# ca/ca.pem - used by both client and server to verify each other certificates | |
# ca/ca-key.pem - keep it in secret it may be used to generate new certificates | |
# client/cert.pem, client/key.pem - in conjunction with /ca/ca.pem will be used by client to speak with server | |
# server/cert.pem, server/key.pem - in conjunction with /ca/ca.pem will be used by server | |
# | |
# NOTICE: DO NOT FORGET to set your **Server** ip and dns in server/openssl.cnf each time you generating new server certificates | |
# |
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
[ | |
{ | |
"Title": "Chappie", | |
"Year": 2015, | |
"imdbRating": 6.9, | |
"Genre": ["Action", "Crime", "Sci-Fi"] | |
}, | |
{ | |
"Title": "Star Wars: The Force Awakens", | |
"Year": 2015, |
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
Set-ExplorerOptions -showFileExtensions | |
Enable-RemoteDesktop | |
choco install googlechrome -y | |
choco install sublimetext3 -y | |
choco install skype -y | |