Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try #1

Merged
merged 49 commits into from
Mar 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
ebe4343
Add flake8 code linter
ankan17 Feb 16, 2018
75af0eb
Add feature real time search suggestion
sakshee-19 Feb 23, 2018
d5ad5b1
modify the css of search-suggestion-block
sakshee-19 Feb 23, 2018
e78b488
modify the search suggestion feature
sakshee-19 Feb 25, 2018
315edcf
fixes Plurization bug
sakshee-19 Feb 25, 2018
033cc9d
Merge pull request #53 from ankan17/49-flake8-linter
AdiChat Feb 28, 2018
2b46181
fixes bug: working with one click
sakshee-19 Feb 28, 2018
d4ca87a
Merge pull request #66 from sakshee-19/bugfix
AdiChat Feb 28, 2018
f8fb560
Merge branch 'master' into searchResult
sakshee-19 Mar 1, 2018
7e452fc
fixes lint error
sakshee-19 Mar 1, 2018
4c472b5
Merge pull request #61 from sakshee-19/searchResult
AdiChat Mar 1, 2018
6af060e
Merge pull request #72 from anne27/master
AdiChat Mar 2, 2018
ab14a39
Remove updated_at key in order to simplify json
Mar 3, 2018
b31ddf8
Add timestamps json which records updated_at or else for files
Mar 3, 2018
f544368
Fix image distortion in small devices
Mar 4, 2018
593f4b9
Beautify alignment
Mar 4, 2018
ff8517e
Fix code indentations
Mar 4, 2018
3f1ec7b
Beautify, remove redundant blank in small devide
Mar 4, 2018
bf75dfd
Beautify footer
Mar 4, 2018
3e42370
Fix IndexError, the randInt is closed interval
Mar 4, 2018
1833a79
Prevent XSS
Mar 4, 2018
8a9c14d
Change counting strategy of search result
Mar 4, 2018
89c3cbb
Rename
Mar 4, 2018
e308bd7
Fix placeholder
Mar 4, 2018
7eb0574
Fix recommend result error
Mar 4, 2018
e11e87a
Simplify expressions
Mar 4, 2018
e51d1e1
Merge pull request #80 from iattempt/change-json-format
AdiChat Mar 4, 2018
9b22a03
Merge branch 'master' into develop
Mar 5, 2018
6bb48bb
Fix typo
Mar 5, 2018
ccbca0e
fix git.exc.InvalidGitRepositoryError
Mar 5, 2018
f83bcc2
Fix url error:
Mar 5, 2018
8889be6
Merge pull request #81 from iattempt/fix-responsive
AdiChat Mar 5, 2018
15e200e
Merge pull request #82 from iattempt/develop
AdiChat Mar 6, 2018
7fb0dfb
add feat: computational power
sakshee-19 Mar 7, 2018
97aa8a5
resolve travis error
sakshee-19 Mar 7, 2018
339fbe3
add commands in travis
Shweta4321 Mar 7, 2018
fd7c6ba
update .gitignore
sakshee-19 Mar 9, 2018
0642c83
Merge pull request #83 from iattempt/dev-update
AdiChat Mar 9, 2018
d639e94
Made light UI
sakshee-19 Mar 9, 2018
4b50bf7
fixed lint error
sakshee-19 Mar 9, 2018
02c845a
Merge pull request #87 from Shweta4321/travis
AdiChat Mar 10, 2018
fd6cc56
fix bug and change url
sakshee-19 Mar 10, 2018
da94e51
Merge pull request #89 from sakshee-19/gitignore
AdiChat Mar 11, 2018
418824f
seperate calulator.py and autofocus on calculator
sakshee-19 Mar 11, 2018
e58b3bb
Merge branch 'master' into Metadatabug
sakshee-19 Mar 11, 2018
c623cee
fix expression display in calculator
sakshee-19 Mar 13, 2018
43f50e9
Merge branch 'Metadatabug' of https://github.com/sakshee-19/cosmos-se…
sakshee-19 Mar 13, 2018
9daa029
fixes display expression and NaN replaces with Error
sakshee-19 Mar 14, 2018
9ee3be5
Merge pull request #69 from sakshee-19/Metadatabug
AdiChat Mar 14, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Cosmos related
cosmos/
static/

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down Expand Up @@ -96,3 +96,4 @@ staticfiles/
*.sqlite3
*.pyc
.idea/
.DS_Store
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ env:
- DJANGO_VERSION=1.11.7
# script
script:
- python3 manage.py test
- flake8 .
- python3 manage.py makemigrations
- python3 manage.py migrate
- python3 manage.py test
Binary file removed cosmos_search/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file removed cosmos_search/__pycache__/settings.cpython-36.pyc
Binary file not shown.
Binary file removed cosmos_search/__pycache__/urls.cpython-36.pyc
Binary file not shown.
Binary file removed cosmos_search/__pycache__/wsgi.cpython-36.pyc
Binary file not shown.
5 changes: 3 additions & 2 deletions cosmos_search/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@

COSMOS_LINK = 'https://github.com/OpenGenus/cosmos.git'

COSMOS_PATH = 'cosmos/code/'
COSMOS_ROOT = 'cosmos/'

METADATA_JSON = 'metadata.json'

TAGS_JSON = 'tags.json'

TIMESTAMPS_JSON = 'timestamps.json'

# Application definition

INSTALLED_APPS = [
Expand Down Expand Up @@ -133,4 +135,3 @@

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')

19 changes: 15 additions & 4 deletions cosmos_search/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.contrib import admin
from django.conf.urls import handler400
from django.conf.urls import handler403
from django.conf.urls import handler404
from django.conf.urls import handler500
from django.views.static import serve

from cosmos_search import settings
from search import views

urlpatterns = [
Expand All @@ -27,7 +31,14 @@
url(r'^admin/', admin.site.urls),
]

handler400 = views.error400
handler403 = views.error403
handler404 = views.error404
handler500 = views.error500
if settings.DEBUG:
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

if settings.DEBUG is False:
urlpatterns += [url(r'^static/(?P<path>.*)$', serve, {'document_root': settings.STATIC_ROOT}), ]


handler400 = views.error400 # noqa
handler403 = views.error403 # noqa
handler404 = views.error404 # noqa
handler500 = views.error500 # noqa
2 changes: 1 addition & 1 deletion manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# issue is really that Django is missing to avoid masking other
# exceptions on Python 2.
try:
import django
import django # noqa
except ImportError:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
Expand Down
2 changes: 1 addition & 1 deletion metadata.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
certifi==2017.11.5
chardet==3.0.4
Django==1.11.7
flake8==3.5.0
gitdb2==2.0.3
GitPython==2.1.7
gunicorn==19.7.1
Expand Down
2 changes: 1 addition & 1 deletion search/admin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from django.contrib import admin
from django.contrib import admin # noqa

# Register your models here.
2 changes: 1 addition & 1 deletion search/models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from django.db import models
from django.db import models # noqa

# Create your models here.
168 changes: 168 additions & 0 deletions search/static/css/calculator.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
#calculator {
width: 475px;
height: auto;

margin: 100px auto;
padding: 20px 20px 9px;

background: #949494;
/*background: linear-gradient(#9dd2ea, #8bceec);*/
border-radius: 3px;
}
.cal-top{
position: relative;
top: -70px;
}
/* Top portion */
.top span.clear {
float: left;
}

/* Inset shadow on the screen to create indent */
.top .screen {
height: 65px;
width: 426px;
float: left;
padding: 10px 10px;
background: rgb(255, 255, 255);
border-radius: 3px;
/*box-shadow: inset 0px 4px rgba(0, 0, 0, 0.2);*/
font-size: 17px;
line-height: 40px;
color: white !important;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
text-align: right;
letter-spacing: 1px;
margin-bottom: 2%;
}

/* Clear floats */
.keys, .top {
overflow: hidden;
}

/* Applying same to the keys */
.keys span, .top span.clear {
float: left;
position: relative;
top: 0;

cursor: pointer;

width: 65px;
height: 36px;

background: white;
border-radius: 3px;
box-shadow: 0px 2px rgba(0, 0, 0, 0.2);

margin: 0 7px 11px 0;

line-height: 36px;
text-align: center;

/* prevent selection of text inside keys */
user-select: none;

/* Smoothing out hover and active states using css3 transitions */
transition: all 0.2s ease;
}

/* Remove right margins from operator keys */
/* style different type of keys (operators/evaluate/clear) differently */
.keys span.operator {
background: #FFF0F5;
margin-right: 0;
}

.keys span.eval {
background: #a6e3e4;
/*box-shadow: 0px 4px #9da853;*/

}

.top span.clear {
background: #ff9fa8;
box-shadow: 0px 4px #ff7c87;
color: white;
}

/* Some hover effects */
.keys span:hover {
background: #d9d5ec;
color: white;
}

.keys span.eval:hover {
background: #96cfd0;
/*box-shadow: 0px 4px #717a33;*/
color: #ffffff;
}
input#seq:focus {
outline: none;
background: transparent;
}
.top span.clear:hover {
background: #f68991;
box-shadow: 0px 4px #d3545d;
color: white;
}

.keys span:active {
top: 4px;
}

.keys span.eval:active {
box-shadow: 0px 0px #717a33;
top: 4px;
}

.top span.clear:active {
top: 4px;
box-shadow: 0px 0px #d3545d;
}

.sp {
margin-right: 7px !important;
}

input {
border: none;
background: none;
}

.clear {
background: #dcbd5e !important;
color: #fff;
}

input.num {
width: 100% !important;
}
input.num:focus {
outline: none;
}
input#resultText {
outline: none;
padding-bottom: 4px;
width: 100%;
float: right;
text-align: right;
height: 15px;
position: relative;
top: -10px;
}
input[type="text"], textarea {
background-color: rgb(255, 255, 255);
background-image: none;
color: rgb(0, 0, 0);
}
input#seq {
width: 100%;
text-align: right;
padding: 0px !important;
margin: 0px !important;
position: relative;
top: -15px;
font-size: 10px;
}
Loading