Skip to content

Instantly share code, notes, and snippets.

View psqq's full-sized avatar
🙃
Where is my mind?

Sergey Pestov psqq

🙃
Where is my mind?
View GitHub Profile
@psqq
psqq / main.cpp
Last active September 15, 2024 04:07
Simple SDL_net example
#include <SDL.h>
#include <SDL_net.h>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main(int argc, char **argv) {
if (SDL_Init(0) == -1) {
printf("SDL_Init: %s\n", SDL_GetError());
@psqq
psqq / .clang-format
Last active June 7, 2017 18:49
My configs
BasedOnStyle: LLVM
IndentWidth: 2
ColumnLimit: 80
@psqq
psqq / main.cpp
Last active June 6, 2017 00:20
Наследование и текучий интерфейс
#include <iostream>
using namespace std;
class Base {
int propertyBase;
public:
template<class T>
T& setPropertyBase(int propertyBase) {
this->propertyBase = propertyBase;
return *(T*)this;
file(GLOB SRCS "*.cpp")
add_executable(hello ${SRCS})
set_property(TARGET hello PROPERTY CXX_STANDARD 11)
import sys, subprocess
from tqdm import tqdm
N_semigroups = [1, 1, 4, 18, 126, 1160, 15973, 836021, 1843120128]
N_semilattices = [1, 1, 1, 2, 5, 15, 53, 222, 1078]
template = """
LoadPackage("smallsemi");;
n := {n};;
1111111112111111113111111114111111115111111116111111117111111118111111111211111111311111111411111111511111111611111111771111117811111111121111111131111111141111111151111111161611111177111116781111111112111111113111111114111111115111111116661111167611111668111111111211111111311111111411111111511111111666111116771111167811111111121111111131111111141111111151151111161611111177111156781111111112111111113111111114111111115115111116611111167111115118111111111211111111311111111411111111511511111666111116761111566811111111121111111131111111141111111151151111166611111677111156781111111112111111113111111114111111115155111116661111567711115678111111111211111111311111111411111111555511115655111155751111555811111111121111111131111111141111111155551111565511115577111155781111111112111111113111111114111111115555111156561111557711115678111111111211111111311111111411111111555511115666111156761111566811111111121111111131111111141111111155551111566611115677111156781111111112111111113111111114111411115115111116161111117711145678
BIN_FOR_RUN = main2
.PHONY: r ug all
all: $(BIN_FOR_RUN)
main: main.cpp
mpic++ --std=c++14 -o main main.cpp
@psqq
psqq / f1.go
Last active April 11, 2017 16:41
package mymath
func Add(x, y int) int {
return x + y
}
program LU;
var a11,a12,a13,a21,a22,a23,a31,a32,a33,b1,b2,b3,l11,l12,l13,l21,l22,l23,l31,l32,l33,u11,u12,u13,u21,u22,u23,u31,u32,u33,c1,c2,c3,x1,x2,x3:real;
double ...;
begin
int main() {
Write ('Введите a11 '); // cout << 'Введите a11 ';
// https://tour.golang.org/moretypes/18
// https://www.benjoffe.com/code/tools/functions3d/examples
// https://www.physicsforums.com/threads/cool-3-d-functions-for-graphing.140087/
package main
import (
"golang.org/x/tour/pic"
"fmt"
"math"