Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus| import random | |
| import time | |
| def random_int64(): | |
| '''Generate a random 64-bit signed integer, with timestamp embedded in the higher 42 bits.''' | |
| CUSTOM_EPOCH = 1735689600 # 2025/01/01 00:00:00 UTC | |
| HIGH_42BIT_MASK = 0x7FFFFFFFFFC00000 # hex((2 ** 41 - 1) << 22) | |
| LOW_22BIT_MASK = 0x3FFFFF # hex(2 ** 22 - 1) |
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.4; | |
| import "@openzeppelin/contracts@4.7.3/token/ERC721/ERC721.sol"; | |
| import "@openzeppelin/contracts@4.7.3/access/Ownable.sol"; | |
| import "@openzeppelin/contracts@4.7.3/utils/Counters.sol"; | |
| contract MyToken is ERC721, Ownable { | |
| using Counters for Counters.Counter; |
| const express = require('express'); | |
| const line = require('@line/bot-sdk'); | |
| const request = require('request'); | |
| const CHANNEL_ACCESS_TOKEN = 'YOUR_CHANNEL_ACCESS_TOKEN'; | |
| const CHANNEL_SECRET = 'YOUR_CHANNEL_SECRET'; | |
| const OPENAI_API_KEY = 'YOUR_OPENAI_API_KEY'; | |
| // 建立 LINE Bot 物件 | |
| const config = { |
| I am attesting that this GitHub handle fukuball is linked to the Tezos account tz1dFTtmvmongT6LL1Qxdy4SVAqAGiVPhx7v for tzprofiles | |
| sig:edsigthv7u9CYpiqHsVQfDVa76Xq7qmqeCmAKA3FAWiHKXTDet1bHdfAry6ujFsYxaKxwGE9TkxTiazfAixbZi3VogZCJK9HfB8 |
| { | |
| "config": { | |
| "chainId": 42, | |
| "homesteadBlock": 0, | |
| "eip150Block": 0, | |
| "eip150Hash":"0x0000000000000000000000000000000000000000000000000000000000000000", | |
| "eip155Block": 0, | |
| "eip158Block": 0, | |
| "byzantiumBlock": 0 | |
| }, |
| pragma solidity ^0.4.16; | |
| interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } | |
| contract TokenERC20 { | |
| // Public variables of the token | |
| string public name; | |
| string public symbol; | |
| uint8 public decimals = 18; | |
| // 18 decimals is the strongly suggested default, avoid changing it |
| <?php | |
| // Server file | |
| class PushNotifications { | |
| // (Android)API access key from Google API's Console. | |
| private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI'; | |
| // (iOS) Private key's passphrase. | |
| private static $passphrase = 'joashp'; | |
| // (Windows Phone 8) The name of our push channel. | |
| private static $channelName = "joashp"; |
| #!/usr/bin/env python3 | |
| import math | |
| # >> Discrete Fourier transform for sampled signals | |
| # x [in]: sampled signals, a list of magnitudes (real numbers) | |
| # yr [out]: real parts of the sinusoids | |
| # yi [out]: imaginary parts of the sinusoids | |
| def dft(x): | |
| N, yr, yi = len(x), [], [] |