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
4804b5c1a9808e565ed5783c6b82e5bb1b8d0d31
16,955
py
Python
call_openalex_api.py
ourresearch/openalex-api
b689f5c3a2946d8dc9a0ef5107d721c0ac3a4bed
[ "MIT" ]
6
2021-06-15T09:24:09.000Z
2022-03-10T18:39:43.000Z
call_openalex_api.py
ourresearch/openalex-api
b689f5c3a2946d8dc9a0ef5107d721c0ac3a4bed
[ "MIT" ]
2
2021-07-19T12:09:15.000Z
2022-02-15T01:26:06.000Z
call_openalex_api.py
ourresearch/openalex-api
b689f5c3a2946d8dc9a0ef5107d721c0ac3a4bed
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import os import json import re import argparse import random from time import time from itertools import combinations from app import db from util import run_sql from util import safe_commit from util import Timer from util import elapsed from app import get_db_cursor # # p...
38.015695
177
0.646476
#!/usr/bin/python # -*- coding: utf-8 -*- import os import json import re import argparse import random from time import time from itertools import combinations from app import db from util import run_sql from util import safe_commit from util import Timer from util import elapsed from app import get_db_cursor # # p...
7,612
0
138
ad7f1c5c26125e38aced5b7192a5d2c53a228966
45,474
py
Python
xpath/compilerv1/XPathParser.py
cs4221/xpath
55cbfe7e7e0d4ec0edd85cf0cb5fa9c0320356e6
[ "Unlicense" ]
null
null
null
xpath/compilerv1/XPathParser.py
cs4221/xpath
55cbfe7e7e0d4ec0edd85cf0cb5fa9c0320356e6
[ "Unlicense" ]
null
null
null
xpath/compilerv1/XPathParser.py
cs4221/xpath
55cbfe7e7e0d4ec0edd85cf0cb5fa9c0320356e6
[ "Unlicense" ]
null
null
null
# Generated from .\xpath\xpathgrammer\XPath.g4 by ANTLR 4.9.3 # encoding: utf-8 from antlr4 import * from io import StringIO import sys if sys.version_info[1] > 5: from typing import TextIO else: from typing.io import TextIO
33.192701
191
0.587611
# Generated from .\xpath\xpathgrammer\XPath.g4 by ANTLR 4.9.3 # encoding: utf-8 from antlr4 import * from io import StringIO import sys if sys.version_info[1] > 5: from typing import TextIO else: from typing.io import TextIO def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub...
34,538
10,656
46
14612923448cbe6faf2090c1e83774b2bb10eabc
9,899
py
Python
placement_alg/widest_path.py
nigsics/dcpmtool
2fa9f2424c6b4b1f4d279f4bb644b14cfde7fa39
[ "Apache-2.0" ]
3
2018-04-25T08:56:58.000Z
2020-10-10T01:45:38.000Z
placement_alg/widest_path.py
nigsics/dcpmtool
2fa9f2424c6b4b1f4d279f4bb644b14cfde7fa39
[ "Apache-2.0" ]
null
null
null
placement_alg/widest_path.py
nigsics/dcpmtool
2fa9f2424c6b4b1f4d279f4bb644b14cfde7fa39
[ "Apache-2.0" ]
null
null
null
__author__ = 'lsteng' # Copyright 2018 Shaoteng Liu # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
31.626198
111
0.457521
__author__ = 'lsteng' # Copyright 2018 Shaoteng Liu # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
5,186
0
91
d8ed6e1a4c2d4bb9cd6d5f71dc3e9a86081a3142
10,146
py
Python
python/modules/connection.py
DuckLov3r/sovrin-whs
3f2c9e6749834e1abde26d3acc8ce9312564534a
[ "Apache-2.0" ]
null
null
null
python/modules/connection.py
DuckLov3r/sovrin-whs
3f2c9e6749834e1abde26d3acc8ce9312564534a
[ "Apache-2.0" ]
null
null
null
python/modules/connection.py
DuckLov3r/sovrin-whs
3f2c9e6749834e1abde26d3acc8ce9312564534a
[ "Apache-2.0" ]
null
null
null
""" Module to handle the connection process. """ # pylint: disable=import-error import json import base64 import uuid import aiohttp from indy import crypto, did, pairwise, non_secrets import serializer.json_serializer as Serializer from router.simple_router import SimpleRouter from . import Module from message imp...
32.941558
119
0.599645
""" Module to handle the connection process. """ # pylint: disable=import-error import json import base64 import uuid import aiohttp from indy import crypto, did, pairwise, non_secrets import serializer.json_serializer as Serializer from router.simple_router import SimpleRouter from . import Module from message imp...
4,891
4,808
46
0aa4a14db216c3368a4fe2d774090f7652b2ff51
352
py
Python
test-simple/tests.py
Tobils/recipe-app-api
3b0948dfd7dbefc57ae85ba8b51fcf77c5c04344
[ "MIT" ]
1
2021-02-09T04:14:18.000Z
2021-02-09T04:14:18.000Z
test-simple/tests.py
Tobils/recipe-app-api
3b0948dfd7dbefc57ae85ba8b51fcf77c5c04344
[ "MIT" ]
null
null
null
test-simple/tests.py
Tobils/recipe-app-api
3b0948dfd7dbefc57ae85ba8b51fcf77c5c04344
[ "MIT" ]
null
null
null
from django.test import TestCase from app.calc import add, substract """ run unit testing """ class CalcTest(TestCase): """ test add 2 those number """ """ test subtract 2 those number """
22
44
0.667614
from django.test import TestCase from app.calc import add, substract """ run unit testing """ class CalcTest(TestCase): """ test add 2 those number """ def test_add_numbers(self): self.assertEqual(add(3,8), 11) """ test subtract 2 those number """ def test_subtract_number(self): self...
100
0
52
56e26ecea566ec4bafd68a0cbf76430de03e7528
872
py
Python
DWF-server/routes/register.py
sed-inf-u-szeged/DeepWaterFramework
30e9c0145300e24834a3d4a7dde25002c638dd5a
[ "Apache-2.0" ]
6
2020-06-18T22:38:09.000Z
2022-01-13T14:32:56.000Z
DWF-server/routes/register.py
sed-inf-u-szeged/DeepWaterFramework
30e9c0145300e24834a3d4a7dde25002c638dd5a
[ "Apache-2.0" ]
18
2020-01-13T08:32:53.000Z
2021-07-23T08:26:02.000Z
DWF-server/routes/register.py
sed-inf-u-szeged/DeepWaterFramework
30e9c0145300e24834a3d4a7dde25002c638dd5a
[ "Apache-2.0" ]
2
2020-06-18T09:50:59.000Z
2021-03-18T04:52:53.000Z
from flask_restful import Resource, abort from flask import request, jsonify, make_response import config from controller import worker_store as ws
32.296296
121
0.62844
from flask_restful import Resource, abort from flask import request, jsonify, make_response import config from controller import worker_store as ws class Register(Resource): @staticmethod def post(): try: if not request.json['platform_info'] or not request.json['environment'] or not reque...
651
48
23
48afb7387053f88932b37b3050e723a814bf71b5
60,513
py
Python
app.py
BastelPichi/duco-rest-api
2d39a3462bc49186deaca48184a67e452c6acb44
[ "MIT" ]
9
2021-06-25T19:53:35.000Z
2022-03-20T21:40:08.000Z
app.py
BastelPichi/duco-rest-api
2d39a3462bc49186deaca48184a67e452c6acb44
[ "MIT" ]
3
2021-07-19T13:01:53.000Z
2022-03-12T14:38:00.000Z
app.py
BastelPichi/duco-rest-api
2d39a3462bc49186deaca48184a67e452c6acb44
[ "MIT" ]
17
2021-05-18T07:58:45.000Z
2022-02-08T17:10:55.000Z
#!/usr/bin/env python3 """ Duino-Coin REST API © MIT licensed https://duinocoin.com https://github.com/revoxhere/duco-rest-api Duino-Coin Team & Community 2019-2021 """ import gevent.monkey gevent.monkey.patch_all() from wrapped_duco_functions import * from Server import ( now, SAVE_TIME, POOL_DATABASE, CONFIG_WHI...
33.562396
164
0.555368
#!/usr/bin/env python3 """ Duino-Coin REST API © MIT licensed https://duinocoin.com https://github.com/revoxhere/duco-rest-api Duino-Coin Team & Community 2019-2021 """ import gevent.monkey gevent.monkey.patch_all() from wrapped_duco_functions import * from Server import ( now, SAVE_TIME, POOL_DATABASE, CONFIG_WHI...
52,237
0
1,187
5a926a66a5d43086942d947198f1101fa00dd692
1,108
py
Python
exponent/ds_2.py
vinaykumar2491/ProgrammingContests
ae250797121761cf7a4aca0e38410b3ced5107f3
[ "MIT" ]
null
null
null
exponent/ds_2.py
vinaykumar2491/ProgrammingContests
ae250797121761cf7a4aca0e38410b3ced5107f3
[ "MIT" ]
null
null
null
exponent/ds_2.py
vinaykumar2491/ProgrammingContests
ae250797121761cf7a4aca0e38410b3ced5107f3
[ "MIT" ]
null
null
null
## @imflash217 ## ## creating a new file with open("numbers.txt", "w") as file: for i in range(1000): print(str(i), file=file) ################################################################## ################################################################# import heapq ###########################...
25.181818
77
0.444946
## @imflash217 ## ## creating a new file with open("numbers.txt", "w") as file: for i in range(1000): print(str(i), file=file) ################################################################## def find_max(input): max_num = float("-inf") for x in input: if x > max_num: max_n...
504
0
46
72c083cc21d6203af2fadb7ffc19c38bb11cbbb0
12,612
py
Python
agents/DQNAgent.py
bshahrok/Deep-Reinforcement-Learning-in-Video-Games
4f72dca6061e34b002f99a03d9b287e6012e8095
[ "MIT" ]
2
2019-03-26T10:05:18.000Z
2021-02-15T13:12:17.000Z
agents/DQNAgent.py
vigneshwerv/Deep-Reinforcement-Learning-in-Video-Games
4f72dca6061e34b002f99a03d9b287e6012e8095
[ "MIT" ]
null
null
null
agents/DQNAgent.py
vigneshwerv/Deep-Reinforcement-Learning-in-Video-Games
4f72dca6061e34b002f99a03d9b287e6012e8095
[ "MIT" ]
null
null
null
from BaseAgent import BaseAgent import logging import math import numpy as np import os import tensorflow as tf logger = logging.getLogger(__name__) logger.setLevel(logging.INFO)
45.042857
103
0.545512
from BaseAgent import BaseAgent import logging import math import numpy as np import os import tensorflow as tf logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) class DQNAgent(BaseAgent): def __init__(self, num_actions, discount_factor, args): self.learning_rate = 0.00025 self...
11,972
5
454
eac43592668ca085fcebcd39100216c26abd2264
11,222
py
Python
python3/prac/pracutils/evalSim.py
danielnyga/prac-dev
107855cb9ddc294467098334725065b3937af150
[ "BSD-2-Clause" ]
3
2018-10-04T05:13:02.000Z
2022-01-18T15:06:05.000Z
python3/prac/pracutils/evalSim.py
danielnyga/prac-dev
107855cb9ddc294467098334725065b3937af150
[ "BSD-2-Clause" ]
2
2017-03-01T07:17:14.000Z
2019-06-26T14:28:57.000Z
python3/prac/pracutils/evalSim.py
danielnyga/prac-dev
107855cb9ddc294467098334725065b3937af150
[ "BSD-2-Clause" ]
2
2018-12-18T23:01:11.000Z
2020-12-15T08:57:19.000Z
# Classifier Evaluation incorporating similarity # # (C) 2015 by Mareike Picklum (mareikep@cs.uni-bremen.de) # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including #...
38.563574
208
0.553466
# Classifier Evaluation incorporating similarity # # (C) 2015 by Mareike Picklum (mareikep@cs.uni-bremen.de) # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including #...
2,328
0
81
cea4763f283e9922cebaf401d808749b89edeaaf
4,390
py
Python
test/sample_workspaces.py
EiffL/NaMaster
41cc7839083511fe6be2eb20e93b8916c5c1f1f3
[ "BSD-3-Clause" ]
null
null
null
test/sample_workspaces.py
EiffL/NaMaster
41cc7839083511fe6be2eb20e93b8916c5c1f1f3
[ "BSD-3-Clause" ]
null
null
null
test/sample_workspaces.py
EiffL/NaMaster
41cc7839083511fe6be2eb20e93b8916c5c1f1f3
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import healpy as hp import matplotlib.pyplot as plt import pymaster as nmt #This script showcases the use of NmtWorkspace objects to speed up the #computation of power spectra for many pairs of fields with the same masks. #HEALPix map resolution nside=256 #We start by creating some synthetic masks...
43.9
85
0.76287
import numpy as np import healpy as hp import matplotlib.pyplot as plt import pymaster as nmt #This script showcases the use of NmtWorkspace objects to speed up the #computation of power spectra for many pairs of fields with the same masks. #HEALPix map resolution nside=256 #We start by creating some synthetic masks...
430
0
22
23243da7052f006bbe70b2a349f2bab91fd279fd
1,027
py
Python
tests/settings.py
emanuelschuetze/openslides-csv-export
b1d1761fb6575522c9c7ed1b7e392892cf412dbe
[ "MIT" ]
null
null
null
tests/settings.py
emanuelschuetze/openslides-csv-export
b1d1761fb6575522c9c7ed1b7e392892cf412dbe
[ "MIT" ]
null
null
null
tests/settings.py
emanuelschuetze/openslides-csv-export
b1d1761fb6575522c9c7ed1b7e392892cf412dbe
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Settings file for OpenSlides # from openslides.global_settings import * # noqa # Use 'DEBUG = True' to get more details for server errors. Default for releases: False DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', ...
21.395833
87
0.665044
# -*- coding: utf-8 -*- # # Settings file for OpenSlides # from openslides.global_settings import * # noqa # Use 'DEBUG = True' to get more details for server errors. Default for releases: False DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', ...
0
0
0
a8020b9a1ff94de8ba3e1410065695320cdc91e5
23,837
py
Python
jabs/utils.py
hertogp/jabs
ed419caa448075dcf327d2af561952a385115228
[ "MIT" ]
1
2021-05-14T03:17:48.000Z
2021-05-14T03:17:48.000Z
jabs/utils.py
hertogp/jabs
ed419caa448075dcf327d2af561952a385115228
[ "MIT" ]
null
null
null
jabs/utils.py
hertogp/jabs
ed419caa448075dcf327d2af561952a385115228
[ "MIT" ]
1
2017-10-31T02:04:52.000Z
2017-10-31T02:04:52.000Z
''' Utility functions for other modules. ''' import os import sys import re import math import pandas as pd import pytricia as pt def normalize(astr): 'no whitespace or dots in string' return re.sub(r'(\s|\.)+', '_', astr) def load_csv(filename): 'csv file to dataframe w/ normalized column names' tr...
33.907539
85
0.55095
''' Utility functions for other modules. ''' import os import sys import re import math import pandas as pd import pytricia as pt def normalize(astr): 'no whitespace or dots in string' return re.sub(r'(\s|\.)+', '_', astr) def load_csv(filename): 'csv file to dataframe w/ normalized column names' tr...
2,433
0
183
10648d12482ca5c474323092621d63ac5f0c8b80
1,069
py
Python
server/apps/streamfilter/actions/rpt_action/action.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
server/apps/streamfilter/actions/rpt_action/action.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
server/apps/streamfilter/actions/rpt_action/action.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
import json import logging from apps.report.worker.report_generator import ReportGeneratorAction from apps.utils.timezone_utils import str_utc from ..action import BaseAction logger = logging.getLogger(__name__)
27.410256
94
0.616464
import json import logging from apps.report.worker.report_generator import ReportGeneratorAction from apps.utils.timezone_utils import str_utc from ..action import BaseAction logger = logging.getLogger(__name__) class RptAction(BaseAction): REQUIRED_EXTRA_KEYS = ['rpt', ] def __str__(self): return...
733
97
23
0f21790d7e2ded34aa59a847b16f7fce04b80afe
8,939
py
Python
bert_ptrnet_coqa_util.py
yumere/for-QuAC
af1594a0856e20a526e3c3f383b1f8fbfdf7ddd3
[ "MIT" ]
2
2019-07-30T15:38:24.000Z
2019-08-08T15:49:13.000Z
bert_ptrnet_coqa_util.py
yumere/for-QuAC
af1594a0856e20a526e3c3f383b1f8fbfdf7ddd3
[ "MIT" ]
null
null
null
bert_ptrnet_coqa_util.py
yumere/for-QuAC
af1594a0856e20a526e3c3f383b1f8fbfdf7ddd3
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function import json import logging import os import pickle import random from typing import List import numpy as np import torch from dataclasses import dataclass from pytorch_transformers import BertTokenizer from torch.utils.data import Dataset from tqdm impo...
39.90625
131
0.617183
from __future__ import absolute_import, division, print_function import json import logging import os import pickle import random from typing import List import numpy as np import torch from dataclasses import dataclass from pytorch_transformers import BertTokenizer from torch.utils.data import Dataset from tqdm impo...
7,098
393
68
b95d861a508f3a035c2743a1a92120b16b459ab5
7,228
py
Python
calicoctl/calico_ctl/diags.py
wrouesnel/calico-containers
120e41f1e11fdb6640a10d063bdea5775dd03a47
[ "Apache-2.0" ]
null
null
null
calicoctl/calico_ctl/diags.py
wrouesnel/calico-containers
120e41f1e11fdb6640a10d063bdea5775dd03a47
[ "Apache-2.0" ]
null
null
null
calicoctl/calico_ctl/diags.py
wrouesnel/calico-containers
120e41f1e11fdb6640a10d063bdea5775dd03a47
[ "Apache-2.0" ]
1
2020-08-02T16:41:33.000Z
2020-08-02T16:41:33.000Z
# Copyright 2015 Metaswitch Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
37.450777
106
0.641118
# Copyright 2015 Metaswitch Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
4,072
0
73
eef48c007277b8f310b3bb88495b309c2f22704f
519
py
Python
museumpy/errors.py
metaodi/museumpy
586fcf14fc5b274168e795e7bb987d221f34d4df
[ "MIT" ]
1
2021-09-15T20:32:37.000Z
2021-09-15T20:32:37.000Z
museumpy/errors.py
metaodi/museumpy
586fcf14fc5b274168e795e7bb987d221f34d4df
[ "MIT" ]
6
2021-09-13T23:39:35.000Z
2021-09-28T15:33:05.000Z
museumpy/errors.py
metaodi/museumpy
586fcf14fc5b274168e795e7bb987d221f34d4df
[ "MIT" ]
null
null
null
class MuseumpyError(Exception): """ General MuseumPlus error class to provide a superclass for all other errors """ class MuseumPlusError(MuseumpyError): """ MuseumPlus error raised when an error with the communication with MuseumPlus occurs """ class XMLParsingError(MuseumpyError): """ ...
21.625
87
0.693642
class MuseumpyError(Exception): """ General MuseumPlus error class to provide a superclass for all other errors """ class MuseumPlusError(MuseumpyError): """ MuseumPlus error raised when an error with the communication with MuseumPlus occurs """ class XMLParsingError(MuseumpyError): """ ...
0
0
0
f12f7b53a6a6c0b7357fcdd356a20dc7474c15d2
23,841
py
Python
aicsimageio/readers/tiff_glob_reader.py
griffinfujioka/aicsimageio
c49a613dc54381d11237240ba36f0ef54603a7d6
[ "BSD-3-Clause" ]
null
null
null
aicsimageio/readers/tiff_glob_reader.py
griffinfujioka/aicsimageio
c49a613dc54381d11237240ba36f0ef54603a7d6
[ "BSD-3-Clause" ]
null
null
null
aicsimageio/readers/tiff_glob_reader.py
griffinfujioka/aicsimageio
c49a613dc54381d11237240ba36f0ef54603a7d6
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import glob import re from collections import OrderedDict from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union import dask.array as da import numpy as np import pandas as pd import xarray as xr from fsspec.spec import Abs...
38.640194
88
0.607944
#!/usr/bin/env python # -*- coding: utf-8 -*- import glob import re from collections import OrderedDict from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union import dask.array as da import numpy as np import pandas as pd import xarray as xr from fsspec.spec import Abs...
18,445
0
294
54c4b916f405a976e35d15d84b663e55c926fba1
2,410
py
Python
shapes/shapefromOSM.py
grischard/OSM_snippets
df3c69ab0d1496a636d760ac5546e6b5b011ea10
[ "MIT" ]
6
2017-05-05T22:22:37.000Z
2020-04-02T09:20:34.000Z
shapes/shapefromOSM.py
grischard/OSM_snippets
df3c69ab0d1496a636d760ac5546e6b5b011ea10
[ "MIT" ]
33
2017-05-05T19:29:22.000Z
2020-03-31T09:05:54.000Z
shapes/shapefromOSM.py
grischard/OSM_snippets
df3c69ab0d1496a636d760ac5546e6b5b011ea10
[ "MIT" ]
3
2017-05-16T20:43:13.000Z
2020-04-02T09:20:37.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests from shapely.geometry import LineString from shapely.ops import linemerge # get_shapes_from_osm('1257117') # get_shapes_from_osm('1254451') get_shapes_from_osm('1254455')
35.970149
152
0.606639
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests from shapely.geometry import LineString from shapely.ops import linemerge def get_shapes_from_osm(relation_id): overpass = 'http://www.overpass-api.de/api/interpreter?data=[out:json][timeout:25];relation('+relation_id+');out body;>;out skel qt;>;...
2,140
0
25
78749b1b23c1d273a2c22a2b96b04b7458d944de
5,533
py
Python
accelbyte_py_sdk/api/group/__init__.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/group/__init__.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
1
2021-10-13T03:46:58.000Z
2021-10-13T03:46:58.000Z
accelbyte_py_sdk/api/group/__init__.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template file: justice_py_sdk_codegen/__main__.py """Auto-generated package that contains models used b...
48.535088
84
0.897162
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template file: justice_py_sdk_codegen/__main__.py """Auto-generated package that contains models used b...
0
0
0
514a26b569141ed333764a960156981d0bca57f1
2,087
py
Python
afterburner_train.py
catskillsresearch/openasr20
b9821c4ee6a51501e81103c1d6d4db0ea8aaa31e
[ "Apache-2.0" ]
null
null
null
afterburner_train.py
catskillsresearch/openasr20
b9821c4ee6a51501e81103c1d6d4db0ea8aaa31e
[ "Apache-2.0" ]
null
null
null
afterburner_train.py
catskillsresearch/openasr20
b9821c4ee6a51501e81103c1d6d4db0ea8aaa31e
[ "Apache-2.0" ]
1
2021-07-28T02:13:21.000Z
2021-07-28T02:13:21.000Z
# coding: utf-8 # ASR post-processing corrector pred vs gold: TRAIN import torch from afterburner_pretrained_model import afterburner_pretrained_model import matplotlib.pyplot as plt from progress_bar import progress_bar from tqdm.auto import tqdm import logging logging.getLogger('nemo_logger').setLevel(logging.ER...
39.377358
127
0.676569
# coding: utf-8 # ASR post-processing corrector pred vs gold: TRAIN import torch from afterburner_pretrained_model import afterburner_pretrained_model import matplotlib.pyplot as plt from progress_bar import progress_bar from tqdm.auto import tqdm import logging logging.getLogger('nemo_logger').setLevel(logging.ER...
1,439
0
23
1a89de4b46f00e88cfbed3e6547fad63b83b5448
31,473
py
Python
sapextractor/algo/prod/obj_centr_log.py
aarkue/sap-meta-explorer
613bf657bbaa72a3781a84664e5de7626516532f
[ "Apache-2.0" ]
null
null
null
sapextractor/algo/prod/obj_centr_log.py
aarkue/sap-meta-explorer
613bf657bbaa72a3781a84664e5de7626516532f
[ "Apache-2.0" ]
null
null
null
sapextractor/algo/prod/obj_centr_log.py
aarkue/sap-meta-explorer
613bf657bbaa72a3781a84664e5de7626516532f
[ "Apache-2.0" ]
null
null
null
import pandas as pd from dateutil import parser from pm4pymdl.objects.mdl.exporter import exporter as mdl_exporter from pm4pymdl.objects.ocel.exporter import exporter as ocel_exporter from sapextractor.utils.dates import timestamp_column_from_dt_tm from pandas.core.frame import DataFrame from sapextractor.database_conn...
71.205882
293
0.722302
import pandas as pd from dateutil import parser from pm4pymdl.objects.mdl.exporter import exporter as mdl_exporter from pm4pymdl.objects.ocel.exporter import exporter as ocel_exporter from sapextractor.utils.dates import timestamp_column_from_dt_tm from pandas.core.frame import DataFrame from sapextractor.database_conn...
31,063
0
46
1181b775f6b040f2871537af850f11704305e28c
2,267
py
Python
mod_peak.py
aniketk21/tfbs-prediction
dbb98450182f5be7a7f1ff71b8c382fcbba8666b
[ "MIT" ]
2
2017-07-07T07:22:41.000Z
2018-02-11T15:56:08.000Z
mod_peak.py
aniketk21/tfbs-prediction
dbb98450182f5be7a7f1ff71b8c382fcbba8666b
[ "MIT" ]
null
null
null
mod_peak.py
aniketk21/tfbs-prediction
dbb98450182f5be7a7f1ff71b8c382fcbba8666b
[ "MIT" ]
null
null
null
''' mod_peak.py usage: python mod_peak.py narrowPeak_file dataset.dat output.dat modify the `chipseq_peak` values to 1 if a window from narrowPeak file appears in the dataset. ''' import sys nps = open(sys.argv[1]) inp = open(sys.argv[2]) out = open(sys.argv[3], 'w') inpl = inp.readlines() npsl = nps.rea...
23.371134
113
0.528893
''' mod_peak.py usage: python mod_peak.py narrowPeak_file dataset.dat output.dat modify the `chipseq_peak` values to 1 if a window from narrowPeak file appears in the dataset. ''' import sys nps = open(sys.argv[1]) inp = open(sys.argv[2]) out = open(sys.argv[3], 'w') inpl = inp.readlines() npsl = nps.rea...
797
0
46
7754ac3891419a8e9143d649ce11b2f4f380be77
8,021
py
Python
tests/policy_template_processor/test_template.py
eugeniosu/serverless-application-model
d93e15232a1921fa51667389d83aeabbf1ff72d3
[ "Apache-2.0" ]
2
2019-04-13T16:57:10.000Z
2019-12-13T08:32:16.000Z
tests/policy_template_processor/test_template.py
eugeniosu/serverless-application-model
d93e15232a1921fa51667389d83aeabbf1ff72d3
[ "Apache-2.0" ]
6
2020-09-07T16:12:04.000Z
2022-03-12T00:04:12.000Z
tests/policy_template_processor/test_template.py
Mattlk13/serverless-application-model
27b5934de46c42d47ba1484d5432310cac694b25
[ "Apache-2.0" ]
15
2019-05-27T01:04:30.000Z
2021-10-01T05:54:45.000Z
from unittest import TestCase from mock import Mock, patch, ANY from samtranslator.policy_template_processor.template import Template from samtranslator.policy_template_processor.exceptions import InvalidParameterValues, InsufficientParameterValues
40.715736
114
0.699788
from unittest import TestCase from mock import Mock, patch, ANY from samtranslator.policy_template_processor.template import Template from samtranslator.policy_template_processor.exceptions import InvalidParameterValues, InsufficientParameterValues class TestTemplateObject(TestCase): @patch.object(Template, "che...
6,785
963
23
02fbe426a025e86caefb02cd685629afa2f27a3e
316
py
Python
instagram_api/response/model/media_share.py
Yuego/instagram_api
b53f72db36c505a2eb24ebac1ba8267a0cc295bb
[ "MIT" ]
13
2019-08-07T21:24:34.000Z
2020-12-12T12:23:50.000Z
instagram_api/response/model/media_share.py
Yuego/instagram_api
b53f72db36c505a2eb24ebac1ba8267a0cc295bb
[ "MIT" ]
null
null
null
instagram_api/response/model/media_share.py
Yuego/instagram_api
b53f72db36c505a2eb24ebac1ba8267a0cc295bb
[ "MIT" ]
null
null
null
from ..mapper import PropertyMapper, ApiInterfaceBase from ..mapper.types import Timestamp, AnyType from .item import Item __all__ = ['MediaShare', 'MediaShareInterface']
19.75
54
0.775316
from ..mapper import PropertyMapper, ApiInterfaceBase from ..mapper.types import Timestamp, AnyType from .item import Item __all__ = ['MediaShare', 'MediaShareInterface'] class MediaShareInterface(ApiInterfaceBase): media: Item text: str class MediaShare(PropertyMapper, MediaShareInterface): pass
0
95
46
33985e61d5a343c70b0ee3dc1c4021a35cc2187e
1,945
py
Python
accounts/models.py
NoobLucifer/NSP
f411570924905f1bf3c39fa36b5949e5b9e37c0a
[ "MIT" ]
20
2018-08-02T15:10:30.000Z
2019-05-15T14:38:06.000Z
accounts/models.py
nk521/NSP
ecffc873fbfe3471ed320f0698adca4e8c573ab5
[ "MIT" ]
55
2018-06-19T04:31:56.000Z
2018-07-19T17:42:00.000Z
accounts/models.py
nk521/NSP
ecffc873fbfe3471ed320f0698adca4e8c573ab5
[ "MIT" ]
10
2018-08-03T10:42:16.000Z
2019-01-31T10:07:57.000Z
import datetime from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin from django.contrib.auth.models import User from django.db import models from django.db.models.signals import post_save from project.models import * post_save.connect(create_profile, sender=User)
38.9
114
0.740874
import datetime from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin from django.contrib.auth.models import User from django.db import models from django.db.models.signals import post_save from project.models import * class Skill(models.Model): user = models.ForeignKey(User, on_delete=models....
252
1,309
92
ed3d5a7108c9399890f4d8b96e7283e495ebc240
7,198
py
Python
emtf_nnet/keras/quantization/quantize_model.py
jiafulow/emtf-nnet
70a6c747c221178f9db940197ea886bdb60bf3ba
[ "Apache-2.0" ]
null
null
null
emtf_nnet/keras/quantization/quantize_model.py
jiafulow/emtf-nnet
70a6c747c221178f9db940197ea886bdb60bf3ba
[ "Apache-2.0" ]
null
null
null
emtf_nnet/keras/quantization/quantize_model.py
jiafulow/emtf-nnet
70a6c747c221178f9db940197ea886bdb60bf3ba
[ "Apache-2.0" ]
null
null
null
# The following source code was originally obtained from: # https://github.com/tensorflow/model-optimization/blob/v0.7.0/tensorflow_model_optimization/python/core/quantization/keras/quantize.py # ============================================================================== # Copyright 2019 The TensorFlow Authors. All...
36.912821
135
0.730203
# The following source code was originally obtained from: # https://github.com/tensorflow/model-optimization/blob/v0.7.0/tensorflow_model_optimization/python/core/quantization/keras/quantize.py # ============================================================================== # Copyright 2019 The TensorFlow Authors. All...
0
0
0
dc90bf6a51e5dfcbbf6ae971134b7a025a1977dd
6,812
py
Python
hasdrubal/asts/types_.py
Armani-T/hasdrubal
7fac381b866114533e589e964ec7c27adbd1deff
[ "MIT" ]
2
2021-06-25T15:46:16.000Z
2022-02-20T22:04:36.000Z
hasdrubal/asts/types_.py
Armani-T/hasdrubal
7fac381b866114533e589e964ec7c27adbd1deff
[ "MIT" ]
42
2021-07-06T05:38:23.000Z
2022-03-04T18:09:30.000Z
hasdrubal/asts/types_.py
Armani-T/hasdrubal
7fac381b866114533e589e964ec7c27adbd1deff
[ "MIT" ]
null
null
null
# pylint: disable=R0903, C0115 from abc import ABC, abstractmethod from typing import AbstractSet, Any, final, Mapping, Sequence from .base import ASTNode, Span class Type(ASTNode, ABC): """ This is the base class for the program's representation of types in the type system. Warnings -------- ...
29.362069
87
0.598356
# pylint: disable=R0903, C0115 from abc import ABC, abstractmethod from typing import AbstractSet, Any, final, Mapping, Sequence from .base import ASTNode, Span class Type(ASTNode, ABC): """ This is the base class for the program's representation of types in the type system. Warnings -------- ...
3,397
2,050
170
037ef3febdafd6afbfede7a6eaec2635d3f3d14d
560
py
Python
actions/parse_file.py
cognifloyd/stackstorm-csv
75af77cf905f41a0551b17b587d79859356e1c94
[ "Apache-2.0" ]
null
null
null
actions/parse_file.py
cognifloyd/stackstorm-csv
75af77cf905f41a0551b17b587d79859356e1c94
[ "Apache-2.0" ]
null
null
null
actions/parse_file.py
cognifloyd/stackstorm-csv
75af77cf905f41a0551b17b587d79859356e1c94
[ "Apache-2.0" ]
null
null
null
import os import csv from st2common.runners.base_action import Action __all__ = [ 'ParseCSVFileAction' ]
23.333333
88
0.619643
import os import csv from st2common.runners.base_action import Action __all__ = [ 'ParseCSVFileAction' ] class ParseCSVFileAction(Action): def run(self, file_path, delimiter=',', quote_char='"'): if not os.path.isfile(file_path): raise ValueError('File "%s" doesnt exist' % (file_path)) ...
387
12
49
e9451e199f19c2c1a755134a15b1b13a5694edfd
5,918
py
Python
aiohttp_auth/auth/ticket_auth.py
gnarlychicken/aiohttp_auth
3d55236889fb14b662279b050de18d43842bb886
[ "MIT" ]
12
2016-02-27T21:57:51.000Z
2020-10-26T13:57:47.000Z
aiohttp_auth/auth/ticket_auth.py
gnarlychicken/aiohttp_auth
3d55236889fb14b662279b050de18d43842bb886
[ "MIT" ]
5
2016-07-22T15:51:48.000Z
2021-09-07T21:48:01.000Z
aiohttp_auth/auth/ticket_auth.py
gnarlychicken/aiohttp_auth
3d55236889fb14b662279b050de18d43842bb886
[ "MIT" ]
8
2016-02-15T04:58:31.000Z
2019-01-21T14:17:16.000Z
import abc import time from ipaddress import ip_address from ticket_auth import TicketFactory, TicketError from .abstract_auth import AbstractAuthentication from aiohttp import web _REISSUE_KEY = 'aiohttp_auth.auth.TktAuthentication.reissue' class TktAuthentication(AbstractAuthentication): """Ticket authenticat...
33.625
81
0.624704
import abc import time from ipaddress import ip_address from ticket_auth import TicketFactory, TicketError from .abstract_auth import AbstractAuthentication from aiohttp import web _REISSUE_KEY = 'aiohttp_auth.auth.TktAuthentication.reissue' class TktAuthentication(AbstractAuthentication): """Ticket authenticat...
399
0
54
69543e9aba0cbd7f9bd5879b259ecac94b567c84
409
py
Python
server/src/labelMatchEngine/labelMatchEngine.py
leonard-thong/dlwlrat
2b4b669a3b2f348d1b05125afd6b8a1907b6b212
[ "CC-BY-3.0" ]
2
2020-10-08T06:01:22.000Z
2020-12-15T16:28:27.000Z
server/src/labelMatchEngine/labelMatchEngine.py
dreamyang-liu/SciAnnotate
dfa41ec5c2c4b6665b5d9b059895be20e9e0cfe2
[ "CC-BY-3.0" ]
8
2020-12-09T02:55:20.000Z
2020-12-23T23:31:42.000Z
server/src/labelMatchEngine/labelMatchEngine.py
dreamyang-liu/SciAnnotate
dfa41ec5c2c4b6665b5d9b059895be20e9e0cfe2
[ "CC-BY-3.0" ]
4
2021-02-02T04:51:53.000Z
2021-07-18T17:00:04.000Z
# -*- coding:utf-8 -*- """ =========================================== @author: lmy @time: 2020/8/19 11:12 PM @project: brat @file: labelMatchEngine.py =========================================== """ import re MATCH_ENGINE_HANDLERS = { 'keywords': 'keywordHandler', 'length': 'lengthHandler', ...
19.47619
49
0.486553
# -*- coding:utf-8 -*- """ =========================================== @author: lmy @time: 2020/8/19 11:12 PM @project: brat @file: labelMatchEngine.py =========================================== """ import re MATCH_ENGINE_HANDLERS = { 'keywords': 'keywordHandler', 'length': 'lengthHandler', ...
37
0
23
08fc0cda57db50daa43c951d0d3a2030a2e58fe7
23,835
py
Python
gtfs_csv_to_rdf.py
diarmuidr3d/gtfs_csv_to_rdf.py
e003b9d12c2301220bebc72b2e48ce3d4ce91ec7
[ "CC0-1.0" ]
null
null
null
gtfs_csv_to_rdf.py
diarmuidr3d/gtfs_csv_to_rdf.py
e003b9d12c2301220bebc72b2e48ce3d4ce91ec7
[ "CC0-1.0" ]
1
2015-11-21T10:05:50.000Z
2015-11-21T10:35:49.000Z
gtfs_csv_to_rdf.py
diarmuidr3d/gtfs_csv_to_rdf.py
e003b9d12c2301220bebc72b2e48ce3d4ce91ec7
[ "CC0-1.0" ]
null
null
null
from datetime import datetime import os import shutil from zipfile import ZipFile from rdflib import Graph, Namespace, RDF, Literal, XSD, URIRef from csv import DictReader from rdflib.namespace import FOAF, DCTERMS from rdflib.resource import Resource import sys __author__ = 'Diarmuid' if __name__ == "__main__": ...
55.430233
153
0.63176
from datetime import datetime import os import shutil from zipfile import ZipFile from rdflib import Graph, Namespace, RDF, Literal, XSD, URIRef from csv import DictReader from rdflib.namespace import FOAF, DCTERMS from rdflib.resource import Resource import sys __author__ = 'Diarmuid' class GtfsCsvToRdf: GEO =...
22,310
1,088
23
eb6c098e140ac2d55a4dde3e7f5e0ce4eede7e6d
935
py
Python
src/connection.py
blairck/jaeger
a4b52d1684fd8a2d216360f87aad3ebc2f341cf4
[ "MIT" ]
1
2016-07-28T04:48:40.000Z
2016-07-28T04:48:40.000Z
src/connection.py
blairck/jaeger
a4b52d1684fd8a2d216360f87aad3ebc2f341cf4
[ "MIT" ]
18
2016-08-15T03:03:28.000Z
2018-02-01T08:15:31.000Z
src/connection.py
blairck/jaeger
a4b52d1684fd8a2d216360f87aad3ebc2f341cf4
[ "MIT" ]
null
null
null
""" Stores connection info between game nodes (positions) """ from src import helper class Connection(object): """ Stores connection info between game nodes (positions) """ def setstartX(self, value): """ Setter for startX with type checking """ self.startX = value def setstartY(self, va...
27.5
65
0.6
""" Stores connection info between game nodes (positions) """ from src import helper class Connection(object): """ Stores connection info between game nodes (positions) """ def __init__(self): self.startX = None # int self.startY = None # int self.direction = None # int self.e...
162
0
27
23e58bb0d9ef68c360fef01a9ff673b39b9ffdb4
1,144
py
Python
30stats.py
joshua-blas/Homework
68018fa06b70e38c71aeea80f4a185d8d50900ce
[ "MIT" ]
null
null
null
30stats.py
joshua-blas/Homework
68018fa06b70e38c71aeea80f4a185d8d50900ce
[ "MIT" ]
null
null
null
30stats.py
joshua-blas/Homework
68018fa06b70e38c71aeea80f4a185d8d50900ce
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Write a program that computes typical stats # Count, Min, Max, Mean, Std. Dev, Median # No, you cannot import the stats library! import sys import math data = [] for x in sys.argv[1:]: flt = float(x) data.append(flt) count = len(data) #max and min minimum = data[0] maximum = data[0] for...
17.875
189
0.641608
#!/usr/bin/env python3 # Write a program that computes typical stats # Count, Min, Max, Mean, Std. Dev, Median # No, you cannot import the stats library! import sys import math data = [] for x in sys.argv[1:]: flt = float(x) data.append(flt) count = len(data) #max and min minimum = data[0] maximum = data[0] for...
0
0
0
42c578e2991eb39a3ede257cbe008f673c840c4c
1,785
py
Python
aws_ami_delete/__main__.py
lifeofguenter/aws-ami-delete
bdd314f736467ae3c8bbebc765c949fd980c3e8e
[ "MIT" ]
null
null
null
aws_ami_delete/__main__.py
lifeofguenter/aws-ami-delete
bdd314f736467ae3c8bbebc765c949fd980c3e8e
[ "MIT" ]
null
null
null
aws_ami_delete/__main__.py
lifeofguenter/aws-ami-delete
bdd314f736467ae3c8bbebc765c949fd980c3e8e
[ "MIT" ]
null
null
null
import json import os.path import sys from typing import List, Dict import boto3 if __name__ == '__main__': cli()
27.045455
90
0.587675
import json import os.path import sys from typing import List, Dict import boto3 def delete_snapshots(ec2_client: boto3.client, block_device_mappings: List[Dict]) -> None: for block_device_mapping in block_device_mappings: snapshot_id = block_device_mapping['Ebs']['SnapshotId'] print(f'[aws-ami-d...
1,616
0
46
91244c92359024a82cea9824d9671f8a9f005750
10,657
py
Python
contentcuration/search/viewsets/contentnode.py
bjester/studio
b9bcc9f1f5b5c3e17b4ea5dc71dc553e8b0e5935
[ "MIT" ]
null
null
null
contentcuration/search/viewsets/contentnode.py
bjester/studio
b9bcc9f1f5b5c3e17b4ea5dc71dc553e8b0e5935
[ "MIT" ]
null
null
null
contentcuration/search/viewsets/contentnode.py
bjester/studio
b9bcc9f1f5b5c3e17b4ea5dc71dc553e8b0e5935
[ "MIT" ]
null
null
null
import hashlib import re from django.core.cache import cache from django.core.paginator import InvalidPage from django.db.models import Case from django.db.models import CharField from django.db.models import F from django.db.models import IntegerField from django.db.models import OuterRef from django.db.models import...
37.003472
105
0.644834
import hashlib import re from django.core.cache import cache from django.core.paginator import InvalidPage from django.db.models import Case from django.db.models import CharField from django.db.models import F from django.db.models import IntegerField from django.db.models import OuterRef from django.db.models import...
5,661
3,682
69
2dbf8010e364edf988f97fff998c9a9bb101955e
16,619
py
Python
landlab/components/landslides/landslide.py
SiccarPoint/landlab
4150db083a0426b3647e31ffa80dfefb5faa5a60
[ "MIT" ]
1
2015-08-17T19:29:50.000Z
2015-08-17T19:29:50.000Z
landlab/components/landslides/landslide.py
csherwood-usgs/landlab
4f43055060b544b34e71eba7062c09866ad93640
[ "MIT" ]
1
2016-03-02T01:24:41.000Z
2016-03-02T01:24:41.000Z
landlab/components/landslides/landslide.py
csherwood-usgs/landlab
4f43055060b544b34e71eba7062c09866ad93640
[ "MIT" ]
2
2017-07-03T20:21:13.000Z
2018-09-06T23:58:19.000Z
# %% Import Libraries from landlab import Component from ...utils.decorators import use_file_name_or_kwds import numpy as np # %% Instantiate Object class LandslideProbability(Component): """ Landlab component designed to calculate a probability of failure at each grid node based on the in...
44.199468
87
0.628919
# %% Import Libraries from landlab import Component from ...utils.decorators import use_file_name_or_kwds import numpy as np # %% Instantiate Object class LandslideProbability(Component): """ Landlab component designed to calculate a probability of failure at each grid node based on the in...
0
0
0
b20ea0b58e52db3ee0246fdb58558d2834cf2129
9,539
py
Python
naff/models/naff/extension.py
Discord-Snake-Pit/dis_snek
45748467838b31d871a7166dbeb3aaa238ad94e3
[ "MIT" ]
64
2021-10-12T15:31:36.000Z
2022-03-29T18:25:47.000Z
naff/models/naff/extension.py
Discord-Snake-Pit/dis_snek
45748467838b31d871a7166dbeb3aaa238ad94e3
[ "MIT" ]
166
2021-10-10T16:27:52.000Z
2022-03-30T09:04:54.000Z
naff/models/naff/extension.py
Discord-Snake-Pit/dis_snek
45748467838b31d871a7166dbeb3aaa238ad94e3
[ "MIT" ]
34
2021-10-10T13:26:41.000Z
2022-03-23T13:59:35.000Z
import asyncio import inspect import logging from typing import Awaitable, List, TYPE_CHECKING, Callable, Coroutine, Optional import naff.models.naff as naff from naff.client.const import logger_name, MISSING from naff.client.utils.misc_utils import wrap_partial from naff.models.naff.tasks import Task if TYPE_CHECKIN...
35.726592
200
0.605095
import asyncio import inspect import logging from typing import Awaitable, List, TYPE_CHECKING, Callable, Coroutine, Optional import naff.models.naff as naff from naff.client.const import logger_name, MISSING from naff.client.utils.misc_utils import wrap_partial from naff.models.naff.tasks import Task if TYPE_CHECKIN...
2,448
0
53
0c6597ddda99e0193eb4bf07b9ceeccc0ef15a4d
7,741
py
Python
tests/test_git.py
smartshark/inducingSHARK
96f14e026310f8dcfbcff79b40310d079d9d04b8
[ "Apache-2.0" ]
null
null
null
tests/test_git.py
smartshark/inducingSHARK
96f14e026310f8dcfbcff79b40310d079d9d04b8
[ "Apache-2.0" ]
null
null
null
tests/test_git.py
smartshark/inducingSHARK
96f14e026310f8dcfbcff79b40310d079d9d04b8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import subprocess import tempfile import re from inducingSHARK.util.git import CollectGit # def test_excluding_file_regexes(self): # positives = [ # 'src/java/test/org/apache/commons/Test.java', # 'test/examples/org/ap...
43.24581
148
0.570211
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import subprocess import tempfile import re from inducingSHARK.util.git import CollectGit class TestGit(unittest.TestCase): def test_comment_regexes(self): positives = [ '// single line comment', 'code // end of line ...
6,539
12
185
03142241ad8c7b505c102e80bae5b0cce9f7f17f
3,119
py
Python
tests/test_points.py
GlenRice-NOAA/vyperdatum
600fc2f16fe5a95dc3a26336d5d8cd23421fef5f
[ "CC0-1.0" ]
null
null
null
tests/test_points.py
GlenRice-NOAA/vyperdatum
600fc2f16fe5a95dc3a26336d5d8cd23421fef5f
[ "CC0-1.0" ]
6
2020-12-04T18:07:12.000Z
2020-12-22T16:59:07.000Z
tests/test_points.py
GlenRice-NOAA/vyperdatum
600fc2f16fe5a95dc3a26336d5d8cd23421fef5f
[ "CC0-1.0" ]
3
2020-12-04T18:04:25.000Z
2021-06-24T15:29:11.000Z
from pytest import approx from vyperdatum.points import * from vyperdatum.vdatum_validation import vdatum_answers gvc = VyperCore() data_folder = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'data') vdatum_answer = vdatum_answers[gvc.vdatum.vdatum_version]
33.537634
119
0.73453
from pytest import approx from vyperdatum.points import * from vyperdatum.vdatum_validation import vdatum_answers gvc = VyperCore() data_folder = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'data') vdatum_answer = vdatum_answers[gvc.vdatum.vdatum_version] def test_points_setup(): # these tests assu...
2,556
0
276
9b60a8827d52ea27929cc99e2e44e9f8ab4cc09c
2,886
py
Python
app/api/routers/gallery.py
susieward/python-image-editor
dd7b1a32973fc0523d4e459ad864b5c75e659205
[ "MIT" ]
2
2021-05-16T16:17:13.000Z
2021-12-13T06:35:57.000Z
app/api/routers/gallery.py
susieward/python-image-editor
dd7b1a32973fc0523d4e459ad864b5c75e659205
[ "MIT" ]
null
null
null
app/api/routers/gallery.py
susieward/python-image-editor
dd7b1a32973fc0523d4e459ad864b5c75e659205
[ "MIT" ]
1
2021-12-13T06:36:10.000Z
2021-12-13T06:36:10.000Z
from uuid import UUID import json from fastapi import APIRouter, Path, Body, Depends, HTTPException, Request, Response from fastapi.responses import StreamingResponse from fastapi.templating import Jinja2Templates from starlette import status from app.api.dependencies import image_service_dep, image_file_service_dep ...
35.195122
145
0.742897
from uuid import UUID import json from fastapi import APIRouter, Path, Body, Depends, HTTPException, Request, Response from fastapi.responses import StreamingResponse from fastapi.templating import Jinja2Templates from starlette import status from app.api.dependencies import image_service_dep, image_file_service_dep ...
1,602
0
154
1b2d2cb8a5c047d3318dc1a921deaa6afd5a86b9
1,533
py
Python
setup.py
epwalsh/python-registrable
bcd5c62556725d9052a290712dd190021c0d5e32
[ "Apache-2.0" ]
9
2019-11-26T21:36:46.000Z
2021-11-12T06:45:15.000Z
setup.py
epwalsh/python-registrable
bcd5c62556725d9052a290712dd190021c0d5e32
[ "Apache-2.0" ]
4
2019-11-26T23:43:54.000Z
2020-04-20T20:46:07.000Z
setup.py
epwalsh/python-registrable
bcd5c62556725d9052a290712dd190021c0d5e32
[ "Apache-2.0" ]
2
2021-01-06T21:10:03.000Z
2021-09-17T07:30:28.000Z
from typing import List, Dict, Any from setuptools import setup, find_packages VERSION: Dict[str, Any] = {} with open("registrable/version.py", "r") as version_file: exec(version_file.read(), VERSION) setup( name="registrable", version=VERSION["VERSION"], description="Python module for registering a...
34.066667
83
0.646445
from typing import List, Dict, Any from setuptools import setup, find_packages VERSION: Dict[str, Any] = {} with open("registrable/version.py", "r") as version_file: exec(version_file.read(), VERSION) def read_reqs_file(path: str) -> List[str]: reqs: List[str] = [] with open(path, "r") as reqs_file: ...
269
0
23
93ee180ff520010d728a053e6f2025e62ad211f4
2,331
py
Python
pyguymer3/geo/buffer_LinearRing.py
Guymer/PyGuymer3
c2e2788a8b65854fa1e84d6ba5017fb2544fc195
[ "Apache-2.0" ]
9
2019-05-14T08:45:53.000Z
2021-11-23T09:38:56.000Z
pyguymer3/geo/buffer_LinearRing.py
Guymer/PyGuymer3
c2e2788a8b65854fa1e84d6ba5017fb2544fc195
[ "Apache-2.0" ]
2
2019-11-19T17:23:11.000Z
2020-10-11T12:43:35.000Z
pyguymer3/geo/buffer_LinearRing.py
Guymer/PyGuymer3
c2e2788a8b65854fa1e84d6ba5017fb2544fc195
[ "Apache-2.0" ]
2
2019-11-17T10:13:51.000Z
2020-05-26T19:35:33.000Z
def buffer_LinearRing(ring, dist, kwArgCheck = None, debug = False, fill = 1.0, nang = 19, simp = 0.1, tol = 1.0e-10): """Buffer a LinearRing This function reads in a LinearRing that exists on the surface of the Earth and returns a [Multi]Polygon of the same LinearRing buffered by a constant distance (...
41.625
142
0.670528
def buffer_LinearRing(ring, dist, kwArgCheck = None, debug = False, fill = 1.0, nang = 19, simp = 0.1, tol = 1.0e-10): """Buffer a LinearRing This function reads in a LinearRing that exists on the surface of the Earth and returns a [Multi]Polygon of the same LinearRing buffered by a constant distance (...
0
0
0
8b72c8d017c7f698c5283e03bbc156e32141c588
1,901
py
Python
samples/demo.py
logachev/custom-azure-data-encryption
f00e45124f5c01ce3bc3dca1818ba5bb932bb4bc
[ "MIT" ]
5
2018-07-09T02:16:56.000Z
2019-04-02T16:06:03.000Z
samples/demo.py
logachev/custom-azure-data-encryption
f00e45124f5c01ce3bc3dca1818ba5bb932bb4bc
[ "MIT" ]
2
2018-07-05T16:53:24.000Z
2019-03-18T23:27:07.000Z
samples/demo.py
logachev/custom-azure-data-encryption
f00e45124f5c01ce3bc3dca1818ba5bb932bb4bc
[ "MIT" ]
3
2018-10-29T17:17:40.000Z
2019-03-13T18:41:08.000Z
import os from azure_encryption_helper import Encryptor # Create ServicePrincipalCredentials object using your SP # You can use MSIAuthentication if running on Azure VM if 'USE_MSI' in os.environ.keys(): from msrestazure.azure_active_directory import MSIAuthentication credentials = MSIAuthentication(resource=...
39.604167
107
0.7596
import os from azure_encryption_helper import Encryptor # Create ServicePrincipalCredentials object using your SP # You can use MSIAuthentication if running on Azure VM if 'USE_MSI' in os.environ.keys(): from msrestazure.azure_active_directory import MSIAuthentication credentials = MSIAuthentication(resource=...
0
0
0
9c42da09c1c7850d9754f969dc536b17cb523d38
2,126
py
Python
social/backends/douban.py
dongweiming/flask_reveal
739a0c49d2fbf5a36c7b9cb11ec1303b9c8b0e83
[ "BSD-3-Clause" ]
41
2015-01-31T08:23:04.000Z
2021-03-20T08:55:23.000Z
social/backends/douban.py
dongweiming/flask_reveal
739a0c49d2fbf5a36c7b9cb11ec1303b9c8b0e83
[ "BSD-3-Clause" ]
null
null
null
social/backends/douban.py
dongweiming/flask_reveal
739a0c49d2fbf5a36c7b9cb11ec1303b9c8b0e83
[ "BSD-3-Clause" ]
19
2015-01-17T11:50:35.000Z
2019-05-01T22:49:02.000Z
""" Douban OAuth support. This adds support for Douban OAuth service. An application must be registered first on douban.com and the settings DOUBAN_CONSUMER_KEY and DOUBAN_CONSUMER_SECRET must be defined with they corresponding values. By default account id is stored in extra_data field, check OAuthBackend class for ...
34.852459
76
0.643932
""" Douban OAuth support. This adds support for Douban OAuth service. An application must be registered first on douban.com and the settings DOUBAN_CONSUMER_KEY and DOUBAN_CONSUMER_SECRET must be defined with they corresponding values. By default account id is stored in extra_data field, check OAuthBackend class for ...
60
0
27
2282cac04c70171ca3c7294cd54b6f3efcc8277e
7,572
py
Python
src/code_submission/1_aister/arma_model.py
NehzUx/AutoGraph-KDDCup2020
d2fc228f4ccc5785db3129cca0445a80b6fef11d
[ "MIT" ]
1
2021-12-06T14:59:55.000Z
2021-12-06T14:59:55.000Z
src/code_submission/1_aister/arma_model.py
NehzUx/AutoGraph-Benchmark
d2fc228f4ccc5785db3129cca0445a80b6fef11d
[ "MIT" ]
null
null
null
src/code_submission/1_aister/arma_model.py
NehzUx/AutoGraph-Benchmark
d2fc228f4ccc5785db3129cca0445a80b6fef11d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import torch import torch.nn.functional as F from torch.nn import Linear, Embedding from torch_geometric.nn import ARMAConv from torch_geometric.data import Data from util import timeclass,get_logger import pandas as pd import numpy as np import random import time import copy from process_data ...
35.383178
138
0.606841
# -*- coding: utf-8 -*- import torch import torch.nn.functional as F from torch.nn import Linear, Embedding from torch_geometric.nn import ARMAConv from torch_geometric.data import Data from util import timeclass,get_logger import pandas as pd import numpy as np import random import time import copy from process_data ...
6,628
414
158
eb07c798ac7d4983e1a215d63e63866b4bb3f7a8
35,634
py
Python
HoloPortrait.py
jankais3r/HoloPortrait
0acf9c250d26a78452015503b7befbf5221cc2ce
[ "MIT", "BSD-3-Clause" ]
7
2020-11-22T17:47:31.000Z
2022-03-04T18:56:28.000Z
HoloPortrait.py
jankais3r/HoloPortrait
0acf9c250d26a78452015503b7befbf5221cc2ce
[ "MIT", "BSD-3-Clause" ]
null
null
null
HoloPortrait.py
jankais3r/HoloPortrait
0acf9c250d26a78452015503b7befbf5221cc2ce
[ "MIT", "BSD-3-Clause" ]
null
null
null
import io import os import ui import sys import time import Image import numpy import photos import shutil import socket import console import zipfile import ImageOps import objc_util import matplotlib.cm import urllib.request from threading import Event, Thread from socketserver import ThreadingMixIn from http.server ...
34.462282
390
0.671269
import io import os import ui import sys import time import Image import numpy import photos import shutil import socket import console import zipfile import ImageOps import objc_util import matplotlib.cm import urllib.request from threading import Event, Thread from socketserver import ThreadingMixIn from http.server ...
6,334
1,220
299
e032789574242eaaab8d1c2daf414730602c38a2
530
py
Python
core/management/commands/create_test_paciente_data.py
cluster311/ggg
262173c66fe40ada30083d439a79f16f841f5772
[ "BSD-3-Clause" ]
6
2020-03-16T02:51:16.000Z
2020-11-10T00:58:01.000Z
core/management/commands/create_test_paciente_data.py
cluster311/ggg
262173c66fe40ada30083d439a79f16f841f5772
[ "BSD-3-Clause" ]
204
2019-09-19T02:00:57.000Z
2022-02-10T10:48:52.000Z
core/management/commands/create_test_paciente_data.py
cluster311/ggg
262173c66fe40ada30083d439a79f16f841f5772
[ "BSD-3-Clause" ]
3
2019-09-16T22:59:24.000Z
2022-03-21T22:52:44.000Z
# !/usr/bin/python from django.core.management.base import BaseCommand from django.conf import settings from django.db import transaction import sys import pyexcel as pe from core.base_permission import create_test_paciente_data
27.894737
83
0.724528
# !/usr/bin/python from django.core.management.base import BaseCommand from django.conf import settings from django.db import transaction import sys import pyexcel as pe from core.base_permission import create_test_paciente_data class Command(BaseCommand): help = """Crear los pacientes""" def handle(self, ...
205
70
23
0fb38357f8089b0434cd80cd51d22e6269197c02
3,248
py
Python
lassonet/plot.py
ilemhadri/lassoNet
adf0aaf7131a57d8427ae40db7a19e608d6809a4
[ "MIT" ]
1
2020-05-28T02:33:00.000Z
2020-05-28T02:33:00.000Z
lassonet/plot.py
ilemhadri/lassoNet
adf0aaf7131a57d8427ae40db7a19e608d6809a4
[ "MIT" ]
null
null
null
lassonet/plot.py
ilemhadri/lassoNet
adf0aaf7131a57d8427ae40db7a19e608d6809a4
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt from .interfaces import BaseLassoNetCV from .utils import confidence_interval, eval_on_path def plot_path(model, path, X_test, y_test, *, score_function=None): """ Plot the evolution of the model on the path, namely: - lambda - number of selected variables - score ...
26.193548
84
0.599754
import matplotlib.pyplot as plt from .interfaces import BaseLassoNetCV from .utils import confidence_interval, eval_on_path def plot_path(model, path, X_test, y_test, *, score_function=None): """ Plot the evolution of the model on the path, namely: - lambda - number of selected variables - score ...
1,822
0
23
0afc6825b626fc657c8a9c9d7d79206a1306e855
135
py
Python
bluebottle/bluebottle_dashboard/forms.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
10
2015-05-28T18:26:40.000Z
2021-09-06T10:07:03.000Z
bluebottle/bluebottle_dashboard/forms.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
762
2015-01-15T10:00:59.000Z
2022-03-31T15:35:14.000Z
bluebottle/bluebottle_dashboard/forms.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
9
2015-02-20T13:19:30.000Z
2022-03-08T14:09:17.000Z
from django import forms from captcha.fields import ReCaptchaField
19.285714
41
0.8
from django import forms from captcha.fields import ReCaptchaField class AxesCaptchaForm(forms.Form): captcha = ReCaptchaField()
0
44
23
1bf70b5e4ee66c2e166334895dc64f78459f4d54
2,830
py
Python
tgcf/plugins/filter.py
rijeshkumar/tgcf
5cc56f70aa43c4b716243d2e1cf1878ac19e15f2
[ "MIT" ]
null
null
null
tgcf/plugins/filter.py
rijeshkumar/tgcf
5cc56f70aa43c4b716243d2e1cf1878ac19e15f2
[ "MIT" ]
null
null
null
tgcf/plugins/filter.py
rijeshkumar/tgcf
5cc56f70aa43c4b716243d2e1cf1878ac19e15f2
[ "MIT" ]
null
null
null
import logging from typing import Any, Dict, List from pydantic import BaseModel # pylint: disable=no-name-in-module from tgcf.plugins import FileType, TgcfMessage, TgcfPlugin from tgcf.utils import match
29.175258
81
0.619788
import logging from typing import Any, Dict, List from pydantic import BaseModel # pylint: disable=no-name-in-module from tgcf.plugins import FileType, TgcfMessage, TgcfPlugin from tgcf.utils import match class FilterList(BaseModel): blacklist: List[str] = [] whitelist: List[str] = [] class FilesFilterLi...
1,975
527
115
91c30f759617a961c4e361300d5e74a768d226e7
250
py
Python
FileReader.py
SC-CEBD-1160/python-homework
ce4d8cec6e4077ae87f7886a70cd2e9b4bceea9b
[ "MIT" ]
null
null
null
FileReader.py
SC-CEBD-1160/python-homework
ce4d8cec6e4077ae87f7886a70cd2e9b4bceea9b
[ "MIT" ]
null
null
null
FileReader.py
SC-CEBD-1160/python-homework
ce4d8cec6e4077ae87f7886a70cd2e9b4bceea9b
[ "MIT" ]
null
null
null
import numpy data = numpy.genfromtxt(fname="housing.data") ################# Advanced for line in data: print(*line) ################# Reach 1 for line in data: list = line.tolist() strList = [str(i) for i in list] print(strList)
16.666667
45
0.568
import numpy data = numpy.genfromtxt(fname="housing.data") ################# Advanced for line in data: print(*line) ################# Reach 1 for line in data: list = line.tolist() strList = [str(i) for i in list] print(strList)
0
0
0
0f58e88aaabefc0b08a28dda07a7046980d8c0bd
262
py
Python
src/iert_news/migrations/0005_auto_20190211_1640.py
MetricsGroup/IERT-Webapp
9e43f1775767412898f9340b9cc84196eb4abfdb
[ "MIT" ]
3
2019-04-25T11:19:22.000Z
2020-05-10T20:41:12.000Z
src/iert_news/migrations/0005_auto_20190211_1640.py
MetricsGroup/IERT-Webapp
9e43f1775767412898f9340b9cc84196eb4abfdb
[ "MIT" ]
5
2020-06-17T05:16:27.000Z
2022-01-13T02:15:56.000Z
src/iert_news/migrations/0005_auto_20190211_1640.py
MetricsGroup/IERT-Webapp
9e43f1775767412898f9340b9cc84196eb4abfdb
[ "MIT" ]
3
2020-06-13T10:40:27.000Z
2021-10-13T15:45:50.000Z
# Generated by Django 2.1.5 on 2019-02-11 16:40 from django.db import migrations
23.818182
74
0.736641
# Generated by Django 2.1.5 on 2019-02-11 16:40 from django.db import migrations class Migration(migrations.Migration): dependencies = [("iert_news", "0004_auto_20190211_1631")] operations = [migrations.RenameModel(old_name="news", new_name="new")]
0
156
23
bd6e558eabfa6db785ebcd76d6c710c2167b847f
520
py
Python
src/getdata/scraping/scraper.py
fibs94/covid19-data
9035957cdbe8388f86b6d646ae3c2085f745e2f7
[ "Unlicense" ]
1
2021-09-19T18:38:32.000Z
2021-09-19T18:38:32.000Z
src/getdata/scraping/scraper.py
fibs94/covid19-data
9035957cdbe8388f86b6d646ae3c2085f745e2f7
[ "Unlicense" ]
null
null
null
src/getdata/scraping/scraper.py
fibs94/covid19-data
9035957cdbe8388f86b6d646ae3c2085f745e2f7
[ "Unlicense" ]
1
2021-09-19T18:38:34.000Z
2021-09-19T18:38:34.000Z
import re import ast from bs4 import BeautifulSoup as soup from urllib.request import urlopen as ureq from .helpers.constants import INFOGRAM_LINK
27.368421
80
0.680769
import re import ast from bs4 import BeautifulSoup as soup from urllib.request import urlopen as ureq from .helpers.constants import INFOGRAM_LINK def get_gov_page(): uclient = ureq(INFOGRAM_LINK) page_html = uclient.read() uclient.close() page_soup = soup(page_html, "html.parser") scripts = page...
348
0
23
c440c72720535471c02efb938c1ec984bd2edd8a
1,053
py
Python
tools/check-char.py
metabasenet/metabasenet
e9bc89b22c11981bcf1d71b63b9b66df3a4e54e1
[ "MIT" ]
1
2021-09-13T07:26:32.000Z
2021-09-13T07:26:32.000Z
tools/check-char.py
IBnetCouncil/ibrio
4d726c6dc10b8a3d2d4247eeb347d937dfd730a0
[ "MIT" ]
24
2020-09-22T02:38:39.000Z
2021-01-08T07:40:31.000Z
tools/check-char.py
IBnetCouncil/ibrio
4d726c6dc10b8a3d2d4247eeb347d937dfd730a0
[ "MIT" ]
3
2020-09-19T01:40:14.000Z
2020-12-22T02:11:52.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import re import codecs black_list_pattern = r'[\u4e00-\u9fff]+|[\uff01-\uff5e]+|[\u201c\u201d\u300a\u300b\u3010\u3011\uff5b\uff5d\uff1b\uff1a\u3002\uff0c\u3001\uff1f]+' white_list_pattern = r'[^\s\x21-\xE7]+' if __name__ == '__main__': main...
25.071429
145
0.553656
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import re import codecs black_list_pattern = r'[\u4e00-\u9fff]+|[\uff01-\uff5e]+|[\u201c\u201d\u300a\u300b\u3010\u3011\uff5b\uff5d\uff1b\uff1a\u3002\uff0c\u3001\uff1f]+' white_list_pattern = r'[^\s\x21-\xE7]+' def check_files_is_valid(path): f...
685
0
46
aff30ac2e90b5744ae16a617d0c7ff4f47f3f384
1,654
py
Python
src/test_data.py
Okabe-Junya/AtCoder_library
ba4f694e386a67a8b6d5fd92aa8e69d359c3ac6f
[ "MIT" ]
null
null
null
src/test_data.py
Okabe-Junya/AtCoder_library
ba4f694e386a67a8b6d5fd92aa8e69d359c3ac6f
[ "MIT" ]
null
null
null
src/test_data.py
Okabe-Junya/AtCoder_library
ba4f694e386a67a8b6d5fd92aa8e69d359c3ac6f
[ "MIT" ]
null
null
null
import sys from math import gcd as gcd_math from math import factorial as factorial_math from scipy.special import perm from scipy.special import comb from random import randint import data_structure_lib import math_lib # -------------------------------------------------- # data_structure_lib # 二分探索 # ダイクストラ法,ワー...
20.419753
58
0.622733
import sys from math import gcd as gcd_math from math import factorial as factorial_math from scipy.special import perm from scipy.special import comb from random import randint import data_structure_lib import math_lib # -------------------------------------------------- # data_structure_lib def init(): test_m...
819
0
112
8f96c72394c4c0b3edfa6474f426c39e8b7108a4
934
py
Python
feature_detection/scripts/read_yaml_config.py
vortexntnu/Vortex-CV
eb5e4836eeb750551807760a2eef3a0fb7daf7ff
[ "MIT" ]
2
2022-01-26T11:13:38.000Z
2022-02-22T21:18:30.000Z
feature_detection/scripts/read_yaml_config.py
vortexntnu/Vortex-CV
eb5e4836eeb750551807760a2eef3a0fb7daf7ff
[ "MIT" ]
42
2022-01-25T17:10:43.000Z
2022-03-29T18:41:34.000Z
feature_detection/scripts/read_yaml_config.py
vortexntnu/Vortex_CV
eb5e4836eeb750551807760a2eef3a0fb7daf7ff
[ "MIT" ]
null
null
null
def read_yaml_file(filename): """ @parameters filename, filename of the yaml file @returns dictionary of each parameter with the corresponding value. """ parameters = {} with open(filename) as file: lines = file.readlines() for line in lines: line = line.strip() ...
27.470588
71
0.536403
def read_yaml_file(filename): """ @parameters filename, filename of the yaml file @returns dictionary of each parameter with the corresponding value. """ parameters = {} with open(filename) as file: lines = file.readlines() for line in lines: line = line.strip() ...
0
0
0
452014e75da24227edaba5652a7b4ea2fcc4072e
848
py
Python
051 - 100/ex084.py
SocrammBR/Desafios-Python-CursoEmVideo
bd2454a24134500343ece91b936c169d3a66f89e
[ "MIT" ]
null
null
null
051 - 100/ex084.py
SocrammBR/Desafios-Python-CursoEmVideo
bd2454a24134500343ece91b936c169d3a66f89e
[ "MIT" ]
null
null
null
051 - 100/ex084.py
SocrammBR/Desafios-Python-CursoEmVideo
bd2454a24134500343ece91b936c169d3a66f89e
[ "MIT" ]
null
null
null
tot = 0 nomep = [] nomel = [] dadost = [] pesop = 0 pesol = 100000000000000000000 ** 10000 while True: dadost.append(input('Nome: ')) dadost.append(float(input('Peso: '))) tot += 1 if dadost[1] >= pesop: if dadost[1] == pesop: nomep.append(dadost[0]) elif dadost[1] > pesop: nomep.clear() ...
26.5
67
0.610849
tot = 0 nomep = [] nomel = [] dadost = [] pesop = 0 pesol = 100000000000000000000 ** 10000 while True: dadost.append(input('Nome: ')) dadost.append(float(input('Peso: '))) tot += 1 if dadost[1] >= pesop: if dadost[1] == pesop: nomep.append(dadost[0]) elif dadost[1] > pesop: nomep.clear() ...
0
0
0
4eef7dda45afa19f92ea49f6fc2b53562fe07dd9
4,587
py
Python
scraper.py
brandiny/ncdaily-opensource
db9e2f9d861537c61660855289438693843afcd9
[ "MIT" ]
4
2021-09-01T01:36:42.000Z
2022-01-17T23:16:02.000Z
scraper.py
brandiny/ncdaily-opensource
db9e2f9d861537c61660855289438693843afcd9
[ "MIT" ]
null
null
null
scraper.py
brandiny/ncdaily-opensource
db9e2f9d861537c61660855289438693843afcd9
[ "MIT" ]
null
null
null
""" scraper.py Handles the webscraping of the app. Key variables - scraper.archive == Array of the titles of old notices - scraper.notices_5 == Array of Meetings/Practices (has ALL INFORMATION) - scraper.notices_3 == Array of Notices (has ALL INFORMATION BUT date and location) Each is explained further be...
32.764286
120
0.589056
""" scraper.py Handles the webscraping of the app. Key variables - scraper.archive == Array of the titles of old notices - scraper.notices_5 == Array of Meetings/Practices (has ALL INFORMATION) - scraper.notices_3 == Array of Notices (has ALL INFORMATION BUT date and location) Each is explained further be...
0
0
0
901dcf4e12a51f741fe735b8be4ff980ad684f7e
2,013
py
Python
app/tests/participants_tests/test_filters.py
Tommos0/grand-challenge.org
187cd857f6a7c9651b7bda8c42c54801f071dd7c
[ "Apache-2.0" ]
null
null
null
app/tests/participants_tests/test_filters.py
Tommos0/grand-challenge.org
187cd857f6a7c9651b7bda8c42c54801f071dd7c
[ "Apache-2.0" ]
null
null
null
app/tests/participants_tests/test_filters.py
Tommos0/grand-challenge.org
187cd857f6a7c9651b7bda8c42c54801f071dd7c
[ "Apache-2.0" ]
null
null
null
import pytest from tests.factories import RegistrationRequestFactory from tests.utils import get_view_for_user @pytest.mark.django_db @pytest.mark.django_db
38.711538
73
0.734724
import pytest from tests.factories import RegistrationRequestFactory from tests.utils import get_view_for_user @pytest.mark.django_db def test_participants_list_is_filtered(client, TwoChallengeSets): response = get_view_for_user( viewname="participants:list", challenge=TwoChallengeSets.ChallengeS...
1,807
0
44
c101ffba1cf6cbce02fe40d568cbc344dbac9fc5
56,238
py
Python
mouse/utils.py
vananhlebarca/markerless-mice-tracking
3bbdd2d825f4ef493fe6f07af90ab7eaf0a4c825
[ "MIT" ]
null
null
null
mouse/utils.py
vananhlebarca/markerless-mice-tracking
3bbdd2d825f4ef493fe6f07af90ab7eaf0a4c825
[ "MIT" ]
null
null
null
mouse/utils.py
vananhlebarca/markerless-mice-tracking
3bbdd2d825f4ef493fe6f07af90ab7eaf0a4c825
[ "MIT" ]
null
null
null
import mrcnn.model as modellib import os import sys import cv2 import random import numpy as np import pandas as pd import deeplabcut import json import skimage import skimage.io from skimage.util import img_as_ubyte, img_as_float from skimage import morphology, measure, filters from shutil import copyfile from skimage...
38.309264
147
0.58825
import mrcnn.model as modellib import os import sys import cv2 import random import numpy as np import pandas as pd import deeplabcut import json import skimage import skimage.io from skimage.util import img_as_ubyte, img_as_float from skimage import morphology, measure, filters from shutil import copyfile from skimage...
1,713
0
69
33920516b169fb71e5866b282ff80151949f91b6
2,763
py
Python
net/utils/densenet_efficient.py
wenyh1616/motif-stgcn
c6aac161f93c3943c9e66dfe9bb5e0f4bb663b95
[ "BSD-2-Clause" ]
19
2019-11-06T03:15:17.000Z
2021-12-07T07:05:02.000Z
net/utils/densenet_efficient.py
wenyh1616/motif-stgcn
c6aac161f93c3943c9e66dfe9bb5e0f4bb663b95
[ "BSD-2-Clause" ]
2
2021-02-05T05:10:05.000Z
2021-07-05T01:44:19.000Z
net/utils/densenet_efficient.py
wenyh1616/motif-stgcn
c6aac161f93c3943c9e66dfe9bb5e0f4bb663b95
[ "BSD-2-Clause" ]
3
2020-08-01T13:19:44.000Z
2021-04-04T07:43:57.000Z
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.checkpoint as cp
40.632353
146
0.663409
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.checkpoint as cp def _bn_function_factory(norm, relu, conv): def bn_function(*inputs): concated_features = torch.cat(inputs, 1) bottleneck_output = conv(relu(norm(concated_features))) return bottleneck_ou...
2,408
25
224
c1dfa40bfeb1383da92f9ff0b3a22af6d24d348c
1,221
py
Python
commerce/auctions/urls.py
VincVader/Project-2-commerce
213440e01f9ed680a4e945bf3a282eac9215a43b
[ "MIT" ]
1
2021-07-26T14:23:30.000Z
2021-07-26T14:23:30.000Z
commerce/auctions/urls.py
VincVader/Project-2-commerce
213440e01f9ed680a4e945bf3a282eac9215a43b
[ "MIT" ]
null
null
null
commerce/auctions/urls.py
VincVader/Project-2-commerce
213440e01f9ed680a4e945bf3a282eac9215a43b
[ "MIT" ]
null
null
null
from django.urls import path from django.conf import settings from django.contrib.staticfiles.urls import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from . import views urlpatterns = [ path("", views.index, name="index"), path("login", views.login_view, name="login"), ...
43.607143
84
0.734644
from django.urls import path from django.conf import settings from django.contrib.staticfiles.urls import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from . import views urlpatterns = [ path("", views.index, name="index"), path("login", views.login_view, name="login"), ...
0
0
0
1fc00569bcb5d56d0c9f7e4467c2641aa38205fe
555
py
Python
spiketag/view/tests/test_cluster_view.py
aliddell/spiketag
f5600126c2c6c9be319e8b808d51ea33be843909
[ "BSD-3-Clause" ]
4
2018-04-23T18:08:39.000Z
2020-03-10T19:06:28.000Z
spiketag/view/tests/test_cluster_view.py
aliddell/spiketag
f5600126c2c6c9be319e8b808d51ea33be843909
[ "BSD-3-Clause" ]
69
2017-02-17T19:27:52.000Z
2022-03-30T04:06:53.000Z
spiketag/view/tests/test_cluster_view.py
aliddell/spiketag
f5600126c2c6c9be319e8b808d51ea33be843909
[ "BSD-3-Clause" ]
5
2017-02-01T16:11:32.000Z
2021-02-05T20:10:43.000Z
from spiketag.view import cluster_view import numpy as np if __name__ == '__main__': cluview = cluster_view() group_No = 40 sorting_status = np.random.randint(low=0, high=3, size=group_No) # 0: not ready; 1: ready; 2: done print(sorting_status) cluview.set_data(group_No=group_No, sorting_statu...
29.210526
106
0.693694
from spiketag.view import cluster_view import numpy as np if __name__ == '__main__': cluview = cluster_view() group_No = 40 sorting_status = np.random.randint(low=0, high=3, size=group_No) # 0: not ready; 1: ready; 2: done print(sorting_status) cluview.set_data(group_No=group_No, sorting_statu...
58
0
26
e7a457239da50c92393ba68a3c25d2a13f23c35a
4,939
py
Python
BenchENAS_python_package/algs/cnn_ga/genetic/statusupdatetool.py
benchenas/BenchENAS
776cd1dd035d73c4af369d0106d010b932f64782
[ "MIT" ]
1
2022-01-21T07:56:13.000Z
2022-01-21T07:56:13.000Z
BenchENAS_python_package/algs/cnn_ga/genetic/statusupdatetool.py
benchenas/BenchENA
cfb18a8e4bc6cd654df1011c94e3b8a61cd64da3
[ "MIT" ]
1
2022-02-24T06:07:27.000Z
2022-02-24T06:07:27.000Z
BenchENAS_python_package/algs/cnn_ga/genetic/statusupdatetool.py
benchenas/BenchENAS
776cd1dd035d73c4af369d0106d010b932f64782
[ "MIT" ]
1
2022-01-20T07:36:37.000Z
2022-01-20T07:36:37.000Z
import configparser import os from compute import Config_ini from train.utils import TrainConfig
31.864516
102
0.622596
import configparser import os from compute import Config_ini from train.utils import TrainConfig class StatusUpdateTool(object): @classmethod def clear_config(cls): config_file = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'global.ini') print(config_file) config = configp...
3,216
1,601
23
07fea23131bb591247d4c92b24105fc5a0368f83
5,260
py
Python
Lib/pagebot/elements/ruler.py
bghryct/PageBot
394150c0fd399f02faec28f4576046882f4d7d39
[ "MIT" ]
68
2018-10-22T22:42:58.000Z
2022-03-19T11:07:31.000Z
Lib/pagebot/elements/ruler.py
TypeNetwork/PageBot
394150c0fd399f02faec28f4576046882f4d7d39
[ "MIT" ]
97
2017-07-10T23:49:30.000Z
2018-10-03T08:17:55.000Z
Lib/pagebot/elements/ruler.py
TypeNetwork/PageBot
394150c0fd399f02faec28f4576046882f4d7d39
[ "MIT" ]
9
2017-07-11T09:59:00.000Z
2018-09-12T11:59:30.000Z
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # # P A G E B O T # # Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens # www.pagebot.io # Licensed under MIT conditions # # Supporting DrawBot, www.drawbot.com # ...
36.783217
96
0.556654
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # # P A G E B O T # # Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens # www.pagebot.io # Licensed under MIT conditions # # Supporting DrawBot, www.drawbot.com # ...
203
4,257
23
d449b56182c788498d5a1c012190763e4025b58e
1,160
py
Python
scripts/script_aes_neural_network_parameters.py
AISyLab/AISY_Framework
51af3a639d6dee4c970859f5cd95f35f1db26dcc
[ "MIT" ]
12
2021-03-26T08:17:07.000Z
2022-01-05T22:31:19.000Z
scripts/script_aes_neural_network_parameters.py
AISyLab/AISY_Framework
51af3a639d6dee4c970859f5cd95f35f1db26dcc
[ "MIT" ]
1
2021-03-26T09:11:34.000Z
2021-03-27T01:32:35.000Z
scripts/script_aes_neural_network_parameters.py
AISyLab/AISY_Framework
51af3a639d6dee4c970859f5cd95f35f1db26dcc
[ "MIT" ]
2
2021-03-14T01:35:49.000Z
2021-03-31T06:43:01.000Z
import aisy_sca from app import * from custom.custom_models.neural_networks import * aisy = aisy_sca.Aisy() aisy.set_resources_root_folder(resources_root_folder) aisy.set_database_root_folder(databases_root_folder) aisy.set_datasets_root_folder(datasets_root_folder) aisy.set_database_name("database_ascad.sqlite") ai...
35.151515
93
0.756034
import aisy_sca from app import * from custom.custom_models.neural_networks import * def mlp(classes, number_of_samples, neuron, layer, activation, learning_rate): model = Sequential(name="my_mlp") for l_i in range(layer): if l_i == 0: model.add(Dense(neuron, activation=activation, input_s...
578
0
23
3db626d0b18ffa0971184916775b6c28a042bc61
224
py
Python
core/management/commands/rebuild_all_cache.py
uktrade/directory-cms
8c8d13ce29ea74ddce7a40f3dd29c8847145d549
[ "MIT" ]
6
2018-03-20T11:19:07.000Z
2021-10-05T07:53:11.000Z
core/management/commands/rebuild_all_cache.py
uktrade/directory-cms
8c8d13ce29ea74ddce7a40f3dd29c8847145d549
[ "MIT" ]
802
2018-02-05T14:16:13.000Z
2022-02-10T10:59:21.000Z
core/management/commands/rebuild_all_cache.py
uktrade/directory-cms
8c8d13ce29ea74ddce7a40f3dd29c8847145d549
[ "MIT" ]
6
2019-01-22T13:19:37.000Z
2019-07-01T10:35:26.000Z
from django.core.management import BaseCommand from core.cache import rebuild_all_cache
22.4
46
0.736607
from django.core.management import BaseCommand from core.cache import rebuild_all_cache class Command(BaseCommand): help = 'Rebuild the redis cache' def handle(self, *args, **options): rebuild_all_cache()
42
70
23
b26d02c3d0efb754c3b3a24b7d1419f391088747
464
py
Python
examples/script_archive/04a_probo_backend_minimize.py
petuum/tuun
8eec472dbf0e5e695449b0fa2d98985469fd5b30
[ "Apache-2.0" ]
33
2020-08-30T16:22:35.000Z
2022-02-26T13:48:32.000Z
examples/script_archive/04a_probo_backend_minimize.py
petuum/tuun
8eec472dbf0e5e695449b0fa2d98985469fd5b30
[ "Apache-2.0" ]
2
2021-01-18T19:46:43.000Z
2021-03-24T09:59:14.000Z
examples/script_archive/04a_probo_backend_minimize.py
petuum/tuun
8eec472dbf0e5e695449b0fa2d98985469fd5b30
[ "Apache-2.0" ]
2
2020-08-25T17:02:15.000Z
2021-04-21T16:40:44.000Z
from tuun.backend import ProboBackend model_config = {'name': 'simplegp', 'ls': 3.0, 'alpha': 1.5, 'sigma': 1e-5} acqfunction_config = {'name': 'default', 'acq_str': 'ei'} acqoptimizer_config = {'name': 'default', 'max_iter': 200} domain_config = {'name': 'real', 'min_max': [(-5, 5)]} f = lambda x: x[0] ** 4 - x[0] *...
38.666667
87
0.663793
from tuun.backend import ProboBackend model_config = {'name': 'simplegp', 'ls': 3.0, 'alpha': 1.5, 'sigma': 1e-5} acqfunction_config = {'name': 'default', 'acq_str': 'ei'} acqoptimizer_config = {'name': 'default', 'max_iter': 200} domain_config = {'name': 'real', 'min_max': [(-5, 5)]} f = lambda x: x[0] ** 4 - x[0] *...
0
0
0
17689d329656c94612181a0434fd03dc2cf7df6e
440
py
Python
test.py
nerophung/japanese-fake-text
96576bdba3482923da94eeee99554c46c2ef5a54
[ "MIT" ]
null
null
null
test.py
nerophung/japanese-fake-text
96576bdba3482923da94eeee99554c46c2ef5a54
[ "MIT" ]
null
null
null
test.py
nerophung/japanese-fake-text
96576bdba3482923da94eeee99554c46c2ef5a54
[ "MIT" ]
1
2022-01-18T04:29:50.000Z
2022-01-18T04:29:50.000Z
from jpntextgen.engine import Engine engine = Engine() print(engine.get_address()) print(engine.get_full_name()) print(engine.get_date()) print(engine.get_general_text()) print(engine.get_additional_info()) print(engine.get_email()) print(engine.get_url()) print(engine.get_eng_katakana()) print(engine.get_phone_numbe...
25.882353
36
0.795455
from jpntextgen.engine import Engine engine = Engine() print(engine.get_address()) print(engine.get_full_name()) print(engine.get_date()) print(engine.get_general_text()) print(engine.get_additional_info()) print(engine.get_email()) print(engine.get_url()) print(engine.get_eng_katakana()) print(engine.get_phone_numbe...
0
0
0
6eab66787e84eb8aae4d1008158ae1eee5cddb4d
7,270
py
Python
drlnd/core/pipeline/train.py
yycho0108/DRLND_Core
79117bd933b6cbf9f74e3356f5e1b8b156173cdc
[ "MIT" ]
null
null
null
drlnd/core/pipeline/train.py
yycho0108/DRLND_Core
79117bd933b6cbf9f74e3356f5e1b8b156173cdc
[ "MIT" ]
null
null
null
drlnd/core/pipeline/train.py
yycho0108/DRLND_Core
79117bd933b6cbf9f74e3356f5e1b8b156173cdc
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import numpy as np import os import time import gym import json import sys import functools from tqdm import tqdm, tnrange from drlnd.core.common.util import is_notebook, count_boundaries from drlnd.core.agents.base_agent import AgentBase from drlnd.core.common.ring_buffer import ContiguousRing...
35.463415
92
0.64608
#!/usr/bin/env python3 import numpy as np import os import time import gym import json import sys import functools from tqdm import tqdm, tnrange from drlnd.core.common.util import is_notebook, count_boundaries from drlnd.core.agents.base_agent import AgentBase from drlnd.core.common.ring_buffer import ContiguousRing...
6,471
5
172
56ca6cd44551c234bf3fa5b39dce129da19ceb88
6,117
py
Python
bin/v06_43_00-UpdateGeometryToLArCoreAlg.py
lgarren/larsoft
bdceafc0cde6241f6d60e91cc44e5c560c60a4e7
[ "Apache-2.0" ]
3
2020-02-10T19:20:35.000Z
2021-11-03T13:06:49.000Z
bin/v06_43_00-UpdateGeometryToLArCoreAlg.py
lgarren/larsoft
bdceafc0cde6241f6d60e91cc44e5c560c60a4e7
[ "Apache-2.0" ]
28
2019-07-30T14:59:19.000Z
2022-01-14T16:47:25.000Z
bin/v06_43_00-UpdateGeometryToLArCoreAlg.py
lgarren/larsoft
bdceafc0cde6241f6d60e91cc44e5c560c60a4e7
[ "Apache-2.0" ]
20
2019-08-19T17:18:37.000Z
2021-06-07T15:57:37.000Z
#!/usr/bin/env python2 # # This script changes C++ code, CMake files and FHiCL configuration to use # larcorealg instead of larcore for geometrye # # Change log: # 20170703 (petrillo@fnal.gov) # original version # import sys, re import SerialSubstitution from SerialSubstitution import AddProcessor, RunSubstitutor ...
66.48913
130
0.594409
#!/usr/bin/env python2 # # This script changes C++ code, CMake files and FHiCL configuration to use # larcorealg instead of larcore for geometrye # # Change log: # 20170703 (petrillo@fnal.gov) # original version # import sys, re import SerialSubstitution from SerialSubstitution import AddProcessor, RunSubstitutor ...
0
0
0
5dbe38ae1f40bd57abcb02a077877d0da7b3a766
3,929
py
Python
flocker/docs/version_extensions.py
wallnerryan/flocker-profiles
bcd3ced8edf4af86a68070ff6a714c45f9f4913b
[ "Apache-2.0" ]
null
null
null
flocker/docs/version_extensions.py
wallnerryan/flocker-profiles
bcd3ced8edf4af86a68070ff6a714c45f9f4913b
[ "Apache-2.0" ]
null
null
null
flocker/docs/version_extensions.py
wallnerryan/flocker-profiles
bcd3ced8edf4af86a68070ff6a714c45f9f4913b
[ "Apache-2.0" ]
null
null
null
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Sphinx extension to add directives to allow files and code to include the latest installable version of Flocker. """ import importlib import os from sphinx.directives.code import LiteralInclude from sphinx.roles import XRefRole from flocker import __v...
31.685484
79
0.692543
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Sphinx extension to add directives to allow files and code to include the latest installable version of Flocker. """ import importlib import os from sphinx.directives.code import LiteralInclude from sphinx.roles import XRefRole from flocker import __v...
994
0
128
e1f386d336997274ce53c9d682995430ea59a328
8,266
py
Python
tools/project.py
AK391/anycost-gan
a827390a77d6360ed6902511de447a503584c63f
[ "MIT" ]
692
2021-03-05T02:05:40.000Z
2022-03-30T19:09:32.000Z
tools/project.py
AK391/anycost-gan
a827390a77d6360ed6902511de447a503584c63f
[ "MIT" ]
22
2021-03-11T02:56:59.000Z
2022-03-31T13:59:39.000Z
tools/project.py
AK391/anycost-gan
a827390a77d6360ed6902511de447a503584c63f
[ "MIT" ]
81
2021-03-05T06:03:39.000Z
2022-03-28T09:33:50.000Z
import argparse import os import json import random import torch import torch.nn as nn from torch.nn import functional as F from torchvision import transforms from PIL import Image from tqdm import tqdm import lpips import sys sys.path.append('.') # to run from the project root dir import models from thirdparty i...
36.414097
118
0.635858
import argparse import os import json import random import torch import torch.nn as nn from torch.nn import functional as F from torchvision import transforms from PIL import Image from tqdm import tqdm import lpips import sys sys.path.append('.') # to run from the project root dir import models from thirdparty i...
4,376
0
138
efbebadb15895ab66ee3fc804cec5b920f7027c3
1,006
py
Python
hello_BC.py
bc1109/ubuntu
71b3a1bd0b5d027016b5868da9ab442c8e4f49d2
[ "Apache-2.0" ]
null
null
null
hello_BC.py
bc1109/ubuntu
71b3a1bd0b5d027016b5868da9ab442c8e4f49d2
[ "Apache-2.0" ]
null
null
null
hello_BC.py
bc1109/ubuntu
71b3a1bd0b5d027016b5868da9ab442c8e4f49d2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """A tiny Python program to check that Python is working. Try running this program from t...
25.794872
66
0.706759
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """A tiny Python program to check that Python is working. Try running this program from t...
162
0
47
de2607a926a8a835910df56da1e8fb214dc6bdf2
699
py
Python
test/notsosimple_project_test.py
leotrs/decu
e920a7046220a0547826084c11b6a74029e3c658
[ "MIT" ]
4
2017-10-30T21:22:32.000Z
2020-10-16T04:15:44.000Z
test/notsosimple_project_test.py
leotrs/decu
e920a7046220a0547826084c11b6a74029e3c658
[ "MIT" ]
105
2017-10-05T18:27:04.000Z
2018-10-10T15:55:47.000Z
test/notsosimple_project_test.py
leotrs/decu
e920a7046220a0547826084c11b6a74029e3c658
[ "MIT" ]
null
null
null
""" notsosimple_project_test.py --------------------------- Run `decu` on the mock project notsosimple_project. """ import os import decu import pytest from subprocess import call from util import make_teardown_fixture PROJECT_DIR = 'notsosimple_project/' teardown = pytest.fixture(scope='module', autouse=True)( ...
25.888889
78
0.695279
""" notsosimple_project_test.py --------------------------- Run `decu` on the mock project notsosimple_project. """ import os import decu import pytest from subprocess import call from util import make_teardown_fixture PROJECT_DIR = 'notsosimple_project/' teardown = pytest.fixture(scope='module', autouse=True)( ...
0
0
0
592878835b82a1a9afbd4b012a52a907a6f06777
7,731
py
Python
src/data/interim_to_single_files.py
Rungetf/learna_ba
a5784fd1dd031a876b7c3908207c7ffff546039f
[ "Apache-2.0" ]
null
null
null
src/data/interim_to_single_files.py
Rungetf/learna_ba
a5784fd1dd031a876b7c3908207c7ffff546039f
[ "Apache-2.0" ]
7
2020-11-13T19:07:44.000Z
2022-02-10T02:31:11.000Z
src/data/interim_to_single_files.py
Rungetf/learna_ba
a5784fd1dd031a876b7c3908207c7ffff546039f
[ "Apache-2.0" ]
null
null
null
import pandas as pd import numpy as np from pathlib import Path if __name__ == '__main__': # split_local_data_to_single_files('data/rfam_learn_local/test') # split_local_data_to_single_files('data/rfam_learn_local/train') # split_local_data_to_single_files('data/rfam_learn_local/validation') # print...
56.845588
336
0.646876
import pandas as pd import numpy as np from pathlib import Path def split_local_data_to_single_files(data_dir, extension='.rna'): target_file_paths = Path(data_dir, dataset).glob('*.local') for target_file_path in target_file_paths: [Path(data_dir, f"{index+1}{extension}").resolve().write_text(target.r...
6,291
0
184
34c0d7a9e3f20c24833704a8fe1f84449a9f92dc
2,970
py
Python
cli_scripts/voice_coding_cli.py
MLH-Fellowship/LarynxCode
840fee18c689a357052825607c27fc8e3e56571c
[ "MIT" ]
1
2021-09-17T06:11:02.000Z
2021-09-17T06:11:02.000Z
cli_scripts/voice_coding_cli.py
soma2000-lang/LarynxCode
840fee18c689a357052825607c27fc8e3e56571c
[ "MIT" ]
5
2021-02-03T05:29:41.000Z
2021-02-08T01:14:11.000Z
cli_scripts/voice_coding_cli.py
soma2000-lang/LarynxCode
840fee18c689a357052825607c27fc8e3e56571c
[ "MIT" ]
4
2021-02-03T05:05:00.000Z
2021-07-14T06:21:10.000Z
import subprocess,sys,click from subprocess import Popen,CREATE_NEW_CONSOLE from selenium import webdriver import six from pyfiglet import figlet_format from click_help_colors import HelpColorsGroup, HelpColorsCommand # Coloring libraries # Try colorama try: import colorama colorama.init() except ImportError: ...
37.125
249
0.695623
import subprocess,sys,click from subprocess import Popen,CREATE_NEW_CONSOLE from selenium import webdriver import six from pyfiglet import figlet_format from click_help_colors import HelpColorsGroup, HelpColorsCommand # Coloring libraries # Try colorama try: import colorama colorama.init() except ImportError: ...
261
0
44
3b03ef567c9d9bb1e0c9b4e41a10a0612f647307
1,803
py
Python
troposphere/validators/route53.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
null
null
null
troposphere/validators/route53.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
null
null
null
troposphere/validators/route53.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2012-2022, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from .. import AWSProperty from . import boolean, network_port, positive_integer class AlarmIdentifier(AWSProperty): """ Export: """ props = { "Name": (str, True), "Reg...
26.130435
82
0.591791
# Copyright (c) 2012-2022, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from .. import AWSProperty from . import boolean, network_port, positive_integer class AlarmIdentifier(AWSProperty): """ Export: """ props = { "Name": (str, True), "Reg...
433
0
27
84f93797b565e0ae5ca73e73f34d03e08a5bf990
697
py
Python
sites/migrations/0027_apicollections.py
jeffcnz/mon-site-register
79460838cc0c4f69325a02785f1f5cbfed107523
[ "MIT" ]
null
null
null
sites/migrations/0027_apicollections.py
jeffcnz/mon-site-register
79460838cc0c4f69325a02785f1f5cbfed107523
[ "MIT" ]
17
2019-11-12T05:53:56.000Z
2019-11-26T21:55:20.000Z
sites/migrations/0027_apicollections.py
jeffcnz/mon-site-register
79460838cc0c4f69325a02785f1f5cbfed107523
[ "MIT" ]
null
null
null
# Generated by Django 2.2.6 on 2019-11-21 21:06 from django.db import migrations, models import django.db.models.deletion
29.041667
111
0.596844
# Generated by Django 2.2.6 on 2019-11-21 21:06 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('sites', '0026_auto_20191122_0731'), ] operations = [ migrations.CreateModel( name='ApiCollectio...
0
550
23
7f85a86c36b65042bb52fa6bb39cd317aa2eeda3
488
py
Python
02-FaceDetect.py
amandureja/Important-Content
d222bbd65f3cf7b40a6766905baa160576b6d295
[ "Apache-2.0" ]
null
null
null
02-FaceDetect.py
amandureja/Important-Content
d222bbd65f3cf7b40a6766905baa160576b6d295
[ "Apache-2.0" ]
null
null
null
02-FaceDetect.py
amandureja/Important-Content
d222bbd65f3cf7b40a6766905baa160576b6d295
[ "Apache-2.0" ]
null
null
null
import cv2 face_data = cv2.CascadeClassifier("haarcascade_frontalface_default.xml") cap = cv2.VideoCapture(0) while True: ret, img = cap.read() gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) faces = face_data.detectMultiScale(gray, 1.3, 5) for x,y,w,h in faces: cv2.rectangle(img, (...
22.181818
73
0.610656
import cv2 face_data = cv2.CascadeClassifier("haarcascade_frontalface_default.xml") cap = cv2.VideoCapture(0) while True: ret, img = cap.read() gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) faces = face_data.detectMultiScale(gray, 1.3, 5) for x,y,w,h in faces: cv2.rectangle(img, (...
0
0
0
bf3b2ede706000786c30581e1848a076ed85c14d
397
py
Python
nsp_project_app/migrations/0030_post_title.py
Priyansh863/e-backend
c8c1bb8a7c0de96febacfeec76249256c8df3303
[ "bzip2-1.0.6" ]
null
null
null
nsp_project_app/migrations/0030_post_title.py
Priyansh863/e-backend
c8c1bb8a7c0de96febacfeec76249256c8df3303
[ "bzip2-1.0.6" ]
null
null
null
nsp_project_app/migrations/0030_post_title.py
Priyansh863/e-backend
c8c1bb8a7c0de96febacfeec76249256c8df3303
[ "bzip2-1.0.6" ]
null
null
null
# Generated by Django 2.2.5 on 2020-10-16 07:38 from django.db import migrations, models
20.894737
62
0.602015
# Generated by Django 2.2.5 on 2020-10-16 07:38 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nsp_project_app', '0029_followers_user'), ] operations = [ migrations.AddField( model_name='post', name='Title', ...
0
283
23
180ef89cd982370260ffffb51d65e68be1182952
245
py
Python
app/__init__.py
prof-rossetti/flask-firebase-template-2022
2a5691c30e2c7b9c8b7c2511cbef600bda63a904
[ "MIT" ]
null
null
null
app/__init__.py
prof-rossetti/flask-firebase-template-2022
2a5691c30e2c7b9c8b7c2511cbef600bda63a904
[ "MIT" ]
2
2022-03-28T01:40:56.000Z
2022-03-29T19:21:58.000Z
app/__init__.py
prof-rossetti/flask-firebase-template-2022
2a5691c30e2c7b9c8b7c2511cbef600bda63a904
[ "MIT" ]
null
null
null
import os from dotenv import load_dotenv load_dotenv() APP_ENV = os.getenv("APP_ENV", default="development") # IMPORTANT: set to "production" in production APP_VERSION = os.getenv("APP_VERSION", default="v0.0.1") # update upon new releases
22.272727
100
0.75102
import os from dotenv import load_dotenv load_dotenv() APP_ENV = os.getenv("APP_ENV", default="development") # IMPORTANT: set to "production" in production APP_VERSION = os.getenv("APP_VERSION", default="v0.0.1") # update upon new releases
0
0
0
567782ee404e093a3dedcabf0eeaf8233347e61e
1,814
py
Python
pc1/main.py
renzoqamao/mate_computacional
e2947d9c51842606d80bfcb179120fe77519646e
[ "CECILL-B" ]
null
null
null
pc1/main.py
renzoqamao/mate_computacional
e2947d9c51842606d80bfcb179120fe77519646e
[ "CECILL-B" ]
null
null
null
pc1/main.py
renzoqamao/mate_computacional
e2947d9c51842606d80bfcb179120fe77519646e
[ "CECILL-B" ]
null
null
null
import pygame from pygame.locals import * from OpenGL.GL import * from OpenGL.GLU import * vertices= ( (0, 0, 0), (1, 0, 0), (1, 1, 0), (0, 1 ,0), (0, 0, 1), (1, 0, 1), (1, 1, 1), (0, 1, 1), ) edges = ( (0,1), (1,2), (2,3), (3,0), (0,4), (1,5), (2,6), ...
19.717391
58
0.479603
import pygame from pygame.locals import * from OpenGL.GL import * from OpenGL.GLU import * vertices= ( (0, 0, 0), (1, 0, 0), (1, 1, 0), (0, 1 ,0), (0, 0, 1), (1, 0, 1), (1, 1, 1), (0, 1, 1), ) edges = ( (0,1), (1,2), (2,3), (3,0), (0,4), (1,5), (2,6), ...
1,357
0
68
1387b0b9111ea77d42de3fc741ee39fbca30863c
10,594
py
Python
docusign_esign/models/chunked_upload_response.py
cridenour/docusign-python-client
7c0804b4f9fb850c64e05793eb5472c2c6387716
[ "MIT" ]
null
null
null
docusign_esign/models/chunked_upload_response.py
cridenour/docusign-python-client
7c0804b4f9fb850c64e05793eb5472c2c6387716
[ "MIT" ]
null
null
null
docusign_esign/models/chunked_upload_response.py
cridenour/docusign-python-client
7c0804b4f9fb850c64e05793eb5472c2c6387716
[ "MIT" ]
null
null
null
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.gi...
30.976608
240
0.631961
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.gi...
0
0
0
46460f644bb63c40fd56c711dd5a6e1c523c5d2a
5,592
py
Python
test/test_validator.py
danirod/hub-taguri
bacb1e6d0c97b181fcfb18ecb9b738fd98042467
[ "MIT" ]
null
null
null
test/test_validator.py
danirod/hub-taguri
bacb1e6d0c97b181fcfb18ecb9b738fd98042467
[ "MIT" ]
null
null
null
test/test_validator.py
danirod/hub-taguri
bacb1e6d0c97b181fcfb18ecb9b738fd98042467
[ "MIT" ]
null
null
null
from unittest import TestCase from taguri.validator import ( authority_name_validator, date_validator, specific_validator, ) # https://blogs.msdn.microsoft.com/testing123/2009/02/06/email-address-test-cases/ # Note, however, that there are cases left out because the tag URI # grammar allows or ...
36.54902
86
0.533083
from unittest import TestCase from taguri.validator import ( authority_name_validator, date_validator, specific_validator, ) class AuthorityNameValidatorTestCase(TestCase): def test_accepts_domain_names(self): test_cases = ( 'unqualified-domain-name', 'fully-qualified-do...
4,912
56
300
01ac30f2716595c2e4a7fd83e8a61e67130e1a5d
440
py
Python
Id card generator/index.py
saadhaxxan/Awesome-Python-Projects
0be4eb73eee92899d6cc09c5ea9e0a31195d8bd4
[ "MIT" ]
38
2020-08-25T16:09:48.000Z
2022-02-21T08:31:23.000Z
Id card generator/index.py
saadhaxxan/Awesome-Python-Projects
0be4eb73eee92899d6cc09c5ea9e0a31195d8bd4
[ "MIT" ]
null
null
null
Id card generator/index.py
saadhaxxan/Awesome-Python-Projects
0be4eb73eee92899d6cc09c5ea9e0a31195d8bd4
[ "MIT" ]
16
2021-01-06T03:33:41.000Z
2022-03-16T22:31:13.000Z
from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * import sys import MySQLdb from PyQt5.uic import loadUiType ui,_ = loadUiType('id_gen.ui') if __name__ == '__main__': main()
16.296296
34
0.672727
from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * import sys import MySQLdb from PyQt5.uic import loadUiType ui,_ = loadUiType('id_gen.ui') class MainApp(QMainWindow , ui): def __init__(self): QMainWindow.__init__(self) self.setupUi(self) def main(): app = ...
140
11
72
453dd078ab69f7f03a16fb31e0c25ecfb41b8050
2,211
py
Python
simulate_all.py
libsmelt/Simulator
dad65cf14259f2e4b190620832d17e842b28a613
[ "MIT" ]
2
2016-11-03T07:04:45.000Z
2017-03-15T14:29:17.000Z
simulate_all.py
libsmelt/Simulator
dad65cf14259f2e4b190620832d17e842b28a613
[ "MIT" ]
1
2019-10-26T20:42:17.000Z
2019-10-26T20:42:17.000Z
simulate_all.py
libsmelt/Simulator
dad65cf14259f2e4b190620832d17e842b28a613
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Copyright (c) 2013-2016, ETH Zurich. # All rights reserved. # # This file is distributed under the terms in the attached LICENSE file. # If you do not find this file, copies can be found by writing to: # ETH Zurich D-INFK, Universitaetstr. 6, CH-8092 Zurich. Attn: Systems Group. import sys im...
27.6375
92
0.521031
#!/usr/bin/env python # # Copyright (c) 2013-2016, ETH Zurich. # All rights reserved. # # This file is distributed under the terms in the attached LICENSE file. # If you do not find this file, copies can be found by writing to: # ETH Zurich D-INFK, Universitaetstr. 6, CH-8092 Zurich. Attn: Systems Group. import sys im...
1,756
0
23
5da52eaeb0f5bce0e43197f4c06c839e8a925535
819
py
Python
Q02__/79_Perfect_Squares/Solution.py
hsclinical/leetcode
48a57f6a5d5745199c5685cd2c8f5c4fa293e54a
[ "Apache-2.0" ]
null
null
null
Q02__/79_Perfect_Squares/Solution.py
hsclinical/leetcode
48a57f6a5d5745199c5685cd2c8f5c4fa293e54a
[ "Apache-2.0" ]
null
null
null
Q02__/79_Perfect_Squares/Solution.py
hsclinical/leetcode
48a57f6a5d5745199c5685cd2c8f5c4fa293e54a
[ "Apache-2.0" ]
null
null
null
from typing import List
27.3
68
0.416361
from typing import List class Solution: def numSquares(self, n: int) -> int: if n < 0: return None elif n == 0: return 1 elif n < 4: return n else: squares = [] initNum = 2 while True: perfectSqu...
752
-6
49
07f5a116b7a98cb4d917d876e1d2b098ef359ce3
40,556
py
Python
survos/widgets/base.py
paskino/SuRVoS
e01e784442e2e9f724826cdb70f3a50c034c6455
[ "Apache-2.0" ]
22
2016-09-30T08:04:42.000Z
2022-03-05T07:24:18.000Z
survos/widgets/base.py
paskino/SuRVoS
e01e784442e2e9f724826cdb70f3a50c034c6455
[ "Apache-2.0" ]
81
2016-11-21T15:32:14.000Z
2022-02-20T00:22:27.000Z
survos/widgets/base.py
paskino/SuRVoS
e01e784442e2e9f724826cdb70f3a50c034c6455
[ "Apache-2.0" ]
6
2018-11-22T10:19:59.000Z
2022-02-04T06:15:48.000Z
from ..qt_compat import QtGui, QtCore, QtWidgets import six import os from collections import defaultdict from ..core import DataModel, LabelManager DEFAULT_DIR_KEY = "default_dir" DEFAULT_DATA_KEY = "default_data_dir"
32.680097
101
0.609256
from ..qt_compat import QtGui, QtCore, QtWidgets import six import os from collections import defaultdict from ..core import DataModel, LabelManager DEFAULT_DIR_KEY = "default_dir" DEFAULT_DATA_KEY = "default_data_dir" class SectionCombo(QtWidgets.QToolButton): currentIndexChanged = QtCore.pyqtSignal(int) ...
33,595
3,562
3,162
c453d726fe5860f3a093246cab294b7de5b7c2a0
13,259
py
Python
src/pyensae/languages/RListener.py
sdpython/pyensae
ada4dbb0b9901bf481eff2ea239e74ed964d93b0
[ "MIT" ]
28
2015-07-19T21:20:51.000Z
2022-02-16T11:50:53.000Z
src/pyensae/languages/RListener.py
sdpython/pyensae
ada4dbb0b9901bf481eff2ea239e74ed964d93b0
[ "MIT" ]
34
2015-06-16T15:38:25.000Z
2021-12-29T11:04:01.000Z
src/pyensae/languages/RListener.py
sdpython/pyensae
ada4dbb0b9901bf481eff2ea239e74ed964d93b0
[ "MIT" ]
27
2015-01-13T08:24:22.000Z
2022-03-31T14:51:23.000Z
# Generated from \R.g4 by ANTLR 4.9 from antlr4 import * if __name__ is not None and "." in __name__: from .RParser import RParser else: from RParser import RParser # This class defines a complete listener for a parse tree produced by RParser. # Enter a parse tree produced by RParser#parse. # Exit a...
33.230576
84
0.711894
# Generated from \R.g4 by ANTLR 4.9 from antlr4 import * if __name__ is not None and "." in __name__: from .RParser import RParser else: from RParser import RParser # This class defines a complete listener for a parse tree produced by RParser. class RListener(ParseTreeListener): # Enter a parse tree pro...
4,876
14
2,519
d6d5f4b1d39b3fc15094d73458952248928d0546
2,020
py
Python
touchtechnology/common/debugging.py
goodtune/vitriolic
d135eecf7acbc229a872585ebafb8bbefca52df4
[ "BSD-3-Clause" ]
null
null
null
touchtechnology/common/debugging.py
goodtune/vitriolic
d135eecf7acbc229a872585ebafb8bbefca52df4
[ "BSD-3-Clause" ]
28
2016-12-09T21:14:19.000Z
2022-01-11T07:17:16.000Z
touchtechnology/common/debugging.py
goodtune/vitriolic
d135eecf7acbc229a872585ebafb8bbefca52df4
[ "BSD-3-Clause" ]
null
null
null
import logging logger = logging.getLogger(__name__) def strict_show_toolbar_callback(request): """ Additional check against custom permission ``debug_toolbar.show``. :param request: HttpRequest :return: bool """ if hasattr(request, 'user') and \ request.user.has_perm('debug_toolbar.sh...
29.705882
77
0.669802
import logging logger = logging.getLogger(__name__) def strict_show_toolbar_callback(request): """ Additional check against custom permission ``debug_toolbar.show``. :param request: HttpRequest :return: bool """ if hasattr(request, 'user') and \ request.user.has_perm('debug_toolbar.sh...
0
0
0
3d48dc045189e96cada25d04390ede7f5b4b3ce3
7,871
py
Python
serviceconnect/views.py
Nick-Getka/ServiceConnect
adc7d3eeb1841674f221e23a867ba0e72b8b64f1
[ "MIT" ]
null
null
null
serviceconnect/views.py
Nick-Getka/ServiceConnect
adc7d3eeb1841674f221e23a867ba0e72b8b64f1
[ "MIT" ]
null
null
null
serviceconnect/views.py
Nick-Getka/ServiceConnect
adc7d3eeb1841674f221e23a867ba0e72b8b64f1
[ "MIT" ]
null
null
null
import re import os import random import psycopg2 import requests from .models import User from flask import request, session from twilio.twiml.messaging_response import MessagingResponse, Message from . import app, db basic_payload = { 'api_key': os.environ.get('AB_API_KEY'), 'cookie': "TestyMcTestface" } #P...
40.158163
195
0.567272
import re import os import random import psycopg2 import requests from .models import User from flask import request, session from twilio.twiml.messaging_response import MessagingResponse, Message from . import app, db basic_payload = { 'api_key': os.environ.get('AB_API_KEY'), 'cookie': "TestyMcTestface" } #P...
1,869
0
44
18945dcd77da87679cfd961b9d56059bc0f83c9c
157
py
Python
meshrcnn/evaluation/__init__.py
MAYURGAIKWAD/meshrcnn
b47ecd47ca7de7055b7d141e63ddab286c5245f3
[ "BSD-3-Clause" ]
1,028
2020-01-23T23:30:54.000Z
2022-03-27T22:33:50.000Z
meshrcnn/evaluation/__init__.py
MAYURGAIKWAD/meshrcnn
b47ecd47ca7de7055b7d141e63ddab286c5245f3
[ "BSD-3-Clause" ]
103
2020-01-24T05:29:48.000Z
2022-03-08T13:04:24.000Z
meshrcnn/evaluation/__init__.py
MAYURGAIKWAD/meshrcnn
b47ecd47ca7de7055b7d141e63ddab286c5245f3
[ "BSD-3-Clause" ]
179
2020-01-24T08:14:30.000Z
2022-03-19T00:34:05.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .pix3d_evaluation import Pix3DEvaluator, transform_meshes_to_camera_coord_system
52.333333
85
0.847134
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .pix3d_evaluation import Pix3DEvaluator, transform_meshes_to_camera_coord_system
0
0
0
f5df54a8825e66091d470aa3674000cdc9b216f8
1,799
py
Python
ssh_operation.py
Elvira521feng/powerful-tools
1b0ed883ace208be0a6785bb075d829613ce4c1a
[ "MIT" ]
null
null
null
ssh_operation.py
Elvira521feng/powerful-tools
1b0ed883ace208be0a6785bb075d829613ce4c1a
[ "MIT" ]
null
null
null
ssh_operation.py
Elvira521feng/powerful-tools
1b0ed883ace208be0a6785bb075d829613ce4c1a
[ "MIT" ]
null
null
null
import paramiko
24.310811
76
0.558644
import paramiko class SshOperation(object): def __init__(self, host, port): self.host = host self.port = port self.ssh = None self.transport = None def ssh_connect_pwd(self, username, password): """ 用用户密码连接远程服务器 参数: host:服务器ip po...
359
1,621
23
4245f88e9de681ea222ae2ef29fe0812ea0bfc72
656
py
Python
lib/coloraide/color/distance/delta_e_itp.py
adaminfinitum/ColorHelper
d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47
[ "MIT" ]
253
2015-03-04T06:48:43.000Z
2022-03-25T14:22:17.000Z
lib/coloraide/color/distance/delta_e_itp.py
adaminfinitum/ColorHelper
d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47
[ "MIT" ]
197
2015-03-04T21:40:47.000Z
2022-03-25T17:04:36.000Z
lib/coloraide/color/distance/delta_e_itp.py
adaminfinitum/ColorHelper
d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47
[ "MIT" ]
32
2015-03-21T03:28:01.000Z
2021-09-06T07:20:51.000Z
""" Delta E ITP. https://kb.portrait.com/help/ictcp-color-difference-metric """ from ..distance import DeltaE import math from ... import util class DEITP(DeltaE): """Delta E ITP class.""" @staticmethod def name(): """Name of method.""" return "itp" @staticmethod def distance(c...
22.62069
90
0.577744
""" Delta E ITP. https://kb.portrait.com/help/ictcp-color-difference-metric """ from ..distance import DeltaE import math from ... import util class DEITP(DeltaE): """Delta E ITP class.""" @staticmethod def name(): """Name of method.""" return "itp" @staticmethod def distance(c...
0
0
0
307f5b49178b048c9ff80486f74009566c7864b8
5,654
py
Python
xsssniper/core/crawler.py
Marzooq13579/Hack-Gadgets
4b9351c4465f3e01fb0390b1e86dfe7c26237a19
[ "MIT" ]
370
2015-01-23T12:27:44.000Z
2022-03-30T16:47:10.000Z
core/crawler.py
starling021/xsssniper
02b59afd15efead30bdf4829b6c1356abb8731cd
[ "ISC" ]
17
2015-02-25T15:53:22.000Z
2022-02-01T06:06:10.000Z
core/crawler.py
starling021/xsssniper
02b59afd15efead30bdf4829b6c1356abb8731cd
[ "ISC" ]
117
2015-02-02T02:20:02.000Z
2022-03-31T05:31:47.000Z
#!/usr/bin/env python try: from mechanize import Request, urlopen, URLError, HTTPError,ProxyHandler, build_opener, install_opener, Browser except ImportError: print "\n[X] Please install mechanize module:" print " http://wwwsearch.sourceforge.net/mechanize/\n" exit() from collections import default...
35.559748
115
0.534843
#!/usr/bin/env python try: from mechanize import Request, urlopen, URLError, HTTPError,ProxyHandler, build_opener, install_opener, Browser except ImportError: print "\n[X] Please install mechanize module:" print " http://wwwsearch.sourceforge.net/mechanize/\n" exit() from collections import default...
4,998
11
217
059096f1a422280bb4e08e0b9135ae4c314c1314
1,550
py
Python
questions/q294_three_sum_zero/code.py
aadhityasw/Competitive-Programs
901a48d35f024a3a87c32a45b7f4531e8004a203
[ "MIT" ]
null
null
null
questions/q294_three_sum_zero/code.py
aadhityasw/Competitive-Programs
901a48d35f024a3a87c32a45b7f4531e8004a203
[ "MIT" ]
1
2021-05-15T07:56:51.000Z
2021-05-15T07:56:51.000Z
questions/q294_three_sum_zero/code.py
aadhityasw/Competitive-Programs
901a48d35f024a3a87c32a45b7f4531e8004a203
[ "MIT" ]
null
null
null
# @param A : list of integers # @return a list of list of integers
35.227273
109
0.437419
class Solution: # @param A : list of integers # @return a list of list of integers def threeSum(self, nums): lookup = dict() for num in nums: if not num in lookup: lookup[num] = 0 lookup[num] += 1 #Check 0, 0, 0 condition if 0 ...
1,433
-6
48
13083e6ff3faeb59150c08896ea1c86bf797c8cc
989
py
Python
gui/graps_io/save_view.py
lcford2/graps_gui
a47b598cd746425203e8df1ddf77815e3b1522e9
[ "MIT" ]
null
null
null
gui/graps_io/save_view.py
lcford2/graps_gui
a47b598cd746425203e8df1ddf77815e3b1522e9
[ "MIT" ]
5
2020-07-22T11:51:26.000Z
2022-02-17T20:07:12.000Z
gui/graps_io/save_view.py
lcford2/graps_gui
a47b598cd746425203e8df1ddf77815e3b1522e9
[ "MIT" ]
null
null
null
from __future__ import division from builtins import str from past.utils import old_div from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * import dictionaries as dlg_populate import sys import pickle from IPython import embed as II
30.90625
67
0.637007
from __future__ import division from builtins import str from past.utils import old_div from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * import dictionaries as dlg_populate import sys import pickle from IPython import embed as II def save_view(self, filename): items = list(self.u...
701
0
23
a946bc634840bcb55acab354df78c91be75bf3dc
1,315
py
Python
Cumulative Practice Problems/Date Converter.py
dmitry-izmerov/Udacity-Intro-to-computer-science
534d75d3f0f39e5c28cd0e3789222ad2a4b37a8a
[ "MIT" ]
null
null
null
Cumulative Practice Problems/Date Converter.py
dmitry-izmerov/Udacity-Intro-to-computer-science
534d75d3f0f39e5c28cd0e3789222ad2a4b37a8a
[ "MIT" ]
null
null
null
Cumulative Practice Problems/Date Converter.py
dmitry-izmerov/Udacity-Intro-to-computer-science
534d75d3f0f39e5c28cd0e3789222ad2a4b37a8a
[ "MIT" ]
null
null
null
__author__ = 'demi' # Question 5: Date Converter # Write a procedure date_converter which takes two inputs. The first is # a dictionary and the second a string. The string is a valid date in # the format month/day/year. The procedure should return # the date written in the form <day> <name of month> <year>. # For ex...
29.222222
71
0.663878
__author__ = 'demi' # Question 5: Date Converter # Write a procedure date_converter which takes two inputs. The first is # a dictionary and the second a string. The string is a valid date in # the format month/day/year. The procedure should return # the date written in the form <day> <name of month> <year>. # For ex...
147
0
23