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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | simpleai/machine_learning/__init__.py | __init__.py | .py | 803 | https://github.com/simpleai-team/simpleai/blob/master/simpleai/machine_learning/__init__.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/simpleai/machine_learning/__init__.py | d8c5c419af041f2fa88542f3409c6c01e3ea0e3e | Python | 2026-05-04T01:28:37.343087 | # -*- coding: utf-8 -*-
from simpleai.machine_learning.models import ClassificationProblem, \
VectorDataClassificationProblem, \
Attribute, VectorIndexAttribute, \
is_attribute, \
... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | simpleai/machine_learning/classifiers.py | classifiers.py | .py | 15,300 | https://github.com/simpleai-team/simpleai/blob/master/simpleai/machine_learning/classifiers.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/simpleai/machine_learning/classifiers.py | bb446dfff1d4ba405b422e91d41dd0bda47e5b13 | Python | 2026-05-04T01:28:38.798840 | #!/usr/bin/env python
# coding: utf-8
"""
Classifiers implemented:
* Decision tree: See http://en.wikipedia.org/wiki/Decision_tree_learning
* Naive Bayes: See http://en.wikipedia.org/wiki/Naive_Bayes_classifier
* K-Nearest Neighbor: See http://en.wikipedia.org/wiki/K-nearest_neighbor
"""
import numpy
f... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | simpleai/machine_learning/evaluation.py | evaluation.py | .py | 1,573 | https://github.com/simpleai-team/simpleai/blob/master/simpleai/machine_learning/evaluation.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/simpleai/machine_learning/evaluation.py | 4141293af1bd014c99cd0f4db95cc019353c6edf | Python | 2026-05-04T01:28:40.106688 | #!/usr/bin/env python
# coding: utf-8
"""
Tools for evaluate the classification algorithms
"""
import random
def precision(classifier, testset):
"""
Runs the classifier for each example in `testset`
and verifies that the classification is correct
using the `target`.
Returns a number between 0.... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | simpleai/machine_learning/metrics.py | metrics.py | .py | 2,292 | https://github.com/simpleai-team/simpleai/blob/master/simpleai/machine_learning/metrics.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/simpleai/machine_learning/metrics.py | cc6c3c557dae31efde94911160ebb5e43cfca369 | Python | 2026-05-04T01:28:41.233334 | #!/usr/bin/env python
# coding: utf-8
import math
import numpy
from collections import defaultdict
class Counter(defaultdict):
"""
Counter of examples. Counts the total of examples added
and also the times that the target of that example appears.
To add an example use the `add` method and to check t... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | simpleai/machine_learning/models.py | models.py | .py | 6,736 | https://github.com/simpleai-team/simpleai/blob/master/simpleai/machine_learning/models.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/simpleai/machine_learning/models.py | 028301bfa20be29e9e703e003d3ffd97d3e47a82 | Python | 2026-05-04T01:28:42.768365 | #!/usr/bin/env python
# coding: utf-8
"""
Basic API for modeling a classification problem.
"""
try:
import cPickle as pickle
except ImportError:
import pickle
class Classifier(object):
"""
Base of all classifiers.
This specifies the classifier API.
Each classifier holds at least a dataset a... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | simpleai/machine_learning/reinforcement_learning.py | reinforcement_learning.py | .py | 6,345 | https://github.com/simpleai-team/simpleai/blob/master/simpleai/machine_learning/reinforcement_learning.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/simpleai/machine_learning/reinforcement_learning.py | 402efbfa6df5c73c5dfdbb2c5aee13e4c1395777 | Python | 2026-05-04T01:28:44.304729 | # -*- coding: utf-8 -*-
from collections import defaultdict, Counter
import math
import random
from simpleai.search.utils import argmax
import pickle
try:
import matplotlib.pyplot as plt
import numpy
except:
plt = None # lint:ok
numpy = None # lint:ok
def make_at_least_n_times(optimistic_reward, min... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | simpleai/search/__init__.py | __init__.py | .py | 546 | https://github.com/simpleai-team/simpleai/blob/master/simpleai/search/__init__.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/simpleai/search/__init__.py | c3f97fc704492621a3edfc9f84a32f2d5e5ccdea | Python | 2026-05-04T01:28:45.359734 | # coding: utf-8
from simpleai.search.models import CspProblem, SearchProblem
from simpleai.search.traditional import breadth_first, depth_first, limited_depth_first, iterative_limited_depth_first, uniform_cost, greedy, astar
from simpleai.search.local import (
beam, hill_climbing, hill_climbing_stochastic, simulate... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | simpleai/search/arc.py | arc.py | .py | 2,137 | https://github.com/simpleai-team/simpleai/blob/master/simpleai/search/arc.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/simpleai/search/arc.py | 9725ceac753d390bf3d85434443758791f630402 | Python | 2026-05-04T01:28:46.392457 | # coding: utf-8
from operator import itemgetter
from simpleai.search.csp import _call_constraint
# The first 3 functions are exported for testing purposes.
__all__ = ['all_arcs', 'revise', 'arc_consistency_3']
fst = itemgetter(0)
def revise(domains, arc, constraints):
"""
Given the arc X, Y (variables), r... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | simpleai/search/csp.py | csp.py | .py | 8,126 | https://github.com/simpleai-team/simpleai/blob/master/simpleai/search/csp.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/simpleai/search/csp.py | 00c913acc6e9d212bfbd7fbc10e745341bcee729 | Python | 2026-05-04T01:28:47.805069 | # coding=utf-8
import random
from copy import deepcopy, copy
from itertools import product
from simpleai.search.utils import argmin
MOST_CONSTRAINED_VARIABLE = 'mcv'
HIGHEST_DEGREE_VARIABLE = 'degree'
LEAST_CONSTRAINING_VALUE = 'lvc'
def backtrack(problem, variable_heuristic='', value_heuristic='', inference=True):
... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | simpleai/search/local.py | local.py | .py | 11,074 | https://github.com/simpleai-team/simpleai/blob/master/simpleai/search/local.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/simpleai/search/local.py | e71268a854d732817b99d8cb561407fd4ce97957 | Python | 2026-05-04T01:28:49.323599 | # coding=utf-8
from simpleai.search.utils import BoundedPriorityQueue, InverseTransformSampler
from simpleai.search.models import SearchNodeValueOrdered
import math
import random
def _all_expander(fringe, iteration, viewer):
'''
Expander that expands all nodes on the fringe.
'''
expanded_neighbors = [... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | simpleai/search/models.py | models.py | .py | 6,539 | https://github.com/simpleai-team/simpleai/blob/master/simpleai/search/models.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/simpleai/search/models.py | 9e3202ba3123e5a8217c2793734d29e520865f5f | Python | 2026-05-04T01:28:50.782585 | # coding=utf-8
class SearchProblem(object):
'''Abstract base class to represent and manipulate the search space of a
problem.
In this class, the search space is meant to be represented implicitly as
a graph.
Each state corresponds with a problem state (ie, a valid configuration)
... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | simpleai/search/traditional.py | traditional.py | .py | 5,707 | https://github.com/simpleai-team/simpleai/blob/master/simpleai/search/traditional.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/simpleai/search/traditional.py | 59aa3b97ea7521abf307570ba9923be6695fa779 | Python | 2026-05-04T01:28:52.087730 | # coding=utf-8
from simpleai.search.utils import FifoList, BoundedPriorityQueue, LifoList
from simpleai.search.models import (SearchNode, SearchNodeHeuristicOrdered,
SearchNodeStarOrdered,
SearchNodeCostOrdered)
def breadth_first(problem, graph_s... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | simpleai/search/utils.py | utils.py | .py | 2,411 | https://github.com/simpleai-team/simpleai/blob/master/simpleai/search/utils.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/simpleai/search/utils.py | fe7457252563e5bd8517ad2d32f458321f8e0155 | Python | 2026-05-04T01:28:53.417873 | # coding=utf-8
import heapq
from collections import deque
import random
try:
from itertools import izip
except ImportError:
izip = zip
class LifoList(deque):
'''List that pops from the end.'''
def sorted(self):
return list(self)[::-1]
class FifoList(deque):
'''List that pops from the be... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | simpleai/search/viewers.py | viewers.py | .py | 10,388 | https://github.com/simpleai-team/simpleai/blob/master/simpleai/search/viewers.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/simpleai/search/viewers.py | e80a76562869e2d8390f803c5361ac703000b850 | Python | 2026-05-04T01:28:54.953672 | # coding: utf-8
from __future__ import print_function
from os import path
import sys
from tempfile import mkdtemp
from time import sleep
from threading import Thread
class Event(object):
def __init__(self, name, description):
self.name = name
self.description = description
def __str__(self)... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | simpleai/search/web_viewer_server.py | web_viewer_server.py | .py | 2,357 | https://github.com/simpleai-team/simpleai/blob/master/simpleai/search/web_viewer_server.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/simpleai/search/web_viewer_server.py | 1417dd11b2dad3905361c7f8469909b6805eadfd | Python | 2026-05-04T01:28:56.209343 | # coding: utf-8
from __future__ import print_function
import json
from os import path, _exit
from time import sleep
from flask import Flask, Response, send_file
def run_server(viewer):
resources = path.join(path.dirname(path.realpath(__file__)),
'web_viewer_resources')
app = Flask... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | tests/machine_learning/test_classifiers.py | test_classifiers.py | .py | 9,496 | https://github.com/simpleai-team/simpleai/blob/master/tests/machine_learning/test_classifiers.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/tests/machine_learning/test_classifiers.py | 2c03981edccd290255aeb889b241a107a36d1e45 | Python | 2026-05-04T01:28:57.618982 | #!/usr/bin/env python
# coding: utf-8
"""
Tests for dtree.
"""
import os
import math
import tempfile
import unittest
from collections import defaultdict
import numpy as np
from simpleai.machine_learning import evaluation
from simpleai.machine_learning.models import VectorDataClassificationProblem
from simpleai.mach... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | tests/machine_learning/test_evaluation.py | test_evaluation.py | .py | 1,923 | https://github.com/simpleai-team/simpleai/blob/master/tests/machine_learning/test_evaluation.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/tests/machine_learning/test_evaluation.py | e796618deafb299040afe07398a28019003dd2de | Python | 2026-05-04T01:28:58.804144 | # -*- coding: utf-8 -*-
import unittest
from simpleai.machine_learning.evaluation import precision, kfold
from simpleai.machine_learning import VectorDataClassificationProblem, \
Classifier
class MockClassifier(Classifier):
"""
Classifies everything as the first item in ... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | tests/machine_learning/test_metrics.py | test_metrics.py | .py | 2,290 | https://github.com/simpleai-team/simpleai/blob/master/tests/machine_learning/test_metrics.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/tests/machine_learning/test_metrics.py | 6afd68d8760a9a58ec0e264b2bfc86c9d552761a | Python | 2026-05-04T01:29:00.207077 | #!/usr/bin/env python
# coding: utf-8
"""
Tests for metrics module in machine learning.
"""
import unittest
from simpleai.machine_learning.metrics import Counter, OnlineEntropy, \
OnlineLogProbability, \
OnlineInformationGain
... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | tests/machine_learning/test_reinforcement_learning.py | test_reinforcement_learning.py | .py | 1,956 | https://github.com/simpleai-team/simpleai/blob/master/tests/machine_learning/test_reinforcement_learning.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/tests/machine_learning/test_reinforcement_learning.py | 1ee746cdbc4f6dd84436b4203172b8f06fc648ab | Python | 2026-05-04T01:29:01.614351 | # -*- coding: utf-8 -*-
import unittest
from simpleai.machine_learning.reinforcement_learning import boltzmann_exploration, make_at_least_n_times
from collections import Counter
class TestBoltzmann_exploration(unittest.TestCase):
def setUp(self):
self.actions = ['a', 'b', 'c']
self.utilities = di... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | tests/search/dummies.py | dummies.py | .py | 2,295 | https://github.com/simpleai-team/simpleai/blob/master/tests/search/dummies.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/tests/search/dummies.py | 24e35529c5cb0f353e357b3650d9ff4fd4b658f6 | Python | 2026-05-04T01:29:02.697257 | # coding=utf-8
class DummyNode(object):
def __init__(self, value):
self.value = value
def __lt__(self, other):
return self.value < other.value
GOAL = 'iabcabc'
class DummyProblem(object):
def actions(self, state):
return ['a', 'b', 'c'] if len(state) < len(GOAL) else []
d... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | tests/search/test_arc_concistency.py | test_arc_concistency.py | .py | 3,587 | https://github.com/simpleai-team/simpleai/blob/master/tests/search/test_arc_concistency.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/tests/search/test_arc_concistency.py | a5b56997336022238302e0135904d4f8911072a8 | Python | 2026-05-04T01:29:04.040558 | # coding=utf-8
import unittest
from operator import itemgetter
from simpleai.search.arc import all_arcs, revise, arc_consistency_3
first = itemgetter(0)
class TestAllArcs(unittest.TestCase):
def setUp(self):
self.constraint = lambda variables, values: False
def test_adds_pairs_in_both_directions(... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | tests/search/test_csp.py | test_csp.py | .py | 3,837 | https://github.com/simpleai-team/simpleai/blob/master/tests/search/test_csp.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/tests/search/test_csp.py | 46e3742ff95369df3c8a4faa392ca64724d48fc5 | Python | 2026-05-04T01:29:05.295498 | # coding=utf-8
import unittest
from simpleai.search.models import CspProblem
from simpleai.search.csp import (_find_conflicts, _count_conflicts,
_most_constrained_variable_chooser,
_highest_degree_variable_chooser,
_least... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | tests/search/test_hidden_variables.py | test_hidden_variables.py | .py | 1,765 | https://github.com/simpleai-team/simpleai/blob/master/tests/search/test_hidden_variables.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/tests/search/test_hidden_variables.py | 63781fd553f8213af878e34db907f0488d0cb519 | Python | 2026-05-04T01:29:06.410417 | import unittest
from operator import itemgetter
from simpleai.search import convert_to_binary
fst = itemgetter(0)
class TestHiddenVariableRepr(unittest.TestCase):
def setUp(self):
alldiff = lambda vars_, values_: len(set(values_)) == len(values_)
const = lambda vars_, values_: True
self... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | tests/search/test_local.py | test_local.py | .py | 3,196 | https://github.com/simpleai-team/simpleai/blob/master/tests/search/test_local.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/tests/search/test_local.py | 7b5160db77c0355d78a491f154d8ee323c84fd20 | Python | 2026-05-04T01:29:07.677066 | # coding=utf-8
import unittest
from tests.search.dummies import DummyProblem, GOAL, DummyGeneticProblem
from simpleai.search.local import (beam, beam_best_first,
hill_climbing,
hill_climbing_stochastic,
simulated_an... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | tests/search/test_models.py | test_models.py | .py | 3,041 | https://github.com/simpleai-team/simpleai/blob/master/tests/search/test_models.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/tests/search/test_models.py | 1fcc34aca3df7c84de9dce4e2d337a2d1e71eb83 | Python | 2026-05-04T01:29:08.776562 | # coding=utf-8
import unittest
from tests.search.dummies import DummyProblem
from simpleai.search.models import (SearchNode, SearchNodeCostOrdered,
SearchNodeValueOrdered,
SearchNodeHeuristicOrdered,
SearchNodeSt... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | tests/search/test_traditional.py | test_traditional.py | .py | 4,130 | https://github.com/simpleai-team/simpleai/blob/master/tests/search/test_traditional.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/tests/search/test_traditional.py | 370fda0a1e1127a52bce8219fca35fbe4f568c24 | Python | 2026-05-04T01:29:10.005756 | # coding=utf-8
import unittest
from tests.search.dummies import DummyProblem, GOAL, DummyGraphProblem
from simpleai.search.traditional import (breadth_first, depth_first,
limited_depth_first,
iterative_limited_depth_first,
... |
simpleai-team/simpleai | https://github.com/simpleai-team/simpleai | https://api.github.com/repos/simpleai-team/simpleai | simpleai-team | simpleai | simple artificial intelligence utilities | 990 | 247 | 990 | mit | master | 2012-07-24T23:12:50 | 2026-04-29T02:02:08 | [] | {
"Python": 125959,
"JavaScript": 7241,
"HTML": 3449,
"CSS": 1724
} | false | 13 | tests/search/test_utils.py | test_utils.py | .py | 3,373 | https://github.com/simpleai-team/simpleai/blob/master/tests/search/test_utils.py | https://raw.githubusercontent.com/simpleai-team/simpleai/master/tests/search/test_utils.py | 0a443d75ef1eaf51fed71a91c9fe6d308477b752 | Python | 2026-05-04T01:29:11.075302 | # coding=utf-8
import unittest
from tests.search.dummies import DummyNode
from simpleai.search.utils import FifoList, BoundedPriorityQueue, LifoList, argmax, argmin
def sorted_equals_pop(l):
_sorted = l.sorted()
_sorted_by_pop = [l.pop() for x in range(len(l))]
return _sorted == _sorted_by_pop
class Tes... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/config.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:52.609445 | from pathlib import Path
from typing import Optional, Union
import toml
from pydantic import BaseModel
from .compat import model_dump, type_validate_python
from .dirs import get_config_file
config_file_path = get_config_file("config.toml")
class MemeConfig(BaseModel):
load_builtin_memes: bool = True
meme_d... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/log.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:52.610794 | # https://github.com/nonebot/nonebot2/blob/master/nonebot/log.py
import logging
import sys
from typing import TYPE_CHECKING
import loguru
from .compat import model_dump
if TYPE_CHECKING:
from loguru import Logger, Record
logger: "Logger" = loguru.logger
class LoguruHandler(logging.Handler):
"""logging 与 l... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/compat.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:52.612423 | """本模块为 Pydantic 版本兼容层模块
为兼容 Pydantic V1 与 V2 版本,定义了一系列兼容函数与类供使用。
"""
from typing import Any, Optional, TypeVar, Union
from pydantic import VERSION, BaseModel
T = TypeVar("T")
PYDANTIC_V2 = int(VERSION.split(".", 1)[0]) == 2
__all__ = (
"model_dump",
"model_json_schema",
"type_validate_python",
"... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:52.613290 | from pathlib import Path
from meme_generator.config import meme_config as config
from meme_generator.manager import add_meme as add_meme
from meme_generator.manager import get_meme as get_meme
from meme_generator.manager import get_meme_keys as get_meme_keys
from meme_generator.manager import get_memes as get_memes
fr... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/download.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:52.614582 | import asyncio
import hashlib
import json
import time
from pathlib import Path
import httpx
from rich.progress import Progress
from .config import meme_config
from .log import logger
from .version import __version__
def _resource_url(base_url: str, name: str) -> str:
return f"{base_url}v{__version__}/{name}"
... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/cli.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:52.615567 | import asyncio
from pathlib import Path
from typing import Any
import filetype
from arclet.alconna import (
Alconna,
Args,
CommandMeta,
MultiVar,
Option,
Subcommand,
TextFormatter,
)
from arclet.alconna.exceptions import SpecialOptionTriggered
from arclet.alconna.tools import RichConsoleFor... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/exception.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:52.616580 | from typing import Optional
class MemeGeneratorException(Exception):
status_code: int = 520
def __init__(self, message: str):
self.message = message
def __str__(self) -> str:
return self.__repr__()
def __repr__(self) -> str:
return f"表情制作出错!{self.message}"
class NoSuchMeme... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/app.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:52.617525 | import json
from datetime import datetime
from typing import Any, Literal, Optional
import filetype
from fastapi import Depends, FastAPI, Form, HTTPException, Response, UploadFile
from pydantic import BaseModel, ValidationError
from meme_generator.compat import model_dump, model_json_schema, type_validate_python
from... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/manager.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:52.619141 | import importlib
import importlib.util
import pkgutil
from datetime import datetime
from pathlib import Path
from typing import Optional, Union
from .config import meme_config
from .exception import NoSuchMeme
from .log import logger
from .meme import CommandShortcut, Meme, MemeArgsType, MemeFunction, MemeParamsType
... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/dirs.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:52.620558 | # https://github.com/nonebot/plugin-localstore
"""
MIT License
Copyright (c) 2021 NoneBot
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 rig... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/meme.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:55.090751 | from dataclasses import dataclass, field
from datetime import datetime
from io import BytesIO
from pathlib import Path
from typing import Any, Callable, Literal, Optional, TypeVar, Union
from arclet.alconna import ArgFlag, Args, Empty, Option
from arclet.alconna.action import Action
from pil_utils import BuildImage
fr... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/addiction/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:55.147023 | from datetime import datetime
from pathlib import Path
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.exception import TextOverLength
from meme_generator.utils import make_jpg_or_gif
img_dir = Path(__file__).parent / "images"
def addiction(images: list[BuildImage], texts: ... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/acg_entrance/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:55.325290 | from datetime import datetime
from pathlib import Path
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.exception import TextOverLength
from meme_generator.utils import make_jpg_or_gif
img_dir = Path(__file__).parent / "images"
default_text = "走,跟我去二次元吧"
def acg_entrance(im... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/add_chaos/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:55.347985 | from datetime import datetime
from pathlib import Path
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.utils import make_jpg_or_gif
img_dir = Path(__file__).parent / "images"
def add_chaos(images: list[BuildImage], texts, args):
banner = BuildImage.open(img_dir / "0.png... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/5000choyen/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:55.413894 | from datetime import datetime
from PIL.Image import Image as IMG
from PIL.Image import Resampling, Transform
from pil_utils import BuildImage, Text2Image
from pil_utils.gradient import ColorStop, LinearGradient
from meme_generator import add_meme
def fivethousand_choyen(images, texts: list[str], args):
fontsize... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/ace_attorney_dialog/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:55.418737 | import math
from datetime import datetime
from pathlib import Path
from pil_utils import BuildImage, Text2Image
from meme_generator import add_meme
from meme_generator.exception import TextOverLength
img_dir = Path(__file__).parent / "images"
def ace_attorney_dialog(images, texts: list[str], args):
def shadow_... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/alike/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:55.455354 | from datetime import datetime
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.utils import make_jpg_or_gif
def alike(images: list[BuildImage], texts, args):
frame = BuildImage.new("RGBA", (470, 180), "white")
frame.draw_text(
(10, 10, 185, 140), "你怎么跟", max_f... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/alipay/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:55.532883 | from datetime import datetime
from pathlib import Path
import qrcode
from pil_utils import BuildImage
from pydantic import Field
from qrcode.image.pil import PilImage
from meme_generator import (
MemeArgsModel,
MemeArgsType,
ParserArg,
ParserOption,
add_meme,
)
from meme_generator.exception import... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/anti_kidnap/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:55.706915 | from datetime import datetime
from pathlib import Path
from pil_utils import BuildImage
from meme_generator import add_meme
img_dir = Path(__file__).parent / "images"
def anti_kidnap(images: list[BuildImage], texts, args):
img = images[0].convert("RGBA").resize((450, 450), keep_ratio=True)
frame = BuildIma... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/anya_suki/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:55.902955 | from datetime import datetime
from pathlib import Path
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.exception import TextOverLength
from meme_generator.tags import MemeTags
from meme_generator.utils import make_jpg_or_gif
img_dir = Path(__file__).parent / "images"
default... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/applaud/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:55.916618 | from datetime import datetime
from pathlib import Path
from PIL.Image import Image as IMG
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.utils import save_gif
img_dir = Path(__file__).parent / "images"
def applaud(images: list[BuildImage], texts, args):
img = images[0]... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/arona_throw/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:55.956852 | from datetime import datetime
from pathlib import Path
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.tags import MemeTags
from meme_generator.utils import FrameAlignPolicy, Maker, make_gif_or_combined_gif
img_dir = Path(__file__).parent / "images"
def arona_throw(images: ... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/ascension/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:55.991205 | from datetime import datetime
from pathlib import Path
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.exception import TextOverLength
img_dir = Path(__file__).parent / "images"
def ascension(images, texts: list[str], args):
frame = BuildImage.open(img_dir / "0.png")
... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/ask/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:56.007057 | from datetime import datetime
from PIL import ImageFilter
from pil_utils import BuildImage, Text2Image
from pil_utils.gradient import ColorStop, LinearGradient
from meme_generator import MemeArgsModel, add_meme
from meme_generator.exception import TextOrNameNotEnough, TextOverLength
def ask(images: list[BuildImage]... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/atri_pillow/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:56.118273 | import random
from datetime import datetime
from pathlib import Path
from typing import Literal
from arclet.alconna import store_value
from pil_utils import BuildImage
from pydantic import Field
from meme_generator import MemeArgsModel, MemeArgsType, ParserOption, add_meme
from meme_generator.exception import TextOve... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/always/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:56.120076 | from datetime import datetime
from typing import Literal
from arclet.alconna import store_value
from pil_utils import BuildImage
from pydantic import Field
from meme_generator import (
CommandShortcut,
MemeArgsModel,
MemeArgsType,
ParserArg,
ParserOption,
add_meme,
)
from meme_generator.utils ... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/abstinence/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:56.257231 | from datetime import datetime
from pathlib import Path
import dateparser
from pil_utils import BuildImage
from pydantic import Field
from meme_generator import (
MemeArgsModel,
MemeArgsType,
ParserArg,
ParserOption,
add_meme,
)
from meme_generator.exception import TextOverLength
img_dir = Path(__... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/ayachi_holdsign/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:56.367446 | from datetime import datetime
from pathlib import Path
from PIL import ImageFilter
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.exception import TextOverLength
from meme_generator.tags import MemeTags
img_dir = Path(__file__).parent / "images"
def ayachi_holdsign(images,... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/ba_say/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:56.462035 | import random
from dataclasses import dataclass
from datetime import datetime
from pathlib import Path
from typing import Literal
from arclet.alconna import store_value
from PIL.Image import Transpose
from pil_utils import BuildImage
from pydantic import Field
from meme_generator import (
CommandShortcut,
Mem... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/back_to_work/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:56.497669 | from datetime import datetime
from pathlib import Path
from pil_utils import BuildImage
from meme_generator import add_meme
img_dir = Path(__file__).parent / "images"
def back_to_work(images: list[BuildImage], texts, args):
frame = BuildImage.open(img_dir / "0.png")
img = (
images[0].convert("RGBA"... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/backflip/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:56.519063 | import math
from datetime import datetime
from pathlib import Path
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.utils import FrameAlignPolicy, Maker, make_gif_or_combined_gif
img_dir = Path(__file__).parent / "images"
def backflip(images: list[BuildImage], texts, args):
... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/bad_news/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:56.549554 | from datetime import datetime
from pathlib import Path
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.exception import TextOverLength
img_dir = Path(__file__).parent / "images"
def bad_news(images, texts: list[str], args):
text = texts[0]
frame = BuildImage.open(im... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/beat_head/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:56.592154 | from datetime import datetime
from pathlib import Path
from PIL.Image import Image as IMG
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.exception import TextOverLength
from meme_generator.utils import save_gif
img_dir = Path(__file__).parent / "images"
default_text = "怎么说话... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/beat_up/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:56.983977 | from datetime import datetime
from pathlib import Path
from PIL.Image import Image as IMG
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.tags import MemeTags
from meme_generator.utils import save_gif
img_dir = Path(__file__).parent / "images"
def beat_up(images: list[Build... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/bite/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:57.097046 | from datetime import datetime
from pathlib import Path
from PIL.Image import Image as IMG
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.utils import save_gif
img_dir = Path(__file__).parent / "images"
def bite(images: list[BuildImage], texts, args):
img = images[0].co... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/blamed_mahiro/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:57.367735 | from datetime import datetime
from pathlib import Path
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.exception import TextOverLength
from meme_generator.tags import MemeTags
from meme_generator.utils import save_gif
img_dir = Path(__file__).parent / "images"
def blamed_ma... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/capoo_draw/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:57.551269 | from datetime import datetime
from pathlib import Path
from PIL.Image import Image as IMG
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.tags import MemeTags
from meme_generator.utils import save_gif
img_dir = Path(__file__).parent / "images"
def capoo_draw(images: list[Bu... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/capoo_point/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:57.675080 | from datetime import datetime
from pathlib import Path
from PIL.Image import Image as IMG
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.tags import MemeTags
from meme_generator.utils import save_gif
img_dir = Path(__file__).parent / "images"
def capoo_point(images: list[B... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/capoo_rip/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:57.990140 | from datetime import datetime
from pathlib import Path
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.tags import MemeTags
from meme_generator.utils import save_gif
img_dir = Path(__file__).parent / "images"
def capoo_rip(images: list[BuildImage], texts, args):... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/blood_pressure/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:58.112214 | from datetime import datetime
from pathlib import Path
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.utils import make_jpg_or_gif
img_dir = Path(__file__).parent / "images"
def blood_pressure(images: list[BuildImage], texts, args):
frame = BuildImage.open(img_dir / "0... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/capoo_rub/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:58.225035 | from datetime import datetime
from pathlib import Path
from PIL.Image import Image as IMG
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.tags import MemeTags
from meme_generator.utils import save_gif
img_dir = Path(__file__).parent / "images"
def capoo_rub(images: list[Bui... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/capoo_say/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:58.516187 | from datetime import datetime
from pathlib import Path
from PIL.Image import Image as IMG
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.exception import TextOverLength
from meme_generator.tags import MemeTags
from meme_generator.utils import save_gif
img_dir = Path(__file__... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/capoo_stew/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:58.628905 | import datetime
from pathlib import Path
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.tags import MemeTags
from meme_generator.utils import FrameAlignPolicy, Maker, make_gif_or_combined_gif
img_dir = Path(__file__).parent / "images"
def capoo_stew(images: list[BuildImage... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/capoo_strike/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:30:58.731477 | from datetime import datetime
from pathlib import Path
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.tags import MemeTags
from meme_generator.utils import FrameAlignPolicy, Maker, make_gif_or_combined_gif
img_dir = Path(__file__).parent / "images"
def capoo_strike(images:... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/always_like/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:00.926281 | import random
from datetime import datetime
from pathlib import Path
from pil_utils import BuildImage, Text2Image
from meme_generator import MemeArgsModel, add_meme
from meme_generator.exception import TextOrNameNotEnough, TextOverLength
img_dir = Path(__file__).parent / "images"
def always_like(images: list[Build... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/bronya_holdsign/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:02.150911 | from datetime import datetime
from pathlib import Path
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.exception import TextOverLength
from meme_generator.tags import MemeTags
img_dir = Path(__file__).parent / "images"
def bronya_holdsign(images, texts: list[str], args):
... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/bocchi_draft/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:02.201812 | from datetime import datetime
from pathlib import Path
from PIL.Image import Image as IMG
from pil_utils import BuildImage
from meme_generator import add_meme
from meme_generator.tags import MemeTags
from meme_generator.utils import save_gif
img_dir = Path(__file__).parent / "images"
def bocchi_draft(images: list[... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/call_110/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:02.251839 | from datetime import datetime
from pil_utils import BuildImage
from meme_generator import add_meme
def call_110(images: list[BuildImage], texts, args):
img1 = images[0].convert("RGBA").square().resize((250, 250))
img0 = images[1].convert("RGBA").square().resize((250, 250))
frame = BuildImage.new("RGB",... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/bluearchive/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:02.302766 | from datetime import datetime
from pathlib import Path
from PIL.Image import Image as IMG
from PIL.Image import Resampling, Transform
from pil_utils import BuildImage, Text2Image
from meme_generator import add_meme
from meme_generator.tags import MemeTags
img_dir = Path(__file__).parent / "images"
def bluearchive(... |
MemeCrafters/meme-generator | https://github.com/MemeCrafters/meme-generator | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | meme_generator/memes/bubble_tea/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:02.364631 | from datetime import datetime
from pathlib import Path
from typing import Literal
from arclet.alconna import store_value
from PIL.Image import Transpose
from pil_utils import BuildImage
from pydantic import Field
from meme_generator import (
MemeArgsModel,
MemeArgsType,
ParserArg,
ParserOption,
ad... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/conftest.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:04.247659 | """
Cleanup scripts that are run after tests are done.
"""
from pathlib import Path
import pytest
def remove_directories(directory):
"""
Recursively remove directories created by `pytest`.
Parameters
----------
directory: Path
Returns
-------
None
"""
directory = Path(dir... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_analytics/test_Wordcloud.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:04.249224 | """
Testing `Wordcloud.py`.
"""
from urs.analytics import Wordcloud
class TestSetUpWordcloudInitializeWordcloudMethod:
"""
Testing SetUpWordcloud class initialize_wordcloud() method.
"""
def test_initialize_wordcloud_method(self):
pass
class TestSetUpWordcloudModifyWordcloudMethod:
""... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_analytics/test_utils/test_PrepData.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:04.265490 | """
Testing `PrepData.py`.
"""
from urs.analytics.utils import PrepData
class TestGetPathGetScrapeTypeMethod:
"""
Testing GetPath class get_scrape_type() method.
"""
def test_get_scrape_type_method_valid_filepath(self):
test_path = "../scrapes/some_date/test/some_other_dir/some_file.json"
... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_analytics/test_Frequencies.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:04.311510 | """
Testing `Frequencies.py`.
"""
from urs.analytics import Frequencies
class TestSortGetDataMethod:
"""
Testing Sort class get_data() method.
"""
def test_get_data_method(self):
pass
class TestSortNameAndCreateDirMethod:
"""
Testing Sort class name_and_create_dir() method.
""... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_praw_scrapers/test_live_scrapers/test_Livestream.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:04.375104 | """
Testing `Livestream.py`.
"""
import argparse
import os
import types
import praw
from dotenv import load_dotenv
from urs.praw_scrapers.live_scrapers import Livestream
from urs.utils.Global import date
class MakeArgs:
"""
Making dummy args to test Comments.py methods.
"""
@staticmethod
def ... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_praw_scrapers/test_static_scrapers/test_Redditor.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:04.921838 | """
Testing `Redditor.py`.
"""
import os
import praw
from dotenv import load_dotenv
from urs.praw_scrapers.static_scrapers import Redditor
from urs.utils import Global
class Login:
"""
Create a Reddit object with PRAW API credentials.
"""
@staticmethod
def create_reddit_object():
load... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_praw_scrapers/test_live_scrapers/test_utils/test_StreamGenerator.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:04.941986 | """
Testing `StreamGenerator.py`.
"""
import os
import types
import praw
from dotenv import load_dotenv
from urs.praw_scrapers.live_scrapers.utils import StreamGenerator
class Login:
"""
Create a Reddit object with PRAW API credentials.
"""
@staticmethod
def create_reddit_object():
lo... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_praw_scrapers/test_static_scrapers/test_Comments.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:04.943537 | """
Testing `Comments.py`.
"""
import argparse
import os
import praw
from dotenv import load_dotenv
from urs.praw_scrapers.static_scrapers import Comments
class MakeArgs:
"""
Making dummy args to test Comments.py methods.
"""
@staticmethod
def parser_for_testing():
parser = argparse.A... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_praw_scrapers/test_static_scrapers/test_Basic.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:04.945761 | import argparse
import sys
from io import StringIO
from urs.praw_scrapers.static_scrapers import Basic
### Function names are pretty self-explanatory, so I will not be adding comments
### above the functions.
### Includes a total of 30 tests.
class MakeArgs:
"""
Making dummy args to test Basic.py functions... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_praw_scrapers/test_live_scrapers/test_utils/test_DisplayStream.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:04.971195 | """
Testing `DisplayStream.py`.
"""
from prettytable import PrettyTable
from urs.praw_scrapers.live_scrapers.utils import DisplayStream
class CreatePrettyTable:
"""
Create a PrettyTable for testing.
"""
@staticmethod
def create():
pretty_stream = PrettyTable()
pretty_stream.fie... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_praw_scrapers/test_utils/test_Objectify.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:05.148992 | """
Testing `Subreddit.py`.
"""
from urs.praw_scrapers.utils.Objectify import Objectify
class CreateObject:
"""
Creating a fake Reddit object for testing.
"""
def __init__(self, metadata):
for key, value in metadata.items():
self.__setattr__(key, value)
class TestObjectifyMake... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_praw_scrapers/test_static_scrapers/test_Subreddit.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:05.150078 | """
Testing `Subreddit.py`.
"""
import argparse
import os
import praw
from dotenv import load_dotenv
from prettytable import PrettyTable
from urs.praw_scrapers.static_scrapers import Subreddit
from urs.utils import Global
class MakeArgs:
"""
Making dummy args to test Comments.py methods.
"""
@sta... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_utils/test_Cli.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:05.720547 | """
Testing `Cli.py`.
"""
import argparse
import re
import sys
import pytest
from urs.utils import Cli, Global
from urs.Version import __version__
class MakeArgs:
"""
Making dummy args to test Cli.py methods.
"""
@staticmethod
def parser_for_testing_cli():
parser = argparse.ArgumentPa... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_praw_scrapers/test_utils/test_Validation.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:05.751320 | """
Testing `Validation.py`.
"""
import argparse
import os
import praw
from dotenv import load_dotenv
from urs.praw_scrapers.utils.Validation import Validation
class MakeArgs:
"""
Making dummy args to test Comments.py methods.
"""
@staticmethod
def parser_for_testing():
parser = argpa... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_utils/test_DirInit.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:05.924754 | """
Testing `DirInit.py`.
"""
import os
from urs.utils.DirInit import InitializeDirectory
class TestInitializeDirectoryCreateDirsMethod:
"""
Testing InitializeDirectory class create_dirs() method.
"""
def test_create_dirs_method(self):
test_path = "../scrapes/test_dir/another_test_dir/a_fi... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_utils/test_Tools.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:05.927682 | """
Testing `Tools.py`.
"""
import argparse
import os
import praw
from dotenv import load_dotenv
from urs.utils import Global, Tools
class Login:
"""
Create a Reddit object with PRAW API credentials.
"""
@staticmethod
def create_reddit_object():
load_dotenv()
return praw.Redd... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | urs/Urs.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:05.928992 | #!/usr/bin/python
"""
URS
===
URS, an acronym for "Universal Reddit Scraper", is a comprehensive Reddit scraping
command-line tool written in Python.
* Scrape Reddit via PRAW (the official Python Reddit API Wrapper)
+ Scrape Subreddits
+ Scrape Redditors
+ Scrape submission comments
* Livestream Reddit... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_utils/test_Global.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:05.930084 | """
Testing `Global.py`.
"""
import datetime as dt
from urs.utils import Global
class TestGlobalVariables:
"""
Testing all global variables in Global.py.
"""
def test_date_variable(self):
assert Global.date == dt.datetime.now().strftime("%Y-%m-%d")
def test_subreddit_categories_list(s... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_utils/test_Utilities.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:05.931089 | """
Testing `Utilities.py`.
"""
import os
from rich.tree import Tree
from urs.utils.Utilities import DateTree
class TestDateTreeCheckDateFormatMethod:
"""
Testing DateTree class _check_date_format() method.
"""
def test_check_date_format_dash_format(self):
test_date = "06-28-2021"
... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | tests/test_utils/test_Export.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:05.932083 | """
Testing `Export.py`.
"""
import argparse
import csv
import json
import os
import sys
from urs.utils.Export import EncodeNode, Export, NameFile
from urs.utils.Global import categories, date, short_cat
class MakeArgs:
"""
Making dummy args to test Export.py functions.
"""
@staticmethod
def p... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | urs/analytics/Frequencies.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:06.750817 | """
Frequencies generator
=====================
Get frequencies for words that are found in submission titles, bodies, and/or
comments within scraped data.
"""
from argparse import Namespace
from typing import Any, Dict, List, Literal, Tuple, Union
from colorama import Fore, Style
from halo import Halo
from urs.ana... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | urs/praw_scrapers/live_scrapers/Livestream.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:07.240492 | """
Livestream
==========
Defining methods for livestreaming a Subreddit or Redditor's comments and/or
submissions.
"""
import json
import logging
import os
import time
from argparse import Namespace
from typing import Any, Dict, Generator, List, Literal, Tuple, Union
from colorama import Fore, Style
from halo impo... |
JosephLai241/URS | https://github.com/JosephLai241/URS | null | null | null | null | 989 | null | null | mit | null | null | null | null | null | null | null | urs/analytics/utils/PrepData.py | null | null | null | null | null | null | Python | 2026-05-04T01:31:07.798199 | """
Preparing data for analytical tools
===================================
Helper methods to prepare data for frequencies and wordcloud generators.
"""
import json
from pathlib import Path
from typing import Any, Dict, List, Tuple
from urs.utils.DirInit import InitializeDirectory
from urs.utils.Global import Status... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.