GET /api/paste/?format=api&offset=175&sort=-size
HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 370,
    "next": "http://paste.winny.tech/api/paste/?format=api&limit=25&offset=200&sort=-size",
    "previous": "http://paste.winny.tech/api/paste/?format=api&limit=25&offset=150&sort=-size",
    "results": [
        {
            "id": 586,
            "title": "dont threaten people 1",
            "body": "oct. 10 10:52:02 <dailykoder>\tsocraticDev, what's your end goal?\noct. 10 10:52:14 <socraticDev>\then goal\noct. 10 10:52:25 <dont_thread_on_me>\tim banned from you gae channel\noct. 10 10:52:29 <dont_thread_on_me>\tbut you keep highlighting me\noct. 10 10:52:31 <socraticDev>\tdont_thread_on_me, \noct. 10 10:52:38 <socraticDev>\tyou dont like being highlighted?\noct. 10 10:52:42 <dont_thread_on_me>\tok, maximillien\noct. 10 10:52:56 <socraticDev>\tit's a king's name\noct. 10 10:52:57 <dailykoder>\timagine getting a stroke\noct. 10 10:52:57 <dont_thread_on_me>\tyoure starting to push too many buttons\noct. 10 10:52:58 <dailykoder>\tcringe\noct. 10 10:53:01 <socraticDev>\tit means the Mightiest\noct. 10 10:53:09 <dont_thread_on_me>\tit means you'll get swatted\n\n",
            "timestamp": "2022-10-10T15:12:41.040987Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 216,
            "size": 768,
            "author": 659,
            "language": null
        },
        {
            "id": 52,
            "title": "toggle_geometry.lua",
            "body": "-- toggle-geometry.lua\n--\n-- Author:  winny https://winny.tech/\n-- License: Unlicense\n--\n-- Simple utility script to \"fix\" geometry on the fly, such that the\n-- window manage does not need to force mpv to stay in a certain spot\n-- or keep its window size.\n\nlocal utils = require 'mp.utils'\n\nfunction toggle_geometry()\n   local w , h = mp.get_osd_size()\n   if w == 0 then\n      print('No viewport.')\n      return\n   end\n      \n   if mp.get_property('geometry') == '' then\n      local g = w .. 'x' .. h\n      mp.set_property('geometry', g)\n      mp.osd_message('Set geometry to ' .. g)\n   else\n      mp.set_property('geometry', '')\n      mp.osd_message('Clear geometry')\n   end\nend\n\nmp.add_key_binding('Alt+a', mp.get_script_name(), toggle_geometry)",
            "timestamp": "2020-09-09T03:44:02.015256Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 525,
            "size": 766,
            "author": 2,
            "language": 451
        },
        {
            "id": 404,
            "title": "lambda managing http post from 3rd party",
            "body": "from flask import Flask, json, jsonify, request\n\n\n\napp = Flask(__name__)\n\n# curl --header \"Content-Type: application/json\" --request POST http://localhost:5000/pingdom --data \"{\\\"status\\\":\\\"alarm\\\"}\"\n@app.route('/pingdom', methods=['POST'])\ndef post_pingdomo():\n    request_pingdom = request.json\n\n    ret = {\n        'value': 'event not managed'\n    }\n\n    try:\n        event = request_pingdom['status']\n        if event == 'alarm':\n            ret['value'] = 'it is an alarm'\n        elif event == 'recovered':\n            ret['value'] = 'service has recovered'\n        else:\n            return f'event name \"{event}\"\" not managed', 400\n    except:\n        return 'function error', 500\n    \n    return jsonify(ret), 200\n",
            "timestamp": "2021-10-31T20:27:44.206886Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 285,
            "size": 762,
            "author": 318,
            "language": 471
        },
        {
            "id": 680,
            "title": "test",
            "body": "{ \n  \"view_text_style\" : {\n    \"name\": \"text_style_sweety\",\n    \"sub_name\": \"text_style_boom.fun\",\n    \"color\": \"default1\",\n    \"value\": 1,\n    \"text_size\" : 0\n  },\n  \"view_controller_style\" : {\n    \"name\": \"controller_style_sweet\",\n    \"sub_name\": \"controller_style_boom.fun\",\n    \"value\": \"1\"\n  },\n  \"view_scroll_style_2\" : {\n    \"name\": \"scroll_style_sweet\",\n    \"sub_name\": \"scroll_style_boom.fun\",\n    \"color\": \"default2\",\n    \"text_size\" : \"27\"\n  },\n  \"view_button_style\" : {\n    \"name\": \"button_style_sweet\",\n    \"sub_name\": \"button_style_boom.fun\",\n    \"color\": \"default3\",\n    \"tint_mode\" : \"0\"\n  },\n  \"view_image_style\" : {\n    \"name\": \"image_style_sweet\",\n    \"sub_name\": \"image_style_boom.fun\",\n    \"color\": \"default4\",\n    \"scale\" : \"2\"\n  }\n}",
            "timestamp": "2023-03-16T17:56:33.249806Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 309,
            "size": 759,
            "author": 806,
            "language": null
        },
        {
            "id": 546,
            "title": "deploy aws s3 bucket and create some default folders in it",
            "body": "resource \"aws_s3_bucket\" \"input\" {\n  bucket = \"project-${var.envir}-fileinput\"\n\n  tags = {\n    Name        = \"Where we upload files\"\n    Environment = var.envir\n  }\n}\n\nresource \"aws_s3_object\" \"input_basic_folders\" {\n  for_each     = var.default_s3_directories\n  bucket       = aws_s3_bucket.input.id\n  key          = \"${each.value}/\"\n  content_type = \"application/x-directory\"\n}\n\nvariable \"envir\" {\n  type        = string\n  description = \"Environment's name - fed by tfvars\"\n  default     = \"dev\"\n}\n\nvariable \"default_s3_directories\" {\n  type        = set(string)\n  description = \"Names of directories we want in every bucket\"\n  default     = [\"ClientData\", \"Reports\", \"TempData\", \"Templates\"]\n}",
            "timestamp": "2022-09-07T19:35:20.058124Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 216,
            "size": 754,
            "author": 610,
            "language": 49
        },
        {
            "id": 68,
            "title": ".bash_profile",
            "body": "#\n# ~/.bash_profile\n#\n\nexport EDITOR=\"$HOME/bin/EDITOR\"\n\nexport NPM_PACKAGES=\"$HOME/.npm-packages\"\nexport NODE_PATH=\"$NPM_PACKAGES/lib/node_modules:$NODE_PATH\"\n\npath_append() {\n    export PATH=\"$PATH:$1\"\n}\n\npath_prefix() {\n    export PATH=\"$1:$PATH\"\n}\n\nexport GOPATH=\"$HOME/gocode\"\nexport GOROOT=\"$HOME/go\"\nexport GOBIN=\"$HOME/gobin\"\npath_prefix \"$NPM_PACKAGES/bin\"\npath_append \"$HOME/.racket/latest/bin\"\npath_prefix \"$GOBIN\"\npath_prefix \"$GOPATH/bin:$GOROOT/bin\"\npath_prefix \"$HOME/.cabal/bin\"\npath_prefix \"$HOME/bin\"\npath_append \"$HOME/local/bin\"\npath_prefix \"$HOME/.cask/bin\"\npath_append \"/sbin\"\npath_append \"/usr/sbin\"\npath_append \"/usr/local/sbin\"\n[[ -d \"$HOME/.cargo\" ]] && source \"$HOME/.cargo/env\"\n\n[[ -f ~/.bashrc ]] && . ~/.bashrc",
            "timestamp": "2020-09-11T19:31:41.021217Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 465,
            "size": 753,
            "author": 2,
            "language": 179
        },
        {
            "id": 534,
            "title": "even daddy mail server refuse connection",
            "body": "Informations de diagnostic pour les administrateurs :\n\nServeur de génération : MN2PR06MB6751.namprd06.prod.outlook.com\nServeur de réception : MN2PR06MB6751.namprd06.prod.outlook.com\n\nkenneth@jensen.cf\n7/26/2022 12:44:42 AM - Server at MN2PR06MB6751.namprd06.prod.outlook.com returned '550 5.4.316 Message expired, connection refused(Socket error code 10061)'\n7/26/2022 12:34:14 AM - Server at jensen.cf (2607:5300:205:200::1ba5) returned '450 4.4.316 Connection refused [Message=Socket error code 10061] [LastAttemptedServerName=jensen.cf] [LastAttemptedIP=2607:5300:205:200::1ba5:25] [BN8NAM12FT044.eop-nam12.prod.protection.outlook.com](Socket error code 10061)'",
            "timestamp": "2022-07-26T00:55:48.551985Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 236,
            "size": 707,
            "author": 584,
            "language": null
        },
        {
            "id": 778,
            "title": "dynamic secret in pod mounted as volume definition files",
            "body": "apiVersion: v1\ndata:\n  db-url: localhost:54321\nkind: ConfigMap\nmetadata:\n  creationTimestamp: null\n  name: my-configmap\n---\napiVersion: v1\ndata:\n  passwd: MTIzNDU=\nkind: Secret\nmetadata:\n  creationTimestamp: null\n  name: my-secret\n---\napiVersion: v1\nkind: Pod\nmetadata:\n  name: my-pod\nspec:\n  containers:\n    - name: my-container\n      image: my-image\n      volumeMounts:\n        - name: config-volume\n          mountPath: /etc/config\n        - name: secret-volume\n          mountPath: /etc/secret\n  volumes:\n    - name: config-volume\n      configMap:\n        name: my-configmap\n    - name: secret-volume\n      secret:\n        secretName: my-secret\n",
            "timestamp": "2023-06-03T18:07:54.941715Z",
            "expiry": "2025-06-01T04:00:00Z",
            "freeze_hits": false,
            "hits": 145,
            "size": 705,
            "author": 920,
            "language": 157
        },
        {
            "id": 422,
            "title": "ircbox.test.inventory",
            "body": "[vars]\nansible_python_interpreter=/usr/bin/python3\n\n[ircbox]\n#cloud_hermes ansible_ssh_host=hermes.winny.tech\nvagrant_ircbox\n\n[vagrant]\nvagrant_ircbox ansible_ssh_port=2222 ansible_ssh_private_key_file=/home/winston/pro/infra/ircbox/.vagrant/machines/ircbox/virtualbox/private_key\n\n[production]\n\n[production:vars]\nansible_ssh_user=ansible\n\n[vagrant:vars]\nansible_ssh_user=vagrant\nansible_ssh_host=127.0.0.1\nansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'\n#ansible_ssh_private_key_file=/home/winston/.vagrant.d/boxes/alpine312_ansible/0/virtualbox/vagrant_private_key\nansible_ssh_private_key_file=/home/winston/.vagrant.d/insecure_private_key\n",
            "timestamp": "2022-01-16T23:10:02.866128Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 331,
            "size": 701,
            "author": 2,
            "language": 397
        },
        {
            "id": 391,
            "title": "rotate-image",
            "body": "#!/usr/bin/env bash\n# Interactively rotate a photograph and prompt to save it.\nset -eu -o pipefail\ntempfile=\"$(mktemp -t \"XXXXXXXXXXXXXXXX.$(basename \"$1\")\")\"\ntrap \"rm -f -- $tempfile\" EXIT\ncp -- \"$1\" \"$tempfile\"\nwhile :; do\n    sxiv -- \"$tempfile\"\n    read -n 1 -r -p 'Rotate? (l|r|8|q|s) ' ROTATION\n    printf '\\n'\n    DIRECTION=0\n    case $ROTATION in\n        l*)\n            DIRECTION=-90\n            ;;\n        r*)\n            DIRECTION=90\n            ;;\n        8*)\n            DIRECTION=180\n            ;;\n        q*)\n            exit\n            ;;\n        s*)\n            cp -- \"$tempfile\" \"$1\"\n            exit\n    esac\n    convert -rotate \"$DIRECTION\" -- \"$1\" \"$tempfile\"\ndone\n",
            "timestamp": "2021-09-30T02:08:44.053808Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 374,
            "size": 700,
            "author": 2,
            "language": 179
        },
        {
            "id": 949,
            "title": "rabbit consume mssage",
            "body": "import pika\n\ndef callback(ch, method, properties, body):\n    print(f\" [x] Received {body}\")\n\ndef consume_message():\n    # Establish a connection to RabbitMQ server\n    connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))\n    channel = connection.channel()\n\n    # Declare a queue named 'hello'\n    channel.queue_declare(queue='hello')\n\n    # Set up a consumer and specify the callback function\n    channel.basic_consume(queue='hello', on_message_callback=callback, auto_ack=True)\n\n    print(' [*] Waiting for messages. To exit, press Ctrl+C')\n    # Start consuming messages\n    channel.start_consuming()\n\nif __name__ == '__main__':\n    consume_message()\n",
            "timestamp": "2023-11-20T12:59:35.685804Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 71,
            "size": 698,
            "author": 1151,
            "language": 471
        },
        {
            "id": 613,
            "title": "merge 2 linkedlist leetcode",
            "body": "#You are given the heads of two sorted linked lists list1 and list2.\n\n#Merge the two lists in a one sorted list. The list should be made by splicing together the nodes of the first two lists.\n\ndef mergeTwoLists(self, list1: ListNode, list2: ListNode) -> Optional[ListNode]:\n        curr = ret = ListNode()\n        while list1 and list2:\n            if list1.val < list2.val:\n                curr.next = list1\n                list1, curr = list1.next, list1\n            else:\n               curr.next = list2\n               list2, curr = list2.next, list2\n\n        if list1 or list2:\n            curr.next = list1 if list1 else list2\n        \n        return ret.next",
            "timestamp": "2022-12-14T16:34:13.272397Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 160,
            "size": 692,
            "author": 748,
            "language": 471
        },
        {
            "id": 658,
            "title": "return sorted squares leetcode Arrays(topic)",
            "body": "class Solution {\n\n    private int[] sort(int arr[]) {\n        int n = arr.length;\n\n        for (int i = 0; i < n - 1; i++)\n            for (int j = 0; j < n - i - 1; j++)\n                if (arr[j] > arr[j + 1]) {\n                    int temp = arr[j];\n                    arr[j] = arr[j + 1];\n                    arr[j + 1] = temp;\n                }\n\n        return arr;\n    }\n\n    public int[] sortedSquares(int[] nums) {\n        int[] squares = new int[nums.length];\n\n        for (int i = 0; i < nums.length; i++) {\n            squares[i] = nums[i] * nums[i];\n        }\n\n        return this.sort(squares);\n    }\n}",
            "timestamp": "2023-01-15T18:04:32.244079Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 159,
            "size": 660,
            "author": 715,
            "language": 374
        },
        {
            "id": 399,
            "title": "a030099.rkt",
            "body": "#lang racket\n\n(define a030099\n  (for/stream ([k (in-naturals)]\n               #:when (let loop ([n (expt k 3)])\n                        (define-values (q r) (quotient/remainder n 10))\n                        (and (odd? r) (or (zero? q) (loop q)))))\n    k))\n\n(module+ test\n  (require rackunit)\n  (check-equal? (stream->list (stream-take a030099 39))\n                '(1 11 15 33 39 71 91 173 175 179\n                  211 259 335 3337 4631 5597 7353 12415 21353 22893\n                  25799 69491 110011 124975 199831 227353 237151 462815 492415 708415 1100033\n                  2393695 2620611 5088493 5828415 7204417 8320335 11164415 11689633)))\n",
            "timestamp": "2021-10-15T07:55:05.131610Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 400,
            "size": 659,
            "author": 2,
            "language": 95
        },
        {
            "id": 344,
            "title": "borgmatic-snowcrash.yaml",
            "body": "location:\n  source_directories:\n    - /home\n    - /etc\n    - /var/db/pkg\n    - /var/log\n    - /var/spool\n    - /var/lib/portage\n    - /var/lib/syncthing\n    - /root\n  repositories:\n    - borg-snowcrash@silo.lan:repository.borg\n    - v10087wc@v10087wc.repo.borgbase.com:repo\n  one_file_system: true\nretention:\n  keep_daily: 7\n  keep_weekly: 4\n  keep_monthly: 6\nconsistency:\n  checks:\n    - repository\n    - archives\nstorage:\n  # Custom SSH Key in the config tree\n  ssh_command: ssh -i /etc/borgmatic/keys/snowcrash/ssh\n  # Password is in the repokey file\n  encryption_passcommand: cat /etc/borgmatic/keys/snowcrash/repokey",
            "timestamp": "2021-03-21T20:01:42.755861Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 446,
            "size": 645,
            "author": 2,
            "language": 157
        },
        {
            "id": 580,
            "title": "daddy needs 10% of bail to get out",
            "body": "daddy bail = 2500\ndaddy needs = 250\n\ndaddy plan is either 1) other inmate is getting out soon and will pay 250$ on daddy's behalf (and daddy will refund him)\n2) daddy will wait our transfer and pay bail himself\n\n\n## how to ?\nhttps://www.accesscorrections.com/#/make-deposit/create-account\n\n1. Create an account\n2. find inmate by: \n  - state == new mexico\n  - agency == Eddy County Detention center, NM\n3. enter recipient ID: 200808\n   expect: Kenneth Jensin, born in 1999\n\n4. input the USA postal address linked to the credit card you will be using\n5. enter Email and password to create your account\n\n",
            "timestamp": "2022-09-11T18:54:07.963353Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 133,
            "size": 635,
            "author": 644,
            "language": 93
        },
        {
            "id": 849,
            "title": "platform links",
            "body": "- [Platform engineering - the new kid on the block](https://www.youtube.com/watch?v=wXyNHngEN-s&t=13s&pp=ygUUcGxhdGZvcm0gZW5naW5lZXJpbmc%3D)\n- [devops is dead- long live platform engineering](https://www.youtube.com/watch?v=9_v77YiSGEY&pp=ygUPZGV2b3BzIHBsYXRmb3Jt)\n\n- [DevOps MUST build Internal Development Platform](https://www.youtube.com/watch?v=j5i00z3QXyU&pp=ygUPZGV2b3BzIHBsYXRmb3Jt)\n\n- [What is platform engineering- nana](https://www.youtube.com/watch?v=ghzsBm8vOms&pp=ygUPZGV2b3BzIHBsYXRmb3Jt)\n- [what is platform engineering - hashicorp](https://www.youtube.com/watch?v=q6vbxk3hq-o&pp=ygUPZGV2b3BzIHBsYXRmb3Jt)",
            "timestamp": "2023-08-21T19:25:58.646252Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 157,
            "size": 635,
            "author": 1015,
            "language": 93
        },
        {
            "id": 948,
            "title": "rabbit python pub message",
            "body": "import pika\n\ndef publish_message(message):\n    # Establish a connection to RabbitMQ server\n    connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))\n    channel = connection.channel()\n\n    # Declare a queue named 'hello'\n    channel.queue_declare(queue='hello')\n\n    # Publish the message to the 'hello' queue\n    channel.basic_publish(exchange='', routing_key='hello', body=message)\n    print(f\" [x] Sent '{message}'\")\n\n    # Close the connection\n    connection.close()\n\nif __name__ == '__main__':\n    message_to_publish = \"Hello, RabbitMQ!\"\n    publish_message(message_to_publish)\n",
            "timestamp": "2023-11-20T12:59:14.963216Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 70,
            "size": 631,
            "author": 1151,
            "language": 471
        },
        {
            "id": 475,
            "title": "cengn lab ansible playbook",
            "body": "# this playbook will install bind9 and do various tasks required by lab\n\n---\n\n- name: install bind9 \n  hosts: web # Only running against web-server\n  become: true\n\n  tasks:\n          - name: Install bind9\n\t    apt:\n\t      name: bind9\n\t      update_cache: yes\n\t\t    \n\t  - name: Start the service\n\t    service:\n\t      name: bind9 \n\t      state: started\n\t      enabled: true             # Start on boot\n\n\t  - name: Copy a file to web server\n\t    copy:\n\t      src: foo.txt\n\t      dest: /home/debian/foo.txt\n\n\t  - name: Print Hostnames\n\t    debug:\n\t      msg: This node's hostname is  \"{{ ansible_hostname }}\"\n",
            "timestamp": "2022-03-14T19:38:58.896945Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 255,
            "size": 631,
            "author": 429,
            "language": 157
        },
        {
            "id": 402,
            "title": "erasing aws api gateway (a bunch of them) based on their names",
            "body": "import boto3\nimport re\nimport time\n\nclient = boto3.client('apigateway')\n\napis = client.get_rest_apis(limit=300)\n\n# targets all Api Gateways named like 'dailybuild_{between 100 and 299}{anything}\nregex = 'dailybuild_[1-2][0-9][0-9](.*)'\n\n# ids of Api Gateway to delete\nids = []\n\n# builds a list of api's ids\nfor api in apis['items']:\n    if bool(re.search(regex, api['name'])):\n        ids.append(api['id'])\n\n# # simply deletes API Gateways that ma\nfor id in ids:\n    client.delete_rest_api(restApiId=id)\n    print(f'erasing API Gateway id: {id}')\n    time.sleep(300)\n",
            "timestamp": "2021-10-27T23:14:32.803213Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 321,
            "size": 629,
            "author": 315,
            "language": 471
        },
        {
            "id": 519,
            "title": "xrandr-ensure-primary",
            "body": "#!/usr/bin/env bash\n#\n# Ensure a display is set to primary.  i3 needs this to know where to put the\n# notification area\n#.\n\nxrandr -q | awk '\n  BEGIN { idx = 0; }\n  /connected primary/ {\n    printf(\"Display %s is already primary.\\n\", $1);\n    primary=$1\n    exit 0;\n  }\n  /^[^ ]+ connected/ {\n    displays[idx++] = $1;\n  }\n  END {\n    if (primary) {\n      exit 0;\n    } else if (idx == 0) {\n      print \"BUG: No displays found.\";\n      exit 1;\n    } else {\n      printf(\"Setting display %s to primary.\\n\", displays[0]);\n      system(sprintf(\"xrandr --output %s --primary\", displays[0]));\n    }\n  }\n  '\n",
            "timestamp": "2022-06-21T16:55:55.311863Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 258,
            "size": 623,
            "author": 2,
            "language": 179
        },
        {
            "id": 732,
            "title": "auth service readings",
            "body": "https://aws.amazon.com/blogs/iot/how-to-manage-iot-device-certificate-rotation-using-aws-iot/\n\nhttps://aws.amazon.com/blogs/iot/ensure-secure-communication-with-aws-iot-core-using-the-certificate-vending-machine-reference-application/\n\nhttps://datatracker.ietf.org/doc/html/rfc8628\n\nhttps://www.keyfactor.com/blog/the-top-iot-authentication-methods-and-options/\n\nhttps://www.embedded.com/how-to-properly-authenticate-iot-device-identity/\n\nhttps://cloud.google.com/iot/docs/how-tos/credentials/verifying-credentials?hl=fr\n\nhttps://cloud.google.com/iot/docs/concepts/device-security?hl=fr#authentication",
            "timestamp": "2023-04-24T17:04:02.594407Z",
            "expiry": "2024-06-01T04:00:00Z",
            "freeze_hits": false,
            "hits": 165,
            "size": 622,
            "author": 869,
            "language": null
        },
        {
            "id": 775,
            "title": "lambda string builder",
            "body": "class Action:\n    def __init__(self, val1: str, val2: str):\n        self._one = val1\n        self._two = val2\n        \n    def to_str(self):\n        ret = {\n            \"key1\": self._one,\n            \"key2\": self._two\n        }\n        \n        return str(ret)\n\nact_1 = Action(val1=\"boo\", val2=\"hoo\")\nact_2 = Action(val1=\"foo\", val2=\"bar\")\nactions = []\nactions.append(act_1)\nactions.append(act_2)\n\ndata = {\n        \"actions\": list(map(lambda action: f\"{action.to_str()},\", actions)),\n    }\n\nprint(data)\n\n# expect\n\n# {'actions': [\"{'key1': 'boo', 'key2': 'hoo'},\", \"{'key1': 'foo', 'key2': 'bar'},\"]}\n",
            "timestamp": "2023-05-31T19:19:21.441521Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 129,
            "size": 621,
            "author": 915,
            "language": 471
        },
        {
            "id": 289,
            "title": "googlebot flat earth meme pic",
            "body": "# import urllib, urllib2\nimport json\nimport requests\n\nurl = \"https://globie-info.neet.cloud/\"\n\nresponse = requests.get(url)\ndata = response.json()\n\n# # data.links is the array of download links, rename it to fit your JSON.\nfor item in data:\n    file_name = item['name']\n\n    with open(file_name, 'wb') as handle:\n            response = requests.get(url + file_name, stream=True)\n\n            if not response.ok:\n                print(response)\n\n            for block in response.iter_content(1024):\n                if not block:\n                    break\n\n                handle.write(block)",
            "timestamp": "2020-11-13T20:33:11.201037Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 499,
            "size": 620,
            "author": 21,
            "language": 471
        },
        {
            "id": 748,
            "title": "speed-control.rkt",
            "body": "#|\nhttps://www.codewars.com/kata/56484848ba95170a8000004d/train/racket\n\nI know I said I'm done with racket, but I have created mental debt by training myself on an industry-undesirable language :(.\n|#\n\n#lang racket\n(provide gps)\n\n(define (gps s x)\n  (match x\n    [(or (list) (list _)) 0]\n    [_\n      (for/fold ([acc empty]\n                 #:result (argmax identity acc))\n                ([a (in-list x)]\n                 [b (in-list (cdr x))])\n        (define value (inexact->exact (floor (abs (/ (* 3600 (- a b)) s)))))\n;;        (printf \"~a - ~a = ~a\\n\" a b value)\n        (cons value acc))]))\n",
            "timestamp": "2023-05-05T22:44:20.320738Z",
            "expiry": null,
            "freeze_hits": false,
            "hits": 127,
            "size": 615,
            "author": 2,
            "language": 95
        }
    ]
}