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
""" | |
Simple script wich try all 4x4 mumbers and get the highest palindrome of it. | |
Results | |
------- | |
- 4x4 numbers (Imac 2013, i5, Python 3.9.2) | |
Highest palindrome -> 98344389 | |
Found in -> 94.88048125600001 seconds |
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
/* | |
Simple script wich try all 4x4 mumbers and get the highest palindrome of it. | |
- results: 4x4 numbers (Imac 2013, i5, swift 5.3.2) | |
Highest palindrome -> 99000099 | |
Found in -> 240.52266907691956 seconds | |
- results: 4x4 numbers (Macbook air 2020, M1, swift 5.4) | |
Highest palindrome -> 99000099 |
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
-- Shiba (8173) | |
local surface = require 'gamesense/surface' | |
local anti_aim = require 'gamesense/antiaim_funcs' | |
local screen_size = client.screen_size | |
local entity_get_prop = entity.get_prop | |
local entity_get_local_player = entity.get_local_player | |
local ui_get = ui.get | |
local ui_set = ui.set | |
local new_hotkey = ui.new_hotkey |
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
/* | |
Simple script wich make the suite of conway with a give limit (100 on this file) | |
with some info about the time :) | |
made on ipad pro in swift playground ^^ | |
*/ | |
import Foundation | |
let startTime = Date().timeIntervalSinceReferenceDate |
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
/* | |
Two functions wich generate dice combinations for diceware list, the firstone is oriented to be compact and the seconds oriented to be efficient | |
- results: withMaxInt: 6 and andMinLenght: 5 (Imac 2013, i5, swift 5.3.2) | |
Efficient done in -> 62.49544095993042 seconds | |
Compact done in -> 76.10342800617218 seconds | |
- results: withMaxInt: 6 and andMinLenght: 5 (Macbook air 2020, M1, swift 5.4) | |
Efficient done in -> 0.06685197353363037 seconds | |
Compact done in -> 0.23580491542816162 seconds |
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 "iostream" | |
int find(const char* word, const char* in, const int startAt = 0, int endAt = 0) { | |
int begin; | |
int verifyCount = 0; | |
int withSize = std::strlen(in); | |
// loop jusqu'a trouver une égalité du premier characthere de word et le char de l'index dans la loop | |
for ( int i = startAt; i <= ((endAt == 0) ? withSize:endAt); i++ ) { | |
// si le premier char de word et le char de l'index dans la loop sont égaux alors ont enrefistre l'index | |
// qui correspond a la position du premier char de word |
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 "cstdint" | |
uint16_t intLen(uint32_t forInt) { | |
uint64_t factor = 1; | |
uint16_t intLen; | |
for ( intLen = 0 ; (forInt / factor) != 0 ; intLen++ ) { | |
factor *= 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
#include "iostream" | |
#include "cstdint" | |
#include "chrono" | |
// Mac M1 (Apple clang version 13.0.0) 2.9s | |
// - Highest palindrome -> 98344389 | |
// Ryzen 5 3600x (MinGW-W64 8.1.0) 1.6s | |
// - Highest palindrome -> 98344389 | |
uint16_t intLen(uint64_t forInt) { |
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 "vector" | |
#include "cstdint" | |
// poc of a simple implementation of python list Enumerate in c++ | |
// I choosed to use struct over std::tuple like in (python) because of the way to get the data, i prefer use name over numbers: | |
// elem.pos > std::get<0>(elem) | |
template<class T> |
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 "iostream" | |
#include "vector" | |
#include <math.h> | |
struct Vec3 { | |
float x,y,z; | |
}; | |
template <class T> | |
Vec3 getClosest(std::vector<T> withPosVec, const Vec3 toPos) noexcept { |
OlderNewer