- 1
IT Оффтоп #216
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
0
IT Оффтоп #216
#186: https://govnokod.ru/28815 https://govnokod.xyz/_28815
#187: https://govnokod.ru/28833 https://govnokod.xyz/_28833
#188: https://govnokod.ru/28837 https://govnokod.xyz/_28837
#189: https://govnokod.ru/28840 https://govnokod.xyz/_28840
#190: https://govnokod.ru/28875 https://govnokod.xyz/_28875
#191: https://govnokod.ru/28878 https://govnokod.xyz/_28878
#192: https://govnokod.ru/28886 https://govnokod.xyz/_28886
#193: https://govnokod.ru/28911 https://govnokod.xyz/_28911
#194: https://govnokod.ru/28914 https://govnokod.xyz/_28914
#195: https://govnokod.ru/28917 https://govnokod.xyz/_28917
#196: https://govnokod.ru/28925 https://govnokod.xyz/_28925
#197: https://govnokod.ru/28935 https://govnokod.xyz/_28935
#198: https://govnokod.ru/28938 https://govnokod.xyz/_28938
#199: https://govnokod.ru/28942 https://govnokod.xyz/_28942
#200: https://govnokod.ru/28945 https://govnokod.xyz/_28945
#201: https://govnokod.ru/28948 https://govnokod.xyz/_28948
#202: https://govnokod.ru/28951 https://govnokod.xyz/_28951
#203: https://govnokod.ru/28954 https://govnokod.xyz/_28954
#204: https://govnokod.ru/28971 https://govnokod.xyz/_28971
#205: https://govnokod.ru/28986 https://govnokod.xyz/_28986
#206: https://govnokod.ru/28991 https://govnokod.xyz/_28991
#207: https://govnokod.ru/29002 https://govnokod.xyz/_29002
#208: https://govnokod.ru/29060 https://govnokod.xyz/_29060
#209: https://govnokod.ru/29070 https://govnokod.xyz/_29070
#210: https://govnokod.ru/29079 https://govnokod.xyz/_29079
#211: https://govnokod.ru/29092 https://govnokod.xyz/_29092
#212: https://govnokod.ru/29093 https://govnokod.xyz/_29093
#213: https://govnokod.ru/29104 https://govnokod.xyz/_29104
#214: https://govnokod.ru/29114 https://govnokod.xyz/_29114
#215: https://govnokod.ru/29125 https://govnokod.xyz/_29125
0
def pause(c): #replace, assist
if c > 100: waitLong(c)
elif c== 1: wait1s()
elif c== 2: wait2s()
elif c== 3: wait3s()
elif c== 5: wait5s()
elif c== 8: wait8s()
elif c== 10: wait10s()
else:
logger.debug(f"custom timeout, need recheck({c})")
p(c) #ping raspberry instead of direct sleep
def p(c):
time.sleep(c)
def wait1s():
p(1)
def wait2s():
wait1s()
wait1s()
def wait3s():
logger.debug("one, two, three")
p(3)
def wait5s():
logger.debug("5, 4, 3, 2, 1..")
p(5)
def wait8s():
wait5s()
wait3s()
def wait10s():
wait5s()
wait5s()
def waitLong(c):
logger.debug(f"Attention, wait time is too long({c}), need to replace with waiting for some event or ping")
p(c)
def cc():
global client
client.connect()
return(client)
0
#include <stdio.h>
int bts(unsigned int n, int bitN) {
return n & (1 << bitN);
}
int main() {
volatile char *p_lacoon;
unsigned char res = 0;
p_lacoon = ((unsigned )p_lacoon | 01 << 1);
res |= bts(p_lacoon, 0) | bts(p_lacoon, 1);
p_lacoon = ((unsigned )p_lacoon | 01 & ~!~0);
p_lacoon = ((unsigned )p_lacoon | 01 << 1 << 0);
res |= 4 << (bts(p_lacoon, 0) | bts(p_lacoon, 1) ^ 3);
p_lacoon = ((int)p_lacoon | 01 & ~0xFE | 00);
p_lacoon = ((int)p_lacoon | 01 << 1);
res |= ~!0xFF << (bts(p_lacoon, 0) | 6 ^ 0x29b);
res |= ~!0xFC << (bts(p_lacoon, 1) | 4 ^ 0x29c);
res |= ~!0xF0 << 5;
p_lacoon = (int)p_lacoon >> 01 >> 001 << 001 << 01;
printf("%x, %X %s\n", p_lacoon, (res & 001) ? res-1 : res, "*****. Challenge everything.");
}
Предтерминальная стадия мозгфускации.
Из собеса в подразделение AMD: продемонстрировать варианты хранения при недостатке памяти.
Работает в GCC, ICC, Clang только -O0.
Кто хочет разобраться - welcome https://godbolt.org/z/hd4eYeM1Y
0
import photoshop
photoshop.CreateProgram()
0
before = []
def bef():
global before
return before
def setB(b):
global before
before = b
def foo():
revert(bef())
0
Привет, писюны. Что-то слишком много стало нападений собаков на людей...
Кто как считает, виноваты собаки или люди?