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 mysql.connector | |
con = mysql.connector.connect( | |
host="localhost", | |
user="root", | |
passwd="1234", | |
database="tdb" | |
) | |
cursor = con.cursor() |
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 Customer table | |
CREATE TABLE Customer ( | |
ID INT PRIMARY KEY, | |
first_name VARCHAR(50), | |
last_name VARCHAR(50), | |
PAN VARCHAR(10), | |
DOB DATE | |
); | |
-- Create Branch table |
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
--- | |
export interface Props { | |
title: string; | |
} | |
const { title } = Astro.props; | |
--- | |
<!DOCTYPE html> | |
<html lang="en"> |
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
# Copyright (c) 2022, Hussain and contributors | |
# For license information, please see license.txt | |
from my_awesome_app.my_awesome_app.doctype.car.car import MongoDBDocument, get_mongodb_client | |
class Person(MongoDBDocument): | |
@staticmethod | |
def get_collection(): | |
client = get_mongodb_client() |
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
# Copyright (c) 2022, Hussain and contributors | |
# For license information, please see license.txt | |
from pymongo import MongoClient | |
from abc import ABC, abstractstaticmethod | |
from frappe.model.document import Document | |
class MongoDBDocument(Document, ABC): | |
@abstractstaticmethod |
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
# Copyright (c) 2022, Hussain and contributors | |
# For license information, please see license.txt | |
from frappe.model.document import Document | |
from pymongo import MongoClient | |
CONNECTION_STRING = "<YOUR-CONNECTION-STRING>" | |
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
# Check apps/press/press/press/doctype/app_source/app_source.py | |
# branch = get branch from github API while creating app release | |
required_checks = branch.get["protection"]["required_status_checks"]["checks"] | |
if len(required_checks) == 0: | |
# No required checks, continue as it is now | |
else: | |
# for check in required_checks | |
# populate a child table? |
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 React, { useEffect, useState } from "react"; | |
import { TouchableOpacity } from "react-native"; | |
import styled from "styled-components"; | |
import { CardContainer } from "../utils/Card"; | |
import { Icons } from "../icons"; | |
import { playSoundFromUri } from "../../lib/audio"; | |
import { ProgressBar } from "../utils/ProgressBar"; | |
const PlayerControlContainer = styled(CardContainer)` |
NewerOlder