This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EffectAsset { | |
name: "particle_swirl", | |
capacity: 8192, | |
spawner: Spawner { | |
num_particles: Single( | |
64.0, | |
), | |
spawn_time: Single( | |
1.0, | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// License: BSD-3 | |
use std::io::{self, Write}; | |
use std::string::FromUtf8Error; | |
use std::sync::Arc; | |
use antidote::RwLock; | |
use bevy::prelude::*; | |
use bevy::reflect::FromReflect; | |
use bevy::utils::tracing::{self, Dispatch}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
curl https://hackage.haskell.org/package/Chart-1.1/docs/Control-Lens-Operators.html | python -c ' | |
import re, sys | |
for line in sys.stdin.readlines(): | |
m = re.search(r"""class="def">([^<]+)</a> ::""", line) | |
if m: | |
print(m.group(1)[1:-1].replace("<", "<").replace("&", "&").replace(">", ">")) | |
' | sort | uniq | wc -l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[macro_use] | |
extern crate serde_derive; | |
extern crate toml; | |
use std::borrow::Cow; | |
use std::fs::File; | |
use std::io::Read; | |
#[derive(Debug, Serialize, Deserialize)] | |
pub struct Config<'a> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Extensions to the standard Python mock library. | |
Use it instead of the library itself. | |
""" | |
from __future__ import absolute_import | |
try: | |
from unittest.mock import * | |
except ImportErorr: | |
from mock import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ast | |
import inspect | |
import os | |
def get_short_lambda_source(lambda_func): | |
"""Return the source of a (short) lambda function. | |
If it's impossible to obtain, returns None. | |
""" | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from celery import Task | |
from flask import has_request_context, make_response, request | |
from myapp import app | |
__all__ = ['RequestContextTask'] | |
class RequestContextTask(Task): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from enum import Enum | |
from inspect import isclass | |
import re | |
from sqlalchemy.types import TypeDecorator, TypeEngine | |
__all__ = ['EnumType'] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Module implementing an enhanced string column type for SQLAlchemy | |
with a support for regular expression operators in Postgres and SQLite. | |
""" | |
import re | |
from sqlalchemy import String as _String, event, exc | |
from sqlalchemy.engine import Engine | |
from sqlalchemy.ext.compiler import compiles | |
from sqlalchemy.sql.expression import BinaryExpression, func, literal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect -- | |
# Purge local memcache, flushing all the keys & values | |
set escapechar !; # easier to send than default ^] | |
set host [lindex $argv 1]; | |
if { ![string length $host] } { | |
set host "localhost"; | |
} |
NewerOlder