This file contains 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 functools import cache, lru_cache | |
from pynput import keyboard | |
import time | |
stop = False | |
def on_press(key): | |
global stop | |
print(key) | |
if key == keyboard.Key.esc: |
This file contains 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
"""Spotify Top X Artists and Songs | |
This script takes data from StreamingHistory[x].json files exported from Spotify | |
and gives the most listened songs and artists based on that data | |
Args: | |
top (int): The length of the most listened artists and songs | |
(default is 10) | |
""" |
This file contains 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 | |
absdir=$(realpath "$1") | |
echo $absdir | |
mkdir NSRL_Corp | |
cd NSRL_Corp | |
rm *.zip | |
rm *.ssd | |
curl https://s3.amazonaws.com/docs.nsrl.nist.gov/morealgs/ssdeep_2.10/NSRL_corp.0[0-1][0-9].0.zip -o "NSRL_corp.0#1#2.0.zip" | |
curl https://s3.amazonaws.com/docs.nsrl.nist.gov/morealgs/ssdeep_2.10/NSRL_corp.0[0-1][0-9].5.zip -o "NSRL_corp.0#1#2.5.zip" |
This file contains 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
# Download YARA (Modify if a different version is needed) | |
wget https://github.com/VirusTotal/yara/archive/refs/tags/v4.1.2.tar.gz | |
tar -zxf yara-4.1.2.tar.gz | |
cd yara-4.1.2 | |
./bootstrap.sh | |
# Prerequisites | |
sudo apt install automake libtool make gcc pkg-config libssl-dev | |
# Build with make |
This file contains 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
/// <summary> | |
/// Makes the HTTP request (Sync). | |
/// </summary> | |
/// <param name="path">URL path.</param> | |
/// <param name="method">HTTP method.</param> | |
/// <param name="queryParams">Query parameters.</param> | |
/// <param name="postBody">HTTP body (POST request).</param> | |
/// <param name="headerParams">Header parameters.</param> | |
/// <param name="formParams">Form parameters.</param> | |
/// <param name="fileParams">File parameters.</param> |
This file contains 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 mysql.connector | |
import random | |
import sys | |
import time | |
import threading | |
DB_host="localhost" | |
DB_port="3307" | |
DB_user="root" |
This file contains 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
#define _CRT_SECURE_NO_WARNINGS | |
#include <stdio.h> | |
#include <string.h> | |
void bistaratuAlderantziz(char *str); | |
int main() | |
{ | |
char hitza[15]; |
This file contains 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
TTF_Font* Sans = TTF_OpenFont("Sans.ttf", 24); //this opens a font style and sets a size | |
SDL_Color White = {255, 255, 255}; // this is the color in rgb format, maxing out all would give you the color white, and it will be your text's color | |
SDL_Surface* surfaceMessage = TTF_RenderText_Solid(Sans, "put your text here", White); // as TTF_RenderText_Solid could only be used on SDL_Surface then you have to create the surface first | |
SDL_Texture* Message = SDL_CreateTextureFromSurface(renderer, surfaceMessage); //now you can convert it into a texture | |
SDL_Rect Message_rect; //create a rect | |
Message_rect.x = 0; //controls the rect's x coordinate |
This file contains 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 "Funtzioak.h" | |
#include <stdio.h> | |
#include <time.h> | |
#include <stdlib.h> | |
void inicializar() | |
{ | |
double pi = 3.1415926535; | |
int NumGrado = rand() % 360; |
This file contains 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
/* | |
* funtzioak.c | |
* | |
* Created on: 30 may. 2017 | |
* Author: alex | |
*/ | |
#include <string.h> | |
#include <time.h> | |
#include <unistd.h> |
NewerOlder