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
| from typing import List | |
| from fastapi import FastAPI, UploadFile, File, Form | |
| from uuid import uuid4 | |
| app = FastAPI() | |
| # Simulate a database for storing file references | |
| file_db = {} | |
| @app.post("/upload-files/") |
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
| WITH RECURSIVE recursive_search AS ( | |
| SELECT | |
| uuid, | |
| ARRAY[uuid] AS path, | |
| false AS cycle_found | |
| FROM some_table | |
| WHERE parent_uuid IS NOT NULL | |
| UNION ALL | |
| SELECT | |
| d.uuid, |
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 asyncio | |
| from sqlalchemy import Column, Integer, String, Table, ForeignKey, select | |
| from sqlalchemy.ext.asyncio import create_async_engine | |
| from sqlalchemy.orm import relationship | |
| from sqlalchemy.orm import joinedload | |
| from sqlalchemy.orm import declarative_base | |
| from sqlalchemy.ext.asyncio import async_sessionmaker | |
| Base = declarative_base() |
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
| FROM (SELECT users.id AS users_id | |
| FROM users | |
| WHERE users.id = $1::INTEGER) AS anon_1 JOIN user_group AS user_group_1 ON anon_1.users_id = user_group_1.user_id JOIN groups ON groups.id = user_group_1.group_id | |
| 2023-08-04 13:29:46,430 INFO sqlalchemy.engine.Engine [generated in 0.00010s] (31,) | |
| 2023-08-04 13:29:46,432 INFO sqlalchemy.engine.Engine ROLLBACK | |
| Traceback (most recent call last): | |
| File "/Users/admin/work/py/async_sqlalchemy/main.py", line 134, in <module> | |
| main() | |
| File "/Users/admin/work/py/async_sqlalchemy/main.py", line 130, in main | |
| asyncio.run(amain()) |
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 sqlalchemy as sa | |
| import sqlparse | |
| metadata = sa.MetaData() | |
| tasks = sa.Table( | |
| 'tasks', metadata, | |
| sa.Column('id', sa.Integer, primary_key=True), | |
| sa.Column('bot', sa.String(255), nullable=False), | |
| sa.Column('task', sa.String(255), nullable=False), |
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
| class MyController | |
| @$inject: ['$scope'] | |
| @hello: "ЗДРАСТЕ" | |
| constructor: ($scope) -> | |
| $scope.hello = 124 | |
| @hello = "234" | |
| console.log($scope.hello) | |
| # insert services in constructor (services) -> |
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
| exec i3 & | |
| nitrogen --restore & | |
| unclutter |
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
| $indian_red #B0171F | |
| $crimson #DC143C | |
| $lightpink #FFB6C1 | |
| $lightpink_1 #FFAEB9 | |
| $lightpink_2 #EEA2AD | |
| $lightpink_3 #CD8C95 | |
| $lightpink_4 #8B5F65 | |
| $pink #FFC0CB | |
| $pink_1 #FFB5C5 | |
| $pink_2 #EEA9B8 |
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
| 'use strict'; | |
| angular.module('auth') | |
| .directive('authApplication', function($http, localStorageService, User) { | |
| return { | |
| restrict: 'A', | |
| scope: false, | |
| link: function (scope, elem, attrs) { |
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
| 'use strict'; | |
| angular.module('auth') | |
| .directive('authApplication', function($http, localStorageService, User) { | |
| return { | |
| restrict: 'A', | |
| scope: false, | |
| link: function (scope, elem, attrs) { |
NewerOlder