hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
55138ccb0e21c0e106e8678e7c1d4f9f7ce8d2ba
29
py
Python
entangl/__init__.py
ImperialCQD/entangl
ea0fd0510e1241c0bd792290d29d3a446e229593
[ "MIT" ]
2
2020-05-08T02:29:28.000Z
2021-02-01T10:44:30.000Z
entangl/__init__.py
ImperialCQD/entangl
ea0fd0510e1241c0bd792290d29d3a446e229593
[ "MIT" ]
null
null
null
entangl/__init__.py
ImperialCQD/entangl
ea0fd0510e1241c0bd792290d29d3a446e229593
[ "MIT" ]
1
2021-02-01T10:44:34.000Z
2021-02-01T10:44:34.000Z
from . import utility, data
9.666667
27
0.724138
from . import utility, data
0
0
0
c83bfccda0abdcdc1651e2979f30056869ad5f16
931
py
Python
Day 1 - Chronal Calibration/frequency_change_calc.py
orfeasa/advent-of-code-2018
359d83057006ce2c67c25dbc61988d385d6953a3
[ "MIT" ]
null
null
null
Day 1 - Chronal Calibration/frequency_change_calc.py
orfeasa/advent-of-code-2018
359d83057006ce2c67c25dbc61988d385d6953a3
[ "MIT" ]
null
null
null
Day 1 - Chronal Calibration/frequency_change_calc.py
orfeasa/advent-of-code-2018
359d83057006ce2c67c25dbc61988d385d6953a3
[ "MIT" ]
null
null
null
from typing import List, Optional if __name__ == "__main__": frequency_changes = read_input("input.txt") duplicate = find_duplicate(frequency_changes) if duplicate is not None: print(f"First frequency repeated: {duplicate}")
25.861111
55
0.629431
from typing import List, Optional def read_input(input_file) -> List: frequency_changes = [] with open(input_file) as f: for line in f.readlines(): frequency_changes.append(int(line)) return frequency_changes def find_duplicate(frequency_changes) -> Optional[int]: sums = set() ...
636
0
46
17fbe14142177514c71e1ad98c64718335e01987
249
py
Python
Consu/tryagain.py
JoaoCarabetta/transparencia-unicamp
a8b9f6783cbda1a71aac3e32828909fcee52b2a7
[ "MIT" ]
null
null
null
Consu/tryagain.py
JoaoCarabetta/transparencia-unicamp
a8b9f6783cbda1a71aac3e32828909fcee52b2a7
[ "MIT" ]
null
null
null
Consu/tryagain.py
JoaoCarabetta/transparencia-unicamp
a8b9f6783cbda1a71aac3e32828909fcee52b2a7
[ "MIT" ]
null
null
null
# organize links files and try to download it again with open ('links.txt', 'r') as f: links = f.read() links = links.split('.pdf') links = [l + '.pdf' for l in links] for l in links: import downloadall as down down.download_pdf(l, "extra")
17.785714
51
0.662651
# organize links files and try to download it again with open ('links.txt', 'r') as f: links = f.read() links = links.split('.pdf') links = [l + '.pdf' for l in links] for l in links: import downloadall as down down.download_pdf(l, "extra")
0
0
0
16a0827d2bcb1b45d246780daa127c3c35e8cbba
847
py
Python
meeting/models.py
SlapBass/nx-portal
ee262079db1e5230a24ebbc205e44926f11f8da9
[ "Apache-2.0" ]
5
2019-10-04T04:46:44.000Z
2019-10-09T10:02:01.000Z
meeting/models.py
SlapBass/nx-portal
ee262079db1e5230a24ebbc205e44926f11f8da9
[ "Apache-2.0" ]
9
2019-10-06T07:15:09.000Z
2020-09-24T02:19:40.000Z
meeting/models.py
SlapBass/nx-portal
ee262079db1e5230a24ebbc205e44926f11f8da9
[ "Apache-2.0" ]
1
2020-06-19T13:26:08.000Z
2020-06-19T13:26:08.000Z
import uuid from django.db import models # Create your models here.
29.206897
83
0.736718
import uuid from django.db import models # Create your models here. class Meeting(models.Model): mtg_id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) name = models.CharField(max_length = 255) start = models.DateField() end = models.DateField() on_start = models.BooleanF...
22
684
69
1313df16f8c5d9d9e1be83de8dba3f629f19d78a
754
py
Python
wrapanapi/systems/__init__.py
kedark3/wrapanapi
47123c8697273c86eff92f161ee2e48b64446c0f
[ "MIT" ]
null
null
null
wrapanapi/systems/__init__.py
kedark3/wrapanapi
47123c8697273c86eff92f161ee2e48b64446c0f
[ "MIT" ]
1
2018-11-07T11:57:36.000Z
2018-11-07T12:06:07.000Z
wrapanapi/systems/__init__.py
kedark3/wrapanapi
47123c8697273c86eff92f161ee2e48b64446c0f
[ "MIT" ]
null
null
null
from __future__ import absolute_import from .ec2 import EC2System from .google import GoogleCloudSystem from .hawkular import HawkularSystem from .lenovo import LenovoSystem from .msazure import AzureSystem from .nuage import NuageSystem from .openstack import OpenstackSystem from .openstack_infra import OpenstackInfr...
34.272727
93
0.812997
from __future__ import absolute_import from .ec2 import EC2System from .google import GoogleCloudSystem from .hawkular import HawkularSystem from .lenovo import LenovoSystem from .msazure import AzureSystem from .nuage import NuageSystem from .openstack import OpenstackSystem from .openstack_infra import OpenstackInfr...
0
0
0
5ef304c711a863611a70cc6b126ae4fd2521847e
1,021
py
Python
test/customHookTest.py
FXTD-ODYSSEY/QBinder
b4b288e7c0ef09d2382e3d6678a5c41950257b76
[ "MIT" ]
13
2020-11-29T15:02:57.000Z
2022-02-11T03:12:25.000Z
test/customHookTest.py
FXTD-ODYSSEY/QBinder
b4b288e7c0ef09d2382e3d6678a5c41950257b76
[ "MIT" ]
8
2020-11-30T02:47:56.000Z
2021-05-19T03:44:16.000Z
test/customHookTest.py
FXTD-ODYSSEY/QtConfig
978cddf26c0305677b65b04d206138970cb73762
[ "MIT" ]
2
2020-11-30T01:59:19.000Z
2021-12-17T06:44:54.000Z
# -*- coding: utf-8 -*- """ """ from __future__ import division from __future__ import print_function from __future__ import absolute_import __author__ = "timmyliang" __email__ = "820472580@qq.com" __date__ = "2021-01-30 22:16:52" import os import sys import signal signal.signal(signal.SIGINT, signal.SIG_DFL) DI...
17.016667
44
0.691479
# -*- coding: utf-8 -*- """ """ from __future__ import division from __future__ import print_function from __future__ import absolute_import __author__ = "timmyliang" __email__ = "820472580@qq.com" __date__ = "2021-01-30 22:16:52" import os import sys import signal signal.signal(signal.SIGINT, signal.SIG_DFL) DI...
247
40
68
482e6fc6d6fd84e5774da7b783b841d887d2d0f2
4,524
py
Python
SUL2/example_eager/detector/data_reader.py
ddddwee1/SULT
0ff31b602d20dd8bc5cf4a6f4f5bc193d636e784
[ "WTFPL" ]
18
2017-12-19T07:55:17.000Z
2020-03-12T11:07:45.000Z
SUL2/example_eager/detector/data_reader.py
ddddwee1/SULT
0ff31b602d20dd8bc5cf4a6f4f5bc193d636e784
[ "WTFPL" ]
1
2019-04-18T10:31:41.000Z
2019-05-23T06:47:24.000Z
SUL2/example_eager/detector/data_reader.py
ddddwee1/SULT
0ff31b602d20dd8bc5cf4a6f4f5bc193d636e784
[ "WTFPL" ]
5
2018-06-06T00:51:48.000Z
2020-03-12T11:07:46.000Z
import random import cv2 import numpy as np import glob if __name__=='__main__': img = cv2.imread('img_7.jpg') annot = load_annot('gt_img_7.txt') img, annot = process_image(img, annot) img, conf, xywh = annot_to_grid(img, annot, 16) annot = grid_to_annot(conf, xywh, 16) img = draw(img, annot) cv2.imshow('img...
26.928571
80
0.623121
import random import cv2 import numpy as np import glob def load_annot(fname): # annot : [x1, y1, x2, y2] f = open(fname) annots = [] for i in f: i = i.strip() i = i.split(',') annot = [int(i[0]), int(i[1]), int(i[2]), int(i[3])] if annot[2]-annot[0]<=1 or annot[3]-annot[1]<=1: continue else: an...
3,973
0
208
e17ce02f18842fb81648e90c24fc2efd64710900
484,516
py
Python
test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/operations/_operations.py
changlong-liu/autorest.python
1f03e4c6a11934d385fab050dc44041f1e91e9ff
[ "MIT" ]
null
null
null
test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/operations/_operations.py
changlong-liu/autorest.python
1f03e4c6a11934d385fab050dc44041f1e91e9ff
[ "MIT" ]
null
null
null
test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/operations/_operations.py
changlong-liu/autorest.python
1f03e4c6a11934d385fab050dc44041f1e91e9ff
[ "MIT" ]
null
null
null
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
46.33413
120
0.613016
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
194,935
0
6,669
3ab043a232c5636d9b84dfe4b1a7129d936601c7
7,183
py
Python
alipay/aop/api/domain/AlipayAssetPointVoucherprodBenefittemplateCreateModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AlipayAssetPointVoucherprodBenefittemplateCreateModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AlipayAssetPointVoucherprodBenefittemplateCreateModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AssetFundInfo import AssetFundInfo from alipay.aop.api.domain.AssetValidPeriod import AssetValidPeriod
32.355856
83
0.584435
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AssetFundInfo import AssetFundInfo from alipay.aop.api.domain.AssetValidPeriod import AssetValidPeriod class AlipayAssetPointVoucherprodBenefittemplateCreateModel(object): de...
5,693
1,222
23
247d37b879b9bb4d6c4053fda7ce951376a9ecde
2,075
py
Python
tests/verification/test_match.py
PEM-Humboldt/regi0
0d64587d5d87f57cddfc7a67bb8baf74cd70adf2
[ "MIT" ]
null
null
null
tests/verification/test_match.py
PEM-Humboldt/regi0
0d64587d5d87f57cddfc7a67bb8baf74cd70adf2
[ "MIT" ]
15
2022-02-03T11:38:37.000Z
2022-03-09T23:23:04.000Z
tests/verification/test_match.py
PEM-Humboldt/regi0
0d64587d5d87f57cddfc7a67bb8baf74cd70adf2
[ "MIT" ]
null
null
null
""" Test cases for the regi0.verification.match function. """ import numpy as np import pandas as pd import pytest from regi0.verification import match @pytest.fixture @pytest.fixture
20.959596
87
0.473253
""" Test cases for the regi0.verification.match function. """ import numpy as np import pandas as pd import pytest from regi0.verification import match @pytest.fixture def left(): return pd.Series( [ np.nan, "Nariño", "Amazonas", "chocó", "Guaji...
1,773
0
113
88b0abac7951e3017be79c494f8c43569db6cd22
823
py
Python
heroku/download_ants_files.py
girder/otm-server
7abfe9c2d659c962784e28058d8f9a8ffc1f4991
[ "Apache-2.0" ]
null
null
null
heroku/download_ants_files.py
girder/otm-server
7abfe9c2d659c962784e28058d8f9a8ffc1f4991
[ "Apache-2.0" ]
5
2022-03-10T19:39:22.000Z
2022-03-17T21:05:10.000Z
heroku/download_ants_files.py
girder/otm-server
7abfe9c2d659c962784e28058d8f9a8ffc1f4991
[ "Apache-2.0" ]
null
null
null
import site import tempfile import urllib.request import zipfile wheel_url = ( 'https://files.pythonhosted.org/packages/f0/b5' '/45f1d9ad34194bf4b9cc79c7b30b2d8c656ab6b487d8c70c8826f6a9f922' '/antspyx-0.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl' ) if __name__ == '__main__': main()...
26.548387
84
0.682868
import site import tempfile import urllib.request import zipfile wheel_url = ( 'https://files.pythonhosted.org/packages/f0/b5' '/45f1d9ad34194bf4b9cc79c7b30b2d8c656ab6b487d8c70c8826f6a9f922' '/antspyx-0.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl' ) def main(): dest_dir = site.getsit...
479
0
23
90bdee01d48891321ac96ba155db001b496db97a
7,909
py
Python
src/CMakeLists_generator.py
Ginoko/auto_generate_CMakeLists
d9b7151266046a0f3a6893ac422509459455c299
[ "MIT" ]
null
null
null
src/CMakeLists_generator.py
Ginoko/auto_generate_CMakeLists
d9b7151266046a0f3a6893ac422509459455c299
[ "MIT" ]
null
null
null
src/CMakeLists_generator.py
Ginoko/auto_generate_CMakeLists
d9b7151266046a0f3a6893ac422509459455c299
[ "MIT" ]
null
null
null
""" ==================== CMakeLists Generator ==================== :Date: 2021-01-26 :Version: 1.0.0 :Author: Ginoko :Contact: ginorasakushisu666@gmail.com """ import sys import os import getopt import platform import re import traceback is_windows = True if __name__ == '__main__': try: check_platf...
32.150407
94
0.552029
""" ==================== CMakeLists Generator ==================== :Date: 2021-01-26 :Version: 1.0.0 :Author: Ginoko :Contact: ginorasakushisu666@gmail.com """ import sys import os import getopt import platform import re import traceback is_windows = True class LanguageConfiguration: __type_value_map = { ...
5,936
1,370
115
f9c0724f4120710b9bb78e49e320b9e80e637bf7
1,320
py
Python
app/routers/external_contents.py
yamatteo/vue-fastapi-boilerplate
5fa3de29a6e7ec4a8df9b3a4073f462307f62cb6
[ "MIT" ]
2
2020-03-11T02:58:44.000Z
2020-03-27T16:00:25.000Z
app/routers/external_contents.py
yamatteo/vue-fastapi-boilerplate
5fa3de29a6e7ec4a8df9b3a4073f462307f62cb6
[ "MIT" ]
7
2021-03-10T07:59:29.000Z
2022-02-26T23:46:17.000Z
app/routers/external_contents.py
yamatteo/vue-fastapi-boilerplate
5fa3de29a6e7ec4a8df9b3a4073f462307f62cb6
[ "MIT" ]
1
2020-03-11T02:58:48.000Z
2020-03-11T02:58:48.000Z
from typing import List from fastapi import APIRouter, Depends, Body from fastapi import UploadFile, File from starlette.responses import Response from models import ExternalContent from routers import admin_only from schemas import * router = APIRouter() @router.post("/browse", dependencies=[Depends(admin_only)])...
35.675676
121
0.793182
from typing import List from fastapi import APIRouter, Depends, Body from fastapi import UploadFile, File from starlette.responses import Response from models import ExternalContent from routers import admin_only from schemas import * router = APIRouter() @router.post("/browse", dependencies=[Depends(admin_only)])...
648
0
110
0dca94e48e3bf19521fc60b9787bb9d952c90e0c
162
py
Python
python/p030.py
lbreede/project-euler
c225e3742f749fc681034aac98cc9c23f8cdb37e
[ "MIT" ]
null
null
null
python/p030.py
lbreede/project-euler
c225e3742f749fc681034aac98cc9c23f8cdb37e
[ "MIT" ]
null
null
null
python/p030.py
lbreede/project-euler
c225e3742f749fc681034aac98cc9c23f8cdb37e
[ "MIT" ]
null
null
null
result = 0 for i in range(2, 200000): digits = list(map(int, str(i))) fifth = 0 for d in digits: fifth += d**5 if i == fifth: result += i print(result)
13.5
32
0.592593
result = 0 for i in range(2, 200000): digits = list(map(int, str(i))) fifth = 0 for d in digits: fifth += d**5 if i == fifth: result += i print(result)
0
0
0
e5b934dbcbcfd5884ad1d57af4c5c28f973aba0f
672
py
Python
python/reverse-string/reverse_string_test.py
manubhardwaj/exercism
27b22a8d52520ada30a644315167cab127e7ac43
[ "Apache-2.0" ]
null
null
null
python/reverse-string/reverse_string_test.py
manubhardwaj/exercism
27b22a8d52520ada30a644315167cab127e7ac43
[ "Apache-2.0" ]
4
2020-07-17T11:30:45.000Z
2021-03-23T21:25:36.000Z
python/reverse-string/reverse_string_test.py
manubhardwaj/exercism
27b22a8d52520ada30a644315167cab127e7ac43
[ "Apache-2.0" ]
null
null
null
import unittest from reverse_string import reverse # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.1 if __name__ == '__main__': unittest.main()
24.888889
75
0.657738
import unittest from reverse_string import reverse # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.1 class ReverseStringTests(unittest.TestCase): def empty_string(self): self.assertEqual(reverse(''), '') def a_word(self): self.assertEqual(reverse('robot'), ...
313
23
157
96e7af56f8e1bac038907af57551dbe96360eae9
1,205
py
Python
nordestao/apps/campeonatos/views/players.py
intelivix/pyne-workshop-scraping-web
c0696b669934eef2dbda81da3b7c058810041fa5
[ "MIT" ]
null
null
null
nordestao/apps/campeonatos/views/players.py
intelivix/pyne-workshop-scraping-web
c0696b669934eef2dbda81da3b7c058810041fa5
[ "MIT" ]
null
null
null
nordestao/apps/campeonatos/views/players.py
intelivix/pyne-workshop-scraping-web
c0696b669934eef2dbda81da3b7c058810041fa5
[ "MIT" ]
null
null
null
from django.views.generic.list import ListView from django.views.generic.detail import DetailView from django.shortcuts import get_object_or_404 from campeonatos.models import Player from campeonatos.models import Team player_list_view = PlayerListView.as_view() player_detail_view = PlayerDetailView.as_view() pla...
28.023256
69
0.758506
from django.views.generic.list import ListView from django.views.generic.detail import DetailView from django.shortcuts import get_object_or_404 from campeonatos.models import Player from campeonatos.models import Team class PlayerModelMixin(object): model = Player class PlayerListView(PlayerModelMixin, ListVie...
278
458
92
988ee2a7b3b790d8027034c21a8c550d31b8b544
450
py
Python
weatherpy/astronomy.py
cmcdowell/weatherpy
7da7bed9db946dfab9318d67aab5fbda1e4fed21
[ "MIT" ]
2
2015-11-28T09:01:47.000Z
2016-04-13T13:00:11.000Z
weatherpy/astronomy.py
cmcdowell/weatherpy
7da7bed9db946dfab9318d67aab5fbda1e4fed21
[ "MIT" ]
null
null
null
weatherpy/astronomy.py
cmcdowell/weatherpy
7da7bed9db946dfab9318d67aab5fbda1e4fed21
[ "MIT" ]
null
null
null
class Astronomy(object): """ Forcast information about the current astronomic conditions Attributes: sunrise: Today's sunrise time. The time is local time and in the format h:mm am/pm sunset: Today's sunset time. The time is local time and in the format h:mm am/pm ...
26.470588
79
0.628889
class Astronomy(object): """ Forcast information about the current astronomic conditions Attributes: sunrise: Today's sunrise time. The time is local time and in the format h:mm am/pm sunset: Today's sunset time. The time is local time and in the format h:mm am/pm ...
95
0
27
ac633ae84e39b2a9a0c6199e63ae7e2cc94f841f
435
py
Python
apiuser/core/migrations/0003_auto_20191113_1922.py
ngelrojas/crud_user_advanced
41ab1b403fbf5d15730d30b810867fbd5bde9e3d
[ "MIT" ]
null
null
null
apiuser/core/migrations/0003_auto_20191113_1922.py
ngelrojas/crud_user_advanced
41ab1b403fbf5d15730d30b810867fbd5bde9e3d
[ "MIT" ]
null
null
null
apiuser/core/migrations/0003_auto_20191113_1922.py
ngelrojas/crud_user_advanced
41ab1b403fbf5d15730d30b810867fbd5bde9e3d
[ "MIT" ]
null
null
null
# Generated by Django 2.2.6 on 2019-11-13 19:22 from django.db import migrations, models
22.894737
97
0.6
# Generated by Django 2.2.6 on 2019-11-13 19:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0002_auto_20191113_1820'), ] operations = [ migrations.AlterField( model_name='reward', name='type_reward', ...
0
321
23
df8438c6fb19f9776c84908bc3dc3db9b791b43c
3,418
py
Python
mmaction/models/recognizers/base.py
Morgan-Gan/SlowfastFb-TSM
ca6783df0cc9577abb1735b2cab52653d569beff
[ "Apache-2.0" ]
null
null
null
mmaction/models/recognizers/base.py
Morgan-Gan/SlowfastFb-TSM
ca6783df0cc9577abb1735b2cab52653d569beff
[ "Apache-2.0" ]
null
null
null
mmaction/models/recognizers/base.py
Morgan-Gan/SlowfastFb-TSM
ca6783df0cc9577abb1735b2cab52653d569beff
[ "Apache-2.0" ]
null
null
null
import logging from abc import ABCMeta, abstractmethod import torch.nn as nn from slowfast.utils.parser import load_config,parse_args from slowfast.models import head_helper class BaseRecognizer(nn.Module): """Base class for recognizers""" __metaclass__ = ABCMeta @property @property @abstract...
36.361702
98
0.562902
import logging from abc import ABCMeta, abstractmethod import torch.nn as nn from slowfast.utils.parser import load_config,parse_args from slowfast.models import head_helper class BaseRecognizer(nn.Module): """Base class for recognizers""" __metaclass__ = ABCMeta def __init__(self): super(BaseR...
2,562
0
185
c7f9543912f383b64228630d2274b0e6d6d77368
13,324
py
Python
demo.py
KeithRieck/bedlam
ce5f87a0211b4eecd553b1aae24e3b3664b43c5e
[ "BSD-2-Clause" ]
null
null
null
demo.py
KeithRieck/bedlam
ce5f87a0211b4eecd553b1aae24e3b3664b43c5e
[ "BSD-2-Clause" ]
null
null
null
demo.py
KeithRieck/bedlam
ce5f87a0211b4eecd553b1aae24e3b3664b43c5e
[ "BSD-2-Clause" ]
null
null
null
from bedlam import Animation from bedlam import Button from bedlam import Game from bedlam import GameTask from bedlam import ImageSprite from bedlam import Scene from bedlam import Sprite # __pragma__('skip') document = window = Math = Date = console = 0 # Prevent complaints by optional static checker # __pragma__...
35.43617
112
0.608526
from bedlam import Animation from bedlam import Button from bedlam import Game from bedlam import GameTask from bedlam import ImageSprite from bedlam import Scene from bedlam import Sprite # __pragma__('skip') document = window = Math = Date = console = 0 # Prevent complaints by optional static checker # __pragma__...
11,912
65
972
3e59bcc2abad1d7f94a1dd46d84e3dbff0111bc5
12,527
py
Python
API-CM.py
IoTCrawler/Capability-Manager
5e396cf1e97dbf58274a239b61857cf39182782a
[ "Apache-2.0" ]
null
null
null
API-CM.py
IoTCrawler/Capability-Manager
5e396cf1e97dbf58274a239b61857cf39182782a
[ "Apache-2.0" ]
null
null
null
API-CM.py
IoTCrawler/Capability-Manager
5e396cf1e97dbf58274a239b61857cf39182782a
[ "Apache-2.0" ]
1
2020-11-04T05:46:33.000Z
2020-11-04T05:46:33.000Z
# #Copyright Odin Solutions S.L. All Rights Reserved. # #SPDX-License-Identifier: Apache-2.0 # from http.server import HTTPServer, BaseHTTPRequestHandler import ssl import http.client import logging import sys import json import configparser from subprocess import Popen, PIPE import html import os import time #Obtai...
34.797222
138
0.528059
# #Copyright Odin Solutions S.L. All Rights Reserved. # #SPDX-License-Identifier: Apache-2.0 # from http.server import HTTPServer, BaseHTTPRequestHandler import ssl import http.client import logging import sys import json import configparser from subprocess import Popen, PIPE import html import os import time #Obtai...
10,827
34
205
9ece274dab4a34c40a834896458c41a2351468b0
127
py
Python
modelapp/admin.py
anandkumar190/django-code
c47fbc5f55f7d5961c29a0e65047573013c995dc
[ "MIT" ]
null
null
null
modelapp/admin.py
anandkumar190/django-code
c47fbc5f55f7d5961c29a0e65047573013c995dc
[ "MIT" ]
null
null
null
modelapp/admin.py
anandkumar190/django-code
c47fbc5f55f7d5961c29a0e65047573013c995dc
[ "MIT" ]
1
2020-10-05T04:46:11.000Z
2020-10-05T04:46:11.000Z
from django.contrib import admin from modelapp.models import Data # Register your models here. admin.site.register(Data)
21.166667
33
0.779528
from django.contrib import admin from modelapp.models import Data # Register your models here. admin.site.register(Data)
0
0
0
e18118fb4c6a48b5899e6421c95d4a83ff65028f
560
py
Python
wikireader/html_convert/page_template.py
mke21/wikireader
767422a736498d5147650cae52a89da7d0c43b65
[ "MIT" ]
null
null
null
wikireader/html_convert/page_template.py
mke21/wikireader
767422a736498d5147650cae52a89da7d0c43b65
[ "MIT" ]
7
2020-11-12T20:16:14.000Z
2020-11-18T20:33:16.000Z
wikireader/html_convert/page_template.py
mke21/wikireader
767422a736498d5147650cae52a89da7d0c43b65
[ "MIT" ]
null
null
null
page_template = '''<!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <style> {css} </style> <title>{title}</title> </head> <body> <div class="content"> <div class="sidenav"> <h3>Links</h3> {links} </div> <div class="article"> <h1>{title}</...
16.969697
37
0.5
page_template = '''<!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <style> {css} </style> <title>{title}</title> </head> <body> <div class="content"> <div class="sidenav"> <h3>Links</h3> {links} </div> <div class="article"> <h1>{title}</...
146
0
23
9684b8053a57b0c7b92c8fb99c063013bf0f467f
6,316
py
Python
app-3rd-party/ultragrid-1.1-rc4/ultragrid/ag_plugin/uvSenderService.py
benyaboy/sage-graphics
090640167329ace4b6ad266d47db5bb2b0394232
[ "Unlicense" ]
370
2016-10-05T15:19:00.000Z
2022-03-29T22:12:28.000Z
app-3rd-party/ultragrid-1.1-rc4/ultragrid/ag_plugin/uvSenderService.py
benyaboy/sage-graphics
090640167329ace4b6ad266d47db5bb2b0394232
[ "Unlicense" ]
165
2016-11-21T13:01:36.000Z
2022-03-31T20:01:20.000Z
app-3rd-party/ultragrid-1.1-rc4/ultragrid/ag_plugin/uvSenderService.py
benyaboy/sage-graphics
090640167329ace4b6ad266d47db5bb2b0394232
[ "Unlicense" ]
63
2016-10-13T12:07:45.000Z
2022-03-23T19:46:10.000Z
#----------------------------------------------------------------------------- # Name: uvSenderService.py # Purpose: Start the UltraGrid video client # # Author: Ladan Gharai # Colin Perkins # # Created: 13 August 2004 # Copyright: (c) 2004 University of Southern California # ...
42.106667
104
0.599272
#----------------------------------------------------------------------------- # Name: uvSenderService.py # Purpose: Start the UltraGrid video client # # Author: Ladan Gharai # Colin Perkins # # Created: 13 August 2004 # Copyright: (c) 2004 University of Southern California # ...
4,110
1,055
23
c46195a445886d3fb5109c53a83abbb83eba930b
1,197
py
Python
packages/simcore-sdk/src/simcore_sdk/node_ports/_data_item.py
colinRawlings/osparc-simcore
bf2f18d5bc1e574d5f4c238d08ad15156184c310
[ "MIT" ]
25
2018-04-13T12:44:12.000Z
2022-03-12T15:01:17.000Z
packages/simcore-sdk/src/simcore_sdk/node_ports/_data_item.py
colinRawlings/osparc-simcore
bf2f18d5bc1e574d5f4c238d08ad15156184c310
[ "MIT" ]
2,553
2018-01-18T17:11:55.000Z
2022-03-31T16:26:40.000Z
packages/simcore-sdk/src/simcore_sdk/node_ports/_data_item.py
mrnicegyu11/osparc-simcore
b6fa6c245dbfbc18cc74a387111a52de9b05d1f4
[ "MIT" ]
20
2018-01-18T19:45:33.000Z
2022-03-29T07:08:47.000Z
"""This module contains an item representing a node port""" import collections import logging from typing import Dict, Optional, Union from ..node_ports_common import config, exceptions log = logging.getLogger(__name__) DataItemValue = Optional[Union[int, float, bool, str, Dict[str, Union[int, str]]]] ...
32.351351
83
0.609023
"""This module contains an item representing a node port""" import collections import logging from typing import Dict, Optional, Union from ..node_ports_common import config, exceptions log = logging.getLogger(__name__) DataItemValue = Optional[Union[int, float, bool, str, Dict[str, Union[int, str]]]] ...
639
0
58
102f8234d6639e14c477cc991d6e3966277f42ea
1,660
py
Python
pdistcc/cli.py
asheplyakov/pdistcc
b514a17542bf687c8c7c4ec6e32dfb558ddbe600
[ "WTFPL" ]
null
null
null
pdistcc/cli.py
asheplyakov/pdistcc
b514a17542bf687c8c7c4ec6e32dfb558ddbe600
[ "WTFPL" ]
4
2019-08-22T14:31:15.000Z
2019-08-22T14:37:30.000Z
pdistcc/cli.py
asheplyakov/pdistcc
b514a17542bf687c8c7c4ec6e32dfb558ddbe600
[ "WTFPL" ]
null
null
null
#!/usr/bin/env python3 import argparse import os import re from .config import ( DISTCCD_PORT, server_settings, client_settings, ) from .compiler import wrap_compiler from .server import daemon
28.135593
77
0.64759
#!/usr/bin/env python3 import argparse import os import re from .config import ( DISTCCD_PORT, server_settings, client_settings, ) from .compiler import wrap_compiler from .server import daemon def parse_distcc_host(h): rx = re.compile('^([^:/]+):([0-9]+)/([0-9]+)') m = rx.match(h) if m i...
1,353
0
92
33f4b87878b83e13c7a8bca26e18a2ff2632844b
296
py
Python
password.py
mohit2pal/A_Password_Generator
2983c5f6b292ebeb1a186dcebe2c88d2486ebfc7
[ "MIT" ]
1
2021-11-28T19:18:02.000Z
2021-11-28T19:18:02.000Z
password.py
mohit2pal/A_Password_Generator
2983c5f6b292ebeb1a186dcebe2c88d2486ebfc7
[ "MIT" ]
null
null
null
password.py
mohit2pal/A_Password_Generator
2983c5f6b292ebeb1a186dcebe2c88d2486ebfc7
[ "MIT" ]
null
null
null
import random # trunk-ignore(flake8/W605) x = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyl][\][\]\;./0123456789" passnew = "" y = int(input("Enter the length of the password")) for i in range(y): passnew = passnew + random.choice(x) print("The generated password is ", passnew)
21.142857
79
0.716216
import random # trunk-ignore(flake8/W605) x = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyl][\][\]\;./0123456789" passnew = "" y = int(input("Enter the length of the password")) for i in range(y): passnew = passnew + random.choice(x) print("The generated password is ", passnew)
0
0
0
099e0bd280754a32c63729904da0898743f3575a
2,637
py
Python
flask_chown/permission_manager_redis.py
xvzf/flask-chmod
1dcd6b4281a930ac889415c1913e9551c882da23
[ "Apache-2.0" ]
null
null
null
flask_chown/permission_manager_redis.py
xvzf/flask-chmod
1dcd6b4281a930ac889415c1913e9551c882da23
[ "Apache-2.0" ]
1
2018-05-13T09:39:30.000Z
2018-05-13T09:39:30.000Z
flask_chown/permission_manager_redis.py
xvzf/flask-chmod
1dcd6b4281a930ac889415c1913e9551c882da23
[ "Apache-2.0" ]
1
2018-05-13T09:06:09.000Z
2018-05-13T09:06:09.000Z
# -*- coding: utf-8 -*- """ flask_chown.permission_manager_cached ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cached permission manager (based on redis) :copyright: (c) 2018 by Matthias Riegler. :license: APACHEv2, see LICENSE.md for more details. """ import logging import json from . import PermissionM...
27.757895
78
0.587031
# -*- coding: utf-8 -*- """ flask_chown.permission_manager_cached ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cached permission manager (based on redis) :copyright: (c) 2018 by Matthias Riegler. :license: APACHEv2, see LICENSE.md for more details. """ import logging import json from . import PermissionM...
160
0
26
2399cbdc1d5f6c6a2145b1efdefe3d6e35fc1c16
235
py
Python
Códigos fichados e comentados/Química/Propriedades da matéria/Tabela de Cátions e Ânions 1.0.py
kioolz/Python-scripts
cb8ad758811e2eed8673392077a55e8922ac7b9f
[ "MIT" ]
null
null
null
Códigos fichados e comentados/Química/Propriedades da matéria/Tabela de Cátions e Ânions 1.0.py
kioolz/Python-scripts
cb8ad758811e2eed8673392077a55e8922ac7b9f
[ "MIT" ]
null
null
null
Códigos fichados e comentados/Química/Propriedades da matéria/Tabela de Cátions e Ânions 1.0.py
kioolz/Python-scripts
cb8ad758811e2eed8673392077a55e8922ac7b9f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import pandas as pd from pandas import DataFrame,Series Cátions=pd.Series([]) Ânions=pd.Series([]) NomedoÍon=pd.Series([]) FórmuladoÍon=pd.Series([]) df=DataFrame({'Cátions':Cátions,'Ânions':Ânions}) df
13.055556
49
0.689362
# -*- coding: utf-8 -*- import pandas as pd from pandas import DataFrame,Series Cátions=pd.Series([]) Ânions=pd.Series([]) NomedoÍon=pd.Series([]) FórmuladoÍon=pd.Series([]) df=DataFrame({'Cátions':Cátions,'Ânions':Ânions}) df
0
0
0
1a7d056260ea1ad8ec145d1dca00bcda513dc1ed
5,168
py
Python
line.py
WilliamWan2017/Linear
d32d392b230048d25843961b163a50d3fc266eb4
[ "Apache-2.0" ]
null
null
null
line.py
WilliamWan2017/Linear
d32d392b230048d25843961b163a50d3fc266eb4
[ "Apache-2.0" ]
null
null
null
line.py
WilliamWan2017/Linear
d32d392b230048d25843961b163a50d3fc266eb4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Nov 10 14:22:56 2017 @author: zqzhan """ from decimal import Decimal,getcontext from vector import Vector getcontext().prec = 30 if __name__ == '__main__': line1 = Line(Vector([1, 2]), 4) line2 = Line(Vector([2 , 5]), 9) prin...
30.046512
80
0.565596
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Nov 10 14:22:56 2017 @author: zqzhan """ from decimal import Decimal,getcontext from vector import Vector getcontext().prec = 30 class MyDecimal(Decimal): def is_near_zero(self,eps=1e-10): if (abs(self)<eps): return True ...
3,858
307
76
d6958c08e1a125b144f95b6760059d05a50d5112
3,009
py
Python
src/setup.py
yalexaner/ubuntu-setup
870306197c5caac77c0d3bd3c4a05b95b5820ba0
[ "MIT" ]
null
null
null
src/setup.py
yalexaner/ubuntu-setup
870306197c5caac77c0d3bd3c4a05b95b5820ba0
[ "MIT" ]
null
null
null
src/setup.py
yalexaner/ubuntu-setup
870306197c5caac77c0d3bd3c4a05b95b5820ba0
[ "MIT" ]
null
null
null
from argparse import ArgumentParser from os import system as execute, listdir, rmdir, mkdir from shutil import copy as copy_file if __name__ == '__main__': parser = ArgumentParser(description='Setup the system.') parser.add_argument('object', default='everything', nargs='?', choi...
33.065934
117
0.636092
from argparse import ArgumentParser from os import system as execute, listdir, rmdir, mkdir from shutil import copy as copy_file def setup_bash(): # creating aliases copy_file('../res/.bash_aliases', '/home/yalexaner/') # changing promt with open('../res/promt') as promt_file: promt = promt_f...
2,102
0
115
44a1c8a37f23828c194dfa452d435587fe73be1c
4,817
py
Python
review_heatmap/web.py
kb1900/Anki-Addons
3b764af8657065c369d404025a3f11c964192a33
[ "MIT" ]
1
2019-06-23T04:46:24.000Z
2019-06-23T04:46:24.000Z
review_heatmap/web.py
kb1900/Anki-Addons
3b764af8657065c369d404025a3f11c964192a33
[ "MIT" ]
null
null
null
review_heatmap/web.py
kb1900/Anki-Addons
3b764af8657065c369d404025a3f11c964192a33
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Review Heatmap Add-on for Anki # # Copyright (C) 2016-2018 Aristotelis P. <https//glutanimate.com/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either ve...
40.822034
125
0.675732
# -*- coding: utf-8 -*- # Review Heatmap Add-on for Anki # # Copyright (C) 2016-2018 Aristotelis P. <https//glutanimate.com/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either ve...
0
0
0
79c7e64387537eab98a80ce1ec2e19b8490c4568
211
py
Python
stacknet/stacknet_funcs/__init__.py
evanmiller29/DonorChoose
c94bb3284a2c865b03c3daa12300ed617257c689
[ "Apache-2.0" ]
null
null
null
stacknet/stacknet_funcs/__init__.py
evanmiller29/DonorChoose
c94bb3284a2c865b03c3daa12300ed617257c689
[ "Apache-2.0" ]
null
null
null
stacknet/stacknet_funcs/__init__.py
evanmiller29/DonorChoose
c94bb3284a2c865b03c3daa12300ed617257c689
[ "Apache-2.0" ]
null
null
null
from stacknet.stacknet_funcs.sparse_funcs import from_sparse_to_file from stacknet.stacknet_funcs.datetime_funcs import getTimeFeatures from stacknet.stacknet_funcs.cat_feature_engineering import getCatFeatures
52.75
74
0.914692
from stacknet.stacknet_funcs.sparse_funcs import from_sparse_to_file from stacknet.stacknet_funcs.datetime_funcs import getTimeFeatures from stacknet.stacknet_funcs.cat_feature_engineering import getCatFeatures
0
0
0
3786c002c77adc076bc708f425f9fdfe037a3f43
4,005
py
Python
pyqt/chap11/labelledwidgets.py
liuyangyang2015/PythonDemo
a72c009a31ff833dd12405bb97e688ae91ceda6c
[ "MIT" ]
null
null
null
pyqt/chap11/labelledwidgets.py
liuyangyang2015/PythonDemo
a72c009a31ff833dd12405bb97e688ae91ceda6c
[ "MIT" ]
null
null
null
pyqt/chap11/labelledwidgets.py
liuyangyang2015/PythonDemo
a72c009a31ff833dd12405bb97e688ae91ceda6c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either version 2 of the License, or # version 3 of the Lic...
39.264706
74
0.642197
#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either version 2 of the License, or # version 3 of the Lic...
2,426
23
150
aa706634207ec5cdf904d41b11723983513e464f
3,913
py
Python
network_anomaly/KDDCup99-LSTM/binary/lskerastest.py
kidrabit/Data-Visualization-Lab-RND
baa19ee4e9f3422a052794e50791495632290b36
[ "Apache-2.0" ]
1
2022-01-18T01:53:34.000Z
2022-01-18T01:53:34.000Z
network_anomaly/UNSW-NB15-LSTM/binary/lskerastest.py
kidrabit/Data-Visualization-Lab-RND
baa19ee4e9f3422a052794e50791495632290b36
[ "Apache-2.0" ]
null
null
null
network_anomaly/UNSW-NB15-LSTM/binary/lskerastest.py
kidrabit/Data-Visualization-Lab-RND
baa19ee4e9f3422a052794e50791495632290b36
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function from sklearn.cross_validation import train_test_split import pandas as pd import numpy as np np.random.seed(1337) # for reproducibility from keras.preprocessing import sequence from keras.utils import np_utils from keras.models import Sequential from keras.layers import Dense, Dro...
29.201493
164
0.729108
from __future__ import print_function from sklearn.cross_validation import train_test_split import pandas as pd import numpy as np np.random.seed(1337) # for reproducibility from keras.preprocessing import sequence from keras.utils import np_utils from keras.models import Sequential from keras.layers import Dense, Dro...
0
0
0
81b8ae47db07fae9137bdf23240c3ef9c16ec222
19,065
py
Python
plugins/modules/oci_blockstorage_boot_volume_backup.py
hanielburton/oci-ansible-collection
dfdffde637f746d346ba35569be8c3a3407022f2
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_blockstorage_boot_volume_backup.py
hanielburton/oci-ansible-collection
dfdffde637f746d346ba35569be8c3a3407022f2
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_blockstorage_boot_volume_backup.py
hanielburton/oci-ansible-collection
dfdffde637f746d346ba35569be8c3a3407022f2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2017, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
41.177106
160
0.649777
#!/usr/bin/python # Copyright (c) 2017, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
5,071
66
370
b86566688071e1b9be11c16e2797f8aae42b7573
1,583
pyde
Python
Bouncing_Ball/Bouncing_Ball.pyde
jarredthejellyfish/coding_workshop
aacb95770c9cf02eb63d1b42a238a74f46f1f3ac
[ "MIT" ]
null
null
null
Bouncing_Ball/Bouncing_Ball.pyde
jarredthejellyfish/coding_workshop
aacb95770c9cf02eb63d1b42a238a74f46f1f3ac
[ "MIT" ]
null
null
null
Bouncing_Ball/Bouncing_Ball.pyde
jarredthejellyfish/coding_workshop
aacb95770c9cf02eb63d1b42a238a74f46f1f3ac
[ "MIT" ]
null
null
null
# This is the ball class that handles everything related to Balls # The __init__ method is used to initialize class variables # The display method handles drawing the ball # The move method handles moving the Ball # The add_force method adds a force to the acceleration of the Ball # ...
31.66
75
0.65319
# This is the ball class that handles everything related to Balls class Ball: # The __init__ method is used to initialize class variables def __init__(self, position, velocity, acceleration): # Each ball has a position, velocity and acceleration self.position = position self.velocity = v...
796
-10
199
a306ad0b093e1e3720cd6f149f714a8e80e3fc4f
1,750
py
Python
CodeForces/FoxDividingCheese.py
PratikGarai/Coding-Challenges
af5f4458505b26538ec2d7dc0ca09aa236b2d01c
[ "MIT" ]
null
null
null
CodeForces/FoxDividingCheese.py
PratikGarai/Coding-Challenges
af5f4458505b26538ec2d7dc0ca09aa236b2d01c
[ "MIT" ]
2
2020-10-01T16:13:37.000Z
2020-10-30T19:12:38.000Z
CodeForces/FoxDividingCheese.py
PratikGarai/Coding-Challenges
af5f4458505b26538ec2d7dc0ca09aa236b2d01c
[ "MIT" ]
6
2020-10-03T09:04:26.000Z
2022-01-09T11:57:40.000Z
a,b = map(int, input().split()) print(process(a,b,0))
26.515152
43
0.334857
def process(a, b, step): if(a==b): return step steps = a+b changed = False if(a>b): if(a%5==0): val = process(a//5, b, step+1) if val!=-1: if changed : steps = min(steps, val) else: steps = ...
1,667
0
22
24b7353cbdee717d510c95e2ea9c09cb792d106a
2,339
py
Python
events/rejoin_user_event.py
t-karasova/grs-samples-python
0941265a6b8dd0bd6bd1db540b49307674360db7
[ "Apache-2.0" ]
1
2021-12-22T14:47:30.000Z
2021-12-22T14:47:30.000Z
events/rejoin_user_event.py
t-karasova/grs-samples-python
0941265a6b8dd0bd6bd1db540b49307674360db7
[ "Apache-2.0" ]
null
null
null
events/rejoin_user_event.py
t-karasova/grs-samples-python
0941265a6b8dd0bd6bd1db540b49307674360db7
[ "Apache-2.0" ]
2
2021-10-05T09:40:02.000Z
2021-12-17T16:04:26.000Z
# Copyright 2021 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
34.397059
103
0.790081
# Copyright 2021 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
893
0
66
06b2f000fb3c2bd6967d78dbed9d978bfe059655
7,494
py
Python
TMulator.py
deebs67/TMulator
1490c0bd81972471df8b090f83781ba6c3509c19
[ "MIT" ]
null
null
null
TMulator.py
deebs67/TMulator
1490c0bd81972471df8b090f83781ba6c3509c19
[ "MIT" ]
null
null
null
TMulator.py
deebs67/TMulator
1490c0bd81972471df8b090f83781ba6c3509c19
[ "MIT" ]
null
null
null
############################################################################## # This Python code has been written to emulate a simple Turing Machine. # Inspiration has been drawn from references such as the following: # # https://www.cs.virginia.edu/~robins/Turing_Paper_1936.pdf # https://www.cl.cam.ac.uk/projects/ras...
49.302632
178
0.600347
############################################################################## # This Python code has been written to emulate a simple Turing Machine. # Inspiration has been drawn from references such as the following: # # https://www.cs.virginia.edu/~robins/Turing_Paper_1936.pdf # https://www.cl.cam.ac.uk/projects/ras...
712
0
22
2c33b33e2ff39c04646272ab56efca732c319e88
4,945
py
Python
chrome/common/extensions/docs/server2/caching_rietveld_patcher.py
nagineni/chromium-crosswalk
5725642f1c67d0f97e8613ec1c3e8107ab53fdf8
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
4
2017-04-05T01:51:34.000Z
2018-02-15T03:11:54.000Z
chrome/common/extensions/docs/server2/caching_rietveld_patcher.py
nagineni/chromium-crosswalk
5725642f1c67d0f97e8613ec1c3e8107ab53fdf8
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2021-12-13T19:44:12.000Z
2021-12-13T19:44:12.000Z
chrome/common/extensions/docs/server2/caching_rietveld_patcher.py
nagineni/chromium-crosswalk
5725642f1c67d0f97e8613ec1c3e8107ab53fdf8
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
4
2017-04-05T01:52:03.000Z
2022-02-13T17:58:45.000Z
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from datetime import datetime, timedelta from file_system import FileNotFoundError, ToUnicode from future import Future from patcher import Patcher _VERSION...
37.748092
79
0.645298
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from datetime import datetime, timedelta from file_system import FileNotFoundError, ToUnicode from future import Future from patcher import Patcher _VERSION...
3,883
14
287
86e9fa48ae18bf3e22bbd8bfd77dd25685f617ca
14,008
py
Python
synthtool/gcp/gapic_generator.py
HemangChothani/synthtool
fdd03c161003ab97657cc0218f25c82c89ddf4b6
[ "Apache-2.0" ]
53
2018-10-29T20:10:03.000Z
2022-01-01T02:53:58.000Z
synthtool/gcp/gapic_generator.py
HemangChothani/synthtool
fdd03c161003ab97657cc0218f25c82c89ddf4b6
[ "Apache-2.0" ]
541
2018-09-25T02:30:52.000Z
2022-03-30T21:45:08.000Z
synthtool/gcp/gapic_generator.py
HemangChothani/synthtool
fdd03c161003ab97657cc0218f25c82c89ddf4b6
[ "Apache-2.0" ]
61
2019-01-15T15:05:15.000Z
2022-01-24T21:05:57.000Z
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
38.911111
121
0.621216
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
6,802
6,092
23
8523df85933b2d0a39bd3d9a78d8c598567b009e
716
py
Python
app/config.py
pkoscielny/zeroiot
ceb4e13ce7591bb651f2262160a79087b1ed024b
[ "MIT" ]
1
2021-03-08T08:12:00.000Z
2021-03-08T08:12:00.000Z
app/config.py
pkoscielny/zeroiot
ceb4e13ce7591bb651f2262160a79087b1ed024b
[ "MIT" ]
null
null
null
app/config.py
pkoscielny/zeroiot
ceb4e13ce7591bb651f2262160a79087b1ed024b
[ "MIT" ]
null
null
null
from configparser import ConfigParser config_ini = ConfigParser() config_ini.read('configs/config.ini') sqlite_db = config_ini['DATABASE']['SQLITE_DB'] config = dict( dev=DevelopmentConfig, test=TestingConfig, prod=ProductionConfig, )
19.888889
57
0.730447
from configparser import ConfigParser config_ini = ConfigParser() config_ini.read('configs/config.ini') sqlite_db = config_ini['DATABASE']['SQLITE_DB'] class BaseConfig: DEBUG = True TESTING = False SQLALCHEMY_ECHO = False SQLALCHEMY_TRACK_MODIFICATIONS = False SQLALCHEMY_DATABASE_URI = f'sqlite:...
0
370
92
7717e8fb94bf515a26bc8ac16dce8c5c5320b62b
34,741
py
Python
parsyfiles/filesystem_mapping.py
smarie/python-simple-file-collection-parsing-framework
344b37e1151e8d4e7c2ee49ae09d6568715ae64e
[ "BSD-3-Clause" ]
null
null
null
parsyfiles/filesystem_mapping.py
smarie/python-simple-file-collection-parsing-framework
344b37e1151e8d4e7c2ee49ae09d6568715ae64e
[ "BSD-3-Clause" ]
null
null
null
parsyfiles/filesystem_mapping.py
smarie/python-simple-file-collection-parsing-framework
344b37e1151e8d4e7c2ee49ae09d6568715ae64e
[ "BSD-3-Clause" ]
null
null
null
from abc import abstractmethod, ABCMeta from logging import Logger from os import listdir, sep from os.path import isfile, join, isdir, dirname, basename, exists, splitext from typing import Dict, List, Any, Tuple, Union from parsyfiles.global_config import GLOBAL_CONFIG from parsyfiles.var_checker import check_var E...
46.075597
136
0.62278
from abc import abstractmethod, ABCMeta from logging import Logger from os import listdir, sep from os.path import isfile, join, isdir, dirname, basename, exists, splitext from typing import Dict, List, Any, Tuple, Union from parsyfiles.global_config import GLOBAL_CONFIG from parsyfiles.var_checker import check_var E...
501
0
79
4dfc3a5e49e2e11a4c9ff413585bf9fbf40142ea
4,931
py
Python
DP/value_iteration_gym.py
Scitator/rl-course-experiments
47e7666e2bc618ca4007372f411c3626fd7efc2b
[ "MIT" ]
85
2017-03-13T12:27:38.000Z
2021-08-03T23:00:48.000Z
DP/value_iteration_gym.py
Scitator/rl-course-experiments
47e7666e2bc618ca4007372f411c3626fd7efc2b
[ "MIT" ]
1
2019-04-13T15:24:06.000Z
2019-04-13T15:24:06.000Z
DP/value_iteration_gym.py
Scitator/rl-course-experiments
47e7666e2bc618ca4007372f411c3626fd7efc2b
[ "MIT" ]
25
2017-04-15T01:40:33.000Z
2021-11-23T02:54:10.000Z
#!/usr/bin/python import gym from gym import wrappers import argparse import numpy as np def value_iteration(env, theta=0.0001, discount_factor=1.0): """ Value Iteration Algorithm. Args: env: OpenAI environment. env.P represents the transition probabilities of the environment. ...
31.407643
89
0.582032
#!/usr/bin/python import gym from gym import wrappers import argparse import numpy as np def value_iteration(env, theta=0.0001, discount_factor=1.0): """ Value Iteration Algorithm. Args: env: OpenAI environment. env.P represents the transition probabilities of the environment. ...
2,449
0
115
3e9667ac9543c7ab146b0b9bb37e11f47c89b9a5
28,724
py
Python
python/jdwp-shellifier.py
FinchX/loli_profiler
9391bb82fd0a26c5855770974ae886f42daf4266
[ "BSD-2-Clause" ]
388
2021-03-11T04:20:19.000Z
2022-03-29T05:55:07.000Z
python/jdwp-shellifier.py
habbyge/loli_profiler
fc5700acd5ee034698da2fff1189e58873721711
[ "BSD-2-Clause" ]
23
2021-03-24T06:38:29.000Z
2022-03-30T06:17:17.000Z
python/jdwp-shellifier.py
habbyge/loli_profiler
fc5700acd5ee034698da2fff1189e58873721711
[ "BSD-2-Clause" ]
44
2021-03-11T06:27:02.000Z
2022-03-28T03:58:09.000Z
#!/usr/bin/python ################################################################################ # # Universal JDWP shellifier # # @_hugsy_ # # And special cheers to @lanjelot # # loadlib option by @ikoz # import argparse import json import logging import logging.config import os import socket import struct import s...
37.547712
145
0.600195
#!/usr/bin/python ################################################################################ # # Universal JDWP shellifier # # @_hugsy_ # # And special cheers to @lanjelot # # loadlib option by @ikoz # import argparse import json import logging import logging.config import os import socket import struct import s...
24,123
1,036
183
6fe5b00315c555a72e90213279c3ca2f91c5acbe
3,107
py
Python
trackintel/model/positionfixes.py
jirikuncar/trackintel
380a9a9c580f8e7e6d4bc669dd257f5d8b4b3022
[ "MIT" ]
null
null
null
trackintel/model/positionfixes.py
jirikuncar/trackintel
380a9a9c580f8e7e6d4bc669dd257f5d8b4b3022
[ "MIT" ]
null
null
null
trackintel/model/positionfixes.py
jirikuncar/trackintel
380a9a9c580f8e7e6d4bc669dd257f5d8b4b3022
[ "MIT" ]
null
null
null
import pandas as pd import trackintel as ti import trackintel.preprocessing.positionfixes import trackintel.visualization.positionfixes import trackintel.io.postgis @pd.api.extensions.register_dataframe_accessor("as_positionfixes") class PositionfixesAccessor(object): """A pandas accessor to treat (Geo)DataFrame...
41.986486
101
0.684905
import pandas as pd import trackintel as ti import trackintel.preprocessing.positionfixes import trackintel.visualization.positionfixes import trackintel.io.postgis @pd.api.extensions.register_dataframe_accessor("as_positionfixes") class PositionfixesAccessor(object): """A pandas accessor to treat (Geo)DataFrame...
585
0
53
28cfc6c075ac52b40280edb376ba3220d989fe63
2,749
py
Python
codespark/settings.py
JorgeTerence/codespark
42ed2afe8dfab85bef774f0e421b89269223717c
[ "MIT" ]
null
null
null
codespark/settings.py
JorgeTerence/codespark
42ed2afe8dfab85bef774f0e421b89269223717c
[ "MIT" ]
null
null
null
codespark/settings.py
JorgeTerence/codespark
42ed2afe8dfab85bef774f0e421b89269223717c
[ "MIT" ]
null
null
null
import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent # See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ SECRET_KEY = os.environ.get("CODESPARK_SECRET_KEY") DEBUG = True ALLOWED_HOSTS = [] INSTALLED_APPS = [ "django.contrib.admin", "django.contrib.auth",...
24.544643
91
0.674427
import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent # See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ SECRET_KEY = os.environ.get("CODESPARK_SECRET_KEY") DEBUG = True ALLOWED_HOSTS = [] INSTALLED_APPS = [ "django.contrib.admin", "django.contrib.auth",...
0
0
0
fef65b1c92dc48f0298183b8bc13a4bbd7ddce3f
6,303
py
Python
Utils/ObservationSetManager.py
DavidLSmyth/DroneCoordinatedSearch
99173ef63c726049596fb79eda168b4fc3a550a8
[ "MIT" ]
1
2018-12-26T04:13:06.000Z
2018-12-26T04:13:06.000Z
Utils/ObservationSetManager.py
DavidLSmyth/DroneCoordinatedSearch
99173ef63c726049596fb79eda168b4fc3a550a8
[ "MIT" ]
null
null
null
Utils/ObservationSetManager.py
DavidLSmyth/DroneCoordinatedSearch
99173ef63c726049596fb79eda168b4fc3a550a8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Nov 13 11:45:44 2018 @author: 13383861 """ import sys sys.path.append('..') sys.path.append('.') import typing import functools from Utils.AgentObservation import AgentObservation from Utils.UE4Coord import UE4Coord from Utils.UE4Grid import UE4Grid from Utils.BeliefMap impo...
46.345588
167
0.713787
# -*- coding: utf-8 -*- """ Created on Tue Nov 13 11:45:44 2018 @author: 13383861 """ import sys sys.path.append('..') sys.path.append('.') import typing import functools from Utils.AgentObservation import AgentObservation from Utils.UE4Coord import UE4Coord from Utils.UE4Grid import UE4Grid from Utils.BeliefMap impo...
1,235
0
124
3f258c641e551cd92fd15f628b856e86719f1fc8
9,074
py
Python
card_classes.py
Lavialee/Maturitni-prace
313da8f77b1204001984db48af70016e91f76c85
[ "MIT" ]
null
null
null
card_classes.py
Lavialee/Maturitni-prace
313da8f77b1204001984db48af70016e91f76c85
[ "MIT" ]
null
null
null
card_classes.py
Lavialee/Maturitni-prace
313da8f77b1204001984db48af70016e91f76c85
[ "MIT" ]
null
null
null
# CARD CLASSES # # AIR # class EagleCard: """Eagle (air, instant) - gain one point instantly, plus two points for each totem block under it""" class CraneCard: """Crane (air, EoG) - gain one point, and additional two points for every crane in a diagonal from it""" class OwlCard: """Owl (air, instant) - ...
24.197333
112
0.57527
# CARD CLASSES # # AIR # class EagleCard: """Eagle (air, instant) - gain one point instantly, plus two points for each totem block under it""" def __init__(self): self.element = 'Air' self.type = 'instant' def __repr__(self): return "Eagle" def get_instant_points(self, p_totem...
4,784
0
1,809
3c50ed0a29ce60eea0f5d3f02023b82216f5b9bb
1,099
py
Python
manager/urls.py
biansetuliao/ArtWorkManager
a1d2cdacd1512c17ca10e0808368c0a2970deef1
[ "MIT" ]
1
2016-03-17T13:39:21.000Z
2016-03-17T13:39:21.000Z
manager/urls.py
biansetuliao/ArtWorkManager
a1d2cdacd1512c17ca10e0808368c0a2970deef1
[ "MIT" ]
null
null
null
manager/urls.py
biansetuliao/ArtWorkManager
a1d2cdacd1512c17ca10e0808368c0a2970deef1
[ "MIT" ]
null
null
null
from django.conf.urls import patterns, include, url from manager import views urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='administrator'), url(r'^tag', views.TagView.as_view(), name='tag'), url(r'^updatetag/(?P<tag_id>\d+)', views.TagUpdateView.as_view(), name='updatetag'), url(r'^u...
27.475
111
0.649682
from django.conf.urls import patterns, include, url from manager import views urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='administrator'), url(r'^tag', views.TagView.as_view(), name='tag'), url(r'^updatetag/(?P<tag_id>\d+)', views.TagUpdateView.as_view(), name='updatetag'), url(r'^u...
0
0
0
6addf85656fdc9e2bb326f03587d118152098ab1
16,818
py
Python
rowboat/plugins/sql.py
SethBots/speedboat
e516261e9d34031045c70522955e8babe3d8ec6e
[ "MIT" ]
12
2017-10-18T02:23:02.000Z
2020-09-29T16:04:52.000Z
rowboat/plugins/sql.py
SethBots/speedboat
e516261e9d34031045c70522955e8babe3d8ec6e
[ "MIT" ]
12
2019-12-25T02:12:11.000Z
2020-08-02T22:16:42.000Z
rowboat/plugins/sql.py
SethBots/speedboat
e516261e9d34031045c70522955e8babe3d8ec6e
[ "MIT" ]
9
2018-09-12T20:50:44.000Z
2020-06-20T15:58:52.000Z
import time from datetime import datetime import cairosvg import gevent import markovify import psycopg2 import pygal from disco.types.channel import Channel as DiscoChannel, MessageIterator, ChannelType from disco.types.guild import Guild as DiscoGuild from disco.types.message import MessageTable from disco.types.per...
36.881579
145
0.599774
import time from datetime import datetime import cairosvg import gevent import markovify import psycopg2 import pygal from disco.types.channel import Channel as DiscoChannel, MessageIterator, ChannelType from disco.types.guild import Guild as DiscoGuild from disco.types.message import MessageTable from disco.types.per...
12,699
2,944
175
93ea79b1131bd2d36c106f2ea6807cd622e8c34e
2,442
py
Python
mymoney/analytics/serializers.py
ychab/mymoney-server
40dc9fdd08b3561287a9153342b25c58de8ad8ce
[ "BSD-3-Clause" ]
6
2015-12-11T13:36:27.000Z
2018-10-17T03:08:15.000Z
mymoney/analytics/serializers.py
ychab/mymoney-server
40dc9fdd08b3561287a9153342b25c58de8ad8ce
[ "BSD-3-Clause" ]
2
2016-06-12T12:42:47.000Z
2017-12-12T14:05:14.000Z
mymoney/analytics/serializers.py
ychab/mymoney-server
40dc9fdd08b3561287a9153342b25c58de8ad8ce
[ "BSD-3-Clause" ]
1
2022-02-21T21:20:51.000Z
2022-02-21T21:20:51.000Z
from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from mymoney.core.validators import MinMaxValidator from mymoney.tags.models import Tag from mymoney.tags.serializers import TagSerializer
28.068966
73
0.666257
from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from mymoney.core.validators import MinMaxValidator from mymoney.tags.models import Tag from mymoney.tags.serializers import TagSerializer class BaseRatioSerializer(serializers.Serializer): SINGLE_CREDIT = 'single_cr...
274
1,785
142
6f4c9224c412c90fadde9ff2b492d9b59f8dddfa
1,808
py
Python
bot.py
phantom0174/SQCS-Working-Bot
ae4b02e6b3fe403ae28a63f9cad8a35b04e89d45
[ "MIT" ]
2
2021-04-11T15:55:56.000Z
2021-04-17T01:41:47.000Z
bot.py
phantom0174/SQCS-Working-Bot
ae4b02e6b3fe403ae28a63f9cad8a35b04e89d45
[ "MIT" ]
null
null
null
bot.py
phantom0174/SQCS-Working-Bot
ae4b02e6b3fe403ae28a63f9cad8a35b04e89d45
[ "MIT" ]
1
2021-04-13T17:49:46.000Z
2021-04-13T17:49:46.000Z
import os import sys import discord from discord.ext import commands import keep_alive intents = discord.Intents.all() bot = commands.Bot(command_prefix='?', intents=intents) @bot.event @bot.command() @commands.has_any_role('總召') @bot.command() @commands.has_any_role('總召') @bot.command() @commands.has_any_rol...
24.432432
81
0.642699
import os import sys import discord from discord.ext import commands import keep_alive intents = discord.Intents.all() bot = commands.Bot(command_prefix='?', intents=intents) @bot.event async def on_ready(): print("~~~~| Bot is online |~~~~") @bot.command() @commands.has_any_role('總召') async def load(ctx, msg...
1,074
0
132
e4a25cd0514f94c090e9e27d5be06fb2a338b541
325
py
Python
test_scripts/dir_test/dir_test_2/dir_tests.py
iyaozhen/nose-dep
065fdc8cb72a8bba3ac32d31955e883802aa2241
[ "MIT" ]
2
2015-11-15T11:31:50.000Z
2017-03-16T09:13:38.000Z
test_scripts/dir_test/dir_test_2/dir_tests.py
iyaozhen/nose-dep
065fdc8cb72a8bba3ac32d31955e883802aa2241
[ "MIT" ]
14
2015-10-18T13:00:05.000Z
2021-04-14T05:00:09.000Z
test_scripts/dir_test/dir_test_2/dir_tests.py
iyaozhen/nose-dep
065fdc8cb72a8bba3ac32d31955e883802aa2241
[ "MIT" ]
4
2016-12-12T16:26:19.000Z
2020-11-14T09:35:40.000Z
import unittest from nosedep import depends
16.25
41
0.624615
import unittest from nosedep import depends class DisplayNodeList(unittest.TestCase): @depends(after='test_02') def test_01(self): pass @depends(after='test_03') def test_02(self): pass @depends(after='test_04') def test_03(self): pass def test_04(self): ...
40
217
23
44346111593c06aa6c50b71eecaf38de38afa60c
676
py
Python
python/hackerrank/test_magic_square_forming.py
topliceanu/learn
6f4bb19fffb7b2baa88f047409075d5765ee6308
[ "MIT" ]
24
2016-03-21T07:53:54.000Z
2020-06-29T12:16:36.000Z
python/hackerrank/test_magic_square_forming.py
topliceanu/learn
6f4bb19fffb7b2baa88f047409075d5765ee6308
[ "MIT" ]
5
2015-09-29T17:12:36.000Z
2020-03-26T20:51:56.000Z
python/hackerrank/test_magic_square_forming.py
topliceanu/learn
6f4bb19fffb7b2baa88f047409075d5765ee6308
[ "MIT" ]
12
2016-05-24T16:48:32.000Z
2020-10-02T12:22:09.000Z
import unittest from magic_square_forming import formingMagicSquare
27.04
100
0.434911
import unittest from magic_square_forming import formingMagicSquare class TestMagicSquareForming(unittest.TestCase): def test_magic_square_forming(self): tests = [ ([[5, 3, 4], [1, 5, 8], [6, 4, 2]], 7), ([[4, 8, 2], [4, 5, 7],...
531
27
49
9a10e99f4fc053003d679fdc131948c57b9aeda9
318
py
Python
lib/config.py
vt77/elevator
3f692c50b0ee45c28dbd9045f6f1892aca06fd23
[ "MIT" ]
null
null
null
lib/config.py
vt77/elevator
3f692c50b0ee45c28dbd9045f6f1892aca06fd23
[ "MIT" ]
null
null
null
lib/config.py
vt77/elevator
3f692c50b0ee45c28dbd9045f6f1892aca06fd23
[ "MIT" ]
null
null
null
elevator1 = { "num_persons":5, "cargo_weight":0, "floors":[0,10,11,12,13,14,17,16] } elevator2 = { "num_persons":10, "cargo_weight":150, "floors":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,16] } elevator3 = { "num_persons":0, "cargo_weight":550, "floors":[0,2,4,6,8,10,12,14,16] }
15.142857
55
0.556604
elevator1 = { "num_persons":5, "cargo_weight":0, "floors":[0,10,11,12,13,14,17,16] } elevator2 = { "num_persons":10, "cargo_weight":150, "floors":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,16] } elevator3 = { "num_persons":0, "cargo_weight":550, "floors":[0,2,4,6,8,10,12,14,16] }
0
0
0
4dcaed216d384e450833ac74fabe5bd88c7dc5c6
8,017
py
Python
pyNastran/f06/test/test_f06_utils.py
fmamitrotta/pyNastran
6f9592cf3a2ccb8c509918acb735282d6eef75aa
[ "BSD-3-Clause" ]
293
2015-03-22T20:22:01.000Z
2022-03-14T20:28:24.000Z
pyNastran/f06/test/test_f06_utils.py
fmamitrotta/pyNastran
6f9592cf3a2ccb8c509918acb735282d6eef75aa
[ "BSD-3-Clause" ]
512
2015-03-14T18:39:27.000Z
2022-03-31T16:15:43.000Z
pyNastran/f06/test/test_f06_utils.py
fmamitrotta/pyNastran
6f9592cf3a2ccb8c509918acb735282d6eef75aa
[ "BSD-3-Clause" ]
136
2015-03-19T03:26:06.000Z
2022-03-25T22:14:54.000Z
""" tests: - plot sol_145 """ import os import unittest from cpylog import get_logger2 try: import matplotlib # pylint: disable=unused-import IS_MATPLOTLIB = True except ImportError: # pragma: no cover IS_MATPLOTLIB = False if IS_MATPLOTLIB: #matplotlib.use('Qt5Agg') import matplotlib.pyplot as ...
38.917476
105
0.576151
""" tests: - plot sol_145 """ import os import unittest from cpylog import get_logger2 try: import matplotlib # pylint: disable=unused-import IS_MATPLOTLIB = True except ImportError: # pragma: no cover IS_MATPLOTLIB = False if IS_MATPLOTLIB: #matplotlib.use('Qt5Agg') import matplotlib.pyplot as ...
509
6,612
23
839db1f3427bc74602825b52e8231bc08cf6befc
13,769
py
Python
src/nna/tests/visutils_test.py
EnisBerk/speech_audio_understanding
2b1ba15a67bb48de7b949a6e5e0205dc5c3e24bd
[ "MIT" ]
null
null
null
src/nna/tests/visutils_test.py
EnisBerk/speech_audio_understanding
2b1ba15a67bb48de7b949a6e5e0205dc5c3e24bd
[ "MIT" ]
null
null
null
src/nna/tests/visutils_test.py
EnisBerk/speech_audio_understanding
2b1ba15a67bb48de7b949a6e5e0205dc5c3e24bd
[ "MIT" ]
null
null
null
"""Tests for visutils.py""" import faulthandler; faulthandler.enable() import csv import datetime import shutil #from matplotlib import cycler import numpy as np import pandas as pd from pandas._testing import assert_frame_equal import pytest import matplotlib.pylab as pl from nna import visutils from nna.tests impor...
32.705463
93
0.607597
"""Tests for visutils.py""" import faulthandler; faulthandler.enable() import csv import datetime import shutil #from matplotlib import cycler import numpy as np import pandas as pd from pandas._testing import assert_frame_equal import pytest import matplotlib.pylab as pl from nna import visutils from nna.tests impor...
6,420
0
218
431255b4747f6471d4333345cfb4e513203fa312
1,064
py
Python
proj.py
Soumitra-Mandal/Socket.io-practice-
7c4c4097adfd9af2751e2fe517ca12c2ad5fa725
[ "MIT" ]
null
null
null
proj.py
Soumitra-Mandal/Socket.io-practice-
7c4c4097adfd9af2751e2fe517ca12c2ad5fa725
[ "MIT" ]
null
null
null
proj.py
Soumitra-Mandal/Socket.io-practice-
7c4c4097adfd9af2751e2fe517ca12c2ad5fa725
[ "MIT" ]
null
null
null
from aiohttp import web import socketio # creates a new Async Socket IO Server sio = socketio.AsyncServer() # Creates a new Aiohttp Web Application app = web.Application() # Binds our Socket.IO server to our Web App # instance sio.attach(app) # we can define aiohttp endpoints just as we normally # would w...
29.555556
69
0.68891
from aiohttp import web import socketio # creates a new Async Socket IO Server sio = socketio.AsyncServer() # Creates a new Aiohttp Web Application app = web.Application() # Binds our Socket.IO server to our Web App # instance sio.attach(app) # we can define aiohttp endpoints just as we normally # would w...
361
0
46
c0e0f7c512e82f5fdd3a2c9573c0045ecf5797cc
3,671
py
Python
django_datadog/compat.py
mypebble/django-datadog
ca7f9c85553de7398e2ce1c792b2033d9b259931
[ "MIT" ]
null
null
null
django_datadog/compat.py
mypebble/django-datadog
ca7f9c85553de7398e2ce1c792b2033d9b259931
[ "MIT" ]
null
null
null
django_datadog/compat.py
mypebble/django-datadog
ca7f9c85553de7398e2ce1c792b2033d9b259931
[ "MIT" ]
null
null
null
"""Compatibility functions for DataDog integrations. """ from __future__ import absolute_import, print_function, unicode_literals import logging import six from datadog import api, statsd from requests.exceptions import HTTPError from .utils import init_datadog logger = logging.getLogger(__name__) def create_even...
29.368
77
0.602288
"""Compatibility functions for DataDog integrations. """ from __future__ import absolute_import, print_function, unicode_literals import logging import six from datadog import api, statsd from requests.exceptions import HTTPError from .utils import init_datadog logger = logging.getLogger(__name__) def create_even...
0
0
0
ca45dd247d20a8a95de66c5b44901ea91b2b5e17
612
py
Python
PhysicsTools/PythonAnalysis/test/testUncertainties.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
PhysicsTools/PythonAnalysis/test/testUncertainties.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
PhysicsTools/PythonAnalysis/test/testUncertainties.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python #example taken from https://pypi.python.org/pypi/uncertainties/3.0.1 from uncertainties import ufloat x = ufloat(2, 0.25) print x square = x**2 # Transparent calculations print square print square.nominal_value print square.std_dev # Standard deviation print square - x*x from uncertainties.umat...
30.6
71
0.761438
#!/usr/bin/env python #example taken from https://pypi.python.org/pypi/uncertainties/3.0.1 from uncertainties import ufloat x = ufloat(2, 0.25) print x square = x**2 # Transparent calculations print square print square.nominal_value print square.std_dev # Standard deviation print square - x*x from uncertainties.umat...
0
0
0
07620a2e54bf440690e50beef05ad243211450f6
2,222
py
Python
backend/services/entity_extraction/application/ai/training/src/dataset.py
R-aryan/Entity-Extraction-Bert
e08c556a6f8b817f060400b2cd0d9e77610c5358
[ "MIT" ]
null
null
null
backend/services/entity_extraction/application/ai/training/src/dataset.py
R-aryan/Entity-Extraction-Bert
e08c556a6f8b817f060400b2cd0d9e77610c5358
[ "MIT" ]
null
null
null
backend/services/entity_extraction/application/ai/training/src/dataset.py
R-aryan/Entity-Extraction-Bert
e08c556a6f8b817f060400b2cd0d9e77610c5358
[ "MIT" ]
null
null
null
import torch from backend.services.entity_extraction.application.ai.settings import Settings
36.42623
93
0.60081
import torch from backend.services.entity_extraction.application.ai.settings import Settings class BERTEntityDataset: def __init__(self, texts, pos, tags): self.settings = Settings self.texts = texts self.pos = pos self.tags = tags self.tokenizer = self.settings.TOKENIZER ...
2,022
3
103
4a5f60cf0a9db3b3fc8623897e31f145d0f402fa
14,096
py
Python
src/structure_factor/plotting.py
For-a-few-DPPs-more/structure-factor
4251abf5e833463aa3091298727ea2e7fb785bbc
[ "MIT" ]
10
2021-11-27T23:21:32.000Z
2022-03-24T00:12:27.000Z
src/structure_factor/plotting.py
For-a-few-DPPs-more/structure-factor
4251abf5e833463aa3091298727ea2e7fb785bbc
[ "MIT" ]
null
null
null
src/structure_factor/plotting.py
For-a-few-DPPs-more/structure-factor
4251abf5e833463aa3091298727ea2e7fb785bbc
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np from structure_factor.utils import _bin_statistics, _sort_vectors # plot functions def plot_poisson(x, axis, c="k", linestyle=(0, (5, 10)), label="Poisson"): r"""Plot the pair correlation function :math:`g_{poisson}` and the structure factor :math:`S_{poisson}`...
37.892473
490
0.662741
import matplotlib.pyplot as plt import numpy as np from structure_factor.utils import _bin_statistics, _sort_vectors # plot functions def plot_poisson(x, axis, c="k", linestyle=(0, (5, 10)), label="Poisson"): r"""Plot the pair correlation function :math:`g_{poisson}` and the structure factor :math:`S_{poisson}`...
0
0
0
2d08a2a53fcdb3acbdad5df3db9db166219a1864
2,175
py
Python
tests/test_pyswitch/test_suite.py
mfeed/PySwitchLib
54e872bcbe77f2ae840d845dadb7c5b9c12482ed
[ "Apache-2.0" ]
6
2017-10-02T21:02:02.000Z
2018-07-04T13:56:55.000Z
tests/test_pyswitch/test_suite.py
mfeed/PySwitchLib
54e872bcbe77f2ae840d845dadb7c5b9c12482ed
[ "Apache-2.0" ]
23
2017-10-03T18:49:11.000Z
2019-07-20T00:25:44.000Z
tests/test_pyswitch/test_suite.py
mfeed/PySwitchLib
54e872bcbe77f2ae840d845dadb7c5b9c12482ed
[ "Apache-2.0" ]
4
2018-02-27T05:43:37.000Z
2019-06-30T13:30:25.000Z
import unittest if __name__ == '__main__': from test.test_pyswitch.test_interface_OverlayGateway import \ InterfaceOverlayGatewayTestCase from test.test_pyswitch.test_interface_vrf import InterfaceVRFTestCase from test.test_pyswitch.test_interface_pvlan import \ InterfacePrivateVlanTestCase...
38.839286
77
0.758161
import unittest if __name__ == '__main__': from test.test_pyswitch.test_interface_OverlayGateway import \ InterfaceOverlayGatewayTestCase from test.test_pyswitch.test_interface_vrf import InterfaceVRFTestCase from test.test_pyswitch.test_interface_pvlan import \ InterfacePrivateVlanTestCase...
0
0
0
0461faf647720927ee37801dd0075f764fe31ea1
3,912
py
Python
compare/src/sim-roc.py
jsemple19/bwa-meth
ac2f267105132f4548344f3477c4162ac07b426d
[ "MIT" ]
83
2015-01-27T20:21:13.000Z
2022-03-28T05:05:32.000Z
compare/src/sim-roc.py
jsemple19/bwa-meth
ac2f267105132f4548344f3477c4162ac07b426d
[ "MIT" ]
63
2015-01-03T22:25:39.000Z
2022-02-24T17:54:33.000Z
compare/src/sim-roc.py
jsemple19/bwa-meth
ac2f267105132f4548344f3477c4162ac07b426d
[ "MIT" ]
63
2015-02-28T21:54:34.000Z
2022-02-23T06:23:49.000Z
import os.path as op import re import sys from toolshed import reader, nopen from collections import defaultdict import numpy as np from itertools import cycle import pylab as pl import seaborn colors = cycle(seaborn.color_palette('Set1', 8)) BASES = False FLAGS="-F%i" % (0x4 | 0x100 | 0x200) if __name__ == "__mai...
28.977778
96
0.550613
import os.path as op import re import sys from toolshed import reader, nopen from collections import defaultdict import numpy as np from itertools import cycle import pylab as pl import seaborn colors = cycle(seaborn.color_palette('Set1', 8)) BASES = False def name(bam): return op.basename(bam).rsplit(".", 1)[0...
3,282
0
91
145b1f9e09c4970224ba8b77ae4f53ab7f1ae6f6
128
py
Python
Arya/plugins/cmd.py
yezimai/oldboyProject
889eebc2e6158b07ac0964b25eb01df743ad0117
[ "Apache-2.0" ]
null
null
null
Arya/plugins/cmd.py
yezimai/oldboyProject
889eebc2e6158b07ac0964b25eb01df743ad0117
[ "Apache-2.0" ]
null
null
null
Arya/plugins/cmd.py
yezimai/oldboyProject
889eebc2e6158b07ac0964b25eb01df743ad0117
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- from Arya.backends.base_module import BaseSaltModule
32
52
0.742188
# -*- coding:utf-8 -*- from Arya.backends.base_module import BaseSaltModule class CMD(BaseSaltModule): print 'in CMD module'
0
31
22
751e9117447378d4093d9c409f256628f126b434
1,963
py
Python
amethyst/frontend/ifetch.py
medav/amethyst
c75314249454f41c9ea61a1a46b1b59ba81b37d3
[ "MIT" ]
null
null
null
amethyst/frontend/ifetch.py
medav/amethyst
c75314249454f41c9ea61a1a46b1b59ba81b37d3
[ "MIT" ]
null
null
null
amethyst/frontend/ifetch.py
medav/amethyst
c75314249454f41c9ea61a1a46b1b59ba81b37d3
[ "MIT" ]
1
2021-05-01T06:23:51.000Z
2021-05-01T06:23:51.000Z
from atlas import * from ..support import * from .bpred import BranchPredictor from .btb import BranchTargetBuffer from .ras import ReturnAddressStack @Module def IFetchStage(): """IFetch Stage TODO: Documentation """ io = Io({ 'pc': Input(Bits(C['core-width'])), 'mispred': Input(mis...
25.828947
80
0.641875
from atlas import * from ..support import * from .bpred import BranchPredictor from .btb import BranchTargetBuffer from .ras import ReturnAddressStack @Module def IFetchStage(): """IFetch Stage TODO: Documentation """ io = Io({ 'pc': Input(Bits(C['core-width'])), 'mispred': Input(mis...
0
0
0
5ac476dad6b58702b7e89444c6fd161d73c8e680
2,762
py
Python
tests/move_test.py
earlbread/nekoyume
0dec2d6f1002091f3f727bd645ce67fadd85faeb
[ "MIT" ]
70
2018-05-21T01:58:00.000Z
2021-12-09T09:49:27.000Z
tests/move_test.py
earlbread/nekoyume
0dec2d6f1002091f3f727bd645ce67fadd85faeb
[ "MIT" ]
135
2018-05-20T12:52:44.000Z
2021-12-30T08:30:15.000Z
tests/move_test.py
earlbread/nekoyume
0dec2d6f1002091f3f727bd645ce67fadd85faeb
[ "MIT" ]
38
2018-05-21T14:55:58.000Z
2022-03-20T20:55:40.000Z
import typing from coincurve import PrivateKey from pytest import fixture, raises from nekoyume.block import Block from nekoyume.exc import InvalidMoveError from nekoyume.move import ( CreateNovice, HackAndSlash, LevelUp, Move, Say, Sleep, ) from nekoyume.user import User @fixture
24.017391
66
0.66365
import typing from coincurve import PrivateKey from pytest import fixture, raises from nekoyume.block import Block from nekoyume.exc import InvalidMoveError from nekoyume.move import ( CreateNovice, HackAndSlash, LevelUp, Move, Say, Sleep, ) from nekoyume.user import User @fixture def fx_use...
2,286
0
160
86aead67e2491b2481a8341c03822c8998f9dd04
2,905
py
Python
gpuinfo/GPUInfo.py
FlyHighest/gpuinfo
6626095b259fed71e8f20e3d42f41a2507f3cd36
[ "MIT" ]
10
2019-01-18T22:20:32.000Z
2022-02-15T06:42:03.000Z
gpuinfo/GPUInfo.py
FlyHighest/gpuinfo
6626095b259fed71e8f20e3d42f41a2507f3cd36
[ "MIT" ]
3
2019-05-24T16:06:30.000Z
2020-10-09T02:42:49.000Z
gpuinfo/GPUInfo.py
FlyHighest/gpuinfo
6626095b259fed71e8f20e3d42f41a2507f3cd36
[ "MIT" ]
5
2019-07-25T08:46:57.000Z
2022-02-15T06:42:03.000Z
import os import re __all__=['get_user','gpu_usage','check_empty','get_info'] def get_user(pid): ''' get_user(pid) Input a pid number , return its creator by linux command ps ''' ps=os.popen('ps -eo pid,user|grep '+str(pid)) lines=ps.readlines() for line in lines: return re.split('[ ...
29.948454
180
0.575904
import os import re __all__=['get_user','gpu_usage','check_empty','get_info'] def get_user(pid): ''' get_user(pid) Input a pid number , return its creator by linux command ps ''' ps=os.popen('ps -eo pid,user|grep '+str(pid)) lines=ps.readlines() for line in lines: return re.split('[ ...
0
0
0
306993ae4020d19cf2df37f14a6ad5d48c149334
1,610
py
Python
setup.py
jackqt/py-qrcode-generator
45f9f8798fe3f1387761c3dafd3b871fcac47de9
[ "MIT" ]
null
null
null
setup.py
jackqt/py-qrcode-generator
45f9f8798fe3f1387761c3dafd3b871fcac47de9
[ "MIT" ]
null
null
null
setup.py
jackqt/py-qrcode-generator
45f9f8798fe3f1387761c3dafd3b871fcac47de9
[ "MIT" ]
null
null
null
""" ````````````````` Run it: .. code:: bash $ pip install qrcode-converter $ python app/run.py [inner_img_path] [content] [width] [height] Links ````` * `website <https://github.com/jackqt/py-qrcode-generator/>`_ * `documentation <https://github.com/jackqt/py-qrcode-generator/>`_ """ import re import ast f...
27.288136
70
0.611801
""" ````````````````` Run it: .. code:: bash $ pip install qrcode-converter $ python app/run.py [inner_img_path] [content] [width] [height] Links ````` * `website <https://github.com/jackqt/py-qrcode-generator/>`_ * `documentation <https://github.com/jackqt/py-qrcode-generator/>`_ """ import re import ast f...
0
0
0
da3152ac4b9d3b85d085d2708beb9be8077d14d5
528
py
Python
algorithms/palindrome_number_test.py
kainonly/leetcode
83a84ad48d517eb7f1377cb2a3aa3fe763da6627
[ "MIT" ]
null
null
null
algorithms/palindrome_number_test.py
kainonly/leetcode
83a84ad48d517eb7f1377cb2a3aa3fe763da6627
[ "MIT" ]
null
null
null
algorithms/palindrome_number_test.py
kainonly/leetcode
83a84ad48d517eb7f1377cb2a3aa3fe763da6627
[ "MIT" ]
null
null
null
import unittest from .palindrome_number import Solution
25.142857
60
0.691288
import unittest from .palindrome_number import Solution class Test(unittest.TestCase): @classmethod def setUpClass(cls) -> None: cls.sol = Solution() def test_example1(self): self.assertEqual(self.sol.isPalindrome(121), True) def test_example2(self): self.assertEqual(self.sol...
288
160
23
a578284ce8574dc8070d857f6a6c11fe4060c70e
132
py
Python
_/0349_03_Code/7.py
paullewallencom/javascript-978-1-8495-1034-9
7e539d042c644931a9ef2418f66d260a1c6892eb
[ "Apache-2.0" ]
null
null
null
_/0349_03_Code/7.py
paullewallencom/javascript-978-1-8495-1034-9
7e539d042c644931a9ef2418f66d260a1c6892eb
[ "Apache-2.0" ]
null
null
null
_/0349_03_Code/7.py
paullewallencom/javascript-978-1-8495-1034-9
7e539d042c644931a9ef2418f66d260a1c6892eb
[ "Apache-2.0" ]
null
null
null
from django.db import models
22
43
0.659091
from django.db import models class PhoneNumber(models.TextField): def clean(self): return re.sub(r'\W', '', str(self))
39
15
49
9236cffd93466ddd47d27068c82af927208be77b
1,565
py
Python
Exercicios/ex045.py
MateusBarboza99/Python-03-
9c6df88aaa8ba83d385b92722ed1df5873df3a77
[ "MIT" ]
null
null
null
Exercicios/ex045.py
MateusBarboza99/Python-03-
9c6df88aaa8ba83d385b92722ed1df5873df3a77
[ "MIT" ]
null
null
null
Exercicios/ex045.py
MateusBarboza99/Python-03-
9c6df88aaa8ba83d385b92722ed1df5873df3a77
[ "MIT" ]
null
null
null
from random import randint from time import sleep itens = ('Pedra', 'Papel','Tesoura') computador = randint(0, 2) print('''\033[1;31mSuas opções\033[m: [ 0 ] PEDRA [ 1 ] PAPEL [ 2 ] TESOURA''') jogador = int(input('\033[1;34mQual é a sua Jogada?\033[m ')) print('\033[1;30mJO\033[m') sleep(1) print('\033[1;34mKEN\033[m'...
30.096154
91
0.61278
from random import randint from time import sleep itens = ('Pedra', 'Papel','Tesoura') computador = randint(0, 2) print('''\033[1;31mSuas opções\033[m: [ 0 ] PEDRA [ 1 ] PAPEL [ 2 ] TESOURA''') jogador = int(input('\033[1;34mQual é a sua Jogada?\033[m ')) print('\033[1;30mJO\033[m') sleep(1) print('\033[1;34mKEN\033[m'...
0
0
0
54372a8d0a457508c0c41bfa220e2f49f433e704
8,774
py
Python
str_validator.py
tfwillems/STRValidator
c98ae03f30b38f1b786bf950bcbdc7722408a227
[ "Apache-2.0" ]
null
null
null
str_validator.py
tfwillems/STRValidator
c98ae03f30b38f1b786bf950bcbdc7722408a227
[ "Apache-2.0" ]
null
null
null
str_validator.py
tfwillems/STRValidator
c98ae03f30b38f1b786bf950bcbdc7722408a227
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2.7 from flask import Flask, url_for, make_response, render_template, request from flask import json, jsonify, current_app, Blueprint from flask.ext.sqlalchemy import SQLAlchemy from sqlalchemy.sql import func from json import dumps from sqlalchemy.orm import class_mapper from sqlalchemy import o...
40.62037
158
0.645658
#!/usr/bin/env python2.7 from flask import Flask, url_for, make_response, render_template, request from flask import json, jsonify, current_app, Blueprint from flask.ext.sqlalchemy import SQLAlchemy from sqlalchemy.sql import func from json import dumps from sqlalchemy.orm import class_mapper from sqlalchemy import o...
5,651
1,042
313
a2a721acc6fb7840dc13d5792d49d0ae937b8faa
246
py
Python
Uche Clare/Phase 1/Python Basic 1/Day-6/Task 41.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
6
2020-05-23T19:53:25.000Z
2021-05-08T20:21:30.000Z
Uche Clare/Phase 1/Python Basic 1/Day-6/Task 41.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
8
2020-05-14T18:53:12.000Z
2020-07-03T00:06:20.000Z
Uche Clare/Phase 1/Python Basic 1/Day-6/Task 41.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
39
2020-05-10T20:55:02.000Z
2020-09-12T17:40:59.000Z
#program to check whether a file exists. import os.path print(main('C:/Users/pc/Desktop/Python Task Solutions/Uche Clare/Phase 1/Python Basic 1/Day-5/Task 31', 'py' ))
35.142857
111
0.703252
#program to check whether a file exists. import os.path def main(filename, ext): return os.path.isfile(filename + '.' + ext) print(main('C:/Users/pc/Desktop/Python Task Solutions/Uche Clare/Phase 1/Python Basic 1/Day-5/Task 31', 'py' ))
51
0
23
cd9a83d85a281b00cc6fd19c9bc043214f6415e2
1,372
py
Python
Python/mathematics/sieve.py
RCubedClub/cp_algo
ec254055ef745224b0a1c766ef16709a3eea7087
[ "MIT" ]
null
null
null
Python/mathematics/sieve.py
RCubedClub/cp_algo
ec254055ef745224b0a1c766ef16709a3eea7087
[ "MIT" ]
null
null
null
Python/mathematics/sieve.py
RCubedClub/cp_algo
ec254055ef745224b0a1c766ef16709a3eea7087
[ "MIT" ]
null
null
null
def series(n, bool=False): """ :param bool: If bool=True, then the function will return the boolean list of the prime numbers. If bool=False, then the function will return the list of prime number less than n+1. :param n: Prime Number less than n. :return: returns None if n is 0 or 1 o...
26.384615
100
0.543003
def series(n, bool=False): """ :param bool: If bool=True, then the function will return the boolean list of the prime numbers. If bool=False, then the function will return the list of prime number less than n+1. :param n: Prime Number less than n. :return: returns None if n is 0 or 1 o...
329
0
23
25ec93f6700e6c89348db7fa489493b203e8f908
979
py
Python
codewars/6 kyu/build-tower.py
sirken/coding-practice
9c5e23b2c24f525a89a5e1d15ce3aec3ad1a01ab
[ "MIT" ]
null
null
null
codewars/6 kyu/build-tower.py
sirken/coding-practice
9c5e23b2c24f525a89a5e1d15ce3aec3ad1a01ab
[ "MIT" ]
null
null
null
codewars/6 kyu/build-tower.py
sirken/coding-practice
9c5e23b2c24f525a89a5e1d15ce3aec3ad1a01ab
[ "MIT" ]
null
null
null
from Test import Test, Test as test ''' Build Tower Build Tower by the following given argument: number of floors (integer and always greater than 0). Tower block is represented as * for example, a tower of 3 floors looks like below [ ' * ', ' *** ', '*****' ] and a tower of 6 floors looks like below [ '...
19.58
79
0.537283
from Test import Test, Test as test ''' Build Tower Build Tower by the following given argument: number of floors (integer and always greater than 0). Tower block is represented as * for example, a tower of 3 floors looks like below [ ' * ', ' *** ', '*****' ] and a tower of 6 floors looks like below [ '...
273
0
44
b902c4cac39316ebeb4a40069298b4672e4ced48
2,737
py
Python
src/lines_main.py
Muhammad-Dah/SimpleHTR
571967c8985160ff869d950b0ed3154fe6d0d426
[ "MIT" ]
null
null
null
src/lines_main.py
Muhammad-Dah/SimpleHTR
571967c8985160ff869d950b0ed3154fe6d0d426
[ "MIT" ]
null
null
null
src/lines_main.py
Muhammad-Dah/SimpleHTR
571967c8985160ff869d950b0ed3154fe6d0d426
[ "MIT" ]
null
null
null
import logging import os import editdistance import matplotlib.pyplot as plt from DataLoaderIAM import Batch from Model import Model from SamplePreprocessor import word_image_preprocess, image_preprocess from spelling_correction import SpellingCorrector from translator import Translator, google_translate os.environ[...
32.975904
101
0.664596
import logging import os import editdistance import matplotlib.pyplot as plt from DataLoaderIAM import Batch from Model import Model from SamplePreprocessor import word_image_preprocess, image_preprocess from spelling_correction import SpellingCorrector from translator import Translator, google_translate os.environ[...
0
0
0
3b2e47f36e3aef0119d3f0ecad07342aaa3a8c42
894
py
Python
school_hostel/__manifest__.py
kyaranusa/School-Management-Systems
d6cd71037fe46c08feff32f42af61f56eb25a7c7
[ "MIT" ]
null
null
null
school_hostel/__manifest__.py
kyaranusa/School-Management-Systems
d6cd71037fe46c08feff32f42af61f56eb25a7c7
[ "MIT" ]
null
null
null
school_hostel/__manifest__.py
kyaranusa/School-Management-Systems
d6cd71037fe46c08feff32f42af61f56eb25a7c7
[ "MIT" ]
1
2020-11-17T03:25:10.000Z
2020-11-17T03:25:10.000Z
# See LICENSE file for full copyright and licensing details. { 'name': 'HOSTEL', 'version': "12.0.1.0.0", 'author': 'Serpent Consulting Services Pvt. Ltd.', 'category': 'School Management', 'website': 'http://www.serpentcs.com', 'license': "AGPL-3", 'complexity': 'easy', 'summary': 'Mod...
34.384615
60
0.60179
# See LICENSE file for full copyright and licensing details. { 'name': 'HOSTEL', 'version': "12.0.1.0.0", 'author': 'Serpent Consulting Services Pvt. Ltd.', 'category': 'School Management', 'website': 'http://www.serpentcs.com', 'license': "AGPL-3", 'complexity': 'easy', 'summary': 'Mod...
0
0
0
92ece0b257961ce2bea58b032b8b4c9ad1d6f3e1
13,408
py
Python
library/pyjamas/ui/Tree.py
allbuttonspressed/pyjs
c726fdead530eb63ee4763ae15daaa58d84cd58f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
library/pyjamas/ui/Tree.py
allbuttonspressed/pyjs
c726fdead530eb63ee4763ae15daaa58d84cd58f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
library/pyjamas/ui/Tree.py
allbuttonspressed/pyjs
c726fdead530eb63ee4763ae15daaa58d84cd58f
[ "ECL-2.0", "Apache-2.0" ]
1
2019-11-18T14:17:59.000Z
2019-11-18T14:17:59.000Z
# Copyright 2006 James Tauber and contributors # Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> # Copyright (C) 2012 Robert Peters <robertpeters@winterlionsoftware.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
34.467866
80
0.617989
# Copyright 2006 James Tauber and contributors # Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> # Copyright (C) 2012 Robert Peters <robertpeters@winterlionsoftware.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
11,001
-2
1,237
cf9246b017f58f75cca1cccf097599b7a92caa23
835
py
Python
src/remediations/aws_rds_enable_auto_minor_version_upgrade.py
0xdabbad00/aws-remediations
82be16a8a39736fba917f632599eb37b05350172
[ "MIT" ]
3
2019-11-19T10:01:34.000Z
2022-03-23T20:41:45.000Z
src/remediations/aws_rds_enable_auto_minor_version_upgrade.py
0xdabbad00/aws-remediations
82be16a8a39736fba917f632599eb37b05350172
[ "MIT" ]
null
null
null
src/remediations/aws_rds_enable_auto_minor_version_upgrade.py
0xdabbad00/aws-remediations
82be16a8a39736fba917f632599eb37b05350172
[ "MIT" ]
null
null
null
from typing import Any, Dict from boto3 import Session from app import Remediation from app.remediation_base import RemediationBase @Remediation class AwsRdsEnableAutoMinorVersionUpgrade(RemediationBase): """Remediation that enables Auto Minor Version upgrade for RDS instances""" @classmethod @classme...
29.821429
98
0.698204
from typing import Any, Dict from boto3 import Session from app import Remediation from app.remediation_base import RemediationBase @Remediation class AwsRdsEnableAutoMinorVersionUpgrade(RemediationBase): """Remediation that enables Auto Minor Version upgrade for RDS instances""" @classmethod def _id(c...
414
0
78
cc1950fc7ebe7ab49e999184aa88bf4109696d17
481
py
Python
python/starcoder42/constants.py
StarkillerX42/starcoder42
86fbd1a4ea90c75b5d2429ac5d1caf4b0d8dbef2
[ "BSD-3-Clause" ]
null
null
null
python/starcoder42/constants.py
StarkillerX42/starcoder42
86fbd1a4ea90c75b5d2429ac5d1caf4b0d8dbef2
[ "BSD-3-Clause" ]
null
null
null
python/starcoder42/constants.py
StarkillerX42/starcoder42
86fbd1a4ea90c75b5d2429ac5d1caf4b0d8dbef2
[ "BSD-3-Clause" ]
null
null
null
"""Constants. Most are physical, except for alphabet""" import numpy as np G = 6.674e-11 # N*m^2/kg^2 h = 6.6261e-34 # J*s epsilon_0 = 8.854e-12 # F/m mu_0 = 1.257e-6 # H/m c = 2.99792e8 # m/s sigma = 5.6704e-8 # W/m^2/K^4 hbar = 1.05457e-34 # J*s k = 8.98755e9 # Nm^2/C^2 tau = 2 * np.pi kb = 1.380648e-23 alp...
25.315789
80
0.594595
"""Constants. Most are physical, except for alphabet""" import numpy as np G = 6.674e-11 # N*m^2/kg^2 h = 6.6261e-34 # J*s epsilon_0 = 8.854e-12 # F/m mu_0 = 1.257e-6 # H/m c = 2.99792e8 # m/s sigma = 5.6704e-8 # W/m^2/K^4 hbar = 1.05457e-34 # J*s k = 8.98755e9 # Nm^2/C^2 tau = 2 * np.pi kb = 1.380648e-23 alp...
0
0
0
3f9fd8515109bdb9f39bcd12262ce2d06aada9f9
463
py
Python
challenge1/main.py
jpedrorl/Robotics-AI
d85cfac8b3858e6381bc4f683b00a95925a883ed
[ "MIT" ]
null
null
null
challenge1/main.py
jpedrorl/Robotics-AI
d85cfac8b3858e6381bc4f683b00a95925a883ed
[ "MIT" ]
null
null
null
challenge1/main.py
jpedrorl/Robotics-AI
d85cfac8b3858e6381bc4f683b00a95925a883ed
[ "MIT" ]
null
null
null
from robot import robot from robotAI import robotAI from simulator import * from harry_plotter import harry_plotter if __name__ == "__main__": main()
18.52
39
0.637149
from robot import robot from robotAI import robotAI from simulator import * from harry_plotter import harry_plotter def main(): sim = simulator("127.0.0.1", 25000) sim.connect() p3dx = robot(sim, "Pioneer_p3dx") p3dxAI = robotAI(p3dx) h = harry_plotter(p3dx, p3dxAI) while True: p3dx....
285
0
23
632da7d1da1f786ff40d21105c17ea7d2195c40e
431
py
Python
homework/admin.py
huhuhu90019001/mygit
83218aa260491963515e83787d447b516cf0a8e3
[ "Apache-2.0" ]
null
null
null
homework/admin.py
huhuhu90019001/mygit
83218aa260491963515e83787d447b516cf0a8e3
[ "Apache-2.0" ]
null
null
null
homework/admin.py
huhuhu90019001/mygit
83218aa260491963515e83787d447b516cf0a8e3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # import from apps here # import from lib # =============================================================================== from django.contrib import admin from homework.models import TaskLog, TaskResult, CapacityData2 admin.site.register(CapacityData2) # admin.site.register(TaskResult) # a...
26.9375
81
0.473318
# -*- coding: utf-8 -*- # import from apps here # import from lib # =============================================================================== from django.contrib import admin from homework.models import TaskLog, TaskResult, CapacityData2 admin.site.register(CapacityData2) # admin.site.register(TaskResult) # a...
0
0
0
fb906dfd4feb7bd224dfd2e920199d2dfdd73ee1
250
py
Python
agilicus/v1/proxyintovpngenerator/rbac.py
elimaneg/kustomize-plugins
21ebdbc6cde5e80d956bc32bbd2ac9c4c75a2441
[ "Apache-2.0" ]
58
2019-08-16T16:26:03.000Z
2022-01-13T20:57:13.000Z
agilicus/v1/proxyintovpngenerator/rbac.py
alimeerutech/kustomize-plugins
21ebdbc6cde5e80d956bc32bbd2ac9c4c75a2441
[ "Apache-2.0" ]
2
2019-10-07T09:39:45.000Z
2019-10-11T07:39:33.000Z
agilicus/v1/proxyintovpngenerator/rbac.py
alimeerutech/kustomize-plugins
21ebdbc6cde5e80d956bc32bbd2ac9c4c75a2441
[ "Apache-2.0" ]
14
2019-08-12T16:56:53.000Z
2022-01-13T20:55:09.000Z
rbac = """ --- apiVersion: agilicus.com/v1 kind: RbacRole metadata: name: {cfg[name]}-{cfg[downstream_base_host]}-whitelist spec: name: '*' rules: - host: {cfg[downstream_base_host]}.__ROOT_DOMAIN__ path: "^/.*" method: "*" """
17.857143
57
0.62
rbac = """ --- apiVersion: agilicus.com/v1 kind: RbacRole metadata: name: {cfg[name]}-{cfg[downstream_base_host]}-whitelist spec: name: '*' rules: - host: {cfg[downstream_base_host]}.__ROOT_DOMAIN__ path: "^/.*" method: "*" """
0
0
0
e69e17f99e4f65e98482e4de4bbedf3e9fa589d8
2,174
py
Python
DQM/SiOuterTracker/python/OuterTrackerMonitorTTCluster_cfi.py
gputtley/cmssw
c1ef8454804e4ebea8b65f59c4a952a6c94fde3b
[ "Apache-2.0" ]
3
2018-08-24T19:10:26.000Z
2019-02-19T11:45:32.000Z
DQM/SiOuterTracker/python/OuterTrackerMonitorTTCluster_cfi.py
gputtley/cmssw
c1ef8454804e4ebea8b65f59c4a952a6c94fde3b
[ "Apache-2.0" ]
26
2018-10-30T12:47:58.000Z
2022-03-29T08:39:00.000Z
DQM/SiOuterTracker/python/OuterTrackerMonitorTTCluster_cfi.py
p2l1pfp/cmssw
9bda22bf33ecf18dd19a3af2b3a8cbdb1de556a9
[ "Apache-2.0" ]
5
2018-08-21T16:37:52.000Z
2020-01-09T13:33:17.000Z
import FWCore.ParameterSet.Config as cms import math from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer OuterTrackerMonitorTTCluster = DQMEDAnalyzer('OuterTrackerMonitorTTCluster', TopFolderName = cms.string('SiOuterTracker'), TTClusters = cms.InputTag("TTClustersFromPhase2TrackerDigis", "ClusterIncl...
26.512195
89
0.582337
import FWCore.ParameterSet.Config as cms import math from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer OuterTrackerMonitorTTCluster = DQMEDAnalyzer('OuterTrackerMonitorTTCluster', TopFolderName = cms.string('SiOuterTracker'), TTClusters = cms.InputTag("TTClustersFromPhase2TrackerDigis", "ClusterIncl...
0
0
0
582d3a5e3fba6a69605288bbc14c550719482222
35
py
Python
homeassistant/components/osramlightify/__init__.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/osramlightify/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
homeassistant/components/osramlightify/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""The osramlightify component."""
17.5
34
0.714286
"""The osramlightify component."""
0
0
0
f87f9afd6bdf01bebde175027537e08557b4cce9
2,009
py
Python
worker/ansible_worker.py
thomasmckay/quay-config-worker
51420bbb5c12fb606760e2784cc5ecd7f57bfa95
[ "Apache-2.0" ]
null
null
null
worker/ansible_worker.py
thomasmckay/quay-config-worker
51420bbb5c12fb606760e2784cc5ecd7f57bfa95
[ "Apache-2.0" ]
12
2019-12-26T17:34:54.000Z
2022-03-21T22:18:05.000Z
worker/ansible_worker.py
thomasmckay/quay-config-worker
51420bbb5c12fb606760e2784cc5ecd7f57bfa95
[ "Apache-2.0" ]
null
null
null
import logging import logging.config import os import socket from trollius import SSLContext import app as app from worker import ansible_queue # from workers.ansible_worker.ansible_server import AnsibleServer from ansible_server import AnsibleServer from util.log import logfile_path from raven.handlers.logging impo...
28.295775
88
0.627178
import logging import logging.config import os import socket from trollius import SSLContext import app as app from worker import ansible_queue # from workers.ansible_worker.ansible_server import AnsibleServer from ansible_server import AnsibleServer from util.log import logfile_path from raven.handlers.logging impo...
862
0
23
a04bd6b244144c17d1f846902f28ff065433d66f
10,606
py
Python
example.py
vaneseltine/pymatch
4ab156415a42a9d5c720246cee9d0f781ae7e405
[ "MIT" ]
null
null
null
example.py
vaneseltine/pymatch
4ab156415a42a9d5c720246cee9d0f781ae7e405
[ "MIT" ]
null
null
null
example.py
vaneseltine/pymatch
4ab156415a42a9d5c720246cee9d0f781ae7e405
[ "MIT" ]
null
null
null
# # Example # # The following example demonstrates how to the use the `pymatch` package to match [Lending Club Loan Data](https://www.kaggle.com/wendykan/lending-club-loan-data). Follow the link to download the dataset from Kaggle (you'll have to create an account, it's fast and free!). # # Here we match Lending Club ...
57.021505
739
0.755799
# # Example # # The following example demonstrates how to the use the `pymatch` package to match [Lending Club Loan Data](https://www.kaggle.com/wendykan/lending-club-loan-data). Follow the link to download the dataset from Kaggle (you'll have to create an account, it's fast and free!). # # Here we match Lending Club ...
0
0
0
baf1c5ede77846f14c79dd206e3946a1d9064b5e
966
py
Python
manager/core/tests.py
chaocodes/playlist-manager-django
adfcd9388629438f4a3ac75d56e062d6bbb9af72
[ "MIT" ]
1
2020-07-20T20:45:22.000Z
2020-07-20T20:45:22.000Z
manager/core/tests.py
chaocodes/playlist-manager-django
adfcd9388629438f4a3ac75d56e062d6bbb9af72
[ "MIT" ]
null
null
null
manager/core/tests.py
chaocodes/playlist-manager-django
adfcd9388629438f4a3ac75d56e062d6bbb9af72
[ "MIT" ]
null
null
null
from django.core.urlresolvers import reverse from django.test import Client, TestCase # Route Helpers # Core Views
28.411765
55
0.673913
from django.core.urlresolvers import reverse from django.test import Client, TestCase class CoreTest(TestCase): def setUp(self): self.client = Client() # Route Helpers def uri_home(self): return reverse('core:home') def uri_playlist(self): return reverse('core:playlist') ...
627
4
211
97e622d1190b854a52f2addd75bb9824634cffa8
6,336
py
Python
fe/live/repl/repl.py
egnartsms/livejs
e421fb52c5be58a4064a2238a1570e99a11ccdde
[ "MIT" ]
2
2019-11-21T21:16:32.000Z
2020-01-31T09:44:06.000Z
fe/live/repl/repl.py
egnartsms/livejs
e421fb52c5be58a4064a2238a1570e99a11ccdde
[ "MIT" ]
null
null
null
fe/live/repl/repl.py
egnartsms/livejs
e421fb52c5be58a4064a2238a1570e99a11ccdde
[ "MIT" ]
null
null
null
import contextlib import sublime from live.settings import setting from live.shared.backend import interacts_with_backend from live.shared.cursor import Cursor from live.sublime.edit import edit_for from live.sublime.edit import edits_self_view from live.sublime.misc import add_hidden_regions from live.sublime.misc im...
32.162437
90
0.664141
import contextlib import sublime from live.settings import setting from live.shared.backend import interacts_with_backend from live.shared.cursor import Cursor from live.sublime.edit import edit_for from live.sublime.edit import edits_self_view from live.sublime.misc import add_hidden_regions from live.sublime.misc im...
4,106
1,510
103
60d34f2cf4355a58455bb59f1971c00ab9270d80
4,491
py
Python
distillation/train_student.py
terrifyzhao/nlp_tutorial
5212cdc27bfbce71a679ef7edaa62c02b1e53dfb
[ "Apache-2.0" ]
1
2022-03-23T17:19:31.000Z
2022-03-23T17:19:31.000Z
distillation/train_student.py
terrifyzhao/nlp_tutorial
5212cdc27bfbce71a679ef7edaa62c02b1e53dfb
[ "Apache-2.0" ]
null
null
null
distillation/train_student.py
terrifyzhao/nlp_tutorial
5212cdc27bfbce71a679ef7edaa62c02b1e53dfb
[ "Apache-2.0" ]
null
null
null
from torch import nn from sklearn.metrics import accuracy_score import pandas as pd from torch.utils.data import DataLoader, Dataset from tqdm import tqdm from utils import fix_seed import torch from transformers import BertTokenizer from torch import softmax path = 'E:\\ptm\\roberta' device = torch.device('cuda') if ...
32.309353
86
0.569361
from torch import nn from sklearn.metrics import accuracy_score import pandas as pd from torch.utils.data import DataLoader, Dataset from tqdm import tqdm from utils import fix_seed import torch from transformers import BertTokenizer from torch import softmax path = 'E:\\ptm\\roberta' device = torch.device('cuda') if ...
3,726
16
223
e1412a7c059f48396130496d2288588849f1ded9
890
py
Python
comparesort/sorting/selectionsort.py
kyordhel/comparesort
bffa9bc96d80470eca2a25b88f055c1c2c70c2ed
[ "MIT" ]
null
null
null
comparesort/sorting/selectionsort.py
kyordhel/comparesort
bffa9bc96d80470eca2a25b88f055c1c2c70c2ed
[ "MIT" ]
null
null
null
comparesort/sorting/selectionsort.py
kyordhel/comparesort
bffa9bc96d80470eca2a25b88f055c1c2c70c2ed
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ## ############################################################### # selectionsort.py # # Author: Mauricio Matamoros # License: MIT # # ## ############################################################### from comparesort.array import Array def selectionsort(array): """...
27.8125
73
0.596629
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ## ############################################################### # selectionsort.py # # Author: Mauricio Matamoros # License: MIT # # ## ############################################################### from comparesort.array import Array def selectionsort(array): """...
0
0
0
4e1f47ab96e0d5604bd98c5106fc87234ce2cdb7
456
py
Python
hack_db.py
daveaseeman/PyHack
239685c87d24cce0725a6f42c6a76bfa0b94a5b2
[ "MIT" ]
null
null
null
hack_db.py
daveaseeman/PyHack
239685c87d24cce0725a6f42c6a76bfa0b94a5b2
[ "MIT" ]
null
null
null
hack_db.py
daveaseeman/PyHack
239685c87d24cce0725a6f42c6a76bfa0b94a5b2
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import sqlite3 db = "./students.db" conn = sqlite3.connect(db) c = conn.cursor() print("Without Hack: \n") c.execute("SELECT * from students WHERE Name='Robert'") result = c.fetchall() print(result) print("With Hack: \n") Name = "Robert'; DROP TABLE students;--" print("SELECT * from students WHER...
20.727273
64
0.684211
#!/usr/bin/python3 import sqlite3 db = "./students.db" conn = sqlite3.connect(db) c = conn.cursor() print("Without Hack: \n") c.execute("SELECT * from students WHERE Name='Robert'") result = c.fetchall() print(result) print("With Hack: \n") Name = "Robert'; DROP TABLE students;--" print("SELECT * from students WHER...
0
0
0
56090acf51b45e664d5e658e5b567793f83f970e
5,813
py
Python
tests/test_main.py
The-Ice-Breakers/two-truths-and-cl-i
bce68a3e4e78305ea37fbcf9f80f9eadbec8b396
[ "MIT" ]
null
null
null
tests/test_main.py
The-Ice-Breakers/two-truths-and-cl-i
bce68a3e4e78305ea37fbcf9f80f9eadbec8b396
[ "MIT" ]
null
null
null
tests/test_main.py
The-Ice-Breakers/two-truths-and-cl-i
bce68a3e4e78305ea37fbcf9f80f9eadbec8b396
[ "MIT" ]
null
null
null
from typing import Counter, List from Game.server_functions import Parser, RoundManager import random from fastapi import FastAPI, WebSocket, WebSocketDisconnect from fastapi.responses import HTMLResponse from fastapi.staticfiles import StaticFiles import asyncio import re app = FastAPI() input_parser = Parser() round...
33.601156
102
0.59453
from typing import Counter, List from Game.server_functions import Parser, RoundManager import random from fastapi import FastAPI, WebSocket, WebSocketDisconnect from fastapi.responses import HTMLResponse from fastapi.staticfiles import StaticFiles import asyncio import re app = FastAPI() input_parser = Parser() round...
4,802
3
289
2c52e41b928f577557908dcb035f2bea35861221
5,286
py
Python
gada/main.py
gadalang/gada
2dd4f4dfd5b7390c06307040cad23203a015f7a4
[ "MIT" ]
null
null
null
gada/main.py
gadalang/gada
2dd4f4dfd5b7390c06307040cad23203a015f7a4
[ "MIT" ]
null
null
null
gada/main.py
gadalang/gada
2dd4f4dfd5b7390c06307040cad23203a015f7a4
[ "MIT" ]
1
2021-06-15T13:52:33.000Z
2021-06-15T13:52:33.000Z
from __future__ import annotations __all__ = ["run", "main"] import os import sys import io import argparse from typing import Optional from gada import component, runners, datadir def split_unknown_args(argv: list[str]) -> tuple[list[str], list[str]]: """Separate known command-line arguments from unknown one. ...
30.034091
90
0.541241
from __future__ import annotations __all__ = ["run", "main"] import os import sys import io import argparse from typing import Optional from gada import component, runners, datadir def split_unknown_args(argv: list[str]) -> tuple[list[str], list[str]]: """Separate known command-line arguments from unknown one. ...
0
0
0
92f848d22704f53d8d74cd46ac6164b17d84d7a2
8,816
py
Python
skimage/measure/find_contours.py
Teva/scikits.image
12669d62e699313ca0f73de1b211bf438f4efb0c
[ "BSD-3-Clause" ]
3
2015-11-12T06:34:49.000Z
2017-09-22T07:47:50.000Z
skimage/measure/find_contours.py
Teva/scikits.image
12669d62e699313ca0f73de1b211bf438f4efb0c
[ "BSD-3-Clause" ]
null
null
null
skimage/measure/find_contours.py
Teva/scikits.image
12669d62e699313ca0f73de1b211bf438f4efb0c
[ "BSD-3-Clause" ]
8
2015-03-02T20:36:55.000Z
2021-02-18T10:37:00.000Z
import numpy as np from . import _find_contours from collections import deque _param_options = ('high', 'low') def find_contours(array, level, fully_connected='low', positive_orientation='low'): """Find iso-valued contours in a 2D array for a given level value. Uses the "marching squares" ...
45.210256
80
0.639065
import numpy as np from . import _find_contours from collections import deque _param_options = ('high', 'low') def find_contours(array, level, fully_connected='low', positive_orientation='low'): """Find iso-valued contours in a 2D array for a given level value. Uses the "marching squares" ...
3,527
0
46
963ce5029c8212fe92e0fa2c5a8b67afffd7b9ca
2,012
py
Python
zygoat/components/base.py
kborer/zygoat
638bbdb2bc8b39510c03c77d968e94aadf5ae51b
[ "MIT" ]
null
null
null
zygoat/components/base.py
kborer/zygoat
638bbdb2bc8b39510c03c77d968e94aadf5ae51b
[ "MIT" ]
1
2020-02-25T13:06:02.000Z
2020-02-25T13:06:02.000Z
zygoat/components/base.py
kborer/zygoat
638bbdb2bc8b39510c03c77d968e94aadf5ae51b
[ "MIT" ]
null
null
null
import logging from zygoat.utils.files import repository_root from zygoat.config import Config log = logging.getLogger()
26.473684
88
0.601392
import logging from zygoat.utils.files import repository_root from zygoat.config import Config log = logging.getLogger() class Component: def __init__(self, parent=None, sub_components=[]): self.config = Config() self.parent = parent self.sub_components = [] for component in su...
257
1,608
23
23da9f92017a0bb69c9244209fde061605b4441a
394
py
Python
winter/data/pagination/page.py
DmitryKhursevich/winter
9f3bf462f963059bab1f1bbb309ca57f8a43b46f
[ "MIT" ]
9
2019-01-24T11:50:19.000Z
2019-07-05T07:58:46.000Z
winter/data/pagination/page.py
mikhaillazko/winter
cd4f11aaf28d500aabb59cec369817bfdb5c2fc1
[ "MIT" ]
100
2019-01-29T08:11:38.000Z
2020-04-03T12:00:42.000Z
winter/data/pagination/page.py
mikhaillazko/winter
cd4f11aaf28d500aabb59cec369817bfdb5c2fc1
[ "MIT" ]
8
2020-07-16T13:56:50.000Z
2021-12-27T03:33:23.000Z
from typing import Generic from typing import Iterable from typing import Iterator from typing import TypeVar import dataclasses from .page_position import PagePosition T = TypeVar('T') @dataclasses.dataclass(frozen=True)
18.761905
39
0.743655
from typing import Generic from typing import Iterable from typing import Iterator from typing import TypeVar import dataclasses from .page_position import PagePosition T = TypeVar('T') @dataclasses.dataclass(frozen=True) class Page(Generic[T]): total_count: int items: Iterable[T] position: PagePositio...
45
100
22