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 { StackContext } from "sst/constructs"; | |
import * as ec2 from "aws-cdk-lib/aws-ec2"; | |
import * as ecs from "aws-cdk-lib/aws-ecs"; | |
import * as elbv2 from "aws-cdk-lib/aws-elasticloadbalancingv2"; | |
import * as efs from "aws-cdk-lib/aws-efs"; | |
import * as iam from "aws-cdk-lib/aws-iam"; | |
import * as cloudfront from "aws-cdk-lib/aws-cloudfront"; | |
import * as origins from "aws-cdk-lib/aws-cloudfront-origins"; | |
import { RemovalPolicy, Duration } from "aws-cdk-lib"; | |
import { nanoid } from "nanoid"; |
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
[DataRow(HttpStatusCode.Ambiguous)] | |
[DataRow(HttpStatusCode.MultipleChoices)] | |
[DataRow(HttpStatusCode.Moved)] | |
[DataRow(HttpStatusCode.MovedPermanently)] | |
[DataRow(HttpStatusCode.Found)] | |
[DataRow(HttpStatusCode.Redirect)] | |
[DataRow(HttpStatusCode.RedirectMethod)] | |
[DataRow(HttpStatusCode.SeeOther)] | |
[DataRow(HttpStatusCode.NotModified)] | |
[DataRow(HttpStatusCode.UseProxy)] |
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 glob | |
import pandas as pd | |
workbooks = glob.glob('*.xlsx') | |
result_df = pd.DataFrame() | |
for wb in workbooks: | |
xlsx = pd.read_excel(wb, engine='openpyxl') | |
result_df = pd.concat([result_df, xlsx]) |
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 sys | |
import json | |
import argparse | |
import boto3 | |
parser = argparse.ArgumentParser("enqueue S3 objects into SQS") | |
parser.add_argument('bucket_name') | |
parser.add_argument('prefix') | |
parser.add_argument('postfix') |
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
proxy http://{proxy_server}:{proxy_port} | |
https-proxy http://{proxy_server}:{proxy_port} | |
strict-ssl=false |
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
function toggleClass(elemenet, className){ | |
var classList = elemenet.className.split(' '); | |
var indexOfClassName = classList.indexOf(className); | |
if(indexOfClassName > -1) classList.splice(indexOfClassName, 1); | |
else classList.push(className); | |
elemenet.className = classList instanceof Array ? classList.join(' ') : classList; | |
} |
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
List<ObjectPermissions> permissionSetAssignmentIds = [SELECT ParentId | |
FROM ObjectPermissions | |
WHERE | |
PermissionsCreate = True AND | |
PermissionsRead = True AND | |
PermissionsEdit = True AND | |
PermissionsDelete = False AND | |
PermissionsViewAllRecords = False AND | |
PermissionsModifyAllRecords = False AND |
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
function stepsToPosition(a, b){ | |
var limit = 1000; | |
var steps = 0; | |
var o = {}; | |
var x = 0, y = 0; | |
var moves = 3; | |
for(var i = 0; i < limit; i++) { | |
var r = (x < a) ? (x + 2 < a ? 2 : 1) : 1; |
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
``THE ROBOT AND THE BABY'' | |
A story by John McCarthy | |
``Mistress, your baby is doing poorly. He needs your attention.'' | |
``Stop bothering me, you fucking robot.'' | |
``Mistress, the baby won't eat. If he doesn't get some human love, the Internet pediatrics book says he will die.'' | |
``Love the fucking baby, yourself.'' |
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
public class Transverser { | |
private String rawJson; | |
private Object parsedJson; | |
private final String PATH_TOKEN = '/'; | |
private final String FILTER_START_TOKEN = '['; | |
private final String FILTER_END_TOKEN = ']'; | |
private final String COMBO_START_TOKEN = '('; | |
private final String COMBO_END_TOKEN = ')'; |
NewerOlder