Skip to content

Instantly share code, notes, and snippets.

View Sanokei's full-sized avatar
🥼
Mad scientist? No, I'm just disappointed.

Sano Sanokei

🥼
Mad scientist? No, I'm just disappointed.
View GitHub Profile
@Sanokei
Sanokei / FileNameForDAIN.py
Created August 8, 2021 06:32
adding zeros to my png files names when i convert them from videos so that it works with DAIN
import os
path = os.getcwd() + '\\images\\'
for filename in os.listdir(path):
missingNumber = 8 - len(filename)
os.rename(path + filename,path + ("0"*missingNumber) + filename)
@Sanokei
Sanokei / LearningPython.md
Last active August 26, 2021 01:16
Taught my friend basic python through discord

The basics are as follows

Comments:

# this is a comment, it wont do anything
# anything after a hashtag will not run for that line
'''if you have anything surrounding 3 single quote marks it will comment it out. so you dont have to comment every line'''

Variables and Types:

#include <iostream>
using namespace std;
int digitBar(int num)
{
if (num < 10)
{
for (int i = 0; i < num; i++)
{
cout << "*";
#include <iostream>
using namespace std;
//using a recursive function get the first even digit in the number from all the individual digits in the number
int firstEven(int num){
if(num < 10){
if(num % 2 == 0){
return num;
}
else{
#include <iostream>
#include <string>
using namespace std;
/*
Write a program that reads-in 10 student names with their grades, then print the student names of those who got a grade higher than the average.
*/
int main(){
int grade[10];
#include <iostream>
using namespace std;
//Write a program that stores 10 random single digit numbers, then print the sum of all gaps in these numbers. A gap is the difference between two adjacent numbers that being generated.
int main(){
int a[10];
int sum = 0;
for(int i = 0; i < 10; i++){
a[i] = rand() % 10;
cout << a[i] << " ";
int main(){
int table[5][6];
int sum = 0;
for(int i = 0; i < 5; i++){
for(int j = 0; j < 6; j++){
cout << "Enter the number: ";
cin >> table[i][j];
}
}
for(int i = 0; i < 5; i++){
int main(){
int table[6][6];
int row, col;
int odd_count = 0;
for (row = 0; row < 6; row++){
for (col = 0; col < 6; col++){
cout << "Enter a number: ";
cin >> table[row][col];
}
}
#include <iostream>
using namespace std;
int main() {
import discord
from discord.ext import commands
import asyncio
import time
import datetime
import json
import os
# Loads the config file
with open('config.json') as config_file: