Skip to content

Instantly share code, notes, and snippets.

* PaLM 2
codey
google colaboratory
TyDi QA
* github copilot
* openAI
GPT-4
chatgpt
@caot
caot / django_error_test_database_1005.md
Created September 19, 2023 20:10 — forked from rminderhoud/django_error_test_database_1005.md
Fix mysql error 1005 when running django tests

#Django Test Database Error 1005 8/1/2015

Environment

  • Django 1.8.3
  • MySQL 5.5

When running python manage.py test I was receiving the following error

6 steps to a successful machine learning journey
set CONDA_PREFIX=C:\apps\anaconda3
set CONDA_DEFAULT_ENV=base
set CONDA_EXE=%CONDA_PREFIX%\Scripts\conda.exe
set CONDA_PROMPT_MODIFIER=(base)
set CONDA_PYTHON_EXE=%CONDA_PREFIX%\python.exe
set CONDA_SHLVL=1
set Path=%CONDA_PREFIX%;%CONDA_PREFIX%\Library\mingw-w64\bin;%CONDA_PREFIX%\Library\usr\bin;%CONDA_PREFIX%\Library\bin;%CONDA_PREFIX%\Scripts;%CONDA_PREFIX%\bin;%CONDA_PREFIX%\condabin;%Path%
https://www.grammarly.com/plagiarism-checker
https://helpfulpapers.com/chat-gpt-essay-detector
https://www.scribbr.com/plagiarism-checker/
https://copyleaks.com/plagiarism-checker
https://www.paperrater.com/free_paper_grader
https://www.7sistershomeschool.com/high-school-writing-requirements-an-authoritative-guide/
* GE - 15089 7-Day Digital Timer - Setup Guide https://youtu.be/0PrySANKSRs
* 49809 Program Guide Defiant Indoor Digital Timer https://youtu.be/fHosBxKKlnE
wget https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.4.44.tgz
tar vxf openldap-2.4.44.tgz
cd openldap-2.4.44
export PKGS=$HOME/apps/openldap-2.4.44
./configure --prefix=$PKGS --enable-shared
make depend
make
make install
$ cat create_env_py3.sh
#!/bin/bash
export PKGS=$HOME/pkgs_py3
export VER=3.6.8
export PREFIXX=$HOME/python-$VER
if ! [ -z "Python-$VER" ] ; then
rm -rf ./Python-$VER ./Python-$VER*
fi
@caot
caot / LoginRequiredMiddleware.py
Created May 12, 2023 13:26 — forked from brianlittmann/LoginRequiredMiddleware.py
Django middleware component that wraps the login_required decorator around all URL patterns be default, with exceptions. Can also require user to belong to a group ("admin" in this gist) or be adapted if using the Django admin app.
"""
Middleware component that wraps the login_required decorator around all URL patterns be default, with exceptions.
Define PUBLIC_URLS and ADMIN_URLS using regex in settings.py, where:
PUBLIC_URLS do not require user to be logged in.
ADMIN_URLS require user to be in admin group.
Source: http://stackoverflow.com/a/2164224/720054
"""
# settings.py
PUBLIC_URLS = (
@caot
caot / decode_shadowpad_dns.py
Created April 18, 2023 15:42 — forked from fox-srt/decode_shadowpad_dns.py
Netsarang backdoor DNS payload decrypter
#!/usr/bin/env python
"""
Netsarang backdoor DNS payload decrypter
file: decode_shadowpad_dns.py
author: Fox-IT Security Research Team <srt@fox-it.com>
Usage:
$ cat dns.txt
sajajlyoogrmkllmuoqiyaxlymwlvajdkouhkdyiyolamdjivho.cjpybuhwnjgkhllm.nylalobghyhirgh.com