hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
8a5c676db35ceafbfa87c565e021037cd2bb5456
5,969
py
Python
test/test_shape_map_format.py
DaniFdezAlvarez/dbpedia-shexer
e2c0685b167810e13411b592b6bdd4acfc11e8c1
[ "Apache-2.0" ]
16
2019-03-18T21:32:36.000Z
2022-03-28T17:53:57.000Z
test/test_shape_map_format.py
DaniFdezAlvarez/shexer
4f4dffc95bcad038cbc1bd85b58e5558c7c0a6d1
[ "Apache-2.0" ]
67
2019-02-27T12:58:55.000Z
2022-03-28T20:38:48.000Z
test/test_shape_map_format.py
DaniFdezAlvarez/dbpedia-shexer
e2c0685b167810e13411b592b6bdd4acfc11e8c1
[ "Apache-2.0" ]
2
2019-03-09T00:30:28.000Z
2020-01-09T18:04:14.000Z
from test.const import BASE_FILES import os.path as pth _BASE_DIR = BASE_FILES + "shape_map" + pth.sep
50.584746
118
0.54716
import unittest from shexer.shaper import Shaper from test.const import G1, BASE_FILES, default_namespaces from shexer.consts import JSON, FIXED_SHAPE_MAP from test.t_utils import file_vs_str_tunned_comparison import os.path as pth from shexer.consts import TURTLE _BASE_DIR = BASE_FILES + "shape_map" + pth.sep class ...
0
0
0
5,634
0
0
0
99
133
0fc5bc4b5bbfcf8687ba770ac9a21a8952ebdebb
143
py
Python
ecommerce_api/data/admin.py
khaledmontaser20/Ecommerce_Backend
fc245e2a381d0b7e7b47220fa23623c64abac997
[ "MIT" ]
null
null
null
ecommerce_api/data/admin.py
khaledmontaser20/Ecommerce_Backend
fc245e2a381d0b7e7b47220fa23623c64abac997
[ "MIT" ]
null
null
null
ecommerce_api/data/admin.py
khaledmontaser20/Ecommerce_Backend
fc245e2a381d0b7e7b47220fa23623c64abac997
[ "MIT" ]
1
2021-12-17T18:12:54.000Z
2021-12-17T18:12:54.000Z
from django.contrib import admin admin.site.register(Product) admin.site.register(Category) admin.site.register(Review)
20.428571
32
0.811189
from django.contrib import admin from .models import * admin.site.register(Product) admin.site.register(Category) admin.site.register(Review)
0
0
0
0
0
0
0
0
22
7f4653337e7137db4574c3ae8da4f111e668e483
7,478
py
Python
tests/distributions_test.py
danhey/exoplanet
bc82756dfa1b084e82cbcfa6185800833415e847
[ "MIT" ]
80
2018-10-28T09:55:34.000Z
2020-01-19T20:54:08.000Z
tests/distributions_test.py
danhey/exoplanet
bc82756dfa1b084e82cbcfa6185800833415e847
[ "MIT" ]
56
2018-11-18T20:08:51.000Z
2020-01-20T17:18:33.000Z
tests/distributions_test.py
danhey/exoplanet
bc82756dfa1b084e82cbcfa6185800833415e847
[ "MIT" ]
26
2018-11-30T17:07:33.000Z
2020-01-16T04:07:52.000Z
# -*- coding: utf-8 -*-
29.32549
76
0.537577
# -*- coding: utf-8 -*- import logging from collections import namedtuple import aesara_theano_fallback.tensor as tt import numpy as np import pymc3 as pm import pytest from pymc3.tests.test_distributions import R, Unit, Vector from pymc3.tests.test_transforms import check_transform, get_values from scipy.stats impor...
0
1,533
0
4,772
0
498
0
264
382
2dd045f1f78168cc8d91f81b6b9efa0da474a6d2
2,886
py
Python
roles/openshift_health_checker/openshift_checks/ovs_version.py
baileyvw/openshift-ansible
b1184a1544a1cd13fc2623bfa468759cb9bff4ba
[ "Apache-2.0" ]
null
null
null
roles/openshift_health_checker/openshift_checks/ovs_version.py
baileyvw/openshift-ansible
b1184a1544a1cd13fc2623bfa468759cb9bff4ba
[ "Apache-2.0" ]
null
null
null
roles/openshift_health_checker/openshift_checks/ovs_version.py
baileyvw/openshift-ansible
b1184a1544a1cd13fc2623bfa468759cb9bff4ba
[ "Apache-2.0" ]
null
null
null
""" Ansible module for determining if an installed version of Open vSwitch is incompatible with the currently installed version of OpenShift. """
36.531646
104
0.66736
""" Ansible module for determining if an installed version of Open vSwitch is incompatible with the currently installed version of OpenShift. """ from openshift_checks import OpenShiftCheck, OpenShiftCheckException, get_var from openshift_checks.mixins import NotContainerizedMixin class OvsVersion(NotContainerizedMi...
0
312
0
2,267
0
0
0
92
68
0ddc35f02a21b4ce96b0c521c0282ae967dda2d7
1,293
py
Python
punting/twodim/twonormalization.py
microprediction/punting
5de62913f8eb9777df1d465db0f2d606a3d19c42
[ "MIT" ]
null
null
null
punting/twodim/twonormalization.py
microprediction/punting
5de62913f8eb9777df1d465db0f2d606a3d19c42
[ "MIT" ]
null
null
null
punting/twodim/twonormalization.py
microprediction/punting
5de62913f8eb9777df1d465db0f2d606a3d19c42
[ "MIT" ]
null
null
null
from punting.twodim.twodimensions import to_flat_exacta, from_flat_exacta, to_flat_quinella, from_flat_quinella from punting.onedim.onenormalization import to_normalized_dividends, to_normalized_probabilities def to_normalized_quinella_probabilities(q,scr=-1): """ :param q: 2-d representation :param scr: ...
26.9375
109
0.721578
from punting.twodim.twodimensions import to_flat_exacta,from_flat_exacta,to_flat_quinella, from_flat_quinella from punting.onedim.onenormalization import to_normalized_dividends, to_normalized_probabilities def to_normalized_quinella_probabilities(q,scr=-1): """ :param q: 2-d representation :param scr: ...
0
0
0
0
0
0
0
-2
0
f4e18f6021386ba5dffdfdf479fa308f4411e811
1,939
py
Python
AD2/FunctionGenerator.py
holla2040/ad2
38abe08ba0d2e65fad3a7a7914d1bf567045d614
[ "MIT" ]
5
2018-06-25T05:12:48.000Z
2021-11-22T23:14:26.000Z
AD2/FunctionGenerator.py
holla2040/ad2
38abe08ba0d2e65fad3a7a7914d1bf567045d614
[ "MIT" ]
null
null
null
AD2/FunctionGenerator.py
holla2040/ad2
38abe08ba0d2e65fad3a7a7914d1bf567045d614
[ "MIT" ]
null
null
null
#!/usr/bin/env python
34.625
110
0.698814
#!/usr/bin/env python from ctypes import * from dwfconstants import * import time,sys class FunctionGenerator(object): def __init__(self,dwf,hdwf,channel): self.dwf = dwf self.hdwf = hdwf self.channel = c_int(channel) self.dwf.FDwfAnalogOutNodeEnableSet(self.hdwf, self.channel, A...
0
1,030
0
797
0
0
0
-2
91
3da7d3d604f3f675f9665b51dc88bf37cd90e5bc
67
py
Python
backend/consts.py
roechsli/planhub
aaf6cb6fded6d1c124ec32c03a9dc23b80c7b9aa
[ "MIT" ]
1
2021-09-25T09:38:03.000Z
2021-09-25T09:38:03.000Z
backend/consts.py
roechsli/planhub
aaf6cb6fded6d1c124ec32c03a9dc23b80c7b9aa
[ "MIT" ]
null
null
null
backend/consts.py
roechsli/planhub
aaf6cb6fded6d1c124ec32c03a9dc23b80c7b9aa
[ "MIT" ]
null
null
null
MINUTE_TIME_UNIT_MULTIPLIER = { "hours": 60, "minutes": 1 }
16.75
31
0.626866
MINUTE_TIME_UNIT_MULTIPLIER = { "hours": 60, "minutes": 1 }
0
0
0
0
0
0
0
0
0
a621f79cb80d81894fd07f221871293abdc639f4
8,386
py
Python
models/baseline.py
DoubtedSteam/MPANet
fe4f3f1d83c45485b1498786f89ace96c634f187
[ "MIT" ]
25
2021-06-25T03:37:21.000Z
2022-03-11T02:21:06.000Z
models/baseline.py
DoubtedSteam/MPANet
fe4f3f1d83c45485b1498786f89ace96c634f187
[ "MIT" ]
6
2021-06-25T06:46:03.000Z
2022-03-25T06:47:12.000Z
models/baseline.py
DoubtedSteam/MPANet
fe4f3f1d83c45485b1498786f89ace96c634f187
[ "MIT" ]
2
2021-12-14T07:40:59.000Z
2021-12-20T02:40:58.000Z
import torch.nn as nn
41.721393
145
0.61543
import math import torch import torch.nn as nn from torch.nn import init from torch.nn import functional as F from torch.nn import Parameter import numpy as np import cv2 from models.resnet import resnet50 from utils.calc_acc import calc_acc from layers import TripletLoss from layers import CenterTripletLoss from la...
0
0
0
7,961
0
0
0
69
334
c6947747816547467c9afc2ee5856aad33e82f28
623
py
Python
p645_set_mismatch.py
feigaochn/leetcode
abf0877fae02aa9c2549051f0b68df0ace952512
[ "MIT" ]
null
null
null
p645_set_mismatch.py
feigaochn/leetcode
abf0877fae02aa9c2549051f0b68df0ace952512
[ "MIT" ]
null
null
null
p645_set_mismatch.py
feigaochn/leetcode
abf0877fae02aa9c2549051f0b68df0ace952512
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 if __name__ == '__main__': sol = Solution() print(sol.findErrorNums([1, 2, 2, 4])) print(sol.findErrorNums([2, 2]))
24.92
104
0.499197
#!/usr/bin/env python # coding: utf-8 class Solution(object): def findErrorNums(self, nums): """ :type nums: List[int] :rtype: List[int] """ n = len(nums) minus = n * (n + 1) // 2 - sum(nums) # miss - dup minus2 = sum(i * i for i in range(1, n + 1)) - sum(m...
0
0
0
431
0
0
0
0
23
69b669dec472fa3555c9d25213f71d5da0489450
6,338
py
Python
tests/framework_graphql/_target_application.py
lrafeei/newrelic-python-agent
3dbf080d4104514e49ad8e1d06abac75b6914ee1
[ "Apache-2.0" ]
null
null
null
tests/framework_graphql/_target_application.py
lrafeei/newrelic-python-agent
3dbf080d4104514e49ad8e1d06abac75b6914ee1
[ "Apache-2.0" ]
1
2021-07-30T18:31:14.000Z
2021-07-30T18:31:14.000Z
tests/framework_graphql/_target_application.py
lrafeei/newrelic-python-agent
3dbf080d4104514e49ad8e1d06abac75b6914ee1
[ "Apache-2.0" ]
null
null
null
# Copyright 2010 New Relic, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
25.869388
83
0.630956
# Copyright 2010 New Relic, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
0
0
0
0
0
458
0
39
161
1553588cdb6125b7a8404633ab139fc78c91675e
4,469
py
Python
rudetox/seq2seq/predict.py
IlyaGusev/rudetox
e1c6334744bf9d28639efbb61c3605be51642ce9
[ "Apache-2.0" ]
1
2022-03-02T15:50:10.000Z
2022-03-02T15:50:10.000Z
rudetox/seq2seq/predict.py
IlyaGusev/rudetox
e1c6334744bf9d28639efbb61c3605be51642ce9
[ "Apache-2.0" ]
null
null
null
rudetox/seq2seq/predict.py
IlyaGusev/rudetox
e1c6334744bf9d28639efbb61c3605be51642ce9
[ "Apache-2.0" ]
null
null
null
import argparse if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--input-file", type=str, required=True) parser.add_argument("--output-file", type=str, required=True) parser.add_argument("--model-name", type=str, required=True) parser.add_argument("--sample-rate"...
35.468254
100
0.658984
import argparse import json import copy import torch import razdel from tqdm import tqdm from transformers import AutoTokenizer, AutoModelForSeq2SeqLM from rudetox.util.io import read_jsonl, write_jsonl from rudetox.util.dl import gen_batch, set_random_seed from rudetox.ranker import Ranker def predict( model_n...
0
0
0
0
0
2,869
0
78
223
96ed8b33dab9bb069a735a68ce4463baaee67e58
371
py
Python
users/urls.py
flaviofontes29/online-course-platform
2cebacce58b7ee8ca004b4b70581d51f827869d5
[ "MIT" ]
null
null
null
users/urls.py
flaviofontes29/online-course-platform
2cebacce58b7ee8ca004b4b70581d51f827869d5
[ "MIT" ]
null
null
null
users/urls.py
flaviofontes29/online-course-platform
2cebacce58b7ee8ca004b4b70581d51f827869d5
[ "MIT" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path("registration/", views.registration, name="registration"), path("login/", views.login, name="login"), path("valid_registry", views.valid_registry, name="valid_registry"), path("valid_login", views.valid_login, name="valid_login"), ...
30.916667
72
0.698113
from django.urls import path from . import views urlpatterns = [ path("registration/", views.registration, name="registration"), path("login/", views.login, name="login"), path("valid_registry", views.valid_registry, name="valid_registry"), path("valid_login", views.valid_login, name="valid_login"), ...
0
0
0
0
0
0
0
0
0
f34d1f1fdb44abb6e5ea8015474e49216be4b0b3
2,967
py
Python
powerstrip/utils/utils.py
keans/powerstrip
fb5ba4d19b60d4404d68fd9b4af739afc64a161c
[ "MIT" ]
null
null
null
powerstrip/utils/utils.py
keans/powerstrip
fb5ba4d19b60d4404d68fd9b4af739afc64a161c
[ "MIT" ]
null
null
null
powerstrip/utils/utils.py
keans/powerstrip
fb5ba4d19b60d4404d68fd9b4af739afc64a161c
[ "MIT" ]
null
null
null
from hashlib import sha3_256 from typing import Union from pathlib import Path def ensure_path( path: Union[str, Path], must_exist: bool = False ) -> Path: """ ensures that given path is of type Path and that HOME directory is resolved """ path = ( path if isinstance(path, Path...
26.256637
70
0.634648
from hashlib import sha3_256 from typing import Union, BinaryIO from pathlib import Path from importlib_metadata import pathlib def ensure_path( path: Union[str, Path], must_exist: bool = False ) -> Path: """ ensures that given path is of type Path and that HOME directory is resolved """ path...
0
0
0
0
0
0
0
27
23
2b57936d0ac7bfbb6b3535903ca37ced53fa3380
20,247
py
Python
dtr_code/shared/pt_trial_util.py
merrymercy/dtr-prototype
bf40e182453a7d8d23581ea68f32a9d7d2037d62
[ "Linux-OpenIB" ]
1
2021-08-02T02:42:58.000Z
2021-08-02T02:42:58.000Z
dtr_code/shared/pt_trial_util.py
merrymercy/dtr-prototype
bf40e182453a7d8d23581ea68f32a9d7d2037d62
[ "Linux-OpenIB" ]
null
null
null
dtr_code/shared/pt_trial_util.py
merrymercy/dtr-prototype
bf40e182453a7d8d23581ea68f32a9d7d2037d62
[ "Linux-OpenIB" ]
1
2021-08-05T08:58:53.000Z
2021-08-05T08:58:53.000Z
""" Utilities for setting up PyTorch memory usage experiments. """ import csv import os import subprocess import time import numpy as np from common import (check_file_exists, prepare_out_file, read_json, render_exception, write_json) MEASURED_KEYS = ['time', 'gpu_time', 'input_mem', 'model_mem', 'total_mem', 'sync_...
40.332669
180
0.604089
""" Utilities for setting up PyTorch memory usage experiments. """ import csv from itertools import product as iter_product import os import subprocess import time import numpy as np from common import (check_file_exists, prepare_out_file, read_json, render_exception, write_json) MEASURED_KEYS = ...
0
0
0
0
2,100
4,478
0
44
282
7060bd715ab72e7b9f69d15367cada6ec0d11942
2,857
py
Python
sac_release/scripts/plot_traces.py
anonymouscode114/iclr2021_rlreg
142566f4316bfed9e3858b92f87a792b7c7b8b1b
[ "MIT" ]
1
2021-05-17T16:40:59.000Z
2021-05-17T16:40:59.000Z
sac_release/scripts/plot_traces.py
anonymouscode114/iclr2021_rlreg
142566f4316bfed9e3858b92f87a792b7c7b8b1b
[ "MIT" ]
null
null
null
sac_release/scripts/plot_traces.py
anonymouscode114/iclr2021_rlreg
142566f4316bfed9e3858b92f87a792b7c7b8b1b
[ "MIT" ]
null
null
null
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import seaborn as sns import argparse import numpy as np import joblib import tensorflow as tf import os from sac.policies.hierarchical_policy import FixedOptionPolicy if __name__ == "__main__": parser = argparse.ArgumentParser() parser....
40.239437
108
0.561078
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import seaborn as sns import argparse import numpy as np import joblib import tensorflow as tf import os from sac.misc import utils from sac.policies.hierarchical_policy import FixedOptionPolicy from sac.misc.sampler import rollouts if __name__ =...
0
0
0
0
0
0
0
21
44
1b35a6a437b8cb176fd083149154bbbac97c60bb
4,657
py
Python
src/pyams_layer/interfaces.py
Py-AMS/pyams-layer
815652091bb137d3b6bf48c476a17e7ae9c4bbe9
[ "ZPL-2.1" ]
null
null
null
src/pyams_layer/interfaces.py
Py-AMS/pyams-layer
815652091bb137d3b6bf48c476a17e7ae9c4bbe9
[ "ZPL-2.1" ]
null
null
null
src/pyams_layer/interfaces.py
Py-AMS/pyams-layer
815652091bb137d3b6bf48c476a17e7ae9c4bbe9
[ "ZPL-2.1" ]
null
null
null
# # Copyright (c) 2015-2019 Thierry Florac <tflorac AT ulthar.net> # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRAN...
32.117241
98
0.640971
# # Copyright (c) 2015-2019 Thierry Florac <tflorac AT ulthar.net> # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRAN...
0
84
0
3,128
0
0
0
178
387
8517208114b4255485d8d12bb384924a3f34b6b4
1,080
py
Python
ex045.py
natancordeiro/python
a4b82847640bd7d2f8ed9aff83a9afabe57bc37d
[ "MIT" ]
null
null
null
ex045.py
natancordeiro/python
a4b82847640bd7d2f8ed9aff83a9afabe57bc37d
[ "MIT" ]
null
null
null
ex045.py
natancordeiro/python
a4b82847640bd7d2f8ed9aff83a9afabe57bc37d
[ "MIT" ]
null
null
null
from random import randint itens = ('Pedra', 'Papel', 'Tesoura') pc = randint(0, 2) print('''Suas opes: [ 0 ] PEDRA [ 1 ] PAPEL [ 2 ] TESOURA ''') op = int(input('Qual a sua jogada: ')) print('-=' * 11) print('Computador jogou {}'.format(itens[pc])) print('jogador jogou {}'.format(itens[op])) print('-=' * 11) if pc ...
25.714286
57
0.551852
from random import randint itens = ('Pedra', 'Papel', 'Tesoura') pc = randint(0, 2) print('''Suas opções: [ 0 ] PEDRA [ 1 ] PAPEL [ 2 ] TESOURA ''') op = int(input('Qual é a sua jogada: ')) print('-=' * 11) print('Computador jogou {}'.format(itens[pc])) print('jogador jogou {}'.format(itens[op])) print('-=' * 11) if ...
16
0
0
0
0
0
0
0
0
1cb755c1b899160b38a043a452f7aa868561f139
7,609
py
Python
biostar/pdf_layer/migrations/0003_auto__add_unique_publication_cluster_id.py
AshwinParanjape/mugap
753c61c537bcc36ed6d6ccf593fb0d91015275e4
[ "MIT" ]
null
null
null
biostar/pdf_layer/migrations/0003_auto__add_unique_publication_cluster_id.py
AshwinParanjape/mugap
753c61c537bcc36ed6d6ccf593fb0d91015275e4
[ "MIT" ]
6
2020-02-11T21:45:21.000Z
2021-06-01T21:41:38.000Z
biostar/pdf_layer/migrations/0003_auto__add_unique_publication_cluster_id.py
AshwinParanjape/mugap
753c61c537bcc36ed6d6ccf593fb0d91015275e4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
71.783019
168
0.554212
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding unique constraint on 'Publication', fields ['cluster_id'] db.cre...
0
0
0
7,421
0
0
0
53
111
753157c552d6a43cec2d453e8e22e61d47e8c0b1
3,587
py
Python
pygtfs/schedule.py
olalid/pygtfs
2f097effe9bb31ca9699d95eabf39d1496ea5c10
[ "MIT" ]
49
2015-01-12T17:49:25.000Z
2022-03-27T10:48:01.000Z
pygtfs/schedule.py
olalid/pygtfs
2f097effe9bb31ca9699d95eabf39d1496ea5c10
[ "MIT" ]
43
2015-07-15T06:32:54.000Z
2022-02-19T17:42:04.000Z
pygtfs/schedule.py
olalid/pygtfs
2f097effe9bb31ca9699d95eabf39d1496ea5c10
[ "MIT" ]
46
2015-02-13T18:33:08.000Z
2022-02-19T17:16:46.000Z
from __future__ import (division, absolute_import, print_function, unicode_literals) import sqlalchemy from .gtfs_entities import gtfs_all, Feed for entity in (gtfs_all + [Feed]): entity_doc = "A list of :py:class:`pygtfs.gtfs_entities.{0}` objects".format(entity.__name__) entity...
38.98913
120
0.686367
from __future__ import (division, absolute_import, print_function, unicode_literals) import sqlalchemy import sqlalchemy.orm from .gtfs_entities import gtfs_all, Feed, Base class Schedule: """Represents the full database. The schedule is the most important object in pygtfs. It repre...
0
0
0
1,624
0
892
0
6
114
c2a6137a992f38d7a2604a9015b1f9156504fe6a
644
py
Python
hexa/plugins/connector_airflow/migrations/0012_remove_airflow_run_message.py
qgerome/openhexa-app
8c9377b2ad972121d8e9575f5d52420212b52ed4
[ "MIT" ]
4
2021-07-19T12:53:21.000Z
2022-01-26T17:45:02.000Z
hexa/plugins/connector_airflow/migrations/0012_remove_airflow_run_message.py
qgerome/openhexa-app
8c9377b2ad972121d8e9575f5d52420212b52ed4
[ "MIT" ]
20
2021-05-17T12:27:06.000Z
2022-03-30T11:35:26.000Z
hexa/plugins/connector_airflow/migrations/0012_remove_airflow_run_message.py
qgerome/openhexa-app
8c9377b2ad972121d8e9575f5d52420212b52ed4
[ "MIT" ]
2
2021-09-07T04:19:59.000Z
2022-02-08T15:33:29.000Z
# Generated by Django 3.2.7 on 2021-10-11 12:43
24.769231
73
0.569876
# Generated by Django 3.2.7 on 2021-10-11 12:43 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("connector_airflow", "0011_alter_dagrun_options"), ] operations = [ migrations.AlterModelOptions( name="dagconfig", options={...
0
0
0
538
0
0
0
11
46
bae54090a3727a76745b4b316ac38f161ed1caa4
3,683
py
Python
matrix/plugin.program.openwizard/resources/libs/test.py
nzmodbox/repo.modbox
5a5d77089f94f2fdde755ccc2e5f93e81f54f261
[ "Apache-2.0" ]
null
null
null
matrix/plugin.program.openwizard/resources/libs/test.py
nzmodbox/repo.modbox
5a5d77089f94f2fdde755ccc2e5f93e81f54f261
[ "Apache-2.0" ]
null
null
null
matrix/plugin.program.openwizard/resources/libs/test.py
nzmodbox/repo.modbox
5a5d77089f94f2fdde755ccc2e5f93e81f54f261
[ "Apache-2.0" ]
null
null
null
################################################################################ # Copyright (C) 2019 drinfernoo # # # # This Program is free software; you can redistribute it and/or modify ...
37.20202
184
0.553353
################################################################################ # Copyright (C) 2019 drinfernoo # # # # This Program is free software; you can redistribute it and/or modify ...
0
0
0
0
0
1,887
0
29
233
2f756ce131e3d8539e389b9a570b87b3a3b29ccb
2,905
py
Python
2018/day07/part2.py
zagura/aoc-2017
bfd38fb6fbe4211017a306d218b32ecff741e006
[ "MIT" ]
2
2018-12-09T16:00:09.000Z
2018-12-09T17:56:15.000Z
2018/day07/part2.py
zagura/aoc-2017
bfd38fb6fbe4211017a306d218b32ecff741e006
[ "MIT" ]
null
null
null
2018/day07/part2.py
zagura/aoc-2017
bfd38fb6fbe4211017a306d218b32ecff741e006
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # Example line: Step A must be finished before step L can begin. edges = [(ord(x[1]) - ord('A'), ord(x[7]) - ord('A')) for x in map(lambda x: x.split(), open('input.in').readlines())] workers = 5 for e in edges: print('{} {}'.format(chr(ord('A') + e[0]),chr(ord('A') + e[1]))) graph = {} # for l...
35.426829
111
0.532186
#!/usr/bin/python3 # Example line: Step A must be finished before step L can begin. edges = [(ord(x[1]) - ord('A'), ord(x[7]) - ord('A')) for x in map(lambda x: x.split(), open('input.in').readlines())] workers = 5 for e in edges: print('{} → {}'.format(chr(ord('A') + e[0]),chr(ord('A') + e[1]))) class Node(object...
6
0
0
473
0
0
0
0
23
00d19d569ee8948072fd77d26286654501cb8321
569
py
Python
backend_rest/tracking/migrations/0006_auto_20200620_1535.py
ezrankayamba/twiga_distribution
ac4fd3d4f6b111e734a932398be564c863582be2
[ "MIT" ]
null
null
null
backend_rest/tracking/migrations/0006_auto_20200620_1535.py
ezrankayamba/twiga_distribution
ac4fd3d4f6b111e734a932398be564c863582be2
[ "MIT" ]
16
2020-03-23T13:24:11.000Z
2022-03-12T00:17:58.000Z
backend_rest/tracking/migrations/0006_auto_20200620_1535.py
ezrankayamba/twiga_distribution
ac4fd3d4f6b111e734a932398be564c863582be2
[ "MIT" ]
null
null
null
# Generated by Django 3.0.2 on 2020-06-20 12:35
23.708333
62
0.585237
# Generated by Django 3.0.2 on 2020-06-20 12:35 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tracking', '0005_auto_20200620_1521'), ] operations = [ migrations.AddField( model_name='contact', name='email_alt',...
0
0
0
455
0
0
0
19
46
708616fb52ff53ea202e769ba39d75481910a2d1
3,812
py
Python
utilities/prune_infreq.py
ShadenSmith/parse-tools
dc6e52821184729bf694e26e45a4b3eace5d4bc8
[ "MIT" ]
null
null
null
utilities/prune_infreq.py
ShadenSmith/parse-tools
dc6e52821184729bf694e26e45a4b3eace5d4bc8
[ "MIT" ]
2
2017-01-13T03:27:25.000Z
2017-03-23T15:50:03.000Z
utilities/prune_infreq.py
ShadenSmith/parse-tools
dc6e52821184729bf694e26e45a4b3eace5d4bc8
[ "MIT" ]
1
2017-07-06T17:40:17.000Z
2017-07-06T17:40:17.000Z
#!/usr/bin/env python3 import sys import argparse from collections import Counter my_description = ''' Prune empty (or infrequent) slices from a tensor. With default options, this script scans a tensor file and removes empty slices. Those slices are then specified with "mode-X-gaps.map" files which map the old dime...
28.661654
79
0.672875
#!/usr/bin/env python3 import sys import argparse from collections import Counter my_description = ''' Prune empty (or infrequent) slices from a tensor. With default options, this script scans a tensor file and removes empty slices. Those slices are then specified with "mode-X-gaps.map" files which map the old dime...
0
0
0
0
417
0
0
0
23
755f967e61125ac5cfadb640c0e1d4eef7cfafe6
574
py
Python
books/PythonCleanCode/ch4_solid/lsp_1.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonCleanCode/ch4_solid/lsp_1.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonCleanCode/ch4_solid/lsp_1.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
"""Clean Code in Python - Chater 4, The SOLID Principles > Liskov's Substitution Principle (LSP) Detecting violatinos os LSP through tools (mypy, pylint, etc.) """
22.076923
88
0.655052
"""Clean Code in Python - Chater 4, The SOLID Principles > Liskov's Substitution Principle (LSP) Detecting violatinos os LSP through tools (mypy, pylint, etc.) """ class Event: ... def meets_condition(self, event_data: dict) -> bool: return False class LoginEvent(Event): def meets_condition(s...
0
0
0
336
0
0
0
0
69
d9b54db5dff28293f76cb95e95bc4b2496735386
18,560
py
Python
tests/test_storage.py
Ekultek/pytest-benchmark
cdfab1379b64fea7fa28cb868d768606e10cede2
[ "BSD-2-Clause" ]
null
null
null
tests/test_storage.py
Ekultek/pytest-benchmark
cdfab1379b64fea7fa28cb868d768606e10cede2
[ "BSD-2-Clause" ]
null
null
null
tests/test_storage.py
Ekultek/pytest-benchmark
cdfab1379b64fea7fa28cb868d768606e10cede2
[ "BSD-2-Clause" ]
1
2021-04-22T08:54:07.000Z
2021-04-22T08:54:07.000Z
import json import py pytest_plugins = "pytester" THIS = py.path.local(__file__) STORAGE = THIS.dirpath(THIS.purebasename) SAVE_DATA = json.load(STORAGE.listdir('0030_*.json')[0].open()) JSON_DATA = json.load(STORAGE.listdir('0030_*.json')[0].open()) SAVE_DATA["machine_info"] = JSON_DATA["machine_info"] = {'foo':...
46.284289
329
0.619558
import json import logging import os import sys from io import BytesIO from io import StringIO import py import pytest from freezegun import freeze_time from pathlib import Path from pytest_benchmark import plugin from pytest_benchmark.plugin import BenchmarkSession from pytest_benchmark.plugin import pytest_benchmar...
0
5,689
0
2,603
0
8,592
0
360
833
b25c9a8d0584ab2b91899c660bc4256549a2d9be
1,428
py
Python
dftimewolf/lib/module.py
u269c/dftimewolf
45f898476a288d73c4256ae8e3836a2a4848c0d7
[ "Apache-2.0" ]
null
null
null
dftimewolf/lib/module.py
u269c/dftimewolf
45f898476a288d73c4256ae8e3836a2a4848c0d7
[ "Apache-2.0" ]
null
null
null
dftimewolf/lib/module.py
u269c/dftimewolf
45f898476a288d73c4256ae8e3836a2a4848c0d7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Class definition for DFTimewolf modules."""
31.733333
79
0.706583
# -*- coding: utf-8 -*- """Class definition for DFTimewolf modules.""" import threading class BaseModule(threading.Thread): """Base class for Modules. Attributes: critical: Boolean indicating whether the execution of this module is critical to the execution of the recipe. If set to True, and the mod...
0
0
0
1,315
0
0
0
-5
46
d593b1aba715128c923c8b4b933b43c30e12ad6a
2,509
py
Python
bin/detailed_comparison.py
ACTCollaboration/tilec
11ed8d027ad6ffac09b3e291a047f33e97673f14
[ "BSD-3-Clause" ]
1
2021-01-04T14:51:44.000Z
2021-01-04T14:51:44.000Z
bin/detailed_comparison.py
ACTCollaboration/tilec
11ed8d027ad6ffac09b3e291a047f33e97673f14
[ "BSD-3-Clause" ]
4
2019-09-03T22:19:16.000Z
2020-07-13T12:38:08.000Z
bin/detailed_comparison.py
ACTCollaboration/tilec
11ed8d027ad6ffac09b3e291a047f33e97673f14
[ "BSD-3-Clause" ]
1
2020-08-10T14:51:11.000Z
2020-08-10T14:51:11.000Z
from __future__ import print_function from orphics import io, stats from pixell import enmap import numpy as np import soapack.interfaces as sints region = 'deep56' version = "test_sim_galtest_final" #version = "noLFI_nohigh_test_int0" #version = "noLFI_yesLFI_test" mask = sints.get_act_mr3_crosslinked_mask(region) ...
33.453333
151
0.693105
from __future__ import print_function from orphics import maps,io,cosmology,stats from pixell import enmap import numpy as np import os,sys import soapack.interfaces as sints from tilec import kspace,utils as tutils from actsims import noise as simnoise from enlib import bench region = 'deep56' version = "test_sim_gal...
0
0
0
0
0
178
0
43
110
6141b6ef4fd21f9ac5a421c76159775b6c345bda
165
py
Python
worldview_dl/__init__.py
leifdenby/worldview_dl
6a1f3b72429ef6a076e9be091c1341affbe49132
[ "MIT" ]
3
2020-01-29T15:22:30.000Z
2021-07-26T19:16:36.000Z
worldview_dl/__init__.py
leifdenby/worldview_dl
6a1f3b72429ef6a076e9be091c1341affbe49132
[ "MIT" ]
null
null
null
worldview_dl/__init__.py
leifdenby/worldview_dl
6a1f3b72429ef6a076e9be091c1341affbe49132
[ "MIT" ]
1
2020-02-25T05:41:06.000Z
2020-02-25T05:41:06.000Z
"""Top-level package for worldview_dl.""" __author__ = """Leif Denby""" __email__ = 'leif@denby.eu' __version__ = '0.2.0'
20.625
41
0.721212
"""Top-level package for worldview_dl.""" __author__ = """Leif Denby""" __email__ = 'leif@denby.eu' __version__ = '0.2.0' from .worldview_dl import download_image
0
0
0
0
0
0
0
19
23
0e7fba30823dcb3d3c505815ae83a86d9ac4b0c8
357
py
Python
jobs/migrations/0002_auto_20200828_2150.py
Jacklovely/django
4c4d0d37868d774311fbb25cfab13fa9de38720e
[ "Apache-2.0" ]
63
2020-10-14T13:13:58.000Z
2022-03-22T15:55:16.000Z
jobs/migrations/0002_auto_20200828_2150.py
Jacklovely/django
4c4d0d37868d774311fbb25cfab13fa9de38720e
[ "Apache-2.0" ]
5
2021-04-08T20:24:53.000Z
2021-09-22T19:38:40.000Z
jobs/migrations/0002_auto_20200828_2150.py
pywjh/-recruitment-django
5ad7a0b725f0a1557b5b220d3197b1d9dbda5de4
[ "Apache-2.0" ]
28
2020-10-14T13:23:45.000Z
2022-02-15T09:21:17.000Z
# Generated by Django 3.1 on 2020-08-28 13:50
19.833333
74
0.588235
# Generated by Django 3.1 on 2020-08-28 13:50 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('jobs', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='job', options={'verbose_name': '职位', 'verbose_nam...
18
0
0
247
0
0
0
11
46
a6a175c4d2d171fe776ef558c02e3d3b0d4e5838
1,149
py
Python
services/backend/user/migrations/0003_group_advance_user.py
LKKTGB/thiamsu
f08d453c6b35c801c57f2501e42565da56900814
[ "MIT" ]
10
2020-08-25T08:57:36.000Z
2021-12-31T01:04:18.000Z
services/backend/user/migrations/0003_group_advance_user.py
LKKTGB/thiamsu
f08d453c6b35c801c57f2501e42565da56900814
[ "MIT" ]
13
2020-04-26T08:41:30.000Z
2021-06-10T17:34:25.000Z
services/backend/user/migrations/0003_group_advance_user.py
LKKTGB/thiamsu
f08d453c6b35c801c57f2501e42565da56900814
[ "MIT" ]
1
2020-09-06T17:54:13.000Z
2020-09-06T17:54:13.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-25 16:20 from __future__ import unicode_literals
27.357143
77
0.645779
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-25 16:20 from __future__ import unicode_literals from django.contrib.auth.models import Permission from django.db import migrations def apply_migration(apps, schema_editor): permissions = Permission.objects.filter( codename__in=[ ...
0
0
0
208
0
672
0
39
114
c519d43c44fa490c953aadb122fa789855b4f116
493
py
Python
setup.py
matthewfeickert/Python-library-template
be37034e967429e35e0d04023e1112bb936cca10
[ "Apache-2.0" ]
null
null
null
setup.py
matthewfeickert/Python-library-template
be37034e967429e35e0d04023e1112bb936cca10
[ "Apache-2.0" ]
4
2019-11-12T01:33:02.000Z
2020-05-28T02:36:45.000Z
setup.py
matthewfeickert/Python-library-template
be37034e967429e35e0d04023e1112bb936cca10
[ "Apache-2.0" ]
null
null
null
from setuptools import setup extras_require = { "develop": [ "check-manifest", "pytest~=5.2", "pytest-cov~=2.8", "pytest-console-scripts~=0.2", "bumpversion~=0.5", "pyflakes", "pre-commit", "black", "twine", ], } extras_require["complete"]...
22.409091
78
0.580122
from setuptools import setup extras_require = { "develop": [ "check-manifest", "pytest~=5.2", "pytest-cov~=2.8", "pytest-console-scripts~=0.2", "bumpversion~=0.5", "pyflakes", "pre-commit", "black", "twine", ], } extras_require["complete"]...
0
0
0
0
0
0
0
0
0
a29d434541ef7a675c0f6b6270a97532d9f6f061
1,517
py
Python
pygame/alien_invasion/button.py
chmendonca/python
4b336ebf0bc29aa4c644f0996431d13f853ac6e7
[ "MIT" ]
null
null
null
pygame/alien_invasion/button.py
chmendonca/python
4b336ebf0bc29aa4c644f0996431d13f853ac6e7
[ "MIT" ]
2
2020-04-30T15:36:56.000Z
2020-04-30T15:36:57.000Z
pygame/alien_invasion/button.py
chmendonca/python
4b336ebf0bc29aa4c644f0996431d13f853ac6e7
[ "MIT" ]
1
2022-01-17T04:11:10.000Z
2022-01-17T04:11:10.000Z
# -*- coding: utf-8 -*- """ Created on Wed May 6 08:47:35 2020 @author: Cassio (chmendonca) Description: This class will have the details to insert a button to start playing the game """
36.119048
77
0.630191
# -*- coding: utf-8 -*- """ Created on Wed May 6 08:47:35 2020 @author: Cassio (chmendonca) Description: This class will have the details to insert a button to start playing the game """ import pygame.font class Button(): def __init__(self,ai_settings,screen,msg): """Initializes the button attri...
0
0
0
1,283
0
0
0
-3
46
cbd97d3a3e2ae091948f7baa6df97a968bdf00e1
3,881
py
Python
image_generator.py
mr-yamraj/Alexa_2048_game
a85f43bc46ac53b30a223034a37cbfe54d1703cd
[ "MIT" ]
null
null
null
image_generator.py
mr-yamraj/Alexa_2048_game
a85f43bc46ac53b30a223034a37cbfe54d1703cd
[ "MIT" ]
null
null
null
image_generator.py
mr-yamraj/Alexa_2048_game
a85f43bc46ac53b30a223034a37cbfe54d1703cd
[ "MIT" ]
null
null
null
from PIL import Image, ImageDraw, ImageFont from number_dict import number_dict import boto3 from io import BytesIO destination_bucket = '2048gameyash' s3 = boto3.resource('s3') if extension in ['.png']: format = 'PNG' buffer = BytesIO() img.save(buffer, format) buffer.seek(0) obj = s3.Obje...
71.87037
331
0.679722
from PIL import Image, ImageDraw, ImageFont from number_dict import number_dict import boto3 from io import BytesIO destination_bucket = '2048gameyash' s3 = boto3.resource('s3') def curved_square(d, coordinated = (0,0), number = "0", temp = 3): width = 16-temp test_number = temp - 3 d.ellipse((coordinated[0]*(floa...
0
0
0
0
0
3,322
0
0
46
9d71e33d40fb0fc832199795c453b97ea79f4a4b
224
py
Python
const/event_consts.py
mr-cloud/event-driven-on-celery-in-flask
56bb9d81d4471411f910bed0242409d12c886809
[ "MIT" ]
null
null
null
const/event_consts.py
mr-cloud/event-driven-on-celery-in-flask
56bb9d81d4471411f910bed0242409d12c886809
[ "MIT" ]
null
null
null
const/event_consts.py
mr-cloud/event-driven-on-celery-in-flask
56bb9d81d4471411f910bed0242409d12c886809
[ "MIT" ]
null
null
null
EVENT_PREFIX = 'event#' EVENT_PREFIX_ARITHM = EVENT_PREFIX + 'arithm#' EVENT_ARITHM_ADD = EVENT_PREFIX_ARITHM + 'add' EVENT_ARITHM_SUB = EVENT_PREFIX_ARITHM + 'sub' EVENT_ARITHM_UNCLAIMED = EVENT_PREFIX_ARITHM + 'unclaimed'
37.333333
58
0.803571
EVENT_PREFIX = 'event#' EVENT_PREFIX_ARITHM = EVENT_PREFIX + 'arithm#' EVENT_ARITHM_ADD = EVENT_PREFIX_ARITHM + 'add' EVENT_ARITHM_SUB = EVENT_PREFIX_ARITHM + 'sub' EVENT_ARITHM_UNCLAIMED = EVENT_PREFIX_ARITHM + 'unclaimed'
0
0
0
0
0
0
0
0
0
bdda36bc7306b2083c1f4648222655ec39ad7244
1,668
py
Python
currencyconverter/sign.py
yueow/cryptoconverter-microservice
a76ee419239e20f9940350f81993b2aecdb4139a
[ "MIT" ]
null
null
null
currencyconverter/sign.py
yueow/cryptoconverter-microservice
a76ee419239e20f9940350f81993b2aecdb4139a
[ "MIT" ]
null
null
null
currencyconverter/sign.py
yueow/cryptoconverter-microservice
a76ee419239e20f9940350f81993b2aecdb4139a
[ "MIT" ]
null
null
null
# Request does not have 'Sign' in headers # 'Sign' does not match # Generate HMAC 'Sign' # Formating a message(e.g. 2BTCUSDT) # 'obj' could be a dict or request.POST # Verify 'Sign' in Request # Assign 'Sign' to Response
30.327273
114
0.705036
import hmac from functools import wraps from django.conf import settings class SignVerifyError(Exception): pass # Request does not have 'Sign' in headers class SignRequestEmpty(SignVerifyError): pass # 'Sign' does not match class SignDoesNotMatch(SignVerifyError): pass # Generate HMAC 'Sign' def genera...
6
0
0
77
0
1,130
0
7
222
0681474f6fc4e4f19ca3398f4b1a4f7bf6b9daac
1,066
py
Python
data_pipeline/stream/factory.py
albertteoh/data_pipeline
a99f1c7412375b3e9f4115108fcdde517b2e71a6
[ "Apache-2.0" ]
null
null
null
data_pipeline/stream/factory.py
albertteoh/data_pipeline
a99f1c7412375b3e9f4115108fcdde517b2e71a6
[ "Apache-2.0" ]
null
null
null
data_pipeline/stream/factory.py
albertteoh/data_pipeline
a99f1c7412375b3e9f4115108fcdde517b2e71a6
[ "Apache-2.0" ]
null
null
null
############################################################################### # Module: factory # Purpose: Builds instances of stream producers and consumers # # Notes: # ###############################################################################
24.227273
79
0.613508
############################################################################### # Module: factory # Purpose: Builds instances of stream producers and consumers # # Notes: # ############################################################################### from .kafka_producer import KafkaProducer from .kafka_consumer im...
0
0
0
0
0
559
0
68
181
6ae08fa9f43dec334066d46c044bc249f6cac6a6
6,945
py
Python
submit/ensemble_test/feature_extract/extractor_util.py
ubuntu733/SentencePairs
367139cdd94be36c04899c3ea01df6f58e796241
[ "Apache-2.0" ]
null
null
null
submit/ensemble_test/feature_extract/extractor_util.py
ubuntu733/SentencePairs
367139cdd94be36c04899c3ea01df6f58e796241
[ "Apache-2.0" ]
null
null
null
submit/ensemble_test/feature_extract/extractor_util.py
ubuntu733/SentencePairs
367139cdd94be36c04899c3ea01df6f58e796241
[ "Apache-2.0" ]
null
null
null
#/usr/bin/env python #coding=utf-8 """ util function """ import os import sys sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../") import math import numpy as np from mt_metrics.bleu import compute_bleu from mt_metrics.meteor import Meteor from mt_metrics.nist import NISTScore from mt...
33.229665
142
0.644492
#/usr/bin/env python #coding=utf-8 """ 定义特征抽取相关的util function """ import os import sys sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../") from sklearn.feature_extraction.text import CountVectorizer import math import numpy as np from mt_metrics.bleu import compute_bleu from mt_metric...
63
0
0
0
0
501
0
38
52
0e144f97b102c79f91aabfca536d26a5d8b12552
1,541
py
Python
setup.py
pennyfx/tda-api
96cd045648c9f7f6084682c1b4d14c6f9f66ce9c
[ "MIT" ]
null
null
null
setup.py
pennyfx/tda-api
96cd045648c9f7f6084682c1b4d14c6f9f66ce9c
[ "MIT" ]
null
null
null
setup.py
pennyfx/tda-api
96cd045648c9f7f6084682c1b4d14c6f9f66ce9c
[ "MIT" ]
null
null
null
import setuptools with open('README.rst', 'r') as f: long_description = f.read() with open('tda/version.py', 'r') as f: '''Version looks like `version = '1.2.3'`''' version = [s.strip() for s in f.read().strip().split('=')][1] version = version[1:-1] setuptools.setup( name='tda-api', version=...
32.787234
75
0.617132
import setuptools with open('README.rst', 'r') as f: long_description = f.read() with open('tda/version.py', 'r') as f: '''Version looks like `version = '1.2.3'`''' version = [s.strip() for s in f.read().strip().split('=')][1] version = version[1:-1] setuptools.setup( name='tda-api', version=...
0
0
0
0
0
0
0
0
0
33b5197079b8ac37d0483383a9fcf7436a77563a
10,085
py
Python
bigbench/benchmark_tasks/diverse_social_bias/task.py
mswedrowski/BIG-bench
0927d64905b26f08f851d408f7bb2d7bf1a0e4fa
[ "Apache-2.0" ]
460
2021-01-26T21:23:37.000Z
2022-03-31T15:55:10.000Z
bigbench/benchmark_tasks/diverse_social_bias/task.py
mswedrowski/BIG-bench
0927d64905b26f08f851d408f7bb2d7bf1a0e4fa
[ "Apache-2.0" ]
475
2021-01-27T01:29:01.000Z
2022-03-30T20:23:56.000Z
bigbench/benchmark_tasks/diverse_social_bias/task.py
mswedrowski/BIG-bench
0927d64905b26f08f851d408f7bb2d7bf1a0e4fa
[ "Apache-2.0" ]
305
2021-01-26T23:28:11.000Z
2022-03-31T14:51:26.000Z
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
48.253589
141
0.586217
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
0
0
0
9,232
0
0
0
-27
89
a37fc705897f724ba3abc2f45007016477aced47
215
py
Python
turtle_graphics_study/study6.py
Rorima/python-exercises
2b041d73fe9b927ca875a9f3a4d7fd486c0da2f4
[ "MIT" ]
null
null
null
turtle_graphics_study/study6.py
Rorima/python-exercises
2b041d73fe9b927ca875a9f3a4d7fd486c0da2f4
[ "MIT" ]
null
null
null
turtle_graphics_study/study6.py
Rorima/python-exercises
2b041d73fe9b927ca875a9f3a4d7fd486c0da2f4
[ "MIT" ]
null
null
null
import turtle import random tt = turtle.Turtle() tt.speed(0) tt.color('blue') for _ in range(random.randint(1, 100)): tt.forward(random.randint(0, 50)) tt.setheading(random.randint(0, 360)) turtle.done()
16.538462
41
0.693023
import turtle import random tt = turtle.Turtle() tt.speed(0) tt.color('blue') for _ in range(random.randint(1, 100)): tt.forward(random.randint(0, 50)) tt.setheading(random.randint(0, 360)) turtle.done()
0
0
0
0
0
0
0
0
0
66d660a357dc00e59853a85d96bd61e578f5439a
443
py
Python
filemanager/urls.py
sriegodedios/cloudstorageapp
e26a23c661f6507a28261a34b00c12330ef0ed0d
[ "MIT" ]
null
null
null
filemanager/urls.py
sriegodedios/cloudstorageapp
e26a23c661f6507a28261a34b00c12330ef0ed0d
[ "MIT" ]
null
null
null
filemanager/urls.py
sriegodedios/cloudstorageapp
e26a23c661f6507a28261a34b00c12330ef0ed0d
[ "MIT" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('', views.upload_file, name='index'), #path('song/<int:id>/', views.song), #path('hello-webpack/', TemplateView.as_view(template_name='filemanager/reactupload.html')), path('go/', views.upl...
40.272727
107
0.629797
from django.contrib import admin from django.urls import path from . import views from django.views.generic.base import TemplateView urlpatterns = [ path('', views.upload_file, name='index'), #path('song/<int:id>/', views.song), #path('hello-webpack/', TemplateView.as_view(...
0
0
0
0
0
0
0
40
44
4a65931d3f04aaf5ab2bc8a5c68c90895b267752
7,343
py
Python
homeassistant/components/surepetcare/__init__.py
edofullin/core
106dc4d28ad59cb192c60fc7a354cafa86899ea4
[ "Apache-2.0" ]
1
2020-12-18T12:23:04.000Z
2020-12-18T12:23:04.000Z
homeassistant/components/surepetcare/__init__.py
edofullin/core
106dc4d28ad59cb192c60fc7a354cafa86899ea4
[ "Apache-2.0" ]
60
2020-07-06T15:10:30.000Z
2022-03-31T06:01:46.000Z
homeassistant/components/surepetcare/__init__.py
edofullin/core
106dc4d28ad59cb192c60fc7a354cafa86899ea4
[ "Apache-2.0" ]
4
2017-01-10T04:17:33.000Z
2021-09-02T16:37:24.000Z
"""Support for Sure Petcare cat/pet flaps.""" from __future__ import annotations import logging import voluptuous as vol from homeassistant.const import (CONF_PASSWORD, CONF_SCAN_INTERVAL, CONF_USERNAME) from homeassistant.helpers import config_validation as cv from .const import (CONF_FEEDERS, CONF_FLAPS, CONF_PETS...
30.983122
103
0.607517
"""Support for Sure Petcare cat/pet flaps.""" from __future__ import annotations import logging from typing import Any from surepy import ( MESTART_RESOURCE, SureLockStateID, SurePetcare, SurePetcareAuthenticationError, SurePetcareError, SurepyProduct, ) import voluptuous as vol from homeassi...
0
0
5,169
357
0
0
0
522
157
ee11b575a9afe8f142189a8bdf8beff9c8ab9719
20,831
py
Python
src/neurlink/nerves/nerve.py
tjyuyao/neurlink
6077c526704c5cc57f88eb9ea1e03b1dc9dccba3
[ "MIT" ]
null
null
null
src/neurlink/nerves/nerve.py
tjyuyao/neurlink
6077c526704c5cc57f88eb9ea1e03b1dc9dccba3
[ "MIT" ]
null
null
null
src/neurlink/nerves/nerve.py
tjyuyao/neurlink
6077c526704c5cc57f88eb9ea1e03b1dc9dccba3
[ "MIT" ]
null
null
null
from __future__ import annotations _NEURLINK_META_KEY_ = "_neurlink_meta_" NEURLINK_META_NOT_FOUND = "NEURLINK_META_NOT_FOUND" # `_NB` is the single unique instance of `_NerveRegistry` class. _NB = _NerveRegistry("_NB")
35.669521
106
0.58533
from __future__ import annotations from copy import copy from functools import partial, wraps import sys import traceback import itertools from dataclasses import dataclass from math import prod from typing import Callable, Dict, List, Tuple, Union from collections.abc import Sequence import torch from typing_extensi...
0
2,302
0
16,682
349
464
0
208
589
b5c07c1999705aafac99819276cf22602a69bfbd
267
py
Python
ptpython/config.py
swapnilmj/dotfiles
49d9abec5ec062946ad577c6b9c597d6fe273fa1
[ "MIT" ]
null
null
null
ptpython/config.py
swapnilmj/dotfiles
49d9abec5ec062946ad577c6b9c597d6fe273fa1
[ "MIT" ]
1
2019-07-14T08:24:54.000Z
2019-07-14T08:24:54.000Z
ptpython/config.py
swapnilmj/dotfiles
49d9abec5ec062946ad577c6b9c597d6fe273fa1
[ "MIT" ]
null
null
null
__all__ = ( 'configure', ) def configure(repl): """ Configuration method. This is called during the start-up of ptpython. :param repl: `PythonRepl` instance. """ # Use this colorscheme for the code. repl.use_code_colorscheme('fruity')
17.8
73
0.651685
__all__ = ( 'configure', ) def configure(repl): """ Configuration method. This is called during the start-up of ptpython. :param repl: `PythonRepl` instance. """ # Use this colorscheme for the code. repl.use_code_colorscheme('fruity')
0
0
0
0
0
0
0
0
0
ad64b60a53d7ccb24d5a82ae57892fedc697730d
821
py
Python
commons/resource_management.py
hyperthunk/commons
70bd89ed6d14463c6ede458f8ca4d6f681c8da51
[ "BSD-3-Clause" ]
null
null
null
commons/resource_management.py
hyperthunk/commons
70bd89ed6d14463c6ede458f8ca4d6f681c8da51
[ "BSD-3-Clause" ]
null
null
null
commons/resource_management.py
hyperthunk/commons
70bd89ed6d14463c6ede458f8ca4d6f681c8da51
[ "BSD-3-Clause" ]
1
2018-09-19T01:05:53.000Z
2018-09-19T01:05:53.000Z
#!/usr/bin/env python # resource management def resourcemanager(acquire, release): """ Create a resource management function wrapped by contextlib.contextmanager. The supplied functions are used in the appropriate lifecycle phases. Example: class Disposable(object): def __init__(self, oth...
24.147059
81
0.601705
#!/usr/bin/env python from contextlib import contextmanager # resource management def resourcemanager(acquire, release): """ Create a resource management function wrapped by contextlib.contextmanager. The supplied functions are used in the appropriate lifecycle phases. Example: class Disposable(...
0
139
0
0
0
0
0
16
49
1a0f9972c27ddef89c2e33e668cc3f6c41da3521
96
py
Python
venv/lib/python3.8/site-packages/setuptools/_distutils/dep_util.py
Retraces/UkraineBot
3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/setuptools/_distutils/dep_util.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/setuptools/_distutils/dep_util.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/1a/e4/7d/230fe3cd9464c9e989e475fcac1ff0446c642017019b5aa1e78afbce19
96
96
0.895833
/home/runner/.cache/pip/pool/1a/e4/7d/230fe3cd9464c9e989e475fcac1ff0446c642017019b5aa1e78afbce19
0
0
0
0
0
0
0
0
0
71e23a42470c8192f8713725e25e5910b117230f
553
py
Python
tests/data/setup.py
erny/single-source
42369f80c4358eb4b41ab33223fe6ddf11a6fc8b
[ "MIT" ]
null
null
null
tests/data/setup.py
erny/single-source
42369f80c4358eb4b41ab33223fe6ddf11a6fc8b
[ "MIT" ]
null
null
null
tests/data/setup.py
erny/single-source
42369f80c4358eb4b41ab33223fe6ddf11a6fc8b
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup setup( name="HelloWorld", version="1.1.1.beta10", packages=find_packages(), scripts=["say_hello.py"], # Project uses reStructuredText, so ensure that the docutils get # installed or upgraded on the target machine install_requires=["docutils>=0.3"]...
30.722222
72
0.622061
from setuptools import find_packages, setup setup( name="HelloWorld", version="1.1.1.beta10", packages=find_packages(), scripts=["say_hello.py"], # Project uses reStructuredText, so ensure that the docutils get # installed or upgraded on the target machine install_requires=["docutils>=0.3"]...
0
0
0
0
0
0
0
0
0
40a3db87f992606dc5d2275f2e4df019b0b33c0c
324
py
Python
exercise/newfile73.py
LeeBeral/python
9f0d360d69ee5245e3ef13a9dc9fc666374587a4
[ "MIT" ]
null
null
null
exercise/newfile73.py
LeeBeral/python
9f0d360d69ee5245e3ef13a9dc9fc666374587a4
[ "MIT" ]
null
null
null
exercise/newfile73.py
LeeBeral/python
9f0d360d69ee5245e3ef13a9dc9fc666374587a4
[ "MIT" ]
null
null
null
from functools import reduce alist = [1,-5,-8,3,-15,8,4,34,76,3,48,64,-7,6,-9,53] print(alist) blist = sorted(alist,key=lambda x:(x<0,abs(x + 1))) clist = list(filter(lambda x:x % 3 == 0,alist)) print(blist) print(clist) clist = reduce(lambda a, b: '{}, {}'.format(a,b), [1, 2, 3, 4, 5, 6, 7, 8, 9]) print(cl...
29.454545
79
0.589506
from functools import reduce alist = [1,-5,-8,3,-15,8,4,34,76,3,48,64,-7,6,-9,53] print(alist) blist = sorted(alist,key=lambda x:(x<0,abs(x + 1))) clist = list(filter(lambda x:x % 3 == 0,alist)) print(blist) print(clist) clist = reduce(lambda a, b: '{}, {}'.format(a,b), [1, 2, 3, 4, 5, 6, 7, 8, 9]) print(cl...
0
0
0
0
0
0
0
0
0
49535a406cfecb00e29df071b55ce005fc25b5bd
3,193
py
Python
ENV/lib/python3.5/site-packages/pyrogram/client/methods/messages/get_messages.py
block1o1/CryptoPredicted
7f660cdc456fb8252b3125028f31fd6f5a3ceea5
[ "MIT" ]
4
2021-10-14T21:22:25.000Z
2022-03-12T19:58:48.000Z
ENV/lib/python3.5/site-packages/pyrogram/client/methods/messages/get_messages.py
inevolin/CryptoPredicted
7f660cdc456fb8252b3125028f31fd6f5a3ceea5
[ "MIT" ]
null
null
null
ENV/lib/python3.5/site-packages/pyrogram/client/methods/messages/get_messages.py
inevolin/CryptoPredicted
7f660cdc456fb8252b3125028f31fd6f5a3ceea5
[ "MIT" ]
1
2022-03-15T22:52:53.000Z
2022-03-15T22:52:53.000Z
# Pyrogram - Telegram MTProto API Client Library for Python # Copyright (C) 2017-2018 Dan Ts <https://github.com/delivrance> # # This file is part of Pyrogram. # # Pyrogram is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free So...
40.417722
116
0.629189
# Pyrogram - Telegram MTProto API Client Library for Python # Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance> # # This file is part of Pyrogram. # # Pyrogram is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free S...
2
0
0
2,283
0
0
0
35
68
e906bcf85b83db66c54772013c4429f5914ec3ee
1,347
py
Python
twitter_services/models.py
vincentfung13/TwitterRepManagement
f04e3460f234cf95d288e47a24554cc220b41b12
[ "MIT" ]
1
2016-01-16T15:32:29.000Z
2016-01-16T15:32:29.000Z
twitter_services/models.py
vincentfung13/TwitterRepManagement
f04e3460f234cf95d288e47a24554cc220b41b12
[ "MIT" ]
7
2015-11-16T00:32:29.000Z
2016-04-05T03:03:27.000Z
twitter_services/models.py
vincentfung13/TwitterRepManagement
f04e3460f234cf95d288e47a24554cc220b41b12
[ "MIT" ]
null
null
null
# Create your models here. # Extra fields to be added in the json file: related_entity, reputation_dimension, sentiment_score # Table to store training set of tweets # Table for statistics, the front end will use the data in this table to draw graphs
39.617647
109
0.749072
from django.db import models from django.utils import timezone from django.contrib.postgres.fields import JSONField # Create your models here. # Extra fields to be added in the json file: related_entity, reputation_dimension, sentiment_score class Tweet(models.Model): tweet_id = models.CharField(max_length=50, pr...
0
0
0
908
0
0
0
50
133
f88416c0843fbba41fe15bfc849767c5def293aa
3,815
py
Python
DeepNDMultipleExecution.py
ciceklab/DeepND
ea01eed3c83035ce088522785a134947c645a7a3
[ "CNRI-Python", "Linux-OpenIB" ]
9
2020-06-13T21:00:44.000Z
2021-09-05T11:11:44.000Z
DeepNDMultipleExecution.py
ciceklab/DeepND
ea01eed3c83035ce088522785a134947c645a7a3
[ "CNRI-Python", "Linux-OpenIB" ]
null
null
null
DeepNDMultipleExecution.py
ciceklab/DeepND
ea01eed3c83035ce088522785a134947c645a7a3
[ "CNRI-Python", "Linux-OpenIB" ]
2
2021-05-06T18:37:02.000Z
2022-02-21T09:17:26.000Z
import torch import pandas as pd outF = open("random_results.csv", "w") for i in range(26, 100): thread_function(str(i)) if i < 10: name = "0" + str(i) else: name = str(i) heatmap = torch.load("mt_with_identity_newidset_moepli_randomlabelsExp" + name + "/asdExpertPro...
41.467391
151
0.60865
import os import torch import pandas as pd def thread_function(name): print("Starting execution with id:", name) file1 = open('config', 'r') Lines = file1.readlines() outF = open("nextconfig", "w") count = 0 # Strips the newline character for line in Lines: if(line[0] ...
0
0
0
0
0
1,017
0
-12
46
fcf096c31531e6c5c906787b845faf6c3976a3be
4,134
py
Python
src/lib/models/utils.py
voidrank/SaccadeNet
b24266c15a4fe999a0f1447e2ada127fe0bc136f
[ "MIT" ]
32
2020-05-26T13:55:33.000Z
2022-03-21T08:33:15.000Z
src/lib/models/utils.py
voidrank/SaccadeNet
b24266c15a4fe999a0f1447e2ada127fe0bc136f
[ "MIT" ]
4
2020-09-15T08:46:50.000Z
2021-12-28T11:18:53.000Z
src/lib/models/utils.py
voidrank/SaccadeNet
b24266c15a4fe999a0f1447e2ada127fe0bc136f
[ "MIT" ]
12
2020-06-10T01:05:47.000Z
2021-10-06T04:48:01.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch.nn as nn
34.45
106
0.522738
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import torch import torch.nn as nn def _sigmoid(x): y = torch.clamp(x.sigmoid_(), min=1e-4, max=1-1e-4) return y def _gather_feat(feat, ind, mask=None): dim = feat.size(2) ind...
0
0
0
0
0
3,762
0
-12
253
a1a2ce787c23ad2aa67a143b3739c097c023427f
13,332
py
Python
lib/ansible/module_utils/network/solace/solace_cloud_utils.py
solace-iot-team/ansible-solace-modules
b827c5a8650697c3f54781f1a62e86bce3ccc476
[ "MIT" ]
null
null
null
lib/ansible/module_utils/network/solace/solace_cloud_utils.py
solace-iot-team/ansible-solace-modules
b827c5a8650697c3f54781f1a62e86bce3ccc476
[ "MIT" ]
null
null
null
lib/ansible/module_utils/network/solace/solace_cloud_utils.py
solace-iot-team/ansible-solace-modules
b827c5a8650697c3f54781f1a62e86bce3ccc476
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------------------------------- # MIT License # # Copyright (c) 2020, Solace Corporation, Ricardo Gomez-Ulmke (ricardo.gomez-ulmke@solace.com) # Copyright (c) 2020, Solace Corporation, Swen-Helge Huber <swen-helge....
39.327434
123
0.584383
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------------------------------- # MIT License # # Copyright (c) 2020, Solace Corporation, Ricardo Gomez-Ulmke (ricardo.gomez-ulmke@solace.com) # Copyright (c) 2020, Solace Corporation, Swen-Helge Huber <swen-helge....
0
0
0
8,031
0
2,553
0
18
437
9842b3e48e3abf77716fb65064713432983905ec
1,882
py
Python
src/multiprocessing_main.py
nhat-le/scraper
ca8344dbf39a6dc71b2dbeae0e0bf664cd87c141
[ "MIT" ]
null
null
null
src/multiprocessing_main.py
nhat-le/scraper
ca8344dbf39a6dc71b2dbeae0e0bf664cd87c141
[ "MIT" ]
null
null
null
src/multiprocessing_main.py
nhat-le/scraper
ca8344dbf39a6dc71b2dbeae0e0bf664cd87c141
[ "MIT" ]
null
null
null
from multiprocessing import Process from scrapers.poland import PolandScraper from scrapers.moldova_ro import MoldovaScraper from scrapers.hungary_hu import HungaryScraper from scrapers.romaina_ro import RomaniaScraper # # Country switch. # if __name__ == "__main__": # # Default value which is 'ALL'. # ...
29.40625
76
0.693411
from multiprocessing import Process from scrapers.poland import PolandScraper from scrapers.moldova_ro import MoldovaScraper from scrapers.hungary_hu import HungaryScraper from scrapers.romaina_ro import RomaniaScraper # # Country switch. # def switch_country(country): country_switch = { 0: "ALL", ...
0
0
0
0
0
221
0
0
22
c2803d2e8300220c7fcc5db6b456fd52f0cccc90
4,483
py
Python
rlpy/domains/lifegame_survival.py
kngwyu/rlpy
329166de28d311d8f87358a62c38f40a7318fe07
[ "BSD-3-Clause" ]
3
2019-12-07T13:34:02.000Z
2021-03-29T10:20:05.000Z
rlpy/domains/lifegame_survival.py
kngwyu/rlpy
329166de28d311d8f87358a62c38f40a7318fe07
[ "BSD-3-Clause" ]
14
2019-09-29T03:09:09.000Z
2022-01-13T03:17:48.000Z
rlpy/domains/lifegame_survival.py
kngwyu/rlpy3
329166de28d311d8f87358a62c38f40a7318fe07
[ "BSD-3-Clause" ]
null
null
null
__license__ = "BSD 3-Clause" __author__ = "Yuji Kanagawa" RULE_REGISTORY = { "life": LifeGame, "dry": DryLife, "seeds": Seeds, }
29.688742
85
0.595583
from abc import ABC, abstractmethod import itertools import numpy as np from rlpy.tools import __rlpy_location__ from pathlib import Path from .grid_world import GridWorld __license__ = "BSD 3-Clause" __author__ = "Yuji Kanagawa" class LifeLike(ABC): """Rule of life-like cellular automaton """ @abstra...
0
51
0
3,994
0
0
0
40
248
dbead58b18cf0c2145b8373ec2e92272926ce437
960
py
Python
orders/models.py
shouvikpatra/Food-Delivery-System
a81b82d2e486771046071db9c9fd5004f81e1e3b
[ "MIT" ]
null
null
null
orders/models.py
shouvikpatra/Food-Delivery-System
a81b82d2e486771046071db9c9fd5004f81e1e3b
[ "MIT" ]
null
null
null
orders/models.py
shouvikpatra/Food-Delivery-System
a81b82d2e486771046071db9c9fd5004f81e1e3b
[ "MIT" ]
null
null
null
# Create your models here.
33.103448
71
0.6375
from django.db import models # Create your models here. class Order(models.Model): category = (('Confirmed', 'Confirmed'), ('Preparing', 'Preparing'), ('Out for Delivery', 'Out for Delivery'), ('Delivered', 'Delivered'), ('Cancelled', 'Cancelled'),...
0
0
0
854
0
0
0
7
68
ccf63348ddb21ed87ff20437b40f6ae82ccf9b9b
1,596
py
Python
stem/irregular/irregular.py
cltk/pali_models_cltk
59bb60994abfb551065979c7406bb5890f96cdef
[ "MIT" ]
null
null
null
stem/irregular/irregular.py
cltk/pali_models_cltk
59bb60994abfb551065979c7406bb5890f96cdef
[ "MIT" ]
null
null
null
stem/irregular/irregular.py
cltk/pali_models_cltk
59bb60994abfb551065979c7406bb5890f96cdef
[ "MIT" ]
null
null
null
#tools for extractive endings from xml files #provides a list of irregualar nouns #provides a list of irregualar numerals #checks if input word is an irregular noun #returns true if so #checks if input word is an irregular numeral #returns true if so #provides a list of indeclinables (endings) - not ...
26.6
61
0.652882
import re import irregularData import xml.etree.ElementTree as ET #tools for extractive endings from xml files def extractTextFromElement(elementName, stringofxml,out=[]): tree = ET.fromstring(stringofxml) for child in tree.iter(): if child.tag == elementName: if (child.text.strip(...
0
0
0
0
0
1,032
0
0
232
d275c583b2617245272aac9a4de51eb82909a03d
544
py
Python
n_petrol_bunk.py
pranavdave893/Leetcode
1f30ea37af7b60585d168b15d9397143f53c92a1
[ "MIT" ]
null
null
null
n_petrol_bunk.py
pranavdave893/Leetcode
1f30ea37af7b60585d168b15d9397143f53c92a1
[ "MIT" ]
null
null
null
n_petrol_bunk.py
pranavdave893/Leetcode
1f30ea37af7b60585d168b15d9397143f53c92a1
[ "MIT" ]
null
null
null
t = int(input()) n = int(input) while(t !=0): x = list(map(int,input().strip(' ').split(' '))) f = [] d = [] j = 1 i = 0 while (j<len(x)-1 or i < len(x)-1): f.append(x[i]) i = i + 2 d.append(x[j]) j = j + 2 i= 0 min_fuel = 1 last = 0 while(i<len(f...
14.702703
52
0.363971
t = int(input()) n = int(input) while(t !=0): x = list(map(int,input().strip(' ').split(' '))) f = [] d = [] j = 1 i = 0 while (j<len(x)-1 or i < len(x)-1): f.append(x[i]) i = i + 2 d.append(x[j]) j = j + 2 i= 0 min_fuel = 1 last = 0 while(i<len(f...
0
0
0
0
0
0
0
0
0
689b9d842181e4eb8829a8ca397f56d9537467bd
8,998
py
Python
pytext/data/xlm_tensorizer.py
baronrustamov/pytext
9790943736e7c0ac53095be2e20177be6fc529a9
[ "BSD-3-Clause" ]
6,199
2018-12-13T15:34:51.000Z
2022-03-26T04:08:58.000Z
pytext/data/xlm_tensorizer.py
baronrustamov/pytext
9790943736e7c0ac53095be2e20177be6fc529a9
[ "BSD-3-Clause" ]
1,356
2018-12-13T15:50:33.000Z
2022-03-03T20:45:58.000Z
pytext/data/xlm_tensorizer.py
baronrustamov/pytext
9790943736e7c0ac53095be2e20177be6fc529a9
[ "BSD-3-Clause" ]
842
2018-12-13T15:35:13.000Z
2022-03-23T13:27:00.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
38.452991
86
0.637697
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from typing import Any, Dict, List, Optional, Tuple import torch from fairseq.data.legacy.masked_lm_dictionary import MaskedLMDictionary from pytext.common.constants import SpecialTokens from pytext.config.component import C...
0
1,646
0
6,494
0
0
0
428
334
e5114b3235a3c8543ccfc3031a1c6d571ad9dee9
188
py
Python
Auxiliary/python/__init__.py
dr-stringfellow/SUEPProd
23080a1cdbca6692ed279d43e5b4ae4ae12c91c5
[ "MIT" ]
null
null
null
Auxiliary/python/__init__.py
dr-stringfellow/SUEPProd
23080a1cdbca6692ed279d43e5b4ae4ae12c91c5
[ "MIT" ]
null
null
null
Auxiliary/python/__init__.py
dr-stringfellow/SUEPProd
23080a1cdbca6692ed279d43e5b4ae4ae12c91c5
[ "MIT" ]
null
null
null
#Automatically created by SCRAM import os __path__.append(os.path.dirname(os.path.abspath(__file__).rsplit('/SUEPProd/Auxiliary/',1)[0])+'/cfipython/slc7_amd64_gcc700/SUEPProd/Auxiliary')
47
145
0.803191
#Automatically created by SCRAM import os __path__.append(os.path.dirname(os.path.abspath(__file__).rsplit('/SUEPProd/Auxiliary/',1)[0])+'/cfipython/slc7_amd64_gcc700/SUEPProd/Auxiliary')
0
0
0
0
0
0
0
0
0
86a84d9477124ddfc3979ca990da4737c1d25ce5
497
py
Python
forex-converter/index.py
accubits/currency-converter-python
be5aa73344b22c6a87b58085170e48cad22881fe
[ "MIT" ]
1
2020-02-28T14:10:36.000Z
2020-02-28T14:10:36.000Z
forex-converter/index.py
accubits/currency-converter-python
be5aa73344b22c6a87b58085170e48cad22881fe
[ "MIT" ]
null
null
null
forex-converter/index.py
accubits/currency-converter-python
be5aa73344b22c6a87b58085170e48cad22881fe
[ "MIT" ]
null
null
null
from classes import currency_converter converter = currency_converter.ABCurrencyConv()
19.88
67
0.653924
from classes import currency_converter converter = currency_converter.ABCurrencyConv() def get_currencies(): try: data = converter.acquireData() currencies = list(data) return currencies except Exception as e: print(e) return False def convert(from_currency, to_curr...
0
0
0
0
0
360
0
0
46
4463da96ebb4a98c85886ef4a5b9a0f674d9104b
1,693
py
Python
split_qa.py
Aakriti28/Generative_chatbot
152f2ef227a700c0314ab5810244ab90006e4bcd
[ "Apache-2.0" ]
351
2017-07-10T13:45:42.000Z
2022-03-31T20:35:03.000Z
split_qa.py
Aakriti28/Generative_chatbot
152f2ef227a700c0314ab5810244ab90006e4bcd
[ "Apache-2.0" ]
32
2017-07-10T17:07:59.000Z
2020-06-03T13:48:33.000Z
split_qa.py
Aakriti28/Generative_chatbot
152f2ef227a700c0314ab5810244ab90006e4bcd
[ "Apache-2.0" ]
113
2017-07-10T13:34:45.000Z
2021-09-06T03:10:28.000Z
# -*- coding: utf-8 -*- __author__ = 'Oswaldo Ludwig' __version__ = '1.01' text = open('dialog_simple', 'r') q = open('context', 'w') a = open('answers', 'w') pre_pre_previous_raw='' pre_previous_raw='' previous_raw='' person = ' ' previous_person=' ' l1 = ['wont','won\'t','wouldnt','wouldn\'t','m', 're', 've', 'll'...
32.557692
250
0.470171
# -*- coding: utf-8 -*- __author__ = 'Oswaldo Ludwig' __version__ = '1.01' import numpy as np text = open('dialog_simple', 'r') q = open('context', 'w') a = open('answers', 'w') pre_pre_previous_raw='' pre_previous_raw='' previous_raw='' person = ' ' previous_person=' ' l1 = ['won’t','won\'t','wouldn’t','wouldn\'t'...
27
0
0
0
0
0
0
-3
23
4d443c8e3d1f8e9bc4cd710516a2d47b5b3381d4
4,134
py
Python
fuzzycd.py
pboi20/fuzzycd
c7360c97d82e27f57b55bfd0b13849afcf9d223f
[ "MIT" ]
null
null
null
fuzzycd.py
pboi20/fuzzycd
c7360c97d82e27f57b55bfd0b13849afcf9d223f
[ "MIT" ]
null
null
null
fuzzycd.py
pboi20/fuzzycd
c7360c97d82e27f57b55bfd0b13849afcf9d223f
[ "MIT" ]
null
null
null
from __future__ import print_function from collections import namedtuple VERSION="0.1" RATIO = "ratio" KEYWORD = "keyword" FOLLOW_LINKS_DEFAULT = True INCLUDE_HIDDEN_DEFAULT = False AppConfig = namedtuple("AppConfig", [ "version", "follow_links", "include_hidden", "as_list", "search", "first" ]) if __n...
28.909091
77
0.640542
from __future__ import print_function import argparse import difflib import os from os import path from collections import namedtuple VERSION="0.1" RATIO = "ratio" KEYWORD = "keyword" FOLLOW_LINKS_DEFAULT = True INCLUDE_HIDDEN_DEFAULT = False AppConfig = namedtuple("AppConfig", [ "version", "follow_links", "inc...
0
0
0
0
0
3,502
0
-27
249
dfc56a8080dc43bcd5bcaed022d5d6a8955df0de
31,865
py
Python
pdf_table_builder/builder.py
cutomsols/pdf-table-builder
3c66dc3b4783185bcc1223b6cd7faa5a2c96b67f
[ "MIT" ]
null
null
null
pdf_table_builder/builder.py
cutomsols/pdf-table-builder
3c66dc3b4783185bcc1223b6cd7faa5a2c96b67f
[ "MIT" ]
null
null
null
pdf_table_builder/builder.py
cutomsols/pdf-table-builder
3c66dc3b4783185bcc1223b6cd7faa5a2c96b67f
[ "MIT" ]
null
null
null
import os from io import BytesIO from django.db.models.fields.files import FieldFile from reportlab.lib.pagesizes import A4 from reportlab.lib.styles import getSampleStyleSheet from reportlab.platypus import Image from reportlab.platypus import Paragraph, Table, TableStyle styles = getSampleStyleSheet() styleN = style...
39.931078
120
0.524651
import os from io import BytesIO from PIL import Image as pilim from django.db.models.fields.files import FieldFile from reportlab.lib import colors from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER from reportlab.lib.pagesizes import A4 from reportlab.lib.styles import getSampleStyleSheet from reportlab.li...
200
0
0
3,243
0
20,458
0
866
540
efd9c713e24a31c2aaa22a4a8b0cab6c7037117b
1,773
py
Python
AlgorithmsPractice/python/99___________hard_Recovery Binary Search Tree.py
YangXiaoo/NoteBook
37056acad7a05b876832f72ac34d3d1a41e0dd22
[ "CNRI-Python", "RSA-MD", "CECILL-B" ]
58
2019-03-03T04:42:23.000Z
2022-01-13T04:36:31.000Z
AlgorithmsPractice/python/99___________hard_Recovery Binary Search Tree.py
YangXiaoo/NoteBook
37056acad7a05b876832f72ac34d3d1a41e0dd22
[ "CNRI-Python", "RSA-MD", "CECILL-B" ]
null
null
null
AlgorithmsPractice/python/99___________hard_Recovery Binary Search Tree.py
YangXiaoo/NoteBook
37056acad7a05b876832f72ac34d3d1a41e0dd22
[ "CNRI-Python", "RSA-MD", "CECILL-B" ]
28
2019-08-11T01:25:00.000Z
2021-08-22T06:46:06.000Z
""" Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Example 1: Input: [1,3,null,null,2] 1 / 3 \ 2 Output: [3,1,null,null,2] 3 / 1 \ 2 Example 2: Input: [3,1,4,null,null,2] 3 / \ 1 4 / 2 Output: [2,1,4,null,null,...
19.483516
164
0.58432
""" Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Example 1: Input: [1,3,null,null,2] 1 / 3 \ 2 Output: [3,1,null,null,2] 3 / 1 \ 2 Example 2: Input: [3,1,4,null,null,2] 3 / \ 1 4 / 2 Output: [2,1,4,null,null,...
714
0
0
756
0
0
0
0
44
daed296c05d5c213054aa7072af573649d497bda
21,117
py
Python
portal/forms.py
leodiasp/abcmobile
470966239230becc1d52cbd7c2794d9572915dfd
[ "MIT" ]
null
null
null
portal/forms.py
leodiasp/abcmobile
470966239230becc1d52cbd7c2794d9572915dfd
[ "MIT" ]
null
null
null
portal/forms.py
leodiasp/abcmobile
470966239230becc1d52cbd7c2794d9572915dfd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # class TurmaForm(forms.ModelForm): # class Meta: # # model = Turma # #instituicao = models.ForeignKey(Instituicao, null=True) # # fields = ['codigo','nome','abreviacao'] # # widgets = { # # # 'instituicao': forms.Select(attrs={ # # ...
46.926667
166
0.509211
# -*- coding: utf-8 -*- from django.forms import ModelForm from django import forms from portal.models import * from django.forms.widgets import ClearableFileInput from django.contrib.admin.widgets import AdminDateWidget class UserForm(forms.ModelForm): imagem = forms.ImageField(widget=ClearableFileInput) ...
144
0
0
16,402
0
0
0
87
273
1f67ca732f4768c0f89c8c5b60632b1a336b3e52
11,859
py
Python
schedule.py
tom-andersson/neuralprocesses
7696dc1c8bbe922fb2a1ba18fe0cdda041fc9cfd
[ "MIT" ]
null
null
null
schedule.py
tom-andersson/neuralprocesses
7696dc1c8bbe922fb2a1ba18fe0cdda041fc9cfd
[ "MIT" ]
null
null
null
schedule.py
tom-andersson/neuralprocesses
7696dc1c8bbe922fb2a1ba18fe0cdda041fc9cfd
[ "MIT" ]
null
null
null
import asyncio import asyncio.subprocess import os import signal import subprocess import wbml.out as out spawned = [] def read_values(xs, sep, *values): """Read values from a string. Args: xs (str): Values as one string. sep (str): Separator separating the values in the string. *va...
32.669421
88
0.555696
import argparse import asyncio import asyncio.subprocess import os import signal import subprocess import wbml.out as out spawned = [] def read_values(xs, sep, *values): """Read values from a string. Args: xs (str): Values as one string. sep (str): Separator separating the values in the str...
0
0
9,055
0
0
0
0
-6
91
0b50c280d33c179648371aa87013a25c5def39d1
1,970
py
Python
app/api/clustering.py
story-squad/py-story-squad-DS
dc56a1dc22be3d8bd2f1a23f8d90090b025cebc1
[ "MIT" ]
1
2021-04-13T04:17:44.000Z
2021-04-13T04:17:44.000Z
app/api/clustering.py
story-squad/py-story-squad-DS
dc56a1dc22be3d8bd2f1a23f8d90090b025cebc1
[ "MIT" ]
null
null
null
app/api/clustering.py
story-squad/py-story-squad-DS
dc56a1dc22be3d8bd2f1a23f8d90090b025cebc1
[ "MIT" ]
null
null
null
import logging from fastapi import APIRouter # global variables and services router = APIRouter() log = logging.getLogger(__name__)
28.970588
77
0.481218
import logging from fastapi import APIRouter from app.utils.clustering.clustering_mvp import batch_cluster # global variables and services router = APIRouter() log = logging.getLogger(__name__) @router.post("/cluster") async def cluster_endpoint(sub: dict): """Endpoint takes a list of cohort and submission ob...
0
1,748
0
0
0
0
0
40
46
6aa46f121b809661021cf62768a5e82dbdfbf2ba
7,464
py
Python
creme/metrics/precision.py
Raul9595/creme
39cec7ac27ccd40ff0a7bdd6bceaf7ce25c1a8da
[ "BSD-3-Clause" ]
1
2020-07-27T03:06:46.000Z
2020-07-27T03:06:46.000Z
creme/metrics/precision.py
2torus/creme
bcc5e2a0155663a1f0ba779c68f23456695bcb54
[ "BSD-3-Clause" ]
null
null
null
creme/metrics/precision.py
2torus/creme
bcc5e2a0155663a1f0ba779c68f23456695bcb54
[ "BSD-3-Clause" ]
null
null
null
from .. import stats __all__ = [ 'MacroPrecision', 'MicroPrecision', 'Precision', 'RollingMacroPrecision', 'RollingMicroPrecision', 'RollingPrecision' ]
26.752688
234
0.578644
import collections import itertools import statistics from .. import stats from . import base from . import confusion __all__ = [ 'MacroPrecision', 'MicroPrecision', 'Precision', 'RollingMacroPrecision', 'RollingMicroPrecision', 'RollingPrecision' ] class BasePrecision: @property ...
0
79
0
6,885
0
0
0
-13
326
e1dc7157787caf2dca8f7c56e4107193bc029bb5
211
py
Python
shared/tools/debug/__init__.py
DougMahoney/metatools
112340102962ff0c3e323564357cc4e848939cf7
[ "Apache-2.0" ]
12
2020-04-10T07:09:24.000Z
2022-03-04T09:22:40.000Z
shared/tools/debug/__init__.py
DougMahoney/metatools
112340102962ff0c3e323564357cc4e848939cf7
[ "Apache-2.0" ]
5
2020-05-16T18:22:23.000Z
2022-03-29T13:19:27.000Z
shared/tools/debug/__init__.py
DougMahoney/metatools
112340102962ff0c3e323564357cc4e848939cf7
[ "Apache-2.0" ]
2
2020-12-10T15:17:40.000Z
2021-12-02T17:34:56.000Z
""" Debugger for Ignition Python scripts. """ __copyright__ = """Copyright (C) 2020 Corso Systems""" __license__ = 'Apache 2.0' __maintainer__ = 'Andrew Geiger' __email__ = 'andrew.geiger@corsosystems.com'
23.444444
54
0.720379
""" Debugger for Ignition Python scripts. """ __copyright__ = """Copyright (C) 2020 Corso Systems""" __license__ = 'Apache 2.0' __maintainer__ = 'Andrew Geiger' __email__ = 'andrew.geiger@corsosystems.com'
0
0
0
0
0
0
0
0
0
8521d184fd1740f1796bc389cdc863ee2aca0f81
1,166
py
Python
wolk/models/FirmwareStatus.py
iperformance/WolkConnect-Python
35c86511f5bb9d47d8ed98ad7623d2ef7ba061e3
[ "Apache-2.0" ]
null
null
null
wolk/models/FirmwareStatus.py
iperformance/WolkConnect-Python
35c86511f5bb9d47d8ed98ad7623d2ef7ba061e3
[ "Apache-2.0" ]
null
null
null
wolk/models/FirmwareStatus.py
iperformance/WolkConnect-Python
35c86511f5bb9d47d8ed98ad7623d2ef7ba061e3
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 WolkAbout Technology s.r.o. # # 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 l...
34.294118
76
0.702401
# Copyright 2018 WolkAbout Technology s.r.o. # # 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 l...
0
0
0
499
0
0
0
0
23
587121a193d7857be99c720b89419107f6666b60
158
py
Python
spi2.py
brammieman1/MazeSolver
22d5a91e95fe88aecd4d4b1f75218d628d2e5fe4
[ "MIT" ]
null
null
null
spi2.py
brammieman1/MazeSolver
22d5a91e95fe88aecd4d4b1f75218d628d2e5fe4
[ "MIT" ]
null
null
null
spi2.py
brammieman1/MazeSolver
22d5a91e95fe88aecd4d4b1f75218d628d2e5fe4
[ "MIT" ]
null
null
null
import spidev import time spi = spidev.SpiDev() spi.open(0,0) spi.max_speed_hz = 1 while True: resp = spi.xfer2([0xDE]) print resp[0] time.sleep(1)
15.8
25
0.677215
import spidev import time spi = spidev.SpiDev() spi.open(0,0) spi.max_speed_hz = 1 while True: resp = spi.xfer2([0xDE]) print resp[0] time.sleep(1)
0
0
0
0
0
0
0
0
0
fd6d54da44e8143d66e88ed4607e3118a3dd61b4
821
py
Python
2 Code/1.2 Python/Futures/Histogram.py
ssh352/Apollo
e72e013dea948d34526307018f22447948250fdc
[ "Apache-2.0" ]
null
null
null
2 Code/1.2 Python/Futures/Histogram.py
ssh352/Apollo
e72e013dea948d34526307018f22447948250fdc
[ "Apache-2.0" ]
null
null
null
2 Code/1.2 Python/Futures/Histogram.py
ssh352/Apollo
e72e013dea948d34526307018f22447948250fdc
[ "Apache-2.0" ]
2
2021-04-26T02:29:02.000Z
2021-06-19T16:24:12.000Z
# encoding: utf-8 # list,,X,Y,XY areaList = get_data_from_csv() min_value = min(areaList) max_value = max(areaList) draw_hist(areaList,'Rollover-Histogram','Rollover Yield','Frequency',min_value, max_value,0.0,50) #
23.457143
108
0.645554
# encoding: utf-8 from numpy import array from matplotlib import pyplot as plt # 参数依次为list,抬头,X轴标签,Y轴标签,XY轴的范围 def draw_hist(myList, Title, Xlabel, Ylabel, Xmin, Xmax, Ymin, Ymax): plt.hist(myList, 100, normed=1, edgecolor='None', facecolor='blue') plt.xlabel(Xlabel) plt.xlim(Xmin, Xmax) p...
66
0
0
0
0
449
0
17
96
63e9dc80f1ea214800b14c74ee8f7a889de90ae2
3,505
py
Python
delira/_backends.py
gedoensmax/delira
545e2ccbe56ed382d300cf3d00317e9a0e3ab5f6
[ "BSD-2-Clause" ]
1
2019-10-03T21:00:20.000Z
2019-10-03T21:00:20.000Z
delira/_backends.py
gedoensmax/delira
545e2ccbe56ed382d300cf3d00317e9a0e3ab5f6
[ "BSD-2-Clause" ]
null
null
null
delira/_backends.py
gedoensmax/delira
545e2ccbe56ed382d300cf3d00317e9a0e3ab5f6
[ "BSD-2-Clause" ]
null
null
null
import os import json from delira._version import get_versions as _get_versions # to register new possible backends, they have to be added to this list. # each backend should consist of a tuple of length 2 with the first entry # being the package import name and the second being the backend abbreviation. # E.g. Tensor...
28.495935
79
0.610842
import os import json from delira._version import get_versions as _get_versions # to register new possible backends, they have to be added to this list. # each backend should consist of a tuple of length 2 with the first entry # being the package import name and the second being the backend abbreviation. # E.g. Tensor...
0
0
0
0
0
0
0
0
0
acad6f4508b8453a27982170c8b11fe3d5c093ac
4,616
py
Python
binoas/digest.py
openstate/binoas
247d0dfeb6ef302ae5034ddc1ea6392704f17d09
[ "MIT" ]
null
null
null
binoas/digest.py
openstate/binoas
247d0dfeb6ef302ae5034ddc1ea6392704f17d09
[ "MIT" ]
null
null
null
binoas/digest.py
openstate/binoas
247d0dfeb6ef302ae5034ddc1ea6392704f17d09
[ "MIT" ]
null
null
null
#!/usr/bin/env python
32.737589
91
0.454723
#!/usr/bin/env python import json import logging from elasticsearch.exceptions import NotFoundError from elasticsearch.helpers import scan from kafka import KafkaProducer from binoas.es import setup_elasticsearch from binoas.db import setup_db from binoas.models import User, UserQueries from binoas.mixins import Pr...
0
0
0
4,220
0
0
0
127
247
d283e67ef56509e19bc4f1c97d080f8285edc9b4
8,770
py
Python
streamlined/middlewares/validator.py
pengzhengyi/Streamlined
59743f44e349318e51e1db4e72c7d1b5992f25be
[ "MIT" ]
null
null
null
streamlined/middlewares/validator.py
pengzhengyi/Streamlined
59743f44e349318e51e1db4e72c7d1b5992f25be
[ "MIT" ]
5
2021-09-11T07:46:55.000Z
2022-03-12T02:03:54.000Z
streamlined/middlewares/validator.py
pengzhengyi/Streamlined
59743f44e349318e51e1db4e72c7d1b5992f25be
[ "MIT" ]
null
null
null
from __future__ import annotations from functools import partial from ..common import (ACTION, HANDLERS, IS_DICT_MISSING_KEY) _MISSING_HANDLER_ACTION = partial(IS_DICT_MISSING_KEY, key=ACTION) _MISSING_HANDLERS = partial(IS_DICT_MISSING_KEY, key=HANDLERS) VALIDATOR = Validator.get_name() VALIDATO...
32.361624
132
0.673774
from __future__ import annotations from dataclasses import replace from functools import partial from typing import Any, Awaitable, Callable, Dict, List from ..common import ( ACTION, AND, ASYNC_VOID, DEFAULT, DEFAULT_KEYERROR, HANDLERS, IDENTITY_FACTORY, IS_CALLABLE, IS_DICT, ...
0
1,117
1,736
3,605
0
946
0
373
597
6a1f518655d1a992151b6b9bc71a7183a253a687
2,097
py
Python
src/python/dart/test/full/test_lost_engine_container.py
RetailMeNotSandbox/dart
58a05f56c04fadd6741501262d92aeb143cd2f2e
[ "MIT" ]
18
2016-03-03T19:10:21.000Z
2021-07-14T22:37:35.000Z
src/python/dart/test/full/test_lost_engine_container.py
RetailMeNotSandbox/dart
58a05f56c04fadd6741501262d92aeb143cd2f2e
[ "MIT" ]
62
2016-04-11T15:17:23.000Z
2017-09-08T17:18:53.000Z
src/python/dart/test/full/test_lost_engine_container.py
RetailMeNotSandbox/dart
58a05f56c04fadd6741501262d92aeb143cd2f2e
[ "MIT" ]
15
2016-03-03T15:38:34.000Z
2019-03-27T19:33:08.000Z
import unittest """ -------------------------------- IMPORTANT NOTE -------------------------------- This test requires: - setting this worker config entry: dart: app_context: message_service: options: ecs_task_status_overri...
38.833333
154
0.65856
import unittest from dart.client.python.dart_client import Dart from dart.engine.no_op.metadata import NoOpActionTypes from dart.model.action import ActionData, Action, ActionState from dart.model.datastore import Datastore, DatastoreData, DatastoreState """ -------------------------------- IMPORTANT NOTE -----------...
0
0
0
1,073
0
0
0
151
111
cc59c49a62dddcd4a8724ba29d67b792376d3c8c
1,162
py
Python
Programming_in_Python/Youtube-Downloader/ytdl/base.py
CodeWithEmad/Mini_Python_Projects
4fd20328d7bd520fa007f21fa2602c8f40fd6cb1
[ "MIT" ]
2
2021-10-01T05:04:30.000Z
2021-10-01T05:06:21.000Z
Programming_in_Python/Youtube-Downloader/ytdl/base.py
CodeWithEmad/Mini_Python_Projects
4fd20328d7bd520fa007f21fa2602c8f40fd6cb1
[ "MIT" ]
1
2021-10-09T18:22:23.000Z
2021-10-09T23:00:31.000Z
Programming_in_Python/Youtube-Downloader/ytdl/base.py
CodeWithEmad/Mini_Python_Projects
4fd20328d7bd520fa007f21fa2602c8f40fd6cb1
[ "MIT" ]
null
null
null
# Play('https://www.youtube.com/playlist?list=PLCnqvb4OGG10qseF62egHuv5FNmhJxASQ').download()
29.794872
93
0.548193
from pytube import YouTube, Playlist import time class Video(YouTube): def __init__(self, url): self.url = YouTube(url) def download(self, type : str = 'high_resolution'): self.url.streams.get_highest_resolution().download() if type == 'low_resolution': se...
0
0
0
958
0
0
0
5
96
4fb840335d0b04df8d3567ba34ec9ab9913f2379
110
py
Python
src/genie/libs/parser/iosxe/tests/ShowVlanFilter/cli/equal/golden_output_1_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
null
null
null
src/genie/libs/parser/iosxe/tests/ShowVlanFilter/cli/equal/golden_output_1_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
null
null
null
src/genie/libs/parser/iosxe/tests/ShowVlanFilter/cli/equal/golden_output_1_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
null
null
null
expected_output = { "vlan_id":{ "122":{ "access_map_tag":"edu_VACL" } } }
13.75
39
0.427273
expected_output = { "vlan_id":{ "122":{ "access_map_tag":"edu_VACL" } } }
0
0
0
0
0
0
0
0
0
50a2391d0a68eebe56456611741ae9a08d7a1c34
13,797
py
Python
netcontrold/lib/util.py
veda10/netcontrold-py
3f76de29e679c1651ca7e8607a21bd03e6e11e60
[ "Apache-2.0" ]
3
2019-12-10T08:21:25.000Z
2021-09-10T18:52:00.000Z
netcontrold/lib/util.py
veda10/netcontrold-py
3f76de29e679c1651ca7e8607a21bd03e6e11e60
[ "Apache-2.0" ]
11
2019-11-13T16:34:27.000Z
2021-09-23T23:26:16.000Z
netcontrold/lib/util.py
veda10/netcontrold-py
3f76de29e679c1651ca7e8607a21bd03e6e11e60
[ "Apache-2.0" ]
32
2019-11-13T06:33:00.000Z
2020-07-07T10:15:07.000Z
# # Copyright (c) 2019 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
25.934211
77
0.522432
# # Copyright (c) 2019 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
0
188
0
10,914
0
1,550
0
-34
428
fabcb639cf6000ccb4f8f61f13b50a860c407c02
448
py
Python
Automation/Selenium_course_Fast_scalable_professional_grade_UI_automation_principles/element_exercise.py
DumiTech/Python-Projects
8a6a507865999847e8ca4f1633dcc0b35673630c
[ "MIT" ]
null
null
null
Automation/Selenium_course_Fast_scalable_professional_grade_UI_automation_principles/element_exercise.py
DumiTech/Python-Projects
8a6a507865999847e8ca4f1633dcc0b35673630c
[ "MIT" ]
null
null
null
Automation/Selenium_course_Fast_scalable_professional_grade_UI_automation_principles/element_exercise.py
DumiTech/Python-Projects
8a6a507865999847e8ca4f1633dcc0b35673630c
[ "MIT" ]
null
null
null
from selenium import webdriver browser = webdriver.Chrome() browser.get("https://techstepacademy.com/training-ground") input1_css_locator = 'input[id="ipt1"]' button4_xpath_locator = '//button[@id="b4"]' #Assign elements input1_el = browser.find_element_by_css_selector(input1_css_locator) btn4_el = browser.find_elem...
26.352941
68
0.803571
from selenium import webdriver browser = webdriver.Chrome() browser.get("https://techstepacademy.com/training-ground") input1_css_locator = 'input[id="ipt1"]' button4_xpath_locator = '//button[@id="b4"]' #Assign elements input1_el = browser.find_element_by_css_selector(input1_css_locator) btn4_el = browser.find_elem...
0
0
0
0
0
0
0
0
0
2236a5a3184c6fef8e64d740b89b97a1a956a4b3
75
py
Python
nuggetbot/__init__.py
LimeProgramming/NuggetBot
e6955be61210e231251c97ee2b8280e85403660e
[ "MIT" ]
null
null
null
nuggetbot/__init__.py
LimeProgramming/NuggetBot
e6955be61210e231251c97ee2b8280e85403660e
[ "MIT" ]
null
null
null
nuggetbot/__init__.py
LimeProgramming/NuggetBot
e6955be61210e231251c97ee2b8280e85403660e
[ "MIT" ]
null
null
null
#NuggetBot.listen(on_message)(test_print)
15
41
0.76
from .bot import NuggetBot #NuggetBot.listen(on_message)(test_print)
0
0
0
0
0
0
0
5
23
ad2a069f4b1a650d8851a6ea50fde376dca52506
2,803
py
Python
commands/private.py
KasaiKonoru/Glitch
c298c3bc50003da7a7f110a0da4d884a214385d3
[ "MIT" ]
null
null
null
commands/private.py
KasaiKonoru/Glitch
c298c3bc50003da7a7f110a0da4d884a214385d3
[ "MIT" ]
null
null
null
commands/private.py
KasaiKonoru/Glitch
c298c3bc50003da7a7f110a0da4d884a214385d3
[ "MIT" ]
null
null
null
from commands.base import Cmd help_text = [ [ ("Usage:", "<PREFIX><COMMAND>"), ("Description:", "Make your voice channel private, preventing anyone from joining you directly.\n\n" "Creates a \" Join (username)\" channel below yours so people can request to join you. " "Wh...
41.835821
120
0.542276
import cfg import discord import utils import functions as func from commands.base import Cmd from time import time help_text = [ [ ("Usage:", "<PREFIX><COMMAND>"), ("Description:", "Make your voice channel private, preventing anyone from joining you directly.\n\n" "Creates a \"⇧ ...
6
0
2,083
0
0
0
0
-24
133
82757b7f062a9d40e5d11f521661bd62ca0a2744
50,604
py
Python
pytracking-master/ltr/data/processing.py
wsumel/AMMC
ef101878b4a97f07984186ea09146348c0526fa6
[ "Apache-2.0" ]
3
2021-12-02T11:34:37.000Z
2021-12-19T09:30:10.000Z
pytracking-master/ltr/data/processing.py
wsumel/AMMC
ef101878b4a97f07984186ea09146348c0526fa6
[ "Apache-2.0" ]
null
null
null
pytracking-master/ltr/data/processing.py
wsumel/AMMC
ef101878b4a97f07984186ea09146348c0526fa6
[ "Apache-2.0" ]
null
null
null
import torchvision.transforms as transforms
54.006403
145
0.61424
import torch import math import numpy as np import torchvision.transforms as transforms from pytracking import TensorDict import ltr.data.processing_utils as prutils def stack_tensors(x): if isinstance(x, (list, tuple)) and isinstance(x[0], torch.Tensor): return torch.stack(x) return x class BasePro...
0
0
0
50,106
0
115
0
12
317
c140bedc33452615e2cab9c28aec0556d261b5b7
7,638
py
Python
coordinator.py
antmicro/cloud-distributed-build
e43073c07102aa6c934efae44df4910a488a6ad8
[ "Apache-2.0" ]
1
2019-10-11T03:05:58.000Z
2019-10-11T03:05:58.000Z
coordinator.py
antmicro/cloud-distributed-build
e43073c07102aa6c934efae44df4910a488a6ad8
[ "Apache-2.0" ]
null
null
null
coordinator.py
antmicro/cloud-distributed-build
e43073c07102aa6c934efae44df4910a488a6ad8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 -u import sys import time parser=add_parser() if not parser.prepare and not parser.fork: print("No args given, use -h for help.") sys.exit(1) vmlist = vm_list() locallist = local_list() currenttime = time.time() vmprefix = random_str(5) if parser.prepare != None: print("Prepare sta...
35.859155
185
0.529851
#!/usr/bin/python3 -u from helper import * import sys import time parser=add_parser() if not parser.prepare and not parser.fork: print("No args given, use -h for help.") sys.exit(1) vmlist = vm_list() locallist = local_list() currenttime = time.time() vmprefix = random_str(5) if parser.prepare != None: ...
0
0
0
0
0
788
0
-1
137
c7ebde73c5d78da2a4aace556dc8843233842ecf
190
py
Python
python-server/mysite/tempserver/urls.py
DenisLila/public
37a790f5e4681f4c1e7880d9781870caa2b46323
[ "MIT" ]
null
null
null
python-server/mysite/tempserver/urls.py
DenisLila/public
37a790f5e4681f4c1e7880d9781870caa2b46323
[ "MIT" ]
null
null
null
python-server/mysite/tempserver/urls.py
DenisLila/public
37a790f5e4681f4c1e7880d9781870caa2b46323
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.temp_page), url(r'temp_page$', views.temp_page), url(r'get_temp$', views.get_temp_req), ]
19
42
0.668421
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.temp_page), url(r'temp_page$', views.temp_page), url(r'get_temp$', views.get_temp_req), ]
0
0
0
0
0
0
0
0
0
754fe4cf323b54bab1c73ff7fef59619765d1cdc
4,409
py
Python
app/src/main.py
raihaan123/ConDiNozzle
c80b084570676882f4f98bb1aaed62b022dd7116
[ "MIT" ]
1
2021-09-09T21:42:34.000Z
2021-09-09T21:42:34.000Z
app/src/main.py
raihaan123/ConDiNozzle
c80b084570676882f4f98bb1aaed62b022dd7116
[ "MIT" ]
6
2021-08-17T16:14:52.000Z
2021-09-10T20:39:23.000Z
app/src/main.py
raihaan123/ConDiNozzle
c80b084570676882f4f98bb1aaed62b022dd7116
[ "MIT" ]
1
2022-03-13T16:07:57.000Z
2022-03-13T16:07:57.000Z
''' Interactive Converging-Diverging Nozzle Visualisation ---> Integrating with the Compressible Flow Rig! A pythonic refactoring of CDN.m (William Devenport, Virginia Tech) by Raihaan Usman =================================================================== Mechanical Engineering, Imperial College London ''' impo...
27.216049
100
0.689045
''' Interactive Converging-Diverging Nozzle Visualisation ---> Integrating with the Compressible Flow Rig! A pythonic refactoring of CDN.m (William Devenport, Virginia Tech) by Raihaan Usman =================================================================== Mechanical Engineering, Imperial College London ''' impo...
0
0
0
0
0
0
0
8
66
f7f1a3ab21cb2fd817207251135d4f0fd92b5687
373
py
Python
bloom/__init__.py
thomasrogers03/bloom
5d49c18a241216aca354aa79971940691e6f33b4
[ "Apache-2.0" ]
9
2020-11-22T03:04:52.000Z
2022-01-17T15:36:25.000Z
bloom/__init__.py
thomasrogers03/bloom
5d49c18a241216aca354aa79971940691e6f33b4
[ "Apache-2.0" ]
null
null
null
bloom/__init__.py
thomasrogers03/bloom
5d49c18a241216aca354aa79971940691e6f33b4
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Thomas Rogers # SPDX-License-Identifier: Apache-2.0 import os.path try: import pkg_resources except ImportError:
19.631579
53
0.675603
# Copyright 2020 Thomas Rogers # SPDX-License-Identifier: Apache-2.0 import os.path try: import pkg_resources def find_resource(name: str): return pkg_resources.resource_filename( __name__, os.path.join("resources", name) ) except ImportError: def find_resource(name: str): ...
0
0
0
0
0
181
0
0
54
7769d0ab50689529b5a5e9591165638f346e2493
183
py
Python
Curso_de_Python_ Curso_em_Video/PythonExercicios/ex061.py
DanilooSilva/Cursos_de_Python
8f167a4c6e16f01601e23b6f107578aa1454472d
[ "MIT" ]
null
null
null
Curso_de_Python_ Curso_em_Video/PythonExercicios/ex061.py
DanilooSilva/Cursos_de_Python
8f167a4c6e16f01601e23b6f107578aa1454472d
[ "MIT" ]
null
null
null
Curso_de_Python_ Curso_em_Video/PythonExercicios/ex061.py
DanilooSilva/Cursos_de_Python
8f167a4c6e16f01601e23b6f107578aa1454472d
[ "MIT" ]
null
null
null
print('-=-' * 30) termo = int(input('Termo: ')) razao = int(input('Razao ')) c = 1 while c <= 10: print('{}'.format(termo), end=' -> ') termo += razao c += 1 print('Fim')
18.3
41
0.502732
print('-=-' * 30) termo = int(input('Termo: ')) razao = int(input('Razao ')) c = 1 while c <= 10: print('{}'.format(termo), end=' -> ') termo += razao c += 1 print('Fim')
0
0
0
0
0
0
0
0
0
9bc66f71c2e04a65046ad68ce60800e2f2aba290
754
py
Python
setup.py
mattrobenolt/python-zohodocs
8eb48e57c3db5ed0fc4273c8390262dcce2892c3
[ "Unlicense", "MIT" ]
3
2018-02-22T01:03:57.000Z
2021-02-06T23:49:37.000Z
setup.py
mattrobenolt/python-zohodocs
8eb48e57c3db5ed0fc4273c8390262dcce2892c3
[ "Unlicense", "MIT" ]
null
null
null
setup.py
mattrobenolt/python-zohodocs
8eb48e57c3db5ed0fc4273c8390262dcce2892c3
[ "Unlicense", "MIT" ]
3
2018-02-22T01:03:58.000Z
2021-11-04T09:35:46.000Z
#!/usr/bin/env python """ Python library for interfacing with the Zoho Docs API. """ from setuptools import setup setup( name='zohodocs', version='0.1.0', description=__doc__, author='Matt Robenolt', author_email='matt@ydekproductions.com', packages=[ 'zohodocs', ], package_dir=...
25.133333
70
0.623342
#!/usr/bin/env python """ Python library for interfacing with the Zoho Docs API. """ from setuptools import setup setup( name='zohodocs', version='0.1.0', description=__doc__, author='Matt Robenolt', author_email='matt@ydekproductions.com', packages=[ 'zohodocs', ], package_dir=...
0
0
0
0
0
0
0
0
0
2579dd993eb85330fe33564bd2ea4152e10de7f6
261
py
Python
apps/accounts/migrations/0002_add_django_user_fields.py
denning/admin-portal
34a8e9f07f88c85c01ae1255517d889fb7951ba5
[ "Apache-2.0" ]
10
2020-11-23T22:47:26.000Z
2022-01-28T16:26:50.000Z
apps/accounts/migrations/0002_add_django_user_fields.py
denning/admin-portal
34a8e9f07f88c85c01ae1255517d889fb7951ba5
[ "Apache-2.0" ]
83
2020-05-17T20:25:50.000Z
2022-03-29T18:11:50.000Z
apps/accounts/migrations/0002_add_django_user_fields.py
denning/admin-portal
34a8e9f07f88c85c01ae1255517d889fb7951ba5
[ "Apache-2.0" ]
3
2020-11-30T00:13:45.000Z
2021-06-11T13:42:04.000Z
# Generated by Django 2.2.6 on 2019-10-30 10:36
18.642857
50
0.651341
# Generated by Django 2.2.6 on 2019-10-30 10:36 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("accounts", "0001_initial"), ("auth", "0011_update_proxy_permissions"), ] operations = []
0
0
0
155
0
0
0
11
46
28aaa87232db6a1d39cd47a9d466ea5d789fe3a9
3,123
py
Python
Blockchain/sensoresEvento.py
arilucea/SesNe
74d9e273803a74f9bd8f1a0b283609302b1bbf38
[ "Apache-2.0" ]
null
null
null
Blockchain/sensoresEvento.py
arilucea/SesNe
74d9e273803a74f9bd8f1a0b283609302b1bbf38
[ "Apache-2.0" ]
null
null
null
Blockchain/sensoresEvento.py
arilucea/SesNe
74d9e273803a74f9bd8f1a0b283609302b1bbf38
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import time import datetime import web3 from web3 import Web3, HTTPProvider, IPCProvider import abisensores #base64.urlsafe_b64encode(os.urandom(32)) web3 = Web3(HTTPProvider(<IP:Port blockchain network>)) abi = abisensores.abi() ''' ''' scAddress = "0x1226600589283c8de1d684b09a0fb143bb...
30.028846
110
0.620557
# -*- coding: utf-8 -*- import time import datetime import web3 from web3 import Web3, HTTPProvider, IPCProvider import abisensores #base64.urlsafe_b64encode(os.urandom(32)) web3 = Web3(HTTPProvider(<IP:Port blockchain network>)) abi = abisensores.abi() ''' ''' scAddress = "0x1226600589283c8de1d684b09a0fb143bb...
0
0
0
0
0
2,193
0
0
186
0d3de8523e7a5fbbaac2ce181c35bb34e1d86ec4
3,288
py
Python
initialize.py
yashwanthsoodini/community-detection
271020e4a082e42abcefef694a53f6fff494e055
[ "MIT" ]
null
null
null
initialize.py
yashwanthsoodini/community-detection
271020e4a082e42abcefef694a53f6fff494e055
[ "MIT" ]
null
null
null
initialize.py
yashwanthsoodini/community-detection
271020e4a082e42abcefef694a53f6fff494e055
[ "MIT" ]
null
null
null
''' This is the starting script which taken input argument python initialize arg[1] arg[2], where arg[1] is the category name i.e. [amazon, youtube etc] and arg[2] [small, medium etc] is the vaiant name. ''' import sys, os, json, time from py2neo import Graph from Utils.GraphGenerator import GraphGenerator from Utils....
40.592593
117
0.728406
''' This is the starting script which taken input argument python initialize arg[1] arg[2], where arg[1] is the category name i.e. [amazon, youtube etc] and arg[2] [small, medium etc] is the vaiant name. ''' import sys,os,json,time import pandas as pd from py2neo import Graph, Node, Relationship, Database from py2neo....
0
0
0
0
0
0
0
84
88
408864cee1b81824ca07d0b3cb7d65d5a600e02d
1,191
py
Python
samfirm_bot/__init__.py
yshalsager/samsung-firmware-bot
9bb77273677cfb41cee9ef6e90e380358727054a
[ "MIT" ]
4
2020-09-18T01:50:18.000Z
2020-12-14T17:44:45.000Z
samfirm_bot/__init__.py
yshalsager/samsung-firmware-bot
9bb77273677cfb41cee9ef6e90e380358727054a
[ "MIT" ]
1
2021-02-21T08:23:08.000Z
2021-02-21T08:23:08.000Z
samfirm_bot/__init__.py
yshalsager/samsung-firmware-bot
9bb77273677cfb41cee9ef6e90e380358727054a
[ "MIT" ]
2
2020-09-18T01:50:20.000Z
2020-12-02T18:38:31.000Z
""" SamFirm Bot initialization""" import json import logging import sys from os.path import dirname WORK_DIR = dirname(__file__) PARENT_DIR = '/'.join(dirname(__file__).split('/')[:-1]) # read bog config with open(f'{PARENT_DIR}/config.json', 'r') as f: CONFIG = json.load(f) API_KEY = CONFIG['api_key'] API_HASH =...
29.775
82
0.725441
""" SamFirm Bot initialization""" import json import logging import sys from os.path import dirname WORK_DIR = dirname(__file__) PARENT_DIR = '/'.join(dirname(__file__).split('/')[:-1]) # read bog config with open(f'{PARENT_DIR}/config.json', 'r') as f: CONFIG = json.load(f) API_KEY = CONFIG['api_key'] API_HASH =...
0
0
0
0
0
0
0
0
0
db75f6892bf0c03ed5bbfdcd8ec508bc8cb7116b
2,166
py
Python
src/python/pants/base/specs.py
foursquare/pants
f0627cfa6ab05fc9a10686a499d1fb1d6ebdb68b
[ "Apache-2.0" ]
1
2018-12-10T21:31:02.000Z
2018-12-10T21:31:02.000Z
src/python/pants/base/specs.py
traviscrawford/pants
587df52d68e612d2f2c87dbe1f504a7bc69b2c46
[ "Apache-2.0" ]
2
2016-10-13T21:37:42.000Z
2018-07-20T20:14:33.000Z
src/python/pants/base/specs.py
traviscrawford/pants
587df52d68e612d2f2c87dbe1f504a7bc69b2c46
[ "Apache-2.0" ]
1
2018-03-08T22:21:44.000Z
2018-03-08T22:21:44.000Z
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement)
33.323077
99
0.720683
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from abc import abst...
0
91
0
1,505
0
0
0
59
206
12a78ecc93a809439e07a4a1635643d69e7ebdd2
21
py
Python
tests/helpers/_helper_invalid_syntax.py
Chrisk12/python-grader
9bfe9beeffdeb8e50be1a9e2ae3b4fbf0728aa52
[ "MIT" ]
9
2015-06-06T06:15:12.000Z
2020-05-27T21:37:16.000Z
tests/helpers/_helper_invalid_syntax.py
Chrisk12/python-grader
9bfe9beeffdeb8e50be1a9e2ae3b4fbf0728aa52
[ "MIT" ]
null
null
null
tests/helpers/_helper_invalid_syntax.py
Chrisk12/python-grader
9bfe9beeffdeb8e50be1a9e2ae3b4fbf0728aa52
[ "MIT" ]
3
2018-11-17T22:51:45.000Z
2021-01-22T14:07:48.000Z
rraise Exception('e')
21
21
0.761905
rraise Exception('e')
0
0
0
0
0
0
0
0
0
e0e51a30bf50bd4727d80c04dfa1d4169a9dfc13
6,433
py
Python
lorenz/lorenz_lstm200.py
mingming81/LSTM_Covariance
391c14349c2bc6224fd025bd35009435f70b4371
[ "MIT" ]
null
null
null
lorenz/lorenz_lstm200.py
mingming81/LSTM_Covariance
391c14349c2bc6224fd025bd35009435f70b4371
[ "MIT" ]
null
null
null
lorenz/lorenz_lstm200.py
mingming81/LSTM_Covariance
391c14349c2bc6224fd025bd35009435f70b4371
[ "MIT" ]
2
2021-06-26T10:49:14.000Z
2022-02-25T12:18:14.000Z
# -*- coding: utf-8 -*- """ Created on Wed Jan 6 13:39:58 2021 @author: siboc """ import numpy as np import matplotlib.pyplot as plt from keras.models import Sequential from keras.layers import Dense # check scikit-learn version # check scikit-learn version #input train_data = data_set_order('l...
27.609442
122
0.684284
# -*- coding: utf-8 -*- """ Created on Wed Jan 6 13:39:58 2021 @author: siboc """ import numpy as np import scipy import math import matplotlib.pyplot as plt from keras.models import Sequential from keras.layers import Dense from sklearn.metrics import r2_score import tensorflow as tf import keras...
0
0
0
0
0
451
0
126
347
c5463e278f5d371a453240ede241d1a5fa52e8b1
987
py
Python
black_friday/tests/prediction_test.py
doitintl/ml-specialization-examples
9c608bf1ef18bacb4929f2d62a9b14d647f6d2e1
[ "Apache-2.0" ]
null
null
null
black_friday/tests/prediction_test.py
doitintl/ml-specialization-examples
9c608bf1ef18bacb4929f2d62a9b14d647f6d2e1
[ "Apache-2.0" ]
null
null
null
black_friday/tests/prediction_test.py
doitintl/ml-specialization-examples
9c608bf1ef18bacb4929f2d62a9b14d647f6d2e1
[ "Apache-2.0" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main()
29.909091
95
0.522796
import unittest import googleapiclient class MyTestCase(unittest.TestCase): def test_something(self): model = 'black_friday' project = 'gad-playground-212407' version = 'v1' service = googleapiclient.discovery.build('ml', 'v1') name = 'projects/{}/models/{}'.format(project,...
0
0
0
876
0
0
0
1
45
eed14be89970e82726e20931042bd7e260edf240
197
py
Python
mongo.py
nhtua/log2mongo
11ba6c3400258b741510dc6a06ea023b75112cc8
[ "MIT" ]
null
null
null
mongo.py
nhtua/log2mongo
11ba6c3400258b741510dc6a06ea023b75112cc8
[ "MIT" ]
null
null
null
mongo.py
nhtua/log2mongo
11ba6c3400258b741510dc6a06ea023b75112cc8
[ "MIT" ]
null
null
null
from pymongo import MongoClient from config import MONGO_HOST, MONGO_PORT, MONGO_DB client = MongoClient() client = MongoClient(MONGO_HOST, MONGO_PORT, connect=False) db = client[MONGO_DB]
19.7
59
0.781726
from pymongo import MongoClient from config import MONGO_HOST, MONGO_PORT, MONGO_DB client = MongoClient() client = MongoClient(MONGO_HOST, MONGO_PORT, connect=False) db = client[MONGO_DB]
0
0
0
0
0
0
0
0
0