- What is DBeaver (GUI tool for working with databases)?
This file contains 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
select с.country_id | |
, cnt.country | |
, с.cities_per_country_count | |
, floor(cities_per_country_count / cities_count * 100) as percent | |
from (select country_id | |
, count(1) as cities_per_country_count | |
, sum(count(1)) over () as cities_count | |
from city | |
group by country_id) с | |
join country cnt on cnt.country_id = с.country_id |
This file contains 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
SELECT faker.faker(ARRAY['en_US']); | |
delete from rental; | |
delete from inventory; | |
delete from film; | |
delete from staff; | |
delete from customer; | |
delete from store; | |
delete from address; | |
delete from city; |
This file contains 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
first_name | last_name | address | order_date | ||
---|---|---|---|---|---|
Joshua | Brooks | jenniferhernandez@barker.com | 800 Erickson Place Apt. 712 Jessicachester, WV 70233 | 1994-05-07 | |
Matthew | Garcia | calderonphilip@brewer.com | 49350 Jennifer Curve Apt. 883 Cathyberg, OK 03090 | 2021-09-09 | |
Taylor | Mccoy | gallowayeric@hotmail.com | 64912 Smith Cove Lake Fernando, AZ 72732 | 2013-12-15 | |
Amanda | Craig | joankoch@taylor.info | 19837 Mccarthy Vista West Kristopher, OR 44847 | 2000-11-29 |
This file contains 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
CREATE TABLE test(text value, int node_id, int left_bound_id, int right_bound_id); | |
INSERT INTO test VALUES ('Food', 0, 1, 10000); | |
INSERT INTO test VALUES ('Fruit', 100, 101, 199); | |
INSERT INTO test VALUES ('Cherry', 101, null, null); | |
INSERT INTO test VALUES ('Banana', 102, null, null); | |
INSERT INTO test VALUES ('Meat', 200, 201, 299); | |
INSERT INTO test VALUES ('Beaf', 201, null, null); | |
INSERT INTO test VALUES ('Pork', 202, null, null); |
This file contains 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
from flask import Flask, request | |
from flask_restful import Api, Resource | |
import osquery | |
class User(Resource): | |
@staticmethod | |
def get(): | |
instance = osquery.SpawnInstance() | |
instance.open() | |
query = request.args.get('query', default='', type=str) |
This file contains 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 requests | |
from requests import Response | |
from requests.auth import HTTPBasicAuth | |
releases_url = 'https://api.github.com/repos/sql-boot/sql-boot/releases' | |
for o in requests.get(releases_url).json(): | |
print(o['id']) | |
delete = requests.delete(releases_url + '/' + str(o['id']), auth=HTTPBasicAuth('USER', 'PASSWORD')) | |
print(releases_url + '/' + str(o['id'])) |
This file contains 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
call plug#begin('~/.vim/plugged') | |
Plug 'junegunn/seoul256.vim' | |
Plug 'junegunn/vim-easy-align' | |
" On-demand loading | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
Plug 'tpope/vim-fireplace', { 'for': 'clojure' } | |
" | |
" " Using git URL |