This file contains hidden or 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 pip | |
| # pip.main(['install', 'psycopg2', 'pandas']) | |
| import sys | |
| import subprocess | |
| import psycopg2 | |
| import threading | |
| DSN = "dbname=postgres user=piti host=localhost" |
This file contains hidden or 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
| ### SQL Question | |
| You are given the following three tables: | |
| **`customers`** | |
| | customer_id | name | | |
| |-------------:|-------------| | |
| | 1 | Alice | | |
| | 2 | Bob | | |
| | 3 | Charlie | |
This file contains hidden or 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
| openapi: '3.0.2' | |
| info: | |
| title: API Title | |
| version: '1.0' | |
| servers: | |
| - url: https://api.server.test/v1 | |
| paths: | |
| /what-time-is-it: | |
| get: | |
| responses: |
This file contains hidden or 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 tkinter as tk | |
| def asf(frame, prefix): | |
| lb = tk.Listbox(frame) | |
| for i in range(10): | |
| lb.insert(i, f'{prefix} {i}') | |
| return lb | |
This file contains hidden or 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
| { | |
| "username": "frappet", | |
| "doctor": { | |
| "name": "Kazuya Sojo", | |
| "license": "12345678" | |
| }, | |
| "patient": { | |
| "name": "Green Covid", | |
| "cid": "1234567890123", | |
| "phoneno": "0811234567", |
This file contains hidden or 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
| listeners: | |
| default: | |
| type: tcp | |
| bind: 0.0.0.0:1883 | |
| my-ws-1: | |
| bind: 0.0.0.0:8080 | |
| type: ws | |
| sys_interval: 20 | |
| auth: | |
| allow-anonymous: true |
This file contains hidden or 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 numpy as np | |
| def random_mask(a, n_choose): | |
| ret = a.copy() | |
| indices = np.random.choice(np.nonzero(a)[0], n_choose, replace=False) | |
| ret[:] = 0 | |
| ret[indices] = a[indices] | |
| return ret | |
| def random_flip(a, n_flip): |
This file contains hidden or 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
| export function memoize(fn) { | |
| var cache = null | |
| var lastRet = null | |
| function cacheHit(oldCache, newCache) { | |
| return oldCache.length == newCache.length && | |
| oldCache.every((x,i) => x === newCache[i]) | |
| } | |
| return (...args) => { |
This file contains hidden or 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
| version: '2' | |
| services: | |
| nginx-proxy: | |
| image: jwilder/nginx-proxy | |
| ports: | |
| - "80:80" | |
| - "443:443" | |
| volumes: |
This file contains hidden or 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
| pipeline: | |
| restore-cache: | |
| image: drillster/drone-volume-cache | |
| restore: true | |
| mount: | |
| - /drone/.m2 | |
| volumes: | |
| - /tmp/cache:/cache | |
| build: |
NewerOlder