repo_full_name
stringlengths
6
93
repo_url
stringlengths
25
112
repo_api_url
stringclasses
28 values
owner
stringclasses
28 values
repo_name
stringclasses
28 values
description
stringclasses
28 values
stars
int64
617
98.8k
forks
int64
31
355
watchers
int64
990
999
license
stringclasses
2 values
default_branch
stringclasses
2 values
repo_created_at
timestamp[s]date
2012-07-24 23:12:50
2025-06-16 08:07:28
repo_updated_at
timestamp[s]date
2026-02-23 15:23:15
2026-05-03 18:52:12
repo_topics
listlengths
0
13
repo_languages
unknown
is_fork
bool
1 class
open_issues
int64
3
104
file_path
stringlengths
3
208
file_name
stringclasses
509 values
file_extension
stringclasses
1 value
file_size_bytes
int64
101
84k
file_url
stringclasses
627 values
file_raw_url
stringclasses
627 values
file_sha
stringclasses
624 values
language
stringclasses
8 values
parsed_at
stringdate
2026-05-04 01:12:36
2026-05-04 19:41:55
text
stringlengths
100
102k
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/107747_Ordered_Dictionary/recipe-107747.py
null
null
null
null
null
null
Python
2026-05-04T01:43:38.219961
from UserDict import UserDict class odict(UserDict): def __init__(self, dict = None): self._keys = [] UserDict.__init__(self, dict) def __delitem__(self, key): UserDict.__delitem__(self, key) self._keys.remove(key) def __setitem__(self, key, item): UserDict.__setit...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/108287_driving_gnuplot_popen/recipe-108287.py
null
null
null
null
null
null
Python
2026-05-04T01:43:38.436738
import os f=os.popen('gnuplot', 'w') print >>f, "set yrange[-300:+300]" for n in range(300): print >>f, "plot %i*cos(x)+%i*log(x+10)" % (n,150-n) f.flush()
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/108598_py2exe_compiler/recipe-108598.py
null
null
null
null
null
null
Python
2026-05-04T01:43:38.734771
from distutils.core import setup import sys, os, py2exe name = sys.argv[1] sys.argv[1] = 'py2exe' sys.path.append(os.path.dirname(os.path.abspath(name))) setup(name=name[:-3], scripts=[name])
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/109357_Discover_exchange_active/recipe-109357.py
null
null
null
null
null
null
Python
2026-05-04T01:43:38.769323
import win32com,win32com.client,pythoncom import time,os,string def code_tup(l=''): return string.join(l,"','") #get base LDAP string ldap_loc=win32com.client.GetObject('LDAP://rootDSE').Get("defaultNamingContext") print 'Found the following:' print '\tbase ldap string: ',ldap_loc #get exchange site ldap_e...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/110061_Delphilike_property_class/recipe-110061.py
null
null
null
null
null
null
Python
2026-05-04T01:43:38.810045
# "Extended" property class that implements Delphi property logic. # Its constructor accepts attribute names as well as functions # for a getter or/and setter parameters thus allowing "direct" # access to underlying "real" attribute without additional coding. class xproperty(property): def __init__(self, fget=None...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/110885_FileSet__case_insensitive_but_case_preserving/recipe-110885.py
null
null
null
null
null
null
Python
2026-05-04T01:43:38.840662
class FileSet: def __init__(self, *args): self._dict = {} for arg in args: self.add(arg) def __repr__(self): return "<FileSet %s at %x>" % (self._dict.values(), id(self)) def add(self, file): self._dict[string.upper(file)] = file def remove(self, file): ...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/111286_Numeric_base_converter_that_accepts_arbitrary/recipe-111286.py
null
null
null
null
null
null
Python
2026-05-04T01:43:39.061426
BASE2 = "01" BASE10 = "0123456789" BASE16 = "0123456789ABCDEF" BASE62 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz" def baseconvert(number,fromdigits,todigits): """ converts a "number" between two bases of arbitrary digits The input number is assumed to be a string of digits from the ...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/111969_Blender/recipe-111969.py
null
null
null
null
null
null
Python
2026-05-04T01:43:39.325938
import types class Blender: """blends values into the given pattern.replace if neither values nor pattern are defined a default pattern is being created that prints the values of the instance in the format [name1: value1, name2 = value2, ...] """ def __init__(self, pattern = No...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/111971_Format_version_numbers/recipe-111971.py
null
null
null
null
null
null
Python
2026-05-04T01:43:39.408942
def StringVersion( seq ): return '.'.join( ['%s'] * len( seq )) % tuple( seq ) def TupleVersion( str ): return map( int, str.split( '.' ))
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/112506_fileinput_as_a_generator/recipe-112506.py
null
null
null
null
null
null
Python
2026-05-04T01:43:39.430434
from __future__ import generators """Provides a class called LineIterator that iterates over every line in a list of files. Performing the basic functionality as fileinput module in the standard library (which mimics Perl's <> operator). Basically acts as a simple and methodical way to iterate over every line in a ...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/112546_printf_in_a_single_lambda/recipe-112546.py
null
null
null
null
null
null
Python
2026-05-04T01:43:39.431694
import sys printf = lambda fmt,*args: sys.stdout.write(fmt%args) printf ("This is a %s of %is of possibilities of %s","test",1000,printf)
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/113408_Automatic_unittesting__pretestpy/recipe-113408.py
null
null
null
null
null
null
Python
2026-05-04T01:43:39.654163
# pretest.py """ Usage: To execute your tests each time your module is compiled, add this line at the end of your module. Be sure to edit pretest to call your favorite test runner in place of microtest.test. pretest.pretest('mymodule') """ import os import microtest import sys def pretest(modulename, verbose=None, ...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/113645_Classmethod/recipe-113645.py
null
null
null
null
null
null
Python
2026-05-04T01:43:39.926335
# junk.py def classmethod(method): '''Impulate py2.2 classmethod function. -> class method''' return lambda self, *args, **dict: method(self.__class__, *args, **dict) class Foo: def bar(klass): print 'In', klass, 'bar()' bar = classmethod(bar) Foo().bar() output = ''' In junk.Foo bar() '''
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/113657_classmethod/recipe-113657.py
null
null
null
null
null
null
Python
2026-05-04T01:43:40.004641
def classmethod(method): return lambda self, *args, **dict: method(self.__class__, *args, **dict) class Singleton: count = 0 def __init__(klass): klass.count += 1 print klass, klass.count __init__ = classmethod(__init__) def __getattr__(klass, name): return getattr(klass, n...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/113799_bit_field_manipulation/recipe-113799.py
null
null
null
null
null
null
Python
2026-05-04T01:43:40.011510
# # bitfield manipulation # class bf(object): def __init__(self,value=0): self._d = value def __getitem__(self, index): return (self._d >> index) & 1 def __setitem__(self,index,value): value = (value&1L)<<index mask = (1L)<<index self._d = (self._d & ~mask...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/114216_TexttoSpeech/recipe-114216.py
null
null
null
null
null
null
Python
2026-05-04T01:43:40.012850
# speak.py # # Repeats what user types. # # Make sure you have MS Speech SDK installed # and registered with the MakePy tool in PythonWin. # import sys from win32com.client import constants import win32com.client speaker = win32com.client.Dispatch("SAPI.SpVoice") print "Type word or phrase, then enter." print "Ctrl+Z ...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/114217_Multisegment_Fast_File/recipe-114217.py
null
null
null
null
null
null
Python
2026-05-04T01:43:40.227360
# mget.py # # by Nelson Rush # # MIT/X license. # # A simple program to download files in segments. # # - Fixes by David Loaiza for Python 2.5 added. # - Nelson added fixes to bring the code to 2.7 and add portability between Windows/Linux. # - The output of segment information has been corrected and cleaned up. # - In...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/114579_remotely_exit_XMLRPC_Server/recipe-114579.py
null
null
null
null
null
null
Python
2026-05-04T01:43:40.526466
from SimpleXMLRPCServer import * class MyServer(SimpleXMLRPCServer): def serve_forever(self): self.quit = 0 while not self.quit: self.handle_request() def kill(): server.quit = 1 return 1 server = MyServer(('127.0.0.1', 8000)) server.register_function(kill) server.serve_forever()
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/114644_scheduler/recipe-114644.py
null
null
null
null
null
null
Python
2026-05-04T01:43:40.593409
import time import threading class Task( threading.Thread ): def __init__( self, action, loopdelay, initdelay ): self._action = action self._loopdelay = loopdelay self._initdelay = initdelay self._running = 1 threading.Thread.__init__( self ) def __repr__( self ): ...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/114643_wxKoch/recipe-114643.py
null
null
null
null
null
null
Python
2026-05-04T01:43:40.606733
#!/usr/bin/env python """ wxKoch.py for wxPython/wxWindows 2 by Simon Foster, November 2001 based on wxKoch0.cpp by Martin Bernreuther, Jan 2000 """ from time import time import math import cPickle import zlib from wxPython.wx import * [ ID_Quit, ID_About, ID_InpLevel ] = range(3) ABOUT_TEXT = """\ Koch Snowflake f...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/114642_Pinhole/recipe-114642.py
null
null
null
null
null
null
Python
2026-05-04T01:43:40.635435
""" usage 'pinhole port host [newport]' Pinhole forwards the port to the host specified. The optional newport parameter may be used to redirect to a different port. eg. pinhole 80 webserver Forward all incoming WWW sessions to webserver. pinhole 23 localhost 2323 Forward all telnet sessions to port 2323 ...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/114645_wserve/recipe-114645.py
null
null
null
null
null
null
Python
2026-05-04T01:43:40.850779
#! /usr/bin/env python import sys import time import random from socket import * cardinal = [ 'N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW' ] template = """\ HTTP/1.0 200 Content-type : text/html <html> <head> <title>Simon's weather station</title> </head> <body> <p><h1>Today's Weather</h1...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/115417_Subset_of_a_dictionary/recipe-115417.py
null
null
null
null
null
null
Python
2026-05-04T01:43:41.159540
extract = lambda keys, dict: reduce(lambda x, y: x.update({y[0]:y[1]}) or x, map(None, keys, map(dict.get, keys)), {})
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/115418_OpenGL_TTF_TrueType_Font_FPS_Frames_Per_Second/recipe-115418.py
null
null
null
null
null
null
Python
2026-05-04T01:43:41.170402
""" font.py -- Displays FPS in OpenGL using TrueType fonts. Copyright (c) 2002. Nelson Rush. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restr...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/115419_adduserloginpasswduserdel_not_posix_password_db_/recipe-115419.py
null
null
null
null
null
null
Python
2026-05-04T01:43:41.218145
# These are multiple .py files that can be used # to access the password file. # adduser.py adds a login/password to the database # login.py attempts to login using a supplied l/p # passwd.py allows the user to change his password # userdel.py allows user to delete him/her self # # #----cut here----# is where the file ...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/115421_Date_difference/recipe-115421.py
null
null
null
null
null
null
Python
2026-05-04T01:43:41.229700
# cal.py # # This code has been released to the Public Domain. # # finds the number of days between two particular dates # from string import * FALSE,TRUE = range(2) # Standard number of days for each month. months = (31,28,31,30,31,30,31,31,30,31,30,31) JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC = range(len(mo...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/115875_Controlling_Windows_Services/recipe-115875.py
null
null
null
null
null
null
Python
2026-05-04T01:43:41.398644
""" Module for manipulating WinNT, Win2k & WinXP services. Requires the win32all package which can be retrieved from => http://starship.python.net/crew/mhammond """ import sys, time import win32api as wa, win32con as wc, win32service as ws class WService: """ The WService Class is used for controlling WinNT, W...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/115947_Refining_an_FTP_Site_List/recipe-115947.py
null
null
null
null
null
null
Python
2026-05-04T01:43:41.773032
import socket from ftplib import FTP true, false = 1, 0 def isFTPSiteUp(site): try: FTP(site).quit() except(socket.error): return false return true def refineFTPList(list): new_list = [] for site in list: if isFTPSiteUp(site): new_list.append(site) return new_list sites = ['ftp.cdro...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/116539_turn_structure_XMLdocument/recipe-116539.py
null
null
null
null
null
null
Python
2026-05-04T01:43:41.796958
================================================== xmlreader.py: ================================================== from xml.dom.minidom import parse class NotTextNodeError: pass def getTextFromNode(node): """ scans through all children of node and gathers the text. if node has non-text child-nodes,...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/105873_Walk_directory_tree_using/recipe-105873.py
null
null
null
null
null
null
Python
2026-05-04T01:43:41.809360
from __future__ import generators import os def dirwalk(dir): "walk a directory tree, using a generator" for f in os.listdir(dir): fullpath = os.path.join(dir,f) if os.path.isdir(fullpath) and not os.path.islink(fullpath): for x in dirwalk(fullpath): # recurse into subdir ...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/104801_Use_ADO_list_field_definitions/recipe-104801.py
null
null
null
null
null
null
Python
2026-05-04T01:43:41.809886
"""Demonstrate using ADO to get database table definitions. A PostgreSQL create script is generated. Author: Craig H. Anderson craigha@attbi.com """ __version__ = "$Revision: 1.11 $" __source__ = "$Header: /home/cvsroot/home/craig/swCommunityMinistry/winPyTools/adoTableDef.py,v 1.11 2001/12/28 22:40:17 craig Exp $" ...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/106033_Deep_list_convert_nested/recipe-106033.py
null
null
null
null
null
null
Python
2026-05-04T01:43:41.829760
def deep_list(x): """fully copies trees of tuples to a tree of lists. deep_list( (1,2,(3,4)) ) returns [1,2,[3,4]]""" if type(x)!=type( () ): return x return map(deep_list,x)
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/105962_Permutations_using_generators/recipe-105962.py
null
null
null
null
null
null
Python
2026-05-04T01:43:41.830296
def permIter(seq): """Given some sequence 'seq', returns an iterator that gives all permutations of that sequence.""" ## Base case if len(seq) == 1: yield(seq[0]) raise StopIteration ## Inductive case for i in range(len(seq)): element_slice = seq[i:i+1] rest_iter...
ActiveState/code
https://github.com/ActiveState/code
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
recipes/Python/106131_DBAttrib/recipe-106131.py
null
null
null
null
null
null
Python
2026-05-04T01:43:41.869228
import dbi,odbc class DBCore: """Basic DB access.""" def __init__(self,dbname): self._DB = odbc.odbc(dbname) self._cur = self._DB.cursor() def executeUpdate(self,sql,*parms): self._cur.execute(sql,*parms) def executeQuery(self,sql,*parms,**kws): strip = 0 try:...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/backend.py
null
null
null
null
null
null
Python
2026-05-04T01:43:44.590535
import logging import threading from seleniumwire.server import MitmProxy log = logging.getLogger(__name__) def create(addr='127.0.0.1', port=0, options=None): """Create a new proxy backend. Args: addr: The address the proxy server will listen on. Default 127.0.0.1. port: The port the proxy...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/har.py
null
null
null
null
null
null
Python
2026-05-04T01:43:44.596324
"""Handles generation of HAR archives. This code has been taken from the har_dump.py addon in the mitmproxy project. """ import base64 import json from datetime import datetime, timezone from typing import List, Set import seleniumwire from seleniumwire.thirdparty.mitmproxy import connections from seleniumwire.thirdp...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/inspect.py
null
null
null
null
null
null
Python
2026-05-04T01:43:44.600522
import inspect import time from typing import Iterator, List, Optional, Union from selenium.common.exceptions import TimeoutException from seleniumwire import har from seleniumwire.request import Request class InspectRequestsMixin: """Mixin class that provides functions to inspect and modify browser requests.""...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/storage.py
null
null
null
null
null
null
Python
2026-05-04T01:43:44.601991
import logging import os import pickle import re import shutil import sys import tempfile import threading import uuid from collections import OrderedDict, defaultdict from datetime import datetime, timedelta from typing import DefaultDict, Iterator, List, Optional, Union from seleniumwire.request import Request, Resp...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/modifier.py
null
null
null
null
null
null
Python
2026-05-04T01:43:44.610758
import re import threading from urllib.parse import parse_qs, urlencode, urlsplit, urlunsplit from seleniumwire.utils import is_list_alike class RequestModifier: """This class is responsible for modifying request and response attributes. DEPRECATED. Use request and response interceptors instead. Instan...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/__main__.py
null
null
null
null
null
null
Python
2026-05-04T01:43:44.631092
import argparse import logging import signal from argparse import RawDescriptionHelpFormatter from seleniumwire import backend, utils logging.basicConfig(level=logging.DEBUG, format='%(message)s') def standalone_proxy(port=0, addr='127.0.0.1'): b = backend.create( port=int(port), addr=addr, ...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/server.py
null
null
null
null
null
null
Python
2026-05-04T01:43:44.660578
import asyncio import logging from seleniumwire import storage from seleniumwire.handler import InterceptRequestHandler from seleniumwire.modifier import RequestModifier from seleniumwire.thirdparty.mitmproxy import addons from seleniumwire.thirdparty.mitmproxy.master import Master from seleniumwire.thirdparty.mitmpro...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:43:44.692832
# -*- coding: utf-8 -*- """Top-level package for Selenium Wire.""" __author__ = """Will Keeling""" __version__ = '5.1.0'
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/handler.py
null
null
null
null
null
null
Python
2026-05-04T01:43:44.696732
import logging import re from datetime import datetime from seleniumwire import har from seleniumwire.request import Request, Response, WebSocketMessage from seleniumwire.thirdparty.mitmproxy.http import HTTPResponse from seleniumwire.thirdparty.mitmproxy.net import websockets from seleniumwire.thirdparty.mitmproxy.ne...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/request.py
null
null
null
null
null
null
Python
2026-05-04T01:43:44.702910
"""Houses the classes used to transfer request and response data between components. """ from datetime import datetime from http import HTTPStatus from http.client import HTTPMessage from typing import Dict, Iterable, List, Optional, Tuple, Union from urllib.parse import parse_qs, urlencode, urlsplit, urlunsplit clas...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/addons/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:43:45.213332
from seleniumwire.thirdparty.mitmproxy.addons import core from seleniumwire.thirdparty.mitmproxy.addons import streambodies from seleniumwire.thirdparty.mitmproxy.addons import upstream_auth def default_addons(): return [ core.Core(), streambodies.StreamBodies(), upstream_auth.UpstreamAuth...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/addonmanager.py
null
null
null
null
null
null
Python
2026-05-04T01:43:45.215861
import contextlib import pprint import sys import traceback import types import typing from seleniumwire.thirdparty.mitmproxy import controller, eventsequence, exceptions from seleniumwire.thirdparty.mitmproxy import flow from . import ctx def _get_name(itm): return getattr(itm, "name", itm.__class__.__name__.l...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/addons/streambodies.py
null
null
null
null
null
null
Python
2026-05-04T01:43:45.217358
import typing from seleniumwire.thirdparty.mitmproxy import ctx, exceptions from seleniumwire.thirdparty.mitmproxy.net.http import http1 from seleniumwire.thirdparty.mitmproxy.utils import human class StreamBodies: def __init__(self): self.max_size = None def load(self, loader): loader.add_o...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/addons/core.py
null
null
null
null
null
null
Python
2026-05-04T01:43:45.268521
import os import tempfile import typing from seleniumwire.thirdparty.mitmproxy import command, ctx, exceptions, optmanager, platform from seleniumwire.thirdparty.mitmproxy import flow from seleniumwire.thirdparty.mitmproxy.net import server_spec from seleniumwire.thirdparty.mitmproxy.net.http import status_codes from ...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/addons/upstream_auth.py
null
null
null
null
null
null
Python
2026-05-04T01:43:45.269120
import typing class UpstreamAuth: """ This addon handles authentication to systems upstream from us for the upstream proxy and reverse proxy mode. NOTE: due to timing issues, upstream authentication has been moved to the HTTPLayer. It seems that when running in a multi-threaded environment, t...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/certs.py
null
null
null
null
null
null
Python
2026-05-04T01:43:45.272350
import contextlib import datetime import ipaddress import os import ssl import sys import time import typing import OpenSSL from pyasn1.codec.der.decoder import decode from pyasn1.error import PyAsn1Error from pyasn1.type import char, constraint, namedtype, tag, univ from seleniumwire.thirdparty.mitmproxy.coretypes i...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/command.py
null
null
null
null
null
null
Python
2026-05-04T01:43:45.290386
""" This module manages and invokes typed commands. """ import functools import inspect import sys import textwrap import types import typing import seleniumwire.thirdparty.mitmproxy.types from seleniumwire.thirdparty.mitmproxy import exceptions from seleniumwire.thirdparty.mitmproxy import command_lexer from sele...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/command_lexer.py
null
null
null
null
null
null
Python
2026-05-04T01:43:45.291445
import ast import re import pyparsing # TODO: There is a lot of work to be done here. # The current implementation is written in a way that _any_ input is valid, # which does not make sense once things get more complex. PartialQuotedString = pyparsing.Regex( re.compile( r''' (["']) # start q...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/connections.py
null
null
null
null
null
null
Python
2026-05-04T01:43:45.786516
import os import time import typing import uuid import socket import socks from seleniumwire.thirdparty.mitmproxy import certs, exceptions, stateobject from seleniumwire.thirdparty.mitmproxy.net import tls, tcp from seleniumwire.thirdparty.mitmproxy.utils import human, strutils class ClientConnection(tcp.BaseHandle...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/contrib/kaitaistruct/exif.py
null
null
null
null
null
null
Python
2026-05-04T01:43:45.814842
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild import array import struct import zlib from enum import Enum from kaitaistruct import BytesIO, KaitaiStream, KaitaiStruct from kaitaistruct import __version__ as ks_version from pkg_resources import parse_version from ...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/contrib/kaitaistruct/exif_le.py
null
null
null
null
null
null
Python
2026-05-04T01:43:45.862304
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild from enum import Enum from kaitaistruct import BytesIO, KaitaiStream, KaitaiStruct from kaitaistruct import __version__ as ks_version from pkg_resources import parse_version if parse_version(ks_version) < parse_version...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/contrib/kaitaistruct/gif.py
null
null
null
null
null
null
Python
2026-05-04T01:43:45.891692
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild import array import struct import zlib from enum import Enum from kaitaistruct import BytesIO, KaitaiStream, KaitaiStruct from kaitaistruct import __version__ as ks_version from pkg_resources import parse_version if pa...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/contrib/kaitaistruct/jpeg.py
null
null
null
null
null
null
Python
2026-05-04T01:43:45.893931
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild import array import struct import zlib from enum import Enum from kaitaistruct import BytesIO, KaitaiStream, KaitaiStruct from kaitaistruct import __version__ as ks_version from pkg_resources import parse_version from ...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/contrib/kaitaistruct/ico.py
null
null
null
null
null
null
Python
2026-05-04T01:43:45.915912
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild import struct from kaitaistruct import BytesIO, KaitaiStream, KaitaiStruct from kaitaistruct import __version__ as ks_version from pkg_resources import parse_version if parse_version(ks_version) < parse_version('0.7'):...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/contrib/kaitaistruct/exif_be.py
null
null
null
null
null
null
Python
2026-05-04T01:43:45.974954
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild from enum import Enum from kaitaistruct import BytesIO, KaitaiStream, KaitaiStruct from kaitaistruct import __version__ as ks_version from pkg_resources import parse_version if parse_version(ks_version) < parse_version...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/contrib/kaitaistruct/google_protobuf.py
null
null
null
null
null
null
Python
2026-05-04T01:43:45.993643
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild from enum import Enum from kaitaistruct import BytesIO, KaitaiStream, KaitaiStruct from kaitaistruct import __version__ as ks_version from pkg_resources import parse_version from .vlq_base128_le import VlqBase128Le if...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/contrib/kaitaistruct/tls_client_hello.py
null
null
null
null
null
null
Python
2026-05-04T01:43:46.333448
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild import array import struct import zlib from enum import Enum from kaitaistruct import BytesIO, KaitaiStream, KaitaiStruct from kaitaistruct import __version__ as ks_version from pkg_resources import parse_version if pa...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/contrib/kaitaistruct/png.py
null
null
null
null
null
null
Python
2026-05-04T01:43:46.355540
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild import array import struct import zlib from enum import Enum from kaitaistruct import BytesIO, KaitaiStream, KaitaiStruct from kaitaistruct import __version__ as ks_version from pkg_resources import parse_version if pa...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/contrib/kaitaistruct/vlq_base128_le.py
null
null
null
null
null
null
Python
2026-05-04T01:43:46.415750
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild from kaitaistruct import BytesIO, KaitaiStream, KaitaiStruct from kaitaistruct import __version__ as ks_version from pkg_resources import parse_version if parse_version(ks_version) < parse_version('0.7'): raise Exce...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/contrib/wbxml/ASCommandResponse.py
null
null
null
null
null
null
Python
2026-05-04T01:43:46.439667
#!/usr/bin/env python3 ''' @author: David Shaw, shawd@vmware.com Inspired by EAS Inspector for Fiddler https://easinspectorforfiddler.codeplex.com ----- The MIT License (MIT) ----- Filename: ASCommandResponse.py Copyright (c) 2014, David P. Shaw Permission is hereby granted, free of charge, to any person obtaining ...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/contrib/wbxml/ASWBXML.py
null
null
null
null
null
null
Python
2026-05-04T01:43:46.457392
#!/usr/bin/env python3 ''' @author: David Shaw, shawd@vmware.com Inspired by EAS Inspector for Fiddler https://easinspectorforfiddler.codeplex.com ----- The MIT License (MIT) ----- Filename: ASWBXML.py Copyright (c) 2014, David P. Shaw Permission is hereby granted, free of charge, to any person obtaining a copy of ...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/contrib/wbxml/ASWBXMLCodePage.py
null
null
null
null
null
null
Python
2026-05-04T01:43:46.464583
#!/usr/bin/env python3 ''' @author: David Shaw, shawd@vmware.com Inspired by EAS Inspector for Fiddler https://easinspectorforfiddler.codeplex.com ----- The MIT License (MIT) ----- Filename: ASWBXMLCodePage.py Copyright (c) 2014, David P. Shaw Permission is hereby granted, free of charge, to any person obtaining a ...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/contrib/wbxml/ASWBXMLByteQueue.py
null
null
null
null
null
null
Python
2026-05-04T01:43:46.466210
#!/usr/bin/env python3 ''' @author: David Shaw, shawd@vmware.com Inspired by EAS Inspector for Fiddler https://easinspectorforfiddler.codeplex.com ----- The MIT License (MIT) ----- Filename: ASWBXMLByteQueue.py Copyright (c) 2014, David P. Shaw Permission is hereby granted, free of charge, to any person obtaining a ...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/contrib/wbxml/GlobalTokens.py
null
null
null
null
null
null
Python
2026-05-04T01:43:46.507269
#!/usr/bin/env python3 ''' @author: David Shaw, shawd@vmware.com Inspired by EAS Inspector for Fiddler https://easinspectorforfiddler.codeplex.com ----- The MIT License (MIT) ----- Filename: GlobalTokens.py Copyright (c) 2014, David P. Shaw Permission is hereby granted, free of charge, to any person obtaining a cop...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/contrib/wbxml/InvalidDataException.py
null
null
null
null
null
null
Python
2026-05-04T01:43:46.546258
#!/usr/bin/env python3 ''' @author: David Shaw, shawd@vmware.com Inspired by EAS Inspector for Fiddler https://easinspectorforfiddler.codeplex.com ----- The MIT License (MIT) ----- Filename: InvalidDataException.py Copyright (c) 2014, David P. Shaw Permission is hereby granted, free of charge, to any person obtaini...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/coretypes/basethread.py
null
null
null
null
null
null
Python
2026-05-04T01:43:47.256475
import threading import time class BaseThread(threading.Thread): def __init__(self, name, *args, **kwargs): super().__init__(name=name, *args, **kwargs) self._thread_started = time.time() def _threadinfo(self): return "%s - age: %is" % ( self.name, int(time.tim...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/coretypes/multidict.py
null
null
null
null
null
null
Python
2026-05-04T01:43:47.449315
from abc import ABCMeta, abstractmethod from collections.abc import MutableMapping from seleniumwire.thirdparty.mitmproxy.coretypes import serializable class _MultiDict(MutableMapping, metaclass=ABCMeta): def __repr__(self): fields = ( repr(field) for field in self.fields ...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/ctx.py
null
null
null
null
null
null
Python
2026-05-04T01:43:47.483351
import seleniumwire.thirdparty.mitmproxy.log import seleniumwire.thirdparty.mitmproxy.master import seleniumwire.thirdparty.mitmproxy.options log: "seleniumwire.thirdparty.mitmproxy.log.Log" master: "seleniumwire.thirdparty.mitmproxy.master.Master" options: "seleniumwire.thirdparty.mitmproxy.options.Options"
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/controller.py
null
null
null
null
null
null
Python
2026-05-04T01:43:47.515918
import asyncio import queue from seleniumwire.thirdparty.mitmproxy import exceptions class Channel: """ The only way for the mitmproxy server to communicate with the master is to use the channel it has been given. """ def __init__(self, master, loop, should_exit): self.master = ma...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/exceptions.py
null
null
null
null
null
null
Python
2026-05-04T01:43:47.550273
""" We try to be very hygienic regarding the exceptions we throw: - Every exception that might be externally visible to users shall be a subclass of MitmproxyException.p - Every exception in the base net module shall be a subclass of NetlibException, and will not be propagated directly to users. See also: http://...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/coretypes/bidi.py
null
null
null
null
null
null
Python
2026-05-04T01:43:47.563174
class BiDi: """ A wee utility class for keeping bi-directional mappings, like field constants in protocols. Names are attributes on the object, dict-like access maps values to names: CONST = BiDi(a=1, b=2) assert CONST.a == 1 assert CONST.get_name(1) == "a" ""...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/eventsequence.py
null
null
null
null
null
null
Python
2026-05-04T01:43:47.719397
import typing from seleniumwire.thirdparty.mitmproxy import controller, http, tcp, websocket from seleniumwire.thirdparty.mitmproxy import flow Events = frozenset([ "clientconnect", "clientdisconnect", "serverconnect", "serverdisconnect", # TCP "tcp_start", "tcp_message", "tcp_error", ...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/coretypes/serializable.py
null
null
null
null
null
null
Python
2026-05-04T01:43:47.804287
import abc import uuid from typing import Type, TypeVar T = TypeVar('T', bound='Serializable') class Serializable(metaclass=abc.ABCMeta): """ Abstract Base Class that defines an API to save an object's state and restore it later on. """ @classmethod @abc.abstractmethod def from_state(cls: Ty...
wkeeling/selenium-wire
https://github.com/wkeeling/selenium-wire
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
seleniumwire/thirdparty/mitmproxy/flow.py
null
null
null
null
null
null
Python
2026-05-04T01:43:48.713035
import time import typing # noqa import uuid from seleniumwire.thirdparty.mitmproxy import connections, controller, exceptions, stateobject, version # noqa class Error(stateobject.StateObject): """ An Error. This is distinct from an protocol error response (say, a HTTP code 500), which...
serengil/retinaface
https://github.com/serengil/retinaface
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
retinaface/RetinaFace.py
null
null
null
null
null
null
Python
2026-05-04T01:43:50.905375
import os import warnings import logging from typing import Union, Any, Optional, Dict, Tuple, List # this has to be set before importing tf os.environ["TF_USE_LEGACY_KERAS"] = "1" # pylint: disable=wrong-import-position import numpy as np import tensorflow as tf from retinaface import __version__ from retinaface.mo...
serengil/retinaface
https://github.com/serengil/retinaface
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
retinaface/model/retinaface_model.py
null
null
null
null
null
null
Python
2026-05-04T01:43:50.925930
import os from pathlib import Path import gdown import tensorflow as tf from retinaface.commons.logger import Logger logger = Logger(module="retinaface/model/retinaface_model.py") # pylint: disable=too-many-statements, no-name-in-module # configurations tf_version = int(tf.__version__.split(".", maxsplit=1)[0]) if...
serengil/retinaface
https://github.com/serengil/retinaface
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
retinaface/commons/postprocess.py
null
null
null
null
null
null
Python
2026-05-04T01:43:50.928478
# built-in dependencies import math from typing import Union, Tuple # 3rd party dependencies import numpy as np from PIL import Image import cv2 # pylint: disable=unused-argument def find_euclidean_distance( source_representation: Union[np.ndarray, list], test_representation: Union[np.ndarray, list] ) -> float:...
serengil/retinaface
https://github.com/serengil/retinaface
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
retinaface/commons/logger.py
null
null
null
null
null
null
Python
2026-05-04T01:43:50.931698
import os import logging from datetime import datetime # pylint: disable=broad-except class Logger: def __init__(self, module=None): self.module = module log_level = os.environ.get("RETINAFACE_LOG_LEVEL", str(logging.INFO)) try: self.log_level = int(log_level) except Exc...
serengil/retinaface
https://github.com/serengil/retinaface
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
retinaface/commons/preprocess.py
null
null
null
null
null
null
Python
2026-05-04T01:43:50.941833
import os import base64 from pathlib import Path from typing import Union import requests import numpy as np import cv2 def get_image(img_uri: Union[str, np.ndarray]) -> np.ndarray: """ Load the given image Args: img_path (str or numpy array): exact image path, pre-loaded numpy array (BGR format) ...
serengil/retinaface
https://github.com/serengil/retinaface
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
setup.py
null
null
null
null
null
null
Python
2026-05-04T01:43:50.946759
import json import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() with open("requirements.txt", "r", encoding="utf-8") as f: requirements = f.read().split("\n") with open("package_info.json", "r", encoding="utf-8") as f: package_info = json.load(f) setuptoo...
serengil/retinaface
https://github.com/serengil/retinaface
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
retinaface/commons/package_utils.py
null
null
null
null
null
null
Python
2026-05-04T01:43:50.956643
# 3rd party dependencies import tensorflow as tf # project dependencies from retinaface.commons.logger import Logger logger = Logger(module="retinaface/commons/package_utils.py") def validate_for_keras3(): tf_major = int(tf.__version__.split(".", maxsplit=1)[0]) tf_minor = int(tf.__version__.split(".", maxs...
serengil/retinaface
https://github.com/serengil/retinaface
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
tests/test_actions.py
null
null
null
null
null
null
Python
2026-05-04T01:43:52.387398
import cv2 import numpy as np from retinaface import RetinaFace from retinaface.commons.logger import Logger logger = Logger("tests/test_actions.py") do_plotting = False if do_plotting is True: import matplotlib.pyplot as plt def int_tuple(t): return tuple(int(x) for x in t) def test_analyze_crowded_phot...
serengil/retinaface
https://github.com/serengil/retinaface
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
tests/test_package.py
null
null
null
null
null
null
Python
2026-05-04T01:43:52.548229
import json from retinaface import RetinaFace from retinaface.commons.logger import Logger logger = Logger("tests/test_package.py") def test_version(): with open("./package_info.json", "r", encoding="utf-8") as f: package_info = json.load(f) assert RetinaFace.__version__ == package_info["version"] ...
serengil/retinaface
https://github.com/serengil/retinaface
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
tests/test_expand_face_area.py
null
null
null
null
null
null
Python
2026-05-04T01:43:56.978341
import cv2 from retinaface import RetinaFace from retinaface.commons import postprocess from retinaface.commons.logger import Logger logger = Logger("tests/test_expand_face_area.py") def test_expand_face_area(): img_path = "tests/dataset/img11.jpg" default_faces = RetinaFace.extract_faces(img_path=img_path, ...
serengil/retinaface
https://github.com/serengil/retinaface
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
tests/test_align_first.py
null
null
null
null
null
null
Python
2026-05-04T01:43:56.978801
import numpy as np from retinaface import RetinaFace from retinaface.commons.logger import Logger logger = Logger("tests/test_actions.py") THRESHOLD = 1000 VISUAL_TEST = False def test_align_first(): """ Test align first behavior. Align first and detect second do not cause so many black pixels in c...
p0n1/epub_to_audiobook
https://github.com/p0n1/epub_to_audiobook
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
audiobook_generator/config/general_config.py
null
null
null
null
null
null
Python
2026-05-04T01:43:59.009342
class GeneralConfig: def __init__(self, args): # General arguments self.input_file = getattr(args, 'input_file', None) self.output_folder = getattr(args, 'output_folder', None) self.preview = getattr(args, 'preview', None) self.output_text = getattr(args, 'output_text', None)...
p0n1/epub_to_audiobook
https://github.com/p0n1/epub_to_audiobook
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
audiobook_generator/book_parsers/epub_book_parser.py
null
null
null
null
null
null
Python
2026-05-04T01:43:59.023853
import logging import re from typing import List, Tuple import ebooklib from bs4 import BeautifulSoup from ebooklib import epub from audiobook_generator.book_parsers.base_book_parser import BaseBookParser from audiobook_generator.config.general_config import GeneralConfig logger = logging.getLogger(__name__) class...
p0n1/epub_to_audiobook
https://github.com/p0n1/epub_to_audiobook
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
audiobook_generator/book_parsers/base_book_parser.py
null
null
null
null
null
null
Python
2026-05-04T01:43:59.030121
from typing import List, Tuple from audiobook_generator.config.general_config import GeneralConfig EPUB = "epub" class BaseBookParser: # Base interface for books parsers # Base Book Parser interface def __init__(self, config: GeneralConfig): self.config = config self.validate_config() ...
p0n1/epub_to_audiobook
https://github.com/p0n1/epub_to_audiobook
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
audiobook_generator/config/ui_config.py
null
null
null
null
null
null
Python
2026-05-04T01:43:59.040918
class UiConfig: def __init__(self, args): self.host = args.host self.port = args.port def __str__(self): return ", ".join(f"{key}={value}" for key, value in self.__dict__.items())
p0n1/epub_to_audiobook
https://github.com/p0n1/epub_to_audiobook
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
audiobook_generator/core/audio_tags.py
null
null
null
null
null
null
Python
2026-05-04T01:43:59.042100
import dataclasses @dataclasses.dataclass class AudioTags: title: str # for TIT2 author: str # for TPE1 book_title: str # for TALB idx: int # for TRCK
p0n1/epub_to_audiobook
https://github.com/p0n1/epub_to_audiobook
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
audiobook_generator/core/audiobook_generator.py
null
null
null
null
null
null
Python
2026-05-04T01:43:59.048415
import logging import multiprocessing import os from audiobook_generator.book_parsers.base_book_parser import get_book_parser from audiobook_generator.config.general_config import GeneralConfig from audiobook_generator.core.audio_tags import AudioTags from audiobook_generator.tts_providers.base_tts_provider import get...
p0n1/epub_to_audiobook
https://github.com/p0n1/epub_to_audiobook
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
audiobook_generator/tts_providers/azure_tts_provider.py
null
null
null
null
null
null
Python
2026-05-04T01:43:59.805651
import html import io import logging import math import os from datetime import datetime, timedelta from time import sleep import requests from audiobook_generator.core.audio_tags import AudioTags from audiobook_generator.config.general_config import GeneralConfig from audiobook_generator.utils.utils import split_text...
p0n1/epub_to_audiobook
https://github.com/p0n1/epub_to_audiobook
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
audiobook_generator/tts_providers/openai_tts_provider.py
null
null
null
null
null
null
Python
2026-05-04T01:44:00.571191
import io import logging import math import tempfile import os from pydub import AudioSegment from openai import OpenAI from audiobook_generator.core.audio_tags import AudioTags from audiobook_generator.config.general_config import GeneralConfig from audiobook_generator.utils.utils import split_text, set_audio_tags, ...
p0n1/epub_to_audiobook
https://github.com/p0n1/epub_to_audiobook
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
audiobook_generator/ui/web_ui.py
null
null
null
null
null
null
Python
2026-05-04T01:44:00.572122
from multiprocessing import Process from typing import Optional import os from datetime import datetime import gradio as gr from gradio_log import Log from audiobook_generator.config.general_config import GeneralConfig from audiobook_generator.tts_providers.azure_tts_provider import get_azure_supported_languages, \ ...
p0n1/epub_to_audiobook
https://github.com/p0n1/epub_to_audiobook
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
audiobook_generator/tts_providers/edge_tts_provider.py
null
null
null
null
null
null
Python
2026-05-04T01:44:00.605912
import asyncio import logging import math import io from time import sleep import edge_tts from edge_tts import list_voices from pydub import AudioSegment from audiobook_generator.config.general_config import GeneralConfig from audiobook_generator.core.audio_tags import AudioTags from audiobook_generator.utils.utils ...
p0n1/epub_to_audiobook
https://github.com/p0n1/epub_to_audiobook
null
null
null
null
1,969
null
null
mit
null
null
null
null
null
null
null
audiobook_generator/tts_providers/base_tts_provider.py
null
null
null
null
null
null
Python
2026-05-04T01:44:00.770926
from typing import List from audiobook_generator.config.general_config import GeneralConfig TTS_AZURE = "azure" TTS_OPENAI = "openai" TTS_EDGE = "edge" TTS_PIPER = "piper" class BaseTTSProvider: # Base interface for TTS providers # Base provider interface def __init__(self, config: GeneralConfig): ...