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 time | |
from datetime import datetime | |
import scrollphathd as sphd | |
from gpiozero import LightSensor | |
LDR_PIN = 24 | |
MAX_BRIGHTNESS = 0.2 |
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/env python3 | |
# Copyright 2017 Google Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
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
const fs = require("fs"); | |
const net = require("net"); | |
const os = require("os"); | |
let opts = {}; | |
switch (process.argv[2]) { | |
case "pipe": | |
opts.path = `\\\\?\\pipe\\${os.userInfo().username}\\ZoweDaemonTest`; | |
break; | |
case "socket": |
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
@( | |
'7zip' | |
'arduino' | |
'audacity' | |
'cinebench' | |
'conemu' | |
'crystaldiskinfo' | |
'filezilla' | |
'firacode-ttf' | |
'firefox' |
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
// Coded online at https://repl.it/@t1m0thyj/F-Scratchpad-1 | |
open System | |
let dateStr = "1/1/2000,2/29/2000,2/29/2004,2/29/2008,2/29/2012,2/29/2016,3/14/15 9:26:53" | |
let getDayDiff (date1:string, date2:string) = | |
let couldParse, startDate = DateTime.TryParse date1 | |
if (not couldParse) then failwithf "Date '%s' is not valid" date1 | |
let couldParse, endDate = DateTime.TryParse date2 |
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 requests | |
import subprocess | |
GITHUB_API = "https://api.github.com" | |
GITHUB_PAT = "<personal-access-token>" | |
OLD_USER = "<username>" | |
NEW_USER = "<username>" | |
gists = requests.get(GITHUB_API + "/users/" + OLD_USER + "/gists").json() | |
for gist in gists: |
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
"""zowe_dl.py - Download all data sets matched by a wildcard | |
Usage: zowe_dl.py <dsname-wildcard> [zowe-args] | |
Examples: | |
zowe_dl.py HLQ.* --zosmf-p PROFILE | |
zowe_dl.py HLQ.* --host HOST --port PORT --user USER --password PASSWORD --no-ru | |
""" | |
import json |
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 { IProfArgAttrs, IProfile, ProfileInfo } from "@zowe/imperative"; | |
import { trueCasePathSync } from "true-case-path"; | |
import { window, workspace } from "vscode"; | |
/** | |
* Load properties for the default Zowe CLI profile of a given type. | |
* @param profileType The type of profile (e.g., "zosmf") | |
* @returns Profile object with property names and values defined | |
*/ | |
async function getDefaultProfile(profileType: string): Promise<IProfile> { |
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/bash | |
set -ex | |
npmRegistry=$1 | |
tempDir=$(mktemp -d) | |
cd $tempDir | |
[[ ! -z "$npmRegistry" ]] && echo "@zowe:registry=$npmRegistry" >> .npmrc | |
npm init -y | |
npm install @zowe/cli | |
ls node_modules # Only one dependency should be at top level (@zowe/cli) | |
grep flatted node_modules/@zowe/cli/npm-shrinkwrap.json |
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
#include <Adafruit_IS31FL3731.h> | |
#include <ezTime.h> | |
#include <WiFiEsp.h> | |
#include "arduino_secrets.h" | |
// Emulate Serial1 on pins 6/7 if not present | |
#ifndef HAVE_HWSERIAL1 | |
#include "SoftwareSerial.h" | |
SoftwareSerial Serial1(6, 7); // RX, TX | |
#endif |