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
1c3194b6131259ebc1d582358502bae612a4a187
43,344
py
Python
stix2/test/v21/test_granular_markings.py
2xyo/cti-python-stix2
cffee92c7ed18c4cdd54c4370c6a17878dfd36cd
[ "BSD-3-Clause" ]
9
2017-07-03T19:01:23.000Z
2020-02-20T19:22:49.000Z
stix2/test/v21/test_granular_markings.py
2xyo/cti-python-stix2
cffee92c7ed18c4cdd54c4370c6a17878dfd36cd
[ "BSD-3-Clause" ]
1
2017-05-30T14:13:27.000Z
2017-05-30T14:13:27.000Z
stix2/test/v21/test_granular_markings.py
2xyo/cti-python-stix2
cffee92c7ed18c4cdd54c4370c6a17878dfd36cd
[ "BSD-3-Clause" ]
1
2017-05-26T19:17:14.000Z
2017-05-26T19:17:14.000Z
import pytest from stix2 import markings from stix2.exceptions import InvalidSelectorError, MarkingNotFoundError from stix2.v21 import TLP_RED, Malware from .constants import MALWARE_MORE_KWARGS as MALWARE_KWARGS_CONST from .constants import MARKING_IDS, MARKING_LANGS """Tests for the Data Markings API.""" MALWARE_...
33.087023
137
0.535991
import pytest from stix2 import markings from stix2.exceptions import InvalidSelectorError, MarkingNotFoundError from stix2.v21 import TLP_RED, Malware from .constants import MALWARE_MORE_KWARGS as MALWARE_KWARGS_CONST from .constants import MARKING_IDS, MARKING_LANGS MALWARE_KWARGS = MALWARE_KWARGS_CONST.copy() ...
true
true
1c3195763ec9140a253961f18bd1ff67f126974a
1,482
py
Python
make_mozilla/news/migrations/0002_auto__add_field_article_featured.py
Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c
f80e7c0cff97a1e9b301aa04015db983c7645778
[ "BSD-3-Clause" ]
4
2015-05-08T16:58:53.000Z
2019-09-06T05:30:59.000Z
make_mozilla/news/migrations/0002_auto__add_field_article_featured.py
Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c
f80e7c0cff97a1e9b301aa04015db983c7645778
[ "BSD-3-Clause" ]
2
2019-02-17T17:44:53.000Z
2019-03-28T03:54:39.000Z
make_mozilla/news/migrations/0002_auto__add_field_article_featured.py
Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c
f80e7c0cff97a1e9b301aa04015db983c7645778
[ "BSD-3-Clause" ]
7
2015-05-21T15:38:29.000Z
2019-10-28T23:39:06.000Z
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Article.featured' db.add_column('news_article', 'featured', self.gf('d...
42.342857
106
0.568826
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.add_column('news_article', 'featured', self.gf('django.db.models.fields.BooleanField')(default=False), ...
true
true
1c3195d838100a6aa479a48604c5f9b4b8a6f1bd
1,463
py
Python
src/app/routes.py
rkruegs123/geo-model-builder
f070afe18ed874b3a31db519ea6f593f40a1be00
[ "Apache-2.0" ]
3
2020-12-12T10:39:25.000Z
2021-04-25T14:15:24.000Z
src/app/routes.py
rkruegs123/geo-model-builder
f070afe18ed874b3a31db519ea6f593f40a1be00
[ "Apache-2.0" ]
null
null
null
src/app/routes.py
rkruegs123/geo-model-builder
f070afe18ed874b3a31db519ea6f593f40a1be00
[ "Apache-2.0" ]
2
2020-12-12T10:40:12.000Z
2021-09-15T14:03:39.000Z
""" Copyright (c) 2020 Ryan Krueger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan Krueger, Jesse Michael Han, Daniel Selsam """ from flask import render_template, request, Response, send_file, jsonify from app import app from io import StringIO, BytesIO import ...
27.092593
74
0.608339
from flask import render_template, request, Response, send_file, jsonify from app import app from io import StringIO, BytesIO import pdb import base64 from builder import build from util import DEFAULTS @app.route('/') @app.route('/index') def index(): return render_template('index.html') @app.route('/solve', m...
true
true
1c3195dcfa33472d07f3d886618da06242d422fd
509
py
Python
repeated_sqrt.py
chapman-cpsc-230/hw3-EddieWadors
a3a3d4f59593b5939d9c29c9c132e1b32ccd59f9
[ "MIT" ]
null
null
null
repeated_sqrt.py
chapman-cpsc-230/hw3-EddieWadors
a3a3d4f59593b5939d9c29c9c132e1b32ccd59f9
[ "MIT" ]
null
null
null
repeated_sqrt.py
chapman-cpsc-230/hw3-EddieWadors
a3a3d4f59593b5939d9c29c9c132e1b32ccd59f9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ File: repeated_sqrt.py Copyright (c) 2016 Eddie Wadors License: MIT - explaining a given code by the textbook using comments. """ from math import sqrt for n in range(1, 60): #loop allows the variable to be square rooted once, and then square root it 59 times. r = 2.0 for i in range...
29.941176
108
0.642436
""" File: repeated_sqrt.py Copyright (c) 2016 Eddie Wadors License: MIT - explaining a given code by the textbook using comments. """ from math import sqrt for n in range(1, 60): r = 2.0 for i in range(n): r = sqrt(r) for i in range(n): r = r**2 print '%d times sqrt and **2: %.16f' ...
false
true
1c319666ace2cb7199a73acb22588bc9062d7e85
7,535
py
Python
Theme_1_Baseline/Scenario_1B_CoreVariable_Strings/Scenario_1B_CoreVariable_Strings.py
ocefpaf/system-test
9e435524b96dcdcb7a2e5dccb8be8ead0f35a547
[ "Unlicense" ]
null
null
null
Theme_1_Baseline/Scenario_1B_CoreVariable_Strings/Scenario_1B_CoreVariable_Strings.py
ocefpaf/system-test
9e435524b96dcdcb7a2e5dccb8be8ead0f35a547
[ "Unlicense" ]
null
null
null
Theme_1_Baseline/Scenario_1B_CoreVariable_Strings/Scenario_1B_CoreVariable_Strings.py
ocefpaf/system-test
9e435524b96dcdcb7a2e5dccb8be8ead0f35a547
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> from utilities import css_styles css_styles() # <markdowncell> # # IOOS System Test - Theme 1 - Scenario B - [Description](https://github.com/ioos/system-test/wiki/Development-of-Test-Themes#theme-1-baseline-assessment) # # ## Core Variable Strings # ...
33.638393
282
0.688786
from utilities import css_styles css_styles() =core_var_uri): name = g.value(subject=cv, predicate=core_var_name_uri).value definition = g.value(subject=cv, predicate=core_var_def_uri).value core_variables.append((name, definition)) import pandas as pd core_variables_names = [x for x,y in core_va...
false
true
1c3197e3b1c1e5963a29f43f10b65014e0b840b5
1,677
py
Python
dmd_japan.py
brendanjmeade/dmd_gps
bddc401e7a2e8d0fb44fa830d58197f1319b11c9
[ "MIT" ]
null
null
null
dmd_japan.py
brendanjmeade/dmd_gps
bddc401e7a2e8d0fb44fa830d58197f1319b11c9
[ "MIT" ]
null
null
null
dmd_japan.py
brendanjmeade/dmd_gps
bddc401e7a2e8d0fb44fa830d58197f1319b11c9
[ "MIT" ]
null
null
null
import json import datetime import numpy as np import matplotlib.pyplot as plt import pydmd as dmd plt.close("all") with open('GeonetTimeSeries.json') as json_file: data = json.load(json_file) n_stations = len(data) station_idx = 1 station_data = data[station_idx] # Loop over all time series and extract star...
28.913793
92
0.733453
import json import datetime import numpy as np import matplotlib.pyplot as plt import pydmd as dmd plt.close("all") with open('GeonetTimeSeries.json') as json_file: data = json.load(json_file) n_stations = len(data) station_idx = 1 station_data = data[station_idx] all_start_seconds = np.zeros(n_stations) al...
true
true
1c3199038a5fdf23ae658d8d6ef10f2a82f2d42f
27,164
py
Python
pyiomica/extendedDataFrame.py
benstear/pyiomica
bc26032b610fc911cc03b54115d6abdf53a56fce
[ "MIT" ]
null
null
null
pyiomica/extendedDataFrame.py
benstear/pyiomica
bc26032b610fc911cc03b54115d6abdf53a56fce
[ "MIT" ]
null
null
null
pyiomica/extendedDataFrame.py
benstear/pyiomica
bc26032b610fc911cc03b54115d6abdf53a56fce
[ "MIT" ]
null
null
null
'''PyIOmica Dataframe extending Pandas DataFrame with new functions''' import sklearn.preprocessing from .globalVariables import * from . import utilityFunctions from . import coreFunctions class DataFrame(pd.DataFrame): '''Class based on pandas.DataFrame extending capabilities into the doamin of ...
33.289216
227
0.598623
import sklearn.preprocessing from .globalVariables import * from . import utilityFunctions from . import coreFunctions class DataFrame(pd.DataFrame): def __init__(self, data=None, index=None, columns=None, dtype=None, copy=False): super().__init__(data=data, index=index, columns=colu...
true
true
1c319a57140c5a4d31122ed87a7f41b8734f3dba
420
py
Python
hackerrank.com/maximum-subarray-sum/gen.py
bepec/challenge
cf2d4fcf11a9a1724b6f620fdda86afbb1ba9ddc
[ "MIT" ]
null
null
null
hackerrank.com/maximum-subarray-sum/gen.py
bepec/challenge
cf2d4fcf11a9a1724b6f620fdda86afbb1ba9ddc
[ "MIT" ]
null
null
null
hackerrank.com/maximum-subarray-sum/gen.py
bepec/challenge
cf2d4fcf11a9a1724b6f620fdda86afbb1ba9ddc
[ "MIT" ]
null
null
null
import sys import os import random if len(sys.argv) < 3: print "Usage: {} N M [MAX]".format(sys.argv[0]) exit(1) n = int(sys.argv[1]) m = int(sys.argv[2]) vmax = int(sys.argv[3] if len(sys.argv) > 3 else 10**18) if n < 2 or n > 10e5: n = 10**5 if m < 2 or m > 10e14: m = 10**14 random.seed() print ...
16.153846
56
0.571429
import sys import os import random if len(sys.argv) < 3: print "Usage: {} N M [MAX]".format(sys.argv[0]) exit(1) n = int(sys.argv[1]) m = int(sys.argv[2]) vmax = int(sys.argv[3] if len(sys.argv) > 3 else 10**18) if n < 2 or n > 10e5: n = 10**5 if m < 2 or m > 10e14: m = 10**14 random.seed() print ...
false
true
1c319b286435ee2d468ebd6c9e17c0030699f9b7
586
py
Python
nativecap/__init__.py
aisouard/pynativecap
2d800ff4fee5dbade642d631dfb4c57e9f36d8e7
[ "MIT" ]
1
2021-01-26T08:58:26.000Z
2021-01-26T08:58:26.000Z
nativecap/__init__.py
aisouard/nativecap
2d800ff4fee5dbade642d631dfb4c57e9f36d8e7
[ "MIT" ]
null
null
null
nativecap/__init__.py
aisouard/nativecap
2d800ff4fee5dbade642d631dfb4c57e9f36d8e7
[ "MIT" ]
null
null
null
import ctypes import glob import os import platform system = platform.system() extension = ".pyd" if system == "Windows" else ".so" glob_str = os.path.join(os.path.dirname( os.path.abspath(__file__)), '..', 'nativecap*{}'.format(extension)) library = ctypes.CDLL(glob.glob(glob_str)[0]) library.nativecap.argtypes ...
23.44
71
0.679181
import ctypes import glob import os import platform system = platform.system() extension = ".pyd" if system == "Windows" else ".so" glob_str = os.path.join(os.path.dirname( os.path.abspath(__file__)), '..', 'nativecap*{}'.format(extension)) library = ctypes.CDLL(glob.glob(glob_str)[0]) library.nativecap.argtypes ...
true
true
1c319b2873d919c1cff81621dcdb3a70985ed8c9
6,902
py
Python
cv_lib/classification/models/cifar_large_resnet.py
zhfeing/deep-learning-lib-PyTorch
1a4e1c1939a42c30fe32dd8d6aff210e8604e77b
[ "MIT" ]
4
2021-03-29T07:34:21.000Z
2021-04-25T08:25:30.000Z
cv_lib/classification/models/cifar_large_resnet.py
zhfeing/deep-learning-lib
f96e3a71ae2dbeb44696725ec127ff8f37d4c6e9
[ "MIT" ]
null
null
null
cv_lib/classification/models/cifar_large_resnet.py
zhfeing/deep-learning-lib
f96e3a71ae2dbeb44696725ec127ff8f37d4c6e9
[ "MIT" ]
1
2021-03-30T07:13:31.000Z
2021-03-30T07:13:31.000Z
import torch.nn as nn import torch.nn.functional as F __all__ = [ "ResNet_CL", "resnet18_cl", "resnet34_cl", "resnet50_cl", "resnet101_cl", "resnet152_cl" ] class BasicBlock(nn.Module): expansion = 1 def __init__(self, in_planes, planes, stride=1, is_last=False): ...
35.57732
107
0.572733
import torch.nn as nn import torch.nn.functional as F __all__ = [ "ResNet_CL", "resnet18_cl", "resnet34_cl", "resnet50_cl", "resnet101_cl", "resnet152_cl" ] class BasicBlock(nn.Module): expansion = 1 def __init__(self, in_planes, planes, stride=1, is_last=False): ...
true
true
1c319b288707000dc9d4b775eea4ea744017f477
2,287
py
Python
src/greentest/test___monkey_patching.py
felixonmars/gevent
400a4099a8c74999afce22e821ba741436085e36
[ "MIT" ]
1
2019-05-09T08:59:55.000Z
2019-05-09T08:59:55.000Z
src/greentest/test___monkey_patching.py
felixonmars/gevent
400a4099a8c74999afce22e821ba741436085e36
[ "MIT" ]
null
null
null
src/greentest/test___monkey_patching.py
felixonmars/gevent
400a4099a8c74999afce22e821ba741436085e36
[ "MIT" ]
null
null
null
import sys import os import glob import util import atexit # subprocess: include in subprocess tests TIMEOUT = 120 directory = '%s.%s' % sys.version_info[:2] full_directory = '%s.%s.%s' % sys.version_info[:3] if hasattr(sys, 'pypy_version_info'): directory += 'pypy' full_directory += 'pypy' version = '%s.%s.%...
32.671429
126
0.637516
import sys import os import glob import util import atexit TIMEOUT = 120 directory = '%s.%s' % sys.version_info[:2] full_directory = '%s.%s.%s' % sys.version_info[:3] if hasattr(sys, 'pypy_version_info'): directory += 'pypy' full_directory += 'pypy' version = '%s.%s.%s' % sys.version_info[:3] def get_absol...
true
true
1c319bb18ca6aa65a963f78ec43ce5b69b69718d
963
py
Python
o3seespy/command/analysis.py
vijaypolimeru/o3seespy
c9ef0c27f685de705721b10eb1ea81c3a3c24c4e
[ "MIT", "BSD-3-Clause" ]
null
null
null
o3seespy/command/analysis.py
vijaypolimeru/o3seespy
c9ef0c27f685de705721b10eb1ea81c3a3c24c4e
[ "MIT", "BSD-3-Clause" ]
1
2021-06-25T15:33:31.000Z
2021-06-25T15:33:31.000Z
o3seespy/command/analysis.py
millen1m/o3seespy
7eead6aef8055f73af39b969e0d3499a67e1737f
[ "MIT", "BSD-3-Clause" ]
1
2020-12-12T21:01:42.000Z
2020-12-12T21:01:42.000Z
from o3seespy.base_model import OpenSeesObject class AnalysisBase(OpenSeesObject): op_base_type = "analysis" class Static(AnalysisBase): op_type = "Static" def __init__(self, osi): self._parameters = [self.op_type] self.to_process(osi) class Transient(AnalysisBase): op_type = "Tr...
20.934783
93
0.659398
from o3seespy.base_model import OpenSeesObject class AnalysisBase(OpenSeesObject): op_base_type = "analysis" class Static(AnalysisBase): op_type = "Static" def __init__(self, osi): self._parameters = [self.op_type] self.to_process(osi) class Transient(AnalysisBase): op_type = "Tr...
true
true
1c319bc32424b49951dda5aa20749cbeca82648c
15,230
py
Python
test/functional/docker/test_scenarios.py
LANsible/molecule
c259ef0e920ac12b4e47e60af4e6a33944c41f0b
[ "MIT" ]
1
2019-06-03T01:53:47.000Z
2019-06-03T01:53:47.000Z
test/functional/docker/test_scenarios.py
LANsible/molecule
c259ef0e920ac12b4e47e60af4e6a33944c41f0b
[ "MIT" ]
1
2018-12-22T09:39:30.000Z
2018-12-22T09:39:30.000Z
test/functional/docker/test_scenarios.py
LANsible/molecule
c259ef0e920ac12b4e47e60af4e6a33944c41f0b
[ "MIT" ]
1
2019-01-31T20:55:33.000Z
2019-01-31T20:55:33.000Z
# Copyright (c) 2015-2018 Cisco Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge...
29.688109
79
0.64872
import os import re import pytest import sh import shutil from molecule import util from ..conftest import ( change_dir_to, needs_inspec, needs_rubocop, skip_unsupported_matrix, ) @pytest.fixture def scenario_to_test(request): return request.param @pytest.fixture def scena...
true
true
1c319bffd032ab13cd239f57cf3f5a0f434956ba
784
py
Python
utils/get_api.py
guillermo-carrasco/tweestream
5171b8fae27a13395eb38ed90031cf6caf6d444e
[ "MIT" ]
null
null
null
utils/get_api.py
guillermo-carrasco/tweestream
5171b8fae27a13395eb38ed90031cf6caf6d444e
[ "MIT" ]
6
2018-03-29T14:14:53.000Z
2020-10-23T09:57:12.000Z
utils/get_api.py
guillermo-carrasco/twistream
5171b8fae27a13395eb38ed90031cf6caf6d444e
[ "MIT" ]
null
null
null
""" Simple method to quickly get an API object, already authenticated, to work with interactively. It expects a config.yaml file in the same directory where it is ran. This yaml file should contain twitter application credentials in the same format expected by twistream. In fact, you can very well use the same configur...
35.636364
119
0.714286
import yaml from tweepy import API from twistream.twitter import client def get_api() -> API: with open("config.yaml", "r") as f: config = yaml.load(f, Loader=yaml.FlowMappingEndToken) return client.get_api( config.get("twitter").get("consumer_key"), config.get("twitter").get("consum...
true
true
1c319d63f6f6de62c8bef71b24da7d04b6142551
142
py
Python
examples/select_chat_by_number.py
YohananDiamond/whatsappy
2474839baf32295fea568c4dd30c59edace11e58
[ "MIT" ]
null
null
null
examples/select_chat_by_number.py
YohananDiamond/whatsappy
2474839baf32295fea568c4dd30c59edace11e58
[ "MIT" ]
null
null
null
examples/select_chat_by_number.py
YohananDiamond/whatsappy
2474839baf32295fea568c4dd30c59edace11e58
[ "MIT" ]
null
null
null
from whatsappy import whatsapp whatsapp.login() whatsapp.select_chat_by_number(14078888888) # <-- whatsapp.send("Hello") whatsapp.close()
15.777778
50
0.774648
from whatsappy import whatsapp whatsapp.login() whatsapp.select_chat_by_number(14078888888) whatsapp.send("Hello") whatsapp.close()
true
true
1c319dff802e65ab8ad36d6d7405dd863634b7df
2,999
py
Python
Chapter09/chh9-1.nltk.py
tschoi6712/pythonDataAnalysis2nd
63e366d4dee52f7e4df6cf4d988a85d6de5b00e4
[ "MIT" ]
null
null
null
Chapter09/chh9-1.nltk.py
tschoi6712/pythonDataAnalysis2nd
63e366d4dee52f7e4df6cf4d988a85d6de5b00e4
[ "MIT" ]
null
null
null
Chapter09/chh9-1.nltk.py
tschoi6712/pythonDataAnalysis2nd
63e366d4dee52f7e4df6cf4d988a85d6de5b00e4
[ "MIT" ]
null
null
null
""" 문자 데이터와 소셜미디어 분석하기(1) """ # pip install nltk scikit-learn # >python # >>>import nltk # >>>nltk.download() ## 1. Filtering out stopwords, names, and numbers(불용어, 고유명사, 숫자 걸러내기) import nltk # 영어 말뭉치를 불러오기 sw = set(nltk.corpus.stopwords.words('english')) print("Stop words:", list(sw)[:7]) # 구텐베르크 말뭉치 불러오기 gb = nlt...
22.89313
93
0.692564
t("Stop words:", list(sw)[:7]) gb = nltk.corpus.gutenberg print("Gutenberg files:\n", gb.fileids()[-5:]) text_sent = gb.sents("milton-paradise.txt")[:2] print("Unfiltered:", text_sent) for sent in text_sent: filtered = [w for w in sent if w.lower() not in sw] print("Filtered:\n", filtered) tagge...
true
true
1c319e88e8a6163f1d250717cf2460bdb0893a46
37,716
py
Python
tests/test_generators/output/kitchen_sink.py
joseporiolayats/linkml
1d0a736079847764c6a78349dcc8838839009b74
[ "CC0-1.0" ]
null
null
null
tests/test_generators/output/kitchen_sink.py
joseporiolayats/linkml
1d0a736079847764c6a78349dcc8838839009b74
[ "CC0-1.0" ]
null
null
null
tests/test_generators/output/kitchen_sink.py
joseporiolayats/linkml
1d0a736079847764c6a78349dcc8838839009b74
[ "CC0-1.0" ]
null
null
null
# Auto generated from kitchen_sink.yaml by pythongen.py version: 0.9.0 # Generation date: 2021-11-13T01:57:24 # Schema: kitchen_sink # # id: https://w3id.org/linkml/tests/kitchen_sink # description: Kitchen Sink Schema This schema does not do anything useful. It exists to test all features of # linkml. Thi...
41.813747
178
0.697821
import dataclasses import sys import re from jsonasobj2 import JsonObj, as_dict from typing import Optional, List, Union, Dict, ClassVar, Any from dataclasses import dataclass from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue, PvFormulaOptions from linkml_runtime.utils.slot import...
true
true
1c319f1a9bda9948051b92df81c9a19df60a9bfe
83,806
py
Python
test/distributed/test_c10d_gloo.py
photoszzt/pytorch
179249084b66b8fbacbd95d39b7cbce0cd9eb972
[ "Intel" ]
1
2021-07-18T18:58:07.000Z
2021-07-18T18:58:07.000Z
test/distributed/test_c10d_gloo.py
JINAY08/pytorch
f2857883c4c148ced4f920431b38532fe8081b73
[ "Intel" ]
null
null
null
test/distributed/test_c10d_gloo.py
JINAY08/pytorch
f2857883c4c148ced4f920431b38532fe8081b73
[ "Intel" ]
null
null
null
import copy import logging import math import operator import os import random import sys import tempfile import unittest from functools import reduce from itertools import groupby import torch import torch.distributed as c10d if not c10d.is_available(): print("c10d not available, skipping tests", file=sys.stderr...
38.513787
128
0.608238
import copy import logging import math import operator import os import random import sys import tempfile import unittest from functools import reduce from itertools import groupby import torch import torch.distributed as c10d if not c10d.is_available(): print("c10d not available, skipping tests", file=sys.stderr...
true
true
1c319f4f2f2fb60ea565490e1d1a2d9404c76ea7
8,074
py
Python
lib/sqlalchemy/dialects/mysql/oursql.py
edelooff/sqlalchemy
97d2a2091ed4caee1e19168d0db39e4d94a6d12f
[ "MIT" ]
2
2020-02-19T17:50:50.000Z
2021-02-10T02:52:41.000Z
lib/sqlalchemy/dialects/mysql/oursql.py
KonstantinKlepikov/sqlalchemy-1
2c34d2503a17316cae3282192405b9b9d60df6fe
[ "MIT" ]
null
null
null
lib/sqlalchemy/dialects/mysql/oursql.py
KonstantinKlepikov/sqlalchemy-1
2c34d2503a17316cae3282192405b9b9d60df6fe
[ "MIT" ]
1
2021-06-13T01:55:35.000Z
2021-06-13T01:55:35.000Z
# mysql/oursql.py # Copyright (C) 2005-2019 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mysql+oursql :name: OurSQL :dbapi: oursql :connectstri...
30.69962
78
0.624845
from .base import BIT from .base import MySQLDialect from .base import MySQLExecutionContext from ... import types as sqltypes from ... import util class _oursqlBIT(BIT): def result_processor(self, dialect, coltype): return None class MySQLExecutionContext_oursql(MySQLExecutionContext): @p...
true
true
1c319f8d1ab140c228b3c1a5c4b193ef76c61214
409
py
Python
feder/main/views.py
efefre/feder
fdfe2f213266548fc40cea68ac72f739c8394b8e
[ "MIT" ]
null
null
null
feder/main/views.py
efefre/feder
fdfe2f213266548fc40cea68ac72f739c8394b8e
[ "MIT" ]
null
null
null
feder/main/views.py
efefre/feder
fdfe2f213266548fc40cea68ac72f739c8394b8e
[ "MIT" ]
null
null
null
from django.views.generic import TemplateView from feder.monitorings.models import Monitoring class HomeView(TemplateView): template_name = "main/home.html" def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context["monitoring_list"] = ( Monitorin...
27.266667
76
0.679707
from django.views.generic import TemplateView from feder.monitorings.models import Monitoring class HomeView(TemplateView): template_name = "main/home.html" def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context["monitoring_list"] = ( Monitorin...
true
true
1c319fcd462d92bc0a42f8dafa4cea5196fd6d6e
401
py
Python
blackjack/game/hand.py
fdpeiter/Blackjack21
8a43edd24900000afd771d3dab601437c4a06893
[ "MIT" ]
null
null
null
blackjack/game/hand.py
fdpeiter/Blackjack21
8a43edd24900000afd771d3dab601437c4a06893
[ "MIT" ]
null
null
null
blackjack/game/hand.py
fdpeiter/Blackjack21
8a43edd24900000afd771d3dab601437c4a06893
[ "MIT" ]
1
2021-12-03T17:28:44.000Z
2021-12-03T17:28:44.000Z
values = { "Two": 2, "Three": 3, "Four": 4, "Five": 5, "Six": 6, "Seven": 7, "Eight": 8, "Nine": 9, "Ten": 10, "Jack": 10, "Queen": 10, "King": 10, "Ace": 11, } class Hand: def __init__(self): self.cards = [] self.value = 0 def add_card(self...
15.423077
39
0.448878
values = { "Two": 2, "Three": 3, "Four": 4, "Five": 5, "Six": 6, "Seven": 7, "Eight": 8, "Nine": 9, "Ten": 10, "Jack": 10, "Queen": 10, "King": 10, "Ace": 11, } class Hand: def __init__(self): self.cards = [] self.value = 0 def add_card(self...
true
true
1c31a0a69f4670d7ddfa73dd10fc53c4461d6164
365
py
Python
CursoEmVideo/ex114.py
EduardoArgenti/Python
18b4578033d6eb6fb0ae2d6a8511a4a813856203
[ "MIT" ]
null
null
null
CursoEmVideo/ex114.py
EduardoArgenti/Python
18b4578033d6eb6fb0ae2d6a8511a4a813856203
[ "MIT" ]
null
null
null
CursoEmVideo/ex114.py
EduardoArgenti/Python
18b4578033d6eb6fb0ae2d6a8511a4a813856203
[ "MIT" ]
null
null
null
# Crie um código em Python que teste se o site pudim está # acessível pelo computador usado. import urllib import urllib.request try: site = urllib.request.urlopen('http://www.pudim.com.br') except urllib.error.URLError: print('\033[1:31mErro: site inacessível.\033[0m') else: print('\033[1:32mSucesso: sit...
28.076923
60
0.720548
import urllib import urllib.request try: site = urllib.request.urlopen('http://www.pudim.com.br') except urllib.error.URLError: print('\033[1:31mErro: site inacessível.\033[0m') else: print('\033[1:32mSucesso: site disponível.\033[0m') print(site.read())
true
true
1c31a15b5a6c2342045cc4fe641cdbe7458a338c
4,261
py
Python
scrapy/linkextractors/lxmlhtml.py
michaelgilmore/scrapy
5a2a6bf6fc8861f00c0875659db11ba4d72406cd
[ "BSD-3-Clause" ]
2
2015-05-27T02:06:18.000Z
2015-05-27T02:06:37.000Z
scrapy/linkextractors/lxmlhtml.py
michaelgilmore/scrapy
5a2a6bf6fc8861f00c0875659db11ba4d72406cd
[ "BSD-3-Clause" ]
null
null
null
scrapy/linkextractors/lxmlhtml.py
michaelgilmore/scrapy
5a2a6bf6fc8861f00c0875659db11ba4d72406cd
[ "BSD-3-Clause" ]
1
2020-11-01T20:40:01.000Z
2020-11-01T20:40:01.000Z
""" Link extractor based on lxml.html """ import re from six.moves.urllib.parse import urlparse, urljoin import lxml.etree as etree from scrapy.selector import Selector from scrapy.link import Link from scrapy.utils.misc import arg_to_iter from scrapy.utils.python import unique as unique_list, str_to_unicode from sc...
38.044643
96
0.64445
import re from six.moves.urllib.parse import urlparse, urljoin import lxml.etree as etree from scrapy.selector import Selector from scrapy.link import Link from scrapy.utils.misc import arg_to_iter from scrapy.utils.python import unique as unique_list, str_to_unicode from scrapy.linkextractors import FilteringLinkEx...
true
true
1c31a18a0617523c1bb28a5dc58ba367b22931b1
596
py
Python
idea/migrations/0003_auto_20170118_0445.py
andreyrobota/AndreyKosinskiy
6258c4e90de791f721093545ec3cd9a9569155f2
[ "MIT" ]
null
null
null
idea/migrations/0003_auto_20170118_0445.py
andreyrobota/AndreyKosinskiy
6258c4e90de791f721093545ec3cd9a9569155f2
[ "MIT" ]
null
null
null
idea/migrations/0003_auto_20170118_0445.py
andreyrobota/AndreyKosinskiy
6258c4e90de791f721093545ec3cd9a9569155f2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-01-18 01:45 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('idea', '0002_auto_20170118_0359'), ] operations = [ migrations.AlterField( ...
22.923077
51
0.587248
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('idea', '0002_auto_20170118_0359'), ] operations = [ migrations.AlterField( model_name='ideauser', name='idea_name', ...
true
true
1c31a1bc387ebb0a412af0f080aed7fb1457d5f7
2,739
py
Python
stellarobservatory/stellarbeat.py
andrenarchy/stellar-observatory
0e1f6af4cdacae19248353f902686d8192130436
[ "MIT" ]
14
2019-05-29T09:45:00.000Z
2021-04-22T20:11:15.000Z
stellarobservatory/stellarbeat.py
andrenarchy/stellar-observatory
0e1f6af4cdacae19248353f902686d8192130436
[ "MIT" ]
10
2019-05-29T09:47:01.000Z
2020-09-15T20:34:55.000Z
stellarobservatory/stellarbeat.py
andrenarchy/stellar-observatory
0e1f6af4cdacae19248353f902686d8192130436
[ "MIT" ]
5
2019-05-29T07:33:02.000Z
2021-11-24T18:46:03.000Z
"""Fetch and process nodes""" from typing import Any, Dict, List, Optional, Set, TypedDict, cast import requests from .utils.graph import Nodes from .quorum_slice_definition import get_normalized_definition, Definition, Definitions def get_nodes_from_stellarbeat(): """Fetch nodes from stellarbeat.io""" return...
41.5
100
0.703907
from typing import Any, Dict, List, Optional, Set, TypedDict, cast import requests from .utils.graph import Nodes from .quorum_slice_definition import get_normalized_definition, Definition, Definitions def get_nodes_from_stellarbeat(): return requests.get('https://api.stellarbeat.io/v1/nodes').json() QuorumSet =...
true
true
1c31a2534a93662db3935f20a70cbcbb719c581c
9,037
py
Python
art_collections/hooks.py
mohsinalimat/art_collections
95d2f3627e59c8229cee6c14f01f4c513fc86304
[ "MIT" ]
null
null
null
art_collections/hooks.py
mohsinalimat/art_collections
95d2f3627e59c8229cee6c14f01f4c513fc86304
[ "MIT" ]
null
null
null
art_collections/hooks.py
mohsinalimat/art_collections
95d2f3627e59c8229cee6c14f01f4c513fc86304
[ "MIT" ]
1
2022-02-02T19:52:54.000Z
2022-02-02T19:52:54.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from . import __version__ as app_version from frappe import _ app_name = "art_collections" app_title = "Art Collections" app_publisher = "GreyCube Technologies" app_description = "Customization for art collections" app_icon = "octicon octicon-gift" app_co...
34.492366
133
0.682749
from __future__ import unicode_literals from . import __version__ as app_version from frappe import _ app_name = "art_collections" app_title = "Art Collections" app_publisher = "GreyCube Technologies" app_description = "Customization for art collections" app_icon = "octicon octicon-gift" app_color = "violet" app_emai...
true
true
1c31a2d5a144fba929befb65d383bd0f0157eab5
7,619
py
Python
test/helpers.py
fdeoliveirag/luigi
e20e4306786fa5b5f3c99878c2c56a77f987e0b5
[ "Apache-2.0" ]
14,755
2015-01-01T09:33:34.000Z
2022-03-31T15:38:39.000Z
test/helpers.py
yassineaboukir/luigi
cd998eace682370e89524dd9368c3c537692eb7b
[ "Apache-2.0" ]
2,387
2015-01-01T09:16:13.000Z
2022-03-12T13:55:43.000Z
test/helpers.py
yassineaboukir/luigi
cd998eace682370e89524dd9368c3c537692eb7b
[ "Apache-2.0" ]
2,630
2015-01-02T06:11:32.000Z
2022-03-27T22:11:20.000Z
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
32.012605
88
0.628823
import functools import itertools import tempfile import re from contextlib import contextmanager import luigi import luigi.task_register import luigi.cmdline_parser from luigi.cmdline_parser import CmdlineParser import os import unittest def skipOnTravisAndGithubActions(reason): if _override_s...
true
true
1c31a31b67708149f7b5b2556e57b895b3c63e9d
13,023
py
Python
select2/fields.py
aprovin/django-select2-forms
929a0a7acf6f9222cbe0f8c9287bf7544d169868
[ "BSD-2-Clause" ]
null
null
null
select2/fields.py
aprovin/django-select2-forms
929a0a7acf6f9222cbe0f8c9287bf7544d169868
[ "BSD-2-Clause" ]
null
null
null
select2/fields.py
aprovin/django-select2-forms
929a0a7acf6f9222cbe0f8c9287bf7544d169868
[ "BSD-2-Clause" ]
1
2015-05-18T09:35:45.000Z
2015-05-18T09:35:45.000Z
import django from django import forms from django.db import models from django.core.exceptions import ImproperlyConfigured, ValidationError, FieldDoesNotExist from django.forms.models import ModelChoiceIterator from django.utils.encoding import force_str from django.utils.functional import Promise try: from django...
38.078947
97
0.63457
import django from django import forms from django.db import models from django.core.exceptions import ImproperlyConfigured, ValidationError, FieldDoesNotExist from django.forms.models import ModelChoiceIterator from django.utils.encoding import force_str from django.utils.functional import Promise try: from django...
true
true
1c31a329dd2b475f0506b43cbf573628ba087ccf
5,633
py
Python
BlueprintsApp/main/gui/forms/language_selection_form.py
PiCodingClub/BlueprintsEdu
f65ad2c3bf6f01acb26660505f6ceded0bee888f
[ "Apache-2.0" ]
null
null
null
BlueprintsApp/main/gui/forms/language_selection_form.py
PiCodingClub/BlueprintsEdu
f65ad2c3bf6f01acb26660505f6ceded0bee888f
[ "Apache-2.0" ]
null
null
null
BlueprintsApp/main/gui/forms/language_selection_form.py
PiCodingClub/BlueprintsEdu
f65ad2c3bf6f01acb26660505f6ceded0bee888f
[ "Apache-2.0" ]
null
null
null
from gui.forms.form import Form import pygame as pg from utils.gui_utils import Themes from utils.string_utils import StringUtils from utils.app_utils import Images from utils.app_utils import DisplaySettings from pygame.locals import * from utils import logger_utils class LanguageSelectionForm(Form): def __init...
49.849558
118
0.573407
from gui.forms.form import Form import pygame as pg from utils.gui_utils import Themes from utils.string_utils import StringUtils from utils.app_utils import Images from utils.app_utils import DisplaySettings from pygame.locals import * from utils import logger_utils class LanguageSelectionForm(Form): def __init...
true
true
1c31a37db490934407f98f1095e746172a04365d
26
py
Python
newfeature.py
rdswanson/rbtesteasybug
44f0ed52ec7e86d496741c49053b133a01666016
[ "MIT" ]
null
null
null
newfeature.py
rdswanson/rbtesteasybug
44f0ed52ec7e86d496741c49053b133a01666016
[ "MIT" ]
null
null
null
newfeature.py
rdswanson/rbtesteasybug
44f0ed52ec7e86d496741c49053b133a01666016
[ "MIT" ]
null
null
null
print "Some new feature!"
13
25
0.730769
print "Some new feature!"
false
true
1c31a49ea3f7362c00543ee23e7e4555e491096b
5,448
py
Python
mmdet/core/post_processing/bbox_nms.py
wobushishuiguo/Rotation-ship-detection
e49f2c7fd71d6f05b3d0fa6dd67ad751b306592e
[ "Apache-2.0" ]
1
2021-11-17T16:07:14.000Z
2021-11-17T16:07:14.000Z
mmdet/core/post_processing/bbox_nms.py
wobushishuiguo/Rotation-ship-detection
e49f2c7fd71d6f05b3d0fa6dd67ad751b306592e
[ "Apache-2.0" ]
null
null
null
mmdet/core/post_processing/bbox_nms.py
wobushishuiguo/Rotation-ship-detection
e49f2c7fd71d6f05b3d0fa6dd67ad751b306592e
[ "Apache-2.0" ]
null
null
null
import torch from mmcv.ops.nms import batched_nms from mmdet.core.bbox.iou_calculators import bbox_overlaps def multiclass_nms(multi_bboxes, multi_scores, score_thr, nms_cfg, max_num=-1, score_factors=None): """NMS for...
36.563758
93
0.623715
import torch from mmcv.ops.nms import batched_nms from mmdet.core.bbox.iou_calculators import bbox_overlaps def multiclass_nms(multi_bboxes, multi_scores, score_thr, nms_cfg, max_num=-1, score_factors=None): num_classe...
true
true
1c31a51b2a4c958d1cf381597a29713110b80cf1
1,222
py
Python
lya_data_structures.py
yishayv/lyacorr
deed114b4cadd4971caec68e2838a5fac39827b1
[ "MIT" ]
2
2017-03-21T14:18:35.000Z
2020-03-30T20:51:33.000Z
lya_data_structures.py
yishayv/lyacorr
deed114b4cadd4971caec68e2838a5fac39827b1
[ "MIT" ]
null
null
null
lya_data_structures.py
yishayv/lyacorr
deed114b4cadd4971caec68e2838a5fac39827b1
[ "MIT" ]
null
null
null
class LyaForestTransmittance: def __init__(self, ar_z, ar_transmittance, ar_pipeline_ivar, ar_fit): """ a simple wrapper for holding lya-forest data. :type ar_z: np.array :type ar_transmittance: np.array :type ar_pipeline_ivar: np.array """ self.ar_z = ar_z ...
31.333333
73
0.640753
class LyaForestTransmittance: def __init__(self, ar_z, ar_transmittance, ar_pipeline_ivar, ar_fit): self.ar_z = ar_z self.ar_transmittance = ar_transmittance self.ar_ivar = ar_pipeline_ivar self.ar_fit = ar_fit class LyaForestTransmittanceBinned: def __init__(self, ar_mask, ar_...
true
true
1c31a7a52f12b45d81c7942f0e107db7e9523bc7
2,521
py
Python
MLImageSegmentation/makeImageDataSet.py
StevenHuang2020/OpencvPython
42cde4880a50f7b3917027e6359485d3569bf40f
[ "MIT" ]
null
null
null
MLImageSegmentation/makeImageDataSet.py
StevenHuang2020/OpencvPython
42cde4880a50f7b3917027e6359485d3569bf40f
[ "MIT" ]
null
null
null
MLImageSegmentation/makeImageDataSet.py
StevenHuang2020/OpencvPython
42cde4880a50f7b3917027e6359485d3569bf40f
[ "MIT" ]
null
null
null
import sys sys.path.append('..') import pandas as pd from ImageBase import cannyImg, grayImg, loadGrayImg from skimage.filters import roberts, sobel, scharr, prewitt, gaussian, laplace, farid, median from FeatureExtract.imageFeatures import garborFeature from mainImagePlot import plotImagList def makeImageFeatures(i...
27.402174
93
0.645775
import sys sys.path.append('..') import pandas as pd from ImageBase import cannyImg, grayImg, loadGrayImg from skimage.filters import roberts, sobel, scharr, prewitt, gaussian, laplace, farid, median from FeatureExtract.imageFeatures import garborFeature from mainImagePlot import plotImagList def makeImageFeatures(i...
true
true
1c31a7c66db65397cfc105dab85a9c9a189b3059
25,804
py
Python
bsz_gimp_lib.py
Beinsezii/bsz-gimp-plugins
bb735ddbf47fa4f2d383f4e359518c0809ab6e09
[ "MIT" ]
6
2020-12-03T14:50:32.000Z
2022-02-04T03:15:44.000Z
bsz_gimp_lib.py
Beinsezii/bsz-gimp-plugins
bb735ddbf47fa4f2d383f4e359518c0809ab6e09
[ "MIT" ]
null
null
null
bsz_gimp_lib.py
Beinsezii/bsz-gimp-plugins
bb735ddbf47fa4f2d383f4e359518c0809ab6e09
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Shared code between plugins. Use python's help() for prettier help info. """ import gi gi.require_version('Gimp', '3.0') from gi.repository import Gimp gi.require_version('Gegl', '0.4') from gi.repository import Gegl from gi.repository import GObject from gi.repositor...
35.29959
92
0.55317
import gi gi.require_version('Gimp', '3.0') from gi.repository import Gimp gi.require_version('Gegl', '0.4') from gi.repository import Gegl from gi.repository import GObject from gi.repository import GLib from abc import ABC, abstractmethod # in INTERACTIVE mode while keeping ui stuff in the params. gi.require_v...
true
true
1c31a8ee41001fa728421118d1c20cd1bd3aaec5
980
py
Python
classify.py
nmchgx/rrd-loan-forecast
d70d4332a0400672e9976393c9872772147b464c
[ "Apache-2.0" ]
null
null
null
classify.py
nmchgx/rrd-loan-forecast
d70d4332a0400672e9976393c9872772147b464c
[ "Apache-2.0" ]
null
null
null
classify.py
nmchgx/rrd-loan-forecast
d70d4332a0400672e9976393c9872772147b464c
[ "Apache-2.0" ]
null
null
null
#! python2 # coding: utf-8 import sys import numpy as np import svm import rf def classify(data, labels): method = sys.argv[1].upper() method_name = {'SVM': 'SVM', 'RF': 'Random Forest'} test_size_arr = [0.6, 0.5, 0.4] print '方法:%s' % method_name[method] for test_size in test_size_arr: if...
25.789474
70
0.562245
import sys import numpy as np import svm import rf def classify(data, labels): method = sys.argv[1].upper() method_name = {'SVM': 'SVM', 'RF': 'Random Forest'} test_size_arr = [0.6, 0.5, 0.4] print '方法:%s' % method_name[method] for test_size in test_size_arr: if (method == 'SVM'): ...
false
true
1c31a9b4789e5bca40f40ecac816609a2e3661a5
6,527
py
Python
backend/api/utils/profile_parse.py
hack4impact-uiuc/mentee
c56945db8051e798c7bf6703577a0e50a54b0d67
[ "MIT" ]
7
2020-10-03T22:45:38.000Z
2021-10-02T09:54:40.000Z
backend/api/utils/profile_parse.py
hack4impact-uiuc/mentee
c56945db8051e798c7bf6703577a0e50a54b0d67
[ "MIT" ]
265
2020-10-01T20:06:27.000Z
2022-02-27T12:18:55.000Z
backend/api/utils/profile_parse.py
hack4impact-uiuc/mentee
c56945db8051e798c7bf6703577a0e50a54b0d67
[ "MIT" ]
1
2020-10-06T19:57:37.000Z
2020-10-06T19:57:37.000Z
from bson import ObjectId from api.core import logger from api.models import db, Education, Video, MentorProfile, MenteeProfile, Image from api.utils.request_utils import imgur_client from api.utils.constants import Account def new_profile(data: dict = {}, profile_type: int = -1): """Parses data given by POST req...
36.668539
86
0.597978
from bson import ObjectId from api.core import logger from api.models import db, Education, Video, MentorProfile, MenteeProfile, Image from api.utils.request_utils import imgur_client from api.utils.constants import Account def new_profile(data: dict = {}, profile_type: int = -1): if not data or profile_type == -...
true
true
1c31ab96d1d8e4573b9657d3792bd880da3d50ec
9,249
py
Python
adversarial_text/data/data_utils.py
zhangyingying94/models
bf46247b4207698bbeb315d9086eb81662015359
[ "Apache-2.0" ]
5
2019-03-25T12:36:37.000Z
2022-02-06T16:36:17.000Z
adversarial_text/data/data_utils.py
zhangyingying94/models
bf46247b4207698bbeb315d9086eb81662015359
[ "Apache-2.0" ]
null
null
null
adversarial_text/data/data_utils.py
zhangyingying94/models
bf46247b4207698bbeb315d9086eb81662015359
[ "Apache-2.0" ]
3
2018-01-05T18:31:24.000Z
2022-02-06T16:36:20.000Z
# Copyright 2017 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 ...
28.284404
80
0.711969
import operator import os import random import re import tensorflow as tf EOS_TOKEN = '</s>' ALL_SA = 'all_sa.tfrecords' TRAIN_SA = 'train_sa.tfrecords' TEST_SA = 'test_sa.tfrecords' ALL_LM = 'all_lm.tfrecords' TRAIN_LM = 'train_lm.tfrecords' TEST_LM = 'test_lm.tfrecords' TRAIN_CLASS = 'train_clas...
true
true
1c31acb81b1d58970e393327abc0600198759062
184
py
Python
graviteeio_cli/extensions/jinja_filters.py
Shaker5191/graviteeio-cli
318748bb8e631743ea58afaee24333249ca3d227
[ "Apache-2.0" ]
12
2019-05-29T20:06:01.000Z
2020-10-07T07:40:27.000Z
graviteeio_cli/extensions/jinja_filters.py
Shaker5191/graviteeio-cli
318748bb8e631743ea58afaee24333249ca3d227
[ "Apache-2.0" ]
41
2019-11-04T18:18:18.000Z
2021-04-22T16:12:51.000Z
graviteeio_cli/extensions/jinja_filters.py
gravitee-io/gravitee-cli
8e3bf9f2c0c2873e0f6e67f8fcaf0d3b6c44b3ca
[ "Apache-2.0" ]
6
2019-06-18T04:27:49.000Z
2021-06-02T17:52:24.000Z
import yaml def to_yaml(a, *args, **kw): return yaml.safe_dump(a, default_flow_style=True).rstrip() def filter_loader(environment): environment.filters['toyaml'] = to_yaml
18.4
62
0.722826
import yaml def to_yaml(a, *args, **kw): return yaml.safe_dump(a, default_flow_style=True).rstrip() def filter_loader(environment): environment.filters['toyaml'] = to_yaml
true
true
1c31acd628192da6c64c8e9b339c87b49429fe77
2,621
py
Python
src/genetics.py
NDHall/pyvovlExtension
521c7cbd340c6f90e4b6d9d1a1da1282020c9225
[ "BSD-2-Clause-FreeBSD" ]
67
2015-05-17T21:22:08.000Z
2022-03-16T09:59:05.000Z
src/genetics.py
NDHall/pyvovlExtension
521c7cbd340c6f90e4b6d9d1a1da1282020c9225
[ "BSD-2-Clause-FreeBSD" ]
24
2016-01-12T18:02:25.000Z
2021-12-16T14:09:25.000Z
src/genetics.py
NDHall/pyvovlExtension
521c7cbd340c6f90e4b6d9d1a1da1282020c9225
[ "BSD-2-Clause-FreeBSD" ]
26
2015-01-30T20:50:17.000Z
2022-01-11T14:11:33.000Z
#! /usr/bin/env python ############################################################################## ## pyvolve: Python platform for simulating evolutionary sequences. ## ## Written by Stephanie J. Spielman (stephanie.spielman@gmail.com) #############################################################################...
68.973684
699
0.395651
true
true
1c31aef0f44271f91bc6d3c39f12903ee36bcf7e
3,041
py
Python
ikabot/function/searchForIslandSpaces.py
adaamz/ikabot
d243e612ba083a39f6efce15012d173aad693dc6
[ "MIT" ]
null
null
null
ikabot/function/searchForIslandSpaces.py
adaamz/ikabot
d243e612ba083a39f6efce15012d173aad693dc6
[ "MIT" ]
null
null
null
ikabot/function/searchForIslandSpaces.py
adaamz/ikabot
d243e612ba083a39f6efce15012d173aad693dc6
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf-8 -*- import time import gettext import traceback import sys from ikabot.config import * from ikabot.helpers.botComm import * from ikabot.helpers.gui import enter, enter from ikabot.helpers.varios import wait from ikabot.helpers.signals import setInfoSignal from ikabot.helpers...
31.030612
201
0.692207
import time import gettext import traceback import sys from ikabot.config import * from ikabot.helpers.botComm import * from ikabot.helpers.gui import enter, enter from ikabot.helpers.varios import wait from ikabot.helpers.signals import setInfoSignal from ikabot.helpers.pedirInfo import getIslandsIds from ikabot.he...
true
true
1c31af208eee8a287bd5a28a478bc5bf5a3d37ba
1,010
py
Python
plugins/jokey_plugin.py
personGithubAccount/WitheredBot
2b25a1da7796e94ff8e54f58adbf2e07e46e8bd4
[ "MIT" ]
2
2021-11-10T21:39:34.000Z
2021-11-11T13:43:40.000Z
plugins/jokey_plugin.py
personGithubAccount/WitheredBot
2b25a1da7796e94ff8e54f58adbf2e07e46e8bd4
[ "MIT" ]
null
null
null
plugins/jokey_plugin.py
personGithubAccount/WitheredBot
2b25a1da7796e94ff8e54f58adbf2e07e46e8bd4
[ "MIT" ]
null
null
null
from libs.embed import (Embed) from discord.ext import (commands) from requests import get class Joke(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() async def joke(self, ctx): params: dict[str] = {} params.update({'blacklistFlags': 'nsfw'}) para...
27.297297
128
0.541584
from libs.embed import (Embed) from discord.ext import (commands) from requests import get class Joke(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() async def joke(self, ctx): params: dict[str] = {} params.update({'blacklistFlags': 'nsfw'}) para...
true
true
1c31af3a0709854f81377b508f9890e2b1bdd318
526
py
Python
HackerRank/Interview Preparation Kit/Time Complexity Primality.py
will-data/Self-Study-WIL
69d627c65130fcfa23f27f97948a20107bb33394
[ "MIT" ]
1
2020-04-11T09:51:54.000Z
2020-04-11T09:51:54.000Z
HackerRank/Interview Preparation Kit/Time Complexity Primality.py
will-data/Self-Study-WIL
69d627c65130fcfa23f27f97948a20107bb33394
[ "MIT" ]
null
null
null
HackerRank/Interview Preparation Kit/Time Complexity Primality.py
will-data/Self-Study-WIL
69d627c65130fcfa23f27f97948a20107bb33394
[ "MIT" ]
null
null
null
#!/bin/python3 import math import os import random import re import sys import math # Complete the primality function below. def primality(n): if n == 1: return('Not prime') for i in range(2, math.floor(n**(1/2))+1): if n % i == 0: return ('Not prime') return('Prime') if __name__ == '__main__': ...
17.533333
47
0.585551
import math import os import random import re import sys import math def primality(n): if n == 1: return('Not prime') for i in range(2, math.floor(n**(1/2))+1): if n % i == 0: return ('Not prime') return('Prime') if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') p ...
true
true
1c31b0c679e5815c7a8a471eea9e2ac5d661ea89
5,219
py
Python
backend/api/v1/groups/serializers.py
donicrazy/ChatApp
ab129a9c0706bbb972cbce43283ba6e06d144635
[ "MIT" ]
null
null
null
backend/api/v1/groups/serializers.py
donicrazy/ChatApp
ab129a9c0706bbb972cbce43283ba6e06d144635
[ "MIT" ]
7
2021-03-19T04:47:13.000Z
2022-01-13T02:02:46.000Z
backend/api/v1/groups/serializers.py
donicrazy/ChatApp
ab129a9c0706bbb972cbce43283ba6e06d144635
[ "MIT" ]
null
null
null
from rest_framework import serializers from django.contrib.auth import get_user_model from backend.api.v1.profiles.serializers import ProfileSerializer from backend.groups.models import (ChatGroup, GroupMembership, GroupMessage, GroupMessageInfo) User = get_user_model() class Mem...
28.210811
76
0.567733
from rest_framework import serializers from django.contrib.auth import get_user_model from backend.api.v1.profiles.serializers import ProfileSerializer from backend.groups.models import (ChatGroup, GroupMembership, GroupMessage, GroupMessageInfo) User = get_user_model() class Mem...
true
true
1c31b1b16df1630363132b378573133e697d96b7
2,452
py
Python
macdaily/cmd/logging.py
JarryShaw/MacDaily
853b841dd1f1f7e6aae7bf2c305ff008bc76055c
[ "BSD-3-Clause" ]
10
2018-09-20T19:57:56.000Z
2021-11-14T18:28:10.000Z
macdaily/cmd/logging.py
JarryShaw/jsdaily
3ca7aa7c75a12dc08ab44f78af2b089e1ed41d3d
[ "BSD-3-Clause" ]
2
2020-05-31T08:49:47.000Z
2021-12-28T16:57:42.000Z
macdaily/cmd/logging.py
JarryShaw/jsdaily
3ca7aa7c75a12dc08ab44f78af2b089e1ed41d3d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import abc import os from macdaily.cls.command import Command from macdaily.util.compat import pathlib from macdaily.util.tools.print import print_info class LoggingCommand(Command): @property @abc.abstractmethod def log(self): return NotImplemented @property @a...
25.810526
135
0.625204
import abc import os from macdaily.cls.command import Command from macdaily.util.compat import pathlib from macdaily.util.tools.print import print_info class LoggingCommand(Command): @property @abc.abstractmethod def log(self): return NotImplemented @property @abc.abstractmethod d...
true
true
1c31b332cd2f592824567873d1679df2de07496c
3,592
py
Python
CD_Installer.py
GascaK/CosmoDispatch
2ffcf67116719d768db1215d11026c06e1188f11
[ "MIT" ]
1
2019-07-21T10:30:00.000Z
2019-07-21T10:30:00.000Z
CD_Installer.py
GascaK/CosmoDispatch
2ffcf67116719d768db1215d11026c06e1188f11
[ "MIT" ]
null
null
null
CD_Installer.py
GascaK/CosmoDispatch
2ffcf67116719d768db1215d11026c06e1188f11
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import tkinter as tk from tkinter import ttk class CDUpdate(tk.Tk): def __init__(self, update_file): """ Cosmo Dispatch Update/Installer class. Update the CosmoDispatch application source code with information provided in predefined format from insi...
36.653061
76
0.505846
import os import tkinter as tk from tkinter import ttk class CDUpdate(tk.Tk): def __init__(self, update_file): location = '' tk.Tk.__init__(self) frame = tk.Frame() frame.pack() entry = tk.Text(frame, width=50, height=10) entry.pack() update_notes ...
true
true
1c31b46de7c9e75374ebbdfe1bd81e71b65d2e42
15,073
py
Python
trader/client.py
donaldng/bitfinex-arbitrage
1a36ea6f354fbf2954e4341ec75a90ad208f60d1
[ "MIT" ]
25
2017-10-22T14:56:02.000Z
2022-03-10T00:30:00.000Z
client.py
donaldng/binance_listing
1d1612ecb57225a3b3c0854721dd9bac4b3a140a
[ "MIT" ]
1
2017-09-30T03:25:43.000Z
2017-09-30T07:40:29.000Z
client.py
donaldng/binance_listing
1d1612ecb57225a3b3c0854721dd9bac4b3a140a
[ "MIT" ]
8
2017-10-25T15:02:55.000Z
2021-05-14T09:20:09.000Z
from __future__ import absolute_import import requests import json import base64 import hmac import hashlib import time PROTOCOL = "https" HOST = "api.bitfinex.com" VERSION = "v1" PATH_SYMBOLS = "symbols" PATH_TICKER = "ticker/%s" PATH_TODAY = "today/%s" PATH_STATS = "stats/%s" PATH_LENDBOOK = "lendbo...
29.154739
387
0.529888
from __future__ import absolute_import import requests import json import base64 import hmac import hashlib import time PROTOCOL = "https" HOST = "api.bitfinex.com" VERSION = "v1" PATH_SYMBOLS = "symbols" PATH_TICKER = "ticker/%s" PATH_TODAY = "today/%s" PATH_STATS = "stats/%s" PATH_LENDBOOK = "lendbo...
true
true
1c31b4a81218c83e6510e31d8999caf6d59eb188
411
py
Python
mongodb_dialect/__init__.py
kitfactory/mongodb_dialect
1746d2aca08be4b12adb74e3a6806f8d840f6382
[ "MIT" ]
null
null
null
mongodb_dialect/__init__.py
kitfactory/mongodb_dialect
1746d2aca08be4b12adb74e3a6806f8d840f6382
[ "MIT" ]
null
null
null
mongodb_dialect/__init__.py
kitfactory/mongodb_dialect
1746d2aca08be4b12adb74e3a6806f8d840f6382
[ "MIT" ]
null
null
null
__version__ = '0.1.0' from .connection import connect from .exception import * from . dialect import * paramstyle = 'pyformat' threadsafety = 2 __all__ = [ 'MongoDBDialect', 'connect', 'apilevel', 'threadsafety', 'paramstyle', 'Warning', 'Error', 'InterfaceError', 'DatabaseError', 'DataError', 'Operatio...
27.4
109
0.705596
__version__ = '0.1.0' from .connection import connect from .exception import * from . dialect import * paramstyle = 'pyformat' threadsafety = 2 __all__ = [ 'MongoDBDialect', 'connect', 'apilevel', 'threadsafety', 'paramstyle', 'Warning', 'Error', 'InterfaceError', 'DatabaseError', 'DataError', 'Operatio...
true
true
1c31b657f81ad541c8ada79849a28f80c42ac404
1,367
py
Python
bluebottle/funding/migrations/0005_auto_20190604_1501.py
jayvdb/bluebottle
305fea238e6aa831598a8b227223a1a2f34c4fcc
[ "BSD-3-Clause" ]
null
null
null
bluebottle/funding/migrations/0005_auto_20190604_1501.py
jayvdb/bluebottle
305fea238e6aa831598a8b227223a1a2f34c4fcc
[ "BSD-3-Clause" ]
null
null
null
bluebottle/funding/migrations/0005_auto_20190604_1501.py
jayvdb/bluebottle
305fea238e6aa831598a8b227223a1a2f34c4fcc
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-06-04 13:01 from __future__ import unicode_literals import bluebottle.utils.fields from decimal import Decimal from django.db import migrations import djmoney.models.fields class Migration(migrations.Migration): dependencies = [ ('funding', '...
35.051282
149
0.62692
from __future__ import unicode_literals import bluebottle.utils.fields from decimal import Decimal from django.db import migrations import djmoney.models.fields class Migration(migrations.Migration): dependencies = [ ('funding', '0004_auto_20190604_1501'), ] operations = [ migrations....
true
true
1c31b77eb6b97b7bc5571ee6bb86ac4981a313f9
750
py
Python
tests/test_supersuit.py
happyCoderJDFJJ/pyrfuniverse
8ddb6e0d8f113015ba820a327388a528a8b215c7
[ "Apache-2.0" ]
null
null
null
tests/test_supersuit.py
happyCoderJDFJJ/pyrfuniverse
8ddb6e0d8f113015ba820a327388a528a8b215c7
[ "Apache-2.0" ]
null
null
null
tests/test_supersuit.py
happyCoderJDFJJ/pyrfuniverse
8ddb6e0d8f113015ba820a327388a528a8b215c7
[ "Apache-2.0" ]
null
null
null
from stable_baselines3.ppo import CnnPolicy from stable_baselines3 import PPO, SAC from stable_baselines3.common.monitor import Monitor from pettingzoo.butterfly import pistonball_v4 import supersuit as ss env = pistonball_v4.parallel_env(n_pistons=20, local_ratio=0, time_penalty=-0.1, continuous=True, random_drop=Tr...
39.473684
207
0.801333
from stable_baselines3.ppo import CnnPolicy from stable_baselines3 import PPO, SAC from stable_baselines3.common.monitor import Monitor from pettingzoo.butterfly import pistonball_v4 import supersuit as ss env = pistonball_v4.parallel_env(n_pistons=20, local_ratio=0, time_penalty=-0.1, continuous=True, random_drop=Tr...
true
true
1c31b7f706635b11d0d43ccc58b346296e89beb9
252
py
Python
Python/04. Sets/012. Check Subset.py
AnTeater515/HackerRank-Coding_Solutions
c5c1337ed6d70c6d7a1850b2a99aab10c285c290
[ "MIT" ]
1
2020-10-18T22:06:12.000Z
2020-10-18T22:06:12.000Z
Python/04. Sets/012. Check Subset.py
AnTeater515/HackerRank-Coding-Solutions_Python3_C-_Oracle-SQL
c5c1337ed6d70c6d7a1850b2a99aab10c285c290
[ "MIT" ]
null
null
null
Python/04. Sets/012. Check Subset.py
AnTeater515/HackerRank-Coding-Solutions_Python3_C-_Oracle-SQL
c5c1337ed6d70c6d7a1850b2a99aab10c285c290
[ "MIT" ]
null
null
null
# Problem: https://www.hackerrank.com/challenges/py-check-subset/problem # Score: 10 for i in range(int(input())): _, a = input(), set(map(int, input().split())) _, b = input(), set(map(int, input().split())) print(a.issubset(b))
28
73
0.599206
for i in range(int(input())): _, a = input(), set(map(int, input().split())) _, b = input(), set(map(int, input().split())) print(a.issubset(b))
true
true
1c31b82a678a1cc875ef2f4bf9fb114401204dc4
1,806
py
Python
tools/pnnx/tests/ncnn/test_nn_ChannelShuffle.py
fzyzcjy/ncnn
42e71609508fde1bd54d9d9de6ca5522ee3bcf37
[ "BSD-3-Clause" ]
14,886
2017-07-24T02:58:35.000Z
2022-03-31T18:17:04.000Z
tools/pnnx/tests/ncnn/test_nn_ChannelShuffle.py
fzyzcjy/ncnn
42e71609508fde1bd54d9d9de6ca5522ee3bcf37
[ "BSD-3-Clause" ]
3,361
2017-07-24T05:56:31.000Z
2022-03-31T13:26:35.000Z
tools/pnnx/tests/ncnn/test_nn_ChannelShuffle.py
fzyzcjy/ncnn
42e71609508fde1bd54d9d9de6ca5522ee3bcf37
[ "BSD-3-Clause" ]
3,786
2017-07-24T03:09:15.000Z
2022-03-31T16:56:40.000Z
# Tencent is pleased to support the open source community by making ncnn available. # # Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the...
28.666667
91
0.669989
import torch import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): def __init__(self): super(Model, self).__init__() self.shuffle_0 = nn.ChannelShuffle(2) self.shuffle_1 = nn.ChannelShuffle(16) def forward(self, x, y): x = self.shuffle_0(x...
true
true
1c31b952bea35ca4d28bfa63b911709bd56f3ded
1,550
py
Python
clone_repo/parse_repo_url.py
micktwomey/clone-repo
f3d64f286174df4e64d25d89c21105d9a2cb99cf
[ "MIT" ]
null
null
null
clone_repo/parse_repo_url.py
micktwomey/clone-repo
f3d64f286174df4e64d25d89c21105d9a2cb99cf
[ "MIT" ]
null
null
null
clone_repo/parse_repo_url.py
micktwomey/clone-repo
f3d64f286174df4e64d25d89c21105d9a2cb99cf
[ "MIT" ]
null
null
null
"""Parse git/hd/other repo urls into a neat usable format Tries to handle all the exotic repos, suitable for cloning. """ import dataclasses import pathlib import re import typing @dataclasses.dataclass class RepoURL: url: str tool: str host: str group: str project: str def parse_url(url: str...
26.724138
150
0.554194
import dataclasses import pathlib import re import typing @dataclasses.dataclass class RepoURL: url: str tool: str host: str group: str project: str def parse_url(url: str) -> typing.Optional[RepoURL]: if url.startswith("file://") or str(pathlib.Path(url).expanduser()).startswith("/"): ...
true
true
1c31b9609ade94f7c39616819c2323dc09113224
4,729
py
Python
src/boxes/datatypes/units.py
Peilonrayz/alphabet_learner
13229e53215e3c050f106e00e34f90ca2d6fa256
[ "MIT" ]
null
null
null
src/boxes/datatypes/units.py
Peilonrayz/alphabet_learner
13229e53215e3c050f106e00e34f90ca2d6fa256
[ "MIT" ]
null
null
null
src/boxes/datatypes/units.py
Peilonrayz/alphabet_learner
13229e53215e3c050f106e00e34f90ca2d6fa256
[ "MIT" ]
null
null
null
import enum from dataclasses import dataclass from typing import Optional, ClassVar, Dict class UnitTypes(enum.Enum): NONE = 0 FLEX = enum.auto() ANGLE = enum.auto() FREQUENCY = enum.auto() LENGTH = enum.auto() RESOLUTION = enum.auto() TIME = enum.auto() @dataclass class Unit: value:...
18.61811
93
0.635864
import enum from dataclasses import dataclass from typing import Optional, ClassVar, Dict class UnitTypes(enum.Enum): NONE = 0 FLEX = enum.auto() ANGLE = enum.auto() FREQUENCY = enum.auto() LENGTH = enum.auto() RESOLUTION = enum.auto() TIME = enum.auto() @dataclass class Unit: value:...
true
true
1c31bba40692dfe153c0db3dc2084f4d5e849a9e
7,912
py
Python
docs/conf.py
brendan1mcmanus/whartonfintech-v3
6de82024edfbf76e9fcf5dfce61ce528279bc888
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
brendan1mcmanus/whartonfintech-v3
6de82024edfbf76e9fcf5dfce61ce528279bc888
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
brendan1mcmanus/whartonfintech-v3
6de82024edfbf76e9fcf5dfce61ce528279bc888
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # whartonfintech documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values...
32.162602
80
0.710566
import os import sys extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'whartonfintech' copyright = u"2015, Sudipta Bandyopadhyay" # |version| and |release|, also used in various other places throughout the # built documents. # ...
true
true
1c31bbaacea3596ce294897cfb99e0b71ef1b8b6
3,104
bzl
Python
asylo/bazel/sim_enclave.bzl
kevin405/mosl_vsgx_migration
76ddd438c8caad1051ea9a7e2040bf6ccee996a2
[ "Apache-2.0" ]
null
null
null
asylo/bazel/sim_enclave.bzl
kevin405/mosl_vsgx_migration
76ddd438c8caad1051ea9a7e2040bf6ccee996a2
[ "Apache-2.0" ]
null
null
null
asylo/bazel/sim_enclave.bzl
kevin405/mosl_vsgx_migration
76ddd438c8caad1051ea9a7e2040bf6ccee996a2
[ "Apache-2.0" ]
1
2019-01-02T22:04:21.000Z
2019-01-02T22:04:21.000Z
# # Copyright 2018 Asylo authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
33.73913
77
0.659794
load("@com_google_asylo_backend_provider//:enclave_info.bzl", "EnclaveInfo") SimEnclaveInfo = provider() def _reprovide_binary_with_enclave_info_impl(ctx): return [ DefaultInfo( files = ctx.attr.binary[DefaultInfo].files, data_runfiles = ctx.attr.binary[DefaultInfo...
true
true
1c31bbda924e7db5495072a5358f0e9be6fe68ac
36,308
py
Python
test/segwit.py
MichaelHDesigns/lunarium
720e8815b8ac775efcdd99423f17337ad96b0e8c
[ "MIT" ]
7
2018-09-01T18:44:03.000Z
2022-03-05T15:10:47.000Z
test/segwit.py
MichaelHDesigns/lunarium
720e8815b8ac775efcdd99423f17337ad96b0e8c
[ "MIT" ]
30
2018-08-17T05:18:52.000Z
2021-02-06T13:43:41.000Z
test/segwit.py
MichaelHDesigns/lunarium
720e8815b8ac775efcdd99423f17337ad96b0e8c
[ "MIT" ]
18
2018-08-15T19:56:15.000Z
2022-02-17T02:14:01.000Z
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test the SegWit changeover logic # from test_framework.test_framework import BitcoinTestFramework from te...
61.538983
203
0.68478
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.mininode import sha256, ripemd160, CTransaction, CTxIn, COutPoint, CTxOut from test_framework.address import script_to_p2sh, key_to_p2pkh from test_framework.script import CScript, OP_HASH160, O...
true
true
1c31bc0db543d1938a9073d536d060604a0f8615
38,282
py
Python
mindspore/_checkparam.py
ATestGroup233/mindspore
5d81221b5896cf7d7c6adb44daef28d92cb43352
[ "Apache-2.0" ]
1
2021-06-01T12:34:37.000Z
2021-06-01T12:34:37.000Z
mindspore/_checkparam.py
ATestGroup233/mindspore
5d81221b5896cf7d7c6adb44daef28d92cb43352
[ "Apache-2.0" ]
null
null
null
mindspore/_checkparam.py
ATestGroup233/mindspore
5d81221b5896cf7d7c6adb44daef28d92cb43352
[ "Apache-2.0" ]
null
null
null
# Copyright 2020-2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
40.812367
119
0.61094
import re import inspect import math from enum import Enum from functools import reduce, wraps from itertools import repeat, zip_longest from collections import deque from collections.abc import Iterable import numpy as np from mindspore import log as logger from mindspore.common import dtype as mstype ...
true
true
1c31bc32290d28e948e7370f1048cc36bb9ab6c6
8,219
py
Python
sep/driver.py
lukereichold/visual-speech-separation
d365083c5e76bc6c97c9642b0c2afc55e846ab38
[ "Apache-2.0" ]
2
2021-03-18T12:18:58.000Z
2021-10-05T18:56:45.000Z
sep/driver.py
lukereichold/visual-speech-separation
d365083c5e76bc6c97c9642b0c2afc55e846ab38
[ "Apache-2.0" ]
10
2020-01-28T23:15:38.000Z
2022-03-12T00:12:26.000Z
sep/driver.py
lukereichold/visual-speech-separation
d365083c5e76bc6c97c9642b0c2afc55e846ab38
[ "Apache-2.0" ]
null
null
null
import argparse import json import os import sys import numpy as np import pylab import scipy.io import utils.img as ig import utils.imtable as imtable import utils.sound as sound import utils.util as ut import sep_params import tfutil as mu from InferenceClient import InferenceClient from utils.sound import Sound p...
36.367257
141
0.63341
import argparse import json import os import sys import numpy as np import pylab import scipy.io import utils.img as ig import utils.imtable as imtable import utils.sound as sound import utils.util as ut import sep_params import tfutil as mu from InferenceClient import InferenceClient from utils.sound import Sound p...
false
true
1c31bf028ea222d543c043876f5486296c5d330b
769
py
Python
var/spack/repos/builtin/packages/py-python-xmp-toolkit/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2,360
2017-11-06T08:47:01.000Z
2022-03-31T14:45:33.000Z
var/spack/repos/builtin/packages/py-python-xmp-toolkit/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
13,838
2017-11-04T07:49:45.000Z
2022-03-31T23:38:39.000Z
var/spack/repos/builtin/packages/py-python-xmp-toolkit/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1,793
2017-11-04T07:45:50.000Z
2022-03-30T14:31:53.000Z
# Copyright 2013-2021 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) from spack import * class PyPythonXmpToolkit(PythonPackage): """Python XMP Toolkit for working with metadata.""" ...
36.619048
95
0.708713
from spack import * class PyPythonXmpToolkit(PythonPackage): homepage = "https://github.com/python-xmp-toolkit/python-xmp-toolkit" pypi = "python-xmp-toolkit/python-xmp-toolkit-2.0.1.tar.gz" version('2.0.1', sha256='f8d912946ff9fd46ed5c7c355aa5d4ea193328b3f200909ef32d9a28a1419a38') depends...
true
true
1c31bf04d83632ae657e52862ea3133cde8a472f
4,081
py
Python
.venv/Lib/site-packages/docutils/examples.py
sirZer0/Replace
e59ad89c43f901d409215353a7403781fb689c7e
[ "MIT" ]
null
null
null
.venv/Lib/site-packages/docutils/examples.py
sirZer0/Replace
e59ad89c43f901d409215353a7403781fb689c7e
[ "MIT" ]
1
2020-05-16T02:22:36.000Z
2020-05-16T02:22:36.000Z
.venv/Lib/site-packages/docutils/examples.py
sirZer0/Replace
e59ad89c43f901d409215353a7403781fb689c7e
[ "MIT" ]
null
null
null
# $Id: examples.py 7320 2012-01-19 22:33:02Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ This module contains practical examples of Docutils client code. Importing this module from client code is not recommended; its contents are subject to c...
30.684211
77
0.684146
from docutils import core, io def html_parts( input_string, source_path=None, destination_path=None, input_encoding="unicode", doctitle=True, initial_header_level=1, ): overrides = { "input_encoding": input_encoding, "doctitle_xform": doctitle, "initial_header_...
true
true
1c31bf17913afdeb4bdb573c7ce2766dc07ba73a
5,397
py
Python
httpclient.py
Rikyyyyyyyyyy/Rikyyyyyyyyyy-CMPUT404-assignment-web-client-
6cb9604474d833b46dd647b7ad0af4d15e17822f
[ "Apache-2.0" ]
null
null
null
httpclient.py
Rikyyyyyyyyyy/Rikyyyyyyyyyy-CMPUT404-assignment-web-client-
6cb9604474d833b46dd647b7ad0af4d15e17822f
[ "Apache-2.0" ]
null
null
null
httpclient.py
Rikyyyyyyyyyy/Rikyyyyyyyyyy-CMPUT404-assignment-web-client-
6cb9604474d833b46dd647b7ad0af4d15e17822f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 # Copyright 2016 Abram Hindle, https://github.com/tywtyw2002, and https://github.com/treedust # # 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 # # ...
30.664773
235
0.593293
# Write your own HTTP GET and POST # The point is to understand what you have to send and get experience with it import sys import socket import re # you may use urllib to encode data appropriately import urllib.parse def help(): print("httpclient.py [GET/POST] [URL]\n") class HTTPResponse(objec...
true
true
1c31bfa0b91d181c179596686bba312a5a272888
567
py
Python
opencv-semantic-segmentation/additional_code.py
Gengarrr/RN-nuScenes
00b0909db06439c489e06874f8f7aa1d3d3c9498
[ "Apache-2.0" ]
null
null
null
opencv-semantic-segmentation/additional_code.py
Gengarrr/RN-nuScenes
00b0909db06439c489e06874f8f7aa1d3d3c9498
[ "Apache-2.0" ]
null
null
null
opencv-semantic-segmentation/additional_code.py
Gengarrr/RN-nuScenes
00b0909db06439c489e06874f8f7aa1d3d3c9498
[ "Apache-2.0" ]
null
null
null
# loop over each of the individual class IDs in the image for classID in np.unique(classMap): # build a binary mask for the current class and then use the mask # to visualize all pixels in the image belonging to the class print("[INFO] class: {}".format(CLASSES[classID])) classMask = (mask == COLORS[classID]).astyp...
40.5
66
0.731922
for classID in np.unique(classMap): print("[INFO] class: {}".format(CLASSES[classID])) classMask = (mask == COLORS[classID]).astype("uint8") * 255 classMask = classMask[:, :, 0] classOutput = cv2.bitwise_and(image, image, mask=classMask) classMask = np.hstack([image, classOutput]) cv2.imshow("Class Vis",...
true
true
1c31c08e34ba376884f8639f325d9d7d97731cba
1,312
py
Python
tests/mock_sender.py
Inrixia/pyais
b50fd4d75c687d71b3c70ee939ac9112cfec991e
[ "MIT" ]
null
null
null
tests/mock_sender.py
Inrixia/pyais
b50fd4d75c687d71b3c70ee939ac9112cfec991e
[ "MIT" ]
null
null
null
tests/mock_sender.py
Inrixia/pyais
b50fd4d75c687d71b3c70ee939ac9112cfec991e
[ "MIT" ]
null
null
null
import socket import time MESSAGES = [ b"!AIVDM,1,1,,B,133S0:0P00PCsJ:MECBR0gv:0D8N,0*7F", b"!AIVDM,1,1,,A,4h2=a@Quho;O306WMpMIK<Q00826,0*42", b"!AIVDM,1,1,,A,402M3b@000Htt0K0Q0R3T<700t24,0*52", b"!AIVDM,1,1,,A,1>qc9ww000OkfS@MMI5004R60<0B,0*31", b"!AIVDM,1,1,,A,13P<GAh01pwM`GPDdu>T8SDV0@2c,0*7D", ...
32.8
71
0.61128
import socket import time MESSAGES = [ b"!AIVDM,1,1,,B,133S0:0P00PCsJ:MECBR0gv:0D8N,0*7F", b"!AIVDM,1,1,,A,4h2=a@Quho;O306WMpMIK<Q00826,0*42", b"!AIVDM,1,1,,A,402M3b@000Htt0K0Q0R3T<700t24,0*52", b"!AIVDM,1,1,,A,1>qc9ww000OkfS@MMI5004R60<0B,0*31", b"!AIVDM,1,1,,A,13P<GAh01pwM`GPDdu>T8SDV0@2c,0*7D", ...
true
true
1c31c1230e25d2b77a8ade22d528f72fdb565b38
13,113
py
Python
main.py
imtheohuang/HeytapTask
21607c6d070a87faeb9229c763e87a389ec02eb0
[ "MIT" ]
306
2021-07-13T10:09:25.000Z
2022-03-28T05:45:08.000Z
main.py
imtheohuang/HeytapTask
21607c6d070a87faeb9229c763e87a389ec02eb0
[ "MIT" ]
65
2021-07-14T13:18:25.000Z
2021-11-29T02:37:09.000Z
main.py
imtheohuang/HeytapTask
21607c6d070a87faeb9229c763e87a389ec02eb0
[ "MIT" ]
173
2021-07-13T10:09:27.000Z
2022-03-26T02:31:44.000Z
# -*- coding: utf-8 -*- # @Time : 2021/8/17 # @Author : hwkxk(丶大K丶) # @Email : k@hwkxk.cn import requests,json,time,logging,traceback,os,random,notify,datetime,configparser #用户登录全局变量 client = None session = None #日志基础配置 # 创建一个logger logger = logging.getLogger() logger.setLevel(logging.INFO) # 创建一个handler,用于写入日志...
39.260479
148
0.563487
import requests,json,time,logging,traceback,os,random,notify,datetime,configparser client = None session = None logger = logging.getLogger() logger.setLevel(logging.INFO) fh = logging.FileHandler('./log.txt', mode='a', encoding='utf-8') fh.setFormatter(logging.Formatter("%(message)s")) logger.addHandler(fh) ...
true
true
1c31c1d12e2620556ec42dcce135fa3807ea0e6f
108
py
Python
module1-entry point.py
dronovroman/gh2021
bd01d55b20c02916f28213776224f31bd96ac479
[ "BSD-3-Clause" ]
null
null
null
module1-entry point.py
dronovroman/gh2021
bd01d55b20c02916f28213776224f31bd96ac479
[ "BSD-3-Clause" ]
null
null
null
module1-entry point.py
dronovroman/gh2021
bd01d55b20c02916f28213776224f31bd96ac479
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Aug 20 23:29:59 2021 @author: roman Module 1 - entry point """
12
35
0.601852
true
true
1c31c270461e1b3f25e6ec99f42bacf1c46670f5
17,592
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_images_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_images_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_images_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
46.66313
221
0.659277
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.m...
true
true
1c31c3da9136c83732f112cb3a9388021eb3870c
393
py
Python
Cartwheel/lib/Python26/Lib/site-packages/OpenGL/GL/EXT/texture_mirror_clamp.py
MontyThibault/centre-of-mass-awareness
58778f148e65749e1dfc443043e9fc054ca3ff4d
[ "MIT" ]
null
null
null
Cartwheel/lib/Python26/Lib/site-packages/OpenGL/GL/EXT/texture_mirror_clamp.py
MontyThibault/centre-of-mass-awareness
58778f148e65749e1dfc443043e9fc054ca3ff4d
[ "MIT" ]
null
null
null
Cartwheel/lib/Python26/Lib/site-packages/OpenGL/GL/EXT/texture_mirror_clamp.py
MontyThibault/centre-of-mass-awareness
58778f148e65749e1dfc443043e9fc054ca3ff4d
[ "MIT" ]
null
null
null
'''OpenGL extension EXT.texture_mirror_clamp This module customises the behaviour of the OpenGL.raw.GL.EXT.texture_mirror_clamp to provide a more Python-friendly API ''' from OpenGL import platform, constants, constant, arrays from OpenGL import extensions, wrapper from OpenGL.GL import glget import ctypes from Open...
32.75
57
0.819338
from OpenGL import platform, constants, constant, arrays from OpenGL import extensions, wrapper from OpenGL.GL import glget import ctypes from OpenGL.raw.GL.EXT.texture_mirror_clamp import *
true
true
1c31c470c48b8e919191977565ad6b3e548938d3
153
py
Python
activecollab_digger/apps.py
kingsdigitallab/django-activecollab-digger
508c31eb4a3fe9887aa9d3a86ea160f3bc1e60b0
[ "MIT" ]
null
null
null
activecollab_digger/apps.py
kingsdigitallab/django-activecollab-digger
508c31eb4a3fe9887aa9d3a86ea160f3bc1e60b0
[ "MIT" ]
null
null
null
activecollab_digger/apps.py
kingsdigitallab/django-activecollab-digger
508c31eb4a3fe9887aa9d3a86ea160f3bc1e60b0
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.apps import AppConfig class ActivecollabDiggerConfig(AppConfig): name = 'activecollab_digger'
19.125
42
0.823529
from __future__ import unicode_literals from django.apps import AppConfig class ActivecollabDiggerConfig(AppConfig): name = 'activecollab_digger'
true
true
1c31c5189c1a2703669a7843fe0163d5c35cc3c0
370
py
Python
tests/test_verdict.py
denverpost/trial-results
9d56570658b71c3ac5cfab0abe7979678b432572
[ "Unlicense", "MIT" ]
null
null
null
tests/test_verdict.py
denverpost/trial-results
9d56570658b71c3ac5cfab0abe7979678b432572
[ "Unlicense", "MIT" ]
10
2015-07-14T22:13:25.000Z
2016-07-05T20:25:38.000Z
tests/test_verdict.py
denverpost/trial-results
9d56570658b71c3ac5cfab0abe7979678b432572
[ "Unlicense", "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import pytest from spreadsheet import Sheet from verdict import Verdict def test_publish(): """ Test publish method. """ sheet = Sheet('test-sheet', 'worksheet-name') publish = Verdict(sheet) publish_value = p...
24.666667
49
0.691892
from __future__ import unicode_literals import pytest from spreadsheet import Sheet from verdict import Verdict def test_publish(): sheet = Sheet('test-sheet', 'worksheet-name') publish = Verdict(sheet) publish_value = publish.publish() assert publish_value == True
true
true
1c31c6199865b682ec556fa6878dcf7a1d7cb9b4
30,617
py
Python
kontranto_igra/game_logic.py
zd-mioc/Kontranto
928f8e6ca1c8c136878d0dd036321053ab461049
[ "MIT" ]
1
2020-07-19T11:11:08.000Z
2020-07-19T11:11:08.000Z
kontranto_igra/game_logic.py
zd-mioc/Kontranto
928f8e6ca1c8c136878d0dd036321053ab461049
[ "MIT" ]
null
null
null
kontranto_igra/game_logic.py
zd-mioc/Kontranto
928f8e6ca1c8c136878d0dd036321053ab461049
[ "MIT" ]
1
2021-03-01T08:39:41.000Z
2021-03-01T08:39:41.000Z
from kontranto_igra.models import Game, Move from django.core.exceptions import ObjectDoesNotExist from django.core.serializers.json import DjangoJSONEncoder from django.utils import timezone from random import choice import string import json def BlackOrWhite(color): #univerzalna funkcija - moze i kod jednog ...
57.877127
246
0.549727
from kontranto_igra.models import Game, Move from django.core.exceptions import ObjectDoesNotExist from django.core.serializers.json import DjangoJSONEncoder from django.utils import timezone from random import choice import string import json def BlackOrWhite(color): if color == '': return choic...
true
true
1c31c78d0621c40bcec3cdd165869a70fcf880a5
3,092
py
Python
smamp/convert_UA_to_AA.py
lukaselflein/smamp
2a0a8ce36b16aedd4c6a2bb576ba959061ec4e7e
[ "MIT" ]
null
null
null
smamp/convert_UA_to_AA.py
lukaselflein/smamp
2a0a8ce36b16aedd4c6a2bb576ba959061ec4e7e
[ "MIT" ]
1
2019-03-29T13:44:53.000Z
2019-03-29T16:17:40.000Z
smamp/convert_UA_to_AA.py
lukaselflein/smamp
2a0a8ce36b16aedd4c6a2bb576ba959061ec4e7e
[ "MIT" ]
null
null
null
""" Change structure with implicit Hydrogen to one with explicitely defined H-atoms. Copyright 2019 Simulation Lab University of Freiburg Author: Johannes Hoermann <johannes.hoermann@imtek.uni-freiburg.de> Modified: Lukas Elflein <elfleinl@cs.uni-freiburg.de> """ import os import ase.io import sys import warnings impo...
36.376471
93
0.67238
import os import ase.io import sys import warnings import numpy as np import parmed as pmd from ase.data import atomic_numbers from ase.neighborlist import NeighborList from matscipy.neighbours import neighbour_list from parmed import gromacs from smamp.insertHbyList import insertHbyList from smamp.tools import find ...
true
true
1c31c799afcd02d00be6c55536e837f3f97b10aa
8,073
py
Python
agrupar.py
Juane99/Leg-Recognition-CoppeliaSim
dad2ecde9dbc97965fbba07e1eb9d27458bff97b
[ "MIT" ]
2
2021-07-03T17:02:51.000Z
2021-11-03T09:54:58.000Z
agrupar.py
Juane99/Leg-Recognition-CoppeliaSim
dad2ecde9dbc97965fbba07e1eb9d27458bff97b
[ "MIT" ]
null
null
null
agrupar.py
Juane99/Leg-Recognition-CoppeliaSim
dad2ecde9dbc97965fbba07e1eb9d27458bff97b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: Juan Emilio Martinez Manjon Asignatura: Programacion Tecnica y Cientifica Profesor: Eugenio Aguirre Molina Curso: 2020/2021 """ # agrupar.py """ Este fichero agrupa los puntos capturados desde el simulador en clusters. Para saber cuantos puntos hay en cada c...
35.721239
110
0.464635
import parametros import json import os from math import sqrt from copy import copy def main(): minimo_puntos = parametros.params.getMinPuntos() maximo_puntos = parametros.params.getMaxPuntos() umbral = parametros.params.getUmbral() : a_abrir = file ...
true
true
1c31c8910abdd3dcc95e5c9b42e51f7b63ab7484
537
py
Python
env/lib/python3.8/site-packages/plotly/validators/layout/polar/radialaxis/tickformatstop/_templateitemname.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/polar/radialaxis/tickformatstop/_templateitemname.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/polar/radialaxis/tickformatstop/_templateitemname.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 TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.polar.radialaxis.tickformatstop", **kwargs ): super(TemplateitemnameValidator, self...
29.833333
78
0.638734
import _plotly_utils.basevalidators class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.polar.radialaxis.tickformatstop", **kwargs ): super(TemplateitemnameValidator, self...
true
true
1c31c9c604c90a89fb3ae0d97caf87d474ab4172
7,200
py
Python
registry/tags.py
ewindisch/docker-registry
c95a344d03381e948336e36d45cda3f7be8002f7
[ "Apache-2.0" ]
null
null
null
registry/tags.py
ewindisch/docker-registry
c95a344d03381e948336e36d45cda3f7be8002f7
[ "Apache-2.0" ]
null
null
null
registry/tags.py
ewindisch/docker-registry
c95a344d03381e948336e36d45cda3f7be8002f7
[ "Apache-2.0" ]
null
null
null
import datetime import logging import re import time import flask import simplejson as json import signals import storage import toolkit from .app import app store = storage.load() logger = logging.getLogger(__name__) RE_USER_AGENT = re.compile('([^\s/]+)/([^\s/]+)') @app.route('/v1/repositories/<path:repositor...
34.951456
79
0.663333
import datetime import logging import re import time import flask import simplejson as json import signals import storage import toolkit from .app import app store = storage.load() logger = logging.getLogger(__name__) RE_USER_AGENT = re.compile('([^\s/]+)/([^\s/]+)') @app.route('/v1/repositories/<path:repositor...
true
true
1c31ca05aefdd7ae97611e51466681ff81e8955e
3,133
py
Python
project/models/project.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
84
2017-10-22T11:01:39.000Z
2022-02-27T03:43:48.000Z
project/models/project.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
22
2017-12-11T07:21:56.000Z
2021-09-23T02:53:50.000Z
project/models/project.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
23
2017-12-06T06:59:52.000Z
2022-02-24T00:02:25.000Z
# --------------------------------------------------------------------- # Project models # --------------------------------------------------------------------- # Copyright (C) 2007-2020 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- # Python modules i...
31.646465
86
0.604532
import operator from threading import Lock from django.db import models import cachetools from noc.core.model.base import NOCModel from noc.core.model.decorator import on_delete_check from noc.core.model.fields import DocumentReferenceField from noc.main.models.glyph import Glyph from noc.main.models.remote...
true
true
1c31ca10d2ab9cbc594ee3845c8324feabaa2bfe
28,237
py
Python
manim/scene/scene.py
mrdon/manim
d023c76cdef915226bb9a1e41c20168959a02881
[ "MIT" ]
null
null
null
manim/scene/scene.py
mrdon/manim
d023c76cdef915226bb9a1e41c20168959a02881
[ "MIT" ]
null
null
null
manim/scene/scene.py
mrdon/manim
d023c76cdef915226bb9a1e41c20168959a02881
[ "MIT" ]
null
null
null
"""Basic canvas for animations.""" __all__ = ["Scene"] import inspect import random import warnings import platform import copy from tqdm import tqdm as ProgressDisplay import numpy as np from .. import config, logger from ..animation.animation import Animation, Wait from ..animation.transform import MoveToTarget...
32.234018
94
0.5882
__all__ = ["Scene"] import inspect import random import warnings import platform import copy from tqdm import tqdm as ProgressDisplay import numpy as np from .. import config, logger from ..animation.animation import Animation, Wait from ..animation.transform import MoveToTarget, ApplyMethod from ..camera.camera ...
true
true
1c31ca64a96685a842ffc2ac7f588afc6a361e73
1,303
py
Python
app/core/tests/test_admin.py
phelixdusengimana/django-backend-api-development
ce3b333b383a7d9f5aefb7335cad6be24b5dcf85
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
phelixdusengimana/django-backend-api-development
ce3b333b383a7d9f5aefb7335cad6be24b5dcf85
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
phelixdusengimana/django-backend-api-development
ce3b333b383a7d9f5aefb7335cad6be24b5dcf85
[ "MIT" ]
null
null
null
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email="phelixdusengimana@gmail.co...
32.575
68
0.638526
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email="phelixdusengimana@gmail.co...
true
true
1c31ca9c4fd078498dab4348fb8d043cf927f485
12,782
py
Python
fast_knn_nmt/custom_fairseq/train/train.py
Crazy-Chick/fast-knn-nmt
7336bbe0be1240e70d3c3ac71c4e7cfb4f4ea4ff
[ "Apache-2.0" ]
22
2021-05-31T15:14:37.000Z
2022-03-18T06:26:21.000Z
fast_knn_nmt/custom_fairseq/train/train.py
Crazy-Chick/fast-knn-nmt
7336bbe0be1240e70d3c3ac71c4e7cfb4f4ea4ff
[ "Apache-2.0" ]
3
2021-10-06T09:54:03.000Z
2021-10-13T12:11:53.000Z
fast_knn_nmt/custom_fairseq/train/train.py
Crazy-Chick/fast-knn-nmt
7336bbe0be1240e70d3c3ac71c4e7cfb4f4ea4ff
[ "Apache-2.0" ]
4
2021-06-02T16:12:02.000Z
2022-02-28T12:18:24.000Z
#!/usr/bin/env python3 -u # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Train a new model on one or across multiple GPUs. """ import argparse import logging import math import os impor...
34.176471
116
0.657174
import argparse import logging import math import os import random import sys import numpy as np import torch from fairseq import ( checkpoint_utils, distributed_utils, options, quantization_utils, tasks, utils, ) from fairseq.data import iterators from fairseq.logging import meters, metr...
true
true
1c31cb13529eef04215d2078b1a571c501de6798
17,719
py
Python
corehq/apps/reports/standard/project_health.py
rochakchauhan/commcare-hq
aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/reports/standard/project_health.py
rochakchauhan/commcare-hq
aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236
[ "BSD-3-Clause" ]
1
2021-06-02T04:45:16.000Z
2021-06-02T04:45:16.000Z
corehq/apps/reports/standard/project_health.py
rochakchauhan/commcare-hq
aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236
[ "BSD-3-Clause" ]
null
null
null
import datetime from collections import namedtuple from itertools import chain from django.db.models import Sum from django.utils.translation import ugettext as _ from django.utils.translation import ugettext_lazy from memoized import memoized from dimagi.ext import jsonobject from dimagi.utils.dates import add_mont...
41.016204
136
0.661832
import datetime from collections import namedtuple from itertools import chain from django.db.models import Sum from django.utils.translation import ugettext as _ from django.utils.translation import ugettext_lazy from memoized import memoized from dimagi.ext import jsonobject from dimagi.utils.dates import add_mont...
true
true
1c31cb6a4d7b517d33ce839c490c9a39a16d59f9
2,925
py
Python
tle/__main__.py
skittles1412/TLE
a7d7ac399602071bf2c559003466e95862ce2a00
[ "MIT" ]
null
null
null
tle/__main__.py
skittles1412/TLE
a7d7ac399602071bf2c559003466e95862ce2a00
[ "MIT" ]
null
null
null
tle/__main__.py
skittles1412/TLE
a7d7ac399602071bf2c559003466e95862ce2a00
[ "MIT" ]
null
null
null
import argparse import asyncio import distutils.util import logging import os import discord from logging.handlers import TimedRotatingFileHandler from os import environ from pathlib import Path import seaborn as sns from discord.ext import commands from matplotlib import pyplot as plt from tle import constants from ...
31.117021
96
0.668718
import argparse import asyncio import distutils.util import logging import os import discord from logging.handlers import TimedRotatingFileHandler from os import environ from pathlib import Path import seaborn as sns from discord.ext import commands from matplotlib import pyplot as plt from tle import constants from ...
true
true
1c31cd0589b442ad3626bd5a400540a823070c07
1,014
py
Python
stubs.min/System/Diagnostics/__init___parts/PresentationTraceLevel.py
denfromufa/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2017-07-07T11:15:45.000Z
2017-07-07T11:15:45.000Z
stubs.min/System/Diagnostics/__init___parts/PresentationTraceLevel.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/System/Diagnostics/__init___parts/PresentationTraceLevel.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class PresentationTraceLevel(Enum,IComparable,IFormattable,IConvertible): """ Describes the level of detail to trace about a particular object. enum PresentationTraceLevel,values: High (3),Low (1),Medium (2),None (0) """ def __eq__(self,*args): """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y)...
28.166667
215
0.66568
class PresentationTraceLevel(Enum,IComparable,IFormattable,IConvertible): """ Describes the level of detail to trace about a particular object. enum PresentationTraceLevel,values: High (3),Low (1),Medium (2),None (0) """ def __eq__(self,*args): """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y)...
false
true
1c31cd8b355b3554479765522432b64185cead75
6,189
py
Python
emission/storage/decorations/place_queries.py
trevor-wu/e-mission-server
2e31986bd7c0faab7110b7eb69541b0b9eac62df
[ "BSD-3-Clause" ]
21
2015-02-09T00:35:17.000Z
2021-12-14T16:41:05.000Z
emission/storage/decorations/place_queries.py
trevor-wu/e-mission-server
2e31986bd7c0faab7110b7eb69541b0b9eac62df
[ "BSD-3-Clause" ]
672
2015-01-29T18:10:56.000Z
2022-03-24T13:04:51.000Z
emission/storage/decorations/place_queries.py
trevor-wu/e-mission-server
2e31986bd7c0faab7110b7eb69541b0b9eac62df
[ "BSD-3-Clause" ]
110
2015-01-29T18:11:10.000Z
2022-03-29T17:58:14.000Z
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import * import logging import emission.core.get_database as edb import emission.core...
46.886364
94
0.630473
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import * import logging import emission.core.get_database as edb import emission.core...
true
true
1c31ce27baf51df5e89dd769ec2e22576991ccaf
4,007
py
Python
tests/test_sbm.py
jernsting/nxt_gem
407af32250ab00aa17c54729cf0483adc0f8a658
[ "BSD-3-Clause" ]
null
null
null
tests/test_sbm.py
jernsting/nxt_gem
407af32250ab00aa17c54729cf0483adc0f8a658
[ "BSD-3-Clause" ]
null
null
null
tests/test_sbm.py
jernsting/nxt_gem
407af32250ab00aa17c54729cf0483adc0f8a658
[ "BSD-3-Clause" ]
null
null
null
""" Run the graph embedding methods on Karate graph and evaluate them on graph reconstruction and visualization. Please copy the gem/data/karate.edgelist to the working directory """ import os.path import unittest import networkx as nx import pickle import numpy as np from gem.embedding.gf import GraphFactorization f...
42.178947
119
0.649114
import os.path import unittest import networkx as nx import pickle import numpy as np from gem.embedding.gf import GraphFactorization from gem.embedding.hope import HOPE from gem.embedding.lap import LaplacianEigenmaps from gem.embedding.lle import LocallyLinearEmbedding from gem.embedding.node2vec import node2vec fr...
true
true
1c31cf5d1c9e3fe2abf89d4443550cf4e6fa593c
16,419
py
Python
modules/detection/instance.py
xuna123/Bold-Falcon
bef7dfc3103143bd51ca82838565877097fecc49
[ "BSD-3-Clause" ]
1
2021-06-22T05:33:08.000Z
2021-06-22T05:33:08.000Z
modules/detection/instance.py
xuna123/Bold-Falcon
bef7dfc3103143bd51ca82838565877097fecc49
[ "BSD-3-Clause" ]
null
null
null
modules/detection/instance.py
xuna123/Bold-Falcon
bef7dfc3103143bd51ca82838565877097fecc49
[ "BSD-3-Clause" ]
null
null
null
# coding=utf-8 # Copyright (C) 2010-2013 Claudio Guarnieri. # Copyright (C) 2014-2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import collections import datetime import json import sys import time class Instance(obje...
38.36215
116
0.543395
import collections import datetime import json import sys import time class Instance(object): """Machine Learning (clustering) for Cuckoo.""" LABEL_SIGNIFICANCE_COUNT = 5 POSITIVE_RATE = 2 * LABEL_SIGNIFICANCE_COUNT def __init__(self): self.json_path = "" self.bin_path = "" ...
false
true
1c31d05f59c5c18d4835128551f94b0b2b968c51
493
py
Python
comments/migrations/0011_auto_20210702_2215.py
montukv/CommentAPI
3158f5b40cb21f192f292a3f3caae71d9f5d9020
[ "MIT" ]
null
null
null
comments/migrations/0011_auto_20210702_2215.py
montukv/CommentAPI
3158f5b40cb21f192f292a3f3caae71d9f5d9020
[ "MIT" ]
null
null
null
comments/migrations/0011_auto_20210702_2215.py
montukv/CommentAPI
3158f5b40cb21f192f292a3f3caae71d9f5d9020
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-07-02 16:45 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('comments', '0010_auto_20210702_2058'), ] operations = [ migrations.RenameField( model_name='page', old_name='id', ...
20.541667
48
0.545639
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('comments', '0010_auto_20210702_2058'), ] operations = [ migrations.RenameField( model_name='page', old_name='id', new_name='idno', ), migration...
true
true
1c31d17673c7ffdca7d04acaf3793863f9f7516d
20,646
py
Python
src/prefect/agent/ecs/agent.py
jspeis/prefect
61154b21d2eaac21b7a597b6e9b63377ffffcb9a
[ "Apache-2.0" ]
1
2022-03-19T06:11:03.000Z
2022-03-19T06:11:03.000Z
src/prefect/agent/ecs/agent.py
jspeis/prefect
61154b21d2eaac21b7a597b6e9b63377ffffcb9a
[ "Apache-2.0" ]
1
2020-05-24T17:04:47.000Z
2020-05-24T17:04:47.000Z
src/prefect/agent/ecs/agent.py
jspeis/prefect
61154b21d2eaac21b7a597b6e9b63377ffffcb9a
[ "Apache-2.0" ]
null
null
null
import os from copy import deepcopy from typing import Iterable, Dict, Optional, Any import slugify import yaml from prefect import config from prefect.agent import Agent from prefect.run_configs import ECSRun from prefect.utilities.agent import get_flow_image, get_flow_run_command from prefect.utilities.filesystems ...
39.476099
98
0.608108
import os from copy import deepcopy from typing import Iterable, Dict, Optional, Any import slugify import yaml from prefect import config from prefect.agent import Agent from prefect.run_configs import ECSRun from prefect.utilities.agent import get_flow_image, get_flow_run_command from prefect.utilities.filesystems ...
true
true
1c31d3cee567475068402dd59b3d0cd44159485b
2,933
py
Python
students/models.py
harshalgalgale/alumni
52d8ecb8186abe5659f28a6555c069ec96f25269
[ "Apache-2.0" ]
null
null
null
students/models.py
harshalgalgale/alumni
52d8ecb8186abe5659f28a6555c069ec96f25269
[ "Apache-2.0" ]
null
null
null
students/models.py
harshalgalgale/alumni
52d8ecb8186abe5659f28a6555c069ec96f25269
[ "Apache-2.0" ]
null
null
null
from datetime import datetime from django.core.validators import MinValueValidator, MaxValueValidator from django.db import models # Create your models here. GENDER = [ ('M', 'Male'), ('F', 'Female'), ] DEGREE = [ ('btech', 'B.Tech'), ('mtech', 'M.Tech'), ('phd', 'PhD'), ] DEPARTMENT = [ ('ape...
38.090909
116
0.637572
from datetime import datetime from django.core.validators import MinValueValidator, MaxValueValidator from django.db import models GENDER = [ ('M', 'Male'), ('F', 'Female'), ] DEGREE = [ ('btech', 'B.Tech'), ('mtech', 'M.Tech'), ('phd', 'PhD'), ] DEPARTMENT = [ ('ape', 'APE'), ('fmp', 'FM...
true
true
1c31d430e14dd7191000e06cc94f70c42c3a4692
8,852
py
Python
pyzscaler/zpa/app_segments.py
mitchos/pyZscaler
c4c83345bf26e2883b9555d20a90f9387a45e05e
[ "MIT" ]
16
2021-07-09T00:20:31.000Z
2022-02-17T19:29:26.000Z
pyzscaler/zpa/app_segments.py
mitchos/pyZscaler
c4c83345bf26e2883b9555d20a90f9387a45e05e
[ "MIT" ]
62
2021-07-21T03:42:09.000Z
2022-03-18T09:08:20.000Z
pyzscaler/zpa/app_segments.py
mitchos/pyZscaler
c4c83345bf26e2883b9555d20a90f9387a45e05e
[ "MIT" ]
8
2021-09-11T08:14:53.000Z
2022-03-25T20:14:41.000Z
from box import Box, BoxList from restfly.endpoint import APIEndpoint from pyzscaler.utils import Iterator, add_id_groups, convert_keys, snake_to_camel class AppSegmentsAPI(APIEndpoint): # Params that need reformatting reformat_params = [ ("clientless_app_ids", "clientlessApps"), ("server_gro...
38.995595
115
0.585969
from box import Box, BoxList from restfly.endpoint import APIEndpoint from pyzscaler.utils import Iterator, add_id_groups, convert_keys, snake_to_camel class AppSegmentsAPI(APIEndpoint): reformat_params = [ ("clientless_app_ids", "clientlessApps"), ("server_group_ids", "serverGroups"), ]...
true
true
1c31d499886ee8af2326cc361c43981590242571
215
py
Python
genome/genome/doctype/diseases/test_diseases.py
Havenir/genome
249469e7743af7cab05938c13c2fbc1576b75233
[ "MIT" ]
1
2020-12-24T04:52:06.000Z
2020-12-24T04:52:06.000Z
genome/genome/doctype/diseases/test_diseases.py
Havenir/genome
249469e7743af7cab05938c13c2fbc1576b75233
[ "MIT" ]
null
null
null
genome/genome/doctype/diseases/test_diseases.py
Havenir/genome
249469e7743af7cab05938c13c2fbc1576b75233
[ "MIT" ]
4
2020-09-17T06:05:31.000Z
2021-03-04T06:23:40.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2019, Accurate Systems and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest class TestDiseases(unittest.TestCase): pass
19.545455
55
0.772093
from __future__ import unicode_literals import frappe import unittest class TestDiseases(unittest.TestCase): pass
true
true
1c31d63a94965d0f41ae0edd1005c4fcf1cd168f
814
py
Python
internal/deprecated/internal/preprocessing/patch_preprocess.py
lucasace/caer
e077a81e8d5bb3d38039ff9289a93996b1133411
[ "MIT" ]
null
null
null
internal/deprecated/internal/preprocessing/patch_preprocess.py
lucasace/caer
e077a81e8d5bb3d38039ff9289a93996b1133411
[ "MIT" ]
null
null
null
internal/deprecated/internal/preprocessing/patch_preprocess.py
lucasace/caer
e077a81e8d5bb3d38039ff9289a93996b1133411
[ "MIT" ]
1
2021-01-01T10:37:55.000Z
2021-01-01T10:37:55.000Z
# _____ ______ _____ # / ____/ /\ | ____ | __ \ # | | / \ | |__ | |__) | Caer - Modern Computer Vision # | | / /\ \ | __| | _ / Languages: Python, C, C++, Cuda # | |___ / ____ \ | |____ | | \ \ http://github.com/jasmcaus/caer # \_____\/_/ \_ \______ |_| \_\ # Lic...
30.148148
85
0.593366
from ._patches import extract_patches_2d __all__ = [ 'PatchPreprocess' ] class PatchPreprocess: def __init__(self, width, height): self.width = width self.height = height def patch_preprocess(self, image): return extract_patches_2d(image, (self.height, self.width), m...
true
true
1c31d678f356b6d1601126ce5cbf097e2f52d9ea
4,956
py
Python
be/.metadata/.plugins/org.eclipse.wildwebdeveloper.embedder.node/node-v14.15.4-win-x64/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py
parksey/-
9d68e32781e4880f7c7230831908e3a208fc1751
[ "MIT" ]
4
2020-11-25T12:51:46.000Z
2022-03-23T15:58:08.000Z
be/.metadata/.plugins/org.eclipse.wildwebdeveloper.embedder.node/node-v14.15.4-win-x64/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py
parksey/-
9d68e32781e4880f7c7230831908e3a208fc1751
[ "MIT" ]
null
null
null
be/.metadata/.plugins/org.eclipse.wildwebdeveloper.embedder.node/node-v14.15.4-win-x64/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py
parksey/-
9d68e32781e4880f7c7230831908e3a208fc1751
[ "MIT" ]
1
2020-11-25T12:51:49.000Z
2020-11-25T12:51:49.000Z
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Pretty-prints the contents of a GYP file.""" from __future__ import print_function import sys import re # Regex to remo...
31.367089
81
0.624496
from __future__ import print_function import sys import re COMMENT_RE = re.compile(r'\s* # Regex to remove quoted strings when we're counting braces. QUOTE_RE_STR = r'(?P<q>[\'"])(.*?)(?<![^\\][\\])(?P=q)' QUOTE_RE = re.compile(QUOTE_RE_STR) def comment_replace(matchobj): return match...
true
true
1c31d7df3aa58c7a4c130b8a6891261ed6481aed
522
py
Python
launch.py
fanzhe98/FaceRecoCamera
3a5b5018e26e07a98036ca12e79d263e23e154f8
[ "MIT" ]
null
null
null
launch.py
fanzhe98/FaceRecoCamera
3a5b5018e26e07a98036ca12e79d263e23e154f8
[ "MIT" ]
null
null
null
launch.py
fanzhe98/FaceRecoCamera
3a5b5018e26e07a98036ca12e79d263e23e154f8
[ "MIT" ]
1
2018-10-20T02:09:45.000Z
2018-10-20T02:09:45.000Z
from flask import Flask, render_template import os app = Flask(__name__) @app.route("/") def hello(): DIRECTORY = "../yilun/static/Portrait/" nameList = [] pathList = [] for f in os.listdir(DIRECTORY): if os.path.splitext(f)[1].lower() in ('.jpg', '.jpeg'): nameList.append(f.spl...
23.727273
74
0.595785
from flask import Flask, render_template import os app = Flask(__name__) @app.route("/") def hello(): DIRECTORY = "../yilun/static/Portrait/" nameList = [] pathList = [] for f in os.listdir(DIRECTORY): if os.path.splitext(f)[1].lower() in ('.jpg', '.jpeg'): nameList.append(f.spl...
true
true
1c31d870a381eeddacc43630762e03a91786e791
1,980
py
Python
tests/test_frequency.py
kyokley/git-hammer
e72aa0f8cee4ab5b30ba2502be936660c1385854
[ "Apache-2.0" ]
117
2019-01-21T09:40:26.000Z
2022-01-19T10:04:09.000Z
tests/test_frequency.py
kyokley/git-hammer
e72aa0f8cee4ab5b30ba2502be936660c1385854
[ "Apache-2.0" ]
28
2019-01-21T15:26:41.000Z
2021-04-12T22:13:01.000Z
tests/test_frequency.py
kyokley/git-hammer
e72aa0f8cee4ab5b30ba2502be936660c1385854
[ "Apache-2.0" ]
6
2019-05-12T07:03:23.000Z
2020-04-29T06:17:14.000Z
import datetime import unittest from githammer import Frequency class FrequencyTest(unittest.TestCase): def setUp(self) -> None: print() print(self.id()) self.initial_date = datetime.datetime(2019, 10, 10, 10, 10, 10, tzinfo=datetime.timezone.utc) self.year_start_date = datetime.d...
58.235294
104
0.664646
import datetime import unittest from githammer import Frequency class FrequencyTest(unittest.TestCase): def setUp(self) -> None: print() print(self.id()) self.initial_date = datetime.datetime(2019, 10, 10, 10, 10, 10, tzinfo=datetime.timezone.utc) self.year_start_date = datetime.d...
true
true
1c31d8afda384495bd9a283d63ddb431e592d18f
157
py
Python
mdpreview/util.py
kevr/vim-mdpreview
c6b0baeeacfceb279e1323307095c0c2f9d2de8d
[ "MIT" ]
1
2021-07-07T00:51:19.000Z
2021-07-07T00:51:19.000Z
mdpreview/util.py
kevr/vim-mdpreview
c6b0baeeacfceb279e1323307095c0c2f9d2de8d
[ "MIT" ]
null
null
null
mdpreview/util.py
kevr/vim-mdpreview
c6b0baeeacfceb279e1323307095c0c2f9d2de8d
[ "MIT" ]
null
null
null
import os home = os.environ.get("HOME") share = os.environ.get("MDPREVIEW_PATH", os.path.join(home, ".local", "share", "mdpreview"))
26.166667
74
0.585987
import os home = os.environ.get("HOME") share = os.environ.get("MDPREVIEW_PATH", os.path.join(home, ".local", "share", "mdpreview"))
true
true
1c31db7e429a217f515b4d7c307a3c801a19678c
4,746
py
Python
src/executor/SegmentSplitter.py
AutoDash/AutoDash
3924795a04159f80ea3b65b2172747babd15f35f
[ "Apache-2.0" ]
3
2020-02-12T01:24:46.000Z
2020-02-13T00:50:46.000Z
src/executor/SegmentSplitter.py
AutoDash/AutoDash
3924795a04159f80ea3b65b2172747babd15f35f
[ "Apache-2.0" ]
32
2020-02-20T10:20:56.000Z
2022-02-10T01:42:46.000Z
src/executor/SegmentSplitter.py
AutoDash/AutoDash
3924795a04159f80ea3b65b2172747babd15f35f
[ "Apache-2.0" ]
1
2020-02-22T02:47:19.000Z
2020-02-22T02:47:19.000Z
from ..data.VideoItem import VideoItem from ..data.VideoFile import VideoFile from .iExecutor import iExecutor from ..signals.SkipSignal import SkipSignal import re import numpy as np class SegmentSplitter(iExecutor): def __init__(self, *parents, clip_length='5s', length_threshold='3s'): super().__init__(*...
40.913793
108
0.578592
from ..data.VideoItem import VideoItem from ..data.VideoFile import VideoFile from .iExecutor import iExecutor from ..signals.SkipSignal import SkipSignal import re import numpy as np class SegmentSplitter(iExecutor): def __init__(self, *parents, clip_length='5s', length_threshold='3s'): super().__init__(*...
true
true
1c31dbe58f6a8b1be16852af637bf05ffbc5739f
1,277
py
Python
lizard_ext/lizardcpre.py
BjrnJhsn/lizard
5c3f02b67f72f70f4dbdbd2e97249e0ec20d40fa
[ "MIT" ]
1,255
2015-01-07T20:24:45.000Z
2022-03-31T02:39:50.000Z
lizard_ext/lizardcpre.py
BjrnJhsn/lizard
5c3f02b67f72f70f4dbdbd2e97249e0ec20d40fa
[ "MIT" ]
293
2015-01-05T14:31:16.000Z
2022-03-24T18:12:16.000Z
lizard_ext/lizardcpre.py
sider/lizard
61ad3c1f9989280dfd4157c337e70e08174f7c34
[ "MIT" ]
217
2015-01-07T20:24:49.000Z
2022-03-30T19:20:21.000Z
''' This is an extension of lizard, It helps to deal with C code with preprocessors that is hard to parse. It works by always ignoring the code between #else and #end. ''' class LizardExtension(object): # pylint: disable=R0903 ordering_index = 0 def __call__(self, tokens, reader): def preprocess_to...
33.605263
73
0.477682
class LizardExtension(object): ordering_index = 0 def __call__(self, tokens, reader): def preprocess_tokens(tokens): else_count = 0 if_stack = [] for token in tokens: if token.startswith("#"): if_stack.append(token) ...
true
true
1c31dbec8103bddf1a2f3fe3c553d38c7d083aa5
4,020
py
Python
src/si/util/im2col.py
Joao16am/si
813ca373022fc5ee35eac69147b5567275718b46
[ "Apache-2.0" ]
null
null
null
src/si/util/im2col.py
Joao16am/si
813ca373022fc5ee35eac69147b5567275718b46
[ "Apache-2.0" ]
null
null
null
src/si/util/im2col.py
Joao16am/si
813ca373022fc5ee35eac69147b5567275718b46
[ "Apache-2.0" ]
null
null
null
import numpy as np def calc_pad_dims_2D(X_shape, out_dim, kernel_shape, stride): if not isinstance(X_shape, tuple): raise ValueError("`X_shape` must be of type tuple") if not isinstance(out_dim, tuple): raise ValueError("`out_dim` must be of type tuple") if not isinstance(kernel_shape, t...
30
81
0.574129
import numpy as np def calc_pad_dims_2D(X_shape, out_dim, kernel_shape, stride): if not isinstance(X_shape, tuple): raise ValueError("`X_shape` must be of type tuple") if not isinstance(out_dim, tuple): raise ValueError("`out_dim` must be of type tuple") if not isinstance(kernel_shape, t...
true
true
1c31dc1b2b97667d440a1d991f7121cb424b7e94
921
py
Python
research/clustering/lossy_short_deck.py
keithlee96/pluribus-poker-AI
15e52fe73dd09570e782dd0e7b9069865eb5823d
[ "MIT" ]
113
2020-08-06T15:03:18.000Z
2022-03-31T01:56:34.000Z
research/clustering/lossy_short_deck.py
jumbokun/pluribus-poker-AI
15e52fe73dd09570e782dd0e7b9069865eb5823d
[ "MIT" ]
null
null
null
research/clustering/lossy_short_deck.py
jumbokun/pluribus-poker-AI
15e52fe73dd09570e782dd0e7b9069865eb5823d
[ "MIT" ]
42
2020-08-17T15:51:30.000Z
2022-03-31T17:10:44.000Z
""" Simple script for converting card combos and clusters into a dictionary where a tuple of cards are the keys and the cluster id is the value Cd into clustering to run, it will attempt to drop off files in clustering/data """ import dill as pickle from tqdm import tqdm with open("data/information_abstraction.pkl"...
35.423077
107
0.652552
import dill as pickle from tqdm import tqdm with open("data/information_abstraction.pkl", "rb") as file: data = pickle.load(file) if __name__ == "__main__": rounds = ["flop", "turn", "river"] for round in rounds: print(f"Getting indices for {round}") card_combos = data[round] clust...
true
true
1c31dc2bad37aea0744fcab5ba2f10c4bd5e2092
3,820
py
Python
history.py
SWang848/DCRAC
695d83063cf484cd54d7744c8c719fde94c3cde5
[ "Apache-2.0" ]
null
null
null
history.py
SWang848/DCRAC
695d83063cf484cd54d7744c8c719fde94c3cde5
[ "Apache-2.0" ]
null
null
null
history.py
SWang848/DCRAC
695d83063cf484cd54d7744c8c719fde94c3cde5
[ "Apache-2.0" ]
null
null
null
import numpy as np import time import cv2 try: from PIL import Image except: import Image from utils import * class History(): """ Manages frame history """ def __init__(self, length, im_shape, nb_action): """ Args: length: How many frames should be st...
33.217391
109
0.590052
import numpy as np import time import cv2 try: from PIL import Image except: import Image from utils import * class History(): def __init__(self, length, im_shape, nb_action): if len(im_shape) == 3: self.im_shape = im_shape self.black_and_white = True if im_shap...
true
true
1c31dd354d5a42d55075a5ccdd336af3ea50688c
456
py
Python
CRM_project/accounts/urls.py
rzhvn1/Military_CRM
64856ebba988453148c0360d1e6f73cd0950f9e5
[ "MIT" ]
null
null
null
CRM_project/accounts/urls.py
rzhvn1/Military_CRM
64856ebba988453148c0360d1e6f73cd0950f9e5
[ "MIT" ]
null
null
null
CRM_project/accounts/urls.py
rzhvn1/Military_CRM
64856ebba988453148c0360d1e6f73cd0950f9e5
[ "MIT" ]
null
null
null
from django.urls import path, include from .views import * from rest_framework.routers import DefaultRouter router = DefaultRouter() # router.register('dossier', DossierModelViewSet, basename='dossier') router.register('register', RegisterViewSet, basename="register") urlpatterns = [ path('', include(router.urls)...
35.076923
69
0.741228
from django.urls import path, include from .views import * from rest_framework.routers import DefaultRouter router = DefaultRouter() router.register('register', RegisterViewSet, basename="register") urlpatterns = [ path('', include(router.urls)), path('login/', AuthView.as_view(), name="authorization"), ...
true
true