text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_prefix|># coding: utf-8 from __future__ import print_function, unicode_literals import errno import os import stat from .__init__ import TYPE_CHECKING from .authsrv import VFS from .bos import bos from .th_srv import EXTS_AC, H_PIL_JXL, H_PIL_WEBP, thumb_path from .util import Cooldown, Pebkac if True: # pyli...
fim
9001/copyparty
python
<|fim_suffix|>, fmt, vn) except Exception as ex: self.log("fancy_pillow {}".format(ex), "90") im.thumbnail(self.getres(vn, fmt)) fmts = ["RGB", "L"] zs = "th_qvx" if tpath.endswith(".jxl") else "th_qv" args = {"quality": vn.flags[zs]} if tpath.endswith("...
fim
9001/copyparty
python
<|fim_prefix|># coding: utf-8 from __future__ import print_function, unicode_literals import calendar import os import re import threading import time from operator import itemgetter from .__init__ import ANYWIN, PY2, TYPE_CHECKING, unicode from .authsrv import LEELOO_DALLAS, VFS from .bos import bos from .up2k impor...
fim
9001/copyparty
python
#!/usr/bin/env python3 """partyfuse: remote copyparty as a local filesystem""" __author__ = "ed <copyparty@ocv.me>" __copyright__ = 2019 __license__ = "MIT" __url__ = "https://github.com/9001/copyparty/" S_VERSION = "2.2" S_BUILD_DT = "2025-12-16" """ mount a copyparty server (local or remote) as a filesystem speed...
fim
9001/copyparty
python
<|fim_prefix|>#!/usr/bin/env python3 from __future__ import print_function, unicode_literals S_VERSION = "2.22" S_BUILD_DT = "2026-06-13" """ u2c.py: upload to copyparty 2021, ed <irc.rizon.net>, MIT-Licensed https://github.com/9001/copyparty/blob/hovudstraum/bin/u2c.py - dependencies: no - supports python 2.6, 2.7,...
fim
9001/copyparty
python
<|fim_prefix|>"use strict"; /*! * baguetteBox.js * @author feimosi * @version 1.11.1-mod * @url https://github.com/feimosi/baguetteBox.js */ var J_BBX = 1; window.baguetteBox = (function () { 'use strict'; var options = {}, defaults = { captions: true, buttons: 'auto', ...
fim
9001/copyparty
javascript
<|fim_suffix|> requestAnimationFrame(draw); ana.getByteFrequencyData(buf); cc.clearRect(0, 0, can.width, can.height); /*var x = 0, w = 1; for (var a = 0; a < buf.length; a++) { cc.fillRect(x, h - buf[a], w, h); x += w; }*/ var mul = Math.pow(w,...
fim
9001/copyparty
javascript
<|fim_prefix|>"use strict"; var J_MD = 1; var dom_toc = ebi('toc'), dom_wrap = ebi('mw'), dom_hbar = ebi('mh'), dom_nav = ebi('mn'), dom_pre = ebi('mp'), dom_src = ebi('mt'), dom_navtgl = ebi('navtoggle'), hash0 = location.hash; // chrome 49 needs this var chromedbg = function () { consol...
fim
9001/copyparty
javascript
<|fim_suffix|>1), o1 = txt.indexOf('\n', dom_src.selectionEnd); o0 = o0 + 1 ? o0 + 1 : 0; if (o1 < 0) o1 = txt.length; for (var a = 0; a < 9; a++) { if (has(['\r', '\n', ' '], txt.charAt(o0))) ++o0; if (has(['\r', '\n', ' '], txt.charAt(o1))) --o1; } var jt0 = txt.slice(o0, +...
fim
9001/copyparty
javascript
<|fim_suffix|> xhr.onload = xhr.onerror = save_chk; xhr.btn = this.save_btn; xhr.mde = this.mde; xhr.txt = this.txt; xhr.lastmod = r.lastmod; xhr.send(); } function save_chk() { if (this.status !== 200) return toast.err(0, 'Error! The file was NOT saved.\n\nError ' + this.status + ...
fim
9001/copyparty
javascript
<|fim_suffix|>lter), true); xhr.send(); } ebi('re').onclick = ask; ebi('filter').oninput = function () { clearTimeout(ti); ti = setTimeout(ask, 500); ebi('hits').innerHTML = '...'; }; ebi('filter').onkeydown = function (e) { if (('' + e.key).endsWith('Enter')) ask(); }; J_RUP = 2; <|fim_pre...
fim
9001/copyparty
javascript
<|fim_suffix|>qr(href) { var vhref = href.replace('?qr&', '?').replace('?qr', ''); modal.alert(esc(vhref) + '<img class="b64" width="100" height="100" src="' + href + '" />'); } (function() { var tab = ebi('tab').tBodies[0], tr = Array.prototype.slice.call(tab.rows, 0); var buf = []; for (...
fim
9001/copyparty
javascript
<|fim_suffix|>bi('lp').oninput = function() { ebi('lm').innerHTML = this.value.length <= 64 ? '' : 'ERROR: Password too long (max=64)'; }; J_SPL = 2; <|fim_prefix|>"use strict"; var J_SPL = 1; Ls.eng = { "splash": { "d2": "shows the state of all active threads", "e2": "reload config files (accounts/volume...
fim
9001/copyparty
javascript
"use strict"; var J_SVC = 1; var oa = QSA('pre'); for (var a = 0; a < oa.length; a++) { var html = oa[a].innerHTML, nd = /^ +/.exec(html)[0].length, rd = new RegExp('(^|\r?\n) {' + nd + '}', 'g'); oa[a].innerHTML = html.replace(rd, '$1').replace(/[ \r\n]+$/, '').replace(/\r?\n/g, '<br />'); }...
fim
9001/copyparty
javascript
// 以 //m 结尾的行是未经验证的机器翻译 Ls.chi = { "tt": "中文", "cols": { "c": "操作按钮", "dur": "时长", "q": "质量 / 比特率", "Ac": "音频编码", "Vc": "视频编码", "Fmt": "格式 / 容器", "Ahash": "音频校验和", "Vhash": "视频校验和", "Res": "分辨率", "T": "文件类型", "aq": "音频质量 / 比特率", "vq": "视频质量 / 比特率", "pixfmt": "子采样 / 像素结构", "resw": "水平分辨率...
fim
9001/copyparty
javascript
<|fim_prefix|> // Řádky končící na //m jsou neověřené strojové překlady Ls.cze = { "tt": "Čeština", "cols": { "c": "tlačítka akcí", "dur": "doba trvání", "q": "kvalita / bitrate", "Ac": "audio kodek", "Vc": "video kodek", "Fmt": "formát / kontejner", "Ahash": "kontrolní součet audia", "Vhash": "kont...
fim
9001/copyparty
javascript
<|fim_prefix|> // Zeilen, die mit //m enden, sind nicht verifizierte maschinelle Übersetzungen Ls.deu = { "tt": "Deutsch", "cols": { "c": "Aktionen", "dur": "Dauer", "q": "Qualität / Bitrate", "Ac": "Audiocodec", "Vc": "Videocodec", "Fmt": "Format / Container", "Ahash": "Audio Checksumme", "Vhash": ...
fim
9001/copyparty
javascript
// Linioj, finiĝantaj per "//m", estas nekontrolitaj maŝinaj tradukoj Ls.epo = { "tt": "Esperanto", "cols": { "c": "ago-butonoj", "dur": "daŭro", "q": "kvalito / bitrapido", "Ac": "sonkodeko", "Vc": "videokodeko", "Fmt": "formato / ujo", "Ahash": "kontrolsumo de aŭdio", "Vhash": "kontrolsumo de vid...
fim
9001/copyparty
javascript
<|fim_suffix|>mat latauskoot\">flac", "mt_c2wav": "pakkaamaton toisto, suurimmat latauskoot\">wav", "mt_c2ok": "hienoa, hyvä valinta", "mt_c2nd": "tuo ei ole suositeltu formaatti laitteellesi, mutta tee miten lystäät", "mt_c2ng": "laitteesi ei näytä tukevan tätä formaattia, mutta yritetään nyt silti", "mt_xowa": "...
fim
9001/copyparty
javascript
<|fim_suffix|> nous fasse à nouveau confiance après un problème réseau…", "u_ehsdf": "le serveur est à court d'espace disque !\n\nil va continuer de réessayer, au cas où quelqu'un\nlibérerait suffisamment d'espace pour continuer", "u_emtleak1": "il semble que votre navigateur web ait une fuite de mémoire ;\nveuillez"...
fim
9001/copyparty
javascript
<|fim_prefix|> // Οι γραμμές που τελειώνουν με //m είναι μη επαληθευμένες μηχανικές μεταφράσεις Ls.grc = { "tt": "Ελληνικά", "cols": { "c": "κουμπιά ενεργειών", "dur": "διάρκεια", "q": "ποιότητα / bitrate", "Ac": "κωδικοποιητής ήχου", "Vc": "κωδικοποιητής βίντεο", "Fmt": "μορφή / container", "Ahash": ...
fim
9001/copyparty
javascript
<|fim_prefix|>Ls.hun = { "tt": 'Magyar', "cols": { "c": 'műveletek', "dur": 'hossz', "q": 'minőség / bitrate', "Ac": 'audió kodek', "Vc": 'videó kodek', "Fmt": 'konténer', "Ahash": 'audió hash', "Vhash": 'videó hash', "Res": 'felbontás', "T": 'típus', "aq": 'audió minőség / bitrate', "vq": 'v...
fim
9001/copyparty
javascript
<|fim_prefix|> // Le righe che terminano con //m sono traduzioni automatiche non verificate Ls.ita = { "tt": "Italiano", "cols": { "c": "pulsanti azione", "dur": "durata", "q": "qualità / bitrate", "Ac": "codec audio", "Vc": "codec video", "Fmt": "formato / container", "Ahash": "checksum audio", "Vh...
fim
9001/copyparty
javascript
<|fim_prefix|> //末尾が //m の行は未検証の機械翻訳です Ls.jpn = { "tt": "日本語", "cols": { "c": "アクションボタン", "dur": "間隔", "q": "品質 / ビットレート", "Ac": "オーディオコーデック", "Vc": "ビデオコーデック", "Fmt": "フォーマット / コンテナ", "Ahash": "オーディオチェックサム", "Vhash": "ビデオチェックサム", "Res": "解像度", "T": "ファイル形式", "aq": "オーディオ 品質 / ビットレート", "vq":...
fim
9001/copyparty
javascript
<|fim_prefix|> // //m으로 끝나는 줄은 검증되지 않은 기계 번역입니다 Ls.kor = { "tt": "한국어", "cols": { "c": "작업 버튼", "dur": "길이", "q": "품질/비트레이트", "Ac": "오디오 코덱", "Vc": "비디오 코덱", "Fmt": "형식/컨테이너", "Ahash": "오디오 체크섬", "Vhash": "비디오 체크섬", "Res": "해상도", "T": "파일 유형", "aq": "오디오 품질/비트레이트", "vq": "비디오 품질/비트레이트", "p...
fim
9001/copyparty
javascript
<|fim_suffix|> volgende nummer gevonden:", "mm_uncache": "Cache gewist; alle nummers worden opnieuw gedownload bij de volgende keer afspelen", "mm_hnf": "Dat liedje bestaat niet meer", "im_hnf": "Deze afbeelding bestaat niet meer", "f_empty": 'Deze map is leeg', "f_chide": 'Dit verbergt kolom «{0}»\n\nje kunt ko...
fim
9001/copyparty
javascript
<|fim_suffix|>rast\">turbo", "cut_datechk": "har ingen effekt dersom turbo er skrudd av$N$Ngjer turbo bittelitt tryggare ved å sjekke datostemplinga på filene (i tillegg åt filstorleik)$N$N<em>burde</em> oppdage og gjenoppta dei fleste ufullstendige opplastinger, men er <em>ikkje</em> ein fullverdig erstatning for å ...
fim
9001/copyparty
javascript
<|fim_prefix|>Ls.nor = { "tt": "Norsk", "cols": { "c": "handlingsknapper", "dur": "varighet", "q": "kvalitet / bitrate", "Ac": "lyd-format", "Vc": "video-format", "Fmt": "format / innpakning", "Ahash": "lyd-kontrollsum", "Vhash": "video-kontrollsum", "Res": "oppløsning", "T": "filtype", "aq": "...
fim
9001/copyparty
javascript
<|fim_suffix|>elete” w tym folderze', "fc_eperm": 'nie można wyciąć:\nnie posiadasz uprawnienia „move” w tym folderze', "fp_eperm": 'nie można wkleić:\nnie posiadasz uprawnienia „write” w tym folderze', "fr_emore": "wybierz przynajmniej jeden element do zmiany nazwy", "fd_emore": "wybierz przynajmniej jeden element...
fim
9001/copyparty
javascript
<|fim_suffix|> de «{1}»\n<code>ESC</code> = Enviar {2} arquivos do seu dispositivo', "fcp_both_m": '<h6>escolha o que colar</h6><code>Enter</code> = Copiar {0} arquivos de «{1}»\n<code>ESC</code> = Enviar {2} arquivos do seu dispositivo', "fp_both_b": '<a href="#" id="modal-ok">Mover</a><a href="#" id="modal-ng">Envi...
fim
9001/copyparty
javascript
<|fim_suffix|>: "нажмите <code>Enter/OK</code>, чтобы скопировать\nнажмите <code>ESC/Отмена</code>, чтобы закрыть", "frt_dec": "может исправить некоторые случаи с некорректными именами файлов\">декодировать url", "frt_rst": "сбросить изменённые имена обратно к оригинальным\">↺ сброс", "frt_abrt": "отменить операцию...
fim
9001/copyparty
javascript
<|fim_suffix|>iciste clic para acceder al servidor$N$Ndesactivar esto también evitará que la URL de la página se actualice con IDs de canción al reproducir música, para prevenir la reproducción automática si se pierden estos ajustes pero la URL permanece">a▶', "mt_preload": 'empezar a cargar la siguiente canción cerca...
fim
9001/copyparty
javascript
<|fim_suffix|>m>kan</em> denna mängd filer <a href=\"https://bugzilla.mozilla.org/show_bug.cgi?id=1790500\" target=\"_blank\">krascha Firefox!</a>\nom detta händer, vänligen försök igen (eller använd Chrome).", "u_up_life": "Denna uppladdning kommer att raderas från servern om\n{0} efter att den har blivit uppladdad",...
fim
9001/copyparty
javascript
<|fim_prefix|> // "//m" ile biten satırlar doğrulanmamış makine çevirileridir Ls.tur = { "tt": "Türkçe", "cols": { "c": "işlem butonları", "dur": "süre", "q": "kalite / bitrate", "Ac": "ses kodlaması", "Vc": "video kodlaması", "Fmt": "format / yapı", "Ahash": "ses denetim toplamı", "Vhash": "video d...
fim
9001/copyparty
javascript
<|fim_suffix|>я</a> для цього', "u_emtleakf": 'спробуйте наступне:\n<ul><li>натисніть <code>F5</code> для оновлення сторінки</li><li>потім увімкніть <code>🥔</code> (картопля) в UI завантаження<li>і спробуйте це завантаження знову</li></ul>\nPS: firefox <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1790500" ta...
fim
9001/copyparty
javascript
<|fim_prefix|>Ls.vie = { "tt": "Tiếng Việt", "cols": { "c": "nút hành động", "dur": "thời lượng", "q": "chất lượng / bitrate", "Ac": "codec âm thanh", "Vc": "codec video", "Fmt": "định dạng / container", "Ahash": "checksum âm thanh", "Vhash": "checksum video", "Res": "độ phân giải", "T": "loại tệ...
fim
9001/copyparty
javascript
<|fim_prefix|>"use strict"; var J_UTL = 1; if (!window.console || !console.log) window.console = { "log": function (msg) { } }; if (!Object.assign) Object.assign = function (a, b) { for (var k in b) a[k] = b[k]; }; if (window.CGV1) Object.assign(window, window.CGV1); ...
fim
9001/copyparty
javascript
<|fim_prefix|>"use strict"; function hex2u8(txt)<|fim_suffix|> return; importScripts('deps/sha512.hw.js'); console.log('using fallback hasher'); } var reader = null, gc1, gc2, gc3, busy = false; onmessage = (d) => { if (d.data == 'nosubtle') return load_fb(); if (d.data == 'pi...
fim
9001/copyparty
javascript
<|fim_suffix|> nchunks = math.ceil(filesize * 1.0 / chunksize) if nchunks <= 256 or (chunksize >= 32 * 1024 * 1024 and nchunks <= 4096): return chunksize chunksize += stepsize stepsize *= mul def main(): prev = 1048576 n = n0 = 524288 while True: ...
fim
9001/copyparty
python
<|fim_suffix|> print("{:4x} [{}]".format(v, chr(v))) <|fim_prefix|>v = "U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD" for v in v.split(","): if "+" in v: v = v.split("+")[1] if "-" in v: ...
fim
9001/copyparty
python
#!/usr/bin/env python3 # author: @chinponya import argparse import json from pathlib import Path from urllib.parse import urlparse, parse_qsl def read_json(path): return json.loads(path.read_text()) def get_prism_version(prism_path): package_json_path = prism_path / "package.json" package_json = read...
fim
9001/copyparty
python
<|fim_prefix|>#!/usr/bin/env python3 impor<|fim_suffix|>.descent = round(base_desc * mul) # font["OS/2"].usWinAscent = round(base_asc * mul) font["OS/2"].usWinDescent = round(font["OS/2"].usWinDescent * 1.1) font["OS/2"].sTypoDescender = round(font["OS/2"].sTypoDescender * 1.1) try: del font["...
fim
9001/copyparty
python
// just the signatures from the original file; all bodies/logic removed #include <stdint.h> #include "libavutil/common.h" #include "libavutil/mathematics.h" #include "libavutil/mem_internal.h" #include "aacps.h" #if USE_FIXED #include "aacps_fixed_tablegen.h" #else #include "libavutil/internal.h" #include "aacps_table...
fim
9001/copyparty
c
<|fim_prefix|>// just the signatures from the original file; all bodies/logic removed #define USE_FIXED 0 #include "aac.h" #include "sbr.h" #include "aacsbr.h" #include "aacsbrdata.<|fim_suffix|> "libavutil/libm.h" #include "libavutil/avassert.h" #include "libavutil/mem_internal.h" #include <stdint.h> #include <floa...
fim
9001/copyparty
c
<|fim_suffix|>atic void sbr_gain_calc(SpectralBandReplication *sbr, SBRData *ch_data, const int e_a[2]) {} static void sbr_hf_assemble(int Y1[38][64][2], const int X_high[64][40][2], SpectralBandReplication *sbr, SBRData *ch_data, const int e_a[2]) {} #include "aacsbr_template.c" <|fim_prefix|>// just...
fim
9001/copyparty
c
<|fim_prefix|>// just the signatures from the original file; all bodies/logic removed #ifndef AVCODEC_AACSBRDATA_H #define AVCODEC_AACSBRDATA_H #include <stdint.h> #include "libav<|fim_suffix|>" static const int8_t sbr_offset[6][16] = {}; static const DECLARE_ALIGNED(32, INTFLOAT, sbr_qmf_window_ds)[320] = {}; sta...
fim
9001/copyparty
c
<|fim_prefix|>#!/usr/bin/env python3 import os import time """ td=/dev/shm/; [ -e $td ] || td=$HOME; mkdir -p $td/fusefuzz/{r,v} PYTHONPATH=.. python3 -m copyparty -v $td/fusefuzz/r::r -i 127.0.0.1 ../bin/partyfuse.py http://127.0.0.1:3923/ $td/fusefuzz/v -cf 2 -cd 0.5 (d="$PWD"; cd $td/fusefuzz && "$d"/fusefuzz.py) ...
fim
9001/copyparty
python
<|fim_suffix|>ot_13") s = "\n--- %s ---\n\n%s" % (lic, s) ret.extend(s.split("\n")) for n, ln in enumerate(ret): if not ln.startswith("--- "): continue pad = " " * ((80 - len(ln)) // 2) ln = "%s\033[07m%s\033[0m" % (pad, ln) ret[n] = ln ret.append("") ret.append("") with open(...
fim
9001/copyparty
python
<|fim_suffix|> in_name = 0 in_cores = 0 in_hash_mt = False in_th_ram_max = 0 while True: ln = next(src) if "<font" in ln or "<span" in ln: if not ln.startswith("<pre>"): ln = "<pre>" + ln yield ln break for ln in src: l...
fim
9001/copyparty
python
<|fim_suffix|>b = codecs.encode(s, "rot_13").encode("utf-8") with open(fn.replace("txt", "r13"), "wb") as f: f.write(b) <|fim_prefix|>#!/usr/bin/env python3 import os, codecs for fn in os.listdir("."): if not fn.endswith(".txt"): continue with open(fn, "rb<|fim_middle|>") as f: s =...
fim
9001/copyparty
python
<|fim_prefix|>#!/usr/bin/env python3 import sys sys.path.insert(0, ".") cmd = sys.argv[1] if cmd == "cpp": from copyparty.__main__ import main argv = ["__main__", "-vsrv::r:c,e2ds,e2ts"] main(argv=argv) elif cmd == "test": from unittest import main argv = ["__main__", "dis<|fim_suffix|>.dis(ma...
fim
9001/copyparty
python
<|fim_suffix|>rals from Queue import Queue, LifoQueue, PriorityQueue, Empty, Full <|fim_prefix|># coding: utf-8 from __future__ import print_functi<|fim_middle|>on, unicode_lite<|endoftext|>
fim
9001/copyparty
python
# coding: utf-8 import base64 import hashlib import os import re import shutil import subprocess as sp import sys import traceback v = r""" this 32-bit copyparty.exe is compatible with Windows7-SP1 and later. To make this possible, the EXE was compiled with Python 3.7.9, which is EOL and does not receive security pa...
fim
9001/copyparty
python
<|fim_suffix|> def main(): if "--versionb" in sys.argv: return print(VER) sysver = str(sys.version).replace("\n", "\n" + " " * 18) pktime = time.strftime("%Y-%m-%d, %H:%M:%S", time.gmtime(STAMP)) msg() msg(" this is: copyparty", VER) msg(" packed at:", pktime, "UTC,", STAMP) msg(...
fim
9001/copyparty
python
<|fim_prefix|>#!/usr/bin/env python3 import os import sys import stat import time import signal import traceback import threading from queue import Queue """speedtest-fs: filesystem performance estimate""" __author__ = "ed <copyparty@ocv.me>" __copyright__ = 2020 __license__ = "MIT" __url__ = "https://github.com/900...
fim
9001/copyparty
python
<|fim_prefix|># coding: utf-8 from __future__ import print_function, unicode_literals import os import sys from strip_hints import strip_file_to_string # list unique types used in hints: # rm -rf unt && cp -pR copyparty unt && (cd unt && python3 ../scripts/strip_hints/a.py) # diff -wNarU1 copyparty unt | grep -E '^\...
fim
9001/copyparty
python
<|fim_suffix|> with open("hit-%s.txt" % (time.time()), "w", encoding="utf-8") as f: f.write(url) raise Exception("HIT! {}".format(url)) def main(): ubase = sys.argv[1] port = int(sys.argv[2]) ntot = int(sys.argv[3]) nth = int(sys.argv[4]) for wlen in range(2...
fim
9001/copyparty
python
<|fim_prefix|>#!/usr/bin/env python3 import os import sys import time import json import threading import http.client class Conn(object): def __init__(self, ip, port): self.s = http.client.HTTPConnection(ip, port, timeout=260) self.st = [] def get(self, vpath): self.st = [time.time()...
fim
9001/copyparty
python
<|fim_suffix|>v libx264 -tune animation -preset veryslow -crf 69" sp.check_call(cmd.split(" ") + [vidp]) with open(vidp, "rb") as f: ovid = f.read() args = [ "-q", "-j0", "-p4321", "-e2dsa", "-e2tsr", "--wram", "--ban-403=no", "--...
fim
9001/copyparty
python
<|fim_suffix|>ro": 'your access to this folder is Read-Only\n\n', "ue_nl": 'you are currently not logged in', "ue_la": 'you are currently logged in as "{0}"', "ue_sr": 'you are currently in file-search mode\n\nswitch to upload-mode by clicking the magnifying glass 🔎 (next to the big SEARCH button), and try uploadin...
fim
9001/copyparty
javascript
<|fim_prefix|>#!/usr/bin/env python3 import os import sys """ generates a "tl.js" which can be used to prototype a new translation without having to run from source, or tamper with the files that are extracted from the sfx to generate a tl.js for the language you are translating to, run the following command: pytho...
fim
9001/copyparty
python
<|fim_prefix|>#!/usr/bin/env python3 # coding: utf-8 from __future__ import print_function, unicode_literals import io import os import sys import tokenize try: FSTRING_MIDDLE = tokenize.FSTRING_MIDDLE except: FSTRING_MIDDLE = -9001 def uncomment(fpath): """modified https://stackoverflow.com/a/62074206...
fim
9001/copyparty
python
<|fim_suffix|>errupt: pass except: confirm(0) if __name__ == "__main__": main() <|fim_prefix|>#!/usr/bin/env python3 import sys import time import traceback VER = None STAMP = None WINDOWS = sys.platform in ["win32", "msys"] def msg(*a, **ka): if a: a = ["[ZIP]", a[0]] + list(...
fim
9001/copyparty
python
#!/usr/bin/env python3 # coding: utf-8 from __future__ import print_function import os import sys from shutil import rmtree from setuptools import setup, Command _ = """ this probably still works but is no longer in use; pyproject.toml and scripts/make-pypi-release.sh are in charge of packaging wheels now """ NAME =...
fim
9001/copyparty
python
<|fim_prefix|>#!/usr/bin/env python3 import itertools import re import sys import time from copyparty.authsrv import AuthSrv from copyparty.httpcli import HttpCli from . import util as tu from .util import Cfg atlas = ["%", "25", "2e", "2f", ".", "/"] def nolog(*a, **ka): pass def hdr(query): h = "GET /...
fim
9001/copyparty
python
<|fim_suffix|>ts.Stats(log_fn) p.sort_stats(pstats.SortKey.CUMULATIVE).print_stats(64) """ python3.9 tests/run.py cprofile -v tests/test_httpcli.py python3.9 -m pip install --user vmprof python3.9 -m vmprof --lines -o vmprof.log tests/run.py vmprof -v tests/test_httpcli.py """ <|fim_prefix|>#!/usr/bin/env python...
fim
9001/copyparty
python
<|fim_suffix|>inf": True} if dedup == "hard": ka["hardlink"] = True elif dedup == "no": ka["no_dedup"] = True self.args = Cfg(v=vols, a=[], **ka) self.reset() self.cinit() self.do_cp(action) zs = self.p...
fim
9001/copyparty
python
<|fim_suffix|> return sfn def handshake(self, dn, fn, fi, replace=False): hdr = "POST /%s/ HTTP/1.1\r\nConnection: close\r\nContent-Type: text/plain\r\nContent-Length: %d\r\n\r\n" msg = {"name": fn, "size": 3, "lmod": 1234567890, "life": 0, "hash": [fi[1]]} if replace: msg["rep...
fim
9001/copyparty
python
<|fim_suffix|>(url + "x&ls", "u2")[1]) def tardir(self, url, uname): top = url.split("?")[0] top = ("top" if not top else top.lstrip(".").split("/")[0]) + "/" url += ("&" if "?" in url else "?") + "tar" h, b = self.curl(url, uname, True) tar = tarfile.open(fileobj=io.BytesIO...
fim
9001/copyparty
python
<|fim_prefix|>#!/usr/bin/env python3 # coding: utf-8 from __future__ import print_function, unicode_literals import re import unittest from xml.etree import ElementTree as ET from copyparty.dxml import BadXML, mkenod, mktnod, parse_xml ET.register_namespace("D", "DAV:") def _parse(txt): try: parse_xml(...
fim
9001/copyparty
python
<|fim_suffix|>8").split("\r\n\r\n", 1) print("PUT <--", ret) return ret def bup(self, url): hdr = "POST /%s HTTP/1.1\r\nPW: o\r\nConnection: close\r\nContent-Type: multipart/form-data; boundary=XD\r\nContent-Length: %d\r\n\r\n" bdy = '--XD\r\nContent-Disposition: form-data; name="ac...
fim
9001/copyparty
python
<|fim_prefix|>#!/usr/bin/env python3 # coding: utf-8 from __future__ import print_function, unicode_literals import io import os import pprint import shutil import tarfile import tempfile import time import unittest import zipfile from copyparty.authsrv import AuthSrv from copyparty.httpcli import HttpCli from tests ...
fim
9001/copyparty
python
<|fim_suffix|>p() au = AuthSrv(Cfg(c=[cfgdir + "/4.conf"], **xcfg), self.log) self.assertEqual(au.vfs.vpath, "") self.assertApEq(au.vfs.realpath, "") self.assertNodes(au.vfs, ["vu"]) self.assertNodesAt(au, "vu", ["ua", "ub"]) self.assertAxs(au.vfs.axs, []) self.a...
fim
9001/copyparty
python
<|fim_suffix|>nn.s._reply.decode("utf-8").split("\r\n\r\n", 1) def log(self, src, msg, c=0): print(msg) <|fim_prefix|>#!/usr/bin/env python3 # coding: utf-8 from __future__ import print_function, unicode_literals import os import re import shutil import tempfile import unittest from copyparty.__init__ im...
fim
9001/copyparty
python
<|fim_suffix|> print("\n# do_post", self.ctr, repr((dn, fn, fi, first))) self.ctr -= 1 data, chash, wark = fi hs = self.handshake(dn, fn, fi) self.assertEqual(hs["wark"], wark) sfn = hs["name"] if sfn == fn: print("using original name " + fn) else...
fim
9001/copyparty
python
<|fim_prefix|>#!/usr/bin/env python3 # coding: utf-8 from __future__ import print_function, unicode_literals import json import os import shutil import sqlite3 import tempfile import unittest from copyparty.__init__ import ANYWIN from copyparty.authsrv import AuthSrv from copyparty.httpcli import HttpCli from copypar...
fim
9001/copyparty
python
<|fim_prefix|>#!/usr/bin/env python3 # coding: utf-8 from __future__ import print_function, unicode_literals import unittest from copyparty.__main__ import PY2 from copyparty.util import w8enc from tests import util as tu <|fim_suffix|> PY2: raise unittest.SkipTest() from urllib.parse import unqu...
fim
9001/copyparty
python
<|fim_prefix|>#!/usr/bin/env python3 # coding: utf-8 from __future__ import print_function, unicode_literals import json import os import shutil import tempfile import unittest from copyparty import util from copyparty.authsrv import VFS, AuthSrv from tests import util as tu from tests.util import Cfg class TestVFS...
fim
9001/copyparty
python
<|fim_suffix|> self.assertListEqual(fns, ["/a/", "/a/" + self.fn]) # toplevel of a volume; has one file h, b = self.req(RCLONE_PROPFIND % ("r",)) fns = pfind2ls(b) self.assertStart("HTTP/1.1 207 Multi-Status\r", h) self.assertListEqual(fns, ["/r/", "/r/" + self.fn]) #...
fim
9001/copyparty
python
<|fim_prefix|>#!/usr/bin/env python3 # coding: utf-8 from __future__ import print_function, unicode_literals import os import random import re import shutil import socket import subprocess as sp import sys import tempfile import threading import time import unittest from argparse import Namespace import jinja2 from ...
fim
9001/copyparty
python
<|fim_prefix|>/* * Copyright 2022 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Licens<|fim_suffix|>ef +(other: Int): CltvExpiryDelta = CltvExpiryDelta(underlying + other) def +(other: CltvExpiryDelta): CltvExpiryDelta = Clt...
fim
ACINQ/eclair
scala
<|fim_suffix|>es) case Failure(_) => throw IncompatibleNetworkDBException } } <|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * ...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|>ring } /** * Wallet nodes are not part of the public graph, and may not have channels yet. * Wallet providers are usually able to contact such nodes using push notifications or similar mechanisms. */ case class Wallet(publicKey: PublicKey) extends WithPublicKey { override def toStri...
fim
ACINQ/eclair
scala
<|fim_suffix|>sg) } finally { diagLog.clearMDC() } } <|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/l...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance<|fim_suffix|>satoshi(millibtc2satoshi(millis)) case bitcoin: Btc => satoshi2millisatoshi(btc2satoshi(bitcoin)) } } <|fim_middle|> with the License. ...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
/* * Copyright 2022 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
fim
ACINQ/eclair
scala
<|fim_suffix|>nguage governing permissions and * limitations under the License. */ package fr.acinq.eclair import kamon.metric.Timer import scala.concurrent.{ExecutionContext, Future} object KamonExt { def time[T](timer: Timer)(f: => T): T = { val started = timer.start() try { f } finally { ...
fim
ACINQ/eclair
scala
<|fim_suffix|>in interactive-tx. * This can be used for example to reject interactive transactions that send to specific addresses before signing them. */ trait ValidateInteractiveTxPlugin extends PluginParams { /** * This function will be called for every interactive-tx, before signing it. The plugin should ret...
fim
ACINQ/eclair
scala
<|fim_suffix|>o port $port")<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
fim
ACINQ/eclair
scala
<|fim_suffix|>db.peers, nodeParams.peerStorageConfig)).onFailure(typed.SupervisorStrategy.restart), name = "peer-storage-cleaner") } dbEventHandler = system.actorOf(SimpleSupervisor.props(DbEventHandler.props(nodeParams), "db-event-handler", SupervisorStrategy.Resume)) register = system.actorOf(Simple...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl<|fim_suffix...
fim
ACINQ/eclair
scala
<|fim_suffix|> override val supervisorStrategy = OneForOneStrategy(loggingEnabled = false, maxNrOfRetries = 100, withinTimeRange = 1 minute) { case t => // log this as silent errors are dangerous log.error(t, s"supervisor caught error for child=$childName strategy=$strategy ") strategy } } obje...
fim
ACINQ/eclair
scala
package fr.acinq.eclair import fr.acinq.bitcoin.scalacompat.Crypto.PublicKey import fr.acinq.bitcoin.scalacompat.Musig2.{IndividualNonce, LocalNonce} import fr.acinq.bitcoin.scalacompat.{DeterministicWallet, Musig2, OutPoint, Satoshi, SatoshiLong, Script, ScriptWitness, Transaction, TxIn, TxOut, addressToPublicKeyScri...
fim
ACINQ/eclair
scala
<|fim_prefix|>package fr.acinq.eclair /** * Since actors are initialized asynchronously, and the initialization sometimes involves subscribing to an * [[akka.event.EventStream]], we don't know when they are ready to process messages, especially in tests, which * leads to race conditions. * By making actors publish...
fim
ACINQ/eclair
scala
<|fim_suffix|>12/9999 (prevents overflow when converting to sql timestamps) def now(): TimestampMilli = TimestampMilli(System.currentTimeMillis()) def fromSqlTimestamp(sqlTs: sql.Timestamp): TimestampMilli = TimestampMilli(sqlTs.getTime) // @formatter:on }<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * License...
fim
ACINQ/eclair
scala