Skip to content

Instantly share code, notes, and snippets.

View sandos's full-sized avatar

John Bäckstrand sandos

View GitHub Profile
@sandos
sandos / analys.png
Last active May 1, 2025 09:39
images
analys.png
@sandos
sandos / gist:1a2335accaecb270221d56d02210e534
Created March 6, 2025 08:19
Y-dna prediction comparing merged, ancestry and MH
Merged;
19 Y-DNA position(s) with heterozygous calls. This may be a quirk of your autosomal DNA product. Further information is needed before these positions can be handled.
81 Y-DNA position(s) lacking mutations recognised by the genetic genealogy community. These Y-DNA positions may not be very useful.
1323 unrecognised position(s). Are you using data from a source other than AncestryDNA, 23andMe or MyHeritage?
522 recognised mutation(s) with positive calls.
1696 recognised mutation(s) with negative calls.
58 recognised mutation(s) with no-calls.
* I1a2a1a1a~1 [I1-L41]
sfsf
Wikitree: A Comprehensive Guide
Introduction
Wikitree is a collaborative genealogy platform that has revolutionized the way individuals and families trace their ancestry. Founded with the mission to create a single, global family tree, Wikitree allows users to contribute and share their genealogical research, ensuring that the information is freely accessible to everyone. This article delves into the origins of Wikitree, its benefits for users, and what sets it apart from other global family trees.
Origins of Wikitree
Wikitree was founded in 2008 by Chris Whitten, a web developer with a passion for genealogy. Whitten envisioned a platform where genealogists, both amateur and professional, could collaborate to build a comprehensive and accurate family tree. The idea was to create a single, shared tree that would connect all of humanity, rather than having isolated family trees that often contain redundant or conflicting information.
The platform was built on the principles of collaboration, accuracy, and fre
Okay, so I need to figure out how to reverse a list in Python and then make it as concise as possible. Hmm, I remember that reversing a list can be done with slicing. Let me think about how that works.
So, the idea is that for a reversed list, each element is moved to the other end. For example, if my list is [1,2,3,4], the reversed version should be [4,3,2,1]. How can I get there with slicing?
I think Python uses negative indices in slicing. So the syntax would be something like lst[::-1], right? Let me test this out.
Let's take a simple list: [a, b, c, d]. Using slicing, it should become [d, c, b, a]. So yes, using ::-1 seems to work because it starts from the end and steps back one each time. That makes sense because it captures elements in reverse order.
Wait, does this apply to all kinds of lists? What if the list is empty or has one element? If the list is empty, slicing would just return an empty list, which is correct. For a single-element list like [x], slicing from the end and reversing still gi
@sandos
sandos / trig.py
Created September 26, 2022 13:27
Trigger bug in Windows Terminal Preview
import asyncio
import logging
from prompt_toolkit import HTML
from prompt_toolkit.layout.layout import Layout
from prompt_toolkit import Application
from prompt_toolkit.key_binding import KeyBindings
from prompt_toolkit.widgets import TextArea
from prompt_toolkit.layout.containers import ConditionalContainer, VSplit, FloatContainer, Float, Window, HSplit
from prompt_toolkit.layout.controls import BufferControl, FormattedTextControl
@sandos
sandos / configuration.yamö
Created July 2, 2021 12:26
reolink rmtp example
camera:
- platform: generic
still_image_url: http://192.168.1.2/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=admin&password=vsdfsdf
stream_source: rtmp://192.168.1.2/bcs/channel0_ext.bcs?token=sdasdasd&channel=0&stream=2&user=admin&password=sdfdsfsdfsdf
name: Uterum_cam
.complete description of an algorithm to generate an ontology from raw text, and then use it to compress the knowledge in that text.
GPT-3: The algorithm is based on the observation that knowledge is often encoded in a hierarchical
fashion, and that the hierarchical structure of the text can be used to compress it. The algorithm
uses a set of heuristics to identify likely hierarchies, and then uses these hierarchies to compress
the text. A compression rate of about 80% was achieved on a corpus of news articles from the New York Times.
The paper is available here: http://www.cs.princeton.edu/~joseph/papers/ontology-compression-icwsm06.pdf
#define PORT0 0
#define NVMCSR _SFR_IO8(0x32)
#define PB2_PORT PORTT
#define PRIXFAST32 "lX"
#define INT0 0
#define __DBL_MIN_EXP__ (-125)
#define __HQ_FBIT__ 15
#define PRADC 1
#define __cpp_attributes 200809L
#define _PROTECTED_WRITE_SPM(reg,value) __asm__ __volatile__("out %[ccp], %[ccp_spm_mask]" "\n\t" "sts %[ioreg], %[val]" : : [ccp] "I" (_SFR_IO_ADDR(CCP)), [ccp_spm_mask] "d" ((uint8_t)CCP_SPM_gc), [ioreg] "n" (_SFR_MEM_ADDR(reg)), [val] "r" ((uint8_t)value))