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
async function delay(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)) | |
} | |
const serial = async () => { | |
console.log("Serial sleep!") | |
await delay(5000) | |
await delay(5000) | |
} |
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 | |
class Bank: | |
def __init__(self): | |
self.accounts = { 'alice': 100 } | |
def withdraw(self, name: str, amount: int): | |
''' Subtract funds from bank account then ''' ;return | |
self.accounts[account] -= amount |
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
{ | |
"hb.visaissuercert.visa.com": { | |
"CT": true, | |
"CAA": false, | |
"HSTS": true, | |
"DNSSEC": true, | |
"TLS/SSL": true | |
}, | |
"aclaimant.us1app.churnzero.net": { | |
"CT": true, |
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
"[CodePen-Nights]": { | |
"textMateRules": [ | |
{ | |
"scope": "variable.parameter.function-call.python", | |
"settings": { | |
"foreground": "#E06C75" | |
} | |
}, | |
{ | |
"scope": "meta.function-call.arguments.python", |
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
"[GitHub Light]": { | |
"textMateRules": [ | |
{ | |
"scope": "variable.language.special.self.python", | |
"settings": { | |
"foreground": "#D73A49" | |
} | |
}, | |
{ | |
"scope": [ |
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
[autodisable] | |
DisableWhenMousePluggedIn=true | |
[parameters] | |
InvertVertScroll=true | |
Tapping=true |
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 <iostream> | |
class Foo | |
{ | |
public: | |
Foo() {} | |
void method1() | |
{ | |
std::cout << "Foo::method1()" << std::endl; |
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 django.db import models | |
from django.utils import timezone | |
class Bank(models.Model): | |
bank_ifsc = models.CharField(max_length=200, blank=False, primary_key=True) | |
bank_name = models.CharField(max_length=200, blank=False) | |
bank_addr = models.CharField(max_length=400, blank=True) | |
def __str__(self): |
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 os | |
from conans import ConanFile, CMake, ConfigureEnvironment | |
from conans.tools import download, unzip, replace_in_file | |
def tagFromVersion(version): | |
''' | |
@arg version = "{major_version}.{minor_version}.{__version}" | |
returns "{major_version}_{minor_version}" | |
''' | |
version = version.split('.') |
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
/** | |
Opening and closing hours for a store: | |
Given two arrays of si*ze seven that respectively indicate opening and closing hours over days of week for a store, print the store hours in friendly format. | |
Special Conditions: | |
1. If opening hours are greater than closing hours, the store is assumed closed on that day. | |
2. If opening/closing hours are greater than 2400 hours or for any other error condition, the store is assumed closed that day. | |
3. If opening hours are equal to closing hours, the store is open for 24 hours. | |
Example: | |
Open - [900,1000,1000,1000,2700,1200,800] |
NewerOlder