FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

v0.0001 😈 · NHSDigital/codonPython@3456736 · GitHub

Commit 3456736

Browse files
committed
v0.0001 😈
1 parent 97c10b7 commit 3456736

19 files changed

Lines changed: 100194 additions & 0 deletions

‎CODE_OF_CONDUCT.md‎

Whitespace-only changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# NHSD colours for seaborn
2+
3+
>Sets seaborn colour palette to NHSD colours.
4+
5+
- __Description__ : Ensure seaborn graphs adhere to the NHSD brand colours.
6+
- __Published__ : 21/06/2019
7+
- __Last modified__ : 21/06/2019
8+
- __Author(s)__ : name@nhs.net
9+
- __Maintainer(s)__ : name@nhs.net
10+
- __Tags__ : seaborn branding python colours
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"""Sets the seaborn colour palette to the NHS Digital colours
2+
"""
3+
import seaborn as sns
4+
5+
# Set colours
6+
nhsdColours = ["#003087", "#005EB8", "#71CCEF", "#84919C", "#D0D5D6", "#F8F8F8"]
7+
sns.set_palette(nhsdColours)
8+
9+
# Visualise palette
10+
sns.palplot(sns.color_palette())
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
seaborn==0.9.0
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import pyodbc
2+
3+
# pyodbc connection
4+
cnxn = pyodbc.connect('Driver={SQL Server};'
5+
'Server=GLDMSRV009;'
6+
'Database=DSS_CORPORATE;'
7+
'Trusted_Connection=yes;')
8+
9+
try:
10+
# execute sql through the pyodbc cursor
11+
cursor = cnxn.cursor()
12+
cursor.execute('''BULK INSERT [dbo].[AD_Users2]
13+
FROM 'C:\\Users\wasw1\\Desktop\Python_Scripts\\AD_Users.txt' WITH (
14+
FIRSTROW = 2,
15+
FIELDTERMINATOR='\\t',
16+
ROWTERMINATOR='\\n'
17+
);
18+
''')
19+
except TypeError as error:
20+
print(error)
21+
22+
# commit transaction
23+
cnxn.commit()
24+
25+
print("Inserted Successfully")
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Title
2+
3+
>Short description
4+
5+
- __Description__ : Longer description
6+
- __Published__ : dd/mm/YYYY
7+
- __Last modified__ : dd/mm/YYYY
8+
- __Author(s)__ : name@nhs.net
9+
- __Maintainer(s)__ : name@nhs.net
10+
- __Tags__ : single words separated by spaces
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
seaborn==0.9.0
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
import pyodbc
3+
4+
# pyodbc connection
5+
cnxn = pyodbc.connect('Driver={SQL Server};'
6+
'Server=GLDMSRV009;'
7+
'Database=DSS_CORPORATE;'
8+
'Trusted_Connection=yes;')
9+
try:
10+
# Edit the SQL query to align to your table, schema and field constraints
11+
cursor = cnxn.cursor()
12+
cursor.execute('''CREATE TABLE [dbo].[AD_Users2](
13+
[Name] [nvarchar](50) NOT NULL,
14+
[Pre_Windows_2000_Logon_Name] [nvarchar](50) NOT NULL,
15+
[E_Mail_Address] [nvarchar](50) NOT NULL
16+
)
17+
''')
18+
except TypeError as error:
19+
print(error)
20+
21+
# Commit the transaction to 'save' the changes
22+
cnxn.commit()
23+
24+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Title
2+
3+
>Short description
4+
5+
- __Description__ : Longer description
6+
- __Published__ : dd/mm/YYYY
7+
- __Last modified__ : dd/mm/YYYY
8+
- __Author(s)__ : name@nhs.net
9+
- __Maintainer(s)__ : name@nhs.net
10+
- __Tags__ : single words separated by spaces
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
seaborn==0.9.0

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL