You are ChatGPT, a large language model trained by OpenAI, based on the GPT-4 architecture. Knowledge cutoff: 2023-04 Current date: 2024-02-07
Image input capabilities: Enabled
| all: gifread gifread.asan gifread.ubsan gifread.coverage | |
| gifread: gifdec.c gifread.c gifdec.h | |
| $(CC) $(CFLAGS) -o $@ gifdec.c gifread.c $(LDFLAGS) | |
| gifread.asan: gifdec.c gifread.c gifdec.h | |
| $(CC) $(CFLAGS) -g -fsanitize=address -o $@ gifdec.c gifread.c $(LDFLAGS) | |
| gifread.ubsan: gifdec.c gifread.c gifdec.h | |
| $(CC) $(CFLAGS) -g -fsanitize=undefined -o $@ gifdec.c gifread.c $(LDFLAGS) |
| # log4j jndi exploit CVE-2021-44228 filter | |
| # Save this file as /etc/fail2ban/filter.d/log4j-jndi.conf | |
| # then copy and uncomment the [log4j-jndi] section | |
| # to /etc/fail2ban/jail.local | |
| # | |
| # jay@gooby.org | |
| # https://jay.gooby.org/2021/12/13/a-fail2ban-filter-for-the-log4j-cve-2021-44228 | |
| # https://gist.github.com/jaygooby/3502143639e09bb694e9c0f3c6203949 | |
| # Thanks to https://gist.github.com/kocour for a better regex | |
| # |
this is a rough draft and may be updated with more examples
GitHub was kind enough to grant me swift access to the Copilot test phase despite me @'ing them several hundred times about ICE. I would like to examine it not in terms of productivity, but security. How risky is it to allow an AI to write some or all of your code?
Ultimately, a human being must take responsibility for every line of code that is committed. AI should not be used for "responsibility washing." However, Copilot is a tool, and workers need their tools to be reliable. A carpenter doesn't have to
| ==> Validation of: ./policies/TagGovernancePolicy | |
| ==> Finding: [ | |
| { | |
| "findingDetails": "Using ForAllValues qualifier with the single-valued condition key organizations:ServicePrincipal can be overly permissive. We recommend that you remove ForAllValues:.", | |
| "findingType": "SECURITY_WARNING", | |
| "issueCode": "FORALLVALUES_WITH_SINGLE_VALUED_KEY", | |
| "learnMoreLink": "https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-policy-checks.html#access-analyzer-reference-policy-checks-security-warning-forallvalues-with-single-valued-key", | |
| "locations": [ | |
| { | |
| "path": [ |
| import cv2 | |
| guardcam = cv2.VideoCapture(0) | |
| while guardcam.isOpened(): | |
| ret, frame1 = guardcam.read() | |
| ret, frame2 = guardcam.read() | |
| diff = cv2.absdiff(frame1, frame2) | |
| gray = cv2.cvtColor(diff, cv2.COLOR_RGB2GRAY) | |
| blur = cv2.GaussianBlur(gray, (5, 5), 0) | |
| _, thresh = cv2.threshold(blur, 20, 255, cv2.THRESH_BINARY) | |
| dilated = cv2.dilate(thresh, None, iterations=3) |
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
| #define _GNU_SOURCE | |
| #include <err.h> | |
| #include <stdint.h> | |
| #include <linux/bpf.h> | |
| #include <linux/filter.h> | |
| #include <stdio.h> | |
| #include <unistd.h> | |
| #include <sys/syscall.h> | |
| #include <asm/unistd_64.h> | |
| #include <sys/types.h> |
| #!/usr/bin/env python3 | |
| from collections import namedtuple | |
| import socket | |
| import struct | |
| usbip_user_op_common = namedtuple('usbip_user_op_common', 'version code status') | |
| usbip_usb_device = namedtuple('usbip_usb_device', 'path busid busnum devnum speed idVendor idProduct bcdDevice bDeviceClass bDeviceSubClass bDeviceProtocol bConfigurationValue bNumConfigurations bNumInterfaces') | |
| usbip_header_basic = namedtuple('usbip_header_basic', 'command seqnum devid direction ep') |
| " An example for a vimrc file. | |
| " | |
| " Maintainer: Bram Moolenaar <Bram@vim.org> | |
| " Last change: 2019 Jan 26 | |
| " | |
| " To use it, copy it to | |
| " for Unix and OS/2: ~/.vimrc | |
| " for Amiga: s:.vimrc | |
| " for MS-DOS and Win32: $VIM\_vimrc | |
| " for OpenVMS: sys$login:.vimrc |