View gist:8b36e995990dfeeb6abf84634196e4ea
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'foo'
The command '/bin/sh -c python -c "import sys; print(sys.path); import foo.plugins"' returned a non-zero code: 1
View gist:ba094cef8943479259dbe78f2a153e0d
type imageExtractError struct {
err error
label string
message string
}
func (e imageExtractError) Error() string {
return e.message
}
View gist:39441f367d81a4966e03b6674801f5c2
func onExtractError(err error, name string, tag string) ([]schema.Blob, ImageManifest, error){
if exc, ok := err.(ExtractException) ok {
logger := env.GetLogger().WithError(exc.err)
logger.Errorf(exc.message, name, tag)
return []schema.Blob{}, ImageManifest{}, exc.err
}
}
View DeathEffectSpawner.cs
using Spitkit.Behaviors;
using UnityEngine;
using Spitkit.Reflection;
using System;
namespace Spitkit.Behaviors
{
[AutoInject]
public class DeathEffectSpawner : MonoBehaviour
View bind.cs
ConcreteIdBinderNonGeneric binds;
if (initable) {
binds = Container.Bind(typeof(IInitializable));
}
if (disposable) {
binds = Container.Bind(typeof(IDisposable));
}
binds.To<TContract>().FromInstance(instance);
View PairWithPrevious.cs
using UniRx;
namespace Spitkit.Operations
{
public static class RxOperations {
public static IObservable<Tuple<TSource, TSource>>
PairWithPrevious<TSource>(this IObservable<TSource> source)
{
return source.Scan(
Tuple.Create(default(TSource), default(TSource)),
View Gastarias.cs
using UnityEngine;
using Zenject;
using UniRx;
using UniRx.Triggers;
using Spitkit.Behaviors;
using Valve.VR.InteractionSystem;
namespace NeonJungle.Behaviors
{
View Killable.cs
using UnityEditor;
using UnityEngine;
using Zenject;
using UniRx;
using Spitkit.Operations;
using FullInspector;
namespace Spitkit.Behaviors
View gist:db376b0bafb71e4eed9976e6db8d76d7
protected void BindEvent<T, R>(Zenject.Signal<T, R> signal, string name)
{
BindEvent<T>(signal.AsObservable, name);
}
// R cannot be used as type parameter TDerived in the generic type Signal<Param1, TDerived> there is no boxing for R to Zenject.Signal<T, R>
View bind.cs
protected ReadOnlyReactiveProperty<T> GetProperty<T>(object owner, string name)
{
var type = owner.GetType();
var flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;
var fields = type.GetFields(flags);
var field = type.GetField(name, flags);
if (field != null)
{
return field.GetValue(owner) as ReadOnlyReactiveProperty<T>;
} else {