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
0841530bc74bf8c0db4bcd2d3e30bbb4ae1e7f42
3,851
py
Python
Birnn_Transformer/ncc/optimizers/lr_schedulers/cosine_lr_scheduler.py
code-backdoor/code-backdoor
1eeb3d79aa8a54c8f08e8d0156b569de5edd974e
[ "MIT" ]
71
2020-12-04T02:18:13.000Z
2022-03-30T15:19:50.000Z
ncc/optimizers/lr_schedulers/cosine_lr_scheduler.py
hrshy0629/naturalcc
9c3329dd8387c8242deb52bf590ebe3ac795f8de
[ "MIT" ]
4
2021-03-10T17:48:50.000Z
2022-03-13T10:42:22.000Z
ncc/optimizers/lr_schedulers/cosine_lr_scheduler.py
hrshy0629/naturalcc
9c3329dd8387c8242deb52bf590ebe3ac795f8de
[ "MIT" ]
11
2020-12-09T12:17:44.000Z
2022-03-30T09:02:13.000Z
# -*- coding: utf-8 -*- import math from ncc import LOGGER from . import NccLRScheduler, register_lr_scheduler @register_lr_scheduler('cosine') class CosineSchedule(NccLRScheduler): """Assign LR based on a cyclical schedule that follows the cosine function. See https://arxiv.org/pdf/1608.03983.pdf for deta...
38.51
118
0.615425
# -*- coding: utf-8 -*- import math from ncc import LOGGER from . import NccLRScheduler, register_lr_scheduler @register_lr_scheduler('cosine') class CosineSchedule(NccLRScheduler): """Assign LR based on a cyclical schedule that follows the cosine function. See https://arxiv.org/pdf/1608.03983.pdf for deta...
1,592
0
27
fe2464bc85b9ac26573daa40fd617ad447cf0359
3,013
py
Python
src/sentry/api/serializers/models/team.py
tobetterman/sentry
fe85d3aee19dcdbfdd27921c4fb04529fc995a79
[ "BSD-3-Clause" ]
1
2017-08-30T06:55:25.000Z
2017-08-30T06:55:25.000Z
src/sentry/api/serializers/models/team.py
tobetterman/sentry
fe85d3aee19dcdbfdd27921c4fb04529fc995a79
[ "BSD-3-Clause" ]
null
null
null
src/sentry/api/serializers/models/team.py
tobetterman/sentry
fe85d3aee19dcdbfdd27921c4fb04529fc995a79
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import import itertools from collections import defaultdict from django.conf import settings from sentry.api.serializers import Serializer, register, serialize from sentry.auth.utils import is_active_superuser from sentry.models import ( OrganizationAccessRequest, OrganizationMemb...
33.10989
85
0.58845
from __future__ import absolute_import import itertools from collections import defaultdict from django.conf import settings from sentry.api.serializers import Serializer, register, serialize from sentry.auth.utils import is_active_superuser from sentry.models import ( OrganizationAccessRequest, OrganizationMemb...
2,440
40
151
2d9f404b06b483ab2afaeb0c7ce9e68837d3d0b0
6,376
py
Python
src/MadQt/Apps/PluginCreator/myWidgets.py
MadPonyInteractive/MadQt
cad2eb2afe9da248df7e83d755c4d3a9d3ef6ffc
[ "MIT" ]
3
2021-12-31T21:17:33.000Z
2022-03-19T12:38:07.000Z
src/MadQt/Apps/PluginCreator/myWidgets.py
MadPonyInteractive/MadQt
cad2eb2afe9da248df7e83d755c4d3a9d3ef6ffc
[ "MIT" ]
1
2021-12-31T21:18:35.000Z
2022-01-07T19:22:43.000Z
src/MadQt/Apps/PluginCreator/myWidgets.py
MadPonyInteractive/MadQt
cad2eb2afe9da248df7e83d755c4d3a9d3ef6ffc
[ "MIT" ]
null
null
null
from PySide6.QtWidgets import * from PySide6.QtCore import * from PySide6.QtGui import * import os
35.820225
116
0.600533
from PySide6.QtWidgets import * from PySide6.QtCore import * from PySide6.QtGui import * import os def getMainWindow(): # for widget in QApplication.allWidgets(): # print(widget) for widget in QApplication.topLevelWidgets(): if isinstance(widget, QMainWindow): return widget retu...
5,554
213
510
7375e4ed247022f1f551b99ffa4c57ce695c9dc6
729
py
Python
tests/test_librispeech.py
muxgt/pycadl
9231fd4d945d959038a3760354bc891cbf7225b8
[ "ECL-2.0", "Apache-2.0" ]
398
2017-09-05T20:46:59.000Z
2022-02-24T12:58:09.000Z
tests/test_librispeech.py
muxgt/pycadl
9231fd4d945d959038a3760354bc891cbf7225b8
[ "ECL-2.0", "Apache-2.0" ]
9
2017-09-24T06:08:10.000Z
2022-02-09T23:28:13.000Z
tests/test_librispeech.py
muxgt/pycadl
9231fd4d945d959038a3760354bc891cbf7225b8
[ "ECL-2.0", "Apache-2.0" ]
75
2017-09-05T23:45:43.000Z
2021-07-13T03:59:26.000Z
from cadl import librispeech from cadl.utils import exists from numpy.testing import run_module_suite if __name__ == "__main__": run_module_suite()
31.695652
80
0.720165
from cadl import librispeech from cadl.utils import exists from numpy.testing import run_module_suite def test_librispeech_exists(): assert(exists('http://www.openslr.org/resources/12/dev-clean.tar.gz')) assert(exists('http://www.openslr.org/resources/12/train-clean-100.tar.gz')) assert(exists('http://www...
506
0
69
029ddd753ddc254d5ae654dd7aab1e18615a83ea
177
py
Python
avmess/rooms_setup.py
Raduionutz/Monster-Clearer-GOTY
de02306ef0183c23117487af299359f3932edab5
[ "MIT" ]
2
2018-07-31T18:14:18.000Z
2019-09-23T14:10:06.000Z
avmess/rooms_setup.py
Raduionutz/Monster-Clearer-GOTY
de02306ef0183c23117487af299359f3932edab5
[ "MIT" ]
null
null
null
avmess/rooms_setup.py
Raduionutz/Monster-Clearer-GOTY
de02306ef0183c23117487af299359f3932edab5
[ "MIT" ]
null
null
null
from avmess.server_utils import ROOMS from avmess.models.room_model import RoomModel
25.285714
46
0.734463
from avmess.server_utils import ROOMS from avmess.models.room_model import RoomModel def rooms_setup(): for room in RoomModel.objects.all(): ROOMS[room.id] = set()
69
0
23
ad13fef763043c937edc4e73c310ae7cd29627a4
9,620
py
Python
aquaticore/fish/views.py
rockerBOO/aquaticore
d50be480d14f6d858610181eee15c3cc8d9544bb
[ "MIT" ]
null
null
null
aquaticore/fish/views.py
rockerBOO/aquaticore
d50be480d14f6d858610181eee15c3cc8d9544bb
[ "MIT" ]
null
null
null
aquaticore/fish/views.py
rockerBOO/aquaticore
d50be480d14f6d858610181eee15c3cc8d9544bb
[ "MIT" ]
null
null
null
from django.template import Context, loader, RequestContext from django.http import HttpResponse, HttpResponseRedirect from aquaticore.fish.models import * from django.shortcuts import render_to_response, get_object_or_404 from datetime import datetime from math import * from flickrapi import FlickrAPI from django.core...
27.175141
145
0.709563
from django.template import Context, loader, RequestContext from django.http import HttpResponse, HttpResponseRedirect from aquaticore.fish.models import * from django.shortcuts import render_to_response, get_object_or_404 from datetime import datetime from math import * from flickrapi import FlickrAPI from django.core...
8,773
0
372
9879f1cf19982e777aa4b4987cd2a585d02d48f0
4,348
py
Python
src/enamlnative/android/android_image_view.py
codelv/enaml-native
04c3a015bcd649f374c5ecd98fcddba5e4fbdbdc
[ "MIT" ]
237
2017-09-15T19:31:45.000Z
2022-03-17T04:22:20.000Z
src/enamlnative/android/android_image_view.py
codelv/enaml-native
04c3a015bcd649f374c5ecd98fcddba5e4fbdbdc
[ "MIT" ]
74
2017-09-06T20:16:41.000Z
2022-03-05T13:34:35.000Z
src/enamlnative/android/android_image_view.py
codelv/enaml-native
04c3a015bcd649f374c5ecd98fcddba5e4fbdbdc
[ "MIT" ]
22
2017-09-15T19:32:11.000Z
2022-03-17T18:33:39.000Z
""" Copyright (c) 2017, Jairus Martin. Distributed under the terms of the MIT License. The full license is in the file LICENSE, distributed with this software. Created on July 6, 2017 @author: jrm """ from atom.api import Typed, set_default from enamlnative.widgets.image_view import ProxyImageView from .android_v...
35.349593
79
0.622355
""" Copyright (c) 2017, Jairus Martin. Distributed under the terms of the MIT License. The full license is in the file LICENSE, distributed with this software. Created on July 6, 2017 @author: jrm """ from atom.api import Typed, set_default from enamlnative.widgets.image_view import ProxyImageView from .android_v...
583
2,013
294
133d41e356882f26e51c05bbf4d12aee972772d8
699
py
Python
tests/unit_tests.py
kairstenfay/Tinder
c6b2c73f7b8c8244795f7753198a1979da29a2ef
[ "MIT" ]
null
null
null
tests/unit_tests.py
kairstenfay/Tinder
c6b2c73f7b8c8244795f7753198a1979da29a2ef
[ "MIT" ]
null
null
null
tests/unit_tests.py
kairstenfay/Tinder
c6b2c73f7b8c8244795f7753198a1979da29a2ef
[ "MIT" ]
null
null
null
import unittest sys.path.insert(0, str(Path(__file__).parent.parent)) from lib.io import read_json if __name__ == '__main__': unittest.main()
24.964286
69
0.597997
import unittest sys.path.insert(0, str(Path(__file__).parent.parent)) from lib.io import read_json class TestHarvest(unittest.TestCase): def setUp(self): self.data = read_json() def testInstances(self): self.assertEqual(self.instances, { 'target': None, 'complete_tos'...
431
16
104
f0107eafdab4f32711f7ff8dddcac518075514f1
551
py
Python
tests/conftest.py
axiom-data-science/erddap-metrics
a5a96710605448f5f6cb8b2d6c5d856d31dcb523
[ "Apache-2.0" ]
3
2021-01-13T18:04:43.000Z
2021-08-20T23:52:28.000Z
tests/conftest.py
axiom-data-science/erddap-metrics
a5a96710605448f5f6cb8b2d6c5d856d31dcb523
[ "Apache-2.0" ]
null
null
null
tests/conftest.py
axiom-data-science/erddap-metrics
a5a96710605448f5f6cb8b2d6c5d856d31dcb523
[ "Apache-2.0" ]
1
2021-01-13T18:04:57.000Z
2021-01-13T18:04:57.000Z
#!python # coding=utf-8 import pytest import responses from erddap_metrics.lib.erddap_metrics import ErddapMetrics @pytest.fixture @pytest.fixture
23.956522
97
0.780399
#!python # coding=utf-8 import pytest import responses from erddap_metrics.lib.erddap_metrics import ErddapMetrics @pytest.fixture def mocked_responses(): # Use to mock calls to requests library # https://github.com/getsentry/responses with responses.RequestsMock(assert_all_requests_are_fired=False) as ...
354
0
44
c07856d51a08b8678414b494cb30fd1e6711ee69
11,935
py
Python
tests/test_rio_info.py
johanvdw/rasterio
0a515f127ff14739e86a2214301933b5f4acedf3
[ "BSD-3-Clause" ]
null
null
null
tests/test_rio_info.py
johanvdw/rasterio
0a515f127ff14739e86a2214301933b5f4acedf3
[ "BSD-3-Clause" ]
null
null
null
tests/test_rio_info.py
johanvdw/rasterio
0a515f127ff14739e86a2214301933b5f4acedf3
[ "BSD-3-Clause" ]
null
null
null
import json import logging import sys from click.testing import CliRunner import rasterio from rasterio.rio import info from rasterio.rio.main import main_group logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
26.880631
98
0.598995
import json import logging import sys from click.testing import CliRunner import rasterio from rasterio.rio import info from rasterio.rio.main import main_group logging.basicConfig(stream=sys.stderr, level=logging.DEBUG) def test_edit_nodata_err(data): runner = CliRunner() inputfile = str(data.join('RGB.b...
10,702
0
966
5676df5a20f80caeeb952bbf83a6e8e37af40189
405
py
Python
main.py
albul-k/scraper_smart-lab.ru
89327e227e294e312fb6bebf93b9a6d41be8af98
[ "MIT" ]
null
null
null
main.py
albul-k/scraper_smart-lab.ru
89327e227e294e312fb6bebf93b9a6d41be8af98
[ "MIT" ]
null
null
null
main.py
albul-k/scraper_smart-lab.ru
89327e227e294e312fb6bebf93b9a6d41be8af98
[ "MIT" ]
null
null
null
from scrapy.crawler import CrawlerProcess from scrapy.settings import Settings from smartlab import settings from smartlab.spiders.smartlab_dividend import SmartlabDividendSpider if __name__ == '__main__': crawl_settings = Settings() crawl_settings.setmodule(settings) crawl_proc = CrawlerProcess(settings...
28.928571
69
0.809877
from scrapy.crawler import CrawlerProcess from scrapy.settings import Settings from smartlab import settings from smartlab.spiders.smartlab_dividend import SmartlabDividendSpider if __name__ == '__main__': crawl_settings = Settings() crawl_settings.setmodule(settings) crawl_proc = CrawlerProcess(settings...
0
0
0
8b9d4eaa41a79adaf5f4d145fd6d5bbbcec75438
222
py
Python
ipetgui/__init__.py
stephenjmaher/ipet
3a23d81ba6ed7cb41e86211cb0507170e8cd205a
[ "MIT" ]
14
2016-12-20T06:49:32.000Z
2021-05-12T11:17:27.000Z
ipetgui/__init__.py
stephenjmaher/ipet
3a23d81ba6ed7cb41e86211cb0507170e8cd205a
[ "MIT" ]
69
2016-12-15T16:37:27.000Z
2021-08-16T10:12:36.000Z
ipetgui/__init__.py
stephenjmaher/ipet
3a23d81ba6ed7cb41e86211cb0507170e8cd205a
[ "MIT" ]
11
2016-12-30T07:46:18.000Z
2021-10-09T02:34:45.000Z
# -*- coding: utf-8 -*- from .IpetEvaluationEditorApp import IpetEvaluationEditorApp from .IpetPbHistoryWindow import IpetPbHistoryWindow from .QIPETApplication import QIPETApplication __all__ = ["ExperimentManagement", ]
31.714286
60
0.824324
# -*- coding: utf-8 -*- from .IpetEvaluationEditorApp import IpetEvaluationEditorApp from .IpetPbHistoryWindow import IpetPbHistoryWindow from .QIPETApplication import QIPETApplication __all__ = ["ExperimentManagement", ]
0
0
0
e2dd2151dfc240ee32b4dd93b1af07435104245a
1,783
py
Python
src/gcc/mem_profile_run.py
vishalbelsare/iisignature
fd26aeaddac0577d44163586f8394d4255cca586
[ "MIT" ]
52
2016-06-02T14:51:49.000Z
2022-03-02T12:03:35.000Z
src/gcc/mem_profile_run.py
ViewFuture/iisignature
14084c0fb5661943ef944ff23492c6aeb50d7896
[ "MIT" ]
16
2017-08-15T13:52:20.000Z
2022-01-15T18:17:37.000Z
src/gcc/mem_profile_run.py
ViewFuture/iisignature
14084c0fb5661943ef944ff23492c6aeb50d7896
[ "MIT" ]
16
2016-12-03T20:41:07.000Z
2022-01-06T11:40:23.000Z
import subprocess, sqlite3 #valgrind -q --tool=massif --massif-out-file=mem_profile.massif --depth=1 ./mem_profilee 2 8 S H ##ms_print massif.out.`cat mem_profile_pid.txt` ##ms_print mem_profile.massif #grep mem_heap_B mem_profile.massif |cut -c 12- |sort -n | tail -n 1 con = sqlite3.connect("mem_profile.sqlite") con...
37.145833
133
0.637128
import subprocess, sqlite3 #valgrind -q --tool=massif --massif-out-file=mem_profile.massif --depth=1 ./mem_profilee 2 8 S H ##ms_print massif.out.`cat mem_profile_pid.txt` ##ms_print mem_profile.massif #grep mem_heap_B mem_profile.massif |cut -c 12- |sort -n | tail -n 1 def get_usage(d,m, use_compiled, use_lyndon): ...
960
0
46
531a6ee42b119b2abbe27fca39908a38c99bcf07
14,208
py
Python
pay_calculator.py
tuky191/att_salary_calc
6b2f4d343b18a24e0266d940de4d43c202300405
[ "Apache-2.0" ]
null
null
null
pay_calculator.py
tuky191/att_salary_calc
6b2f4d343b18a24e0266d940de4d43c202300405
[ "Apache-2.0" ]
null
null
null
pay_calculator.py
tuky191/att_salary_calc
6b2f4d343b18a24e0266d940de4d43c202300405
[ "Apache-2.0" ]
null
null
null
import datetime from datetime import timedelta import re from pprint import pprint from tulip_api import TulipApi
40.827586
101
0.508446
import datetime from datetime import timedelta import re from pprint import pprint from tulip_api import TulipApi class PayCalculator(): def __init__(self, username='', password=''): self.tulip_api = TulipApi(username=username, password=password) self.calculation_input = {} self.attendanc...
13,745
1
347
3fd797f815d3bbcd0991c6234751e93c4147276f
3,943
py
Python
data/load_data_gse68465.py
lucasvenez/mult
d5977f628f89a7f8f3ff31ba5c0b0be908d5e5c1
[ "Apache-2.0" ]
12
2020-10-13T01:27:35.000Z
2021-11-22T13:42:26.000Z
data/load_data_gse68465.py
lucasvenez/mult
d5977f628f89a7f8f3ff31ba5c0b0be908d5e5c1
[ "Apache-2.0" ]
null
null
null
data/load_data_gse68465.py
lucasvenez/mult
d5977f628f89a7f8f3ff31ba5c0b0be908d5e5c1
[ "Apache-2.0" ]
2
2020-10-12T13:40:41.000Z
2022-03-29T05:28:59.000Z
from data import load_data_gse import pandas as pd def load_data_gse68465(verbose=-1, read_as_ndarray=False): """ This method loads the data set of the project GSE68465 available at https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE68465. This project reports a large, training/testing, multi-sit...
39.43
106
0.684251
from data import load_data_gse import pandas as pd def processing_gse68465(clinical): assert isinstance(clinical, pd.DataFrame), \ 'Invalid clinical type. It should be a pandas data frame.' # cleaning clinical markers clinical = clinical.replace({'na': None, 'NA': None, 'Unknown': None}) c...
2,782
0
23
7c88942c3ef4a78fc2881eb6e9dbc84b32baecca
876
py
Python
sa/profiles/ZTE/ZXDSL98xx/get_chassis_id.py
xUndero/noc
9fb34627721149fcf7064860bd63887e38849131
[ "BSD-3-Clause" ]
1
2019-09-20T09:36:48.000Z
2019-09-20T09:36:48.000Z
sa/profiles/ZTE/ZXDSL98xx/get_chassis_id.py
ewwwcha/noc
aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb
[ "BSD-3-Clause" ]
null
null
null
sa/profiles/ZTE/ZXDSL98xx/get_chassis_id.py
ewwwcha/noc
aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # --------------------------------------------------------------------- # ZTE.ZXDSL98xx.get_chassis_id # --------------------------------------------------------------------- # Copyright (C) 2007-2018 The NOC Project # See LICENSE for details # ---------------------------------------------------...
32.444444
97
0.493151
# -*- coding: utf-8 -*- # --------------------------------------------------------------------- # ZTE.ZXDSL98xx.get_chassis_id # --------------------------------------------------------------------- # Copyright (C) 2007-2018 The NOC Project # See LICENSE for details # ---------------------------------------------------...
191
202
23
1ef6577bf132b0e73d893697c3440ea15c1d212a
4,426
py
Python
python/tests/unit/test_command_builder.py
digital-asset/dazl-client
5d54edaea26d7704cc8d73e5945b37ed2806265b
[ "Apache-2.0" ]
8
2019-09-08T09:41:03.000Z
2022-02-19T12:54:30.000Z
python/tests/unit/test_command_builder.py
digital-asset/dazl-client
5d54edaea26d7704cc8d73e5945b37ed2806265b
[ "Apache-2.0" ]
55
2019-05-30T23:00:31.000Z
2022-01-24T01:51:32.000Z
python/tests/unit/test_command_builder.py
digital-asset/dazl-client
5d54edaea26d7704cc8d73e5945b37ed2806265b
[ "Apache-2.0" ]
9
2019-06-30T18:15:27.000Z
2021-12-03T10:15:27.000Z
# Copyright (c) 2017-2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase from dazl.client.commands import CommandBuilder, CommandDefaults, CommandPayload, create from dazl.damlast.lookup import parse_type_con_name from ...
36.578512
102
0.638048
# Copyright (c) 2017-2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase from dazl.client.commands import CommandBuilder, CommandDefaults, CommandPayload, create from dazl.damlast.lookup import parse_type_con_name from ...
3,376
0
108
0de5270e48f9bb8140229ad87f702d9f9395b7a9
1,319
py
Python
functions/benchmarks/utils.py
xyclin/fluent
f1dcede5d4b7d6eab722180129dbb5aff4241621
[ "Apache-2.0" ]
1,164
2018-07-25T23:17:07.000Z
2019-07-11T20:33:52.000Z
functions/benchmarks/utils.py
longwutianya/fluent
c8fc9f2dd781e5ed91c34351adc6a101cc383083
[ "Apache-2.0" ]
126
2018-07-25T22:41:53.000Z
2019-07-10T21:49:19.000Z
functions/benchmarks/utils.py
longwutianya/fluent
c8fc9f2dd781e5ed91c34351adc6a101cc383083
[ "Apache-2.0" ]
178
2018-07-25T23:17:11.000Z
2019-07-10T02:45:27.000Z
import logging import numpy as np import scipy.stats
30.674419
76
0.501137
import logging import numpy as np import scipy.stats def mean_confidence_interval(data, confidence=0.95): n = len(data) m, se = np.mean(data), scipy.stats.sem(data) h = se * scipy.stats.t.ppf((1 + confidence) / 2., n-1) return m, m-h, m+h def print_latency_stats(data, ident, log=False): npdata =...
1,218
0
46
6425da93e71073c780a9415437ef2fbe735fd071
6,781
py
Python
indexator/json2html.py
timtim1342/tsakorpus
8bd136b85bc164e62be562cad102a0b0ee1fd037
[ "MIT" ]
7
2021-06-20T16:22:22.000Z
2022-01-31T13:51:43.000Z
indexator/json2html.py
timtim1342/tsakorpus
8bd136b85bc164e62be562cad102a0b0ee1fd037
[ "MIT" ]
3
2021-06-08T18:56:47.000Z
2022-01-06T13:35:30.000Z
indexator/json2html.py
timtim1342/tsakorpus
8bd136b85bc164e62be562cad102a0b0ee1fd037
[ "MIT" ]
6
2021-06-08T18:07:01.000Z
2022-03-08T00:21:13.000Z
import os import sys import json import re from werkzeug.utils import secure_filename from json_doc_reader import JSONDocReader sys.path.insert(0, '../search/web_app') from corpus_settings import CorpusSettings from response_processors import SentenceViewer class JSON2HTML: """ Contains methods for translati...
43.191083
117
0.536499
import os import sys import json import re from werkzeug.utils import secure_filename from json_doc_reader import JSONDocReader sys.path.insert(0, '../search/web_app') from corpus_settings import CorpusSettings from response_processors import SentenceViewer class JSON2HTML: """ Contains methods for translati...
578
0
27
b8b826a88e19affc912d666152aca3a34a719d46
1,992
py
Python
prometheus_ncs2_exporter/main.py
adaptant-labs/prometheus_ncs2_exporter
669cd9b355e86325475292e688eb69a03e977e7a
[ "Apache-2.0" ]
null
null
null
prometheus_ncs2_exporter/main.py
adaptant-labs/prometheus_ncs2_exporter
669cd9b355e86325475292e688eb69a03e977e7a
[ "Apache-2.0" ]
null
null
null
prometheus_ncs2_exporter/main.py
adaptant-labs/prometheus_ncs2_exporter
669cd9b355e86325475292e688eb69a03e977e7a
[ "Apache-2.0" ]
null
null
null
import argparse import prometheus_client from time import sleep from . import NCS2Exporter, NCS2DeviceExporter, UsageFormatter if __name__ == '__main__': main()
44.266667
106
0.653614
import argparse import prometheus_client from time import sleep from . import NCS2Exporter, NCS2DeviceExporter, UsageFormatter def main(): parser = argparse.ArgumentParser(description='Prometheus Exporter for Intel NCS2 Metrics', formatter_class=UsageFormatter) parser.add_...
1,801
0
23
5a54a2321f3562809615ac74a12f6ec9cd0b0448
24,839
py
Python
d2lzh/ssd_utils.py
LinJianping/d2l-zh
fa4d48d1335f5f2cf5dc99e66fb975127be7e105
[ "Apache-2.0" ]
1
2019-11-19T02:32:26.000Z
2019-11-19T02:32:26.000Z
d2lzh/ssd_utils.py
LinJianping/d2l-zh
fa4d48d1335f5f2cf5dc99e66fb975127be7e105
[ "Apache-2.0" ]
null
null
null
d2lzh/ssd_utils.py
LinJianping/d2l-zh
fa4d48d1335f5f2cf5dc99e66fb975127be7e105
[ "Apache-2.0" ]
null
null
null
import os import errno from tqdm import tqdm import torch import json import numpy as np from PIL import Image import torch.nn as nn import torchvision.transforms as transforms import torch.optim as optim import torch.nn.functional as F import sys d2lzh = sys.modules[__name__] # Defined in file: ./chapter_preface/pref...
36.208455
163
0.579411
import os import errno from tqdm import tqdm import torch import json import numpy as np from PIL import Image import torch.nn as nn import torchvision.transforms as transforms import torch.optim as optim import torch.nn.functional as F import sys d2lzh = sys.modules[__name__] # Defined in file: ./chapter_preface/pref...
16,039
1,407
677
0adc93ac338432e2d493a7a375a842b18ed4d55d
1,537
py
Python
tests/test_lexicon.py
WithPrecedent/sourdough
52d99ca056cda93fb3e913fbca3d9a5947ec3513
[ "Apache-2.0" ]
null
null
null
tests/test_lexicon.py
WithPrecedent/sourdough
52d99ca056cda93fb3e913fbca3d9a5947ec3513
[ "Apache-2.0" ]
null
null
null
tests/test_lexicon.py
WithPrecedent/sourdough
52d99ca056cda93fb3e913fbca3d9a5947ec3513
[ "Apache-2.0" ]
null
null
null
""" test_lexicon: unit tests for Lexicon Corey Rayburn Yung <coreyrayburnyung@gmail.com> Copyright 2020-2021, Corey Rayburn Yung License: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0) """ import dataclasses import sourdough @dataclasses.dataclass @dataclasses.dataclass if __name__ == '__main__': ...
26.5
77
0.688354
""" test_lexicon: unit tests for Lexicon Corey Rayburn Yung <coreyrayburnyung@gmail.com> Copyright 2020-2021, Corey Rayburn Yung License: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0) """ import dataclasses import sourdough @dataclasses.dataclass class AComponent(sourdough.project.Component): pass ...
1,056
74
67
7df171d697be07980d3ae3403ae76de2f49142b1
7,258
py
Python
null_models.py
COSIN3-UOC/null_models
72ec686eeeb07192109b888c7ed458db2b9c1974
[ "MIT" ]
null
null
null
null_models.py
COSIN3-UOC/null_models
72ec686eeeb07192109b888c7ed458db2b9c1974
[ "MIT" ]
null
null
null
null_models.py
COSIN3-UOC/null_models
72ec686eeeb07192109b888c7ed458db2b9c1974
[ "MIT" ]
1
2021-12-15T12:42:22.000Z
2021-12-15T12:42:22.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Oct 4 13:22:11 2021 @author: mariapalazzi """ import random import numpy as np from scipy.optimize import root from required_functions_null_models import avg_degrees_expoRG #%% def exponentialRG_proportional_proportional(M): ''' Solve the syste...
31.833333
131
0.615597
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Oct 4 13:22:11 2021 @author: mariapalazzi """ import random import numpy as np from scipy.optimize import root from required_functions_null_models import avg_degrees_expoRG #%% def exponentialRG_proportional_proportional(M): ''' Solve the syste...
0
0
0
943f4985ff55131db2ea467bdf35f99ca2544369
2,112
py
Python
GUI/ErrorsTab.py
jabez007/Training_Helpyr
10fa5ed239dd661f3ca9239d1948a03d3ec26ce7
[ "MIT" ]
null
null
null
GUI/ErrorsTab.py
jabez007/Training_Helpyr
10fa5ed239dd661f3ca9239d1948a03d3ec26ce7
[ "MIT" ]
null
null
null
GUI/ErrorsTab.py
jabez007/Training_Helpyr
10fa5ed239dd661f3ca9239d1948a03d3ec26ce7
[ "MIT" ]
null
null
null
from Tkinter import * import os import TabbedUI from MyTab import MyTab import Log # # # # if __name__ == '__main__': main()
27.076923
78
0.508049
from Tkinter import * import os import TabbedUI from MyTab import MyTab import Log class ErrorsTab(MyTab): def __init__(self, *args, **kwargs): MyTab.__init__(self, *args, **kwargs) self.errors = dict() self.init_ui() def init_ui(self): # Errors Tabs Frame errors_t...
1,821
2
154
46181e1e3f8c2a40fd1a40df1162e5eefca2c2d3
775
py
Python
src/db/config.py
pritamps/PDF-Package
91b418dd6582c6f40f4c68df79ea0e7b378d7780
[ "MIT" ]
null
null
null
src/db/config.py
pritamps/PDF-Package
91b418dd6582c6f40f4c68df79ea0e7b378d7780
[ "MIT" ]
null
null
null
src/db/config.py
pritamps/PDF-Package
91b418dd6582c6f40f4c68df79ea0e7b378d7780
[ "MIT" ]
null
null
null
""" Define Database Configuration """ class Config: """ Common configurations """ SQLALCHEMY_DATABASE_URI = 'postgresql://pdfbuilder:FKQMoXB7BQyU1zp59DGu@db:5432/pdfbuilder' SQLALCHEMY_BINDS = { 'backup': 'postgresql://pdfbuilderbackup:FKQMoXB7BQyU1zp59DGu@backupdb:5432' '/...
22.142857
95
0.677419
""" Define Database Configuration """ class Config: """ Common configurations """ SQLALCHEMY_DATABASE_URI = 'postgresql://pdfbuilder:FKQMoXB7BQyU1zp59DGu@db:5432/pdfbuilder' SQLALCHEMY_BINDS = { 'backup': 'postgresql://pdfbuilderbackup:FKQMoXB7BQyU1zp59DGu@backupdb:5432' '/...
0
0
0
27b8b8a9dfd0f33211335e972b68fd3bce6a41c5
5,284
py
Python
optimization/smarttuning/smarttuning2/test_planner/mock_searchspace.py
adalrsjr1/smart-tuning
d8cb9f4ba41e7c068eda75b0fb581dcc8f329064
[ "MIT" ]
1
2021-10-04T18:02:55.000Z
2021-10-04T18:02:55.000Z
optimization/smarttuning/smarttuning2/test_planner/mock_searchspace.py
adalrsjr1/smart-tuning
d8cb9f4ba41e7c068eda75b0fb581dcc8f329064
[ "MIT" ]
null
null
null
optimization/smarttuning/smarttuning2/test_planner/mock_searchspace.py
adalrsjr1/smart-tuning
d8cb9f4ba41e7c068eda75b0fb581dcc8f329064
[ "MIT" ]
null
null
null
import time from unittest.mock import MagicMock import optuna from optuna import Trial from optuna.distributions import CategoricalDistribution, UniformDistribution, IntUniformDistribution from optuna.trial import BaseTrial from controllers.searchspacemodel import SearchSpaceModel
33.443038
101
0.271196
import time from unittest.mock import MagicMock import optuna from optuna import Trial from optuna.distributions import CategoricalDistribution, UniformDistribution, IntUniformDistribution from optuna.trial import BaseTrial from controllers.searchspacemodel import SearchSpaceModel class MockSearchSpace: @static...
4,868
84
46
b8f43f2792848eac9dfb9f8c34662e8b3e7d9d25
341
py
Python
moocher_page/serializers.py
vorotynsky/MoochAllert
91cd3a1179901330b6e663367c70a7fb948581b3
[ "MIT" ]
null
null
null
moocher_page/serializers.py
vorotynsky/MoochAllert
91cd3a1179901330b6e663367c70a7fb948581b3
[ "MIT" ]
null
null
null
moocher_page/serializers.py
vorotynsky/MoochAllert
91cd3a1179901330b6e663367c70a7fb948581b3
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import *
26.230769
59
0.692082
from rest_framework import serializers from .models import * class MoocherPageSerializer(serializers.ModelSerializer): class Meta: model = MoocherPage fields = ['name', 'bio', 'user'] read_only_fields = ['user'] def create(self, validated_data): return MoocherPage.objects.crea...
72
184
23
e35de8e6235aaf18b85d8b07a9fc44fe6787f8da
1,230
py
Python
tables3_api/__init__.py
sot/tables3_api
ca1763d92b050082eba5bb36e11143ca3bf3b645
[ "BSD-3-Clause" ]
null
null
null
tables3_api/__init__.py
sot/tables3_api
ca1763d92b050082eba5bb36e11143ca3bf3b645
[ "BSD-3-Clause" ]
1
2017-06-05T17:05:22.000Z
2017-06-21T14:06:47.000Z
tables3_api/__init__.py
sot/tables3_api
ca1763d92b050082eba5bb36e11143ca3bf3b645
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst import tables from distutils.version import LooseVersion import ska_helpers __version__ = ska_helpers.get_version(__package__) def test(*args, **kwargs): """ Run py.test unit tests. """ import testr return testr.test(*args, **kwargs)...
36.176471
80
0.76748
# Licensed under a 3-clause BSD style license - see LICENSE.rst import tables from distutils.version import LooseVersion import ska_helpers __version__ = ska_helpers.get_version(__package__) def test(*args, **kwargs): """ Run py.test unit tests. """ import testr return testr.test(*args, **kwargs)...
0
0
0
c88706b1bb2a44a1abecc399c6d9c43f215b8054
1,694
py
Python
CommandLineInterp_python/exploreCommand.py
pranjal102/command_line_interp_PythonProject
4b5f5b6527c9dde31f58823370ab6430ddfc7194
[ "MIT" ]
null
null
null
CommandLineInterp_python/exploreCommand.py
pranjal102/command_line_interp_PythonProject
4b5f5b6527c9dde31f58823370ab6430ddfc7194
[ "MIT" ]
null
null
null
CommandLineInterp_python/exploreCommand.py
pranjal102/command_line_interp_PythonProject
4b5f5b6527c9dde31f58823370ab6430ddfc7194
[ "MIT" ]
null
null
null
import os import constants import errorHandler
26.46875
90
0.681818
import os import constants import errorHandler def exploreWithFlag(dismantle_command,self): if dismantle_command[1] == "-h": #print(constants.LINE_SEPARATORS) self.displayText(constants.LINE_SEPARATORS) cwd = os.getcwd() dir_list = os.listdir(cwd) for dir in dir_list: #print(dir) self.di...
1,590
0
50
888429a40a83538c6d94c836ba2ee5de879f5601
3,662
py
Python
project/core/views.py
bmogyorodi/recipe_search
0e7fa4b961342b6c37f36f444337109836618938
[ "BSD-3-Clause" ]
1
2021-08-13T08:33:09.000Z
2021-08-13T08:33:09.000Z
project/core/views.py
bmogyorodi/recipe_search
0e7fa4b961342b6c37f36f444337109836618938
[ "BSD-3-Clause" ]
null
null
null
project/core/views.py
bmogyorodi/recipe_search
0e7fa4b961342b6c37f36f444337109836618938
[ "BSD-3-Clause" ]
2
2021-08-13T08:33:35.000Z
2022-02-21T19:42:23.000Z
from django.shortcuts import render from django.core.paginator import Paginator from django.db.models import Count from data.models import Recipe, Ingredient, Tag from data.search import recipe_search from time import time search_ingredients = list(Ingredient.objects.values_list("title", flat=True)) search_ingredie...
36.989899
79
0.621245
from django.shortcuts import render from django.core.paginator import Paginator from django.db.models import Count from data.models import Recipe, Ingredient, Tag from data.search import recipe_search from time import time search_ingredients = list(Ingredient.objects.values_list("title", flat=True)) search_ingredie...
3,279
0
46
478bbe45749ad5ef790ad64584389bfca2e71184
5,174
py
Python
src/ZEO/scripts/zeopack.py
azmeuk/ZEO
8de475763467b054d87ad310f1696cc713db9135
[ "ZPL-2.1" ]
40
2015-11-26T18:40:29.000Z
2022-03-15T06:45:43.000Z
src/ZEO/scripts/zeopack.py
azmeuk/ZEO
8de475763467b054d87ad310f1696cc713db9135
[ "ZPL-2.1" ]
138
2015-01-05T16:05:09.000Z
2022-03-31T14:02:40.000Z
src/ZEO/scripts/zeopack.py
azmeuk/ZEO
8de475763467b054d87ad310f1696cc713db9135
[ "ZPL-2.1" ]
24
2015-04-03T07:05:13.000Z
2021-12-24T06:10:54.000Z
#!/usr/bin/env python2.3 import logging import optparse import socket import sys import time import traceback import ZEO.ClientStorage from six.moves import map from six.moves import zip usage = """Usage: %prog [options] [servers] Pack one or more storages hosted by ZEO servers. The positional arguments specify 0 o...
28.119565
76
0.54194
#!/usr/bin/env python2.3 import logging import optparse import socket import sys import time import traceback import ZEO.ClientStorage from six.moves import map from six.moves import zip usage = """Usage: %prog [options] [servers] Pack one or more storages hosted by ZEO servers. The positional arguments specify 0 o...
4,622
0
46
4fbfe08aa627d5cc2b383f3fa8353d8b4d0264df
3,449
py
Python
lg_common/src/lg_common/managed_window.py
carlosvquezada/lg_ros_nodes
7560e99272d06ef5c80a5444131dad72c078a718
[ "Apache-2.0" ]
null
null
null
lg_common/src/lg_common/managed_window.py
carlosvquezada/lg_ros_nodes
7560e99272d06ef5c80a5444131dad72c078a718
[ "Apache-2.0" ]
null
null
null
lg_common/src/lg_common/managed_window.py
carlosvquezada/lg_ros_nodes
7560e99272d06ef5c80a5444131dad72c078a718
[ "Apache-2.0" ]
null
null
null
import rospy import subprocess import threading import re from lg_common.msg import WindowGeometry import awesome # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
30.522124
94
0.581618
import rospy import subprocess import threading import re from lg_common.msg import WindowGeometry import awesome class ManagedWindow(object): def __init__(self, w_name=None, w_class=None, w_instance=None, geometry=None, visible=True, chrome_kiosk_workaround=False): self.w_name = w_name ...
1,586
1,669
23
31b425a735268e180e4e8027dbcbd72731ddf94a
2,913
py
Python
tests/test_hyperloglog.py
ShadowJonathan/txredisapi
5da94b91e7936af8fddba824da21cde428581996
[ "Apache-2.0" ]
104
2015-01-05T16:10:44.000Z
2019-10-14T14:59:10.000Z
tests/test_hyperloglog.py
ShadowJonathan/txredisapi
5da94b91e7936af8fddba824da21cde428581996
[ "Apache-2.0" ]
55
2015-01-22T11:25:20.000Z
2019-11-19T21:39:32.000Z
tests/test_hyperloglog.py
ShadowJonathan/txredisapi
5da94b91e7936af8fddba824da21cde428581996
[ "Apache-2.0" ]
50
2015-03-01T10:26:28.000Z
2019-11-17T23:26:51.000Z
# coding: utf-8 # Copyright 2009 Alexandre Fiori # # 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 agreed...
34.270588
74
0.628562
# coding: utf-8 # Copyright 2009 Alexandre Fiori # # 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 agreed...
1,710
421
23
755867e640b3e9aa0483afbaf0a9529f9ac14052
1,507
py
Python
components/studio/files/tests.py
aitmlouk/stackn
c8029394a15b03796a4864938f9db251b65c7354
[ "Apache-2.0" ]
25
2020-05-08T22:24:54.000Z
2022-03-11T18:16:58.000Z
components/studio/files/tests.py
aitmlouk/stackn
c8029394a15b03796a4864938f9db251b65c7354
[ "Apache-2.0" ]
75
2020-05-08T22:15:59.000Z
2021-11-22T10:00:04.000Z
components/studio/files/tests.py
aitmlouk/stackn
c8029394a15b03796a4864938f9db251b65c7354
[ "Apache-2.0" ]
12
2020-11-04T13:09:46.000Z
2022-03-14T16:22:40.000Z
import os import pathlib import shutil from django.test import TestCase from django.contrib.auth.models import User from django.conf import settings from .helpers import _create_userdir, _safe_to_create, create_repository base_dir = settings.GIT_REPOS_ROOT
28.980769
86
0.698739
import os import pathlib import shutil from django.test import TestCase from django.contrib.auth.models import User from django.conf import settings from .helpers import _create_userdir, _safe_to_create, create_repository base_dir = settings.GIT_REPOS_ROOT class FilesTestCase(TestCase): def setUp(self): ...
1,109
9
130
37343c9d70f7a8de6f910b99303fe94699270b70
83
py
Python
HackerRank/Python/Introduction/Arithmetic Operators.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
HackerRank/Python/Introduction/Arithmetic Operators.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
HackerRank/Python/Introduction/Arithmetic Operators.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
a=int(input()) b=int(input()) print ("""{a+b} {a-b} {a*b}""")
11.857143
19
0.349398
a=int(input()) b=int(input()) print ("""{a+b} {a-b} {a*b}""")
0
0
0
5ac2cce3590436cc23fcfc34ea006b85943beee0
11,178
py
Python
controllers/turistas entrantes ine_controller.py
SergioCMDev/Busines-Inteligence-applied-to-tourism
61834a46fce22453e94b7bbdf8d4ecdcf128285a
[ "Apache-2.0" ]
null
null
null
controllers/turistas entrantes ine_controller.py
SergioCMDev/Busines-Inteligence-applied-to-tourism
61834a46fce22453e94b7bbdf8d4ecdcf128285a
[ "Apache-2.0" ]
null
null
null
controllers/turistas entrantes ine_controller.py
SergioCMDev/Busines-Inteligence-applied-to-tourism
61834a46fce22453e94b7bbdf8d4ecdcf128285a
[ "Apache-2.0" ]
null
null
null
from ..DB.Repositorio_Turistas_Entrantes_INE import RepositoryTuristasEntrantesINE as DBRepository from ..Utilidades.Conversores import Conversores as Conversor def obtener_porcentaje_turistas_entrantes_en_ciudad_destino_desde_ciudad_origen_en_rango_anio_mensualmente(CiudadDestino, CiudadOrigen, AnioInicio, AnioFin):...
40.647273
219
0.763285
from ..DB.Repositorio_Turistas_Entrantes_INE import RepositoryTuristasEntrantesINE as DBRepository from ..Utilidades.Conversores import Conversores as Conversor def obtener_porcentaje_turistas_entrantes_en_ciudad_destino_desde_ciudad_origen_en_rango_anio_mensualmente(CiudadDestino, CiudadOrigen, AnioInicio, AnioFin):...
0
0
0
0b7009bcdc5db355d12c4f4c0cb1c7074cb5b9e9
5,787
py
Python
components/collector/tests/source_collectors/ojaudit/test_violations.py
Erik-Stel/quality-time
602b6970e5d9088cb89cc6d488337349e54e1c9a
[ "Apache-2.0" ]
null
null
null
components/collector/tests/source_collectors/ojaudit/test_violations.py
Erik-Stel/quality-time
602b6970e5d9088cb89cc6d488337349e54e1c9a
[ "Apache-2.0" ]
null
null
null
components/collector/tests/source_collectors/ojaudit/test_violations.py
Erik-Stel/quality-time
602b6970e5d9088cb89cc6d488337349e54e1c9a
[ "Apache-2.0" ]
null
null
null
"""Unit tests for the OJAudit violations collector.""" from ..source_collector_test_case import SourceCollectorTestCase class OJAuditViolationsTest(SourceCollectorTestCase): """Unit tests for the OJAudit violations collector.""" SOURCE_TYPE = "ojaudit" METRIC_TYPE = "violations" async def test_viol...
29.227273
92
0.561604
"""Unit tests for the OJAudit violations collector.""" from ..source_collector_test_case import SourceCollectorTestCase class OJAuditViolationsTest(SourceCollectorTestCase): """Unit tests for the OJAudit violations collector.""" SOURCE_TYPE = "ojaudit" METRIC_TYPE = "violations" async def test_viol...
0
0
0
082f8f5fa91995970b233c68b4a4869d27e72382
6,944
py
Python
test/terra/utils/ref_initialize.py
mtreinish/qiskit-aer
ef2e910b474379bb3a6f45e1b4f42cc3dc39c0c0
[ "Apache-2.0" ]
null
null
null
test/terra/utils/ref_initialize.py
mtreinish/qiskit-aer
ef2e910b474379bb3a6f45e1b4f42cc3dc39c0c0
[ "Apache-2.0" ]
null
null
null
test/terra/utils/ref_initialize.py
mtreinish/qiskit-aer
ef2e910b474379bb3a6f45e1b4f42cc3dc39c0c0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2019, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """ Test circuits and reference outputs for initialize instruction. """ from numpy import array, sqrt from qiskit import Qua...
38.364641
99
0.461262
# -*- coding: utf-8 -*- # Copyright 2019, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """ Test circuits and reference outputs for initialize instruction. """ from numpy import array, sqrt from qiskit import Qua...
0
0
0
323b5d48da016bc843d202f8e62a412a1d10efa8
14,279
py
Python
scripts/geodata/addresses/units.py
Fillr/libpostal
bce153188aff9fbe65aef12c3c639d8069e707fc
[ "MIT" ]
3,489
2015-03-03T00:21:38.000Z
2022-03-29T09:03:05.000Z
scripts/geodata/addresses/units.py
StephenHildebrand/libpostal
d8c9847c5686a1b66056e65128e1774f060ff36f
[ "MIT" ]
488
2015-05-29T23:04:28.000Z
2022-03-29T11:20:24.000Z
scripts/geodata/addresses/units.py
StephenHildebrand/libpostal
d8c9847c5686a1b66056e65128e1774f060ff36f
[ "MIT" ]
419
2015-11-24T16:53:07.000Z
2022-03-27T06:51:28.000Z
import itertools import random import six from geodata.addresses.config import address_config from geodata.addresses.directions import RelativeDirection, LateralDirection, AnteroposteriorDirection from geodata.addresses.floors import Floor from geodata.addresses.numbering import NumberedComponent, sample_alphabet, lat...
49.926573
165
0.61671
import itertools import random import six from geodata.addresses.config import address_config from geodata.addresses.directions import RelativeDirection, LateralDirection, AnteroposteriorDirection from geodata.addresses.floors import Floor from geodata.addresses.numbering import NumberedComponent, sample_alphabet, lat...
10,673
3,038
23
b3e7cc95229ebb81ae9e4c304046134dc45b170f
1,336
py
Python
tests/func_tests/test_hints.py
grololo06/jinja2schema
f8bb41d3bac44349fab049673f5d08cd5a8acf48
[ "BSD-3-Clause" ]
null
null
null
tests/func_tests/test_hints.py
grololo06/jinja2schema
f8bb41d3bac44349fab049673f5d08cd5a8acf48
[ "BSD-3-Clause" ]
1
2020-09-02T13:00:23.000Z
2020-09-02T13:00:23.000Z
tests/func_tests/test_hints.py
grololo06/jinja2schema
f8bb41d3bac44349fab049673f5d08cd5a8acf48
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 import pytest from jinja2 import PackageLoader, Environment from jinja2schema.config import Config from jinja2schema.core import infer from jinja2schema.model import Dictionary, String @pytest.fixture # noinspection PyUnusedLocal # noinspection PyUnusedLocal @pytest.fixture
23.857143
152
0.677395
# coding: utf-8 import pytest from jinja2 import PackageLoader, Environment from jinja2schema.config import Config from jinja2schema.core import infer from jinja2schema.model import Dictionary, String @pytest.fixture def env(): loader = PackageLoader('tests', 'templates') return Environment(loader=loader) ...
900
0
134
758c113640674f72d739e6b93e1e55b4d8b9b772
2,220
py
Python
challenge_1_test.py
canberkgurel/Path-Planning-with-Holonomic-Constraints
939aedf4d23e8f9e21c5675f9b98b8605ea88ac2
[ "MIT" ]
null
null
null
challenge_1_test.py
canberkgurel/Path-Planning-with-Holonomic-Constraints
939aedf4d23e8f9e21c5675f9b98b8605ea88ac2
[ "MIT" ]
null
null
null
challenge_1_test.py
canberkgurel/Path-Planning-with-Holonomic-Constraints
939aedf4d23e8f9e21c5675f9b98b8605ea88ac2
[ "MIT" ]
1
2019-09-30T01:00:03.000Z
2019-09-30T01:00:03.000Z
#!/usr/bin/env python import sys import numpy as np import unittest from path_finder import PathFinder from path_validator import PathValidator from path_visualizer import PathVisualizer from waypoint import Waypoint if __name__ == '__main__': if '--viz' in sys.argv: Challenge1TestCase.VIZ = True ...
29.210526
76
0.568919
#!/usr/bin/env python import sys import numpy as np import unittest from path_finder import PathFinder from path_validator import PathValidator from path_visualizer import PathVisualizer from waypoint import Waypoint class Challenge1TestCase(unittest.TestCase): VIZ = False def setUp(self): self.pa...
1,610
229
23
407272fef3de45eeb6c18d580f32522f8ee584ea
5,492
py
Python
Fingerprint/Fingerprint.py
ShivamDa/Postioning_Systems_and_Techniques
2e9c78fecd3121f9c78a673d81a40930a5e71c61
[ "Apache-2.0" ]
1
2021-12-31T01:42:22.000Z
2021-12-31T01:42:22.000Z
Fingerprint/Fingerprint.py
ShivamDa/Postioning_Systems_and_Techniques
2e9c78fecd3121f9c78a673d81a40930a5e71c61
[ "Apache-2.0" ]
null
null
null
Fingerprint/Fingerprint.py
ShivamDa/Postioning_Systems_and_Techniques
2e9c78fecd3121f9c78a673d81a40930a5e71c61
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Mar 15 15:15:56 2021 @author: Shiv """ from math import sqrt from numpy import arange import datetime from operator import itemgetter as ig # define the cell class # K-nearest Neighbors(Choose 4 nearest APs out of the whole list we have) # Calcul...
34.980892
126
0.537509
# -*- coding: utf-8 -*- """ Created on Mon Mar 15 15:15:56 2021 @author: Shiv """ from math import sqrt from numpy import arange import datetime from operator import itemgetter as ig class Location(): def __init__(self, x=0, y=0, z=0): self.x = x self.y = y self.z = z ...
2,845
520
435
353a8069c1d2107faef927177d814c053b772e01
11,668
py
Python
src/python/CarTrackerPiCam.py
globalfish/kitt
17bbdd21f31795a96d2bf6518ca32a8513706f5c
[ "MIT" ]
null
null
null
src/python/CarTrackerPiCam.py
globalfish/kitt
17bbdd21f31795a96d2bf6518ca32a8513706f5c
[ "MIT" ]
null
null
null
src/python/CarTrackerPiCam.py
globalfish/kitt
17bbdd21f31795a96d2bf6518ca32a8513706f5c
[ "MIT" ]
null
null
null
# # Car sensor demo using OpenCV # # Author: vswamina, Sept 2017. # 2017_09_09 Created from code in globalfish/FaceTracker # With a lot of help from the Internet import cv2 import json import threading import time from espeak import espeak # # Type of camera you want to use: we keep the code here but we shall use the...
30.385417
95
0.562307
# # Car sensor demo using OpenCV # # Author: vswamina, Sept 2017. # 2017_09_09 Created from code in globalfish/FaceTracker # With a lot of help from the Internet import cv2 import json import threading import time from espeak import espeak # # Type of camera you want to use: we keep the code here but we shall use the...
8,418
-5
914
05002c3b63654f0905f0357d78128acf8d0998a1
1,155
py
Python
ipmi-figures/results/merge_csv.py
hichamjanati/mwe
cc9a20e76ac94b7031f8d83c7b959d1eac374fe9
[ "BSD-2-Clause" ]
2
2019-05-30T21:28:48.000Z
2019-11-05T16:02:17.000Z
ipmi-figures/results/merge_csv.py
hichamjanati/mwe
cc9a20e76ac94b7031f8d83c7b959d1eac374fe9
[ "BSD-2-Clause" ]
null
null
null
ipmi-figures/results/merge_csv.py
hichamjanati/mwe
cc9a20e76ac94b7031f8d83c7b959d1eac374fe9
[ "BSD-2-Clause" ]
null
null
null
import pandas as pd import os from time import ctime dataset = "camcan" if os.path.exists("/home/parietal/"): results_path = "/home/parietal/hjanati/csvs/%s/" % dataset else: data_path = "~/Dropbox/neuro_transport/code/mtw_experiments/meg/" data_path = os.path.expanduser(data_path) results_path = data...
31.216216
82
0.581818
import pandas as pd import os from time import ctime dataset = "camcan" if os.path.exists("/home/parietal/"): results_path = "/home/parietal/hjanati/csvs/%s/" % dataset else: data_path = "~/Dropbox/neuro_transport/code/mtw_experiments/meg/" data_path = os.path.expanduser(data_path) results_path = data...
0
0
0
744b24ae6ebb4de7c96858d86ffe8667cd8b8644
791
py
Python
btcadvisor-back/api/urls.py
DavidTF85/btcadvisor-back
9340913b67eb82655ef5ebc21af6f697db886d71
[ "BSD-3-Clause" ]
null
null
null
btcadvisor-back/api/urls.py
DavidTF85/btcadvisor-back
9340913b67eb82655ef5ebc21af6f697db886d71
[ "BSD-3-Clause" ]
null
null
null
btcadvisor-back/api/urls.py
DavidTF85/btcadvisor-back
9340913b67eb82655ef5ebc21af6f697db886d71
[ "BSD-3-Clause" ]
null
null
null
""" api/urls.py """ from django.urls import path from rest_framework.urlpatterns import format_suffix_patterns from rest_framework.authtoken.views import obtain_auth_token from api import views urlpatterns = [ #---------------------------# # UNPROTECTED API ENDPOINTS # # ----------------------...
29.296296
77
0.65866
""" api/urls.py """ from django.urls import path from rest_framework.urlpatterns import format_suffix_patterns from rest_framework.authtoken.views import obtain_auth_token from api import views urlpatterns = [ #---------------------------# # UNPROTECTED API ENDPOINTS # # ----------------------...
0
0
0
9b284ece554f8a4c437f258d747a80898181b100
1,932
py
Python
our_data/views.py
leoromanini/covid-django_rest-spark-example
752ac4f1eb8b1525f89420e67e02305b25ae192a
[ "MIT" ]
1
2021-04-29T19:05:24.000Z
2021-04-29T19:05:24.000Z
our_data/views.py
leoromanini/covid-django_rest-spark-example
752ac4f1eb8b1525f89420e67e02305b25ae192a
[ "MIT" ]
null
null
null
our_data/views.py
leoromanini/covid-django_rest-spark-example
752ac4f1eb8b1525f89420e67e02305b25ae192a
[ "MIT" ]
null
null
null
from django.shortcuts import render, HttpResponse from .models import Report from .spark_funcs import process_json_data, get_json_covid_our_data from .serializers import ReportSerializer from rest_framework import viewsets from rest_framework import permissions class ReportViewSet(viewsets.ModelViewSet): """ ...
40.25
92
0.652174
from django.shortcuts import render, HttpResponse from .models import Report from .spark_funcs import process_json_data, get_json_covid_our_data from .serializers import ReportSerializer from rest_framework import viewsets from rest_framework import permissions class ReportViewSet(viewsets.ModelViewSet): """ ...
0
0
0
07df5331bfbacb79aafe4ae5060cfc42d11e176d
8,203
py
Python
modelci/hub/utils.py
HuaizhengZhang/ML-Model-CI
8866f752f2afbd206876d74388c0e0ddc98f262a
[ "Apache-2.0" ]
null
null
null
modelci/hub/utils.py
HuaizhengZhang/ML-Model-CI
8866f752f2afbd206876d74388c0e0ddc98f262a
[ "Apache-2.0" ]
null
null
null
modelci/hub/utils.py
HuaizhengZhang/ML-Model-CI
8866f752f2afbd206876d74388c0e0ddc98f262a
[ "Apache-2.0" ]
null
null
null
import re from collections import defaultdict from enum import unique, Enum from pathlib import Path from typing import Union import numpy as np import tensorflow as tf import tensorrtserver.api.model_config_pb2 as model_config import torch from tensorrtserver.api import ServerStatusContext from modelci.types.bo impo...
36.620536
115
0.641229
import re from collections import defaultdict from enum import unique, Enum from pathlib import Path from typing import Union import numpy as np import tensorflow as tf import tensorrtserver.api.model_config_pb2 as model_config import torch from tensorrtserver.api import ServerStatusContext from modelci.types.bo impo...
2,356
0
69
a89e08018bb2353626ed438848fb2416d97f2887
26
py
Python
src/smugapi/__init__.py
threatsimple/smugapi
0e2e5ecb3c3076b9b8dd8342371de21fa9c4a8c4
[ "MIT" ]
null
null
null
src/smugapi/__init__.py
threatsimple/smugapi
0e2e5ecb3c3076b9b8dd8342371de21fa9c4a8c4
[ "MIT" ]
null
null
null
src/smugapi/__init__.py
threatsimple/smugapi
0e2e5ecb3c3076b9b8dd8342371de21fa9c4a8c4
[ "MIT" ]
null
null
null
version = "__VERSION__"
6.5
23
0.692308
version = "__VERSION__"
0
0
0
21f7aa3b969faebe9334fd75b208079f99755a3a
1,606
py
Python
shop_services/common_service/register/register.py
CodePrometheus/Starry-Supermarket
c4a98ce563e7e21fc55bc1749417dc4b9d1529f7
[ "MIT" ]
null
null
null
shop_services/common_service/register/register.py
CodePrometheus/Starry-Supermarket
c4a98ce563e7e21fc55bc1749417dc4b9d1529f7
[ "MIT" ]
null
null
null
shop_services/common_service/register/register.py
CodePrometheus/Starry-Supermarket
c4a98ce563e7e21fc55bc1749417dc4b9d1529f7
[ "MIT" ]
null
null
null
import random import consul import requests from shop_services.common_service.register import base
30.301887
98
0.562889
import random import consul import requests from shop_services.common_service.register import base class ConsulRegister(base.Register): def __init__(self, host, port): self.host = host self.port = port self.consul = consul.Consul(host, port) def register(self, name, id, addr, port, ...
1,305
15
184
afcaa68a88387622db7a3939e8d7e34f6165eb0c
22,611
py
Python
Main.py
Saikat299792458/YT-Downloader
5fdc0bdd798f6a47ea2d9dd6e8a01ae131bdbc84
[ "MIT" ]
null
null
null
Main.py
Saikat299792458/YT-Downloader
5fdc0bdd798f6a47ea2d9dd6e8a01ae131bdbc84
[ "MIT" ]
null
null
null
Main.py
Saikat299792458/YT-Downloader
5fdc0bdd798f6a47ea2d9dd6e8a01ae131bdbc84
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'Main.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCor...
52.953162
113
0.698642
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'Main.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCor...
22,167
7
81
45675533bb2ac54653d03e5e52c1b229134c3c87
1,749
py
Python
bmw/bmw/pipelines.py
chlbupt/scrapy_demp
6324cb4bdd7fc714f829c7f74c47dbf57244a0c0
[ "bzip2-1.0.6" ]
null
null
null
bmw/bmw/pipelines.py
chlbupt/scrapy_demp
6324cb4bdd7fc714f829c7f74c47dbf57244a0c0
[ "bzip2-1.0.6" ]
null
null
null
bmw/bmw/pipelines.py
chlbupt/scrapy_demp
6324cb4bdd7fc714f829c7f74c47dbf57244a0c0
[ "bzip2-1.0.6" ]
null
null
null
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html import os from urllib import request from scrapy.pipelines.images import ImagesPipeline from bmw import settings
36.4375
89
0.666667
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html import os from urllib import request from scrapy.pipelines.images import ImagesPipeline from bmw import settings class BmwPi...
1,265
24
152
793266eb5b6f71a1475b3ba5b066cb3ccac05f80
325
py
Python
src/atomstoys/__init__.py
craabreu/atomstoys
878da463f21d3443f74b2ad803ecd8dd047c25dc
[ "MIT" ]
null
null
null
src/atomstoys/__init__.py
craabreu/atomstoys
878da463f21d3443f74b2ad803ecd8dd047c25dc
[ "MIT" ]
null
null
null
src/atomstoys/__init__.py
craabreu/atomstoys
878da463f21d3443f74b2ad803ecd8dd047c25dc
[ "MIT" ]
null
null
null
__version__ = '0.0.0' from ._atomstoys import ffi as _ffi from ._atomstoys import lib as _lib
23.214286
64
0.624615
__version__ = '0.0.0' from ._atomstoys import ffi as _ffi from ._atomstoys import lib as _lib def longest(args): args = [_ffi.new('char[]', arg) for arg in args] result = _lib.longest(len(args), _ffi.new('char *[]', args)) if result == _ffi.NULL: return '' else: return _ffi.string(res...
206
0
23
bfc3bbbb4920414359279e3d1fe322faf16df70a
4,516
py
Python
TCP/server.py
RouquinBlanc/tuto_python
ca92453162a91b725bbcb1479c18d0527ddc2215
[ "MIT" ]
null
null
null
TCP/server.py
RouquinBlanc/tuto_python
ca92453162a91b725bbcb1479c18d0527ddc2215
[ "MIT" ]
null
null
null
TCP/server.py
RouquinBlanc/tuto_python
ca92453162a91b725bbcb1479c18d0527ddc2215
[ "MIT" ]
null
null
null
import asyncio import functools import logging logger = logging.getLogger(__name__) user_cnt = 0 HELP = "%Commandes: !help, !quit, !join:pseudo, !list\n" async def main(): """ Main function, may be called from shotcut command """ import argparse parser = argparse.ArgumentParser() parser....
32.724638
114
0.505314
import asyncio import functools import logging logger = logging.getLogger(__name__) user_cnt = 0 HELP = "%Commandes: !help, !quit, !join:pseudo, !list\n" def broadcast(room, msg): for pseudo, writer in room.values(): writer.write(msg) def unicast(room, msg, users): for pseudo, writer in room.valu...
3,468
0
69
58c88afaa3dbfb9154f789c417326a3460d42e68
6,825
py
Python
views/loginmain.py
iahmadhere/voice-controlled-departmental-noticeboard
bfe6fa83f03c947676191f7456bc0e30f30b1bb2
[ "MIT" ]
10
2021-11-20T07:25:34.000Z
2021-12-13T05:12:01.000Z
views/loginmain.py
iahmadhere/voice-controlled-departmental-noticeboard
bfe6fa83f03c947676191f7456bc0e30f30b1bb2
[ "MIT" ]
3
2021-12-03T18:37:36.000Z
2022-01-06T18:25:46.000Z
views/loginmain.py
iahmadhere/voice-controlled-departmental-noticeboard
bfe6fa83f03c947676191f7456bc0e30f30b1bb2
[ "MIT" ]
6
2021-11-21T09:00:26.000Z
2021-12-11T06:36:35.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'loginmain.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, Qt...
47.068966
184
0.694799
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'loginmain.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, Qt...
6,180
7
76
b36112ff4969c47cd8af87f3ca8e14181ac3436c
864
py
Python
zeus/api/resources/build_failures.py
conrad-kronos/zeus
ddb6bc313e51fb22222b30822b82d76f37dbbd35
[ "Apache-2.0" ]
221
2017-07-03T17:29:21.000Z
2021-12-07T19:56:59.000Z
zeus/api/resources/build_failures.py
conrad-kronos/zeus
ddb6bc313e51fb22222b30822b82d76f37dbbd35
[ "Apache-2.0" ]
298
2017-07-04T18:08:14.000Z
2022-03-03T22:24:51.000Z
zeus/api/resources/build_failures.py
conrad-kronos/zeus
ddb6bc313e51fb22222b30822b82d76f37dbbd35
[ "Apache-2.0" ]
24
2017-07-15T13:46:45.000Z
2020-08-16T16:14:45.000Z
from zeus.config import db from zeus.db.func import array_agg_row from zeus.models import Build, FailureReason from .base_build import BaseBuildResource from ..schemas import AggregateFailureReasonSchema failurereasons_schema = AggregateFailureReasonSchema(many=True)
30.857143
84
0.679398
from zeus.config import db from zeus.db.func import array_agg_row from zeus.models import Build, FailureReason from .base_build import BaseBuildResource from ..schemas import AggregateFailureReasonSchema failurereasons_schema = AggregateFailureReasonSchema(many=True) class BuildFailuresResource(BaseBuildResource): ...
0
570
23
2ff921e9027d088957043c416f9aff0ddc223ffb
4,177
py
Python
utils/blender_utils.py
ChrizH/data-science-learning
c5770955256ef535e22346f977fb070db98a135d
[ "Apache-2.0" ]
1
2021-09-22T20:32:05.000Z
2021-09-22T20:32:05.000Z
utils/blender_utils.py
ChrizH/data-science-learning
c5770955256ef535e22346f977fb070db98a135d
[ "Apache-2.0" ]
null
null
null
utils/blender_utils.py
ChrizH/data-science-learning
c5770955256ef535e22346f977fb070db98a135d
[ "Apache-2.0" ]
1
2021-09-22T20:31:55.000Z
2021-09-22T20:31:55.000Z
import bpy import bmesh is_blender_28 = bpy.app.version[1] >= 80 def delete_all(obj_type: str='MESH'): """Delete all objects of the given type from the current scene""" for obj in bpy.data.objects: if is_blender_28: pass else: obj.hide = False obj.select =...
26.27044
116
0.696912
import bpy import bmesh is_blender_28 = bpy.app.version[1] >= 80 def delete_all(obj_type: str='MESH'): """Delete all objects of the given type from the current scene""" for obj in bpy.data.objects: if is_blender_28: pass else: obj.hide = False obj.select =...
1,912
0
137
da4e9dcc23ea8b3870d9b91f9df161e7d74e5830
1,759
py
Python
apps/fractional_cover/utils/create_color_scale_png.py
pinkerltm/datacube-ui
325d404a994d49c23922e7de10c7ab244b78500b
[ "Apache-2.0" ]
null
null
null
apps/fractional_cover/utils/create_color_scale_png.py
pinkerltm/datacube-ui
325d404a994d49c23922e7de10c7ab244b78500b
[ "Apache-2.0" ]
null
null
null
apps/fractional_cover/utils/create_color_scale_png.py
pinkerltm/datacube-ui
325d404a994d49c23922e7de10c7ab244b78500b
[ "Apache-2.0" ]
1
2021-06-08T14:06:55.000Z
2021-06-08T14:06:55.000Z
import numpy as np import matplotlib.pyplot as plt from matplotlib.path import Path from matplotlib.patches import PathPatch plt.figure(figsize=(5,5)) # Determine the x and y values to use for sample points. num_edge_pts = 50 # Change this to change the resolution of the result. xy_rng = (0, 1) pt_sp = (xy_rng[1] - x...
39.088889
71
0.677089
import numpy as np import matplotlib.pyplot as plt from matplotlib.path import Path from matplotlib.patches import PathPatch plt.figure(figsize=(5,5)) # Determine the x and y values to use for sample points. num_edge_pts = 50 # Change this to change the resolution of the result. xy_rng = (0, 1) pt_sp = (xy_rng[1] - x...
0
0
0
21a2d0837baef1c009d3dacd4419bb5e4b232991
2,420
py
Python
pomp/spaces/geodesicspace.py
Aand1/pyOptimalMotionPlanning
5f06b4331149b86538e1ecfa7ccb9915c8cb510a
[ "Apache-2.0" ]
null
null
null
pomp/spaces/geodesicspace.py
Aand1/pyOptimalMotionPlanning
5f06b4331149b86538e1ecfa7ccb9915c8cb510a
[ "Apache-2.0" ]
null
null
null
pomp/spaces/geodesicspace.py
Aand1/pyOptimalMotionPlanning
5f06b4331149b86538e1ecfa7ccb9915c8cb510a
[ "Apache-2.0" ]
1
2021-07-07T16:15:52.000Z
2021-07-07T16:15:52.000Z
from klampt import vectorops import math class CartesianSpace(GeodesicSpace): """The standard geodesic on R^d""" class MultiGeodesicSpace: """This forms the cartesian product of one or more GeodesicSpace's. Distances are simply added together."""
31.428571
76
0.550826
from klampt import vectorops import math class GeodesicSpace: def dimension(self): raise NotImplementedError() def distance(self,a,b): return vectorops.distance(a,b) def interpolate(self,a,b,u): return vectorops.interpolate(a,b,u) def difference(self,a,b): """For Lie gro...
1,306
596
257
9327c3b45e83f090696ab3a5416cb4ac3cb72837
1,551
py
Python
src/preprocessing/create_bags.py
gregoryverghese/breastcancer-prediction
556f651e5c90428d3eb0dd135c8e3ed48a5cfdd0
[ "MIT" ]
null
null
null
src/preprocessing/create_bags.py
gregoryverghese/breastcancer-prediction
556f651e5c90428d3eb0dd135c8e3ed48a5cfdd0
[ "MIT" ]
null
null
null
src/preprocessing/create_bags.py
gregoryverghese/breastcancer-prediction
556f651e5c90428d3eb0dd135c8e3ed48a5cfdd0
[ "MIT" ]
null
null
null
import os import glob import random import cv2 import numpy as np import pandas as pd import torch from PIL import Image from torch.utils.data import Dataset, DataLoader from torchvision import datasets, transforms
28.722222
81
0.605416
import os import glob import random import cv2 import numpy as np import pandas as pd import torch from PIL import Image from torch.utils.data import Dataset, DataLoader from torchvision import datasets, transforms class ICIARBags(Dataset): def __init__(self,patch_path,n=200,key={},name='labels'): self.n...
1,220
4
103
6fd2262096be30713d05194cbd8406452f35f068
4,876
py
Python
tests/parser_test.py
Dmitriy1594/TelegramParser
163c5d26798b302bf37754f95e2d6623f23a13a8
[ "MIT" ]
1
2021-07-14T19:56:50.000Z
2021-07-14T19:56:50.000Z
tests/parser_test.py
dromakin/TelegramParser
163c5d26798b302bf37754f95e2d6623f23a13a8
[ "MIT" ]
null
null
null
tests/parser_test.py
dromakin/TelegramParser
163c5d26798b302bf37754f95e2d6623f23a13a8
[ "MIT" ]
null
null
null
import configparser import json from telethon.sync import TelegramClient from telethon import connection # для корректного переноса времени сообщений в json from datetime import date, datetime # классы для работы с каналами from telethon.tl.functions.channels import GetParticipantsRequest from telethon.tl.types impo...
37.221374
96
0.654635
import configparser import json from telethon.sync import TelegramClient from telethon import connection # для корректного переноса времени сообщений в json from datetime import date, datetime # классы для работы с каналами from telethon.tl.functions.channels import GetParticipantsRequest from telethon.tl.types impo...
396
0
54
31e319b9d7eead7336bb81d046fbd8aa0bcd95c9
1,214
py
Python
datadownloader/APIClient/MeetupClient.py
abhishek9sharma/MeetupDataCollection
dc528a4490e3b288022fe2943045e2f9df8a2b8b
[ "MIT" ]
null
null
null
datadownloader/APIClient/MeetupClient.py
abhishek9sharma/MeetupDataCollection
dc528a4490e3b288022fe2943045e2f9df8a2b8b
[ "MIT" ]
null
null
null
datadownloader/APIClient/MeetupClient.py
abhishek9sharma/MeetupDataCollection
dc528a4490e3b288022fe2943045e2f9df8a2b8b
[ "MIT" ]
null
null
null
__author__ = 'abhisheksh' import json import meetup.api import pandas as pd
24.77551
86
0.670511
__author__ = 'abhisheksh' import json import meetup.api import pandas as pd class MeetUpClient: def __init__(self,config=None): if(config is None): self.config=self.ReadDefaultConfig() else: self.config=config self.InitClient() def InitClient(self): ...
865
-2
265
0ee277313e9c6fa3f289937e4fb6c75132739d2e
6,277
py
Python
sgf_wrapper.py
scghfc/debug-mugo
4357a58e31390a35581eb9dcf4d0e430fda5a958
[ "Apache-2.0" ]
null
null
null
sgf_wrapper.py
scghfc/debug-mugo
4357a58e31390a35581eb9dcf4d0e430fda5a958
[ "Apache-2.0" ]
null
null
null
sgf_wrapper.py
scghfc/debug-mugo
4357a58e31390a35581eb9dcf4d0e430fda5a958
[ "Apache-2.0" ]
null
null
null
""" Code to extract a series of positions + their next moves from an SGF. Most of the complexity here is dealing with two features of SGF: - Stones can be added via "play move" or "add move", the latter being used to configure L+D puzzles, but also for initial handicap placement. - Plays don't necessarily alternate ...
35.463277
138
0.675641
""" Code to extract a series of positions + their next moves from an SGF. Most of the complexity here is dealing with two features of SGF: - Stones can be added via "play move" or "add move", the latter being used to configure L+D puzzles, but also for initial handicap placement. - Plays don't necessarily alternate ...
1,464
65
191
aec0203723f6e626120fd292d6f4086b2a8aab36
2,382
py
Python
Incident-Response/Tools/cyphon/cyphon/cyphon/forms.py
sn0b4ll/Incident-Playbook
cf519f58fcd4255674662b3620ea97c1091c1efb
[ "MIT" ]
1
2021-07-24T17:22:50.000Z
2021-07-24T17:22:50.000Z
Incident-Response/Tools/cyphon/cyphon/cyphon/forms.py
sn0b4ll/Incident-Playbook
cf519f58fcd4255674662b3620ea97c1091c1efb
[ "MIT" ]
2
2022-02-28T03:40:31.000Z
2022-02-28T03:40:52.000Z
Incident-Response/Tools/cyphon/cyphon/cyphon/forms.py
sn0b4ll/Incident-Playbook
cf519f58fcd4255674662b3620ea97c1091c1efb
[ "MIT" ]
2
2022-02-25T08:34:51.000Z
2022-03-16T17:29:44.000Z
# -*- coding: utf-8 -*- # Copyright 2017-2019 ControlScan, Inc. # # This file is part of Cyphon Engine. # # Cyphon Engine 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, version 3 of the License. # # Cyphon En...
28.023529
71
0.693535
# -*- coding: utf-8 -*- # Copyright 2017-2019 ControlScan, Inc. # # This file is part of Cyphon Engine. # # Cyphon Engine 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, version 3 of the License. # # Cyphon En...
146
53
81
b3364e91abd494d69c0b08186dfb39230a8966e6
1,387
py
Python
leet/plan/data_structures/graph/data_structures/graphs/bfs_print.py
manojkumar-github/DataStructures-DynamicProgramming-in-Python-JAVA-Cplusplus
16722a60c4c744ad3d240469b28f5d6ab6e9c25d
[ "MIT" ]
null
null
null
leet/plan/data_structures/graph/data_structures/graphs/bfs_print.py
manojkumar-github/DataStructures-DynamicProgramming-in-Python-JAVA-Cplusplus
16722a60c4c744ad3d240469b28f5d6ab6e9c25d
[ "MIT" ]
null
null
null
leet/plan/data_structures/graph/data_structures/graphs/bfs_print.py
manojkumar-github/DataStructures-DynamicProgramming-in-Python-JAVA-Cplusplus
16722a60c4c744ad3d240469b28f5d6ab6e9c25d
[ "MIT" ]
null
null
null
""" BFS - Breadth First Search 1) In graphs - we may visit same node more than once 2) Use a boolean array 3) DefaultDict - Representation """ from collections import defaultdict if __name__ == "__main__": g = Graph() g.add_edge(0, 1) g.add_edge(0, 2) g.add_edge(1, 2) g.add_edge(2, 0) g.add_ed...
28.895833
65
0.610671
""" BFS - Breadth First Search 1) In graphs - we may visit same node more than once 2) Use a boolean array 3) DefaultDict - Representation """ from collections import defaultdict class Graph(object): def __init__(self): # default dictionary to store graphs self.graph = defaultdict(list) def a...
823
-1
103
ae071ec3a467fc2744ad923cafe16f2ad8f6573c
290
py
Python
steps/step05/persistence/RecipeStore.py
michalporeba/cooking-with-python
a580e3813910267ebbfc95186b9fea99f8b3cfcf
[ "MIT" ]
null
null
null
steps/step05/persistence/RecipeStore.py
michalporeba/cooking-with-python
a580e3813910267ebbfc95186b9fea99f8b3cfcf
[ "MIT" ]
null
null
null
steps/step05/persistence/RecipeStore.py
michalporeba/cooking-with-python
a580e3813910267ebbfc95186b9fea99f8b3cfcf
[ "MIT" ]
null
null
null
from abc import abstractmethod import io
29
62
0.724138
from abc import abstractmethod import io class RecipeStore(): @abstractmethod def read_all(self, file: io.TextIOWrapper) -> list: raise NotImplementedError @abstractmethod def save_all(self, file: io.TextIOWrapper, recipes: list): raise NotImplementedError
135
91
23
2dd6c9b4bc456272ea86ff0b286f5cbd24b26f2e
3,740
py
Python
tei.py
jfkist/tei_corpus_analysis
1fcfdb74f8741b805a88a6c56230d2a2a3c111b9
[ "MIT" ]
null
null
null
tei.py
jfkist/tei_corpus_analysis
1fcfdb74f8741b805a88a6c56230d2a2a3c111b9
[ "MIT" ]
null
null
null
tei.py
jfkist/tei_corpus_analysis
1fcfdb74f8741b805a88a6c56230d2a2a3c111b9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' FILE: AUTHOR: jan ''' import re import xml.etree.ElementTree as ET from functools import cached_property if __name__=='__main__': main()
28.333333
106
0.544652
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' FILE: AUTHOR: jan ''' import re import xml.etree.ElementTree as ET from functools import cached_property class XmlStr: def __init__(self, xml_str): self._str = re.sub(r"\\'", "'", str(xml_str)) #self._xml = ET.fromstring(xml_str) ...
2,764
672
100
ef657b1ef6a41d90b553776f0e3cdf6fe1dffe0b
2,902
py
Python
cli/medperf/commands/dataset/create.py
johnugeorge/medperf
5bc3f643064df14e9476bd4d4c1a4c0cce5337d5
[ "Apache-2.0" ]
1
2021-09-24T18:09:53.000Z
2021-09-24T18:09:53.000Z
cli/medperf/commands/dataset/create.py
johnugeorge/medperf
5bc3f643064df14e9476bd4d4c1a4c0cce5337d5
[ "Apache-2.0" ]
2
2021-09-27T16:14:04.000Z
2021-11-03T14:24:54.000Z
cli/medperf/commands/dataset/create.py
johnugeorge/medperf
5bc3f643064df14e9476bd4d4c1a4c0cce5337d5
[ "Apache-2.0" ]
null
null
null
import os from medperf.ui import UI from medperf.comms import Comms from medperf.entities import Benchmark, Cube, Registration from medperf.utils import ( check_cube_validity, generate_tmp_datapath, init_storage, cleanup, pretty_error, )
34.963855
88
0.658511
import os from medperf.ui import UI from medperf.comms import Comms from medperf.entities import Benchmark, Cube, Registration from medperf.utils import ( check_cube_validity, generate_tmp_datapath, init_storage, cleanup, pretty_error, ) class DataPreparation: @classmethod def run( ...
2,467
152
23
34fe3b6d4c2ee6354c3a4880eccd1e60fdbf3de9
984
py
Python
germanet/export_tensorflow.py
Merve40/nball4tree
00a6adcb2673a751178b04896930ad4237bd5b20
[ "MIT" ]
null
null
null
germanet/export_tensorflow.py
Merve40/nball4tree
00a6adcb2673a751178b04896930ad4237bd5b20
[ "MIT" ]
null
null
null
germanet/export_tensorflow.py
Merve40/nball4tree
00a6adcb2673a751178b04896930ad4237bd5b20
[ "MIT" ]
null
null
null
def export(w2v, ws_child, out_dir): """ Exports the word-to-vec file to tsv files as input for tensorflow. :param w2v: word-to-vec file :param ws_child: tree file :param out_dir: output directory for the files to generate """ if not out_dir.endswith('/'): out_dir = out_dir+'/' ...
29.818182
70
0.541667
def export(w2v, ws_child, out_dir): """ Exports the word-to-vec file to tsv files as input for tensorflow. :param w2v: word-to-vec file :param ws_child: tree file :param out_dir: output directory for the files to generate """ if not out_dir.endswith('/'): out_dir = out_dir+'/' ...
0
0
0
f469b352f4770ce8a84b8abf8645c3867a05f901
8,723
py
Python
colorizer.py
Kronuz/Text-Marker
651c1ab999f2088191c225cf5008cafd6dbf1dda
[ "MIT" ]
97
2018-07-05T06:52:11.000Z
2022-03-06T18:43:32.000Z
colorizer.py
Kronuz/Text-Marker
651c1ab999f2088191c225cf5008cafd6dbf1dda
[ "MIT" ]
24
2018-07-01T15:59:21.000Z
2022-03-04T13:16:38.000Z
colorizer.py
Kronuz/Color-Highlight
c50f256468305125f9db5804658d2084a8c94bf4
[ "MIT" ]
18
2018-10-07T05:53:11.000Z
2021-03-30T20:56:41.000Z
from __future__ import print_function import os import re import sys import json import errno import plistlib import datetime import sublime from .colors import names_to_hex, xterm_to_hex, xterm8_to_hex, xterm8b_to_hex, xterm8f_to_hex DEFAULT_COLOR_SCHEME = 'Monokai.sublime-color-scheme' all_names_to_hex = dict(na...
32.427509
136
0.520578
from __future__ import print_function import os import re import sys import json import errno import plistlib import datetime import sublime from .colors import names_to_hex, xterm_to_hex, xterm8_to_hex, xterm8b_to_hex, xterm8f_to_hex DEFAULT_COLOR_SCHEME = 'Monokai.sublime-color-scheme' all_names_to_hex = dict(na...
7,244
638
115
4b12822e6d65a0051203be96bd6a9d55228e0811
24
py
Python
testsuite/modulegraph-dir/package/diamond_b2.py
xoviat/modulegraph2
766d00bdb40e5b2fe206b53a87b1bce3f9dc9c2a
[ "MIT" ]
9
2020-03-22T14:48:01.000Z
2021-05-30T12:18:12.000Z
testsuite/modulegraph-dir/package/diamond_b2.py
xoviat/modulegraph2
766d00bdb40e5b2fe206b53a87b1bce3f9dc9c2a
[ "MIT" ]
15
2020-01-06T10:02:32.000Z
2021-05-28T12:22:44.000Z
testsuite/modulegraph-dir/package/diamond_b1.py
ronaldoussoren/modulegraph2
b6ab1766b0098651b51083235ff8a18a5639128b
[ "MIT" ]
4
2020-05-10T18:51:41.000Z
2021-04-07T14:03:12.000Z
from . import diamond_c
12
23
0.791667
from . import diamond_c
0
0
0
49222c4a18405f7652853f995d9d05d3bc96fcba
7,334
py
Python
pong.py
nmg322/Pong
dceba52af7148abb13f067ef63636e680102a971
[ "MIT" ]
null
null
null
pong.py
nmg322/Pong
dceba52af7148abb13f067ef63636e680102a971
[ "MIT" ]
null
null
null
pong.py
nmg322/Pong
dceba52af7148abb13f067ef63636e680102a971
[ "MIT" ]
null
null
null
import sys import random import pygame if __name__ == "__main__": # Initilize PyGame pygame.init() # Set screen size SCREEN_SIZE = pygame.display.Info().current_w, pygame.display.Info().current_h # Object dimensions PADDLE1_WIDTH = SCREEN_SIZE[1]//10 PADDLE1_HEIGHT = SCREEN_SIZE[0]//1...
36.487562
136
0.581947
import sys import random import pygame class Pong: def __init__(self): # Create screen self.screen = pygame.display.set_mode(SCREEN_SIZE, pygame.FULLSCREEN) pygame.display.set_caption("Atari Pong") self.clock = pygame.time.Clock() if pygame.font: self.font = ...
6,120
-10
239
f0b60186a7bceae7cabee1132eb82389a1736634
4,913
py
Python
src/App/FactoryDispatcher.py
dek4nice/Zope
ec4765fc0007c4e78aafcbeef510077444f8551a
[ "ZPL-2.1" ]
1
2018-11-30T12:39:27.000Z
2018-11-30T12:39:27.000Z
src/App/FactoryDispatcher.py
dek4nice/Zope
ec4765fc0007c4e78aafcbeef510077444f8551a
[ "ZPL-2.1" ]
null
null
null
src/App/FactoryDispatcher.py
dek4nice/Zope
ec4765fc0007c4e78aafcbeef510077444f8551a
[ "ZPL-2.1" ]
1
2018-11-30T12:39:34.000Z
2018-11-30T12:39:34.000Z
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
29.244048
78
0.637899
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
1,475
0
135
164ff011ecfc5a3653d5ec287adb22ba3f87eb16
1,829
py
Python
epublib/epub.py
takuan-osho/epublib
99a2a2ce6b326b8118f322371279465026c793e7
[ "MIT" ]
1
2015-12-06T14:40:36.000Z
2015-12-06T14:40:36.000Z
epublib/epub.py
takuan-osho/epublib
99a2a2ce6b326b8118f322371279465026c793e7
[ "MIT" ]
2
2016-02-07T06:12:33.000Z
2016-02-10T14:50:47.000Z
epublib/epub.py
takuan-osho/epublib
99a2a2ce6b326b8118f322371279465026c793e7
[ "MIT" ]
3
2016-02-10T13:55:31.000Z
2020-06-15T06:36:41.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os from datetime import date from .templates import template_container_xml
30.483333
80
0.61345
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os from datetime import date from .templates import template_container_xml class Book(object): def __init__(self, title='', lang='en', author='', publisher='', copyright_desc='', package_doc_name='content.opf', ...
578
1,055
46
74ecdd76e559212318830819b9716649ee1c825a
506
py
Python
script/getfuncs.py
dkkloimwieder/bl602-re
ed05fb4072a649efec11cc242edfa8478ebf7dfc
[ "Apache-2.0" ]
68
2020-10-29T22:25:47.000Z
2022-03-27T09:01:37.000Z
script/getfuncs.py
dkkloimwieder/bl602-re
ed05fb4072a649efec11cc242edfa8478ebf7dfc
[ "Apache-2.0" ]
19
2020-10-29T23:07:08.000Z
2022-03-28T07:20:59.000Z
script/getfuncs.py
dkkloimwieder/bl602-re
ed05fb4072a649efec11cc242edfa8478ebf7dfc
[ "Apache-2.0" ]
23
2020-10-29T23:46:57.000Z
2022-01-10T03:26:58.000Z
#!/usr/bin/env python3 import sys src = open('../blobs/bl602_demo_wifi.ghidra.c').readlines() feature = 'DAT_44c0' if len(sys.argv) == 2: feature = sys.argv[1] outs = [] for i in sys.stdin.readlines(): fname, begin, end = i.strip().split(' ') begin = int(begin) - 1 end = int(end) slocal = src[begi...
22
59
0.571146
#!/usr/bin/env python3 import sys src = open('../blobs/bl602_demo_wifi.ghidra.c').readlines() feature = 'DAT_44c0' if len(sys.argv) == 2: feature = sys.argv[1] outs = [] for i in sys.stdin.readlines(): fname, begin, end = i.strip().split(' ') begin = int(begin) - 1 end = int(end) slocal = src[begi...
0
0
0
5f61ddd704da8a8fd0a0900aa222fb11c9f501bc
287
py
Python
Python/app.python/aula10/aula10a.py
jacksontenorio8/python
a484f019960faa5aa29177eff44a1bb1e3f3b9d0
[ "MIT" ]
null
null
null
Python/app.python/aula10/aula10a.py
jacksontenorio8/python
a484f019960faa5aa29177eff44a1bb1e3f3b9d0
[ "MIT" ]
null
null
null
Python/app.python/aula10/aula10a.py
jacksontenorio8/python
a484f019960faa5aa29177eff44a1bb1e3f3b9d0
[ "MIT" ]
null
null
null
from datetime import date data_atual = date.today()#guarda a dada atual #print(data_atual.strftime('%d/%m/%y'))#converte a data em uma str que o programador quiser data_atual_str = data_atual.strftime('%A %B %Y') print(type(data_atual)) print(data_atual_str) print(type(data_atual_str))
35.875
91
0.770035
from datetime import date data_atual = date.today()#guarda a dada atual #print(data_atual.strftime('%d/%m/%y'))#converte a data em uma str que o programador quiser data_atual_str = data_atual.strftime('%A %B %Y') print(type(data_atual)) print(data_atual_str) print(type(data_atual_str))
0
0
0
71c859b173ed51f7de6b30ae0a10bb31b1121293
2,292
py
Python
36/test_profile.py
xtakacsx/bitesofpy
91487cbf58af5eb58a0343ff2231a90c1032acb0
[ "MIT" ]
1
2020-01-10T00:05:34.000Z
2020-01-10T00:05:34.000Z
36/test_profile.py
xtakacsx/bitesofpy
91487cbf58af5eb58a0343ff2231a90c1032acb0
[ "MIT" ]
null
null
null
36/test_profile.py
xtakacsx/bitesofpy
91487cbf58af5eb58a0343ff2231a90c1032acb0
[ "MIT" ]
null
null
null
import pytest from profile import get_profile
33.705882
79
0.588569
import pytest from profile import get_profile def test_get_profile_no_name(): with pytest.raises(TypeError): assert get_profile() def test_get_profile_no_age(): with pytest.raises(TypeError): assert get_profile('tim') def test_get_profile_valueerror(): with pytest.raises(ValueError): ...
2,006
0
230
32fd60bfa95fc402f18dbdd1d8d7b124e1ce89ce
6,935
py
Python
mintbot.py
athornton1618/mintbot
c5918c7f9204377755e3547c8bf3cc397aa97cca
[ "MIT" ]
1
2021-09-07T14:57:16.000Z
2021-09-07T14:57:16.000Z
mintbot.py
athornton1618/mintbot
c5918c7f9204377755e3547c8bf3cc397aa97cca
[ "MIT" ]
null
null
null
mintbot.py
athornton1618/mintbot
c5918c7f9204377755e3547c8bf3cc397aa97cca
[ "MIT" ]
null
null
null
#mintbot.py #Automatically queries Intuit Mint for display on 5in Raspberry Pi Screen #Copyright A. Thornton 2021 import tkinter as tk import pandas as pd import os import mintapi import time import matplotlib.pyplot as plt from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg import numpy as np ...
40.319767
134
0.59553
#mintbot.py #Automatically queries Intuit Mint for display on 5in Raspberry Pi Screen #Copyright A. Thornton 2021 import tkinter as tk import pandas as pd import os import mintapi import time import matplotlib.pyplot as plt from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg import numpy as np ...
5,806
-11
162
72d116c7a5947ffd4dca8d0092976da91c8296e0
1,622
py
Python
src/layer_enforcer/interfaces.py
ZipFile/layer-enforcer
1dfe744f53fd53dd9d18cd9a6faa717f0558f141
[ "BSD-2-Clause" ]
1
2021-06-01T07:03:12.000Z
2021-06-01T07:03:12.000Z
src/layer_enforcer/interfaces.py
ZipFile/layer-enforcer
1dfe744f53fd53dd9d18cd9a6faa717f0558f141
[ "BSD-2-Clause" ]
null
null
null
src/layer_enforcer/interfaces.py
ZipFile/layer-enforcer
1dfe744f53fd53dd9d18cd9a6faa717f0558f141
[ "BSD-2-Clause" ]
null
null
null
from abc import ABCMeta, abstractmethod from dataclasses import dataclass, field from typing import AbstractSet, Iterable, Iterator, List, Optional, Protocol, Set, Tuple EMPTY_SET: AbstractSet[str] = frozenset() @dataclass(frozen=True) @dataclass @dataclass
27.965517
88
0.681258
from abc import ABCMeta, abstractmethod from dataclasses import dataclass, field from typing import AbstractSet, Iterable, Iterator, List, Optional, Protocol, Set, Tuple EMPTY_SET: AbstractSet[str] = frozenset() @dataclass(frozen=True) class Layer: name: str parent: Optional["Layer"] = field(compare=False, d...
94
1,125
135
8a7ac7f87e160e8f864dafce2acd68a6454b8a68
1,419
py
Python
tests/middleware/test_csrf_middleware.py
w3x10e8/core
d8f0ca29c2bd5e86d199391fa916ce2f5c9b0f49
[ "MIT" ]
null
null
null
tests/middleware/test_csrf_middleware.py
w3x10e8/core
d8f0ca29c2bd5e86d199391fa916ce2f5c9b0f49
[ "MIT" ]
null
null
null
tests/middleware/test_csrf_middleware.py
w3x10e8/core
d8f0ca29c2bd5e86d199391fa916ce2f5c9b0f49
[ "MIT" ]
null
null
null
from masonite.request import Request from masonite.view import View from masonite.auth.Csrf import Csrf from masonite.app import App from masonite.middleware import CsrfMiddleware from masonite.testsuite.TestSuite import generate_wsgi import pytest from masonite.exceptions import InvalidCSRFToken
36.384615
107
0.718816
from masonite.request import Request from masonite.view import View from masonite.auth.Csrf import Csrf from masonite.app import App from masonite.middleware import CsrfMiddleware from masonite.testsuite.TestSuite import generate_wsgi import pytest from masonite.exceptions import InvalidCSRFToken class TestCSRFMiddle...
985
4
131
0cd8a733f49a217cb81062ae5fe269d19890f3a1
65,641
py
Python
archive_api/tests/test_api.py
NGEET/ngt-archive
978b26b7617b5c465046121838c000c4c46022f4
[ "BSD-3-Clause-LBNL" ]
10
2017-04-15T14:43:22.000Z
2021-05-06T21:56:42.000Z
archive_api/tests/test_api.py
NGEET/ngt-archive
978b26b7617b5c465046121838c000c4c46022f4
[ "BSD-3-Clause-LBNL" ]
53
2017-06-13T20:45:26.000Z
2022-03-24T17:39:19.000Z
archive_api/tests/test_api.py
NGEET/ngt-archive
978b26b7617b5c465046121838c000c4c46022f4
[ "BSD-3-Clause-LBNL" ]
3
2017-06-16T17:34:15.000Z
2021-03-30T17:35:10.000Z
from __future__ import print_function, unicode_literals import json from unittest import mock from unittest.mock import PropertyMock import os import shutil from django.contrib.auth.models import User from django.core import mail from django.test import Client from django.test import override_settings from os.path im...
55.769754
932
0.554059
from __future__ import print_function, unicode_literals import json from unittest import mock from unittest.mock import PropertyMock import os import shutil from django.contrib.auth.models import User from django.core import mail from django.test import Client from django.test import override_settings from os.path im...
24,056
40,669
164
be83ce29519fd8318363e6b5b15e48dfd5d9ea62
2,815
py
Python
lattice.py
skourno/ee_lammps
4afcbd40e46029f9c42c1c6a9af02ad96d70a32d
[ "MIT" ]
null
null
null
lattice.py
skourno/ee_lammps
4afcbd40e46029f9c42c1c6a9af02ad96d70a32d
[ "MIT" ]
null
null
null
lattice.py
skourno/ee_lammps
4afcbd40e46029f9c42c1c6a9af02ad96d70a32d
[ "MIT" ]
null
null
null
import numpy as np import sys from operator import mul class point: """A simple point class, initialize with coordinates xyz""" xyz = np.zeros(3,np.double) class unitCell: """ The unitCell is the building block of a lattice. To initialize the kind of the unit cell needs to be defined. The choices are cub (stan...
26.308411
92
0.628064
import numpy as np import sys from operator import mul class point: """A simple point class, initialize with coordinates xyz""" xyz = np.zeros(3,np.double) def __init__(self,xyz): if (len(xyz) != 3): sys.exit('point.__init__ : ERROR - Points need to be 3-dimensional') self.xyz = np.copy(xyz) def __call_...
1,527
0
170
fa02591c28bce7e7ed7b22ad6b01d537b2c1c2d9
961
py
Python
src/utils.py
nishgaba-ai/computer-vision
00bf3fff95c5b2f31eaca7a67b7e7e74f65a7595
[ "MIT" ]
null
null
null
src/utils.py
nishgaba-ai/computer-vision
00bf3fff95c5b2f31eaca7a67b7e7e74f65a7595
[ "MIT" ]
3
2020-03-24T17:07:14.000Z
2021-02-02T22:13:39.000Z
src/utils.py
nishgaba-ai/computer-vision
00bf3fff95c5b2f31eaca7a67b7e7e74f65a7595
[ "MIT" ]
null
null
null
import numpy as np def euclideanDistance(src, targ): ''' Calculates euclidean distance between two arrays ''' try: return np.linalg.norm(a-b) except: return "Error while calculating the euclidean distances for the above data types" def isStringPalindrome(data): ''' ...
22.348837
90
0.6077
import numpy as np def euclideanDistance(src, targ): ''' Calculates euclidean distance between two arrays ''' try: return np.linalg.norm(a-b) except: return "Error while calculating the euclidean distances for the above data types" def isStringPalindrome(data): ''' ...
0
0
0
b43e5f2098930256669cd57134570d21b8dbb252
98,062
py
Python
pysnmp-with-texts/ALCATEL-IND1-SYSTEM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/ALCATEL-IND1-SYSTEM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/ALCATEL-IND1-SYSTEM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module ALCATEL-IND1-SYSTEM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ALCATEL-IND1-SYSTEM-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:18:27 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 ...
157.909823
10,518
0.785687
# # PySNMP MIB module ALCATEL-IND1-SYSTEM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ALCATEL-IND1-SYSTEM-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:18:27 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 ...
0
3,296
229
b7f3e6611afc5afbc2f5caa1317aec7be7338446
1,268
py
Python
day3/ex25_netmiko.py
tdouris1/pynet_test
6c68161a5759c2d82b14dc92fec70fda1aba679c
[ "Apache-2.0" ]
null
null
null
day3/ex25_netmiko.py
tdouris1/pynet_test
6c68161a5759c2d82b14dc92fec70fda1aba679c
[ "Apache-2.0" ]
null
null
null
day3/ex25_netmiko.py
tdouris1/pynet_test
6c68161a5759c2d82b14dc92fec70fda1aba679c
[ "Apache-2.0" ]
1
2020-06-03T08:41:10.000Z
2020-06-03T08:41:10.000Z
#!/usr/bin/env python """Exercises using Netmiko""" from getpass import getpass from netmiko import ConnectHandler def save_file(filename, show_run): """Save the show run to a file""" with open(filename, "w") as f: f.write(show_run) def main(): """Exercises using Netmiko""" rtr1_pass = getpass...
26.416667
60
0.594637
#!/usr/bin/env python """Exercises using Netmiko""" from getpass import getpass from netmiko import ConnectHandler def save_file(filename, show_run): """Save the show run to a file""" with open(filename, "w") as f: f.write(show_run) def main(): """Exercises using Netmiko""" rtr1_pass = getpass...
0
0
0
2af7a3ba3c544ebe4c23678c3943564d12cc8943
223
py
Python
examples/package/office/api.py
kitchoi/packaging-static-checker
1f555286318cd909a48abcfc5b521fda3117b25a
[ "MIT" ]
1
2020-10-01T08:26:58.000Z
2020-10-01T08:26:58.000Z
examples/package/office/api.py
kitchoi/packaging-static-checker
1f555286318cd909a48abcfc5b521fda3117b25a
[ "MIT" ]
1
2020-10-01T07:05:51.000Z
2020-10-01T07:05:51.000Z
examples/package/office/api.py
kitchoi/packaging-static-checker
1f555286318cd909a48abcfc5b521fda3117b25a
[ "MIT" ]
1
2020-10-01T04:41:21.000Z
2020-10-01T04:41:21.000Z
# This is allowed from ..person import api as person_api # This is NOT allowed from ..person import _reading # This is allowed from ._legal import api as legal_api # This is NOT allowed from ._legal import _compliance
15.928571
38
0.762332
# This is allowed from ..person import api as person_api # This is NOT allowed from ..person import _reading # This is allowed from ._legal import api as legal_api # This is NOT allowed from ._legal import _compliance
0
0
0
637793cf380b51be56dba9515edb1f033e3272ce
1,347
py
Python
amaz.py
BhagirathSarvaiya/Amazon_product_price_tracker
210d224dee5dcf12044676067777e113b68eb46e
[ "MIT" ]
null
null
null
amaz.py
BhagirathSarvaiya/Amazon_product_price_tracker
210d224dee5dcf12044676067777e113b68eb46e
[ "MIT" ]
null
null
null
amaz.py
BhagirathSarvaiya/Amazon_product_price_tracker
210d224dee5dcf12044676067777e113b68eb46e
[ "MIT" ]
null
null
null
import time import requests from bs4 import BeautifulSoup import smtplib from email.message import EmailMessage email_id = "Enter your Email address over here" email_pass = "Enter your password over here" URL = "Enter the URL of the product here" x = 1 prev = 0 while x: x, prev = check_price(prev) if x == ...
27.489796
139
0.659985
import time import requests from bs4 import BeautifulSoup import smtplib from email.message import EmailMessage email_id = "Enter your Email address over here" email_pass = "Enter your password over here" URL = "Enter the URL of the product here" def check_price(prev): headers = { "User-Agent": "Instruct...
917
0
46
c5a84b86868195151906348328648820f2db1c5c
2,221
py
Python
source/lib/gui/misc.py
sourav-majumder/qtlab
96b2a127b1df7b45622c90229bd5ef8a4083614e
[ "MIT" ]
null
null
null
source/lib/gui/misc.py
sourav-majumder/qtlab
96b2a127b1df7b45622c90229bd5ef8a4083614e
[ "MIT" ]
null
null
null
source/lib/gui/misc.py
sourav-majumder/qtlab
96b2a127b1df7b45622c90229bd5ef8a4083614e
[ "MIT" ]
null
null
null
# misc.py, GUI helper functions for QT lab environment # Reinier Heeres, <reinier@heeres.eu>, 2008 # # This program 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 # (at you...
34.169231
76
0.663665
# misc.py, GUI helper functions for QT lab environment # Reinier Heeres, <reinier@heeres.eu>, 2008 # # This program 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 # (at you...
0
0
0
39a4694d19378b3ba7d1c4bf9a362bc1a8c1e494
37,870
py
Python
wopmars/Reader.py
aitgon/WopMars
9d500954a7501bdf51e74da85f56b5dad86ea9ee
[ "MIT" ]
null
null
null
wopmars/Reader.py
aitgon/WopMars
9d500954a7501bdf51e74da85f56b5dad86ea9ee
[ "MIT" ]
null
null
null
wopmars/Reader.py
aitgon/WopMars
9d500954a7501bdf51e74da85f56b5dad86ea9ee
[ "MIT" ]
2
2017-09-28T14:36:14.000Z
2021-08-19T23:06:49.000Z
import importlib import re import os import yaml from yaml.constructor import ConstructorError from wopmars.utils.various import get_current_time try: from yaml import CLoader as Loader except ImportError: from yaml import Loader from sqlalchemy.orm.exc import NoResultFound, ObjectDeletedError from wopmars...
62.286184
206
0.56245
import importlib import re import os import yaml from yaml.constructor import ConstructorError from wopmars.utils.various import get_current_time try: from yaml import CLoader as Loader except ImportError: from yaml import Loader from sqlalchemy.orm.exc import NoResultFound, ObjectDeletedError from wopmars...
37
0
26
cece98488f9511d2c0083eb811b36c0cd273ee01
1,024
py
Python
app/main/controller/auth_controller.py
raekw0n/raspi-mon-api
ea82f3424a4a5b7ddfe63b37a1a01e5c06c545d2
[ "MIT" ]
null
null
null
app/main/controller/auth_controller.py
raekw0n/raspi-mon-api
ea82f3424a4a5b7ddfe63b37a1a01e5c06c545d2
[ "MIT" ]
null
null
null
app/main/controller/auth_controller.py
raekw0n/raspi-mon-api
ea82f3424a4a5b7ddfe63b37a1a01e5c06c545d2
[ "MIT" ]
null
null
null
from flask import request from flask_restx import Resource from app.main.service.auth_service import * from app.main.representation.auth import AuthRepresentation from app.main.decorator.auth_decorator import token_required api = AuthRepresentation.api user_auth = AuthRepresentation.user_auth auth_details = AuthRepre...
26.947368
60
0.735352
from flask import request from flask_restx import Resource from app.main.service.auth_service import * from app.main.representation.auth import AuthRepresentation from app.main.decorator.auth_decorator import token_required api = AuthRepresentation.api user_auth = AuthRepresentation.user_auth auth_details = AuthRepre...
266
278
66
b19e96edfe21eef82c9c86fd152b1cfa92d209d0
11,497
py
Python
pyocd/core/memory_map.py
aabadie/pyOCD
5c05b0fd2d04c9de5400c3d026d13f8822d3ce3d
[ "Apache-2.0" ]
null
null
null
pyocd/core/memory_map.py
aabadie/pyOCD
5c05b0fd2d04c9de5400c3d026d13f8822d3ce3d
[ "Apache-2.0" ]
null
null
null
pyocd/core/memory_map.py
aabadie/pyOCD
5c05b0fd2d04c9de5400c3d026d13f8822d3ce3d
[ "Apache-2.0" ]
null
null
null
""" mbed CMSIS-DAP debugger Copyright (c) 2015-2018 ARM Limited 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 ...
32.754986
200
0.623989
""" mbed CMSIS-DAP debugger Copyright (c) 2015-2018 ARM Limited 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 ...
6,292
3,638
325
9f708f7ec163ceb6c10a0f74e0bf95037a15c9e8
1,080
py
Python
JSON/json_example.py
jgraber/PythonFriday
879f10934dc6949785e5a799bfc3ca9a2a4434d4
[ "MIT" ]
5
2021-02-22T08:39:55.000Z
2022-03-14T03:54:36.000Z
JSON/json_example.py
jgraber/PythonFriday
879f10934dc6949785e5a799bfc3ca9a2a4434d4
[ "MIT" ]
null
null
null
JSON/json_example.py
jgraber/PythonFriday
879f10934dc6949785e5a799bfc3ca9a2a4434d4
[ "MIT" ]
null
null
null
import json if __name__ == '__main__': save() load()
22.5
44
0.425
import json def example(): # You collect and combine data in an # arbitrarily nested data structure: data = [ { 'name': "Rebecca Stephenson", 'phone': "(154) 221-8558", 'zipCode': "900185", 'country': "South Korea", 'options': ['a','b','c...
949
0
69
d5d4d8a508bc91ffbe11afad806b00de44ad81c6
564
py
Python
src/utils/program3/classes/_class.py
amasiukevich/InterpreterNew
159fe52ac1a978c44093e268e44616904f2da5b4
[ "MIT" ]
null
null
null
src/utils/program3/classes/_class.py
amasiukevich/InterpreterNew
159fe52ac1a978c44093e268e44616904f2da5b4
[ "MIT" ]
null
null
null
src/utils/program3/classes/_class.py
amasiukevich/InterpreterNew
159fe52ac1a978c44093e268e44616904f2da5b4
[ "MIT" ]
null
null
null
from src.utils.program3.node import Node from .class_block import ClassBlock
28.2
105
0.64539
from src.utils.program3.node import Node from .class_block import ClassBlock class Class(Node): def __init__(self, identifier, body: ClassBlock): try: if not body.is_valid_class_block(identifier): raise Exception("A class block should contain the constructor of the same name as...
387
-3
104
2c91547cdd3769ca0f85752d662fe07daf55e5a3
26,065
py
Python
ChromeController/manager.py
awesome-archive/ChromeController
fc9d280092e38e8c46ad814cebe7a7bfe83fe473
[ "BSD-3-Clause" ]
null
null
null
ChromeController/manager.py
awesome-archive/ChromeController
fc9d280092e38e8c46ad814cebe7a7bfe83fe473
[ "BSD-3-Clause" ]
null
null
null
ChromeController/manager.py
awesome-archive/ChromeController
fc9d280092e38e8c46ad814cebe7a7bfe83fe473
[ "BSD-3-Clause" ]
null
null
null
import distutils.spawn import os.path import sys import subprocess import pprint import json import base64 import signal import pprint import time import http.cookiejar import urllib.parse import ChromeController.filter_funcs as filter_funcs from ChromeController.cr_exceptions import ChromeResponseNotReceived from Ch...
33.762953
184
0.686476
import distutils.spawn import os.path import sys import subprocess import pprint import json import base64 import signal import pprint import time import http.cookiejar import urllib.parse import ChromeController.filter_funcs as filter_funcs from ChromeController.cr_exceptions import ChromeResponseNotReceived from Ch...
1,430
0
24
9e8a73278f0e1a0748292ba468d04c52bdebdfe2
2,405
py
Python
src/triangulum/rendering/entities/scene.py
PolarNick239/Triangulum3D
85c6a44f5c8f620bdc58164bd50ff89e1897f59d
[ "MIT" ]
10
2016-09-18T01:38:46.000Z
2021-11-18T17:30:28.000Z
src/triangulum/rendering/entities/scene.py
PolarNick239/Triangulum3D
85c6a44f5c8f620bdc58164bd50ff89e1897f59d
[ "MIT" ]
1
2018-06-20T05:48:19.000Z
2018-06-20T09:19:56.000Z
src/triangulum/rendering/entities/scene.py
PolarNick239/Triangulum3D
85c6a44f5c8f620bdc58164bd50ff89e1897f59d
[ "MIT" ]
12
2015-11-29T03:22:37.000Z
2020-07-14T03:08:52.000Z
# # Copyright (c) 2015, Nikolay Polyarnyi # All rights reserved. # import numpy as np from triangulum.rendering.entities.abstract import Renderable from triangulum.rendering.entities.points_cloud import PointsCloud from triangulum.rendering.entities.camera import Camera from triangulum.rendering.entities.stripes_proj...
29.691358
76
0.626611
# # Copyright (c) 2015, Nikolay Polyarnyi # All rights reserved. # import numpy as np from triangulum.rendering.entities.abstract import Renderable from triangulum.rendering.entities.points_cloud import PointsCloud from triangulum.rendering.entities.camera import Camera from triangulum.rendering.entities.stripes_proj...
1,653
378
23
b0b1314e2143f996130a909257b177a8bcda4c89
6,896
py
Python
tpDcc/libs/qt/widgets/action.py
tpDcc/tpQtLib
26b6e893395633a1b189a1b73654891b7688648d
[ "MIT" ]
3
2019-08-26T05:56:12.000Z
2019-10-03T11:35:53.000Z
tpDcc/libs/qt/widgets/action.py
tpDcc/tpQtLib
26b6e893395633a1b189a1b73654891b7688648d
[ "MIT" ]
null
null
null
tpDcc/libs/qt/widgets/action.py
tpDcc/tpQtLib
26b6e893395633a1b189a1b73654891b7688648d
[ "MIT" ]
1
2019-11-10T20:45:07.000Z
2019-11-10T20:45:07.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Module that defines that implements different types of actions """ from __future__ import print_function, division, absolute_import from Qt.QtCore import Qt from Qt.QtWidgets import QSizePolicy, QFrame, QMenu, QWidgetAction from tpDcc.libs.qt.widgets import layouts...
26.320611
88
0.616734
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Module that defines that implements different types of actions """ from __future__ import print_function, division, absolute_import from Qt.QtCore import Qt from Qt.QtWidgets import QSizePolicy, QFrame, QMenu, QWidgetAction from tpDcc.libs.qt.widgets import layouts...
2,503
3,841
184
0a92d9e2e182f5abf504eb88c93ce8d09861a72a
34,780
py
Python
cupy_setup_build.py
mrkwjc/cupy
ae9705dcc8b59ed05a6c91fdfb401b71f7c2b224
[ "MIT" ]
null
null
null
cupy_setup_build.py
mrkwjc/cupy
ae9705dcc8b59ed05a6c91fdfb401b71f7c2b224
[ "MIT" ]
null
null
null
cupy_setup_build.py
mrkwjc/cupy
ae9705dcc8b59ed05a6c91fdfb401b71f7c2b224
[ "MIT" ]
null
null
null
import argparse import copy from distutils import ccompiler from distutils import errors from distutils import msvccompiler from distutils import sysconfig from distutils import unixccompiler import os from os import path import shutil import sys import pkg_resources import setuptools from setuptools.command import bu...
33.668925
79
0.57674
import argparse import copy from distutils import ccompiler from distutils import errors from distutils import msvccompiler from distutils import sysconfig from distutils import unixccompiler import os from os import path import shutil import sys import pkg_resources import setuptools from setuptools.command import bu...
11,896
435
375
eccd5e9438058fc1a388b1c632a4066bcb657bca
16,449
py
Python
isi_mip/pages/blocks.py
ISI-MIP/isimip
c2a78c727337e38f3695031e00afd607da7d6dcb
[ "MIT" ]
null
null
null
isi_mip/pages/blocks.py
ISI-MIP/isimip
c2a78c727337e38f3695031e00afd607da7d6dcb
[ "MIT" ]
null
null
null
isi_mip/pages/blocks.py
ISI-MIP/isimip
c2a78c727337e38f3695031e00afd607da7d6dcb
[ "MIT" ]
null
null
null
from django.utils import formats from wagtail.core.blocks import CharBlock, StructBlock, TextBlock, StreamBlock, PageChooserBlock, \ URLBlock, DateBlock, ListBlock, BooleanBlock from wagtail.documents.blocks import DocumentChooserBlock from wagtail.embeds.blocks import EmbedBlock from wagtail.images.blocks import I...
35.147436
159
0.621375
from django.utils import formats from wagtail.core.blocks import CharBlock, StructBlock, TextBlock, StreamBlock, PageChooserBlock, \ URLBlock, DateBlock, ListBlock, BooleanBlock from wagtail.documents.blocks import DocumentChooserBlock from wagtail.embeds.blocks import EmbedBlock from wagtail.images.blocks import I...
9,104
5,287
552
6a4c301c0ee66090ed42856f41d37ef5b59ff26b
6,060
py
Python
pyha/simulation/plotter.py
gasparka/pyha
60d9bbfd6075e7548d670d05317d64bc2a1a19ee
[ "Apache-2.0" ]
6
2017-05-18T18:57:07.000Z
2020-08-06T11:23:34.000Z
pyha/simulation/plotter.py
gasparka/pyha
60d9bbfd6075e7548d670d05317d64bc2a1a19ee
[ "Apache-2.0" ]
607
2017-05-10T12:51:54.000Z
2022-03-31T18:08:15.000Z
pyha/simulation/plotter.py
gasparka/pyha
60d9bbfd6075e7548d670d05317d64bc2a1a19ee
[ "Apache-2.0" ]
1
2019-03-20T13:57:46.000Z
2019-03-20T13:57:46.000Z
import matplotlib.pyplot as plt import numpy as np from pyha.common.util import is_float, is_complex from pyha.cores.util import SQNR from pyha.simulation.tracer import Tracer figsize = (9.75, 5)
37.177914
118
0.60462
import matplotlib.pyplot as plt import numpy as np from pyha.common.util import is_float, is_complex from pyha.cores.util import SQNR from pyha.simulation.tracer import Tracer figsize = (9.75, 5) def plot_time_domain(simulations, name='Time domain'): simulations["MODEL"] = np.array(simulations["MODEL"]) sim...
5,718
0
138
baa8458fd6254a60012643af6e7a0debdc87c4a2
13,095
py
Python
src/cross_section_measurement/98_fit_cross_checks.py
jjacob/DailyPythonScripts
cd6c515c6242d1f3b44e97c8ad05946721b6a36a
[ "Apache-2.0" ]
null
null
null
src/cross_section_measurement/98_fit_cross_checks.py
jjacob/DailyPythonScripts
cd6c515c6242d1f3b44e97c8ad05946721b6a36a
[ "Apache-2.0" ]
null
null
null
src/cross_section_measurement/98_fit_cross_checks.py
jjacob/DailyPythonScripts
cd6c515c6242d1f3b44e97c8ad05946721b6a36a
[ "Apache-2.0" ]
null
null
null
from config import CMS from optparse import OptionParser from config import XSectionConfig from tools.file_utilities import read_data_from_JSON, make_folder_if_not_exists from tools.plotting import Histogram_properties from matplotlib import pyplot as plt from matplotlib import rc rc( 'font', **CMS.font ) rc( 'text', ...
55.021008
193
0.599236
from config import CMS from optparse import OptionParser from config import XSectionConfig from tools.file_utilities import read_data_from_JSON, make_folder_if_not_exists from tools.plotting import Histogram_properties from matplotlib import pyplot as plt from matplotlib import rc rc( 'font', **CMS.font ) rc( 'text', ...
7,898
0
46
a221db16eb2c9ac04bee8221b6a2d026af46c540
2,728
py
Python
visualSHARK/management/commands/create_project_stats.py
benjaminLedel/visualSHARK_topicShark
0b2455224e092f2dcba32951e29e70efa8de9cfd
[ "Apache-2.0" ]
1
2021-12-14T13:21:07.000Z
2021-12-14T13:21:07.000Z
visualSHARK/management/commands/create_project_stats.py
benjaminLedel/visualSHARK_topicShark
0b2455224e092f2dcba32951e29e70efa8de9cfd
[ "Apache-2.0" ]
19
2017-09-28T12:45:11.000Z
2022-02-10T06:50:04.000Z
visualSHARK/management/commands/create_project_stats.py
benjaminLedel/visualSHARK_topicShark
0b2455224e092f2dcba32951e29e70efa8de9cfd
[ "Apache-2.0" ]
2
2018-01-11T14:55:06.000Z
2020-11-10T15:34:25.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from datetime import date from django.core.management.base import BaseCommand from visualSHARK.models import VCSSystem, Commit, Project, File, Issue, MailingList, Message, IssueSystem from visualSHARK.models import ProjectStats
44
113
0.604472
#!/usr/bin/env python # -*- coding: utf-8 -*- from datetime import date from django.core.management.base import BaseCommand from visualSHARK.models import VCSSystem, Commit, Project, File, Issue, MailingList, Message, IssueSystem from visualSHARK.models import ProjectStats class Command(BaseCommand): help = 'C...
2,360
67
23