Skip to content

Instantly share code, notes, and snippets.

View insolor's full-sized avatar

insolor insolor

View GitHub Profile
@samuelcolvin
samuelcolvin / python-people.md
Last active June 23, 2024 19:06
An incomplete list of people in the Python community to follow on Twitter and Mastodon.

Python People

(Updated 2022-11-16 with suggestions from comments below, Twitter and Mastodon)

An incomplete list of people in the Python community to follow on Twitter and Mastodon.

With the risk that Twitter dies, I'd be sad to lose links to interesting people in the community, hence this list.

I would love you to comment below with links to people I've missed.

@leaver2000
leaver2000 / app._api.pyx
Last active September 13, 2023 20:59
Cython project for test coverage
cdef int func_1():
return 1
cdef int func_any():
return 10
def cy_func(num:int) -> int:
if num == 1:
return func_1()
@Eng-Fouad
Eng-Fouad / SampleMingw.kt
Created July 9, 2019 22:38
Kotlin Native Win32 GUI Sample
package sample
import kotlinx.cinterop.*
import platform.windows.*
@ExperimentalUnsignedTypes
fun WndProc(hwnd: HWND?, msg: UINT, wParam: WPARAM, lParam: LPARAM) : LRESULT
{
// This switch block differentiates between the message type that could have been received. If you want to
// handle a specific type of message in your application, just define it in this block.
@kuk
kuk / task.md
Last active June 28, 2021 20:57
arb task

Тестовая задача

Предлагается написать программу для извлечения из текста ссылок на нормативные акты. Ссылка — это подстрока вида "ч. 3 ст.19 АПК РФ", "ст.ст. 15, 309 ГК РФ", "части 6, 7 статьи 210 АПК РФ". Программа должна находить такие подстроки в тексте и приводить их к нормальному виду, например:

В соответствии с частью 1 статьи 123 и частью 2 статьи 215 Арбитражного процессуального
кодекса Российской Федерации дело рассмотрено без участия представителей сторон.

[17, 116]  # начало и конец подстроки со ссылкой.

[
@mattmc3
mattmc3 / tasks.json
Created April 6, 2017 00:44
VSCode tasks for running a Makefile
// Makefile
// ${workspaceRoot} the path of the folder opened in VS Code
// ${file} the current opened file
// ${fileBasename} the current opened file's basename
// ${fileDirname} the current opened file's dirname
// ${fileExtname} the current opened file's extension
// ${cwd} the task runner's current working directory on startup
{
"version": "0.1.0",
"command": "bash",
###[Q] Форматирование
Чтобы отформатировать код, выделите его мышью и нажмите на кнопку `{}` редактора.
###[Q] Работа за автора
Согласно правилам форума, вопросы не должны сводиться к решению либо завершению учебных заданий за учащихся. Пожалуйста, уточните, что вы сделали сами и что не получилось.
###[Q] Примите ответ
Если вам дан исчерпывающий ответ, отметьте его как верный (нажмите на галку рядом с выбранным ответом).
###[Q] Всеобъемлющий вопрос
@alexlib
alexlib / split_image_4_quarters.py
Last active May 16, 2021 14:04
Python code using PIL to split the image into 4 quarters. useful for the four-view image splitter 3D-PTV project on http://www.openptv.net
from PIL import Image
import os
import glob
import numpy as np
def crop(im, height, width):
# im = Image.open(infile)
imgwidth, imgheight = im.size
rows = np.int(imgheight/height)
@abhinayagarwal
abhinayagarwal / TableViewDeleteSample
Created March 24, 2014 07:38
Delete Rows using row buttons in Javafx TableView
import javafx.application.Application;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
@gschizas
gschizas / requestsprogress.py
Created September 16, 2012 11:04
Requests with progressbar in python
r = requests.get(file_url)
size = int(r.headers['Content-Length'].strip())
self.bytes = 0
widgets = [name, ": ", Bar(marker="|", left="[", right=" "),
Percentage(), " ", FileTransferSpeed(), "] ",
self,
" of {0}MB".format(str(round(size / 1024 / 1024, 2))[:4])]
pbar = ProgressBar(widgets=widgets, maxval=size).start()
file = []
for buf in r.iter_content(1024):
@jewelsea
jewelsea / TableWrappedHeaders.java
Last active July 11, 2024 18:46
JavaFX sample tableview with wrapped headers.
import javafx.application.Application;
import javafx.beans.property.SimpleStringProperty;
import javafx.collections.FXCollections;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;