hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
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
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
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
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f72f43ba26b309b9c8f2aba4f79737b3f52bf7d2
931
py
Python
tasks.py
glyph/cryptography
43cf688e885668198bc966b1cf3a4a425a60f1a6
[ "Apache-2.0" ]
null
null
null
tasks.py
glyph/cryptography
43cf688e885668198bc966b1cf3a4a425a60f1a6
[ "Apache-2.0" ]
null
null
null
tasks.py
glyph/cryptography
43cf688e885668198bc966b1cf3a4a425a60f1a6
[ "Apache-2.0" ]
null
null
null
# 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 writing, software # distributed under the...
33.25
72
0.721805
from __future__ import absolute_import, division, print_function import invoke @invoke.task def release(version): invoke.run("git tag -s {0}".format(version)) invoke.run("git push --tags") invoke.run("python setup.py sdist") invoke.run("twine upload -s dist/cryptography-{0}*".format(version))
true
true
f72f446798e695312ccfcdbcfe2f24b2c49bcbdc
47,910
py
Python
desktop/core/ext-py/SQLAlchemy-1.3.17/test/sql/test_defaults.py
yetsun/hue
2e48f0cc70e233ee0e1b40733d4b2a18d8836c66
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
desktop/core/ext-py/SQLAlchemy-1.3.17/test/sql/test_defaults.py
yetsun/hue
2e48f0cc70e233ee0e1b40733d4b2a18d8836c66
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
desktop/core/ext-py/SQLAlchemy-1.3.17/test/sql/test_defaults.py
yetsun/hue
2e48f0cc70e233ee0e1b40733d4b2a18d8836c66
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
import datetime import itertools import sqlalchemy as sa from sqlalchemy import Boolean from sqlalchemy import cast from sqlalchemy import DateTime from sqlalchemy import exc from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import Integer from sqlalchemy import literal from sqlalchemy impo...
30.554847
79
0.501378
import datetime import itertools import sqlalchemy as sa from sqlalchemy import Boolean from sqlalchemy import cast from sqlalchemy import DateTime from sqlalchemy import exc from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import Integer from sqlalchemy import literal from sqlalchemy impo...
true
true
f72f453170f50aa25b6ab839bd6aa24c9b63bd4a
2,169
py
Python
pkgInfo.py
smanschi/Rcs
a54980a44c7fb0e925b091cd3c29297e940af39c
[ "BSD-4-Clause" ]
null
null
null
pkgInfo.py
smanschi/Rcs
a54980a44c7fb0e925b091cd3c29297e940af39c
[ "BSD-4-Clause" ]
null
null
null
pkgInfo.py
smanschi/Rcs
a54980a44c7fb0e925b091cd3c29297e940af39c
[ "BSD-4-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (c) 2020, Honda Research Institute Europe GmbH. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the abo...
40.924528
100
0.717842
name = "Rcs" version = "1.0" category="Libraries" sqLevel = "basic" sqOptOutRules = [ 'GEN04', 'C02', 'C06' ] sqComments = { 'GEN04': 'Copyright header with BSD license not recognized by quality checker', 'C02': 'Link guards not to be used in Cpp headers ', 'C06':...
true
true
f72f454dc859e851e69564b7be10690a0e9e6c87
154
py
Python
opencyb/filestorage/apps.py
Open-Cybernetics/opencyb-site
c79d61ed2d508edf304dee92d93dfbc101188c0f
[ "BSD-3-Clause" ]
3
2021-07-05T15:29:42.000Z
2021-07-22T13:11:06.000Z
opencyb/filestorage/apps.py
open-cyb/website
c79d61ed2d508edf304dee92d93dfbc101188c0f
[ "BSD-3-Clause" ]
null
null
null
opencyb/filestorage/apps.py
open-cyb/website
c79d61ed2d508edf304dee92d93dfbc101188c0f
[ "BSD-3-Clause" ]
null
null
null
from django.apps import AppConfig class FilestorageConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'filestorage'
22
56
0.772727
from django.apps import AppConfig class FilestorageConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'filestorage'
true
true
f72f45f0aeacc8d7741dbd968eb4854f4f2508c2
1,606
py
Python
tests/task/test_claim.py
asyncee/pycamunda
f4834d224ff99fcf80874efeaedf68a8a2efa926
[ "MIT" ]
null
null
null
tests/task/test_claim.py
asyncee/pycamunda
f4834d224ff99fcf80874efeaedf68a8a2efa926
[ "MIT" ]
null
null
null
tests/task/test_claim.py
asyncee/pycamunda
f4834d224ff99fcf80874efeaedf68a8a2efa926
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import unittest.mock import pytest import pycamunda.task from tests.mock import raise_requests_exception_mock, not_ok_response_mock def test_claim_params(engine_url): claim_task = pycamunda.task.Claim(url=engine_url, id_='anId', user_id='anUserId') assert claim_task.url == engine_u...
32.12
85
0.754047
import unittest.mock import pytest import pycamunda.task from tests.mock import raise_requests_exception_mock, not_ok_response_mock def test_claim_params(engine_url): claim_task = pycamunda.task.Claim(url=engine_url, id_='anId', user_id='anUserId') assert claim_task.url == engine_url + '/task/anId/claim' ...
true
true
f72f47b979d68d0a61e3e6a98a9950c6cfd94e50
9,604
py
Python
qcelemental/util/misc.py
bgpeyton/QCElemental
34c259f0c759e53c2bad9aa0da1126500fe6cf75
[ "BSD-3-Clause" ]
null
null
null
qcelemental/util/misc.py
bgpeyton/QCElemental
34c259f0c759e53c2bad9aa0da1126500fe6cf75
[ "BSD-3-Clause" ]
1
2021-03-05T19:06:09.000Z
2021-03-05T19:06:09.000Z
qcelemental/util/misc.py
Andrew-AbiMansour/QCElemental
2e84cd686d5fff0fc79accb28ffa985de4684704
[ "BSD-3-Clause" ]
null
null
null
import math import re from typing import Dict, List import numpy as np from ..physical_constants import constants def distance_matrix(a: np.ndarray, b: np.ndarray) -> np.ndarray: """Euclidean distance matrix between rows of arrays `a` and `b`. Equivalent to `scipy.spatial.distance.cdist(a, b, 'euclidean')`....
29.919003
126
0.585173
import math import re from typing import Dict, List import numpy as np from ..physical_constants import constants def distance_matrix(a: np.ndarray, b: np.ndarray) -> np.ndarray: assert a.shape[1] == b.shape[1], """Inner dimensions do not match""" distm = np.zeros([a.shape[0], b.shape[0]]) for i in rang...
true
true
f72f47d34b25fb540a99e2e2b836f2ad27836c97
3,066
py
Python
tools/model_converters/regnet2mmdet.py
hyperlist/mmdetection
ba4918de7fb21a96edc373584fa21a17d098a843
[ "Apache-2.0" ]
null
null
null
tools/model_converters/regnet2mmdet.py
hyperlist/mmdetection
ba4918de7fb21a96edc373584fa21a17d098a843
[ "Apache-2.0" ]
null
null
null
tools/model_converters/regnet2mmdet.py
hyperlist/mmdetection
ba4918de7fb21a96edc373584fa21a17d098a843
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import argparse from collections import OrderedDict import paddle def convert_stem(model_key, model_weight, state_dict, converted_names): new_key = model_key.replace('stem.conv', 'conv1') new_key = new_key.replace('stem.bn', 'bn1') state_dict[new_key] = mod...
33.692308
77
0.647097
import argparse from collections import OrderedDict import paddle def convert_stem(model_key, model_weight, state_dict, converted_names): new_key = model_key.replace('stem.conv', 'conv1') new_key = new_key.replace('stem.bn', 'bn1') state_dict[new_key] = model_weight converted_names.add(model_key) ...
true
true
f72f47e775fcad2df9a2fb96e48014dd4b9267f7
1,543
py
Python
src/py_mplus/objects/manga/title/__init__.py
SThomasP/py_mplus
6d9c3075ae10b30a2482f3367f83f58037a04116
[ "MIT" ]
null
null
null
src/py_mplus/objects/manga/title/__init__.py
SThomasP/py_mplus
6d9c3075ae10b30a2482f3367f83f58037a04116
[ "MIT" ]
null
null
null
src/py_mplus/objects/manga/title/__init__.py
SThomasP/py_mplus
6d9c3075ae10b30a2482f3367f83f58037a04116
[ "MIT" ]
null
null
null
from py_mplus.objects import MPObject LANGUAGES = ['ENGLISH', 'SPANISH'] class Title(MPObject): def _decode(self, buffer, category, skip): if category == 1: self.title_id = buffer.uint32() elif category == 2: self.name = buffer.string() elif category == 3: ...
25.716667
63
0.480233
from py_mplus.objects import MPObject LANGUAGES = ['ENGLISH', 'SPANISH'] class Title(MPObject): def _decode(self, buffer, category, skip): if category == 1: self.title_id = buffer.uint32() elif category == 2: self.name = buffer.string() elif category == 3: ...
true
true
f72f487d46b2bfc1cb13b07d80c29f8c53395833
66
py
Python
agents/agent_mct/__init__.py
elena-rae/connect4_bccn_pcp
ffa1c1fbd61a28901d67bdeb33250ae52c35c296
[ "MIT" ]
null
null
null
agents/agent_mct/__init__.py
elena-rae/connect4_bccn_pcp
ffa1c1fbd61a28901d67bdeb33250ae52c35c296
[ "MIT" ]
null
null
null
agents/agent_mct/__init__.py
elena-rae/connect4_bccn_pcp
ffa1c1fbd61a28901d67bdeb33250ae52c35c296
[ "MIT" ]
null
null
null
from .montecarlo import generate_move_montecarlo as generate_move
33
65
0.893939
from .montecarlo import generate_move_montecarlo as generate_move
true
true
f72f48c024608bb44e33fab35985d824af006978
6,490
py
Python
conduit/fair/models/gpd.py
DavidHurst/palbolts
72f9ca3f82499b532f14d0e797426e1b425d3efe
[ "MIT" ]
null
null
null
conduit/fair/models/gpd.py
DavidHurst/palbolts
72f9ca3f82499b532f14d0e797426e1b425d3efe
[ "MIT" ]
null
null
null
conduit/fair/models/gpd.py
DavidHurst/palbolts
72f9ca3f82499b532f14d0e797426e1b425d3efe
[ "MIT" ]
1
2021-09-07T14:55:16.000Z
2021-09-07T14:55:16.000Z
"""Zhang Gradient Projection Debiasing Baseline Model.""" from __future__ import annotations from typing import NamedTuple, cast import ethicml as em from kit import implements from kit.torch import CrossEntropyLoss, TrainingMode import pandas as pd import pytorch_lightning as pl from pytorch_lightning.utilities.types...
35.271739
98
0.643297
from __future__ import annotations from typing import NamedTuple, cast import ethicml as em from kit import implements from kit.torch import CrossEntropyLoss, TrainingMode import pandas as pd import pytorch_lightning as pl from pytorch_lightning.utilities.types import EPOCH_OUTPUT import torch from torch import Tensor...
true
true
f72f4a6eaf811e134acc43e15c1fe1b2c788076f
1,416
py
Python
src/GUI_Elements/Entries.py
cedric-romain/lins
1ccae895a8393b90422ff859a756a2c11ee585b0
[ "MIT" ]
null
null
null
src/GUI_Elements/Entries.py
cedric-romain/lins
1ccae895a8393b90422ff859a756a2c11ee585b0
[ "MIT" ]
null
null
null
src/GUI_Elements/Entries.py
cedric-romain/lins
1ccae895a8393b90422ff859a756a2c11ee585b0
[ "MIT" ]
null
null
null
import tkinter as tk class MyEntry: def __init__(self, root, **kwargs): self.root = root self.value = None self.frame = tk.Frame(self.root) self.frame.pack(anchor="nw") self.kwargs = kwargs self.title_label = tk.Label(self.frame, text=self.parse_title(), anchor='w...
30.782609
94
0.610876
import tkinter as tk class MyEntry: def __init__(self, root, **kwargs): self.root = root self.value = None self.frame = tk.Frame(self.root) self.frame.pack(anchor="nw") self.kwargs = kwargs self.title_label = tk.Label(self.frame, text=self.parse_title(), anchor='w...
true
true
f72f4a775d0236aea7d4fb2265ce24f07fab6865
22,040
py
Python
primary_info.py
Tulioas/dfp_analyser
d66ff94ba0b88a5d421a992ad27661011db36091
[ "MIT" ]
2
2022-02-09T03:27:17.000Z
2022-02-09T03:27:23.000Z
primary_info.py
Tulioas/dfp_analyser
d66ff94ba0b88a5d421a992ad27661011db36091
[ "MIT" ]
null
null
null
primary_info.py
Tulioas/dfp_analyser
d66ff94ba0b88a5d421a992ad27661011db36091
[ "MIT" ]
null
null
null
import pandas as pd from zipfile import ZipFile import numpy as np import re import os def year_identifier(file_name): ''' Abstrait: identify the year of the file ''' folder_regex = re.compile(r'20\d\d') match = folder_regex.search(str(file_name)) year = match.group() return year def d...
46.108787
513
0.614338
import pandas as pd from zipfile import ZipFile import numpy as np import re import os def year_identifier(file_name): folder_regex = re.compile(r'20\d\d') match = folder_regex.search(str(file_name)) year = match.group() return year def debt_correction(dataframe): debt_ident_list = ['Emprésti...
true
true
f72f4aa4e427e9d3ee2d0c986960f64ae8d9cdb5
1,029
py
Python
pyfatfs/__init__.py
abrasive/pyfatfs
a35586bfa2b1d3f8d4638142407db68f9318b86d
[ "MIT" ]
null
null
null
pyfatfs/__init__.py
abrasive/pyfatfs
a35586bfa2b1d3f8d4638142407db68f9318b86d
[ "MIT" ]
null
null
null
pyfatfs/__init__.py
abrasive/pyfatfs
a35586bfa2b1d3f8d4638142407db68f9318b86d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Python FAT filesystem module with :doc:`PyFilesystem2 <pyfilesystem2:index>` \ compatibility. pyfatfs allows interaction with FAT12/16/32 filesystems, either via :doc:`PyFilesystem2 <pyfilesystem2:index>` for file-level abstraction or direct interaction with the filesystem for low-level ac...
27.810811
78
0.696793
__name__ = 'pyfatfs' __author__ = 'Nathan-J. Hirschauer' __author_email__ = 'nathanhi@deepserve.info' __license__ = 'MIT License' from pyfatfs._exceptions import PyFATException FAT_OEM_ENCODING = 'ibm437' FAT_LFN_ENCODING = 'utf-16-le' def _init_check(func): def _wrapper(*args, **kwargs): initialized...
true
true
f72f4ab59584f2bc1d9c3a2887905b90bc8c7022
314
py
Python
fwrap/__init__.py
wilsonify/fwrap
f2e20eb55eaa3de72905e2ef28198da00eebe262
[ "BSD-3-Clause" ]
23
2015-02-25T00:24:15.000Z
2021-09-08T01:35:45.000Z
fwrap/__init__.py
fwrap/fwrap
61a56f2d0050096b4973d88e5f11cfac2ef01a4b
[ "BSD-3-Clause" ]
1
2021-09-08T01:45:02.000Z
2021-09-08T01:45:02.000Z
fwrap/__init__.py
fwrap/fwrap
61a56f2d0050096b4973d88e5f11cfac2ef01a4b
[ "BSD-3-Clause" ]
4
2015-03-22T01:33:39.000Z
2021-09-09T15:25:44.000Z
#------------------------------------------------------------------------------ # Copyright (c) 2010, Kurt W. Smith # All rights reserved. See LICENSE.txt. #------------------------------------------------------------------------------ #!/usr/bin/env python # encoding: utf-8 import os import sys __all__ = []
22.428571
79
0.334395
import os import sys __all__ = []
true
true
f72f4aeb1f0ee56032043a5cf920adea699c69c9
120
py
Python
src/django_website/contact_us/urls.py
jdheinz/project-ordo_ab_chao
4063f93b297bab43cff6ca64fa5ba103f0c75158
[ "MIT" ]
2
2019-09-23T18:42:32.000Z
2019-09-27T00:33:38.000Z
src/django_website/contact_us/urls.py
jdheinz/project-ordo_ab_chao
4063f93b297bab43cff6ca64fa5ba103f0c75158
[ "MIT" ]
6
2021-03-19T03:25:33.000Z
2022-02-10T08:48:14.000Z
src/django_website/contact_us/urls.py
jdheinz/project-ordo_ab_chao
4063f93b297bab43cff6ca64fa5ba103f0c75158
[ "MIT" ]
6
2019-09-23T18:53:41.000Z
2020-02-06T00:20:06.000Z
from django.urls import path from . import views urlpatterns = [ path('', views.contact_page, name='contact'), ]
17.142857
51
0.683333
from django.urls import path from . import views urlpatterns = [ path('', views.contact_page, name='contact'), ]
true
true
f72f4b412f1dfb0ca6e24370f06424fb77c77d93
353
py
Python
pylinkage/output_arch.py
Drumato/pylinkage
2033112c95a15722efcd9271c08fd919df635eae
[ "MIT" ]
null
null
null
pylinkage/output_arch.py
Drumato/pylinkage
2033112c95a15722efcd9271c08fd919df635eae
[ "MIT" ]
null
null
null
pylinkage/output_arch.py
Drumato/pylinkage
2033112c95a15722efcd9271c08fd919df635eae
[ "MIT" ]
null
null
null
import enum class OutputArch(enum.Enum): """Machine architecture""" X86_64 = enum.auto() I386 = enum.auto() NONE = enum.auto() def to_string(self) -> str: if self == OutputArch.X86_64: return "i386:x86-64" elif self == OutputArch.I386: return "i386" ...
20.764706
37
0.543909
import enum class OutputArch(enum.Enum): X86_64 = enum.auto() I386 = enum.auto() NONE = enum.auto() def to_string(self) -> str: if self == OutputArch.X86_64: return "i386:x86-64" elif self == OutputArch.I386: return "i386" else: return "NON...
true
true
f72f4b5ce8a8b8deb81b605df4f7eb7f50221c03
3,678
py
Python
mezzanine/utils/html.py
Cajoline/mezzanine
54260343eec90f8c93e963465c4fdac55f66ec4c
[ "BSD-2-Clause" ]
null
null
null
mezzanine/utils/html.py
Cajoline/mezzanine
54260343eec90f8c93e963465c4fdac55f66ec4c
[ "BSD-2-Clause" ]
null
null
null
mezzanine/utils/html.py
Cajoline/mezzanine
54260343eec90f8c93e963465c4fdac55f66ec4c
[ "BSD-2-Clause" ]
null
null
null
from __future__ import absolute_import, unicode_literals from future.builtins import chr, int, str try: from html.parser import HTMLParser, HTMLParseError from html.entities import name2codepoint except ImportError: # Python 2 from HTMLParser import HTMLParser, HTMLParseError from htmlentitydefs impor...
30.907563
75
0.605492
from __future__ import absolute_import, unicode_literals from future.builtins import chr, int, str try: from html.parser import HTMLParser, HTMLParseError from html.entities import name2codepoint except ImportError: from HTMLParser import HTMLParser, HTMLParseError from htmlentitydefs import name2code...
true
true
f72f4b7f8e1c3322d2100f5a273305db28e010d9
12,114
py
Python
Tweet2Story/text2story/core/annotator.py
LIAAD/Tweet2Story
1340c01bbc68915d51d67973f87325265b71f2dd
[ "MIT" ]
5
2021-07-29T15:53:32.000Z
2022-03-07T02:46:52.000Z
Tweet2Story/text2story/core/annotator.py
LIAAD/Tweet2Story
1340c01bbc68915d51d67973f87325265b71f2dd
[ "MIT" ]
null
null
null
Tweet2Story/text2story/core/annotator.py
LIAAD/Tweet2Story
1340c01bbc68915d51d67973f87325265b71f2dd
[ "MIT" ]
1
2022-01-30T17:46:51.000Z
2022-01-30T17:46:51.000Z
""" package.text2story.core.annotator META-annotator """ from text2story.annotators import ACTOR_EXTRACTION_TOOLS, TIME_EXTRACTION_TOOLS, OBJECTAL_LINKS_RESOLUTION_TOOLS from text2story.annotators import EVENT_EXTRACTION_TOOLS, SEMANTIC_ROLE_LABELLING_TOOLS from text2story.annotators import extract_actors, extract_...
45.541353
237
0.623411
from text2story.annotators import ACTOR_EXTRACTION_TOOLS, TIME_EXTRACTION_TOOLS, OBJECTAL_LINKS_RESOLUTION_TOOLS from text2story.annotators import EVENT_EXTRACTION_TOOLS, SEMANTIC_ROLE_LABELLING_TOOLS from text2story.annotators import extract_actors, extract_times, extract_objectal_links, extract_events from text2stor...
true
true
f72f4b9dc809d48633312a591811a639fb492796
8,934
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_backend_address_pools_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_backend_address_pools_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_backend_address_pools_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
48.291892
218
0.671032
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpR...
true
true
f72f4c43e27a41f58a040e1b5bf6c7a3a262c3ec
745
py
Python
trypython/stdlib/re_/re03.py
devlights/try-python
67d1d26476794da81c8c76662486108ce03f8fb4
[ "MIT" ]
4
2019-10-21T11:42:11.000Z
2020-03-12T16:35:51.000Z
trypython/stdlib/re_/re03.py
devlights/try-python
67d1d26476794da81c8c76662486108ce03f8fb4
[ "MIT" ]
80
2017-02-08T07:55:37.000Z
2021-10-06T06:30:30.000Z
trypython/stdlib/re_/re03.py
devlights/try-python
67d1d26476794da81c8c76662486108ce03f8fb4
[ "MIT" ]
1
2020-03-12T04:37:17.000Z
2020-03-12T04:37:17.000Z
""" 正規表現のサンプルです。 最長一致と最短一致について """ import re from trypython.common.commoncls import SampleBase from trypython.stdlib.re_ import util class Sample(SampleBase): def exec(self): # --------------------------------------------- # 正規表現 (最長一致と最短一致) # # 正規表現はデフォルトで閉包を表すメタキャラクタ「*」は ...
20.135135
55
0.485906
import re from trypython.common.commoncls import SampleBase from trypython.stdlib.re_ import util class Sample(SampleBase): def exec(self): message = 'hello world hello world' pattern = r'h.*d' m = re.match(pattern, message)...
true
true
f72f4dfc280dbab31721c4c7456f8993a0b4131e
142
py
Python
code/abc110_c_03.py
KoyanagiHitoshi/AtCoder
731892543769b5df15254e1f32b756190378d292
[ "MIT" ]
3
2019-08-16T16:55:48.000Z
2021-04-11T10:21:40.000Z
code/abc110_c_03.py
KoyanagiHitoshi/AtCoder
731892543769b5df15254e1f32b756190378d292
[ "MIT" ]
null
null
null
code/abc110_c_03.py
KoyanagiHitoshi/AtCoder
731892543769b5df15254e1f32b756190378d292
[ "MIT" ]
null
null
null
from collections import Counter S=Counter(input()) T=Counter(input()) s=S.values() t=T.values() print("Yes" if sorted(s)==sorted(t) else "No")
23.666667
46
0.704225
from collections import Counter S=Counter(input()) T=Counter(input()) s=S.values() t=T.values() print("Yes" if sorted(s)==sorted(t) else "No")
true
true
f72f4f61c468d6cc2a2a7fa806aa36b41325acaa
4,969
py
Python
readwrite.py
ciakkig/book-snake
a5aa783b31029981cb4e302d6ff213c0ace828ba
[ "MIT" ]
null
null
null
readwrite.py
ciakkig/book-snake
a5aa783b31029981cb4e302d6ff213c0ace828ba
[ "MIT" ]
null
null
null
readwrite.py
ciakkig/book-snake
a5aa783b31029981cb4e302d6ff213c0ace828ba
[ "MIT" ]
null
null
null
### functions for reading from and writing to input files def read_books(books_file='data/input/books.txt'): # reads the file containing the books # ('books.txt' by default) # and returns the list of tuples: # [(author, title), ...] books = [] try: with open(books_file) as file: ...
35.241135
162
0.555041
def read_books(books_file='data/input/books.txt'): books = [] try: with open(books_file) as file: for line in file: line = line.strip() if len(line) != 0: line = line book = line.split(',') ...
true
true
f72f50b7cc2ce56f0c04120d8d35bdd4ff992462
26,731
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/fCoEGIET_template.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
20
2019-05-07T01:59:14.000Z
2022-02-11T05:24:47.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/fCoEGIET_template.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
60
2019-04-03T18:59:35.000Z
2022-02-22T12:05:05.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/fCoEGIET_template.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
13
2019-05-20T10:48:31.000Z
2021-10-06T07:45:44.000Z
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files class FCoEGIET(Base): __slots__ = () _SDM_NAME = 'fCoEGIET' _SDM_ATT_MAP = { 'FcoeHeaderVersion': 'fCoEGIET.header.fcoeHeader.version-1', 'FcoeHeaderReserved': 'fCoEGIET.header.fcoeHeader.reserved-2', '...
39.542899
519
0.669036
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files class FCoEGIET(Base): __slots__ = () _SDM_NAME = 'fCoEGIET' _SDM_ATT_MAP = { 'FcoeHeaderVersion': 'fCoEGIET.header.fcoeHeader.version-1', 'FcoeHeaderReserved': 'fCoEGIET.header.fcoeHeader.reserved-2', '...
true
true
f72f50c81d90829c24e33e5d2edfbdaff1582b9e
1,241
py
Python
test/core_variables_in_actions.py
sdarwin/build
2c4217ebb6bdeb5001b33a5d0d6718420aef988c
[ "BSL-1.0" ]
215
2015-01-10T17:16:34.000Z
2022-02-23T15:22:08.000Z
test/core_variables_in_actions.py
sdarwin/build
2c4217ebb6bdeb5001b33a5d0d6718420aef988c
[ "BSL-1.0" ]
594
2015-01-22T16:17:55.000Z
2022-02-26T22:11:01.000Z
test/core_variables_in_actions.py
sdarwin/build
2c4217ebb6bdeb5001b33a5d0d6718420aef988c
[ "BSL-1.0" ]
302
2015-02-03T01:20:29.000Z
2022-02-12T07:01:28.000Z
#!/usr/bin/python # Copyright 2012. Jurko Gospodnetic # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE.txt or copy at # https://www.bfgroup.xyz/b2/LICENSE.txt) # Tests that variables in actions get expanded but double quote characters # get treated as regular characters ...
31.025
76
0.724416
import BoostBuild t = BoostBuild.Tester(pass_toolset=0) t.write("file.jam", """\ rule dummy ( i ) { local a = 1 2 3 ; ECHO From "rule:" $(a)" seconds" ; a on $(i) = $(a) ; } actions dummy { echo 'From action: $(a)" seconds"' } dummy all ; """) t.run_build_system(["-ffile.jam", "-d1"]) t.expect_out...
true
true
f72f50dbed30f0bd6003af7d51ecda8a8bc11fb9
2,355
py
Python
setup.py
Anthchirp/pika
55557c9172edb04256a5e49b7faf13078d5a0f66
[ "BSD-3-Clause" ]
2,479
2015-01-01T20:06:23.000Z
2022-03-31T13:29:19.000Z
setup.py
Anthchirp/pika
55557c9172edb04256a5e49b7faf13078d5a0f66
[ "BSD-3-Clause" ]
813
2015-01-07T07:13:49.000Z
2022-03-28T05:05:06.000Z
setup.py
Anthchirp/pika
55557c9172edb04256a5e49b7faf13078d5a0f66
[ "BSD-3-Clause" ]
763
2015-01-10T04:38:33.000Z
2022-03-31T07:24:57.000Z
import setuptools import os # Conditionally include additional modules for docs on_rtd = os.environ.get('READTHEDOCS', None) == 'True' requirements = list() if on_rtd: requirements.append('gevent') requirements.append('tornado') requirements.append('twisted') long_description = ('Pika is a pure-Python imp...
39.915254
78
0.609766
import setuptools import os on_rtd = os.environ.get('READTHEDOCS', None) == 'True' requirements = list() if on_rtd: requirements.append('gevent') requirements.append('tornado') requirements.append('twisted') long_description = ('Pika is a pure-Python implementation of the AMQP 0-9-1 ' ...
true
true
f72f5124f0b9c2a565e817ba853281a8aa8ce924
3,278
py
Python
src/dev/amdgpu/AMDGPU.py
zinob15/gem5
fb2946e314ea9e63c7696ee8023150ed13956582
[ "BSD-3-Clause" ]
19
2018-07-20T15:08:50.000Z
2022-03-26T16:15:59.000Z
src/dev/amdgpu/AMDGPU.py
zinob15/gem5
fb2946e314ea9e63c7696ee8023150ed13956582
[ "BSD-3-Clause" ]
148
2018-07-20T00:58:36.000Z
2021-11-16T01:52:33.000Z
src/dev/amdgpu/AMDGPU.py
zinob15/gem5
fb2946e314ea9e63c7696ee8023150ed13956582
[ "BSD-3-Clause" ]
10
2019-01-10T03:01:30.000Z
2022-01-21T18:36:18.000Z
# Copyright (c) 2021 Advanced Micro Devices, Inc. # All rights reserved. # # For use for simulation and test purposes only # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retai...
43.131579
79
0.744356
from m5.params import * from m5.objects.PciDevice import PciDevice from m5.objects.PciDevice import PciMemBar, PciMemUpperBar, PciLegacyIoBar class AMDGPUDevice(PciDevice): type = 'AMDGPUDevice' cxx_header = "dev/amdgpu/amdgpu_device.hh" cxx_class = 'gem5::AMDGPUDevice' VendorID = 0x1002 Devi...
true
true
f72f51bdd43655bb4de8a16aeea91f20e47a985f
5,576
py
Python
qiskit/circuit/library/blueprintcircuit.py
apcarrik/qiskit-terra
456d036ade0e66f391f8932a944a1dd73d6354dd
[ "Apache-2.0" ]
1
2021-07-06T09:07:47.000Z
2021-07-06T09:07:47.000Z
qiskit/circuit/library/blueprintcircuit.py
evercodes/qiskit-terra
649fec2cd1644c43eabc39b0a588c0a9347a2b50
[ "Apache-2.0" ]
null
null
null
qiskit/circuit/library/blueprintcircuit.py
evercodes/qiskit-terra
649fec2cd1644c43eabc39b0a588c0a9347a2b50
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
32.231214
98
0.638989
from typing import Optional from abc import ABC, abstractmethod from qiskit.circuit import QuantumCircuit from qiskit.circuit.parametertable import ParameterTable, ParameterView class BlueprintCircuit(QuantumCircuit, ABC): def __init__(self, *regs, name: Optional[str] = None) -> None: super().__init__(...
true
true
f72f536f5857554bc8e9d0890cb64eaae718c843
163
py
Python
practice/3_basic_tensorflow/Keras/Example_simpleLinearRegression.py
rabbitsun2/toy_python
32f84b4d15b13c4daa4fa212a40e685abc0d2a5d
[ "Apache-2.0" ]
null
null
null
practice/3_basic_tensorflow/Keras/Example_simpleLinearRegression.py
rabbitsun2/toy_python
32f84b4d15b13c4daa4fa212a40e685abc0d2a5d
[ "Apache-2.0" ]
null
null
null
practice/3_basic_tensorflow/Keras/Example_simpleLinearRegression.py
rabbitsun2/toy_python
32f84b4d15b13c4daa4fa212a40e685abc0d2a5d
[ "Apache-2.0" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt x = np.arange(1, 6) y = 3 * x + 2 print(x) print(y) # 시각화 plt.plot(x, y) plt.title('y = 3x + 2') plt.show()
10.866667
31
0.613497
import numpy as np import matplotlib.pyplot as plt x = np.arange(1, 6) y = 3 * x + 2 print(x) print(y) plt.plot(x, y) plt.title('y = 3x + 2') plt.show()
true
true
f72f5401fcba40741973080a187ab1412d11d4bb
5,623
py
Python
util/config.py
chunbolang/HPA
645971c21519937ecbacf15e674e83e452eb1afc
[ "MIT" ]
3
2021-09-01T13:04:09.000Z
2021-12-19T16:25:01.000Z
util/config.py
chunbolang/HPA
645971c21519937ecbacf15e674e83e452eb1afc
[ "MIT" ]
null
null
null
util/config.py
chunbolang/HPA
645971c21519937ecbacf15e674e83e452eb1afc
[ "MIT" ]
null
null
null
# ----------------------------------------------------------------------------- # Functions for parsing args # ----------------------------------------------------------------------------- import yaml import os from ast import literal_eval import copy class CfgNode(dict): """ CfgNode represents an internal no...
32.316092
88
0.591677
import yaml import os from ast import literal_eval import copy class CfgNode(dict): def __init__(self, init_dict=None, key_list=None, new_allowed=False): init_dict = {} if init_dict is None else init_dict key_list = [] if key_list is None else key_list for k, v in init_dict.items(...
true
true
f72f5537eacc861c1d47288d0342e45f60ac7392
1,053
py
Python
crypto_balancer/order.py
GRTTX/crypto_balancer
a1c862cd6d01065a059664da605f03d972585418
[ "MIT" ]
28
2019-05-13T12:25:43.000Z
2022-03-11T06:57:21.000Z
crypto_balancer/order.py
timff/crypto_balancer
cc5ed85b4f1f7222d6532f8f0ba46dac329bac7b
[ "MIT" ]
5
2019-03-10T15:39:34.000Z
2021-06-13T05:39:14.000Z
crypto_balancer/order.py
timff/crypto_balancer
cc5ed85b4f1f7222d6532f8f0ba46dac329bac7b
[ "MIT" ]
17
2019-03-10T15:14:20.000Z
2022-03-11T06:57:06.000Z
class Order(): def __init__(self, pair, direction, amount, price): if direction.upper() not in ['BUY', 'SELL']: raise ValueError("{} is not a valid direction".format(direction)) self.pair = pair self.direction = direction self.amount = float(amount) self.price = f...
35.1
87
0.60019
class Order(): def __init__(self, pair, direction, amount, price): if direction.upper() not in ['BUY', 'SELL']: raise ValueError("{} is not a valid direction".format(direction)) self.pair = pair self.direction = direction self.amount = float(amount) self.price = f...
true
true
f72f55f3741f5c542c00c1b9f62273c35e1f6038
1,864
py
Python
get_swa_model.py
Mr-GJ/PaddleDetection
5fc2ce62d9b8f0bcc3d1c436b502d0371dec2a35
[ "Apache-2.0" ]
null
null
null
get_swa_model.py
Mr-GJ/PaddleDetection
5fc2ce62d9b8f0bcc3d1c436b502d0371dec2a35
[ "Apache-2.0" ]
null
null
null
get_swa_model.py
Mr-GJ/PaddleDetection
5fc2ce62d9b8f0bcc3d1c436b502d0371dec2a35
[ "Apache-2.0" ]
null
null
null
import os from argparse import ArgumentParser import paddle def main(): parser = ArgumentParser() parser.add_argument( '--model_dir', help='the directory where checkpoints are saved',default="output/swa_test") parser.add_argument( '--starting_model_id', default=0, type=int...
31.066667
98
0.636266
import os from argparse import ArgumentParser import paddle def main(): parser = ArgumentParser() parser.add_argument( '--model_dir', help='the directory where checkpoints are saved',default="output/swa_test") parser.add_argument( '--starting_model_id', default=0, type=int...
true
true
f72f56c346bc5ea495160905b6c7b1cd1bad0d4b
4,664
py
Python
pysnmp-with-texts/COSINE-GLOBAL-REG.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/COSINE-GLOBAL-REG.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/COSINE-GLOBAL-REG.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module COSINE-GLOBAL-REG (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/COSINE-GLOBAL-REG # Produced by pysmi-0.3.4 at Wed May 1 12:27:00 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
86.37037
505
0.78066
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint = mibBuilder.impo...
true
true
f72f580eceb7de94295ce579304c454df2d18703
640
py
Python
printto/management/commands/cleanprinteddocs.py
starofrainnight/vswprinter
b88591c44da545913a5a238bf4b8cd30bb1eeac8
[ "Apache-2.0" ]
null
null
null
printto/management/commands/cleanprinteddocs.py
starofrainnight/vswprinter
b88591c44da545913a5a238bf4b8cd30bb1eeac8
[ "Apache-2.0" ]
null
null
null
printto/management/commands/cleanprinteddocs.py
starofrainnight/vswprinter
b88591c44da545913a5a238bf4b8cd30bb1eeac8
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import os import arrow from django.core.management.base import BaseCommand from printto.models import UploadedFileModel class Command(BaseCommand): help = 'Clean all printed docs after 3 minutes' def handle(self, *args, **options): now_time = arrow.now() now_time = no...
24.615385
73
0.621875
import os import arrow from django.core.management.base import BaseCommand from printto.models import UploadedFileModel class Command(BaseCommand): help = 'Clean all printed docs after 3 minutes' def handle(self, *args, **options): now_time = arrow.now() now_time = now_time.shift(minutes=-3)...
true
true
f72f594f8368ca86790fb4ec321791290b22fa4b
7,735
py
Python
deepspeed/runtime/zero/linear.py
manuelciosici/DeepSpeed
3da841853ca07abf3a09e7bd325a576c4e642c11
[ "MIT" ]
null
null
null
deepspeed/runtime/zero/linear.py
manuelciosici/DeepSpeed
3da841853ca07abf3a09e7bd325a576c4e642c11
[ "MIT" ]
null
null
null
deepspeed/runtime/zero/linear.py
manuelciosici/DeepSpeed
3da841853ca07abf3a09e7bd325a576c4e642c11
[ "MIT" ]
null
null
null
#Linear Module to use with ZeRO Stage 3 to allow for parameter memory release #after the module execution during forward #Instead of saving variables using save_for_backward, we save variable ids #Allowing us to retrieve the variable without creating pointer to it #Which allows for underlying tensor to be garbage colle...
41.363636
162
0.644473
import math import torch from torch import Tensor from torch.nn.parameter import Parameter from torch.nn import init from torch.nn.modules.module import Module from deepspeed.runtime.utils import noop_decorator tensor_map = {} def print_rank_0(message, debug=False, force=False): if torch.distributed.get_rank()...
true
true
f72f59c3cfb5739da698e3f5202cc2b3d8fead0a
3,006
py
Python
utilities/modify_torsions.py
slochower/host-guest-benchmarks
c398b499fe6dbae39523278946c0e25eb78d6d66
[ "MIT" ]
null
null
null
utilities/modify_torsions.py
slochower/host-guest-benchmarks
c398b499fe6dbae39523278946c0e25eb78d6d66
[ "MIT" ]
8
2019-07-05T17:55:27.000Z
2022-03-21T18:59:50.000Z
utilities/modify_torsions.py
slochower/host-guest-benchmarks
c398b499fe6dbae39523278946c0e25eb78d6d66
[ "MIT" ]
1
2020-05-05T22:51:21.000Z
2020-05-05T22:51:21.000Z
from openforcefield.typing.engines import smirnoff from simtk import unit force_field = smirnoff.ForceField('smirnoff99Frosst_experimental.offxml') # t9 # [#1:1]-[#6X4:2]-[#6X4:3]-[#8X2:4] # H1-C1-C2-O2 # GAFF v2.1 # k = 0.16 per = 3 # SMIRNOFF99Frosst # k = 0.25 per = 1 # k = 0.00 per = 3 # # < Prope...
27.081081
115
0.627412
from openforcefield.typing.engines import smirnoff from simtk import unit force_field = smirnoff.ForceField('smirnoff99Frosst_experimental.offxml') parameter = force_field.get_parameter_handler('ProperTorsions').parameters["[#1:1]-[#6X4:2]-[#6X4:3]-[#8X2:4]"] assert(parameter.k[0] == 0.0 * unit.kilocalorie_per_mole...
true
true
f72f59f6d7bf39d04bcaac65bd6d4197dac899ac
2,250
py
Python
sourcecode/VaspTestKPOINT.py
yizhiwoniu/VaspCZ
44b890cf18d649c428c21e3f8fadc3222453d84d
[ "MIT" ]
1
2021-01-10T04:01:57.000Z
2021-01-10T04:01:57.000Z
sourcecode/VaspTestKPOINT.py
yizhiwoniu/VaspCZ
44b890cf18d649c428c21e3f8fadc3222453d84d
[ "MIT" ]
null
null
null
sourcecode/VaspTestKPOINT.py
yizhiwoniu/VaspCZ
44b890cf18d649c428c21e3f8fadc3222453d84d
[ "MIT" ]
null
null
null
#!/home/zhangzhengde/bin/bin/python3 #coding=utf-8 import os import argparse import VaspCZ.zzdlib as zzd def modify_vasp_sh(jobname, nodes, ppn): with open('./Vasp.sh', 'r') as f: data = f.readlines() new_data = [] for line in data: if ' #PBS -N' in line: new_data.append(f' #PBS -N {jobname}\n') elif ' #P...
29.605263
114
0.643556
import os import argparse import VaspCZ.zzdlib as zzd def modify_vasp_sh(jobname, nodes, ppn): with open('./Vasp.sh', 'r') as f: data = f.readlines() new_data = [] for line in data: if ' #PBS -N' in line: new_data.append(f' #PBS -N {jobname}\n') elif ' #PBS -l nodes' in line: new_data.append(f' #PBS -l...
true
true
f72f5a8790c8b9fe823eb02d854fed6e481d1477
4,519
py
Python
sciencebeam_gym/convert/grobid/grobid_xml_enhancer.py
elifesciences/sciencebeam-gym
3ad654e08775e0c0cdd256753e14093bb5a42d44
[ "MIT" ]
25
2017-07-25T12:44:55.000Z
2020-09-30T22:16:50.000Z
sciencebeam_gym/convert/grobid/grobid_xml_enhancer.py
elifesciences/sciencebeam-gym
3ad654e08775e0c0cdd256753e14093bb5a42d44
[ "MIT" ]
192
2017-11-29T08:57:03.000Z
2022-03-29T18:44:41.000Z
sciencebeam_gym/convert/grobid/grobid_xml_enhancer.py
elifesciences/sciencebeam-gym
3ad654e08775e0c0cdd256753e14093bb5a42d44
[ "MIT" ]
6
2019-02-01T18:49:33.000Z
2020-07-26T08:18:46.000Z
import logging from io import BytesIO from lxml import etree from lxml.builder import E from sciencebeam_gym.inference_model.extract_to_xml import ( XmlPaths, create_node_recursive, rsplit_xml_path ) from .grobid_service import ( grobid_service, GrobidApiPaths ) TEI_NS = 'http://www.tei-c.org/ns...
39.295652
96
0.614516
import logging from io import BytesIO from lxml import etree from lxml.builder import E from sciencebeam_gym.inference_model.extract_to_xml import ( XmlPaths, create_node_recursive, rsplit_xml_path ) from .grobid_service import ( grobid_service, GrobidApiPaths ) TEI_NS = 'http://www.tei-c.org/ns...
true
true
f72f5ada789609c9da8c75cf0cc91f4f7569b058
19,098
py
Python
python/test/function/refs.py
daniel-falk/nnabla
3fe132ea52dc10521cc029a5d6ba8f565cf65ccf
[ "Apache-2.0" ]
2,792
2017-06-26T13:05:44.000Z
2022-03-28T07:55:26.000Z
python/test/function/refs.py
daniel-falk/nnabla
3fe132ea52dc10521cc029a5d6ba8f565cf65ccf
[ "Apache-2.0" ]
138
2017-06-27T07:04:44.000Z
2022-02-28T01:37:15.000Z
python/test/function/refs.py
daniel-falk/nnabla
3fe132ea52dc10521cc029a5d6ba8f565cf65ccf
[ "Apache-2.0" ]
380
2017-06-26T13:23:52.000Z
2022-03-25T16:51:30.000Z
# Copyright 2017,2018,2019,2020,2021 Sony Corporation. # # 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...
37.817822
120
0.48869
from __future__ import division from six.moves import range import itertools import numpy as np def get_conv_out_size(w, k, p, s, d=1): return (w + 2 * p - (d * (k - 1) + 1)) // s + 1 def get_deconv_out_size(w, k, p, s, d): return s * (w - 1) - 2 * p + (d * (k - 1) + 1) def get_pool_out_size(w, k, p, s,...
true
true
f72f5b0f93cd1cae45d411cdbf0b9862569cbd4a
14,421
py
Python
models/wc3.py
prannayk/MSRASI17
f7277d90ffdd062c1ba94391b7f82c621e619743
[ "MIT" ]
null
null
null
models/wc3.py
prannayk/MSRASI17
f7277d90ffdd062c1ba94391b7f82c621e619743
[ "MIT" ]
null
null
null
models/wc3.py
prannayk/MSRASI17
f7277d90ffdd062c1ba94391b7f82c621e619743
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import operator import collections import math import time import os import random import zipfile import time import numpy as np import sys from six.moves import urllib from six.moves import xrange # pylint: di...
60.592437
434
0.776437
from __future__ import absolute_import from __future__ import division from __future__ import print_function import operator import collections import math import time import os import random import zipfile import time import numpy as np import sys from six.moves import urllib from six.moves import xrange import tenso...
true
true
f72f5be70b1693d04dec3b426552809513564ddf
1,188
py
Python
Python-Basic/open-data.py
dicksonlam1011/python-training
ea43cae118081e607f7767c165eeda64b2a64d77
[ "MIT" ]
null
null
null
Python-Basic/open-data.py
dicksonlam1011/python-training
ea43cae118081e607f7767c165eeda64b2a64d77
[ "MIT" ]
null
null
null
Python-Basic/open-data.py
dicksonlam1011/python-training
ea43cae118081e607f7767c165eeda64b2a64d77
[ "MIT" ]
null
null
null
# Connect to the internet (webpage) import urllib.request as request import json ########################################################################################## # Set Proxy for Urllib proxy="https://llm234:85167787887Ss!@proxy.ha.org.hk:8080" proxy_support=request.ProxyHandler({'https':proxy}) # Build Prox...
39.6
94
0.608586
import urllib.request as request import json proxy="https://llm234:85167787887Ss!@proxy.ha.org.hk:8080" proxy_support=request.ProxyHandler({'https':proxy}) opener = request.build_opener(proxy_support) request.install_opener(opener) src="https://geodata.gov.hk/gs/api/v1.0.0/locationSearch?q=cultural%20centre" with r...
true
true
f72f5c5da9321919ee315fed0547bbb36ffd0ef4
1,569
py
Python
devind_helpers/utils.py
devind-team/devind-django-helpers
5c64d46a12802bbe0b70e44aa9d19bf975511b6e
[ "MIT" ]
null
null
null
devind_helpers/utils.py
devind-team/devind-django-helpers
5c64d46a12802bbe0b70e44aa9d19bf975511b6e
[ "MIT" ]
4
2022-02-18T09:24:05.000Z
2022-03-31T16:46:29.000Z
devind_helpers/utils.py
devind-team/devind-django-helpers
5c64d46a12802bbe0b70e44aa9d19bf975511b6e
[ "MIT" ]
null
null
null
"""Модуль со вспомогательными функциями.""" from argparse import ArgumentTypeError from random import choice from string import ascii_letters from typing import Optional, Tuple, Union from graphql_relay import from_global_id def gid2int(gid: Union[str, int]) -> Optional[int]: try: return int(gid) ex...
27.051724
86
0.643722
from argparse import ArgumentTypeError from random import choice from string import ascii_letters from typing import Optional, Tuple, Union from graphql_relay import from_global_id def gid2int(gid: Union[str, int]) -> Optional[int]: try: return int(gid) except ValueError: try: re...
true
true
f72f5d5830c20fa73cabbf8a7fe2538bbbde66c2
1,208
py
Python
src/tests/base/__init__.py
abrock/pretix
cd9c048458afce1198276e5936bf583578855a4f
[ "ECL-2.0", "Apache-2.0" ]
1
2021-06-23T07:44:54.000Z
2021-06-23T07:44:54.000Z
src/tests/base/__init__.py
awg24/pretix
b1d67a48601838bac0d4e498cbe8bdcd16013d60
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/tests/base/__init__.py
awg24/pretix
b1d67a48601838bac0d4e498cbe8bdcd16013d60
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import os import sys import time from django.conf import settings from django.contrib.staticfiles.testing import StaticLiveServerTestCase from selenium import webdriver # could use Chrome, Firefox, etc... here BROWSER = os.environ.get('TEST_BROWSER', 'PhantomJS') class BrowserTest(StaticLiveServerTestCase): de...
28.761905
74
0.653974
import os import sys import time from django.conf import settings from django.contrib.staticfiles.testing import StaticLiveServerTestCase from selenium import webdriver BROWSER = os.environ.get('TEST_BROWSER', 'PhantomJS') class BrowserTest(StaticLiveServerTestCase): def __init__(self, *args, **kwargs): ...
true
true
f72f5da82bf29e795a9aadab84dc4c93b8d191f1
3,776
py
Python
pyro/distributions/relaxed_straight_through.py
ruohoruotsi/pyro
b54a4b42b9474eb3ecee11505e45fde85b1cdc54
[ "MIT" ]
null
null
null
pyro/distributions/relaxed_straight_through.py
ruohoruotsi/pyro
b54a4b42b9474eb3ecee11505e45fde85b1cdc54
[ "MIT" ]
null
null
null
pyro/distributions/relaxed_straight_through.py
ruohoruotsi/pyro
b54a4b42b9474eb3ecee11505e45fde85b1cdc54
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function import torch from pyro.distributions.torch import RelaxedOneHotCategorical, RelaxedBernoulli from pyro.distributions.util import copy_docs_from from torch.distributions.utils import clamp_probs @copy_docs_from(RelaxedOneHotCategorical) class RelaxedOn...
37.386139
96
0.736229
from __future__ import absolute_import, division, print_function import torch from pyro.distributions.torch import RelaxedOneHotCategorical, RelaxedBernoulli from pyro.distributions.util import copy_docs_from from torch.distributions.utils import clamp_probs @copy_docs_from(RelaxedOneHotCategorical) class RelaxedOn...
true
true
f72f5f8cda52fd057ea9bad187ca38a2d6bf5f2a
1,783
py
Python
compsocsite/appauth/urls.py
ReedyChen/opra
86ce88c7219d92e321cd9aa3d0bc2bf631e4b90f
[ "MIT" ]
8
2017-03-07T19:46:51.000Z
2021-06-01T01:41:37.000Z
compsocsite/appauth/urls.py
ReedyChen/opra
86ce88c7219d92e321cd9aa3d0bc2bf631e4b90f
[ "MIT" ]
null
null
null
compsocsite/appauth/urls.py
ReedyChen/opra
86ce88c7219d92e321cd9aa3d0bc2bf631e4b90f
[ "MIT" ]
9
2016-06-09T03:36:20.000Z
2019-09-11T20:56:23.000Z
from django.conf.urls import url #import cas.middleware from . import views app_name = 'appauth' urlpatterns = [ url(r'^register/$', views.register, name='register'), url(r'^login/$', views.user_login, name='login'), url(r'^login/forgetpassword/$', views.forgetPassword, name='forgetpassword'), url(r'^...
61.482759
106
0.693214
from django.conf.urls import url from . import views app_name = 'appauth' urlpatterns = [ url(r'^register/$', views.register, name='register'), url(r'^login/$', views.user_login, name='login'), url(r'^login/forgetpassword/$', views.forgetPassword, name='forgetpassword'), url(r'^login/forgetpasswordvie...
true
true
f72f5ffdbac0e1ccb48e304d2117456cfe4a1190
1,709
py
Python
app/core/migrations/0001_initial.py
rahulnegi20/recipie-api
9e99d3c6803fe87cb64eae6980e9e0817f643f5f
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
rahulnegi20/recipie-api
9e99d3c6803fe87cb64eae6980e9e0817f643f5f
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
rahulnegi20/recipie-api
9e99d3c6803fe87cb64eae6980e9e0817f643f5f
[ "MIT" ]
null
null
null
# Generated by Django 2.1.15 on 2021-04-08 16:02 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] operations = [ migrations.CreateModel( name='User', ...
50.264706
266
0.63897
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] operations = [ migrations.CreateModel( name='User', fields=[ ('id', models.Aut...
true
true
f72f6072b1970e61514fd8c68fbcfd4ee3ad6383
479
py
Python
data/scripts/templates/object/draft_schematic/space/weapon/missile/shared_countermeasure_decoy_launcher.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/draft_schematic/space/weapon/missile/shared_countermeasure_decoy_launcher.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/draft_schematic/space/weapon/missile/shared_countermeasure_decoy_launcher.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/space/weapon/missile/shared_countermeasure_decoy_launcher.i...
28.176471
105
0.741127
from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/space/weapon/missile/shared_countermeasure_decoy_launcher.iff" result.attribute_template_id = -1 result.stfName("string_id_table","") return result
true
true
f72f6097ff6b8bf50e05a8eb8b55115b810bdf61
2,663
py
Python
flash/__init__.py
ibraheemmmoosa/lightning-flash
c60fef81b27174543d7ad3a4d841faf71ad8536c
[ "Apache-2.0" ]
2
2021-06-25T08:42:36.000Z
2021-06-25T08:49:29.000Z
flash/__init__.py
edenlightning/lightning-flash
841986aa0081bdeaf785d1ed4c48dd108fa69a78
[ "Apache-2.0" ]
null
null
null
flash/__init__.py
edenlightning/lightning-flash
841986aa0081bdeaf785d1ed4c48dd108fa69a78
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # 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 i...
43.655738
119
0.763049
import os __version__ = "0.1.1" __author__ = "PyTorchLightning et al." __author_email__ = "name@pytorchlightning.ai" __license__ = 'Apache-2.0' __copyright__ = f"Copyright (c) 2020-2021, f{__author__}." __homepage__ = "https://github.com/PyTorchLightning/lightning-flash" __docs__ = "Flash is a framework for fast proto...
true
true
f72f61d6f01b861b890955c4432bbf116ba0dd95
85
py
Python
torchio/transforms/augmentation/__init__.py
siahuat0727/torchio
fc33ea9bd21dc60ba6c5fed46ca96ef63cae2179
[ "Apache-2.0" ]
1,340
2019-12-03T20:53:17.000Z
2022-03-30T08:47:54.000Z
torchio/transforms/augmentation/__init__.py
siahuat0727/torchio
fc33ea9bd21dc60ba6c5fed46ca96ef63cae2179
[ "Apache-2.0" ]
532
2019-12-06T10:37:55.000Z
2022-03-29T10:14:34.000Z
torchio/transforms/augmentation/__init__.py
siahuat0727/torchio
fc33ea9bd21dc60ba6c5fed46ca96ef63cae2179
[ "Apache-2.0" ]
193
2019-12-05T10:21:13.000Z
2022-03-15T22:44:26.000Z
from .random_transform import RandomTransform __all__ = [ 'RandomTransform', ]
12.142857
45
0.741176
from .random_transform import RandomTransform __all__ = [ 'RandomTransform', ]
true
true
f72f61f695ce68f2683e7c2c27eca4c02c50be0a
1,920
py
Python
make-test.py
todorokit/tensorflow_cnn_image_sample
5f8dee00eebcbada9e03de7742026b2a37963860
[ "Apache-1.1" ]
null
null
null
make-test.py
todorokit/tensorflow_cnn_image_sample
5f8dee00eebcbada9e03de7742026b2a37963860
[ "Apache-1.1" ]
null
null
null
make-test.py
todorokit/tensorflow_cnn_image_sample
5f8dee00eebcbada9e03de7742026b2a37963860
[ "Apache-1.1" ]
null
null
null
# -*- coding: utf-8 -*- import os import sys import random sourceDir = '/data/deresute-face' trFile = 'train.txt' teFile = 'test.txt' mapFile = 'config/classes.py' if len(sys.argv) != 3: print ("usage %s trainNum testNum" % (sys.argv[0])) exit() datanum = int(sys.argv[1]) testnum = int(sys.argv[2]) def lis...
20.869565
57
0.563021
import os import sys import random sourceDir = '/data/deresute-face' trFile = 'train.txt' teFile = 'test.txt' mapFile = 'config/classes.py' if len(sys.argv) != 3: print ("usage %s trainNum testNum" % (sys.argv[0])) exit() datanum = int(sys.argv[1]) testnum = int(sys.argv[2]) def listClass(dir): ret = [...
true
true
f72f62ec9ae934fb7e5b8a0c424979616160c47e
3,343
py
Python
src/oci/devops/models/compute_instance_group_failure_policy_by_count.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/devops/models/compute_instance_group_failure_policy_by_count.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/devops/models/compute_instance_group_failure_policy_by_count.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
41.271605
245
0.718516
from .compute_instance_group_failure_policy import ComputeInstanceGroupFailurePolicy from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class ComputeInstanceGroupFailurePolicyByCount(Compu...
true
true
f72f6465f3130c96ec06ef148837cd9b01ea7937
9,957
py
Python
app/recipe/tests/test_recipe_api.py
catzzz/recipe-app-api
4da3bcc40da44cf2afa36a7ccf149f2a5f713292
[ "MIT" ]
null
null
null
app/recipe/tests/test_recipe_api.py
catzzz/recipe-app-api
4da3bcc40da44cf2afa36a7ccf149f2a5f713292
[ "MIT" ]
null
null
null
app/recipe/tests/test_recipe_api.py
catzzz/recipe-app-api
4da3bcc40da44cf2afa36a7ccf149f2a5f713292
[ "MIT" ]
null
null
null
import tempfile import os from PIL import Image from django.contrib.auth import get_user_model from django.test import TestCase from django.urls import reverse from rest_framework import status from rest_framework.test import APIClient from core.models import Recipe, Tag, Ingredient from recipe.serializers import ...
34.814685
78
0.645676
import tempfile import os from PIL import Image from django.contrib.auth import get_user_model from django.test import TestCase from django.urls import reverse from rest_framework import status from rest_framework.test import APIClient from core.models import Recipe, Tag, Ingredient from recipe.serializers import ...
true
true
f72f65029479ff22dec38237529146bb2d013655
6,561
py
Python
ltr/dataset/lasot.py
tsingqguo/ABA
c32edbbe5705b0332a08951b5ee436b5f58c2e70
[ "MIT" ]
12
2021-07-27T07:18:24.000Z
2022-03-09T13:52:20.000Z
ltr/dataset/lasot.py
tsingqguo/ABA
c32edbbe5705b0332a08951b5ee436b5f58c2e70
[ "MIT" ]
2
2021-08-03T09:21:33.000Z
2021-12-29T14:25:30.000Z
ltr/dataset/lasot.py
tsingqguo/ABA
c32edbbe5705b0332a08951b5ee436b5f58c2e70
[ "MIT" ]
3
2021-11-18T14:46:40.000Z
2022-01-03T15:47:23.000Z
import os import os.path import torch import numpy as np import pandas import csv import random from collections import OrderedDict from .base_video_dataset import BaseVideoDataset from ltr.data.image_loader import jpeg4py_loader from ltr.admin.environment import env_settings class Lasot(BaseVideoDataset): """ La...
38.822485
130
0.63405
import os import os.path import torch import numpy as np import pandas import csv import random from collections import OrderedDict from .base_video_dataset import BaseVideoDataset from ltr.data.image_loader import jpeg4py_loader from ltr.admin.environment import env_settings class Lasot(BaseVideoDataset): def _...
true
true
f72f653e32796b549710c1e842206983ea462fda
30,603
py
Python
model-optimizer/mo/middle/passes/fusing/decomposition_test.py
anton-potapov/openvino
84119afe9a8c965e0a0cd920fff53aee67b05108
[ "Apache-2.0" ]
1
2020-06-21T09:51:42.000Z
2020-06-21T09:51:42.000Z
model-optimizer/mo/middle/passes/fusing/decomposition_test.py
anton-potapov/openvino
84119afe9a8c965e0a0cd920fff53aee67b05108
[ "Apache-2.0" ]
4
2021-04-01T08:29:48.000Z
2021-08-30T16:12:52.000Z
model-optimizer/mo/middle/passes/fusing/decomposition_test.py
anton-potapov/openvino
84119afe9a8c965e0a0cd920fff53aee67b05108
[ "Apache-2.0" ]
3
2021-03-09T08:27:29.000Z
2021-04-07T04:58:54.000Z
""" Copyright (C) 2018-2020 Intel Corporation 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 i...
59.30814
119
0.424109
import unittest import numpy as np from mo.middle.passes.fusing.decomposition import convert_scale_shift_to_mul_add, convert_batch_norm from mo.utils.ir_engine.compare_graphs import compare_graphs from mo.utils.unittest.graph import build_graph nodes_attributes = { 'placeholder_1': {'shape': None, 'type': 'Para...
true
true
f72f6568dca744bd5665beedd6e8518fdef41379
417
py
Python
shopping_mall_server/wsgi.py
ninemilli-song/shopping-mall-server
140fbcba2afbab59eda6ca95da59a5ba6945beb4
[ "MIT" ]
null
null
null
shopping_mall_server/wsgi.py
ninemilli-song/shopping-mall-server
140fbcba2afbab59eda6ca95da59a5ba6945beb4
[ "MIT" ]
2
2019-02-12T02:06:53.000Z
2019-02-12T04:10:10.000Z
shopping_mall_server/wsgi.py
ninemilli-song/shopping-mall-server
140fbcba2afbab59eda6ca95da59a5ba6945beb4
[ "MIT" ]
null
null
null
""" WSGI config for shopping_mall_server project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault(...
24.529412
80
0.798561
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'shopping_mall_server.settings') application = get_wsgi_application()
true
true
f72f66a98c1753c49fed08e7baf30b625045fe66
6,505
py
Python
tests/conftest.py
omstrumpf/redis-py
a890532cbb93a85f6ae0bc23e014e6749d39b43b
[ "MIT" ]
null
null
null
tests/conftest.py
omstrumpf/redis-py
a890532cbb93a85f6ae0bc23e014e6749d39b43b
[ "MIT" ]
null
null
null
tests/conftest.py
omstrumpf/redis-py
a890532cbb93a85f6ae0bc23e014e6749d39b43b
[ "MIT" ]
null
null
null
import pytest import redis from mock import Mock from distutils.version import StrictVersion REDIS_INFO = {} default_redis_host = "localhost" default_redis_port = "6379" default_cluster_master_host = "127.0.0.1" default_cluster_master_port = "6379" def pytest_addoption(parser): parser.addoption('--redis-host',...
35.353261
78
0.654112
import pytest import redis from mock import Mock from distutils.version import StrictVersion REDIS_INFO = {} default_redis_host = "localhost" default_redis_port = "6379" default_cluster_master_host = "127.0.0.1" default_cluster_master_port = "6379" def pytest_addoption(parser): parser.addoption('--redis-host',...
true
true
f72f66ea355573925b4529312b9cec90130e327d
9,984
py
Python
recipes/recipe_modules/bot_update/examples/full.py
xing133/webrtc_depot_tools
ddcba7ca3c7f0432aee6bd9740c21f785c32a982
[ "BSD-3-Clause" ]
1
2021-11-22T05:43:42.000Z
2021-11-22T05:43:42.000Z
recipes/recipe_modules/bot_update/examples/full.py
xing133/webrtc_depot_tools
ddcba7ca3c7f0432aee6bd9740c21f785c32a982
[ "BSD-3-Clause" ]
null
null
null
recipes/recipe_modules/bot_update/examples/full.py
xing133/webrtc_depot_tools
ddcba7ca3c7f0432aee6bd9740c21f785c32a982
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. DEPS = [ 'bot_update', 'gclient', 'gerrit', 'tryserver', 'recipe_engine/buildbucket', 'recipe_engine/json', 'recipe_engine/path', 'recipe_eng...
30.072289
80
0.610176
DEPS = [ 'bot_update', 'gclient', 'gerrit', 'tryserver', 'recipe_engine/buildbucket', 'recipe_engine/json', 'recipe_engine/path', 'recipe_engine/platform', 'recipe_engine/properties', 'recipe_engine/runtime', ] from recipe_engine import types from PB.go.chromium.org.luci.buildbucket.proto.build i...
true
true
f72f675f782fe8125b53198e49770a42ec655291
2,434
py
Python
examples/test_chromedriver.py
tomejorge/SeleniumBase
e3e50bbd80594c52131b0d88ca3e2c2f7692e340
[ "MIT" ]
2,745
2016-07-20T09:13:15.000Z
2022-03-29T15:07:31.000Z
examples/test_chromedriver.py
tomejorge/SeleniumBase
e3e50bbd80594c52131b0d88ca3e2c2f7692e340
[ "MIT" ]
384
2016-07-17T20:45:26.000Z
2022-03-31T22:35:35.000Z
examples/test_chromedriver.py
tomejorge/SeleniumBase
e3e50bbd80594c52131b0d88ca3e2c2f7692e340
[ "MIT" ]
704
2016-07-17T20:47:04.000Z
2022-03-31T04:32:35.000Z
""" This test is only for Chrome! (Verify that your chromedriver is compatible with your version of Chrome.) """ import colorama from seleniumbase import BaseCase class ChromedriverTests(BaseCase): def test_chromedriver_matches_chrome(self): if self.browser != "chrome": print("\n This test is...
42.701754
77
0.601068
import colorama from seleniumbase import BaseCase class ChromedriverTests(BaseCase): def test_chromedriver_matches_chrome(self): if self.browser != "chrome": print("\n This test is only for Chrome!") print(' (Run with: "--browser=chrome")') self.skip("This test is onl...
true
true
f72f6791764c1d39d3340e5dce5ad5a3a904b8e3
1,230
py
Python
tflite-onnx/onnx_tflite/tflite/ArgMinOptions.py
jwj04ok/ONNX_Convertor
067a17e16dfc8aa80e36f44c4523959daf7359f5
[ "MIT" ]
193
2017-12-20T16:46:20.000Z
2022-03-29T07:40:54.000Z
tinyengine/tflite/ArgMinOptions.py
liuyy3364/mcunet
f53f9e20e8e912bdb111b4c32da75e71e9a59597
[ "Apache-2.0" ]
141
2017-12-21T08:00:20.000Z
2021-06-15T14:53:03.000Z
tinyengine/tflite/ArgMinOptions.py
liuyy3364/mcunet
f53f9e20e8e912bdb111b4c32da75e71e9a59597
[ "Apache-2.0" ]
55
2017-12-22T18:40:13.000Z
2022-01-17T05:43:51.000Z
# automatically generated by the FlatBuffers compiler, do not modify # namespace: tflite import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class ArgMinOptions(object): __slots__ = ['_tab'] @classmethod def GetRootAsArgMinOptions(cls, buf, offset): n = flatbuffers...
33.243243
114
0.717073
import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class ArgMinOptions(object): __slots__ = ['_tab'] @classmethod def GetRootAsArgMinOptions(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = ArgMinOptions() ...
true
true
f72f68b943a4b5db8edb14eb15f9a5472cbdde4a
1,052
py
Python
watchdog_kj_kultura/users/models.py
watchdogpolska/watchdog-kj-kultura
ea1a5c52ef2a174c012cc08eff5fdd7aa3b911b0
[ "MIT" ]
null
null
null
watchdog_kj_kultura/users/models.py
watchdogpolska/watchdog-kj-kultura
ea1a5c52ef2a174c012cc08eff5fdd7aa3b911b0
[ "MIT" ]
138
2016-12-10T19:18:18.000Z
2019-06-10T19:32:40.000Z
watchdog_kj_kultura/users/models.py
watchdogpolska/watchdog-kj-kultura
ea1a5c52ef2a174c012cc08eff5fdd7aa3b911b0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.contrib.auth.models import AbstractUser from django.core.urlresolvers import reverse from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy...
38.962963
100
0.664449
from __future__ import unicode_literals, absolute_import from django.contrib.auth.models import AbstractUser from django.core.urlresolvers import reverse from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ @python_2_unicod...
true
true
f72f69278791826313821144226481332bfd9cf5
14,156
py
Python
pynger/fingerprint/FVC_utilities.py
DottD/pynger
9a24b43a2170234e5059a54ed20329e036260b0a
[ "MIT" ]
1
2021-11-10T16:37:28.000Z
2021-11-10T16:37:28.000Z
pynger/fingerprint/FVC_utilities.py
DottD/pynger
9a24b43a2170234e5059a54ed20329e036260b0a
[ "MIT" ]
null
null
null
pynger/fingerprint/FVC_utilities.py
DottD/pynger
9a24b43a2170234e5059a54ed20329e036260b0a
[ "MIT" ]
null
null
null
import os import re import io import numpy as np import PIL.Image import typing from pynger.types import Image, Mask, Field from pynger.fingerprint.tuning_lro import LROEstimator from pynger.fingerprint.sampling import convert_to_full, subsample from pynger.field.manipulation import polar2cart from pynger.misc import r...
42.383234
258
0.596355
import os import re import io import numpy as np import PIL.Image import typing from pynger.types import Image, Mask, Field from pynger.fingerprint.tuning_lro import LROEstimator from pynger.fingerprint.sampling import convert_to_full, subsample from pynger.field.manipulation import polar2cart from pynger.misc import r...
true
true
f72f69d7416486496c8233c0c189ee6defb0f939
834
py
Python
sketches/automata_00/components.py
heerdyes/raspi-art
2e38c1926b6a6f4c745e0629b193d9c3c15acc22
[ "MIT" ]
1
2021-02-02T12:36:07.000Z
2021-02-02T12:36:07.000Z
sketches/automata_00/components.py
heerdyes/raspi-art
2e38c1926b6a6f4c745e0629b193d9c3c15acc22
[ "MIT" ]
null
null
null
sketches/automata_00/components.py
heerdyes/raspi-art
2e38c1926b6a6f4c745e0629b193d9c3c15acc22
[ "MIT" ]
null
null
null
class FSM: def __init__(self,states,alphabet,transitionmatrix,currstate): self.S=states self.A=alphabet self.TM=transitionmatrix self.currstate=currstate def accept(self,sym): if sym not in self.A: return symi=self.A.index(sym) if self.TM[...
23.828571
85
0.551559
class FSM: def __init__(self,states,alphabet,transitionmatrix,currstate): self.S=states self.A=alphabet self.TM=transitionmatrix self.currstate=currstate def accept(self,sym): if sym not in self.A: return symi=self.A.index(sym) if self.TM[...
true
true
f72f6b94236d1a6cd8a9243530cbeedf5ab82dd6
763
py
Python
yaml/anchors-and-aliases/yaml_same_ids.py
progala/ttl255.com
100ae0e96ab7a9f72d0c18d985de2311a517878f
[ "MIT" ]
32
2018-05-28T13:35:49.000Z
2022-03-05T23:18:32.000Z
yaml/anchors-and-aliases/yaml_same_ids.py
progala/ttl255.com
100ae0e96ab7a9f72d0c18d985de2311a517878f
[ "MIT" ]
1
2021-09-23T23:32:50.000Z
2021-09-23T23:32:50.000Z
yaml/anchors-and-aliases/yaml_same_ids.py
progala/ttl255.com
100ae0e96ab7a9f72d0c18d985de2311a517878f
[ "MIT" ]
18
2019-02-19T22:36:45.000Z
2022-02-12T19:13:35.000Z
# yaml_same_ids.py import yaml interfaces = dict( Ethernet1=dict(description="Uplink to core-1", speed=1000, mtu=9000), Ethernet2=dict(description="Uplink to core-2", speed=1000, mtu=9000), ) prop_vals = ["pim", "ptp", "lldp"] interfaces["Ethernet1"]["properties"] = prop_vals interfaces["Ethernet2"]["proper...
28.259259
83
0.720839
import yaml interfaces = dict( Ethernet1=dict(description="Uplink to core-1", speed=1000, mtu=9000), Ethernet2=dict(description="Uplink to core-2", speed=1000, mtu=9000), ) prop_vals = ["pim", "ptp", "lldp"] interfaces["Ethernet1"]["properties"] = prop_vals interfaces["Ethernet2"]["properties"] = prop_vals ...
true
true
f72f6d12c31fc8108305490ba1c038179074925b
1,624
py
Python
leet_code_array/mid_questions/3sum_cloest.py
IvanFan/leetcode-python
72a12a107681cc5f09f1f88537c5b0741f0818a4
[ "MIT" ]
null
null
null
leet_code_array/mid_questions/3sum_cloest.py
IvanFan/leetcode-python
72a12a107681cc5f09f1f88537c5b0741f0818a4
[ "MIT" ]
null
null
null
leet_code_array/mid_questions/3sum_cloest.py
IvanFan/leetcode-python
72a12a107681cc5f09f1f88537c5b0741f0818a4
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- class Solution: def threeSumClosest(self, nums, target): """ :type nums: List[int] :type target: int :rtype: int """ cand = 0 mindis = 9999 nl = len(nums) if nl == 3: return sum(nums) ...
32.48
58
0.404557
class Solution: def threeSumClosest(self, nums, target): cand = 0 mindis = 9999 nl = len(nums) if nl == 3: return sum(nums) nums.sort() for x in range(nl-2): print('x:',x) l = x+1 r = nl -1 curmax = nums[x] +...
true
true
f72f6ddb7ac453475965a5a9f8b29db1c31fc185
3,126
py
Python
keyboardRunCar.py
Adhunikr13/FORCAS
1569a09f146df525b98caa631cb2c806346ba16b
[ "CC0-1.0", "MIT" ]
null
null
null
keyboardRunCar.py
Adhunikr13/FORCAS
1569a09f146df525b98caa631cb2c806346ba16b
[ "CC0-1.0", "MIT" ]
null
null
null
keyboardRunCar.py
Adhunikr13/FORCAS
1569a09f146df525b98caa631cb2c806346ba16b
[ "CC0-1.0", "MIT" ]
null
null
null
import time import RPi.GPIO as GPIO import sys from pynput import keyboard import csv ##from termios import tcflush, TCIOFLUSH, TCIFLUSH from multiprocessing import Process from datetime import datetime GPIO.cleanup() Forward = 17 Backward = 27 Left = 23 Right = 24 sleeptime = 0.25 speed = 0.5 mode=GPIO.getmode() G...
25.622951
80
0.546065
import time import RPi.GPIO as GPIO import sys from pynput import keyboard import csv from multiprocessing import Process from datetime import datetime GPIO.cleanup() Forward = 17 Backward = 27 Left = 23 Right = 24 sleeptime = 0.25 speed = 0.5 mode=GPIO.getmode() GPIO.setmode(GPIO.BCM) GPIO.setup(Forward, GPIO.OUT)...
true
true
f72f6e019ee2fd66663eb569edbe38804ab04fd3
575
py
Python
submissions/tenka1-2012-qualC/i.py
m-star18/atcoder
08e475810516602fa088f87daf1eba590b4e07cc
[ "Unlicense" ]
1
2021-05-10T01:16:28.000Z
2021-05-10T01:16:28.000Z
submissions/tenka1-2012-qualC/i.py
m-star18/atcoder
08e475810516602fa088f87daf1eba590b4e07cc
[ "Unlicense" ]
3
2021-05-11T06:14:15.000Z
2021-06-19T08:18:36.000Z
submissions/tenka1-2012-qualC/i.py
m-star18/atcoder
08e475810516602fa088f87daf1eba590b4e07cc
[ "Unlicense" ]
null
null
null
import sys import math input = sys.stdin.readline def eratosthenes(limit): if limit == 1: return [] A = [i for i in range(2, limit + 1)] P = [] for i in range(limit): prime = min(A) if prime > math.sqrt(limit): break P.append(prime) for j in range...
16.428571
40
0.464348
import sys import math input = sys.stdin.readline def eratosthenes(limit): if limit == 1: return [] A = [i for i in range(2, limit + 1)] P = [] for i in range(limit): prime = min(A) if prime > math.sqrt(limit): break P.append(prime) for j in range...
true
true
f72f6ffa418102f76a422d0fa5ffd49e955a5898
6,071
py
Python
SSWs.py
rhwhite/rhwhitepackages3
91d5677ea57d7cc9a3643708cd8c82a74fb6188d
[ "MIT" ]
null
null
null
SSWs.py
rhwhite/rhwhitepackages3
91d5677ea57d7cc9a3643708cd8c82a74fb6188d
[ "MIT" ]
null
null
null
SSWs.py
rhwhite/rhwhitepackages3
91d5677ea57d7cc9a3643708cd8c82a74fb6188d
[ "MIT" ]
null
null
null
# Module to search for and get data on SSWs # Using the definition of Charlton and Polvani (2007): # Author rachel.white@cantab.net # Created July 2017 import numpy as np import xarray as xr import math import sys def adddays(U,itime,ndays): # Find ndays consecutive days with easterlies numcons = 0 toru...
32.465241
90
0.530555
import numpy as np import xarray as xr import math import sys def adddays(U,itime,ndays): numcons = 0 torun = True while itime < len(U.time): if U[itime] > 0: numcons += 1 else: numcons = 0 if numcons >= ndays: return(itime,numcons,False) ...
true
true
f72f7245256e6106b683dd052df2b3c12248710d
3,127
py
Python
billy/web/api/urls.py
backwardn/billy
07ac788d25a6c79d03dd0e3d55459bbb55e22439
[ "BSD-3-Clause" ]
33
2016-11-05T07:25:48.000Z
2022-01-31T03:40:43.000Z
billy/web/api/urls.py
backwardn/billy
07ac788d25a6c79d03dd0e3d55459bbb55e22439
[ "BSD-3-Clause" ]
16
2015-02-05T21:25:58.000Z
2015-09-18T20:27:06.000Z
billy/web/api/urls.py
backwardn/billy
07ac788d25a6c79d03dd0e3d55459bbb55e22439
[ "BSD-3-Clause" ]
22
2015-03-23T07:13:20.000Z
2016-06-10T04:41:06.000Z
import datetime from django.conf import settings from django.conf.urls import url from django.http import HttpResponse import piston.resource from piston.emitters import Emitter from billy.web.api import handlers from billy.web.api.emitters import BillyJSONEmitter class CORSResource(piston.resource.Resource): d...
39.582278
77
0.657179
import datetime from django.conf import settings from django.conf.urls import url from django.http import HttpResponse import piston.resource from piston.emitters import Emitter from billy.web.api import handlers from billy.web.api.emitters import BillyJSONEmitter class CORSResource(piston.resource.Resource): d...
true
true
f72f74c949c35b437d4684648a5f2909b9268826
2,083
py
Python
generated/nifake/setup.py
kurtp-ni/nimi-python
4f0bccce67a69ca9f46a8ab9b07dc26ca0049729
[ "MIT" ]
88
2017-08-03T18:07:27.000Z
2022-01-28T13:55:06.000Z
generated/nifake/setup.py
kurtp-ni/nimi-python
4f0bccce67a69ca9f46a8ab9b07dc26ca0049729
[ "MIT" ]
1,310
2017-07-11T18:42:44.000Z
2022-03-28T21:03:57.000Z
generated/nifake/setup.py
kurtp-ni/nimi-python
4f0bccce67a69ca9f46a8ab9b07dc26ca0049729
[ "MIT" ]
70
2017-07-25T14:52:53.000Z
2022-03-31T14:14:23.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # This file was generated from setuptools.command.test import test as test_command from setuptools import setup class PyTest(test_command): def finalize_options(self): test_command.finalize_options(self) self.test_args = [] self.test_suite = True...
28.534247
70
0.62698
from setuptools.command.test import test as test_command from setuptools import setup class PyTest(test_command): def finalize_options(self): test_command.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest pytest.main...
true
true
f72f74e9499225c66ece09f508b8f7dac132b713
1,812
py
Python
experiments/analysis/edge_bound/training_nlf/camera_nlf_training.py
haihabi/GenerativeCRB
d53c01bec7214bb087fbe17dba241e12eb60858e
[ "MIT" ]
null
null
null
experiments/analysis/edge_bound/training_nlf/camera_nlf_training.py
haihabi/GenerativeCRB
d53c01bec7214bb087fbe17dba241e12eb60858e
[ "MIT" ]
null
null
null
experiments/analysis/edge_bound/training_nlf/camera_nlf_training.py
haihabi/GenerativeCRB
d53c01bec7214bb087fbe17dba241e12eb60858e
[ "MIT" ]
null
null
null
import torch import numpy as np from tqdm import tqdm from torch.utils.data import DataLoader from experiments.data_model.image_denoising.noise_dataset import NoiseDataSet from experiments.models_architecture.camera_nlf_flow import generate_nlf_flow def train_step(in_noise, in_cond_vector): opt.zero_grad() lo...
34.846154
94
0.667219
import torch import numpy as np from tqdm import tqdm from torch.utils.data import DataLoader from experiments.data_model.image_denoising.noise_dataset import NoiseDataSet from experiments.models_architecture.camera_nlf_flow import generate_nlf_flow def train_step(in_noise, in_cond_vector): opt.zero_grad() lo...
true
true
f72f75554d82d37ec9ea899454d23be4c88365df
4,843
py
Python
torch/distributed/elastic/metrics/__init__.py
MagiaSN/pytorch
7513455c743d3d644b45a804902c1a0d14b69f45
[ "Intel" ]
1
2021-04-11T08:27:46.000Z
2021-04-11T08:27:46.000Z
torch/distributed/elastic/metrics/__init__.py
MagiaSN/pytorch
7513455c743d3d644b45a804902c1a0d14b69f45
[ "Intel" ]
1
2022-01-18T12:17:29.000Z
2022-01-18T12:17:29.000Z
torch/distributed/elastic/metrics/__init__.py
MagiaSN/pytorch
7513455c743d3d644b45a804902c1a0d14b69f45
[ "Intel" ]
2
2021-07-02T10:18:21.000Z
2021-08-18T10:10:28.000Z
#!/usr/bin/env/python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. """Metrics API **Overview**: The metrics API in torchelastic is used to publish telemet...
29.530488
97
0.742308
from typing import Optional from .api import ( ConsoleMetricHandler, MetricData, MetricHandler, MetricsConfig, NullMetricHandler, configure, get_elapsed_time_ms, getStream, prof, profile, publish_metric, put_metric, ) def initialize_metrics(cfg: Optional[MetricsCon...
true
true
f72f76abe1221bf6bd92370f84f0906ef075e999
3,133
py
Python
src/dataset_builder.py
elangovana/large-scale-ptm-ppi
cc835df915d12dd20c35f9cea5e40365200a6d3d
[ "MIT" ]
1
2022-02-25T22:06:39.000Z
2022-02-25T22:06:39.000Z
src/dataset_builder.py
elangovana/ppi-aimed
cc835df915d12dd20c35f9cea5e40365200a6d3d
[ "MIT" ]
null
null
null
src/dataset_builder.py
elangovana/ppi-aimed
cc835df915d12dd20c35f9cea5e40365200a6d3d
[ "MIT" ]
null
null
null
import logging import os from torch.utils.data import DataLoader from locator import Locator class DatasetBuilder: def __init__(self, val_data, dataset_factory_name, tokenisor_factory_name, train_data=None, num_workers=None, batch_size=8, addition_args_dict=None): self._addition_args_d...
34.811111
116
0.635812
import logging import os from torch.utils.data import DataLoader from locator import Locator class DatasetBuilder: def __init__(self, val_data, dataset_factory_name, tokenisor_factory_name, train_data=None, num_workers=None, batch_size=8, addition_args_dict=None): self._addition_args_d...
true
true
f72f78af5664f6874058767edba4aca0c9a4cc9f
2,687
py
Python
app/recipe/tests/test_ingredient_api.py
samderlust/recipe-app-api
44d63426fe2875bd57900203d9dccc14550f1f9d
[ "MIT" ]
null
null
null
app/recipe/tests/test_ingredient_api.py
samderlust/recipe-app-api
44d63426fe2875bd57900203d9dccc14550f1f9d
[ "MIT" ]
null
null
null
app/recipe/tests/test_ingredient_api.py
samderlust/recipe-app-api
44d63426fe2875bd57900203d9dccc14550f1f9d
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import Ingredient from recipe.serializers import IngredientSerializer INGREDIENTS_URL = reverse('recipe:ingredi...
30.534091
74
0.676219
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import Ingredient from recipe.serializers import IngredientSerializer INGREDIENTS_URL = reverse('recipe:ingredi...
true
true
f72f7970ff216f32d358651dab960a4f8b67cce2
5,358
py
Python
migrations/versions/a725247ae9b2_initial_migration.py
np1e/whoami_backend
d91540885c81194489b4b9d0dc67acfe81a59688
[ "MIT" ]
null
null
null
migrations/versions/a725247ae9b2_initial_migration.py
np1e/whoami_backend
d91540885c81194489b4b9d0dc67acfe81a59688
[ "MIT" ]
null
null
null
migrations/versions/a725247ae9b2_initial_migration.py
np1e/whoami_backend
d91540885c81194489b4b9d0dc67acfe81a59688
[ "MIT" ]
null
null
null
"""initial migration Revision ID: a725247ae9b2 Revises: Create Date: 2021-04-08 08:45:24.584283 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'a725247ae9b2' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto ...
39.985075
99
0.66424
from alembic import op import sqlalchemy as sa revision = 'a725247ae9b2' down_revision = None branch_labels = None depends_on = None def upgrade(): op.create_table('collection', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('name', sa.String(length=30), nullable=False)...
true
true
f72f7a106d50691196cea4aa0e76813201841350
2,499
py
Python
ndscheduler/default_settings.py
SquisEat/ndscheduler
14df862cdafca37f46009419b7627989978c5803
[ "BSD-2-Clause" ]
null
null
null
ndscheduler/default_settings.py
SquisEat/ndscheduler
14df862cdafca37f46009419b7627989978c5803
[ "BSD-2-Clause" ]
null
null
null
ndscheduler/default_settings.py
SquisEat/ndscheduler
14df862cdafca37f46009419b7627989978c5803
[ "BSD-2-Clause" ]
null
null
null
"""Default settings.""" import logging import os # # Development mode or production mode # If DEBUG is True, then auto-reload is enabled, i.e., when code is modified, server will be # reloaded immediately # DEBUG = True # # Static Assets # # The web UI is a single page app. All javascripts/css files should be in ST...
24.262136
98
0.735494
import logging import os DEBUG = True STATIC_DIR_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'static') TEMPLATE_DIR_PATH = STATIC_DIR_PATH APP_INDEX_PAGE = 'index.html' HTTP_PORT = 7777 HTTP_ADDRESS = '127.0.0.1' TORNADO_MAX_WORKERS = 8 THREAD_POOL_SIZE = 4 JOB_MAX_INSTANCES = 3 JOB_COALESCE...
true
true
f72f7a7cce9f58fe52ac8e93e43957260898eeda
1,281
py
Python
tests/test_utils/test_import_namespaces.py
rajshruti18/biolinkml
451e71c9d3fd11aa3b08c6a713d9ab8b127ece77
[ "CC0-1.0" ]
25
2019-07-05T01:16:18.000Z
2021-03-22T20:49:25.000Z
tests/test_utils/test_import_namespaces.py
rajshruti18/biolinkml
451e71c9d3fd11aa3b08c6a713d9ab8b127ece77
[ "CC0-1.0" ]
299
2019-03-05T15:15:30.000Z
2021-04-08T23:25:41.000Z
tests/test_utils/test_import_namespaces.py
rajshruti18/biolinkml
451e71c9d3fd11aa3b08c6a713d9ab8b127ece77
[ "CC0-1.0" ]
19
2019-05-23T17:46:47.000Z
2021-03-25T06:45:55.000Z
import unittest from biolinkml.generators.shexgen import ShExGenerator from tests.test_utils.environment import env class URLImportTestCase(unittest.TestCase): @unittest.skipIf(False, "Finish implementing this") def test_import_from_url(self): """ Validate namespace bindings """ shex = ShExG...
24.169811
79
0.613583
import unittest from biolinkml.generators.shexgen import ShExGenerator from tests.test_utils.environment import env class URLImportTestCase(unittest.TestCase): @unittest.skipIf(False, "Finish implementing this") def test_import_from_url(self): shex = ShExGenerator(env.input_path('import_test_l2.yaml...
true
true
f72f7ae3ee8c69c4af98bcfa7cfeb00f3ed16fef
82
py
Python
demo/demoproject/demoapp/views.py
mrc75/django-easy-reports
5a92e8e1fd199ee3fd0fdfd5b47d84fe72861a0a
[ "BSD-1-Clause" ]
2
2015-05-28T10:35:54.000Z
2016-11-18T04:33:26.000Z
demo/demoproject/demoapp/views.py
mrc75/django-easy-reports
5a92e8e1fd199ee3fd0fdfd5b47d84fe72861a0a
[ "BSD-1-Clause" ]
1
2015-10-25T01:50:04.000Z
2015-10-25T01:50:04.000Z
demo/demoproject/demoapp/views.py
saxix/django-easy-reports
81679b0c49d728c198601f7ee3a726a66cae49b5
[ "BSD-1-Clause" ]
null
null
null
from ereports.views import ReportIndex class ReportsView(ReportIndex): pass
13.666667
38
0.792683
from ereports.views import ReportIndex class ReportsView(ReportIndex): pass
true
true
f72f7b324f2181b534f98b9140d1f67ec53e65b6
597
py
Python
mms/utils/__init__.py
abhinavs95/mxnet-model-server
901c1a9a2def8373cd9a91c8d2f47248eed281cc
[ "Apache-2.0" ]
1
2019-01-10T20:56:25.000Z
2019-01-10T20:56:25.000Z
mms/utils/__init__.py
frankfliu/mxnet-model-server
ce36c9e35efc17efe0fb79bb7019bdf3593131a5
[ "Apache-2.0" ]
null
null
null
mms/utils/__init__.py
frankfliu/mxnet-model-server
ce36c9e35efc17efe0fb79bb7019bdf3593131a5
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # http://www.apache.org/licenses/LICENSE-2.0 # or in the "license" file...
42.642857
75
0.752094
true
true
f72f7b9ba7292667009bfeeb0edba74ee8da34be
74,707
py
Python
lib/galaxy/webapps/galaxy/api/workflows.py
itisAliRH/galaxy
b3b693ea0788f773442c8481472a87f43ccb10d7
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/webapps/galaxy/api/workflows.py
itisAliRH/galaxy
b3b693ea0788f773442c8481472a87f43ccb10d7
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/webapps/galaxy/api/workflows.py
itisAliRH/galaxy
b3b693ea0788f773442c8481472a87f43ccb10d7
[ "CC-BY-3.0" ]
null
null
null
""" API operations for Workflows """ import hashlib import json import logging import os from typing import ( Any, Dict, List, Optional, ) from fastapi import ( Body, Path, Query, Response, status, ) from gxformat2._yaml import ordered_dump from markupsafe import escape from pydant...
43.66277
204
0.625136
import hashlib import json import logging import os from typing import ( Any, Dict, List, Optional, ) from fastapi import ( Body, Path, Query, Response, status, ) from gxformat2._yaml import ordered_dump from markupsafe import escape from pydantic import Extra from galaxy import (...
true
true
f72f7ca31617049ebeb428ce645c75a60f6eb63c
22,243
py
Python
setup.py
kylemannock/python-games
1cd25fb4b52c2226dae2d77c996c878bad4bcd65
[ "Python-2.0", "OLDAP-2.3" ]
null
null
null
setup.py
kylemannock/python-games
1cd25fb4b52c2226dae2d77c996c878bad4bcd65
[ "Python-2.0", "OLDAP-2.3" ]
null
null
null
setup.py
kylemannock/python-games
1cd25fb4b52c2226dae2d77c996c878bad4bcd65
[ "Python-2.0", "OLDAP-2.3" ]
null
null
null
#!/usr/bin/env python # # This is the distutils setup script for pygame. # Full instructions are in https://www.pygame.org/wiki/GettingStarted # # To configure, compile, install, just run this script. # python setup.py install DESCRIPTION = """Pygame is a Python wrapper module for the SDL multimedia library. It co...
32.61437
99
0.572944
DESCRIPTION = """Pygame is a Python wrapper module for the SDL multimedia library. It contains python functions and classes that will allow you to use SDL's support for playing cdroms, audio and video output, and keyboard, mouse and joystick input.""" EXTRAS = {} METADATA = { "name": "pygame", "v...
true
true
f72f7d71973611e5b1b6ca5c103ced2746353d09
2,070
py
Python
ansible/old/inventory.py
Otus-DevOps-2021-11/ivan32rus_infra
d504a0bf8d98c9850b005390cd93aeea7e81bd1e
[ "MIT" ]
null
null
null
ansible/old/inventory.py
Otus-DevOps-2021-11/ivan32rus_infra
d504a0bf8d98c9850b005390cd93aeea7e81bd1e
[ "MIT" ]
9
2021-12-20T21:16:20.000Z
2022-02-18T11:56:22.000Z
docker/docker-monolith/infra/ansible/inventory.py
Otus-DevOps-2021-11/ivan32rus_microservices
88e273124d1e1b39c46c526370b96385779c5a05
[ "MIT" ]
1
2021-12-18T11:49:30.000Z
2021-12-18T11:49:30.000Z
#!/usr/bin/env python ''' Example custom dynamic inventory script for Ansible, in Python. FOR pyhhon 3.8.10 it's working used: https://www.jeffgeerling.com/blog/creating-custom-dynamic-inventories-ansible ''' import os import sys import argparse try: import json except ImportError: import simplejson as json...
26.883117
77
0.528986
import os import sys import argparse try: import json except ImportError: import simplejson as json class ExampleInventory(object): def __init__(self): self.inventory = {} self.read_cli_args() if self.args.list: self.inventory = self.example_inventory() ...
true
true
f72f7e10becbbc60d0c8669c8b5575f45e441968
4,353
py
Python
pyrelational/models/mcdropout_model.py
RelationRx/pyrelational
41ededeff84158bd88b76d39006764de3388c821
[ "Apache-2.0" ]
42
2022-02-09T16:36:37.000Z
2022-03-25T00:25:34.000Z
pyrelational/models/mcdropout_model.py
RelationRx/pyrelational
41ededeff84158bd88b76d39006764de3388c821
[ "Apache-2.0" ]
4
2022-03-22T13:22:38.000Z
2022-03-25T16:14:40.000Z
pyrelational/models/mcdropout_model.py
RelationRx/pyrelational
41ededeff84158bd88b76d39006764de3388c821
[ "Apache-2.0" ]
3
2022-02-15T17:50:30.000Z
2022-03-10T18:14:16.000Z
import copy import logging from abc import ABC from typing import Dict, Optional, Type, Union import torch from pytorch_lightning import LightningModule from torch.nn.modules import Module from torch.utils.data import DataLoader from .generic_model import GenericModel from .lightning_model import LightningModel logg...
32.977273
115
0.623938
import copy import logging from abc import ABC from typing import Dict, Optional, Type, Union import torch from pytorch_lightning import LightningModule from torch.nn.modules import Module from torch.utils.data import DataLoader from .generic_model import GenericModel from .lightning_model import LightningModel logg...
true
true
f72f7e5086ec62838452027d2f90f7f9292e8954
1,602
py
Python
fairml/tests/test_orthogonal_projection.py
ravish0007/fairml
bdfb707ff9554c1a789dc8de3926c1ef3cfb1fc8
[ "MIT" ]
330
2017-02-24T08:34:39.000Z
2022-02-24T15:41:19.000Z
fairml/tests/test_orthogonal_projection.py
ravish0007/fairml
bdfb707ff9554c1a789dc8de3926c1ef3cfb1fc8
[ "MIT" ]
14
2017-02-02T00:54:16.000Z
2021-02-19T16:01:20.000Z
fairml/tests/test_orthogonal_projection.py
ravish0007/fairml
bdfb707ff9554c1a789dc8de3926c1ef3cfb1fc8
[ "MIT" ]
70
2017-01-31T20:51:10.000Z
2022-02-17T07:38:52.000Z
from __future__ import division import pytest import numpy as np from random import randint from fairml.orthogonal_projection import audit_model from fairml.orthogonal_projection import get_orthogonal_vector from fairml.utils import mse from fairml.utils import accuracy from fairml.utils import detect_feature_sign ...
25.428571
63
0.671036
from __future__ import division import pytest import numpy as np from random import randint from fairml.orthogonal_projection import audit_model from fairml.orthogonal_projection import get_orthogonal_vector from fairml.utils import mse from fairml.utils import accuracy from fairml.utils import detect_feature_sign ...
true
true
f72f8089cc89101fe7a243dfe2b57fdf92cb7ad2
22,912
py
Python
LLDBagility/stubvm.py
killvxk/LLDBagility
6cc0df91bd49e43997b77048611d1b73f43f7b29
[ "Apache-2.0" ]
1
2019-07-13T12:04:04.000Z
2019-07-13T12:04:04.000Z
LLDBagility/stubvm.py
killvxk/LLDBagility
6cc0df91bd49e43997b77048611d1b73f43f7b29
[ "Apache-2.0" ]
null
null
null
LLDBagility/stubvm.py
killvxk/LLDBagility
6cc0df91bd49e43997b77048611d1b73f43f7b29
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import re import threading import lldbagilityutils from PyFDP.FDP import FDP from VMSN import VMSN logger = lldbagilityutils.create_indented_logger(__name__, "/tmp/stubvm.log") NULL = 0x0 # https://github.com/apple/darwin-xnu/blob/xnu-4903.221.2/osfmk/i386/eflags.h EF...
37.255285
148
0.659043
import re import threading import lldbagilityutils from PyFDP.FDP import FDP from VMSN import VMSN logger = lldbagilityutils.create_indented_logger(__name__, "/tmp/stubvm.log") NULL = 0x0 EFL_TF = 0x00000100 I386_PGBYTES = 4096 VM_MIN_KERNEL_ADDRESS = 0xFFFFFF8000000000 VM_MAX_KERNEL_ADDRESS = 0xFFFFFFFFFFFFEFFF ...
true
true
f72f83101ec2c8b57466741fe18334c3e7fb24c9
3,882
py
Python
dewars/zone6.py
drnasmith/flask-ispyb-logistics
930b2707fc1d679607fc2d8d3d0895edfc944af6
[ "Apache-2.0" ]
null
null
null
dewars/zone6.py
drnasmith/flask-ispyb-logistics
930b2707fc1d679607fc2d8d3d0895edfc944af6
[ "Apache-2.0" ]
null
null
null
dewars/zone6.py
drnasmith/flask-ispyb-logistics
930b2707fc1d679607fc2d8d3d0895edfc944af6
[ "Apache-2.0" ]
1
2018-10-31T13:53:27.000Z
2018-10-31T13:53:27.000Z
# System imports from datetime import datetime import time import json import logging # Package imports from flask import Blueprint from flask import render_template from flask import jsonify from flask import request # Local imports import common api = Blueprint('zone6', __name__, url_prefix='/zone6') rack_prefix ...
29.409091
118
0.516486
from datetime import datetime import time import json import logging from flask import Blueprint from flask import render_template from flask import jsonify from flask import request import common api = Blueprint('zone6', __name__, url_prefix='/zone6') rack_prefix = 'RACK' rack_suffixes = ['A1', 'A2', 'A3', 'A4', ...
true
true
f72f834ad520c083812e4cfa1295c11679786a0f
7,772
py
Python
video2html.py
stevevai/video2chars
b90a2280d184083a746087d1c12d638afa3da5bb
[ "Apache-2.0" ]
1
2019-04-14T16:28:25.000Z
2019-04-14T16:28:25.000Z
video2html.py
stevevai/video2chars
b90a2280d184083a746087d1c12d638afa3da5bb
[ "Apache-2.0" ]
null
null
null
video2html.py
stevevai/video2chars
b90a2280d184083a746087d1c12d638afa3da5bb
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- import json import os import cv2 import numpy as np from time import time import webbrowser play_chars_js = ''' let i = 0; window.setInterval(function(){ let img = frames[i++]; let html = "" for(let line of img){ for(let char of line){ let [[r,g,b], ch] = char;...
28.15942
119
0.523289
import json import os import cv2 import numpy as np from time import time import webbrowser play_chars_js = ''' let i = 0; window.setInterval(function(){ let img = frames[i++]; let html = "" for(let line of img){ for(let char of line){ let [[r,g,b], ch] = char; line += '<...
true
true
f72f8513b66880f4db7e38933741e9e12297e8ac
142
py
Python
data_parse/get_banks_NY.py
hhalim/TargetBanks
8febd7300f3b01e92641e0f63355d3f66bfe674c
[ "MIT" ]
null
null
null
data_parse/get_banks_NY.py
hhalim/TargetBanks
8febd7300f3b01e92641e0f63355d3f66bfe674c
[ "MIT" ]
null
null
null
data_parse/get_banks_NY.py
hhalim/TargetBanks
8febd7300f3b01e92641e0f63355d3f66bfe674c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from parse_banks import parse_and_insert #STATE = TX file = '../data/NY_SOD_FDIC.html' parse_and_insert(file, 'NY')
17.75
40
0.697183
from parse_banks import parse_and_insert file = '../data/NY_SOD_FDIC.html' parse_and_insert(file, 'NY')
true
true
f72f865c6f3e0b0d982fd0cd8b5149aa4a6ebc41
12,464
py
Python
tools/gen_esp_err_to_name.py
jkoelker/esp-idf
4b91c82cc447640e5b61407e810f1d6f3eabd233
[ "Apache-2.0" ]
2
2018-06-27T02:28:03.000Z
2020-12-08T19:33:44.000Z
tools/gen_esp_err_to_name.py
jkoelker/esp-idf
4b91c82cc447640e5b61407e810f1d6f3eabd233
[ "Apache-2.0" ]
null
null
null
tools/gen_esp_err_to_name.py
jkoelker/esp-idf
4b91c82cc447640e5b61407e810f1d6f3eabd233
[ "Apache-2.0" ]
1
2021-01-09T16:19:22.000Z
2021-01-09T16:19:22.000Z
#!/usr/bin/env python # # Copyright 2018 Espressif Systems (Shanghai) PTE LTD # # 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 req...
39.948718
168
0.594352
import os import argparse import re import fnmatch import string import collections import textwrap ignore_files = [ 'components/mdns/test_afl_fuzz_host/esp32_compat.h' ] priority_headers = [ 'components/esp32/include/esp_err.h' ] err_dict = collections.defaultdict(list) rev_err_dict = dict() unproc_list = list() ...
true
true
f72f87aeb2af6ecbc535d203c78b35e72e451ee6
40,174
py
Python
pandas/core/indexes/interval.py
mattboggess/pandas
5551bcf9d297ea8a0aeffb70b17ae6730e8abf89
[ "BSD-3-Clause" ]
null
null
null
pandas/core/indexes/interval.py
mattboggess/pandas
5551bcf9d297ea8a0aeffb70b17ae6730e8abf89
[ "BSD-3-Clause" ]
null
null
null
pandas/core/indexes/interval.py
mattboggess/pandas
5551bcf9d297ea8a0aeffb70b17ae6730e8abf89
[ "BSD-3-Clause" ]
1
2018-10-14T18:27:49.000Z
2018-10-14T18:27:49.000Z
""" define the IntervalIndex """ import textwrap import warnings import numpy as np from pandas.compat import add_metaclass from pandas.core.dtypes.missing import isna from pandas.core.dtypes.cast import find_common_type, maybe_downcast_to_dtype from pandas.core.dtypes.common import ( ensure_platform_int, is_...
34.543422
84
0.599218
import textwrap import warnings import numpy as np from pandas.compat import add_metaclass from pandas.core.dtypes.missing import isna from pandas.core.dtypes.cast import find_common_type, maybe_downcast_to_dtype from pandas.core.dtypes.common import ( ensure_platform_int, is_list_like, is_datetime_or_tim...
true
true
f72f87d18502022289e2800971f93cfb71acdce7
50
py
Python
gateway/__init__.py
RockefellerArchiveCenter/ProjectElectronAPIGateway
4a35c24fe5c09df4f849d1f74b45af5a49c61ac6
[ "MIT" ]
null
null
null
gateway/__init__.py
RockefellerArchiveCenter/ProjectElectronAPIGateway
4a35c24fe5c09df4f849d1f74b45af5a49c61ac6
[ "MIT" ]
null
null
null
gateway/__init__.py
RockefellerArchiveCenter/ProjectElectronAPIGateway
4a35c24fe5c09df4f849d1f74b45af5a49c61ac6
[ "MIT" ]
null
null
null
default_app_config = 'gateway.apps.GatewayConfig'
25
49
0.84
default_app_config = 'gateway.apps.GatewayConfig'
true
true
f72f8822d3d4ac66a54db0bfc296d706ac05a14c
1,219
py
Python
setup.py
duyyudus/iconviet-lottery
ade157e050a6dac468a300d37c0c67a1e92e5d30
[ "MIT" ]
null
null
null
setup.py
duyyudus/iconviet-lottery
ade157e050a6dac468a300d37c0c67a1e92e5d30
[ "MIT" ]
null
null
null
setup.py
duyyudus/iconviet-lottery
ade157e050a6dac468a300d37c0c67a1e92e5d30
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup, find_packages # All dependences deps = { 'test': [], 'dev': ['iconsdk', 'tbears', 'pylint', 'autopep8', 'rope', 'black',], } install_requires = [] extra_requires = deps test_requires = deps['test'] with open('README.adoc') as readme_file: long_descrip...
28.348837
73
0.660377
from setuptools import setup, find_packages deps = { 'test': [], 'dev': ['iconsdk', 'tbears', 'pylint', 'autopep8', 'rope', 'black',], } install_requires = [] extra_requires = deps test_requires = deps['test'] with open('README.adoc') as readme_file: long_description = readme_file.read() setup( name...
true
true
f72f888a64c2817014cb56a0375b9b4d1a93dade
749
py
Python
try.py
charliezjw/Neural-Signal-Decoder
fb0df09ba0314724c7c90141bd47cc8fb0201b7a
[ "MIT" ]
null
null
null
try.py
charliezjw/Neural-Signal-Decoder
fb0df09ba0314724c7c90141bd47cc8fb0201b7a
[ "MIT" ]
null
null
null
try.py
charliezjw/Neural-Signal-Decoder
fb0df09ba0314724c7c90141bd47cc8fb0201b7a
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf # a = tf.placeholder(tf.int32, [None, 3]) # # b = tf.convert_to_tensor(tf.argmax(tf.bincount(a[0]))) # b = tf.stack([b, tf.argmax(tf.bincount(a[1]))], 0) # for i in range(2, 5): # max_indx = tf.argmax(tf.bincount(a[i])) # b = tf.concat([b, [max_indx]], 0) # # with tf....
31.208333
83
0.542056
import numpy as np import tensorflow as tf a = np.asarray(np.asarray([[1, 1, 0], [2, 4, 4], [6, 6, 6], [5, 5, 5], [2, 7, 7]])) b = np.zeros(a.shape[0]) c = np.asarray([1, 4, 6, 7, 9]) for i in range(a.shape[0]): b[i] = np.argmax(np.bincount(a[i])) print(np.mean(np.equal(b, c)))
true
true
f72f896b8a657f3551e24d80c0f44854acb5a54c
666
py
Python
pipeline/compilers/livescript.py
jnis77diver/django-pipeline
8bac57adae84615d9d79ad19b2b591c2e46879f9
[ "MIT" ]
1
2019-10-20T02:58:27.000Z
2019-10-20T02:58:27.000Z
pipeline/compilers/livescript.py
jnis77diver/django-pipeline
8bac57adae84615d9d79ad19b2b591c2e46879f9
[ "MIT" ]
1
2021-09-20T22:02:21.000Z
2021-09-21T13:55:41.000Z
pipeline/compilers/livescript.py
jnis77diver/django-pipeline
8bac57adae84615d9d79ad19b2b591c2e46879f9
[ "MIT" ]
1
2021-09-18T01:39:48.000Z
2021-09-18T01:39:48.000Z
from __future__ import unicode_literals from pipeline.conf import settings from pipeline.compilers import SubProcessCompiler class LiveScriptCompiler(SubProcessCompiler): output_extension = 'js' def match_file(self, path): return path.endswith('.ls') def compile_file(self, infile, outfile, outd...
28.956522
73
0.672673
from __future__ import unicode_literals from pipeline.conf import settings from pipeline.compilers import SubProcessCompiler class LiveScriptCompiler(SubProcessCompiler): output_extension = 'js' def match_file(self, path): return path.endswith('.ls') def compile_file(self, infile, outfile, outd...
true
true
f72f8af5b3ccf2010b8feadf774b09fd508c9661
32,775
py
Python
WhoopClient.py
lcintron/WhoopClient
46ccc6c3e3b98f4b6c82cf8938056d72a22bd6b6
[ "MIT" ]
null
null
null
WhoopClient.py
lcintron/WhoopClient
46ccc6c3e3b98f4b6c82cf8938056d72a22bd6b6
[ "MIT" ]
null
null
null
WhoopClient.py
lcintron/WhoopClient
46ccc6c3e3b98f4b6c82cf8938056d72a22bd6b6
[ "MIT" ]
null
null
null
import requests import pandas as pd import numpy as np import configparser from datetime import datetime from dateutil import relativedelta, parser, rrule from dateutil.rrule import WEEKLY class WhoopClient: '''A class to allow a user to login and store their authorization code, then perform pulls using t...
43.993289
121
0.49251
import requests import pandas as pd import numpy as np import configparser from datetime import datetime from dateutil import relativedelta, parser, rrule from dateutil.rrule import WEEKLY class WhoopClient: def __init__(self, auth_code=None, whoop_id=None, curre...
true
true
f72f8c8616ebfc02596b74d7d800b811e4d3bb3f
18,406
py
Python
third_party/texar-0.2.0/examples/bert/utils/data_utils.py
swidi/poemo-generation
3a349ac3a6fc3e82b24410013bced60a24c2d8bf
[ "MIT" ]
null
null
null
third_party/texar-0.2.0/examples/bert/utils/data_utils.py
swidi/poemo-generation
3a349ac3a6fc3e82b24410013bced60a24c2d8bf
[ "MIT" ]
null
null
null
third_party/texar-0.2.0/examples/bert/utils/data_utils.py
swidi/poemo-generation
3a349ac3a6fc3e82b24410013bced60a24c2d8bf
[ "MIT" ]
null
null
null
""" This is the Data Loading Pipeline for Sentence Classifier Task from https://github.com/google-research/bert/blob/master/run_classifier.py """ # coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in...
38.10766
80
0.60703
import os import csv import collections import sys sys.path.append(os.path.dirname(__file__)) import tokenization import tensorflow as tf class InputExample(): def __init__(self, guid, text_a, text_b=None, label=None): self.guid = guid self.text_a = text_a self.text_b = text_b sel...
true
true
f72f8d11340df1f1d9eb56840c1b60800b76a5a8
827
py
Python
Calculator.py
EdvinAlvarado/Code-Wars
a3a06a44cda004052b5c0930f3693678c5c92e21
[ "BSD-2-Clause" ]
null
null
null
Calculator.py
EdvinAlvarado/Code-Wars
a3a06a44cda004052b5c0930f3693678c5c92e21
[ "BSD-2-Clause" ]
null
null
null
Calculator.py
EdvinAlvarado/Code-Wars
a3a06a44cda004052b5c0930f3693678c5c92e21
[ "BSD-2-Clause" ]
null
null
null
class Calculator(object): def evaluate(self, string): print(string) cmd = [int(s) if s.isdigit() else s for s in string.split(" ")] cmd = [float(s) if isinstance(s, str) and s.find('.') != -1 else s for s in cmd] print(cmd) for i in range(sum([1 if s == '*' or s == '/' else 0 for s in cmd])): for i...
22.972222
82
0.481258
class Calculator(object): def evaluate(self, string): print(string) cmd = [int(s) if s.isdigit() else s for s in string.split(" ")] cmd = [float(s) if isinstance(s, str) and s.find('.') != -1 else s for s in cmd] print(cmd) for i in range(sum([1 if s == '*' or s == '/' else 0 for s in cmd])): for i...
true
true
f72f8d12e338c378aeef5bdcbc21e4ce4e2a2aa1
7,335
py
Python
src/vmware/azext_vmware/_help.py
sanmishra18/azure-cli-extensions
05499b7931a1fe4cd4536a6b83fa4f8f13663996
[ "MIT" ]
1
2021-04-22T09:20:58.000Z
2021-04-22T09:20:58.000Z
src/vmware/azext_vmware/_help.py
sanmishra18/azure-cli-extensions
05499b7931a1fe4cd4536a6b83fa4f8f13663996
[ "MIT" ]
1
2020-07-30T06:44:01.000Z
2020-07-30T06:44:01.000Z
src/vmware/azext_vmware/_help.py
Juliehzl/azure-cli-extensions
b0b33f4d45c2e4c50ece782851291d967e1f36e2
[ "MIT" ]
1
2020-11-09T17:17:42.000Z
2020-11-09T17:17:42.000Z
# coding=utf-8 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------...
34.763033
204
0.671438
from knack.help_files import helps helps['vmware'] = """ type: group short-summary: Commands to manage Azure VMware Solution. """ helps['vmware private-cloud'] = """ type: group short-summary: Commands to manage private clouds. """ helps['vmware cluster'] = """ type: group s...
true
true
f72f8d9198afb6938ccdaa898c7765d5213e95ab
1,699
py
Python
docs/source/example_models.py
2degrees/djeneralize
ef456292397888bd0476786d9f4ab2854b3604ef
[ "BSD-3-Clause" ]
4
2015-10-19T10:49:47.000Z
2017-03-22T13:06:32.000Z
docs/source/example_models.py
2degrees/djeneralize
ef456292397888bd0476786d9f4ab2854b3604ef
[ "BSD-3-Clause" ]
1
2015-04-16T17:37:15.000Z
2015-04-17T08:05:21.000Z
docs/source/example_models.py
2degrees/djeneralize
ef456292397888bd0476786d9f4ab2854b3604ef
[ "BSD-3-Clause" ]
3
2015-08-12T12:28:03.000Z
2015-09-30T09:45:40.000Z
from django.db import models from djeneralize.models import BaseGeneralizationModel from djeneralize.fields import SpecializedForeignKey #{ General model class WritingImplement(BaseGeneralizationModel): name = models.CharField(max_length=30) length = models.IntegerField() holder = SpecializedForeignKe...
18.877778
75
0.727487
from django.db import models from djeneralize.models import BaseGeneralizationModel from djeneralize.fields import SpecializedForeignKey class WritingImplement(BaseGeneralizationModel): name = models.CharField(max_length=30) length = models.IntegerField() holder = SpecializedForeignKey( 'Writi...
true
true
f72f8e30417092439e50e50b97f2efb35888640b
2,204
py
Python
laikaboss/modules/explode_re_sub.py
sandialabs/laikaboss
3064ac1176911651d61c5176e9bd83eacec36b16
[ "Apache-2.0" ]
2
2019-11-02T23:40:23.000Z
2019-12-01T22:24:57.000Z
laikaboss/modules/explode_re_sub.py
sandialabs/laikaboss
3064ac1176911651d61c5176e9bd83eacec36b16
[ "Apache-2.0" ]
null
null
null
laikaboss/modules/explode_re_sub.py
sandialabs/laikaboss
3064ac1176911651d61c5176e9bd83eacec36b16
[ "Apache-2.0" ]
3
2017-08-09T23:58:40.000Z
2019-12-01T22:25:06.000Z
# Copyright 2020 National Technology & Engineering Solutions of Sandia, LLC # (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. # Government retains certain rights in this software. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
36.733333
126
0.696915
import re import binascii from laikaboss.si_module import SI_MODULE from laikaboss.objectmodel import ModuleObject, ExternalVars import laikaboss.util class EXPLODE_RE_SUB(SI_MODULE): def __init__(self,): self.module_name = "EXPLODE_RE_SUB" self.re_pattern = None def _run(self, scanObject, re...
true
true
f72f8e94a0df815f7d517e2b81ffc86c5c545f07
2,893
py
Python
tensorflow/contrib/autograph/utils/multiple_dispatch_test.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
71
2017-05-25T16:02:15.000Z
2021-06-09T16:08:08.000Z
tensorflow/contrib/autograph/utils/multiple_dispatch_test.py
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
133
2017-04-26T16:49:49.000Z
2019-10-15T11:39:26.000Z
tensorflow/contrib/autograph/utils/multiple_dispatch_test.py
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
31
2018-09-11T02:17:17.000Z
2021-12-15T10:33:35.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.065789
80
0.733495
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.contrib.autograph.utils import multiple_dispatch from tensorflow.python.client.session import Session from tensorflow.python.framework.constant_op import constant from tenso...
true
true
f72f8f3096b8b8f70f02fbf592b95d3864e87c01
594
py
Python
papy/misc.py
ArcturusB/papy
360e4cc6b5c8473f8a5e8bce3153931f1a54a558
[ "MIT" ]
3
2022-03-10T08:13:07.000Z
2022-03-10T08:13:13.000Z
papy/misc.py
ArcturusB/papy
360e4cc6b5c8473f8a5e8bce3153931f1a54a558
[ "MIT" ]
null
null
null
papy/misc.py
ArcturusB/papy
360e4cc6b5c8473f8a5e8bce3153931f1a54a558
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import functools import time class Chrono(): def __init__(self, msg=None): if msg: print(msg) self.t0 = time.time() self.t = self.t0 def lap(self, name=None): now = time.time() if name: print(name, end=': ') msg = '...
24.75
74
0.552189
import functools import time class Chrono(): def __init__(self, msg=None): if msg: print(msg) self.t0 = time.time() self.t = self.t0 def lap(self, name=None): now = time.time() if name: print(name, end=': ') msg = '{:.2g} s (total: {:.2g}...
true
true