Skip to content

Instantly share code, notes, and snippets.

View ahmtcn123's full-sized avatar

Ahmetcan Aksu ahmtcn123

View GitHub Profile
upath=$(eval echo ~$USER)
active_shell=$(eval echo "$SHELL")
installed=0
sleep 1
function cleanup()
{
if [ $installed -eq 0 ]; then
echo ""
echo "Cleaning up..."
echo ""
from keras.models import Sequential
from keras.layers import Dense
import enum
import names
#? Renkler class'ı
class Renk(enum.Enum):
Kirmizi = 1
Yesil = 2
@ahmtcn123
ahmtcn123 / randomColoredText.sh
Last active December 16, 2021 11:31
Print given text chars with random colors
text="Yeyyyyyyyyyyy 6 colorsssss"
max=999
#Iter over 0 and 999
for ((e=0; e<${max}; e++));
do
#Iterate all chars
for (( i=0; i<${#text}; i++ ));
do
#Get int between 31 and 37
randomColorInt=$(shuf -i 31-37 -n 1)
@ahmtcn123
ahmtcn123 / listchunk.dart
Created May 13, 2021 14:14
A list chunker written in dart
class Chunker<T> {
Chunker(this.items, this.chunkCount);
final int chunkCount;
final List<T> items;
List<List<T>> chunks() {
List<List<T>> chunks = [];
List<T> tempList = [];
int count = 0;
for (int i = 0; i <= this.items.length - 1; i++) {
layer = 0
maxLayer = 2
turn = 0
turtle.digDown()
while (true) do
if turn == 0 then
turtle.forward()
elseif turn == 1 then
turtle.forward()
elseif turn == 2 then
@ahmtcn123
ahmtcn123 / cities.json
Created June 12, 2019 17:12
cities.json | Call by key also includes latitude & longitude - 571442 line | English
This file has been truncated, but you can view the full file.
{
"Sant Julia de Loria": {
"country": "AD",
"lat": "42.46372",
"lng": "1.49129"
},
"Pas de la Casa": {
"country": "AD",
"lat": "42.54277",
"lng": "1.73361"
@ahmtcn123
ahmtcn123 / countries.json
Last active June 12, 2019 16:18
countries.json | Call by key | English
{
"Afghanistan": {
"code": "AF"
},
"Aland Islands": {
"code": "AX"
},
"Albania": {
"code": "AL"
},