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
package appx_homescreen.appx; | |
import android.support.v4.view.MarginLayoutParamsCompat; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.view.Menu; | |
import android.view.MenuItem; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.Button; |
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
<?xml version='1.0' encoding='UTF-8'?> | |
<project> | |
<actions/> | |
<description></description> | |
<keepDependencies>false</keepDependencies> | |
<properties/> | |
<scm class="hudson.plugins.git.GitSCM" plugin="git@2.5.2"> | |
<configVersion>2</configVersion> | |
<userRemoteConfigs> | |
<hudson.plugins.git.UserRemoteConfig> |
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
# See https://prettier.io/docs/en/options.html | |
printWidth: 70 | |
tabWidth: 4 | |
semi: true | |
singleQuote: true | |
trailingComma: 'es5' | |
bracketSpacing: true | |
arrowParens: 'always' | |
endOfLine: 'lf' |
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.exports = { | |
testEnvironment: 'node', | |
roots: ['<rootDir>/test'], | |
testMatch: ['**/*.test.ts'], | |
transform: { | |
'^.+\\.tsx?$': 'ts-jest', | |
}, | |
// Added so that jest prefer to run tests on files | |
// with the *.ts extension instead (see below). | |
// https://stackoverflow.com/a/50145833/10237506 |
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
[alias] | |
d = "doc --no-deps --open" | |
rr = "run --release" |
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 re | |
import string | |
from time import time | |
def main(): | |
# Rust version run with `--release` (for reference), using `only_one_string` from here: | |
# https://stackoverflow.com/a/71864244/10237506 | |
# trim_whitespace: 30ms |
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
# Ref: | |
# - https://pythonspeed.com/articles/base-image-python-docker-images/ | |
# - https://github.com/FNNDSC/ubuntu-python3/blob/master/Dockerfile | |
# | |
# This Docker image uses the `ubuntu` base image for a slight performance | |
# improvement as mentioned in the article. At build time, you'll need to pass | |
# in the PyPI authentication info, as shown below: | |
# | |
# docker build -t ${image_tag_name} \ | |
# --build-arg PYPI_URL=${PYPI_URL} \ |
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 timeit import timeit | |
data = [ | |
{ | |
"eventStatus": "Failure", | |
"eventType": "Archive", | |
"objectName": "W12 BO Template", | |
"time": "2022-08-23T10:09:33.092Z" | |
}, | |
{ |
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
# See comment below for an explanation of what this script is testing! | |
from dataclasses import dataclass, is_dataclass | |
from timeit import timeit | |
@dataclass | |
class A: | |
a: int = 10 |
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 { readdirSync, rmdirSync, statSync } from 'node:fs'; | |
import { basename, join } from 'node:path'; | |
export const cleanupEmptyFolders = ( | |
folder: string, | |
exclude: string[] = ['node_modules'] | |
) => { | |
if (!statSync(folder).isDirectory()) return; | |
const folderName = basename(folder); |
OlderNewer