repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/gym_envs/__init__.py
motion_imitation/envs/gym_envs/__init__.py
"""Setup such that environment can be created using gym.make().""" from motion_imitation.envs.gym_envs.a1_gym_env import A1GymEnv
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/utilities/heightfield_randomizer.py
motion_imitation/envs/utilities/heightfield_randomizer.py
"""Generates a random bumpy terrain at environment reset.""" import numpy as np from pybullet_envs.minitaur.envs import env_randomizer_base class HeightfieldRandomizer(env_randomizer_base.EnvRandomizerBase): """Generates an uneven terrain in the gym env.""" def __init__(self, max_height_perturbation=.05): "...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/utilities/fallen_robot_randomizer.py
motion_imitation/envs/utilities/fallen_robot_randomizer.py
"""Drops the robot with random orientation at episode start.""" import os import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0, parentdir) import numpy as np from motion_imitation.envs.utilit...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/utilities/env_randomizer_base.py
motion_imitation/envs/utilities/env_randomizer_base.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/utilities/minitaur_env_randomizer.py
motion_imitation/envs/utilities/minitaur_env_randomizer.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/utilities/env_utils.py
motion_imitation/envs/utilities/env_utils.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/utilities/controllable_env_randomizer_from_config.py
motion_imitation/envs/utilities/controllable_env_randomizer_from_config.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/utilities/minitaur_env_randomizer_config.py
motion_imitation/envs/utilities/minitaur_env_randomizer_config.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/utilities/controllable_env_randomizer_base.py
motion_imitation/envs/utilities/controllable_env_randomizer_base.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/utilities/__init__.py
motion_imitation/envs/utilities/__init__.py
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/utilities/minitaur_env_randomizer_from_config.py
motion_imitation/envs/utilities/minitaur_env_randomizer_from_config.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/sensors/robot_sensors.py
motion_imitation/envs/sensors/robot_sensors.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/sensors/space_utils.py
motion_imitation/envs/sensors/space_utils.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/sensors/environment_sensors.py
motion_imitation/envs/sensors/environment_sensors.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/sensors/sensor_wrappers.py
motion_imitation/envs/sensors/sensor_wrappers.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/sensors/sensor.py
motion_imitation/envs/sensors/sensor.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/envs/sensors/__init__.py
motion_imitation/envs/sensors/__init__.py
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/learning/ppo_imitation.py
motion_imitation/learning/ppo_imitation.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/learning/imitation_policies.py
motion_imitation/learning/imitation_policies.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/learning/__init__.py
motion_imitation/learning/__init__.py
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/learning/imitation_runners.py
motion_imitation/learning/imitation_runners.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/robots/minitaur_motor.py
motion_imitation/robots/minitaur_motor.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/robots/minitaur_pose_utils.py
motion_imitation/robots/minitaur_pose_utils.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/robots/laikago_motor.py
motion_imitation/robots/laikago_motor.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/robots/robot_config.py
motion_imitation/robots/robot_config.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/robots/action_filter.py
motion_imitation/robots/action_filter.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/robots/robot_pose_utils.py
motion_imitation/robots/robot_pose_utils.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/robots/a1_robot_velocity_estimator.py
motion_imitation/robots/a1_robot_velocity_estimator.py
"""Estimates base velocity for A1 robot from accelerometer readings.""" import numpy as np from filterpy.kalman import KalmanFilter from motion_imitation.utilities.moving_window_filter import MovingWindowFilter class VelocityEstimator: """Estimates base velocity of A1 robot. The velocity estimator consists of 2 ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/robots/minitaur.py
motion_imitation/robots/minitaur.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
true
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/robots/laikago.py
motion_imitation/robots/laikago.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/robots/a1_robot.py
motion_imitation/robots/a1_robot.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/robots/laikago_constants.py
motion_imitation/robots/laikago_constants.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/robots/minitaur_constants.py
motion_imitation/robots/minitaur_constants.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/robots/__init__.py
motion_imitation/robots/__init__.py
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/robots/laikago_pose_utils.py
motion_imitation/robots/laikago_pose_utils.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/robots/kinematics.py
motion_imitation/robots/kinematics.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/robots/a1.py
motion_imitation/robots/a1.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/robots/gamepad/gamepad_reader.py
motion_imitation/robots/gamepad/gamepad_reader.py
from absl import app from absl import flags from inputs import get_gamepad import threading import time FLAGS = flags.FLAGS MAX_ABS_RX = 32768 MAX_ABS_RY = 32768 def _interpolate(raw_reading, max_raw_reading, new_scale): return raw_reading / max_raw_reading * new_scale class Gamepad: """Interface for reading c...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/examples/test_robot_interface.py
motion_imitation/examples/test_robot_interface.py
"""Test the C++ robot interface. Follow the """ from robot_interface import RobotInterface # pytype: disable=import-error i = RobotInterface() o = i.receive_observation()
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/examples/mpc_example.py
motion_imitation/examples/mpc_example.py
from __future__ import absolute_import from __future__ import division #from __future__ import google_type_annotations from __future__ import print_function import os import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(curre...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/examples/a1_robot_sim_to_real.py
motion_imitation/examples/a1_robot_sim_to_real.py
"""Apply the same action to the simulated and real A1 robot. As a basic debug tool, this script allows you to execute the same action (which you choose from the pybullet GUI) on the simulation and real robot simultaneouly. Make sure to put the real robot on rack before testing. """ import os import inspect currentdi...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/examples/a1_print_angles.py
motion_imitation/examples/a1_print_angles.py
"""Reads and prints joint angles from A1 robot without powering them. By default prints all joint angles. To select specific joints: `python a1_print_angles.py --joint FR_hip_motor --joint RL_upper_joint` """ import inspect import os currentdir = os.path.dirname( os.path.abspath(inspect.getfile(inspect.currentfr...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/examples/replay_actions.py
motion_imitation/examples/replay_actions.py
"""Replays pre-recorded actions on the robot.""" from absl import app from absl import flags import numpy as np import pybullet # pytype:disable=import-error import pybullet_data from pybullet_utils import bullet_client import time # from motion_imitation.robots import a1 from motion_imitation.robots import a1_robot ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/examples/example.py
motion_imitation/examples/example.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/examples/whole_body_controller_example.py
motion_imitation/examples/whole_body_controller_example.py
"""Example of whole body controller on A1 robot.""" import os import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0, parentdir) from absl import app from absl import flags from absl import logg...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/examples/a1_test_imu.py
motion_imitation/examples/a1_test_imu.py
"""Executes scripted motions and logs IMU readings. Pitches the robot forward and backward and rolls it slightly left and right with fixed joint positions. By running this in both sim and real, the real robot's IMU readings can be compared to simulation. """ import inspect import os currentdir = os.path.dirname( ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/examples/__init__.py
motion_imitation/examples/__init__.py
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/examples/random_action.py
motion_imitation/examples/random_action.py
"""Simple script for executing random actions on A1 robot.""" import os import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0, parentdir) from absl import app from absl import flags from tqdm ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/examples/test_env_gui.py
motion_imitation/examples/test_env_gui.py
"""Simple script for executing random actions on A1 robot.""" import os import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0, parentdir) from absl import app from absl import flags import num...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/examples/a1_robot_exercise.py
motion_imitation/examples/a1_robot_exercise.py
"""Commands A1 robot to raise and lower its legs so it crouches and stands up. Can be run in sim by setting --real_robot=False. """ import inspect import os currentdir = os.path.dirname( os.path.abspath(inspect.getfile(inspect.currentframe()))) grandparentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/utilities/motion_util.py
motion_imitation/utilities/motion_util.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/utilities/motion_data.py
motion_imitation/utilities/motion_data.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/utilities/moving_window_filter.py
motion_imitation/utilities/moving_window_filter.py
"""Moving window filter to smooth out sensor readings.""" import collections class MovingWindowFilter(object): """A stable O(1) moving filter for incoming data streams. We implement the Neumaier's algorithm to calculate the moving window average, which is numerically stable. """ def __init__(self, window...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/utilities/pose3d.py
motion_imitation/utilities/pose3d.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/utilities/__init__.py
motion_imitation/utilities/__init__.py
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/utilities/a1/a1.py
motion_imitation/utilities/a1/a1.py
import pybullet as p import time import pybullet_data as pd import numpy as np p.connect(p.GUI) p.setAdditionalSearchPath(pd.getDataPath()) dt = 1./240. p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,0) p.loadURDF("plane.urdf") robot = p.loadURDF("a1/a1.urdf",[0,0,0.5]) p.configureDebugVisualizer(p.COV_ENABLE_RENDE...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/motion_imitation/data/__init__.py
motion_imitation/data/__init__.py
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/run.py
sac_dev/run.py
import argparse import gym import numpy as np import os import random import sys import tensorflow as tf import time import sac_configs import learning.sac_agent as sac_agent import util.mpi_util as mpi_util arg_parser = None def parse_args(args): parser = argparse.ArgumentParser(description="Train or test contr...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/sac_configs.py
sac_dev/sac_configs.py
SAC_CONFIGS = { "Ant-v2": { "actor_net": "fc_2layers_256units", "critic_net": "fc_2layers_256units", "actor_stepsize": 0.0003, "actor_init_output_scale": 0.01, "actor_batch_size": 256, "actor_steps": 256, "action_std": 0.2, "critic_stepsi...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/util/mpi_util.py
sac_dev/util/mpi_util.py
import copy import numpy as np # from mpi4py import MPI ROOT_PROC_RANK = 0 class MockMPI(object): class MockCommWorld(object): def Get_size(self): return 1 def Get_rank(self): return 0 def Bcast(self, x, root): return x def Allreduce(self, x...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/util/rl_path.py
sac_dev/util/rl_path.py
import enum import numpy as np import time class Terminate(enum.Enum): Null = 0 Fail = 1 class RLPath(object): def __init__(self): self.states = [] self.actions = [] self.logps = [] self.rewards = [] self.max_torques = [] self.terminate = Terminate....
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/util/saved_policy.py
sac_dev/util/saved_policy.py
"""Run inference with a saved policy.""" import numpy as np import tensorflow.compat.v1 as tf class SavedPolicy(object): """Load a policy saved with sac_agent.py.""" def __init__(self, export_dir): """Constructor. Args: export_dir: Directory and model identifier for reloading policy. Must ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/util/logger.py
sac_dev/util/logger.py
""" Some simple logging functionality, inspired by rllab's logging. Assumes that each diagnostic gets logged each iteration Call logz.configure_output_file() to start logging to a tab-separated-values file (some_file_name.txt) To load the learning curves, you can do, for example A = np.genfromtxt('/tmp/expt_146898...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/util/net_util.py
sac_dev/util/net_util.py
import tensorflow as tf def build_fc_net(input_tfs, layers, activation=tf.nn.relu, weight_init=tf.contrib.layers.xavier_initializer(), reuse=False): curr_tf = tf.concat(axis=-1, values=input_tfs) for i, size in enumerate(layers): with tf.vari...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/util/__init__.py
sac_dev/util/__init__.py
from . import *
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/util/tf_util.py
sac_dev/util/tf_util.py
import tensorflow as tf import numpy as np def var_shape(x): out = [k.value for k in x.get_shape()] assert all(isinstance(a, int) for a in out), "shape function assumes that shape is fully known" return out def intprod(x): return int(np.prod(x)) def numel(x): n = intprod(var_shape(x)) return ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/util/replay_buffer.py
sac_dev/util/replay_buffer.py
import numpy as np import copy import sac_dev.util.logger as logger import sac_dev.util.rl_path as rl_path INVALID_IDX = -1 class ReplayBuffer(object): TERMINATE_KEY = "terminate" PATH_START_KEY = "path_start" PATH_END_KEY = "path_end" def __init__(self, buffer_size): assert buffer_size > 0...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/util/normalizer.py
sac_dev/util/normalizer.py
import copy import numpy as np import tensorflow as tf from sac_dev.util.logger import Logger import sac_dev.util.mpi_util as mpi_util class Normalizer(object): CHECK_SYNC_COUNT = 50000 # check synchronization after a certain number of entries def __init__(self, sess, ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/learning/rl_agent.py
sac_dev/learning/rl_agent.py
import abc import collections import copy import gym import numpy as np import os import tensorflow as tf import time import sac_dev.util.logger as logger import sac_dev.util.mpi_util as mpi_util import sac_dev.util.normalizer as normalizer import sac_dev.util.replay_buffer as replay_buffer import sac_dev.util.rl_path...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/learning/sac_agent.py
sac_dev/learning/sac_agent.py
import gym import numpy as np import tensorflow as tf import time import sac_dev.learning.nets.net_builder as net_builder import sac_dev.learning.rl_agent as rl_agent import sac_dev.learning.mpi_solver as mpi_solver import sac_dev.util.rl_path as rl_path import sac_dev.util.mpi_util as mpi_util import sac_dev.util.net...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/learning/__init__.py
sac_dev/learning/__init__.py
from . import *
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/learning/mpi_solver.py
sac_dev/learning/mpi_solver.py
import tensorflow as tf import numpy as np import sac_dev.util.tf_util as TFUtil import sac_dev.util.mpi_util as MPIUtil from sac_dev.util.logger import Logger class MPISolver(): CHECK_SYNC_ITERS = 1000 def __init__(self, sess, optimizer, vars): self._vars = vars self._sess = sess self...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/learning/nets/fc_2layers_256units.py
sac_dev/learning/nets/fc_2layers_256units.py
import tensorflow as tf import sac_dev.util.net_util as net_util NAME = "fc_2layers_256units" def build_net(input_tfs, reuse=False): layers = [256, 128] activation = tf.nn.relu h = net_util.build_fc_net(input_tfs=input_tfs, layers=layers, activation=activation, reuse=reuse) return h
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/learning/nets/net_builder.py
sac_dev/learning/nets/net_builder.py
import sac_dev.learning.nets.fc_2layers_256units as fc_2layers_256units import sac_dev.learning.nets.fc_2layers_512units as fc_2layers_512units def build_net(net_name, input_tfs, reuse=False): net = None if (net_name == fc_2layers_256units.NAME): net = fc_2layers_256units.build_net(input_tfs, reuse) ...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/learning/nets/fc_2layers_512units.py
sac_dev/learning/nets/fc_2layers_512units.py
import tensorflow as tf import sac_dev.util.net_util as net_util NAME = "fc_2layers_512units" def build_net(input_tfs, reuse=False): layers = [512, 256] activation = tf.nn.relu h = net_util.build_fc_net(input_tfs=input_tfs, layers=layers, activation=activation, reuse=reuse) return h
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/sac_dev/learning/nets/__init__.py
sac_dev/learning/nets/__init__.py
from . import *
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/phasespace/grpc_stream_client.py
phasespace/grpc_stream_client.py
"""Basic python library to receive motion capture data over GRPC. Basic usage: client = grpc_stream_client.GrpcStreamClient(server_address_and_port) stream = client.get_marker_data() for data in stream: # Do something with marker data in data. # This loop should be able to run at least at the streaming frequency (...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/phasespace/marker_data_pb2_grpc.py
phasespace/marker_data_pb2_grpc.py
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from phasespace import marker_data_pb2 as marker__data__pb2 class MarkerTrackerStub(object): """Missing associated documentation comment in .proto file."""...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/phasespace/phasespace_robot_tracker.py
phasespace/phasespace_robot_tracker.py
"""Class to read in motion capture data and output position and orientation.""" from typing import Sequence, Text import numpy as np from phasespace import grpc_stream_client from pybullet_utils import transformations _ARRAY = Sequence[float] MILLIMETER_TO_METER = 0.001 # ID that Phasespace has assigned to each mar...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
lauramsmith/fine-tuning-locomotion
https://github.com/lauramsmith/fine-tuning-locomotion/blob/583f1de43e91cdd24d632d783872528eb1337480/phasespace/marker_data_pb2.py
phasespace/marker_data_pb2.py
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: marker_data.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.pro...
python
Apache-2.0
583f1de43e91cdd24d632d783872528eb1337480
2026-01-05T07:14:12.892242Z
false
ali-vilab/FreeScale
https://github.com/ali-vilab/FreeScale/blob/7161bfcf2c180818db6a9f04f65e5b3963582ac7/run_freescale.py
run_freescale.py
import os import torch from PIL import Image from pipeline_freescale import StableDiffusionXLPipeline from utils import load_prompts from free_lunch_utils import register_free_upblock2d, register_free_crossattn_upblock2d model_ckpt = "stabilityai/stable-diffusion-xl-base-1.0" prompts_file = 'prompts/demo.txt' prompts...
python
Apache-2.0
7161bfcf2c180818db6a9f04f65e5b3963582ac7
2026-01-05T07:14:43.712841Z
false
ali-vilab/FreeScale
https://github.com/ali-vilab/FreeScale/blob/7161bfcf2c180818db6a9f04f65e5b3963582ac7/gradio_app.py
gradio_app.py
import gradio as gr import torch from free_lunch_utils import register_free_upblock2d, register_free_crossattn_upblock2d from pipeline_freescale import StableDiffusionXLPipeline from pipeline_freescale_turbo import StableDiffusionXLPipeline_Turbo dtype = torch.float16 device = "cuda" model_ckpt = "stabilityai/stable...
python
Apache-2.0
7161bfcf2c180818db6a9f04f65e5b3963582ac7
2026-01-05T07:14:43.712841Z
false
ali-vilab/FreeScale
https://github.com/ali-vilab/FreeScale/blob/7161bfcf2c180818db6a9f04f65e5b3963582ac7/pipeline_freescale_imgen.py
pipeline_freescale_imgen.py
import inspect import os from typing import Any, Callable, Dict, List, Optional, Tuple, Union import torch from transformers import CLIPTextModel, CLIPTextModelWithProjection, CLIPTokenizer from diffusers.image_processor import VaeImageProcessor from diffusers.loaders import FromSingleFileMixin, LoraLoaderMixin, Text...
python
Apache-2.0
7161bfcf2c180818db6a9f04f65e5b3963582ac7
2026-01-05T07:14:43.712841Z
true
ali-vilab/FreeScale
https://github.com/ali-vilab/FreeScale/blob/7161bfcf2c180818db6a9f04f65e5b3963582ac7/pipeline_freescale_turbo.py
pipeline_freescale_turbo.py
import inspect import os from typing import Any, Callable, Dict, List, Optional, Tuple, Union import torch from transformers import CLIPTextModel, CLIPTextModelWithProjection, CLIPTokenizer from diffusers.image_processor import VaeImageProcessor from diffusers.loaders import FromSingleFileMixin, LoraLoaderMixin, Text...
python
Apache-2.0
7161bfcf2c180818db6a9f04f65e5b3963582ac7
2026-01-05T07:14:43.712841Z
true
ali-vilab/FreeScale
https://github.com/ali-vilab/FreeScale/blob/7161bfcf2c180818db6a9f04f65e5b3963582ac7/free_lunch_utils.py
free_lunch_utils.py
import torch import torch.fft as fft from diffusers.models.unet_2d_condition import logger from diffusers.utils import is_torch_version from typing import Any, Dict, List, Optional, Tuple, Union """ Borrowed from https://github.com/ChenyangSi/FreeU/blob/main/demo/free_lunch_utils.py """ def isinstance_str(x: object, ...
python
Apache-2.0
7161bfcf2c180818db6a9f04f65e5b3963582ac7
2026-01-05T07:14:43.712841Z
false
ali-vilab/FreeScale
https://github.com/ali-vilab/FreeScale/blob/7161bfcf2c180818db6a9f04f65e5b3963582ac7/run_sdxl.py
run_sdxl.py
import os import torch from PIL import Image from pipeline_sdxl import StableDiffusionXLPipeline from utils import load_prompts from free_lunch_utils import register_free_upblock2d, register_free_crossattn_upblock2d model_ckpt = "stabilityai/stable-diffusion-xl-base-1.0" prompts_file = 'prompts/imgen.txt' prompts = l...
python
Apache-2.0
7161bfcf2c180818db6a9f04f65e5b3963582ac7
2026-01-05T07:14:43.712841Z
false
ali-vilab/FreeScale
https://github.com/ali-vilab/FreeScale/blob/7161bfcf2c180818db6a9f04f65e5b3963582ac7/utils.py
utils.py
def load_prompts(prompt_file): f = open(prompt_file, 'r') prompt_list = [] for idx, line in enumerate(f.readlines()): l = line.strip() if len(l) != 0: prompt_list.append(l) f.close() return prompt_list
python
Apache-2.0
7161bfcf2c180818db6a9f04f65e5b3963582ac7
2026-01-05T07:14:43.712841Z
false
ali-vilab/FreeScale
https://github.com/ali-vilab/FreeScale/blob/7161bfcf2c180818db6a9f04f65e5b3963582ac7/scale_attention.py
scale_attention.py
from typing import Any, Dict, Optional import torch import torch.nn.functional as F from einops import rearrange import random def gaussian_kernel(kernel_size=3, sigma=1.0, channels=3): x_coord = torch.arange(kernel_size) gaussian_1d = torch.exp(-(x_coord - (kernel_size - 1) / 2) ** 2 / (2 * sigma ** 2)) ...
python
Apache-2.0
7161bfcf2c180818db6a9f04f65e5b3963582ac7
2026-01-05T07:14:43.712841Z
false
ali-vilab/FreeScale
https://github.com/ali-vilab/FreeScale/blob/7161bfcf2c180818db6a9f04f65e5b3963582ac7/scale_attention_turbo.py
scale_attention_turbo.py
from typing import Any, Dict, Optional import torch import torch.nn.functional as F from einops import rearrange import random def gaussian_kernel(kernel_size=3, sigma=1.0, channels=3): x_coord = torch.arange(kernel_size) gaussian_1d = torch.exp(-(x_coord - (kernel_size - 1) / 2) ** 2 / (2 * sigma ** 2)) ...
python
Apache-2.0
7161bfcf2c180818db6a9f04f65e5b3963582ac7
2026-01-05T07:14:43.712841Z
false
ali-vilab/FreeScale
https://github.com/ali-vilab/FreeScale/blob/7161bfcf2c180818db6a9f04f65e5b3963582ac7/pipeline_sdxl.py
pipeline_sdxl.py
# Copyright 2023 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
python
Apache-2.0
7161bfcf2c180818db6a9f04f65e5b3963582ac7
2026-01-05T07:14:43.712841Z
true
ali-vilab/FreeScale
https://github.com/ali-vilab/FreeScale/blob/7161bfcf2c180818db6a9f04f65e5b3963582ac7/pipeline_freescale.py
pipeline_freescale.py
import inspect import os from typing import Any, Callable, Dict, List, Optional, Tuple, Union import torch from transformers import CLIPTextModel, CLIPTextModelWithProjection, CLIPTokenizer from diffusers.image_processor import VaeImageProcessor from diffusers.loaders import FromSingleFileMixin, LoraLoaderMixin, Text...
python
Apache-2.0
7161bfcf2c180818db6a9f04f65e5b3963582ac7
2026-01-05T07:14:43.712841Z
true
ali-vilab/FreeScale
https://github.com/ali-vilab/FreeScale/blob/7161bfcf2c180818db6a9f04f65e5b3963582ac7/run_freescale_turbo.py
run_freescale_turbo.py
import os import torch from PIL import Image from pipeline_freescale_turbo import StableDiffusionXLPipeline_Turbo from utils import load_prompts from free_lunch_utils import register_free_upblock2d, register_free_crossattn_upblock2d model_ckpt = "stabilityai/sdxl-turbo" prompts_file = 'prompts/demo.txt' prompts = loa...
python
Apache-2.0
7161bfcf2c180818db6a9f04f65e5b3963582ac7
2026-01-05T07:14:43.712841Z
false
ali-vilab/FreeScale
https://github.com/ali-vilab/FreeScale/blob/7161bfcf2c180818db6a9f04f65e5b3963582ac7/run_freescale_imgen.py
run_freescale_imgen.py
import os import torch from PIL import Image from pipeline_freescale_imgen import StableDiffusionXLPipeline from utils import load_prompts from free_lunch_utils import register_free_upblock2d, register_free_crossattn_upblock2d img_path = 'imgen_intermediates/tmp_img.png' mask_path = 'imgen_intermediates/tmp_mask.png'...
python
Apache-2.0
7161bfcf2c180818db6a9f04f65e5b3963582ac7
2026-01-05T07:14:43.712841Z
false
furgoose/Pocket-Casts
https://github.com/furgoose/Pocket-Casts/blob/54db3425a99a412a1fd3784c8e0247cd44356f3a/setup.py
setup.py
import pocketcasts from setuptools import setup, find_packages setup( name="pocketcasts-api", version=pocketcasts.api.__version__, description=pocketcasts.api.__doc__, url=pocketcasts.api.__url__, author=pocketcasts.api.__author__, author_email='ferguslongley@live.com', license='MIT', ...
python
MIT
54db3425a99a412a1fd3784c8e0247cd44356f3a
2026-01-05T07:14:47.067072Z
false
furgoose/Pocket-Casts
https://github.com/furgoose/Pocket-Casts/blob/54db3425a99a412a1fd3784c8e0247cd44356f3a/pocketcasts/api.py
pocketcasts/api.py
"""Unofficial API for pocketcasts.com""" import requests from .podcast import Podcast from .episode import Episode __version__ = "0.2.3" __author__ = "Fergus Longley" __url__ = "https://github.com/exofudge/Pocket-Casts" class Pocketcasts(object): """The main class for making getting and setting information from ...
python
MIT
54db3425a99a412a1fd3784c8e0247cd44356f3a
2026-01-05T07:14:47.067072Z
false
furgoose/Pocket-Casts
https://github.com/furgoose/Pocket-Casts/blob/54db3425a99a412a1fd3784c8e0247cd44356f3a/pocketcasts/episode.py
pocketcasts/episode.py
from datetime import datetime class Episode(object): """Class for podcast episodes""" class PlayingStatus(object): """Class to allow ease of reference to play statuses""" Unplayed = 0 Playing = 2 Played = 3 def __init__(self, uuid, podcast, **kwargs): """ A...
python
MIT
54db3425a99a412a1fd3784c8e0247cd44356f3a
2026-01-05T07:14:47.067072Z
false
furgoose/Pocket-Casts
https://github.com/furgoose/Pocket-Casts/blob/54db3425a99a412a1fd3784c8e0247cd44356f3a/pocketcasts/__init__.py
pocketcasts/__init__.py
from .api import Pocketcasts from .episode import Episode from .podcast import Podcast
python
MIT
54db3425a99a412a1fd3784c8e0247cd44356f3a
2026-01-05T07:14:47.067072Z
false
furgoose/Pocket-Casts
https://github.com/furgoose/Pocket-Casts/blob/54db3425a99a412a1fd3784c8e0247cd44356f3a/pocketcasts/podcast.py
pocketcasts/podcast.py
class Podcast(object): """Class for podcast information and methods""" class SortOrder(object): """Class to allow ease of reference to sort orders""" NewestToOldest = 3 OldestToNewest = 2 def __init__(self, uuid, api, **kwargs): """ Args: uuid (str): Pod...
python
MIT
54db3425a99a412a1fd3784c8e0247cd44356f3a
2026-01-05T07:14:47.067072Z
false
furgoose/Pocket-Casts
https://github.com/furgoose/Pocket-Casts/blob/54db3425a99a412a1fd3784c8e0247cd44356f3a/tests/test_api.py
tests/test_api.py
import os import unittest import pocketcasts USERNAME = os.environ.get('POCKETCAST_USER') PASSWORD = os.environ.get('POCKETCAST_PASSWORD') class PocketcastTest(unittest.TestCase): pocket = pocketcasts.Pocketcasts(USERNAME, PASSWORD) def test_invalid_method(self): self.assertRaises(Exception, self.po...
python
MIT
54db3425a99a412a1fd3784c8e0247cd44356f3a
2026-01-05T07:14:47.067072Z
false
cqparts/cqparts
https://github.com/cqparts/cqparts/blob/018e87e14c2c4d1d40b4bfe6a7e22bcf9baf0a53/src/cqparts_fasteners/params.py
src/cqparts_fasteners/params.py
import six from cqparts.params import Parameter, ParametricObject # Types of things... not parts on their own, but utilised in many from .solidtypes import fastener_heads from .solidtypes import screw_drives from .solidtypes import threads # --------- Custom Parameter types --------- class FastenerComponentParam(Pa...
python
Apache-2.0
018e87e14c2c4d1d40b4bfe6a7e22bcf9baf0a53
2026-01-05T07:14:41.025281Z
false