This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import taichi as ti | |
ti.init(arch=ti.gpu) | |
def main(): | |
n = 800 | |
pixels = ti.field(dtype=ti.f32, shape=(n, n)) | |
star_positions = ti.Vector.field(2, dtype=ti.i32, shape=(1000)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from asyncio.tasks import Task | |
from typing import Dict | |
import asyncio | |
from uuid import uuid4 | |
class PiQueConnection: | |
def __init__(self, pique: 'PiQue', uid: str, reader: asyncio.StreamReader, writer: asyncio.StreamWriter): | |
self.pique = pique | |
self.uid = uid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Türkçe kelimeleri hecelemek için yazdığım bir bilgisayar programı | |
Nurettin Onur TUĞCU - 2020 | |
Geçen gün Türkçe'deki heceleme kurallarını incelerken Ali Nesin'in Matematik ve Sonsuz[1] isimli kitabına denk geldim. | |
34. sayfadaki açıklamanın sonundaki dip notta 1973 senesinden bahsedildiğine göre yazı epey eski. | |
Kitaptaki örnekler çok hoşuma gitti ve bütün örneklemleri çözen bir program yazmaya karar verdim. | |
Not 1: Ali Nesin'in de belirttiği gibi türkçeye ingilizce vb. dillerden gelen kelimelerin (ço-ko-krem, fo-to-star) farsça | |
kökenli kelimelere (si-lah-şor) göre farklı hecelenmesi konusu için basit bir çözüm yok. Bu türden sözcükler için sözlük |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Idea: YankeeMinstrel | |
# Python code: torstengrust | |
# Animated GIF: Nicolas Seriot, 2017-07-01 | |
# https://www.reddit.com/r/cellular_automata/comments/6jhdfw/i_used_1dimensional_cellular_automata_to_make_a/ | |
from PIL import Image, ImageDraw | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"nodes": [{"id": "ADBGR", "group": 1}, {"id": "ALARK", "group": 1}, {"id": "AKBNK", "group": 1}, {"id": "AEFES", "group": 1}, {"id": "ADANA", "group": 1}, {"id": "ADEL", "group": 1}, {"id": "ADNAC", "group": 1}, {"id": "ALCAR", "group": 1}, {"id": "AKFGY", "group": 1}, {"id": "AKMGY", "group": 1}, {"id": "AKSEL", "group": 1}, {"id": "ALCTL", "group": 1}, {"id": "ANELE", "group": 1}, {"id": "AKPAZ", "group": 1}, {"id": "AKSGY", "group": 1}, {"id": "ALGYO", "group": 1}, {"id": "AKSUE", "group": 1}, {"id": "ACSEL", "group": 1}, {"id": "ALKIM", "group": 1}, {"id": "ALBRK", "group": 1}, {"id": "AGYO", "group": 1}, {"id": "ALKA", "group": 1}, {"id": "AKCNS", "group": 1}, {"id": "AKSEN", "group": 1}, {"id": "AKSA", "group": 1}, {"id": "AKENR", "group": 1}, {"id": "ALYAG", "group": 1}, {"id": "ADESE", "group": 1}, {"id": "AFYON", "group": 1}, {"id": "ANACM", "group": 1}, {"id": "AKGRT", "group": 1}, {"id": "AKGUV", "group": 1}, {"id": "ANELT", "group": 1}, {"id": "ANSGR", "group": 1}, {"id": "ARMDA", "group": 1}, {" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"nodes": [{"id": "ADBGR", "group": 1}, {"id": "ALARK", "group": 1}, {"id": "AKBNK", "group": 1}, {"id": "AEFES", "group": 1}, {"id": "ADANA", "group": 1}, {"id": "ADEL", "group": 1}, {"id": "ADNAC", "group": 1}, {"id": "ALCAR", "group": 1}, {"id": "AKFGY", "group": 1}, {"id": "AKMGY", "group": 1}, {"id": "AKSEL", "group": 1}, {"id": "ALCTL", "group": 1}, {"id": "ANELE", "group": 1}, {"id": "AKPAZ", "group": 1}, {"id": "AKSGY", "group": 1}, {"id": "ALGYO", "group": 1}, {"id": "AKSUE", "group": 1}, {"id": "ACSEL", "group": 1}, {"id": "ALKIM", "group": 1}, {"id": "ALBRK", "group": 1}, {"id": "AGYO", "group": 1}, {"id": "ALKA", "group": 1}, {"id": "AKCNS", "group": 1}, {"id": "AKSEN", "group": 1}, {"id": "AKSA", "group": 1}, {"id": "AKENR", "group": 1}, {"id": "ALYAG", "group": 1}, {"id": "ADESE", "group": 1}, {"id": "AFYON", "group": 1}, {"id": "ANACM", "group": 1}, {"id": "AKGRT", "group": 1}, {"id": "AKGUV", "group": 1}, {"id": "ANELT", "group": 1}, {"id": "ANSGR", "group": 1}, {"id": "ARMDA", "group": 1}, {" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select row_to_json(q) from ( | |
select | |
row_to_json(a) account | |
, json_agg(t) trades | |
from pm_account a | |
left join lateral ( | |
select | |
row_to_json(t) trade | |
, json_agg(d) dailies | |
, json_agg(sf) smartorders |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
class Prompt: | |
def __init__(self, loop=None): | |
self.loop = loop or asyncio.get_event_loop() | |
self.q = asyncio.Queue(loop=self.loop) | |
self.loop.add_reader(sys.stdin, self.got_input) | |
def got_input(self): | |
asyncio.ensure_future(self.q.put(sys.stdin.readline()), loop=self.loop) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
/usr/bin/raspivid --brightness 65 --saturation 25 -ex auto -n -ih -t 0 -rot 75 -w 1480 -h 1200 -fps 15 -b 1000000 -o - | /usr/bin/ncat -lkv4 5001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
i | |
, c | |
, g | |
, gi | |
, sum(1) over (partition by g) gn | |
from ( | |
select | |
i | |
, c |
NewerOlder