Skip to content

Commit b7fc142

Browse files
committed
update
1 parent 0178ab3 commit b7fc142

File tree

7 files changed

+451
-107
lines changed

7 files changed

+451
-107
lines changed

.gitattributes

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Common settings that generally should always be used with your language specific settings
2+
3+
4+
*.html linguist-vendored=true
5+
*.ipynb linguist-vendored=true
6+
7+
# Linguist::FileBlob.new("./*.html").vendored? # => true
8+
# Auto detect text files and perform LF normalization
9+
# https://www.davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/
10+
* text=auto
11+
12+
#
13+
# The above will handle all files NOT found below
14+
#
15+
16+
# Documents
17+
*.bibtex text diff=bibtex
18+
*.doc diff=astextplain
19+
*.DOC diff=astextplain
20+
*.docx diff=astextplain
21+
*.DOCX diff=astextplain
22+
*.dot diff=astextplain
23+
*.DOT diff=astextplain
24+
*.pdf diff=astextplain
25+
*.PDF diff=astextplain
26+
*.rtf diff=astextplain
27+
*.RTF diff=astextplain
28+
*.md text diff=markdown
29+
*.tex text diff=tex
30+
*.adoc text
31+
*.textile text
32+
*.mustache text
33+
*.csv text
34+
*.tab text
35+
*.tsv text
36+
*.txt text
37+
*.sql text
38+
*.ps1 text eol=crlf
39+
40+
# Graphics
41+
*.png binary
42+
*.jpg binary
43+
*.jpeg binary
44+
*.gif binary
45+
*.tif binary
46+
*.tiff binary
47+
*.ico binary
48+
# SVG treated as an asset (binary) by default.
49+
*.svg text
50+
# If you want to treat it as binary,
51+
# use the following line instead.
52+
# *.svg binary
53+
*.eps binary
54+
55+
# Scripts
56+
*.bash text eol=lf
57+
*.fish text eol=lf
58+
*.sh text eol=lf
59+
# These are explicitly windows files and should use crlf
60+
*.bat text eol=crlf
61+
*.cmd text eol=crlf
62+
63+
# Serialisation
64+
*.json text
65+
*.toml text
66+
*.xml text
67+
*.yaml text
68+
*.yml text
69+
70+
# Archives
71+
*.7z binary
72+
*.gz binary
73+
*.tar binary
74+
*.tgz binary
75+
*.zip binary
76+
77+
# Text files where line endings should be preserved
78+
*.patch -text
79+
80+
#
81+
# Exclude files from exporting
82+
#

.gitignore

+162
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
2+
!.vscode/extensions.json
3+
!.vscode/launch.json
4+
!.vscode/settings.json
5+
!.vscode/tasks.json
6+
$RECYCLE.BIN/
7+
*$py.class
8+
**/*/desktop.ini
9+
**/desktop.ini
10+
*.cab
11+
*.code-workspace
12+
*.cover
13+
*.desktop.ini
14+
*.desktop.init
15+
*.dist
16+
*.egg
17+
*.egg-info/
18+
*.init
19+
*.lcov
20+
*.lnk
21+
*.log
22+
*.manifest
23+
*.mo
24+
*.mp4
25+
*.msi
26+
*.msix
27+
*.msm
28+
*.msp
29+
*.pid
30+
*.pid.lock
31+
*.pot
32+
*.py,cover
33+
*.py[cod]
34+
*.sage.py
35+
*.seed
36+
*.so
37+
*.spec
38+
*.stackdump
39+
*.tgz
40+
*.tsbuildinfo
41+
*.webm
42+
*postgresql-12.4-1-windows-x64.exe
43+
.cache
44+
.cache/
45+
.coverage
46+
.coverage.*
47+
.dmypy.json
48+
.DS_store
49+
.dynamodb/
50+
.eggs/
51+
.env
52+
.env.spec
53+
.env.test
54+
.eslintcache
55+
.fusebox/
56+
.grunt
57+
.history/
58+
.hypothesis/
59+
.installed.cfg
60+
.ipynb_checkpoints
61+
.lock-wscript
62+
.mypy_cache/
63+
.next
64+
.node_repl_history
65+
.nox/
66+
.npm
67+
.nuxt
68+
.nyc_output
69+
.parcel-cache
70+
.pnp.*
71+
.pybuilder/
72+
.pyre/
73+
.pytest_cache/
74+
.Python
75+
.pytype/
76+
.ropeproject
77+
.rpt2_cache/
78+
.rts2_cache_cjs/
79+
.rts2_cache_es/
80+
.rts2_cache_umd/
81+
.scrapy
82+
.serverless/
83+
.spyderproject
84+
.spyproject
85+
.tern-port
86+
.tox/
87+
.venv
88+
.vscode
89+
.vscode-test
90+
.vscode/*
91+
.vuepress/dist
92+
.webassets-cache
93+
.yarn-integrity
94+
.yarn/build-state.yml
95+
.yarn/cache
96+
.yarn/install-state.gz
97+
.yarn/unplugged
98+
/site
99+
[Dd]esktop.ini
100+
__pycache__/
101+
__pypackages__/
102+
bower_components
103+
build/
104+
build/Release
105+
celerybeat-schedule
106+
celerybeat.pid
107+
cover/
108+
coverage
109+
coverage.xml
110+
cython_debug/
111+
db.sqlite3
112+
db.sqlite3-journal
113+
desktop.ini
114+
develop-eggs/
115+
dist
116+
dist/
117+
dmypy.json
118+
docs/_build/
119+
downloads/
120+
eggs/
121+
ehthumbs.db
122+
ehthumbs_vista.db
123+
env.bak/
124+
ENV/
125+
env/
126+
htmlcov/
127+
instance/
128+
ipython_config.py
129+
jspm_packages/
130+
layout-lora.pug
131+
lerna-debug.log*
132+
lib64/
133+
lib-cov
134+
local_settings.py
135+
logs
136+
MANIFEST
137+
misc/D1/a-a-articles/postgresql-12.4-1-windows-x64.exe
138+
nosetests.xml
139+
npm-debug.log*
140+
out
141+
parts/
142+
pids
143+
pip-delete-this-directory.txt
144+
pip-log.txt
145+
profile_default/
146+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
147+
sdist/
148+
share/python-wheels/
149+
target/
150+
Thumbs.db
151+
Thumbs.db:encryptable
152+
typings/
153+
var/
154+
venv.bak/
155+
venv/
156+
web_modules/
157+
wheels/
158+
yarn-debug.log*
159+
yarn-error.log*
160+
161+
node_modules
162+
node_modules

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Bryan C Guner
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

backup.py

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
"""
2+
Code to directly use in file to
3+
create directory in home location
4+
5+
Note:- I Have used python package so if you want
6+
to create in the main directory of your project use
7+
pardir+"\\"+name in functions
8+
9+
All the folder operations are done on home
10+
project directory.
11+
"""
12+
13+
from os import chdir
14+
from os import makedirs
15+
from os import removedirs
16+
from os import rename
17+
from os.path import exists
18+
from os.path import pardir
19+
from shutil import copytree
20+
from shutil import move
21+
22+
23+
# Creates a directory
24+
def create_directory(name):
25+
if exists(pardir + "\\" + name):
26+
print('Folder already exists... Cannot Overwrite this')
27+
else:
28+
makedirs(pardir + "\\" + name)
29+
30+
31+
# Deletes a directory
32+
def delete_directory(name):
33+
removedirs(name)
34+
35+
36+
# Rename a directory
37+
def rename_directory(direct, name):
38+
rename(direct, name)
39+
40+
41+
# Sets the working directory
42+
def set_working_directory():
43+
chdir(pardir)
44+
45+
46+
# Backup the folder tree
47+
def backup_files(name_dir, folder):
48+
copytree(pardir, name_dir + ':\\' + folder)
49+
50+
51+
# Move folder to specific location
52+
# Overwrites the file if it already exists
53+
def move_folder(filename, name_dir, folder):
54+
if not exists(name_dir + ":\\" + folder):
55+
makedirs(name_dir + ':\\' + folder)
56+
move(filename, name_dir + ":\\" + folder + '\\')
57+
58+
create_directory("test")
59+
rename_directory("test","demo")
60+
create_directory("test")
61+
# delete_directory("demo")
62+
backup_files('D', 'backup_project')
63+
move_folder(pardir+'\\'+'test.txt', 'D', 'name')
64+
"""
65+
For test purpose:
66+
1. create_directory("test")
67+
2. rename_directory("test","demo")
68+
3. delete_directory("demo")
69+
4. backup_files('D', 'backup_project')
70+
5. move_folder(pardir+'\\'+'test.txt', 'D', 'name')
71+
"""

makefile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
git:
2+
git add .
3+
git commit -m "$m-update"
4+
git push -u origin master
5+
# just type make into the terminal to exicute these commands!

0 commit comments

Comments
 (0)