Skip to content

Instantly share code, notes, and snippets.

View fire's full-sized avatar

K. S. Ernest (iFire) Lee fire

View GitHub Profile
// https://github.com/ERGO-Code/HiGHS/blob/master/examples/call_highs_from_cpp.cpp
//
// HiGHS is designed to solve linear optimization problems of the form
//
// Min (1/2)x^TQx + c^Tx + d subject to L <= Ax <= U; l <= x <= u
//
// where A is a matrix with m rows and n columns, and Q is either zero
// or positive definite. If Q is zero, HiGHS can determine the optimal
// integer-valued solution.
//
Id SepalLengthCm SepalWidthCm PetalLengthCm PetalWidthCm Species
1 5.1 3.5 1.4 0.2 Iris-setosa
2 4.9 3.0 1.4 0.2 Iris-setosa
3 4.7 3.2 1.3 0.2 Iris-setosa
4 4.6 3.1 1.5 0.2 Iris-setosa
5 5.0 3.6 1.4 0.2 Iris-setosa
6 5.4 3.9 1.7 0.4 Iris-setosa
7 4.6 3.4 1.4 0.3 Iris-setosa
8 5.0 3.4 1.5 0.2 Iris-setosa
9 4.4 2.9 1.4 0.2 Iris-setosa
@fire
fire / machine.js
Created November 18, 2021 05:14
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
var queue : Array
queue.push_back(scene)
while not queue.is_empty():
var front = queue.front()
var node = front
if node is AnimationPlayer:
_do(node)
var child_count : int = node.get_child_count()
for i in child_count:
queue.push_back(node.get_child(i))

我們還在元宇宙中嗎? 加密人說他們正在構建它。遊戲玩家可能已經生活在其中。藝術界正在從中獲利。網絡老手正試圖挽救它。但它是什麼?

信用... Jon Han 作者:約翰赫爾曼和凱倫布朗寧 2021 年 7 月 10 日,美國東部時間上午 5:00 技術中最偉大的想法往往在它們真正連貫之前就進入了詞典。行話突然出現、解釋不足和過度使用:物聯網、共享經濟、雲。 在一些罕見的情況下,術語仍然存在。很多人談論很多鬆散相關的事情,然後這些事情合併成一個單一的半可理解的事情。然後我們永遠生活在那個東西中。還記得聽說過“互聯網”嗎?為“元節”做好準備。 這個詞來自數字古代:由作家尼爾斯蒂芬森在他 1992 年的小說“雪崩”中創造,然後在歐內斯特克萊恩小說“準備好玩家一號”中被重新想像成綠洲,它指的是一個完全實現的數字世界,它存在於我們生活的那個模擬。 在小說中,烏托邦式的元宇宙可能被描繪成一個新的前沿,在那裡可以重新書寫社會規範和價值體系,擺脫文化和經濟僵化。但更多時候,元宇宙有點反烏托邦——來自墮落世界的虛擬避難所。

@fire
fire / reclaimWindows10.ps1
Created July 3, 2021 06:14 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
% MIT License
% Copyright (c) 2019 Eric Zinda, Inductor Software, LLC
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the "Software"), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
# MIT LICENSE
# Authored by iFire#6518 and alexfreyre#1663
# This code ONLY apply to a mesh and simulations with ONLY the same vertex number
import bpy
#Converts a MeshCache or Cloth modifiers to ShapeKeys
frame = bpy.context.scene.frame_start
for frame in range(bpy.context.scene.frame_end + 1):
bpy.context.scene.frame_current = frame
extends Node2D
const min_ephemeral_port : int = 32768
const max_ephemeral_port : int = 61000
const client_id : String = "AAAA.apps.googleusercontent.com"
const client_secret : String = "AAAA"
const authorization_endpoint : String = "https://accounts.google.com/o/oauth2/v2/auth"
const uri = "https://www.googleapis.com"
const token_request_uri : String = "/oauth2/v4/token"
const user_info_uri : String = "/oauth2/v3/userinfo"
@fire
fire / tilt.shift.glsl
Created January 26, 2021 20:30 — forked from ruby0x1/tilt.shift.glsl
Tilt shift shader, modified from something @grapefrukt gave me
// Modified version of a tilt shift shader from Martin Jonasson (http://grapefrukt.com/)
// Read http://notes.underscorediscovery.com/ for context on shaders and this file
// License : MIT
uniform sampler2D tex0;
varying vec2 tcoord;
varying vec4 color;
/*
Take note that blurring in a single pass (the two for loops below) is more expensive than separating