Skip to content

Instantly share code, notes, and snippets.

View tail-call's full-sized avatar
🐚
Conch in the Shell

Maria tail-call

🐚
Conch in the Shell
View GitHub Profile
#lang racket
(define/contract (reverse x)
(-> exact-integer? exact-integer?)
(cond ((= x 0) 0)
((< x 0) (- (reverse (- x))))
(else (let ((reduced-x (floor (/ x 10)))
(digit (remainder (floor x) 10))
(z (expt 10 (round (log x 10)))))
diff --git a/cgt-nn-rev6wip.ipynb b/cgt-nn-rev6wip.ipynb
index 25792be..0b03781 100644
--- a/cgt-nn-rev6wip.ipynb
+++ b/cgt-nn-rev6wip.ipynb
@@ -910,45 +910,45 @@
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
- " <th>835</th>\n",
- " <td>evaluate_RegularNetwork_2_p0.99_N9</td>\n",
import curses
from curses import wrapper
from typing import Any
import torch
import torch.nn as nn
import torch.optim as optim
from cgtnnlib.datasets import breast_cancer_dataset, car_evaluation_dataset, student_performance_factors_dataset
from cgtnnlib.AugmentedReLUNetwork import AugmentedReLUNetwork
from cgtnnlib.RegularNetwork import RegularNetwork
from cgtnnlib.training import train_model
@tail-call
tail-call / Аннотации.xml
Created November 25, 2024 05:00
Какой-то файл с EKF AI Challenge
<image id="489" name="EKF/9-page-00001.jpg" width="2482" height="1755">
<box label="QF" source="manual" occluded="0" xtl="1751.82" ytl="308.88" xbr="1783.53" ybr="357.04" z_order="0">
<attribute name="Полюсность">1</attribute>
<attribute name="Description"></attribute>
</box>
<box label="KM" source="manual" occluded="0" xtl="1076.90" ytl="535.09" xbr="1121.10" ybr="577.20" z_order="0">
<attribute name="Description"></attribute>
</box>
<box label="QF" source="manual" occluded="0" xtl="565.16" ytl="314.63" xbr="598.63" ybr="366.31" z_order="0">
<attribute name="Полюсность">3</attribute>
@tail-call
tail-call / pickle.ipynb
Created September 21, 2024 05:46
Python's Pickle
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tail-call
tail-call / Table3.ipynb
Last active September 18, 2024 04:32
Studying "Faster and Lighter LLMs: A Survey on Current Challenges and Way Forward": adapting a table for plotting
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tail-call
tail-call / UIImage+noiseAnimation.swift
Created March 14, 2024 04:10
UIImage noise animation generator
import UIKit
public extension UIImage {
static var noiseAnimation: UIImage = {
makeNoiseAnimation(
size: CGSize(width: 226, height: 168),
framesCount: 4,
magnitude: 0.5,
duration: 0.2
) ?? UIImage()
/// Используется для декодирования объектов, которые могут принимать один из двух типов
enum EitherDecodableEquatable<
Left: Decodable & Equatable,
Right: Decodable & Equatable
>: Decodable, Equatable {
case left(Left)
case right(Right)
init(from decoder: Decoder) throws {
let container = try decoder.singleValueContainer()
0 0 SUBSYSTEM ALGORITHMICAL ;
0 1 AUTHOR J SMITH MALE 43 YO ;
0 2 COMPANY JCN COMPUTING ;
0 3 DEPARTMENT BUSINESS COMPUTING !BLANK! ;
com 0 PUBLIC NOTE ^ ;
com 1 PUBLIC NOTE DEPARTMENT REQUIRES THREE WORDS ;
com 2 PUBLIC NOTE SO WE BLANK OUT THIRD WORD SEE ;
com 3 PUBLIC NOTE OP MANUAL VOL 8 ;
1 0 BEGIN EXTERNALIZABLE OPERATION FACTORIAL ;
1 1 DECLARE FACTORIAL ACCEPTS INTEGRAL PARAM NAMED ≈n≈ ;
--- Control flow functions
local function TypeCase(obj, fallthroughHandler)
return function (args)
for i = 1, #args, 2 do
local signature, action = args[i], args[i + 1]
local function doAction(o)
if type(action) == 'function' then
return action(o)
else