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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | benchmarks/filter.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:28.011841 | import vaex
from benchmarks.fixtures import generate_numerical
class Filter:
pretty_name = "Filter benchmarks"
version = "1"
params = ([10**7, 10**8],)
param_names = ['N']
def setup_cache(self):
# ensure the dataframe is generated
generate_numerical()
def setup(self, N):
... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | benchmarks/strings.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:28.729906 | import vaex
from benchmarks.fixtures import generate_strings
class Strings:
pretty_name = "Performance of string operations"
version = "1"
timeout = 3600 # in seconds
param_names = [
'N', # number of rows to use
]
params = ([10**7])
def setup_cache(self):
# ensure the ... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | bin/vaex_benchmark_memory.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:28.730874 | import vaex as vx
import sys
import timeit
import numpy as np
progressbar = False
fn = sys.argv[1]
print(("opening", fn))
dataset = vx.open(fn)
#dataset = vx.open_many(fn)
expressions = sys.argv[2:]
print "subspace", expressions
subspace = dataset(*expressions)
byte_size = len(dataset) * len(expressions) * 8
#sums =... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | benchmarks/isin.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:28.903146 | from benchmarks.fixtures import generate_numerical, generate_strings
import vaex
class IsIn:
pretty_name = "Performance of isin"
version = "1"
params = ([10**7, 5*10**7, 10**8], (1, 10, 100, 1_000, 1_000_000))
param_names = ['N', 'M']
def setup_cache(self):
generate_numerical()
g... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | bin/vaex_benchmark_mmap.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:28.903638 | __author__ = 'breddels'
from ctypes import *
import h5py
import sys
import numpy as np
import mmap
import vaex
import vaex.vaexfast
import timeit
import threading
filename = sys.argv[1]
h5file = h5py.File(filename, "r")
column = h5file[sys.argv[2]]
length = len(column)
assert column.dtype == np.float64
offset = colu... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | bin/virtualenv_link2.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:29.446913 | __author__ = 'maartenbreddels'
import sys
import os
from distutils.sysconfig import get_python_lib;
source, name = sys.argv[1:]
target = os.path.join(get_python_lib(), name)
cmd = "ln -s {source} {target}".format(**locals())
print cmd
os.system(cmd) |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | bin/make_dropbox_uploader_conf.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:29.466769 | __author__ = 'maartenbreddels'
import os
import sys
content = """APPKEY={DB_APPKEY}
APPSECRET={DB_APPSECRET}
ACCESS_LEVEL=sandbox
OAUTH_ACCESS_TOKEN={DB_OAUTH_ACCESS_TOKEN}
OAUTH_ACCESS_TOKEN_SECRET={DB_OAUTH_ACCESS_TOKEN_SECRET}
""".format(**os.environ)
open(sys.argv[1], "w").write(content)
|
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | benchmarks/sort.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:29.496875 | import vaex
import os
from benchmarks.fixtures import generate_strings
from benchmarks.fixtures import generate_numerical
def time_sort_strings(N):
df = vaex.open(generate_strings())
df = df[:N]
df.sort(df.s)
time_sort_strings.params = [10**k for k in [5, 6]]
def time_sort_ints(N, T):
df = vaex.open... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | benchmarks/hashmap.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:29.517121 | import vaex
from benchmarks.fixtures import generate_strings
from benchmarks.fixtures import generate_numerical
class hashmap:
pretty_name = "hashmap benchmarks"
version = "1"
def setup(self):
dfs = vaex.open(generate_strings())
Nmax_strings = 1_000_000
self.dfs_small = dfs[:Nmax... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | dodo.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:29.527028 | # this uses https://pydoit.org/ to run tasks/chores
# pip install doit
# $ doit
import pkg_resources
import vaex.meta._version
import re
import shutil
def task_mybinder():
"""Make the mybinder files up to date"""
def action(targets):
filename = targets[0]
with open(filename) as f:
... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | docs/source/example1.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:29.556854 | # -*- coding: utf-8 -*-
import h5py
import sys
import numpy
h5file = h5py.File("example.hdf5", "w")
h5columns = h5file.create_group("data") # vaex reads all datasets in the columns group
csv_file = open(sys.argv[1])
# first count the lines, start at -1 since the first line is assumed to contain the column names
lin... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | bin/virtualenv_link.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:29.639730 | __author__ = 'maartenbreddels'
import os
import sys
venv = sys.argv[1]
for name in sys.argv[2:]:
module = __import__(name)
if os.path.split(module.__file__)[-1].startswith("__init__"):
source = os.path.dirname(module.__file__)
else:
source = module.__file__
name = os.path.split(source)[-1]
script = os.path.jo... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | misc/dmgbuild_settings.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:30.029598 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import biplist
import os.path
#
# Example settings file for dmgbuild
#
# Use like this: dmgbuild -s settings.py "Test Volume" test.dmg
# You can actually use this file for your own application (not just TextEdit)
# by doing e.g.
#
# dmgbuild -s setti... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | misc/experiments/softvolume_test.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:30.078449 | # -*- coding: utf-8 -*-
import vaex.dataset as dataset
import numpy as np
import numpy
import math
import vaex.utils
import matplotlib.pyplot as plt
import scipy.ndimage
import matplotlib.animation as animation
import matplotlib
import time
def rotz(angle):
matrix = np.identity(4)
matrix[0,0] = np.cos(angle)
matr... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | misc/experiments/testvtk.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:30.111937 | # -*- coding: utf-8 -*-
import sys
import vtk
try:
from PyQt4 import QtCore, QtGui
except:
from PySide import QtCore, QtGui
from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
import vtk.util.numpy_support
import numpy as np
import mmap
import h5py
import vaex.histogram
import scipy.spatial
... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | misc/gist/promises_exceptions.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:30.129370 | __author__ = 'maartenbreddels'
import aplus
def function_with_error(value):
print("received: %r" % value)
raise Exception
def function_prints(value):
print("received: %r" % value)
return value
def error_handler(value):
print("error: %r" % value)
p1 = aplus.Promise()
p2 = p1.then(function_with_error, error_hand... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | misc/experiments/test_gl.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:30.131509 |
#!/usr/bin/env python
"""PySide port of the opengl/hellogl example from Qt v4.x"""
import sys
import math
#from PySide import QtCore, QtGui, QtOpenGL
from PyQt4 import QtCore, QtGui, QtOpenGL
from OpenGL.arrays import vbo
try:
from OpenGL import GL, GLU
except ImportError:
app = QtGui.QApplication(sys.argv... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | misc/gist/qt_and_tornado.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:30.197732 | __author__ = 'breddels'
"""
Demonstrates combining Qt and tornado, both which want to have their own event loop.
The solution is to run tornado in a thread, the issue is that callbacks will then also be executed in this thread, and Qt doesn't like that.
To fix this, I show how to use execute the callback in the main th... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | misc/test/testgavifast.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:30.209960 | # -*- coding: utf-8 -*-
__author__ = 'maartenbreddels'
import unittest
import numpy as np
import vaex.vaexfast
import numpy.testing
class MyTestCase(unittest.TestCase):
def test_histogram1d(self):
x = np.arange(-5-0.1, 5-0.1, dtype=np.float64)
print x, sum(x)
for N in [1, 2, 4, 256, 512]:
counts = np.zero... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | misc/test/webserver.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:30.641888 | __author__ = 'maartenbreddels'
import numpy as np
import unittest
import vaex.webserver
import vaex as vx
import vaex.webserver
import vaex.execution
import time
vx.set_log_level_exception()
vx.set_log_level_debug()
class JobSleep(vaex.webserver.JobFlexible):
def execute(self):
time.sleep(self.cost*self.fraction*0... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | packages/vaex-arrow/setup.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:30.656169 | import os
from setuptools import setup
from importlib.machinery import SourceFileLoader
dirname = os.path.dirname(__file__)
path_version = os.path.join(dirname, "vaex_arrow/_version.py")
version = SourceFileLoader('version', path_version).load_module()
name = 'vaex'
author = "Maarten A. Breddels"
author_email = "maa... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | packages/vaex-astro/setup.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:30.676387 | import os
from setuptools import setup
from importlib.machinery import SourceFileLoader
dirname = os.path.dirname(__file__)
path_version = os.path.join(dirname, 'vaex/astro/_version.py')
version = SourceFileLoader('version', path_version).load_module()
name = 'vaex'
author = 'Maarten A. Breddels'
author_e... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | packages/vaex-astro/vaex/astro/astropy_table.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:30.754940 | import numpy as np
from vaex.dataset import DatasetArrays
from vaex.dataset_misc import _try_unit
class DatasetAstropyTable(DatasetArrays):
def __init__(self, filename=None, format=None, table=None, **kwargs):
self.ucds = {}
self.units = {}
columns = {}
if table is None:
... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | packages/vaex-astro/vaex/astro/export.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:30.787435 | __author__ = 'maartenbreddels'
import os
import numpy as np
import logging
import vaex
import vaex.utils
import vaex.execution
import vaex.export
import vaex.hdf5.dataset
max_length = int(1e5)
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
try:
import h5py
except:
if not on_rtd:
raise
logger ... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | packages/vaex-astro/vaex/astro/fits.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:30.829880 | import logging
import math
import os
import sys
import astropy.io.fits
import astropy.io.fits as fits
import numpy as np
import vaex.dataset
from vaex.dataset_misc import _try_unit
from vaex.dataset_mmap import DatasetMemoryMapped
import vaex.export
from vaex.utils import _python_save_name
logger = logging.getLogge... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | benchmarks/export.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:30.870330 | import tempfile
import os
import numpy as np
import vaex
df = None
def setup_df(N, M):
global df
x = [np.arange(N, dtype=np.float64) for _ in range(M)]
df = vaex.from_dict({
f'c{i}': x[i] for i in range(M)
})
def time_export_plain(N, M):
with tempfile.TemporaryDirectory() as tmpdir:
... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | packages/vaex-astro/vaex/astro/gadget.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:31.235377 | import struct
import logging
import numpy as np
from vaex.dataset_mmap import DatasetMemoryMapped
logger = logging.getLogger("vaex.astro.gadget")
def getinfo(filename, seek=None):
"""Read header data from Gadget data file 'filename' with Gadget file
type 'gtype'. Returns offsets of positions and velocities."""
... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | packages/vaex-astro/vaex/astro/tap.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:31.257879 | import numpy as np
from vaex.dataset import DatasetArrays
class DatasetTap(DatasetArrays):
class TapColumn(object):
def __init__(self, tap_dataset, column_name, column_type, ucd):
self.tap_dataset = tap_dataset
self.column_name = column_name
self.column_type = column_... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | packages/vaex-astro/vaex/astro/legacy.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:31.272609 | from vaex.dataframe import DataFrame
import numpy as np
def add_plugin():
pass # importing this module already does the job
def patch(f):
'''Adds method f to the DataFrame class'''
name = f.__name__
DataFrame.__hidden__[name] = f
return f
@patch
def add_virtual_columns_eq2ecl(self, long_in="r... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | packages/vaex-astro/vaex/astro/transformations.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:31.291742 | import vaex
import numpy as np
import math
# All assume equinox J2000
comat = {'eq2ecl': [[0.9999999999999928, 1.1102233723050031e-07, 4.411803426976324e-08],
[-1.1941015020086788e-07, 0.9174821814419274, 0.39777688059582816],
[3.684608657254395e-09, -0.39777688059583055, 0.9... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | packages/vaex-astro/vaex/astro/votable.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:31.321544 | import astropy.io.votable
import vaex
from vaex.dataset import DatasetFile
from vaex.dataset_misc import _try_unit
class VOTable(DatasetFile):
snake_name = "votable"
def __init__(self, filename, fs_options={}, fs=None):
super().__init__(filename)
self.ucds = {}
self.units = {}
self.filename = filename
sel... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | packages/vaex-contrib/setup.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:31.346922 | import os
from importlib.machinery import SourceFileLoader
from setuptools import setup
dirname = os.path.dirname(__file__)
path_version = os.path.join(dirname, 'vaex/contrib/_version.py')
version = SourceFileLoader('version', path_version).load_module()
name = 'vaex'
license = 'MIT'
version = version.... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | packages/vaex-contrib/vaex/contrib/io/gbq_test.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:31.881656 | from datetime import datetime
import os
from google.cloud import bigquery
import pytest
import vaex.ml
from vaex.contrib.io.gbq import from_query, from_table, to_table
client_project_id = os.getenv('PROJECT_ID')
def test_from_query():
client_project = client_project_id
query = '''
select * from `bigq... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | packages/vaex-contrib/vaex/contrib/io/gbq.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:31.882452 | '''
A module for I/O between Vaex and Google BigQuery.
Requires:
- google.cloud.bigquery
- google.cloud.bigquery_storage
'''
import tempfile
import pyarrow as pa
import pyarrow.parquet as pq
from vaex.docstrings import docsubst
import vaex.utils
google = vaex.utils.optional_import("google", modules=[
"google... |
vaexio/vaex | https://github.com/vaexio/vaex | null | null | null | null | 8,503 | null | null | mit | null | null | null | null | null | null | null | bin/vaex_benchmark.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:32.844008 | import vaex as vx
import sys
#import yappi
#vx.set_log_level_debug()
progressbar = True
fn = sys.argv[1]
print "opening", fn
#dataset = vx.open_many([fn])
dataset = vx.open(fn)
#dataset.set_active_fraction(0.5)
expressions = tuple(sys.argv[2:])
if sys.argv[2] == "Alpha":
dataset.add_virtual_columns_celestial("Alpha... |
lawlite19/MachineLearning_Python | https://github.com/lawlite19/MachineLearning_Python | null | null | null | null | 8,469 | null | null | mit | null | null | null | null | null | null | null | K-Means/K-Means_scikit-learn.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:36.677674 | #-*- coding: utf-8 -*-
import numpy as np
from scipy import io as spio
from matplotlib import pyplot as plt
from sklearn.cluster import KMeans
def kMenas():
data = spio.loadmat("data.mat")
X = data['X']
model = KMeans(n_clusters=3).fit(X) # n_clusters指定3类,拟合数据
centroids = model.cluster_centers_ # ... |
lawlite19/MachineLearning_Python | https://github.com/lawlite19/MachineLearning_Python | null | null | null | null | 8,469 | null | null | mit | null | null | null | null | null | null | null | LogisticRegression/LogisticRegression_OneVsAll_scikit-learn.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:36.691091 | #-*- coding: utf-8 -*-
from __future__ import print_function
from scipy import io as spio
import numpy as np
from sklearn import svm
from sklearn.linear_model import LogisticRegression
def logisticRegression_oneVsAll():
data = loadmat_data("data_digits.mat")
X = data['X'] # 获取X数据,每一行对应一个数字20x20px
y = ... |
lawlite19/MachineLearning_Python | https://github.com/lawlite19/MachineLearning_Python | null | null | null | null | 8,469 | null | null | mit | null | null | null | null | null | null | null | K-Means/K-Menas.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:36.692196 | #-*- coding: utf-8 -*-
from __future__ import print_function
import numpy as np
from matplotlib import pyplot as plt
from matplotlib import colors
from scipy import io as spio
from scipy import misc # 图片操作
from matplotlib.font_manager import FontProperties
font = FontProperties(fname=r"c:\windows\fonts\simsun.ttc"... |
lawlite19/MachineLearning_Python | https://github.com/lawlite19/MachineLearning_Python | null | null | null | null | 8,469 | null | null | mit | null | null | null | null | null | null | null | LogisticRegression/LogisticRegression_scikit-learn.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:36.694271 | # -*- coding: utf-8 -*-
from sklearn.linear_model import LogisticRegression
from sklearn.preprocessing import StandardScaler
# from sklearn.cross_validation import train_test_split # 0.18版本之后废弃
from sklearn.model_selection import train_test_split
import numpy as np
def logisticRegression():
data = loadtxtAndcsv_... |
lawlite19/MachineLearning_Python | https://github.com/lawlite19/MachineLearning_Python | null | null | null | null | 8,469 | null | null | mit | null | null | null | null | null | null | null | LinearRegression/LinearRegression_scikit-learn.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:36.701637 | #-*- coding: utf-8 -*-
from __future__ import print_function
import numpy as np
from sklearn import linear_model
from sklearn.preprocessing import StandardScaler #引入归一化的包
def linearRegression():
print(u"加载数据...\n")
data = loadtxtAndcsv_data("data.txt",",",np.float64) #读取数据
X = np.array(data[:,0:-1],dty... |
lawlite19/MachineLearning_Python | https://github.com/lawlite19/MachineLearning_Python | null | null | null | null | 8,469 | null | null | mit | null | null | null | null | null | null | null | LogisticRegression/LogisticRegression.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:36.713221 | #-*- coding: utf-8 -*-
from __future__ import print_function
import numpy as np
import matplotlib.pyplot as plt
from scipy import optimize
from matplotlib.font_manager import FontProperties
font = FontProperties(fname=r"c:\windows\fonts\simsun.ttc", size=14) # 解决windows环境下画图汉字乱码问题
def LogisticRegression():
dat... |
lawlite19/MachineLearning_Python | https://github.com/lawlite19/MachineLearning_Python | null | null | null | null | 8,469 | null | null | mit | null | null | null | null | null | null | null | LinearRegression/LinearRegression.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:36.715658 | #-*- coding: utf-8 -*-
from __future__ import print_function
import numpy as np
from matplotlib import pyplot as plt
from matplotlib.font_manager import FontProperties
font = FontProperties(fname=r"c:\windows\fonts\simsun.ttc", size=14) # 解决windows环境下画图汉字乱码问题
def linearRegression(alpha=0.01,num_iters=400):
pri... |
lawlite19/MachineLearning_Python | https://github.com/lawlite19/MachineLearning_Python | null | null | null | null | 8,469 | null | null | mit | null | null | null | null | null | null | null | AnomalyDetection/AnomalyDetection.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:36.721312 | #-*- coding: utf-8 -*-
# Author: Bob
# Date: 2016.12.22
from __future__ import print_function
import numpy as np
from matplotlib import pyplot as plt
from scipy import io as spio
'''异常检测主运行程序'''
def anomalyDetection_example():
'''加载并显示数据'''
data = spio.loadmat('data1.mat')
X = data['X']
plt = display... |
lawlite19/MachineLearning_Python | https://github.com/lawlite19/MachineLearning_Python | null | null | null | null | 8,469 | null | null | mit | null | null | null | null | null | null | null | LogisticRegression/LogisticRegression_OneVsAll.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:36.751059 | #-*- coding: utf-8 -*-
from __future__ import print_function
import numpy as np
import matplotlib.pyplot as plt
import scipy.io as spio
from scipy import optimize
from matplotlib.font_manager import FontProperties
font = FontProperties(fname=r"c:\windows\fonts\simsun.ttc", size=14) # 解决windows环境下画图汉字乱码问题
def logis... |
lawlite19/MachineLearning_Python | https://github.com/lawlite19/MachineLearning_Python | null | null | null | null | 8,469 | null | null | mit | null | null | null | null | null | null | null | NeuralNetwok/NeuralNetwork.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:36.789839 | #-*- coding: utf-8 -*-
import numpy as np
from scipy import io as spio
from matplotlib import pyplot as plt
from scipy import optimize
from matplotlib.font_manager import FontProperties
font = FontProperties(fname=r"c:\windows\fonts\simsun.ttc", size=14) # 解决windows环境下画图汉字乱码问题
from sklearn import datasets
from skle... |
lawlite19/MachineLearning_Python | https://github.com/lawlite19/MachineLearning_Python | null | null | null | null | 8,469 | null | null | mit | null | null | null | null | null | null | null | PCA/PCA.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:37.300820 | #-*- coding: utf-8 -*-
# Author: Bob
# Date: 2016.11.24
import numpy as np
from matplotlib import pyplot as plt
from scipy import io as spio
from sklearn.decomposition import pca
'''
主成分分析_2维数据降维1维演示函数
'''
def PCA_2D():
data_2d = spio.loadmat("data.mat")
X = data_2d['X']
m = X.shape[0]
plt = plot_dat... |
lawlite19/MachineLearning_Python | https://github.com/lawlite19/MachineLearning_Python | null | null | null | null | 8,469 | null | null | mit | null | null | null | null | null | null | null | SVM/SVM_scikit-learn.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:37.301665 | #-*- coding: utf-8 -*-
import numpy as np
from scipy import io as spio
from matplotlib import pyplot as plt
from sklearn import svm
def SVM():
'''data1——线性分类'''
data1 = spio.loadmat('data1.mat')
X = data1['X']
y = data1['y']
y = np.ravel(y)
plot_data(X, y)
model = svm.SVC(C=1.0, kernel='l... |
lawlite19/MachineLearning_Python | https://github.com/lawlite19/MachineLearning_Python | null | null | null | null | 8,469 | null | null | mit | null | null | null | null | null | null | null | PCA/PCA_scikit-learn.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:37.330094 | #-*- coding: utf-8 -*-
# Author:bob
# Date:2016.12.22
import numpy as np
from matplotlib import pyplot as plt
from scipy import io as spio
from sklearn.decomposition import pca
from sklearn.preprocessing import StandardScaler
'''二维降为一维主运行函数'''
def PCA_2d_example():
'''加载数据并作图'''
data = spio.loadmat('data.mat')... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/libffi/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:39.854526 | import os
from pythonforandroid.recipes.libffi import LibffiRecipe
from pythonforandroid.util import load_source
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
assert LibffiRecipe._version == "v3.4.2"
assert LibffiRecipe.depends == []
assert LibffiRecipe.python_depen... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/apkdiff.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:39.865978 | #! /usr/bin/env python3
# from https://github.com/signalapp/Signal-Android/blob/2029ea378f249a70983c1fc3d55b9a63588bc06c/reproducible-builds/apkdiff/apkdiff.py
import sys
from zipfile import ZipFile
# FIXME it is possible to hide data in the apk signing block - and then the application
# can introspect itself ... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/libiconv/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:39.883438 | import os
from pythonforandroid.recipes.libiconv import LibIconvRecipe
from pythonforandroid.util import load_source
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
assert LibIconvRecipe._version == "1.16"
assert LibIconvRecipe.depends == []
assert LibIconvRecipe.pyth... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/cryptography/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:39.893232 | from pythonforandroid.recipes.cryptography import CryptographyRecipe
assert CryptographyRecipe._version == "2.8"
assert CryptographyRecipe.depends == ['openssl', 'six', 'setuptools', 'cffi', 'python3']
assert CryptographyRecipe.python_depends == []
class CryptographyRecipePinned(CryptographyRecipe):
sha512sum =... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/libzbar/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:39.893707 | import os
from pythonforandroid.recipes.libzbar import LibZBarRecipe
from pythonforandroid.util import load_source
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
assert LibZBarRecipe.depends == ['libiconv']
assert LibZBarRecipe.python_depends == []
class LibZBarRec... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/android/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:39.901623 | import os
from pythonforandroid.recipes.android import AndroidRecipe
from pythonforandroid.util import load_source, HashPinnedDependency
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
assert AndroidRecipe.depends == [('sdl3', 'sdl2', 'genericndkbuild', 'qt6'), 'pyjni... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/hostpython3/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:39.909181 | import os
from pythonforandroid.recipes.hostpython3 import HostPython3Recipe
from pythonforandroid.util import load_source, HashPinnedDependency
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
assert HostPython3Recipe.depends == []
assert HostPython3Recipe.python_depe... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/libsecp256k1/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:39.910269 | from pythonforandroid.recipes.libsecp256k1 import LibSecp256k1Recipe
assert LibSecp256k1Recipe.depends == []
assert LibSecp256k1Recipe.python_depends == []
class LibSecp256k1RecipePinned(LibSecp256k1Recipe):
version = "1a53f4961f337b4d166c25fce72ef0dc88806618"
url = "https://github.com/bitcoin-core/secp256k... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/cffi/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:39.911599 | import os
from pythonforandroid.recipes.cffi import CffiRecipe
from pythonforandroid.util import load_source
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
assert CffiRecipe._version == "2.0.0"
assert CffiRecipe.depends == ['pycparser', 'libffi', 'python3'], CffiReci... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/get_apk_versioncode.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:39.957614 | #!/usr/bin/python3
import importlib.util
import os
import sys
ARCH_DICT = {
"x86_64": "4",
"arm64-v8a": "3",
"armeabi-v7a": "2",
"x86": "1",
"null": "0",
}
def get_electrum_version() -> str:
project_root = os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
versi... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/plyer/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:41.017720 | from pythonforandroid.recipe import PythonRecipe
assert PythonRecipe.depends == ['python3']
assert PythonRecipe.python_depends == []
class PlyerRecipePinned(PythonRecipe):
version = "5262087c85b2c82c69e702fe944069f1d8465fdf"
url = "git+https://github.com/SomberNight/plyer"
depends = ["setuptools"]
rec... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/pyjnius/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:41.019271 | import os
from pythonforandroid.recipes.pyjnius import PyjniusRecipe
from pythonforandroid.util import load_source, HashPinnedDependency
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
assert PyjniusRecipe._version == "1.7.0"
assert PyjniusRecipe.depends == [('generic... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/packaging/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:41.020171 | from pythonforandroid.recipes.packaging import PackagingRecipe
assert PackagingRecipe._version == "26.0"
assert PackagingRecipe.depends == ["setuptools", "pyparsing", "python3"]
assert PackagingRecipe.python_depends == []
class PackagingRecipePinned(PackagingRecipe):
sha512sum = "27a066a7d65ba76189212973b6a0d16... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/pyqt6/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:41.021412 | import os
from pythonforandroid.recipes.pyqt6 import PyQt6Recipe
from pythonforandroid.util import load_source, HashPinnedDependency
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
assert PyQt6Recipe._version == "6.10.2"
assert PyQt6Recipe.depends == ['qt6', 'pyjnius'... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/openssl/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:41.567656 | import os
from pythonforandroid.recipes.openssl import OpenSSLRecipe
from pythonforandroid.util import load_source
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
# assert OpenSSLRecipe._version == "3.3.1"
assert OpenSSLRecipe.depends == []
assert OpenSSLRecipe.python... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/pyqt_builder/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:41.674984 | from pythonforandroid.recipes.pyqt_builder import PyQtBuilderRecipe
from pythonforandroid.util import HashPinnedDependency
assert PyQtBuilderRecipe._version == "1.19.1"
assert PyQtBuilderRecipe.depends == ["sip", "python3"], PyQtBuilderRecipe.depends
assert PyQtBuilderRecipe.python_depends == []
class PyQtBuilderRe... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/python3/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:41.676251 | import os
from pythonforandroid.recipes.python3 import Python3Recipe
from pythonforandroid.util import load_source
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
assert Python3Recipe.depends == ['hostpython3', 'sqlite3', 'openssl', 'libffi']
assert Python3Recipe.pyth... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/sip/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:41.708543 | from pythonforandroid.recipes.sip import SipRecipe
from pythonforandroid.util import HashPinnedDependency
assert SipRecipe._version == "6.15.1"
assert SipRecipe.depends == ["python3"], SipRecipe.depends
assert SipRecipe.python_depends == []
class SipRecipePinned(SipRecipe):
sha512sum = "30a312419ba82c0221c0cf03c... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/pycparser/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:41.709099 | from pythonforandroid.recipes.pycparser import PycparserRecipe
assert PycparserRecipe._version == "2.14"
assert PycparserRecipe.depends == ['setuptools', 'python3']
assert PycparserRecipe.python_depends == []
class PycparserRecipePinned(PycparserRecipe):
version = "2.22"
sha512sum = "c9a81c78d87162f71281a32... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/qt6/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:41.711791 | import os
from pythonforandroid.recipes.qt6 import Qt6Recipe
from pythonforandroid.util import load_source
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
assert Qt6Recipe._version == "6.10.2"
assert Qt6Recipe.depends == ['python3', 'hostqt6']
assert Qt6Recipe.python_d... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/pycryptodomex/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:41.740557 | from pythonforandroid.recipe import PythonRecipe
from pythonforandroid.util import HashPinnedDependency
assert PythonRecipe.depends == ['python3']
assert PythonRecipe.python_depends == []
class PycryptodomexRecipe(PythonRecipe):
version = "3.23.0"
sha512sum = "951cebaad2e19b9f9d04fe85c73ab1ff8b515069c1e0e8e3... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/pyqt6sip/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:41.788647 | import os
from pythonforandroid.recipes.pyqt6sip import PyQt6SipRecipe
from pythonforandroid.util import load_source, HashPinnedDependency
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
assert PyQt6SipRecipe._version == "13.10.3"
assert PyQt6SipRecipe.depends == ['py... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/pyparsing/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.021774 | from pythonforandroid.recipes.pyparsing import PyparsingRecipe
from pythonforandroid.util import HashPinnedDependency
assert PyparsingRecipe._version == "3.0.7"
assert PyparsingRecipe.depends == ["setuptools", "python3"]
assert PyparsingRecipe.python_depends == []
class PyparsingRecipePinned(PyparsingRecipe):
#... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/ply/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.067742 | import os
from pythonforandroid.recipes.ply import PlyRecipe
from pythonforandroid.util import load_source
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
assert PlyRecipe._version == "3.11"
assert PlyRecipe.depends == ['packaging', 'python3']
assert PlyRecipe.python_... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/six/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.179724 | from pythonforandroid.recipes.six import SixRecipe
assert SixRecipe._version == "1.15.0"
assert SixRecipe.depends == ['setuptools', 'python3']
assert SixRecipe.python_depends == []
class SixRecipePinned(SixRecipe):
version = "1.17.0"
sha512sum = "fcfa58b03877ac3ac00a4f85b5fea4fecb2a010244451aa95013637a0aa21... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/toml/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.244827 | from pythonforandroid.recipes.toml import TomlRecipe
assert TomlRecipe._version == "0.10.2"
assert TomlRecipe.depends == ["setuptools", "python3"]
assert TomlRecipe.python_depends == []
class TomlRecipePinned(TomlRecipe):
sha512sum = "ede2c8fed610a3827dba828f6e7ab7a8dbd5745e8ef7c0cd955219afdc83b9caea714deee09e8... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/tomli/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.292541 | from pythonforandroid.recipes.tomli import TomliRecipe
assert TomliRecipe._version == "2.0.1"
assert TomliRecipe.depends == ["setuptools", "python3"]
assert TomliRecipe.python_depends == []
class TomliRecipePinned(TomliRecipe):
#version = "2.0.1"
# note: can't be easily updated as base recipe has version nu... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/util.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.303945 | import os
class InheritedRecipeMixin:
def get_recipe_dir(self):
"""This is used to replace pythonforandroid.recipe.Recipe.get_recipe_dir.
If one of our local recipes inherits from a built-in p4a recipe, this override
ensures that potential patches and other local files used by the recipe ... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/android/p4a_recipes/sqlite3/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.304900 | import os
from pythonforandroid.recipes.sqlite3 import Sqlite3Recipe
from pythonforandroid.util import load_source
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
assert Sqlite3Recipe._version == "3.35.5"
assert Sqlite3Recipe.depends == []
assert Sqlite3Recipe.python_... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/ban_unicode.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.310396 | #!/usr/bin/env python3
#
# Copyright (C) 2025 The Electrum developers
# Distributed under the MIT software license, see the accompanying
# file LICENCE or http://www.opensource.org/licenses/mit-license.php
#
# This script scans the whole codebase for unicode characters and
# errors if it finds any, unless the character... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/ci/claude_security_review.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.343862 | #!/usr/bin/env python3
"""
Cirrus CI task: Claude Code security review for Electrum pull requests.
Runs Claude Code against the PR diff to detect critical security
vulnerabilities. Optionally posts findings as a GitHub PR comment.
Exit codes:
0 -- PASS (no critical/high issues)
1 -- FAIL (critical/high issues... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/deterministic-build/find_restricted_dependencies.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.405426 | #!/usr/bin/env python3
import sys
try:
import requests
except ImportError as e:
sys.exit(f"Error: {str(e)}. Try 'python3 -m pip install <module-name>'")
def is_dependency_edge_blacklisted(*, parent_pkg: str, dep: str) -> bool:
"""Sometimes a package declares a hard dependency
for some niche functional... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/locale/push_locale.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.608943 | #!/usr/bin/env python3
#
# This script extracts "raw" strings from the codebase,
# and uploads them to crowdin, for the community to translate them.
#
# Dependencies:
# $ sudo apt-get install python3-requests gettext qt6-l10n-tools
import glob
import os
import subprocess
import sys
try:
import requests
except Imp... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/locale/stats.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.647002 | #!/usr/bin/env python3
#
# Copyright (C) 2026 The Electrum developers
# Distributed under the MIT software license, see the accompanying
# file LICENCE or http://www.opensource.org/licenses/mit-license.php
#
#
# This generates a 'stats.json' file containing some statistics about translation completeness.
import gettex... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | contrib/print_electrum_version.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.777611 | #!/usr/bin/python3
# For usage in shell, to get the version of electrum, without needing electrum installed.
# usage: ./print_electrum_version.py [<attr_name>]
#
# For example:
# $ VERSION=$("$CONTRIB"/print_electrum_version.py)
# instead of
# $ VERSION=$(python3 -c "import electrum; print(electrum.version.ELECTRUM_VER... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | electrum/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.833727 | import sys
import os
# these are ~duplicated from run_electrum:
is_bundle = getattr(sys, 'frozen', False)
is_local = not is_bundle and os.path.exists(os.path.join(os.path.dirname(os.path.dirname(__file__)), "electrum.desktop"))
# when running from source, on Windows, also search for DLLs in inner 'electrum' folder
if... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | electrum/_vendor/distutils/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.865200 | """(part of) distutils, taken from the cpython standard library
at commit https://github.com/python/cpython/tree/9d38120e335357a3b294277fd5eff0a10e46e043/Lib/distutils
"""
|
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | electrum/_vendor/pyperclip/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.868480 | """
Pyperclip
A cross-platform clipboard module for Python, with copy & paste functions for plain text.
By Al Sweigart al@inventwithpython.com
BSD License
Usage:
import pyperclip
pyperclip.copy('The text to be copied to the clipboard.')
spam = pyperclip.paste()
if not pyperclip.is_available():
print("Cop... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | electrum/_vendor/distutils/version.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.923518 | #
# distutils/version.py
#
# Implements multiple version numbering conventions for the
# Python Module Distribution Utilities.
#
# $Id$
#
"""Provides classes to represent module version numbers (one class for
each style of version numbering). There are currently two such classes
implemented: StrictVersion and LooseVe... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | electrum/address_synchronizer.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.939634 | # Electrum - lightweight Bitcoin client
# Copyright (C) 2018 The Electrum Developers
#
# 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 restriction,
# including without limitation the ... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | electrum/base_crash_reporter.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:42.996954 | # Electrum - lightweight Bitcoin client
#
# 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 restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | electrum/bip21.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:43.208176 | import urllib
import urllib.parse
import re
from decimal import Decimal
from typing import Optional
from . import bitcoin
from .util import format_satoshis_plain
from .bitcoin import COIN, TOTAL_COIN_SUPPLY_LIMIT_IN_BTC
from .bolt11 import decode_bolt11_invoice, BOLT11DecodeException
# note: when checking against the... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | electrum/bip32.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:43.218530 | # Copyright (C) 2018 The Electrum developers
# Distributed under the MIT software license, see the accompanying
# file LICENCE or http://www.opensource.org/licenses/mit-license.php
import binascii
import hashlib
import struct
from typing import List, Tuple, NamedTuple, Union, Iterable, Sequence, Optional
import elect... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | electrum/bip39_recovery.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:43.380613 | # Copyright (C) 2020 The Electrum developers
# Distributed under the MIT software license, see the accompanying
# file LICENCE or http://www.opensource.org/licenses/mit-license.php
from typing import TYPE_CHECKING, Optional
import itertools
from . import bitcoin
from .constants import BIP39_WALLET_FORMATS
from .bip32... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | electrum/bitcoin.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:43.457639 | # -*- coding: utf-8 -*-
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2011 thomasv@gitorious
#
# 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 restriction,
# including wit... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | electrum/bolt11.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:43.458241 | #! /usr/bin/env python3
# This was forked from https://github.com/rustyrussell/lightning-payencode/tree/acc16ec13a3fa1dc16c07af6ec67c261bd8aff23
import io
import re
import time
from hashlib import sha256
from binascii import hexlify
from decimal import Decimal
from typing import Optional, TYPE_CHECKING, Type, Dict, An... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | electrum/blockchain.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:43.467391 | # Electrum - lightweight Bitcoin client
# Copyright (C) 2012 thomasv@ecdsa.org
#
# 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 restriction,
# including without limitation the rights... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | electrum/channel_db.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:43.492405 | # -*- coding: utf-8 -*-
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2018 The Electrum developers
#
# 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 restriction,
# includi... |
spesmilo/electrum | https://github.com/spesmilo/electrum | null | null | null | null | 8,463 | null | null | mit | null | null | null | null | null | null | null | electrum/coinchooser.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:43.569313 | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 kyuupichan@gmail
#
# 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 restriction,
# including withou... |
aladdinpersson/Machine-Learning-Collection | https://github.com/aladdinpersson/Machine-Learning-Collection | null | null | null | null | 8,435 | null | null | mit | null | null | null | null | null | null | null | ML/Kaggles/Dog vs Cat Competition/dataset.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:46.113617 | import os
import re
import numpy as np
from torch.utils.data import Dataset
from PIL import Image
class CatDog(Dataset):
def __init__(self, root, transform=None):
self.images = os.listdir(root)
self.images.sort(key=lambda x: int(re.findall(r"\d+", x)[0]))
self.root = root
self.tran... |
aladdinpersson/Machine-Learning-Collection | https://github.com/aladdinpersson/Machine-Learning-Collection | null | null | null | null | 8,435 | null | null | mit | null | null | null | null | null | null | null | ML/Kaggles/DiabeticRetinopathy/train.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:46.116738 | import torch
from torch import nn, optim
import os
import config
from torch.utils.data import DataLoader
from tqdm import tqdm
from sklearn.metrics import cohen_kappa_score
from efficientnet_pytorch import EfficientNet
from dataset import DRDataset
from torchvision.utils import save_image
from utils import (
load_c... |
aladdinpersson/Machine-Learning-Collection | https://github.com/aladdinpersson/Machine-Learning-Collection | null | null | null | null | 8,435 | null | null | mit | null | null | null | null | null | null | null | ML/Kaggles/Dog vs Cat Competition/utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:10:46.117779 | import torch
import os
import pandas as pd
import numpy as np
import albumentations as A
from albumentations.pytorch import ToTensorV2
import config
from tqdm import tqdm
from dataset import CatDog
from torch.utils.data import DataLoader
from sklearn.metrics import log_loss
def check_accuracy(
loader, model, loss... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.