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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LeoYeAI/openclaw-master-skills | https://github.com/LeoYeAI/openclaw-master-skills | null | null | null | null | 1,968 | null | null | mit | null | null | null | null | null | null | null | skills/app-store-optimization/scripts/localization_helper.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:22.111895 | """
Localization helper module for App Store Optimization.
Manages multi-language ASO optimization strategies.
"""
from typing import Dict, List, Any, Optional, Tuple
class LocalizationHelper:
"""Helps manage multi-language ASO optimization."""
# Priority markets by language (based on app store revenue and ... |
LeoYeAI/openclaw-master-skills | https://github.com/LeoYeAI/openclaw-master-skills | null | null | null | null | 1,968 | null | null | mit | null | null | null | null | null | null | null | skills/app-store-optimization/scripts/review_analyzer.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:22.113064 | """
Review analysis module for App Store Optimization.
Analyzes user reviews for sentiment, issues, and feature requests.
"""
from typing import Dict, List, Any, Optional, Tuple
from collections import Counter
import re
class ReviewAnalyzer:
"""Analyzes user reviews for actionable insights."""
# Sentiment k... |
LeoYeAI/openclaw-master-skills | https://github.com/LeoYeAI/openclaw-master-skills | null | null | null | null | 1,968 | null | null | mit | null | null | null | null | null | null | null | skills/app-store-optimization/scripts/launch_checklist.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:22.796332 | """
Launch checklist module for App Store Optimization.
Generates comprehensive pre-launch and update checklists.
"""
from typing import Dict, List, Any, Optional
from datetime import datetime, timedelta
class LaunchChecklistGenerator:
"""Generates comprehensive checklists for app launches and updates."""
d... |
LeoYeAI/openclaw-master-skills | https://github.com/LeoYeAI/openclaw-master-skills | null | null | null | null | 1,968 | null | null | mit | null | null | null | null | null | null | null | skills/autoresearch-agent/evaluators/llm_judge_content.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:23.205238 | #!/usr/bin/env python3
"""LLM judge for content quality (headlines, titles, descriptions).
Uses the user's existing CLI tool (claude, codex, gemini) for evaluation.
DO NOT MODIFY after experiment starts — this is the fixed evaluator."""
import subprocess
import sys
from pathlib import Path
# --- CONFIGURE THESE ---
T... |
LeoYeAI/openclaw-master-skills | https://github.com/LeoYeAI/openclaw-master-skills | null | null | null | null | 1,968 | null | null | mit | null | null | null | null | null | null | null | skills/autoresearch-agent/evaluators/build_speed.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:23.276178 | #!/usr/bin/env python3
"""Measure build/compile time.
DO NOT MODIFY after experiment starts — this is the fixed evaluator."""
import subprocess
import sys
import time
# --- CONFIGURE THESE ---
BUILD_CMD = "npm run build" # or: docker build -t test .
CLEAN_CMD = "" # optional: npm run clean (run bef... |
LeoYeAI/openclaw-master-skills | https://github.com/LeoYeAI/openclaw-master-skills | null | null | null | null | 1,968 | null | null | mit | null | null | null | null | null | null | null | skills/autoresearch-agent/evaluators/benchmark_speed.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:23.276960 | #!/usr/bin/env python3
"""Measure execution speed of a target function or command.
DO NOT MODIFY after experiment starts — this is the fixed evaluator."""
import statistics
import subprocess
import sys
import time
# --- CONFIGURE THESE ---
COMMAND = "python src/module.py" # Command to benchmark
RUNS = 5 ... |
LeoYeAI/openclaw-master-skills | https://github.com/LeoYeAI/openclaw-master-skills | null | null | null | null | 1,968 | null | null | mit | null | null | null | null | null | null | null | skills/autoresearch-agent/scripts/run_experiment.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:23.448626 | #!/usr/bin/env python3
"""
autoresearch-agent: Experiment Runner
Executes a single experiment iteration. The AI agent is the loop —
it calls this script repeatedly. The script handles evaluation,
metric parsing, keep/discard decisions, and git rollback on failure.
Usage:
python scripts/run_experiment.py --experim... |
LeoYeAI/openclaw-master-skills | https://github.com/LeoYeAI/openclaw-master-skills | null | null | null | null | 1,968 | null | null | mit | null | null | null | null | null | null | null | skills/autoresearch-agent/scripts/setup_experiment.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:23.560884 | #!/usr/bin/env python3
"""
autoresearch-agent: Setup Experiment
Initialize a new experiment with domain, target, evaluator, and git branch.
Creates the .autoresearch/{domain}/{name}/ directory structure.
Usage:
python scripts/setup_experiment.py --domain engineering --name api-speed \
--target src/api/sea... |
LeoYeAI/openclaw-master-skills | https://github.com/LeoYeAI/openclaw-master-skills | null | null | null | null | 1,968 | null | null | mit | null | null | null | null | null | null | null | skills/autoresearch-agent/evaluators/llm_judge_copy.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:27.870895 | #!/usr/bin/env python3
"""LLM judge for marketing copy (social posts, ads, emails).
Uses the user's existing CLI tool for evaluation.
DO NOT MODIFY after experiment starts — this is the fixed evaluator."""
import subprocess
import sys
from pathlib import Path
# --- CONFIGURE THESE ---
TARGET_FILE = "posts.md" ... |
LeoYeAI/openclaw-master-skills | https://github.com/LeoYeAI/openclaw-master-skills | null | null | null | null | 1,968 | null | null | mit | null | null | null | null | null | null | null | skills/autoresearch-agent/evaluators/memory_usage.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:27.901166 | #!/usr/bin/env python3
"""Measure peak memory usage of a command.
DO NOT MODIFY after experiment starts — this is the fixed evaluator."""
import platform
import subprocess
import sys
# --- CONFIGURE THESE ---
COMMAND = "python src/module.py" # Command to measure
# --- END CONFIG ---
system = platform.system()
if s... |
LeoYeAI/openclaw-master-skills | https://github.com/LeoYeAI/openclaw-master-skills | null | null | null | null | 1,968 | null | null | mit | null | null | null | null | null | null | null | skills/autoresearch-agent/scripts/log_results.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:27.901823 | #!/usr/bin/env python3
"""
autoresearch-agent: Results Viewer
View experiment results in multiple formats: terminal, CSV, Markdown.
Supports single experiment, domain, or cross-experiment dashboard.
Usage:
python scripts/log_results.py --experiment engineering/api-speed
python scripts/log_results.py --domain ... |
LeoYeAI/openclaw-master-skills | https://github.com/LeoYeAI/openclaw-master-skills | null | null | null | null | 1,968 | null | null | mit | null | null | null | null | null | null | null | skills/autoresearch-agent/evaluators/llm_judge_prompt.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:28.015359 | #!/usr/bin/env python3
"""LLM judge for prompt/instruction quality.
Uses the user's existing CLI tool for evaluation.
DO NOT MODIFY after experiment starts — this is the fixed evaluator."""
import json
import subprocess
import sys
from pathlib import Path
# --- CONFIGURE THESE ---
TARGET_FILE = "prompt.md" #... |
LeoYeAI/openclaw-master-skills | https://github.com/LeoYeAI/openclaw-master-skills | null | null | null | null | 1,968 | null | null | mit | null | null | null | null | null | null | null | skills/autoresearch-agent/evaluators/test_pass_rate.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:28.081072 | #!/usr/bin/env python3
"""Measure test suite pass rate.
DO NOT MODIFY after experiment starts — this is the fixed evaluator."""
import re
import subprocess
import sys
# --- CONFIGURE THESE ---
TEST_CMD = "pytest tests/ --tb=no -q" # Test command
# --- END CONFIG ---
result = subprocess.run(TEST_CMD, shell=True, cap... |
openai/maddpg | https://github.com/openai/maddpg | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | experiments/train.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:30.444265 | import argparse
import numpy as np
import tensorflow as tf
import time
import pickle
import maddpg.common.tf_util as U
from maddpg.trainer.maddpg import MADDPGAgentTrainer
import tensorflow.contrib.layers as layers
def parse_args():
parser = argparse.ArgumentParser("Reinforcement Learning experiments for multiage... |
openai/maddpg | https://github.com/openai/maddpg | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | maddpg/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:30.444835 | class AgentTrainer(object):
def __init__(self, name, model, obs_shape, act_space, args):
raise NotImplemented()
def action(self, obs):
raise NotImplemented()
def process_experience(self, obs, act, rew, new_obs, done, terminal):
raise NotImplemented()
def preupdate(self):
... |
openai/maddpg | https://github.com/openai/maddpg | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | setup.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:30.445745 | from setuptools import setup, find_packages
setup(name='maddpg',
version='0.0.1',
description='Multi-Agent Deep Deterministic Policy Gradient',
url='https://github.com/openai/maddpg',
author='Igor Mordatch',
author_email='mordatch@openai.com',
packages=find_packages(),
include... |
openai/maddpg | https://github.com/openai/maddpg | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | maddpg/trainer/replay_buffer.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:30.447487 | import numpy as np
import random
class ReplayBuffer(object):
def __init__(self, size):
"""Create Prioritized Replay buffer.
Parameters
----------
size: int
Max number of transitions to store in the buffer. When the buffer
overflows the old memories are dropp... |
openai/maddpg | https://github.com/openai/maddpg | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | maddpg/common/distributions.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:30.452824 | import tensorflow as tf
import numpy as np
import maddpg.common.tf_util as U
from tensorflow.python.ops import math_ops
from multiagent.multi_discrete import MultiDiscrete
from tensorflow.python.ops import nn
class Pd(object):
"""
A particular probability distribution
"""
def flatparam(self):
r... |
openai/maddpg | https://github.com/openai/maddpg | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | maddpg/common/tf_util.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:30.455376 | import collections
import numpy as np
import os
import tensorflow as tf
def sum(x, axis=None, keepdims=False):
return tf.reduce_sum(x, axis=None if axis is None else [axis], keep_dims = keepdims)
def mean(x, axis=None, keepdims=False):
return tf.reduce_mean(x, axis=None if axis is None else [axis], keep_dims =... |
openai/maddpg | https://github.com/openai/maddpg | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | maddpg/trainer/maddpg.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:30.467582 | import numpy as np
import random
import tensorflow as tf
import maddpg.common.tf_util as U
from maddpg.common.distributions import make_pdtype
from maddpg import AgentTrainer
from maddpg.trainer.replay_buffer import ReplayBuffer
def discount_with_dones(rewards, dones, gamma):
discounted = []
r = 0
for re... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | benchmarking/FeynmanBenchmark/feynman_make_run_file.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:36.387801 | import argparse
# Internal imports
import physo.benchmark.FeynmanDataset.FeynmanProblem as Feyn
# Local imports
from benchmarking import utils as bu
import feynman_config as fconfig
# ---------------------------------------------------- SCRIPT ARGS -----------------------------------------------------
parser = argpa... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | benchmarking/ClassBenchmark/classbench_make_run_file.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:36.405243 | import argparse
# Internal imports
import physo.benchmark.ClassDataset.ClassProblem as ClPb
# Local imports
from benchmarking import utils as bu
import classbench_config as fconfig
# ---------------------------------------------------- SCRIPT ARGS -----------------------------------------------------
parser = argpar... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | benchmarking/ClassBenchmark/classbench_run.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:36.411882 | import numpy as np
import torch
import pandas as pd
import matplotlib.pyplot as plt
import os
import matplotlib as mpl
import argparse
# Internal imports
import physo.benchmark.ClassDataset.ClassProblem as ClPb
import physo
# Local imports
import classbench_config as fconfig
# Parallel config :
# Parallel mode may c... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | benchmarking/ClassBenchmark/classbench_results_analysis.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:36.423380 | import warnings
import numpy as np
import sympy
import pandas as pd
import argparse
import os
import time
import platform
import torch
import matplotlib.pyplot as plt
# Internal imports
import physo.benchmark.ClassDataset.ClassProblem as ClPb
import physo.benchmark.utils.symbolic_utils as su
import physo.benchmark.uti... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | benchmarking/ClassBenchmark/classbench_config.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:36.425155 | import numpy as np
import physo.benchmark.ClassDataset.ClassProblem as ClPb
import physo
# Nb of trials per problem
N_TRIALS = 5
# Noise levels
NOISE_LEVELS = [0.000, 0.001, 0.010, 0.100,]
# Nb of realizations
N_REALIZATIONS = [1, 10]
# Using original variable names (eg. theta, sigma etc.), not x0, x1 etc.
ORIGINA... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | benchmarking/utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:36.427767 | def make_jobfile_from_command_list(jobfile_path, commands):
"""
Save a jobfile containing commands to run.
Parameters
----------
jobfile_path : str or path
commands : list of str
"""
# Creating a jobfile containing all commands to run
jobfile_content = ''.join('%s\n' % com for com in... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | benchmarking/FeynmanBenchmark/feynman_results_analysis.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:36.430707 | import warnings
import numpy as np
import sympy
import pandas as pd
import argparse
import os
import time
import platform
try:
import scipy.stats as st
except:
raise ImportError("Scipy not found. Please install it for results analysis with eg.: conda install scipy")
# Internal imports
import physo.benchmark.... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | benchmarking/FeynmanBenchmark/feynman_run_efficiency_curve.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:36.432887 | import argparse
import numpy as np
import time as time
import torch as torch
import torch.multiprocessing as mp
import matplotlib.pyplot as plt
import platform
import socket
# Internal imports
import physo.physym.reward
from physo.physym import batch_execute as BExec
from physo.physym import library as Lib
from physo... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | benchmarking/FeynmanBenchmark/feynman_config.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:36.434509 | import numpy as np
import physo.benchmark.FeynmanDataset.FeynmanProblem as Feyn
import physo
# Nb of trials per problem
N_TRIALS = 5
# Equations that are excluded in SRBench (see section Feynman datasets of https://arxiv.org/abs/2107.14351)
EXCLUDED_IN_SRBENCH_EQS_FILENAMES = ['I.26.2', 'I.30.5', 'II.11.17', 'test_10... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | benchmarking/FeynmanBenchmark/feynman_run.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:36.445615 | import numpy as np
import torch
import pandas as pd
import matplotlib.pyplot as plt
import os
import matplotlib as mpl
import argparse
# Internal imports
import physo.benchmark.FeynmanDataset.FeynmanProblem as Feyn
import physo
# Local imports
import feynman_config as fconfig
# Parallel config :
# Parallel mode may ... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | demos/class_sr/demo_free_fall/demo_free_fall.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:36.993866 | #!/usr/bin/env python
# coding: utf-8
# # $\Phi$-SO demo : Free fall
# ## Package import
# In[1]:
# External packages
import numpy as np
import matplotlib.pyplot as plt
import torch
# In[2]:
# Internal code import
import physo
import physo.learn.monitoring as monitoring
if __name__ == '__main__':
# ## Fi... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | demos/class_sr/demo_milky_way_streams/MW_streams_make_run_file.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:37.024802 | from benchmarking import utils as bu
# Expected performances on unistra HPC
# With N_SAMPLES = 1e3
# With 1M expressions -> each run .log -> 400 Mo
# Output jobfile name
PATH_OUT_JOBFILE = "jobfile"
# BENCHMARKING PARAMETERS
N_TRIALS = 12
NOISE_LEVELS = [0., 0.001, 0.01, 0.1]
eps = 1e-6 # -> Will resul... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | demos/class_sr/demo_milky_way_streams/MW_streams_results_analysis.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:37.037926 | import os
import pandas as pd
import time
import argparse
import numpy as np
import sympy
import platform
import torch
# Internal imports
from physo.benchmark.utils import symbolic_utils as su
import physo.benchmark.utils.metrics_utils as metrics_utils
import physo.benchmark.utils.timeout_unix as timeout_unix
from ben... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | demos/class_sr/demo_milky_way_streams/MW_streams_run.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:37.083333 | #!/usr/bin/env python
# coding: utf-8
# # $\Phi$-SO demo : Milky Way potential from stellar streams
# In[ ]:
#%matplotlib widget
# External packages
import torch
import numpy as np
import pandas as pd
import os
import argparse
# Plotting
import matplotlib as mpl
import matplotlib.pyplot as plt
# Internal code impor... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | demos/sr/_deprecated-interface/demo_mechanical_energy/demo_mechanical_energy.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:37.085015 | #!/usr/bin/env python
# coding: utf-8
# # $\Phi$-SO demo
# ## Packages import
# In[1]:
# External packages
import torch
import numpy as np
# Pyplot
import matplotlib.pyplot as plt
# Internal code import
import physo
from physo.learn import monitoring
from physo.task import checks
# In[2]:
if __name__ == '__ma... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | demos/class_sr_quick_start.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:37.093600 | #!/usr/bin/env python
# coding: utf-8
# # $\Phi$-SO demo : Class SR quick start
# ## Class SR definition
# Class Symbolic Regression:
# Automatically finding a single analytical functional form that accurately fits multiple datasets - each governed by its own (possibly) unique set of fitting parameters.
# This hiera... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | demos/sr/_deprecated-interface/demo_damped_harmonic_oscillator/demo_damped_harmonic_oscillator.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:37.095228 | #!/usr/bin/env python
# coding: utf-8
# # $\Phi$-SO demo
# ## Packages import
# In[1]:
# External packages
import torch
import numpy as np
# Pyplot
import matplotlib.pyplot as plt
# Internal code import
import physo
from physo.learn import monitoring
from physo.task import checks
# In[1]:
if __name__ == '__ma... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | demos/sr/_deprecated-interface/demos_natural_const_discovery/demo_classical_gravity/demo_classical_gravity.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:37.123812 | #!/usr/bin/env python
# coding: utf-8
# # $\Phi$-SO demo
# ## Packages import
# In[1]:
# External packages
import torch
import numpy as np
# Pyplot
import matplotlib.pyplot as plt
# Internal code import
import physo
from physo.learn import monitoring
from physo.task import checks
# In[2]:
# Device
DEVICE = ... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | demos/sr/_deprecated-interface/demos_natural_const_discovery/demo_planck_law_nphotons/demo_planck_law_nphotons.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:37.125316 | #!/usr/bin/env python
# coding: utf-8
# # $\Phi$-SO demo
# ## Packages import
# In[1]:
# External packages
import torch
import numpy as np
# Pyplot
import matplotlib.pyplot as plt
# Internal code import
import physo
from physo.learn import monitoring
from physo.task import checks
# In[2]:
# Device
DEVICE = ... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | demos/sr/_deprecated-interface/demos_natural_const_discovery/demo_ideal_gas_law/demo_ideal_gas_law.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:37.129026 | #!/usr/bin/env python
# coding: utf-8
# # $\Phi$-SO demo
# ## Packages import
# In[1]:
# External packages
import torch
import numpy as np
# Pyplot
import matplotlib.pyplot as plt
# Internal code import
import physo
from physo.learn import monitoring
from physo.task import checks
# In[2]:
# Device
DEVICE = ... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | demos/sr/demo_damped_harmonic_oscillator/demo_damped_harmonic_oscillator.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:37.632103 | #!/usr/bin/env python
# coding: utf-8
# # $\Phi$-SO demo : Damped harmonic oscillator
# In[1]:
# External packages
import numpy as np
import matplotlib.pyplot as plt
import torch
# In[2]:
# Internal code import
import physo
import physo.learn.monitoring as monitoring
if __name__ == '__main__':
# ## Fixing... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | demos/sr/_deprecated-interface/demos_natural_const_discovery/demo_wave_interferences/demo_wave_interferences.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:37.667140 | #!/usr/bin/env python
# coding: utf-8
# # $\Phi$-SO demo
# ## Packages import
# In[1]:
# External packages
import torch
import numpy as np
# Pyplot
import matplotlib.pyplot as plt
# Internal code import
import physo
from physo.learn import monitoring
from physo.task import checks
# Guard for spawn systems (typ... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | demos/sr/_deprecated-interface/demos_natural_const_discovery/demo_terminal_velocity/demo_terminal_velocity.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:37.668505 | #!/usr/bin/env python
# coding: utf-8
# # $\Phi$-SO demo
# ## Packages import
# In[1]:
# External packages
import torch
import numpy as np
# Pyplot
import matplotlib.pyplot as plt
# Internal code import
import physo
from physo.learn import monitoring
from physo.task import checks
# Guard for spawn systems (ty... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | docs/source/conf.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:37.730816 | # Configuration file for the Sphinx documentation builder.
import datetime
curr_year = str(datetime.date.today().year)
# -- Project information
project = 'PhySO'
copyright = '%s, Wassim Tenachi'%(curr_year)
author = 'Wassim Tenachi'
# -- General configuration
extensions = [
'sphinx.ext.duration',
'sphinx.ex... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | demos/sr_quick_start.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:37.731361 | #!/usr/bin/env python
# coding: utf-8
# # $\Phi$-SO demo : SR quick start
# ## SR definition
# Symbolic regression (SR) consists in the inference of a free-form symbolic analytical function $f: \mathbb{R}^n \longrightarrow \mathbb{R}$ that fits $y = f(x_0,..., x_n)$ given $(x_0,..., x_n, y)$ data.
# ![sr_framework.... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | physo/benchmark/ClassDataset/tests/ClassProblem_UnitTest.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:37.739798 | import time
import unittest
import numpy as np
import torch
# Internal imports
import physo.benchmark.ClassDataset.ClassProblem as Class
class ClassProblemTest(unittest.TestCase):
def test_loading_csv(self):
# Loading equations
try:
df = Class.load_class_equations_csv(Class.PATH_CLAS... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | physo/benchmark/ClassDataset/ClassProblem.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:37.742908 | import pandas as pd
import numpy as np
import pathlib
import sympy
import matplotlib.pyplot as plt
# Internal imports
from physo.benchmark.utils import symbolic_utils as su
# Dataset paths
PARENT_FOLDER = pathlib.Path(__file__).parents[0]
PATH_CLASS_EQS_CSV = PARENT_FOLDER / "ClassEquations.csv"
# -----------------... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | physo/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:37.763197 | from . import physym
from . import learn
from . import task
from . import config
from . import benchmark
from . import toolkit
# Making important interface functions available at root level
fit = task.fit.fit
SR = task.sr.SR
ClassSR = task.class_sr.ClassSR
# User level log loading tools
read_pareto_csv = benchmark.ut... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | physo/benchmark/FeynmanDataset/FeynmanProblem.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:38.336119 | import pandas as pd
import numpy as np
import pathlib
import sympy
import matplotlib.pyplot as plt
# Internal imports
from physo.benchmark.utils import symbolic_utils as su
# Dataset paths
PARENT_FOLDER = pathlib.Path(__file__).parents[0]
PATH_FEYNMAN_EQS_CSV = PARENT_FOLDER / "FeynmanEquations.csv"
PATH_FEYNMA... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | physo/benchmark/FeynmanDataset/tests/FeynmanProblem_UnitTest.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:38.363620 | import time
import unittest
import numpy as np
import torch
# Internal imports
import physo.benchmark.FeynmanDataset.FeynmanProblem as Feyn
class FeynmanProblemTest(unittest.TestCase):
def test_loading_csv(self):
# Loading bulk equations
try:
bulk_df = Feyn.load_feynman_bulk_equations_... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | physo/benchmark/utils/symbolic_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:38.378847 | import sympy
import numpy as np
import warnings
# ----------------------------------------------------------------------------------------------------------------------
# ------------------------------------------------- EQUIVALENCE UTILS -------------------------------------------------
# ---------------------------... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | physo/benchmark/utils/metrics_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:38.386413 | import numpy as np
# Metrics
def r2(y_target, y_pred):
return 1 - ((y_target - y_pred) ** 2).sum() / ((y_target - y_target.mean()) ** 2).sum()
def r2_zero(y_target, y_pred):
res = r2(y_target, y_pred)
if res < 0.:
res = 0.
return res
def MAE(y_target, y_pred):
return np.mean(np.abs(y_targ... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | physo/benchmark/utils/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:38.445454 | from . import metrics_utils
from . import read_logs
from . import symbolic_utils
from . import timeout_unix
from . import timeout_generic |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | physo/benchmark/utils/timeout_generic.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:38.842630 | import multiprocessing as mp
import queue
import platform
import signal
from functools import wraps
from contextlib import contextmanager
from typing import Callable, Any
import time
class TimeoutError(Exception):
pass
if platform.system() != "Windows":
# Unix/macOS (signal-based) - Compatible with all Pytho... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | physo/benchmark/utils/timeout_unix.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:38.939407 | import errno
import os
import signal
import functools
import time
class TimeoutError(Exception):
pass
def timeout(seconds=10, error_message=os.strerror(errno.ETIME)):
"""
# Works on UNIX only
# https://stackoverflow.com/questions/2281850/timeout-function-if-it-takes-too-long-to-finish
Demo:
@t... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | physo/config/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:38.947536 | from . import config0
from . import config0b
from . import config1
from . import config1b
from . import config2
from . import config2b |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | physo/config/config1.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:38.976192 | import physo
import torch
import numpy as np
"""
SR performances are highly dependent on hyperparameters.
For doing science, it is recommended to tune hyperparameters to the specific problem to get best performances.
"""
"""
Configuration config1 was tuned on a very few astrophysical cases for the paper: arXiv:2303.0... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | physo/config/config1b.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:39.013624 | import physo
import torch
import numpy as np
"""
SR performances are highly dependent on hyperparameters.
For doing science, it is recommended to tune hyperparameters to the specific problem to get best performances.
"""
"""
Configuration config1 was tuned on a very few astrophysical cases for the paper: arXiv:2303.0... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | physo/config/config2.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:39.044449 | import physo
import torch
import numpy as np
"""
SR performances are highly dependent on hyperparameters.
For doing science, it is recommended to tune hyperparameters to the specific problem to get best performances.
"""
"""
Configuration config0 is a faster but less effective configuration adapted from config1 which... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | physo/config/config2b.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:39.045016 | import physo
import torch
import numpy as np
"""
SR performances are highly dependent on hyperparameters.
For doing science, it is recommended to tune hyperparameters to the specific problem to get best performances.
"""
"""
Configuration config0 is a faster but less effective configuration adapted from config1 which... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | physo/config/config0b.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:39.060339 | import physo
import torch
import numpy as np
"""
SR performances are highly dependent on hyperparameters.
For doing science, it is recommended to tune hyperparameters to the specific problem to get best performances.
"""
"""
Configuration config0 is a faster but less effective configuration adapted from config1 which... |
WassimTenachi/PhySO | https://github.com/WassimTenachi/PhySO | null | null | null | null | 1,965 | null | null | mit | null | null | null | null | null | null | null | physo/config/config0.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:39.061045 | import physo
import torch
import numpy as np
"""
SR performances are highly dependent on hyperparameters.
For doing science, it is recommended to tune hyperparameters to the specific problem to get best performances.
"""
"""
Configuration config0 is a faster but less effective configuration adapted from config1 which... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/convert2Yolo/label_visualization.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:41.417716 | #-*-coding:utf-8-*-
import os
import argparse
import time
import pprint
from PIL import Image, ImageDraw
import matplotlib.pyplot as plt
import json
from Format import VOC, COCO, UDACITY, KITTI, YOLO
parser = argparse.ArgumentParser(description='Evaluate label Converting.')
parser.add_argument('--datasets', type=st... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov3/convert.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:41.439627 | #! /usr/bin/env python
"""
Reads Darknet config and weights and creates Keras model with TF backend.
"""
import argparse
import configparser
import io
import os
from collections import defaultdict
import numpy as np
from keras import backend as K
from keras.layers import (Conv2D, Input, ZeroPadding2D, Add,
... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/convert2Yolo/example.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:41.458172 | #-*-coding:utf-8-*-
import os
from xml.etree.ElementTree import dump
import json
import pprint
import argparse
from Format import VOC, COCO, UDACITY, KITTI, YOLO
parser = argparse.ArgumentParser(description='label Converting example.')
parser.add_argument('--datasets', type=str, help='type of datasets')
parser.add... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/coco2voc.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:41.459148 | from pycocotools.coco import COCO
import os
import shutil
from tqdm import tqdm
import skimage.io as io
import matplotlib.pyplot as plt
import cv2
from PIL import Image, ImageDraw
#the path you want to save your results for coco to voc
savepath="/home/cai/Desktop/object_detection/datasets/coco/result/"
img_dir=savepa... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/Train-a-YOLOv4-model/tools/img2train.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:41.469170 | # -*- coding: utf-8 -*-
# Author : Andy Liu
# Last modified: 2018-8-15
# This tool is used to create VOC-like txt file by reading image folder
# input: python create_txt_list.py "/home/andy/Data/img"
# output:
# ./train.txt
# ./val.txt
import argparse
import os,sys
import random
from os import listdir, getcwd
from o... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/convert2Yolo/msgLogInfo.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:41.469674 | class color:
BOLD = '\033[1m'
END = '\033[0m'
DEFAULT = '\033[0;37;40m'
RED = '\033[91m' |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/Train-a-YOLOv4-model/tools/name.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:41.499781 | # -*- coding: UTF-8 -*-
import os
names = os.listdir('/home/cai/workspace/fly_piggy/JPEGImages') #图片路径
i=0
train_val = open('/home/cai/workspace/fly_piggy/train.txt','w') #txt文件路径
for name in names:
index = name.rfind('.')
name = name[:index]
train_val.write(name+'\n')
i=i+1
print(i)
|
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/Train-a-YOLOv4-model/tools/voc_label.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:41.501149 | # -*- coding: UTF-8 -*-
import xml.etree.ElementTree as ET
import pickle
import os
from os import listdir, getcwd
from os.path import join
#我的项目中有4个类别,类别名称在这里修改 change your classes in here
classes = ["holothurian","echinus","scallop","starfish"]
def convert(size, box):
dw = 1./size[0]
dh = 1./size[1]
x = (... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/convert2Yolo/Format.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:41.502092 | #-*-coding:utf-8-*-
import sys
import os
import csv
import xml.etree.ElementTree as Et
from xml.etree.ElementTree import Element, ElementTree
from PIL import Image
import json
from xml.etree.ElementTree import dump
# Common Data format
"""
{
"filename" :
{
... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov3/deep_sort/detection.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.007008 | # vim: expandtab:ts=4:sw=4
import numpy as np
class Detection(object):
"""
This class represents a bounding box detection in a single image.
Parameters
----------
tlwh : array_like
Bounding box in format `(x, y, w, h)`.
confidence : float
Detector confidence score.
feature... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov3/deep_sort/iou_matching.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.028059 | # vim: expandtab:ts=4:sw=4
from __future__ import absolute_import
import numpy as np
from . import linear_assignment
def iou(bbox, candidates):
"""Computer intersection over union.
Parameters
----------
bbox : ndarray
A bounding box in format `(top left x, top left y, width, height)`.
can... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov3/deep_sort/kalman_filter.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.098433 | # vim: expandtab:ts=4:sw=4
import numpy as np
import scipy.linalg
"""
Table for the 0.95 quantile of the chi-square distribution with N degrees of
freedom (contains values for N=1, ..., 9). Taken from MATLAB/Octave's chi2inv
function and used as Mahalanobis gating threshold.
"""
chi2inv95 = {
1: 3.8415,
2: 5.... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov3/deep_sort/preprocessing.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.119205 | # vim: expandtab:ts=4:sw=4
import numpy as np
import cv2
def non_max_suppression(boxes, max_bbox_overlap, scores=None):
"""Suppress overlapping detections.
Original code from [1]_ has been adapted to include confidence score.
.. [1] http://www.pyimagesearch.com/2015/02/16/
faster-non-maximum-... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov3/deep_sort/track.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.159022 | # vim: expandtab:ts=4:sw=4
class TrackState:
"""
Enumeration type for the single target track state. Newly created tracks are
classified as `tentative` until enough evidence has been collected. Then,
the track state is changed to `confirmed`. Tracks that are no longer alive
are classified as `dele... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov3/main.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.159555 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
import os
import datetime
from timeit import time
import warnings
import cv2
import numpy as np
import argparse
from PIL import Image
from yolo import YOLO
from deep_sort import preprocessing
from deep_sort ... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov3/tools/freeze_model.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.185344 | # vim: expandtab:ts=4:sw=4
import argparse
import tensorflow as tf
import tensorflow.contrib.slim as slim
def _batch_norm_fn(x, scope=None):
if scope is None:
scope = tf.get_variable_scope().name + "/bn"
return slim.batch_norm(x, scope=scope)
def create_link(
incoming, network_builder, scope... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov3/deep_sort/nn_matching.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.222721 | # vim: expandtab:ts=4:sw=4
import numpy as np
def _pdist(a, b):
"""Compute pair-wise squared distance between points in `a` and `b`.
Parameters
----------
a : array_like
An NxM matrix of N samples of dimensionality M.
b : array_like
An LxM matrix of L samples of dimensionality M.
... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov3/deep_sort/linear_assignment.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.229788 | # vim: expandtab:ts=4:sw=4
from __future__ import absolute_import
import numpy as np
from sklearn.utils.linear_assignment_ import linear_assignment
from . import kalman_filter
INFTY_COST = 1e+5
def min_cost_matching(
distance_metric, max_distance, tracks, detections, track_indices=None,
detection_in... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov3/deep_sort/tracker.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.230323 | # vim: expandtab:ts=4:sw=4
from __future__ import absolute_import
import numpy as np
from . import kalman_filter
from . import linear_assignment
from . import iou_matching
from .track import Track
class Tracker:
"""
This is the multi-target tracker.
Parameters
----------
metric : nn_matching.Near... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov3/yolo.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.635293 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Run a YOLO_v3 style detection model on test images.
"""
import colorsys
import os
import random
from timeit import time
from timeit import default_timer as timer ### to calculate FPS
import cv2
import numpy as np
from keras import backend as K
from keras.models impor... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov3/yolo3/utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.710456 | """Miscellaneous utility functions."""
from functools import reduce
from PIL import Image
def compose(*funcs):
"""Compose arbitrarily many functions, evaluated left to right.
Reference: https://mathieularose.com/function-composition-in-python/
"""
# return lambda x: reduce(lambda v, f: f(v), funcs, ... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov3/tools/generate_detections.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.723338 | # vim: expandtab:ts=4:sw=4
import os
import errno
import argparse
import numpy as np
import cv2
import tensorflow as tf
def _run_in_batches(f, data_dict, out, batch_size):
data_len = len(out)
num_batches = int(data_len / batch_size)
s, e = 0, 0
for i in range(num_batches):
s, e = i * batch_si... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov3/yolo3/model.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.748291 | """YOLO_v3 Model Defined in Keras."""
from functools import wraps
import numpy as np
import tensorflow as tf
from keras import backend as K
from keras.layers import Conv2D, Add, ZeroPadding2D, UpSampling2D, Concatenate
from keras.layers.advanced_activations import LeakyReLU
from keras.layers.normalization import Batc... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov4/deep_sort/detection.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.832405 | # vim: expandtab:ts=4:sw=4
import numpy as np
class Detection(object):
"""
This class represents a bounding box detection in a single image.
Parameters
----------
tlwh : array_like
Bounding box in format `(x, y, w, h)`.
confidence : float
Detector confidence score.
feature... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov4/deep_sort/detection_yolo.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.855390 | # vim: expandtab:ts=4:sw=4
import numpy as np
class Detection_YOLO(object):
"""
This class represents a bounding box detection in a single image.
Parameters
----------
tlwh : array_like
Bounding box in format `(x, y, w, h)`.
confidence : float
Detector confidence score.
fea... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov4/deep_sort/iou_matching.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.879468 | # vim: expandtab:ts=4:sw=4
from __future__ import absolute_import
import numpy as np
from . import linear_assignment
def iou(bbox, candidates):
"""Computer intersection over union.
Parameters
----------
bbox : ndarray
A bounding box in format `(top left x, top left y, width, height)`.
can... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov4/deep_sort/kalman_filter.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.881528 | # vim: expandtab:ts=4:sw=4
import numpy as np
import scipy.linalg
"""
Table for the 0.95 quantile of the chi-square distribution with N degrees of
freedom (contains values for N=1, ..., 9). Taken from MATLAB/Octave's chi2inv
function and used as Mahalanobis gating threshold.
"""
chi2inv95 = {
1: 3.8415,
2: 5.... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov4/convert.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:42.883308 | import os
import colorsys
import numpy as np
from keras import backend as K
from keras.models import load_model
from keras.layers import Input
from yolo4.model import yolo_eval, yolo4_body
from yolo4.utils import letterbox_image
from PIL import Image, ImageFont, ImageDraw
from timeit import default_timer as timer
im... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov4/deep_sort/linear_assignment.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:43.214154 | # vim: expandtab:ts=4:sw=4
from __future__ import absolute_import
import numpy as np
from sklearn.utils.linear_assignment_ import linear_assignment
from . import kalman_filter
INFTY_COST = 1e+5
def min_cost_matching(
distance_metric, max_distance, tracks, detections, track_indices=None,
detection_in... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov4/deep_sort/track.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:43.359645 | # vim: expandtab:ts=4:sw=4
class TrackState:
"""
Enumeration type for the single target track state. Newly created tracks are
classified as `tentative` until enough evidence has been collected. Then,
the track state is changed to `confirmed`. Tracks that are no longer alive
are classified as `dele... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov4/deep_sort/nn_matching.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:43.375325 | # vim: expandtab:ts=4:sw=4
import numpy as np
def _pdist(a, b):
"""Compute pair-wise squared distance between points in `a` and `b`.
Parameters
----------
a : array_like
An NxM matrix of N samples of dimensionality M.
b : array_like
An LxM matrix of L samples of dimensionality M.
... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov4/deep_sort/preprocessing.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:43.410151 | # vim: expandtab:ts=4:sw=4
import numpy as np
import cv2
def non_max_suppression(boxes, max_bbox_overlap, scores=None):
"""Suppress overlapping detections.
Original code from [1]_ has been adapted to include confidence score.
.. [1] http://www.pyimagesearch.com/2015/02/16/
faster-non-maximum-... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov4/deep_sort/tracker.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:43.440734 | # vim: expandtab:ts=4:sw=4
from __future__ import absolute_import
import numpy as np
from . import kalman_filter
from . import linear_assignment
from . import iou_matching
from .track import Track
class Tracker:
"""
This is the multi-target tracker.
Parameters
----------
metric : nn_matching.Near... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov4/main.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:43.474454 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
import sys
#sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages')
import os
import datetime
from timeit import time
import warnings
import cv2
import numpy as np
import argparse
from PIL import Ima... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov4/tools/frame2video.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:43.479584 | import cv2
import os
import moviepy.editor as mp
video = "00046"
#input_imgs
im_dir = '/home/cai/Desktop/yolo_dataset/t1_video/t1_video_'+video+'/'
#im_dir =
#output_video
video_dir = '/home/cai/Desktop/yolo_dataset/t1_video/test_video/det_t1_video_'+video+'_test_q.avi'
#fps
fps = 50
#num_of_imgs
num = 310
#img_size
i... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov4/social_distance.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:43.488031 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
import sys
#sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages')
import os
import datetime
from timeit import time
import warnings
import cv2
import numpy as np
import argparse
from PIL import Ima... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov4/tools/freeze_model.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:43.522676 | import argparse
import tensorflow as tf
import tensorflow.contrib.slim as slim
def _batch_norm_fn(x, scope=None):
if scope is None:
scope = tf.get_variable_scope().name + "/bn"
return slim.batch_norm(x, scope=scope)
def create_link(
incoming, network_builder, scope, nonlinearity=tf.nn.elu,
... |
yehengchen/Object-Detection-and-Tracking | https://github.com/yehengchen/Object-Detection-and-Tracking | null | null | null | null | 1,963 | null | null | mit | null | null | null | null | null | null | null | OneStage/yolo/deep_sort_yolov4/tools/generate_detections.py | null | null | null | null | null | null | Python | 2026-05-04T01:44:43.586049 | import os
import errno
import argparse
import numpy as np
import cv2
import tensorflow as tf
def _run_in_batches(f, data_dict, out, batch_size):
data_len = len(out)
num_batches = int(data_len / batch_size)
s, e = 0, 0
for i in range(num_batches):
s, e = i * batch_size, (i + 1) * batch_size
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.