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
// Claude Code is a Beta product per Anthropic's Commercial Terms of Service. | |
// By using Claude Code, you agree that all code acceptance or rejection decisions you make, | |
// and the associated conversations in context, constitute Feedback under Anthropic's Commercial Terms, | |
// and may be used to improve Anthropic's products, including training models. | |
// You are responsible for reviewing any code suggestions before use. | |
// (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms). | |
// Version: 0.2.9 |
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
#!/usr/bin/php | |
<?php | |
declare(strict_types = 1); | |
// require_once ('hhb_.inc.php'); | |
hhb_init (); | |
if ($argc !== 3) { | |
fprintf ( STDERR, "usage: %s timestamp url\n", $argv [0] ); | |
fprintf ( STDERR, "example: %s 20091012061648 http://www.p4w.se\n", $argv [0] ); | |
die ( 1 ); | |
} |
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
# pip install openai retry | |
import openai | |
from retry import retry | |
model="curie:ft-xxx-2021-01-09-19-21-20 | |
@retry(Exception, tries=3, delay=10) | |
def get_gpt_reason(prompt, model, prob=False, max_tokens=10): | |
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
<? | |
$arg = array( | |
'form_id' => $opts['subscription_form'], | |
'item_key' => FrmAppHelper::get_unique_key( | |
'', $pre . 'frm_items', 'item_key', 0 ), | |
'item_meta' => array( | |
$opts['subscription_id'] => $payment->response->getSubscriptionId(), | |
$opts['subscription_pre_payment_id'] => $payment->entry->id, | |
$opts['subscription_date'] => $metas[$opts['recur_date']], | |
$opts['subscription_amount'] => $metas[$opts['recur_amount']], |
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
#!/usr/bin/php | |
<?php | |
declare(strict_types = 1); | |
// require_once ('hhb_.inc.php'); | |
hhb_init (); | |
if ($argc !== 3) { | |
fprintf ( STDERR, "usage: %s timestamp url\n", $argv [0] ); | |
fprintf ( STDERR, "example: %s 20091012061648 http://www.p4w.se\n", $argv [0] ); | |
die ( 1 ); | |
} |
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
input.form-submit.button-small { | |
padding: 4px 8px; | |
font-weight: bold; | |
} | |
.container-inline input.form-submit.button-small + .ajax-progress.ajax-progress-throbber .throbber { | |
position: absolute; | |
left: 19px; | |
margin-top: 7px; | |
} |
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
<?php | |
function get_form_entries($baseurl, $username, $password, $uid, $formid) { | |
$headerfile = tempnam("/tmp", "formidable-header"); | |
$cookiefile = tempnam("/tmp", "formidable-cookie"); | |
$csvfile = tempnam("/tmp", "formidable-csv"); | |
$login_cmd = "curl -s -D $headerfile -c $cookiefile 'http://$baseurl/wp-login.php' --data 'log=$username&pwd=$password&testcookie=1' -H 'Cookie: wp-settings-time-$uid=2829600000; wordpress_test_cookie=WP+Cookie+check' 2> /dev/null"; | |
$pull_csv_cmd = "curl -s -D $headerfile -b $cookiefile -o $csvfile -c $cookiefile 'http://$baseurl/wp-admin/admin-ajax.php?frm_action=0&action=frm_entries_csv&form=$formid'"; | |
exec($login_cmd, $output, $status); | |
if ($status != 0) { | |
throw new Exception("Can't login"); |
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
// | |
// NaturalMotion.swift | |
// | |
// Created by Maciej Swic on 2014-06-06. | |
// Released under the MIT license. | |
// | |
import UIKit | |
extension UIView { |
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
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |