This file contains hidden or 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
uniform vec3 c_colorToReplace; | |
uniform float c_thresholdSensitivity; | |
uniform float c_smoothing; | |
#pragma transparent | |
#pragma body | |
vec3 textureColor = _surface.diffuse.rgb; | |
float maskY = 0.2989 * c_colorToReplace.r + 0.5866 * c_colorToReplace.g + 0.1145 * c_colorToReplace.b; |
This file contains hidden or 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
const refreshToken = async () => { | |
const refreshPromise = new Promise(async (resolve) => { | |
const user = await Auth.currentAuthenticatedUser(); | |
const session = await Auth.currentSession(); | |
user.refreshSession(session.refreshToken, async (res, newSession) => { | |
if (newSession) { | |
await Auth.currentUserCredentials(); | |
} | |
resolve('ok'); |
This file contains hidden or 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
$util.error($util.toJson($variable), "404") | |
#** | |
Where $variable is variable to print out in response. | |
*# |
This file contains hidden or 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
type Subscription { | |
translationsSubscription: TranslationRequest | |
@aws_subscribe( | |
mutations: ["assignTranslation", "unassign", "updateTranslationState"] | |
) | |
newTranslationSubscription: TranslationRequest | |
@aws_subscribe(mutations: ["submitTranslationRequest"]) | |
} |
This file contains hidden or 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
{ | |
"version" : "2017-02-28", | |
"operation" : "UpdateItem", | |
"key" : { | |
"createdAt": $util.dynamodb.toDynamoDBJson($ctx.args.createdAt), | |
"translationState": $util.dynamodb.toDynamoDBJson('waiting') | |
}, | |
"update" : { | |
"expression" : "SET #content = :content", | |
"expressionNames" : { |
This file contains hidden or 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
embeddings = tf.get_variable('embedding', initializer = tf.constant(vectors)) | |
indexes = tf.get_variable('index', initializer = tf.constant(indexes)) | |
metadata_file = '/run/media/backman/yay/ui_embs/metadata.tsv' | |
config = tf.contrib.tensorboard.plugins.projector.ProjectorConfig() | |
emb_proj = config.embeddings.add() | |
emb_proj.tensor_name = 'embedding' | |
emb_proj.sprite.image_path = 'spritesheet.png' | |
emb_proj.sprite.single_image_dim.extend([64,64]) | |
emb_proj.metadata_path = metadata_file | |
summary_writer = tf.summary.FileWriter('/run/media/backman/yay/ui_embs/') |
This file contains hidden or 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
public class MyTaskService extends HeadlessJsTaskService { | |
@Override | |
protected @Nullable HeadlessJsTaskConfig getTaskConfig(Intent intent) { | |
return new HeadlessJsTaskConfig( | |
"MeasureInternetz", | |
null, | |
5000); | |
} | |
} |
This file contains hidden or 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
public class NetworkChangeReceiver extends BroadcastReceiver { | |
@Override | |
public void onReceive(final Context context, final Intent intent) { | |
if(!isAppOnForeground((context))){ | |
if(isInternet(context)) | |
{ | |
Intent serviceIntent = new Intent(context, MyTaskService.class); | |
context.startService(serviceIntent); |
This file contains hidden or 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
<receiver android:name=".NetworkChangeReceiver" > | |
<intent-filter> | |
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" /> | |
</intent-filter> | |
</receiver> |
NewerOlder