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
| .PHONY: add-secret chat aws-cli | |
| add-secret: | |
| @read -p "Secret name (e.g., some-api-key): " name; \ | |
| read -p "Secret value: " value; \ | |
| security add-generic-password -a "${USER}" -s "$$name" -w "$$value" -U; \ | |
| echo "✓ Secret '$$name' stored in Keychain" | |
| chat: | |
| @export ANTHROPIC_API_KEY="$$(security find-generic-password -s claude-api-key -w 2>/dev/null)"; \ |
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
| #!/bin/sh | |
| for f in ./*.mp3 | |
| do | |
| bpm=$(bpm-tag -n "${f}" 2>&1 | grep -Eo '\d+\.\d+ BPM') | |
| newname=$(echo "${f%.*} ${bpm}.mp3") | |
| mv "${f}" "${newname}" | |
| done |
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
| # widget | |
| views: | |
| # list of views | |
| - area: | |
| axis: left | |
| stacked: False | |
| metrics: | |
| __overall__: | |
| # list of metrics |
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
| def input_season(): | |
| map = { | |
| 'W': 'Winter', | |
| 'S': 'Spring', | |
| 'M': 'Summer', | |
| 'A': 'Autumn' | |
| } | |
| while True: | |
| inp = input('Choose season: Winter(W), Spring(S),Summer(M), Autumn(A): ') | |
| if inp.upper() not in map.keys(): |
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
| autostop: | |
| description: list of autostop constraints | |
| type: list | |
| schema: | |
| type: string | |
| default: [] | |
| #---------------------------- | |
| gun_config: |
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
| # power set | |
| def pop_element(s): | |
| if len(s) > 0: | |
| element = next(iter(s)) | |
| return element, s - {element} | |
| else: | |
| return None, frozenset() | |
| def power_set_step(carry, remaining): |
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
| function split(arr){ | |
| return arr.reduce(function(a, b){ | |
| if (b < 0) { | |
| return a.end_chunk(b) | |
| } | |
| else { | |
| return a.add_to_last_chunk(b) | |
| } | |
| }, { | |
| chunks: [[]], |
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
| # coding=utf-8 | |
| from urllib2 import urlopen | |
| import page_objects | |
| __author__ = 'Arseniy' | |
| import os | |
| import webapp2 | |
| import jinja2 | |
| import lxml.html as html |
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
| (define (sum-integers-1 a b) | |
| (if (> a b) | |
| 0 | |
| (+ a (sum-integers-1 (+ a 1) b)))) | |
| (define (sum term a next b) | |
| (if (> a b) | |
| 0 | |
| (+ (term a) | |
| (sum term (next a) next 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
| (define (sum-integers-1 a b) | |
| (if (> a b) | |
| 0 | |
| (+ a (sum-integers-1 (+ a 1) b)))) | |
| (define (sum term a next b) | |
| (if (> a b) | |
| 0 | |
| (+ (term a) | |
| (sum term (next a) next b)))) |
NewerOlder