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
e23b814797f83ec93f19e86ffddbfaea18bceed4
708
pyde
Python
mode/examples/Basics/Typography/Words/Words.pyde
timgates42/processing.py
78a237922c2a928b83f4ad579dbf8d32c0099890
[ "Apache-2.0" ]
1,224
2015-01-01T22:09:23.000Z
2022-03-29T19:43:56.000Z
mode/examples/Basics/Typography/Words/Words.pyde
timgates42/processing.py
78a237922c2a928b83f4ad579dbf8d32c0099890
[ "Apache-2.0" ]
253
2015-01-14T03:45:51.000Z
2022-02-08T01:18:19.000Z
mode/examples/Basics/Typography/Words/Words.pyde
timgates42/processing.py
78a237922c2a928b83f4ad579dbf8d32c0099890
[ "Apache-2.0" ]
225
2015-01-13T18:38:33.000Z
2022-03-30T20:27:39.000Z
""" * Words. * * The text() function is used for writing words to the screen. * The letters can be aligned left, center, or right with the * textAlign() function. """ def setup(): size(640, 360) # Create the font printArray(PFont.list()) f = createFont("Georgia", 24) textFont(f) def d...
17.268293
63
0.574859
0
0
0
0
0
0
0
0
222
0.313559
e23cfbce425720b8b34b74d88b27c40ed8ce71f8
1,892
py
Python
flask/application/app_config.py
nydailynews/trumponomics
4a979f49b8adf45760955caf1b6d34c20cbfc69f
[ "MIT" ]
1
2019-06-03T19:22:34.000Z
2019-06-03T19:22:34.000Z
flask/application/app_config.py
nydailynews/trumponomics
4a979f49b8adf45760955caf1b6d34c20cbfc69f
[ "MIT" ]
null
null
null
flask/application/app_config.py
nydailynews/trumponomics
4a979f49b8adf45760955caf1b6d34c20cbfc69f
[ "MIT" ]
2
2018-11-22T03:09:52.000Z
2019-06-22T19:28:02.000Z
#!/usr/bin/env python # The app.page dict: # 'title': '', # 'url': '', # 'description': '', # 'author': '', # 'datestamp': '', # 'keywords': '', # 'keywords_array': '', # 'shareimg': '', # 'shareimgdesc': '', details = { 'base-unemployment': { 'title': '', 'description': ...
23.65
38
0.399049
0
0
0
0
0
0
0
0
1,126
0.595137
e23e8d88531a3fab00e76cb8fb7d0fb26f812c40
1,144
py
Python
sphinxcontrib/needs/directives/utils.py
tlovett/sphinxcontrib-needs
41794403266deb6a4f7ec07bb8297abb0ddc57b1
[ "MIT" ]
null
null
null
sphinxcontrib/needs/directives/utils.py
tlovett/sphinxcontrib-needs
41794403266deb6a4f7ec07bb8297abb0ddc57b1
[ "MIT" ]
null
null
null
sphinxcontrib/needs/directives/utils.py
tlovett/sphinxcontrib-needs
41794403266deb6a4f7ec07bb8297abb0ddc57b1
[ "MIT" ]
null
null
null
from docutils import nodes def no_needs_found_paragraph(): nothing_found = "No needs passed the filters" para = nodes.line() nothing_found_node = nodes.Text(nothing_found, nothing_found) para += nothing_found_node return para def used_filter_paragraph(current_needfilter): para = nodes.paragr...
38.133333
94
0.653846
0
0
0
0
0
0
0
0
194
0.16958
e240199eef07bbbac4c91f15ad15d97cee55a920
2,905
py
Python
matkonim/models.py
eduardkh/matkonim
29b443f6ad364eed7b06f7af849daa1bf75052ed
[ "MIT" ]
null
null
null
matkonim/models.py
eduardkh/matkonim
29b443f6ad364eed7b06f7af849daa1bf75052ed
[ "MIT" ]
10
2020-06-06T00:04:08.000Z
2022-03-12T00:05:16.000Z
matkonim/models.py
eduardkh/matkonim
29b443f6ad364eed7b06f7af849daa1bf75052ed
[ "MIT" ]
null
null
null
from django.db import models from django.conf import settings from datetime import datetime User = settings.AUTH_USER_MODEL # Technique class Technique(models.Model): name = models.CharField(max_length=120) description = models.TextField(null=True, blank=True) def __str__(self): return self.name...
30.260417
119
0.710155
2,662
0.916351
0
0
0
0
0
0
144
0.04957
e240ac6c4875acd9dc9a3981eae4c962d15c0da4
743
py
Python
myblog/posts/migrations/0003_auto_20200621_1945.py
DevinDai13/MyBlog
9d6a7b5f9a87b4d4e84f906cbeaf75756487b5bf
[ "Apache-2.0" ]
null
null
null
myblog/posts/migrations/0003_auto_20200621_1945.py
DevinDai13/MyBlog
9d6a7b5f9a87b4d4e84f906cbeaf75756487b5bf
[ "Apache-2.0" ]
null
null
null
myblog/posts/migrations/0003_auto_20200621_1945.py
DevinDai13/MyBlog
9d6a7b5f9a87b4d4e84f906cbeaf75756487b5bf
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.1.5 on 2020-06-21 19:45 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('posts', '0002_auto_20200621_1606'), ] operations = [ migrations.AddField( model_name='post', name='height', ...
25.62069
117
0.565276
650
0.874832
0
0
0
0
0
0
136
0.183042
e2414e6120f47710808e08205df25bc03519717f
1,173
py
Python
src/ch9-sqlalchemy/start/pypi_sqlalchemy/pypi/controllers/account_controller.py
possnfiffer/data-driven-web-apps-with-pyramid-and-sqlalchemy
880dc4bc2a6d5dd5fcc91452725d5a1c7c9022c5
[ "MIT" ]
83
2018-07-04T22:19:20.000Z
2022-03-09T22:44:48.000Z
src/ch9-sqlalchemy/start/pypi_sqlalchemy/pypi/controllers/account_controller.py
possnfiffer/data-driven-web-apps-with-pyramid-and-sqlalchemy
880dc4bc2a6d5dd5fcc91452725d5a1c7c9022c5
[ "MIT" ]
9
2018-08-02T00:17:33.000Z
2021-11-17T17:18:05.000Z
src/ch9-sqlalchemy/start/pypi_sqlalchemy/pypi/controllers/account_controller.py
possnfiffer/data-driven-web-apps-with-pyramid-and-sqlalchemy
880dc4bc2a6d5dd5fcc91452725d5a1c7c9022c5
[ "MIT" ]
78
2018-07-28T14:07:07.000Z
2022-01-15T07:06:42.000Z
from pyramid.view import view_config # ################### INDEX ################################# @view_config(route_name='account_home', renderer='pypi:templates/account/index.pt') def index(request): return {} # ################### LOGIN ################################# @view_config(route_na...
23.938776
63
0.538789
0
0
0
0
868
0.739983
0
0
491
0.418585
e241acff81ab7a5ff0708fd2bf35315e3fae57e1
100
py
Python
core/app/mqtt_services/apps.py
EmixMaxime/mx-home-security
ec6d329a09bb2e0afbbd7e481937893311f02634
[ "MIT" ]
2
2021-04-29T19:28:59.000Z
2021-04-29T21:20:32.000Z
core/app/mqtt_services/apps.py
EmixMaxime/mx-home-security
ec6d329a09bb2e0afbbd7e481937893311f02634
[ "MIT" ]
101
2020-06-26T19:51:24.000Z
2021-03-28T09:35:55.000Z
core/app/mqtt_services/apps.py
mxmaxime/mx-tech-house
f6b66b8390b348e48d4c6ea0da51e409f3845fd6
[ "MIT" ]
null
null
null
from django.apps import AppConfig class MqttServicesConfig(AppConfig): name = 'mqtt_services'
16.666667
36
0.78
63
0.63
0
0
0
0
0
0
15
0.15
e243561f750625be44774b3ce79a8ebb51a0b8d8
1,469
py
Python
vent/core/network_tap/ncontrol/ncontrol.py
edgardmota/vent
67b01abc059a3e9e8d16670c7058f0a9e267d8f1
[ "Apache-2.0" ]
null
null
null
vent/core/network_tap/ncontrol/ncontrol.py
edgardmota/vent
67b01abc059a3e9e8d16670c7058f0a9e267d8f1
[ "Apache-2.0" ]
null
null
null
vent/core/network_tap/ncontrol/ncontrol.py
edgardmota/vent
67b01abc059a3e9e8d16670c7058f0a9e267d8f1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import docker import logging import sys import web from rest.create import CreateR from rest.delete import DeleteR from rest.nics import NICsR from rest.nlist import ListR from rest.start import StartR from rest.stop import StopR module_logger = logging.getLogger(__name__) class NControlServe...
25.77193
78
0.62015
1,105
0.752212
0
0
253
0.172226
0
0
424
0.288632
e246453b42dcd37dfd9577c8a2d5d504feec20c6
410
py
Python
applications/prediction_bigball/container/c2_Twitter_Collector/app/predict.py
Dumpkin1996/clipper
1a08bbdde846c3cfe76236c68548a848f71605e0
[ "Apache-2.0" ]
2
2019-04-24T13:46:28.000Z
2019-05-28T06:59:26.000Z
applications/prediction_clipper/container/c2_Twitter_Collector/app/predict.py
SimonZsx/clipper
457088be2ebe68c68b94d90389d1308e35b4c844
[ "Apache-2.0" ]
null
null
null
applications/prediction_clipper/container/c2_Twitter_Collector/app/predict.py
SimonZsx/clipper
457088be2ebe68c68b94d90389d1308e35b4c844
[ "Apache-2.0" ]
4
2019-04-03T11:03:57.000Z
2019-06-26T08:22:38.000Z
import io import sys import tweepy import time def predict(request): # serve as api function start = time.time() info = request.split(":") stockcode = info[0] data_path = "/container/c2_Twitter_Collector/dataset/" + stockcode + ".txt" with open(data_path, 'r', encoding='utf-8') as file: result = file.read().rep...
20.5
76
0.682927
0
0
0
0
0
0
0
0
105
0.256098
e2479703efb51fcc66276bd6c78cfb1dad7d15bb
891
py
Python
tests/unit_tests/test_exceptions.py
kurumuz/datacrunch-python
94b02c68da48b1017c0c837b3b37a97b4b2543a5
[ "MIT" ]
9
2021-01-07T17:56:11.000Z
2022-02-05T01:42:42.000Z
tests/unit_tests/test_exceptions.py
kurumuz/datacrunch-python
94b02c68da48b1017c0c837b3b37a97b4b2543a5
[ "MIT" ]
3
2021-05-26T16:17:33.000Z
2021-12-17T09:25:06.000Z
tests/unit_tests/test_exceptions.py
kurumuz/datacrunch-python
94b02c68da48b1017c0c837b3b37a97b4b2543a5
[ "MIT" ]
3
2021-05-16T00:47:40.000Z
2021-12-17T08:59:16.000Z
import pytest from datacrunch.exceptions import APIException ERROR_CODE = 'test_code' ERROR_MESSAGE = "test message" def test_api_exception_with_code(): # arrange error_str = f'error code: {ERROR_CODE}\nmessage: {ERROR_MESSAGE}' # act with pytest.raises(APIException) as excinfo: raise APIExc...
26.205882
69
0.702581
0
0
0
0
0
0
0
0
149
0.167228
e2484c0e3f3a758de7ba5492e88d263a61c7d083
5,686
py
Python
snoop/models.py
hoover/snoop
bd49b081418a8a01a1e469ab17759a4c5b20d850
[ "MIT" ]
5
2017-01-03T00:52:03.000Z
2019-10-27T03:32:35.000Z
snoop/models.py
hoover/snoop
bd49b081418a8a01a1e469ab17759a4c5b20d850
[ "MIT" ]
25
2016-08-21T11:26:44.000Z
2018-03-13T12:19:20.000Z
snoop/models.py
hoover/snoop
bd49b081418a8a01a1e469ab17759a4c5b20d850
[ "MIT" ]
6
2016-09-27T13:03:45.000Z
2019-10-27T03:32:30.000Z
from pathlib import Path from io import BytesIO import json from contextlib import contextmanager import tempfile import shutil from django.db import models, transaction from django.contrib.postgres.fields import JSONField from django.conf import settings def cache(model, keyfunc): def decorator(func): i...
31.414365
78
0.62522
4,836
0.85051
963
0.169363
1,586
0.278931
0
0
591
0.10394
e2488ab43fc64895472fd4c4e6cd0e65a68427c1
20
py
Python
test/__init__.py
LeonSu070/jira_bug_analysis
6b1d814270be25a62706ab58b0b31c8771b649d9
[ "Apache-2.0" ]
2
2018-11-16T07:00:43.000Z
2018-12-13T08:17:39.000Z
test/__init__.py
LeonSu070/jira_bug_analysis
6b1d814270be25a62706ab58b0b31c8771b649d9
[ "Apache-2.0" ]
null
null
null
test/__init__.py
LeonSu070/jira_bug_analysis
6b1d814270be25a62706ab58b0b31c8771b649d9
[ "Apache-2.0" ]
1
2019-09-16T09:53:12.000Z
2019-09-16T09:53:12.000Z
__author__ = 'Jack'
10
19
0.7
0
0
0
0
0
0
0
0
6
0.3
e24c67e2fa0e7cbac60e363c0a3c0d90ac4a1b04
1,643
py
Python
basic_op.py
elosivi/python_tkinter_calculator
1ee17adb26aa9bf2b3a17a0b340464c6ba562972
[ "MIT" ]
null
null
null
basic_op.py
elosivi/python_tkinter_calculator
1ee17adb26aa9bf2b3a17a0b340464c6ba562972
[ "MIT" ]
null
null
null
basic_op.py
elosivi/python_tkinter_calculator
1ee17adb26aa9bf2b3a17a0b340464c6ba562972
[ "MIT" ]
null
null
null
""" myOperations is a list wich memory all values and operators entered by the user before click on "=" """ myOperations=[] def put_in_myOperations(value): #this function fill myOperations list myOperations.append(value) def clear_myOperations(): #this function delete all values in myOperations list ...
31.596154
99
0.63664
0
0
0
0
0
0
0
0
734
0.446744
e24cff14d61b3d1d516acfc54a69d88f1d665b63
3,863
py
Python
cantools/autosar/secoc.py
malneni/cantools
b9958577c0f616c28c7fa37a2d2b491478e065ba
[ "MIT" ]
null
null
null
cantools/autosar/secoc.py
malneni/cantools
b9958577c0f616c28c7fa37a2d2b491478e065ba
[ "MIT" ]
null
null
null
cantools/autosar/secoc.py
malneni/cantools
b9958577c0f616c28c7fa37a2d2b491478e065ba
[ "MIT" ]
null
null
null
# Utilities for dealing with AUTOSAR secure on-board communication. # (SecOC, i.e., verification of the authenticity of the sender of # messages.) from cantools.database.can.message import Message from cantools.errors import Error from typing import ( Union, List, Optional, ) from cantools.typechecking i...
35.768519
74
0.588403
113
0.029252
0
0
0
0
0
0
1,199
0.310381
e24edf3db066bab5b7ad6420821b48f3976957ea
52,453
py
Python
test/chora/scripts/testing.py
jbreck/duet-jbreck
3bf4aa0c69983d15f199bf02f294d356c354e932
[ "MIT" ]
1
2020-08-15T15:26:25.000Z
2020-08-15T15:26:25.000Z
test/chora/scripts/testing.py
jbreck/duet-jbreck
3bf4aa0c69983d15f199bf02f294d356c354e932
[ "MIT" ]
null
null
null
test/chora/scripts/testing.py
jbreck/duet-jbreck
3bf4aa0c69983d15f199bf02f294d356c354e932
[ "MIT" ]
null
null
null
#!/usr/bin/python import os.path, sys, glob, datetime, time, subprocess, shutil, re import xml.sax.saxutils, csv, tempfile import choraconfig def usage() : print "USAGE: testing.py --run <batchname>" print " to start a new testing run" print " OR testing.py --format <run_id>" print " ...
46.749554
156
0.528282
5,770
0.110003
0
0
0
0
0
0
14,092
0.26866
e24fbce9aed9113bc47d48913f811befc901b6e5
1,710
py
Python
spec_collection.py
oursonvie/xcar
2bc52f2935e62823c589e9a9fe708f1dcd2cdb69
[ "Apache-2.0" ]
null
null
null
spec_collection.py
oursonvie/xcar
2bc52f2935e62823c589e9a9fe708f1dcd2cdb69
[ "Apache-2.0" ]
null
null
null
spec_collection.py
oursonvie/xcar
2bc52f2935e62823c589e9a9fe708f1dcd2cdb69
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import crawler import mongo # in this module, data form model will be read and spec of each model is # recorded int he database # import mongo driver from pymongo import MongoClient client = MongoClient() db = client['test_car'] # define base link baselink = "http://newcar.xcar.com.cn" # ...
28.032787
85
0.570175
0
0
0
0
0
0
0
0
575
0.326334
e25126ad015fd0336328c504cfadac599a468d6d
1,233
py
Python
src/adj_generator.py
Rama-007/Utility_scoring_of_product_reviews
0b4ca33774128f55a606a546f7ed4e67cfa8d943
[ "MIT" ]
null
null
null
src/adj_generator.py
Rama-007/Utility_scoring_of_product_reviews
0b4ca33774128f55a606a546f7ed4e67cfa8d943
[ "MIT" ]
null
null
null
src/adj_generator.py
Rama-007/Utility_scoring_of_product_reviews
0b4ca33774128f55a606a546f7ed4e67cfa8d943
[ "MIT" ]
1
2018-05-17T17:42:19.000Z
2018-05-17T17:42:19.000Z
import os,sys import csv import numpy as np from sklearn.model_selection import train_test_split from sklearn import datasets from sklearn import svm from sklearn import linear_model from sklearn.metrics import matthews_corrcoef from sklearn.feature_extraction.text import TfidfVectorizer import re import nltk from coll...
25.163265
59
0.59043
0
0
0
0
0
0
0
0
60
0.048662
e2527a6fe723aa45e3efd33e33cfd5d50fd7fc36
3,393
py
Python
pyapi/addins-api/localapi/deployment.py
dockerian/py-api
777db7d5dacf3ecf29a991f50d2ac78bb5bef66a
[ "Apache-2.0" ]
null
null
null
pyapi/addins-api/localapi/deployment.py
dockerian/py-api
777db7d5dacf3ecf29a991f50d2ac78bb5bef66a
[ "Apache-2.0" ]
6
2019-12-26T16:51:55.000Z
2022-03-21T22:16:45.000Z
pyapi/addins-api/localapi/deployment.py
dockerian/pyapi
777db7d5dacf3ecf29a991f50d2ac78bb5bef66a
[ "Apache-2.0" ]
null
null
null
import json import shutil import tempfile import traceback from multiprocessing import Process from subprocess import call, check_output, CalledProcessError from api import swift from utils import settings, delete_directory_tree from deploy.deploy import Deployment from deploy.deploy_status import DeploymentStatus f...
32.625
76
0.660772
0
0
0
0
0
0
0
0
960
0.282935
e252c4820e12f03ff5ff8a21a0e62a986d8dd5fd
2,344
py
Python
cores/password.py
0xGhazy/PyPass-Project
5492eb0dc75cd023a3f1a6b3270914d27c8a7582
[ "MIT" ]
2
2022-03-18T16:13:59.000Z
2022-03-28T20:24:56.000Z
cores/password.py
0xGhazy/PyPass-Project
5492eb0dc75cd023a3f1a6b3270914d27c8a7582
[ "MIT" ]
1
2022-03-19T14:50:19.000Z
2022-03-22T18:40:57.000Z
cores/password.py
0xGhazy/PyPass-Project
5492eb0dc75cd023a3f1a6b3270914d27c8a7582
[ "MIT" ]
1
2022-03-18T14:58:51.000Z
2022-03-18T14:58:51.000Z
import random import string class Password: """ Password class takes care of: - Checks for password strength. - Generates strong random password that contains lower/upper/numbers, random password length 16 bits. """ def __init__(self): self._password_strength = 0 ...
30.441558
77
0.603242
2,028
0.865188
0
0
0
0
0
0
462
0.197099
e252dcbc46d6e9b468ac941a79802b5af9d1c4cb
849
py
Python
DjangoCountries/DjangoCountries/urls.py
xm4dn355x/specialist_DjangoCountries
debfbead4cc87faf1e60af374863498080c5fa8f
[ "MIT" ]
null
null
null
DjangoCountries/DjangoCountries/urls.py
xm4dn355x/specialist_DjangoCountries
debfbead4cc87faf1e60af374863498080c5fa8f
[ "MIT" ]
null
null
null
DjangoCountries/DjangoCountries/urls.py
xm4dn355x/specialist_DjangoCountries
debfbead4cc87faf1e60af374863498080c5fa8f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ######################################################################## # # # Main router # # # # MI...
38.590909
72
0.262662
0
0
0
0
0
0
0
0
643
0.757362
e254e16f7fd71692efcf28db1746504d39517446
5,153
py
Python
schulze.py
bjornlevi/schulze
b63951a4083592988b0a94d2cdc048f1989c36e3
[ "MIT" ]
2
2015-11-09T05:11:20.000Z
2016-05-05T10:23:10.000Z
schulze.py
bjornlevi/schulze
b63951a4083592988b0a94d2cdc048f1989c36e3
[ "MIT" ]
null
null
null
schulze.py
bjornlevi/schulze
b63951a4083592988b0a94d2cdc048f1989c36e3
[ "MIT" ]
null
null
null
""" Schulze STV voting implementation. See https://en.wikipedia.org/wiki/Schulze_method """ from collections import defaultdict, OrderedDict import random def compute_strongest_paths(preference, candidates): """ input: preference p[i,j] = number of voters that prefer candidate i to candidate j in...
39.335878
125
0.578886
0
0
0
0
0
0
0
0
2,547
0.494275
e2553ed325e23b75f15e38f6dfb159756a4a0513
5,308
py
Python
JPMC_presentation/int_func.py
qBraid/presentations
dd3d19f934b806b96c05a626b14224f35f868f6d
[ "MIT" ]
null
null
null
JPMC_presentation/int_func.py
qBraid/presentations
dd3d19f934b806b96c05a626b14224f35f868f6d
[ "MIT" ]
1
2021-06-15T15:10:06.000Z
2021-06-15T15:10:06.000Z
JPMC_presentation/int_func.py
qBraid/presentations
dd3d19f934b806b96c05a626b14224f35f868f6d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Dec 12 19:42:57 2018 @author: kanav """ import logging from pyscf import gto, scf, ao2mo from pyscf.lib import param from scipy import linalg as scila from pyscf.lib import logger as pylogger from qiskit.chemistry import QiskitChemistryError # from qiskit.chemistr...
33.594937
138
0.648832
0
0
0
0
0
0
0
0
1,868
0.351922
e2557523d73c9829aec7494745f01d0144031b52
1,673
py
Python
02_Optimization/naive.py
IC-UFAL/mlclass
c314b028e2221915bc97ab95fc36d46fb87d8f5b
[ "MIT" ]
null
null
null
02_Optimization/naive.py
IC-UFAL/mlclass
c314b028e2221915bc97ab95fc36d46fb87d8f5b
[ "MIT" ]
null
null
null
02_Optimization/naive.py
IC-UFAL/mlclass
c314b028e2221915bc97ab95fc36d46fb87d8f5b
[ "MIT" ]
2
2019-02-20T02:57:35.000Z
2019-02-28T00:49:41.000Z
import datetime import json import requests # url = 'http://localhost:8080/antenna/simulate?phi1={}&theta1={}&phi2={}&theta2={}&phi3={}&theta3={}' url = 'https://aydanomachado.com/mlclass/02_Optimization.php?phi1={}&theta1={}&phi2={}&theta2={}&phi3={}&theta3={}&dev_key=Dual Core' angles = ['phi1', 'theta1', 'phi2', '...
32.173077
133
0.500897
0
0
0
0
0
0
0
0
458
0.273433
e2586815f692b4c5cc76a0b0f9b72bd23ec35589
4,511
py
Python
nautobot/extras/admin.py
romanukes/nautobot
1a58479e702c16c9298ab18b96f74718c64697f9
[ "Apache-2.0" ]
null
null
null
nautobot/extras/admin.py
romanukes/nautobot
1a58479e702c16c9298ab18b96f74718c64697f9
[ "Apache-2.0" ]
null
null
null
nautobot/extras/admin.py
romanukes/nautobot
1a58479e702c16c9298ab18b96f74718c64697f9
[ "Apache-2.0" ]
null
null
null
from db_file_storage.form_widgets import DBAdminClearableFileInput from django import forms from django.contrib import admin, messages from django.db import transaction from django.db.models import ProtectedError from .models import CustomField, CustomFieldChoice, FileProxy, JobResult def order_content_types(field):...
24.252688
104
0.533141
3,743
0.82975
0
0
2,876
0.637553
0
0
1,213
0.268898
e2591a9c5667fcee0b50b358960f50cf7f2ccbed
112
py
Python
pyrevolve/genotype/learning_body/config.py
braj29/robo_swimmers
b3c3fa91976884095eb6b5e67844167598ec573d
[ "Apache-1.1" ]
null
null
null
pyrevolve/genotype/learning_body/config.py
braj29/robo_swimmers
b3c3fa91976884095eb6b5e67844167598ec573d
[ "Apache-1.1" ]
null
null
null
pyrevolve/genotype/learning_body/config.py
braj29/robo_swimmers
b3c3fa91976884095eb6b5e67844167598ec573d
[ "Apache-1.1" ]
null
null
null
from dataclasses import dataclass @dataclass class Config: mutation_prob: float crossover_prob: float
14
33
0.776786
64
0.571429
0
0
75
0.669643
0
0
0
0
e25a9a6afbe98bdd354733d1dd35bd9291fc6eb1
407
py
Python
demo/catch/serve.py
marco-souza/falsy
0dd6f792061ee833f308372f0204dea0ad9bf2d1
[ "MIT" ]
127
2017-01-05T14:55:50.000Z
2022-02-01T06:02:49.000Z
demo/catch/serve.py
marco-souza/falsy
0dd6f792061ee833f308372f0204dea0ad9bf2d1
[ "MIT" ]
9
2017-03-08T21:38:16.000Z
2022-02-01T06:44:09.000Z
demo/catch/serve.py
marco-souza/falsy
0dd6f792061ee833f308372f0204dea0ad9bf2d1
[ "MIT" ]
26
2017-01-12T08:56:15.000Z
2022-02-01T06:02:52.000Z
import json from falsy.falsy import FALSY class CustomException(Exception): pass def handle_custom(req, resp, e): resp.body = json.dumps({'error': 'custom error catched'}) resp.content_type = 'application/json' f = FALSY(static_path='test', static_dir='demo/catch/static') f.swagger('demo/catch/spec.y...
22.611111
102
0.724816
42
0.103194
0
0
0
0
0
0
105
0.257985
e25bb3d21aa35bada6a1cc156c43483bfa1ddc27
1,125
py
Python
main/services/post_service.py
andriidem308/django_02
6d9f624271d28ea6f53517e6144fa6b9d76598e5
[ "MIT" ]
null
null
null
main/services/post_service.py
andriidem308/django_02
6d9f624271d28ea6f53517e6144fa6b9d76598e5
[ "MIT" ]
1
2021-05-15T18:28:26.000Z
2021-05-15T18:28:26.000Z
main/services/post_service.py
andriidem308/django_02
6d9f624271d28ea6f53517e6144fa6b9d76598e5
[ "MIT" ]
null
null
null
"""Show Posts Method.""" from django.core.cache import cache from main.forms import CommentsForm from main.models import Post def post_all(): """Post All.""" key = Post().__class__.cache_key() if key in cache: objects_all = cache.get(key) else: objects_all = Post.objects.all() ...
28.846154
66
0.639111
0
0
0
0
0
0
0
0
239
0.212444
e25bf8be3fd6bade037eaf4f8cc3eb38deb9550a
470
py
Python
tests/fixtures/device.py
jspaaks/vak
581ec4869d342e5d52bc057de54c10901f06d343
[ "BSD-3-Clause" ]
26
2019-03-04T20:08:57.000Z
2022-01-22T13:40:00.000Z
tests/fixtures/device.py
jspaaks/vak
581ec4869d342e5d52bc057de54c10901f06d343
[ "BSD-3-Clause" ]
379
2019-03-03T12:16:05.000Z
2022-03-29T13:44:46.000Z
tests/fixtures/device.py
jspaaks/vak
581ec4869d342e5d52bc057de54c10901f06d343
[ "BSD-3-Clause" ]
12
2019-11-22T21:19:19.000Z
2022-03-14T17:44:59.000Z
import pytest import torch DEVICES = ["cpu"] if torch.cuda.is_available(): DEVICES.append("cuda") @pytest.fixture(params=DEVICES) def device(request): """parametrized device function, that returns string names of the devices that ``torch`` considers "available". causes any test using ``device`` ...
24.736842
67
0.695745
0
0
0
0
364
0.774468
0
0
293
0.623404
e25c0302ee8c05536014998029d4db780aef6a92
73
py
Python
jacdac/heart_rate/__init__.py
microsoft/jacdac-python
712ad5559e29065f5eccb5dbfe029c039132df5a
[ "MIT" ]
1
2022-02-15T21:30:36.000Z
2022-02-15T21:30:36.000Z
jacdac/heart_rate/__init__.py
microsoft/jacdac-python
712ad5559e29065f5eccb5dbfe029c039132df5a
[ "MIT" ]
null
null
null
jacdac/heart_rate/__init__.py
microsoft/jacdac-python
712ad5559e29065f5eccb5dbfe029c039132df5a
[ "MIT" ]
1
2022-02-08T19:32:45.000Z
2022-02-08T19:32:45.000Z
# Autogenerated file. from .client import HeartRateClient # type: ignore
24.333333
50
0.794521
0
0
0
0
0
0
0
0
35
0.479452
e25e669fd4134f81db148915a2fa79ef70cd3223
3,464
py
Python
ckan_api_client/tests/functional/client_lowlev/test_group_crud.py
plorenzatto/ckan-api-client
aad42484b07f3f24eef32d10547fad8d7ea27400
[ "BSD-2-Clause" ]
4
2015-07-30T03:46:48.000Z
2018-04-26T08:28:39.000Z
ckan_api_client/tests/functional/client_lowlev/test_group_crud.py
plorenzatto/ckan-api-client
aad42484b07f3f24eef32d10547fad8d7ea27400
[ "BSD-2-Clause" ]
3
2015-03-09T11:16:15.000Z
2021-03-11T16:09:25.000Z
ckan_api_client/tests/functional/client_lowlev/test_group_crud.py
plorenzatto/ckan-api-client
aad42484b07f3f24eef32d10547fad8d7ea27400
[ "BSD-2-Clause" ]
2
2016-09-12T14:14:45.000Z
2021-03-11T16:09:56.000Z
import copy import pytest from ckan_api_client.exceptions import HTTPError from ckan_api_client.tests.utils.strings import gen_random_id from ckan_api_client.tests.utils.validation import check_group @pytest.mark.xfail(run=False, reason='Work in progress') def test_group_crud(ckan_client_ll): client = ckan_clie...
30.928571
71
0.638857
0
0
0
0
1,745
0.503753
0
0
2,299
0.663684
e25f3d9d4062aaa4018c1834a206c3be127fedc6
37
py
Python
Beta/Chessboard legend.py
mwk0408/codewars_solutions
9b4f502b5f159e68024d494e19a96a226acad5e5
[ "MIT" ]
6
2020-09-03T09:32:25.000Z
2020-12-07T04:10:01.000Z
Beta/Chessboard legend.py
mwk0408/codewars_solutions
9b4f502b5f159e68024d494e19a96a226acad5e5
[ "MIT" ]
1
2021-12-13T15:30:21.000Z
2021-12-13T15:30:21.000Z
Beta/Chessboard legend.py
mwk0408/codewars_solutions
9b4f502b5f159e68024d494e19a96a226acad5e5
[ "MIT" ]
null
null
null
def grains(n): return 2**(n**2)-1
18.5
22
0.540541
0
0
0
0
0
0
0
0
0
0
e26133561a6a1fbea9a0c907133569d903786fa4
749
py
Python
ex102.py
ezequielwish/Python3
a4489d49e6919649437cb9e682614240701e2b68
[ "MIT" ]
1
2022-01-24T02:01:32.000Z
2022-01-24T02:01:32.000Z
ex102.py
ezequielwish/Python3
a4489d49e6919649437cb9e682614240701e2b68
[ "MIT" ]
null
null
null
ex102.py
ezequielwish/Python3
a4489d49e6919649437cb9e682614240701e2b68
[ "MIT" ]
null
null
null
# Crie um programa que tenha uma função fatorial() que receba dois parâmetros: o primeiro que indique # o número a calcular e outro chamado show, que será um valor lógico (opcional) indicando se será # mostrado ou não na tela o processo de cálculo do fatorial. def factorial(number, show=False): """ Calcula o f...
29.96
101
0.600801
0
0
0
0
0
0
0
0
446
0.586071
e2617623ef2efc44b44ea28d9b54e927b69dfd87
208,496
py
Python
colour_datasets/loaders/tests/test_kuopio.py
JGoldstone/colour-datasets
8e0b52870c63c0e9b72d8b848720e0c28e0cbfa4
[ "BSD-3-Clause" ]
1
2022-01-29T09:12:18.000Z
2022-01-29T09:12:18.000Z
colour_datasets/loaders/tests/test_kuopio.py
JGoldstone/colour-datasets
8e0b52870c63c0e9b72d8b848720e0c28e0cbfa4
[ "BSD-3-Clause" ]
null
null
null
colour_datasets/loaders/tests/test_kuopio.py
JGoldstone/colour-datasets
8e0b52870c63c0e9b72d8b848720e0c28e0cbfa4
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Defines unit tests for :mod:`colour_datasets.loaders.kuopio` module. """ import numpy as np import os import unittest from colour import SpectralShape from colour_datasets.loaders.kuopio import ( MatFileMetadata_KuopioUniversity, read_sds_from_mat_file_KuopioUniversity) from colour_da...
58.418605
78
0.281439
207,339
0.994451
0
0
0
0
0
0
1,194
0.005727
e262da1aa6ad6096d2959977d0253825881aad07
1,417
py
Python
tbonlineproject/faq/templatetags/faqtags.py
nathangeffen/tbonline3
1b8a3af8d2dc1ee8083ca6638d025e94bd98f253
[ "MIT" ]
null
null
null
tbonlineproject/faq/templatetags/faqtags.py
nathangeffen/tbonline3
1b8a3af8d2dc1ee8083ca6638d025e94bd98f253
[ "MIT" ]
3
2021-06-08T23:57:13.000Z
2022-01-13T03:42:01.000Z
tbonlineproject/faq/templatetags/faqtags.py
nathangeffen/tbonline-2
0d5869197e66a0057fa07cb99f21dde7f5b47c30
[ "MIT" ]
null
null
null
import re from django import template from faq.models import QuestionCategory, QuestionAndAnswer register = template.Library() class QuestionsByCategories(template.Node): def __init__(self, categories, var_name): self.categories = categories self.var_name = var_name def render(self, contex...
30.148936
99
0.66549
349
0.246295
0
0
0
0
0
0
240
0.169372
e263e094c6996081261b4cf375cdf5d9eb8e965a
3,387
py
Python
tests/unit/test_api_connector.py
thomasperrot/weather
bc94d948f2c49a33b8ff3cf3dff850950825d161
[ "MIT" ]
1
2019-11-27T09:00:07.000Z
2019-11-27T09:00:07.000Z
tests/unit/test_api_connector.py
thomasperrot/weather
bc94d948f2c49a33b8ff3cf3dff850950825d161
[ "MIT" ]
14
2020-09-11T12:40:01.000Z
2020-10-06T07:17:26.000Z
tests/unit/test_api_connector.py
thomasperrot/weather
bc94d948f2c49a33b8ff3cf3dff850950825d161
[ "MIT" ]
2
2020-08-28T08:45:46.000Z
2020-10-06T07:15:01.000Z
import json import os import pytest import requests from weather import api_connector, exceptions def test_get_city_id_unknown_city(monkeypatch): class MockResponse: def json(self): return [] def raise_for_status(self): pass class MockRequest: @staticmethod ...
27.762295
82
0.649838
1,385
0.408916
0
0
1,122
0.331267
0
0
353
0.104222
e268813ad9f17d0dfbbf6f95f09c61a8270ce62b
93
py
Python
GoT_crawler/analysis.py
aamzhas/reddit_projects
01f36f873315978faafdae6e8509f706a0863ba9
[ "MIT" ]
null
null
null
GoT_crawler/analysis.py
aamzhas/reddit_projects
01f36f873315978faafdae6e8509f706a0863ba9
[ "MIT" ]
null
null
null
GoT_crawler/analysis.py
aamzhas/reddit_projects
01f36f873315978faafdae6e8509f706a0863ba9
[ "MIT" ]
null
null
null
import csv from textblob import TextBlob as tb if __name__ == "__main__": analyse_data()
18.6
35
0.741935
0
0
0
0
0
0
0
0
10
0.107527
e268f670899c7a0577a47e0547ad2270f1a22f73
928
py
Python
utils.py
ndukh/liver-segmentation
f46697719b78d11f8871048c7c3aaaf8d8f3777f
[ "MIT" ]
2
2019-12-06T13:36:47.000Z
2020-10-08T13:57:02.000Z
utils.py
ndukh/liver-segmentation
f46697719b78d11f8871048c7c3aaaf8d8f3777f
[ "MIT" ]
null
null
null
utils.py
ndukh/liver-segmentation
f46697719b78d11f8871048c7c3aaaf8d8f3777f
[ "MIT" ]
null
null
null
from keras import backend as K def dice_coef(y_true, y_pred): """ A simple dice metric over true and predicted tensors. We do not calculate dice axis-based, instead of this we calculate total dice for the whole batch. It is simpler, when the result is the same as after 'fair' calculation of dice f...
40.347826
82
0.669181
0
0
0
0
0
0
0
0
634
0.68172
e26982b2c89136e7d22b94863c422aab02333678
1,932
py
Python
scripts/searchtool.py
sirikata/sirikata-cdn
115e9ad264229eaecd05008cb292ac0b8376a4a2
[ "BSD-3-Clause" ]
1
2017-07-21T13:48:45.000Z
2017-07-21T13:48:45.000Z
scripts/searchtool.py
sirikata/sirikata-cdn
115e9ad264229eaecd05008cb292ac0b8376a4a2
[ "BSD-3-Clause" ]
2
2020-06-05T18:30:40.000Z
2021-06-10T20:21:24.000Z
scripts/searchtool.py
sirikata/sirikata-cdn
115e9ad264229eaecd05008cb292ac0b8376a4a2
[ "BSD-3-Clause" ]
1
2016-05-15T13:34:47.000Z
2016-05-15T13:34:47.000Z
import os import os.path import sys import argparse def list_all(args): results = search_index(q='*', start=0, rows=2000000) for result in results: print result['id'] print print 'Found %d results.' % len(results) def update_all(args): print 'Firing off task to update entire searc...
32.745763
114
0.706004
0
0
0
0
0
0
0
0
444
0.229814
e26a005aba399c82f6157e54fb1eeafe0b723175
5,145
py
Python
tools/test_and_draw_to_file.py
freesunshine/mmdetection
9fbd92c181f90feccfba7c8f17817c170b484bd9
[ "Apache-2.0" ]
null
null
null
tools/test_and_draw_to_file.py
freesunshine/mmdetection
9fbd92c181f90feccfba7c8f17817c170b484bd9
[ "Apache-2.0" ]
null
null
null
tools/test_and_draw_to_file.py
freesunshine/mmdetection
9fbd92c181f90feccfba7c8f17817c170b484bd9
[ "Apache-2.0" ]
null
null
null
from mmdet.apis import init_detector, inference_detector, show_result import mmcv import os import cv2 import sys from mmdet.datasets.pipelines.loading import LoadPolNPZImageFromFile from mmdet.datasets.pipelines.loading import LoadPolSubImageFromFile import numpy as np def load_pol_sub_image(sample_file, div_num=655...
42.172131
124
0.625462
0
0
0
0
0
0
0
0
2,018
0.392225
e26a38dd5db9e2db5acd9b9c4ba66fe869a0a241
684
py
Python
guppe/atividades/secao_7/ex029.py
WesleyLucas97/cursos_python
b2cbd393e8fed6e36b84253f7934766f2b4f1de8
[ "MIT" ]
null
null
null
guppe/atividades/secao_7/ex029.py
WesleyLucas97/cursos_python
b2cbd393e8fed6e36b84253f7934766f2b4f1de8
[ "MIT" ]
null
null
null
guppe/atividades/secao_7/ex029.py
WesleyLucas97/cursos_python
b2cbd393e8fed6e36b84253f7934766f2b4f1de8
[ "MIT" ]
null
null
null
""" Faça um programa que receba 6 números inteiros e mostre: - Os números pares digitados; - A soma dos números pares digitados; - Os números ímpares digitados; - A quantidade de números ímpares digitados. """ from random import randint vetor = [] pares = [] impares = [] for x in range(randint(6, 50)):...
26.307692
67
0.676901
0
0
0
0
0
0
0
0
430
0.616046
e26c2b378eb036143edf512f53458c5a06faa35c
20,793
py
Python
django_evolution/tests/test_rename_field.py
beanbaginc/django-evolution
fb76e44a2361a69a440dca086c0cc67ac6a4300d
[ "BSD-3-Clause" ]
18
2015-02-08T14:48:02.000Z
2021-08-03T21:07:37.000Z
django_evolution/tests/test_rename_field.py
beanbaginc/django-evolution
fb76e44a2361a69a440dca086c0cc67ac6a4300d
[ "BSD-3-Clause" ]
4
2015-01-07T01:15:08.000Z
2020-08-06T06:52:13.000Z
django_evolution/tests/test_rename_field.py
beanbaginc/django-evolution
fb76e44a2361a69a440dca086c0cc67ac6a4300d
[ "BSD-3-Clause" ]
13
2015-01-07T01:06:21.000Z
2022-02-20T16:27:41.000Z
from __future__ import unicode_literals from django.db import models from django_evolution.errors import SimulationFailure from django_evolution.mutations import RenameField from django_evolution.signature import (AppSignature, ModelSignature, ...
41.337972
77
0.588179
20,307
0.976627
0
0
0
0
0
0
6,432
0.309335
e26c7f0e54b8d43e115078966363aff4e60f48a6
26,192
py
Python
src/cbc_sdk/platform/devices.py
fslds/carbon-black-cloud-sdk-python
248a3c63d6b36d6fcdbcb3f51fb7751f062ed372
[ "MIT" ]
24
2020-10-16T22:07:38.000Z
2022-03-24T14:58:03.000Z
src/cbc_sdk/platform/devices.py
fslds/carbon-black-cloud-sdk-python
248a3c63d6b36d6fcdbcb3f51fb7751f062ed372
[ "MIT" ]
63
2020-10-26T18:26:15.000Z
2022-03-31T17:31:02.000Z
src/cbc_sdk/platform/devices.py
fslds/carbon-black-cloud-sdk-python
248a3c63d6b36d6fcdbcb3f51fb7751f062ed372
[ "MIT" ]
10
2020-11-09T11:54:23.000Z
2022-03-24T20:44:00.000Z
#!/usr/bin/env python3 # ******************************************************* # Copyright (c) VMware, Inc. 2020-2021. All Rights Reserved. # SPDX-License-Identifier: MIT # ******************************************************* # * # * DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT # * WARRANTIES OR CO...
35.062918
118
0.60465
25,118
0.958995
1,323
0.050512
764
0.029169
0
0
14,646
0.559178
e26ce504f8d020dbf40351637cdd277a284cb83b
810
py
Python
cmd/run_pytest.py
Amourspirit/python-version-num
03e8f35b85900a5f9736dda2d9c172e73bdad9fe
[ "MIT" ]
1
2021-11-13T08:26:05.000Z
2021-11-13T08:26:05.000Z
cmd/run_pytest.py
Amourspirit/python-version-num
03e8f35b85900a5f9736dda2d9c172e73bdad9fe
[ "MIT" ]
null
null
null
cmd/run_pytest.py
Amourspirit/python-version-num
03e8f35b85900a5f9736dda2d9c172e73bdad9fe
[ "MIT" ]
1
2021-11-13T08:26:41.000Z
2021-11-13T08:26:41.000Z
# coding: utf-8 from subprocess import run import pathlib import os TEST_DIR = 'tests' ROOT_PATH = pathlib.Path(__file__).parent.parent TEST_MODULES = ['verr'] def get_modules(): global TEST_MODULES result = '' if len(TEST_MODULES) > 0: result = ' --cov=' + ' --cov='.join(TEST_MODULES) return ...
24.545455
100
0.658025
0
0
0
0
0
0
0
0
256
0.316049
e26d97693b5c78f4bb3f85e734c99eec2f0dea90
220
py
Python
generativemagic/effect.py
misaka3/generativemagic
58f24a9fd95c94828281ed6c1267d570ee7c7b10
[ "MIT" ]
null
null
null
generativemagic/effect.py
misaka3/generativemagic
58f24a9fd95c94828281ed6c1267d570ee7c7b10
[ "MIT" ]
null
null
null
generativemagic/effect.py
misaka3/generativemagic
58f24a9fd95c94828281ed6c1267d570ee7c7b10
[ "MIT" ]
null
null
null
from generativemagic.movement import Movement DECK_TOP = 1 DECK_BOTTOM = 52 class Effect(Movement): def apply(self, sequence, chosen=None): raise Exception(f"Effect method not yet implemented for {self}")
22
72
0.740909
140
0.636364
0
0
0
0
0
0
47
0.213636
e26da13b7aa0f70c0a93ca683c6aa55cf517af22
10,159
py
Python
sectograph/widgets/edit_window.py
yumauri/sectograph
457c8d44c632e04031d3e59a955d6c41a81a8104
[ "MIT" ]
null
null
null
sectograph/widgets/edit_window.py
yumauri/sectograph
457c8d44c632e04031d3e59a955d6c41a81a8104
[ "MIT" ]
null
null
null
sectograph/widgets/edit_window.py
yumauri/sectograph
457c8d44c632e04031d3e59a955d6c41a81a8104
[ "MIT" ]
null
null
null
from PyQt5 import QtCore, QtGui, QtWidgets # , uic from sectograph import resources, widgets, entities, datetime as dt from .edit_window_ui import Ui_EditEventForm repeat = { "None": None, "Every Day": 1, "Every Week": 7, "Every 2 Weeks": 14, "Every Month": 30, # actually not a month "Every ...
36.543165
88
0.625849
9,465
0.931686
0
0
0
0
0
0
1,061
0.104439
e26e1e30afd44b5865d29418ebb7a003e39c3faf
2,010
py
Python
time_converter.py
lisprolog/python
3d2acea2721873d57418b9158ed3bed6e160eb16
[ "BSD-3-Clause" ]
null
null
null
time_converter.py
lisprolog/python
3d2acea2721873d57418b9158ed3bed6e160eb16
[ "BSD-3-Clause" ]
null
null
null
time_converter.py
lisprolog/python
3d2acea2721873d57418b9158ed3bed6e160eb16
[ "BSD-3-Clause" ]
null
null
null
''' You prefer a good old 12-hour time format. But the modern world we live in would rather use the 24-hour format and you see it everywhere. Your task is to convert the time from the 24-h format into 12-h format by following the next rules: - the output format should be 'hh:mm a.m.' (for hours before midday) or 'hh:m...
42.765957
238
0.589055
0
0
0
0
0
0
0
0
1,139
0.566667
e26e49266e956ade02f709bc18636ba6f4633d81
447
py
Python
LeetCode/Study Plan/Algorithm/Day 1/704. Binary Search.py
TejM/HackerRank-Solutions
8c5a79f7e644f42bc20a8c32818bf88a5c320bc1
[ "MIT" ]
null
null
null
LeetCode/Study Plan/Algorithm/Day 1/704. Binary Search.py
TejM/HackerRank-Solutions
8c5a79f7e644f42bc20a8c32818bf88a5c320bc1
[ "MIT" ]
null
null
null
LeetCode/Study Plan/Algorithm/Day 1/704. Binary Search.py
TejM/HackerRank-Solutions
8c5a79f7e644f42bc20a8c32818bf88a5c320bc1
[ "MIT" ]
null
null
null
# Space Complexity O(1) # Time Complexity O(log N) class Solution: def search(self, nums: List[int], target: int) -> int: left = 0 right = len(nums) - 1 while left <= right: mid = left + right // 2 if target == nums[mid]: return mid ...
27.9375
58
0.44519
394
0.881432
0
0
0
0
0
0
50
0.111857
e26edc3409fc91665e4e9e8bdb02caccd0068010
57,494
py
Python
gail/gail.py
VisExcell/riskmodels
012bbfd563482ba09585cd042b1f9465253ab1f4
[ "MIT" ]
2
2019-11-04T20:57:11.000Z
2021-04-08T08:05:45.000Z
gail/gail.py
VisExcell/riskmodels
012bbfd563482ba09585cd042b1f9465253ab1f4
[ "MIT" ]
null
null
null
gail/gail.py
VisExcell/riskmodels
012bbfd563482ba09585cd042b1f9465253ab1f4
[ "MIT" ]
2
2020-09-22T17:05:04.000Z
2021-02-05T17:12:28.000Z
import numpy as np class GailRiskCalculator: NumCovPattInGailModel = 216 def __init__(self): self.bet2 = np.zeros((8,12),dtype=np.float64) self.bet = np.zeros(8,dtype=np.float64) self.rf = np.zeros(2,dtype=np.float64) self.abs = np.zeros(self.NumCovPattInGailModel,dtype=np.flo...
47.28125
121
0.486364
56,721
0.986555
0
0
1,257
0.021863
0
0
23,110
0.401955
e2705dcc4290b06c5f8063fcbb0d06661bdc5307
1,170
py
Python
pki_framework/serializers.py
not-vibhu/aerobridge
2edcd5e75782663184ac57da8145427613f4ef2b
[ "Apache-2.0" ]
null
null
null
pki_framework/serializers.py
not-vibhu/aerobridge
2edcd5e75782663184ac57da8145427613f4ef2b
[ "Apache-2.0" ]
null
null
null
pki_framework/serializers.py
not-vibhu/aerobridge
2edcd5e75782663184ac57da8145427613f4ef2b
[ "Apache-2.0" ]
null
null
null
from rest_framework import serializers from pki_framework.models import AerobridgeCredential from . import encrpytion_util from django.conf import settings class AerobridgeCredentialSerializer(serializers.ModelSerializer): token = serializers.SerializerMethodField() token_type = serializers.SerializerMethodFie...
35.454545
70
0.712821
1,010
0.863248
0
0
0
0
0
0
91
0.077778
e2717384cf4bcdc0a115d702eb3c542a9840a4cd
8,777
py
Python
entities/ships/ship.py
rkwong43/Toh
702f689aa2c37a9f6f463e24405b6c418fd0607f
[ "CC-BY-4.0" ]
3
2020-01-28T16:02:26.000Z
2020-01-29T21:47:14.000Z
entities/ships/ship.py
rkwong43/Tears-Under-Heaven
702f689aa2c37a9f6f463e24405b6c418fd0607f
[ "CC-BY-4.0" ]
null
null
null
entities/ships/ship.py
rkwong43/Tears-Under-Heaven
702f689aa2c37a9f6f463e24405b6c418fd0607f
[ "CC-BY-4.0" ]
null
null
null
import math import random import pygame from utils import config # Constants for state of movement and rotations NO_WAYPOINT = 1 MOVE_WAYPOINT = 2 FIRE_WAYPOINT = 3 MOVE_AND_FIRE_WAYPOINT = 4 """Represents a generic ship. """ class Ship: random.seed() """Constructor to make the ship. :param x: starti...
31.571942
103
0.557366
8,544
0.973453
0
0
0
0
0
0
2,572
0.293039
e2766dfb113345e1fd3a134fe901eaf909ed4549
1,827
py
Python
constants2.py
Utsav-Patel/The-Imitation-Game
09dfaffdf917c1adfb1d8cd3e09a216b9a014e52
[ "MIT" ]
null
null
null
constants2.py
Utsav-Patel/The-Imitation-Game
09dfaffdf917c1adfb1d8cd3e09a216b9a014e52
[ "MIT" ]
null
null
null
constants2.py
Utsav-Patel/The-Imitation-Game
09dfaffdf917c1adfb1d8cd3e09a216b9a014e52
[ "MIT" ]
null
null
null
import os PROJECT_PATH = os.path.dirname(__file__) PROJECT_NO = 3 ARCHITECTURE_TYPE = 'dense' NUM_COLS = 10 NUM_ROWS = 10 TRAINED_MODEL_NUM_ROWS = 10 TRAINED_MODEL_NUM_COLS = 10 INF = 1e9 FILE_PREFIX = "10x10" FILE_SUFFIX = "new" TRAIN_DATA_PREFIX = "21_to_30_probability_and_1000_each" VALIDATION_TEST_DATA_PREFIX =...
29.95082
118
0.683634
0
0
0
0
0
0
0
0
218
0.119321
e277f4bdbc0bb30de17cd91736ad9678057f1dc7
3,919
py
Python
tests/manage/mcg/conftest.py
vikasmulaje/ocs-ci
98ce950150e061ba872c62f2d55f9bd395241a6e
[ "MIT" ]
null
null
null
tests/manage/mcg/conftest.py
vikasmulaje/ocs-ci
98ce950150e061ba872c62f2d55f9bd395241a6e
[ "MIT" ]
null
null
null
tests/manage/mcg/conftest.py
vikasmulaje/ocs-ci
98ce950150e061ba872c62f2d55f9bd395241a6e
[ "MIT" ]
null
null
null
import logging import pytest from ocs_ci.ocs import constants from ocs_ci.ocs.resources import mcg from tests import helpers from tests.helpers import craft_s3_command, create_unique_resource_name logger = logging.getLogger(__name__) @pytest.fixture() def mcg_obj(): """ Returns an MCG resource that's conne...
28.816176
85
0.655269
0
0
0
0
3,667
0.935698
0
0
1,487
0.379434
e27960049aaa598d72feec77e6c5226e0bfb23b5
266
py
Python
UICPC/21/nwerc2020all/islandtour/generators/rand.py
MilladMuhammadi/Competitive-Programming
9f84a2d2734a5efe0e1fde0062e51782cd5af2c6
[ "MIT" ]
null
null
null
UICPC/21/nwerc2020all/islandtour/generators/rand.py
MilladMuhammadi/Competitive-Programming
9f84a2d2734a5efe0e1fde0062e51782cd5af2c6
[ "MIT" ]
null
null
null
UICPC/21/nwerc2020all/islandtour/generators/rand.py
MilladMuhammadi/Competitive-Programming
9f84a2d2734a5efe0e1fde0062e51782cd5af2c6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import random n = int(sys.argv[1]) max_w = int(sys.argv[2]) seed = int(sys.argv[3]) k = 3 random.seed(seed) print(n) for _ in range(k+1): A = [] for i in range(n): A.append(random.randint(1, max_w)) print(*A)
14.777778
42
0.601504
0
0
0
0
0
0
0
0
22
0.082707
e27a9e3d318c52ddc407fa0d3a29622c0ebd8768
488
py
Python
odoo-13.0/doc/_extensions/autojsdoc/ext/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/doc/_extensions/autojsdoc/ext/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/doc/_extensions/autojsdoc/ext/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .directives import automodule_bound, autodirective_bound from .extractor import _get_roots def setup(app): app.add_config_value('js_roots', _get_roots, 'env') modules = {} app.add_directive_to_domain('js', 'automodule', automodule_bound(app, modules) ) autodirective = ...
34.857143
82
0.715164
0
0
0
0
0
0
0
0
109
0.223361
e27b9ff878d5e676787f0419abe25a6716e3f34c
1,867
py
Python
mjolnir/test/kafka/test_bulk_daemon.py
kdhingra307/ncm
07557138897d4266ce413c9f4fe033c24c6df065
[ "MIT" ]
null
null
null
mjolnir/test/kafka/test_bulk_daemon.py
kdhingra307/ncm
07557138897d4266ce413c9f4fe033c24c6df065
[ "MIT" ]
null
null
null
mjolnir/test/kafka/test_bulk_daemon.py
kdhingra307/ncm
07557138897d4266ce413c9f4fe033c24c6df065
[ "MIT" ]
null
null
null
from mjolnir.kafka import bulk_daemon import pytest def _mock_bulk_response(ok, action, status, result): return ok, { action: { 'status': status, 'result': result, } } def _update_success(result, n=1): return [_mock_bulk_response(True, 'update', 200, result) for _...
35.903846
88
0.656668
0
0
0
0
1,425
0.763257
0
0
303
0.162292
e281094af97245f121c74904895b108ebd981d2a
2,248
py
Python
tests/restart/rigid_vector.py
cselab/uDeviceX
2ad5e9dd9f118e3998b291cbfc35ee91205bbef8
[ "MIT" ]
2
2018-09-19T09:53:35.000Z
2018-10-08T16:37:31.000Z
tests/restart/rigid_vector.py
dimaleks/uDeviceX
2ad5e9dd9f118e3998b291cbfc35ee91205bbef8
[ "MIT" ]
20
2018-09-19T10:05:55.000Z
2018-10-01T14:50:18.000Z
tests/restart/rigid_vector.py
dimaleks/uDeviceX
2ad5e9dd9f118e3998b291cbfc35ee91205bbef8
[ "MIT" ]
null
null
null
#!/usr/bin/env python import mirheo as mir import numpy as np import argparse import trimesh parser = argparse.ArgumentParser() parser.add_argument("--restart", action='store_true', default=False) parser.add_argument("--ranks", type=int, nargs=3) args = parser.parse_args() ranks = args.ranks domain = (16, 16, 16) d...
33.552239
165
0.668149
0
0
0
0
0
0
0
0
878
0.390569
e28416ab6b88181873526448c13827e0449894a1
292
py
Python
setup.py
Matatika/analyze-shopify
3450eae05fba5c3852c9e009a212acd0ffaa9dfc
[ "MIT" ]
null
null
null
setup.py
Matatika/analyze-shopify
3450eae05fba5c3852c9e009a212acd0ffaa9dfc
[ "MIT" ]
null
null
null
setup.py
Matatika/analyze-shopify
3450eae05fba5c3852c9e009a212acd0ffaa9dfc
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name="analyze-shopify", version="0.1.0", description="Matatika datasets for tap-shopify", packages=find_packages(), package_data={ "bundle": [ "analyze/datasets/tap-shopify/*.yml", ] }, )
20.857143
52
0.609589
0
0
0
0
0
0
0
0
103
0.35274
e285f7c748c8394c121ef615cb909893a57cfa34
11,641
py
Python
scripts/jetsmearing.py
xju2/monojet
7475a62f176425ae910f2f104f175b1ddc457fdf
[ "MIT" ]
null
null
null
scripts/jetsmearing.py
xju2/monojet
7475a62f176425ae910f2f104f175b1ddc457fdf
[ "MIT" ]
null
null
null
scripts/jetsmearing.py
xju2/monojet
7475a62f176425ae910f2f104f175b1ddc457fdf
[ "MIT" ]
null
null
null
#!/usr/bin/env python import ROOT import AtlasStyle import os import sys import threading import math from array import array ROOT.gROOT.SetBatch() if not hasattr(ROOT, "loader"): ROOT.gROOT.LoadMacro("/afs/cern.ch/user/x/xju/tool/loader.c") ROOT.gROOT.LoadMacro(os.getenv("ROOTCOREBIN")+"/lib/x86_64-slc6-gcc49-...
37.430868
99
0.556567
9,264
0.795808
0
0
1,549
0.133064
0
0
2,737
0.235117
e286824d619b3fb3392a686ffb1f637ffe9558e5
226
py
Python
app/user/urls.py
bondeveloper/maischool
16bf2afe99d26caa067b7912e88839639cf2191e
[ "MIT" ]
null
null
null
app/user/urls.py
bondeveloper/maischool
16bf2afe99d26caa067b7912e88839639cf2191e
[ "MIT" ]
null
null
null
app/user/urls.py
bondeveloper/maischool
16bf2afe99d26caa067b7912e88839639cf2191e
[ "MIT" ]
null
null
null
from django.urls import path from user import views app_name = 'user' urlpatterns = [ path('', views.ListUserView.as_view(), name="list"), path('detail/<int:pk>', views.RetrieveUserView.as_view(), name="detail"), ]
20.545455
77
0.685841
0
0
0
0
0
0
0
0
39
0.172566
e2869364b9dcccc3530b23aa12c8b83b04b6e9df
11,588
py
Python
squeezenet/develop_squeezenet.py
govindnh4cl/squeezenet
4651a21d9ba274d49c9a8a8dcf5d98c16eff1510
[ "MIT" ]
null
null
null
squeezenet/develop_squeezenet.py
govindnh4cl/squeezenet
4651a21d9ba274d49c9a8a8dcf5d98c16eff1510
[ "MIT" ]
75
2020-03-14T17:07:09.000Z
2020-05-17T01:03:29.000Z
squeezenet/develop_squeezenet.py
govindnh4cl/squeezenet
4651a21d9ba274d49c9a8a8dcf5d98c16eff1510
[ "MIT" ]
null
null
null
import time import numpy as np import tensorflow as tf from my_logger import get_logger from squeezenet.config import get_config from squeezenet.inputs import get_input_pipeline from squeezenet.networks.squeezenet import Squeezenet_Imagenet from squeezenet import eval from squeezenet.checkpoint_handler import Checkpo...
43.400749
133
0.624266
11,145
0.961771
0
0
705
0.060839
0
0
3,453
0.297981
e2877a645bbb7c7bad3cbc69941b6365e83c25ff
1,151
py
Python
Code/RUN_IntaRNA.py
nrohani/SARS-CoV-2
978320f7b644c65198d632dba8a8ebe8c4df542d
[ "MIT" ]
1
2020-08-25T11:58:01.000Z
2020-08-25T11:58:01.000Z
Code/RUN_IntaRNA.py
nrohani/SARS-CoV-2
978320f7b644c65198d632dba8a8ebe8c4df542d
[ "MIT" ]
null
null
null
Code/RUN_IntaRNA.py
nrohani/SARS-CoV-2
978320f7b644c65198d632dba8a8ebe8c4df542d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jun 5 17:14:12 2020 @author: Narjes Rohani """ #install subprocess, Pandas, biopython, and IntaRNA packages import os import subprocess import pandas as pd #Load file of miRNAs sequences that you want to canculate MFE to bind SARS-CoV-2 mRNAMicroRNA=pd...
28.775
80
0.7298
0
0
0
0
0
0
0
0
523
0.454387
e2886fcfd835808de1acab30f0aa321469626e64
3,229
py
Python
salt/salt.py
juhanurmi/cryptography
362bc1cc146d291f9864f9788de904a09649d39f
[ "MIT" ]
null
null
null
salt/salt.py
juhanurmi/cryptography
362bc1cc146d291f9864f9788de904a09649d39f
[ "MIT" ]
null
null
null
salt/salt.py
juhanurmi/cryptography
362bc1cc146d291f9864f9788de904a09649d39f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ''' python3 salt.py ''' import time import random import hashlib def all_ip_addresses(): ''' Return all IPv4 addresses one by one ''' # IPv4 uses a 32-bit address space: 4,294,967,296 (2**32) unique addresses for part1 in range(11, 256): # 11-255 for part2 in range(0, 256): ...
45.478873
100
0.600186
0
0
408
0.126355
0
0
0
0
1,439
0.445649
e28a9ea7765fcb38da42e9c9b798b40ab9662d1a
2,025
py
Python
demo/load_model/load_and_predict.py
Saumitra-Shukla/keras-bert
e60785d31129199ec0f922159e76bb63db330e00
[ "MIT" ]
2,465
2018-10-20T14:49:52.000Z
2022-03-31T02:20:09.000Z
demo/load_model/load_and_predict.py
VictorMadu/keras-bert
26bdfe3c36e77fa0524902f31263a920ccd62efb
[ "MIT" ]
209
2018-11-01T09:03:39.000Z
2022-03-19T09:07:47.000Z
demo/load_model/load_and_predict.py
VictorMadu/keras-bert
26bdfe3c36e77fa0524902f31263a920ccd62efb
[ "MIT" ]
566
2018-10-23T09:02:24.000Z
2022-03-31T15:40:37.000Z
import sys import numpy as np from keras_bert import load_vocabulary, load_trained_model_from_checkpoint, Tokenizer, get_checkpoint_paths print('This demo demonstrates how to load the pre-trained model and check whether the two sentences are continuous') if len(sys.argv) == 2: model_path = sys.argv[1] else: f...
39.705882
116
0.744198
0
0
0
0
0
0
0
0
504
0.226721
e28b7a15f09721739923d943b0fb11bb1a778844
3,052
py
Python
archive/python/howto-logging.py
ajrichards/bayesian-examples
fbd87c6f1613ea516408e9ebc3c9eff1248246e4
[ "BSD-3-Clause" ]
2
2016-01-27T08:51:23.000Z
2017-04-17T02:21:34.000Z
archive/python/howto-logging.py
ajrichards/notebook
fbd87c6f1613ea516408e9ebc3c9eff1248246e4
[ "BSD-3-Clause" ]
null
null
null
archive/python/howto-logging.py
ajrichards/notebook
fbd87c6f1613ea516408e9ebc3c9eff1248246e4
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import time,os,re,csv,sys,uuid,joblib from datetime import date import numpy as np from sklearn import svm from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report def train_model(X,y,saved_model): """ function t...
28.259259
103
0.640891
0
0
0
0
0
0
0
0
832
0.272608
e28c34e35ae4b4f3df58206467605471b9788535
14
py
Python
sso/api/handlers/__init__.py
docloud/luna.sso
a62c0ee788b72b39340165e41de16e248eb5edad
[ "MIT" ]
null
null
null
sso/api/handlers/__init__.py
docloud/luna.sso
a62c0ee788b72b39340165e41de16e248eb5edad
[ "MIT" ]
null
null
null
sso/api/handlers/__init__.py
docloud/luna.sso
a62c0ee788b72b39340165e41de16e248eb5edad
[ "MIT" ]
null
null
null
#coding=utf8
4.666667
12
0.714286
0
0
0
0
0
0
0
0
12
0.857143
e28c841373f2374d122cbff3f43b67a22b6729fe
21,378
py
Python
src/rnn_cells/skip_rnn_cells.py
imatge-upc/skiprnn-2017-tfm
63f93a539a3f2c7a713089fdd2c38bb7b0c581ca
[ "MIT" ]
129
2017-08-24T00:27:47.000Z
2022-03-24T21:42:37.000Z
src/rnn_cells/skip_rnn_cells.py
imatge-upc/skiprnn-2018-iclr
63f93a539a3f2c7a713089fdd2c38bb7b0c581ca
[ "MIT" ]
8
2018-02-28T15:05:48.000Z
2022-02-09T23:30:21.000Z
src/rnn_cells/skip_rnn_cells.py
imatge-upc/skiprnn-2018-iclr
63f93a539a3f2c7a713089fdd2c38bb7b0c581ca
[ "MIT" ]
45
2017-08-24T13:16:11.000Z
2021-05-13T02:36:59.000Z
""" Skip RNN cells that decide which timesteps should be attended. """ from __future__ import absolute_import from __future__ import print_function import collections import tensorflow as tf from rnn_cells import rnn_ops from tensorflow.python.framework import ops SkipLSTMStateTuple = collections.namedtuple("Skip...
48.697039
123
0.630882
20,107
0.940546
0
0
935
0.043737
0
0
5,086
0.237908
e28f288d8baf761d62a58045450c5d688f0b7d68
1,601
py
Python
892.surface-area-of-3-d-shapes.py
Lonitch/hackerRank
84991b8340e725422bc47eec664532cc84a3447e
[ "MIT" ]
null
null
null
892.surface-area-of-3-d-shapes.py
Lonitch/hackerRank
84991b8340e725422bc47eec664532cc84a3447e
[ "MIT" ]
null
null
null
892.surface-area-of-3-d-shapes.py
Lonitch/hackerRank
84991b8340e725422bc47eec664532cc84a3447e
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=892 lang=python3 # # [892] Surface Area of 3D Shapes # # https://leetcode.com/problems/surface-area-of-3d-shapes/description/ # # algorithms # Easy (57.01%) # Likes: 209 # Dislikes: 270 # Total Accepted: 15.9K # Total Submissions: 27.5K # Testcase Example: '[[2]]' # # On a N * N grid, we ...
14.294643
79
0.445971
605
0.37531
0
0
0
0
0
0
913
0.566377
e28fafb02e2674eaa86bebf78be4058f9ae1ced9
1,147
py
Python
tensorflow/afno/afno.py
DarshanDeshpande/research-paper-implementations
fc24acfc4644ccdc9f7d46a411aa66153f234499
[ "MIT" ]
7
2021-12-20T00:53:46.000Z
2022-03-17T01:37:00.000Z
tensorflow/afno/afno.py
DarshanDeshpande/research-paper-implementations
fc24acfc4644ccdc9f7d46a411aa66153f234499
[ "MIT" ]
null
null
null
tensorflow/afno/afno.py
DarshanDeshpande/research-paper-implementations
fc24acfc4644ccdc9f7d46a411aa66153f234499
[ "MIT" ]
1
2022-03-31T05:41:53.000Z
2022-03-31T05:41:53.000Z
import tensorflow as tf import tensorflow_addons as tfa class AFNO(tf.keras.layers.Layer): """ AFNO with adaptive weight sharing and adaptive masking. """ def __init__(self, k, *args, **kwargs): self.k = k super().__init__(*args, **kwargs) def build(self, input_shape): d ...
27.309524
71
0.541412
1,088
0.948561
0
0
75
0.065388
0
0
88
0.076722
e28ff84afb5353549cff424a116a8d2e4aba5e25
7,696
py
Python
deploy/cdk_files/deploy_cdk_stack.py
nickderobertis/nick-derobertis-site
386061dc258921eed41f2d3965ef69e02adde7ba
[ "MIT" ]
1
2022-03-31T10:55:40.000Z
2022-03-31T10:55:40.000Z
deploy/cdk_files/deploy_cdk_stack.py
nickderobertis/nick-derobertis-site
386061dc258921eed41f2d3965ef69e02adde7ba
[ "MIT" ]
8
2020-08-28T11:44:37.000Z
2020-08-31T09:19:19.000Z
deploy/cdk_files/deploy_cdk_stack.py
nickderobertis/nick-derobertis-site
386061dc258921eed41f2d3965ef69e02adde7ba
[ "MIT" ]
null
null
null
"""AWS CDK module to create ECS infrastructure""" import os from typing import Optional from aws_cdk import ( core, aws_ecs as ecs, aws_ec2 as ec2, aws_iam as iam, aws_ecr as ecr, aws_elasticloadbalancingv2 as elbv2, aws_route53 as route53, aws_route53_targets as alias, aws_certific...
34.666667
107
0.58342
7,147
0.928664
0
0
0
0
0
0
956
0.12422
e2908b05587d86510e1d4c415f410a863e39895d
1,139
py
Python
hello/urls.py
KKawamura1/sirobutton
fb74a68e6f7a18177df3fd60df898e46d59f886e
[ "MIT" ]
8
2018-07-03T03:08:41.000Z
2020-01-05T00:08:04.000Z
hello/urls.py
KKawamura1/sirobutton
fb74a68e6f7a18177df3fd60df898e46d59f886e
[ "MIT" ]
null
null
null
hello/urls.py
KKawamura1/sirobutton
fb74a68e6f7a18177df3fd60df898e46d59f886e
[ "MIT" ]
null
null
null
from django.urls import path from django.contrib.sitemaps.views import sitemap import hello.views from hello.sitemaps import SubtitleSitemap, StaticSitemap app_name = 'sirobutton' sitemaps = { 'subtitles': SubtitleSitemap, 'static': StaticSitemap, } urlpatterns = [ path('', hello.views.SubtitleListView....
42.185185
97
0.707638
0
0
0
0
0
0
0
0
297
0.260755
e290dde6888c2655675fa623360f1477b47adc7f
5,415
py
Python
app/freelancer/tests/test_profile.py
mshirzad/find-my-job
7dca88d6233649952f0b948156a91af5b96352ff
[ "MIT" ]
null
null
null
app/freelancer/tests/test_profile.py
mshirzad/find-my-job
7dca88d6233649952f0b948156a91af5b96352ff
[ "MIT" ]
null
null
null
app/freelancer/tests/test_profile.py
mshirzad/find-my-job
7dca88d6233649952f0b948156a91af5b96352ff
[ "MIT" ]
1
2022-03-06T17:44:49.000Z
2022-03-06T17:44:49.000Z
import os, tempfile from PIL import Image from django.contrib.auth import get_user_model from django.test import TestCase from django.urls import reverse from rest_framework import test, status from rest_framework.test import APIClient from core.models import Profile, Address, Gig, Education from freelancer.serial...
28.650794
88
0.635272
0
0
0
0
0
0
0
0
3,928
0.725392
e292938be0fbd99557d32fc2766285f31e477327
5,106
py
Python
app2.py
dropout-sih/flask-backend
0423274a285a841bb007e7cf4284d6d95d74e20a
[ "MIT" ]
null
null
null
app2.py
dropout-sih/flask-backend
0423274a285a841bb007e7cf4284d6d95d74e20a
[ "MIT" ]
null
null
null
app2.py
dropout-sih/flask-backend
0423274a285a841bb007e7cf4284d6d95d74e20a
[ "MIT" ]
null
null
null
from bokeh.embed import components from bokeh.plotting import figure, curdoc, ColumnDataSource from bokeh.resources import INLINE from bokeh.util.string import encode_utf8 from bokeh.models import CustomJS, LabelSet, Slider from bokeh.models.widgets import Slider from bokeh.models.layouts import WidgetBox, Row from bok...
27.451613
168
0.697219
0
0
0
0
2,933
0.574422
0
0
1,631
0.319428
e292cc422e185ad6a241928b70c1875793558ca0
1,072
py
Python
src/mailauth/migrations/0001_initial.py
Nnonexistent/chemphys
d2f34364d006a494bb965bb83d1967d7dd56f9ba
[ "MIT" ]
null
null
null
src/mailauth/migrations/0001_initial.py
Nnonexistent/chemphys
d2f34364d006a494bb965bb83d1967d7dd56f9ba
[ "MIT" ]
19
2015-03-08T08:46:09.000Z
2019-10-01T05:16:43.000Z
src/mailauth/migrations/0001_initial.py
Nnonexistent/chemphys
d2f34364d006a494bb965bb83d1967d7dd56f9ba
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import mailauth.models import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL),...
33.5
127
0.620336
878
0.81903
0
0
0
0
0
0
147
0.137127
e2962b912b0ef2494f5546db33de053e4cecd765
733
py
Python
augmentation.py
JamesQFreeman/contrastive_learning_in_100_lines
e5c015c2fad392dd0142cd93728cec3ccdb935b9
[ "MIT" ]
2
2021-09-07T11:53:42.000Z
2021-09-25T15:21:24.000Z
augmentation.py
JamesQFreeman/contrastive_learning_in_100_lines
e5c015c2fad392dd0142cd93728cec3ccdb935b9
[ "MIT" ]
null
null
null
augmentation.py
JamesQFreeman/contrastive_learning_in_100_lines
e5c015c2fad392dd0142cd93728cec3ccdb935b9
[ "MIT" ]
null
null
null
from torchvision import transforms as T import torch import random class RandomApply(torch.nn.Module): def __init__(self, fn, p): super().__init__() self.fn = fn self.p = p def forward(self, x): if random.random() > self.p: return x return self.fn(x) SimC...
21.558824
49
0.559345
244
0.332879
0
0
0
0
0
0
0
0
e2966a8acfb10fae2bc5cafae57c64dc5b245211
728
py
Python
lessons/058/function/app.py
murasaki718/tutorials
ad55a1f34f2dc050a5ccbceae0c09def0626dccf
[ "MIT" ]
225
2020-12-12T03:41:46.000Z
2022-03-30T20:07:31.000Z
lessons/058/function/app.py
kevAnto/tutorials
9db76b5eeb6a54afabae6a4e386f155cc5dbc025
[ "MIT" ]
9
2021-09-18T12:36:23.000Z
2022-03-11T17:24:20.000Z
lessons/058/function/app.py
kevAnto/tutorials
9db76b5eeb6a54afabae6a4e386f155cc5dbc025
[ "MIT" ]
410
2020-12-24T03:34:33.000Z
2022-03-31T22:38:13.000Z
import boto3 import requests def lambda_handler(event, context): print(event) object_get_context = event["getObjectContext"] request_route = object_get_context["outputRoute"] request_token = object_get_context["outputToken"] s3_url = object_get_context["inputS3Url"] # Get object from S3 ...
26.962963
54
0.712912
0
0
0
0
0
0
0
0
157
0.215659
e29799a419ccf766cb76b6c714c7fa023b5fc415
421
py
Python
backend/edw/utils/router.py
MMotionMan/django-edw
0f686429d29e0f40409a3b2318664973b2844c08
[ "BSD-3-Clause" ]
4
2019-09-18T05:51:12.000Z
2020-10-23T08:50:00.000Z
backend/edw/utils/router.py
MMotionMan/django-edw
0f686429d29e0f40409a3b2318664973b2844c08
[ "BSD-3-Clause" ]
10
2020-04-29T11:46:44.000Z
2022-03-11T23:38:27.000Z
backend/edw/utils/router.py
MMotionMan/django-edw
0f686429d29e0f40409a3b2318664973b2844c08
[ "BSD-3-Clause" ]
13
2020-04-09T07:49:48.000Z
2022-03-02T07:06:28.000Z
# -*- coding: utf-8 -*- from django.db import DEFAULT_DB_ALIAS from multidb import PinningReplicaRouter class EdwReplicationRouter(PinningReplicaRouter): def db_for_read(self, model, **hints): if not hasattr(model, '_rest_meta'): return DEFAULT_DB_ALIAS db = model._rest_meta.db_for_rea...
35.083333
76
0.703088
314
0.745843
0
0
0
0
0
0
35
0.083135
e297d6fe5d987adf7ab2be9c741d006bb3a4ad4a
1,593
py
Python
compile.py
cobaltians/Cobalt-Web-Sources
a5bfc71b3d2aebaa799d1917c1d15025110c5c11
[ "MIT" ]
1
2020-07-28T13:49:50.000Z
2020-07-28T13:49:50.000Z
compile.py
cobaltians/Cobalt-Web-Sources
a5bfc71b3d2aebaa799d1917c1d15025110c5c11
[ "MIT" ]
1
2015-08-14T21:04:47.000Z
2015-08-15T16:07:53.000Z
compile.py
cobaltians/Cobalt-Web-Sources
a5bfc71b3d2aebaa799d1917c1d15025110c5c11
[ "MIT" ]
1
2015-08-14T20:12:19.000Z
2015-08-14T20:12:19.000Z
import os libName = "cobalt" distrib_path = os.path.normpath(os.path.abspath(os.path.join(os.pardir, 'Cobalt-Web'))) #../Cobalt-Web web_sources_path = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__)))) #here common_file_path= os.path.normpath(os.path.abspath(os.path.join(web_sources_path, 'comm...
33.1875
113
0.697426
0
0
0
0
0
0
0
0
413
0.259259
e2983c94a04750401fd0d6ef968b1c6b8d6d289f
2,051
py
Python
ch6 slam&navigation/turtlebot/kobuki/kobuki_testsuite/src/kobuki_testsuite/angular_accelerate.py
MINAMISAMA/Castle-X
f6aedc4e67f772b2aed269617ee8a9cac95c7f63
[ "Apache-2.0" ]
3
2021-01-10T10:52:14.000Z
2021-12-31T10:19:25.000Z
ch6 slam&navigation/turtlebot/kobuki/kobuki_testsuite/src/kobuki_testsuite/angular_accelerate.py
MINAMISAMA/Castle-X
f6aedc4e67f772b2aed269617ee8a9cac95c7f63
[ "Apache-2.0" ]
1
2019-01-15T12:37:59.000Z
2019-01-15T12:37:59.000Z
ch6 slam&navigation/turtlebot/kobuki/kobuki_testsuite/src/kobuki_testsuite/angular_accelerate.py
MINAMISAMA/Castle-X
f6aedc4e67f772b2aed269617ee8a9cac95c7f63
[ "Apache-2.0" ]
2
2019-01-14T07:48:42.000Z
2019-01-15T06:32:27.000Z
#!/usr/bin/env python # # License: BSD # https://raw.github.com/yujinrobot/kobuki/hydro-devel/kobuki_testsuite/LICENSE # ############################################################################## # Imports ############################################################################## import threading impo...
28.887324
93
0.504144
1,428
0.696246
0
0
0
0
0
0
532
0.259386
e2987a689cdb6912d64b87c167aed0504e4c8bc3
2,023
py
Python
mergify_engine/rules/types.py
eladb/mergify-engine
ca2eb9926be29d38feaf029caaa63cbb4c74659e
[ "Apache-2.0" ]
null
null
null
mergify_engine/rules/types.py
eladb/mergify-engine
ca2eb9926be29d38feaf029caaa63cbb4c74659e
[ "Apache-2.0" ]
null
null
null
mergify_engine/rules/types.py
eladb/mergify-engine
ca2eb9926be29d38feaf029caaa63cbb4c74659e
[ "Apache-2.0" ]
null
null
null
# -*- encoding: utf-8 -*- # # Copyright © 2020 Mergify SAS # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
28.492958
83
0.699456
531
0.262352
0
0
450
0.222332
0
0
869
0.429348
e2996b4376288dcac854730f4d39f437175c6874
692
py
Python
backend/submission/migrations/0013_auto_20210730_2244.py
skku-npc/SKKU_Coding_Platform
1d972e8922484cf94f6735fd08b2565e5d3517d0
[ "MIT" ]
1
2022-03-30T14:03:23.000Z
2022-03-30T14:03:23.000Z
backend/submission/migrations/0013_auto_20210730_2244.py
skku-npc/SKKU_Coding_Platform
1d972e8922484cf94f6735fd08b2565e5d3517d0
[ "MIT" ]
56
2022-02-19T08:13:48.000Z
2022-03-25T10:17:07.000Z
backend/submission/migrations/0013_auto_20210730_2244.py
skku-npc/SKKU_Coding_Platform
1d972e8922484cf94f6735fd08b2565e5d3517d0
[ "MIT" ]
1
2022-03-25T15:02:46.000Z
2022-03-25T15:02:46.000Z
# Generated by Django 2.2.24 on 2021-07-30 13:44 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('assignment', '0001_initial'), ('submission', '0012_auto_20180501_0436'), ] operations = [ migratio...
26.615385
120
0.615607
565
0.816474
0
0
0
0
0
0
177
0.25578
e29bbb2c0371d64fde51e9fa4ffd3d717bbe1e2c
304
py
Python
src/zs2decode/__init__.py
Gargoyl13/zs2decode
7826df443327a9465a6a0626f10543e6cd9927e3
[ "MIT" ]
3
2021-12-02T20:09:26.000Z
2022-03-07T22:38:08.000Z
src/zs2decode/__init__.py
Gargoyl13/zs2decode
7826df443327a9465a6a0626f10543e6cd9927e3
[ "MIT" ]
6
2016-12-13T19:52:01.000Z
2022-03-12T21:03:55.000Z
src/zs2decode/__init__.py
Gargoyl13/zs2decode
7826df443327a9465a6a0626f10543e6cd9927e3
[ "MIT" ]
5
2016-07-11T12:27:17.000Z
2021-07-20T12:48:13.000Z
__version__ = "0.3.2.dev0" __title__ = "zs2decode" __description__ = "read Zwick zs2 and zp2 files" __uri__ = "https://zs2decode.readthedocs.org/" __author__ = "Chris Petrich" __email__ = "cpetrich@users.noreply.github.com" __license__ = "MIT" __copyright__ = "Copyright (C) 2015-2017 Chris Petrich"
23.384615
55
0.743421
0
0
0
0
0
0
0
0
183
0.601974
e29bf102bcc2d01986cf90aafc7b1eecbc6c4679
10,158
py
Python
test-pokersim.py
heyi19931225/Python-Texas-Holdem-Starter-Simio
1eaf266922fb6478dd907f5cbc9eb388775d16e0
[ "MIT" ]
12
2017-01-08T17:24:43.000Z
2021-11-14T09:09:11.000Z
test-pokersim.py
heyi19931225/Python-Texas-Holdem-Starter-Simio
1eaf266922fb6478dd907f5cbc9eb388775d16e0
[ "MIT" ]
1
2020-06-15T11:23:41.000Z
2020-06-15T11:23:41.000Z
test-pokersim.py
heyi19931225/Python-Texas-Holdem-Starter-Simio
1eaf266922fb6478dd907f5cbc9eb388775d16e0
[ "MIT" ]
15
2016-05-17T01:01:24.000Z
2021-11-16T14:37:34.000Z
## # test-pokersim.py # # Tests # check hand logic # check readable_hand, hand_to_numeric # check best_five # valid_hand import unittest import pokersim class TestPokerSim(unittest.TestCase): def test_readable_hand(self): self.assertEqual("Qd3c3d3h3s", pokersim.readable_...
47.915094
77
0.669718
9,944
0.978933
0
0
0
0
0
0
1,501
0.147765
e29c9edf2f4ffd2271c79a4b1ba091fbd8bc11a6
148
py
Python
easy/561-array-partition-i.py
changmeng72/leecode_python3
8384f52f0dd74b06b1b6aefa277dde6a228ff5f3
[ "MIT" ]
null
null
null
easy/561-array-partition-i.py
changmeng72/leecode_python3
8384f52f0dd74b06b1b6aefa277dde6a228ff5f3
[ "MIT" ]
null
null
null
easy/561-array-partition-i.py
changmeng72/leecode_python3
8384f52f0dd74b06b1b6aefa277dde6a228ff5f3
[ "MIT" ]
null
null
null
class Solution: def arrayPairSum(self, nums: List[int]) -> int: nums.sort() return sum(nums[i] for i in range(0,len(nums),2))
37
57
0.594595
148
1
0
0
0
0
0
0
0
0
e29e7a0574cd25b3521ccbfec3ec991095438e5e
446
py
Python
visual/views.py
dukuaris/Django
d34f3e3f09028511e96b99cae7faa1b46458eed1
[ "MIT" ]
null
null
null
visual/views.py
dukuaris/Django
d34f3e3f09028511e96b99cae7faa1b46458eed1
[ "MIT" ]
12
2020-06-06T01:22:26.000Z
2022-03-12T00:13:42.000Z
visual/views.py
dukuaris/Django
d34f3e3f09028511e96b99cae7faa1b46458eed1
[ "MIT" ]
null
null
null
from django.shortcuts import render def visual(requests): return render(requests, 'visual/welcome.html') def gapminder(requests): return render(requests, 'visual/gapminder.html') def multipleoutputs(requests): return render(requests, 'visual/multipleoutputs.html') def interactions(requests): return ...
26.235294
58
0.764574
0
0
0
0
0
0
0
0
123
0.275785
e29faff8b7ac6704b7fa82f70fed6f89ab3c757c
2,170
py
Python
fastiqa/bunches/iqa/test_images.py
baidut/PatchVQ
040486b6342dfd36695f1daea0b5c4d77d728a23
[ "Unlicense" ]
32
2020-12-05T09:11:20.000Z
2022-03-28T07:49:13.000Z
fastiqa/bunches/iqa/test_images.py
utlive/PatchVQ
040486b6342dfd36695f1daea0b5c4d77d728a23
[ "Unlicense" ]
5
2021-07-12T19:43:51.000Z
2022-01-28T13:16:16.000Z
fastiqa/bunches/iqa/test_images.py
utlive/PatchVQ
040486b6342dfd36695f1daea0b5c4d77d728a23
[ "Unlicense" ]
7
2020-12-29T21:52:07.000Z
2022-03-18T15:12:50.000Z
"""fastai1 code, not yet converted""" from ..label import * from tqdm import tqdm from fastai.vision import open_image import os from PIL import Image as PIL_Image """ # %% from fastiqa.all import * learn = RoIPoolLearner.from_cls(FLIVE, RoIPoolModel) learn.path = Path('.') learn.load('RoIPoolModel-fit(10,bs=120)') l...
32.38806
155
0.586175
1,716
0.790783
0
0
1,552
0.715207
0
0
440
0.202765
e29fca0332219f46c9db03e2a55a11fef6c52985
687
py
Python
src/appointments_has_payment/migrations/0001_initial.py
TheCleverlaure/sicco-web
8e734c9bfa9c99056b6abd5276b65b1e4bf21e23
[ "bzip2-1.0.6" ]
null
null
null
src/appointments_has_payment/migrations/0001_initial.py
TheCleverlaure/sicco-web
8e734c9bfa9c99056b6abd5276b65b1e4bf21e23
[ "bzip2-1.0.6" ]
null
null
null
src/appointments_has_payment/migrations/0001_initial.py
TheCleverlaure/sicco-web
8e734c9bfa9c99056b6abd5276b65b1e4bf21e23
[ "bzip2-1.0.6" ]
null
null
null
# Generated by Django 2.2.2 on 2019-12-26 03:31 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('appointments', '0001_initial'), ] operations = [ migrations.CreateModel( na...
25.444444
175
0.580786
561
0.816594
0
0
0
0
0
0
166
0.24163
e2a033cd806aa9352d0b43321894ec541d9fc3a8
2,264
py
Python
codigos100/importaModulos.py
rosacarla/100-days-of-python-code
3db9e35f861ce933e952cff2dd3a505dfce1b440
[ "MIT" ]
1
2021-09-26T09:17:36.000Z
2021-09-26T09:17:36.000Z
codigos100/importaModulos.py
rosacarla/100-days-of-python-code
3db9e35f861ce933e952cff2dd3a505dfce1b440
[ "MIT" ]
null
null
null
codigos100/importaModulos.py
rosacarla/100-days-of-python-code
3db9e35f861ce933e952cff2dd3a505dfce1b440
[ "MIT" ]
null
null
null
# Codigo: Importa Modulos # Autora: Carla Edila Silveira # Finalidade: definir funcoes - curso Python Quick Start # Data: 21/09/2021 # MODULO calendario do Python import calendar # importa modulo de calendario cal = calendar.month(2021, 9) # variavel recebe dados do calendario desejado print(cal) # imprime o cale...
43.538462
111
0.728357
0
0
0
0
0
0
0
0
1,837
0.803236
e2a035bc77e1b89c5aef8a210f2601d3543648c1
11,873
py
Python
mindspore/train/quant/quant.py
ZephyrChenzf/mindspore
8f191847cf71e12715ced96bc3575914f980127a
[ "Apache-2.0" ]
7
2020-05-24T03:19:26.000Z
2020-05-24T03:20:00.000Z
mindspore/train/quant/quant.py
ZephyrChenzf/mindspore
8f191847cf71e12715ced96bc3575914f980127a
[ "Apache-2.0" ]
null
null
null
mindspore/train/quant/quant.py
ZephyrChenzf/mindspore
8f191847cf71e12715ced96bc3575914f980127a
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
45.144487
117
0.550577
9,180
0.773183
0
0
0
0
0
0
2,409
0.202897
e2a0ada4356b62ee8423668c3f8daf26b572107a
5,992
py
Python
examples/python/plots_boxplots.py
GreatWei/pythonStates
c4a9b326bfa312e2ae44a70f4dfaaf91f2d47a37
[ "BSD-3-Clause" ]
76
2019-12-28T08:37:10.000Z
2022-03-29T02:19:41.000Z
examples/python/plots_boxplots.py
cluterdidiw/statsmodels
543037fa5768be773a3ba31fba06e16a9edea46a
[ "BSD-3-Clause" ]
null
null
null
examples/python/plots_boxplots.py
cluterdidiw/statsmodels
543037fa5768be773a3ba31fba06e16a9edea46a
[ "BSD-3-Clause" ]
35
2020-02-04T14:46:25.000Z
2022-03-24T03:56:17.000Z
# DO NOT EDIT # Autogenerated from the notebook plots_boxplots.ipynb. # Edit the notebook and then sync the output with this file. # # flake8: noqa # DO NOT EDIT #!/usr/bin/env python # coding: utf-8 # # 箱线图 # 以下说明在 statsmodels 中的箱线图的一些选项。包括 `violin_plot` 和 `bean_plot`. import numpy as np import matplotlib.pyplot a...
26.990991
76
0.584112
0
0
0
0
0
0
0
0
2,560
0.407125
e2a1277d6d5bab92b42350a997c75399618d77e4
5,736
py
Python
forks/sphinx-git/tests/test_git_commit_detail.py
JakeGWater/Virtual-Production-Independent-Film-Guide
022721f79b5b199f7208340564e9850dc9d97939
[ "MIT" ]
1
2021-06-25T03:15:26.000Z
2021-06-25T03:15:26.000Z
forks/sphinx-git/tests/test_git_commit_detail.py
JakeGWater/Virtual-Production-Independent-Film-Guide
022721f79b5b199f7208340564e9850dc9d97939
[ "MIT" ]
10
2021-04-16T17:45:06.000Z
2021-06-26T20:59:17.000Z
forks/sphinx-git/tests/test_git_commit_detail.py
JakeGWater/Virtual-Production-Independent-Film-Guide
022721f79b5b199f7208340564e9850dc9d97939
[ "MIT" ]
1
2021-04-16T19:48:45.000Z
2021-04-16T19:48:45.000Z
# -*- coding: utf-8 -*- import os from tempfile import mkstemp from bs4 import BeautifulSoup from git import Repo from nose.tools import assert_equal, assert_in, assert_is, assert_is_not from sphinx_git import GitCommitDetail from . import MakeTestableMixin, TempDirTestCase class TestableGitCommitDetail(MakeTestab...
39.558621
78
0.621688
5,452
0.950488
0
0
0
0
0
0
811
0.141388
e2a14db3105afb36bed7702d139b68659334f92c
5,239
py
Python
czitools/pylibczirw_tools.py
sebi06/czitools
3fed073d5e56db0aaebe87f0e38af80b0724f005
[ "BSD-3-Clause" ]
4
2021-07-26T15:55:14.000Z
2022-01-22T01:43:01.000Z
czitools/pylibczirw_tools.py
sebi06/czitools
3fed073d5e56db0aaebe87f0e38af80b0724f005
[ "BSD-3-Clause" ]
null
null
null
czitools/pylibczirw_tools.py
sebi06/czitools
3fed073d5e56db0aaebe87f0e38af80b0724f005
[ "BSD-3-Clause" ]
1
2021-08-02T10:31:28.000Z
2021-08-02T10:31:28.000Z
# -*- coding: utf-8 -*- ################################################################# # File : pylibczirw_tools.py # Version : 0.0.5 # Author : sebi06 # Date : 18.01.2022 # # Disclaimer: This code is purely experimental. Feel free to # use it at your own risk. # #############################...
36.894366
116
0.584272
0
0
0
0
0
0
0
0
1,219
0.232678
e2a1b463decdcf98f6fdf0ad03f13fe51a68b8aa
1,316
py
Python
tbx/people/migrations/0029_auto_20210728_1109.py
elviva404/wagtail-torchbox
718d9e2c4337073f010296932d369c726a01dbd3
[ "MIT" ]
103
2015-02-24T17:58:21.000Z
2022-03-23T08:08:58.000Z
tbx/people/migrations/0029_auto_20210728_1109.py
elviva404/wagtail-torchbox
718d9e2c4337073f010296932d369c726a01dbd3
[ "MIT" ]
145
2015-01-13T17:13:43.000Z
2022-03-29T12:56:20.000Z
tbx/people/migrations/0029_auto_20210728_1109.py
elviva404/wagtail-torchbox
718d9e2c4337073f010296932d369c726a01dbd3
[ "MIT" ]
57
2015-01-03T12:00:37.000Z
2022-02-09T13:11:30.000Z
# Generated by Django 2.2.17 on 2021-07-28 10:09 from django.db import migrations import wagtail.core.blocks import wagtail.core.fields import wagtail.images.blocks class Migration(migrations.Migration): dependencies = [ ("people", "0028_auto_20210604_1234"), ] operations = [ migrations...
31.333333
153
0.403495
1,147
0.871581
0
0
0
0
0
0
232
0.176292
e2a20e7a3ae489800a9c2d7da9dadea501616d50
10,395
py
Python
stage_2.py
prouast/ctc-intake-detection
6dbfb9bbb0bb09980e4530b31742cb0d5357bf08
[ "MIT" ]
null
null
null
stage_2.py
prouast/ctc-intake-detection
6dbfb9bbb0bb09980e4530b31742cb0d5357bf08
[ "MIT" ]
null
null
null
stage_2.py
prouast/ctc-intake-detection
6dbfb9bbb0bb09980e4530b31742cb0d5357bf08
[ "MIT" ]
null
null
null
"""Evaluate exported frame-level probabilities.""" from __future__ import division import argparse import csv import glob import numpy as np import os from scipy.special import softmax import sys CSV_SUFFIX = '*.csv' np.set_printoptions(threshold=sys.maxsize) def import_probs_and_labels(args): """Import probabili...
42.08502
137
0.614334
0
0
0
0
0
0
0
0
2,260
0.217412
e2a3a5e193462cd9cfc3f8e77576ef311f0d6d70
1,050
py
Python
async_sched/client/request_schedules.py
justengel/async_sched
f980722d51d15025522b2265426b0188ff368418
[ "MIT" ]
1
2020-10-19T13:36:20.000Z
2020-10-19T13:36:20.000Z
async_sched/client/request_schedules.py
justengel/async_sched
f980722d51d15025522b2265426b0188ff368418
[ "MIT" ]
null
null
null
async_sched/client/request_schedules.py
justengel/async_sched
f980722d51d15025522b2265426b0188ff368418
[ "MIT" ]
null
null
null
""" module to run with the -m flag python -m async_sched.client.request_schedules """ import argparse from async_sched.client.client import request_schedules from async_sched.utils import DEFAULT_HOST, DEFAULT_PORT __all__ = ['NAME', 'get_argparse', 'main'] NAME = 'request_schedules' def get_argparse(host: str ...
26.25
117
0.70381
0
0
0
0
0
0
0
0
241
0.229524
e2a3cfeded807fcc0d7d885eaf030b4b350af9cd
3,775
py
Python
tormentor/backgrounds.py
wsyCUHK/tormentor
683b37fd943368137ddb8fc78f75ab750cf05526
[ "Apache-2.0" ]
2
2021-09-04T14:03:45.000Z
2021-12-16T11:53:40.000Z
tormentor/backgrounds.py
wsyCUHK/tormentor
683b37fd943368137ddb8fc78f75ab750cf05526
[ "Apache-2.0" ]
null
null
null
tormentor/backgrounds.py
wsyCUHK/tormentor
683b37fd943368137ddb8fc78f75ab750cf05526
[ "Apache-2.0" ]
null
null
null
from .util import load_images_as_tensors import torch from diamond_square import functional_diamond_square from .random import Uniform, Bernoulli, Categorical, Constant, Normal from .base_augmentation import DeterministicImageAugmentation class AbstractBackground(DeterministicImageAugmentation): def blend_by_mask...
46.604938
193
0.717086
3,519
0.932185
0
0
886
0.234702
0
0
84
0.022252
e2a4885ec926f3d640fc765abc70c06983834ccb
2,156
py
Python
sns/api/reddit/reddit.py
kylepw/panner
482ef8e8c1e8d9464d7dc8e4df5b5d9b58e83d35
[ "MIT" ]
2
2019-07-20T01:48:20.000Z
2019-11-15T06:50:54.000Z
sns/api/reddit/reddit.py
kylepw/panner
482ef8e8c1e8d9464d7dc8e4df5b5d9b58e83d35
[ "MIT" ]
5
2020-02-12T08:58:06.000Z
2021-09-22T17:56:42.000Z
sns/api/reddit/reddit.py
kylepw/panner
482ef8e8c1e8d9464d7dc8e4df5b5d9b58e83d35
[ "MIT" ]
null
null
null
from datetime import datetime import logging import os from praw import Reddit as PrawReddit from prawcore.exceptions import NotFound import pytz logger = logging.getLogger(__name__) class Reddit: def __init__(self, client_id=None, client_secret=None, user_agent=None): self.client_id = client_id or os.ge...
35.933333
84
0.621521
1,969
0.913265
0
0
147
0.068182
0
0
275
0.127551
e2a4a474063c3d3a0c1955abc43e6bbd6b0f9e4d
5,417
py
Python
src/pyside2_demo/frontend/example01/example01.py
chihyi-liao/pyside2_demo
410bdaf0876897febf4607ff73928c60186c7be1
[ "MIT" ]
null
null
null
src/pyside2_demo/frontend/example01/example01.py
chihyi-liao/pyside2_demo
410bdaf0876897febf4607ff73928c60186c7be1
[ "MIT" ]
null
null
null
src/pyside2_demo/frontend/example01/example01.py
chihyi-liao/pyside2_demo
410bdaf0876897febf4607ff73928c60186c7be1
[ "MIT" ]
null
null
null
from PySide2.QtCore import Slot, Qt, QThreadPool, QCoreApplication, QSize from PySide2.QtGui import QIcon from PySide2.QtWidgets import ( QDialog, QLabel, QLineEdit, QComboBox, QMainWindow, QMessageBox, QWidget, QPushButton, QGridLayout, QDialogButtonBox, QTextEdit, ) from pyside2_demo.utils import get_resourc...
35.874172
86
0.628207
4,812
0.857601
0
0
812
0.144716
0
0
888
0.158261
e2a69d6db231f2abaebeaf32c8c4d4494f27778d
3,329
py
Python
dashboard/dashboard/pinpoint/models/quest/read_value_test.py
tdresser/catapult-csm
8f69b07e80198c1af0d5bd368d8ad8ced968884a
[ "BSD-3-Clause" ]
4
2017-12-29T03:17:40.000Z
2021-07-04T03:28:11.000Z
dashboard/dashboard/pinpoint/models/quest/read_value_test.py
tdresser/catapult-csm
8f69b07e80198c1af0d5bd368d8ad8ced968884a
[ "BSD-3-Clause" ]
1
2021-02-23T22:37:30.000Z
2021-02-23T22:37:30.000Z
dashboard/dashboard/pinpoint/models/quest/read_value_test.py
tdresser/catapult-csm
8f69b07e80198c1af0d5bd368d8ad8ced968884a
[ "BSD-3-Clause" ]
6
2017-12-05T07:15:08.000Z
2021-07-04T03:28:13.000Z
# Copyright 2017 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 json import unittest import mock from dashboard.pinpoint.models.quest import read_value @mock.patch('dashboard.services.isolate_service.Retrieve')...
32.320388
77
0.599279
3,007
0.903274
0
0
3,066
0.920997
0
0
956
0.287173
e2a8d2bec3d6270cbb856eb6bae1fa43dddb9949
1,736
py
Python
tests/test_lsp.py
WeixinYang/DatasetLoader
d6e800d6a9cca8809d7dab88a6a13a7916ef272d
[ "Apache-2.0" ]
1
2021-08-16T14:14:40.000Z
2021-08-16T14:14:40.000Z
tests/test_lsp.py
WeixinYang/DatasetLoader
d6e800d6a9cca8809d7dab88a6a13a7916ef272d
[ "Apache-2.0" ]
1
2020-10-12T20:56:21.000Z
2020-10-12T20:56:21.000Z
tests/test_lsp.py
WeixinYang/DatasetLoader
d6e800d6a9cca8809d7dab88a6a13a7916ef272d
[ "Apache-2.0" ]
1
2021-06-14T10:30:08.000Z
2021-06-14T10:30:08.000Z
import os.path import pytest from datasetloader import LSP from datasetloader import LSPExtended from . import DS_PATH class TestLSP(): def test_LSP(self): # test loading both, full sized and small images folders = ("lsp", "lsp_small") for ds in folders: lsp = LSP(os.path.joi...
41.333333
78
0.611751
1,612
0.928571
0
0
0
0
0
0
545
0.31394
e2aefdb5d4c4918146034a0834daf3d3d9bd181b
1,173
py
Python
website/python/app.py
man-r/DimensionsLab
c94c3aec0d52326ad522a6fa41d43ec3bde87d74
[ "MIT" ]
null
null
null
website/python/app.py
man-r/DimensionsLab
c94c3aec0d52326ad522a6fa41d43ec3bde87d74
[ "MIT" ]
1
2022-03-24T06:13:52.000Z
2022-03-24T06:13:52.000Z
website/python/app.py
man-r/DimensionsLab
c94c3aec0d52326ad522a6fa41d43ec3bde87d74
[ "MIT" ]
null
null
null
from flask import Flask from flask_restful import Api, Resource, reqparse app = Flask(__name__) api = Api(app) users = [ { "name": "Nicholas", "age": 42, "occupation": "Network Engineer" }, { "name": "Elvin", "age": 32, "occupation": "Doctor" }, { ...
19.881356
66
0.58994
697
0.594203
0
0
0
0
0
0
298
0.254049