Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
import json | |
import requests | |
import logging | |
import os | |
from logging.config import dictConfig | |
# debug settings | |
debug = eval(os.environ.get("DEBUG", "False")) | |
from flask import Flask, make_response, request |
#!/usr/bin/env python3 | |
# Demonstrates the use of Python to work with Cognito. | |
# Create a new a user, log in, check tokens and call an API. | |
# The purpose was to learn about Cognito. Security has been | |
# circumvented in the interest of keeping it simple. | |
# Notably, the authentication procedure uses the most insecure | |
# method. This code is not intended for use in production. | |
# | |
# https://www.neant.ro/aws/working-with-cognito-and-api-gateway-in-python.html |
This document contains excerpts from my web server logs collected over a period of 7 years that shows various kinds of recon and attack vectors.
There were a total of 37.2 million lines of logs out of which 1.1 million unique HTTP requests (Method + URI) were found.
$ sed 's/^.* - - \[.*\] "\(.*\) HTTP\/.*" .*/\1/' access.log > requests.txt
# -*- coding: utf-8 -*- | |
""" | |
Copyright (c) 2019 Valentin B. | |
A simple music bot written in discord.py using youtube-dl. | |
Though it's a simple example, music bots are complex and require much time and knowledge until they work perfectly. | |
Use this as an example or a base for your own bot and extend it as you want. If there are any bugs, please let me know. |
Write a function of type String -> Integer
. The input may or may not be a
valid JSON string. If it is valid, the resulting JavaScript value is expected
to be an object, but may not be. If it is an object, it is expected to have a
foo
property whose value is expected to be an object, but may not be. This
value is expected to have a bar
property which is expected to be an object
with a baz
property whose value is expected to be an array of strings.
Each of these strings is expected to be a hex representation of an integer
(e.g. 0xFF
). If every element of the array meets this expectation, the
#!/bin/bash -e | |
ln -s /usr/lib/x86_64-linux-gnu/amdgpu-pro . | |
ln -s /etc/OpenCL . | |
tar -czvf libs.tar.gz amdgpu-pro/* | |
tar -czvf conf.tar.gz OpenCL/* | |
cat > .dockerignore << EOF | |
OpenCL |
# lazyload nvm | |
# all props goes to http://broken-by.me/lazy-load-nvm/ | |
# grabbed from reddit @ https://www.reddit.com/r/node/comments/4tg5jg/lazy_load_nvm_for_faster_shell_start/ | |
lazynvm() { | |
unset -f nvm node npm npx | |
export NVM_DIR=~/.nvm | |
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | |
if [ -f "$NVM_DIR/bash_completion" ]; then | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion |