Skip to content

Instantly share code, notes, and snippets.

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Введение в Jupyter Notebook\n",
"Jupyter - среда для разработки, поддерживающая в т.ч. язык Python (но не только). Особенностью данной среды является ее разделение на серверную и клиентскую часть, где серверная часть работает с интерпретатором Python, а клиентская часть обеспечивает взаимодействие с пользователем. \n",
" \n",
"Давайте рассмотрим процесс работы в данной среде. \n",
@maybe-hello-world
maybe-hello-world / brckcheck.py
Created May 2, 2019 17:11
bracket sequence checker
# rather funny that I give my students exactly this task :)
from typing import Iterable
def check_brackets(brckt_seq: Iterable[str]) -> bool:
"""
Check whether bracket sequence is correct or not
:param brckt_seq: str of brackets (with different types)
:return: True if bracket sequence is correct, False otherwise
SUBSYSTEM=="thermal"
KERNEL=="thermal_zone0"
# mid-aggressive settings
# If the temp hits 35c, turn on the fan. Turn it off again when it goes back down to 30.
ATTR{trip_point_3_temp}="350000"
ATTR{trip_point_3_hyst}="5000"
#
# If the temp hits 40c, higher RPM.
ATTR{trip_point_2_temp}="40000"
@maybe-hello-world
maybe-hello-world / CICFlowMeter.Dockerfile
Created March 21, 2023 04:23
CICFlowMeter Docker container
FROM maven:3.8.1-openjdk-8
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y git parallel libpcap-dev gradle && rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/ahlashkari/CICFlowMeter.git
WORKDIR /CICFlowMeter/jnetpcap/linux/jnetpcap-1.4.r1425
RUN mvn install:install-file -Dfile=jnetpcap.jar -DgroupId=org.jnetpcap -DartifactId=jnetpcap -Dversion=1.4.1 -Dpackaging=jar
From 3267f1d548e53c0b26bd66070d27ba70e20afab4 Mon Sep 17 00:00:00 2001
From: maybe-hello-world <maybe.hello.world@gmail.com>
Date: Thu, 8 Jun 2023 18:29:56 -0700
Subject: [PATCH] fix reproducibility
---
use_cases/nprint_ids_case/Dockerfile | 8 ++++++--
use_cases/nprint_ids_case/pyproject.toml | 4 +++-
use_cases/nprint_ids_case/requirements.txt | 7 +++++++
3 files changed, 16 insertions(+), 3 deletions(-)
@maybe-hello-world
maybe-hello-world / Dockerfile
Created June 22, 2023 21:28
Getting NetML CIC-IDS-2017 subset datasets and splitting it into windows
FROM ubuntu:latest
RUN apt update
RUN apt install -y g++ make wget curl libpcap-dev python3-pip parallel git
# pcapml
RUN wget "https://github.com/nprint/pcapml/releases/download/v0.3.1/pcapml-0.3.1.tar.gz" -O pcapml.tar.gz
RUN tar -xvf pcapml.tar.gz
RUN cd pcapml-0.3.1 && ./configure && make && make install
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import LogisticRegression
from sklearn.pipeline import Pipeline
from sklearn.metrics import accuracy_score
from sklearn import tree
import graphviz
from trustee import ClassificationTrustee