Skip to content

Instantly share code, notes, and snippets.

View syakesaba's full-sized avatar
🍙
ごはんください

SYA-KE syakesaba

🍙
ごはんください
View GitHub Profile
.venv ❯ ipython
Python 3.12.7 (main, Oct 16 2024, 07:12:08) [Clang 18.1.8 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.29.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import ibis
In [2]: ibis.__version__
Out[2]: '9.5.0'
@the-maldridge
the-maldridge / README.md
Last active February 5, 2025 23:29
Prefect on Nomad

Prefect

Prefect is a workflow engine that manages the directed acyclic graph as a generated artifact from its individual nodes. It is a highly performant system that can scale across an external Dask cluster for pretty insane throughput.

Prefect does not currently have a nomad provider, so this file uses the local agent running in docker instead.

@nomissbowling
nomissbowling / process-large-csv-with-dask.py
Created May 1, 2020 05:35 — forked from mak00s/process-large-csv-with-dask.py
PythonのDASKを使ってpandasでは処理できない巨大CSVを前処理する方法
import dask.dataframe as dd
# 分割されたCSVでも一つの巨大CSVでも同じように読み込める
file1 = 'DW-exported-*.csv'
df = dd.read_csv(file1, header=0, names=('Pages','VisitNum','HitDepth','Date','CV','Customer ID','Referrer','PV'), dtype={'Pages':'object','VisitNum':'int16','HitDepth':'int16','Date':'object','CV':'object','eVar13':'object','Referrer':'object','PV':'int16'})
# カラム名や型を指定しない場合
#df = dd.read_csv(file1, header=0)
# この結果、複数のパーティションに分割されたpandas dataframeが生成される
@hugsy
hugsy / python-ptrace_capstone.patch
Created September 4, 2014 00:57
Using Capstone engine as disassembler in Python-Ptrace
--- ptrace/disasm.c 2014-04-10 10:30:33.000000000 +1200
+++ ptrace/disasm2.c 2014-09-04 12:52:53.425315639 +1200
@@ -4,28 +4,21 @@
try:
from ptrace.cpu_info import CPU_I386, CPU_X86_64
- try:
- from distorm3 import Decode
- if CPU_X86_64:
- from distorm3 import Decode64Bits as DecodeBits
anonymous
anonymous / cursestest.py
Created February 22, 2012 13:11
python curses example
# -*- coding: utf-8 -*-
import curses
def curses_main(args):
w = curses.initscr()
curses.echo()
while 1:
w.addstr(0, 0, ">")
w.clrtoeol()
s = w.getstr()
@MicahElliott
MicahElliott / colortrans.py
Created November 29, 2010 07:57
Convert values between RGB hex codes and xterm-256 color codes.
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code