Skip to content

Instantly share code, notes, and snippets.

View hellerve's full-sized avatar

Veit Heller hellerve

View GitHub Profile
:Namespace apl102
(⎕IO ⎕ML ⎕WX)←0 1 3
tok←'your_access_key'
base←'https://botsin.space/api/v1/'
∆h←⎕SE.UCMD 'Load HttpCommand'
br←{t←⍵ ⎕NTIE 0 ⋄ s←2 ⎕NINFO t ⋄ ⎕NREAD t 80 s}
putMedia←{
h←⎕NEW ∆h
n←⎕UCS 13 10 ⍝ \r\n
bd←'boundary'
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define LARGENUM 0x80000001
int main()
{
char* buf = malloc(LARGENUM + 1);
memset(buf, 'X', LARGENUM);
@yurivish
yurivish / venn-diagrams.js
Last active December 26, 2020 03:20
Area-proportional Venn Diagrams
// Since `overlapArea` function is monotonic increasing, we can perform a
// simple bisection search to find the distance that leads to an overlap
// area within epsilon of the desired overlap.
function distanceForOverlapArea(r1, r2, desiredOverlap) {
// Ensure r1 <= r2
if (r1 > r2) {
var temp = r2;
r2 = r1;
r1 = temp;
}
@behrtam
behrtam / htwaib_finalgrade.py
Created August 3, 2015 13:57
HTW AI Bachelor – Berechnung des Gesamtprädikats
#!/usr/bin/env python
# coding: utf8
from __future__ import print_function
'''
HTW AI Bachelor
§9 Berechnung des Gesamtprädikats
http://ai-bachelor.htw-berlin.de/fileadmin/HTW/Alle/Amtliche_Mitteilungsblaetter/2012/30_12.pdf
'''
@kevincennis
kevincennis / v8.md
Last active May 6, 2024 05:25
V8 Installation and d8 shell usage

Installing V8 on a Mac

Prerequisites

  • Install Xcode (Avaliable on the Mac App Store)
  • Install Xcode Command Line Tools (Preferences > Downloads)
  • Install depot_tools
    • $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    • $ nano ~/.zshrc
    • Add path=('/path/to/depot_tools' $path)
@ibeex
ibeex / foo.log
Created August 4, 2012 13:46
Flask logging example
A warning occurred (42 apples)
An error occurred
@danielestevez
danielestevez / gist:2044589
Last active April 10, 2024 07:51
GIT Commit to an existing Tag
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active April 2, 2024 20:18
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@sixtenbe
sixtenbe / analytic_wfm.py
Last active May 1, 2024 02:29 — forked from endolith/peakdet.m
Peak detection in Python
#!/usr/bin/python2
# Copyright (C) 2016 Sixten Bergman
# License WTFPL
#
# This program is free software. It comes without any warranty, to the extent
# permitted by applicable law.
# You can redistribute it and/or modify it under the terms of the Do What The
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See