Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace cons161004
{
class Program
{
=СУММЕСЛИ(B2:B26;B25;D2:D26)
=СУММЕСЛИМН(D2:D26;B2:B26;B25;A2:A26;A25)
=ЕСЛИ(ЕПУСТО(B2);"";СЧЁТЗ($B$2:B2))
=ИНДЕКС(B2:F10;ПОИСКПОЗ(J2;A2:A10;0);ПОИСКПОЗ(J3;B1:F1;0))
struct Vec3
{
public double x, y, z;
public Vec3(double x_, double y_, double z_)
{
x = x_;
y = y_;
z = z_;
}
import tkinter
def click_listen1(e):
global lin
#e.widget.create_line(0, 0, e.x, e.y, fill = "#ffff00", width = 4)
#e.widget.coords(lin, *(0, 0, e.x, e.y, e.x -100, e.y - 100))
if(lin):
lin_c.append(e.x)
lin_c.append(e.y)
e.widget.coords(lin, *lin_c)
else:
@Vftdan
Vftdan / Canon_bubbles.py
Last active May 12, 2017 20:13
TKinter canvas game
from tkinter import *
from random import *
from time import sleep
#from multiprocessing import Process
DEBUG = True
HEIGHT = 1080 - 27
WIDTH = 1920
BUBBLE_COUNT = 50
g = 9.8
@Vftdan
Vftdan / script.js
Created July 2, 2018 21:37
Open stackoverflow after error
window.onerror = function(msg) {
msg = msg.replace(/^Uncaught /, '');
if(confirm('Search?\n' + msg)) {
window.open('//stackoverflow.com/search?q=' + encodeURIComponent(msg), '_blank');
window.onerror = null;
}
}

Keybase proof

I hereby claim:

  • I am vftdan on github.
  • I am vftdan (https://keybase.io/vftdan) on keybase.
  • I have a public key ASCJfzScL0ociu3eeXCBvi8el-OcEy6352lz03InTpBY1Ao

To claim this, I am signing this object:

@Vftdan
Vftdan / IntxLNK2Junction.py
Last active October 13, 2018 18:29
Script for windows that converts IntxLNK files to NTFS junctions
#! /C/Windows/System32/cmd.exe /s /c python
from subprocess import run, PIPE
from sys import argv, executable
from os.path import realpath
import os
try:
run(['mklink'], shell=True, stdout=PIPE, stderr=PIPE)
except FileNotFoundError:
print('Python seems to be launched not from cmd.exe.\nPress enter to restart in cmd....', end='')
input()
//by Vftdan
module detSphere(radius, details=1) scale(1 / details) sphere(radius * details);
module zcyl(h, r, details) scale(1 / details) cylinder(h * details, r=r * details, center=true);
module xcyl(h, r, details) rotate([0, 90, 0]) zcyl(h, r, details);
module ycyl(h, r, details) rotate([90, 0, 0]) zcyl(h, r, details);
module bottomSmoothedCuboid(width, depth, height, radius, details=1) {
d = radius * 2;
intersection() {
translate([0, 0, height / 2]) {