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
f71cc7dd876392c1eb5462cd7fd83e0f8c22bec2
19,039
py
Python
convlab2/policy/larl/multiwoz/latent_dialog/enc2dec/decoders.py
ljw23/ConvLab-2
13d48ea0e441701bd66100689b6c25b561f15525
[ "Apache-2.0" ]
339
2020-03-04T09:43:22.000Z
2022-03-26T17:27:38.000Z
convlab2/policy/larl/multiwoz/latent_dialog/enc2dec/decoders.py
ljw23/ConvLab-2
13d48ea0e441701bd66100689b6c25b561f15525
[ "Apache-2.0" ]
122
2020-04-12T04:19:06.000Z
2022-03-23T14:20:57.000Z
convlab2/policy/larl/multiwoz/latent_dialog/enc2dec/decoders.py
ljw23/ConvLab-2
13d48ea0e441701bd66100689b6c25b561f15525
[ "Apache-2.0" ]
138
2020-02-18T16:48:04.000Z
2022-03-26T17:27:43.000Z
import torch as th import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable import numpy as np from convlab2.policy.larl.multiwoz.latent_dialog.enc2dec.base_modules import BaseRNN from convlab2.policy.larl.multiwoz.latent_dialog.utils import cast_type, LONG, ...
43.270455
147
0.59625
import torch as th import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable import numpy as np from convlab2.policy.larl.multiwoz.latent_dialog.enc2dec.base_modules import BaseRNN from convlab2.policy.larl.multiwoz.latent_dialog.utils import cast_type, LONG, ...
true
true
f71cc8fe00c0b5c8796f9ec6ac11c85930433e40
4,318
py
Python
WebMirror/management/UrlManage.py
awesome-archive/ReadableWebProxy
360104694a21bc14c7756f29205c95823387e30b
[ "BSD-3-Clause" ]
193
2016-08-02T22:04:35.000Z
2022-03-09T20:45:41.000Z
WebMirror/management/UrlManage.py
awesome-archive/ReadableWebProxy
360104694a21bc14c7756f29205c95823387e30b
[ "BSD-3-Clause" ]
533
2016-08-23T20:48:23.000Z
2022-03-28T15:55:13.000Z
WebMirror/management/UrlManage.py
awesome-archive/ReadableWebProxy
360104694a21bc14c7756f29205c95823387e30b
[ "BSD-3-Clause" ]
19
2015-08-13T18:01:08.000Z
2021-07-12T17:13:09.000Z
import calendar import datetime import json import os import os.path import shutil import tqdm import traceback from concurrent.futures import ThreadPoolExecutor import urllib.error import urllib.parse from sqlalchemy import and_ from sqlalchemy import or_ import sqlalchemy.exc if __name__ == "__main__": import lo...
23.988889
112
0.684576
import calendar import datetime import json import os import os.path import shutil import tqdm import traceback from concurrent.futures import ThreadPoolExecutor import urllib.error import urllib.parse from sqlalchemy import and_ from sqlalchemy import or_ import sqlalchemy.exc if __name__ == "__main__": import lo...
true
true
f71cc93f4fb121302f3d3b609755c636dc186814
53,235
py
Python
zerver/views/message_fetch.py
CatarinaSMorais/zulip
e943d717b84291397328bd4dc578c04eed21885e
[ "Apache-2.0" ]
1
2021-08-10T07:31:27.000Z
2021-08-10T07:31:27.000Z
zerver/views/message_fetch.py
CatarinaSMorais/zulip
e943d717b84291397328bd4dc578c04eed21885e
[ "Apache-2.0" ]
1
2021-08-05T14:46:02.000Z
2021-08-05T14:46:02.000Z
zerver/views/message_fetch.py
CatarinaSMorais/zulip
e943d717b84291397328bd4dc578c04eed21885e
[ "Apache-2.0" ]
1
2021-08-05T14:27:13.000Z
2021-08-05T14:27:13.000Z
import re from typing import Any, Callable, Dict, Iterable, List, Optional, Sequence, Tuple, Union import orjson from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.core.exceptions import ValidationError from django.db import connection from django.http import HttpRequest,...
39.057227
154
0.64544
import re from typing import Any, Callable, Dict, Iterable, List, Optional, Sequence, Tuple, Union import orjson from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.core.exceptions import ValidationError from django.db import connection from django.http import HttpRequest,...
true
true
f71ccbfa3508cc2de142272d5a5eb12f86208da2
2,165
py
Python
Packs/FeedCyjax/Integrations/FeedCyjax/test_data/indicators.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/FeedCyjax/Integrations/FeedCyjax/test_data/indicators.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/FeedCyjax/Integrations/FeedCyjax/test_data/indicators.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
mocked_indicators = [ { "type": "URL", "industry_type": [ "IT", "online gaming", "Military" ], "value": "https://test.domainos.com?test=true&id=32423", "handling_condition": "GREEN", "discovered_at": "2020-12-31T14:18:26+0000", ...
32.313433
95
0.513164
mocked_indicators = [ { "type": "URL", "industry_type": [ "IT", "online gaming", "Military" ], "value": "https://test.domainos.com?test=true&id=32423", "handling_condition": "GREEN", "discovered_at": "2020-12-31T14:18:26+0000", ...
true
true
f71ccc3dfa925bc05b65ff8afe4da56a24f1736f
245
py
Python
Python Programming/06. Classes/01-Classes.py
luckyrabbit85/Python
ed134fd70b4a7b84b183b87b85ad5190f54c9526
[ "MIT" ]
1
2021-07-15T18:40:26.000Z
2021-07-15T18:40:26.000Z
Python Programming/06. Classes/01-Classes.py
luckyrabbit85/Python
ed134fd70b4a7b84b183b87b85ad5190f54c9526
[ "MIT" ]
null
null
null
Python Programming/06. Classes/01-Classes.py
luckyrabbit85/Python
ed134fd70b4a7b84b183b87b85ad5190f54c9526
[ "MIT" ]
null
null
null
# Class: blueprint for creating new objects # Object: instances of a class # Class: Human # Objects: John, Mary, Jack class Point: def draw(self): print("draw") point = Point() print(type(point)) print(isinstance(point, Point))
15.3125
43
0.677551
class Point: def draw(self): print("draw") point = Point() print(type(point)) print(isinstance(point, Point))
true
true
f71cccaab8c8334d17849d7af7fa89ed4b6eaf3b
7,967
py
Python
magnum/tests/unit/api/test_attr_validator.py
MatMaul/magnum
4d5fd80d89e38e98aff24f01b967a57d0adcd191
[ "Apache-2.0" ]
null
null
null
magnum/tests/unit/api/test_attr_validator.py
MatMaul/magnum
4d5fd80d89e38e98aff24f01b967a57d0adcd191
[ "Apache-2.0" ]
null
null
null
magnum/tests/unit/api/test_attr_validator.py
MatMaul/magnum
4d5fd80d89e38e98aff24f01b967a57d0adcd191
[ "Apache-2.0" ]
1
2020-09-09T14:35:08.000Z
2020-09-09T14:35:08.000Z
# Copyright 2015 EasyStack, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
46.319767
78
0.667629
from glanceclient import exc as glance_exception import mock from novaclient import exceptions as nova_exc from magnum.api import attr_validator from magnum.common import exception from magnum.tests import base class TestAttrValidator(base.BaseTestCase): def test_validate_flavor_with_vaild_flavor...
true
true
f71ccd96515f76c1d80e0d8132600385ef3f08bf
3,311
py
Python
huaweicloud-sdk-osm/huaweicloudsdkosm/v2/model/list_case_labels_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-osm/huaweicloudsdkosm/v2/model/list_case_labels_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-osm/huaweicloudsdkosm/v2/model/list_case_labels_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class ListCaseLabelsResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name ...
28.791304
83
0.583812
import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class ListCaseLabelsResponse(SdkResponse): sensitive_list = [] openapi_types = { 'case_label_list': 'list[CaseLabelInfo]' } attribute...
true
true
f71cce801e6baa714b9a75a9300c23ab0372565e
21,083
py
Python
deepfence_backend/tasks/task_scheduler.py
Jramirezg/ThreatMapper
af5fda3ff585f8728a7a0b48ae6818ed189e4dbf
[ "Apache-2.0" ]
null
null
null
deepfence_backend/tasks/task_scheduler.py
Jramirezg/ThreatMapper
af5fda3ff585f8728a7a0b48ae6818ed189e4dbf
[ "Apache-2.0" ]
null
null
null
deepfence_backend/tasks/task_scheduler.py
Jramirezg/ThreatMapper
af5fda3ff585f8728a7a0b48ae6818ed189e4dbf
[ "Apache-2.0" ]
null
null
null
import arrow from config.app import celery_app, app from models.container_image_registry import RegistryCredential from models.scheduler import Scheduler from models.setting import Setting from croniter import croniter from utils import constants import time from datetime import datetime from utils.helper import websoc...
61.287791
129
0.538206
import arrow from config.app import celery_app, app from models.container_image_registry import RegistryCredential from models.scheduler import Scheduler from models.setting import Setting from croniter import croniter from utils import constants import time from datetime import datetime from utils.helper import websoc...
true
true
f71ccea17261d0989d135fd953f856682a8dd848
1,284
py
Python
python-2-apps/fn_bluecoat_recategorization/setup.py
JayDi11a/Geralds-IBM-SOAR-Integrations
0e0eb18adbaf3a266e1dc5a316df7cd5a93f88d0
[ "MIT" ]
null
null
null
python-2-apps/fn_bluecoat_recategorization/setup.py
JayDi11a/Geralds-IBM-SOAR-Integrations
0e0eb18adbaf3a266e1dc5a316df7cd5a93f88d0
[ "MIT" ]
1
2022-03-06T00:10:13.000Z
2022-03-06T00:10:13.000Z
python-2-apps/fn_bluecoat_recategorization/setup.py
JayDi11a/Geralds-IBM-SOAR-Integrations
0e0eb18adbaf3a266e1dc5a316df7cd5a93f88d0
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='fn_bluecoat_recategorization', version='1.0.0', license='<<insert here>>', author='<<your name here>>', author_email='you@example.com', url='<<your company url>>', description="Resilient ...
40.125
163
0.719626
from setuptools import setup, find_packages setup( name='fn_bluecoat_recategorization', version='1.0.0', license='<<insert here>>', author='<<your name here>>', author_email='you@example.com', url='<<your company url>>', description="Resilient Circuits Components for 'fn_bluecoat_recateg...
true
true
f71ccec79ef122b387b104a8ce307bf488b1bd1c
15,996
py
Python
src/auxil/eeMad_run.py
mortcanty/EESARDocker
855b41a3da19f3b07b42438784309ab48fc7fe98
[ "MIT" ]
23
2018-11-11T02:43:42.000Z
2021-08-21T21:53:19.000Z
src/auxil/eeMad_run.py
mortcanty/EESARDocker
855b41a3da19f3b07b42438784309ab48fc7fe98
[ "MIT" ]
8
2020-03-24T16:25:42.000Z
2021-08-23T20:35:38.000Z
src/auxil/eeMad_run.py
mortcanty/EESARDocker
855b41a3da19f3b07b42438784309ab48fc7fe98
[ "MIT" ]
8
2019-12-20T13:33:47.000Z
2021-10-24T02:18:37.000Z
''' Created on 08.04.2019 @author: mort ipywidget interface to the GEE for IR-MAD ''' import ee, time, warnings, math import ipywidgets as widgets from IPython.display import display from ipyleaflet import (Map,DrawControl,TileLayer, basemaps,basemap_to_tiles, LayersCo...
42.429708
157
0.582146
import ee, time, warnings, math import ipywidgets as widgets from IPython.display import display from ipyleaflet import (Map,DrawControl,TileLayer, basemaps,basemap_to_tiles, LayersControl, MeasureControl, FullScreenControl)...
true
true
f71ccf566a61303c7989a45da65942c1b7aef635
10,678
py
Python
examples/scales/step1.py
KNPSystem/server
85aa991cf86b10330054bd8ea4a12543851cb9fc
[ "MIT" ]
null
null
null
examples/scales/step1.py
KNPSystem/server
85aa991cf86b10330054bd8ea4a12543851cb9fc
[ "MIT" ]
null
null
null
examples/scales/step1.py
KNPSystem/server
85aa991cf86b10330054bd8ea4a12543851cb9fc
[ "MIT" ]
null
null
null
""" Get the data from covidtracking.com. Store it in a knpsValue. Assign to a knpsVariable. Everytime we run this, the knpsVariable is not changed. But the knpsValue it points to should be updated. i.e. a new knpsValue is created. """ import requests import json from collections import defaultdict from datetime import ...
34.445161
138
0.613879
import requests import json from collections import defaultdict from datetime import datetime, timedelta from urllib.request import urlopen from lib import get_user_id, create_data_object, update_data_object USER_NAME = "Mike Anderson" USER_EMAIL = "mrander@umich.edu" sample_data_file = "data/Unemployment_data_2019....
true
true
f71ccf5e40a5d9802ed0c6e2043dda4342fb9258
391
py
Python
serveup/wsgi.py
ASquirrelsTail/serve-up
9533ba82f5b4989434b3b20352d17a8131bb9619
[ "MIT" ]
null
null
null
serveup/wsgi.py
ASquirrelsTail/serve-up
9533ba82f5b4989434b3b20352d17a8131bb9619
[ "MIT" ]
10
2021-03-30T14:05:21.000Z
2022-03-12T00:41:15.000Z
serveup/wsgi.py
ASquirrelsTail/serve-up
9533ba82f5b4989434b3b20352d17a8131bb9619
[ "MIT" ]
null
null
null
""" WSGI config for serveup 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/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTI...
23
78
0.785166
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'serveup.settings') application = get_wsgi_application()
true
true
f71ccfaa61b4b5f0ebf12cbfe2ca50b9ddc66c78
417
py
Python
pypy/rlib/test/test_rgc.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
12
2016-01-06T07:10:28.000Z
2021-05-13T23:02:02.000Z
pypy/rlib/test/test_rgc.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
null
null
null
pypy/rlib/test/test_rgc.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
2
2016-07-29T07:09:50.000Z
2016-10-16T08:50:26.000Z
from pypy.rpython.test.test_llinterp import gengraph, interpret from pypy.rlib import rgc # Force registration of gc.collect import gc def test_collect(): def f(): return gc.collect() t, typer, graph = gengraph(f, []) ops = list(graph.iterblockops()) assert len(ops) == 1 op = ops[0][1] ...
20.85
63
0.630695
from pypy.rpython.test.test_llinterp import gengraph, interpret from pypy.rlib import rgc import gc def test_collect(): def f(): return gc.collect() t, typer, graph = gengraph(f, []) ops = list(graph.iterblockops()) assert len(ops) == 1 op = ops[0][1] assert op.opname == 'gc__collect'...
true
true
f71cd18cea2ada57b893164f00c100b5a386de43
3,792
py
Python
test/core_arguments.py
sdarwin/build
2c4217ebb6bdeb5001b33a5d0d6718420aef988c
[ "BSL-1.0" ]
106
2015-08-07T04:23:50.000Z
2020-12-27T18:25:15.000Z
test/core_arguments.py
sdarwin/build
2c4217ebb6bdeb5001b33a5d0d6718420aef988c
[ "BSL-1.0" ]
130
2016-06-22T22:11:25.000Z
2020-11-29T20:24:09.000Z
test/core_arguments.py
sdarwin/build
2c4217ebb6bdeb5001b33a5d0d6718420aef988c
[ "BSL-1.0" ]
41
2015-07-08T19:18:35.000Z
2021-01-14T16:39:56.000Z
#!/usr/bin/python # Copyright 2001 Dave Abrahams # Copyright 2011 Steven Watanabe # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE.txt or copy at # https://www.bfgroup.xyz/b2/LICENSE.txt) import BoostBuild def simple_args(start, finish): return " : ".join("%d" % x fo...
36.461538
79
0.474947
import BoostBuild def simple_args(start, finish): return " : ".join("%d" % x for x in range(start, finish + 1)) def test(t, type, input, output, status=0): code = ["include echo_args.jam ; echo_%s" % type] if input: code.append(input) code.append(";") t.write("file.jam", " ".join(code)) ...
true
true
f71cd2549c8bf4f50eefa40b961f15351236ec5b
350
py
Python
openctrl/display.py
openctrl-python/openctrl
5adda5d79262950eceab91b8412ead3d3a13e712
[ "MIT" ]
null
null
null
openctrl/display.py
openctrl-python/openctrl
5adda5d79262950eceab91b8412ead3d3a13e712
[ "MIT" ]
1
2021-06-02T18:59:19.000Z
2021-06-02T18:59:19.000Z
openctrl/display.py
pyopencontrol/openctrl
24f08970052301cb0c4a13fc855b80353a3cb975
[ "MIT" ]
null
null
null
import threading try: from .grab import Image except:pass def grab_bytes(): return Image().asbytes def send(s,a): s.post(b's'+grab_bytes(),a) def show_bytes(r): if not r.startswith('s'):return Image(r[1:]).show() def conf(s,a): def _conf(): while True: send(s,a) threading...
20.588235
42
0.617143
import threading try: from .grab import Image except:pass def grab_bytes(): return Image().asbytes def send(s,a): s.post(b's'+grab_bytes(),a) def show_bytes(r): if not r.startswith('s'):return Image(r[1:]).show() def conf(s,a): def _conf(): while True: send(s,a) threading...
true
true
f71cd2c0ab36287199c78e7dfc110494800caf19
8,955
py
Python
test_pretrain.py
anonymous-cv/cvpr-sub
6307520c73716de73ef63f5239bdac8dda20da41
[ "BSD-3-Clause" ]
null
null
null
test_pretrain.py
anonymous-cv/cvpr-sub
6307520c73716de73ef63f5239bdac8dda20da41
[ "BSD-3-Clause" ]
null
null
null
test_pretrain.py
anonymous-cv/cvpr-sub
6307520c73716de73ef63f5239bdac8dda20da41
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import time import argparse import sys import numpy as np import torch import torch.optim as optim from tqdm import tqdm from network.BEV_Unet import BEV_Unet from network.ptBEV import ptBEVnet from dataloader.dataset import collate_fn_BEV,collate_fn_BEV_test,Se...
46.884817
166
0.656505
import os import time import argparse import sys import numpy as np import torch import torch.optim as optim from tqdm import tqdm from network.BEV_Unet import BEV_Unet from network.ptBEV import ptBEVnet from dataloader.dataset import collate_fn_BEV,collate_fn_BEV_test,SemKITTI,SemKITTI_label_name,spherical_dataset,...
true
true
f71cd34ea15347fc0a22c67ddefbd517bbd2ed66
101
py
Python
src/ytdl/playlists/models/__init__.py
Asday/ytdl
96a51ba3589e855b27f75095b0cd4a6f00f8eefa
[ "MIT" ]
null
null
null
src/ytdl/playlists/models/__init__.py
Asday/ytdl
96a51ba3589e855b27f75095b0cd4a6f00f8eefa
[ "MIT" ]
1
2019-04-15T02:09:37.000Z
2019-04-15T02:09:37.000Z
src/ytdl/playlists/models/__init__.py
Asday/ytdl
96a51ba3589e855b27f75095b0cd4a6f00f8eefa
[ "MIT" ]
null
null
null
from .playlist import Playlist from .video import Video __all__ = [ 'Playlist', 'Video', ]
11.222222
30
0.653465
from .playlist import Playlist from .video import Video __all__ = [ 'Playlist', 'Video', ]
true
true
f71cd35b8a5ccd91aeb1a0d8c570e794aa9da303
403
py
Python
LeetCode/0069 _ Sqrt(x).py
Achyut-sudo/PythonAlgorithms
21fb6522510fde7a0877b19a8cedd4665938a4df
[ "MIT" ]
144
2020-09-13T22:54:57.000Z
2022-02-24T21:54:25.000Z
LeetCode/0069 _ Sqrt(x).py
Achyut-sudo/PythonAlgorithms
21fb6522510fde7a0877b19a8cedd4665938a4df
[ "MIT" ]
587
2020-05-06T18:55:07.000Z
2021-09-20T13:14:53.000Z
LeetCode/0069 _ Sqrt(x).py
Achyut-sudo/PythonAlgorithms
21fb6522510fde7a0877b19a8cedd4665938a4df
[ "MIT" ]
523
2020-09-09T12:07:13.000Z
2022-02-24T21:54:31.000Z
class Solution(object): def mySqrt(self, x): if x<2: return x low = 0 high = x result=0 while(low<=high): mid = (low+high)//2 if(mid*mid==x): return mid elif(mid*mid<x): low = mid+1 ...
23.705882
31
0.377171
class Solution(object): def mySqrt(self, x): if x<2: return x low = 0 high = x result=0 while(low<=high): mid = (low+high)//2 if(mid*mid==x): return mid elif(mid*mid<x): low = mid+1 ...
true
true
f71cd3983554ca85caddf54de589eb916e0b3596
2,924
py
Python
nova/virt/baremetal/vif_driver.py
SnabbCo/nova
d156d7fdf241569da2c27ae02ec88e6ef448f7e2
[ "Apache-2.0" ]
2
2016-04-19T08:20:39.000Z
2021-10-03T16:00:37.000Z
nova/virt/baremetal/vif_driver.py
SnabbCo/nova
d156d7fdf241569da2c27ae02ec88e6ef448f7e2
[ "Apache-2.0" ]
9
2015-05-20T11:20:17.000Z
2017-07-27T08:21:33.000Z
nova/virt/baremetal/vif_driver.py
SnabbCo/nova
d156d7fdf241569da2c27ae02ec88e6ef448f7e2
[ "Apache-2.0" ]
13
2015-05-05T09:34:04.000Z
2017-11-08T02:03:46.000Z
# Copyright (c) 2012 NTT DOCOMO, INC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
38.986667
78
0.619699
from oslo.config import cfg from nova import context from nova import exception from nova.i18n import _ from nova.openstack.common import log as logging from nova.virt.baremetal import db as bmdb CONF = cfg.CONF LOG = logging.getLogger(__name__) class BareMetalVIFDriver(object): def _after_plug...
true
true
f71cd40457b398174b6dfb10bb74cacb3e7ed2d5
736
py
Python
Tutorials/Intro_To_NN/NNDL-solutions/code/chap6p2/exec_shifted_2sig.py
lev1khachatryan/ASDS_CV
c9f0c0412002e929bcb7cc2fc6e5392977a9fa76
[ "MIT" ]
5
2019-12-13T16:26:10.000Z
2020-01-10T07:44:05.000Z
Tutorials/Intro_To_NN/NNDL-solutions/code/chap6p2/exec_shifted_2sig.py
lev1khachatryan/ASDS_CV
c9f0c0412002e929bcb7cc2fc6e5392977a9fa76
[ "MIT" ]
1
2020-01-07T16:48:21.000Z
2020-03-18T18:43:37.000Z
Tutorials/Intro_To_NN/NNDL-solutions/code/chap6p2/exec_shifted_2sig.py
lev1khachatryan/ASDS_CV
c9f0c0412002e929bcb7cc2fc6e5392977a9fa76
[ "MIT" ]
null
null
null
import network3 from network3 import Network from network3 import ConvPoolLayer, FullyConnectedLayer, SoftmaxLayer training_data, validation_data, test_data = network3.load_data_shared() mini_batch_size = 10 net = Network([ ConvPoolLayer(image_shape=(mini_batch_size, 1, 28, 28), filter_sh...
46
71
0.633152
import network3 from network3 import Network from network3 import ConvPoolLayer, FullyConnectedLayer, SoftmaxLayer training_data, validation_data, test_data = network3.load_data_shared() mini_batch_size = 10 net = Network([ ConvPoolLayer(image_shape=(mini_batch_size, 1, 28, 28), filter_sh...
true
true
f71cd4211d3578ba41ce735db4be9c8ac9129dc8
83
py
Python
app/gis/__init__.py
athkishore/vgr
48cc04eb9136e7f1d0753173188c9ddbc730f1cb
[ "MIT" ]
null
null
null
app/gis/__init__.py
athkishore/vgr
48cc04eb9136e7f1d0753173188c9ddbc730f1cb
[ "MIT" ]
3
2016-02-15T02:36:05.000Z
2016-02-18T06:07:15.000Z
app/gis/__init__.py
athkishore/vgr
48cc04eb9136e7f1d0753173188c9ddbc730f1cb
[ "MIT" ]
null
null
null
from flask import Blueprint gis = Blueprint('gis', __name__) from . import views
13.833333
32
0.746988
from flask import Blueprint gis = Blueprint('gis', __name__) from . import views
true
true
f71cd48b6dfbc3793e7303d63dfae53f7d22f018
19,977
py
Python
pymongo/encryption.py
anryko/mongo-python-driver
eda4fbb1591bd88d58d5bd3452f82ed656e95b1c
[ "Apache-2.0" ]
4
2020-04-25T16:53:58.000Z
2020-04-30T20:43:06.000Z
pymongo/encryption.py
anryko/mongo-python-driver
eda4fbb1591bd88d58d5bd3452f82ed656e95b1c
[ "Apache-2.0" ]
30
2020-04-15T19:37:40.000Z
2020-04-22T21:19:35.000Z
pymongo/encryption.py
anryko/mongo-python-driver
eda4fbb1591bd88d58d5bd3452f82ed656e95b1c
[ "Apache-2.0" ]
2
2020-03-12T23:20:22.000Z
2021-02-15T21:54:02.000Z
# Copyright 2019-present MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
38.270115
79
0.638634
import contextlib import os import subprocess import uuid import weakref try: from pymongocrypt.auto_encrypter import AutoEncrypter from pymongocrypt.errors import MongoCryptError from pymongocrypt.explicit_encrypter import ExplicitEncrypter from pymongocrypt.mongocrypt import MongoCrypt...
true
true
f71cd544582f43f1165b14c78a32c371d80fe797
14,036
py
Python
stellargraph/mapper/mini_batch_node_generators.py
zblumen/stellargraph
10e62006907dd5968286f33648d1054e9c961c1b
[ "Apache-2.0" ]
null
null
null
stellargraph/mapper/mini_batch_node_generators.py
zblumen/stellargraph
10e62006907dd5968286f33648d1054e9c961c1b
[ "Apache-2.0" ]
null
null
null
stellargraph/mapper/mini_batch_node_generators.py
zblumen/stellargraph
10e62006907dd5968286f33648d1054e9c961c1b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2018-2020 Data61, CSIRO # # 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 applicabl...
38.245232
145
0.604731
__all__ = ["ClusterNodeGenerator", "ClusterNodeSequence"] import random import copy import numpy as np import networkx as nx from tensorflow.keras.utils import Sequence from scipy import sparse from ..core.graph import StellarGraph from ..core.utils import is_real_iterable class ClusterNodeGenerator...
true
true
f71cd723c890ed8cd37ed7a27760fb739e4bfcaf
2,832
py
Python
app/scraping.py
Jvism/web-scraper
3d3625f1831ca51d8c77e47e799c822e3e19d97d
[ "MIT" ]
null
null
null
app/scraping.py
Jvism/web-scraper
3d3625f1831ca51d8c77e47e799c822e3e19d97d
[ "MIT" ]
null
null
null
app/scraping.py
Jvism/web-scraper
3d3625f1831ca51d8c77e47e799c822e3e19d97d
[ "MIT" ]
null
null
null
import requests as req from bs4 import BeautifulSoup as bs import os def clearConsole(): command = 'clear' if os.name in ('nt', 'dos'): # If Machine is running on Windows, use cls command = 'cls' os.system(command) def soup_recover(url): request = req.get(url) return bs(request.text,featu...
27.495146
140
0.592514
import requests as req from bs4 import BeautifulSoup as bs import os def clearConsole(): command = 'clear' if os.name in ('nt', 'dos'): command = 'cls' os.system(command) def soup_recover(url): request = req.get(url) return bs(request.text,features="html.parser") def urls_extract(soup):...
true
true
f71cd7eb1d7001125af24fce5bc28d33488eb10f
1,313
py
Python
runtime/opt/taupage/init.d/06-update-sysctl.py
pc-alves/taupage
07025d45772d47b43e0a20d7ee21f10a6ff5162d
[ "Apache-2.0" ]
49
2015-04-14T13:55:10.000Z
2020-02-14T22:55:43.000Z
runtime/opt/taupage/init.d/06-update-sysctl.py
pc-alves/taupage
07025d45772d47b43e0a20d7ee21f10a6ff5162d
[ "Apache-2.0" ]
538
2015-04-01T10:53:09.000Z
2020-04-17T08:43:36.000Z
runtime/opt/taupage/init.d/06-update-sysctl.py
pc-alves/taupage
07025d45772d47b43e0a20d7ee21f10a6ff5162d
[ "Apache-2.0" ]
67
2015-05-05T19:48:30.000Z
2020-11-04T04:59:00.000Z
#!/usr/bin/env python3 import logging import sys import subprocess from taupage import configure_logging, get_config def main(): """Configure custom sysctl parameters If a sysctl section is present, add the valid parameters to sysctl and reloads. """ CUSTOM_SYSCTL_CONF = '/etc/sysctl.d/99-custom.co...
26.795918
88
0.638995
import logging import sys import subprocess from taupage import configure_logging, get_config def main(): CUSTOM_SYSCTL_CONF = '/etc/sysctl.d/99-custom.conf' configure_logging() config = get_config() sysctl = config.get('sysctl') if sysctl is None: sys.exit(0) try: sysct...
true
true
f71cd8d3024c1d478964feaae2c4352cb8ad6a81
852
py
Python
lib/utils.py
Titorat/SSrehab
6691ee1ed442073bfa00a51f0d9ab74b9252d302
[ "MIT" ]
null
null
null
lib/utils.py
Titorat/SSrehab
6691ee1ed442073bfa00a51f0d9ab74b9252d302
[ "MIT" ]
null
null
null
lib/utils.py
Titorat/SSrehab
6691ee1ed442073bfa00a51f0d9ab74b9252d302
[ "MIT" ]
null
null
null
# standard library from subprocess import run, PIPE from typing import List RUN_CMD_ONFAIL_EXITCODE = 22 def run_cmd(cmd: List[str]): """A wrapper around subprocess.run that nicely fails on a non-zero exit code""" if len(cmd) == 0: raise ValueError('cmd has to be a non-empty list') res = run(cm...
30.428571
83
0.651408
from subprocess import run, PIPE from typing import List RUN_CMD_ONFAIL_EXITCODE = 22 def run_cmd(cmd: List[str]): if len(cmd) == 0: raise ValueError('cmd has to be a non-empty list') res = run(cmd, stdout=PIPE, stderr=PIPE) if res.returncode != 0: print(f"command \"{cmd[0]}\" finishe...
true
true
f71cd9187dca0fd26b3cdbda0a4c8921d179e358
14,773
py
Python
python/helpers/pydev/pydevd_plugins/jinja2_debug.py
teddywest32/intellij-community
e0268d7a1da1d318b441001448cdd3e8929b2f29
[ "Apache-2.0" ]
null
null
null
python/helpers/pydev/pydevd_plugins/jinja2_debug.py
teddywest32/intellij-community
e0268d7a1da1d318b441001448cdd3e8929b2f29
[ "Apache-2.0" ]
11
2017-02-27T22:35:32.000Z
2021-12-24T08:07:40.000Z
python/helpers/pydev/pydevd_plugins/jinja2_debug.py
teddywest32/intellij-community
e0268d7a1da1d318b441001448cdd3e8929b2f29
[ "Apache-2.0" ]
null
null
null
import traceback from _pydevd_bundle.pydevd_breakpoints import LineBreakpoint, get_exception_name from _pydevd_bundle.pydevd_constants import get_thread_id, STATE_SUSPEND, dict_contains, dict_iter_items, dict_keys, JINJA2_SUSPEND from _pydevd_bundle.pydevd_comm import CMD_SET_BREAK, CMD_ADD_EXCEPTION_BREAK from _pydevd...
39.712366
131
0.646314
import traceback from _pydevd_bundle.pydevd_breakpoints import LineBreakpoint, get_exception_name from _pydevd_bundle.pydevd_constants import get_thread_id, STATE_SUSPEND, dict_contains, dict_iter_items, dict_keys, JINJA2_SUSPEND from _pydevd_bundle.pydevd_comm import CMD_SET_BREAK, CMD_ADD_EXCEPTION_BREAK from _pydevd...
true
true
f71cdcfa194966b2387e234194561a46582002fa
13,923
py
Python
log_casp_inh/model_141.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_casp_inh/model_141.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_casp_inh/model_141.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('C6A', ['C8pro']) Monomer('BaxA', ['BaxM', 'BaxA_1', 'BaxA_2', 'SmacM']) Monomer('Ligand', ['Receptor']) Monomer('C6pro', ['C3A']) Monome...
85.417178
598
0.808518
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('C6A', ['C8pro']) Monomer('BaxA', ['BaxM', 'BaxA_1', 'BaxA_2', 'SmacM']) Monomer('Ligand', ['Receptor']) Monomer('C6pro', ['C3A']) Monomer('ParpU', ['C3A']) Monomer('BidU'...
true
true
f71cdebb1cdf3286b45c66f1071264ecfee8c65a
873
py
Python
state/go_home.py
LHGames-2018/espace
ce9ed47fee285d60bf7183132d5686ad8198b70f
[ "MIT" ]
null
null
null
state/go_home.py
LHGames-2018/espace
ce9ed47fee285d60bf7183132d5686ad8198b70f
[ "MIT" ]
null
null
null
state/go_home.py
LHGames-2018/espace
ce9ed47fee285d60bf7183132d5686ad8198b70f
[ "MIT" ]
null
null
null
from state.machine import BaseState from helper import * import state class GoHomeState(BaseState): def action(self, game_state): my_pos = game_state_helper.get_my_position(game_state) poids, next_move = game_state_helper.get_home(game_state) if not next_move: vector = game_...
30.103448
83
0.635739
from state.machine import BaseState from helper import * import state class GoHomeState(BaseState): def action(self, game_state): my_pos = game_state_helper.get_my_position(game_state) poids, next_move = game_state_helper.get_home(game_state) if not next_move: vector = game_...
true
true
f71cdecd4a4c849ec91e2ee1edc93e4c72d44a98
1,158
py
Python
google/pubsub_v1/services/subscriber/transports/__init__.py
acocuzzo/python-pubsub
fcb67dd0d8fff5a583ebe0a3a08d0219601df8e9
[ "Apache-2.0" ]
null
null
null
google/pubsub_v1/services/subscriber/transports/__init__.py
acocuzzo/python-pubsub
fcb67dd0d8fff5a583ebe0a3a08d0219601df8e9
[ "Apache-2.0" ]
null
null
null
google/pubsub_v1/services/subscriber/transports/__init__.py
acocuzzo/python-pubsub
fcb67dd0d8fff5a583ebe0a3a08d0219601df8e9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
34.058824
81
0.780656
from collections import OrderedDict from typing import Dict, Type from .base import SubscriberTransport from .grpc import SubscriberGrpcTransport from .grpc_asyncio import SubscriberGrpcAsyncIOTransport _transport_registry = OrderedDict() _transport_registry["grpc"] = SubscriberGrpcTransport _trans...
true
true
f71cdf394d949f1c6fa70b3924bafe111b4036a5
692
py
Python
cumulusci/cli/logger.py
jayhatha/CumulusCI
b3864621d3aca72dec669339af08657526582344
[ "BSD-3-Clause" ]
null
null
null
cumulusci/cli/logger.py
jayhatha/CumulusCI
b3864621d3aca72dec669339af08657526582344
[ "BSD-3-Clause" ]
null
null
null
cumulusci/cli/logger.py
jayhatha/CumulusCI
b3864621d3aca72dec669339af08657526582344
[ "BSD-3-Clause" ]
null
null
null
""" CLI logger """ from __future__ import unicode_literals import logging import coloredlogs import requests def init_logger(log_requests=False): """ Initialize the logger """ logger = logging.getLogger(__name__.split(".")[0]) for handler in logger.handlers: # pragma: nocover logger.removeHand...
25.62963
76
0.722543
from __future__ import unicode_literals import logging import coloredlogs import requests def init_logger(log_requests=False): logger = logging.getLogger(__name__.split(".")[0]) for handler in logger.handlers: logger.removeHandler(handler) formatter = coloredlogs.ColoredFormatter(fmt="%(asct...
true
true
f71ce1aa0ef3d6fbbb1c1d05ae5adc8f5fcb088b
25,861
py
Python
pint/testsuite/test_issues.py
clarkgwillison/pint
03be0544b749ee55fbd1253d18e2a84151dce716
[ "BSD-3-Clause" ]
2
2020-07-08T20:09:35.000Z
2021-03-05T12:51:30.000Z
pint/testsuite/test_issues.py
clarkgwillison/pint
03be0544b749ee55fbd1253d18e2a84151dce716
[ "BSD-3-Clause" ]
null
null
null
pint/testsuite/test_issues.py
clarkgwillison/pint
03be0544b749ee55fbd1253d18e2a84151dce716
[ "BSD-3-Clause" ]
null
null
null
import copy import math import pprint import unittest import pytest from pint import Context, DimensionalityError, UnitRegistry from pint.compat import np from pint.testsuite import QuantityTestCase, helpers from pint.unit import UnitsContainer from pint.util import ParserHelper ureg = UnitRegistry() class TestIss...
33.369032
88
0.560806
import copy import math import pprint import unittest import pytest from pint import Context, DimensionalityError, UnitRegistry from pint.compat import np from pint.testsuite import QuantityTestCase, helpers from pint.unit import UnitsContainer from pint.util import ParserHelper ureg = UnitRegistry() class TestIss...
true
true
f71ce24d91b286d5f0da039e4c82f07b1fcc56b0
4,427
py
Python
libs/trans/handler_0_1.py
StrayCamel247/Daily_utils
9feeb09ebcf5ad5d3b91ab3c59e7c16855a51944
[ "Apache-2.0" ]
1
2020-12-11T13:57:46.000Z
2020-12-11T13:57:46.000Z
libs/trans/handler_0_1.py
StrayCamel247/Daily_utils
9feeb09ebcf5ad5d3b91ab3c59e7c16855a51944
[ "Apache-2.0" ]
null
null
null
libs/trans/handler_0_1.py
StrayCamel247/Daily_utils
9feeb09ebcf5ad5d3b91ab3c59e7c16855a51944
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # __author__ : stray_camel # __description__ : trans_0_1 # __REFERENCES__ : https://blog.csdn.net/qq_42544196/article/details/106468658;https://docs.python.org/3/library/logging.html # __date__: 2020/12/11 15 import datetime import logging from pathlib import Path import random...
29.125
125
0.550486
import datetime import logging from pathlib import Path import random import re import sys import threading import time from functools import wraps from hashlib import md5 from typing import Any import requests def logger_set(): logger = logging.getLogger() logsf_loder = Path('./logs') lo...
true
true
f71ce2dda7e8afdb46370fe9f341989c34e72ab8
5,864
py
Python
tensorflow_datasets/testing/mocking.py
robbjr/datasets
fbb2af9d0e88f8e2ae884e9764fbeff2ee487813
[ "Apache-2.0" ]
1
2019-10-12T08:05:11.000Z
2019-10-12T08:05:11.000Z
tensorflow_datasets/testing/mocking.py
robbjr/datasets
fbb2af9d0e88f8e2ae884e9764fbeff2ee487813
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/testing/mocking.py
robbjr/datasets
fbb2af9d0e88f8e2ae884e9764fbeff2ee487813
[ "Apache-2.0" ]
1
2019-12-14T00:32:08.000Z
2019-12-14T00:32:08.000Z
# coding=utf-8 # Copyright 2019 The TensorFlow Datasets Authors. # # 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 appl...
34.698225
110
0.722715
from __future__ import absolute_import from __future__ import division from __future__ import print_function import contextlib import os import random from absl.testing import absltest import numpy as np import tensorflow as tf from tensorflow_datasets.core import features as features_lib @contextl...
true
true
f71ce321bd7159819de5bbecec6b6484d3ec718a
12,450
py
Python
spyder/plugins/editor/utils/tests/test_autosave.py
Earthman100/spyder
949ce0f9100a69504c70a5678e8589a05aee7d38
[ "MIT" ]
7,956
2015-02-17T01:19:09.000Z
2022-03-31T21:52:15.000Z
spyder/plugins/editor/utils/tests/test_autosave.py
Earthman100/spyder
949ce0f9100a69504c70a5678e8589a05aee7d38
[ "MIT" ]
16,326
2015-02-16T23:15:21.000Z
2022-03-31T23:34:34.000Z
spyder/plugins/editor/utils/tests/test_autosave.py
Earthman100/spyder
949ce0f9100a69504c70a5678e8589a05aee7d38
[ "MIT" ]
1,918
2015-02-20T19:26:26.000Z
2022-03-31T19:03:25.000Z
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # """Tests for autosave.py""" # Standard library imports import ast import os.path as osp # Third party imports import pytest # Local imports from spyder.plugins.editor.utils.autosave import (AutosaveFor...
38.544892
78
0.693574
import ast import os.path as osp import pytest from spyder.plugins.editor.utils.autosave import (AutosaveForStack, AutosaveForPlugin) def test_autosave_component_set_interval(mocker): mocker.patch.object(AutosaveForPlugin, 'do_autosave') addon = Aut...
true
true
f71ce3a01442e4158b8f21fcbecc9788b785237a
2,662
py
Python
rocon_client_sdk_py/virtual_core/actions/action_dock.py
boklae/rocon_client_sdk_py
47ffd3a466fbbcb43f77338eddd9a9fa32b3a763
[ "MIT" ]
null
null
null
rocon_client_sdk_py/virtual_core/actions/action_dock.py
boklae/rocon_client_sdk_py
47ffd3a466fbbcb43f77338eddd9a9fa32b3a763
[ "MIT" ]
1
2021-06-08T21:01:30.000Z
2021-06-08T21:01:30.000Z
rocon_client_sdk_py/virtual_core/actions/action_dock.py
boklae/rocon_client_sdk_py
47ffd3a466fbbcb43f77338eddd9a9fa32b3a763
[ "MIT" ]
null
null
null
from rocon_client_sdk_py.virtual_core.actions.base import Action import asyncio import pydash from rocon_client_sdk_py.virtual_core.path_planner import PathPlanner class Dock(Action): def __init__(self): self.name = 'Dock' self.func_name = 'dock' async def on_define(self, context): pr...
35.026316
122
0.597295
from rocon_client_sdk_py.virtual_core.actions.base import Action import asyncio import pydash from rocon_client_sdk_py.virtual_core.path_planner import PathPlanner class Dock(Action): def __init__(self): self.name = 'Dock' self.func_name = 'dock' async def on_define(self, context): pr...
true
true
f71ce3f2ed68163326db9d66587e4654492691b3
3,152
py
Python
backend/chat/models.py
crowdbotics-apps/dsfs-28863
fea2672275927bd37d23e2267273e0eae54340d2
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/chat/models.py
crowdbotics-apps/dsfs-28863
fea2672275927bd37d23e2267273e0eae54340d2
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/chat/models.py
crowdbotics-apps/dsfs-28863
fea2672275927bd37d23e2267273e0eae54340d2
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.conf import settings from django.db import models class ForwardedMessage(models.Model): "Generated Model" message = models.ForeignKey( "chat.Message", on_delete=models.CASCADE, related_name="forwardedmessage_message", ) forwarded_by = models.ForeignKey( "cha...
25.626016
53
0.659581
from django.conf import settings from django.db import models class ForwardedMessage(models.Model): message = models.ForeignKey( "chat.Message", on_delete=models.CASCADE, related_name="forwardedmessage_message", ) forwarded_by = models.ForeignKey( "chat_user_profile.Profile...
true
true
f71ce4194dd771aa309e312526fdfe217a9bdfea
2,299
py
Python
src/models/vectorTraining.py
Will03/NVSM_pytorch
45e91efa6e4571a955c0f76807f2d6b5d7ffa66a
[ "MIT" ]
null
null
null
src/models/vectorTraining.py
Will03/NVSM_pytorch
45e91efa6e4571a955c0f76807f2d6b5d7ffa66a
[ "MIT" ]
null
null
null
src/models/vectorTraining.py
Will03/NVSM_pytorch
45e91efa6e4571a955c0f76807f2d6b5d7ffa66a
[ "MIT" ]
1
2020-06-04T06:45:43.000Z
2020-06-04T06:45:43.000Z
import numpy as np from sklearn.metrics.pairwise import cosine_similarity from sklearn.feature_extraction.text import TfidfVectorizer import os dataPath = '../../Willll/' # Relative path of homework data # r=root, d=directories, f = files DocList = [] QueryList = [] DocData = [] QueryData = [] def articleParser...
28.7375
88
0.675511
import numpy as np from sklearn.metrics.pairwise import cosine_similarity from sklearn.feature_extraction.text import TfidfVectorizer import os dataPath = '../../Willll/' DocList = [] QueryList = [] DocData = [] QueryData = [] def articleParser(myPath): with open(myPath, 'r') as fp: docData = fp.r...
true
true
f71ce456b76c3630058e368b142c7aeace1c9037
4,589
py
Python
Final.min.py
faiyazsamin/FaceRecognition
9c0bd65f300784910a923f446cf33bacfc502b52
[ "MIT" ]
1
2019-01-27T11:05:11.000Z
2019-01-27T11:05:11.000Z
Final.min.py
faiyazsamin/FaceRecognition
9c0bd65f300784910a923f446cf33bacfc502b52
[ "MIT" ]
null
null
null
Final.min.py
faiyazsamin/FaceRecognition
9c0bd65f300784910a923f446cf33bacfc502b52
[ "MIT" ]
null
null
null
import cv2 import numpy as np import os subjects = ["","Mama","Samin","Delwar"] def detect_faces(colored_img, scaleFactor=1.06): img_copy = colored_img.copy() gray = cv2.cvtColor(img_copy, cv2.COLOR_BGR2GRAY) f_cascade = cv2.CascadeClassifier('data/lbpcascade_frontalface.xml') faces = f_cascade.dete...
32.546099
119
0.619961
import cv2 import numpy as np import os subjects = ["","Mama","Samin","Delwar"] def detect_faces(colored_img, scaleFactor=1.06): img_copy = colored_img.copy() gray = cv2.cvtColor(img_copy, cv2.COLOR_BGR2GRAY) f_cascade = cv2.CascadeClassifier('data/lbpcascade_frontalface.xml') faces = f_cascade.dete...
true
true
f71ce46ec0f8659d23bb2988ab53f559e7e4f0b9
838
py
Python
oscar/lib/python2.7/site-packages/phonenumbers/data/region_883.py
AMuratTuran/mkn
557086426773ced10d82c969304bd349414a601e
[ "BSD-3-Clause" ]
4
2018-10-19T04:36:20.000Z
2020-02-13T16:14:09.000Z
oscar/lib/python2.7/site-packages/phonenumbers/data/region_883.py
AMuratTuran/mkn
557086426773ced10d82c969304bd349414a601e
[ "BSD-3-Clause" ]
5
2020-03-24T16:37:25.000Z
2021-06-10T21:24:54.000Z
upibo-venv/Lib/site-packages/phonenumbers/data/region_883.py
smbpgroup/upibo
625dcda9f9692c62aeb9fe8f7123a5d407c610ae
[ "BSD-3-Clause" ]
null
null
null
"""Auto-generated file, do not edit by hand. 883 metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_883 = PhoneMetadata(id='001', country_code=883, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='51\\d{7}(?:\\d{3})?', possible_length...
83.8
143
0.650358
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_883 = PhoneMetadata(id='001', country_code=883, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='51\\d{7}(?:\\d{3})?', possible_length=(9, 12)), voip=PhoneNumberDesc(national_number_pattern='...
true
true
f71ce4ec1624e15791c2a9cbe2ce17cdd55390d6
733
py
Python
mycloud/drive/filesystem/file_version.py
ThomasGassmann/swisscom-my-cloud-backup
97e222c45a54197c82c8f3a5d59aa20bf3382ed8
[ "MIT" ]
4
2019-11-28T22:10:43.000Z
2022-01-23T15:18:26.000Z
mycloud/drive/filesystem/file_version.py
ThomasGassmann/swisscom-my-cloud-backup
97e222c45a54197c82c8f3a5d59aa20bf3382ed8
[ "MIT" ]
18
2019-01-20T22:30:48.000Z
2020-06-09T21:16:07.000Z
mycloud/drive/filesystem/file_version.py
thomasgassmann/mycloud-cli
97e222c45a54197c82c8f3a5d59aa20bf3382ed8
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from mycloud.common import sha256_file from mycloud.constants import VERSION_HASH_LENGTH class CalculatableVersion(ABC): @abstractmethod def calculate_version(self): raise NotImplementedError() class BasicStringVersion(CalculatableVersion): def __init__(sel...
22.212121
65
0.740791
from abc import ABC, abstractmethod from mycloud.common import sha256_file from mycloud.constants import VERSION_HASH_LENGTH class CalculatableVersion(ABC): @abstractmethod def calculate_version(self): raise NotImplementedError() class BasicStringVersion(CalculatableVersion): def __init__(sel...
true
true
f71ce668eb491f3489debb1b15bbb8e0d468f1c4
4,724
py
Python
pyzoo/test/zoo/zouwu/autots/test_auto_ts.py
ankitdobhal/analytics-zoo
b8374bcd6c73bba49fe0b0ab075528cdd94cf2af
[ "Apache-2.0" ]
null
null
null
pyzoo/test/zoo/zouwu/autots/test_auto_ts.py
ankitdobhal/analytics-zoo
b8374bcd6c73bba49fe0b0ab075528cdd94cf2af
[ "Apache-2.0" ]
1
2020-04-17T02:41:28.000Z
2020-04-20T02:37:41.000Z
pyzoo/test/zoo/zouwu/autots/test_auto_ts.py
ankitdobhal/analytics-zoo
b8374bcd6c73bba49fe0b0ab075528cdd94cf2af
[ "Apache-2.0" ]
1
2020-12-21T11:48:49.000Z
2020-12-21T11:48:49.000Z
# # Copyright 2018 Analytics Zoo Authors. # # 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...
39.041322
91
0.575783
import pytest import numpy as np from test.zoo.pipeline.utils.test_utils import ZooTestCase from zoo.automl.config.recipe import LSTMGridRandomRecipe, MTNetGridRandomRecipe from zoo.zouwu.autots.forecast import AutoTSTrainer from zoo.zouwu.autots.forecast import TSPipeline import pandas as pd @pytes...
true
true
f71ce6ddebc57474b11797d83db4b3270ece5414
2,689
py
Python
src/reports_api/models/phase_code.py
dinesh-aot/eao-project-reports
f2741d381371fb9a65b6b9f9909161eb333a7b21
[ "Apache-2.0" ]
null
null
null
src/reports_api/models/phase_code.py
dinesh-aot/eao-project-reports
f2741d381371fb9a65b6b9f9909161eb333a7b21
[ "Apache-2.0" ]
8
2022-02-14T23:21:52.000Z
2022-03-30T20:04:19.000Z
src/reports_api/models/phase_code.py
dinesh-aot/eao-project-reports
f2741d381371fb9a65b6b9f9909161eb333a7b21
[ "Apache-2.0" ]
4
2022-02-14T23:22:50.000Z
2022-02-16T17:40:28.000Z
# Copyright © 2019 Province of British Columbia # # 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 agr...
39.544118
115
0.661212
from sqlalchemy import Boolean, Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from .code_table import CodeTable from .db import db class PhaseCode(db.Model, CodeTable): __tablename__ = 'phase_codes' id = Column(Integer, primary_key=True, autoincrement=True) ...
true
true
f71ce75531d655af08723237dc7e58101caae903
554
py
Python
Python/leetcode.252.meeting-rooms.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
4
2015-10-10T00:30:55.000Z
2020-07-27T19:45:54.000Z
Python/leetcode.252.meeting-rooms.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
null
null
null
Python/leetcode.252.meeting-rooms.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
null
null
null
# Definition for an interval. # class Interval(object): # def __init__(self, s=0, e=0): # self.start = s # self.end = e class Solution(object): def canAttendMeetings(self, intervals): """ :type intervals: List[Interval] :rtype: bool """ if len(intervals) ...
27.7
55
0.534296
class Solution(object): def canAttendMeetings(self, intervals): if len(intervals) < 2: return True intervals.sort(key = lambda x: x.start) for i in xrange(1, len(intervals)): if intervals[i-1].end > intervals[i].start: return False return...
true
true
f71ce7d27a7503b6d207689cfb75ccb7b36f12cd
9,482
py
Python
code/pytorch/methods/SSAC.py
hzm2016/assistive-gym-robosuite
5c529f4444cc386383618bfa584341740a8468f9
[ "MIT" ]
1
2021-11-22T07:45:28.000Z
2021-11-22T07:45:28.000Z
code/pytorch/methods/SSAC.py
hzm2016/assistive-gym-robosuite
5c529f4444cc386383618bfa584341740a8468f9
[ "MIT" ]
null
null
null
code/pytorch/methods/SSAC.py
hzm2016/assistive-gym-robosuite
5c529f4444cc386383618bfa584341740a8468f9
[ "MIT" ]
null
null
null
import os import torch import torch.nn.functional as F import glob import numpy as np from torch.optim import Adam from utils.utils import soft_update, hard_update from utils.model import GaussianPolicy, QNetwork, DeterministicPolicy from keras.models import Sequential, Model from keras.layers import Dense, Dropout, In...
39.508333
118
0.626977
import os import torch import torch.nn.functional as F import glob import numpy as np from torch.optim import Adam from utils.utils import soft_update, hard_update from utils.model import GaussianPolicy, QNetwork, DeterministicPolicy from keras.models import Sequential, Model from keras.layers import Dense, Dropout, In...
true
true
f71ce7dd49a7ba035fc78f709cfd97e3e48d60f3
1,963
py
Python
tests/integration/test_image.py
youngjun0627/backend.ai-client-py
be7c174ab73e112fdb8be61e6affc20fc72f7d59
[ "MIT" ]
7
2019-01-18T08:08:42.000Z
2022-02-10T00:36:24.000Z
tests/integration/test_image.py
youngjun0627/backend.ai-client-py
be7c174ab73e112fdb8be61e6affc20fc72f7d59
[ "MIT" ]
179
2017-09-07T04:54:44.000Z
2022-03-29T11:30:47.000Z
tests/integration/test_image.py
youngjun0627/backend.ai-client-py
be7c174ab73e112fdb8be61e6affc20fc72f7d59
[ "MIT" ]
13
2017-09-08T05:37:44.000Z
2021-09-14T23:35:31.000Z
import pytest from ai.backend.client.exceptions import BackendAPIError from ai.backend.client.session import Session # module-level marker pytestmark = pytest.mark.integration @pytest.mark.asyncio async def test_list_images_by_admin(): with Session() as sess: images = sess.Image.list() image = i...
30.2
77
0.65512
import pytest from ai.backend.client.exceptions import BackendAPIError from ai.backend.client.session import Session pytestmark = pytest.mark.integration @pytest.mark.asyncio async def test_list_images_by_admin(): with Session() as sess: images = sess.Image.list() image = images[0] assert l...
true
true
f71ce86c8da0066e9a06c434d7f057156813ebaa
1,012
bzl
Python
third_party/llvm/workspace.bzl
Georgeiva/tensorflow
1c0b85a0d49c27a5a5beec26c3e9ffceebb89652
[ "Apache-2.0" ]
2
2021-06-17T21:26:38.000Z
2021-06-20T18:25:57.000Z
third_party/llvm/workspace.bzl
craymichael/tensorflow
b5de565c9c57fa7ca02d42bcfe6f470ecf117ba5
[ "Apache-2.0" ]
null
null
null
third_party/llvm/workspace.bzl
craymichael/tensorflow
b5de565c9c57fa7ca02d42bcfe6f470ecf117ba5
[ "Apache-2.0" ]
null
null
null
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "366df11a35392c946678f1af94038945c23f06c8" LLVM_SHA256 = "cd720387229e8ee74cc9d7d685a298c709fb2bdb2063301e509f40dacbdbaaea" tf_http_archive( ...
40.48
149
0.655138
load("//third_party:repo.bzl", "tf_http_archive") def repo(name): LLVM_COMMIT = "366df11a35392c946678f1af94038945c23f06c8" LLVM_SHA256 = "cd720387229e8ee74cc9d7d685a298c709fb2bdb2063301e509f40dacbdbaaea" tf_http_archive( name = name, sha256 = LLVM_SHA256, strip_prefix = "llvm-proj...
true
true
f71ce9fb21782d5e8358c36fd801ad537ff4f7fd
4,469
py
Python
src/mockdown/instantiation/prolog/logic.py
MangoTeam/mockdown
6f42395b07a3a83d5a3703d30985ef5a5068bf09
[ "MIT" ]
null
null
null
src/mockdown/instantiation/prolog/logic.py
MangoTeam/mockdown
6f42395b07a3a83d5a3703d30985ef5a5068bf09
[ "MIT" ]
2
2022-01-13T03:52:58.000Z
2022-03-12T01:03:41.000Z
src/mockdown/instantiation/prolog/logic.py
MangoTeam/mockdown
6f42395b07a3a83d5a3703d30985ef5a5068bf09
[ "MIT" ]
null
null
null
import operator from importlib import resources from typing import List, Tuple, Generator from pyswip import Prolog # type: ignore from mockdown.constraint import ConstraintKind from mockdown.constraint.factory import ConstraintFactory from mockdown.model import Attribute, IView, IAnchor, AnchorID from mockdown.cons...
44.247525
113
0.492504
import operator from importlib import resources from typing import List, Tuple, Generator from pyswip import Prolog from mockdown.constraint import ConstraintKind from mockdown.constraint.factory import ConstraintFactory from mockdown.model import Attribute, IView, IAnchor, AnchorID from mockdown.constraint import ...
true
true
f71cea51ce51965931a25dc006e4538270b7dc22
723
py
Python
QCodes/paliandromLinkedListStack.py
Rakeshgsekhar/DataStructure
8c7eb4ec02cdba7975b834180c0c66269595bd13
[ "MIT" ]
null
null
null
QCodes/paliandromLinkedListStack.py
Rakeshgsekhar/DataStructure
8c7eb4ec02cdba7975b834180c0c66269595bd13
[ "MIT" ]
null
null
null
QCodes/paliandromLinkedListStack.py
Rakeshgsekhar/DataStructure
8c7eb4ec02cdba7975b834180c0c66269595bd13
[ "MIT" ]
null
null
null
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def isPalindrome(self, head: ListNode) : num = [] temp = head isPalin = True # if head is not None and head.next is N...
27.807692
52
0.485477
class Solution: def isPalindrome(self, head: ListNode) : num = [] temp = head isPalin = True while temp is not None: num.append(temp.val) temp = temp.next while head is not None: stackVal = num.pop() ...
true
true
f71ceadeedb16d3ad0d95606d9452ed423823bb7
6,060
py
Python
galaxy/corals_database/galaxy_integration/version_1909/lib/galaxy/model/orm/scripts.py
skitchen19/galaxy_tools
b935f36cfe430263564503ebb71f78dc79315acb
[ "MIT" ]
3
2017-04-05T18:01:59.000Z
2019-05-03T14:15:31.000Z
galaxy/corals_database/galaxy_integration/version_1909/lib/galaxy/model/orm/scripts.py
skitchen19/galaxy_tools
b935f36cfe430263564503ebb71f78dc79315acb
[ "MIT" ]
6
2019-02-27T15:45:58.000Z
2021-01-12T15:18:50.000Z
galaxy/corals_database/galaxy_integration/version_1909/lib/galaxy/model/orm/scripts.py
skitchen19/galaxy_tools
b935f36cfe430263564503ebb71f78dc79315acb
[ "MIT" ]
2
2018-10-26T18:36:39.000Z
2019-01-28T15:12:39.000Z
""" Code to support database helper scripts (create_db.py, manage_db.py, etc...). """ import argparse import logging import os import sys from migrate.versioning.shell import main as migrate_main from galaxy.util.path import get_ext from galaxy.util.properties import find_config_file, get_data_dir, load_app_propertie...
39.350649
123
0.637129
import argparse import logging import os import sys from migrate.versioning.shell import main as migrate_main from galaxy.util.path import get_ext from galaxy.util.properties import find_config_file, get_data_dir, load_app_properties from galaxy.util.script import populate_config_args log = logging.getLogger(__name...
true
true
f71ceba5ece68ddf805973aced707d2db383d881
2,136
py
Python
test/IDL/IDLSUFFIXES.py
andrewyoung1991/scons
7517c277e23bc04e3809a9bf0793cdfe00097a58
[ "MIT" ]
1
2015-11-04T22:22:10.000Z
2015-11-04T22:22:10.000Z
test/IDL/IDLSUFFIXES.py
azverkan/scons
704ddb9270e14c7771d0c58c04c7afa7bc009603
[ "MIT" ]
null
null
null
test/IDL/IDLSUFFIXES.py
azverkan/scons
704ddb9270e14c7771d0c58c04c7afa7bc009603
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
27.74026
73
0.719101
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons test = TestSCons.TestSCons() test.write('SConstruct', """ import SCons.Scanner.IDL env = Environment(CPPPATH=['.']) env.Append(SCANNERS = [ SCons.Scanner.IDL.IDLScan() ], IDLSUFFIXES = ['.x']) env.Insta...
true
true
f71cec55b1240dbdb58f8cf34afefd358b086e1e
4,909
py
Python
src/cicflowmeter/flow_session.py
ZhuMon/cicflowmeter
ca31b0d4461754f421610a5ce75eb8914753d74e
[ "MIT" ]
null
null
null
src/cicflowmeter/flow_session.py
ZhuMon/cicflowmeter
ca31b0d4461754f421610a5ce75eb8914753d74e
[ "MIT" ]
null
null
null
src/cicflowmeter/flow_session.py
ZhuMon/cicflowmeter
ca31b0d4461754f421610a5ce75eb8914753d74e
[ "MIT" ]
null
null
null
import csv import time from collections import defaultdict from scapy.sessions import DefaultSession from scapy.all import wrpcap from .features.context.packet_direction import PacketDirection from .features.context.packet_flow_key import get_packet_flow_key from .flow import Flow EXPIRED_UPDATE = 40 MACHINE_LEARNIN...
33.855172
101
0.598696
import csv import time from collections import defaultdict from scapy.sessions import DefaultSession from scapy.all import wrpcap from .features.context.packet_direction import PacketDirection from .features.context.packet_flow_key import get_packet_flow_key from .flow import Flow EXPIRED_UPDATE = 40 MACHINE_LEARNIN...
true
true
f71cec880a8d2569d0b6f4835d13dbc7f5354126
47,163
py
Python
python/ccxt/binance.py
ivankia/phpbot
78e68a748171b68408f86a436188baafd71135bc
[ "MIT" ]
13
2019-01-26T14:41:37.000Z
2022-03-26T03:33:12.000Z
python/ccxt/binance.py
tiancai110a/ccxt
2521001c6c3ba4078b580b692f3256319198b10a
[ "MIT" ]
null
null
null
python/ccxt/binance.py
tiancai110a/ccxt
2521001c6c3ba4078b580b692f3256319198b10a
[ "MIT" ]
12
2018-12-24T02:19:02.000Z
2022-03-26T05:04:25.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import math import json from ccxt.base.errors import ExchangeError from ccxt.base.errors import Aut...
42.374663
355
0.468588
ge import Exchange import math import json from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import InvalidOrder from ccxt.base.errors import OrderNotFound fro...
true
true
f71ced92e40f1740937111306959303ed4663fa3
9,781
py
Python
test.py
erprashu/Metal_erning
79d1a6a457be37258df50a9194946caeb86845a2
[ "MIT" ]
null
null
null
test.py
erprashu/Metal_erning
79d1a6a457be37258df50a9194946caeb86845a2
[ "MIT" ]
null
null
null
test.py
erprashu/Metal_erning
79d1a6a457be37258df50a9194946caeb86845a2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import argparse import torch import torch.nn.functional as F from torch.utils.data import DataLoader from torch.autograd import Variable from tqdm import tqdm from models.protonet_embedding import ProtoNetEmbedding from models.R2D2_embedding import R2D2Embedding from models.ResNet12_embeddin...
39.922449
166
0.630815
import argparse import torch import torch.nn.functional as F from torch.utils.data import DataLoader from torch.autograd import Variable from tqdm import tqdm from models.protonet_embedding import ProtoNetEmbedding from models.R2D2_embedding import R2D2Embedding from models.ResNet12_embedding import resnet12 from...
true
true
f71cee5ae51aff0ff873d978caa5e27b2de22765
2,707
py
Python
ganggu/asynctask.py
xuecan/ganggu
f3d3727fc8228b899d2e2c7ebe99b9e4a9926a09
[ "MIT" ]
null
null
null
ganggu/asynctask.py
xuecan/ganggu
f3d3727fc8228b899d2e2c7ebe99b9e4a9926a09
[ "MIT" ]
null
null
null
ganggu/asynctask.py
xuecan/ganggu
f3d3727fc8228b899d2e2c7ebe99b9e4a9926a09
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (C) 2012-2016 Xue Can <xuecan@gmail.com> and contributors. # Licensed under the MIT license: http://opensource.org/licenses/mit-license """ Celery 应用程序生成器 Celery 应用程序的配置众多,这里提供一个快速的生成器,避免经常需要查阅手册。 本模块根据 Celery 4.0.0rc4 重新编写。配置详情请参考: * http://docs.celeryproject.org/en/master/userg...
27.907216
76
0.674917
import celery if '4.0.0' > celery.__version__: raise RuntimeError('Require celery 4.0.0rc4 or up') from celery import Celery from kombu.exceptions import OperationalError from .datastructures import Object def make_worker(name, set_as_current=True): name = str(name) worker = Celery(name, set_as_curr...
true
true
f71ceecd29d1f9ce5d1bf239127cbd90242a62b2
7,255
py
Python
src/layers/xfmr.py
uw-bionlp/ards
e9fc27f7034cc6b54f0ccdba4a58377948cf0258
[ "BSD-3-Clause" ]
null
null
null
src/layers/xfmr.py
uw-bionlp/ards
e9fc27f7034cc6b54f0ccdba4a58377948cf0258
[ "BSD-3-Clause" ]
null
null
null
src/layers/xfmr.py
uw-bionlp/ards
e9fc27f7034cc6b54f0ccdba4a58377948cf0258
[ "BSD-3-Clause" ]
null
null
null
import torch from tqdm import tqdm from transformers import AutoTokenizer, AutoModel import logging from torch.nn import ConstantPad3d, ConstantPad2d from layers.utils import set_model_device, set_tensor_device ''' tutorial4 tokenization https://mccormickml.com/2019/07/22/BERT-fine-tuning/ how to use clinical ...
26.478102
107
0.596554
import torch from tqdm import tqdm from transformers import AutoTokenizer, AutoModel import logging from torch.nn import ConstantPad3d, ConstantPad2d from layers.utils import set_model_device, set_tensor_device INPUT_IDS = 'input_ids' ATTENTION_MASK = 'attention_mask' OFFSET_MAPPING = 'offset_mapping' PRETRAINE...
true
true
f71ceed56868a5e9294f76930727f0329ca98560
113
py
Python
docs/docs_app/not_found.py
glsdown/dash-loading-spinners
5fdfe9fc439b6c7aa624c23fb72123b785c9de8e
[ "MIT" ]
14
2021-06-21T16:34:20.000Z
2022-02-25T21:42:30.000Z
docs/docs_app/not_found.py
glsdown/dash-loading-spinners
5fdfe9fc439b6c7aa624c23fb72123b785c9de8e
[ "MIT" ]
null
null
null
docs/docs_app/not_found.py
glsdown/dash-loading-spinners
5fdfe9fc439b6c7aa624c23fb72123b785c9de8e
[ "MIT" ]
null
null
null
import dash_bootstrap_components as dbc layout = dbc.Jumbotron(["404 - Not Found"], className="h4 text-danger")
28.25
71
0.761062
import dash_bootstrap_components as dbc layout = dbc.Jumbotron(["404 - Not Found"], className="h4 text-danger")
true
true
f71ceed8923c4307e3f9f61c40b8ca31ec7f9d14
3,034
py
Python
MxShop/extra_apps/xadmin/views/website.py
youshuad/django-vue-shop
dbede2301b10cb95ef30d0bbbbd594b240071fc1
[ "MIT" ]
null
null
null
MxShop/extra_apps/xadmin/views/website.py
youshuad/django-vue-shop
dbede2301b10cb95ef30d0bbbbd594b240071fc1
[ "MIT" ]
null
null
null
MxShop/extra_apps/xadmin/views/website.py
youshuad/django-vue-shop
dbede2301b10cb95ef30d0bbbbd594b240071fc1
[ "MIT" ]
null
null
null
from __future__ import absolute_import from django.utils.translation import ugettext as _ from django.contrib.auth import REDIRECT_FIELD_NAME from django.views.decorators.cache import never_cache # from django.contrib.auth import login,logout,authenticate from django.contrib.auth.views import LoginView as login from dj...
29.456311
84
0.66381
from __future__ import absolute_import from django.utils.translation import ugettext as _ from django.contrib.auth import REDIRECT_FIELD_NAME from django.views.decorators.cache import never_cache from django.contrib.auth.views import LoginView as login from django.contrib.auth.views import LogoutView as logout from dj...
true
true
f71ceefdeb70227f2eeec78efabe0c05cba65a6e
5,151
py
Python
docs-src/source/conf.py
daxnet/apworks-core
29347f7fe93fa547c3cdfdbf5eec31fc1a4dcb32
[ "Apache-2.0" ]
212
2017-02-25T07:56:35.000Z
2022-03-29T01:58:48.000Z
docs-src/source/conf.py
dahaoniuniu/apworks-core
580492f0d03633a4a1099b44dd967a06d8fb8308
[ "Apache-2.0" ]
7
2017-04-08T14:06:49.000Z
2021-03-30T12:58:06.000Z
docs-src/source/conf.py
dahaoniuniu/apworks-core
580492f0d03633a4a1099b44dd967a06d8fb8308
[ "Apache-2.0" ]
59
2017-04-03T06:47:10.000Z
2021-08-18T05:40:47.000Z
# -*- coding: utf-8 -*- # # Apworks documentation build configuration file, created by # sphinx-quickstart on Sat Mar 25 15:41:49 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
28.938202
79
0.677732
extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'Apworks' copyright = u'2017, Sunny Chen' author = u'Sunny Chen' # |version| and |release|, also used in various other places throughout the # built documents. # # The shor...
true
true
f71cf026b7d351eb49d776725321c404f4254c2b
1,032
py
Python
proxy_client.py
AcidCannon/CMPUT404.W2021.LAB2
cb680f98bc625415a4fb25bc091e802ba05df238
[ "Apache-2.0" ]
null
null
null
proxy_client.py
AcidCannon/CMPUT404.W2021.LAB2
cb680f98bc625415a4fb25bc091e802ba05df238
[ "Apache-2.0" ]
null
null
null
proxy_client.py
AcidCannon/CMPUT404.W2021.LAB2
cb680f98bc625415a4fb25bc091e802ba05df238
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import socket # CONSTANTS OUTBOUND_HOST = "127.0.0.1" OUTBOUND_PORT = 8001 OUTBOUND_BUFFER_SIZE = 1024 PAYLOAD_URL = "www.google.com" PAYLOAD = f"GET / HTTP/1.0\r\nHost: {PAYLOAD_URL}\r\n\r\n" def main(): # Create a socket object with socket.socket(socket.AF_INET, socket.SOC...
27.157895
95
0.591085
import socket OUTBOUND_HOST = "127.0.0.1" OUTBOUND_PORT = 8001 OUTBOUND_BUFFER_SIZE = 1024 PAYLOAD_URL = "www.google.com" PAYLOAD = f"GET / HTTP/1.0\r\nHost: {PAYLOAD_URL}\r\n\r\n" def main(): with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.connect((OUTBOUND_HOST...
true
true
f71cf03658518edaba3cbd0aee36d8141f9b1311
11,097
py
Python
src/olympia/users/forms.py
Rob--W/addons-server
cc104705e17ddeeb57254403ed292acb904a9a41
[ "BSD-3-Clause" ]
1
2020-04-07T07:21:25.000Z
2020-04-07T07:21:25.000Z
src/olympia/users/forms.py
Rob--W/addons-server
cc104705e17ddeeb57254403ed292acb904a9a41
[ "BSD-3-Clause" ]
null
null
null
src/olympia/users/forms.py
Rob--W/addons-server
cc104705e17ddeeb57254403ed292acb904a9a41
[ "BSD-3-Clause" ]
2
2018-03-04T00:11:22.000Z
2019-12-14T09:45:55.000Z
import os import re from django import forms from django.conf import settings from django.core.files.storage import default_storage as storage from django.utils.translation import ugettext as _, ugettext_lazy as _lazy import commonware.log from olympia import amo from olympia.accounts.views import fxa_error_message ...
39.212014
79
0.605119
import os import re from django import forms from django.conf import settings from django.core.files.storage import default_storage as storage from django.utils.translation import ugettext as _, ugettext_lazy as _lazy import commonware.log from olympia import amo from olympia.accounts.views import fxa_error_message ...
true
true
f71cf4a9fd2cce5b7e524e3da45d2e4d49508fe0
2,256
py
Python
Data/MarvinData.py
PatrickKutch/FUDD
faf36e24b7da99b75764f411586a823a172e4d01
[ "Apache-2.0" ]
null
null
null
Data/MarvinData.py
PatrickKutch/FUDD
faf36e24b7da99b75764f411586a823a172e4d01
[ "Apache-2.0" ]
null
null
null
Data/MarvinData.py
PatrickKutch/FUDD
faf36e24b7da99b75764f411586a823a172e4d01
[ "Apache-2.0" ]
null
null
null
############################################################################## # Copyright (c) 2016 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....
36.983607
113
0.557624
true
true
f71cf7333084978808cab1d46f6e030e28cd6846
19,083
py
Python
Lib/test/test_site.py
inging44/python3
fcd8d9d2ee54b46b757ecf34f284b4e60a43097a
[ "bzip2-1.0.6" ]
1,872
2015-01-02T18:56:47.000Z
2022-03-31T07:34:39.000Z
Lib/test/test_site.py
inging44/python3
fcd8d9d2ee54b46b757ecf34f284b4e60a43097a
[ "bzip2-1.0.6" ]
675
2015-02-27T09:01:01.000Z
2022-03-31T14:03:25.000Z
Lib/test/test_site.py
inging44/python3
fcd8d9d2ee54b46b757ecf34f284b4e60a43097a
[ "bzip2-1.0.6" ]
278
2015-01-02T03:48:20.000Z
2022-03-29T20:40:44.000Z
"""Tests for 'site'. Tests assume the initial paths in sys.path once the interpreter has begun executing have not been removed. """ import unittest import test.support from test.support import captured_stderr, TESTFN, EnvironmentVarGuard import builtins import os import sys import re import encodings import urllib.re...
40.602128
78
0.606613
import unittest import test.support from test.support import captured_stderr, TESTFN, EnvironmentVarGuard import builtins import os import sys import re import encodings import urllib.request import urllib.error import subprocess import sysconfig from copy import copy if sys.flags.no_site: raise unittest.SkipTe...
true
true
f71cf74301c83443bdf85dae4b32b0b7c4ddf129
518
py
Python
jax_cfd/ml/optimizer_modules.py
ngam/jax-cfd
8eff9c47bdc7fb19b6453db94ca65f6be64d91f6
[ "Apache-2.0" ]
244
2021-05-18T18:49:14.000Z
2022-03-30T18:27:21.000Z
jax_cfd/ml/optimizer_modules.py
ngam/jax-cfd
8eff9c47bdc7fb19b6453db94ca65f6be64d91f6
[ "Apache-2.0" ]
14
2021-06-24T22:15:44.000Z
2022-03-30T06:22:52.000Z
jax_cfd/ml/optimizer_modules.py
ngam/jax-cfd
8eff9c47bdc7fb19b6453db94ca65f6be64d91f6
[ "Apache-2.0" ]
36
2021-05-29T09:30:44.000Z
2022-03-28T12:33:40.000Z
"""Configurable optimizers from JAX.""" import gin from jax.example_libraries import optimizers @gin.configurable def optimizer(value): return value gin.external_configurable(optimizers.adam) gin.external_configurable(optimizers.momentum) gin.external_configurable(optimizers.nesterov) gin.external_configurable(o...
27.263158
56
0.864865
import gin from jax.example_libraries import optimizers @gin.configurable def optimizer(value): return value gin.external_configurable(optimizers.adam) gin.external_configurable(optimizers.momentum) gin.external_configurable(optimizers.nesterov) gin.external_configurable(optimizers.exponential_decay) gin.externa...
true
true
f71cf7ceb04c02f72c61db2c923addcb66daac1d
96,917
py
Python
anima/env/mayaEnv/toolbox.py
Khosiyat/anima
f631c08400547f49ac5f1feeb730f22c255eb771
[ "MIT" ]
1
2021-07-03T19:03:41.000Z
2021-07-03T19:03:41.000Z
anima/env/mayaEnv/toolbox.py
Khosiyat/anima
f631c08400547f49ac5f1feeb730f22c255eb771
[ "MIT" ]
null
null
null
anima/env/mayaEnv/toolbox.py
Khosiyat/anima
f631c08400547f49ac5f1feeb730f22c255eb771
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import functools import os from anima.env.mayaEnv.animation import Animation from anima.env.mayaEnv.general import General from anima.env.mayaEnv.modeling import Modeling from anima.env.mayaEnv.previs import Previs from anima.env.mayaEnv.reference import Reference from anima.env.mayaEnv.render...
37.608459
128
0.48752
import functools import os from anima.env.mayaEnv.animation import Animation from anima.env.mayaEnv.general import General from anima.env.mayaEnv.modeling import Modeling from anima.env.mayaEnv.previs import Previs from anima.env.mayaEnv.reference import Reference from anima.env.mayaEnv.render import Render from ani...
true
true
f71cf84b76e986982228c0447aa806b21c91314f
1,429
py
Python
tests/test_distribution/test_von_mises_fisher.py
mdeegen/pb_bss
e8c380e27d82707e8d2b2d83c5c918d47ea5d89f
[ "MIT" ]
171
2018-10-22T09:34:45.000Z
2022-03-19T16:09:20.000Z
tests/test_distribution/test_von_mises_fisher.py
mdeegen/pb_bss
e8c380e27d82707e8d2b2d83c5c918d47ea5d89f
[ "MIT" ]
19
2019-03-14T09:42:58.000Z
2021-09-03T07:13:03.000Z
tests/test_distribution/test_von_mises_fisher.py
mdeegen/pb_bss
e8c380e27d82707e8d2b2d83c5c918d47ea5d89f
[ "MIT" ]
40
2018-10-11T08:01:54.000Z
2022-03-05T13:26:15.000Z
import numpy as np from numpy.testing import assert_allclose, assert_equal import unittest from pb_bss.distribution import VonMisesFisher from pb_bss.distribution import VonMisesFisherTrainer class TestGaussian(unittest.TestCase): def test_shapes(self): samples = 10000 mean = np.ones((3,)) ...
35.725
80
0.660602
import numpy as np from numpy.testing import assert_allclose, assert_equal import unittest from pb_bss.distribution import VonMisesFisher from pb_bss.distribution import VonMisesFisherTrainer class TestGaussian(unittest.TestCase): def test_shapes(self): samples = 10000 mean = np.ones((3,)) ...
true
true
f71cf8aa46d7092006946a492f21beefc661135b
443
py
Python
src/constants/database_constants.py
davendiy/QWERTY_messenger
6bfa5a6ceb7b63f3e57d3d7779a1cda26cd55616
[ "MIT" ]
null
null
null
src/constants/database_constants.py
davendiy/QWERTY_messenger
6bfa5a6ceb7b63f3e57d3d7779a1cda26cd55616
[ "MIT" ]
null
null
null
src/constants/database_constants.py
davendiy/QWERTY_messenger
6bfa5a6ceb7b63f3e57d3d7779a1cda26cd55616
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*-encoding: utf-8-*- # created: 25.11.2019 # by David Zashkolny # 3 course, comp math # Taras Shevchenko National University of Kyiv # email: davendiy@gmail.com TEXT = 0 IMAGE = 1 AUDIO = 2 VIDEO = 3 DOCUMENT = 4 MESSAGE_TYPES = { TEXT, IMAGE, AUDIO, VIDEO, DOCUMENT, } ...
13.84375
46
0.665914
TEXT = 0 IMAGE = 1 AUDIO = 2 VIDEO = 3 DOCUMENT = 4 MESSAGE_TYPES = { TEXT, IMAGE, AUDIO, VIDEO, DOCUMENT, } CHANNELS = "Channels" CHATS = "Chats" USERS_CHATS = 'UsersChats' USERS_CHANNELS = 'UsersChannels' PRIVATE = 1 PUBLIC = 0
true
true
f71cf9824ffb509cab55ce293165655a7f35f31c
1,730
py
Python
code/extras/highway_layer.py
vamships/RelationPrediction
45f48e8d09331e7244a7fe8d2d9d0fefa7e1f76b
[ "MIT" ]
376
2017-09-10T14:29:16.000Z
2022-03-17T04:01:53.000Z
code/extras/highway_layer.py
vamships/RelationPrediction
45f48e8d09331e7244a7fe8d2d9d0fefa7e1f76b
[ "MIT" ]
15
2018-07-28T23:44:53.000Z
2021-08-21T17:33:55.000Z
code/extras/highway_layer.py
vamships/RelationPrediction
45f48e8d09331e7244a7fe8d2d9d0fefa7e1f76b
[ "MIT" ]
104
2017-11-20T13:50:04.000Z
2022-03-31T14:30:47.000Z
import numpy as np import tensorflow as tf from model import Model from common.shared_functions import glorot_variance, make_tf_variable, make_tf_bias class HighwayLayer(Model): vertex_embedding_function = {'train': None, 'test': None} def __init__(self, shape, next_component=None, next_component_2=None): ...
34.6
86
0.701734
import numpy as np import tensorflow as tf from model import Model from common.shared_functions import glorot_variance, make_tf_variable, make_tf_bias class HighwayLayer(Model): vertex_embedding_function = {'train': None, 'test': None} def __init__(self, shape, next_component=None, next_component_2=None): ...
true
true
f71cfa170d9e79942034aff33de0c5092954646d
668
py
Python
etc/check_fonts.py
UO-CIS211/panels
a97e814a44244cb53cbed8165056f3df69a3541e
[ "MIT" ]
1
2019-03-20T18:18:12.000Z
2019-03-20T18:18:12.000Z
etc/check_fonts.py
UO-CIS211/panels
a97e814a44244cb53cbed8165056f3df69a3541e
[ "MIT" ]
null
null
null
etc/check_fonts.py
UO-CIS211/panels
a97e814a44244cb53cbed8165056f3df69a3541e
[ "MIT" ]
null
null
null
# # Utility to check availability and location of fonts # for pygame # import pygame pygame.font.init() # Required or SysFont will break candidates = [ "Helvetica", "helvetica", # "helvetica.ttf", "Avenir Next", "AvenirNext" ] default = pygame.font.get_default_font() print("System defau...
20.242424
53
0.642216
import pygame pygame.font.init() candidates = [ "Helvetica", "helvetica", "Avenir Next", "AvenirNext" ] default = pygame.font.get_default_font() print("System default font is '{}'".format(default)) for can in candidates: path = pygame.font.match_font(can) sysfont = pygame....
true
true
f71cfa2946ae7d25b13601e4e5fd1d6d17827f18
3,823
py
Python
AutomatedTesting/Gem/PythonTests/Physics/tests/joints/Joints_Fixed2BodiesConstrained.py
whywhywhyw/o3de
8e09f66799d4c8f188d45861d821e8656a554cb1
[ "Apache-2.0", "MIT" ]
11
2021-07-08T09:58:26.000Z
2022-03-17T17:59:26.000Z
AutomatedTesting/Gem/PythonTests/Physics/tests/joints/Joints_Fixed2BodiesConstrained.py
RoddieKieley/o3de
e804fd2a4241b039a42d9fa54eaae17dc94a7a92
[ "Apache-2.0", "MIT" ]
29
2021-07-06T19:33:52.000Z
2022-03-22T10:27:49.000Z
AutomatedTesting/Gem/PythonTests/Physics/tests/joints/Joints_Fixed2BodiesConstrained.py
RoddieKieley/o3de
e804fd2a4241b039a42d9fa54eaae17dc94a7a92
[ "Apache-2.0", "MIT" ]
4
2021-07-06T19:24:43.000Z
2022-03-31T12:42:27.000Z
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ # Test case ID : C18243580 # Test Case Title : Check that fixed joint constrains 2 bodies # fmt: off class Te...
38.616162
152
0.699974
class Tests: enter_game_mode = ("Entered game mode", "Failed to enter game mode") exit_game_mode = ("Exited game mode", "Couldn't exit game mode") lead_found = ("Found lead", "Did not find lead") ...
true
true
f71cfa61b2b9cce8bfbbb52298ff209aec5dcc32
126
py
Python
tests/regression/RandomReg_100/ws_RandomReg_100_Ridge_sqlite_code_gen.py
antoinecarme/sklearn2sql_heroku
d680db10683daa419324461eeea851dd8b103ad5
[ "BSD-3-Clause" ]
1
2019-07-09T14:45:18.000Z
2019-07-09T14:45:18.000Z
tests/regression/RandomReg_100/ws_RandomReg_100_Ridge_sqlite_code_gen.py
antoinecarme/sklearn2sql_heroku
d680db10683daa419324461eeea851dd8b103ad5
[ "BSD-3-Clause" ]
5
2017-11-13T13:35:37.000Z
2021-11-11T12:57:20.000Z
tests/regression/RandomReg_100/ws_RandomReg_100_Ridge_sqlite_code_gen.py
antoinecarme/sklearn2sql_heroku
d680db10683daa419324461eeea851dd8b103ad5
[ "BSD-3-Clause" ]
1
2021-09-19T15:05:33.000Z
2021-09-19T15:05:33.000Z
from sklearn2sql_heroku.tests.regression import generic as reg_gen reg_gen.test_model("Ridge" , "RandomReg_100" , "sqlite")
25.2
66
0.793651
from sklearn2sql_heroku.tests.regression import generic as reg_gen reg_gen.test_model("Ridge" , "RandomReg_100" , "sqlite")
true
true
f71cfab1efdc6e0bd803f231c2d34fb3ee25c532
14,305
py
Python
tests/providers/hashicorp/secrets/test_vault.py
emilioego/airflow
3457c7847cd24413ff5b622e65c27d8370f94502
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
79
2021-10-15T07:32:27.000Z
2022-03-28T04:10:19.000Z
tests/providers/hashicorp/secrets/test_vault.py
emilioego/airflow
3457c7847cd24413ff5b622e65c27d8370f94502
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
153
2021-10-15T05:23:46.000Z
2022-02-23T06:07:10.000Z
tests/providers/hashicorp/secrets/test_vault.py
emilioego/airflow
3457c7847cd24413ff5b622e65c27d8370f94502
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
23
2021-10-15T02:36:37.000Z
2022-03-17T02:59:27.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.766938
101
0.602517
from unittest import TestCase, mock from hvac.exceptions import InvalidPath, VaultError from airflow.providers.hashicorp.secrets.vault import VaultBackend class TestVaultSecrets(TestCase): @mock.patch("airflow.providers.hashicorp._internal_client.vault_client.hvac") def test_get_conn_uri(se...
true
true
f71cfb79c7c2c9361f5f9e6f721e707abbbcb15a
16,113
py
Python
qa/rpc-tests/p2p-fullblocktest.py
mirzaei-ce/core-alisinabit
9929923df19fc9f03eb02fa056f325c9a284cfcf
[ "MIT" ]
null
null
null
qa/rpc-tests/p2p-fullblocktest.py
mirzaei-ce/core-alisinabit
9929923df19fc9f03eb02fa056f325c9a284cfcf
[ "MIT" ]
null
null
null
qa/rpc-tests/p2p-fullblocktest.py
mirzaei-ce/core-alisinabit
9929923df19fc9f03eb02fa056f325c9a284cfcf
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from test_framework.test_framework import ComparisonTestFramework from test_framework.util import * from test_framework.comptool import TestManager, T...
40.08209
106
0.536461
from test_framework.test_framework import ComparisonTestFramework from test_framework.util import * from test_framework.comptool import TestManager, TestInstance, RejectResult from test_framework.blocktools import * import time from test_framework.key import CECKey from test_framework.script import CScript, Sign...
true
true
f71cfd0aee39e98c974f9c4ad5bc7792c8b07739
1,316
py
Python
python/oneflow/test/modules/test_consistent_dot.py
L-Net-1992/oneflow
4dc08d65caea36fdd137841ac95551218897e730
[ "Apache-2.0" ]
1
2022-03-14T11:17:56.000Z
2022-03-14T11:17:56.000Z
python/oneflow/test/modules/test_consistent_dot.py
L-Net-1992/oneflow
4dc08d65caea36fdd137841ac95551218897e730
[ "Apache-2.0" ]
null
null
null
python/oneflow/test/modules/test_consistent_dot.py
L-Net-1992/oneflow
4dc08d65caea36fdd137841ac95551218897e730
[ "Apache-2.0" ]
1
2021-12-15T02:14:49.000Z
2021-12-15T02:14:49.000Z
""" Copyright 2020 The OneFlow 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 applicable law or agr...
31.333333
77
0.740122
import unittest import oneflow as flow import oneflow.unittest from oneflow.test_utils.automated_test_util import * @autotest(n=1, check_graph=False) def do_test_dot_impl(test_case, placement, sbp): k = random(100, 1000) * 8 x = random_tensor(ndim=1, dim0=k).to_global(placement=placement, sbp=sbp) y = ra...
true
true
f71cfdceb8c455928ba52221223c74b392f337c7
5,558
py
Python
sympy/concrete/gosper.py
shilpiprd/sympy
556e9c61b31d0d5f101cd56b43e843fbf3bcf121
[ "BSD-3-Clause" ]
8,323
2015-01-02T15:51:43.000Z
2022-03-31T13:13:19.000Z
sympy/concrete/gosper.py
shilpiprd/sympy
556e9c61b31d0d5f101cd56b43e843fbf3bcf121
[ "BSD-3-Clause" ]
15,102
2015-01-01T01:33:17.000Z
2022-03-31T22:53:13.000Z
sympy/concrete/gosper.py
shilpiprd/sympy
556e9c61b31d0d5f101cd56b43e843fbf3bcf121
[ "BSD-3-Clause" ]
4,490
2015-01-01T17:48:07.000Z
2022-03-31T17:24:05.000Z
"""Gosper's algorithm for hypergeometric summation. """ from sympy.core import S, Dummy, symbols from sympy.core.compatibility import is_sequence from sympy.polys import Poly, parallel_poly_from_expr, factor from sympy.solvers import solve from sympy.simplify import hypersimp def gosper_normal(f, g, n, polys=True): ...
24.377193
69
0.536704
from sympy.core import S, Dummy, symbols from sympy.core.compatibility import is_sequence from sympy.polys import Poly, parallel_poly_from_expr, factor from sympy.solvers import solve from sympy.simplify import hypersimp def gosper_normal(f, g, n, polys=True): (p, q), opt = parallel_poly_from_expr( (f, g...
true
true
f71cfee5730a3abc93dbfc1a9dac679b29cf53c2
17,212
py
Python
tests/test_authentication.py
crawlersick/mysql-connector-python
9a224b96250ba81f2bcc279496befcff309ae88a
[ "BSD-3-Clause" ]
1
2021-08-04T21:37:23.000Z
2021-08-04T21:37:23.000Z
tests/test_authentication.py
maximmasiutin/mysql-connector-python
9d5e6f532a0342795f380ee1cfeeb93adbe333a0
[ "BSD-3-Clause" ]
null
null
null
tests/test_authentication.py
maximmasiutin/mysql-connector-python
9d5e6f532a0342795f380ee1cfeeb93adbe333a0
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2014, 2020, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, as # published by the Free Software Foundation. # # This program is also distributed with certa...
44.246787
80
0.6528
import inspect import sys import mysql.connector from mysql.connector import authentication from mysql.connector.errors import InterfaceError import tests _STANDARD_PLUGINS = ( 'mysql_native_password', 'mysql_clear_password', 'sha256_password', ) class AuthenticationModu...
true
true
f71cffb860b58eeb76624d1f1b619b2ed27a057c
1,477
py
Python
main.py
Chise1/bilibili-live-tools
23cef9ae6a42aeb89b64fc1558c4a94b1075444b
[ "MIT" ]
1
2020-07-02T08:39:20.000Z
2020-07-02T08:39:20.000Z
main.py
Chise1/bilibili-live-tools
23cef9ae6a42aeb89b64fc1558c4a94b1075444b
[ "MIT" ]
null
null
null
main.py
Chise1/bilibili-live-tools
23cef9ae6a42aeb89b64fc1558c4a94b1075444b
[ "MIT" ]
null
null
null
# !/usr/bin/python # -*- coding:utf-8 -*- import subprocess, time, sys from subprocess import Popen from typing import Optional TIME = 3600 CMD = "run.py" class Auto_Run(): def __init__(self, sleep_time, cmd): if sys.version_info < (3, 6): print("only support python 3.6 and later version") ...
32.108696
106
0.510494
import subprocess, time, sys from subprocess import Popen from typing import Optional TIME = 3600 CMD = "run.py" class Auto_Run(): def __init__(self, sleep_time, cmd): if sys.version_info < (3, 6): print("only support python 3.6 and later version") sys.exit(1111) self.sle...
true
true
f71d0082d003aab3724f4c3350ac16a31aff1d21
11,526
py
Python
ET/alfred/gen/render_trajs_from_et.py
amazon-research/multimodal-neuralslam
530558fdfa31c6e048fc3e7b253f681f6786b04d
[ "MIT-0" ]
4
2022-01-27T01:39:09.000Z
2022-01-30T14:45:15.000Z
ET/alfred/gen/render_trajs_from_et.py
amazon-research/multimodal-neuralslam
530558fdfa31c6e048fc3e7b253f681f6786b04d
[ "MIT-0" ]
1
2022-02-05T14:06:25.000Z
2022-02-05T14:06:25.000Z
ET/alfred/gen/render_trajs_from_et.py
amazon-research/multimodal-neuralslam
530558fdfa31c6e048fc3e7b253f681f6786b04d
[ "MIT-0" ]
1
2022-02-04T07:22:28.000Z
2022-02-04T07:22:28.000Z
import os import sys import json import numpy as np import threading import time import copy import random import glob import shutil import pickle from termcolor import colored from sacred import Ingredient, Experiment from alfred.env.thor_env import ThorEnv from alfred.gen import constants from alfred.gen.utils impo...
38.42
100
0.642461
import os import sys import json import numpy as np import threading import time import copy import random import glob import shutil import pickle from termcolor import colored from sacred import Ingredient, Experiment from alfred.env.thor_env import ThorEnv from alfred.gen import constants from alfred.gen.utils impo...
true
true
f71d01b7f7dd99438c8b39dc984dbad4ab9a5f08
993
py
Python
cacao_accounting/contabilidad/registros/ccosto.py
cacao-accounting/cacao-accounting-mockup
ca4da3b4e48a4796fc39a12a482d9ccc1e8e6e38
[ "Apache-2.0" ]
2
2021-08-19T01:29:49.000Z
2021-09-11T16:21:40.000Z
cacao_accounting/contabilidad/registros/ccosto.py
cacao-accounting/cacao-accounting-mockup
ca4da3b4e48a4796fc39a12a482d9ccc1e8e6e38
[ "Apache-2.0" ]
29
2020-07-14T23:59:32.000Z
2021-11-04T07:42:31.000Z
cacao_accounting/contabilidad/registros/ccosto.py
cacao-accounting/cacao-accounting
3e6fa0080db3d44b1b3b8d93e46bd96a5a8d515b
[ "Apache-2.0" ]
3
2020-07-12T00:52:18.000Z
2021-08-18T01:09:22.000Z
# Copyright 2020 William José Moreno Reyes # # 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...
32.032258
74
0.747231
from cacao_accounting.registro import Registro class RegistroCentroCosto(Registro): def __init__(self): from cacao_accounting.database import CentroCosto self.tabla = CentroCosto
true
true
f71d01f2b0c1b5a7dec480a4a5104f45b41cb83c
543
py
Python
keras/preprocessing/sequence.py
seba-1511/gsoc15-demo
7fa542f33fdb39d73e2b11318c046ecf35fb9bcf
[ "MIT" ]
2
2015-09-15T19:19:24.000Z
2019-04-21T12:10:27.000Z
keras/preprocessing/sequence.py
wavelets/keras
c57d5cce7903511edd4048f8bfed2ad0dc6f6b6b
[ "MIT" ]
null
null
null
keras/preprocessing/sequence.py
wavelets/keras
c57d5cce7903511edd4048f8bfed2ad0dc6f6b6b
[ "MIT" ]
null
null
null
import numpy as np def pad_sequences(seqs, maxlen=None, dtype='int32'): """ Pad each sequence to the same lenght: the lenght of the longuest sequence. If maxlen is provided, any sequence longer than maxlen is truncated to maxlen. """ lengths = [len(s) for s in seqs] n...
25.857143
52
0.615101
import numpy as np def pad_sequences(seqs, maxlen=None, dtype='int32'): lengths = [len(s) for s in seqs] nb_samples = len(seqs) if maxlen is None: maxlen = np.max(lengths) x = np.zeros((nb_samples, maxlen)).astype(dtype) for idx, s in enumerate(seqs): x[idx, :lengths[idx]] = s[:ma...
true
true
f71d033f264f8a2c8ac1bb10e308f59fe6a66bae
7,853
py
Python
example/add.py
tjengbudi/python-shopee
a74e99e7a900ed0a3c0cba2b7405238acf2ee16c
[ "MIT" ]
166
2018-04-25T16:43:30.000Z
2022-03-20T07:07:39.000Z
example/add.py
tjengbudi/python-shopee
a74e99e7a900ed0a3c0cba2b7405238acf2ee16c
[ "MIT" ]
34
2018-11-27T02:56:08.000Z
2022-01-28T05:24:57.000Z
example/add.py
tjengbudi/python-shopee
a74e99e7a900ed0a3c0cba2b7405238acf2ee16c
[ "MIT" ]
62
2018-06-12T02:53:34.000Z
2022-03-13T07:31:34.000Z
import pyshopee import re import pandas as pd from pprint import pprint def _builder_attributes(attributes_resp, brand_option = None, default_brand_option = "自有品牌"): '''select mandatory attr. attributes = [ { 'attributes_id': 1365, 'va...
29.859316
134
0.492041
import pyshopee import re import pandas as pd from pprint import pprint def _builder_attributes(attributes_resp, brand_option = None, default_brand_option = "自有品牌"): attributes = [] if attributes_resp.get("attributes"): for ele in attributes_resp.get("attributes"): if ele.get("is_m...
true
true
f71d035297f489215598c4103d58e28bf84e12d5
7,753
py
Python
transformer/third_party/feat_convert/kaldi_io/batchmk.py
wxy1988/ASR
8ef3ef347523044c89c46c263ecc7b8e9b2c06d1
[ "Apache-2.0" ]
60
2018-08-21T08:07:31.000Z
2021-11-08T10:40:17.000Z
transformer/third_party/feat_convert/kaldi_io/batchmk.py
wxy1988/ASR
8ef3ef347523044c89c46c263ecc7b8e9b2c06d1
[ "Apache-2.0" ]
7
2018-10-23T08:50:15.000Z
2021-11-15T09:32:29.000Z
transformer/third_party/feat_convert/kaldi_io/batchmk.py
wxy1988/ASR
8ef3ef347523044c89c46c263ecc7b8e9b2c06d1
[ "Apache-2.0" ]
29
2018-09-21T06:11:03.000Z
2022-02-18T07:12:58.000Z
#!/usr/bin/python # coding=utf-8 """ @version: @author: Dong Linhao @license: Apache Licence @contact: donglinhao2015@ia.ac.cn @site: @software: PyCharm Community Edition @file: batchmk.py @time: 09/04/17 21:10 """ import src.io.fea as fea import tensorflow as tf import numpy as np import time LON...
41.682796
118
0.632013
import src.io.fea as fea import tensorflow as tf import numpy as np import time LONGEST_FRMS = 2000 class lstm_batch(object): def __init__(self, num_streams, num_steps, input_dim): self.sample_feat_list = [np.zeros([LONGEST_FRMS, input_dim]) for _ in range(num_streams)] self.sample...
true
true
f71d05be152905647cb539a75d42c89a113e0993
556
py
Python
src/operations/equality.py
iamantony/PythonNotes
4ed740378bd5e031e2c21675f33ae8e199a48bbb
[ "MIT" ]
null
null
null
src/operations/equality.py
iamantony/PythonNotes
4ed740378bd5e031e2c21675f33ae8e199a48bbb
[ "MIT" ]
null
null
null
src/operations/equality.py
iamantony/PythonNotes
4ed740378bd5e031e2c21675f33ae8e199a48bbb
[ "MIT" ]
null
null
null
__author__ = 'Antony Cherepanov' def diff_ways_to_equality_check(): print("\ndiff_ways_to_equality_check()") l1 = l2 = [1, 2, 3] print("Our lists: " + str(l1) + ", " + str(l2) + ". They reference to the same object") print("l1 == l2 ? : ", l1 == l2) print("l1 is l2 ? : ", l1 is l2) ...
29.263158
94
0.532374
__author__ = 'Antony Cherepanov' def diff_ways_to_equality_check(): print("\ndiff_ways_to_equality_check()") l1 = l2 = [1, 2, 3] print("Our lists: " + str(l1) + ", " + str(l2) + ". They reference to the same object") print("l1 == l2 ? : ", l1 == l2) print("l1 is l2 ? : ", l1 is l2) ...
true
true
f71d05e03c289edc6d71ce6c053ebcd1ba27ca78
3,562
py
Python
cfgov/login/tests/test_auth_forms.py
Colin-Seifer/consumerfinance.gov
a1a943f7170b498707d642d6be97b9a97a2b52e3
[ "CC0-1.0" ]
156
2015-01-16T15:16:46.000Z
2020-08-04T04:48:01.000Z
cfgov/login/tests/test_auth_forms.py
Colin-Seifer/consumerfinance.gov
a1a943f7170b498707d642d6be97b9a97a2b52e3
[ "CC0-1.0" ]
3,604
2015-01-05T22:09:12.000Z
2020-08-14T17:09:19.000Z
cfgov/login/tests/test_auth_forms.py
Colin-Seifer/consumerfinance.gov
a1a943f7170b498707d642d6be97b9a97a2b52e3
[ "CC0-1.0" ]
102
2015-01-28T14:51:18.000Z
2020-08-10T00:00:39.000Z
from unittest.mock import patch from django.contrib.auth.models import User from django.test import TestCase from login.forms import CFGOVPasswordChangeForm, UserCreationForm, UserEditForm from login.tests.test_password_policy import TestWithUser @patch("login.forms.send_password_reset_email") class UserCreationFor...
32.09009
79
0.635036
from unittest.mock import patch from django.contrib.auth.models import User from django.test import TestCase from login.forms import CFGOVPasswordChangeForm, UserCreationForm, UserEditForm from login.tests.test_password_policy import TestWithUser @patch("login.forms.send_password_reset_email") class UserCreationFor...
true
true
f71d07441c3958aedc9d9d95b22f02745383912c
1,054
py
Python
spylon_kernel/__init__.py
Gr4vi7y/spylon-kernel
2d0ddf2aca1b91738f938b72a500c20293e3156c
[ "BSD-3-Clause" ]
111
2018-03-12T09:22:07.000Z
2021-04-06T07:33:52.000Z
spylon_kernel/__init__.py
mariusvniekerk/metakernel-scala-spark
2d0ddf2aca1b91738f938b72a500c20293e3156c
[ "BSD-3-Clause" ]
34
2017-01-30T19:12:26.000Z
2017-09-08T14:14:07.000Z
spylon_kernel/__init__.py
mariusvniekerk/metakernel-scala-spark
2d0ddf2aca1b91738f938b72a500c20293e3156c
[ "BSD-3-Clause" ]
16
2018-04-11T19:25:14.000Z
2020-10-20T10:56:27.000Z
from __future__ import absolute_import, print_function, division from .scala_kernel import SpylonKernel from .scala_magic import ScalaMagic from .init_spark_magic import InitSparkMagic from .scala_interpreter import get_scala_interpreter def register_ipython_magics(): """For usage within ipykernel. This wil...
29.277778
80
0.743833
from __future__ import absolute_import, print_function, division from .scala_kernel import SpylonKernel from .scala_magic import ScalaMagic from .init_spark_magic import InitSparkMagic from .scala_interpreter import get_scala_interpreter def register_ipython_magics(): from metakernel import IPythonKernel fro...
true
true
f71d08c432f7544e984ac784fbbc3c5d98bf9349
755
py
Python
wemake_python_styleguide/presets/types/file_tokens.py
cdhiraj40/wemake-python-styleguide
7cef9be081d594c30045b7a98cae77a9be46e1aa
[ "MIT" ]
1,931
2018-03-17T13:52:45.000Z
2022-03-27T09:39:17.000Z
wemake_python_styleguide/presets/types/file_tokens.py
amansr02/wemake-python-styleguide
681035ed21fbe28ebfb32b8807b98e8de76b64aa
[ "MIT" ]
2,231
2018-03-09T21:19:05.000Z
2022-03-31T08:35:37.000Z
wemake_python_styleguide/presets/types/file_tokens.py
amansr02/wemake-python-styleguide
681035ed21fbe28ebfb32b8807b98e8de76b64aa
[ "MIT" ]
492
2018-05-18T21:20:28.000Z
2022-03-20T14:11:50.000Z
from typing_extensions import Final from wemake_python_styleguide.visitors.tokenize import ( comments, conditions, primitives, statements, syntax, ) #: Used to store all token related visitors to be later passed to checker: PRESET: Final = ( comments.WrongCommentVisitor, comments.ShebangVi...
24.354839
74
0.780132
from typing_extensions import Final from wemake_python_styleguide.visitors.tokenize import ( comments, conditions, primitives, statements, syntax, ) PRESET: Final = ( comments.WrongCommentVisitor, comments.ShebangVisitor, comments.NoqaVisitor, comments.EmptyCommentVisitor, sy...
true
true
f71d0905abbc7a17b2098e10bd4351b995725485
5,026
py
Python
server/src/army.py
matteli/histemul
61f1ea8e1263b92fd2bead0c808f67940faad802
[ "BSD-2-Clause" ]
1
2019-07-05T09:40:50.000Z
2019-07-05T09:40:50.000Z
server/src/army.py
matteli/histemul
61f1ea8e1263b92fd2bead0c808f67940faad802
[ "BSD-2-Clause" ]
null
null
null
server/src/army.py
matteli/histemul
61f1ea8e1263b92fd2bead0c808f67940faad802
[ "BSD-2-Clause" ]
null
null
null
''' Copyright (c) 2012-2015, Matthieu Nué All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the fol...
35.146853
180
0.607839
from mongoengine import Document, ReferenceField, IntField, ListField, BooleanField, StringField from battle import Battle class Army(Document): for_the = ReferenceField('Person') battle = ReferenceField('Battle') attitude = StringField() location = ReferenceField('Province') origin = Referenc...
true
true
f71d0918a14b24074948327cd78a0618dd6eff25
5,508
py
Python
setup.py
openedx/bok-choy
b2f82ebea4c24c84361170063d8cad0314405a4a
[ "Apache-2.0" ]
2
2022-01-22T22:22:53.000Z
2022-02-28T03:13:57.000Z
setup.py
openedx/bok-choy
b2f82ebea4c24c84361170063d8cad0314405a4a
[ "Apache-2.0" ]
16
2022-01-11T04:11:33.000Z
2022-03-29T12:30:45.000Z
setup.py
openedx/bok-choy
b2f82ebea4c24c84361170063d8cad0314405a4a
[ "Apache-2.0" ]
1
2022-03-16T14:43:57.000Z
2022-03-16T14:43:57.000Z
#!/usr/bin/env python import codecs import os import re import sys from setuptools import setup DESCRIPTION = 'UI-level acceptance test framework' def load_requirements(*requirements_paths): """ Load all requirements from the specified requirements files. Requirements will include any constraints fro...
40.5
119
0.634713
import codecs import os import re import sys from setuptools import setup DESCRIPTION = 'UI-level acceptance test framework' def load_requirements(*requirements_paths): requirements = {} constraint_files = set() requirement_line_regex = re.compile(r"([a-zA-Z0-9-_.\[\]]+)([<>=][^#\s]+...
true
true
f71d0934a87f934d765eb310af08af588938c234
7,835
py
Python
pyschism/outputs/combine.py
SorooshMani-NOAA/pyschism
df803edb53184625b12399f38a8bd26a022abbc1
[ "Apache-2.0" ]
null
null
null
pyschism/outputs/combine.py
SorooshMani-NOAA/pyschism
df803edb53184625b12399f38a8bd26a022abbc1
[ "Apache-2.0" ]
null
null
null
pyschism/outputs/combine.py
SorooshMani-NOAA/pyschism
df803edb53184625b12399f38a8bd26a022abbc1
[ "Apache-2.0" ]
null
null
null
import os from time import time import pathlib from typing import Dict, Union import glob import numpy as np import xarray as xr from pyschism.mesh.base import Gr3 def combine(var, shape, l2g, name): values = np.full(tuple(shape), np.nan) local_ids = list(l2g.keys()) for i, data in enumerate(var): ...
41.675532
95
0.515763
import os from time import time import pathlib from typing import Dict, Union import glob import numpy as np import xarray as xr from pyschism.mesh.base import Gr3 def combine(var, shape, l2g, name): values = np.full(tuple(shape), np.nan) local_ids = list(l2g.keys()) for i, data in enumerate(var): ...
true
true
f71d0974fd90c6e55313e89b3f21b9cf56c88f29
4,930
py
Python
lib/silfont/scripts/psftuneraliases.py
simoncozens/pysilfont
bb8a9fc58a83e074bbcc466ba058841845b9107e
[ "MIT" ]
41
2015-05-21T21:12:26.000Z
2022-02-17T17:23:14.000Z
lib/silfont/scripts/psftuneraliases.py
simoncozens/pysilfont
bb8a9fc58a83e074bbcc466ba058841845b9107e
[ "MIT" ]
63
2015-05-15T10:25:55.000Z
2021-02-23T04:51:17.000Z
lib/silfont/scripts/psftuneraliases.py
simoncozens/pysilfont
bb8a9fc58a83e074bbcc466ba058841845b9107e
[ "MIT" ]
12
2015-06-12T11:52:08.000Z
2020-09-23T10:40:59.000Z
#!/usr/bin/env python __doc__ = '''Merge lookup and feature aliases into TypeTuner feature file''' __url__ = 'http://github.com/silnrsi/pysilfont' __copyright__ = 'Copyright (c) 2019 SIL International (http://www.sil.org)' __license__ = 'Released under the MIT License (http://opensource.org/licenses/MIT)' __author__ =...
40.409836
122
0.577079
__doc__ = '''Merge lookup and feature aliases into TypeTuner feature file''' __url__ = 'http://github.com/silnrsi/pysilfont' __copyright__ = 'Copyright (c) 2019 SIL International (http://www.sil.org)' __license__ = 'Released under the MIT License (http://opensource.org/licenses/MIT)' __author__ = 'Bob Hallissy' from...
true
true
f71d0cdd41ebaf5f19271d970cbfc6c054ba49fb
4,068
py
Python
relbert_cl/train.py
asahi417/relbert
cb718e40fb452e88ccae1c271ccdea25013791b1
[ "MIT" ]
17
2021-09-10T14:49:41.000Z
2022-01-26T13:18:02.000Z
relbert_cl/train.py
asahi417/relbert
cb718e40fb452e88ccae1c271ccdea25013791b1
[ "MIT" ]
2
2021-11-14T07:47:36.000Z
2021-11-22T17:34:06.000Z
relbert_cl/train.py
asahi417/relbert
cb718e40fb452e88ccae1c271ccdea25013791b1
[ "MIT" ]
1
2021-12-14T01:35:05.000Z
2021-12-14T01:35:05.000Z
""" Train RelBERT model. """ import argparse import logging import relbert def config(parser): # optimization parser.add_argument('-s', '--softmax-loss', help='softmax loss', action='store_true') parser.add_argument('-n', '--in-batch-negative', help='in batch negative', action='store_true') parser.add...
47.302326
115
0.684366
import argparse import logging import relbert def config(parser): parser.add_argument('-s', '--softmax-loss', help='softmax loss', action='store_true') parser.add_argument('-n', '--in-batch-negative', help='in batch negative', action='store_true') parser.add_argument('-p', '--parent-contrast', help='...
true
true
f71d0fb7e6da71f240857ee7196759e47de60c68
11,547
py
Python
src/virtual-wan/azext_vwan/vendored_sdks/v2021_08_01/v2021_08_01/operations/__init__.py
Caoxuyang/azure-cli-extensions
d2011261f29033cb31a1064256727d87049ab423
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
src/virtual-wan/azext_vwan/vendored_sdks/v2021_08_01/v2021_08_01/operations/__init__.py
Caoxuyang/azure-cli-extensions
d2011261f29033cb31a1064256727d87049ab423
[ "MIT" ]
9
2022-03-25T19:35:49.000Z
2022-03-31T06:09:47.000Z
src/virtual-wan/azext_vwan/vendored_sdks/v2021_08_01/v2021_08_01/operations/__init__.py
Caoxuyang/azure-cli-extensions
d2011261f29033cb31a1064256727d87049ab423
[ "MIT" ]
1
2022-02-14T21:43:29.000Z
2022-02-14T21:43:29.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. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
47.714876
94
0.850611
from ._operations import ApplicationGatewaysOperations from ._operations import ApplicationGatewayPrivateLinkResourcesOperations from ._operations import ApplicationGatewayPrivateEndpointConnectionsOperations from ._operations import ApplicationSecurityGroupsOperations from ._operations import AvailableDelegati...
true
true
f71d0fd842f2064dbce2597cdedbee45810477a0
192
py
Python
ticket_universe/charsets.py
lotify/ticket_universe
1947cc9d6a555a68af5b39d252cac3ecef06400c
[ "MIT" ]
4
2019-01-24T12:38:37.000Z
2019-03-26T12:36:18.000Z
ticket_universe/charsets.py
lotify/ticket_universe
1947cc9d6a555a68af5b39d252cac3ecef06400c
[ "MIT" ]
null
null
null
ticket_universe/charsets.py
lotify/ticket_universe
1947cc9d6a555a68af5b39d252cac3ecef06400c
[ "MIT" ]
null
null
null
def latin() -> [str]: """[A-Z]""" return list("ABCDEFGHIJKLMNOPQRSTUVWXYZ") def safe_latin() -> [str]: """[A-Z] excluding (O, I, L)""" return list("ABCDEFGHJKMNPQRSTUVWXYZ")
21.333333
45
0.583333
def latin() -> [str]: return list("ABCDEFGHIJKLMNOPQRSTUVWXYZ") def safe_latin() -> [str]: return list("ABCDEFGHJKMNPQRSTUVWXYZ")
true
true
f71d10310130fbb663c3c6a549057fdf4e5e6935
56
py
Python
app/config_combos/schema.py
rafiq10/rrhh_tdd_backend
fecbe4f3dd249b31f71e4b63904c565e207e45f9
[ "bzip2-1.0.6" ]
null
null
null
app/config_combos/schema.py
rafiq10/rrhh_tdd_backend
fecbe4f3dd249b31f71e4b63904c565e207e45f9
[ "bzip2-1.0.6" ]
2
2021-03-25T22:50:12.000Z
2021-04-30T20:53:22.000Z
app/config_combos/schema.py
rafiq10/rrhh_tdd_backend
fecbe4f3dd249b31f71e4b63904c565e207e45f9
[ "bzip2-1.0.6" ]
null
null
null
from .combos.combos import CombosModel, get_combo_tables
56
56
0.875
from .combos.combos import CombosModel, get_combo_tables
true
true
f71d123c09ba6000e80271689145557882b00944
12,061
py
Python
content/generate_folder_directory.py
lingcog/2019-CS109A
f1eaa62976fe989c3ad3f3ab4b8dd5d71574a2c3
[ "MIT" ]
442
2019-06-11T06:47:00.000Z
2022-03-12T11:19:31.000Z
content/generate_folder_directory.py
lelandroberts97/2019-CS109A
976da6b65c26fd3c5db285cbf9ec9cde92751a70
[ "MIT" ]
3
2019-09-23T17:32:51.000Z
2022-02-09T06:06:00.000Z
content/generate_folder_directory.py
lelandroberts97/2019-CS109A
976da6b65c26fd3c5db285cbf9ec9cde92751a70
[ "MIT" ]
486
2019-06-17T05:01:07.000Z
2022-03-13T20:30:44.000Z
import os import sys from datetime import datetime class GenerateStructure: def __init__(self, number_of_lectures, number_of_labs, number_of_homework, number_of_sections, number_of_advanced_sections, folders, default_directory, default_directory_lectures, default_directory_lectur...
44.341912
118
0.643313
import os import sys from datetime import datetime class GenerateStructure: def __init__(self, number_of_lectures, number_of_labs, number_of_homework, number_of_sections, number_of_advanced_sections, folders, default_directory, default_directory_lectures, default_directory_lectur...
true
true
f71d1305afa552bee4f335ebedcfe627045c6a38
1,760
py
Python
src/pugnlp/scripts/bon_lsi.py
totalgood/pugnlp
290e5761b60257a0ac876d1eaa0f1256da945d9a
[ "MIT" ]
2
2019-06-01T10:08:45.000Z
2020-11-07T08:13:31.000Z
src/pugnlp/scripts/bon_lsi.py
totalgood/pugnlp
290e5761b60257a0ac876d1eaa0f1256da945d9a
[ "MIT" ]
null
null
null
src/pugnlp/scripts/bon_lsi.py
totalgood/pugnlp
290e5761b60257a0ac876d1eaa0f1256da945d9a
[ "MIT" ]
1
2018-08-28T20:12:09.000Z
2018-08-28T20:12:09.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bot-or-not tweet LSA/LSI model .""" from __future__ import division, print_function, absolute_import, unicode_literals from builtins import ( # noqa bytes, dict, int, list, object, range, str, ascii, chr, hex, input, next, oct, open, pow, round, super, ...
36.666667
117
0.696023
from __future__ import division, print_function, absolute_import, unicode_literals from builtins import ( bytes, dict, int, list, object, range, str, ascii, chr, hex, input, next, oct, open, pow, round, super, filter, map, zip) import logging import pandas as pd from nltk.tokenize.casual import cas...
true
true
f71d14d5d94757d06616ea762afce34495659c34
6,980
py
Python
mlcomp/test/run_test.py
lisapm/mlpiper
74ad5ae343d364682cc2f8aaa007f2e8a1d84929
[ "Apache-2.0" ]
7
2019-04-08T02:31:55.000Z
2021-11-15T14:40:49.000Z
mlcomp/test/run_test.py
lisapm/mlpiper
74ad5ae343d364682cc2f8aaa007f2e8a1d84929
[ "Apache-2.0" ]
31
2019-02-22T22:23:26.000Z
2021-08-02T17:17:06.000Z
mlcomp/test/run_test.py
lisapm/mlpiper
74ad5ae343d364682cc2f8aaa007f2e8a1d84929
[ "Apache-2.0" ]
8
2019-03-15T23:46:08.000Z
2020-02-06T09:16:02.000Z
#!/usr/bin/env python3 import argparse from os.path import expanduser import glob import json import os import re import shutil import subprocess import tempfile from termcolor import cprint, colored class TestRunner: SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) def __init__(self, options): ...
40.114943
124
0.629656
import argparse from os.path import expanduser import glob import json import os import re import shutil import subprocess import tempfile from termcolor import cprint, colored class TestRunner: SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) def __init__(self, options): self._options = opt...
true
true
f71d14e93643f0e1bfa895edafc0dd3f02d0b475
226
py
Python
setup.py
bethanymorin/smt-scrapy
50878b47094d0b4d72c483802d3aec9077c2b16b
[ "MIT" ]
null
null
null
setup.py
bethanymorin/smt-scrapy
50878b47094d0b4d72c483802d3aec9077c2b16b
[ "MIT" ]
3
2017-08-15T23:51:47.000Z
2017-09-26T18:27:55.000Z
setup.py
bethanymorin/smt-scrapy
50878b47094d0b4d72c483802d3aec9077c2b16b
[ "MIT" ]
null
null
null
# Automatically created by: shub deploy from setuptools import setup, find_packages setup( name='project', version='1.0', packages=find_packages(), entry_points={'scrapy': ['settings = scraper.settings']}, )
20.545455
61
0.69469
from setuptools import setup, find_packages setup( name='project', version='1.0', packages=find_packages(), entry_points={'scrapy': ['settings = scraper.settings']}, )
true
true
f71d157d8596c23bae0491b174ad13908d464306
300
py
Python
fructify/blueprints/debug.py
fffergal/fructify
f6043e157d3ecfce1cafba6d16769b21f6defb4b
[ "Apache-2.0" ]
null
null
null
fructify/blueprints/debug.py
fffergal/fructify
f6043e157d3ecfce1cafba6d16769b21f6defb4b
[ "Apache-2.0" ]
20
2020-03-14T16:05:43.000Z
2022-02-20T23:55:53.000Z
fructify/blueprints/debug.py
fffergal/fructify
f6043e157d3ecfce1cafba6d16769b21f6defb4b
[ "Apache-2.0" ]
null
null
null
from flask import Blueprint, request bp = Blueprint("debug", __name__) @bp.route("/api/v1/debug", methods=["DELETE", "GET", "POST"]) def debug(): if request.method == "DELETE": raise Exception if request.method != "POST": return request.args return request.get_data()
21.428571
61
0.64
from flask import Blueprint, request bp = Blueprint("debug", __name__) @bp.route("/api/v1/debug", methods=["DELETE", "GET", "POST"]) def debug(): if request.method == "DELETE": raise Exception if request.method != "POST": return request.args return request.get_data()
true
true
f71d16974deddb08bf8a27d6c9d768d917a81691
501
py
Python
beluga/utils/storage.py
doublefloyd/beluga
740bda376634945ef51bf1cf946fcbe002e9bc7f
[ "MIT" ]
20
2017-10-02T13:09:58.000Z
2022-03-28T20:50:35.000Z
beluga/utils/storage.py
doublefloyd/beluga
740bda376634945ef51bf1cf946fcbe002e9bc7f
[ "MIT" ]
187
2018-02-04T20:35:03.000Z
2021-01-27T15:04:18.000Z
beluga/utils/storage.py
doublefloyd/beluga
740bda376634945ef51bf1cf946fcbe002e9bc7f
[ "MIT" ]
12
2018-01-19T04:00:09.000Z
2022-03-28T16:44:17.000Z
import cloudpickle as pickle def save(sol_set=None, ocp=None, bvp=None, filename='data.beluga'): save_dict = {} if sol_set is not None: save_dict['solutions'] = sol_set if ocp is not None: save_dict['ocp'] = ocp if bvp is not None: save_dict['bvp'] = bvp with open(file...
17.892857
67
0.616766
import cloudpickle as pickle def save(sol_set=None, ocp=None, bvp=None, filename='data.beluga'): save_dict = {} if sol_set is not None: save_dict['solutions'] = sol_set if ocp is not None: save_dict['ocp'] = ocp if bvp is not None: save_dict['bvp'] = bvp with open(file...
true
true