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
9d6cee1e63469f5bd5b6cd4fd51541713e1e90ee
1,052
py
Python
Genbank/cgenbank_to_fasta.py
charleshefer/cbiotools
a29e93bf1661effe01b8427e42308afdfcdd8592
[ "MIT" ]
1
2015-03-20T19:58:50.000Z
2015-03-20T19:58:50.000Z
Genbank/cgenbank_to_fasta.py
charleshefer/cbiotools
a29e93bf1661effe01b8427e42308afdfcdd8592
[ "MIT" ]
null
null
null
Genbank/cgenbank_to_fasta.py
charleshefer/cbiotools
a29e93bf1661effe01b8427e42308afdfcdd8592
[ "MIT" ]
null
null
null
############################################################################### #Convert genbank to fasta format # #@requires Biopython #@author:charles.hefer@gmail.com #@version:0.1 ############################################################################### import optparse from Bio import SeqIO def __ma...
30.057143
80
0.562738
############################################################################### #Convert genbank to fasta format # #@requires Biopython #@author:charles.hefer@gmail.com #@version:0.1 ############################################################################### import optparse from Bio import SeqIO def __ma...
0
0
0
94ccd55e4ce870fe8d71424e6cba2320449a40ba
1,932
py
Python
suplemon/lexer.py
johnmbaughman/suplemon
fdde20f2181c280236d40f89b89b9bbe5843440e
[ "MIT" ]
912
2015-01-04T22:08:48.000Z
2022-03-29T00:52:24.000Z
suplemon/lexer.py
johnmbaughman/suplemon
fdde20f2181c280236d40f89b89b9bbe5843440e
[ "MIT" ]
222
2015-01-26T13:25:37.000Z
2022-01-22T08:10:20.000Z
suplemon/lexer.py
johnmbaughman/suplemon
fdde20f2181c280236d40f89b89b9bbe5843440e
[ "MIT" ]
76
2015-03-31T18:11:15.000Z
2021-05-19T12:31:10.000Z
# -*- encoding: utf-8 import pygments import pygments.token import pygments.lexers
33.310345
74
0.577122
# -*- encoding: utf-8 import pygments import pygments.token import pygments.lexers class Lexer: def __init__(self, app): self.app = app self.token_map = { pygments.token.Comment: "comment", pygments.token.Comment.Single: "comment", pygments.token.Operator: "key...
969
855
23
05a77791798eb495fc6003b0bc8b0128d6f0bfec
590
py
Python
sound_generator/sound_generator/ddsp_generator/model.py
Redict/rg_sound_generation
6db8826d0797650bc5c1555a60cc9c6b3f82050d
[ "MIT" ]
null
null
null
sound_generator/sound_generator/ddsp_generator/model.py
Redict/rg_sound_generation
6db8826d0797650bc5c1555a60cc9c6b3f82050d
[ "MIT" ]
null
null
null
sound_generator/sound_generator/ddsp_generator/model.py
Redict/rg_sound_generation
6db8826d0797650bc5c1555a60cc9c6b3f82050d
[ "MIT" ]
null
null
null
import ddsp.training import gin
29.5
67
0.698305
import ddsp.training import gin class DDSPGenerator: def __init__(self, checkpoint_path: str, gin_config: str): self.model = None self.checkpoint_path = checkpoint_path self.gin_config = gin_config self._load_model() def _load_model(self): gin.parse_config_file(self.gi...
455
-1
103
b0a9a92e9649c836b182b422967230b8763c4ac3
9,195
py
Python
scripts/stats.py
TeamBrot/client
c86d3910497cf411dbf57b16b62b78d3d1732cc3
[ "Apache-2.0" ]
1
2021-04-08T14:14:48.000Z
2021-04-08T14:14:48.000Z
scripts/stats.py
TeamBrot/client
c86d3910497cf411dbf57b16b62b78d3d1732cc3
[ "Apache-2.0" ]
1
2021-04-23T14:45:09.000Z
2021-05-14T13:56:16.000Z
scripts/stats.py
TeamBrot/client
c86d3910497cf411dbf57b16b62b78d3d1732cc3
[ "Apache-2.0" ]
1
2021-04-20T09:34:24.000Z
2021-04-20T09:34:24.000Z
#!/usr/bin/python3 import os import sys import json from common import place from collections import defaultdict import argparse """ result: { startTime: "2021-01-01..." client: 'combi', players: 2, width: 15, height: 15, deadline: 2, offset: 4, occupiedRatio: 0.1241 myStartProbab...
34.182156
174
0.615008
#!/usr/bin/python3 import os import sys import json from common import place from collections import defaultdict import argparse """ result: { startTime: "2021-01-01..." client: 'combi', players: 2, width: 15, height: 15, deadline: 2, offset: 4, occupiedRatio: 0.1241 myStartProbab...
6,153
0
253
a90b9eccf31a5fe78bf5bd77d8a029db8547c3a6
73
py
Python
flask_value_checker/restrictions/__init__.py
cbcoutinho/flask-value-checker
cbdff51c401486dea7d49eda30eae1211d392ee7
[ "MIT" ]
null
null
null
flask_value_checker/restrictions/__init__.py
cbcoutinho/flask-value-checker
cbdff51c401486dea7d49eda30eae1211d392ee7
[ "MIT" ]
null
null
null
flask_value_checker/restrictions/__init__.py
cbcoutinho/flask-value-checker
cbdff51c401486dea7d49eda30eae1211d392ee7
[ "MIT" ]
null
null
null
from .restrictions import * from .parsing import * from .errors import *
18.25
27
0.753425
from .restrictions import * from .parsing import * from .errors import *
0
0
0
98326be411e9d82c3e5846639be149b472131ee9
1,465
py
Python
nurses_2/widgets/widget_data_structures.py
salt-die/nurses_2
29b76c34b9a28bf7c115998f4e81979966c82df0
[ "MIT" ]
171
2021-06-23T15:29:15.000Z
2022-03-25T18:53:10.000Z
nurses_2/widgets/widget_data_structures.py
salt-die/nurses_2
29b76c34b9a28bf7c115998f4e81979966c82df0
[ "MIT" ]
1
2022-01-07T05:08:35.000Z
2022-01-10T04:53:57.000Z
nurses_2/widgets/widget_data_structures.py
salt-die/nurses_2
29b76c34b9a28bf7c115998f4e81979966c82df0
[ "MIT" ]
3
2021-10-01T09:12:15.000Z
2022-01-14T21:31:11.000Z
from enum import Enum from typing import NamedTuple __all__ = "SizeHint", "PosHint", "Anchor", "Easing"
24.016393
51
0.659386
from enum import Enum from typing import NamedTuple __all__ = "SizeHint", "PosHint", "Anchor", "Easing" class SizeHint(NamedTuple): height: float | None width: float | None class PosHint(NamedTuple): y: float | None x: float | None class Anchor(str, Enum): CENTER = "center" LEFT_CENTER = ...
0
1,264
92
1f650a8377c11dcc461c4085f3e5d88d2ee5c184
4,390
py
Python
yo/db/notifications.py
dpays/dsocial-notifications
32b1cdcd58d622407fd50206053c5b9735a56ba9
[ "MIT" ]
10
2017-10-22T20:07:40.000Z
2018-08-01T21:48:49.000Z
yo/db/notifications.py
dpays/dsocial-notifications
32b1cdcd58d622407fd50206053c5b9735a56ba9
[ "MIT" ]
81
2017-08-19T15:38:32.000Z
2020-05-12T09:56:14.000Z
yo/db/notifications.py
dpays/dsocial-notifications
32b1cdcd58d622407fd50206053c5b9735a56ba9
[ "MIT" ]
9
2017-09-19T07:12:20.000Z
2021-05-25T17:09:27.000Z
# -*- coding: utf-8 -*- import sqlalchemy as sa import structlog from ..schema import NotificationType from ..schema import TransportType from ..schema import Priority from .users import get_user_transports_for_notification logger = structlog.getLogger(__name__, source='YoDB') from yo.db import metadata from .que...
31.811594
133
0.617084
# -*- coding: utf-8 -*- import sqlalchemy as sa import structlog from ..schema import NotificationType from ..schema import TransportType from ..schema import Priority from .users import get_user_transports_for_notification logger = structlog.getLogger(__name__, source='YoDB') from yo.db import metadata from .que...
2,467
36
68
5e450af54e6532bac164c741f9cca9f2f1faac2a
1,881
py
Python
openmdao/components/test/test_linear_system.py
colinxs/OpenMDAO
a9a52be29281a23a102c64b577066ee5fc70f4b4
[ "Apache-2.0" ]
null
null
null
openmdao/components/test/test_linear_system.py
colinxs/OpenMDAO
a9a52be29281a23a102c64b577066ee5fc70f4b4
[ "Apache-2.0" ]
null
null
null
openmdao/components/test/test_linear_system.py
colinxs/OpenMDAO
a9a52be29281a23a102c64b577066ee5fc70f4b4
[ "Apache-2.0" ]
null
null
null
# Test the LinearSystem component. import unittest import numpy as np from openmdao.api import Group, Problem, LinearSystem, IndepVarComp, ScipyGMRES from openmdao.test.util import assert_rel_error if __name__ == "__main__": unittest.main()
33.589286
93
0.578947
# Test the LinearSystem component. import unittest import numpy as np from openmdao.api import Group, Problem, LinearSystem, IndepVarComp, ScipyGMRES from openmdao.test.util import assert_rel_error class TestLinearSystem(unittest.TestCase): def test_linear_system(self): root = Group() lingrp =...
1,560
21
50
2327914d9f8ae6aac29cae7accfc5c5a264cd9aa
1,391
py
Python
pyvideo/urls.py
coagulant/pyvideo.ru
7a340c66ce1c07e64711ea01f79d9cf8e237f8d5
[ "BSD-3-Clause" ]
9
2015-03-03T19:15:37.000Z
2018-01-04T11:56:36.000Z
pyvideo/urls.py
coagulant/pyvideo.ru
7a340c66ce1c07e64711ea01f79d9cf8e237f8d5
[ "BSD-3-Clause" ]
23
2015-02-03T07:12:43.000Z
2017-05-19T09:21:59.000Z
pyvideo/urls.py
coagulant/pyvideo.ru
7a340c66ce1c07e64711ea01f79d9cf8e237f8d5
[ "BSD-3-Clause" ]
10
2015-06-26T08:31:08.000Z
2015-10-13T04:55:35.000Z
from django.conf.urls import patterns, url, include from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from richard.videos.sitemaps import CategorySitemap, SpeakerSitemap, VideoSitemap from sergey.views import SpeakerList admin.autodiscover() sitemaps = { ...
38.638889
128
0.70381
from django.conf.urls import patterns, url, include from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from richard.videos.sitemaps import CategorySitemap, SpeakerSitemap, VideoSitemap from sergey.views import SpeakerList admin.autodiscover() sitemaps = { ...
0
0
0
2504c90e8d355a09380dd007eed6ce66a52b690c
33,052
py
Python
tests/test_corgy.py
jayanthkoushik/corgy
370a954afe062c51e54818b2f7169caca6c0fe08
[ "MIT" ]
6
2021-08-30T16:13:06.000Z
2022-02-15T22:21:49.000Z
tests/test_corgy.py
jayanthkoushik/corgi
370a954afe062c51e54818b2f7169caca6c0fe08
[ "MIT" ]
null
null
null
tests/test_corgy.py
jayanthkoushik/corgi
370a954afe062c51e54818b2f7169caca6c0fe08
[ "MIT" ]
1
2021-09-21T01:41:55.000Z
2021-09-21T01:41:55.000Z
import argparse import sys import unittest from typing import Optional, Sequence from unittest import skipIf from unittest.mock import MagicMock, patch SequenceType = Sequence if sys.version_info >= (3, 9): from collections.abc import Sequence # pylint: disable=reimported from typing import Annotated, Litera...
32.563547
88
0.592763
import argparse import sys import unittest from typing import Optional, Sequence from unittest import skipIf from unittest.mock import MagicMock, patch SequenceType = Sequence if sys.version_info >= (3, 9): from collections.abc import Sequence # pylint: disable=reimported from typing import Annotated, Litera...
29,025
0
2,287
bd2aaefc7530392c844621d429aa071fca612986
261
py
Python
vmanage/cli/export/__init__.py
tlofreso/python-viptela
5a11fc3167a2a38c7958a25df49ef6191cc9ddbd
[ "BSD-Source-Code" ]
1
2020-01-07T15:34:29.000Z
2020-01-07T15:34:29.000Z
vmanage/cli/export/__init__.py
tlofreso/python-viptela
5a11fc3167a2a38c7958a25df49ef6191cc9ddbd
[ "BSD-Source-Code" ]
null
null
null
vmanage/cli/export/__init__.py
tlofreso/python-viptela
5a11fc3167a2a38c7958a25df49ef6191cc9ddbd
[ "BSD-Source-Code" ]
null
null
null
import click from vmanage.cli.export.templates import templates from vmanage.cli.export.policies import policies @click.group() @click.pass_context def export(ctx): """ Export commands """ export.add_command(templates) export.add_command(policies)
20.076923
50
0.770115
import click from vmanage.cli.export.templates import templates from vmanage.cli.export.policies import policies @click.group() @click.pass_context def export(ctx): """ Export commands """ export.add_command(templates) export.add_command(policies)
0
0
0
07faa7dc6f0c61331410a62c816b4b69b206fdb9
820
py
Python
setup.py
fdddf/flask-themer
73a83e8b2aa876a6fb38f1d49f966b0c4b3e7978
[ "MIT" ]
null
null
null
setup.py
fdddf/flask-themer
73a83e8b2aa876a6fb38f1d49f966b0c4b3e7978
[ "MIT" ]
null
null
null
setup.py
fdddf/flask-themer
73a83e8b2aa876a6fb38f1d49f966b0c4b3e7978
[ "MIT" ]
null
null
null
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name='flask-themer', version='1.4.1', description='Simple theme mechanism for Flask', author='Tyler Kennedy', author_email='tk@tkte.ch', url='https://github.com/tktech/flask-themer', lon...
23.428571
51
0.595122
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name='flask-themer', version='1.4.1', description='Simple theme mechanism for Flask', author='Tyler Kennedy', author_email='tk@tkte.ch', url='https://github.com/tktech/flask-themer', lon...
0
0
0
a3c8aef4e5f938610033e3c79f5745768f7bfb56
2,635
py
Python
gui/guiserver.py
Clayno/xsshunter
a633b3c4694767c7ad0c6f76465ca88c85527441
[ "MIT" ]
null
null
null
gui/guiserver.py
Clayno/xsshunter
a633b3c4694767c7ad0c6f76465ca88c85527441
[ "MIT" ]
null
null
null
gui/guiserver.py
Clayno/xsshunter
a633b3c4694767c7ad0c6f76465ca88c85527441
[ "MIT" ]
null
null
null
#!/usr/bin/env python import tornado.ioloop import tornado.web import tornado.template import dns.resolver import yaml try: with open( '../config.yaml', 'r' ) as f: settings = yaml.safe_load( f ) except IOError: print "Error reading config.yaml, have you created one? (Hint: Try running ./generate_confi...
37.642857
273
0.659962
#!/usr/bin/env python import tornado.ioloop import tornado.web import tornado.template import dns.resolver import yaml try: with open( '../config.yaml', 'r' ) as f: settings = yaml.safe_load( f ) except IOError: print "Error reading config.yaml, have you created one? (Hint: Try running ./generate_confi...
1,568
147
393
e5b8eb367413b579f17fa845a76ea0221b45d59f
9,633
py
Python
ParlAI/parlai/tasks/clinical_trials/xml_parser.py
Qdata4Capstone/MedTrialConnect
fe0ec0d35d6c720fcf0a35b477d2d303fd3d42b0
[ "MIT" ]
1
2019-11-08T18:38:42.000Z
2019-11-08T18:38:42.000Z
ParlAI/parlai/tasks/clinical_trials/xml_parser.py
Qdata4Capstone/MedTrialConnect
fe0ec0d35d6c720fcf0a35b477d2d303fd3d42b0
[ "MIT" ]
3
2021-05-08T09:44:24.000Z
2021-07-21T14:03:28.000Z
ParlAI/parlai/tasks/clinical_trials/xml_parser.py
Qdata4Capstone/MedTrialConnect
fe0ec0d35d6c720fcf0a35b477d2d303fd3d42b0
[ "MIT" ]
null
null
null
#### Globals/Imports #### import json import xml import xmltodict import xml.etree.ElementTree as ET import os import collections from timeit import default_timer as timer import datetime import traceback import sys import re #### Custom Exceptions #### #### ProcessedClinicalTrial Class Definition #### class Proces...
35.677778
92
0.71089
#### Globals/Imports #### import json import xml import xmltodict import xml.etree.ElementTree as ET import os import collections from timeit import default_timer as timer import datetime import traceback import sys import re #### Custom Exceptions #### class ClinicalTrialParseException(Exception): pass #### Proce...
8,607
30
356
d38162b3e82a4c5dd20033fdd2b912a08aa4fc60
4,842
py
Python
calibration.py
rudyn2/visual-odometry
1ee37ac6669e1429461f23ccc02d5ae9a349409c
[ "MIT" ]
null
null
null
calibration.py
rudyn2/visual-odometry
1ee37ac6669e1429461f23ccc02d5ae9a349409c
[ "MIT" ]
null
null
null
calibration.py
rudyn2/visual-odometry
1ee37ac6669e1429461f23ccc02d5ae9a349409c
[ "MIT" ]
null
null
null
import glob import json import os import pickle import cv2 as cv import numpy as np from tqdm import tqdm if __name__ == '__main__': img_dir = 'data/2011_09_26/2011_09_26_drive_0119_extract/image_00/data' calibration_path = 'data/2011_09_26/2011_09_26_image_00_chessboards.json' output_path = 'calibrat...
38.736
120
0.614622
import glob import json import os import pickle import cv2 as cv import numpy as np from tqdm import tqdm def calibrate_chessboards(chessboards: list, visualize: bool = False): finder_criteria = cv.CALIB_CB_ADAPTIVE_THRESH + cv.CALIB_CB_NORMALIZE_IMAGE total_obj_points, total_image_points = [], [] total_...
2,350
0
46
d9e8d24db10f3c7f7029dc56c3c9822f8d3cf63a
13,601
py
Python
EBI_data_generate.py
datamaskinprosjekt/FPGA-MadNES
8307c4a1d66909c7637efc27e6248a7e8b332bfd
[ "MIT" ]
null
null
null
EBI_data_generate.py
datamaskinprosjekt/FPGA-MadNES
8307c4a1d66909c7637efc27e6248a7e8b332bfd
[ "MIT" ]
null
null
null
EBI_data_generate.py
datamaskinprosjekt/FPGA-MadNES
8307c4a1d66909c7637efc27e6248a7e8b332bfd
[ "MIT" ]
null
null
null
#OAM: 2 16-bit addresses # 8 bit spriteref # 10 bit x pos # 10 bit y pos # 1 bit x-flip # 1 bit y-flip # 1 bit priority # 1 bit enable OAM = [ { "spriteref":1, "x_pos":13, "y_pos":2, "x_flip":0, "y_flip":0, "priority":0, "enable":1 },...
27.700611
194
0.419969
#OAM: 2 16-bit addresses # 8 bit spriteref # 10 bit x pos # 10 bit y pos # 1 bit x-flip # 1 bit y-flip # 1 bit priority # 1 bit enable OAM = [ { "spriteref":1, "x_pos":13, "y_pos":2, "x_flip":0, "y_flip":0, "priority":0, "enable":1 },...
87
0
23
c1d4424d620aca89a5a78a96597648831c9342f8
2,553
py
Python
news_training/databroker/news_databroker.py
tuix/tutorials
733d35a8a39df079e8c2432c441b70785ab08440
[ "Apache-2.0" ]
8
2020-04-21T13:29:04.000Z
2021-12-13T08:59:09.000Z
news_training/databroker/news_databroker.py
tuix/tutorials
733d35a8a39df079e8c2432c441b70785ab08440
[ "Apache-2.0" ]
3
2021-04-27T11:03:04.000Z
2021-05-24T18:22:57.000Z
news_training/databroker/news_databroker.py
tuix/tutorials
733d35a8a39df079e8c2432c441b70785ab08440
[ "Apache-2.0" ]
6
2020-07-06T08:23:25.000Z
2021-11-24T10:39:34.000Z
import grpc from concurrent import futures import time import news_databroker_pb2_grpc import news_databroker_pb2 port = 8061 news = [ 'In Hong Kong, where newspapers have alleged Japan has been selling below-cost semiconductors, some electronics manufacturers share that view.', 'The Ministry of International...
51.06
208
0.751665
import grpc from concurrent import futures import time import news_databroker_pb2_grpc import news_databroker_pb2 port = 8061 news = [ 'In Hong Kong, where newspapers have alleged Japan has been selling below-cost semiconductors, some electronics manufacturers share that view.', 'The Ministry of International...
379
49
77
c4ee0c061de8ec7f310c3d5bf2da3c965efb5f8d
130
py
Python
models/__init__.py
mlvc-lab/ILKP
d9c05223f742167c8dd6543a3276fde08b7986ff
[ "MIT" ]
1
2021-11-16T08:25:06.000Z
2021-11-16T08:25:06.000Z
models/__init__.py
mlvc-lab/ILKP
d9c05223f742167c8dd6543a3276fde08b7986ff
[ "MIT" ]
null
null
null
models/__init__.py
mlvc-lab/ILKP
d9c05223f742167c8dd6543a3276fde08b7986ff
[ "MIT" ]
1
2021-11-16T08:25:08.000Z
2021-11-16T08:25:08.000Z
from .mobilenet import mobilenet from .mobilenetv2 import mobilenetv2 from .resnet import resnet, wideresnet from .vgg import vgg
26
38
0.830769
from .mobilenet import mobilenet from .mobilenetv2 import mobilenetv2 from .resnet import resnet, wideresnet from .vgg import vgg
0
0
0
ad67d66388f0984d00adcc7945f036f683b5cc41
1,497
py
Python
tests/functional/test_tagged_unions_unknown.py
karim7262/botocore
070204a0afb94c23dcfe040f4933c74ab1d8e089
[ "Apache-2.0" ]
1,063
2015-01-13T13:35:09.000Z
2022-03-31T09:29:32.000Z
tests/functional/test_tagged_unions_unknown.py
karim7262/botocore
070204a0afb94c23dcfe040f4933c74ab1d8e089
[ "Apache-2.0" ]
2,064
2015-01-03T15:53:33.000Z
2022-03-31T23:12:08.000Z
tests/functional/test_tagged_unions_unknown.py
karim7262/botocore
070204a0afb94c23dcfe040f4933c74ab1d8e089
[ "Apache-2.0" ]
1,065
2015-01-16T15:58:42.000Z
2022-03-31T22:18:56.000Z
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
49.9
82
0.734135
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
794
28
49
cdca9ddfe6a756cf158d70c5a7c6907a7e95ceb3
333
py
Python
tests/e2e/features/steps/example.py
wirus15/py-payments-testing
555641379fda33ad8f50606802d54f39c64ba81d
[ "MIT" ]
null
null
null
tests/e2e/features/steps/example.py
wirus15/py-payments-testing
555641379fda33ad8f50606802d54f39c64ba81d
[ "MIT" ]
null
null
null
tests/e2e/features/steps/example.py
wirus15/py-payments-testing
555641379fda33ad8f50606802d54f39c64ba81d
[ "MIT" ]
null
null
null
from behave import given, then @given('I open google.com') @then('the title should contain "{title}"')
27.75
69
0.735736
from behave import given, then @given('I open google.com') def open_google(context): context.driver.get("http://www.google.com") @then('the title should contain "{title}"') def title_should_contain(context, title): browser_title = context.driver.title assert title in browser_title, f'Found "{browser_tit...
183
0
44
2000c38b14076a5521c1055e36c1577410d4c50b
5,658
py
Python
pyhail/mesh.py
zssherman/PyHail
3a2b079b298ab7a25288b86cbb7a254e5b2c49cb
[ "MIT" ]
1
2020-06-26T11:14:01.000Z
2020-06-26T11:14:01.000Z
pyhail/mesh.py
zssherman/PyHail
3a2b079b298ab7a25288b86cbb7a254e5b2c49cb
[ "MIT" ]
null
null
null
pyhail/mesh.py
zssherman/PyHail
3a2b079b298ab7a25288b86cbb7a254e5b2c49cb
[ "MIT" ]
null
null
null
""" MESH sub-module of pyhail Contains the single pol MESH retrieval for gridded radar data. Required reflectivity and temperature data Joshua Soderholm - 15 June 2018 """ import pyart from pyhail import common import netCDF4 import numpy as np def _get_latlon(radgrid, ref_name): """ Generates lattitude an...
34.925926
111
0.634677
""" MESH sub-module of pyhail Contains the single pol MESH retrieval for gridded radar data. Required reflectivity and temperature data Joshua Soderholm - 15 June 2018 """ import pyart from pyhail import common import netCDF4 import numpy as np def _get_latlon(radgrid, ref_name): """ Generates lattitude an...
0
0
0
781b50d537cf5f4dc102a417e1d572cd40701c9b
980
py
Python
src/tests/services/test_documentation.py
uescher/byro
e43d646dc8e833591c82b2ea1711c70b9ce7e0b2
[ "Apache-2.0" ]
null
null
null
src/tests/services/test_documentation.py
uescher/byro
e43d646dc8e833591c82b2ea1711c70b9ce7e0b2
[ "Apache-2.0" ]
null
null
null
src/tests/services/test_documentation.py
uescher/byro
e43d646dc8e833591c82b2ea1711c70b9ce7e0b2
[ "Apache-2.0" ]
null
null
null
import importlib import os from contextlib import suppress import pytest from django.conf import settings from django.dispatch import Signal here = os.path.dirname(__file__) doc_dir = os.path.join(here, "../../../docs") base_dir = os.path.join(here, "../../byro") with open(os.path.join(doc_dir, "developer/plugins/ge...
30.625
83
0.62551
import importlib import os from contextlib import suppress import pytest from django.conf import settings from django.dispatch import Signal here = os.path.dirname(__file__) doc_dir = os.path.join(here, "../../../docs") base_dir = os.path.join(here, "../../byro") with open(os.path.join(doc_dir, "developer/plugins/ge...
464
0
22
ea2184307f361df015230e899a9b538d16a1ef35
6,413
py
Python
vaccination projection.py
willcallender/Vaccination-Projection
7752a8146ccafaaf0d354f8286db2511dde9bc97
[ "CC-BY-4.0" ]
null
null
null
vaccination projection.py
willcallender/Vaccination-Projection
7752a8146ccafaaf0d354f8286db2511dde9bc97
[ "CC-BY-4.0" ]
null
null
null
vaccination projection.py
willcallender/Vaccination-Projection
7752a8146ccafaaf0d354f8286db2511dde9bc97
[ "CC-BY-4.0" ]
null
null
null
""" Created on Wed Feb 17 13:27:55 2021 @author: William Callender This program downloads data about the current progress of COVID-19 vaccinations in the United States to project the total number of vaccinations going forward. It does this by getting data about the number of vaccinations per day since vaccines first ...
41.642857
331
0.70669
""" Created on Wed Feb 17 13:27:55 2021 @author: William Callender This program downloads data about the current progress of COVID-19 vaccinations in the United States to project the total number of vaccinations going forward. It does this by getting data about the number of vaccinations per day since vaccines first ...
0
0
0
35a6f75b986dc2c971967580805c5a807cf4d74a
2,180
py
Python
cli/src/rnpfind/picklify.py
mnahinkhan/rnpfind
5aa956ddd528ab9ebd9588be845f78c449915b78
[ "MIT" ]
3
2021-06-08T03:55:03.000Z
2021-06-15T07:33:08.000Z
cli/src/rnpfind/picklify.py
mnahinkhan/RNPFind
8b561e087f943421c847dcb708ee386ee6439fa5
[ "MIT" ]
1
2022-02-24T15:34:24.000Z
2022-03-04T09:59:10.000Z
cli/src/rnpfind/picklify.py
mnahinkhan/RNPFind
8b561e087f943421c847dcb708ee386ee6439fa5
[ "MIT" ]
1
2021-07-22T04:13:34.000Z
2021-07-22T04:13:34.000Z
""" Picklify is a function that works similar to memoization; it is meant for functions that return a dictionary. Often, such functions will parse a file to generate a dictionary that maps certain keys to values. To save on such overhead costs, we "picklify" them the first time they are called (save the dictionary in a...
38.928571
78
0.692661
""" Picklify is a function that works similar to memoization; it is meant for functions that return a dictionary. Often, such functions will parse a file to generate a dictionary that maps certain keys to values. To save on such overhead costs, we "picklify" them the first time they are called (save the dictionary in a...
0
0
0
8346e6da5338cd7111749123e1ae4fa60487b7eb
13,628
py
Python
api/graphql/schema.py
SuviVappula/tilavarauspalvelu-core
ad7dec36e392a7b2927e2f825c3b0eb29b700793
[ "MIT" ]
null
null
null
api/graphql/schema.py
SuviVappula/tilavarauspalvelu-core
ad7dec36e392a7b2927e2f825c3b0eb29b700793
[ "MIT" ]
null
null
null
api/graphql/schema.py
SuviVappula/tilavarauspalvelu-core
ad7dec36e392a7b2927e2f825c3b0eb29b700793
[ "MIT" ]
null
null
null
import django_filters import graphene from django.conf import settings from django.contrib.auth import get_user_model from django.db.models import Q from graphene import Field, relay from graphene_permissions.mixins import AuthFilter from graphene_permissions.permissions import AllowAny, AllowAuthenticated from rest_fr...
33.566502
88
0.762181
import django_filters import graphene from django.conf import settings from django.contrib.auth import get_user_model from django.db.models import Q from graphene import Field, relay from graphene_permissions.mixins import AuthFilter from graphene_permissions.permissions import AllowAny, AllowAuthenticated from rest_fr...
1,933
7,541
506
307b2050918b8197e66e38d1a1696bcc37f9f393
4,996
py
Python
__init__.py
whitwhittle/homeseer
6d99748d4f118150e51d128686526f4af0b517a4
[ "MIT" ]
null
null
null
__init__.py
whitwhittle/homeseer
6d99748d4f118150e51d128686526f4af0b517a4
[ "MIT" ]
null
null
null
__init__.py
whitwhittle/homeseer
6d99748d4f118150e51d128686526f4af0b517a4
[ "MIT" ]
null
null
null
""" Component for interacting with a HomeSeer HomeTroller or HS3 software installation. For more details about this component, please refer to the documentation at https://home-assistant.io/components/homeseer/ """ import asyncio import logging import voluptuous as vol import homeassistant.helpers.config_validation ...
33.986395
111
0.703963
""" Component for interacting with a HomeSeer HomeTroller or HS3 software installation. For more details about this component, please refer to the documentation at https://home-assistant.io/components/homeseer/ """ import asyncio import logging import voluptuous as vol import homeassistant.helpers.config_validation ...
1,166
0
211
b297038a27689106a364687cb14d13ee43934e1d
587
py
Python
test/test_fig2b.py
tanjarothgangl/UDiTAS
7b974640c57d13eb811b63f52f0e6e3c4f9586dd
[ "BSD-3-Clause-Clear" ]
11
2018-07-12T10:17:38.000Z
2022-02-28T17:58:12.000Z
test/test_fig2b.py
tanjarothgangl/UDiTAS
7b974640c57d13eb811b63f52f0e6e3c4f9586dd
[ "BSD-3-Clause-Clear" ]
4
2020-03-13T16:39:38.000Z
2021-07-14T05:12:10.000Z
test/test_fig2b.py
tanjarothgangl/UDiTAS
7b974640c57d13eb811b63f52f0e6e3c4f9586dd
[ "BSD-3-Clause-Clear" ]
7
2019-03-02T07:58:43.000Z
2021-09-30T17:42:05.000Z
import pandas as pd import os import subprocess
20.964286
83
0.696763
import pandas as pd import os import subprocess def get_df_fig2b(): print(os.getcwd()) fig2b_command = ['./uditas-runner.py', './data/fig2b'] print(fig2b_command) subprocess.call(fig2b_command) df = pd.read_excel('./data/fig2b/all_results/fig2b_big_results_pivot.xlsx') return df def get_t...
469
0
69
7e4115dd75b1419979c8ed2ef3db93bfb83a6a89
15,481
py
Python
gui.py
p513817/Dust_Detection_Prototype
9ac90f9e035a640b4fcb1c5879c949601df5bc03
[ "MIT" ]
1
2022-01-04T03:44:38.000Z
2022-01-04T03:44:38.000Z
gui.py
p513817/Dust_Detection_Prototype
9ac90f9e035a640b4fcb1c5879c949601df5bc03
[ "MIT" ]
null
null
null
gui.py
p513817/Dust_Detection_Prototype
9ac90f9e035a640b4fcb1c5879c949601df5bc03
[ "MIT" ]
null
null
null
#%% import cv2 import tkinter as tk import os, time import PIL from PIL import Image, ImageTk import threading import time import platform as plt # from lobe import modify_lobe from tm2_tflite import modify_tm from cv_dust import find_dust from custom_io import c_io ### 影像與AI相關的參數 這些參數幾乎都在 Stream 中使用 ...
33.508658
195
0.540986
#%% import cv2 import tkinter as tk import os, time import PIL from PIL import Image, ImageTk import threading import time import platform as plt # from lobe import modify_lobe from tm2_tflite import modify_tm from cv_dust import find_dust from custom_io import c_io ### 影像與AI相關的參數 這些參數幾乎都在 Stream 中使用 ...
13,875
-9
1,039
a12088d8dd98b39ccba018fb539b2e9067a4f63e
26,847
py
Python
utils/others/JointemptyMdoel.py
guopeiming/JointCPNER
1978665a8e2559fbb4d418105f5bca47cf90addb
[ "Apache-2.0" ]
1
2021-02-23T13:59:28.000Z
2021-02-23T13:59:28.000Z
utils/others/JointemptyMdoel.py
guopeiming/JointCPNER
1978665a8e2559fbb4d418105f5bca47cf90addb
[ "Apache-2.0" ]
null
null
null
utils/others/JointemptyMdoel.py
guopeiming/JointCPNER
1978665a8e2559fbb4d418105f5bca47cf90addb
[ "Apache-2.0" ]
null
null
null
# @Author : guopeiming # @Contact : guopeiming.gpm@{qq, gmail}.com import torch from queue import Queue import numpy as np import torch.nn as nn from utils import chart_helper from utils import trees from utils.vocabulary import Vocabulary from utils.transliterate import TRANSLITERATIONS, BERT_TOKEN_MAPPING from typing...
51.234733
131
0.617276
# @Author : guopeiming # @Contact : guopeiming.gpm@{qq, gmail}.com import torch from queue import Queue import numpy as np import torch.nn as nn from utils import chart_helper from utils import trees from utils.vocabulary import Vocabulary from utils.transliterate import TRANSLITERATIONS, BERT_TOKEN_MAPPING from typing...
13,528
12,487
122
91488b35cfdb7decdc8c98c8c866111849dd7a9e
3,383
py
Python
backend/src/hatchling/builders/hooks/plugin/interface.py
daobook/hatch
1cf39ad1a11ce90bc77fb7fdc4b9202433509179
[ "MIT" ]
null
null
null
backend/src/hatchling/builders/hooks/plugin/interface.py
daobook/hatch
1cf39ad1a11ce90bc77fb7fdc4b9202433509179
[ "MIT" ]
null
null
null
backend/src/hatchling/builders/hooks/plugin/interface.py
daobook/hatch
1cf39ad1a11ce90bc77fb7fdc4b9202433509179
[ "MIT" ]
null
null
null
class BuildHookInterface(object): # no cov """ Example usage: === ":octicons-file-code-16: plugin.py" ```python from hatchling.builders.hooks.plugin.interface import BuildHookInterface class SpecialBuildHook(BuildHookInterface): PLUGIN_NAME = 'special' .....
26.224806
95
0.582323
class BuildHookInterface(object): # no cov """ Example usage: === ":octicons-file-code-16: plugin.py" ```python from hatchling.builders.hooks.plugin.interface import BuildHookInterface class SpecialBuildHook(BuildHookInterface): PLUGIN_NAME = 'special' .....
369
0
53
3ab88658f6fb6d20af6694f200dd99b88c8e0b0b
7,789
py
Python
gallery/management/commands/scanphotos.py
aaugustin/myks-gallery
ff2952885c80dcfff614e87e9ec43e39f02a7632
[ "BSD-3-Clause" ]
32
2016-01-11T05:34:53.000Z
2022-03-19T08:52:20.000Z
gallery/management/commands/scanphotos.py
aaugustin/myks-gallery
ff2952885c80dcfff614e87e9ec43e39f02a7632
[ "BSD-3-Clause" ]
6
2016-12-26T06:34:30.000Z
2021-09-05T15:08:20.000Z
gallery/management/commands/scanphotos.py
aaugustin/myks-gallery
ff2952885c80dcfff614e87e9ec43e39f02a7632
[ "BSD-3-Clause" ]
15
2015-06-01T18:41:21.000Z
2021-03-25T07:47:07.000Z
import collections import datetime import os import re import time import unicodedata from django.conf import settings from django.core.management import base from django.db import transaction from django.utils import timezone from ...models import Album, Photo from ...storages import get_storage ignores = [re.com...
32.589958
93
0.619078
import collections import datetime import os import re import time import unicodedata from django.conf import settings from django.core.management import base from django.db import transaction from django.utils import timezone from ...models import Album, Photo from ...storages import get_storage class Command(base...
1,393
189
69
412a4f1f6882842cebb112e99d795e33cc6c862c
316
py
Python
app.py
ztang4/tzqhexapod
3c4bab58388d5562657c997359a6dd9d910b0efd
[ "MIT" ]
671
2020-02-15T16:53:57.000Z
2022-03-29T12:57:31.000Z
app.py
neofufu/hexapod-robot-simulator
dc7e04fc60a9c89b35d7cdff6dec0d969c352244
[ "MIT" ]
85
2020-02-17T16:22:51.000Z
2021-07-03T11:46:41.000Z
app.py
neofufu/hexapod-robot-simulator
dc7e04fc60a9c89b35d7cdff6dec0d969c352244
[ "MIT" ]
102
2020-02-15T13:47:48.000Z
2022-03-28T18:40:16.000Z
import os import dash from texts import APP_TITLE from style_settings import EXTERNAL_STYLESHEETS app = dash.Dash(__name__, external_stylesheets=EXTERNAL_STYLESHEETS) app.title = APP_TITLE server = app.server server.secret_key = os.environ.get("secret_key", "secret") app.config.suppress_callback_exceptions = True
28.727273
68
0.829114
import os import dash from texts import APP_TITLE from style_settings import EXTERNAL_STYLESHEETS app = dash.Dash(__name__, external_stylesheets=EXTERNAL_STYLESHEETS) app.title = APP_TITLE server = app.server server.secret_key = os.environ.get("secret_key", "secret") app.config.suppress_callback_exceptions = True
0
0
0
3466a3be48969205f91e2d6dff4716214b53fcc9
46
py
Python
tests/components/google_domains/__init__.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/google_domains/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
tests/components/google_domains/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Tests for the google_domains component."""
23
45
0.73913
"""Tests for the google_domains component."""
0
0
0
3e9d48e7a59b0bfdb54e253b8a6e908f7ff62bbf
5,293
py
Python
tools/drawSkeleton.py
larocs/SoccerKicks
12945404da13a30e160d5e19585af3ef6ff8c74b
[ "CC0-1.0" ]
null
null
null
tools/drawSkeleton.py
larocs/SoccerKicks
12945404da13a30e160d5e19585af3ef6ff8c74b
[ "CC0-1.0" ]
null
null
null
tools/drawSkeleton.py
larocs/SoccerKicks
12945404da13a30e160d5e19585af3ef6ff8c74b
[ "CC0-1.0" ]
1
2021-05-17T23:12:22.000Z
2021-05-17T23:12:22.000Z
from math import inf import os import subprocess import pickle import ipdb from matplotlib import pyplot as plt from matplotlib import animation from mpl_toolkits.mplot3d import Axes3D HEAD = 13 NECK = 12 LEFT_SHOULDER = 9 RIGHT_SHOULDER = 8 LEFT_ELBOW = 10 RIGHT_ELBOW = 7 LEFT_WRIST = 11 RIGHT_WRIST = 6 LEFT_HIP = ...
29.082418
217
0.592103
from math import inf import os import subprocess import pickle import ipdb from matplotlib import pyplot as plt from matplotlib import animation from mpl_toolkits.mplot3d import Axes3D HEAD = 13 NECK = 12 LEFT_SHOULDER = 9 RIGHT_SHOULDER = 8 LEFT_ELBOW = 10 RIGHT_ELBOW = 7 LEFT_WRIST = 11 RIGHT_WRIST = 6 LEFT_HIP = ...
2,639
0
115
84fcd64b9c6ccf0bba58a14bc105a5789083ef80
662
py
Python
Robomak - Sphero/Final Solution/agolMegu3Tocki.py
dimitrov9/my-projects
dfd6b38b24a1faf179517e74e8b466962fe342c7
[ "MIT" ]
null
null
null
Robomak - Sphero/Final Solution/agolMegu3Tocki.py
dimitrov9/my-projects
dfd6b38b24a1faf179517e74e8b466962fe342c7
[ "MIT" ]
null
null
null
Robomak - Sphero/Final Solution/agolMegu3Tocki.py
dimitrov9/my-projects
dfd6b38b24a1faf179517e74e8b466962fe342c7
[ "MIT" ]
null
null
null
import numpy as np from math import degrees import math a = [0, 0] b = [2, 4] c = [6, 6] print(findAngle(a, b, c))
20.6875
80
0.567976
import numpy as np from math import degrees import math def findAngle(a, b, c): a = np.array(a) b = np.array(b) c = np.array(c) ba = a - b bc = c - b first = np.arctan2(b[0] - a[0],b[1]-a[1]) second = np.arctan2(c[0] - b[0],c[1]-b[1]) return abs((first - second)) > 0 """cosine_...
521
0
23
1e4911542637128c8ff91c9ec6f0f01fa05e119d
987
py
Python
release/python/0.6.1/crankshaft/crankshaft/clustering/kmeans.py
faradayio/docker-crankshaft
f12db558e6ab11746ca3016997cb7513447e75b7
[ "BSD-3-Clause" ]
50
2016-03-16T10:15:53.000Z
2021-11-14T10:59:25.000Z
release/python/0.6.1/crankshaft/crankshaft/clustering/kmeans.py
faradayio/docker-crankshaft
f12db558e6ab11746ca3016997cb7513447e75b7
[ "BSD-3-Clause" ]
180
2016-02-23T18:09:05.000Z
2020-07-12T18:04:58.000Z
release/python/0.6.1/crankshaft/crankshaft/clustering/kmeans.py
faradayio/docker-crankshaft
f12db558e6ab11746ca3016997cb7513447e75b7
[ "BSD-3-Clause" ]
21
2016-02-24T17:55:39.000Z
2021-12-21T20:39:09.000Z
from sklearn.cluster import KMeans import numpy as np from crankshaft.analysis_data_provider import AnalysisDataProvider
29.909091
70
0.610942
from sklearn.cluster import KMeans import numpy as np from crankshaft.analysis_data_provider import AnalysisDataProvider class Kmeans: def __init__(self, data_provider=None): if data_provider is None: self.data_provider = AnalysisDataProvider() else: self.data_provider = d...
169
672
23
e647f58ae4d373e807b2e05538dbe3ef92fe1e99
232
py
Python
activations/tanh.py
EdwardYGLi/neural_nets_with_numpy
7b2a72d847c67af4a9854db649853751d330ab5a
[ "MIT" ]
null
null
null
activations/tanh.py
EdwardYGLi/neural_nets_with_numpy
7b2a72d847c67af4a9854db649853751d330ab5a
[ "MIT" ]
null
null
null
activations/tanh.py
EdwardYGLi/neural_nets_with_numpy
7b2a72d847c67af4a9854db649853751d330ab5a
[ "MIT" ]
null
null
null
""" Created by Edward Li at 8/23/20 """ import numpy as np
17.846154
39
0.642241
""" Created by Edward Li at 8/23/20 """ import numpy as np def Tanh(Activation): def activation_fn(self, inputs): return np.tanh(inputs) def activation_prime(self, inputs): return 1 - np.tanh(inputs) ** 2
149
0
23
104ea5d6c5aefe6d32cea77594ef0a65b742077b
2,637
py
Python
api/tests/test_pet_create.py
Rip4568/pet-lost
b053c824e3fd13527d1ec2dd7980068413357e19
[ "MIT" ]
6
2019-10-06T18:18:08.000Z
2020-12-09T03:10:57.000Z
api/tests/test_pet_create.py
Rip4568/pet-lost
b053c824e3fd13527d1ec2dd7980068413357e19
[ "MIT" ]
70
2019-05-04T12:01:13.000Z
2021-06-09T17:49:30.000Z
api/tests/test_pet_create.py
Rip4568/pet-lost
b053c824e3fd13527d1ec2dd7980068413357e19
[ "MIT" ]
1
2021-01-25T01:27:13.000Z
2021-01-25T01:27:13.000Z
from copy import deepcopy import pytest from django.urls import reverse from rest_framework import status from pet.models import Pet @pytest.mark.django_db
29.629213
91
0.587789
from copy import deepcopy import pytest from django.urls import reverse from rest_framework import status from pet.models import Pet @pytest.mark.django_db class TestPetCreation: @pytest.fixture def pets_endpoint(self): return reverse('pet-list') @pytest.fixture def minimal_pet_creation_pa...
2,185
270
22
4b3bc8570eb1f4767003b5995fc75ca5a55e3018
343
py
Python
book_spider/use_xpath.py
Longxr/python-data-process
f5f8c2c89b449b76dde31d13c6cabb6b97b0023f
[ "MIT" ]
null
null
null
book_spider/use_xpath.py
Longxr/python-data-process
f5f8c2c89b449b76dde31d13c6cabb6b97b0023f
[ "MIT" ]
null
null
null
book_spider/use_xpath.py
Longxr/python-data-process
f5f8c2c89b449b76dde31d13c6cabb6b97b0023f
[ "MIT" ]
null
null
null
from lxml import html if __name__ == '__main__': parse_html()
20.176471
58
0.591837
from lxml import html def parse_html(): f = open('./static/index.html', 'r', encoding='utf-8') s= f.read() selector = html.fromstring(s) h2 = selector.xpath('/html/body/h2/text()') print(h2[0]) img = selector.xpath('/html/body/img/@src') print(img[0]) f.close() if __name__ == '__ma...
253
0
23
e50a8edf7061a0537f9450934bccae675c2c91e5
150
py
Python
hello.py
SerryJohns/cloud9
96d7d0c4c2de8786be25a04d6d6e4c832a5cccd0
[ "Apache-2.0" ]
null
null
null
hello.py
SerryJohns/cloud9
96d7d0c4c2de8786be25a04d6d6e4c832a5cccd0
[ "Apache-2.0" ]
null
null
null
hello.py
SerryJohns/cloud9
96d7d0c4c2de8786be25a04d6d6e4c832a5cccd0
[ "Apache-2.0" ]
null
null
null
"""Demonstrate docstrings and does nothing really.""" def myfunc(): """Simple function to demonstrate circleci.""" return 1 print(myfunc())
18.75
53
0.686667
"""Demonstrate docstrings and does nothing really.""" def myfunc(): """Simple function to demonstrate circleci.""" return 1 print(myfunc())
0
0
0
4c13fbcbc123793376e9995c59cde7bb0901c004
1,432
py
Python
ansible-devel/test/integration/targets/dict_transformations/library/convert_snake_case.py
satishcarya/ansible
ed091e174c26316f621ac16344a95c99f56bdc43
[ "MIT" ]
null
null
null
ansible-devel/test/integration/targets/dict_transformations/library/convert_snake_case.py
satishcarya/ansible
ed091e174c26316f621ac16344a95c99f56bdc43
[ "MIT" ]
null
null
null
ansible-devel/test/integration/targets/dict_transformations/library/convert_snake_case.py
satishcarya/ansible
ed091e174c26316f621ac16344a95c99f56bdc43
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: convert_snake_case short_description: test converting data to s...
25.571429
96
0.694832
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: convert_snake_case short_description: test converting data to s...
412
0
23
f45e22d75bd20c78a295d6be04634657bacb83bc
285
py
Python
src/python/baekjoon/5543.py
Hyeon9mak/Baekjoon
1595eeb260eaf41cc191bd4bbda5a9a2a817f1bd
[ "MIT" ]
null
null
null
src/python/baekjoon/5543.py
Hyeon9mak/Baekjoon
1595eeb260eaf41cc191bd4bbda5a9a2a817f1bd
[ "MIT" ]
null
null
null
src/python/baekjoon/5543.py
Hyeon9mak/Baekjoon
1595eeb260eaf41cc191bd4bbda5a9a2a817f1bd
[ "MIT" ]
null
null
null
buger = juice = 2001 for i in range(0, 5) : if(i < 3) : new_buger = int(input()) if new_buger < buger : buger = new_buger else : new_juice = int(input()) if new_juice < juice : juice = new_juice print(buger + juice - 50)
23.75
32
0.512281
buger = juice = 2001 for i in range(0, 5) : if(i < 3) : new_buger = int(input()) if new_buger < buger : buger = new_buger else : new_juice = int(input()) if new_juice < juice : juice = new_juice print(buger + juice - 50)
0
0
0
1e4112a79bb746b6e3f4263e0e92d0ad2674d2f1
13,840
py
Python
genalog/degradation/effect.py
jingjie181/genalog
5d9c3c53a1f90c9938e16f9f7e5c2cb44bc49525
[ "MIT" ]
185
2021-07-20T18:59:22.000Z
2022-03-16T10:06:13.000Z
genalog/degradation/effect.py
jingjie181/genalog
5d9c3c53a1f90c9938e16f9f7e5c2cb44bc49525
[ "MIT" ]
11
2021-07-27T21:20:44.000Z
2022-01-11T02:28:29.000Z
genalog/degradation/effect.py
jingjie181/genalog
5d9c3c53a1f90c9938e16f9f7e5c2cb44bc49525
[ "MIT" ]
18
2021-07-30T13:46:41.000Z
2021-12-12T01:36:54.000Z
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # --------------------------------------------------------- from math import floor import cv2 import numpy as np def blur(src, radius=5): """Wrapper function ...
37.005348
112
0.603974
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # --------------------------------------------------------- from math import floor import cv2 import numpy as np def blur(src, radius=5): """Wrapper function ...
0
0
0
e603ac416e46ee6215dbad96ff7e759418056e41
1,763
py
Python
scripts/fwd_sp.py
ezygeo-ai/machine-learning-and-geophysical-inversion
a77fde655f4050a115a226e672668af3c7b68e29
[ "MIT" ]
19
2019-10-07T03:34:38.000Z
2022-02-23T11:10:03.000Z
scripts/fwd_sp.py
ezygeo-ai/machine-learning-and-geophysical-inversion
a77fde655f4050a115a226e672668af3c7b68e29
[ "MIT" ]
1
2020-08-19T09:12:32.000Z
2020-08-19T09:12:32.000Z
scripts/fwd_sp.py
ezygeo-ai/machine-learning-and-geophysical-inversion
a77fde655f4050a115a226e672668af3c7b68e29
[ "MIT" ]
9
2020-07-24T08:03:53.000Z
2022-03-31T14:55:01.000Z
# Code was created by M. Heriyanto, 2020/01/13 # https://github.com/ezygeo-ai/machine-learning-and-geophysical-inversion/blob/master/scripts/fwd_sp.py import numpy as np import matplotlib.pyplot as plt import pickle # SP forward function # === TEST FORWARD MODELING x0 = 77.07 # m alpha = 309.37 * (np.p...
28.901639
106
0.643789
# Code was created by M. Heriyanto, 2020/01/13 # https://github.com/ezygeo-ai/machine-learning-and-geophysical-inversion/blob/master/scripts/fwd_sp.py import numpy as np import matplotlib.pyplot as plt import pickle # SP forward function def SPfunc(x_inp, par): var_x0 = par[0] var_alpha = par[1] ...
614
0
23
cc02a8527173e03bf4e058d8371c5a6d67adb2d0
2,837
py
Python
memory.py
yzheng51/rl-dino-run
89083f3ef8fc7211c3145eb949776a155bb675a1
[ "MIT" ]
6
2019-10-10T16:23:47.000Z
2021-12-20T07:59:10.000Z
memory.py
yzheng51/rl-dino-run
89083f3ef8fc7211c3145eb949776a155bb675a1
[ "MIT" ]
4
2020-02-15T13:20:26.000Z
2022-03-11T23:58:05.000Z
memory.py
yzheng51/rl-dino-run
89083f3ef8fc7211c3145eb949776a155bb675a1
[ "MIT" ]
3
2020-03-30T05:45:33.000Z
2021-07-21T02:28:45.000Z
""" This is a script includes two type of experience replay pool """ import random from collections import namedtuple from sum_tree import SumSegmentTree, MinSegmentTree Transition = namedtuple('Transition', ('state', 'action', 'next_state', 'reward')) class ReplayMemory: """Experience replay pool""" def ...
30.836957
82
0.617201
""" This is a script includes two type of experience replay pool """ import random from collections import namedtuple from sum_tree import SumSegmentTree, MinSegmentTree Transition = namedtuple('Transition', ('state', 'action', 'next_state', 'reward')) class ReplayMemory: """Experience replay pool""" def ...
1,960
0
215
183530fd79525964bed751e417cd14e332c60ff9
3,623
py
Python
test/travis_test_script.py
UltraMachine/python-sc2
41355f9ba3f33327b7a410c599cba3637a17c5b1
[ "MIT" ]
null
null
null
test/travis_test_script.py
UltraMachine/python-sc2
41355f9ba3f33327b7a410c599cba3637a17c5b1
[ "MIT" ]
null
null
null
test/travis_test_script.py
UltraMachine/python-sc2
41355f9ba3f33327b7a410c599cba3637a17c5b1
[ "MIT" ]
null
null
null
import sys, subprocess, time """ This script is made as a wrapper for sc2 bots to set a timeout to the bots (in case they can't find the last enemy structure or the game is ending in a draw) Ideally this script should be done with a bot that terminates on its own after certain things have been achieved, e.g. testing i...
41.170455
212
0.65857
import sys, subprocess, time """ This script is made as a wrapper for sc2 bots to set a timeout to the bots (in case they can't find the last enemy structure or the game is ending in a draw) Ideally this script should be done with a bot that terminates on its own after certain things have been achieved, e.g. testing i...
0
0
0
996dabbdde3eedc53cebf5a3d33c1ba5d462346a
11,686
py
Python
RG_modules.py
cchandre/RG
234cf2dd9976b4120634d9af914cca500227581c
[ "BSD-2-Clause" ]
null
null
null
RG_modules.py
cchandre/RG
234cf2dd9976b4120634d9af914cca500227581c
[ "BSD-2-Clause" ]
null
null
null
RG_modules.py
cchandre/RG
234cf2dd9976b4120634d9af914cca500227581c
[ "BSD-2-Clause" ]
null
null
null
# # BSD 2-Clause License # # Copyright (c) 2021, Cristel Chandre # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this ...
45.119691
222
0.615266
# # BSD 2-Clause License # # Copyright (c) 2021, Cristel Chandre # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this ...
9,591
0
276
fb91e569c4e4dc8487c50ee847984fdfd635063c
1,684
py
Python
zillipy/zilliqa/node.py
starling-foundries/pyzil
fadd59937cea4144c900adf2f33cd8498a7b7b7e
[ "MIT" ]
null
null
null
zillipy/zilliqa/node.py
starling-foundries/pyzil
fadd59937cea4144c900adf2f33cd8498a7b7b7e
[ "MIT" ]
null
null
null
zillipy/zilliqa/node.py
starling-foundries/pyzil
fadd59937cea4144c900adf2f33cd8498a7b7b7e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Zilliqa Python Library # Copyright (C) 2019 Gully Chen # MIT License """ zillipy .zilliqa.node ~~~~~~~~~~~~ Zilliqa Node API. :copyright: (c) 2019 by Gully Chen. :license: MIT License, see LICENSE for more details. """ import socket from jsonrpcclient.clients.socket_client import SocketCli...
25.907692
70
0.623515
# -*- coding: utf-8 -*- # Zilliqa Python Library # Copyright (C) 2019 Gully Chen # MIT License """ zillipy .zilliqa.node ~~~~~~~~~~~~ Zilliqa Node API. :copyright: (c) 2019 by Gully Chen. :license: MIT License, see LICENSE for more details. """ import socket from jsonrpcclient.clients.socket_client import SocketCli...
821
-4
195
c1a7ac54b28b7ddaad4fca0a321797492658e82a
27,346
py
Python
image_text_model/im_text_rnn_model.py
deepsentiment/deepsentiment
620fc7175fc7cedfe13ab9c59d48fcfdb8c47ec8
[ "Apache-2.0" ]
null
null
null
image_text_model/im_text_rnn_model.py
deepsentiment/deepsentiment
620fc7175fc7cedfe13ab9c59d48fcfdb8c47ec8
[ "Apache-2.0" ]
null
null
null
image_text_model/im_text_rnn_model.py
deepsentiment/deepsentiment
620fc7175fc7cedfe13ab9c59d48fcfdb8c47ec8
[ "Apache-2.0" ]
1
2019-01-09T16:30:53.000Z
2019-01-09T16:30:53.000Z
import os import sys import numpy as np import pandas as pd import tensorflow as tf from tensorflow.contrib import slim from tensorflow.contrib.slim.python.slim.learning import train_step from tensorflow.python.training import monitored_session from tensorflow.python.training import saver as tf_saver from scipy.ndima...
46.037037
134
0.651722
import os import sys import numpy as np import pandas as pd import tensorflow as tf from tensorflow.contrib import slim from tensorflow.contrib.slim.python.slim.learning import train_step from tensorflow.python.training import monitored_session from tensorflow.python.training import saver as tf_saver from scipy.ndima...
5,263
1
156
6217e1ea15d1af913dd2c7b1dcd67563b0cbca35
5,254
py
Python
tests/test_pipingsystemundergroundpipecircuit.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
19
2015-12-08T23:33:51.000Z
2022-01-31T04:41:10.000Z
tests/test_pipingsystemundergroundpipecircuit.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
2
2019-10-04T10:57:00.000Z
2021-10-01T06:46:17.000Z
tests/test_pipingsystemundergroundpipecircuit.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
7
2015-11-04T02:25:01.000Z
2021-12-08T03:14:28.000Z
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.node import PipingSystemUndergroundPipeCircuit log = logging.getLogger(__name__)
54.164948
200
0.784164
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.node import PipingSystemUndergroundPipeCircuit log = logging.getLogger(__name__) class TestPipingSystemUndergroundPipeCircuit(unittest.TestCase): def setUp(self): s...
4,885
43
104
90d4429562f1464c5dbb02cadc125ae828b2fa8d
1,296
py
Python
ITIPD/extractor/agreements.py
swildermann/python-doc-analyser
3faaa42ca90ebdcad55552b89e6020bb37c40320
[ "Unlicense", "MIT" ]
null
null
null
ITIPD/extractor/agreements.py
swildermann/python-doc-analyser
3faaa42ca90ebdcad55552b89e6020bb37c40320
[ "Unlicense", "MIT" ]
null
null
null
ITIPD/extractor/agreements.py
swildermann/python-doc-analyser
3faaa42ca90ebdcad55552b89e6020bb37c40320
[ "Unlicense", "MIT" ]
null
null
null
from extractor.models import *
54
126
0.56713
from extractor.models import * def agreement_by_coder(current_user): all_mapped_units = MappingUnitToUser.objects.filter(user=current_user).values_list('documentation_unit__id',flat=True) results = [0,0,0,0,0,0,0,0,0,0,0,0] control_results = [0,0,0,0,0,0,0,0,0,0,0,0] count = len(all_mapped_units) ...
1,241
0
23
10b62b1d15fcadb39d79d2f1602124a09caf9545
2,085
py
Python
toga/_doctest.py
JPLMLIA/TOGA
81ab7264fb9df9c4ea539b77424f52af166712a6
[ "Apache-2.0" ]
null
null
null
toga/_doctest.py
JPLMLIA/TOGA
81ab7264fb9df9c4ea539b77424f52af166712a6
[ "Apache-2.0" ]
null
null
null
toga/_doctest.py
JPLMLIA/TOGA
81ab7264fb9df9c4ea539b77424f52af166712a6
[ "Apache-2.0" ]
null
null
null
""" Author: Lukas Mandrake, Shawn Anderson Date : 12/4/19 Brief : Notes : Copyright 2019 California Institute of Technology. ALL RIGHTS RESERVED. U.S. Government Sponsorship acknowledged. """ import importlib import os def repo_path(): """ little function to help resolve location of doctest_files back in r...
25.120482
89
0.679137
""" Author: Lukas Mandrake, Shawn Anderson Date : 12/4/19 Brief : Notes : Copyright 2019 California Institute of Technology. ALL RIGHTS RESERVED. U.S. Government Sponsorship acknowledged. """ import importlib import os def repo_path(): """ little function to help resolve location of doctest_files back in r...
52
0
23
bde05fb807fbab733c48d05cc942c6788305d242
2,973
py
Python
FinalProject/plot.py
elvinlife/Prism
416e05364435771fe3a0408361112426da697a55
[ "MIT" ]
null
null
null
FinalProject/plot.py
elvinlife/Prism
416e05364435771fe3a0408361112426da697a55
[ "MIT" ]
null
null
null
FinalProject/plot.py
elvinlife/Prism
416e05364435771fe3a0408361112426da697a55
[ "MIT" ]
null
null
null
#!python3 # the difficulty is [0, 1, 0, ..., 0], [0, 8, 0, ..., 0], [0, 64, 0, ..., 0] import matplotlib.pyplot as plt topo_2_allblocks = { 'line': [69, 491, 1452], 'reg2': [99, 505, 920], 'reg3': [123, 579, 679], 'reg4': [122, 492, 624] } topo_2_validblocks = { 'line': [65, 361, 383], '...
34.172414
144
0.603767
#!python3 # the difficulty is [0, 1, 0, ..., 0], [0, 8, 0, ..., 0], [0, 64, 0, ..., 0] import matplotlib.pyplot as plt topo_2_allblocks = { 'line': [69, 491, 1452], 'reg2': [99, 505, 920], 'reg3': [123, 579, 679], 'reg4': [122, 492, 624] } topo_2_validblocks = { 'line': [65, 361, 383], '...
1,783
0
46
241b630c23a5e9ed0deb21f718b19d5b06e8bba3
1,155
py
Python
etl/services.py
BernarBerdikul/Async_API_part_1
0f218f38d099909fad629f6f9443fea4a29be3f8
[ "BSD-3-Clause" ]
null
null
null
etl/services.py
BernarBerdikul/Async_API_part_1
0f218f38d099909fad629f6f9443fea4a29be3f8
[ "BSD-3-Clause" ]
null
null
null
etl/services.py
BernarBerdikul/Async_API_part_1
0f218f38d099909fad629f6f9443fea4a29be3f8
[ "BSD-3-Clause" ]
null
null
null
import logging import time from datetime import datetime from functools import wraps
31.216216
107
0.447619
import logging import time from datetime import datetime from functools import wraps def backoff(start_sleep_time=0.1, factor=2, border_sleep_time=3): def func_wrapper(func): @wraps(func) def inner(*args, **kwargs): t = start_sleep_time count: int = 0 while True...
1,108
0
23
cd26e78e07512c5b788f96413cc10a5ecf2013de
1,853
py
Python
train.py
ka-th-y/Flower_Image_Classifier_Udacity
567d79526d97440b9471b435ef929159c46c682d
[ "MIT" ]
null
null
null
train.py
ka-th-y/Flower_Image_Classifier_Udacity
567d79526d97440b9471b435ef929159c46c682d
[ "MIT" ]
null
null
null
train.py
ka-th-y/Flower_Image_Classifier_Udacity
567d79526d97440b9471b435ef929159c46c682d
[ "MIT" ]
null
null
null
# Imports from here import argparse import functions_train import os parser = argparse.ArgumentParser() parser.add_argument('--arch', type = str, default = 'vgg19', help = 'which CNN Model should be used for pretraining, choose between vgg13, vgg16, vgg19, densenet121, densenet161, alexnet | (default = vgg19)') pars...
43.093023
208
0.750675
# Imports from here import argparse import functions_train import os parser = argparse.ArgumentParser() parser.add_argument('--arch', type = str, default = 'vgg19', help = 'which CNN Model should be used for pretraining, choose between vgg13, vgg16, vgg19, densenet121, densenet161, alexnet | (default = vgg19)') pars...
0
0
0
c7c9821674b5282eac57bb1479a70b6b2ab706d5
7,411
py
Python
amgut/lib/data_access/env_management.py
ElDeveloper/american-gut-web
5ef11eadad21b6e60bbd073b50bfb5ba4522017a
[ "BSD-3-Clause" ]
null
null
null
amgut/lib/data_access/env_management.py
ElDeveloper/american-gut-web
5ef11eadad21b6e60bbd073b50bfb5ba4522017a
[ "BSD-3-Clause" ]
null
null
null
amgut/lib/data_access/env_management.py
ElDeveloper/american-gut-web
5ef11eadad21b6e60bbd073b50bfb5ba4522017a
[ "BSD-3-Clause" ]
null
null
null
from os.path import abspath, dirname, join, split from glob import glob from functools import partial from subprocess import Popen, PIPE import gzip from click import echo from psycopg2 import (connect, OperationalError) from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT from natsort import natsorted from amg...
33.233184
79
0.653488
from os.path import abspath, dirname, join, split from glob import glob from functools import partial from subprocess import Popen, PIPE import gzip from click import echo from psycopg2 import (connect, OperationalError) from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT from natsort import natsorted from amg...
3,711
0
115
e81ff8fb99be003f2ac3322d7f91100142267d38
5,104
py
Python
testkitbackend/totestkit.py
polyrize/neo4j-python-driver
1ed96f94a7a59f49c473dadbb81715dc9651db98
[ "Apache-2.0" ]
null
null
null
testkitbackend/totestkit.py
polyrize/neo4j-python-driver
1ed96f94a7a59f49c473dadbb81715dc9651db98
[ "Apache-2.0" ]
null
null
null
testkitbackend/totestkit.py
polyrize/neo4j-python-driver
1ed96f94a7a59f49c473dadbb81715dc9651db98
[ "Apache-2.0" ]
null
null
null
# Copyright (c) "Neo4j" # Neo4j Sweden AB [https://neo4j.com] # # This file is part of Neo4j. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2...
29.165714
79
0.501176
# Copyright (c) "Neo4j" # Neo4j Sweden AB [https://neo4j.com] # # This file is part of Neo4j. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2...
4,193
0
46
429531e80e1e0e66c00ae68a7a3b4d132a2979ab
1,461
py
Python
lldb/examples/python/scripted_process/my_scripted_process.py
LaudateCorpus1/llvm-project-staging
cc926dc3a87af7023aa9b6c392347a0a8ed6949b
[ "Apache-2.0" ]
2,338
2018-06-19T17:34:51.000Z
2022-03-31T11:00:37.000Z
lldb/examples/python/scripted_process/my_scripted_process.py
LaudateCorpus1/llvm-project-staging
cc926dc3a87af7023aa9b6c392347a0a8ed6949b
[ "Apache-2.0" ]
265
2018-06-20T02:45:32.000Z
2022-03-23T02:37:35.000Z
lldb/examples/python/scripted_process/my_scripted_process.py
LaudateCorpus1/llvm-project-staging
cc926dc3a87af7023aa9b6c392347a0a8ed6949b
[ "Apache-2.0" ]
188
2018-06-19T22:43:57.000Z
2022-03-23T09:28:41.000Z
import os import lldb from lldb.plugins.scripted_process import ScriptedProcess
32.466667
89
0.613279
import os import lldb from lldb.plugins.scripted_process import ScriptedProcess class MyScriptedProcess(ScriptedProcess): def __init__(self, target: lldb.SBTarget, args : lldb.SBStructuredData): super().__init__(target, args) def get_memory_region_containing_address(self, addr: int) -> lldb.SBMemoryR...
1,073
20
288
7dc95282b6dd44d36c1e66b25b641315cdf6f11f
16,736
py
Python
geojson_modelica_translator/modelica/input_parser.py
Helarga/geojson-modelica-translator
0ad5dc9826dae7fac81edcaafedd3b1725fe33fc
[ "BSD-3-Clause" ]
null
null
null
geojson_modelica_translator/modelica/input_parser.py
Helarga/geojson-modelica-translator
0ad5dc9826dae7fac81edcaafedd3b1725fe33fc
[ "BSD-3-Clause" ]
null
null
null
geojson_modelica_translator/modelica/input_parser.py
Helarga/geojson-modelica-translator
0ad5dc9826dae7fac81edcaafedd3b1725fe33fc
[ "BSD-3-Clause" ]
null
null
null
""" **************************************************************************************************** :copyright (c) 2019-2021 URBANopt, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted ...
38.036364
116
0.569849
""" **************************************************************************************************** :copyright (c) 2019-2021 URBANopt, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted ...
3,932
0
81
1bc43c44bc60d413d2d2a920215744d8000616fe
1,256
py
Python
Codechef/Fair Elections.py
anuveshkothari/BugFreeCodes
37f9391cdb53319d9cf14accab4a92ea9c38f287
[ "MIT" ]
null
null
null
Codechef/Fair Elections.py
anuveshkothari/BugFreeCodes
37f9391cdb53319d9cf14accab4a92ea9c38f287
[ "MIT" ]
null
null
null
Codechef/Fair Elections.py
anuveshkothari/BugFreeCodes
37f9391cdb53319d9cf14accab4a92ea9c38f287
[ "MIT" ]
null
null
null
test_cases = int(input()) for test in range(test_cases): john_packs, jack_packs = map(int, list(input().split())) john_pack_list = list(input().split()) jack_pack_list = list(input().split()) john_pack_list = [int(x) for x in john_pack_list] jack_pack_list = [int(x) for x in jack_pack_list...
39.25
127
0.644904
test_cases = int(input()) for test in range(test_cases): john_packs, jack_packs = map(int, list(input().split())) john_pack_list = list(input().split()) jack_pack_list = list(input().split()) john_pack_list = [int(x) for x in john_pack_list] jack_pack_list = [int(x) for x in jack_pack_list...
0
0
0
8692793983348e4becbe6935e7e185057db04a74
7,319
py
Python
bio_embeddings/embed/embedder_interfaces.py
HannesStark/bio_embeddings
8c2e2b4a17903495fcced99fccb7f7287daacc49
[ "MIT" ]
null
null
null
bio_embeddings/embed/embedder_interfaces.py
HannesStark/bio_embeddings
8c2e2b4a17903495fcced99fccb7f7287daacc49
[ "MIT" ]
1
2021-01-31T20:06:52.000Z
2021-01-31T20:06:52.000Z
bio_embeddings/embed/embedder_interfaces.py
konstin/bio_embeddings
a7de49fd8e152f8e735283818e6f2e2de7b824c8
[ "MIT" ]
1
2021-12-26T22:20:48.000Z
2021-12-26T22:20:48.000Z
""" Abstract interface for Embedder. Authors: Christian Dallago """ import abc import logging import tempfile from typing import List, Generator, Optional, Iterable, ClassVar, Any, Dict, Union import torch from numpy import ndarray from bio_embeddings.utilities import ( get_model_file, get_model_directori...
37.152284
118
0.598852
""" Abstract interface for Embedder. Authors: Christian Dallago """ import abc import logging import tempfile from typing import List, Generator, Optional, Iterable, ClassVar, Any, Dict, Union import torch from numpy import ndarray from bio_embeddings.utilities import ( get_model_file, get_model_directori...
97
4,225
49
b7126f3e6010319a56c74ee674534b6b01254775
4,007
py
Python
train_icw_fmri_gan.py
BlissChapman/SyntheticStatistics
4c85d89f926a1d7944d675d4f4c3d3fe77fc45c6
[ "MIT" ]
3
2018-04-28T14:14:30.000Z
2018-08-06T23:49:26.000Z
train_icw_fmri_gan.py
BlissChapman/SyntheticStatistics
4c85d89f926a1d7944d675d4f4c3d3fe77fc45c6
[ "MIT" ]
null
null
null
train_icw_fmri_gan.py
BlissChapman/SyntheticStatistics
4c85d89f926a1d7944d675d4f4c3d3fe77fc45c6
[ "MIT" ]
null
null
null
import matplotlib matplotlib.use('Agg') import argparse import datetime import models.ICW_FMRI_GAN import nibabel import numpy as np import os import shutil import timeit import torch from brainpedia.brainpedia import Brainpedia from brainpedia.fmri_processing import invert_preprocessor_scaling from torch.autograd im...
40.887755
120
0.70277
import matplotlib matplotlib.use('Agg') import argparse import datetime import models.ICW_FMRI_GAN import nibabel import numpy as np import os import shutil import timeit import torch from brainpedia.brainpedia import Brainpedia from brainpedia.fmri_processing import invert_preprocessor_scaling from torch.autograd im...
0
0
0
1ce727b5e229f5ee8cbab9a9582ec9dc0634c458
672
py
Python
setup.py
audunsh/bubblebox
61b11c8b0f1c44da81eba4b36a9e786554ac9e0c
[ "MIT" ]
null
null
null
setup.py
audunsh/bubblebox
61b11c8b0f1c44da81eba4b36a9e786554ac9e0c
[ "MIT" ]
null
null
null
setup.py
audunsh/bubblebox
61b11c8b0f1c44da81eba4b36a9e786554ac9e0c
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name='BubbleBox', version='0.1.4', author="Audun Skau Hansen", author_email="a.s.hansen@kjemi.uio.no", description="A molecular dynamics educational tool for Jupyter Notebooks", lon...
29.217391
79
0.659226
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name='BubbleBox', version='0.1.4', author="Audun Skau Hansen", author_email="a.s.hansen@kjemi.uio.no", description="A molecular dynamics educational tool for Jupyter Notebooks", lon...
0
0
0
11516205c11a0ad59412222ece5bc949c1492a45
440
py
Python
tests/test_device.py
spiffyguy/total-connect-client
2b30801306d18b0065a1d92b46cc78d0bbb73971
[ "MIT" ]
null
null
null
tests/test_device.py
spiffyguy/total-connect-client
2b30801306d18b0065a1d92b46cc78d0bbb73971
[ "MIT" ]
null
null
null
tests/test_device.py
spiffyguy/total-connect-client
2b30801306d18b0065a1d92b46cc78d0bbb73971
[ "MIT" ]
null
null
null
"""Test TotalConnectDevice.""" from device import TotalConnectDevice from const import DEVICE_INFO_BASIC_1 def tests_init(): """Test __init__().""" test_device = TotalConnectDevice(DEVICE_INFO_BASIC_1) assert test_device.id == DEVICE_INFO_BASIC_1["DeviceID"] # test with missing flags del DEVICE_...
29.333333
60
0.754545
"""Test TotalConnectDevice.""" from device import TotalConnectDevice from const import DEVICE_INFO_BASIC_1 def tests_init(): """Test __init__().""" test_device = TotalConnectDevice(DEVICE_INFO_BASIC_1) assert test_device.id == DEVICE_INFO_BASIC_1["DeviceID"] # test with missing flags del DEVICE_...
0
0
0
17f4bfa6689338efca93e45b8db72a85480e0b97
10,813
py
Python
earth_enterprise/src/fusion/portableglobe/servers/linux/fileunpacker.py
ezeeyahoo/earthenterprise
b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9
[ "Apache-2.0" ]
2,661
2017-03-20T22:12:50.000Z
2022-03-30T09:43:19.000Z
earth_enterprise/src/fusion/portableglobe/servers/linux/fileunpacker.py
ezeeyahoo/earthenterprise
b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9
[ "Apache-2.0" ]
1,531
2017-03-24T17:20:32.000Z
2022-03-16T18:11:14.000Z
earth_enterprise/src/fusion/portableglobe/servers/linux/fileunpacker.py
ezeeyahoo/earthenterprise
b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9
[ "Apache-2.0" ]
990
2017-03-24T11:54:28.000Z
2022-03-22T11:51:47.000Z
#!/usr/bin/env python2.7 # # Copyright 2017 Google Inc. # # 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 l...
49.374429
127
0.779802
#!/usr/bin/env python2.7 # # Copyright 2017 Google Inc. # # 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 l...
2,404
5,465
254
7089d1783d9fe1848e77df1fdcc236ccf593a689
7,104
py
Python
submissions/Kinley/mygames.py
WhittKinley/Legos
861a2651f481d0463003007694c895d3df3b0fee
[ "MIT" ]
null
null
null
submissions/Kinley/mygames.py
WhittKinley/Legos
861a2651f481d0463003007694c895d3df3b0fee
[ "MIT" ]
null
null
null
submissions/Kinley/mygames.py
WhittKinley/Legos
861a2651f481d0463003007694c895d3df3b0fee
[ "MIT" ]
null
null
null
from collections import namedtuple from games import (Game) # self.validSpaces = () class FlagrantCopy(Game): """A flagrant copy of TicTacToe, from game.py It's simplified, so that moves and utility are calculated as needed Play TicTacToe on an h x v board, with Max (first player) playing 'X'. ...
29.848739
77
0.480434
from collections import namedtuple from games import (Game) class GameState: def __init__(self, to_move, board, label=None, depth=5): self.to_move = to_move self.board = board self.label = label self.maxDepth = depth # self.validSpaces = () def __str__(self): if...
3,195
-5
372
39798672ee5fb24cdc9f67f14581622ec4ef65ca
126
py
Python
mainapp/apps.py
muthukaruppanp/rudimentary-recruitment
cc56edfae1d5c529c8d9ee0bbe05a358edb21d3b
[ "MIT" ]
null
null
null
mainapp/apps.py
muthukaruppanp/rudimentary-recruitment
cc56edfae1d5c529c8d9ee0bbe05a358edb21d3b
[ "MIT" ]
null
null
null
mainapp/apps.py
muthukaruppanp/rudimentary-recruitment
cc56edfae1d5c529c8d9ee0bbe05a358edb21d3b
[ "MIT" ]
null
null
null
from django.apps import AppConfig
18
36
0.738095
from django.apps import AppConfig class MainappConfig(AppConfig): name = 'mainapp' verbose_name = 'Job Application'
0
68
23
54c447a7b525549f9f92fb3b1066507bda34fc64
4,209
py
Python
utils/kaiser_filter.py
skovacevic96/deepsignal
3b19e3283d9a79e31f0e2af150b394c423f602bc
[ "MIT" ]
null
null
null
utils/kaiser_filter.py
skovacevic96/deepsignal
3b19e3283d9a79e31f0e2af150b394c423f602bc
[ "MIT" ]
null
null
null
utils/kaiser_filter.py
skovacevic96/deepsignal
3b19e3283d9a79e31f0e2af150b394c423f602bc
[ "MIT" ]
null
null
null
import numpy as np _i0A = [ -4.41534164647933937950E-18, 3.33079451882223809783E-17, -2.43127984654795469359E-16, 1.71539128555513303061E-15, -1.16853328779934516808E-14, 7.67618549860493561688E-14, -4.85644678311192946090E-13, 2.95505266312963983461E-12, -1.72682629144155570723E-11...
26.471698
212
0.660727
import numpy as np _i0A = [ -4.41534164647933937950E-18, 3.33079451882223809783E-17, -2.43127984654795469359E-16, 1.71539128555513303061E-15, -1.16853328779934516808E-14, 7.67618549860493561688E-14, -4.85644678311192946090E-13, 2.95505266312963983461E-12, -1.72682629144155570723E-11...
584
0
94
010401143f5604e3c0f243a6dd30dcdd000ec198
1,815
py
Python
modules/additional.py
flaczq/chip-eight-emulator
4962d2f996f691ba3b07a12cf4716f2c5fd06eec
[ "MIT" ]
null
null
null
modules/additional.py
flaczq/chip-eight-emulator
4962d2f996f691ba3b07a12cf4716f2c5fd06eec
[ "MIT" ]
null
null
null
modules/additional.py
flaczq/chip-eight-emulator
4962d2f996f691ba3b07a12cf4716f2c5fd06eec
[ "MIT" ]
null
null
null
import sys import pygame # ENGINE TIMER = pygame.USEREVENT + 1 DELAY = 17 # GRAPHICS CAPTION = 'CHIP-EIGHT EMULATOR' WIDTH = 64 HEIGHT = 32 SCALE = 10 COLOR_OFF = pygame.Color(0, 0, 0, 255) COLOR_ON = pygame.Color(255, 255, 255, 255)
25.56338
82
0.568595
import sys import pygame # ENGINE TIMER = pygame.USEREVENT + 1 DELAY = 17 # GRAPHICS CAPTION = 'CHIP-EIGHT EMULATOR' WIDTH = 64 HEIGHT = 32 SCALE = 10 COLOR_OFF = pygame.Color(0, 0, 0, 255) COLOR_ON = pygame.Color(255, 255, 255, 255) class Engine: def __init__(self): print('Engine initiation') p...
1,290
-23
309
c20d62cb5b1c78fad66b2362beb6849c2ffded2a
439
py
Python
pnode/misc.py
pnode-dev/pnode
be42bce4b2e904525c11bcaa952c269e4c8ad45c
[ "MIT" ]
1
2022-03-14T21:18:21.000Z
2022-03-14T21:18:21.000Z
pnode/misc.py
pnode-dev/pnode
be42bce4b2e904525c11bcaa952c269e4c8ad45c
[ "MIT" ]
null
null
null
pnode/misc.py
pnode-dev/pnode
be42bce4b2e904525c11bcaa952c269e4c8ad45c
[ "MIT" ]
null
null
null
import torch
31.357143
82
0.665148
import torch def _flatten(sequence): flat = [p.contiguous().view(-1) for p in sequence] return torch.cat(flat) if len(flat) > 0 else torch.tensor([]) def _flatten_convert_none_to_zeros(sequence, like_sequence): flat = [ p.contiguous().view(-1) if p is not None else torch.zeros_like(q).view(-1) ...
379
0
46
f3b25f004fd3644b3111dcc0a0185a0ece7c3cfd
1,143
py
Python
sovtokenfees/sovtokenfees/test/state_proof/test_get_fees_state_proof.py
burdettadam/token-plugin
7d981d0edca174b00e20a0e46c125bbeca399bae
[ "Apache-2.0" ]
9
2018-10-26T04:59:51.000Z
2021-06-10T13:30:51.000Z
sovtokenfees/sovtokenfees/test/state_proof/test_get_fees_state_proof.py
burdettadam/token-plugin
7d981d0edca174b00e20a0e46c125bbeca399bae
[ "Apache-2.0" ]
29
2018-09-11T17:07:00.000Z
2021-04-16T20:22:19.000Z
sovtokenfees/sovtokenfees/test/state_proof/test_get_fees_state_proof.py
burdettadam/token-plugin
7d981d0edca174b00e20a0e46c125bbeca399bae
[ "Apache-2.0" ]
26
2018-09-11T16:49:40.000Z
2021-06-06T10:43:55.000Z
import pytest from sovtokenfees.constants import FEES from sovtokenfees.test.constants import NYM_FEES_ALIAS from plenum.common.constants import STATE_PROOF from plenum.test.stasher import delay_rules from plenum.test.delayers import req_delay from sovtokenfees.test.helper import send_and_check_auth_rule
40.821429
101
0.750656
import pytest from sovtokenfees.constants import FEES from sovtokenfees.test.constants import NYM_FEES_ALIAS from plenum.common.constants import STATE_PROOF from plenum.test.stasher import delay_rules from plenum.test.delayers import req_delay from sovtokenfees.test.helper import send_and_check_auth_rule def test_...
810
0
23
12c2f36b06e37627eeb767eb9dfb38e4a4dfb20d
5,858
py
Python
pyweidentity/weidentityClient.py
SUIBE-Blockchain/Weidentity-Python-SDK
d2c7b503490e18c384934d228fc054873a3cfcef
[ "Apache-2.0" ]
1
2021-06-29T07:17:16.000Z
2021-06-29T07:17:16.000Z
pyweidentity/weidentityClient.py
SUIBE-Blockchain/Weidentity-Python-SDK
d2c7b503490e18c384934d228fc054873a3cfcef
[ "Apache-2.0" ]
2
2021-11-09T07:20:58.000Z
2021-11-15T02:44:55.000Z
pyweidentity/weidentityClient.py
SUIBE-Blockchain/Weidentity-Python-SDK
d2c7b503490e18c384934d228fc054873a3cfcef
[ "Apache-2.0" ]
1
2021-06-25T18:48:16.000Z
2021-06-25T18:48:16.000Z
import logging from .Base import Base import time LOG = logging.getLogger(__name__)
35.289157
136
0.562137
import logging from .Base import Base import time LOG = logging.getLogger(__name__) class weidentityClient(Base): def __init__(self, host, port=None, version="1.0.0"): super(weidentityClient, self).__init__(host, port, version) def create_weidentity_did_first(self, publicKey, nonce): # 创建WeId...
5,473
8
319
541d9ba8b0a97da86d2695025bcd0617c83d15a1
993
py
Python
data/coco/make_annotation.py
fcdl94/WILSON
41c7d5b21b627722311d559ad5f6d835917f95d1
[ "MIT" ]
4
2022-03-30T02:58:17.000Z
2022-03-30T18:11:29.000Z
data/coco/make_annotation.py
fcdl94/WILSON
41c7d5b21b627722311d559ad5f6d835917f95d1
[ "MIT" ]
null
null
null
data/coco/make_annotation.py
fcdl94/WILSON
41c7d5b21b627722311d559ad5f6d835917f95d1
[ "MIT" ]
null
null
null
from PIL import Image import numpy as np import os import os.path as osp from tqdm import tqdm orig_path = '.' # insert here the source path where original COCO annotations are dest_path = '.' # the destination folder, which should be this one' for split in ["train2017", "val2017"]: annotations = f"{orig_path}/...
32.032258
86
0.666667
from PIL import Image import numpy as np import os import os.path as osp from tqdm import tqdm orig_path = '.' # insert here the source path where original COCO annotations are dest_path = '.' # the destination folder, which should be this one' for split in ["train2017", "val2017"]: annotations = f"{orig_path}/...
0
0
0
f10398c94f4184fdadfcf4dae561650786e86f8b
2,945
py
Python
UI/simpleFontWindow.py
typemytype/RoboFontExamples
cc5668de3d27ce996cff5eadb32d0b905c2aff65
[ "MIT" ]
12
2015-01-03T12:34:18.000Z
2022-01-24T13:11:35.000Z
UI/simpleFontWindow.py
typemytype/RoboFontExamples
cc5668de3d27ce996cff5eadb32d0b905c2aff65
[ "MIT" ]
null
null
null
UI/simpleFontWindow.py
typemytype/RoboFontExamples
cc5668de3d27ce996cff5eadb32d0b905c2aff65
[ "MIT" ]
3
2015-01-02T13:38:09.000Z
2016-05-06T21:36:01.000Z
from AppKit import NSURL, NSDocumentController from vanilla import * from defconAppKit.windows.baseWindow import BaseWindowController from lib.doodleDocument import DoodleDocument from mojo.UI import OpenGlyphWindow, OpenSpaceCenter, OpenFontInfoSheet # notifications fonts = OpenFont(showUI=False) ...
33.465909
88
0.609168
from AppKit import NSURL, NSDocumentController from vanilla import * from defconAppKit.windows.baseWindow import BaseWindowController from lib.doodleDocument import DoodleDocument from mojo.UI import OpenGlyphWindow, OpenSpaceCenter, OpenFontInfoSheet class SimpleFontWindow(BaseWindowController): def __init...
2,156
24
185
767ef4f9569676ced530e3d4bd30452ff1be7ad5
1,975
py
Python
server/handlers/create.py
dwadeflash/niuniu-bill
6cd5744727985ce8e1ed7b584cdff0c41710801a
[ "MIT" ]
null
null
null
server/handlers/create.py
dwadeflash/niuniu-bill
6cd5744727985ce8e1ed7b584cdff0c41710801a
[ "MIT" ]
null
null
null
server/handlers/create.py
dwadeflash/niuniu-bill
6cd5744727985ce8e1ed7b584cdff0c41710801a
[ "MIT" ]
null
null
null
# coding:utf-8 from handlers.base import BaseHandler from models.Approve import Approve from models.ApproveRequest import ApproveRequest from models.ApproveRelation import ApproveRelation from dao.base import session import logging logger = logging.getLogger('boilerplate.' + __name__) import requests import json fro...
40.306122
217
0.648101
# coding:utf-8 from handlers.base import BaseHandler from models.Approve import Approve from models.ApproveRequest import ApproveRequest from models.ApproveRelation import ApproveRelation from dao.base import session import logging logger = logging.getLogger('boilerplate.' + __name__) import requests import json fro...
1,532
57
23
c2f14a90af9c770b76403737ec72da1287340e4f
2,101
py
Python
authentication/models.py
Sammy-Barasa/work-record-manager
62652d7961d16f12ebb76a23f2078f1c4aa87df5
[ "MIT" ]
null
null
null
authentication/models.py
Sammy-Barasa/work-record-manager
62652d7961d16f12ebb76a23f2078f1c4aa87df5
[ "MIT" ]
9
2021-03-19T12:56:42.000Z
2022-02-07T01:46:14.000Z
authentication/models.py
Sammy-Barasa/work-record-manager
62652d7961d16f12ebb76a23f2078f1c4aa87df5
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractUser, BaseUserManager, PermissionsMixin from rest_framework_simplejwt.tokens import RefreshToken from phone_field import PhoneField # Create your models here. # Custom User model for verify user emails and sending verification links
34.442623
86
0.697763
from django.db import models from django.contrib.auth.models import AbstractUser, BaseUserManager, PermissionsMixin from rest_framework_simplejwt.tokens import RefreshToken from phone_field import PhoneField # Create your models here. # Custom User model for verify user emails and sending verification links class U...
886
797
99
c544a282cf8d2441a7c962ee2926219e6e40f570
7,517
py
Python
GamepadDriveV1.py
RocketCityDynamics/PS3GamePadV1
7e6ce0e020fa7d6f98cf7fe4bc46ab18c2db7d14
[ "CC0-1.0" ]
null
null
null
GamepadDriveV1.py
RocketCityDynamics/PS3GamePadV1
7e6ce0e020fa7d6f98cf7fe4bc46ab18c2db7d14
[ "CC0-1.0" ]
1
2021-03-07T17:11:57.000Z
2021-03-07T17:11:57.000Z
GamepadDriveV1.py
RocketCityDynamics/PS3GamePadV1
7e6ce0e020fa7d6f98cf7fe4bc46ab18c2db7d14
[ "CC0-1.0" ]
null
null
null
#Description #This Python3 script combines Afterglow PS3 USB button-press data with 2 motor activation. #testbed information #This was developed as a deliberately low powered and lightweight combination. It is also affordable at near $200 USD current pricing for all the parts. The Pi3 is used for it's common use,...
36.139423
418
0.646135
#Description #This Python3 script combines Afterglow PS3 USB button-press data with 2 motor activation. #testbed information #This was developed as a deliberately low powered and lightweight combination. It is also affordable at near $200 USD current pricing for all the parts. The Pi3 is used for it's common use,...
0
0
0
5c02ad1c076fcf7ff7b5e14aa5cbaa7cc33c61a4
1,701
py
Python
src/tests/transaction_between_wallets_test.py
trantorberk/basicblockchain
2f822a710075fe8f7daa724094a48316538f0f3e
[ "MIT" ]
1
2021-05-15T13:55:46.000Z
2021-05-15T13:55:46.000Z
tests/Transaction_between_wallets_test.py
trantorberk/basicblockchain
8bdead61dbf77362ec9179eb90aaea2ba8f0ad16
[ "MIT" ]
null
null
null
tests/Transaction_between_wallets_test.py
trantorberk/basicblockchain
8bdead61dbf77362ec9179eb90aaea2ba8f0ad16
[ "MIT" ]
null
null
null
from Blockchain import Blockchain from Wallet import Wallet from Transaction import Transaction from DataConverter import BlockDataIO import pytest # Blockchain initialization # Mining Difficulty and reward blockchain = Blockchain(2, 10) # Creating two new wallets: # Each wallet has a user name. createNewWallet fun...
26.578125
73
0.78836
from Blockchain import Blockchain from Wallet import Wallet from Transaction import Transaction from DataConverter import BlockDataIO import pytest # Blockchain initialization # Mining Difficulty and reward blockchain = Blockchain(2, 10) # Creating two new wallets: # Each wallet has a user name. createNewWallet fun...
90
0
23
2cee11cd8a8f16409727b0214e45ba7038bea576
4,821
py
Python
ImageAnalyses/MakeSuppTables.py
nicholst/narps
0a9d71a5ab435b40dcd50fea82d2961a43f0a3fc
[ "MIT" ]
30
2019-07-17T22:27:02.000Z
2021-12-21T11:38:12.000Z
ImageAnalyses/MakeSuppTables.py
nicholst/narps
0a9d71a5ab435b40dcd50fea82d2961a43f0a3fc
[ "MIT" ]
21
2019-07-18T14:26:14.000Z
2020-01-20T17:59:19.000Z
ImageAnalyses/MakeSuppTables.py
nicholst/narps
0a9d71a5ab435b40dcd50fea82d2961a43f0a3fc
[ "MIT" ]
12
2019-07-20T06:14:21.000Z
2021-09-25T00:35:29.000Z
#!/usr/bin/env python # coding: utf-8 """ Make latex file for supplementary figures """ import os import argparse import pandas import numpy from narps import Narps preamble = '''\\documentclass[10pt]{article} \\usepackage[margin=0.5in]{geometry} \\geometry{letterpaper} \\usepackage{graphicx} \\usepackage{amssymb} \...
32.355705
79
0.497407
#!/usr/bin/env python # coding: utf-8 """ Make latex file for supplementary figures """ import os import argparse import pandas import numpy from narps import Narps preamble = '''\\documentclass[10pt]{article} \\usepackage[margin=0.5in]{geometry} \\geometry{letterpaper} \\usepackage{graphicx} \\usepackage{amssymb} \...
3,441
0
23
1dfbdb9f32df12d7111a201af8914232a0ec293c
320
py
Python
app/models.py
calebschoepp/one-stop-photoshop
14015e6ba453747e348f840acdc4d2ddb876b883
[ "MIT" ]
null
null
null
app/models.py
calebschoepp/one-stop-photoshop
14015e6ba453747e348f840acdc4d2ddb876b883
[ "MIT" ]
null
null
null
app/models.py
calebschoepp/one-stop-photoshop
14015e6ba453747e348f840acdc4d2ddb876b883
[ "MIT" ]
null
null
null
from app import app, db
32
82
0.678125
from app import app, db class Post(db.Model): id = db.Column(db.Integer, primary_key=True) folder = db.Column(db.String(100), index=True, unique=True) image_count = db.Column(db.Integer, index=True) def __repr__(self): return "<Post in {} with {} images>".format(self.folder, self.image_count)
81
192
23
7292bd617479c0d12a40665475cacfd179be4175
7,301
py
Python
tests/integration/test_ifnotexists.py
reddit/cqlmapper
c5cfce4bc1fcda1562780133b4ff9407e071b0f8
[ "Apache-2.0" ]
11
2017-09-02T07:37:25.000Z
2021-04-19T03:30:59.000Z
tests/integration/test_ifnotexists.py
Seanpm2001-reddit/cqlmapper
c5cfce4bc1fcda1562780133b4ff9407e071b0f8
[ "Apache-2.0" ]
5
2018-02-15T06:40:16.000Z
2021-12-13T20:05:16.000Z
tests/integration/test_ifnotexists.py
Seanpm2001-reddit/cqlmapper
c5cfce4bc1fcda1562780133b4ff9407e071b0f8
[ "Apache-2.0" ]
15
2017-05-10T20:51:27.000Z
2021-04-19T03:31:10.000Z
# Modifications Copyright 2016-2017 Reddit, Inc. # # Copyright 2013-2016 DataStax, Inc. # # 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 # # Unle...
35.789216
97
0.681824
# Modifications Copyright 2016-2017 Reddit, Inc. # # Copyright 2013-2016 DataStax, Inc. # # 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 # # Unle...
791
5,176
184
4adea96a834e7de177fe5efd865ed445322d88c1
4,531
py
Python
src/fluctmatch/commands/cmd_thermo.py
nixnmtm/python-fluctmatch
1e9fd20cebef03f554077db093b9cad6ac0a9ada
[ "BSD-3-Clause" ]
2
2017-11-11T10:13:53.000Z
2020-04-06T07:39:05.000Z
src/fluctmatch/commands/cmd_thermo.py
nixnmtm/python-fluctmatch
1e9fd20cebef03f554077db093b9cad6ac0a9ada
[ "BSD-3-Clause" ]
2
2019-05-09T09:15:31.000Z
2019-11-25T13:03:32.000Z
src/fluctmatch/commands/cmd_thermo.py
nixnmtm/python-fluctmatch
1e9fd20cebef03f554077db093b9cad6ac0a9ada
[ "BSD-3-Clause" ]
3
2017-11-11T10:21:09.000Z
2020-08-31T15:57:57.000Z
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # fluctmatch --- https://github.com/tclick/python-fluctmatch # Copyright (c) 2013-2017 The fluctmatch Development Team and contributors # (see the file AUTHORS for the full list of names) # ...
26.190751
78
0.589274
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # fluctmatch --- https://github.com/tclick/python-fluctmatch # Copyright (c) 2013-2017 The fluctmatch Development Team and contributors # (see the file AUTHORS for the full list of names) # ...
1,713
0
22
e2c83a440240d2cd836c70002abb349f6a7c8424
593
py
Python
simple_request.py
Nicola115/online-RNN-model-to-predict-TNe
42086ba10b92d200fb9fb42b0f7dee7762067015
[ "MIT" ]
null
null
null
simple_request.py
Nicola115/online-RNN-model-to-predict-TNe
42086ba10b92d200fb9fb42b0f7dee7762067015
[ "MIT" ]
null
null
null
simple_request.py
Nicola115/online-RNN-model-to-predict-TNe
42086ba10b92d200fb9fb42b0f7dee7762067015
[ "MIT" ]
null
null
null
# USAGE # python simple_request.py # import the necessary packages import requests # initialize the Keras REST API endpoint URL along with the input # image path KERAS_REST_API_URL = "http://47.100.63.158/predict" DATA_PATH = "test.txt" # load the input image and construct the payload for the request data = open(DAT...
20.448276
65
0.735245
# USAGE # python simple_request.py # import the necessary packages import requests # initialize the Keras REST API endpoint URL along with the input # image path KERAS_REST_API_URL = "http://47.100.63.158/predict" DATA_PATH = "test.txt" # load the input image and construct the payload for the request data = open(DAT...
0
0
0
4fd5447857ae6eaf9a6085ea3415264f4572fb96
9,854
py
Python
faculdade2.0/aula 5/a.py
zmixtv1/cev-Python
edce04f86d943d9af070bf3c5e89575ff796ec9e
[ "MIT" ]
null
null
null
faculdade2.0/aula 5/a.py
zmixtv1/cev-Python
edce04f86d943d9af070bf3c5e89575ff796ec9e
[ "MIT" ]
null
null
null
faculdade2.0/aula 5/a.py
zmixtv1/cev-Python
edce04f86d943d9af070bf3c5e89575ff796ec9e
[ "MIT" ]
null
null
null
""" CEUB - Bacharelado em Ciência da Computação (BCC) - Prof. Barbosa Teclas de atalho: ctlr <d>, duplica linha. ctrl <y>, apaga linha. ctrl </>, comenta linha. Monitoria (plantão de dúvidas): https://monitoriaceub.github.io/Monitoria/index.html - Com base nos conceitos de POO, implemente a entidade pessoa ...
63.987013
99
0.598234
""" CEUB - Bacharelado em Ciência da Computação (BCC) - Prof. Barbosa Teclas de atalho: ctlr <d>, duplica linha. ctrl <y>, apaga linha. ctrl </>, comenta linha. Monitoria (plantão de dúvidas): https://monitoriaceub.github.io/Monitoria/index.html - Com base nos conceitos de POO, implemente a entidade pessoa ...
2,989
80
256
ff52f85faeb9b2d1c34d76d30352362eed75ba7d
1,264
py
Python
tests/test_client_ecs.py
jokimina/aliyunpy
fbfda8a7dc7e89cc79621bee31622ea9547944fa
[ "MIT" ]
1
2019-07-26T01:31:26.000Z
2019-07-26T01:31:26.000Z
tests/test_client_ecs.py
jokimina/aliyunpy
fbfda8a7dc7e89cc79621bee31622ea9547944fa
[ "MIT" ]
null
null
null
tests/test_client_ecs.py
jokimina/aliyunpy
fbfda8a7dc7e89cc79621bee31622ea9547944fa
[ "MIT" ]
null
null
null
import re import json import httpretty from aliyunpy.client import AliyunClient from .config import auto_set_fixture from .base import BaseAliyunTestCase
37.176471
119
0.648734
import re import json import httpretty from aliyunpy.client import AliyunClient from .config import auto_set_fixture from .base import BaseAliyunTestCase class AliyunClientEcsTestCase(BaseAliyunTestCase): @httpretty.activate @auto_set_fixture def test_list_ecs(self, fixture=None): p1...
911
167
24
85ac389835d447e98bc73c29001a4edcceac45d0
3,824
py
Python
Taxi/TaxiDataFormatter/dataformatter_v2.py
sachinumrao/Kaggle
5a576d9db71197c95a601909abcbf4e91c10e4cb
[ "MIT" ]
null
null
null
Taxi/TaxiDataFormatter/dataformatter_v2.py
sachinumrao/Kaggle
5a576d9db71197c95a601909abcbf4e91c10e4cb
[ "MIT" ]
null
null
null
Taxi/TaxiDataFormatter/dataformatter_v2.py
sachinumrao/Kaggle
5a576d9db71197c95a601909abcbf4e91c10e4cb
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from datetime import datetime from math import radians, cos, sin, asin, sqrt def weekday(x): """ Figures out the day of the week. Outputs 1 for monday,2 for tuesday and so on. """ return (x.weekday()+1) def is_weekend(x): """ Figures out if it was weeken...
30.83871
106
0.645921
import pandas as pd import numpy as np from datetime import datetime from math import radians, cos, sin, asin, sqrt def __init__(): print("Using DataFormatter Class") def weekday(x): """ Figures out the day of the week. Outputs 1 for monday,2 for tuesday and so on. """ return (x.weekday()+1) def...
2,451
0
46
c4519123b690b492f3a8ac040cb19856e53c84c7
2,278
py
Python
train/trainers/dse_trainer.py
Bhaskers-Blu-Org2/Distilled-Sentence-Embedding
092b70830564c65a2efe8cadecd5da2d5dfdfba9
[ "MIT" ]
23
2019-12-11T14:52:54.000Z
2021-09-23T16:03:14.000Z
train/trainers/dse_trainer.py
Bhaskers-Blu-Org2/Distilled-Sentence-Embedding
092b70830564c65a2efe8cadecd5da2d5dfdfba9
[ "MIT" ]
7
2020-07-17T11:18:48.000Z
2022-03-12T00:05:57.000Z
train/trainers/dse_trainer.py
microsoft/Distilled-Sentence-Embedding
7e3e87bf6d854c45fb9e5fde6695aa9524325ae7
[ "MIT" ]
9
2020-01-03T13:26:39.000Z
2021-09-13T12:31:35.000Z
import utils.module as module_utils from evaluation.evaluators.evaluator import VoidEvaluator from train.trainer import Trainer class DSETrainer(Trainer): """ Trainer for bert distillation training. """
42.185185
134
0.701493
import utils.module as module_utils from evaluation.evaluators.evaluator import VoidEvaluator from train.trainer import Trainer class DSETrainer(Trainer): """ Trainer for bert distillation training. """ def __init__(self, model, optimizer, loss_fn, distillation_coeff=0, gradient_accumulation_steps=1,...
1,980
0
81
39bb7a9dd4b2d29f8232d6c318d335dd5348357b
982
py
Python
ctf/migrations/0005_auto_20171220_1312.py
scnerd/pythonathon_v3
61548db58e3e3da501d9ea8b14240b5ff9deaea1
[ "MIT" ]
null
null
null
ctf/migrations/0005_auto_20171220_1312.py
scnerd/pythonathon_v3
61548db58e3e3da501d9ea8b14240b5ff9deaea1
[ "MIT" ]
1
2018-04-27T21:53:32.000Z
2018-04-27T21:53:32.000Z
ctf/migrations/0005_auto_20171220_1312.py
scnerd/pythonathon_v3
61548db58e3e3da501d9ea8b14240b5ff9deaea1
[ "MIT" ]
null
null
null
# Generated by Django 2.0 on 2017-12-20 18:12 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
33.862069
145
0.642566
# Generated by Django 2.0 on 2017-12-20 18:12 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('ctf', '0004_auto_20171220_...
0
804
23
37c418fa3088177224da58f969f412828da3395f
390
py
Python
colatz.py
mbaykara/python_playground
f5bfd0b4ea8da73ba986b8984623d68036695677
[ "MIT" ]
null
null
null
colatz.py
mbaykara/python_playground
f5bfd0b4ea8da73ba986b8984623d68036695677
[ "MIT" ]
null
null
null
colatz.py
mbaykara/python_playground
f5bfd0b4ea8da73ba986b8984623d68036695677
[ "MIT" ]
null
null
null
#task in automate boring stuff print("Enter a number:") try: n = int(input()) cyclic(n) except ValueError: print("Unvalied value")
18.571429
32
0.502564
#task in automate boring stuff def cyclic(number): if number % 2 == 0: if number // 2 == 1: print(1) else: print(number//2) cyclic(number // 2) else: print((number * 3) + 1) cyclic((number * 3) + 1) print("Enter a number:") try: n = int(...
222
0
23
4449a2e986cfd6ae011357bced8d18ba86ab207f
956
py
Python
get_data_users_github.py
Limarceu/get_data_users_github
3da6936160fac7e57f67251c1f91c77c0f399350
[ "MIT" ]
null
null
null
get_data_users_github.py
Limarceu/get_data_users_github
3da6936160fac7e57f67251c1f91c77c0f399350
[ "MIT" ]
null
null
null
get_data_users_github.py
Limarceu/get_data_users_github
3da6936160fac7e57f67251c1f91c77c0f399350
[ "MIT" ]
null
null
null
import requests from urllib.request import urlopen from PIL import Image '''Some app that get requests from api.github.com/users''' if __name__ == '__main__': usuario = input('nome de usuario do github: ') geral = get_usuario(usuario) info = subs(usuario) sz_info_subs = list(range(len(info))) #S...
28.969697
167
0.676778
import requests from urllib.request import urlopen from PIL import Image '''Some app that get requests from api.github.com/users''' def get_usuario(username): return requests.get(f'https://api.github.com/users/{username}').json() def subs(username): return requests.get(get_usuario(username)['subscriptions_ur...
153
0
46
a3dc817b69c50cbb1bb494a62a329e9559709259
13,534
py
Python
doc/conf.py
Linus-Albertus/spyder-docs
ec623b6ecf71a19a342b07706cecb21f04538752
[ "MIT" ]
1
2021-06-20T14:52:38.000Z
2021-06-20T14:52:38.000Z
doc/conf.py
juanis2112/spyder-docs
a3a579ce6e7e42c9d9bbd88ac4e76650b7093e5c
[ "MIT" ]
null
null
null
doc/conf.py
juanis2112/spyder-docs
a3a579ce6e7e42c9d9bbd88ac4e76650b7093e5c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Spyder documentation build configuration file, created by # sphinx-quickstart on Fri Jul 10 16:32:25 2009. # # This file is execfile()d with the current directory set to its parent dir. # # This file does only contain a selection of the most common options. For a # full list see the document...
31.184332
79
0.663366
# -*- coding: utf-8 -*- # # Spyder documentation build configuration file, created by # sphinx-quickstart on Fri Jul 10 16:32:25 2009. # # This file is execfile()d with the current directory set to its parent dir. # # This file does only contain a selection of the most common options. For a # full list see the document...
602
817
69
c1a728a8a0bac12a1fc785907e6851187fb94874
7,560
py
Python
src/forest3D/ground_removal.py
MarcFletcher-HQP/forest_3d_app
dc15c5d633b0f6e83620e2ed70e51e4c391c44ef
[ "MIT" ]
30
2021-09-13T17:53:18.000Z
2022-02-22T02:09:01.000Z
src/forest3D/ground_removal.py
MarcFletcher-HQP/forest_3d_app
dc15c5d633b0f6e83620e2ed70e51e4c391c44ef
[ "MIT" ]
null
null
null
src/forest3D/ground_removal.py
MarcFletcher-HQP/forest_3d_app
dc15c5d633b0f6e83620e2ed70e51e4c391c44ef
[ "MIT" ]
10
2021-09-13T17:53:30.000Z
2021-12-30T08:01:10.000Z
''' Authors: Dr. Lloyd Windrim and Dr. Mitch Bryson Required packages: numpy, scipy, scikit-learn The primary purpose of this module is to remove and load the ground. The function removeGround() uses the TreePointCloud() class to remove the ground from the input pointcloud, and save the ground as a mes...
41.311475
126
0.578968
''' Authors: Dr. Lloyd Windrim and Dr. Mitch Bryson Required packages: numpy, scipy, scikit-learn The primary purpose of this module is to remove and load the ground. The function removeGround() uses the TreePointCloud() class to remove the ground from the input pointcloud, and save the ground as a mes...
6,239
8
198
783ef41a089477667a2ab5042f93601f4264255f
3,260
py
Python
opportunity/tests.py
imnotberg/crm
03f3e82c9794b6a0f8aacceea7a644fdc8ff05ef
[ "MIT" ]
1
2019-06-12T19:40:20.000Z
2019-06-12T19:40:20.000Z
opportunity/tests.py
teeso/Django-CRM
03f3e82c9794b6a0f8aacceea7a644fdc8ff05ef
[ "MIT" ]
null
null
null
opportunity/tests.py
teeso/Django-CRM
03f3e82c9794b6a0f8aacceea7a644fdc8ff05ef
[ "MIT" ]
null
null
null
from django.test import TestCase from opportunity.models import Opportunity from common.models import Address from accounts.models import Account from contacts.models import Contact from common.models import User from django.utils import timezone # Create your tests here.
38.352941
79
0.647239
from django.test import TestCase from opportunity.models import Opportunity from common.models import Address from accounts.models import Account from contacts.models import Contact from common.models import User from django.utils import timezone # Create your tests here. class OpportunityModel(object): def set...
2,552
125
304
0b2392f3f464330398bf29984118d858df60d10c
12,730
py
Python
editarticle.py
mgedigian/wikibots
3e8fd8df17a3b5e45b29cb857881269027ca0a49
[ "Unlicense" ]
1
2016-05-09T03:32:08.000Z
2016-05-09T03:32:08.000Z
editarticle.py
mgedigian/wikibots
3e8fd8df17a3b5e45b29cb857881269027ca0a49
[ "Unlicense" ]
null
null
null
editarticle.py
mgedigian/wikibots
3e8fd8df17a3b5e45b29cb857881269027ca0a49
[ "Unlicense" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- ## ## modified to use mwclient ## ## # Edit a Wikipedia article with your favourite editor. # # (C) Gerrit Holl 2004 # Distributed under the terms of the MIT license. # Version 0.4. # # TODO: - non existing pages # - edit conflicts # - minor edits # - watc...
36.164773
116
0.584996
#!/usr/bin/python # -*- coding: utf-8 -*- ## ## modified to use mwclient ## ## # Edit a Wikipedia article with your favourite editor. # # (C) Gerrit Holl 2004 # Distributed under the terms of the MIT license. # Version 0.4. # # TODO: - non existing pages # - edit conflicts # - minor edits # - watc...
3,334
3,504
140
937fe607fffd5be85e64eeef02d2376219247c2f
13,889
py
Python
utils/tk/WeightedAggregatorOptionsDialog.py
jakub-tomczak/ror-gui
a4b6c8dd081fd845e255063d4bafe086e738e63f
[ "MIT" ]
null
null
null
utils/tk/WeightedAggregatorOptionsDialog.py
jakub-tomczak/ror-gui
a4b6c8dd081fd845e255063d4bafe086e738e63f
[ "MIT" ]
null
null
null
utils/tk/WeightedAggregatorOptionsDialog.py
jakub-tomczak/ror-gui
a4b6c8dd081fd845e255063d4bafe086e738e63f
[ "MIT" ]
null
null
null
from functools import partial import tkinter as tk from tkinter import IntVar, StringVar, Variable, ttk from typing import Callable, List, Tuple from collections import namedtuple from ror.ror_solver import TIE_RESOLVERS from ror.WeightedResultAggregator import WeightedResultAggregator from utils.AlphaValueWithWeight ...
49.427046
126
0.670315
from functools import partial import tkinter as tk from tkinter import IntVar, StringVar, Variable, ttk from typing import Callable, List, Tuple from collections import namedtuple from ror.ror_solver import TIE_RESOLVERS from ror.WeightedResultAggregator import WeightedResultAggregator from utils.AlphaValueWithWeight ...
12,351
138
489
dcbce40f9bdb35e68604a9c58606b47ae13f3725
6,264
py
Python
fluiddb/schema/scripts/tests/test_trending.py
fluidinfo/fluiddb
b5a8c8349f3eaf3364cc4efba4736c3e33b30d96
[ "Apache-2.0" ]
3
2021-05-10T14:41:30.000Z
2021-12-16T05:53:30.000Z
fluiddb/schema/scripts/tests/test_trending.py
fluidinfo/fluiddb
b5a8c8349f3eaf3364cc4efba4736c3e33b30d96
[ "Apache-2.0" ]
null
null
null
fluiddb/schema/scripts/tests/test_trending.py
fluidinfo/fluiddb
b5a8c8349f3eaf3364cc4efba4736c3e33b30d96
[ "Apache-2.0" ]
2
2018-01-24T09:03:21.000Z
2021-06-25T08:34:54.000Z
from calendar import timegm from datetime import datetime, timedelta from json import loads from fluiddb.data.system import createSystemData from fluiddb.model.comment import CommentAPI from fluiddb.model.object import ObjectAPI from fluiddb.model.user import UserAPI, getUser from fluiddb.model.value import TagValueAP...
39.898089
79
0.616379
from calendar import timegm from datetime import datetime, timedelta from json import loads from fluiddb.data.system import createSystemData from fluiddb.model.comment import CommentAPI from fluiddb.model.object import ObjectAPI from fluiddb.model.user import UserAPI, getUser from fluiddb.model.value import TagValueAP...
511
5,207
23
bba5ec5ee218ef30daab10fe172b51c78e3cf3a4
4,040
py
Python
auto_encoder.py
kredy/Keras-Projects
44c9a7b27f31a8d3eaa7b3bc7a0396d2eb0bf430
[ "MIT" ]
1
2021-06-30T13:25:35.000Z
2021-06-30T13:25:35.000Z
auto_encoder.py
kredy/Keras-Projects
44c9a7b27f31a8d3eaa7b3bc7a0396d2eb0bf430
[ "MIT" ]
null
null
null
auto_encoder.py
kredy/Keras-Projects
44c9a7b27f31a8d3eaa7b3bc7a0396d2eb0bf430
[ "MIT" ]
2
2020-08-04T01:52:55.000Z
2021-03-16T19:12:20.000Z
''' Convolutional autoencoder on MNIST dataset using Keras functional API ''' from keras.datasets import mnist from keras.models import Model from keras.layers import Activation, Input, BatchNormalization from keras.layers import Conv2D, Conv2DTranspose from keras.callbacks import TensorBoard from keras.optimizers ...
35.438596
118
0.693069
''' Convolutional autoencoder on MNIST dataset using Keras functional API ''' from keras.datasets import mnist from keras.models import Model from keras.layers import Activation, Input, BatchNormalization from keras.layers import Conv2D, Conv2DTranspose from keras.callbacks import TensorBoard from keras.optimizers ...
3,346
0
67
0cd1a75c0316d6f0f32d34938e3d344fa77e0ab9
2,838
py
Python
tornado_layer/base_handler.py
sherry0429/TornadoLayer
c58f3bbd9f409fd8506f30d3002499b294ff7303
[ "Apache-2.0" ]
null
null
null
tornado_layer/base_handler.py
sherry0429/TornadoLayer
c58f3bbd9f409fd8506f30d3002499b294ff7303
[ "Apache-2.0" ]
null
null
null
tornado_layer/base_handler.py
sherry0429/TornadoLayer
c58f3bbd9f409fd8506f30d3002499b294ff7303
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Copyright (C) 2017 tianyou pan <sherry0429 at SOAPython> """ import logging import tornado.web import json class MirrorBaseHttpHandler(tornado.web.RequestHandler): """ 这个类是服务的底层抽象。 它将http的Get,Put,Post,Delete请求分别于四个服务函数关联。 业务逻辑不需要于此类打交道。 """ logger = logging.getLo...
28.959184
112
0.564482
# -*- coding: utf-8 -*- """ Copyright (C) 2017 tianyou pan <sherry0429 at SOAPython> """ import logging import tornado.web import json class MirrorBaseHttpHandler(tornado.web.RequestHandler): """ 这个类是服务的底层抽象。 它将http的Get,Put,Post,Delete请求分别于四个服务函数关联。 业务逻辑不需要于此类打交道。 """ logger = logging.getLo...
733
0
108
368ac274bbbc027fc3d176461e7c1b9f34994217
406
py
Python
nationalCSIRTs/csv2json.py
certat/contacts.cert.at
a14f855f1e51f650c19590a2784dfbb446e4064a
[ "BSD-3-Clause" ]
null
null
null
nationalCSIRTs/csv2json.py
certat/contacts.cert.at
a14f855f1e51f650c19590a2784dfbb446e4064a
[ "BSD-3-Clause" ]
1
2019-08-08T11:06:03.000Z
2019-08-08T13:42:45.000Z
nationalCSIRTs/csv2json.py
certat/contacts.cert.at
a14f855f1e51f650c19590a2784dfbb446e4064a
[ "BSD-3-Clause" ]
1
2020-11-16T16:10:45.000Z
2020-11-16T16:10:45.000Z
#!/usr/bin/env python import csv import sys import json print('[') delim=';' quotechar='"' with sys.stdin as csvfile: r = csv.DictReader(csvfile, delimiter=delim, quotechar=quotechar) for row in r: json.dump(row, sys.stdout) sys.stdout.write(',\n') print('{ "_meta": { "comment": "export of n...
22.555556
128
0.662562
#!/usr/bin/env python import csv import sys import json print('[') delim=';' quotechar='"' with sys.stdin as csvfile: r = csv.DictReader(csvfile, delimiter=delim, quotechar=quotechar) for row in r: json.dump(row, sys.stdout) sys.stdout.write(',\n') print('{ "_meta": { "comment": "export of n...
0
0
0
b656645bcc71a628ef668e7169c02be6698981f6
48
py
Python
server/tomato/__init__.py
dtcooper/tomato
a54aa3bc3858fa8ad377696f5275ac0c2103f33a
[ "MIT" ]
1
2020-02-25T09:21:31.000Z
2020-02-25T09:21:31.000Z
server/tomato/__init__.py
dtcooper/tomato
a54aa3bc3858fa8ad377696f5275ac0c2103f33a
[ "MIT" ]
null
null
null
server/tomato/__init__.py
dtcooper/tomato
a54aa3bc3858fa8ad377696f5275ac0c2103f33a
[ "MIT" ]
null
null
null
default_app_config = 'tomato.apps.TomatoConfig'
24
47
0.833333
default_app_config = 'tomato.apps.TomatoConfig'
0
0
0