Skip to content

Instantly share code, notes, and snippets.

View QwertyJack's full-sized avatar
🏠
Working from home

jack QwertyJack

🏠
Working from home
View GitHub Profile
@QwertyJack
QwertyJack / env.yaml
Created April 30, 2024 22:27
conda devel env
name: dev
channels:
- main
dependencies:
- python=3.11
- blas=*=openblas
- ipython
- numpy
- openai
- orjson
name: fenics18
channels:
- conda-forge
dependencies:
- python=3.7
- ipython
- fenics=2018
- mshr=2018
---
name: fenics19
@QwertyJack
QwertyJack / p1
Created September 16, 2020 10:24
P1.
Let A is the former and B is the latter.
(a) No. r1r1r1r1r2r1 is in B but not in A.
(b) No. r1r2r2 is in A but not in B.
(c) No. empty string is in B but not in A.
(d) Yes. A is all strings that contains at least one r2 or one r1; B is the same.
(e) Yes. Let's prove all strings s is in A. Consider the length of the string `s`:
0: s = empty. s is in r1*r2* obviously.
@QwertyJack
QwertyJack / yaml
Last active June 19, 2019 17:20
ingress-debug
apiVersion: apps/v1
kind: Deployment
metadata:
name: coffee
spec:
replicas: 1
selector:
matchLabels:
app: coffee
template:
@QwertyJack
QwertyJack / ansible_api_playbook.py
Created November 28, 2018 12:26 — forked from viper233/ansible_api_playbook.py
Example using Ansible API 2.0 to run a playbook
#!/usr/bin/env python
# stolen from http://stackoverflow.com/questions/27590039/running-ansible-playbook-using-python-api
import os
import sys
from collections import namedtuple
from ansible.parsing.dataloader import DataLoader
from ansible.vars import VariableManager
from ansible.inventory import Inventory