A Pen by Naga Vinod Kumar on CodePen.
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 { describe, it, expect, spyOn } from "bun:test"; | |
import { fetchJson } from "./fetchJson"; | |
class MockResponse { | |
static instanceCount = 0; | |
constructor( | |
public readonly ok: boolean, | |
private jsonSuccess: boolean | "bad parse", | |
) { | |
MockResponse.instanceCount++; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 json | |
from time import sleep | |
API_KEY = "INSERT YOUR API KEY HERE" | |
AUTHORIZATION = "INSERT YOUR AUTHORIZATION TOKEN HERE" | |
url = "https://api.monsterapi.ai/apis/add-task" | |
fetch_url = "https://api.monsterapi.ai/apis/task-status" |
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
# coding=utf-8 | |
# Copyright 2023 The HuggingFace Inc. team. All rights reserved. | |
# | |
# 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
/* | |
Adapted from https://gist.github.com/adminy/5e80c40592b135e6d7fd8e6bd88c825a | |
Use something like https://gist.github.com/abir-taheer/0d3f1313def5eec6b78399c0fb69e4b1#file-instagram-follower-following-js to get the list of | |
users to unfollow. | |
Instructions: | |
1. Open: https://www.instagram.com/{YOUR_USERNAME}/following/ in your web browser <-- replace | |
{YOUR_USERNAME} with your username | |
2. Edit the `usersToUnfollow` array below to contain the usernames of the people you want |
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 randInt = (min, max) => Math.floor(Math.random() * (max - min + 1) + min) // min and max included | |
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)) | |
const followersElement = getFollowersElementWithUsername(getUsername()) | |
followersElement.click() | |
function getUsername () { | |
const pageTitleElement = document.getElementsByTagName('h2')[0] | |
if (!pageTitleElement) throw new Error('No title to get username from') | |
return pageTitleElement.innerHTML |
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 node | |
const path = require('path') | |
const generatorHelper = require('@prisma/generator-helper') | |
const { Project, StructureKind, VariableDeclarationKind } = require('ts-morph') | |
generatorHelper.generatorHandler({ | |
onManifest(config) { | |
return { | |
prettyName: 'Filters', | |
defaultOutput: path.resolve(__dirname, 'filters'), |
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
// Based on HSL. Generate an Abritrary pastel tone color based on input text. | |
/* | |
1. s = saturation | |
2. l = lightness | |
*/ | |
function stringToHslColor(str, s=30, l=80) { | |
const hash = 0; | |
for (let i = 0; i < str.length; i++) { | |
hash = str.charCodeAt(i) + ((hash << 5) - hash); |
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
pragma solidity ^0.4.24; | |
// ---------------------------------------------------------------------------- | |
// Sample token contract | |
// | |
// Symbol : LCST | |
// Name : LCS Token | |
// Total supply : 100000 | |
// Decimals : 2 | |
// Owner Account : 0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe |
NewerOlder