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
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f77ada39d6c16c28b89252840a6aadaf0d6d3d83
518
py
Python
env/lib/python3.8/site-packages/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_enabled.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
env/lib/python3.8/site-packages/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_enabled.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
env/lib/python3.8/site-packages/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_enabled.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
import _plotly_utils.basevalidators class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="layout.coloraxis.colorbar.tickformatstop", **kwargs ): super(EnabledValidator, self).__init__( ...
28.777778
70
0.625483
import _plotly_utils.basevalidators class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="layout.coloraxis.colorbar.tickformatstop", **kwargs ): super(EnabledValidator, self).__init__( ...
true
true
f77adba2f150f62900571f5f32b2083ee53b7003
390
py
Python
configs/lvis/mask_rcnn_x101_64x4d_fpn_sample1e-3_mstrain_1x_lvis_v1.py
evgps/mmdetection_trashcan
aaf4237c2c0d473425cdc7b741d3009177b79751
[ "Apache-2.0" ]
426
2020-10-16T08:09:27.000Z
2022-03-30T03:36:04.000Z
configs/lvis/mask_rcnn_x101_64x4d_fpn_sample1e-3_mstrain_1x_lvis_v1.py
evgps/mmdetection_trashcan
aaf4237c2c0d473425cdc7b741d3009177b79751
[ "Apache-2.0" ]
170
2020-09-08T12:29:06.000Z
2022-03-31T18:28:09.000Z
configs/lvis/mask_rcnn_x101_64x4d_fpn_sample1e-3_mstrain_1x_lvis_v1.py
evgps/mmdetection_trashcan
aaf4237c2c0d473425cdc7b741d3009177b79751
[ "Apache-2.0" ]
61
2021-07-30T07:51:41.000Z
2022-03-30T14:40:02.000Z
_base_ = './mask_rcnn_r50_fpn_sample1e-3_mstrain_1x_lvis_v1.py' model = dict( pretrained='open-mmlab://resnext101_64x4d', backbone=dict( type='ResNeXt', depth=101, groups=64, base_width=4, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, no...
27.857143
63
0.602564
_base_ = './mask_rcnn_r50_fpn_sample1e-3_mstrain_1x_lvis_v1.py' model = dict( pretrained='open-mmlab://resnext101_64x4d', backbone=dict( type='ResNeXt', depth=101, groups=64, base_width=4, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, no...
true
true
f77adc53bfef17326f4de08ecb046764ec30d559
2,691
py
Python
tests/grammpy_test/terminal_tests/TerminalAddingTest.py
PatrikValkovic/grammpy
8308a1fd349bf9ea0d267360cc9a4ab20d1629e8
[ "MIT" ]
1
2021-02-04T12:41:08.000Z
2021-02-04T12:41:08.000Z
tests/grammpy_test/terminal_tests/TerminalAddingTest.py
PatrikValkovic/grammpy
8308a1fd349bf9ea0d267360cc9a4ab20d1629e8
[ "MIT" ]
3
2017-07-08T16:28:52.000Z
2020-04-23T18:06:24.000Z
tests/grammpy_test/terminal_tests/TerminalAddingTest.py
PatrikValkovic/grammpy
8308a1fd349bf9ea0d267360cc9a4ab20d1629e8
[ "MIT" ]
1
2021-02-04T12:41:10.000Z
2021-02-04T12:41:10.000Z
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 10.03.2019 22:00 :Licence MIT Part of grammpy """ from unittest import TestCase, main from grammpy import Grammar class TempClass: pass class TerminalAddingTest(TestCase): def test_haveTermEmpty(self): gr = Grammar() self.assertNot...
30.579545
49
0.633222
from unittest import TestCase, main from grammpy import Grammar class TempClass: pass class TerminalAddingTest(TestCase): def test_haveTermEmpty(self): gr = Grammar() self.assertNotIn(TempClass, gr.terminals) self.assertNotIn(1, gr.terminals) self.assertNotIn('asdf', gr.term...
true
true
f77adc79ab6705d2b4bab76d72d1f088e54a9e29
1,297
py
Python
ML_Chinahadoop/05/code/lesson/5.3.stat05.py
lsieun/learn-AI
0a164bc2e6317de3aa03c747c0e6f15d93e7f49a
[ "Apache-2.0" ]
1
2019-03-27T23:22:44.000Z
2019-03-27T23:22:44.000Z
ML_Chinahadoop/05/code/lesson/5.3.stat05.py
lsieun/learn-AI
0a164bc2e6317de3aa03c747c0e6f15d93e7f49a
[ "Apache-2.0" ]
null
null
null
ML_Chinahadoop/05/code/lesson/5.3.stat05.py
lsieun/learn-AI
0a164bc2e6317de3aa03c747c0e6f15d93e7f49a
[ "Apache-2.0" ]
null
null
null
# coding:utf-8 # import math import numpy as np from scipy import stats import matplotlib as mpl from matplotlib import cm import matplotlib.pyplot as plt def calc_statistics(x): # 使用系统函数验证 mu = np.mean(x, axis=0) sigma = np.std(x, axis=0) skew = stats.skew(x) kurtosis = stats.kurtosis(x) retu...
28.822222
98
0.623747
import math import numpy as np from scipy import stats import matplotlib as mpl from matplotlib import cm import matplotlib.pyplot as plt def calc_statistics(x): mu = np.mean(x, axis=0) sigma = np.std(x, axis=0) skew = stats.skew(x) kurtosis = stats.kurtosis(x) return mu, sigma, skew, kurtosis...
true
true
f77adcb7589bcd04a1dbfc4d4e15f32db3ea1576
545
py
Python
day5/lab-guide-ans/lab5-problem1-1.py
WhatTheFar/practical-ai-bootcamp
e2fe013390c00df0a5486795a737d7b777266f35
[ "MIT" ]
null
null
null
day5/lab-guide-ans/lab5-problem1-1.py
WhatTheFar/practical-ai-bootcamp
e2fe013390c00df0a5486795a737d7b777266f35
[ "MIT" ]
null
null
null
day5/lab-guide-ans/lab5-problem1-1.py
WhatTheFar/practical-ai-bootcamp
e2fe013390c00df0a5486795a737d7b777266f35
[ "MIT" ]
null
null
null
import pandas as pd import matplotlib.pyplot as plt dataframe = pd.read_csv('data/problem1data.txt', header=None) datasetClass0 = dataframe.loc[dataframe[2] == 0] datasetClass1 = dataframe.loc[dataframe[2] == 1] figure = plt.figure() axis = figure.add_subplot(111) axis.scatter(datasetClass0[0], datasetClass0[1], mark...
30.277778
77
0.741284
import pandas as pd import matplotlib.pyplot as plt dataframe = pd.read_csv('data/problem1data.txt', header=None) datasetClass0 = dataframe.loc[dataframe[2] == 0] datasetClass1 = dataframe.loc[dataframe[2] == 1] figure = plt.figure() axis = figure.add_subplot(111) axis.scatter(datasetClass0[0], datasetClass0[1], mark...
true
true
f77add1f606f06b5ae4d2dc1e405aef0934c1586
223
py
Python
envcon/utils/functional.py
neriat/envcon
f934f335451a21022a1c0124c79d71c3f843866a
[ "MIT" ]
null
null
null
envcon/utils/functional.py
neriat/envcon
f934f335451a21022a1c0124c79d71c3f843866a
[ "MIT" ]
null
null
null
envcon/utils/functional.py
neriat/envcon
f934f335451a21022a1c0124c79d71c3f843866a
[ "MIT" ]
null
null
null
from typing import Callable, Sequence, Optional, TypeVar, Any T = TypeVar("T") def first(predicate: Callable[[Optional[T]], Any], sequence: Sequence[T]) -> Optional[T]: return next(filter(predicate, sequence), None)
27.875
89
0.713004
from typing import Callable, Sequence, Optional, TypeVar, Any T = TypeVar("T") def first(predicate: Callable[[Optional[T]], Any], sequence: Sequence[T]) -> Optional[T]: return next(filter(predicate, sequence), None)
true
true
f77add2085e4c70655c0f14de002b7eaef85ee15
20,038
py
Python
django/core/management/base.py
dwightgunning/django
9e399e15fbf03507fa54e4bb20ed6f1b0d817b83
[ "PSF-2.0", "BSD-3-Clause" ]
1
2015-11-07T14:30:36.000Z
2015-11-07T14:30:36.000Z
django/core/management/base.py
dwightgunning/django
9e399e15fbf03507fa54e4bb20ed6f1b0d817b83
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
django/core/management/base.py
dwightgunning/django
9e399e15fbf03507fa54e4bb20ed6f1b0d817b83
[ "PSF-2.0", "BSD-3-Clause" ]
1
2016-09-02T01:22:19.000Z
2016-09-02T01:22:19.000Z
# -*- coding: utf-8 -*- """ Base classes for writing management commands (named commands which can be executed through ``django-admin`` or ``manage.py``). """ from __future__ import unicode_literals import os import sys from argparse import ArgumentParser import django from django.core import checks from django.core....
39.996008
117
0.627308
from __future__ import unicode_literals import os import sys from argparse import ArgumentParser import django from django.core import checks from django.core.management.color import color_style, no_style from django.db import connections from django.utils.encoding import force_str class CommandError(Exception): ...
true
true
f77add5f4b9ab5b6fcd77e77b65e71b63da18350
791
py
Python
openapi_client/api/__init__.py
hypostulate/mbta-api-client
f18903b6269c523c733a31574ff4579349fed3f8
[ "MIT" ]
null
null
null
openapi_client/api/__init__.py
hypostulate/mbta-api-client
f18903b6269c523c733a31574ff4579349fed3f8
[ "MIT" ]
null
null
null
openapi_client/api/__init__.py
hypostulate/mbta-api-client
f18903b6269c523c733a31574ff4579349fed3f8
[ "MIT" ]
null
null
null
from __future__ import absolute_import # flake8: noqa # import apis into api package from openapi_client.api.alert_api import AlertApi from openapi_client.api.facility_api import FacilityApi from openapi_client.api.line_api import LineApi from openapi_client.api.live_facility_api import LiveFacilityApi from openapi_c...
41.631579
64
0.878635
from __future__ import absolute_import from openapi_client.api.alert_api import AlertApi from openapi_client.api.facility_api import FacilityApi from openapi_client.api.line_api import LineApi from openapi_client.api.live_facility_api import LiveFacilityApi from openapi_client.api.prediction_api import PredictionApi ...
true
true
f77adeba893203c2a2c80834731c22893fc6dedf
3,490
py
Python
gantt/models.py
diacepanbimbo/colectivo_panal
0412be67f60dafb50138930dafb244cededf731c
[ "MIT" ]
null
null
null
gantt/models.py
diacepanbimbo/colectivo_panal
0412be67f60dafb50138930dafb244cededf731c
[ "MIT" ]
null
null
null
gantt/models.py
diacepanbimbo/colectivo_panal
0412be67f60dafb50138930dafb244cededf731c
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.db import models from mptt.models import MPTTModel, TreeForeignKey import datetime def get_sentinel_user(): return get_user_model().objects.get_or_create(name='deleted')[0] class User(models.Model): name = models.CharField(max_length=30) email = models....
38.351648
111
0.640688
from __future__ import unicode_literals from django.db import models from mptt.models import MPTTModel, TreeForeignKey import datetime def get_sentinel_user(): return get_user_model().objects.get_or_create(name='deleted')[0] class User(models.Model): name = models.CharField(max_length=30) email = models....
true
true
f77adf843de409a4a2abf3345455195d4406afeb
983
py
Python
instagram/urls.py
kimutaiamos/instagram-clone
5444840444f6c3e87b3f16c605cb8664bbb63b6a
[ "MIT" ]
null
null
null
instagram/urls.py
kimutaiamos/instagram-clone
5444840444f6c3e87b3f16c605cb8664bbb63b6a
[ "MIT" ]
null
null
null
instagram/urls.py
kimutaiamos/instagram-clone
5444840444f6c3e87b3f16c605cb8664bbb63b6a
[ "MIT" ]
null
null
null
"""instagram URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
37.807692
79
0.698881
from django.conf.urls import url,include from django.contrib import admin from django.contrib.auth.views import LogoutView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'',include('chats.urls')), url(r'^accounts/', include('registration.backends.simple.urls')), url(r'^logout/$',LogoutView, {"n...
true
true
f77ae486eb442374a601b152770317e797241cc1
918
py
Python
humansize.py
deepak-kandel/oop_python
449df1b428f1c1e774db7edac94225d6fb60dc40
[ "Apache-2.0" ]
null
null
null
humansize.py
deepak-kandel/oop_python
449df1b428f1c1e774db7edac94225d6fb60dc40
[ "Apache-2.0" ]
null
null
null
humansize.py
deepak-kandel/oop_python
449df1b428f1c1e774db7edac94225d6fb60dc40
[ "Apache-2.0" ]
null
null
null
SUFFIXES = { 1000: ["KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], 1024: ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"], } def approximate_size(size, a_kilobyte_is_1024_bytes=True): """Convert a file size to human-readable form. Keyword arguments: size -- file size in bytes a_kilo...
27.818182
72
0.610022
SUFFIXES = { 1000: ["KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], 1024: ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"], } def approximate_size(size, a_kilobyte_is_1024_bytes=True): if size < 0: raise ValueError("number must be non-negative") multiple = 1024 if a_kilobyte_is_1024_...
true
true
f77ae494ca75f41102c96993140401bce045802d
1,829
py
Python
simpleTLSserver.py
diogenes9/quickTLSserver
71de58f151dd476a48c539da95f5134df4b5de2f
[ "MIT" ]
null
null
null
simpleTLSserver.py
diogenes9/quickTLSserver
71de58f151dd476a48c539da95f5134df4b5de2f
[ "MIT" ]
null
null
null
simpleTLSserver.py
diogenes9/quickTLSserver
71de58f151dd476a48c539da95f5134df4b5de2f
[ "MIT" ]
null
null
null
#!/usr/bin/python # this is for python 2.7. Converting to python3 should be trivial import ssl # from http.server import BaseHTTPRequestHandler, HTTPServer import BaseHTTPServer, SimpleHTTPServer # class myHTTPServer_RequestHandler(BaseHTTPServer): class myHTTPServer_RequestHandler(BaseHTTPServer.BaseHTTPRequ...
37.326531
130
0.644615
import ssl import BaseHTTPServer, SimpleHTTPServer class myHTTPServer_RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) self.send_header('Content-type', 'text/html') self.end_headers() print('Headers:') ...
false
true
f77ae52a60826555a7ee0da38794d1ed2090d532
14,189
py
Python
airflow/utils/db_cleanup.py
holly-evans/airflow
865406cbab4defd35c95afbf0a8d5987ff7788b1
[ "Apache-2.0" ]
3
2017-08-06T23:19:48.000Z
2018-05-11T05:50:25.000Z
airflow/utils/db_cleanup.py
holly-evans/airflow
865406cbab4defd35c95afbf0a8d5987ff7788b1
[ "Apache-2.0" ]
20
2016-11-21T22:54:28.000Z
2018-10-28T20:03:13.000Z
airflow/utils/db_cleanup.py
holly-evans/airflow
865406cbab4defd35c95afbf0a8d5987ff7788b1
[ "Apache-2.0" ]
3
2016-10-13T09:59:18.000Z
2017-02-22T11:29:09.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.76776
141
0.708436
import logging from contextlib import contextmanager from dataclasses import dataclass from typing import Any, Dict, List, Optional from pendulum import DateTime from sqlalchemy import and_, column, false, func, table, text from sqlalchemy.exc import OperationalError, ProgrammingError from sqlalchemy.ext.compiler im...
true
true
f77ae544e925f727255e87dc3029dd11a80e8e46
4,095
py
Python
crocpad/eula_quiz_dialog.py
syntaxaire/code-jam-4-final
a8f183aa8b1051fcb1ef156191047ad5ed63d9a1
[ "MIT" ]
1
2019-03-10T18:47:27.000Z
2019-03-10T18:47:27.000Z
crocpad/eula_quiz_dialog.py
syntaxaire/code-jam-4-final
a8f183aa8b1051fcb1ef156191047ad5ed63d9a1
[ "MIT" ]
1
2019-02-28T03:45:52.000Z
2019-04-12T18:26:22.000Z
crocpad/eula_quiz_dialog.py
syntaxaire/code-jam-4-final
a8f183aa8b1051fcb1ef156191047ad5ed63d9a1
[ "MIT" ]
2
2019-03-14T18:47:35.000Z
2020-10-24T20:51:02.000Z
"""Wrapper for the generated Python code in ui/eula_quiz.py.""" from PyQt5 import QtWidgets from PyQt5.QtWidgets import QDialog from PyQt5.QtCore import Qt from crocpad.configuration import app_config, save_config from crocpad.ui.eula_quiz import Ui_EulaQuizDialog class EulaQuizDialog(QDialog, Ui_EulaQuizDialog): ...
44.032258
93
0.695238
from PyQt5 import QtWidgets from PyQt5.QtWidgets import QDialog from PyQt5.QtCore import Qt from crocpad.configuration import app_config, save_config from crocpad.ui.eula_quiz import Ui_EulaQuizDialog class EulaQuizDialog(QDialog, Ui_EulaQuizDialog): def __init__(self): super(EulaQuizDialog, self).__in...
true
true
f77ae5996d17b7b0c4e212e3a9585077680d7612
7,078
py
Python
tests/integration/test_concurrent_ttl_merges/test.py
torilov/ClickHouse
bbbe51033dfd5b8c3d54e168475ca707ac7ec0b4
[ "Apache-2.0" ]
1
2020-10-01T01:54:37.000Z
2020-10-01T01:54:37.000Z
tests/integration/test_concurrent_ttl_merges/test.py
torilov/ClickHouse
bbbe51033dfd5b8c3d54e168475ca707ac7ec0b4
[ "Apache-2.0" ]
null
null
null
tests/integration/test_concurrent_ttl_merges/test.py
torilov/ClickHouse
bbbe51033dfd5b8c3d54e168475ca707ac7ec0b4
[ "Apache-2.0" ]
null
null
null
import time import pytest from helpers.cluster import ClickHouseCluster from helpers.test_tools import assert_eq_with_retry cluster = ClickHouseCluster(__file__) node1 = cluster.add_instance('node1', main_configs=['configs/fast_background_pool.xml'], with_zookeeper=True) node2 = cluster.add_instance('node2', main_con...
40.913295
242
0.70599
import time import pytest from helpers.cluster import ClickHouseCluster from helpers.test_tools import assert_eq_with_retry cluster = ClickHouseCluster(__file__) node1 = cluster.add_instance('node1', main_configs=['configs/fast_background_pool.xml'], with_zookeeper=True) node2 = cluster.add_instance('node2', main_con...
false
true
f77ae678857f2bbda26174a66bc1b6ccb2e438ef
71,548
py
Python
object_branch/benchmark/nyu/box3d.py
JasonQSY/Associative3D
c50818b593ec48c38ed7ee3e109c23531089da32
[ "MIT" ]
25
2020-08-26T02:41:12.000Z
2021-09-30T21:50:36.000Z
object_branch/benchmark/nyu/box3d.py
JasonQSY/Associative3D
c50818b593ec48c38ed7ee3e109c23531089da32
[ "MIT" ]
null
null
null
object_branch/benchmark/nyu/box3d.py
JasonQSY/Associative3D
c50818b593ec48c38ed7ee3e109c23531089da32
[ "MIT" ]
1
2020-11-17T15:25:26.000Z
2020-11-17T15:25:26.000Z
"""Script for dwr prediction benchmarking. """ # Sample usage: # (shape_ft) : python -m factored3d.benchmark.suncg.dwr --num_train_epoch=1 --name=dwr_shape_ft --classify_rot --pred_voxels=True --use_context --save_visuals --visuals_freq=50 --eval_set=val --suncg_dl_debug_mode --max_eval_iter=20 from __future__ impo...
48.73842
235
0.613658
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl import app from absl import flags import os import os.path as osp import numpy as np import torch import torchvision from torch.autograd import Variable import time import scipy.misc import pdb import...
true
true
f77ae6897fc295e07354ef9977d3fa17ab67c38b
3,687
py
Python
ds4se/mgmnt/prep/files_mgmnt.py
WM-CSCI-435-F19/data-science-4-software-engineering
3692163df710550d4ee5b399a2a184968a0f18c6
[ "Apache-2.0" ]
5
2020-12-08T00:38:24.000Z
2021-11-16T20:00:59.000Z
ds4se/mgmnt/prep/files_mgmnt.py
WM-CSCI-435-F19/data-science-4-software-engineering
3692163df710550d4ee5b399a2a184968a0f18c6
[ "Apache-2.0" ]
110
2020-09-26T18:36:35.000Z
2022-03-12T00:54:35.000Z
ds4se/mgmnt/prep/files_mgmnt.py
WM-CSCI-435-F19/data-science-4-software-engineering
3692163df710550d4ee5b399a2a184968a0f18c6
[ "Apache-2.0" ]
3
2020-12-09T19:23:10.000Z
2021-02-16T12:54:16.000Z
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/0.2_mgmnt.prep.files_mgmnt.ipynb (unless otherwise specified). __all__ = ['logger', 'get_file_name', 'get_files_list', 'jsonl_list_to_dataframe', 'jsonl_to_dataframe', 'csv_to_dataframe', 'load_np_vectors', 'get_vector_paths_4_sample_set'] # Cell import pand...
27.721805
110
0.661242
__all__ = ['logger', 'get_file_name', 'get_files_list', 'jsonl_list_to_dataframe', 'jsonl_to_dataframe', 'csv_to_dataframe', 'load_np_vectors', 'get_vector_paths_4_sample_set'] import pandas as pd import numpy as np from pathlib import Path, PosixPath from typing import List import logging logger = log...
true
true
f77ae73b01fafdcd7ef95cb2e15ed0bb58bb759e
767
py
Python
examples/rdf_to_yaml.py
thealphacod3r/tools-python
d197a3adf95e2f4fc78c6983f5477f9b962bdaab
[ "Apache-2.0" ]
null
null
null
examples/rdf_to_yaml.py
thealphacod3r/tools-python
d197a3adf95e2f4fc78c6983f5477f9b962bdaab
[ "Apache-2.0" ]
1
2021-07-27T05:23:15.000Z
2021-07-27T05:23:15.000Z
examples/rdf_to_yaml.py
thealphacod3r/tools-python
d197a3adf95e2f4fc78c6983f5477f9b962bdaab
[ "Apache-2.0" ]
2
2021-06-09T12:03:20.000Z
2021-07-01T07:42:17.000Z
#!/usr/bin/env python def RDF_to_YAML(infile_name, outfile_name): # if __name__ == "__main__": # import sys from spdx.parsers.rdf import Parser from spdx.parsers.loggers import StandardLogger from spdx.parsers.rdfbuilders import Builder from spdx.writers.yaml import write_document # file ...
25.566667
53
0.644068
def RDF_to_YAML(infile_name, outfile_name): from spdx.parsers.rdf import Parser from spdx.parsers.loggers import StandardLogger from spdx.parsers.rdfbuilders import Builder from spdx.writers.yaml import write_document p = Parser(Builder(), StandardLogger()) with open(infile_name) ...
true
true
f77ae7c6a5d217e3b43aec8f9cbd62f84f7a755e
762
py
Python
setup.py
idaks/PW-explorer
2ea90722924ed2c0a04805f1588f304affc36354
[ "Apache-2.0" ]
15
2017-07-11T13:34:22.000Z
2021-08-16T12:32:51.000Z
setup.py
idaks/PW-explorer
2ea90722924ed2c0a04805f1588f304affc36354
[ "Apache-2.0" ]
34
2018-10-26T14:39:47.000Z
2020-08-03T12:19:26.000Z
setup.py
idaks/PW-explorer
2ea90722924ed2c0a04805f1588f304affc36354
[ "Apache-2.0" ]
1
2017-08-09T05:04:56.000Z
2017-08-09T05:04:56.000Z
import setuptools with open("README.md", "r") as fh: long_description = fh.read() with open('requirements.txt', 'r') as fh: requirements = fh.read().split('\n') setuptools.setup( name="PW_explorer", version="0.0.25", author="Sahil Gupta", author_email="", description="An Extensible Possib...
30.48
83
0.675853
import setuptools with open("README.md", "r") as fh: long_description = fh.read() with open('requirements.txt', 'r') as fh: requirements = fh.read().split('\n') setuptools.setup( name="PW_explorer", version="0.0.25", author="Sahil Gupta", author_email="", description="An Extensible Possib...
true
true
f77ae8250f3b08dab91d2ddde680c06f56f7dc4a
417
py
Python
medium/search.py
SeulYoung/leetcode
a3d7c0d025b20f1bba3daddd7681e2a211b83d90
[ "BSD-3-Clause" ]
null
null
null
medium/search.py
SeulYoung/leetcode
a3d7c0d025b20f1bba3daddd7681e2a211b83d90
[ "BSD-3-Clause" ]
null
null
null
medium/search.py
SeulYoung/leetcode
a3d7c0d025b20f1bba3daddd7681e2a211b83d90
[ "BSD-3-Clause" ]
null
null
null
# # 如果目标值存在返回下标,否则返回 -1 # @param nums int整型一维数组 # @param target int整型 # @return int整型 # class Solution: def search(self, nums, target): begin, end = 0, len(nums) - 1 while begin < end: mid = (begin + end) // 2 if nums[mid] >= target: end = mid else...
24.529412
62
0.501199
class Solution: def search(self, nums, target): begin, end = 0, len(nums) - 1 while begin < end: mid = (begin + end) // 2 if nums[mid] >= target: end = mid else: begin = mid + 1 return end if end >= 0 and nums[end] == target...
true
true
f77ae9b787edf91f7f45199a2e38bb7f6cceb65a
7,945
py
Python
DarkScripts/plot_SNRComposites_XLENS_Method4.py
zmlabe/InternalSignal
2ac31bc7a0c445ed9fa609f3c7f9800bec7b4aed
[ "MIT" ]
3
2020-08-27T08:07:34.000Z
2021-10-06T08:47:42.000Z
Scripts/plot_SNRComposites_XLENS_Method4.py
zmlabe/InternalSignal
2ac31bc7a0c445ed9fa609f3c7f9800bec7b4aed
[ "MIT" ]
1
2022-03-25T02:14:19.000Z
2022-03-25T02:14:19.000Z
DarkScripts/plot_SNRComposites_XLENS_Method4.py
zmlabe/InternalSignal
2ac31bc7a0c445ed9fa609f3c7f9800bec7b4aed
[ "MIT" ]
3
2021-02-12T19:18:20.000Z
2021-03-28T08:38:56.000Z
""" Plot signal-to-noise ratios for XLENS simulations Method 4 = mean temperature change / mean std of temperature in 1920-1959 Reference : Deser et al. [2020, JCLI] & Barnes et al. [2020, JAMES] Author : Zachary M. Labe Date : 28 October 2020 """ ### Import packages import math import time import matplotli...
40.126263
83
0.641913
import math import time import matplotlib.pyplot as plt import numpy as np import scipy.stats as sts from mpl_toolkits.basemap import Basemap, addcyclic, shiftgrid import palettable.cubehelix as cm import cmocean as cmocean import calc_Utilities as UT import calc_dataFunctions as df import itertools directorydataLLS ...
true
true
f77aeaa746ec3603661af2048afad9d63659a2f8
2,194
py
Python
stackalytics/processor/normalizer.py
dianaclarke/lit
2eca9d46e5e908baafb88d0811ebab586fc2ec0d
[ "Apache-2.0" ]
1
2017-10-23T17:12:16.000Z
2017-10-23T17:12:16.000Z
stackalytics/processor/normalizer.py
dianaclarke/lit
2eca9d46e5e908baafb88d0811ebab586fc2ec0d
[ "Apache-2.0" ]
null
null
null
stackalytics/processor/normalizer.py
dianaclarke/lit
2eca9d46e5e908baafb88d0811ebab586fc2ec0d
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2013 Mirantis 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 writi...
30.472222
76
0.670009
import six from stackalytics.processor import user_processor from stackalytics.processor import utils def _normalize_user(user): for c in user['companies']: c['end_date'] = utils.date_to_timestamp(c['end_date']) def end_date_comparator(x, y): if x["end_date"] == 0: return 1 ...
true
true
f77aeb336381c088d39d7dd744ec147edf6f5142
42
py
Python
src/pygetwindow/_pygetwindow_linux.py
JuliusLongmind/PyGetWindow
82b534c41078d517cb8bd73c3f5d7b9c7f85abb9
[ "BSD-3-Clause" ]
null
null
null
src/pygetwindow/_pygetwindow_linux.py
JuliusLongmind/PyGetWindow
82b534c41078d517cb8bd73c3f5d7b9c7f85abb9
[ "BSD-3-Clause" ]
null
null
null
src/pygetwindow/_pygetwindow_linux.py
JuliusLongmind/PyGetWindow
82b534c41078d517cb8bd73c3f5d7b9c7f85abb9
[ "BSD-3-Clause" ]
null
null
null
from Xlib import X, display, Xutil, Xatom
21
41
0.761905
from Xlib import X, display, Xutil, Xatom
true
true
f77aeb7d3e4e6b13c50875948676fdc8b5645e14
40,531
py
Python
src/azure-cli/azure/cli/command_modules/acr/task.py
digimaun/azure-cli
298994660f0fde6863cb45a7c3142141ed10f923
[ "MIT" ]
1
2020-12-12T02:53:24.000Z
2020-12-12T02:53:24.000Z
src/azure-cli/azure/cli/command_modules/acr/task.py
mjudeikis/azure-cli
44c3b4a8405b8e32fb2b5a660577f23053932117
[ "MIT" ]
1
2021-03-01T19:31:38.000Z
2021-03-01T19:31:38.000Z
src/azure-cli/azure/cli/command_modules/acr/task.py
mjudeikis/azure-cli
44c3b4a8405b8e32fb2b5a660577f23053932117
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
40.050395
114
0.610866
import re from msrest.exceptions import ValidationError from knack.log import get_logger from knack.util import CLIError from azure.cli.core.commands import LongRunningOperation from ._utils import ( get_registry_by_name, validate_managed_registry, get_validate_platform, get_custom_registry_credentials...
true
true
f77aec1e6efce15ea7ba1ac3c332ebfdd2580718
368
py
Python
config.py
tweetbrain/twitter-test
7f558ec966baa4f6f7c82cbf78fa1e219565587d
[ "MIT" ]
null
null
null
config.py
tweetbrain/twitter-test
7f558ec966baa4f6f7c82cbf78fa1e219565587d
[ "MIT" ]
null
null
null
config.py
tweetbrain/twitter-test
7f558ec966baa4f6f7c82cbf78fa1e219565587d
[ "MIT" ]
null
null
null
import json import os try: with open('secrets.json', 'r') as secrets_file: secrets = json.load(secrets_file) except FileNotFoundError: secrets = os.environ class Config: CONSUMER_KEY = secrets["CONSUMER_KEY"] CONSUMER_SECRET = secrets["CONSUMER_SECRET"] ACCESS_TOKEN = secrets["ACCESS_TOKEN...
24.533333
51
0.717391
import json import os try: with open('secrets.json', 'r') as secrets_file: secrets = json.load(secrets_file) except FileNotFoundError: secrets = os.environ class Config: CONSUMER_KEY = secrets["CONSUMER_KEY"] CONSUMER_SECRET = secrets["CONSUMER_SECRET"] ACCESS_TOKEN = secrets["ACCESS_TOKEN...
true
true
f77aec3690762c1c8c6393d37beb6f599f4fc1e9
653
py
Python
credit_integration/migrations/0005_creditdecision_original_data.py
City-of-Helsinki/mvj
6f786047805a968317ecc37b38c2262ada2c3805
[ "MIT" ]
1
2021-01-12T08:14:10.000Z
2021-01-12T08:14:10.000Z
credit_integration/migrations/0005_creditdecision_original_data.py
City-of-Helsinki/mvj
6f786047805a968317ecc37b38c2262ada2c3805
[ "MIT" ]
249
2017-04-18T14:00:13.000Z
2022-03-30T12:18:03.000Z
credit_integration/migrations/0005_creditdecision_original_data.py
City-of-Helsinki/mvj
6f786047805a968317ecc37b38c2262ada2c3805
[ "MIT" ]
7
2017-04-18T08:43:54.000Z
2021-07-28T07:29:30.000Z
import django.contrib.postgres.fields.jsonb import django.core.serializers.json from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("credit_integration", "0004_set_operational_start_date_nullable"), ] operations = [ migrations.AddField( m...
27.208333
75
0.621746
import django.contrib.postgres.fields.jsonb import django.core.serializers.json from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("credit_integration", "0004_set_operational_start_date_nullable"), ] operations = [ migrations.AddField( m...
true
true
f77aec657a2941fa186c0c9042b3a76920cec700
844
py
Python
livecode/bind_X_and_Y.py
dolcos/driverlessai-recipes
e1eb2787daeaae387d80ce24d4d3398c4fddb585
[ "Apache-2.0" ]
1
2021-08-06T20:24:46.000Z
2021-08-06T20:24:46.000Z
livecode/bind_X_and_Y.py
dolcos/driverlessai-recipes
e1eb2787daeaae387d80ce24d4d3398c4fddb585
[ "Apache-2.0" ]
null
null
null
livecode/bind_X_and_Y.py
dolcos/driverlessai-recipes
e1eb2787daeaae387d80ce24d4d3398c4fddb585
[ "Apache-2.0" ]
null
null
null
# Template for binding columns from 2 datasets with the same number of rows. # Recipe won't perform any joins/mapping but rather stitch 2 datasets together into wider dataset with # the same number of rows and columns from both. # # Specification: # Inputs: # X: datatable - primary dataset # Y_name: string - datase...
31.259259
102
0.758294
# the same number of rows and columns from both. # # Specification: # Inputs: # X: datatable - primary dataset # Y_name: string - dataset location to bind with # Parameters: # None # Output: # dataset containing all rows from both datasets # find location of the dataset file by going to DETAILS where it's disp...
true
true
f77aee1ea55e4584357171b18764a5c58af92833
8,155
py
Python
t2/server.py
gabrielcoutod/Trabalhos-IA-2021-1
8726ffd60ceef08f23506fb675ccf1acb07c9096
[ "MIT" ]
null
null
null
t2/server.py
gabrielcoutod/Trabalhos-IA-2021-1
8726ffd60ceef08f23506fb675ccf1acb07c9096
[ "MIT" ]
null
null
null
t2/server.py
gabrielcoutod/Trabalhos-IA-2021-1
8726ffd60ceef08f23506fb675ccf1acb07c9096
[ "MIT" ]
1
2021-12-14T22:22:57.000Z
2021-12-14T22:22:57.000Z
#!/usr/bin/python import os import sys import time import signal import importlib import argparse import subprocess import xml.etree.ElementTree as ET import xml.dom.minidom import board import timer class Server(object): """ Othello server, implements a simple file-based playing protocol """ def ...
37.75463
128
0.578296
import os import sys import time import signal import importlib import argparse import subprocess import xml.etree.ElementTree as ET import xml.dom.minidom import board import timer class Server(object): def __init__(self, p1_dir, p2_dir, delay, history, output): self.basedir = os.path.abspath('.') ...
true
true
f77aeff50a9c6e1beaa7aeeaa7f6bd3a46a7342a
1,470
py
Python
the-pattern-api/qasearch/tokeniser_gears_redisai.py
redis-developer/the-pattern
faa629b8152f405f92987c1436565938fa302932
[ "MIT" ]
3
2021-09-22T15:24:24.000Z
2022-02-14T02:40:42.000Z
the-pattern-api/qasearch/tokeniser_gears_redisai.py
redis-developer/the-pattern
faa629b8152f405f92987c1436565938fa302932
[ "MIT" ]
null
null
null
the-pattern-api/qasearch/tokeniser_gears_redisai.py
redis-developer/the-pattern
faa629b8152f405f92987c1436565938fa302932
[ "MIT" ]
2
2021-09-22T15:24:27.000Z
2022-02-14T01:00:34.000Z
### This gears will pre-compute (encode) all sentences using BERT tokenizer for QA tokenizer = None def loadTokeniser(): global tokenizer from transformers import BertTokenizerFast tokenizer = BertTokenizerFast.from_pretrained("bert-large-uncased-whole-word-masking-finetuned-squad") # tokenizer = Aut...
36.75
120
0.712925
tokenizer = None def loadTokeniser(): global tokenizer from transformers import BertTokenizerFast tokenizer = BertTokenizerFast.from_pretrained("bert-large-uncased-whole-word-masking-finetuned-squad") return tokenizer def remove_prefix(text, prefix): return text[text.startswith(prefix) and l...
true
true
f77af03f0b73e722d020828ada3a172c6af6143f
106,619
py
Python
Server/ChatBot/venv/Lib/site-packages/tensorflow/python/ops/gen_dataset_ops.py
sozuer53/BBC
31bb128cb1e1a19db955fd673d67cf0e92bac3a4
[ "Apache-2.0" ]
3
2018-11-27T06:30:23.000Z
2021-05-30T15:56:32.000Z
Server/ChatBot/venv/Lib/site-packages/tensorflow/python/ops/gen_dataset_ops.py
sozuer53/BBC
31bb128cb1e1a19db955fd673d67cf0e92bac3a4
[ "Apache-2.0" ]
3
2020-09-26T01:09:47.000Z
2022-02-10T02:12:08.000Z
Server/ChatBot/venv/Lib/site-packages/tensorflow/python/ops/gen_dataset_ops.py
sozuer53/BBC
31bb128cb1e1a19db955fd673d67cf0e92bac3a4
[ "Apache-2.0" ]
6
2020-04-13T15:33:30.000Z
2020-06-21T19:26:55.000Z
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. """ import collections as _collections from tensorflow.python.eager import execute as _execute from tensorflow.python.eager import context as _context from tensorflow.python.eager import core as _core from tensorflow.python.framew...
38.228397
8,455
0.67774
import collections as _collections from tensorflow.python.eager import execute as _execute from tensorflow.python.eager import context as _context from tensorflow.python.eager import core as _core from tensorflow.python.framework import dtypes as _dtypes from tensorflow.python.framework import tensor_shape as _tensor...
true
true
f77af0d79faba1521da0d6403e4fe58c26d6d0c8
12,478
py
Python
lib/twisted/internet/test/test_tls.py
Kagami/kisa
2597f67e519b8d66fec2684ff5a7726436bb029b
[ "CC0-1.0" ]
7
2015-04-28T13:26:11.000Z
2020-02-09T17:01:04.000Z
lib/twisted/internet/test/test_tls.py
Kagami/kisa
2597f67e519b8d66fec2684ff5a7726436bb029b
[ "CC0-1.0" ]
null
null
null
lib/twisted/internet/test/test_tls.py
Kagami/kisa
2597f67e519b8d66fec2684ff5a7726436bb029b
[ "CC0-1.0" ]
3
2015-03-10T20:56:17.000Z
2021-08-21T02:44:24.000Z
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for implementations of L{ITLSTransport}. """ __metaclass__ = type from zope.interface import implements from twisted.internet.test.reactormixins import ReactorBuilder from twisted.internet.protocol import ServerFactory, ClientFactory,...
37.247761
91
0.678314
__metaclass__ = type from zope.interface import implements from twisted.internet.test.reactormixins import ReactorBuilder from twisted.internet.protocol import ServerFactory, ClientFactory, Protocol from twisted.internet.interfaces import ( IReactorSSL, ITLSTransport, IStreamClientEndpoint) from twisted.interne...
true
true
f77af21730c3f92053942e20a83c3304645f410c
3,874
py
Python
ingv/aggregate.py
danja/elfquake
0c42a32ccc1d7008febf120eabe666fbdccff781
[ "Apache-2.0" ]
2
2019-04-24T01:57:04.000Z
2020-05-26T22:28:55.000Z
ingv/aggregate.py
danja/elfquake
0c42a32ccc1d7008febf120eabe666fbdccff781
[ "Apache-2.0" ]
null
null
null
ingv/aggregate.py
danja/elfquake
0c42a32ccc1d7008febf120eabe666fbdccff781
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import glob import csv import numpy as np from numpy import genfromtxt import gc # garbage collection import hickle as hkl class Aggregate(): def __init__(self): self.csv_dir = "./csv_data/raw/" # 40N-47N, 7E-15E - northern Italy # ''Aquila 6 Apri...
32.830508
115
0.536655
import glob import csv import numpy as np from numpy import genfromtxt import gc import hickle as hkl class Aggregate(): def __init__(self): self.csv_dir = "./csv_data/raw/" self.min_latitude = 40 self.max_latitude = 47 self.min_lo...
true
true
f77af24909ddc19a53ffbb345cbc1b7083b67378
16,793
py
Python
python-3.4.4.amd64/Lib/asyncio/futures.py
CSnap/photogate
208272ef39f4e86f40d431da2ca523e21701f789
[ "CC0-1.0" ]
null
null
null
python-3.4.4.amd64/Lib/asyncio/futures.py
CSnap/photogate
208272ef39f4e86f40d431da2ca523e21701f789
[ "CC0-1.0" ]
null
null
null
python-3.4.4.amd64/Lib/asyncio/futures.py
CSnap/photogate
208272ef39f4e86f40d431da2ca523e21701f789
[ "CC0-1.0" ]
null
null
null
"""A Future class similar to the one in PEP 3148.""" __all__ = ['CancelledError', 'TimeoutError', 'InvalidStateError', 'Future', 'wrap_future', ] import concurrent.futures._base import logging import reprlib import sys import traceback from . import compat from . import...
36.988987
79
0.619484
__all__ = ['CancelledError', 'TimeoutError', 'InvalidStateError', 'Future', 'wrap_future', ] import concurrent.futures._base import logging import reprlib import sys import traceback from . import compat from . import events _PENDING = 'PENDING' _CANCELLED = 'CANCELL...
true
true
f77af2c2ba72a580199eb63abec8d6d17b4d140a
2,434
py
Python
tests/utils.py
estenssoros/sqlwriter
881df2354929944a26418c6673a978568360bdfa
[ "MIT" ]
null
null
null
tests/utils.py
estenssoros/sqlwriter
881df2354929944a26418c6673a978568360bdfa
[ "MIT" ]
1
2018-01-01T04:15:31.000Z
2018-01-02T04:03:03.000Z
tests/utils.py
estenssoros/sqlwriter
881df2354929944a26418c6673a978568360bdfa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import datetime as dt import os import random import string import sys import time import pandas as pd import yaml from past.builtins import basestring this_dir = os.path.dirname(__file__) def get_config(prog=None): cfg_file = os.path.join(this_dir, 'conf.yaml') with open(cfg_file, ...
27.977011
118
0.621611
import datetime as dt import os import random import string import sys import time import pandas as pd import yaml from past.builtins import basestring this_dir = os.path.dirname(__file__) def get_config(prog=None): cfg_file = os.path.join(this_dir, 'conf.yaml') with open(cfg_file, 'r') as f: confi...
true
true
f77af2ee4632487182aa1ebbd8ff7813d6a16b58
2,508
py
Python
dohq_teamcity/models/snapshot_dependencies.py
DenKoren/teamcity
69acb4d1402c316129b4602882a9cce2d55cf926
[ "MIT" ]
23
2018-10-19T07:28:45.000Z
2021-11-12T12:46:09.000Z
dohq_teamcity/models/snapshot_dependencies.py
DenKoren/teamcity
69acb4d1402c316129b4602882a9cce2d55cf926
[ "MIT" ]
31
2018-10-16T05:53:11.000Z
2021-09-09T14:44:14.000Z
dohq_teamcity/models/snapshot_dependencies.py
DenKoren/teamcity
69acb4d1402c316129b4602882a9cce2d55cf926
[ "MIT" ]
12
2018-10-28T23:00:17.000Z
2021-09-07T12:07:13.000Z
# coding: utf-8 from dohq_teamcity.custom.base_model import TeamCityObject # from dohq_teamcity.models.snapshot_dependency import SnapshotDependency # noqa: F401,E501 class SnapshotDependencies(TeamCityObject): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the c...
29.162791
103
0.649123
from dohq_teamcity.custom.base_model import TeamCityObject class SnapshotDependencies(TeamCityObject): swagger_types = { 'count': 'int', 'snapshot_dependency': 'list[SnapshotDependency]' } attribute_map = { 'count': 'count', 'snapshot_dependency': 'snapshot-dependency'...
true
true
f77af304d9f9418f5e9fca1cf896bd7cb8d3c34c
6,213
py
Python
docs/source/conf.py
bfu4/sawtooth-sdk-java
58c5d98c27efa030fc2dd0740f20cb02179757e1
[ "Apache-2.0" ]
19
2018-06-19T16:12:34.000Z
2022-02-12T19:48:35.000Z
docs/source/conf.py
bfu4/sawtooth-sdk-java
58c5d98c27efa030fc2dd0740f20cb02179757e1
[ "Apache-2.0" ]
16
2018-07-18T17:31:09.000Z
2021-07-07T13:43:19.000Z
docs/source/conf.py
bfu4/sawtooth-sdk-java
58c5d98c27efa030fc2dd0740f20cb02179757e1
[ "Apache-2.0" ]
39
2018-03-16T23:16:31.000Z
2022-02-12T07:13:41.000Z
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
30.605911
92
0.650571
project = u'Sawtooth Java SDK' copyright = u'2019, Bitwise IO' author = u'Bitwise IO' version = u'' release = u'' extensions = [ 'sphinx.ext.todo', 'sphinx.ext.ifconfig', 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon', 'sphinx.ext.imgmath', ] templates_path = ['yte...
true
true
f77af3844c66dc4417b678a2354cbdef00666fda
3,455
py
Python
accelerators/nio/nio_pe.py
ngiambla/nnflex
7c8bf46218ea70c6dad1efedf9e2069e41c4c3fa
[ "MIT" ]
null
null
null
accelerators/nio/nio_pe.py
ngiambla/nnflex
7c8bf46218ea70c6dad1efedf9e2069e41c4c3fa
[ "MIT" ]
null
null
null
accelerators/nio/nio_pe.py
ngiambla/nnflex
7c8bf46218ea70c6dad1efedf9e2069e41c4c3fa
[ "MIT" ]
null
null
null
''' nio_pe.py: A specialization of the PE class, for use with Nick's Accelerator ''' from core.defines import Operator from core.pe import PE from core.messaging import Message from core.utils import * class NioPE(PE): EXEC = 1 DONE = 3 RESP = 4 WAIT = 5 def __init__(self, system_clock_ref, m...
34.55
117
0.587265
from core.defines import Operator from core.pe import PE from core.messaging import Message from core.utils import * class NioPE(PE): EXEC = 1 DONE = 3 RESP = 4 WAIT = 5 def __init__(self, system_clock_ref, message_router): PE.__init__(self, system_clock_ref, message_router) se...
true
true
f77af39298c8f5d4d14b00f91afab57d6f3383c4
1,267
py
Python
bin/scrape_software_versions.py
dalmiaa/Sample_NF
82b5d4d80fb84316639b67079a68a8b6e0d1cc27
[ "MIT" ]
null
null
null
bin/scrape_software_versions.py
dalmiaa/Sample_NF
82b5d4d80fb84316639b67079a68a8b6e0d1cc27
[ "MIT" ]
null
null
null
bin/scrape_software_versions.py
dalmiaa/Sample_NF
82b5d4d80fb84316639b67079a68a8b6e0d1cc27
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function from collections import OrderedDict import re regexes = { 'dalmiaa/Sample_NF': ['v_pipeline.txt', r"(\S+)"], 'Nextflow': ['v_nextflow.txt', r"(\S+)"], 'FastQC': ['v_fastqc.txt', r"FastQC v(\S+)"], 'MultiQC': ['v_multiqc.txt', r"multiqc, versio...
32.487179
73
0.631413
from __future__ import print_function from collections import OrderedDict import re regexes = { 'dalmiaa/Sample_NF': ['v_pipeline.txt', r"(\S+)"], 'Nextflow': ['v_nextflow.txt', r"(\S+)"], 'FastQC': ['v_fastqc.txt', r"FastQC v(\S+)"], 'MultiQC': ['v_multiqc.txt', r"multiqc, version (\S+)"], } results =...
true
true
f77af3c0d25c2d6d64d5e012015193273790b383
907
py
Python
setup.py
udel-cbcb/pyiPTMnet
d2cfc26f510c02bc3d5e75d76e90173bcc773c34
[ "MIT" ]
3
2019-05-08T10:08:36.000Z
2021-01-26T10:03:16.000Z
setup.py
udel-cbcb/pyiPTMnet
d2cfc26f510c02bc3d5e75d76e90173bcc773c34
[ "MIT" ]
3
2019-11-27T21:04:02.000Z
2021-11-13T00:26:45.000Z
setup.py
udel-cbcb/pyiPTMnet
d2cfc26f510c02bc3d5e75d76e90173bcc773c34
[ "MIT" ]
null
null
null
from setuptools import setup with open('README.md') as f: long_description = f.read() setup( name = 'pyiptmnet', packages = ['pyiptmnet'], # this must be the same as the name above version = '0.1.7', description = 'Python client for iPTMNet REST API - https://research.bioinformatics.udel.edu/iptmnet/', ...
28.34375
105
0.665932
from setuptools import setup with open('README.md') as f: long_description = f.read() setup( name = 'pyiptmnet', packages = ['pyiptmnet'], version = '0.1.7', description = 'Python client for iPTMNet REST API - https://research.bioinformatics.udel.edu/iptmnet/', long_description = long_description, lon...
true
true
f77af49c2f2afbc23255947c0c32f5c759320c6a
67
py
Python
tests/seldon/docker/__init__.py
majolo/tempo
516b7df0beaf36d69366e8e759ce00a362225278
[ "Apache-2.0" ]
75
2021-02-15T09:49:02.000Z
2022-03-31T02:06:38.000Z
tests/seldon/docker/__init__.py
majolo/tempo
516b7df0beaf36d69366e8e759ce00a362225278
[ "Apache-2.0" ]
106
2021-02-13T09:25:19.000Z
2022-03-25T16:18:00.000Z
tests/seldon/docker/__init__.py
majolo/tempo
516b7df0beaf36d69366e8e759ce00a362225278
[ "Apache-2.0" ]
21
2021-02-12T17:12:50.000Z
2022-03-04T02:09:26.000Z
import pkgutil __path__ = pkgutil.extend_path(__path__, __name__)
16.75
50
0.820896
import pkgutil __path__ = pkgutil.extend_path(__path__, __name__)
true
true
f77af54e814d3ca73b50e3636b42d50d75803a4e
3,903
py
Python
qa/Rules/FileNamingRules/FileNamingRule.py
breseight/MAF2
77b517b5450cc7fe82cb99c5bb23db89980e30e8
[ "Apache-2.0" ]
9
2018-11-19T10:15:29.000Z
2021-08-30T11:52:07.000Z
qa/Rules/FileNamingRules/FileNamingRule.py
gradicosmo/MAF2
86ddf1f52a2de4479c09fd3f43dc321ff412af42
[ "Apache-2.0" ]
null
null
null
qa/Rules/FileNamingRules/FileNamingRule.py
gradicosmo/MAF2
86ddf1f52a2de4479c09fd3f43dc321ff412af42
[ "Apache-2.0" ]
3
2018-06-10T22:56:29.000Z
2019-12-12T06:22:56.000Z
from xml.dom import minidom as xd import re from Rules.AbstractRule import AbstractRule class FileNamingRule(AbstractRule): def __init__(self): AbstractRule.__init__(self) self.DictionaryList = [] self.DictionaryBaseClassList = [] self.DictionaryExceptionBaseClassList = [] def execute(self): ...
40.237113
133
0.640533
from xml.dom import minidom as xd import re from Rules.AbstractRule import AbstractRule class FileNamingRule(AbstractRule): def __init__(self): AbstractRule.__init__(self) self.DictionaryList = [] self.DictionaryBaseClassList = [] self.DictionaryExceptionBaseClassList = [] def execute(self): ...
true
true
f77af5893e2a44a41531cf86f8f23972d990c1d4
531
py
Python
argus/metrics/loss.py
nd1511/argus
00aaed41ac1321d669ac7060f4d21b24cc3456f0
[ "MIT" ]
1
2018-10-26T01:29:59.000Z
2018-10-26T01:29:59.000Z
argus/metrics/loss.py
nd1511/argus
00aaed41ac1321d669ac7060f4d21b24cc3456f0
[ "MIT" ]
null
null
null
argus/metrics/loss.py
nd1511/argus
00aaed41ac1321d669ac7060f4d21b24cc3456f0
[ "MIT" ]
null
null
null
from argus.metrics.metric import Metric from argus.utils import AverageMeter class Loss(Metric): name = 'loss' def __init__(self): self.avg_meter = AverageMeter() super().__init__() def reset(self): self.avg_meter.reset() def update(self, step_output: dict): self.avg...
24.136364
75
0.651601
from argus.metrics.metric import Metric from argus.utils import AverageMeter class Loss(Metric): name = 'loss' def __init__(self): self.avg_meter = AverageMeter() super().__init__() def reset(self): self.avg_meter.reset() def update(self, step_output: dict): self.avg...
true
true
f77af5ec9274923e682588ba44545e9677722dde
6,069
py
Python
pmnist_task/ntm/modules/head.py
zoharli/armin
9bf8e4533850a66bbef26390244f0d0ad30c067b
[ "MIT" ]
3
2019-07-01T12:11:29.000Z
2020-05-25T22:37:50.000Z
pmnist_task/ntm/modules/head.py
zoharli/armin
9bf8e4533850a66bbef26390244f0d0ad30c067b
[ "MIT" ]
null
null
null
pmnist_task/ntm/modules/head.py
zoharli/armin
9bf8e4533850a66bbef26390244f0d0ad30c067b
[ "MIT" ]
null
null
null
import torch import torch.nn.functional as F from torch import nn class NTMHead(nn.Module): def __init__(self, mode, controller_size, key_size): super().__init__() self.mode = mode self.key_size = key_size # all the fc layers to produce scalars for memory addressing self....
45.631579
79
0.661888
import torch import torch.nn.functional as F from torch import nn class NTMHead(nn.Module): def __init__(self, mode, controller_size, key_size): super().__init__() self.mode = mode self.key_size = key_size self.key_fc = nn.Linear(controller_size, key_size) self.ke...
true
true
f77af7c54353b8206641fe10010a56e8ce93f93b
1,165
py
Python
src/doc/ca/intro/conf.py
ChamanAgrawal/sage
5f6d56ba247b352d7d46442e88fa3a027e9f222d
[ "BSL-1.0" ]
2
2019-06-02T03:16:59.000Z
2019-06-15T10:17:18.000Z
src/doc/ca/intro/conf.py
ChamanAgrawal/sage
5f6d56ba247b352d7d46442e88fa3a027e9f222d
[ "BSL-1.0" ]
null
null
null
src/doc/ca/intro/conf.py
ChamanAgrawal/sage
5f6d56ba247b352d7d46442e88fa3a027e9f222d
[ "BSL-1.0" ]
1
2019-06-02T03:16:55.000Z
2019-06-02T03:16:55.000Z
# -*- coding: utf-8 -*- # # Sage documentation build configuration file, created by # sphinx-quickstart on Thu Aug 21 20:15:55 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable...
33.285714
82
0.746781
# that aren't pickleable (module imports are okay, they're removed automatically). # # All configuration values have a default; values that are commented out # serve to show the default. import sys, os from sage.env import SAGE_DOC_SRC sys.path.append(SAGE_DOC_SRC) from common.conf import * # General information abou...
true
true
f77af7dfc9ff43b4aa53c0004bb20532503e1e8c
7,171
py
Python
neurokit2/rsp/rsp_findpeaks.py
BelleJohn/neuropsychology-NeuroKit
d01111b9b82364d28da01c002e6cbfc45d9493d9
[ "MIT" ]
1
2022-03-20T21:09:34.000Z
2022-03-20T21:09:34.000Z
neurokit2/rsp/rsp_findpeaks.py
BelleJohn/neuropsychology-NeuroKit
d01111b9b82364d28da01c002e6cbfc45d9493d9
[ "MIT" ]
null
null
null
neurokit2/rsp/rsp_findpeaks.py
BelleJohn/neuropsychology-NeuroKit
d01111b9b82364d28da01c002e6cbfc45d9493d9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np import pandas as pd def rsp_findpeaks(rsp_cleaned, sampling_rate=1000, method="khodadad2018", amplitude_min=0.3): """Extract extrema in a respiration (RSP) signal. Low-level function used by `rsp_peaks()` to identify inhalation and exhalation onsets (troughs and pea...
37.544503
115
0.644122
import numpy as np import pandas as pd def rsp_findpeaks(rsp_cleaned, sampling_rate=1000, method="khodadad2018", amplitude_min=0.3): if isinstance(rsp_cleaned, pd.DataFrame): try: rsp_cleaned = rsp_cleaned["RSP_Clean"] except NameError: try: rsp_cleaned ...
true
true
f77af8049cc7c744e9a6513bce4d0ee7e3bb080c
42,977
py
Python
tests/models/big_bird/test_modeling_big_bird.py
shangz-ai/transformers
75259b44bf2e2b98b5a4d431fb400b7190342a01
[ "Apache-2.0" ]
null
null
null
tests/models/big_bird/test_modeling_big_bird.py
shangz-ai/transformers
75259b44bf2e2b98b5a4d431fb400b7190342a01
[ "Apache-2.0" ]
null
null
null
tests/models/big_bird/test_modeling_big_bird.py
shangz-ai/transformers
75259b44bf2e2b98b5a4d431fb400b7190342a01
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. 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 r...
45.964706
1,570
0.648463
import unittest from transformers import BigBirdConfig, is_torch_available from transformers.models.auto import get_values from transformers.models.big_bird.tokenization_big_bird import BigBirdTokenizer from transformers.testing_utils import require_torch, slow, torch_device from ...test_configuration_common import...
true
true
f77af84d0cd55ff63eee8019d3acdc570b787194
2,160
py
Python
pacos2/mock/best_effort_actor.py
jadnohra/PaCoS
0b97cf566d89d99f85c55581beb9ad701395d4fe
[ "MIT" ]
null
null
null
pacos2/mock/best_effort_actor.py
jadnohra/PaCoS
0b97cf566d89d99f85c55581beb9ad701395d4fe
[ "MIT" ]
null
null
null
pacos2/mock/best_effort_actor.py
jadnohra/PaCoS
0b97cf566d89d99f85c55581beb9ad701395d4fe
[ "MIT" ]
null
null
null
import logging from ..interfaces import Address, Addressable, PinState, IMessage, IMsgRouter from ..actor import Actor from .pins import NullPin, BufferPin class BestEffortActor(Actor): def __init__(self, name: str = 'a', out_address: Address = None): self.trigger_pin = NullPin('trigger', PinState.CLOSED,...
39.272727
78
0.589352
import logging from ..interfaces import Address, Addressable, PinState, IMessage, IMsgRouter from ..actor import Actor from .pins import NullPin, BufferPin class BestEffortActor(Actor): def __init__(self, name: str = 'a', out_address: Address = None): self.trigger_pin = NullPin('trigger', PinState.CLOSED,...
true
true
f77af8dac80159e25b5028808aa8b6280a3d4f3e
240
py
Python
unittest/calculatorTest/calc.py
terasakisatoshi/pythonCodes
baee095ecee96f6b5ec6431267cdc6c40512a542
[ "MIT" ]
null
null
null
unittest/calculatorTest/calc.py
terasakisatoshi/pythonCodes
baee095ecee96f6b5ec6431267cdc6c40512a542
[ "MIT" ]
null
null
null
unittest/calculatorTest/calc.py
terasakisatoshi/pythonCodes
baee095ecee96f6b5ec6431267cdc6c40512a542
[ "MIT" ]
null
null
null
class Calculator(object): """calclator class""" def add(self, a, b): return a + b def sub(self, a, b): return a - b def mul(self, a, b): return a * b def div(self, a, b): return a / b
16
25
0.479167
class Calculator(object): def add(self, a, b): return a + b def sub(self, a, b): return a - b def mul(self, a, b): return a * b def div(self, a, b): return a / b
true
true
f77af9a9707c45e1667544901bbb5fc2f33073f4
1,261
py
Python
corefgraph/resources/tagsets/universal_dependencies/partofspeech.py
josubg/CorefGraph
83c72386649937aa50c17b7960ba42bf08d39eb8
[ "Apache-2.0" ]
null
null
null
corefgraph/resources/tagsets/universal_dependencies/partofspeech.py
josubg/CorefGraph
83c72386649937aa50c17b7960ba42bf08d39eb8
[ "Apache-2.0" ]
1
2020-04-15T16:10:50.000Z
2020-04-15T16:10:50.000Z
corefgraph/resources/tagsets/universal_dependencies/partofspeech.py
josubg/CorefGraph
83c72386649937aa50c17b7960ba42bf08d39eb8
[ "Apache-2.0" ]
1
2021-03-10T21:54:51.000Z
2021-03-10T21:54:51.000Z
# coding=utf-8 from corefgraph.resources.lambdas import equality_checker, matcher, fail __author__ = '' # Features questions female = matcher(".*FEM.*") male = matcher(".*MASC*") neutral = fail() singular = matcher(".*SING.*") plural = matcher(".*PLUR.*") animate = fail() inanimate = fail() # Adjectives adjective...
23.792453
78
0.712133
from corefgraph.resources.lambdas import equality_checker, matcher, fail __author__ = '' female = matcher(".*FEM.*") male = matcher(".*MASC*") neutral = fail() singular = matcher(".*SING.*") plural = matcher(".*PLUR.*") animate = fail() inanimate = fail() adjective = matcher("^ADJ.*") pronoun = matcher("^PRON.*...
true
true
f77af9c67562fc95fb55df8e8e70e0563d9a949b
50
py
Python
djtools/seo/__init__.py
semicolom/django-tools-seo
9b16731949480fc25ad010811e528d22bf335bfb
[ "MIT" ]
2
2018-11-07T18:21:16.000Z
2021-07-09T21:57:41.000Z
djtools/seo/__init__.py
QPC-database/django-tools-seo
9b16731949480fc25ad010811e528d22bf335bfb
[ "MIT" ]
2
2018-11-12T14:33:31.000Z
2019-03-06T17:16:13.000Z
djtools/seo/__init__.py
QPC-database/django-tools-seo
9b16731949480fc25ad010811e528d22bf335bfb
[ "MIT" ]
1
2021-07-09T21:57:43.000Z
2021-07-09T21:57:43.000Z
default_app_config = 'djtools.seo.apps.SEOConfig'
25
49
0.82
default_app_config = 'djtools.seo.apps.SEOConfig'
true
true
f77afa4e713a51ed2df0d1be4e0c68adb285fea5
19,295
py
Python
UMLRT2Kiltera_MM/Properties/Syntactic/models/InstCProcDefCpart1_Complete_MDL.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
3
2017-06-02T19:26:27.000Z
2021-06-14T04:25:45.000Z
UMLRT2Kiltera_MM/Properties/Syntactic/models/InstCProcDefCpart1_Complete_MDL.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
8
2016-08-24T07:04:07.000Z
2017-05-26T16:22:47.000Z
UMLRT2Kiltera_MM/Properties/Syntactic/models/InstCProcDefCpart1_Complete_MDL.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
1
2019-10-31T06:00:23.000Z
2019-10-31T06:00:23.000Z
""" __InstCProcDefCpart1_Complete_MDL.py_____________________________________________________ Automatically generated AToM3 Model File (Do not modify directly) Author: gehan Modified: Fri Mar 6 10:56:11 2015 _________________________________________________________________________________________ """ from stickylink ...
46.946472
691
0.686758
from stickylink import * from widthXfillXdecoration import * from MT_pre__Inst import * from MT_pre__Attribute import * from MT_pre__Equation import * from MT_pre__Constant import * from MT_pre__hasAttribute_T import * from MT_pre__leftExpr import * from MT_pre__rightExpr import * from LHS import * from graph_MT_pre__E...
true
true
f77afab46b6d0ff197f9231626879edbd4fb4618
4,264
py
Python
mediapipe/calculators/image/bilateral_filter_calculator_pb2.py
mengfu188/simple-mediapipe
85dc8a87c9586312c2d057ad587bfccf3b5e2eb6
[ "Apache-2.0" ]
5
2021-01-01T11:02:41.000Z
2022-03-11T19:44:29.000Z
mediapipe/calculators/image/bilateral_filter_calculator_pb2.py
mengfu188/simple-mediapipe
85dc8a87c9586312c2d057ad587bfccf3b5e2eb6
[ "Apache-2.0" ]
null
null
null
mediapipe/calculators/image/bilateral_filter_calculator_pb2.py
mengfu188/simple-mediapipe
85dc8a87c9586312c2d057ad587bfccf3b5e2eb6
[ "Apache-2.0" ]
1
2021-04-12T05:59:46.000Z
2021-04-12T05:59:46.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: mediapipe/calculators/image/bilateral_filter_calculator.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from goo...
45.849462
398
0.817542
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() from mediapipe.framework import calculator_pb2 as mediapipe...
true
true
f77afb707e14269c1b8fc1ded35a3d30819dff61
1,538
py
Python
harnessed_jobs/prnu_raft/v0/validator_prnu_raft.py
duncanwood/EO-analysis-jobs
26d22e49c0d2e32fbf2759f504048754f66ecc45
[ "BSD-3-Clause-LBNL" ]
2
2018-07-26T09:32:46.000Z
2019-05-28T20:57:43.000Z
harnessed_jobs/prnu_raft/v0/validator_prnu_raft.py
duncanwood/EO-analysis-jobs
26d22e49c0d2e32fbf2759f504048754f66ecc45
[ "BSD-3-Clause-LBNL" ]
3
2018-03-18T21:55:07.000Z
2019-04-18T18:26:06.000Z
harnessed_jobs/prnu_raft/v0/validator_prnu_raft.py
duncanwood/EO-analysis-jobs
26d22e49c0d2e32fbf2759f504048754f66ecc45
[ "BSD-3-Clause-LBNL" ]
2
2020-11-12T19:47:42.000Z
2022-02-25T21:43:03.000Z
#!/usr/bin/env ipython """ Validator script for raft-level PRNU analysis. """ import astropy.io.fits as fits import numpy as np import lcatr.schema import siteUtils import eotestUtils import camera_components raft_id = siteUtils.getUnitId() raft = camera_components.Raft.create_from_etrav(raft_id) results = [] for slo...
38.45
94
0.615085
import astropy.io.fits as fits import numpy as np import lcatr.schema import siteUtils import eotestUtils import camera_components raft_id = siteUtils.getUnitId() raft = camera_components.Raft.create_from_etrav(raft_id) results = [] for slot, sensor_id in raft.items(): results_file = '%s_eotest_results.fits' % se...
true
true
f77afc447e631ce9dc81478461a116841ff01362
13,595
py
Python
sdk/python/pulumi_azure_native/servicebus/v20210101preview/private_endpoint_connection.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/servicebus/v20210101preview/private_endpoint_connection.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/servicebus/v20210101preview/private_endpoint_connection.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
49.079422
472
0.693858
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * from ._inputs import * __all__ = ['PrivateEndpointConnectionArgs', 'PrivateEndpointConnection'] @pulumi.input_type class Priv...
true
true
f77afcedfa888529bcf102591e9d7672cef54b4b
3,448
py
Python
{{cookiecutter.project_dir}}/update_actions.py
neuromation/cookiecutter-neuro-project
b21458d3fd9300237667ac67ba1811dc14012d7a
[ "Apache-2.0" ]
5
2019-09-17T14:00:13.000Z
2020-08-31T08:05:28.000Z
{{cookiecutter.project_dir}}/update_actions.py
neuromation/cookiecutter-neuro-project
b21458d3fd9300237667ac67ba1811dc14012d7a
[ "Apache-2.0" ]
249
2019-09-10T13:41:30.000Z
2020-09-16T10:12:05.000Z
{{cookiecutter.project_dir}}/update_actions.py
neuro-inc/cookiecutter-neuro-project
a1ee9a642dbf13e74e7f5726848fbb41ed893cb5
[ "Apache-2.0" ]
1
2019-09-20T12:29:13.000Z
2019-09-20T12:29:13.000Z
"""Scans directories for files that satisfy a specific mask and updates version tags of all actions. Example: python3 update_actions.py live.yml action.y*ml folder/*.y*ml """ import argparse import re from pathlib import Path from typing import Dict, List, Optional from github import Github ACTION_PATTERN = r"...
35.546392
118
0.581787
import argparse import re from pathlib import Path from typing import Dict, List, Optional from github import Github ACTION_PATTERN = r"\s+action:\s*(?P<svc>gh|github):(?P<org>[\w-]+)/(?P<repo>[\w-]+)@(?P<cur_tag>[\w.]+)" def main(): args = parse_args() patterns: List[str] = args.patterns token: Opti...
true
true
f77afdc6f158f81e50bf236b116b8265fa84dede
855
py
Python
lib/analyzer_sources/fib_small/reducer.py
spark008/igor
92a13317a02147b3ba14c4056d8d7f80a84f153b
[ "MIT" ]
null
null
null
lib/analyzer_sources/fib_small/reducer.py
spark008/igor
92a13317a02147b3ba14c4056d8d7f80a84f153b
[ "MIT" ]
null
null
null
lib/analyzer_sources/fib_small/reducer.py
spark008/igor
92a13317a02147b3ba14c4056d8d7f80a84f153b
[ "MIT" ]
null
null
null
from __future__ import division import glob import json import os.path golden_files = glob.glob('cases/*.out') wins = 0 for golden_file in sorted(golden_files): test_name = os.path.basename(golden_file) output_file = '/usr/testguest/' + test_name if not os.path.isfile(output_file): print(test_name ...
28.5
62
0.664327
from __future__ import division import glob import json import os.path golden_files = glob.glob('cases/*.out') wins = 0 for golden_file in sorted(golden_files): test_name = os.path.basename(golden_file) output_file = '/usr/testguest/' + test_name if not os.path.isfile(output_file): print(test_name ...
true
true
f77affb8b609eab6f3dd8a4d3e7ee6ab72c92890
335
py
Python
alexa_skills/responses/__init__.py
johnyob/Alexa-Skills
3679a887bb519042511a16fbb848254dc0ee43a0
[ "MIT" ]
null
null
null
alexa_skills/responses/__init__.py
johnyob/Alexa-Skills
3679a887bb519042511a16fbb848254dc0ee43a0
[ "MIT" ]
null
null
null
alexa_skills/responses/__init__.py
johnyob/Alexa-Skills
3679a887bb519042511a16fbb848254dc0ee43a0
[ "MIT" ]
null
null
null
from alexa_skills.responses.Card import Card from alexa_skills.responses.Dialog import Dialog from alexa_skills.responses.OutputSpeech import OutputSpeech from alexa_skills.responses.Reprompt import Reprompt from alexa_skills.responses.Response import Response from alexa_skills.responses.ResponseConstructor import Resp...
55.833333
74
0.895522
from alexa_skills.responses.Card import Card from alexa_skills.responses.Dialog import Dialog from alexa_skills.responses.OutputSpeech import OutputSpeech from alexa_skills.responses.Reprompt import Reprompt from alexa_skills.responses.Response import Response from alexa_skills.responses.ResponseConstructor import Resp...
true
true
f77b00b398bc55553f342ebd77992505f2dd3477
1,309
py
Python
Advanced_algorithm/oj_homework2/7.py
mndream/MyOJ
ee92fb657475d998e6c201f222cb20bcbc2bfd64
[ "Apache-2.0" ]
1
2018-12-27T08:06:38.000Z
2018-12-27T08:06:38.000Z
Advanced_algorithm/oj_homework2/7.py
mndream/MyPythonOJ
ee92fb657475d998e6c201f222cb20bcbc2bfd64
[ "Apache-2.0" ]
null
null
null
Advanced_algorithm/oj_homework2/7.py
mndream/MyPythonOJ
ee92fb657475d998e6c201f222cb20bcbc2bfd64
[ "Apache-2.0" ]
null
null
null
''' 非递归快排 快速排序的核心思想是使用元素的值对数组进行划分。实现其非递归方案。 输入的每一行表示一个元素为正整数的数组,所有值用空格隔开,第一个值为数值长度,其余为数组元素值。 输出的每一行为排序结果,用空格隔开,末尾不要空格。 输入样例 13 24 3 56 34 3 78 12 29 49 84 51 9 100 输出样例 3 3 9 12 24 29 34 49 51 56 78 84 100 ''' ''' 代码出处: https://blog.csdn.net/u014204761/article/details/80536940 ''' def quick_sort_other(array, l, r): ...
24.698113
61
0.511841
def quick_sort_other(array, l, r): if l >= r: return stack = [l,r] while stack: low = stack.pop(0) high = stack.pop(0) if high <= low: continue pivot = array[high] i = low - 1 for j in range(low,high+1): if array[j] ...
true
true
f77b00f860547522123aad29c3b1c55a20db142c
585
py
Python
sinusoid.py
SivanYeh/WaveSimulator
81ea0518ffdca6573cd817c3f4f9d0da5f52a69d
[ "MIT" ]
null
null
null
sinusoid.py
SivanYeh/WaveSimulator
81ea0518ffdca6573cd817c3f4f9d0da5f52a69d
[ "MIT" ]
null
null
null
sinusoid.py
SivanYeh/WaveSimulator
81ea0518ffdca6573cd817c3f4f9d0da5f52a69d
[ "MIT" ]
null
null
null
import time import math class Simulator: def __init__(self): self.amplitude = pow(10,-3) self.frequency = 1 def sin_wave(self): t = time.time() frequency = self.frequency amp = self.amplitude phase = 0 value = amp*math.sin(frequency*t+phase) return t, value; def cos_wave(self): t = time.time() ...
18.28125
41
0.659829
import time import math class Simulator: def __init__(self): self.amplitude = pow(10,-3) self.frequency = 1 def sin_wave(self): t = time.time() frequency = self.frequency amp = self.amplitude phase = 0 value = amp*math.sin(frequency*t+phase) return t, value; def cos_wave(self): t = time.time() ...
true
true
f77b050a3a2cbe222a74ea652711e3392a532b92
1,708
py
Python
lib/spack/spack/util/timer.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
11
2015-10-04T02:17:46.000Z
2018-02-07T18:23:00.000Z
lib/spack/spack/util/timer.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
22
2017-08-01T22:45:10.000Z
2022-03-10T07:46:31.000Z
lib/spack/spack/util/timer.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
4
2016-06-10T17:57:39.000Z
2018-09-11T04:59:38.000Z
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) """Debug signal handler: prints a stack trace and enters interpreter. ``register_interrupt_handler()`` enables a ctrl-C h...
27.548387
76
0.587237
import sys import time import spack.util.spack_json as sjson class Timer(object): def __init__(self): self.start = time.time() self.last = self.start self.phases = {} self.end = None def phase(self, name): last = self.last now = time.time() self.phase...
true
true
f77b06054e122f5b36182b748e3e19ebfc374ca7
4,946
py
Python
homeassistant/components/media_player/vlc.py
EmitKiwi/home-assistant
0999e2ddc476f4bddf710005168b082f03a7cdc0
[ "Apache-2.0" ]
4
2019-05-14T20:33:43.000Z
2021-09-25T14:56:08.000Z
homeassistant/components/media_player/vlc.py
EmitKiwi/home-assistant
0999e2ddc476f4bddf710005168b082f03a7cdc0
[ "Apache-2.0" ]
null
null
null
homeassistant/components/media_player/vlc.py
EmitKiwi/home-assistant
0999e2ddc476f4bddf710005168b082f03a7cdc0
[ "Apache-2.0" ]
1
2020-08-26T20:54:14.000Z
2020-08-26T20:54:14.000Z
""" Provide functionality to interact with vlc devices on the network. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.vlc/ """ import logging import voluptuous as vol from homeassistant.components.media_player import ( SUPPORT_PAUSE, S...
31.106918
79
0.651031
import logging import voluptuous as vol from homeassistant.components.media_player import ( SUPPORT_PAUSE, SUPPORT_PLAY_MEDIA, SUPPORT_VOLUME_MUTE, SUPPORT_VOLUME_SET, SUPPORT_PLAY, MediaPlayerDevice, PLATFORM_SCHEMA, MEDIA_TYPE_MUSIC) from homeassistant.const import (CONF_NAME, STATE_IDLE, STATE_PAUSED, ...
true
true
f77b073f4a721dbdc165d9fb6c33eefb5e9c27ce
44,648
py
Python
cdp/debugger.py
eNcacz/python-chrome-devtools-protocol
22a36b7964dc1be86ce907e06d01c3bc8727816e
[ "MIT" ]
null
null
null
cdp/debugger.py
eNcacz/python-chrome-devtools-protocol
22a36b7964dc1be86ce907e06d01c3bc8727816e
[ "MIT" ]
null
null
null
cdp/debugger.py
eNcacz/python-chrome-devtools-protocol
22a36b7964dc1be86ce907e06d01c3bc8727816e
[ "MIT" ]
null
null
null
# DO NOT EDIT THIS FILE! # # This file is generated from the CDP specification. If you need to make # changes, edit the generator and regenerate all of the modules. # # CDP domain: Debugger from __future__ import annotations from cdp.util import event_class, T_JSON_DICT from dataclasses import dataclass import enum im...
36.210868
381
0.672998
from __future__ import annotations from cdp.util import event_class, T_JSON_DICT from dataclasses import dataclass import enum import typing from . import runtime from deprecated.sphinx import deprecated class BreakpointId(str): def to_json(self) -> str: return self @classmethod def from_json(c...
true
true
f77b077d730b7c470ac8a5e77b09a8aab99b9a16
582
py
Python
tests/dataset_test.py
MISStingting/NMTmodel
970115d6f9fcd015d7daf3ad0e4844055e2af5d3
[ "Apache-2.0" ]
null
null
null
tests/dataset_test.py
MISStingting/NMTmodel
970115d6f9fcd015d7daf3ad0e4844055e2af5d3
[ "Apache-2.0" ]
null
null
null
tests/dataset_test.py
MISStingting/NMTmodel
970115d6f9fcd015d7daf3ad0e4844055e2af5d3
[ "Apache-2.0" ]
null
null
null
import os import yaml import tensorflow as tf from NMTmodel.NMT.dataset import data_util cur_dir = os.path.dirname(os.path.abspath(__file__)) par_dir = os.path.dirname(cur_dir) class DatasetTest(tf.test.TestCase): def setUp(self): self.config_file = os.path.join(par_dir, "config.yml") def test_datas...
26.454545
73
0.704467
import os import yaml import tensorflow as tf from NMTmodel.NMT.dataset import data_util cur_dir = os.path.dirname(os.path.abspath(__file__)) par_dir = os.path.dirname(cur_dir) class DatasetTest(tf.test.TestCase): def setUp(self): self.config_file = os.path.join(par_dir, "config.yml") def test_datas...
true
true
f77b0884313b4b44479956bbdf3025924351f0c7
2,918
py
Python
setup.py
akamai/dlock
2af6befba68cdbbed9b9bc42fe784a9aaa4ce98b
[ "Apache-2.0" ]
null
null
null
setup.py
akamai/dlock
2af6befba68cdbbed9b9bc42fe784a9aaa4ce98b
[ "Apache-2.0" ]
null
null
null
setup.py
akamai/dlock
2af6befba68cdbbed9b9bc42fe784a9aaa4ce98b
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Akamai Technologies, 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...
27.528302
74
0.592529
import ast import re from setuptools import find_packages, setup def _read_meta(path): rv = {} with open(path) as fp: for line in fp: match = re.match("__(.*)__ = (.*)", line) if not match: continue key = match.group(1) value = ast.lite...
true
true
f77b08fdeeceebace933d1e6928058a28201892c
3,053
py
Python
google-cloud-sdk/lib/surface/dataflow/__init__.py
KaranToor/MA450
c98b58aeb0994e011df960163541e9379ae7ea06
[ "Apache-2.0" ]
1
2017-11-29T18:52:27.000Z
2017-11-29T18:52:27.000Z
google-cloud-sdk/.install/.backup/lib/surface/dataflow/__init__.py
KaranToor/MA450
c98b58aeb0994e011df960163541e9379ae7ea06
[ "Apache-2.0" ]
null
null
null
google-cloud-sdk/.install/.backup/lib/surface/dataflow/__init__.py
KaranToor/MA450
c98b58aeb0994e011df960163541e9379ae7ea06
[ "Apache-2.0" ]
1
2020-07-25T12:09:01.000Z
2020-07-25T12:09:01.000Z
# Copyright 2014 Google 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 required by applicable law or ag...
36.345238
80
0.75303
import argparse from googlecloudsdk.calliope import actions from googlecloudsdk.calliope import base from googlecloudsdk.core import apis from googlecloudsdk.core import log from googlecloudsdk.core import properties from googlecloudsdk.core import resolvers from googlecloudsdk.core import resources as cloud_resourc...
true
true
f77b0972f356c6142336abbf06fcff42f07bd838
1,804
py
Python
tests/authentication/test_connectioninfo.py
pawelkopka/kopf
51a3a70e09a17cf3baec2946b64b125a90595cf4
[ "MIT" ]
1,038
2019-03-26T16:32:56.000Z
2022-03-27T09:15:03.000Z
tests/authentication/test_connectioninfo.py
pawelkopka/kopf
51a3a70e09a17cf3baec2946b64b125a90595cf4
[ "MIT" ]
393
2019-03-26T13:43:42.000Z
2020-09-14T13:18:14.000Z
tests/authentication/test_connectioninfo.py
pawelkopka/kopf
51a3a70e09a17cf3baec2946b64b125a90595cf4
[ "MIT" ]
116
2019-03-31T23:01:09.000Z
2022-03-18T16:44:58.000Z
from kopf.structs.credentials import VaultKey, ConnectionInfo def test_key_as_string(): key = VaultKey('some-key') assert isinstance(key, str) assert key == 'some-key' def test_creation_with_minimal_fields(): info = ConnectionInfo( server='https://localhost', ) assert info.server == ...
31.103448
61
0.675721
from kopf.structs.credentials import VaultKey, ConnectionInfo def test_key_as_string(): key = VaultKey('some-key') assert isinstance(key, str) assert key == 'some-key' def test_creation_with_minimal_fields(): info = ConnectionInfo( server='https://localhost', ) assert info.server == ...
true
true
f77b0a9c417ba0b10fdf34fd1c6d7320083e71be
44,178
py
Python
tensor2tensor/models/research/autoencoders.py
2877992943/tensor2tensor
84cab42173724689ebddf853351a5aae704035a5
[ "Apache-2.0" ]
2
2020-01-14T16:56:54.000Z
2020-01-17T23:16:21.000Z
tensor2tensor/models/research/autoencoders.py
2877992943/tensor2tensor
84cab42173724689ebddf853351a5aae704035a5
[ "Apache-2.0" ]
null
null
null
tensor2tensor/models/research/autoencoders.py
2877992943/tensor2tensor
84cab42173724689ebddf853351a5aae704035a5
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
38.382276
84
0.681561
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensor2tensor.layers import common_attention from tensor2tensor.layers import common_hparams from tensor2tensor.layers import common_layers from tensor2tensor.layers import discretization from tensor2tens...
true
true
f77b0ac637f34228732e07f13b9bd5c45a2b5063
2,383
py
Python
tools/create_tensorflow_warmup.py
JulioDeBastiani/yolov3-tf2
c349d352bffbf12a6668ffb90c2487b5f5f3aa33
[ "MIT" ]
null
null
null
tools/create_tensorflow_warmup.py
JulioDeBastiani/yolov3-tf2
c349d352bffbf12a6668ffb90c2487b5f5f3aa33
[ "MIT" ]
null
null
null
tools/create_tensorflow_warmup.py
JulioDeBastiani/yolov3-tf2
c349d352bffbf12a6668ffb90c2487b5f5f3aa33
[ "MIT" ]
null
null
null
import os import tensorflow as tf from os import path from absl import app, flags, logging from absl.flags import FLAGS from tensorflow_serving.apis import model_pb2, predict_pb2, prediction_log_pb2 from yolov3_tf2.dataset import preprocess_image, load_tfrecord_dataset flags.DEFINE_string('dataset', None, ...
30.948052
125
0.6282
import os import tensorflow as tf from os import path from absl import app, flags, logging from absl.flags import FLAGS from tensorflow_serving.apis import model_pb2, predict_pb2, prediction_log_pb2 from yolov3_tf2.dataset import preprocess_image, load_tfrecord_dataset flags.DEFINE_string('dataset', None, ...
true
true
f77b0ac86de0851b9abaca600ac03ddbc5ec758d
829
py
Python
personale/models.py
luca772005/studio
8d19d28f13f400aa4dde84c36e44cf5891d18ddd
[ "MIT" ]
null
null
null
personale/models.py
luca772005/studio
8d19d28f13f400aa4dde84c36e44cf5891d18ddd
[ "MIT" ]
null
null
null
personale/models.py
luca772005/studio
8d19d28f13f400aa4dde84c36e44cf5891d18ddd
[ "MIT" ]
null
null
null
from django.db import models from aziende.models import * # Create your models here. class Anagrafica(models.Model): nome = models.CharField(null=False, max_length=128) cognome = models.CharField(null=False, max_length=128) codice_fiscale = models.CharField(null=False, max_length=16) azienda = models...
29.607143
74
0.717732
from django.db import models from aziende.models import * class Anagrafica(models.Model): nome = models.CharField(null=False, max_length=128) cognome = models.CharField(null=False, max_length=128) codice_fiscale = models.CharField(null=False, max_length=16) azienda = models.ManyToManyField(Azienda, t...
true
true
f77b0ba768a1795736866d76c3a10e32f12b1158
284
py
Python
contentPages/migrations/0034_merge_20200512_2155.py
methods/phe-cv19-site
fd5f877b8a0725a9893fa3c24a54e9495e749744
[ "MIT" ]
1
2020-09-21T16:35:16.000Z
2020-09-21T16:35:16.000Z
contentPages/migrations/0034_merge_20200512_2155.py
methods/phe-cv19-site
fd5f877b8a0725a9893fa3c24a54e9495e749744
[ "MIT" ]
14
2020-03-25T10:29:26.000Z
2022-01-13T03:45:38.000Z
contentPages/migrations/0034_merge_20200512_2155.py
methods/phe-cv19-site
fd5f877b8a0725a9893fa3c24a54e9495e749744
[ "MIT" ]
null
null
null
# Generated by Django 2.2.12 on 2020-05-12 21:55 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('contentPages', '0017_auto_20200507_1147'), ('contentPages', '0033_auto_20200505_1041'), ] operations = [ ]
18.933333
52
0.661972
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('contentPages', '0017_auto_20200507_1147'), ('contentPages', '0033_auto_20200505_1041'), ] operations = [ ]
true
true
f77b0bcd3e17b440217386fa5d8aab8364d0420b
2,079
py
Python
two_factor/views/profile.py
ercpe/django-two-factor-auth
76866dd310903b3a34526becaa0a5012dea7debe
[ "MIT" ]
null
null
null
two_factor/views/profile.py
ercpe/django-two-factor-auth
76866dd310903b3a34526becaa0a5012dea7debe
[ "MIT" ]
1
2015-07-13T16:52:33.000Z
2015-07-16T20:24:59.000Z
two_factor/views/profile.py
ercpe/django-two-factor-auth
76866dd310903b3a34526becaa0a5012dea7debe
[ "MIT" ]
1
2019-12-30T15:38:13.000Z
2019-12-30T15:38:13.000Z
from django.conf import settings from django.contrib.auth.decorators import login_required from django.shortcuts import redirect from django.views.decorators.cache import never_cache from django.views.generic import TemplateView, FormView from django_otp import user_has_device, devices_for_user from ..forms import Dis...
35.844828
89
0.726792
from django.conf import settings from django.contrib.auth.decorators import login_required from django.shortcuts import redirect from django.views.decorators.cache import never_cache from django.views.generic import TemplateView, FormView from django_otp import user_has_device, devices_for_user from ..forms import Dis...
true
true
f77b0cb9dad202786a91677dfce77d4f8e9f070e
1,729
py
Python
myvenv/lib/python3.6/site-packages/nltk/wsd.py
catb0y/twitter_feeling
9092a26f2554bbf6b14b33d797abaffa48cda99c
[ "MIT" ]
11
2019-04-25T01:12:53.000Z
2021-11-23T06:51:02.000Z
myvenv/lib/python3.6/site-packages/nltk/wsd.py
catb0y/twitter_feeling
9092a26f2554bbf6b14b33d797abaffa48cda99c
[ "MIT" ]
11
2018-01-29T16:26:16.000Z
2018-04-20T16:06:36.000Z
myvenv/lib/python3.6/site-packages/nltk/wsd.py
catb0y/twitter_feeling
9092a26f2554bbf6b14b33d797abaffa48cda99c
[ "MIT" ]
6
2017-01-19T21:49:55.000Z
2021-04-14T09:57:17.000Z
# Natural Language Toolkit: Word Sense Disambiguation Algorithms # # Authors: Liling Tan <alvations@gmail.com>, # Dmitrijs Milajevs <dimazest@gmail.com> # # Copyright (C) 2001-2017 NLTK Project # URL: <http://nltk.org/> # For license information, see LICENSE.TXT from nltk.corpus import wordnet def lesk(cont...
32.018519
96
0.680162
from nltk.corpus import wordnet def lesk(context_sentence, ambiguous_word, pos=None, synsets=None): context = set(context_sentence) if synsets is None: synsets = wordnet.synsets(ambiguous_word) if pos: synsets = [ss for ss in synsets if str(ss.pos()) == pos] if not synsets: ...
true
true
f77b0cd4664bfe481e5668187c4d6f4b38b259b8
1,786
py
Python
main.py
JeromeTan1997/PL0
59f5bdad7e474310d68f0d834a70937d8a7bb671
[ "MIT" ]
null
null
null
main.py
JeromeTan1997/PL0
59f5bdad7e474310d68f0d834a70937d8a7bb671
[ "MIT" ]
null
null
null
main.py
JeromeTan1997/PL0
59f5bdad7e474310d68f0d834a70937d8a7bb671
[ "MIT" ]
null
null
null
from argparse import ArgumentParser from subprocess import run from pathlib import Path from lexer import Lexer from parser import Parser, TokenError from compiler import Compiler argparser = ArgumentParser(description='Compile PL0 source.') argparser.add_argument('source_file', metavar='file', type=str, help='source...
29.278689
123
0.682531
from argparse import ArgumentParser from subprocess import run from pathlib import Path from lexer import Lexer from parser import Parser, TokenError from compiler import Compiler argparser = ArgumentParser(description='Compile PL0 source.') argparser.add_argument('source_file', metavar='file', type=str, help='source...
true
true
f77b0cebe687206761de042aadc3839d6835d99b
795
py
Python
xlsxwriter/test/comments/test_initialisation.py
shareablee/XlsxWriter
3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comments/test_initialisation.py
shareablee/XlsxWriter
3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comments/test_initialisation.py
shareablee/XlsxWriter
3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ...comments import Comments class TestInitialisation(unittest.TestCase): """ T...
24.090909
79
0.583648
import unittest from ...compatibility import StringIO from ...comments import Comments class TestInitialisation(unittest.TestCase): def setUp(self): self.fh = StringIO() self.comments = Comments() self.comments._set_filehandle(self.fh) def test_xml_declaration(self): self.c...
true
true
f77b0d41de1c2fe7e2f449b4edb847f8cb520925
226
py
Python
wharf_management/wharf_management/doctype/access_control_user/test_access_control_user.py
staumoepeau/pms
67aa43fb27f75482275b50dff17f5919e6c394b1
[ "MIT" ]
1
2021-02-19T11:45:24.000Z
2021-02-19T11:45:24.000Z
wharf_management/wharf_management/doctype/access_control_user/test_access_control_user.py
staumoepeau/pms
67aa43fb27f75482275b50dff17f5919e6c394b1
[ "MIT" ]
1
2021-08-12T08:29:50.000Z
2021-08-17T06:12:02.000Z
wharf_management/wharf_management/doctype/access_control_user/test_access_control_user.py
staumoepeau/pms
67aa43fb27f75482275b50dff17f5919e6c394b1
[ "MIT" ]
4
2020-07-22T20:30:00.000Z
2021-08-07T12:36:01.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2020, Sione Taumoepeau and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestAccessControlUser(unittest.TestCase): pass
20.545455
55
0.774336
from __future__ import unicode_literals import unittest class TestAccessControlUser(unittest.TestCase): pass
true
true
f77b0dc580e67e50ceb0122c61b30d9973005b18
928
py
Python
vdsr_pytorch/__init__.py
seovalue/VDSR-PyTorch
99bf8457a13cda38870f6b1a72fda13fcd8b0efa
[ "Apache-2.0" ]
16
2021-01-22T03:23:47.000Z
2022-03-24T23:12:10.000Z
vdsr_pytorch/__init__.py
seovalue/VDSR-PyTorch
99bf8457a13cda38870f6b1a72fda13fcd8b0efa
[ "Apache-2.0" ]
3
2021-11-16T01:21:51.000Z
2022-02-23T13:55:29.000Z
vdsr_pytorch/__init__.py
seovalue/VDSR-PyTorch
99bf8457a13cda38870f6b1a72fda13fcd8b0efa
[ "Apache-2.0" ]
5
2021-05-10T10:30:32.000Z
2022-02-19T10:33:59.000Z
# Copyright 2020 Dakewe Biotech Corporation. 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...
37.12
80
0.69181
from .calculate_niqe import cal_niqe from .datasets import DatasetFromFolder from .datasets import check_image_file from .model import VDSR __all__ = [ "cal_niqe", "DatasetFromFolder", "check_image_file", "VDSR" ]
true
true
f77b0e5568f6ae3c00400c142895bb5aaeda0132
4,822
py
Python
data/level/level10241.py
levelupai/match3-level-similarity
cc9b28b8741b41bea1273c8bc9b4d265d79a1dca
[ "Apache-2.0" ]
null
null
null
data/level/level10241.py
levelupai/match3-level-similarity
cc9b28b8741b41bea1273c8bc9b4d265d79a1dca
[ "Apache-2.0" ]
6
2020-07-04T02:53:08.000Z
2022-03-11T23:53:14.000Z
data/level/level10241.py
levelupai/match3-level-similarity
cc9b28b8741b41bea1273c8bc9b4d265d79a1dca
[ "Apache-2.0" ]
3
2019-12-31T11:42:59.000Z
2021-03-28T20:06:13.000Z
data = {'level_index': 10241, 'move_count': '30', 'board_info': {(0, 8): {'next': (0, -1), 'prev': (1, 0)}, (0, 7): {'next': (0, -1), 'prev': (0, 1)}, (0, 6): {'next': (0, -1), 'prev': (0, 1)}, (0, 5): {'next': (0, -1), 'prev': (0, 1)}, (0, 4): {'next': (0, -1), 'pr...
104.826087
117
0.249067
data = {'level_index': 10241, 'move_count': '30', 'board_info': {(0, 8): {'next': (0, -1), 'prev': (1, 0)}, (0, 7): {'next': (0, -1), 'prev': (0, 1)}, (0, 6): {'next': (0, -1), 'prev': (0, 1)}, (0, 5): {'next': (0, -1), 'prev': (0, 1)}, (0, 4): {'next': (0, -1), 'pr...
true
true
f77b0f89ee1eb466139626ccdac9cea680a784d5
1,982
py
Python
aiospotify/values.py
proguy914629bot/aiospotify
4ea468b0c0cd7aba5a612cd42f591a635d3a2e64
[ "MIT" ]
null
null
null
aiospotify/values.py
proguy914629bot/aiospotify
4ea468b0c0cd7aba5a612cd42f591a635d3a2e64
[ "MIT" ]
null
null
null
aiospotify/values.py
proguy914629bot/aiospotify
4ea468b0c0cd7aba5a612cd42f591a635d3a2e64
[ "MIT" ]
null
null
null
# Future from __future__ import annotations # My stuff from aiospotify import exceptions __all__ = ( "EXCEPTION_MAPPING", "SCOPES", "VALID_SEED_KWARGS", ) EXCEPTION_MAPPING = { 400: exceptions.BadRequest, 401: exceptions.Unauthorized, 403: exceptions.Forbidden, 404: exceptions.NotFound,...
19.82
40
0.656408
from __future__ import annotations from aiospotify import exceptions __all__ = ( "EXCEPTION_MAPPING", "SCOPES", "VALID_SEED_KWARGS", ) EXCEPTION_MAPPING = { 400: exceptions.BadRequest, 401: exceptions.Unauthorized, 403: exceptions.Forbidden, 404: exceptions.NotFound, 429: exceptions...
true
true
f77b1046612ec6443274fe724c40915e5adb0338
249
py
Python
tests/__init__.py
spinolino/fastvector
a00aaecb62dbfe6abf85ac0562fa13e9f903a471
[ "MIT" ]
null
null
null
tests/__init__.py
spinolino/fastvector
a00aaecb62dbfe6abf85ac0562fa13e9f903a471
[ "MIT" ]
null
null
null
tests/__init__.py
spinolino/fastvector
a00aaecb62dbfe6abf85ac0562fa13e9f903a471
[ "MIT" ]
null
null
null
"""Test code suite. """ import unittest from .test_computations import ComputationsTests # noqa: F401 from .test_vector import VectorTests # noqa: F401 def main_tests() -> None: unittest.main() if __name__ == "__main__": main_tests()
16.6
62
0.706827
import unittest from .test_computations import ComputationsTests from .test_vector import VectorTests def main_tests() -> None: unittest.main() if __name__ == "__main__": main_tests()
true
true
f77b10839e0004e4808c53173c2011f6a609619d
2,520
py
Python
CSW/data.gov_pycsw-Copy1.py
petercunning/notebook
5b26f2dc96bcb36434542b397de6ca5fa3b61a0a
[ "MIT" ]
32
2015-01-07T01:48:05.000Z
2022-03-02T07:07:42.000Z
CSW/data.gov_pycsw-Copy1.py
petercunning/notebook
5b26f2dc96bcb36434542b397de6ca5fa3b61a0a
[ "MIT" ]
1
2015-04-13T21:00:18.000Z
2015-04-13T21:00:18.000Z
CSW/data.gov_pycsw-Copy1.py
petercunning/notebook
5b26f2dc96bcb36434542b397de6ca5fa3b61a0a
[ "MIT" ]
30
2015-01-28T09:31:29.000Z
2022-03-07T03:08:28.000Z
# coding: utf-8 # In[ ]: #Query `apiso:ServiceType` on data.gov # In[17]: from owslib.csw import CatalogueServiceWeb from owslib import fes import numpy as np # In[18]: #endpoint = 'http://catalog.data.gov/csw-all' #granule level production catalog endpoint = 'http://uat-catalog-fe-data.reisys.com/csw-all' #...
21.355932
136
0.668651
from owslib.csw import CatalogueServiceWeb from owslib import fes import numpy as np endpoint = 'http://uat-catalog-fe-data.reisys.com/csw-all' endpoint = 'http://data.ioos.us/csw' csw = CatalogueServiceWeb(endpoint,timeout=60) print csw.version val = 'coawst' filter1 = fes.PropertyIsLike(propertyname='apis...
false
true
f77b11573ce0585e5b009e4943625d08caab88b1
6,993
py
Python
tractseg/libs/tractometry.py
jelleman8/TractSeg
2a42efe6016141f3a32d46c8f509758302c5875b
[ "Apache-2.0" ]
1
2020-06-07T09:36:46.000Z
2020-06-07T09:36:46.000Z
tractseg/libs/tractometry.py
jelleman8/TractSeg
2a42efe6016141f3a32d46c8f509758302c5875b
[ "Apache-2.0" ]
null
null
null
tractseg/libs/tractometry.py
jelleman8/TractSeg
2a42efe6016141f3a32d46c8f509758302c5875b
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from collections import defaultdict import numpy as np from scipy.ndimage.morphology import binary_dilation from scipy.ndimage.interpolation import map_coordinates from dipy.segment.clustering import QuickBun...
46.006579
116
0.573002
from __future__ import absolute_import from __future__ import division from __future__ import print_function from collections import defaultdict import numpy as np from scipy.ndimage.morphology import binary_dilation from scipy.ndimage.interpolation import map_coordinates from dipy.segment.clustering import QuickBun...
true
true
f77b1236f9a94d11ca9e1f05dfec674c734845db
2,931
py
Python
influxdb_client/domain/pipe_literal.py
Rajpratik71/influxdb-client-python
ae537018b638600552b3ac11f1b070c048719910
[ "MIT" ]
null
null
null
influxdb_client/domain/pipe_literal.py
Rajpratik71/influxdb-client-python
ae537018b638600552b3ac11f1b070c048719910
[ "MIT" ]
null
null
null
influxdb_client/domain/pipe_literal.py
Rajpratik71/influxdb-client-python
ae537018b638600552b3ac11f1b070c048719910
[ "MIT" ]
null
null
null
# coding: utf-8 """ Influx API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: 0.1.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class PipeLiteral(object)...
25.710526
120
0.547595
import pprint import re import six class PipeLiteral(object): openapi_types = { 'type': 'str' } attribute_map = { 'type': 'type' } def __init__(self, type=None): self._type = None self.discriminator = None if type is not None: self.type...
true
true
f77b1242c1e511a948300ee86d10b23e89003107
1,388
py
Python
setup.py
cmutel/ecoinvent-row-report
694717115e79161567105f7061292cd91ac40180
[ "BSD-3-Clause" ]
null
null
null
setup.py
cmutel/ecoinvent-row-report
694717115e79161567105f7061292cd91ac40180
[ "BSD-3-Clause" ]
null
null
null
setup.py
cmutel/ecoinvent-row-report
694717115e79161567105f7061292cd91ac40180
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup setup( name='ecoinvent_row_report', version="0.2.1", packages=["ecoinvent_row_report"], author="Chris Mutel", author_email="cmutel@gmail.com", license=open('LICENSE.txt').read(), url="https://bitbucket.org/cmutel/ecoinvent-row-report", package_data={'ecoinve...
30.844444
66
0.57853
from setuptools import setup setup( name='ecoinvent_row_report', version="0.2.1", packages=["ecoinvent_row_report"], author="Chris Mutel", author_email="cmutel@gmail.com", license=open('LICENSE.txt').read(), url="https://bitbucket.org/cmutel/ecoinvent-row-report", package_data={'ecoinve...
true
true
f77b1382c718408d3f777a2ed91cb262b56ca66c
4,937
py
Python
autoleagueplay/match_exercise.py
RLBot/AutoLeaguePlay
eaff05532eab179d1fa8635541dad17cd0a9b82c
[ "MIT" ]
1
2019-08-17T18:18:54.000Z
2019-08-17T18:18:54.000Z
autoleagueplay/match_exercise.py
RLBot/AutoLeaguePlay
eaff05532eab179d1fa8635541dad17cd0a9b82c
[ "MIT" ]
11
2019-08-22T07:44:12.000Z
2019-10-30T18:16:09.000Z
autoleagueplay/match_exercise.py
RLBot/AutoLeaguePlay
eaff05532eab179d1fa8635541dad17cd0a9b82c
[ "MIT" ]
4
2019-08-17T19:43:12.000Z
2020-12-10T18:53:53.000Z
import time from dataclasses import dataclass, field from typing import Optional from rlbot.setup_manager import SetupManager from rlbot.training.training import Grade, Pass, Fail from rlbot.utils.game_state_util import GameState from rlbot.utils.structures.game_data_struct import GameTickPacket from rlbot.utils.struc...
38.874016
144
0.725339
import time from dataclasses import dataclass, field from typing import Optional from rlbot.setup_manager import SetupManager from rlbot.training.training import Grade, Pass, Fail from rlbot.utils.game_state_util import GameState from rlbot.utils.structures.game_data_struct import GameTickPacket from rlbot.utils.struc...
true
true
f77b153ea599c3cc32cab0fe6d882d7beb01b4b7
335
py
Python
pgdrive/world/top_down_observation/__init__.py
1155107756/pgdrive
708375c8cb6c5ed1950c20d91bd0aec5fd1b1e62
[ "Apache-2.0" ]
null
null
null
pgdrive/world/top_down_observation/__init__.py
1155107756/pgdrive
708375c8cb6c5ed1950c20d91bd0aec5fd1b1e62
[ "Apache-2.0" ]
null
null
null
pgdrive/world/top_down_observation/__init__.py
1155107756/pgdrive
708375c8cb6c5ed1950c20d91bd0aec5fd1b1e62
[ "Apache-2.0" ]
null
null
null
""" We implement this top-down view render based on eleurent/Highway-Env See more information on its Github page: https://github.com/eleurent/highway-env """ from pgdrive.world.top_down_observation.top_down_multi_channel import TopDownMultiChannel from pgdrive.world.top_down_observation.top_down_observation import TopD...
47.857143
89
0.850746
from pgdrive.world.top_down_observation.top_down_multi_channel import TopDownMultiChannel from pgdrive.world.top_down_observation.top_down_observation import TopDownObservation
true
true
f77b153ea888b2157c70199fbd20bc061b2713a8
2,152
py
Python
Lib/objc/_Pegasus.py
snazari/Pyto
bcea7bbef35cab21ce73087b1a0c00a07d07ec72
[ "MIT" ]
701
2018-10-22T11:54:09.000Z
2022-03-31T14:39:30.000Z
Lib/objc/_Pegasus.py
snazari/Pyto
bcea7bbef35cab21ce73087b1a0c00a07d07ec72
[ "MIT" ]
229
2018-10-24T09:15:31.000Z
2021-12-24T16:51:37.000Z
Lib/objc/_Pegasus.py
snazari/Pyto
bcea7bbef35cab21ce73087b1a0c00a07d07ec72
[ "MIT" ]
131
2018-11-25T18:33:03.000Z
2022-03-24T03:18:07.000Z
""" Classes from the 'Pegasus' framework. """ try: from rubicon.objc import ObjCClass except ValueError: def ObjCClass(name): return None def _Class(name): try: return ObjCClass(name) except NameError: return None PGControlsViewModelValues = _Class("PGControlsViewModelValue...
37.103448
77
0.819238
try: from rubicon.objc import ObjCClass except ValueError: def ObjCClass(name): return None def _Class(name): try: return ObjCClass(name) except NameError: return None PGControlsViewModelValues = _Class("PGControlsViewModelValues") PGControlsViewModel = _Class("PGControlsVi...
true
true
f77b15d5fcb26ce1cd8418232f3144ebea657808
2,211
py
Python
backend/dsdsddds_34505/urls.py
crowdbotics-apps/dsdsddds-34505
3da70cbc9214d8994adeb51135f4fe4ac2e55ed0
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/dsdsddds_34505/urls.py
crowdbotics-apps/dsdsddds-34505
3da70cbc9214d8994adeb51135f4fe4ac2e55ed0
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/dsdsddds_34505/urls.py
crowdbotics-apps/dsdsddds-34505
3da70cbc9214d8994adeb51135f4fe4ac2e55ed0
[ "FTL", "AML", "RSA-MD" ]
null
null
null
"""dsdsddds_34505 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Clas...
35.095238
87
0.712347
from django.contrib import admin from django.urls import path, include, re_path from django.views.generic.base import TemplateView from allauth.account.views import confirm_email from rest_framework import permissions from drf_yasg.views import get_schema_view from drf_yasg import openapi urlpatterns = [ path("",...
true
true
f77b15f8792b3e8859ed0b67d6ff56ecd86b7307
420
py
Python
bananagui/wrappers/gtk2.py
Akuli/BananaGUI
d1bb2823770fb9d2e13da1d377d7a51e6a144679
[ "MIT" ]
4
2017-01-13T16:51:45.000Z
2019-06-13T20:54:42.000Z
bananagui/wrappers/gtk2.py
Akuli/BananaGUI
d1bb2823770fb9d2e13da1d377d7a51e6a144679
[ "MIT" ]
1
2019-06-13T21:04:42.000Z
2019-06-20T13:27:56.000Z
bananagui/wrappers/gtk2.py
Akuli/BananaGUI
d1bb2823770fb9d2e13da1d377d7a51e6a144679
[ "MIT" ]
null
null
null
# flake8: noqa """Set up gtkwrapper for GTK+ 3 and replace this module with it.""" import sys import warnings import gi # Ignore the GTK+ 2 warning. with warnings.catch_warnings(): warnings.simplefilter('ignore') gi.require_version('Gtk', '2.0') from gi.repository import Gtk gi.require_version('Gdk', '2...
21
67
0.716667
import sys import warnings import gi with warnings.catch_warnings(): warnings.simplefilter('ignore') gi.require_version('Gtk', '2.0') from gi.repository import Gtk gi.require_version('Gdk', '2.0') gi.require_version('GLib', '2.0') from . import gtkwrapper sys.modules[__name__] = gtkwrapper
true
true
f77b1666b0390e981dc6f34e156c5228e781c9f3
751
py
Python
ykdl/extractors/ku6.py
love2wind/ykdl
77c217d523ec2849788a980f6aac6bc3bb6fb9d1
[ "MIT" ]
null
null
null
ykdl/extractors/ku6.py
love2wind/ykdl
77c217d523ec2849788a980f6aac6bc3bb6fb9d1
[ "MIT" ]
null
null
null
ykdl/extractors/ku6.py
love2wind/ykdl
77c217d523ec2849788a980f6aac6bc3bb6fb9d1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from ._common import * class Ku6(SimpleExtractor): name = '酷6 (Ku6)' def init(self): self.url_pattern = 'flvURL: "([^"]+)' self.title_pattern = 'title = "([^"]+)' pass def list_only(self): return match(self.url, 'https://www.ku6.com/detail/\d+') ...
24.225806
79
0.484687
from ._common import * class Ku6(SimpleExtractor): name = '酷6 (Ku6)' def init(self): self.url_pattern = 'flvURL: "([^"]+)' self.title_pattern = 'title = "([^"]+)' pass def list_only(self): return match(self.url, 'https://www.ku6.com/detail/\d+') def prepare_list(sel...
true
true
f77b16faeb7bd963bb5f8fde3820ef5ac11e5bad
76,099
py
Python
freetype/__init__.py
josh95117/freetype-py
1b564b7de61f0bde5c3e09ed9a1fb0f7642d6bad
[ "BSD-3-Clause-Clear" ]
null
null
null
freetype/__init__.py
josh95117/freetype-py
1b564b7de61f0bde5c3e09ed9a1fb0f7642d6bad
[ "BSD-3-Clause-Clear" ]
null
null
null
freetype/__init__.py
josh95117/freetype-py
1b564b7de61f0bde5c3e09ed9a1fb0f7642d6bad
[ "BSD-3-Clause-Clear" ]
null
null
null
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # # FreeType high-level python API - Copyright 2011-2015 Nicolas P. Rougier # Distributed under the terms of the new BSD license. # # ----------------------------------------------------------------------------- ''...
38.589757
93
0.612636
import io import sys from ctypes import * from freetype.raw import * PY3 = sys.version_info[0] == 3 if PY3: unicode = str _handle = None FT_Library_filename = filename class _FT_Library_Wrapper(FT_Library): _type_ = FT_Library._type_ # Store ref to FT_Done_FreeType otherwise it will be deleted before...
true
true
f77b1950a93e90309affe401b81f968c13a65290
508
py
Python
manage.py
RisperAkinyi/PitchBlog
3f084fe9fcd846aa90ac75e86171681d62e95d26
[ "Unlicense" ]
null
null
null
manage.py
RisperAkinyi/PitchBlog
3f084fe9fcd846aa90ac75e86171681d62e95d26
[ "Unlicense" ]
null
null
null
manage.py
RisperAkinyi/PitchBlog
3f084fe9fcd846aa90ac75e86171681d62e95d26
[ "Unlicense" ]
null
null
null
from app import create_app, db from app.models import User,Pitch,Comment from flask_script import Manager,Server from flask_migrate import Migrate, MigrateCommand # Creating app instance app = create_app('production') manager = Manager(app) migrate = Migrate(app,db) manager.add_command('server',Server) manager.add_co...
25.4
49
0.759843
from app import create_app, db from app.models import User,Pitch,Comment from flask_script import Manager,Server from flask_migrate import Migrate, MigrateCommand app = create_app('production') manager = Manager(app) migrate = Migrate(app,db) manager.add_command('server',Server) manager.add_command('db',MigrateComman...
true
true
f77b1a110ebd65f1354e3c9a5db982f507cc6547
9,083
py
Python
src/rascore/util/scripts/annot_lig.py
mitch-parker/rascore
d6105db80359b43a7573edf7f36a756061be6965
[ "Apache-2.0" ]
7
2022-02-10T06:27:22.000Z
2022-03-16T16:46:05.000Z
src/rascore/util/scripts/annot_lig.py
mitch-parker/rascore
d6105db80359b43a7573edf7f36a756061be6965
[ "Apache-2.0" ]
null
null
null
src/rascore/util/scripts/annot_lig.py
mitch-parker/rascore
d6105db80359b43a7573edf7f36a756061be6965
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Copyright 2022 Mitchell Isaac Parker 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 ...
32.90942
94
0.515468
import pandas as pd from tqdm import tqdm import concurrent.futures from ..functions.chem import get_lig_smiles, is_lig_match, get_lig_simi from ..functions.lst import lst_unique, lst_to_str, res_to_lst, type_lst, sort_lst from ..functions.lig import lig_col_lst, lig_lst_dict from ..functions.coord import ( load_...
true
true
f77b1a18348758ad28fefa5691624cd89f5b4807
356
py
Python
tests/float/builtin_float_hash.py
TG-Techie/circuitpython
390295dd218fb705fe652de77132dea472adf1ed
[ "MIT", "BSD-3-Clause", "MIT-0", "Unlicense" ]
3
2020-01-09T21:50:22.000Z
2020-01-15T08:27:48.000Z
tests/float/builtin_float_hash.py
TG-Techie/circuitpython
390295dd218fb705fe652de77132dea472adf1ed
[ "MIT", "BSD-3-Clause", "MIT-0", "Unlicense" ]
null
null
null
tests/float/builtin_float_hash.py
TG-Techie/circuitpython
390295dd218fb705fe652de77132dea472adf1ed
[ "MIT", "BSD-3-Clause", "MIT-0", "Unlicense" ]
1
2020-01-11T12:42:41.000Z
2020-01-11T12:42:41.000Z
# test builtin hash function with float args # these should hash to an integer with a specific value for val in ("0.0", "-0.0", "1.0", "2.0", "-12.0", "12345.0"): print(val, hash(float(val))) # just check that these values are hashable for val in ("0.1", "-0.1", "10.3", "0.4e3", "1e16", "inf", "-inf", "nan"): ...
35.6
74
0.606742
for val in ("0.0", "-0.0", "1.0", "2.0", "-12.0", "12345.0"): print(val, hash(float(val))) for val in ("0.1", "-0.1", "10.3", "0.4e3", "1e16", "inf", "-inf", "nan"): print(val, type(hash(float(val))))
true
true
f77b1b6f96872e8d0d1a9cd9583f5c83700bbc45
3,689
py
Python
generate_skillet_preview.py
scotchoaf/SkilletBuilder
ac2d64cb4072e6933aefa33017709c1e5d749bcb
[ "MIT" ]
null
null
null
generate_skillet_preview.py
scotchoaf/SkilletBuilder
ac2d64cb4072e6933aefa33017709c1e5d749bcb
[ "MIT" ]
1
2021-03-31T19:46:14.000Z
2021-03-31T19:46:14.000Z
generate_skillet_preview.py
scotchoaf/SkilletBuilder
ac2d64cb4072e6933aefa33017709c1e5d749bcb
[ "MIT" ]
null
null
null
# 12-12-19 nembery@paloaltonetworks.com import os import re import sys from lxml import etree from skilletlib import Panoply config_source = os.environ.get('skillet_source', 'offline') if config_source == 'offline': # grab our two configs from the environment base_config_path = os.environ.get('BASE_CONFIG', ...
35.815534
113
0.647059
import os import re import sys from lxml import etree from skilletlib import Panoply config_source = os.environ.get('skillet_source', 'offline') if config_source == 'offline': base_config_path = os.environ.get('BASE_CONFIG', '/Users/nembery/Downloads/iron_skillet_panos_full.xml') latest_config_path =...
true
true
f77b1be3b47c6e1fcf6869f1994535269bae2da8
3,544
py
Python
appengine/standard/endpoints-frameworks-v2/iata/main.py
norick1701/sample
4987e3c2bdd6171deff5ca41fc61c6f4f56c0161
[ "Apache-2.0" ]
4
2018-12-23T18:17:14.000Z
2020-01-05T19:13:58.000Z
appengine/standard/endpoints-frameworks-v2/iata/main.py
norick1701/sample
4987e3c2bdd6171deff5ca41fc61c6f4f56c0161
[ "Apache-2.0" ]
null
null
null
appengine/standard/endpoints-frameworks-v2/iata/main.py
norick1701/sample
4987e3c2bdd6171deff5ca41fc61c6f4f56c0161
[ "Apache-2.0" ]
4
2018-06-03T14:43:25.000Z
2019-11-24T04:05:18.000Z
# Copyright 2018 Google 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 required by applicable law or a...
29.533333
74
0.681151
import endpoints from protorpc import message_types from protorpc import messages from protorpc import remote from data import AIRPORTS IATA_RESOURCE = endpoints.ResourceContainer( iata=messages.StringField(1, required=True) ) class Airport(messages.Message): iata = messages.StringField(1, required=True) ...
true
true
f77b1c4b03db1edd1faf918db30bb890a2e5e32a
9,074
py
Python
seq2seq/tools/beam_search.py
holianh/seq2seq.pytorch
bd99ba8642d84d6debe126ec89126155ce0b6338
[ "MIT" ]
null
null
null
seq2seq/tools/beam_search.py
holianh/seq2seq.pytorch
bd99ba8642d84d6debe126ec89126155ce0b6338
[ "MIT" ]
null
null
null
seq2seq/tools/beam_search.py
holianh/seq2seq.pytorch
bd99ba8642d84d6debe126ec89126155ce0b6338
[ "MIT" ]
1
2019-11-04T20:16:12.000Z
2019-11-04T20:16:12.000Z
"""Class for generating sequences Adapted from https://github.com/tensorflow/models/blob/master/im2txt/im2txt/inference_utils/sequence_generator.py""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import heapq from .config import EOS class Sequence(objec...
39.624454
116
0.572074
from __future__ import absolute_import from __future__ import division from __future__ import print_function import heapq from .config import EOS class Sequence(object): def __init__(self, output, state, logprob, score, attention=None): self.output = output self.state = state self.logpro...
true
true
f77b1e17ef04cdf5eaed4d4afd40736db4e4e068
1,475
py
Python
vendor/github.com/elastic/beats/libbeat/tests/system/test_keystore.py
jiangjunjian/countbeat
79e64f61aba6a6e256d8d79f4da217108f77b661
[ "Apache-2.0" ]
1
2018-01-17T09:40:55.000Z
2018-01-17T09:40:55.000Z
vendor/github.com/elastic/beats/libbeat/tests/system/test_keystore.py
jiangjunjian/countbeat
79e64f61aba6a6e256d8d79f4da217108f77b661
[ "Apache-2.0" ]
null
null
null
vendor/github.com/elastic/beats/libbeat/tests/system/test_keystore.py
jiangjunjian/countbeat
79e64f61aba6a6e256d8d79f4da217108f77b661
[ "Apache-2.0" ]
null
null
null
import os from os import path from base import BaseTest from keystore import KeystoreBase class TestKeystore(KeystoreBase): """ Test Keystore variable replacement """ def setUp(self): super(BaseTest, self).setUp() self.keystore_path = self.working_dir + "/data/keystore" if p...
28.365385
85
0.644068
import os from os import path from base import BaseTest from keystore import KeystoreBase class TestKeystore(KeystoreBase): def setUp(self): super(BaseTest, self).setUp() self.keystore_path = self.working_dir + "/data/keystore" if path.exists(self.keystore_path): os.Remove(s...
true
true
f77b1ebb719311e6c1e6f07117dc206715a6b64c
5,387
py
Python
src/gen-ext-timezones.py
webOS-ports/luna-init
c9aa53ab7806b330ced8c950c3d6912614a1ccb5
[ "Apache-2.0" ]
null
null
null
src/gen-ext-timezones.py
webOS-ports/luna-init
c9aa53ab7806b330ced8c950c3d6912614a1ccb5
[ "Apache-2.0" ]
2
2019-12-06T11:14:05.000Z
2021-11-10T17:43:35.000Z
src/gen-ext-timezones.py
webOS-ports/luna-init
c9aa53ab7806b330ced8c950c3d6912614a1ccb5
[ "Apache-2.0" ]
4
2015-07-08T14:49:55.000Z
2016-06-23T17:38:53.000Z
#!/usr/bin/env python3 # @@@LICENSE # # Copyright (c) 2014 LG Electronics, 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 requi...
31.87574
93
0.672359
import sys, os.path, os from getopt import gnu_getopt as getopt from datetime import datetime from itertools import * import pytz import json from abbrevs import abbrevs def findDST(tz, months = [datetime(datetime.utcnow().year, n+1, 1) for n in range(12)]): try: std = next(dropwhile(lambda m: tz.dst(m).seconds !=...
true
true
f77b1ed1da266517f23f2cc341eba21806fd1ab4
3,021
py
Python
test/directed.py
guilyx/message_filters
cee9d45c346377aa7c268d79de122b3766c2914f
[ "BSD-3-Clause" ]
24
2018-07-09T22:21:32.000Z
2022-02-14T10:51:20.000Z
test/directed.py
guilyx/message_filters
cee9d45c346377aa7c268d79de122b3766c2914f
[ "BSD-3-Clause" ]
59
2018-07-09T22:22:22.000Z
2022-03-07T22:40:19.000Z
test/directed.py
guilyx/message_filters
cee9d45c346377aa7c268d79de122b3766c2914f
[ "BSD-3-Clause" ]
22
2018-09-14T02:40:53.000Z
2022-02-24T02:17:12.000Z
# image_transport::SubscriberFilter wide_left; // "/wide_stereo/left/image_raw" # image_transport::SubscriberFilter wide_right; // "/wide_stereo/right/image_raw" # message_filters::Subscriber<CameraInfo> wide_left_info; // "/wide_stereo/left/camera_info" # message_filters::Subscriber<CameraInfo> wide_right_in...
37.296296
97
0.642502
import rclpy import random import unittest from builtin_interfaces.msg import Time as TimeMsg from message_filters import SimpleFilter, Subscriber, Cache, TimeSynchronizer class MockHeader: pass class MockMessage: def __init__(self, stamp, data): self.header = MockHeader() self.header.stamp...
true
true
f77b2047bc2f1a8a45c37e8fc580243544eca4d7
3,330
py
Python
tests/test_enum.py
slacrherbst/rogue
151b122de81d5c934145053502314d1dc3b2ffa7
[ "BSD-3-Clause-LBNL" ]
null
null
null
tests/test_enum.py
slacrherbst/rogue
151b122de81d5c934145053502314d1dc3b2ffa7
[ "BSD-3-Clause-LBNL" ]
null
null
null
tests/test_enum.py
slacrherbst/rogue
151b122de81d5c934145053502314d1dc3b2ffa7
[ "BSD-3-Clause-LBNL" ]
null
null
null
#!/usr/bin/env python3 #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: # https://confluence.slac.stanford.edu...
30.550459
78
0.507808
import datetime import parse import pyrogue as pr import pyrogue.interfaces.simulation import rogue.interfaces.memory import time class EnumDev(pr.Device): def __init__(self,**kwargs): super().__init__(**kwargs) self.add(pr.RemoteVariable( name = 'Config', descr...
true
true