Skip to content

Commit 4731dd8

Browse files
Merge pull request #1 from prateekiiest/master
Getting updates
2 parents 43a20fe + 40bdbe2 commit 4731dd8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+988
-254
lines changed

.github/stale.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 25
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 7
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- pinned
8+
- security
9+
# Label to use when marking an issue as stale
10+
staleLabel: wontfix
11+
# Comment to post when marking an issue as stale. Set to `false` to disable
12+
markComment: >
13+
This issue has been automatically marked as stale because it has not had
14+
recent activity. It will be closed if no further activity occurs. Thank you
15+
for your contributions.
16+
# Comment to post when closing a stale issue. Set to `false` to disable
17+
closeComment: false

.travis.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,25 @@ language: python
33
os:
44
- linux
55

6+
env: NUMPY_VERSION='stable'
67

78
sudo: false
89

910
python:
10-
- "2.6"
1111
- "2.7"
12-
- "3.2"
12+
1313

1414
# command to install dependencies
15-
15+
16+
1617
install:
17-
- pip install -r requirements.txt
18-
- pip3 install -r requirements.txt
19-
# command to run tests
18+
19+
- git clone git://github.com/astropy/ci-helpers.git
20+
- source ci-helpers/travis/setup_conda.sh
21+
2022

2123

24+
# command to run tests
25+
2226
script:
2327
- py.test # or py.test for Python versions 3.5 and below

CODE_OF_CONDUCT.md

Lines changed: 46 additions & 0 deletions

CONTRIBUTING.md

Lines changed: 22 additions & 0 deletions

CONTRIBUTORS.md

Lines changed: 13 additions & 3 deletions
File renamed without changes.

Caesar-cipher/code.py renamed to Code-Sleep-Python/Caesar-cipher/code.py

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,22 @@
22
string.ascii_lowercase
33

44
# We will consider the alphabet to be these letters, along with a space.
5-
alphabet = string.ascii_lowercase + " "
65

76
# create `letters` here!
8-
letters = dict(enumerate(alphabet, 0))
97

108

119

1210
##
1311
alphabet = string.ascii_lowercase + " "
1412
letters = dict(enumerate(alphabet))
1513

16-
#key = 3
17-
encryption_key=3
1814
# define `coded_message` here!
19-
encoding= {}
20-
21-
22-
key = (encryption_key)%27
23-
for let in alphabet:
24-
encoding.update({let : key})
25-
key =(key + 1)%27
26-
27-
del encoding[' ']
2815

2916

3017

3118
##################
3219

33-
message = "hi my name is caesar"
20+
message = raw_input("Enter a string: ")
3421

3522
def caesar(mee, encryption_key):
3623

@@ -47,22 +34,22 @@ def caesar(mee, encryption_key):
4734
# me = message.replace(" ","")
4835
# return the encoded message as a single string!
4936
for l in mee:
50-
ty = letters[encoding[l]]
51-
encoded_mess = encoded_mess + (ty)
37+
if(l!=' '):
38+
ty = letters[encoding[l]]
39+
encoded_mess = encoded_mess + (ty)
40+
41+
else:
42+
encoded_mess = encoded_mess + ' '
43+
5244

53-
54-
5545
return encoded_mess
5646

5747

58-
encoded_message = (caesar(message,encryption_key = 3))
48+
encryption_key=input("Enter a number: ")
49+
50+
encoded_message = (caesar(message,encryption_key))
5951
print(encoded_message)
6052

6153

62-
63-
64-
65-
decoded_message = (caesar(encoded_message,encryption_key=-3))
54+
decoded_message = (caesar(encoded_message,-1*encryption_key))
6655
print(decoded_message)
67-
68-
File renamed without changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import requests
2+
import notify2
3+
import json
4+
5+
url = "http://cricapi.com/api/matches?apikey=D18haZnedRZ3QijAQEJJV97U5r23"
6+
r = requests.get(url)
7+
data = json.loads(r.text)
8+
9+
id=""
10+
for item in data['matches']:
11+
if (item['team-1']=="India" or item["team-2"]=="India"):
12+
print(item)
13+
if item["matchStarted"]:
14+
id=item["unique_id"]
15+
16+
if id:
17+
r = requests.get("http://cricapi.com/api/cricketScore?apikey=D18haZnedRZ3QijAQEJJV97U5r23&unique_id="+str(id))
18+
score = json.loads(r.text)
19+
print(score)
20+
print(score['score'])
21+
print(score['stat'])
22+
23+
notify2.init("Cric - Notify")
24+
n = notify2.Notification(score["stat"], score["score"], "system")
25+
n.show()

0 commit comments

Comments
 (0)