Skip to content

Instantly share code, notes, and snippets.

View k4sima's full-sized avatar
🖖
Tout ce qu'un homme est capable d'imaginer, d'autres hommes seront capables.

kasima k4sima

🖖
Tout ce qu'un homme est capable d'imaginer, d'autres hommes seront capables.
View GitHub Profile
@k4sima
k4sima / qtquickcontrols2.conf
Created May 24, 2022 02:26
QtQuick Controls - GitHub theme
[Controls]
Style=Basic
[Basic\Palette]
BrightText=#ffffff
Link=#0969da
LinkVisited=#033d8b
WindowText=#cdd9e5
Text=#cdd9e5
ButtonText=#cdd9e5
@yeus
yeus / spacy_trf_vecs.py
Created April 5, 2022 21:06
spacy > 3.0 transformers contextual vectors pipeline component
from spacy.language import Language
from spacy.tokens import Doc
@Language.factory('trf_vectors')
class TrfContextualVectors:
"""
Spacy pipeline which add transformer vectors to each token based on user hooks.
https://spacy.io/usage/processing-pipelines#custom-components-user-hooks
https://github.com/explosion/spaCy/discussions/6511
class Color:
# ------------------------------------text-color
BLACK = '\033[0;30m'
RED = '\033[0;31m'
GREEN = '\033[0;32m'
YELLOW = '\033[0;33m'
BLUE = '\033[0;34m'
PURPLE = '\033[0;35m'
CYAN = '\033[0;36m'
WHITE = '\033[0;37m'
@k4sima
k4sima / HideTitleBar.cs
Created January 13, 2022 06:08
Hide title bar for standalone of Unity
using System;
using System.Runtime.InteropServices;
using UnityEngine;
namespace Utils
{
public class HideTitleBar : MonoBehaviour
{
public static int GWL_WNDPROC = -4;
public static int GWL_STYLE = -16;
@k4sima
k4sima / ApplicationSetting.cs
Last active January 8, 2022 08:54
Unity Application settings
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class ApplicationSetting : MonoBehaviour
{
[SerializeField] int FrameRate = 30;
[SerializeField] bool ESC_Quit = true;
void Start()
@kepano
kepano / obsidian-web-clipper.js
Last active June 27, 2024 14:59
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@HirbodBehnam
HirbodBehnam / dark-pdf.js
Created November 12, 2020 15:50
A tampermonkey script to enable dark mode even on local files.
// ==UserScript==
// @name PDF Dark Mode
// @namespace http://tampermonkey.net/
// @version 1
// @description A tampermonkey script to enable dark mode even on local files.
// @author Hirbod Behnam
// @match *://*/*.pdf
// @grant none
// ==/UserScript==
@ivelin
ivelin / good_process_kill.py
Last active May 19, 2023 11:19
Python good process kill
def _process_kill(pid, signal=0):
"""Send a signal to a process.
:Returns:
----------
True if the pid is dead
with no signal argument, sends no signal.
"""
@Phroneris
Phroneris / howGithubMarkdownDetailsWork.md
Last active June 17, 2024 05:41
GitHubのMarkdownで折りたたみ記法の中身を整形させる方法

どうやら</summary>後の空行以降から整形される。

記述

違いは</summary>後の空行だけ。

<details>
<summary>これは中身が整形されない</summary>
1. 野菜**A**の皮を剥く。
2. 乱切りにする。
@iansan5653
iansan5653 / ansi-test.py
Last active January 4, 2024 14:56
ANSI Console Formatting Test File (Python)
"""Test ANSI formatting codes for console applications."""
print('\x1b[0m Reset / Normal \x1b[0m')
print('\x1b[1m Bold or increased intensity \x1b[0m')
print('\x1b[2m Faint (decreased intensity) \x1b[0m')
print('\x1b[3m Italic \x1b[0m')
print('\x1b[4m Underline \x1b[0m')
print('\x1b[5m Slow Blink \x1b[0m')
print('\x1b[6m Rapid Blink \x1b[0m')
print('\x1b[7m reverse video \x1b[0m')