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
| #define _CRT_SECURE_NO_WARNINGS | |
| #define TO_RADIANS 3.141592/180.0 | |
| #include <GL/freeglut.h> | |
| #include <iostream> | |
| // angles and starting position | |
| float xangle = 0.0f, yangle = 1.0f, zangle = -1.0f; | |
| // XYZ position of the camera |
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 | |
| # Simple bash script that will remove MP3 audio file from a folder, if their duration in seconds | |
| # does not match the passed duration input. Note: the script must be executed in the interested folder. | |
| function get_duration { | |
| total_len=0 | |
| for file in `pwd`/*; do | |
| cur_len=$(ffprobe -i $file -show_entries format=duration -v quiet -of csv="p=0") | |
| cur_len=${cur_len%.*} | |
| total_len=$((total_len+cur_len)) |
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 tensorflow as tf | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| import os | |
| #optional: suppress some CPU warnings | |
| os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' | |
| # Here, we're acceding throu keras to datasets presents into the lib | |
| mnist = tf.keras.datasets.mnist #28x28 images of handwritten digits |
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
| -- WoW Classic LUA Macro that allows SPLITING ITEM STACK fast. | |
| -- Usage: Just positionate the cursor on the item stack you want to divide, and spam the macro | |
| local pos=GetMouseFocus() | |
| local x,y=pos:GetParent():GetID(), pos:GetID()SplitContainerItem(x,y,1) | |
| for i=0,4 do for j=1, -- change j if want more than one item splitted each time | |
| GetContainerNumSlots(i) | |
| do | |
| if not GetContainerItemID(i,j) | |
| then PickupContainerItem(i,j) |
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 java.net.*; | |
| import java.io.*; | |
| import java.util.Scanner; | |
| public class Client { | |
| //In the client, we just need one socket: The socket we'll going to connect with: the one related | |
| //to the server. | |
| private Socket ssock; | |
| //Also, we need a reader and a writer to communicate with the server, and a scanner for the input. |