hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
248
max_forks_repo_name
stringlengths
5
125
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
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
1c2b4a1c07a03c84645790de2fd147b0a49af942
779
py
Python
Python Files/Dataset_Formating/Audio_splicing.py
brennanMosher/Music-Genre-Recognition-using-a-Machine-Learning-Appraoch
7834fe5d709e894322ad76ef118067febaa78bce
[ "MIT" ]
1
2021-04-13T16:22:27.000Z
2021-04-13T16:22:27.000Z
Python Files/Dataset_Formating/Audio_splicing.py
brennanMosher/Music-Genre-Recognition-using-a-Machine-Learning-Appraoch
7834fe5d709e894322ad76ef118067febaa78bce
[ "MIT" ]
null
null
null
Python Files/Dataset_Formating/Audio_splicing.py
brennanMosher/Music-Genre-Recognition-using-a-Machine-Learning-Appraoch
7834fe5d709e894322ad76ef118067febaa78bce
[ "MIT" ]
null
null
null
from pydub import AudioSegment import os import math from pathlib import Path ''' Splice wav files into multiple segments. ''' LENGTH = 3 # Set splice length in seconds def splice(audioPath, outputPath): # try: # os.mkdir('Spliced Spectrogram training') # Need to figure out where to put this # excep...
25.129032
89
0.65982
0
0
0
0
0
0
0
0
289
0.370988
1c2b5a500905db564cebad53847b80d4840a37d9
3,947
py
Python
manpages.py
mba811/dash-manpages-zh
94f7345f48084c2fa22ae00996920d1309458649
[ "Apache-2.0" ]
1
2020-04-09T10:51:01.000Z
2020-04-09T10:51:01.000Z
manpages.py
mba811/dash-manpages-zh
94f7345f48084c2fa22ae00996920d1309458649
[ "Apache-2.0" ]
null
null
null
manpages.py
mba811/dash-manpages-zh
94f7345f48084c2fa22ae00996920d1309458649
[ "Apache-2.0" ]
1
2020-09-16T03:04:18.000Z
2020-09-16T03:04:18.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Wu Liang @contact: @date: 2014/06/23 """ import os import sqlite3 import urllib2 import shutil import tarfile import hashlib import codecs from mako.template import Template from pyquery import PyQuery currentPath = os.path.join(os.path.dirname(os.path.real...
30.835938
122
0.698759
0
0
0
0
0
0
0
0
1,578
0.398989
1c2c1ecff02208f628aa2e65eae53abaf0c94bd6
1,527
py
Python
docs/conf.py
alexweav/nisystemlink-clients-python
f19a30907a7fef536043ecbddc5a755e5fedf846
[ "MIT" ]
null
null
null
docs/conf.py
alexweav/nisystemlink-clients-python
f19a30907a7fef536043ecbddc5a755e5fedf846
[ "MIT" ]
null
null
null
docs/conf.py
alexweav/nisystemlink-clients-python
f19a30907a7fef536043ecbddc5a755e5fedf846
[ "MIT" ]
null
null
null
import os import sys sys.path.insert(0, os.path.abspath("..")) # -------------------------------------------------------------------------------------- project = "nisystemlink" copyright = "2020, National Instruments" author = "National Instruments" # The short X.Y version version = "0.1" # The full version, includ...
26.789474
88
0.587426
0
0
0
0
0
0
0
0
954
0.624754
1c2c9eed7b32e658c90b6a2885b2e30dd90f1dbc
2,702
py
Python
multinet/api/views/common.py
multinet-app/multinet-api
a658d787f0fb9ba415ed85a1e37c29953486287f
[ "Apache-2.0" ]
null
null
null
multinet/api/views/common.py
multinet-app/multinet-api
a658d787f0fb9ba415ed85a1e37c29953486287f
[ "Apache-2.0" ]
91
2021-03-15T19:00:15.000Z
2022-03-11T00:04:05.000Z
multinet/api/views/common.py
multinet-app/multinet-api
a658d787f0fb9ba415ed85a1e37c29953486287f
[ "Apache-2.0" ]
1
2022-02-05T15:53:04.000Z
2022-02-05T15:53:04.000Z
from typing import Dict, List from arango.cursor import Cursor from django.http.response import Http404 from django.shortcuts import get_object_or_404 from rest_framework.pagination import LimitOffsetPagination from rest_framework.request import Request from rest_framework_extensions.mixins import NestedViewSetMixin ...
33.358025
96
0.703923
2,266
0.838638
0
0
0
0
0
0
535
0.198001
1c2cf799737827ae82cb008c68687ac40ab5260f
2,613
py
Python
scripts/tests/generate_host_files.py
NDevTK/cel
e97226416b6e12245564bfc1c3631d610d62f052
[ "BSD-3-Clause" ]
null
null
null
scripts/tests/generate_host_files.py
NDevTK/cel
e97226416b6e12245564bfc1c3631d610d62f052
[ "BSD-3-Clause" ]
null
null
null
scripts/tests/generate_host_files.py
NDevTK/cel
e97226416b6e12245564bfc1c3631d610d62f052
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import logging import os import sys def ParseArgs(): parser = argparse.ArgumentParser( description='Host file generator for CELab E...
31.107143
78
0.677
0
0
0
0
0
0
0
0
1,063
0.406812
1c2db146a81095258082a5e01445b3cddf1eab20
8,037
py
Python
users/models.py
moshthepitt/probsc
9b8cab206bb1c41238e36bd77f5e0573df4d8e2d
[ "MIT" ]
null
null
null
users/models.py
moshthepitt/probsc
9b8cab206bb1c41238e36bd77f5e0573df4d8e2d
[ "MIT" ]
null
null
null
users/models.py
moshthepitt/probsc
9b8cab206bb1c41238e36bd77f5e0573df4d8e2d
[ "MIT" ]
null
null
null
from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible from django.urls import reverse from django_extensions.db.models import TimeStampedModel from mptt.models import MPTTModel, TreeForeignKey ...
33.911392
79
0.630459
7,568
0.941645
0
0
4,722
0.587533
0
0
1,335
0.166107
1c2e98b8bfffd32e002ee05aa4877b21658d72a4
59,466
py
Python
azure-devops/azure/devops/released/build/build_client.py
imafidon2020/azure-devops-python-api
ea9075f0c54dbc10115a23a8b7ad34feacbbdc14
[ "MIT" ]
248
2019-05-10T14:20:24.000Z
2022-03-29T12:17:27.000Z
azure-devops/azure/devops/released/build/build_client.py
AzureMentor/azure-devops-python-api
3838e91d662dba1f77b43ad560ca23c1cb7e84e8
[ "MIT" ]
147
2019-05-08T14:20:49.000Z
2022-03-28T19:36:21.000Z
azure-devops/azure/devops/released/build/build_client.py
AzureMentor/azure-devops-python-api
3838e91d662dba1f77b43ad560ca23c1cb7e84e8
[ "MIT" ]
121
2019-05-08T06:24:39.000Z
2022-03-01T12:58:02.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------...
54.505958
411
0.618437
58,800
0.988767
0
0
0
0
0
0
24,392
0.41017
1c2ecd7374ac4b43cc0c12a94a556e95164106a8
190
py
Python
tests/test_train.py
hugobb/sgda
69dcda47bb2c5b76d46ead32eb46ab5fb5e5e6d3
[ "MIT" ]
1
2022-02-16T04:20:02.000Z
2022-02-16T04:20:02.000Z
tests/test_train.py
hugobb/sgda
69dcda47bb2c5b76d46ead32eb46ab5fb5e5e6d3
[ "MIT" ]
null
null
null
tests/test_train.py
hugobb/sgda
69dcda47bb2c5b76d46ead32eb46ab5fb5e5e6d3
[ "MIT" ]
null
null
null
import unittest from gamesopt.train import train, TrainConfig class TestOptimizer(unittest.TestCase): def test_sgda(self): config = TrainConfig(num_iter=2) train(config)
27.142857
45
0.736842
127
0.668421
0
0
0
0
0
0
0
0
1c2ee79c50e5332807a24a1c5c70089c0090c76c
91
py
Python
loadCSVdata.py
christostsekouronas/academyposttestanalysis
913a0c13ad0482927a323b2fb3a97a8e2ca26517
[ "MIT" ]
null
null
null
loadCSVdata.py
christostsekouronas/academyposttestanalysis
913a0c13ad0482927a323b2fb3a97a8e2ca26517
[ "MIT" ]
null
null
null
loadCSVdata.py
christostsekouronas/academyposttestanalysis
913a0c13ad0482927a323b2fb3a97a8e2ca26517
[ "MIT" ]
null
null
null
import pandas as pd def loadTest(filepath): df = pd.read_csv(filepath) return df
13
30
0.692308
0
0
0
0
0
0
0
0
0
0
1c2f9886c30209c8f8c18348757a2729fc8d5b30
1,832
py
Python
sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_application_insights_management_client_enums.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_application_insights_management_client_enums.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_application_insights_management_client_enums.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
2
2020-05-21T22:51:22.000Z
2020-05-26T20:53:01.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
17.960784
76
0.600437
1,297
0.707969
0
0
0
0
0
0
796
0.434498
1c2fb781ddcd4218fd8a81658d8b1820f7658753
425
py
Python
setup.py
dhruvdcoder/allennlp-wandb
160dceb1f4cec8e893b856d333bc302748afdd74
[ "MIT" ]
null
null
null
setup.py
dhruvdcoder/allennlp-wandb
160dceb1f4cec8e893b856d333bc302748afdd74
[ "MIT" ]
null
null
null
setup.py
dhruvdcoder/allennlp-wandb
160dceb1f4cec8e893b856d333bc302748afdd74
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages install_requires = [ "allennlp>=0.9.0", "wandb==0.8.15", ] setup( name='allennlp_wandb', version='0.0.1', description='Utilities to use allennlp with wandb', packages=find_packages( exclude=["*.tests", "*.tests.*", "tests.*", "tests"]), p...
25
62
0.647059
0
0
0
0
0
0
0
0
155
0.364706
1c30848fe8db838bf2ea7ab14ebea0d07ae3d297
2,311
py
Python
setup.py
mark-mishyn/django-axes
dfaf67810abd21a0e76200a4906c1bffdd4fa9c9
[ "MIT" ]
null
null
null
setup.py
mark-mishyn/django-axes
dfaf67810abd21a0e76200a4906c1bffdd4fa9c9
[ "MIT" ]
null
null
null
setup.py
mark-mishyn/django-axes
dfaf67810abd21a0e76200a4906c1bffdd4fa9c9
[ "MIT" ]
null
null
null
#!/usr/bin/env python from setuptools import setup, find_packages setup( name="django-axes", description="Keep track of failed login attempts in Django-powered sites.", long_description="\n".join( [ open("README.rst", encoding="utf-8").read(), open("CHANGES.rst", encoding="...
34.492537
87
0.581134
0
0
0
0
0
0
0
0
1,368
0.591952
1c30c09f1bd3070f07f121e14a73ab704dad99b4
106
py
Python
achievements/admin.py
peterkrauz/rpg-achievements-django
c65ec12237b2bee9f12d259fedd5f18934ff6c96
[ "Apache-2.0" ]
1
2021-08-31T10:52:55.000Z
2021-08-31T10:52:55.000Z
achievements/admin.py
peterkrauz/rpg-achievements-django
c65ec12237b2bee9f12d259fedd5f18934ff6c96
[ "Apache-2.0" ]
null
null
null
achievements/admin.py
peterkrauz/rpg-achievements-django
c65ec12237b2bee9f12d259fedd5f18934ff6c96
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from achievements import models admin.site.register(models.Achievement)
21.2
39
0.849057
0
0
0
0
0
0
0
0
0
0
1c30e979a316677653e10a7d840b2373d881b549
1,925
py
Python
src/modules/loss.py
ab3llini/BlindLess
46c50fb2748b9d372044d00b901f0cde91946684
[ "MIT" ]
1
2022-03-19T09:19:12.000Z
2022-03-19T09:19:12.000Z
src/modules/loss.py
ab3llini/BlindLess
46c50fb2748b9d372044d00b901f0cde91946684
[ "MIT" ]
1
2020-02-06T18:26:07.000Z
2020-02-06T18:26:07.000Z
src/modules/loss.py
ab3llini/BlindLess
46c50fb2748b9d372044d00b901f0cde91946684
[ "MIT" ]
null
null
null
from torch.nn import CrossEntropyLoss class GPT2Loss(CrossEntropyLoss): def __init__(self, pad_token_id): super(GPT2Loss, self).__init__(ignore_index=pad_token_id) def forward(self, output, labels): """ Loss function for gpt2 :param output: :param labels: :retu...
31.048387
75
0.619221
1,878
0.975584
0
0
0
0
0
0
582
0.302338
1c31541017e2e3db5152ae18abbb5211d1ab50d4
6,481
py
Python
analyze_tls.py
khushhallchandra/CN-project
405ce86e4e65e116531aa19287b8d05c959b1441
[ "MIT" ]
null
null
null
analyze_tls.py
khushhallchandra/CN-project
405ce86e4e65e116531aa19287b8d05c959b1441
[ "MIT" ]
null
null
null
analyze_tls.py
khushhallchandra/CN-project
405ce86e4e65e116531aa19287b8d05c959b1441
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import matplotlib.pyplot as plt def main(filename): data = pd.read_csv(filename, header=None) means = data.mean(axis = 0) stds = data.std(axis = 0) return means[0], means[1], stds[0], stds[1] if __name__ == '__main__': files_http1 = ['./results/benchmark_siz...
54.923729
257
0.738158
0
0
0
0
0
0
0
0
1,716
0.264774
1c32015a3c35228c38c5bac706f794e1cdc33050
7,376
py
Python
validation/utils/m1.py
PedrV/stfX
017436cd4ade7f0ea95185d82408697c43ac6ce6
[ "MIT" ]
null
null
null
validation/utils/m1.py
PedrV/stfX
017436cd4ade7f0ea95185d82408697c43ac6ce6
[ "MIT" ]
null
null
null
validation/utils/m1.py
PedrV/stfX
017436cd4ade7f0ea95185d82408697c43ac6ce6
[ "MIT" ]
null
null
null
import unittest import os from matplotlib import pyplot as plt from shapely import geometry, affinity X_COORDINATE = 0 Y_COORDINATE = 1 def extract_x_y(polygon: list) -> (list, list): """Extract the x and y coordinates as two separate lists""" x_list = [] y_list = [] for vertex in polygon: x...
33.990783
102
0.590564
2,308
0.312907
0
0
0
0
0
0
1,418
0.192245
1c334c43ec9647ed0e0ec846ea0ec8b0f1abcbfa
1,332
py
Python
movefiles.py
linhailan/JPG-PNG-to-MNIST-NN-Format
c2ff84cb8d2dc6cd49c4d462b4d8ea2ba4620719
[ "Apache-2.0" ]
null
null
null
movefiles.py
linhailan/JPG-PNG-to-MNIST-NN-Format
c2ff84cb8d2dc6cd49c4d462b4d8ea2ba4620719
[ "Apache-2.0" ]
null
null
null
movefiles.py
linhailan/JPG-PNG-to-MNIST-NN-Format
c2ff84cb8d2dc6cd49c4d462b4d8ea2ba4620719
[ "Apache-2.0" ]
null
null
null
import os from PIL import Image from array import * from random import shuffle import shutil def move_file(src_path, dst_path, file): print("from : ",src_path) print("to : ",dst_path) try: # cmd = 'chmod -R +x ' + src_path # os.popen(cmd) f_src = os.path.join(src_path, file) ...
25.615385
65
0.553303
0
0
0
0
0
0
0
0
167
0.125375
1c33dae046d778c2acefa8efab3c4ae7565e1bc3
348
py
Python
spark_work.py
nszceta/spark-python-celery-demo
c5b03be4bb96699f8e41aa8a42fecd4c25c76331
[ "MIT" ]
8
2016-01-19T15:59:36.000Z
2018-04-25T09:00:57.000Z
spark_work.py
nszceta/spark-python-celery-demo
c5b03be4bb96699f8e41aa8a42fecd4c25c76331
[ "MIT" ]
null
null
null
spark_work.py
nszceta/spark-python-celery-demo
c5b03be4bb96699f8e41aa8a42fecd4c25c76331
[ "MIT" ]
null
null
null
import sys from pyspark import SparkContext import json print('spark got python path -> ' + str(sys.executable)) logfile = sys.argv[1] sc = SparkContext() logdata = sc.textFile(logfile).cache() a_count = logdata.filter(lambda s: 'a' in s).count() b_count = logdata.filter(lambda s: 'b' in s).count() print(json.dumps({'a...
31.636364
56
0.70977
0
0
0
0
0
0
0
0
39
0.112069
1c33fa15ddbf9c5dfc357e4226f51b2734c6f579
738
py
Python
nodes/List/GetTaskRenderListIndex.py
atticus-lv/RenderNode
8a4797a2186b76fedebc5d634cff298e69089474
[ "Apache-2.0" ]
17
2021-11-21T09:26:55.000Z
2022-03-09T06:56:01.000Z
nodes/List/GetTaskRenderListIndex.py
atticus-lv/RenderNode
8a4797a2186b76fedebc5d634cff298e69089474
[ "Apache-2.0" ]
1
2021-12-05T13:02:48.000Z
2021-12-06T08:02:34.000Z
nodes/List/GetTaskRenderListIndex.py
atticus-lv/RenderNode
8a4797a2186b76fedebc5d634cff298e69089474
[ "Apache-2.0" ]
4
2021-11-23T14:49:34.000Z
2021-12-30T15:04:58.000Z
import bpy from bpy.props import * from ...nodes.BASE.node_base import RenderNodeBase class RenderNodeGetListIndex(RenderNodeBase): """A simple input node""" bl_idname = 'RenderNodeGetListIndex' bl_label = 'Get List Index' def init(self, context): self.create_output('RenderNodeSocketInt', "i...
26.357143
81
0.730352
502
0.680217
0
0
0
0
0
0
130
0.176152
1c3521323cf7d57dc8b2b240d95a181b90cc3144
1,188
py
Python
src/recognizeDigit.py
RsTaK/Sudoku
8daa0a06906ce61d9a71586a8d28a3931ca4e5e3
[ "MIT" ]
2
2020-01-22T14:32:40.000Z
2021-12-23T20:42:52.000Z
src/recognizeDigit.py
RsTaK/Sudoku
8daa0a06906ce61d9a71586a8d28a3931ca4e5e3
[ "MIT" ]
4
2020-11-13T18:54:24.000Z
2022-02-10T02:10:00.000Z
src/recognizeDigit.py
RsTaK/Sudoku
8daa0a06906ce61d9a71586a8d28a3931ca4e5e3
[ "MIT" ]
1
2020-01-22T14:02:50.000Z
2020-01-22T14:02:50.000Z
from keras.models import load_model import cv2 import pickle import keras.backend as K import numpy as np from src.model_path import MODEL_PATH '''def predict(self, cell): model = load_model('./model/Model.h5') f = K.function([model.layers[0].input, K.learning_phase()],[model.layers[-1].output]) rescaled_cell = ...
27
87
0.705387
482
0.405724
0
0
61
0.051347
0
0
558
0.469697
1c3558d607658f8dea73cab624fa5807f1ade4f4
4,544
py
Python
plots.py
olihawkins/penguin-models
fabecdf6336390fc50e67cfd8494ade69fc3ef7f
[ "BSD-3-Clause" ]
1
2021-05-05T10:17:01.000Z
2021-05-05T10:17:01.000Z
plots.py
olihawkins/penguin-models
fabecdf6336390fc50e67cfd8494ade69fc3ef7f
[ "BSD-3-Clause" ]
null
null
null
plots.py
olihawkins/penguin-models
fabecdf6336390fc50e67cfd8494ade69fc3ef7f
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """A module for plotting penguins data for modelling with scikit-learn.""" # Imports --------------------------------------------------------------------- import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import pandas as pd # Constants -----------------------------...
28.759494
79
0.574604
0
0
0
0
0
0
0
0
1,648
0.362676
1c357d3712292b01ee95a5bca2342315acb4f8ef
623
py
Python
dojo/db_migrations/0147_rename_sslyze_parser.py
dant24/django-DefectDojo
caf5c91b3f8870d5f466dfaaf5a3a096f8812ad9
[ "BSD-3-Clause" ]
249
2016-09-06T21:04:40.000Z
2018-01-19T15:59:44.000Z
dojo/db_migrations/0147_rename_sslyze_parser.py
dant24/django-DefectDojo
caf5c91b3f8870d5f466dfaaf5a3a096f8812ad9
[ "BSD-3-Clause" ]
255
2016-09-06T21:36:37.000Z
2018-01-19T19:57:57.000Z
dojo/db_migrations/0147_rename_sslyze_parser.py
dant24/django-DefectDojo
caf5c91b3f8870d5f466dfaaf5a3a096f8812ad9
[ "BSD-3-Clause" ]
152
2016-09-06T21:04:54.000Z
2018-01-18T08:52:24.000Z
from django.db import migrations def rename_sslyze_parser(apps, schema_editor): Test_Type_model = apps.get_model('dojo', 'Test_Type') try: test_type_sslyze = Test_Type_model.objects.get(name='SSLyze 3 Scan (JSON)') test_type_sslyze.name = 'SSLyze Scan (JSON)' test_type_sslyze.save() ...
25.958333
83
0.678973
184
0.295345
0
0
0
0
0
0
140
0.224719
1c35f69ad59be07090db7f3539f86ff7d6d0b4e8
4,203
py
Python
server/forestgame/game/test_world.py
Nick-Pearson/forestgame
8a37225adbe6da9df7851eba34ad06806da0ce48
[ "0BSD" ]
null
null
null
server/forestgame/game/test_world.py
Nick-Pearson/forestgame
8a37225adbe6da9df7851eba34ad06806da0ce48
[ "0BSD" ]
5
2021-03-10T14:18:45.000Z
2022-03-12T00:28:29.000Z
server/forestgame/game/test_world.py
Nick-Pearson/forestgame
8a37225adbe6da9df7851eba34ad06806da0ce48
[ "0BSD" ]
null
null
null
import unittest from forestgame.game.world import World class WorldTest(unittest.TestCase): def test_world_inits_to_empty_data(self): world = World(None, "1", "0", 0, 0, [], []) self.assertEqual(0, world.get_size_x()) self.assertEqual(0, world.get_size_y()) self.assertEqual([], world.get_tile_data(...
26.601266
66
0.610278
4,144
0.985962
0
0
0
0
0
0
89
0.021175
1c362cfcd82b4292b1b1b46edbeee9a97e7fba89
9,756
py
Python
invconv/xlsx.py
TechPowerAwaits/ax-toolkit
d49924ef2dcd3f54f494ba3859afb070cc12ef91
[ "0BSD" ]
null
null
null
invconv/xlsx.py
TechPowerAwaits/ax-toolkit
d49924ef2dcd3f54f494ba3859afb070cc12ef91
[ "0BSD" ]
16
2021-04-14T03:46:37.000Z
2022-02-11T16:15:00.000Z
invconv/xlsx.py
TechPowerAwaits/ax-toolkit
d49924ef2dcd3f54f494ba3859afb070cc12ef91
[ "0BSD" ]
null
null
null
# Copyright 2021 Richard Johnston <techpowerawaits@outlook.com> # SPDX-license-identifier: 0BSD import string from loguru import logger try: import cell_pos from exceptions import InvconvMissingHeaders import ftype import msg_handler except ModuleNotFoundError: import invconv.cell_pos as cell_pos...
33.410959
119
0.625974
2,107
0.21597
0
0
0
0
0
0
2,586
0.265068
1c369e5832adc50f438c555f56dfcb9a9431f342
5,501
py
Python
solvers/generation_solver/img_interface.py
Anthony102899/Lego-ImageGenerator
52b19c8bb20f77a3394675e7c037c943a50c1e15
[ "Unlicense" ]
1
2022-03-20T10:23:38.000Z
2022-03-20T10:23:38.000Z
solvers/generation_solver/img_interface.py
Anthony102899/Lego-ImageGenerator
52b19c8bb20f77a3394675e7c037c943a50c1e15
[ "Unlicense" ]
null
null
null
solvers/generation_solver/img_interface.py
Anthony102899/Lego-ImageGenerator
52b19c8bb20f77a3394675e7c037c943a50c1e15
[ "Unlicense" ]
null
null
null
import os from tkinter import * import tkinter.filedialog as tkfd from PIL import Image import numpy as np import solvers.generation_solver.image_seperation as IS def layer_interface(img_num): layer_names = [] layer_nums = [] for k in range(img_num): master = Toplevel() master.title(f"Imag...
42.315385
158
0.616797
0
0
0
0
0
0
0
0
783
0.142338
1c3759df5a38cc9eec92e29506b100742f627706
953
py
Python
Constellations/get_brightest_stars.py
PatD123/Polar-Constellation
86f54ae2028a4f351b9f1a056aa3166f49541679
[ "MIT" ]
null
null
null
Constellations/get_brightest_stars.py
PatD123/Polar-Constellation
86f54ae2028a4f351b9f1a056aa3166f49541679
[ "MIT" ]
null
null
null
Constellations/get_brightest_stars.py
PatD123/Polar-Constellation
86f54ae2028a4f351b9f1a056aa3166f49541679
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup as soup from urllib.request import urlopen as uReq import re, json # Getting the page URL = "https://www.astronomytrek.com/star-constellations-brightest-stars/" uClient = uReq(url=URL) page_html = uClient.read() page_soup = soup(page_html, "html.parser") # Opening a file to write in star...
27.228571
74
0.651626
0
0
0
0
0
0
0
0
186
0.195173
1c38a65740967a1e49c94a99e84549d3470de0b7
493
py
Python
TwoPointers/Leetcode11.py
Rylie-W/LeetRecord
623c4efe88b3af54b8a65f6ec23db850b8c6f46f
[ "Apache-2.0" ]
null
null
null
TwoPointers/Leetcode11.py
Rylie-W/LeetRecord
623c4efe88b3af54b8a65f6ec23db850b8c6f46f
[ "Apache-2.0" ]
null
null
null
TwoPointers/Leetcode11.py
Rylie-W/LeetRecord
623c4efe88b3af54b8a65f6ec23db850b8c6f46f
[ "Apache-2.0" ]
null
null
null
class Solution: def maxArea(self, height) -> int: left=0 right=len(height)-1 res=min(height[left],height[right])*(right-left) while right>left: res=max(res,(right-left)*min(height[right],height[left])) if height[left]<height[right]: left+=1 ...
25.947368
69
0.543611
363
0.736308
0
0
0
0
0
0
27
0.054767
1c38c6e2555cdc9fef807ccf4fe2adf10311bc9a
13,688
py
Python
tensorflow_text/python/ops/bert_tokenizer_test.py
hashim361/text
141ed3ae72078a5da431831ce718c8d09fbf4f92
[ "Apache-2.0" ]
1
2020-10-10T14:10:07.000Z
2020-10-10T14:10:07.000Z
tensorflow_text/python/ops/bert_tokenizer_test.py
pranayjoshi/text
5a12211ac370f989ca359d232d3081a889e859dd
[ "Apache-2.0" ]
null
null
null
tensorflow_text/python/ops/bert_tokenizer_test.py
pranayjoshi/text
5a12211ac370f989ca359d232d3081a889e859dd
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2020 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
31.179954
80
0.512566
9,434
0.675353
0
0
8,961
0.641492
0
0
4,012
0.287207
1c3b16c69b0c5704668f2afab4edc623fff685bf
5,324
py
Python
tests/index_test.py
DubeySandeep/pending-review-notification
353fa74d98eeb6c8386818273a2fe02af39d6b9d
[ "Apache-2.0" ]
null
null
null
tests/index_test.py
DubeySandeep/pending-review-notification
353fa74d98eeb6c8386818273a2fe02af39d6b9d
[ "Apache-2.0" ]
null
null
null
tests/index_test.py
DubeySandeep/pending-review-notification
353fa74d98eeb6c8386818273a2fe02af39d6b9d
[ "Apache-2.0" ]
1
2021-10-20T16:24:04.000Z
2021-10-20T16:24:04.000Z
"""Unit test for the index.py file.""" import unittest from datetime import datetime, timedelta, timezone import json from unittest.mock import patch, mock_open import requests_mock from src import index from src import github_services class ModuleIntegerationTest(unittest.TestCase): """Integeration test for th...
35.493333
79
0.523666
5,083
0.954733
0
0
0
0
0
0
1,260
0.236664
1c3c2ebbf2a88dc388bb0314813d8b32b385e4b0
3,133
py
Python
rqalpha/data/instrument_mixin.py
mysky528/rqalpha
ecd550fc30aee96f9995e8152e2c48f5512f8b11
[ "Apache-2.0" ]
3
2017-07-11T15:37:24.000Z
2021-11-22T14:21:13.000Z
rqalpha/data/instrument_mixin.py
mysky528/rqalpha
ecd550fc30aee96f9995e8152e2c48f5512f8b11
[ "Apache-2.0" ]
null
null
null
rqalpha/data/instrument_mixin.py
mysky528/rqalpha
ecd550fc30aee96f9995e8152e2c48f5512f8b11
[ "Apache-2.0" ]
2
2019-04-26T07:51:08.000Z
2020-12-01T20:59:04.000Z
# -*- coding: utf-8 -*- # # Copyright 2017 Ricequant, 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 ...
40.166667
100
0.620172
2,566
0.805651
0
0
0
0
0
0
834
0.261852
1c3ca96a8752bea73f340ee28894ea1bdab8af22
215
py
Python
Python 3/19.prac_no2.py
ByeonUi-Hyeok/practice
6f55ddcb662e2bf8e0c3fb4c4af0beb77a1c7d2d
[ "MIT" ]
1
2021-06-11T08:55:03.000Z
2021-06-11T08:55:03.000Z
Python 3/19.prac_no2.py
ByeonUi-Hyeok/practice
6f55ddcb662e2bf8e0c3fb4c4af0beb77a1c7d2d
[ "MIT" ]
null
null
null
Python 3/19.prac_no2.py
ByeonUi-Hyeok/practice
6f55ddcb662e2bf8e0c3fb4c4af0beb77a1c7d2d
[ "MIT" ]
null
null
null
import funcvote as vote votes = input("투표내용 >>>") # print(votes) # print(type(votes)) result = vote.str2int(votes) print(vote.countvotes(result)) result = vote.countvotes(result) vote.printvote(result) # 투표 초안
14.333333
32
0.716279
0
0
0
0
0
0
0
0
67
0.290043
1c3d09dc17bc58a64b3b41021ca264b66d8e9b31
427
py
Python
tutorials/30-days-of-code/30-operators.py
PingHuskar/hackerrank
1bfdbc63de5d0f94cd9e6ae250476b4a267662f2
[ "Unlicense" ]
41
2018-05-11T07:54:34.000Z
2022-03-29T19:02:32.000Z
tutorials/30-days-of-code/30-operators.py
PingHuskar/hackerrank
1bfdbc63de5d0f94cd9e6ae250476b4a267662f2
[ "Unlicense" ]
2
2021-09-13T10:03:26.000Z
2021-10-04T10:21:05.000Z
tutorials/30-days-of-code/30-operators.py
PingHuskar/hackerrank
1bfdbc63de5d0f94cd9e6ae250476b4a267662f2
[ "Unlicense" ]
21
2019-01-23T19:06:59.000Z
2021-12-23T16:03:47.000Z
# Day 2: Operators # Start using arithmetic operators. # # https://www.hackerrank.com/challenges/30-operators/problem # #!/bin/python3 import sys if __name__ == "__main__": meal_cost = float(input().strip()) tip_percent = int(input().strip()) tax_percent = int(input().strip()) cost = meal_cost * (1 ...
22.473684
66
0.665105
0
0
0
0
0
0
0
0
179
0.419204
1c3e669806f961c690e3e607d0c5ebaae5ffefbe
2,503
py
Python
articles/views.py
qwghlm/CommentIsMee
2c11be1376ec693df28123727c3d86b38404fd71
[ "MIT" ]
null
null
null
articles/views.py
qwghlm/CommentIsMee
2c11be1376ec693df28123727c3d86b38404fd71
[ "MIT" ]
null
null
null
articles/views.py
qwghlm/CommentIsMee
2c11be1376ec693df28123727c3d86b38404fd71
[ "MIT" ]
null
null
null
from django.http import HttpResponse from django.template import RequestContext, loader from django.shortcuts import render, get_object_or_404, redirect from django.core.urlresolvers import reverse from django.core.cache import cache from articles.models import CIFArticle from .forms import CIFArticleForm def index(r...
32.934211
86
0.62485
0
0
0
0
0
0
0
0
556
0.222133
1c3f21c6980082d2b5b98180066cf9ba8b94eb50
156
py
Python
utils/runtime_mode.py
omiderfanmanesh/dengue-infections-prediction
6b4e4aa4af6f6e2cc581fd7828634bbfdc446340
[ "Apache-2.0" ]
null
null
null
utils/runtime_mode.py
omiderfanmanesh/dengue-infections-prediction
6b4e4aa4af6f6e2cc581fd7828634bbfdc446340
[ "Apache-2.0" ]
null
null
null
utils/runtime_mode.py
omiderfanmanesh/dengue-infections-prediction
6b4e4aa4af6f6e2cc581fd7828634bbfdc446340
[ "Apache-2.0" ]
1
2021-06-05T10:05:44.000Z
2021-06-05T10:05:44.000Z
# Copyright (c) 2021, Omid Erfanmanesh, All rights reserved. class RuntimeMode: TRAIN = 0 TUNING = 1 CROSS_VAL = 2 FEATURE_IMPORTANCE = 3
19.5
61
0.666667
92
0.589744
0
0
0
0
0
0
61
0.391026
1c41c0dd3400c46c01883be0652a07078deef3cb
2,616
py
Python
pydoc_fork/__main__.py
matthewdeanmartin/pydoc_fork
174475b15be966f3751d5563b4db0beecc3ab1f9
[ "MIT" ]
null
null
null
pydoc_fork/__main__.py
matthewdeanmartin/pydoc_fork
174475b15be966f3751d5563b4db0beecc3ab1f9
[ "MIT" ]
1
2022-01-17T16:28:45.000Z
2022-01-17T16:28:45.000Z
pydoc_fork/__main__.py
matthewdeanmartin/pydoc_fork
174475b15be966f3751d5563b4db0beecc3ab1f9
[ "MIT" ]
null
null
null
# noinspection PyPep8 """pydoc_fork A fork of pydoc that is optimized for generating html documentation in a CI context Usage: pydoc_fork <package>... [options] pydoc_fork (-h | --help) pydoc_fork --version Options: -h --help Show this screen. -v --version Show version. ...
31.518072
86
0.64526
0
0
0
0
0
0
0
0
1,400
0.535168
1c41d05846e91ffb115828352ba38c0ccc9074be
444
py
Python
backend/src/libs/strings.py
codeglitchz/attendance-system
c82a8d75375069b15e0b827608209bfacb67cde7
[ "MIT" ]
37
2019-12-15T17:39:38.000Z
2022-03-13T08:16:09.000Z
backend/src/libs/strings.py
codeglitchz/attendance-system
c82a8d75375069b15e0b827608209bfacb67cde7
[ "MIT" ]
16
2020-05-05T14:17:26.000Z
2022-03-02T09:09:38.000Z
backend/src/libs/strings.py
codeglitchz/attendance-system
c82a8d75375069b15e0b827608209bfacb67cde7
[ "MIT" ]
18
2019-12-15T17:39:43.000Z
2022-01-22T10:42:41.000Z
""" libs.strings By default, uses `en-gb.json` file inside the `strings` top-level folder. If language changes, set `libs.strings.default_locale` and run `libs.strings.refresh()`. """ import json default_locale = "en-us" cached_strings = {} def refresh(): global cached_strings with open(f"strings/{default_...
17.76
88
0.702703
0
0
0
0
0
0
0
0
224
0.504505
1c420085b055ce7cdac960f6e45563c43bc3b205
5,881
py
Python
nemo_cmd/deflate.py
SalishSeaCast/NEMO-Cmd
a1fb05c4430e152a7dae57296bce364f73752129
[ "Apache-2.0" ]
1
2020-03-26T16:42:26.000Z
2020-03-26T16:42:26.000Z
nemo_cmd/deflate.py
SalishSeaCast/NEMO-Cmd
a1fb05c4430e152a7dae57296bce364f73752129
[ "Apache-2.0" ]
10
2020-03-23T21:19:25.000Z
2021-11-01T22:12:17.000Z
nemo_cmd/deflate.py
SalishSeaCast/NEMO-Cmd
a1fb05c4430e152a7dae57296bce364f73752129
[ "Apache-2.0" ]
null
null
null
# Copyright 2013-2021 The Salish Sea MEOPAR Contributors # and The University of British Columbia # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2...
32.672222
87
0.631185
3,210
0.545826
0
0
1,649
0.280394
0
0
2,783
0.473219
1c4260852b0f621da5efbc981c92c14d38f9bbe8
1,469
py
Python
src/UQpy/distributions/collection/__init__.py
SURGroup/UncertaintyQuantification
a94c8db47d07134ea2b3b0a3ca53ca818532c3e6
[ "MIT" ]
null
null
null
src/UQpy/distributions/collection/__init__.py
SURGroup/UncertaintyQuantification
a94c8db47d07134ea2b3b0a3ca53ca818532c3e6
[ "MIT" ]
null
null
null
src/UQpy/distributions/collection/__init__.py
SURGroup/UncertaintyQuantification
a94c8db47d07134ea2b3b0a3ca53ca818532c3e6
[ "MIT" ]
null
null
null
"""distributions module.""" from UQpy.distributions.collection.Beta import Beta from UQpy.distributions.collection.Binomial import Binomial from UQpy.distributions.collection.Cauchy import Cauchy from UQpy.distributions.collection.ChiSquare import ChiSquare from UQpy.distributions.collection.Exponential import Exponent...
58.76
79
0.884275
0
0
0
0
0
0
0
0
27
0.01838
1c4262cdeb92ebd6c335d957cdc8fd8bfca03129
190
py
Python
Learning Python/Exercise Files/Ch2/helloworld_my.py
RomanShevtsiv/linkedin-learning
d7ec85953b7e88905f87928ede067d32344b984f
[ "MIT" ]
null
null
null
Learning Python/Exercise Files/Ch2/helloworld_my.py
RomanShevtsiv/linkedin-learning
d7ec85953b7e88905f87928ede067d32344b984f
[ "MIT" ]
null
null
null
Learning Python/Exercise Files/Ch2/helloworld_my.py
RomanShevtsiv/linkedin-learning
d7ec85953b7e88905f87928ede067d32344b984f
[ "MIT" ]
null
null
null
# # Example file for HelloWorld # def main(): print("Hello World") name = input("What is your name? ") print("Nice to meet you,", name) if __name__ == "__main__": main()
13.571429
39
0.594737
0
0
0
0
0
0
0
0
94
0.494737
1c42d191e50517487ce29edd00a0d3e85b40a9be
15,309
py
Python
RocketSimulation.py
pietrotrope/SolarSystemSimulation
905eec31eb73e1203ee23a32846954b30bbc5925
[ "MIT" ]
null
null
null
RocketSimulation.py
pietrotrope/SolarSystemSimulation
905eec31eb73e1203ee23a32846954b30bbc5925
[ "MIT" ]
null
null
null
RocketSimulation.py
pietrotrope/SolarSystemSimulation
905eec31eb73e1203ee23a32846954b30bbc5925
[ "MIT" ]
null
null
null
import sys import csv import json import math import pygame import numpy as np from pygame.locals import * import pandas as pd from data import * from agent import agentsList, Agent global screenSize screenSize = [1920, 1080] def load_parameters(path): package = [] file = open(path, 'r') j = json.load(f...
33.720264
118
0.528317
13,512
0.882618
0
0
0
0
0
0
1,390
0.090796
1c43093fa85de4f6e1de23a0ecc3b43530f42260
126
py
Python
sourcecode/GAN/FID/__init__.py
toufeeqahamedns/GeneratingHumanFaces
93048bf5f6ae99424f918b0d0fea46d21abee0cb
[ "MIT" ]
null
null
null
sourcecode/GAN/FID/__init__.py
toufeeqahamedns/GeneratingHumanFaces
93048bf5f6ae99424f918b0d0fea46d21abee0cb
[ "MIT" ]
null
null
null
sourcecode/GAN/FID/__init__.py
toufeeqahamedns/GeneratingHumanFaces
93048bf5f6ae99424f918b0d0fea46d21abee0cb
[ "MIT" ]
null
null
null
""" Package has implementation for the FID score calculation """ from GAN.FID import fid_score from GAN.FID import inception
21
60
0.785714
0
0
0
0
0
0
0
0
64
0.507937
1c4353fef35e15660683e78f01919ecd4744808d
574
py
Python
flask_monitoringdashboard/test/core/profiler/util/test_stringhash.py
timgates42/Flask-MonitoringDashboard
0404b05b9a8f1917796e0f314a77a53a754a0b15
[ "MIT" ]
3
2020-07-17T05:37:41.000Z
2021-09-06T19:46:15.000Z
flask_monitoringdashboard/test/core/profiler/util/test_stringhash.py
timgates42/Flask-MonitoringDashboard
0404b05b9a8f1917796e0f314a77a53a754a0b15
[ "MIT" ]
null
null
null
flask_monitoringdashboard/test/core/profiler/util/test_stringhash.py
timgates42/Flask-MonitoringDashboard
0404b05b9a8f1917796e0f314a77a53a754a0b15
[ "MIT" ]
1
2020-11-21T01:25:51.000Z
2020-11-21T01:25:51.000Z
import unittest from flask_monitoringdashboard.core.profiler.util.stringHash import StringHash class TestStringHash(unittest.TestCase): def test_stringhash(self): string_hash = StringHash() self.assertEqual(string_hash.hash('abc'), 0) self.assertEqual(string_hash.hash('def'), 1) ...
31.888889
78
0.709059
475
0.827526
0
0
0
0
0
0
34
0.059233
1c45545157e97f9c4e1cc68b6cafb654b5d57282
439
py
Python
news/views.py
valch85/newssite
ef612a7bde4ff1d6e1e35f5cc4ec9407f031270e
[ "Apache-2.0" ]
null
null
null
news/views.py
valch85/newssite
ef612a7bde4ff1d6e1e35f5cc4ec9407f031270e
[ "Apache-2.0" ]
2
2020-02-12T00:16:37.000Z
2020-06-05T20:42:49.000Z
news/views.py
valch85/newssite
ef612a7bde4ff1d6e1e35f5cc4ec9407f031270e
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render, get_object_or_404 from .models import News # Create your views here. def index(request): latest_news_list = News.objects.order_by('-pub_date')[:10] context = {'latest_news_list': latest_news_list} return render(request, 'news/index.html', context) def detail(request, ...
27.4375
62
0.728929
0
0
0
0
0
0
0
0
94
0.214123
1c4559619debbfab81b5667b6115f6d8185615c5
1,229
py
Python
benchmark/generate_libs/jamplus.py
chadaustin/ibb
ea1e25cc53a1ad7c302a12d95fc704c443924dff
[ "MIT" ]
4
2015-04-09T17:24:58.000Z
2019-07-02T12:05:56.000Z
benchmark/generate_libs/jamplus.py
chadaustin/ibb
ea1e25cc53a1ad7c302a12d95fc704c443924dff
[ "MIT" ]
null
null
null
benchmark/generate_libs/jamplus.py
chadaustin/ibb
ea1e25cc53a1ad7c302a12d95fc704c443924dff
[ "MIT" ]
1
2019-11-08T15:38:29.000Z
2019-11-08T15:38:29.000Z
#!/usr/bin/python import os.path import cppcodebase import random def CreateLibJamfile(lib_number, classes): os.chdir(cppcodebase.lib_name(lib_number)) handle = file("Jamfile.jam", "w") handle.write ("SubDir TOP lib_" + str(lib_number) + " ;\n\n") handle.write ("SubDirHdrs $(INCLUDES) ;\n\n") han...
29.261905
107
0.643613
0
0
0
0
0
0
0
0
297
0.24166
1c45bee0b72f7290f98a152d2fd4047f74e16502
8,482
py
Python
inbm/dispatcher-agent/dispatcher/fota/fota.py
intel/intel-inb-manageability
cdb17765120857fd41cacb838d6ee6e34e1f5047
[ "Apache-2.0" ]
5
2021-12-13T21:19:31.000Z
2022-01-18T18:29:43.000Z
inbm/dispatcher-agent/dispatcher/fota/fota.py
intel/intel-inb-manageability
cdb17765120857fd41cacb838d6ee6e34e1f5047
[ "Apache-2.0" ]
45
2021-12-30T17:21:09.000Z
2022-03-29T22:47:32.000Z
inbm/dispatcher-agent/dispatcher/fota/fota.py
intel/intel-inb-manageability
cdb17765120857fd41cacb838d6ee6e34e1f5047
[ "Apache-2.0" ]
4
2022-01-26T17:42:54.000Z
2022-03-30T04:48:04.000Z
""" FOTA update tool which is called from the dispatcher during installation Copyright (C) 2017-2022 Intel Corporation SPDX-License-Identifier: Apache-2.0 """ import logging import os import platform from threading import Timer from typing import Any, Optional, Mapping from future.moves.urllib.parse impo...
42.838384
113
0.630512
7,455
0.87892
0
0
498
0.058713
0
0
2,235
0.263499
1c46065a2d7cec80d32a5396991fd1b74b074e66
8,727
py
Python
syncflux.py
nagylzs/syncflux
c070267065cad817708d0680e17bfe5f8942310f
[ "Apache-2.0" ]
null
null
null
syncflux.py
nagylzs/syncflux
c070267065cad817708d0680e17bfe5f8942310f
[ "Apache-2.0" ]
null
null
null
syncflux.py
nagylzs/syncflux
c070267065cad817708d0680e17bfe5f8942310f
[ "Apache-2.0" ]
null
null
null
import copy import datetime import sys import os import time import argparse import traceback import pytz import syncthing from influxdb import InfluxDBClient import yaml from yaml2dataclass import Schema, SchemaPath from typing import Optional, Dict, Type, List from dataclasses import dataclass, asdict, field @dat...
33.694981
119
0.605936
1,776
0.203506
0
0
1,820
0.208548
0
0
1,765
0.202246
1c48374373ae16db6dbcfd16316661e717dab9fc
5,230
py
Python
tests/input/pdf/test_pdf.py
asweeney86/preview-generator
354cbac1c131ebbb81cd9cfd9b4bc0c184d10103
[ "MIT" ]
null
null
null
tests/input/pdf/test_pdf.py
asweeney86/preview-generator
354cbac1c131ebbb81cd9cfd9b4bc0c184d10103
[ "MIT" ]
null
null
null
tests/input/pdf/test_pdf.py
asweeney86/preview-generator
354cbac1c131ebbb81cd9cfd9b4bc0c184d10103
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import re import shutil import typing from PIL import Image from PyPDF2 import PdfFileReader import PyPDF2.utils import pytest from preview_generator.exception import UnavailablePreviewType from preview_generator.manager import PreviewManager from tests import test_utils CURRENT_DI...
39.621212
100
0.759656
0
0
0
0
0
0
0
0
348
0.066526
1c4921cfeca9e8e27f2d0b623dc27dabba9abc92
10,495
py
Python
ipt/ipt_filter_contour_by_size.py
tpmp-inra/ipapi
b0f6be8960a20dbf95ef9df96efdd22bd6e031c5
[ "MIT" ]
1
2020-06-30T06:53:36.000Z
2020-06-30T06:53:36.000Z
ipt/ipt_filter_contour_by_size.py
tpmp-inra/ipapi
b0f6be8960a20dbf95ef9df96efdd22bd6e031c5
[ "MIT" ]
null
null
null
ipt/ipt_filter_contour_by_size.py
tpmp-inra/ipapi
b0f6be8960a20dbf95ef9df96efdd22bd6e031c5
[ "MIT" ]
null
null
null
from ipso_phen.ipapi.base.ipt_abstract import IptBase from ipso_phen.ipapi.tools import regions import numpy as np import cv2 import logging logger = logging.getLogger(__name__) from ipso_phen.ipapi.base import ip_common as ipc class IptFilterContourBySize(IptBase): def build_params(self): ...
38.443223
107
0.429252
10,248
0.976465
0
0
493
0.046975
0
0
1,419
0.135207
1c49c9837d339902372100015afa8dd09aa825df
718
py
Python
tests/main.py
deeso/json-search-replace
d1dd75cfaecb65bf8fcbad0c80a0bd839eccaa8d
[ "Apache-2.0" ]
1
2019-02-08T14:42:45.000Z
2019-02-08T14:42:45.000Z
tests/main.py
deeso/manipin-json
d1dd75cfaecb65bf8fcbad0c80a0bd839eccaa8d
[ "Apache-2.0" ]
null
null
null
tests/main.py
deeso/manipin-json
d1dd75cfaecb65bf8fcbad0c80a0bd839eccaa8d
[ "Apache-2.0" ]
null
null
null
from wrapper_tests.upsert_test import * from wrapper_tests.upsertvaluedict_test import * import os import logging import sys import argparse import signal logging.getLogger().setLevel(logging.DEBUG) ch = logging.StreamHandler(sys.stdout) ch.setLevel(logging.DEBUG) formatter = logging.Formatter('[%(asctime)s - %(name)s...
26.592593
71
0.721448
0
0
0
0
0
0
0
0
132
0.183844
1c4b4d3e7fde53ff67c2f5b9ffd3aee5b505137c
598
py
Python
Sending_email/email.py
Satyam-Bhalla/Python-Scripts
39c46a362acd63cc5d1b9ab57ecb7250eaff35f7
[ "MIT" ]
8
2018-09-25T16:30:12.000Z
2022-03-25T05:13:43.000Z
Sending_email/email.py
Satyam-Bhalla/Python-Scripts
39c46a362acd63cc5d1b9ab57ecb7250eaff35f7
[ "MIT" ]
1
2021-03-31T18:43:43.000Z
2021-03-31T18:43:43.000Z
Sending_email/email.py
Satyam-Bhalla/Python-Scripts
39c46a362acd63cc5d1b9ab57ecb7250eaff35f7
[ "MIT" ]
6
2018-01-29T19:00:42.000Z
2022-03-25T05:13:47.000Z
import smtplib gmail_user = 'your email' gmail_password = 'your password' sent_from = gmail_user to = ['reciever email'] #Create a list for all the recievers subject = 'OMG Super Important Message' body = 'Hey, what\'s up?\n- You' email_text = """\ From: %s To: %s Subject: %s %s """ % (sent_from, ", "....
21.357143
61
0.653846
0
0
0
0
0
0
0
0
213
0.356187
1c4b532b4b156dd08dc3bcca54d167230e8c8b2a
4,532
py
Python
FlaskDaemon/load_test.py
caffeinate/test-pylot
3380208ea0e7ee5fed4299f22ab592a3d3232b3a
[ "MIT" ]
null
null
null
FlaskDaemon/load_test.py
caffeinate/test-pylot
3380208ea0e7ee5fed4299f22ab592a3d3232b3a
[ "MIT" ]
1
2021-10-31T17:46:54.000Z
2021-10-31T17:46:54.000Z
FlaskDaemon/load_test.py
caffeinate/test-pylot
3380208ea0e7ee5fed4299f22ab592a3d3232b3a
[ "MIT" ]
1
2020-07-20T04:10:40.000Z
2020-07-20T04:10:40.000Z
''' Created on 11 Sep 2015 @author: si ''' import json import random import time from threading import Thread # import urllib import urllib2 from Queue import Queue import logging logger = logging.getLogger(__name__) API_URL = "http://127.0.0.1:5000/" class LoadTest(object): """ Create a single process with...
29.23871
86
0.559797
4,205
0.927846
0
0
0
0
0
0
1,240
0.27361
1c4b641cf08d14aaba12ee7b055b0523dd40710b
407
py
Python
urls.py
jeylani99/Real-Estate
5ccb4bf23c73b4acb77427faa202a15216ef58c3
[ "Apache-2.0" ]
null
null
null
urls.py
jeylani99/Real-Estate
5ccb4bf23c73b4acb77427faa202a15216ef58c3
[ "Apache-2.0" ]
null
null
null
urls.py
jeylani99/Real-Estate
5ccb4bf23c73b4acb77427faa202a15216ef58c3
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from django.conf.urls import include,url from .import views urlpatterns = [ url(r'^$', views.IndexView.as_view(),name='index'), #homeapp_detail_view_url url(r'^(?P<pk>[0-9]+)/$',views.LocationView.as_view(),name='property'), #homeapp/detailview/moredetailview url(r'...
29.071429
88
0.668305
0
0
0
0
0
0
0
0
143
0.351351
1c4bdbc2c162e12eac3d923f38fe6b53d36966ae
541
py
Python
main.py
ngh3053/auto_spacing_with_tensorflow
0569b734c087d13cdf6cbb8e79dd8c579d7e66e4
[ "MIT" ]
null
null
null
main.py
ngh3053/auto_spacing_with_tensorflow
0569b734c087d13cdf6cbb8e79dd8c579d7e66e4
[ "MIT" ]
null
null
null
main.py
ngh3053/auto_spacing_with_tensorflow
0569b734c087d13cdf6cbb8e79dd8c579d7e66e4
[ "MIT" ]
null
null
null
from utils import * from model import Model2 if __name__ == '__main__': train_data = DataLoader('../data/trainX.txt', '../data/trainY.txt') test_data = DataLoader('../data/testX.txt', '../data/testY.txt') train_data.set_batch(100) test_data.set_batch(100) char_dic = CharDic([train_data]...
28.473684
72
0.608133
0
0
0
0
0
0
0
0
114
0.210721
1c4c3d7288804166b00482d9413cd64068adedd3
3,475
py
Python
src/sardana/taurus/qt/qtgui/extra_macroexecutor/macrodescriptionviewer.py
marc2332/sardana
48dc9191baaa63f6c714d8c025e8f3f96548ad26
[ "CC-BY-3.0" ]
43
2016-11-25T15:21:23.000Z
2021-08-20T06:09:40.000Z
src/sardana/taurus/qt/qtgui/extra_macroexecutor/macrodescriptionviewer.py
marc2332/sardana
48dc9191baaa63f6c714d8c025e8f3f96548ad26
[ "CC-BY-3.0" ]
1,263
2016-11-25T15:58:37.000Z
2021-11-02T22:23:47.000Z
src/sardana/taurus/qt/qtgui/extra_macroexecutor/macrodescriptionviewer.py
marc2332/sardana
48dc9191baaa63f6c714d8c025e8f3f96548ad26
[ "CC-BY-3.0" ]
58
2016-11-21T11:33:55.000Z
2021-09-01T06:21:21.000Z
#!/usr/bin/env python ############################################################################## ## # This file is part of Sardana ## # http://www.sardana-controls.org/ ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Sardana is free software: you can redistribute it and/or modify # it under th...
35.10101
90
0.649784
1,800
0.517986
0
0
0
0
0
0
1,466
0.421871
1c4d007b31f3f642fe520a7abaa4b88348fd22fe
179
py
Python
torch/metrics/accuracy_score.py
LilDataScientist/PyTorch-From-Scratch
ae3c0bffc5a36a9a7c123b98f52bdaa32fbedef6
[ "MIT" ]
null
null
null
torch/metrics/accuracy_score.py
LilDataScientist/PyTorch-From-Scratch
ae3c0bffc5a36a9a7c123b98f52bdaa32fbedef6
[ "MIT" ]
null
null
null
torch/metrics/accuracy_score.py
LilDataScientist/PyTorch-From-Scratch
ae3c0bffc5a36a9a7c123b98f52bdaa32fbedef6
[ "MIT" ]
null
null
null
import numpy as np def accuracy_score(y_true, y_pred): a = np.argmax(y_true, axis=1) b = np.argmax(y_pred, axis=1) return np.count_nonzero(a == b) / y_true.shape[0]
22.375
53
0.664804
0
0
0
0
0
0
0
0
0
0
1c4e17f4910c6d5e94aabd5e46b41369a206e931
462
py
Python
asaas/financial_transactions.py
marlonjsilva/asaas_sdk_python
871a199e8156d9baa9f78972232feee38b0608bb
[ "MIT" ]
null
null
null
asaas/financial_transactions.py
marlonjsilva/asaas_sdk_python
871a199e8156d9baa9f78972232feee38b0608bb
[ "MIT" ]
4
2022-02-16T13:53:36.000Z
2022-02-16T14:10:40.000Z
asaas/financial_transactions.py
marlonjsilva/asaas_sdk_python
871a199e8156d9baa9f78972232feee38b0608bb
[ "MIT" ]
null
null
null
from asaas.typing import SyncAsync from typing import Any, Optional, Dict class FinancialTransactions: def __init__(self, parent: Any) -> None: self.parent = parent def list( self, query: Optional[Dict[Any, Any]] = None, **kwars: Any ) -> SyncAsync[Any]: return self.parent.request...
25.666667
66
0.588745
385
0.833333
0
0
0
0
0
0
35
0.075758
1c4fabe61f50bb8ab5d328236ac8daab3e74249e
17,672
py
Python
datahub/core/serializers.py
uktrade/data-hub-api
c698cba533ff002293b821d01916f6334549f778
[ "MIT" ]
6
2019-12-02T16:11:24.000Z
2022-03-18T10:02:02.000Z
datahub/core/serializers.py
uktrade/data-hub-api
c698cba533ff002293b821d01916f6334549f778
[ "MIT" ]
1,696
2019-10-31T14:08:37.000Z
2022-03-29T12:35:57.000Z
datahub/core/serializers.py
uktrade/data-hub-api
c698cba533ff002293b821d01916f6334549f778
[ "MIT" ]
9
2019-11-22T12:42:03.000Z
2021-09-03T14:25:05.000Z
from functools import partial from uuid import UUID from dateutil.parser import parse as dateutil_parse from django.apps import apps from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from rest_framework import serializers from rest_framework.exceptions import ValidationError from r...
33.093633
99
0.587992
16,871
0.954674
0
0
152
0.008601
0
0
8,006
0.453033
1c50b9af34c1306cdbc9fec048d28309381c28e4
4,763
py
Python
samples/s07-rigid-objects/main.py
nomadsinteractive/ark
52f84c6dbd5ca6bdd07d450b3911be1ffd995922
[ "Apache-2.0" ]
5
2018-03-28T09:14:55.000Z
2018-04-02T11:54:33.000Z
samples/s07-rigid-objects/main.py
nomadsinteractive/ark
52f84c6dbd5ca6bdd07d450b3911be1ffd995922
[ "Apache-2.0" ]
null
null
null
samples/s07-rigid-objects/main.py
nomadsinteractive/ark
52f84c6dbd5ca6bdd07d450b3911be1ffd995922
[ "Apache-2.0" ]
null
null
null
import math import random from ark import dear_imgui, ApplicationFacade, Arena, Event, Integer, Collider, RenderObject, Size, Camera, Vec3, Numeric class Application: def __init__(self, application: ApplicationFacade): self._down_x = 0 self._down_y = 0 self._application = application ...
43.3
153
0.669116
4,491
0.942893
0
0
306
0.064245
0
0
244
0.051228
1c51a22587be89037e69f604118ecdbeda84cab5
11,693
py
Python
jamf/models/computer_extension_attribute.py
jensenbox/python-jamf
85213085b1064a00375a7aa7df5e33c19f5178eb
[ "RSA-MD" ]
1
2021-04-20T15:28:57.000Z
2021-04-20T15:28:57.000Z
jamf/models/computer_extension_attribute.py
jensenbox/python-jamf
85213085b1064a00375a7aa7df5e33c19f5178eb
[ "RSA-MD" ]
null
null
null
jamf/models/computer_extension_attribute.py
jensenbox/python-jamf
85213085b1064a00375a7aa7df5e33c19f5178eb
[ "RSA-MD" ]
null
null
null
# coding: utf-8 """ Jamf Pro API ## Overview This is a sample Jamf Pro server which allows for usage without any authentication. The Jamf Pro environment which supports the Try it Out functionality does not run the current beta version of Jamf Pro, thus any newly added endpoints will result in an error and sh...
33.408571
342
0.625673
11,107
0.949885
0
0
7,200
0.615753
0
0
6,724
0.575045
1c5289b76fb10d8b256a4000027a462353b8a389
1,342
py
Python
SSOKeyGen/ssokeygendialog.py
chrcoe/sso-keygen
c149f6202fbecb38874c75bf82e0d4857d1249f9
[ "MIT" ]
null
null
null
SSOKeyGen/ssokeygendialog.py
chrcoe/sso-keygen
c149f6202fbecb38874c75bf82e0d4857d1249f9
[ "MIT" ]
null
null
null
SSOKeyGen/ssokeygendialog.py
chrcoe/sso-keygen
c149f6202fbecb38874c75bf82e0d4857d1249f9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ssokeygendialog.ui' # # Created: Sun Feb 1 12:33:36 2015 # by: PyQt5 UI code generator 5.4 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(s...
38.342857
106
0.708644
1,062
0.791356
0
0
0
0
0
0
295
0.219821
1c5370b938a0a9b556d9850b79dfef4883c667c0
4,138
py
Python
util/n_download_util.py
TwrFyr/n-hen.py
8d20639ee78cc34e4333fb247574ff10af81556c
[ "MIT" ]
null
null
null
util/n_download_util.py
TwrFyr/n-hen.py
8d20639ee78cc34e4333fb247574ff10af81556c
[ "MIT" ]
22
2020-12-04T15:16:36.000Z
2021-04-29T12:20:04.000Z
util/n_download_util.py
TwrFyr/n-henpy
8d20639ee78cc34e4333fb247574ff10af81556c
[ "MIT" ]
null
null
null
import urllib.request import os from typing import List from util.n_util import NUser from util.n_util import get_n_entry import time import threading from util.array_util import slice_array delay: float = 2.5 class ProgressWrapper: """The progress wrapper keeps track of the progress of a operation by wrapping a...
38.672897
150
0.646931
532
0.128565
0
0
0
0
0
0
1,186
0.286612
1c542217eb772ffd5114bee20efa5d974df6a3d5
2,907
py
Python
stable-baselines/tests/test_deterministic.py
princeton-vl/PackIt
9894d252c5238d582cba7c3d19540f89d47e4166
[ "BSD-3-Clause" ]
49
2020-07-24T18:17:12.000Z
2022-01-04T15:30:52.000Z
stable-baselines/tests/test_deterministic.py
princeton-vl/PackIt
9894d252c5238d582cba7c3d19540f89d47e4166
[ "BSD-3-Clause" ]
14
2020-07-21T20:21:08.000Z
2022-03-12T00:42:18.000Z
stable-baselines/tests/test_deterministic.py
princeton-vl/PackIt
9894d252c5238d582cba7c3d19540f89d47e4166
[ "BSD-3-Clause" ]
5
2020-07-27T12:35:00.000Z
2021-07-19T03:04:21.000Z
import pytest from stable_baselines import A2C, ACER, ACKTR, DeepQ, DDPG, PPO1, PPO2, TRPO from stable_baselines.ddpg import AdaptiveParamNoiseSpec from stable_baselines.common.identity_env import IdentityEnv, IdentityEnvBox from stable_baselines.common.vec_env import DummyVecEnv PARAM_NOISE_DDPG = AdaptiveParamNoise...
40.943662
112
0.711042
0
0
0
0
1,738
0.597867
0
0
683
0.23495
1c547eed055111ebe6fcfe3bbff16bf6a9eb3360
1,129
py
Python
tests/models/tensorflow/convert_to_tensorflow_serving.py
filipecosta90/dlbench
11dd2fb58050c38a4baa429b207aaecad9097ce3
[ "MIT" ]
14
2019-09-14T16:37:39.000Z
2022-03-19T08:28:50.000Z
tests/models/tensorflow/convert_to_tensorflow_serving.py
filipecosta90/dlbench
11dd2fb58050c38a4baa429b207aaecad9097ce3
[ "MIT" ]
40
2019-11-14T16:07:08.000Z
2022-03-29T21:47:15.000Z
tests/models/tensorflow/convert_to_tensorflow_serving.py
filipecosta90/dlbench
11dd2fb58050c38a4baa429b207aaecad9097ce3
[ "MIT" ]
2
2021-01-07T01:50:53.000Z
2021-02-24T22:22:23.000Z
import tensorflow as tf from tensorflow.python.saved_model import signature_constants from tensorflow.python.saved_model import tag_constants export_dir = './reference/00000002' graph_pb = './creditcardfraud.pb' builder = tf.saved_model.builder.SavedModelBuilder(export_dir) with tf.gfile.GFile(graph_pb, "rb") as f: ...
34.212121
70
0.689105
0
0
0
0
0
0
0
0
184
0.162976
1c54af7d2bc1fc02891b6239b955a52d082c20b2
936
py
Python
pycuda/characterize.py
grlee77/pycuda
cfb787ac73a523fe4b32eff31ecffac485388bbf
[ "Apache-2.0" ]
null
null
null
pycuda/characterize.py
grlee77/pycuda
cfb787ac73a523fe4b32eff31ecffac485388bbf
[ "Apache-2.0" ]
null
null
null
pycuda/characterize.py
grlee77/pycuda
cfb787ac73a523fe4b32eff31ecffac485388bbf
[ "Apache-2.0" ]
1
2020-08-31T08:52:24.000Z
2020-08-31T08:52:24.000Z
from __future__ import division from __future__ import absolute_import from pycuda.tools import context_dependent_memoize import numpy as np def platform_bits(): return tuple.__itemsize__ * 8 def has_stack(): from pycuda.driver import Context return Context.get_device().compute_capability() >= (2, 0) ...
24
72
0.700855
0
0
0
0
485
0.518162
0
0
134
0.143162
1c5536cbf34d028ddd3a2b10367f5360508e1251
1,666
py
Python
bopt/transforms.py
georgedeath/bomean
0dad35e0d584cf7c46c9a8cb0445f225875cfa86
[ "MIT" ]
2
2020-05-19T15:48:37.000Z
2021-08-16T10:41:49.000Z
bopt/transforms.py
georgedeath/bomean
0dad35e0d584cf7c46c9a8cb0445f225875cfa86
[ "MIT" ]
null
null
null
bopt/transforms.py
georgedeath/bomean
0dad35e0d584cf7c46c9a8cb0445f225875cfa86
[ "MIT" ]
null
null
null
import torch from scipy.stats import median_absolute_deviation class Transform_Base(object): """ Base class for transformations based on some data. """ def __init__(self, Ytr): self.Ytr = Ytr # Transform the mean def scale_mean(self, mu): return mu # Reve...
25.630769
76
0.617047
1,583
0.95018
0
0
0
0
0
0
284
0.170468
1c556489b0d99f41db32e59ce5f01f383067703c
2,797
py
Python
pygs/graphserver/compiler/dedupe.py
abyrd/graphserver
42edcad2618635310c57fa6ab4a13974025248ba
[ "BSD-3-Clause-Clear" ]
2
2015-02-25T21:46:02.000Z
2019-04-27T20:22:33.000Z
pygs/graphserver/compiler/dedupe.py
ninowalker/graphserver
dc08070bc6e295986633cf510ca46a2f8d451b92
[ "BSD-3-Clause-Clear" ]
null
null
null
pygs/graphserver/compiler/dedupe.py
ninowalker/graphserver
dc08070bc6e295986633cf510ca46a2f8d451b92
[ "BSD-3-Clause-Clear" ]
null
null
null
# eliminate duplicate service periods from a GTFS database from graphserver.ext.gtfs.gtfsdb import GTFSDatabase import sys from optparse import OptionParser def main(): usage = """usage: python dedupe.py <graphdb_filename>""" parser = OptionParser(usage=usage) (options, args) = parser.parse_args() ...
39.957143
271
0.631748
0
0
0
0
0
0
0
0
1,019
0.364319
1c5786ec0bae08a5ef1c18dbc1ab79a0a17bfc34
105
py
Python
10/01/03/2.py
pylangstudy/201707
c1cc72667f1e0b6e8eef4ee85067d7fa4ca500b6
[ "CC0-1.0" ]
null
null
null
10/01/03/2.py
pylangstudy/201707
c1cc72667f1e0b6e8eef4ee85067d7fa4ca500b6
[ "CC0-1.0" ]
46
2017-06-30T22:19:07.000Z
2017-07-31T22:51:31.000Z
10/01/03/2.py
pylangstudy/201707
c1cc72667f1e0b6e8eef4ee85067d7fa4ca500b6
[ "CC0-1.0" ]
null
null
null
class MyClass: def __repr__(self): return self.__class__.__name__ + '()' print(MyClass().__repr__())
26.25
61
0.704762
76
0.72381
0
0
0
0
0
0
4
0.038095
1c57a86a468018b2042fa4b09d8dfca249bb7498
9,562
py
Python
tests/tasks/core/test_core.py
andykawabata/prefect
a11061c19847beeea26616ccaf4b404ad939676b
[ "ECL-2.0", "Apache-2.0" ]
2
2020-09-28T16:24:02.000Z
2020-10-08T17:08:19.000Z
tests/tasks/core/test_core.py
andykawabata/prefect
a11061c19847beeea26616ccaf4b404ad939676b
[ "ECL-2.0", "Apache-2.0" ]
5
2021-06-28T20:52:27.000Z
2022-02-27T13:04:42.000Z
tests/tasks/core/test_core.py
yalaudah/prefect
2f7f92c39a4575119c3268b0415841c6aca5df60
[ "Apache-2.0" ]
1
2020-05-04T13:22:11.000Z
2020-05-04T13:22:11.000Z
import pytest from prefect.core import Edge, Flow, Parameter, Task from prefect.tasks.core import collections from prefect.tasks.core.constants import Constant from prefect.tasks.core.function import FunctionTask class IdentityTask(Task): def run(self, x): return x class TestConstant: def test_cons...
33.787986
87
0.587743
9,336
0.976365
0
0
0
0
0
0
683
0.071429
1c57c91d84e8ef886ecab5c688f26666500663aa
536
py
Python
Tree/node.py
philipwerner/python_data_structures
554c38376b732f65c5c168d0e1bd30bea3d1ab6b
[ "MIT" ]
null
null
null
Tree/node.py
philipwerner/python_data_structures
554c38376b732f65c5c168d0e1bd30bea3d1ab6b
[ "MIT" ]
null
null
null
Tree/node.py
philipwerner/python_data_structures
554c38376b732f65c5c168d0e1bd30bea3d1ab6b
[ "MIT" ]
null
null
null
"""Node class module for Binary Tree.""" class Node(object): """The Node class.""" def __init__(self, value): """Initialization of node object.""" self.value = value self.left = None self.right = None def __str__(self): """Return a string representation of the nod...
26.8
88
0.585821
492
0.91791
0
0
0
0
0
0
290
0.541045
1c5842430ac7ddf81b0dae7e72f5e8595722304e
26,713
py
Python
qutip/operators.py
pschindler/qutip
dc399135b77a01077898e13bb7d30d60db9b6e67
[ "BSD-3-Clause" ]
1
2018-05-31T17:38:03.000Z
2018-05-31T17:38:03.000Z
qutip/operators.py
pschindler/qutip
dc399135b77a01077898e13bb7d30d60db9b6e67
[ "BSD-3-Clause" ]
3
2021-08-23T19:00:52.000Z
2021-08-24T21:38:04.000Z
qutip/operators.py
pschindler/qutip
dc399135b77a01077898e13bb7d30d60db9b6e67
[ "BSD-3-Clause" ]
2
2017-08-11T11:14:52.000Z
2022-03-13T21:37:47.000Z
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: ...
26.370188
79
0.573129
0
0
0
0
0
0
0
0
19,474
0.729008
1c59215728acaff76dbcdca05ce20bf9c254f9f4
1,627
py
Python
tests/test_deepsv.py
lsantuari/deepsv
debaa1442d1d97b8220be70e12321cf047d3e6a0
[ "Apache-2.0" ]
null
null
null
tests/test_deepsv.py
lsantuari/deepsv
debaa1442d1d97b8220be70e12321cf047d3e6a0
[ "Apache-2.0" ]
null
null
null
tests/test_deepsv.py
lsantuari/deepsv
debaa1442d1d97b8220be70e12321cf047d3e6a0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest from deepsv import deepsv from unittest.mock import patch """Tests for the deepsv module. """ def test_something(): assert True def test_adding_numbers(): assert deepsv.add_numbers(1, 1) == 2 assert deepsv.add_numbers(1, 2) != 2 def test_wi...
22.287671
71
0.695144
0
0
0
0
469
0.288261
0
0
437
0.268593
1c59d4c3c8cb7118c29dce871107ae825dc23c99
8,959
py
Python
tcex/bin/dep.py
phuerta-tc/tcex
4a4e800e1a6114c1fde663f8c3ab7a1d58045c79
[ "Apache-2.0" ]
null
null
null
tcex/bin/dep.py
phuerta-tc/tcex
4a4e800e1a6114c1fde663f8c3ab7a1d58045c79
[ "Apache-2.0" ]
null
null
null
tcex/bin/dep.py
phuerta-tc/tcex
4a4e800e1a6114c1fde663f8c3ab7a1d58045c79
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """TcEx Dependencies Command""" # standard library import os import platform import shutil import subprocess # nosec import sys from distutils.version import StrictVersion # pylint: disable=no-name-in-module from pathlib import Path from typing import List from urllib.parse import quote # third...
36.125
99
0.58444
8,498
0.948543
0
0
743
0.082933
0
0
3,089
0.344793
1c5a7f175c98d892dc83db59726cb2f27a8bed94
2,198
py
Python
parser/fase2/team20/execution/executeSentence2.py
LopDlMa/tytus
0b43ee1c7300cb11ddbe593e08239321b71dc443
[ "MIT" ]
null
null
null
parser/fase2/team20/execution/executeSentence2.py
LopDlMa/tytus
0b43ee1c7300cb11ddbe593e08239321b71dc443
[ "MIT" ]
null
null
null
parser/fase2/team20/execution/executeSentence2.py
LopDlMa/tytus
0b43ee1c7300cb11ddbe593e08239321b71dc443
[ "MIT" ]
null
null
null
from .AST.sentence import * from .AST.expression import * from .AST.error import * import sys sys.path.append("../") from console import * def executeSentence2(self, sentence): if isinstance(sentence, CreateDatabase): h=0 elif isinstance(sentence, ShowDatabases): h=0 e...
36.032787
135
0.641947
0
0
0
0
0
0
0
0
259
0.117834
1c5b0f1bcbcc57bddee91b24e585d8faf96244eb
5,592
py
Python
src/test/cli/component.py
huseyinbolt/cord-tester
ed9b79916e6326a45bfaf3227b8ff922d76df4f1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/test/cli/component.py
huseyinbolt/cord-tester
ed9b79916e6326a45bfaf3227b8ff922d76df4f1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/test/cli/component.py
huseyinbolt/cord-tester
ed9b79916e6326a45bfaf3227b8ff922d76df4f1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2017-present Open Networking Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
35.392405
76
0.619456
3,482
0.622675
0
0
0
0
0
0
3,004
0.537196
1c5cd63de747901926f8ddd0a4d149ca05999677
2,575
py
Python
python-framework/handlers/base/auth.py
huangxingx/python-framework
a62618b0ee5ecff9de426327892cdd690d10510d
[ "MIT" ]
7
2019-10-24T03:26:22.000Z
2019-10-27T14:55:07.000Z
python-framework/handlers/base/auth.py
PJoemu/python-framework
a62618b0ee5ecff9de426327892cdd690d10510d
[ "MIT" ]
3
2021-06-08T19:13:10.000Z
2022-01-13T00:38:48.000Z
python-framework/handlers/base/auth.py
PJoemu/python-framework
a62618b0ee5ecff9de426327892cdd690d10510d
[ "MIT" ]
2
2019-10-25T03:54:51.000Z
2020-06-28T08:50:12.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @author: x.huang # @date:17-8-4 import logging from pony.orm import db_session from handlers.base.base import BaseRequestHandler class LoginRequireError(Exception): pass class AuthBaseHandler(BaseRequestHandler): """ 登录验证的基类 """ def prepare(self): ...
32.1875
107
0.533204
2,399
0.926613
0
0
0
0
0
0
139
0.053689
1c5d3932d3d58eb3852f548752bb665e5c02d910
475
py
Python
pysol/core/helpers.py
lotfio/pysol
34fac6d1ec246a7a037d8237e00974a9a9548faa
[ "MIT" ]
2
2019-10-09T21:58:20.000Z
2020-01-08T07:29:28.000Z
pysol/core/helpers.py
lotfio/pysol
34fac6d1ec246a7a037d8237e00974a9a9548faa
[ "MIT" ]
null
null
null
pysol/core/helpers.py
lotfio/pysol
34fac6d1ec246a7a037d8237e00974a9a9548faa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- #| This file is part of cony #| #| @package Pysol python cli application #| @author <lotfio lakehal> #| @license MIT #| @version 0.1.0 #| @copyright 2019 lotfio lakehal import sys # load module function # this function loads a module by string name def load_module(module): ...
23.75
53
0.673684
0
0
0
0
0
0
0
0
272
0.572632
1c5dc3f5290f019cca3cade7daba3d9be28fa2da
6,387
py
Python
autograd_hacks/test_autograd_hacks.py
jusjusjus/autograd-hacks
c12556d03e40cccaa0e70e14b0120b723002ed9e
[ "Unlicense" ]
1
2020-05-01T12:14:43.000Z
2020-05-01T12:14:43.000Z
autograd_hacks/test_autograd_hacks.py
jusjusjus/autograd-hacks
c12556d03e40cccaa0e70e14b0120b723002ed9e
[ "Unlicense" ]
null
null
null
autograd_hacks/test_autograd_hacks.py
jusjusjus/autograd-hacks
c12556d03e40cccaa0e70e14b0120b723002ed9e
[ "Unlicense" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F import pytest from . import autograd_hacks class StriddenNet(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(1, 20, 5, stride=2, padding=2) self.conv2 = nn.Conv2d(20, 30, 5, stride=2, padding=2) ...
29.706977
102
0.614686
2,143
0.335525
0
0
2,217
0.347111
0
0
463
0.072491
1c5e34faccefb41600dc36e2445e46683f4cb6c1
5,213
py
Python
tests/test_command.py
paulfurley/Mailpile
f89611d916e41e74dd00997327a2c2d042a96399
[ "Apache-2.0" ]
1
2017-04-19T11:10:05.000Z
2017-04-19T11:10:05.000Z
tests/test_command.py
paulfurley/Mailpile
f89611d916e41e74dd00997327a2c2d042a96399
[ "Apache-2.0" ]
null
null
null
tests/test_command.py
paulfurley/Mailpile
f89611d916e41e74dd00997327a2c2d042a96399
[ "Apache-2.0" ]
null
null
null
import unittest import mailpile from mock import patch from mailpile.commands import Action as action from tests import MailPileUnittest class TestCommands(MailPileUnittest): def test_index(self): res = self.mp.rescan() self.assertEqual(res.as_dict()["status"], 'success') def test_search(sel...
32.378882
87
0.619029
5,014
0.961826
0
0
0
0
0
0
854
0.163821
1c5fd36ae0b1a46a987890321b0748ee13ed63f6
7,739
py
Python
navrep/envs/rosnavtrainencodedenv.py
ReykCS/navrep
22ee4727268188414a8121f069e45c2ab798ca19
[ "MIT" ]
null
null
null
navrep/envs/rosnavtrainencodedenv.py
ReykCS/navrep
22ee4727268188414a8121f069e45c2ab798ca19
[ "MIT" ]
null
null
null
navrep/envs/rosnavtrainencodedenv.py
ReykCS/navrep
22ee4727268188414a8121f069e45c2ab798ca19
[ "MIT" ]
null
null
null
from gym import spaces import numpy as np from scipy import interpolate import yaml from navrep.envs.navreptrainenv import NavRepTrainEnv from navrep.rosnav_models.utils.reward import RewardCalculator from navrep.rosnav_models.utils.reward import RewardCalculator class RosnavTrainEncodedEnv(NavRepTrainEnv): """ ...
35.663594
127
0.580178
7,472
0.965499
0
0
265
0.034242
0
0
1,333
0.172244
1c6030cb89b906c901110530b42acd2d1d95f2a5
9,789
py
Python
pdm/models/repositories.py
gaojiuli/pdm
9aedd12e864b57826e850a10eeea45900bb62aad
[ "MIT" ]
1
2021-02-04T19:43:38.000Z
2021-02-04T19:43:38.000Z
pdm/models/repositories.py
gaojiuli/pdm
9aedd12e864b57826e850a10eeea45900bb62aad
[ "MIT" ]
null
null
null
pdm/models/repositories.py
gaojiuli/pdm
9aedd12e864b57826e850a10eeea45900bb62aad
[ "MIT" ]
null
null
null
from __future__ import annotations import sys from functools import wraps from typing import TYPE_CHECKING, Callable, Dict, Iterable, List, Optional, Tuple from pdm._types import CandidateInfo, Source from pdm.context import context from pdm.exceptions import CandidateInfoNotFound, CorruptedCacheError from pdm.models...
39.156
88
0.629073
8,786
0.897538
0
0
2,026
0.206967
0
0
1,855
0.189498
1c6036ce4a4bea03f2bf60037b8ba69bf71a83e1
713
py
Python
tests/backends/test_cookie.py
euri10/starsessions
6bd258a0f94d30b6ec4a8da41910f97c5dabbe54
[ "MIT" ]
31
2021-07-15T13:00:06.000Z
2022-03-17T08:25:52.000Z
tests/backends/test_cookie.py
euri10/starsessions
6bd258a0f94d30b6ec4a8da41910f97c5dabbe54
[ "MIT" ]
6
2021-09-01T15:25:20.000Z
2022-03-13T07:29:19.000Z
tests/backends/test_cookie.py
euri10/starsessions
6bd258a0f94d30b6ec4a8da41910f97c5dabbe54
[ "MIT" ]
5
2021-08-19T04:46:35.000Z
2022-03-09T15:27:22.000Z
import pytest from starsessions import SessionBackend @pytest.mark.asyncio async def test_cookie_read_write(cookie: SessionBackend, session_payload: dict) -> None: new_id = await cookie.write(session_payload, "session_id") assert await cookie.read(new_id) == session_payload @pytest.mark.asyncio async def t...
27.423077
88
0.775596
0
0
0
0
646
0.906031
562
0.788219
36
0.050491
1c60d6b7074a5670b3d1308323fd21a043a33869
4,888
py
Python
sqlalchemy_dremio/db.py
thbeh/sqlalchemy_dremio
180169a86200977a8087d39afe67d3594bd66523
[ "Apache-2.0" ]
14
2020-04-19T16:14:37.000Z
2021-11-14T01:45:51.000Z
sqlalchemy_dremio/db.py
thbeh/sqlalchemy_dremio
180169a86200977a8087d39afe67d3594bd66523
[ "Apache-2.0" ]
13
2020-04-18T14:44:49.000Z
2022-03-14T13:45:22.000Z
sqlalchemy_dremio/db.py
thbeh/sqlalchemy_dremio
180169a86200977a8087d39afe67d3594bd66523
[ "Apache-2.0" ]
6
2020-04-29T10:18:59.000Z
2021-08-19T13:46:30.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging from pyarrow import flight from sqlalchemy_dremio.exceptions import Error, NotSupportedError from sqlalchemy_dremio.flight_auth import HttpDremioClientAu...
25.591623
115
0.618658
3,829
0.783347
0
0
2,560
0.523732
0
0
1,362
0.278642
1c61e6c641ff5d3b13cd3eb58254039918bc75f6
2,081
py
Python
docker-images/rasa2/snips_services/tts_server.py
sanyaade-machine-learning/opensnips_original
3c7d4aa2ef7dec7b0b8c532a537b79c3ef9df7cc
[ "MIT" ]
57
2017-12-28T22:50:20.000Z
2022-01-25T16:05:36.000Z
docker-images/rasa2/snips_services/tts_server.py
sanyaade-machine-learning/opensnips_original
3c7d4aa2ef7dec7b0b8c532a537b79c3ef9df7cc
[ "MIT" ]
28
2018-04-18T06:45:20.000Z
2022-03-08T22:50:50.000Z
docker-images/rasa2/snips_services/tts_server.py
sanyaade-machine-learning/opensnips_original
3c7d4aa2ef7dec7b0b8c532a537b79c3ef9df7cc
[ "MIT" ]
18
2017-12-27T01:57:14.000Z
2021-03-02T14:13:06.000Z
#!/opt/rasa/anaconda/bin/python # -*-: coding utf-8 -*- """ Snips core and nlu server. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import json import time import os from socket import error as socket_error fr...
29.728571
166
0.605478
1,517
0.728976
0
0
0
0
0
0
604
0.290245
1c625b305422a96fe496b35f015f87dde84dd1cd
462
py
Python
gtd/migrations/0018_context_color.py
jimbofreedman/naggingnelly-api
510d801791dcce39560bac227c12e5f6d9e80dcc
[ "BSD-3-Clause" ]
null
null
null
gtd/migrations/0018_context_color.py
jimbofreedman/naggingnelly-api
510d801791dcce39560bac227c12e5f6d9e80dcc
[ "BSD-3-Clause" ]
null
null
null
gtd/migrations/0018_context_color.py
jimbofreedman/naggingnelly-api
510d801791dcce39560bac227c12e5f6d9e80dcc
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.9 on 2018-08-02 17:53 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('gtd', '0017_auto_20180108_1508'), ] operations = [ migrations.AddField( ...
22
67
0.614719
304
0.658009
0
0
0
0
0
0
125
0.270563
1c627c266e817eb089303a3e29f35bf34a1b6c4c
6,652
py
Python
neuralintents/main.py
nitori/neuralintents
7a63075fbdca24ec6a6e5281552f64325dd279ff
[ "MIT" ]
null
null
null
neuralintents/main.py
nitori/neuralintents
7a63075fbdca24ec6a6e5281552f64325dd279ff
[ "MIT" ]
null
null
null
neuralintents/main.py
nitori/neuralintents
7a63075fbdca24ec6a6e5281552f64325dd279ff
[ "MIT" ]
null
null
null
from abc import ABCMeta, abstractmethod import random import json import pickle import numpy as np import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import nltk from nltk.stem import WordNetLemmatizer from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout from tensorflow....
33.766497
109
0.599519
6,180
0.929044
0
0
457
0.068701
0
0
778
0.116957
1c63f92718131c9edb3951c411929fc66600dca1
607
py
Python
cogs/TieThePie.py
Engineer152/Engineer-Bot
9654666776d5ba91b1c8afdb32c86a7aedad7143
[ "MIT" ]
null
null
null
cogs/TieThePie.py
Engineer152/Engineer-Bot
9654666776d5ba91b1c8afdb32c86a7aedad7143
[ "MIT" ]
null
null
null
cogs/TieThePie.py
Engineer152/Engineer-Bot
9654666776d5ba91b1c8afdb32c86a7aedad7143
[ "MIT" ]
null
null
null
import discord from discord.ext import commands client = commands.Bot(command_prefix='your prefix',owner_ids = {your user id},case_insensitive=True ) class TieThePie(commands.Cog): def __init__(self,client): self.client=client @commands.command() async def tiethepie(self,ctx): embed=discord.Embed(title...
33.722222
224
0.742998
402
0.653659
0
0
317
0.515447
295
0.479675
186
0.302439
1c6537848455d77ed4e22e5c61b4d2a5153fa5e0
3,359
py
Python
python/lsst/eotest/simulation/generate_Fe55_images.py
tguillemLSST/eotest
c6f150984fa5dff85b9805028645bf46fc846f11
[ "BSD-3-Clause-LBNL" ]
3
2016-04-21T07:05:45.000Z
2020-08-05T08:37:37.000Z
python/lsst/eotest/simulation/generate_Fe55_images.py
tguillemLSST/eotest
c6f150984fa5dff85b9805028645bf46fc846f11
[ "BSD-3-Clause-LBNL" ]
70
2015-03-26T09:48:53.000Z
2020-04-22T16:29:43.000Z
python/lsst/eotest/simulation/generate_Fe55_images.py
tguillemLSST/eotest
c6f150984fa5dff85b9805028645bf46fc846f11
[ "BSD-3-Clause-LBNL" ]
5
2017-08-15T20:52:44.000Z
2022-03-25T12:54:07.000Z
""" @brief Generate Fe55 images and associated darks and bias images according to section 5.4 of the E/O document (Dec 19, 2012 version). @author J. Chiang <jchiang@slac.stanford.edu> """ import os import numpy as np from sim_inputs import * from sim_tools import * def generate_Fe55_images(exptimes, nxrays, outdir, ...
39.988095
74
0.61953
0
0
0
0
0
0
0
0
563
0.167609
1c6615aacc368931eb1fadc13190d4aad9dc4cda
32,663
py
Python
pcdet/models/backbones_3d/pfe/voxel_set_abstraction.py
rayguan97/M3DETR
cb76890a28c1555f2c0138030e0a432df6ee731b
[ "Apache-2.0" ]
21
2022-01-21T11:02:15.000Z
2022-03-08T14:55:30.000Z
pcdet/models/backbones_3d/pfe/voxel_set_abstraction.py
rayguan97/M3DETR
cb76890a28c1555f2c0138030e0a432df6ee731b
[ "Apache-2.0" ]
2
2022-01-21T08:10:49.000Z
2022-01-21T23:44:40.000Z
pcdet/models/backbones_3d/pfe/voxel_set_abstraction.py
rayguan97/M3DETR
cb76890a28c1555f2c0138030e0a432df6ee731b
[ "Apache-2.0" ]
3
2022-01-21T11:41:55.000Z
2022-01-24T14:20:19.000Z
import math import numpy as np import torch import torch.nn as nn from ....ops.pointnet2.pointnet2_stack import pointnet2_modules as pointnet2_stack_modules from ....ops.pointnet2.pointnet2_stack import pointnet2_utils as pointnet2_stack_utils from ....utils import common_utils from ...backbones_2d.transformer import ...
42.585398
174
0.608732
28,374
0.868689
0
0
2,071
0.063405
0
0
3,875
0.118636
1c66241d3877e47cd775f05edef325a5a8e7b8d8
451
py
Python
metabot2txt/display.py
HeitorBoschirolli/metabot2txt
845c6b1042f7e586cf80de56e78c976e3c919f0a
[ "MIT" ]
null
null
null
metabot2txt/display.py
HeitorBoschirolli/metabot2txt
845c6b1042f7e586cf80de56e78c976e3c919f0a
[ "MIT" ]
null
null
null
metabot2txt/display.py
HeitorBoschirolli/metabot2txt
845c6b1042f7e586cf80de56e78c976e3c919f0a
[ "MIT" ]
null
null
null
import os def display_on_editor(text): with open('.metabot2txt', 'w') as f: f.write(text) os.system('gedit .metabot2txt') def display_list_on_editor(texts): if os.path.isfile('.metabot2txt'): os.remove('.metabot2txt') for text in texts: with open('.metabot2txt', 'a') as ...
22.55
64
0.536585
0
0
0
0
0
0
0
0
145
0.321508
1c66f42291c5ccace3a10ed12cc3202e55caf594
47,394
py
Python
cogs/errors.py
i1470s/IVRY
922908b19b57881ad6fef2b45fabe6bc1ff7a298
[ "MIT" ]
3
2020-10-03T20:53:39.000Z
2020-10-11T07:58:57.000Z
cogs/errors.py
i1470s/IVRY
922908b19b57881ad6fef2b45fabe6bc1ff7a298
[ "MIT" ]
3
2020-10-11T22:23:30.000Z
2020-10-14T16:54:37.000Z
cogs/errors.py
i1470s/IVRY
922908b19b57881ad6fef2b45fabe6bc1ff7a298
[ "MIT" ]
null
null
null
#PRIMARY IMPORTS import discord, os, datetime, sys, json, traceback, logging #SECONDARY IMPORTS from apscheduler.schedulers.asyncio import AsyncIOScheduler from discord.ext import commands from data import config #LOGGING logger = logging.getLogger("ivry") logger.debug("errors.py Started") class Er...
65.551867
138
0.531502
47,022
0.992151
0
0
46,863
0.988796
46,828
0.988058
14,451
0.304912
1c672bcb64cc19b33318c71e9093a770db7e263e
1,315
py
Python
Using Python to Access Web Data/Problem 6_Extracting Data from JSON 5.py
Karoline0097/University-of-Michigan-Python-for-Everybody
8b3999638c0c074ae3c1120de87cf8f31740ebb8
[ "MIT" ]
null
null
null
Using Python to Access Web Data/Problem 6_Extracting Data from JSON 5.py
Karoline0097/University-of-Michigan-Python-for-Everybody
8b3999638c0c074ae3c1120de87cf8f31740ebb8
[ "MIT" ]
null
null
null
Using Python to Access Web Data/Problem 6_Extracting Data from JSON 5.py
Karoline0097/University-of-Michigan-Python-for-Everybody
8b3999638c0c074ae3c1120de87cf8f31740ebb8
[ "MIT" ]
null
null
null
## Problem 5: Extracting Data from JSON # Example: http://py4e-data.dr-chuck.net/comments_42.json # data consists of a number of names and comment counts in JSON # { # comments: [ # { # name: "Matthias" # count: 97 # }, # { # name: "Geomer" # count: 97 # } # ... # ] # } ...
24.811321
90
0.686692
0
0
0
0
0
0
0
0
846
0.643346
1c67babe06797acaab8d0e9b738376ce3cb3ee88
376
py
Python
lessons/day_05/python/app.py
jiaguilera/a-walk-in-graphql
ed4f44b4f4bf283cc7342141eb8127a2745ea2d7
[ "MIT" ]
16
2020-06-16T17:12:16.000Z
2021-12-03T14:19:38.000Z
lessons/day_05/python/app.py
martinarnesi/a-walk-in-graphql
56cd949cbeb4c4322882bd15398a867b16900ccd
[ "MIT" ]
8
2020-06-11T21:53:03.000Z
2020-07-26T01:47:10.000Z
lessons/day_05/python/app.py
martinarnesi/a-walk-in-graphql
56cd949cbeb4c4322882bd15398a867b16900ccd
[ "MIT" ]
9
2020-06-15T13:09:57.000Z
2022-03-06T14:49:17.000Z
from ariadne import make_executable_schema, load_schema_from_path from ariadne.asgi import GraphQL from resolvers import query, skill, person, eye_color, mutation # import schema from GraphQL file type_defs = load_schema_from_path("./schema.gql") schema = make_executable_schema( type_defs, query, skill, person, ...
28.923077
65
0.800532
0
0
0
0
0
0
0
0
47
0.125
1c6bbe01f2a25c56bbd4e7b84c94d14c49d0cee9
1,127
py
Python
src/__main__.py
andreaswatch/piTomation
140bff77ad0b84ad17898106c7be7dc48a2d0783
[ "MIT" ]
null
null
null
src/__main__.py
andreaswatch/piTomation
140bff77ad0b84ad17898106c7be7dc48a2d0783
[ "MIT" ]
null
null
null
src/__main__.py
andreaswatch/piTomation
140bff77ad0b84ad17898106c7be7dc48a2d0783
[ "MIT" ]
null
null
null
import importlib import time from pathlib import Path import os import sys def import_plugins(): #find actual path realpath = os.path.realpath(__file__) dirname = os.path.dirname(realpath) #add modules & plugins plugin_path = os.path.join(dirname, "plugins") for dir_path in Path(plugin_path)....
21.673077
92
0.624667
0
0
0
0
0
0
0
0
353
0.313221
1c6d48cdfb7c008c470c879e2a06b5ce0223008d
1,208
py
Python
src/decanter/core/extra/utils.py
MatthewK3023/decanter-ai-core-sdk
d09a0316d5c3f28d55fd0dd83ef7f3e141d421de
[ "MIT" ]
null
null
null
src/decanter/core/extra/utils.py
MatthewK3023/decanter-ai-core-sdk
d09a0316d5c3f28d55fd0dd83ef7f3e141d421de
[ "MIT" ]
null
null
null
src/decanter/core/extra/utils.py
MatthewK3023/decanter-ai-core-sdk
d09a0316d5c3f28d55fd0dd83ef7f3e141d421de
[ "MIT" ]
null
null
null
""" Functions support other modules. """ import uuid def check_response(response, key=None): """CHeck the api response. Make sure the status call is successful and the response have specific key. Return: class: `Response <Response>` """ code = response.status_code if not 200 <= code ...
23.686275
79
0.626656
0
0
0
0
0
0
0
0
541
0.447848
1c6e264ceb5ab2e61f2f2b6e3294aa8858b8f9fd
1,064
py
Python
03/03.py
stevenpclark/aoc2021
726009e5a2a87025943a736e8676784ca7cdc8bd
[ "MIT" ]
1
2021-11-30T05:25:58.000Z
2021-11-30T05:25:58.000Z
03/03.py
stevenpclark/aoc2021
726009e5a2a87025943a736e8676784ca7cdc8bd
[ "MIT" ]
null
null
null
03/03.py
stevenpclark/aoc2021
726009e5a2a87025943a736e8676784ca7cdc8bd
[ "MIT" ]
null
null
null
import numpy as np def filter_data(data, use_most_common): _, nc = data.shape for c in range(nc): nr, _ = data.shape if nr <= 1: break col_score = sum(data[:,c])/nr if use_most_common: keep_val = col_score >= 0.5 else: keep_va...
20.461538
67
0.535714
0
0
0
0
0
0
0
0
37
0.034774
1c6f742ff7bb6409fa5b1d806e2433034d2aa878
1,096
py
Python
distillation/build_student.py
fengxiaoshuai/CNN_model_optimizer
4c48420989ffe31a4075d36a5133fee0d999466a
[ "Apache-2.0" ]
null
null
null
distillation/build_student.py
fengxiaoshuai/CNN_model_optimizer
4c48420989ffe31a4075d36a5133fee0d999466a
[ "Apache-2.0" ]
1
2021-01-05T10:41:24.000Z
2021-01-05T10:41:24.000Z
distillation/build_student.py
fengxiaoshuai/CNN_model_optimizer
4c48420989ffe31a4075d36a5133fee0d999466a
[ "Apache-2.0" ]
1
2020-08-07T02:56:20.000Z
2020-08-07T02:56:20.000Z
import tensorflow as tf import numpy as np with tf.variable_scope("student"): input_label = tf.placeholder(dtype=tf.float32, shape=[10, 10], name="label") input_image = tf.placeholder(dtype=tf.float32, shape=[10, 224, 224, 3], name="input") conv1 = tf.layers.conv2d(inputs=input_image, filters=64, kernel_s...
40.592593
96
0.681569
0
0
0
0
0
0
0
0
67
0.061131
1c70409e75cdadbb3949d0d1cde6a6029abd620b
5,365
py
Python
code/statistical_tests.py
ChamiLamelas/Math36B_FinalProject
0bdb5d17769553a4edb163534c21cc641860a07a
[ "MIT" ]
null
null
null
code/statistical_tests.py
ChamiLamelas/Math36B_FinalProject
0bdb5d17769553a4edb163534c21cc641860a07a
[ "MIT" ]
null
null
null
code/statistical_tests.py
ChamiLamelas/Math36B_FinalProject
0bdb5d17769553a4edb163534c21cc641860a07a
[ "MIT" ]
null
null
null
import scipy.stats import numpy as np def f_test(sample_x, sample_y, larger_varx_alt): """ Computes the F-value and corresponding p-value for a pair of samples and alternative hypothesis. Parameters ---------- sample_x : list A random sample x1,...,xnx. Let its (underlying) variance be ox...
41.269231
261
0.654054
0
0
0
0
0
0
0
0
3,540
0.659832
1c71ba0a22523d640266f7845ef799a8f73cbe39
243
py
Python
pawpyseed/compiler.py
akashkumarsingh612/pawpyseed
6f5aa0b8ca8c28a0221e5256afeb939c3344560b
[ "BSD-3-Clause" ]
null
null
null
pawpyseed/compiler.py
akashkumarsingh612/pawpyseed
6f5aa0b8ca8c28a0221e5256afeb939c3344560b
[ "BSD-3-Clause" ]
null
null
null
pawpyseed/compiler.py
akashkumarsingh612/pawpyseed
6f5aa0b8ca8c28a0221e5256afeb939c3344560b
[ "BSD-3-Clause" ]
null
null
null
import os, subprocess def compile_core(comp, scilib): """ ATTENTION, NOT FINISHED """ subprocess.call(("make pawpy_%s"%comp).split()) def compile_core(comp, scilib): """ ATTENTION, NOT FINISHED """ subprocess.call("make hfc".split())
18.692308
48
0.691358
0
0
0
0
0
0
0
0
91
0.374486
1c720e3c45ed8efa4771cbbb3a3b55d0385c9d41
1,125
py
Python
finnhub_python/socket.py
humdings/finnhub-python
ca98681e5a529598e9d17e3ebc2f6d49c64b54de
[ "MIT" ]
null
null
null
finnhub_python/socket.py
humdings/finnhub-python
ca98681e5a529598e9d17e3ebc2f6d49c64b54de
[ "MIT" ]
null
null
null
finnhub_python/socket.py
humdings/finnhub-python
ca98681e5a529598e9d17e3ebc2f6d49c64b54de
[ "MIT" ]
null
null
null
""" Example usage of Finnhub socket API. """ from __future__ import print_function # Py2 compat import websocket from finnhub_python.utils import get_finnhub_api_key def write_line(data, fname): with open(fname, 'a+') as f: f.write(data + '\n') def on_message(ws, message): write_line(message, tick_...
20.089286
69
0.604444
0
0
0
0
0
0
0
0
221
0.196444
1c722363623f21dde32f8eb4058f20a248ddb2fd
2,570
py
Python
pycovjson/cli/convert.py
RileyWilliams/pycovjson
741737f53ef18ef1476eccb5e626866843c152bd
[ "BSD-3-Clause" ]
10
2016-08-16T17:46:30.000Z
2021-04-06T22:03:58.000Z
pycovjson/cli/convert.py
RileyWilliams/pycovjson
741737f53ef18ef1476eccb5e626866843c152bd
[ "BSD-3-Clause" ]
46
2016-07-21T13:14:14.000Z
2020-07-02T09:16:29.000Z
pycovjson/cli/convert.py
RileyWilliams/pycovjson
741737f53ef18ef1476eccb5e626866843c152bd
[ "BSD-3-Clause" ]
6
2016-07-29T09:56:37.000Z
2020-08-23T18:20:47.000Z
""" Pycovjson - Command line interface Author: rileywilliams Version: 0.1.0 """ import argparse from pycovjson.write import Writer from pycovjson.read_netcdf import NetCDFReader as Reader def main(): """ Command line interface for pycovjson - Converts Scientific Data Formats into CovJSON and saves to disk. ...
36.714286
107
0.649027
0
0
0
0
0
0
0
0
992
0.385992