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
07340b73d70dfdc6b284b1403d39e1bbdf13bf8f
1,054
py
Python
mmdeploy/backend/tensorrt/init_plugins.py
hanrui1sensetime/mmdeploy
f2594c624b67910e55e24418832bd96685425b2f
[ "Apache-2.0" ]
1
2021-12-30T06:29:46.000Z
2021-12-30T06:29:46.000Z
mmdeploy/backend/tensorrt/init_plugins.py
wwjwy/mmdeploy
c6fccd0121618c8c4dc07f49823c377003475040
[ "Apache-2.0" ]
null
null
null
mmdeploy/backend/tensorrt/init_plugins.py
wwjwy/mmdeploy
c6fccd0121618c8c4dc07f49823c377003475040
[ "Apache-2.0" ]
1
2022-02-10T04:31:10.000Z
2022-02-10T04:31:10.000Z
# Copyright (c) OpenMMLab. All rights reserved. import ctypes import glob import logging import os def get_ops_path() -> str: """Get path of the TensorRT plugin library. Returns: str: A path of the TensorRT plugin library. """ wildcard = os.path.abspath( os.path.join( os.p...
26.35
77
0.642315
0
0
0
0
0
0
0
0
502
0.476281
0734297119899a9bd812848f57a6fbe4c63a3822
16,800
py
Python
reagent/test/world_model/test_seq2reward.py
dmitryvinn/ReAgent
f98825b9d021ec353a1f9087840a05fea259bf42
[ "BSD-3-Clause" ]
null
null
null
reagent/test/world_model/test_seq2reward.py
dmitryvinn/ReAgent
f98825b9d021ec353a1f9087840a05fea259bf42
[ "BSD-3-Clause" ]
null
null
null
reagent/test/world_model/test_seq2reward.py
dmitryvinn/ReAgent
f98825b9d021ec353a1f9087840a05fea259bf42
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. import logging import os import random import unittest from typing import Optional import numpy as np import pytorch_lightning as pl import torch import torch.nn as nn from parameterized import parameterized from reagent.co...
35.66879
88
0.65619
7,277
0.433155
0
0
1,754
0.104405
0
0
1,575
0.09375
0734fb5dd4a56bdb2ef242b87aea0bcbb002a5dc
142,160
py
Python
models_SHOT_convex/syn30m03hfsg.py
grossmann-group/pyomo-MINLP-benchmarking
714f0a0dffd61675649a805683c0627af6b4929e
[ "MIT" ]
null
null
null
models_SHOT_convex/syn30m03hfsg.py
grossmann-group/pyomo-MINLP-benchmarking
714f0a0dffd61675649a805683c0627af6b4929e
[ "MIT" ]
null
null
null
models_SHOT_convex/syn30m03hfsg.py
grossmann-group/pyomo-MINLP-benchmarking
714f0a0dffd61675649a805683c0627af6b4929e
[ "MIT" ]
null
null
null
# MINLP written by GAMS Convert at 01/15/21 11:37:33 # # Equation counts # Total E G L N X C B # 1486 571 111 804 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
36.090378
120
0.639913
0
0
0
0
0
0
0
0
699
0.004917
07354a91e0ab5c683999d760204ed42f5952201f
15,695
py
Python
backend/tests/test_resources.py
sartography/star-drive
c0f33378d42913c3e677e07f74eb46d7b2b82a0a
[ "MIT" ]
null
null
null
backend/tests/test_resources.py
sartography/star-drive
c0f33378d42913c3e677e07f74eb46d7b2b82a0a
[ "MIT" ]
368
2018-12-18T14:43:20.000Z
2022-03-02T02:54:18.000Z
backend/tests/test_resources.py
sartography/star-drive
c0f33378d42913c3e677e07f74eb46d7b2b82a0a
[ "MIT" ]
2
2019-10-02T03:06:06.000Z
2020-10-05T16:53:48.000Z
import unittest from flask import json from tests.base_test import BaseTest from app import db, elastic_index from app.model.resource import Resource from app.model.resource_category import ResourceCategory from app.model.resource_change_log import ResourceChangeLog from app.model.user import Role class TestResourc...
47.274096
135
0.649761
15,391
0.980631
0
0
0
0
0
0
3,217
0.20497
0735c43eb0b2d2d58ca5e330e9b0ab738257e5f2
18,432
py
Python
kolibri/core/auth/management/commands/sync.py
reubenjacob/kolibri
028bb2ad63e438c832ff657d37f7b05c3400f2da
[ "MIT" ]
null
null
null
kolibri/core/auth/management/commands/sync.py
reubenjacob/kolibri
028bb2ad63e438c832ff657d37f7b05c3400f2da
[ "MIT" ]
8
2021-05-21T15:31:24.000Z
2022-02-24T15:02:14.000Z
kolibri/core/auth/management/commands/sync.py
kuboginichimaru/kolibri
18b398f62baa1c60f8456f7f9c6d6c9447068f69
[ "MIT" ]
1
2019-10-05T11:14:40.000Z
2019-10-05T11:14:40.000Z
import json import logging import math import re from contextlib import contextmanager from django.core.management import call_command from django.core.management.base import CommandError from morango.models import Filter from morango.models import InstanceIDModel from morango.models import ScopeDefinition from morang...
34.711864
138
0.598307
16,951
0.919651
349
0.018934
887
0.048123
0
0
3,990
0.216471
0735ef32022db6fd8f2cae3cf86a392fe7526086
5,787
py
Python
warp.py
RezaFirouzii/fum-delta-vision
0a8ad1d434006a9aee0a12c1f021c0bca0bc87e2
[ "MIT" ]
null
null
null
warp.py
RezaFirouzii/fum-delta-vision
0a8ad1d434006a9aee0a12c1f021c0bca0bc87e2
[ "MIT" ]
null
null
null
warp.py
RezaFirouzii/fum-delta-vision
0a8ad1d434006a9aee0a12c1f021c0bca0bc87e2
[ "MIT" ]
null
null
null
import math import imageio import cv2 as cv import numpy as np import transformer def fix_rotation(img): img_copy = img.copy() img = cv.cvtColor(img, cv.COLOR_BGR2GRAY) rows, cols = img.shape img = cv.adaptiveThreshold(img, 255, cv.ADAPTIVE_THRESH_MEAN_C, cv.THRESH_BINARY_INV, 15, 9) kernel = cv.g...
35.286585
122
0.556247
0
0
0
0
0
0
0
0
1,390
0.240194
0736759453528b8e50d3977ed9f783e1f7d2c291
2,318
py
Python
sdssobstools/boss_data.py
sdss/ObserverTools
7f9949341edc91a79dac69d79e24af09e8558ffa
[ "BSD-3-Clause" ]
null
null
null
sdssobstools/boss_data.py
sdss/ObserverTools
7f9949341edc91a79dac69d79e24af09e8558ffa
[ "BSD-3-Clause" ]
null
null
null
sdssobstools/boss_data.py
sdss/ObserverTools
7f9949341edc91a79dac69d79e24af09e8558ffa
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 """ A tool to grab a single BOSS image and pull a few items from its header. It is used in bin/sloan_log.py, but it could be used directly as well. """ import argparse from pathlib import Path from astropy.time import Time import fitsio class BOSSRaw: """A class to parse raw data from APOG...
34.088235
78
0.603538
1,309
0.564711
0
0
0
0
0
0
911
0.393011
0736f9344c10dda2615d756c67d64d15dd48a036
955
py
Python
capitulo-08/ex13b.py
bryan-lima/exercicios-livro-introd-prog-python-3ed
b6bc26dced9728510865704a80cb0d97f81f756b
[ "MIT" ]
3
2021-11-09T17:54:10.000Z
2022-01-30T22:32:25.000Z
capitulo-08/ex13b.py
bryan-lima/exercicios-livro-introd-prog-python-3ed
b6bc26dced9728510865704a80cb0d97f81f756b
[ "MIT" ]
null
null
null
capitulo-08/ex13b.py
bryan-lima/exercicios-livro-introd-prog-python-3ed
b6bc26dced9728510865704a80cb0d97f81f756b
[ "MIT" ]
null
null
null
# Altere o Programa 8.20 de forma que o usuário tenha três chances de acertar o número # O programa termina se o usuário acertar ou errar três vezes # Programa 8.20 do livro, página 184 # Programa 8.20 - Adivinhando o número # # import random # # n = random.randint(1, 10) # x = int(input('Escolha um número entre 1 e 1...
27.285714
86
0.642932
0
0
0
0
0
0
0
0
646
0.664609
0737281036977c90f04b5a6cdebc502ad5e24b6d
293
py
Python
slogviz/config.py
mariusfrinken/slogviz
0557eda336c257245eefe75699eb2479eb672ca1
[ "MIT" ]
1
2021-05-11T06:54:28.000Z
2021-05-11T06:54:28.000Z
slogviz/config.py
mariusfrinken/slogviz
0557eda336c257245eefe75699eb2479eb672ca1
[ "MIT" ]
null
null
null
slogviz/config.py
mariusfrinken/slogviz
0557eda336c257245eefe75699eb2479eb672ca1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """This sub module provides a global variable to check for checking if the non-interactive argument was set Exported variable: interactive -- False, if the main the non-interactive argument was set, True, if it was not set """ global interactive interactive = True;
29.3
107
0.744027
0
0
0
0
0
0
0
0
250
0.853242
0737de527d56f865ee1256abea29660c8dca454e
894
py
Python
setup.py
shb84/ATM76
433179bde8935abeaf2ace52fe17dedb7a313487
[ "MIT" ]
null
null
null
setup.py
shb84/ATM76
433179bde8935abeaf2ace52fe17dedb7a313487
[ "MIT" ]
null
null
null
setup.py
shb84/ATM76
433179bde8935abeaf2ace52fe17dedb7a313487
[ "MIT" ]
null
null
null
import setuptools # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setuptools.setup( name="atm76", version="0.1.0", author="Steven H. Berg...
27.9375
63
0.680089
0
0
0
0
0
0
0
0
328
0.36689
073976d41a2a2bee70b7facb5e914072923e6d0f
4,065
py
Python
agent/check_plugins/download_speed.py
indigos33k3r/god-eye
b2af5ca6dbbd1b302dd5cda1fd0f0c0eee009e76
[ "BSD-3-Clause" ]
1
2019-04-01T01:59:22.000Z
2019-04-01T01:59:22.000Z
agent/check_plugins/download_speed.py
indigos33k3r/god-eye
b2af5ca6dbbd1b302dd5cda1fd0f0c0eee009e76
[ "BSD-3-Clause" ]
null
null
null
agent/check_plugins/download_speed.py
indigos33k3r/god-eye
b2af5ca6dbbd1b302dd5cda1fd0f0c0eee009e76
[ "BSD-3-Clause" ]
null
null
null
import logging import asyncio from agent.check_plugins import AbstractCheckPlugin # Do khong biet dung thu vien asyncio ntn ca nen em dung thu vien request # python import requests import sys import time from datetime import datetime logger = logging.getLogger(__name__) class Download(AbstractCheckPlugin): @as...
32.007874
116
0.571218
3,799
0.931356
871
0.213533
1,868
0.457955
0
0
1,668
0.408924
073a8f2eb2cea5666b00d9e848e53968468e9ca6
130
py
Python
Setup Rich Text Editor/mysite/main/urls.py
AyemunHossain/Django
0b1ed21fd6bd2906a4a1a220c029a2193658320f
[ "MIT" ]
2
2020-02-14T19:23:50.000Z
2020-04-19T08:26:38.000Z
Setup Rich Text Editor/mysite/main/urls.py
AyemunHossain/Django
0b1ed21fd6bd2906a4a1a220c029a2193658320f
[ "MIT" ]
42
2021-02-02T23:08:30.000Z
2022-03-12T00:54:55.000Z
Setup Rich Text Editor/mysite/main/urls.py
AyemunHossain/Django
0b1ed21fd6bd2906a4a1a220c029a2193658320f
[ "MIT" ]
1
2022-03-07T08:09:41.000Z
2022-03-07T08:09:41.000Z
from django.urls import path from . import views app_name = "main" urlpatterns = [ path("",views.homepage,name="homepage") ]
16.25
43
0.7
0
0
0
0
0
0
0
0
18
0.138462
073aa245c28c69910b8c705ef18f357b5c9e4c5f
5,846
py
Python
GA/train.py
jcordell/keras-optimization
cbda84bcf3b31928d829af4afc82af1886877341
[ "MIT" ]
1
2017-05-29T13:48:22.000Z
2017-05-29T13:48:22.000Z
GA/train.py
jcordell/keras-optimization
cbda84bcf3b31928d829af4afc82af1886877341
[ "MIT" ]
null
null
null
GA/train.py
jcordell/keras-optimization
cbda84bcf3b31928d829af4afc82af1886877341
[ "MIT" ]
null
null
null
""" Utility used by the Network class to actually train. Based on: https://github.com/fchollet/keras/blob/master/examples/mnist_mlp.py """ from keras.datasets import mnist, cifar10 from keras.models import Sequential from keras.layers import Dense, Dropout from keras.utils.np_utils import to_categorical from kera...
33.028249
113
0.653609
0
0
0
0
0
0
0
0
1,556
0.266165
073abd8b8de49a73d08e10cf329cea3aaaac91fa
491
py
Python
tests/integration/agenda/test_models.py
rolandgeider/OpenSlides
331141c17cb23da26e377d4285efdb4a50753a59
[ "MIT" ]
null
null
null
tests/integration/agenda/test_models.py
rolandgeider/OpenSlides
331141c17cb23da26e377d4285efdb4a50753a59
[ "MIT" ]
null
null
null
tests/integration/agenda/test_models.py
rolandgeider/OpenSlides
331141c17cb23da26e377d4285efdb4a50753a59
[ "MIT" ]
null
null
null
from openslides.agenda.models import Item from openslides.core.models import CustomSlide from openslides.utils.test import TestCase class TestItemManager(TestCase): def test_get_root_and_children_db_queries(self): """ Test that get_root_and_children needs only one db query. """ for...
30.6875
64
0.700611
356
0.725051
0
0
0
0
0
0
88
0.179226
073cf557d5c1841920fb8cd559522daa79d5440d
3,272
py
Python
ssl_context_builder/http_impl/requests_wrapper/secure_session.py
mbjahnoon/ssl_context_builder
e73530f900b56710c705675e8e657f0bd17f7c07
[ "Apache-2.0" ]
1
2022-03-01T16:27:33.000Z
2022-03-01T16:27:33.000Z
ssl_context_builder/http_impl/requests_wrapper/secure_session.py
mbjahnoon/ssl_context_builder
e73530f900b56710c705675e8e657f0bd17f7c07
[ "Apache-2.0" ]
null
null
null
ssl_context_builder/http_impl/requests_wrapper/secure_session.py
mbjahnoon/ssl_context_builder
e73530f900b56710c705675e8e657f0bd17f7c07
[ "Apache-2.0" ]
null
null
null
import weakref import os import requests import ssl from ssl import SSLContext import logging from ssl_context_builder.builder.builder import SslContextBuilder from ssl_context_builder.http_impl.requests_wrapper.ssl_adapter import SslAdapter class RequestsSecureSession: def __init__(self, ssl_context: SSLContex...
34.808511
120
0.637531
3,026
0.924817
0
0
1,475
0.450795
0
0
1,157
0.353606
073ddb35cfd257b4fe7bee31f410bb17b18b0611
621
py
Python
tiny_scripts/select_cifar_10.py
jiaqiangwjq/python_workhouse
c0e739d8bc8ea3d318a0f916e9d79b1f4d4acad9
[ "Unlicense" ]
null
null
null
tiny_scripts/select_cifar_10.py
jiaqiangwjq/python_workhouse
c0e739d8bc8ea3d318a0f916e9d79b1f4d4acad9
[ "Unlicense" ]
null
null
null
tiny_scripts/select_cifar_10.py
jiaqiangwjq/python_workhouse
c0e739d8bc8ea3d318a0f916e9d79b1f4d4acad9
[ "Unlicense" ]
null
null
null
''' Selected cifar-10. The .csv file format: class_index,data_index 3,0 8,1 8,2 ... ''' import pickle import pandas as pd file = 'E:\pycharm\LEARN\data\cifar-10\cifar-10-batches-py\\test_batch' with open(file, 'rb') as f: dict = pickle.load(f, encoding='bytes') dict.keys() batch_label = dict[b'batch_label'] ...
18.818182
71
0.710145
0
0
0
0
0
0
0
0
253
0.407407
074082800249cdc23669711e86fb83230db924ee
940
py
Python
codebox/scripts/fixture.py
disqus/codebox
9f8e1a9c08c6a79bf3519782be483ff9763c4b4e
[ "Apache-2.0" ]
5
2015-09-24T19:53:02.000Z
2019-05-14T11:56:07.000Z
codebox/scripts/fixture.py
disqus/codebox
9f8e1a9c08c6a79bf3519782be483ff9763c4b4e
[ "Apache-2.0" ]
null
null
null
codebox/scripts/fixture.py
disqus/codebox
9f8e1a9c08c6a79bf3519782be483ff9763c4b4e
[ "Apache-2.0" ]
null
null
null
# Ghetto Fixtures from codebox import app from codebox.apps.auth.models import User from codebox.apps.snippets.models import Snippet from codebox.apps.organizations.models import Organization, OrganizationMember from flask import g client = app.test_client() _ctx = app.test_request_context() _ctx.push() app.preproces...
29.375
99
0.75
0
0
0
0
0
0
0
0
263
0.279787
0740a865caa54dd6749985e9ca6d8ad7824f4098
3,062
py
Python
corehq/apps/linked_domain/tests/test_views.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/linked_domain/tests/test_views.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/linked_domain/tests/test_views.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
null
null
null
from unittest.mock import Mock, patch from django.test import SimpleTestCase from corehq.apps.domain.exceptions import DomainDoesNotExist from corehq.apps.linked_domain.exceptions import ( DomainLinkAlreadyExists, DomainLinkError, DomainLinkNotAllowed, ) from corehq.apps.linked_domain.views import link_do...
48.603175
112
0.736447
2,733
0.892554
0
0
173
0.056499
0
0
735
0.240039
0740aa099c767617a2ec263fb4853c2833c7342f
79
py
Python
LanguageBasics/functions/import_eg.py
Vamsi-TM/jubilant-train
a3ca0216e161ead4f59d923a36587098790beb5d
[ "MIT" ]
null
null
null
LanguageBasics/functions/import_eg.py
Vamsi-TM/jubilant-train
a3ca0216e161ead4f59d923a36587098790beb5d
[ "MIT" ]
null
null
null
LanguageBasics/functions/import_eg.py
Vamsi-TM/jubilant-train
a3ca0216e161ead4f59d923a36587098790beb5d
[ "MIT" ]
null
null
null
import function_exercise_01 as st st.sandwich_toppings('meatballs', 'salad')
15.8
42
0.797468
0
0
0
0
0
0
0
0
18
0.227848
0740e77524f70aef71e87bb08ca6fba979752644
2,207
py
Python
pyingest/parsers/zenodo.py
golnazads/adsabs-pyingest
37b37dd9e0d8a6e5cc34c59d30acd14e3381b48e
[ "MIT" ]
1
2020-06-04T20:09:03.000Z
2020-06-04T20:09:03.000Z
pyingest/parsers/zenodo.py
golnazads/adsabs-pyingest
37b37dd9e0d8a6e5cc34c59d30acd14e3381b48e
[ "MIT" ]
81
2017-11-16T16:07:21.000Z
2022-03-08T14:05:37.000Z
pyingest/parsers/zenodo.py
golnazads/adsabs-pyingest
37b37dd9e0d8a6e5cc34c59d30acd14e3381b48e
[ "MIT" ]
17
2016-04-13T17:03:25.000Z
2021-12-22T15:26:54.000Z
#!/usr/bin/python # # from __future__ import absolute_import import json import re import logging from .datacite import DataCiteParser class WrongPublisherException(Exception): pass class ZenodoParser(DataCiteParser): def get_references(self, r): # as of version 3.1 of datacite schema, "References...
30.232877
101
0.566833
1,645
0.745356
0
0
0
0
0
0
1,009
0.457182
07421cfb41d4ae2f25674d5123c3192c8a85313e
25,223
py
Python
src/fullnode.py
AmeyaDaddikar/vjtichain
2a9b68d475fe5cc2babdf3f5b463a685e8423f05
[ "MIT" ]
1
2019-05-26T12:36:37.000Z
2019-05-26T12:36:37.000Z
src/fullnode.py
AmeyaDaddikar/vjtichain
2a9b68d475fe5cc2babdf3f5b463a685e8423f05
[ "MIT" ]
null
null
null
src/fullnode.py
AmeyaDaddikar/vjtichain
2a9b68d475fe5cc2babdf3f5b463a685e8423f05
[ "MIT" ]
null
null
null
import json import time from functools import lru_cache from multiprocessing import Pool, Process from threading import Thread, Timer from typing import Any, Dict, List from datetime import datetime import hashlib import inspect import requests import waitress from bottle import BaseTemplate, Bottle, request, response,...
34.223881
203
0.632082
0
0
0
0
12,914
0.511993
0
0
7,045
0.279309
074273af8a268ef926e75f5dce65175c9bfb7048
5,914
py
Python
deepexplain/tf/v1_x/main.py
alexus37/MasterThesisCode
a7eada603686de75968acc8586fd307a91b0491b
[ "MIT" ]
1
2020-04-23T15:39:27.000Z
2020-04-23T15:39:27.000Z
deepexplain/tf/v1_x/main.py
alexus37/DeepExplain
a7eada603686de75968acc8586fd307a91b0491b
[ "MIT" ]
null
null
null
deepexplain/tf/v1_x/main.py
alexus37/DeepExplain
a7eada603686de75968acc8586fd307a91b0491b
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow.python.framework import ops from collections import OrderedDict import warnings, logging from deepexplain.tf.v1_x import constants from deepexplain.tf.v1_x.baseClasses i...
46.566929
153
0.672979
4,472
0.756172
0
0
573
0.096889
0
0
1,525
0.257863
074414b6699fea23b4050feee569e12a24d49670
1,457
py
Python
util/mem_usage.py
robinupham/cnn_lensing
f5d4defc7e2c5b7a23744051da904526d04c27c8
[ "MIT" ]
null
null
null
util/mem_usage.py
robinupham/cnn_lensing
f5d4defc7e2c5b7a23744051da904526d04c27c8
[ "MIT" ]
null
null
null
util/mem_usage.py
robinupham/cnn_lensing
f5d4defc7e2c5b7a23744051da904526d04c27c8
[ "MIT" ]
null
null
null
""" Get the memory usage of a Keras model. From https://stackoverflow.com/a/46216013. """ def get_model_memory_usage(batch_size, model): """ Get the memory usage of a Keras model in GB. From https://stackoverflow.com/a/46216013. """ import numpy as np try: from keras import backend a...
30.354167
104
0.649279
0
0
0
0
0
0
0
0
223
0.153054
0744b878366a1f07bc8ae64bebfadf9106c8ad3a
303
py
Python
hexrd/distortion/distortionabc.py
glemaitre/hexrd
b68b1ba72e0f480d29bdaae2adbd6c6e2380cc7c
[ "BSD-3-Clause" ]
27
2020-02-18T12:15:08.000Z
2022-03-24T17:53:46.000Z
hexrd/distortion/distortionabc.py
glemaitre/hexrd
b68b1ba72e0f480d29bdaae2adbd6c6e2380cc7c
[ "BSD-3-Clause" ]
259
2020-02-02T22:18:29.000Z
2022-03-30T19:59:58.000Z
hexrd/distortion/distortionabc.py
glemaitre/hexrd
b68b1ba72e0f480d29bdaae2adbd6c6e2380cc7c
[ "BSD-3-Clause" ]
11
2020-02-18T12:14:44.000Z
2022-03-04T16:19:11.000Z
import abc class DistortionABC(metaclass=abc.ABCMeta): maptype = None @abc.abstractmethod def apply(self, xy_in): """Apply distortion mapping""" pass @abc.abstractmethod def apply_inverse(self, xy_in): """Apply inverse distortion mapping""" pass
17.823529
46
0.633663
289
0.953795
0
0
214
0.706271
0
0
68
0.224422
0745c582ad840fd55885e6625d498a1f4e1e1d0a
799
py
Python
setup.py
statisticianinstilettos/recommender_metrics
82091ec53eb8b3527f95755006237658deb03c18
[ "MIT" ]
null
null
null
setup.py
statisticianinstilettos/recommender_metrics
82091ec53eb8b3527f95755006237658deb03c18
[ "MIT" ]
null
null
null
setup.py
statisticianinstilettos/recommender_metrics
82091ec53eb8b3527f95755006237658deb03c18
[ "MIT" ]
null
null
null
import io import os from setuptools import setup def read(file_name): """Read a text file and return the content as a string.""" with io.open(os.path.join(os.path.dirname(__file__), file_name), encoding='utf-8') as f: return f.read() setup( name='recmetrics', url='https://gi...
25.774194
73
0.644556
0
0
0
0
0
0
0
0
328
0.410513
0745f258c3fda6d1caa28babca894afcfee11f9f
10,829
py
Python
run_classifier.py
wj-Mcat/model-getting-started
abe8c9df10b45841eeb38e859e680a37ec03fe8a
[ "Apache-2.0" ]
null
null
null
run_classifier.py
wj-Mcat/model-getting-started
abe8c9df10b45841eeb38e859e680a37ec03fe8a
[ "Apache-2.0" ]
null
null
null
run_classifier.py
wj-Mcat/model-getting-started
abe8c9df10b45841eeb38e859e680a37ec03fe8a
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
38.537367
122
0.651676
211
0.019388
0
0
0
0
0
0
2,705
0.248553
07461f1a486f88f500aad5210c29f31d3c93dac1
1,174
py
Python
module2-sql-for-analysis/rpg_db.py
TobyChen320/DS-Unit-3-Sprint-2-SQL-and-Databases
306d2252b3756a501e2412fcb5eddbdebc16a362
[ "MIT" ]
null
null
null
module2-sql-for-analysis/rpg_db.py
TobyChen320/DS-Unit-3-Sprint-2-SQL-and-Databases
306d2252b3756a501e2412fcb5eddbdebc16a362
[ "MIT" ]
null
null
null
module2-sql-for-analysis/rpg_db.py
TobyChen320/DS-Unit-3-Sprint-2-SQL-and-Databases
306d2252b3756a501e2412fcb5eddbdebc16a362
[ "MIT" ]
null
null
null
import sqlite3 import os import psycopg2 from dotenv import load_dotenv load_dotenv() DB_NAME2 = os.getenv("DB_NAME3") DB_USER2 = os.getenv("DB_USER3") DB_PASS2 = os.getenv("DB_PASS3") DB_HOST2 = os.getenv("DB_HOST3") conn = psycopg2.connect(dbname=DB_NAME2, user=DB_USER2, ...
22.150943
94
0.698467
0
0
0
0
0
0
0
0
465
0.396082
0748c347781432c41ed5dc21b2a78b229eb50e78
24,232
py
Python
sws_comp_wiki_gen.py
moff-wildfire/sws-battlefy
04b12b54f91e450980c2c57eed57f0504abec1bb
[ "Unlicense" ]
1
2021-12-10T01:36:36.000Z
2021-12-10T01:36:36.000Z
sws_comp_wiki_gen.py
moff-wildfire/sws-battlefy
04b12b54f91e450980c2c57eed57f0504abec1bb
[ "Unlicense" ]
null
null
null
sws_comp_wiki_gen.py
moff-wildfire/sws-battlefy
04b12b54f91e450980c2c57eed57f0504abec1bb
[ "Unlicense" ]
null
null
null
import battlefy_data import battlefy_wiki_linkings from datetime import datetime from operator import itemgetter from pathlib import Path import calcup_roster_tracking def create_sidebar(data, wiki_name): sidebar = '{{Infobox league' + '\n' sidebar += '|liquipediatier=' + '\n' sidebar += '|name=' + data[...
42.812721
119
0.560333
0
0
0
0
0
0
0
0
8,219
0.33918
0748f0d589516cda25a4a57eb049a757da513fda
3,169
py
Python
utilidades/texto.py
DeadZombie14/chillMagicCarPygame
756bb6d27939bed3c2834222d03096e90f05a788
[ "MIT" ]
null
null
null
utilidades/texto.py
DeadZombie14/chillMagicCarPygame
756bb6d27939bed3c2834222d03096e90f05a788
[ "MIT" ]
null
null
null
utilidades/texto.py
DeadZombie14/chillMagicCarPygame
756bb6d27939bed3c2834222d03096e90f05a788
[ "MIT" ]
null
null
null
import pygame class Texto: def __init__(self, screen, text, x, y, text_size = 20, fuente = 'Calibri', italic = False, bold= False, subrayado= False, color = (250, 240, 230), bg = [] ): self.screen = screen fg = color self.coord = x, y #load font, prepare values f...
31.376238
161
0.517829
2,905
0.916693
0
0
0
0
0
0
840
0.265068
074906b7cce1eac2c3d5b9dbf7a25ead70cb372d
11,662
py
Python
training_xgboost_model.py
MighTy-Weaver/Inefficient-AC-detection
8229f19accd1569ba7b48f77f71783173393d9ed
[ "Apache-2.0" ]
2
2021-02-21T13:28:30.000Z
2021-07-10T05:24:05.000Z
training_xgboost_model.py
MighTy-Weaver/Inefficient-AC-detection
8229f19accd1569ba7b48f77f71783173393d9ed
[ "Apache-2.0" ]
null
null
null
training_xgboost_model.py
MighTy-Weaver/Inefficient-AC-detection
8229f19accd1569ba7b48f77f71783173393d9ed
[ "Apache-2.0" ]
null
null
null
# This is the code to train the xgboost model with cross-validation for each unique room in the dataset. # Models are dumped into ./models and results are dumped into two csv files in the current work directory. import argparse import json import math import os import pickle import warnings from typing import Tuple i...
51.149123
120
0.667038
0
0
0
0
0
0
0
0
3,956
0.339221
07494bf06325a1ec59e4ef3f00ab6c72a53bc972
1,293
py
Python
setup.py
editorconfig/editorconfig-core-py
f43312abcf6888b78ca80f1e95bfa627281746ad
[ "PSF-2.0", "BSD-2-Clause" ]
70
2015-01-12T09:55:18.000Z
2022-03-29T06:15:49.000Z
setup.py
editorconfig/editorconfig-core-py
f43312abcf6888b78ca80f1e95bfa627281746ad
[ "PSF-2.0", "BSD-2-Clause" ]
26
2015-09-15T06:46:51.000Z
2022-03-28T08:56:35.000Z
setup.py
editorconfig/editorconfig-core-py
f43312abcf6888b78ca80f1e95bfa627281746ad
[ "PSF-2.0", "BSD-2-Clause" ]
28
2015-04-05T18:07:16.000Z
2022-03-28T08:08:00.000Z
import os from setuptools import setup # Read the version g = {} with open(os.path.join("editorconfig", "version.py"), "rt") as fp: exec(fp.read(), g) v = g['VERSION'] version = ".".join(str(x) for x in v[:3]) if v[3] != "final": version += "-" + v[3] setup( name='EditorConfig', versio...
31.536585
72
0.590101
0
0
0
0
0
0
0
0
737
0.569992
074981b228683f09166c88b994c571524093496b
6,035
py
Python
multi_group_memory_contrast.py
wangzy0327/hadoop-cluster-docker
cf1de6bf458ade132ad5a688e4f8f9b9968a704a
[ "Apache-2.0" ]
1
2020-03-03T10:16:33.000Z
2020-03-03T10:16:33.000Z
multi_group_memory_contrast.py
wangzy0327/hadoop-cluster-docker
cf1de6bf458ade132ad5a688e4f8f9b9968a704a
[ "Apache-2.0" ]
null
null
null
multi_group_memory_contrast.py
wangzy0327/hadoop-cluster-docker
cf1de6bf458ade132ad5a688e4f8f9b9968a704a
[ "Apache-2.0" ]
1
2020-12-21T09:20:52.000Z
2020-12-21T09:20:52.000Z
import numpy as np import matplotlib.pyplot as plt t = np.arange(0,375,6.5) # MEM_1 = [0.031, 0.034, 0.034, 0.034, 0.031, 0.034, 0.034, 0.034, 0.031, 0.033, 0.035, 0.034, 0.031, 0.033, 0.034, 0.034, 0.031, 0.033, 0.034, 0.034, 0.031, 0.033, 0.034, 0.034, 0.031, 0.033, 0.034, 0.034, 0.031, 0.031, 0.031, 0.031, 0.031, 0...
104.051724
414
0.596189
0
0
0
0
0
0
0
0
2,432
0.402983
0749f9a616656fe35e1c0d2532a8c8a5e40dc4ab
1,042
py
Python
vaping/config.py
josephburnett/vaping
16f9092f0b3c1692e6d1a040f746e1277e197353
[ "Apache-2.0" ]
null
null
null
vaping/config.py
josephburnett/vaping
16f9092f0b3c1692e6d1a040f746e1277e197353
[ "Apache-2.0" ]
null
null
null
vaping/config.py
josephburnett/vaping
16f9092f0b3c1692e6d1a040f746e1277e197353
[ "Apache-2.0" ]
null
null
null
import re import munge def parse_interval(val): """ converts a string to float of seconds .5 = 500ms 90 = 1m30s **Arguments** - val (`str`) """ re_intv = re.compile(r"([\d\.]+)([a-zA-Z]+)") val = val.strip() total = 0.0 for match in re_intv.findall(val): ...
20.84
86
0.46833
271
0.260077
0
0
0
0
0
0
341
0.327255
074b42be48178517185311cda7a91881826a6fd2
654
py
Python
sktime/annotation/tests/test_all_annotators.py
Rubiel1/sktime
2fd2290fb438224f11ddf202148917eaf9b73a87
[ "BSD-3-Clause" ]
1
2021-09-08T14:24:52.000Z
2021-09-08T14:24:52.000Z
sktime/annotation/tests/test_all_annotators.py
Rubiel1/sktime
2fd2290fb438224f11ddf202148917eaf9b73a87
[ "BSD-3-Clause" ]
null
null
null
sktime/annotation/tests/test_all_annotators.py
Rubiel1/sktime
2fd2290fb438224f11ddf202148917eaf9b73a87
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Tests for sktime annotators.""" import pandas as pd import pytest from sktime.registry import all_estimators from sktime.utils._testing.estimator_checks import _make_args ALL_ANNOTATORS = all_estimators(estimator_types="series-annotator", return_names=False) @pytest.mark.parametrize("Est...
28.434783
87
0.750765
0
0
0
0
362
0.553517
0
0
133
0.203364
074b7ef708bdd483e5b790825c69a90db600e852
569
py
Python
raspberry-pi-camera/cam.py
AlexMassin/mlh-react-vr-website
dc08788ccdecc9923b8dbfd31fa452cb83d214ae
[ "MIT" ]
1
2019-05-19T03:37:26.000Z
2019-05-19T03:37:26.000Z
raspberry-pi-camera/cam.py
AlexMassin/mlh-react-vr-website
dc08788ccdecc9923b8dbfd31fa452cb83d214ae
[ "MIT" ]
null
null
null
raspberry-pi-camera/cam.py
AlexMassin/mlh-react-vr-website
dc08788ccdecc9923b8dbfd31fa452cb83d214ae
[ "MIT" ]
1
2019-10-02T20:18:54.000Z
2019-10-02T20:18:54.000Z
picamera import PiCamera from time import sleep import boto3 import os.path import subprocess s3 = boto3.client('s3') bucket = 'cambucket21' camera = PiCamera() #camera.resolution(1920,1080) x = 0 camerafile = x while True: if (x == 6): x = 1 else: x = x + 1 camera.start_preview() camera.start_recording('/home/pi/' ...
20.321429
82
0.671353
0
0
0
0
0
0
0
0
126
0.221441
074b9d7491ffbc8fda4dfce94456f63c57933830
437
py
Python
Part_3_advanced/m04_datetime_and_timedelta/datetime_formats/example_1.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
Part_3_advanced/m04_datetime_and_timedelta/datetime_formats/example_1.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
Part_3_advanced/m04_datetime_and_timedelta/datetime_formats/example_1.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
from datetime import datetime def run_example(): moment_in_time = datetime.fromordinal(256) print(moment_in_time) print(moment_in_time.toordinal()) print(moment_in_time.weekday()) print(moment_in_time.isoweekday()) other_moment = datetime.fromtimestamp(16_000_000) print(other_moment) ...
23
53
0.734554
0
0
0
0
0
0
0
0
10
0.022883
074c422d6b8b108e68ca3caffc0062b15b80774b
1,333
py
Python
examples/scripts/segmentation/nnet3-segmenter.py
mxmpl/pykaldi
0570307138c5391cc47b019450d08bcb9686dd98
[ "Apache-2.0" ]
916
2017-11-22T19:33:36.000Z
2022-03-31T11:51:58.000Z
examples/scripts/segmentation/nnet3-segmenter.py
mxmpl/pykaldi
0570307138c5391cc47b019450d08bcb9686dd98
[ "Apache-2.0" ]
268
2018-01-16T22:06:45.000Z
2022-03-29T03:24:41.000Z
examples/scripts/segmentation/nnet3-segmenter.py
mxmpl/pykaldi
0570307138c5391cc47b019450d08bcb9686dd98
[ "Apache-2.0" ]
260
2018-01-23T18:39:40.000Z
2022-03-24T08:17:39.000Z
#!/usr/bin/env python from __future__ import print_function from kaldi.segmentation import NnetSAD, SegmentationProcessor from kaldi.nnet3 import NnetSimpleComputationOptions from kaldi.util.table import SequentialMatrixReader # Construct SAD model = NnetSAD.read_model("final.raw") post = NnetSAD.read_average_poster...
37.027778
77
0.775694
0
0
0
0
0
0
0
0
241
0.180795
074c987bce7bacca56810d03a725dd7cdf352776
4,911
py
Python
src/dataset.py
HeegyuKim/CurseFilter
dc4a64aebd997706553c24e919a88e19a3c92dd3
[ "MIT" ]
null
null
null
src/dataset.py
HeegyuKim/CurseFilter
dc4a64aebd997706553c24e919a88e19a3c92dd3
[ "MIT" ]
null
null
null
src/dataset.py
HeegyuKim/CurseFilter
dc4a64aebd997706553c24e919a88e19a3c92dd3
[ "MIT" ]
null
null
null
from cProfile import label from matplotlib.pyplot import text import pandas as pd import numpy as np from tokenizers import Tokenizer import torch from torch.utils.data import Dataset, DataLoader from typing import Dict, Any, Tuple from datasets import load_dataset class DataFrameDataset(Dataset): def __init__(se...
38.069767
131
0.609448
4,632
0.943189
0
0
0
0
0
0
153
0.031155
074cdaf58b71e5a0a7b4da96e1a1535d7fb91e4b
987
py
Python
helper_tools/raspi_OMX-Player_Howto_demo.py
stko/Schnipsl
824572c657e48f18950f584b9529661ff5bb8069
[ "MIT" ]
null
null
null
helper_tools/raspi_OMX-Player_Howto_demo.py
stko/Schnipsl
824572c657e48f18950f584b9529661ff5bb8069
[ "MIT" ]
29
2020-08-30T15:07:50.000Z
2022-02-19T03:41:26.000Z
helper_tools/raspi_OMX-Player_Howto_demo.py
wifitvbox/Schnipsl
553ce8de3dda26fb92297ad76e92f4a363070e4e
[ "MIT" ]
1
2020-12-28T05:46:17.000Z
2020-12-28T05:46:17.000Z
#!/usr/bin/python # mp4museum.org by julius schmiedel 2019 import os import sys import glob from subprocess import Popen, PIPE import RPi.GPIO as GPIO FNULL = open(os.devnull, "w") # setup GPIO pin GPIO.setmode(GPIO.BOARD) GPIO.setup(11, GPIO.IN, pull_up_down = GPIO.PUD_DOWN) GPIO.setup(13, GPIO.IN, pull_up_down = ...
25.973684
97
0.73151
0
0
0
0
0
0
0
0
282
0.285714
074ce069ee533cbcb1f8fc2b612416adfbbf158a
4,549
py
Python
dash_app/compare_alg.py
zeyu2001/ICT1002-Python
76a2c8ad3e3c4a3c873a9259e2a11488c33f2bf7
[ "MIT" ]
1
2020-10-31T06:57:01.000Z
2020-10-31T06:57:01.000Z
dash_app/compare_alg.py
zeyu2001/ICT1002-Python
76a2c8ad3e3c4a3c873a9259e2a11488c33f2bf7
[ "MIT" ]
null
null
null
dash_app/compare_alg.py
zeyu2001/ICT1002-Python
76a2c8ad3e3c4a3c873a9259e2a11488c33f2bf7
[ "MIT" ]
1
2021-12-04T10:02:16.000Z
2021-12-04T10:02:16.000Z
""" Comparison between the efficiency of the Boyer-Moore algorithm and the naive substring search algorithm. The runtimes for both algorithms are plotted on the same axes. """ import matplotlib.pyplot as plt import numpy as np import string import time import random from bm_alg import boyer_moore_match, naive_match #...
28.254658
104
0.585843
0
0
0
0
0
0
0
0
1,485
0.326445
074fa8cb751dc3e01a0d7cf156f12acfd22b5c7b
616
py
Python
TSIS_3/3774.py
GMKanat/PP2_spring
423617d559c5690f689741aaa152b9fee5082baf
[ "MIT" ]
null
null
null
TSIS_3/3774.py
GMKanat/PP2_spring
423617d559c5690f689741aaa152b9fee5082baf
[ "MIT" ]
null
null
null
TSIS_3/3774.py
GMKanat/PP2_spring
423617d559c5690f689741aaa152b9fee5082baf
[ "MIT" ]
null
null
null
ans = dict() pairs = dict() def create_tree(p): if p in ans: return ans[p] else: try: res = 0 if p in pairs: for ch in pairs[p]: res += create_tree(ch) + 1 ans[p] = res return res except: pass...
22.814815
46
0.469156
0
0
0
0
0
0
0
0
0
0
075329f4475d143e6e7eeffda251a30feb1872ce
404
py
Python
italicizer.py
Dorijan-Cirkveni/Miniprojects
2109275c9c1b9f5e7a286604cbb1b7966dff9798
[ "MIT" ]
null
null
null
italicizer.py
Dorijan-Cirkveni/Miniprojects
2109275c9c1b9f5e7a286604cbb1b7966dff9798
[ "MIT" ]
null
null
null
italicizer.py
Dorijan-Cirkveni/Miniprojects
2109275c9c1b9f5e7a286604cbb1b7966dff9798
[ "MIT" ]
null
null
null
def italicize(s): b = False res = '' for e in s: if e == '"': if b: res += '{\\i}' + e else: res += e + '{i}' b=not b else: res += e return res def main(): F=open('test_in.txt','r') X=F.read() F...
15.538462
34
0.368812
0
0
0
0
0
0
0
0
43
0.106436
07532f5a10906c237ad3a39209766e0e40d93170
3,036
py
Python
maps/views.py
WPRDC/neighborhood-simulacrum
46892dfdbc8bc3201e31fee4ee991c49b208753e
[ "MIT" ]
null
null
null
maps/views.py
WPRDC/neighborhood-simulacrum
46892dfdbc8bc3201e31fee4ee991c49b208753e
[ "MIT" ]
6
2020-12-18T17:21:35.000Z
2021-03-03T21:08:44.000Z
maps/views.py
WPRDC/neighborhood-simulacrum
46892dfdbc8bc3201e31fee4ee991c49b208753e
[ "MIT" ]
null
null
null
import json from typing import Type, TYPE_CHECKING from django.core.exceptions import ObjectDoesNotExist from django.utils.decorators import method_decorator from django.views.decorators.cache import cache_page from rest_framework import viewsets, filters from rest_framework.exceptions import NotFound from rest_framew...
35.717647
94
0.745389
2,059
0.678195
0
0
752
0.247694
0
0
398
0.131094
0754a45f518b76cfc3fadb21e0d4b383c11aeb7f
2,937
py
Python
magma/operators.py
Kuree/magma
be2439aa897768c5810be72e3a55a6f772ac83cf
[ "MIT" ]
null
null
null
magma/operators.py
Kuree/magma
be2439aa897768c5810be72e3a55a6f772ac83cf
[ "MIT" ]
null
null
null
magma/operators.py
Kuree/magma
be2439aa897768c5810be72e3a55a6f772ac83cf
[ "MIT" ]
null
null
null
from magma import _BitType, BitType, BitsType, UIntType, SIntType class MantleImportError(RuntimeError): pass class UndefinedOperatorError(RuntimeError): pass def raise_mantle_import_error_unary(self): raise MantleImportError( "Operators are not defined until mantle has been imported") def r...
26.459459
79
0.571672
99
0.033708
0
0
0
0
0
0
847
0.28839
075601d812e7788a83abdb5d69e6437c29517e9c
7,993
py
Python
src/sultan/result.py
bquantump/sultan
a46e8dc9b09385a7226f6151134ae2417166f25d
[ "MIT" ]
null
null
null
src/sultan/result.py
bquantump/sultan
a46e8dc9b09385a7226f6151134ae2417166f25d
[ "MIT" ]
null
null
null
src/sultan/result.py
bquantump/sultan
a46e8dc9b09385a7226f6151134ae2417166f25d
[ "MIT" ]
null
null
null
import subprocess import sys import time import traceback from queue import Queue from sultan.core import Base from sultan.echo import Echo from threading import Thread class Result(Base): """ Class that encompasses the result of a POpen command. """ def __init__(self, process, commands, context, st...
31.222656
110
0.555236
7,820
0.978356
0
0
1,662
0.207932
0
0
1,700
0.212686
07565d1f240205eff7e6a9514e645e53e8414dbd
10,991
py
Python
great_expectations/cli/datasource.py
orenovadia/great_expectations
76ef0c4e066227f8b589a1ee6ac885618f65906e
[ "Apache-2.0" ]
null
null
null
great_expectations/cli/datasource.py
orenovadia/great_expectations
76ef0c4e066227f8b589a1ee6ac885618f65906e
[ "Apache-2.0" ]
null
null
null
great_expectations/cli/datasource.py
orenovadia/great_expectations
76ef0c4e066227f8b589a1ee6ac885618f65906e
[ "Apache-2.0" ]
null
null
null
import os import click from .util import cli_message from great_expectations.render import DefaultJinjaPageView from great_expectations.version import __version__ as __version__ def add_datasource(context): cli_message( """ ========== Datasources ========== See <blue>https://docs.greatexpectations.io/en...
38.837456
180
0.655263
0
0
0
0
0
0
0
0
5,425
0.493586
0756766e6e04859ce22940229b15353362178faa
4,105
py
Python
python/crawler/downloader.py
rgb-24bit/code-library
8da8336e241e1428b2b46c6939bd5e9eadcf3e68
[ "MIT" ]
null
null
null
python/crawler/downloader.py
rgb-24bit/code-library
8da8336e241e1428b2b46c6939bd5e9eadcf3e68
[ "MIT" ]
null
null
null
python/crawler/downloader.py
rgb-24bit/code-library
8da8336e241e1428b2b46c6939bd5e9eadcf3e68
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Provide download function by request """ from datetime import datetime import logging import time import urllib.parse import requests from bs4 import BeautifulSoup class Throttle(object): """Throttle downloading by sleeping between requests to same domain.""" de...
37.66055
81
0.599026
3,885
0.946407
0
0
0
0
0
0
858
0.209013
07571f5303eed07dcbb7a47a5145eef3cd7c884f
536
py
Python
medium/151.py
pisskidney/leetcode
08c19cbf3d7afc897908ea05db4ad11a5487f523
[ "MIT" ]
null
null
null
medium/151.py
pisskidney/leetcode
08c19cbf3d7afc897908ea05db4ad11a5487f523
[ "MIT" ]
null
null
null
medium/151.py
pisskidney/leetcode
08c19cbf3d7afc897908ea05db4ad11a5487f523
[ "MIT" ]
null
null
null
#!/usr/bin/python class Solution(object): def reverseWords(self, s): if s == '': return s res = [] i = len(s) - 2 while i >= -1: if s[i] == ' ' or i == -1: word = '' j = i + 1 while j < len(s) and s[j] != ' ': ...
20.615385
49
0.33209
469
0.875
0
0
0
0
0
0
35
0.065299
07573778dc31fb4c60d28d2030387a7be8144f36
7,327
py
Python
src/keycloak/connection.py
ecederstrand/python-keycloak
77686a2764a3fcba092d78e02f42a58c7214c30e
[ "MIT" ]
null
null
null
src/keycloak/connection.py
ecederstrand/python-keycloak
77686a2764a3fcba092d78e02f42a58c7214c30e
[ "MIT" ]
null
null
null
src/keycloak/connection.py
ecederstrand/python-keycloak
77686a2764a3fcba092d78e02f42a58c7214c30e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # The MIT License (MIT) # # Copyright (C) 2017 Marcos Pereira <marcospereira.mpj@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, in...
32.564444
88
0.608162
5,947
0.811656
0
0
849
0.115873
0
0
3,622
0.494336
07577b638bc8a39bd8fcb86c2ed5cc924e43d86a
700
py
Python
2020/23.py
Valokoodari/advent-of-code
c664987f739e0b07ddad34bad87d56768556a5a5
[ "MIT" ]
2
2021-12-27T18:59:11.000Z
2022-01-10T02:31:36.000Z
2020/23.py
Valokoodari/advent-of-code-2019
c664987f739e0b07ddad34bad87d56768556a5a5
[ "MIT" ]
null
null
null
2020/23.py
Valokoodari/advent-of-code-2019
c664987f739e0b07ddad34bad87d56768556a5a5
[ "MIT" ]
2
2021-12-23T17:29:10.000Z
2021-12-24T03:21:49.000Z
#!venv/bin/python3 cs = [int(c) for c in open("inputs/23.in", "r").readline().strip()] def f(cs, ts): p,cc = {n: cs[(i+1)%len(cs)] for i,n in enumerate(cs)},cs[-1] for _ in range(ts): cc,dc = p[cc],p[cc]-1 if p[cc]-1 > 0 else max(p.keys()) hc,p[cc] = [p[cc], p[p[cc]], p[p[p[cc]]]],p[p[p[p[cc]]...
29.166667
77
0.452857
0
0
0
0
0
0
0
0
55
0.078571
07579f83aea9f0c480c258cdf19ac53f9ebbfd10
160
py
Python
run.py
jakewright/home-automation-device-registry
b073966b1dc259a6997c47f8d369f51dee9cbbf3
[ "MIT" ]
15
2018-01-09T21:57:09.000Z
2021-05-08T10:23:01.000Z
run.py
jakewright/home-automation-device-registry
b073966b1dc259a6997c47f8d369f51dee9cbbf3
[ "MIT" ]
null
null
null
run.py
jakewright/home-automation-device-registry
b073966b1dc259a6997c47f8d369f51dee9cbbf3
[ "MIT" ]
10
2018-09-23T20:30:24.000Z
2021-05-08T10:23:02.000Z
# Import the application from device_registry import app # Run the application in debug mode app.run(host='0.0.0.0', port=int(app.config['PORT']), debug=True)
26.666667
65
0.74375
0
0
0
0
0
0
0
0
74
0.4625
0758c8b4614be9ea14ff7452e9accfcfb90b432b
1,263
py
Python
dvc/utils/stage.py
Abrosimov-a-a/dvc
93280c937b9160003afb0d2f3fd473c03d6d9673
[ "Apache-2.0" ]
null
null
null
dvc/utils/stage.py
Abrosimov-a-a/dvc
93280c937b9160003afb0d2f3fd473c03d6d9673
[ "Apache-2.0" ]
null
null
null
dvc/utils/stage.py
Abrosimov-a-a/dvc
93280c937b9160003afb0d2f3fd473c03d6d9673
[ "Apache-2.0" ]
null
null
null
import yaml from ruamel.yaml import YAML from ruamel.yaml.error import YAMLError try: from yaml import CSafeLoader as SafeLoader except ImportError: from yaml import SafeLoader from dvc.exceptions import StageFileCorruptedError from dvc.utils.compat import open def load_stage_file(path): with open(path,...
26.87234
76
0.69517
0
0
0
0
0
0
0
0
323
0.25574
075a282b1afd93e2cc9af2acd58c24b3702f7904
93
py
Python
CAMPODETIRO/test.py
Arguel/old-projects
2e5f594a6303b2e137acf555569eca98aab08054
[ "Apache-2.0" ]
null
null
null
CAMPODETIRO/test.py
Arguel/old-projects
2e5f594a6303b2e137acf555569eca98aab08054
[ "Apache-2.0" ]
null
null
null
CAMPODETIRO/test.py
Arguel/old-projects
2e5f594a6303b2e137acf555569eca98aab08054
[ "Apache-2.0" ]
null
null
null
entrada = input("palabra") listaDeLetras = [] for i in entrada: listaDeLetras.append(i)
15.5
27
0.698925
0
0
0
0
0
0
0
0
9
0.096774
075a46f6df538e13d87e3247bc8ca4b6d54f0b7b
659
py
Python
demos/nn_classification_demo.py
fire-breathing-rubber-lemons/cs207-FinalProject
92d1d7d70637e2478effb01c9ce56199e0f873c9
[ "MIT" ]
null
null
null
demos/nn_classification_demo.py
fire-breathing-rubber-lemons/cs207-FinalProject
92d1d7d70637e2478effb01c9ce56199e0f873c9
[ "MIT" ]
31
2019-10-18T16:14:07.000Z
2019-12-10T16:38:34.000Z
demos/nn_classification_demo.py
fire-breathing-rubber-lemons/cs207-FinalProject
92d1d7d70637e2478effb01c9ce56199e0f873c9
[ "MIT" ]
null
null
null
import numpy as np from pyad.nn import NeuralNet from sklearn.datasets import load_breast_cancer from sklearn.model_selection import train_test_split np.random.seed(0) data = load_breast_cancer() X_train, X_test, y_train, y_test = train_test_split( data.data, data.target, train_size=0.8, random_state=0 ) nn = Ne...
26.36
59
0.76176
0
0
0
0
0
0
0
0
55
0.08346
075c40bff74b1c9ad80e482ccef0c574552a2c97
226
py
Python
mgatemp.py
zobclub/chapter8
fbd9e8711747b7446f75b472bae1465fe0ab495c
[ "MIT" ]
1
2021-12-02T10:56:49.000Z
2021-12-02T10:56:49.000Z
mgatemp.py
zobclub/chapter8
fbd9e8711747b7446f75b472bae1465fe0ab495c
[ "MIT" ]
null
null
null
mgatemp.py
zobclub/chapter8
fbd9e8711747b7446f75b472bae1465fe0ab495c
[ "MIT" ]
null
null
null
from microbit import * I2CADR = 0x0E DIE_TEMP = 0x0F while True: i2c.write(I2CADR, bytearray([DIE_TEMP])) d = i2c.read(I2CADR, 1) x = d[0] if x >=128: x -= 256 x += 10 print(x) sleep(500)
16.142857
44
0.553097
0
0
0
0
0
0
0
0
0
0
075cb80186092395148f9c03498c024c22cfd0b5
793
py
Python
utils/nlp.py
splovyt/SFPython-Project-Night
50f20f581e074401d59d91457bac2a69631bef61
[ "Apache-2.0" ]
1
2019-04-17T18:02:59.000Z
2019-04-17T18:02:59.000Z
utils/nlp.py
splovyt/SFPython-Project-Night
50f20f581e074401d59d91457bac2a69631bef61
[ "Apache-2.0" ]
null
null
null
utils/nlp.py
splovyt/SFPython-Project-Night
50f20f581e074401d59d91457bac2a69631bef61
[ "Apache-2.0" ]
null
null
null
import ssl import nltk from textblob import TextBlob from nltk.corpus import stopwords # set SSL try: _create_unverified_https_context = ssl._create_unverified_context except AttributeError: pass else: ssl._create_default_https_context = _create_unverified_https_context # download noun data (if required...
26.433333
98
0.760404
0
0
0
0
0
0
0
0
214
0.269861
075cf0dd079f839e7d44c9491837f8a19123cdd5
1,418
py
Python
toolbox/core/management/commands/celery_beat_resource_scraper.py
akshedu/toolbox
7c647433b68f1098ee4c8623f836f74785dc970c
[ "MIT" ]
null
null
null
toolbox/core/management/commands/celery_beat_resource_scraper.py
akshedu/toolbox
7c647433b68f1098ee4c8623f836f74785dc970c
[ "MIT" ]
null
null
null
toolbox/core/management/commands/celery_beat_resource_scraper.py
akshedu/toolbox
7c647433b68f1098ee4c8623f836f74785dc970c
[ "MIT" ]
null
null
null
from django_celery_beat.models import PeriodicTask, IntervalSchedule from django.core.management.base import BaseCommand from django.db import IntegrityError class Command(BaseCommand): def handle(self, *args, **options): try: schedule_channel, created = IntervalSchedule.objects.get_or_create...
32.227273
79
0.499295
1,254
0.884344
0
0
0
0
0
0
124
0.087447
075ee89278e2e099ce3c9cbc108dfe159e2012f2
3,284
py
Python
ppcls/data/preprocess/__init__.py
zhusonghe/PaddleClas-1
e2e492f9c78ed5084cc50d7c45eef4cc41e1eeaf
[ "Apache-2.0" ]
3,763
2020-04-10T04:48:11.000Z
2022-03-31T13:24:37.000Z
ppcls/data/preprocess/__init__.py
zhusonghe/PaddleClas-1
e2e492f9c78ed5084cc50d7c45eef4cc41e1eeaf
[ "Apache-2.0" ]
633
2020-04-08T18:27:31.000Z
2022-03-31T01:09:43.000Z
ppcls/data/preprocess/__init__.py
zhusonghe/PaddleClas-1
e2e492f9c78ed5084cc50d7c45eef4cc41e1eeaf
[ "Apache-2.0" ]
846
2020-04-08T08:13:18.000Z
2022-03-31T12:28:37.000Z
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
32.514851
114
0.715286
1,438
0.437881
0
0
0
0
0
0
799
0.243301
075fafdab69c5858ee27f6483fe78f36b26b216c
11,121
py
Python
src/scalar_net/visualisations.py
scheeloong/lindaedynamics_icml2018
d03b450e254d33b019161a3cd015e44aafe407cb
[ "MIT" ]
1
2018-08-04T17:04:13.000Z
2018-08-04T17:04:13.000Z
src/scalar_net/visualisations.py
scheeloong/lindaedynamics_icml2018
d03b450e254d33b019161a3cd015e44aafe407cb
[ "MIT" ]
null
null
null
src/scalar_net/visualisations.py
scheeloong/lindaedynamics_icml2018
d03b450e254d33b019161a3cd015e44aafe407cb
[ "MIT" ]
null
null
null
# required modules import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from matplotlib import cm from matplotlib.colors import Normalize from mpl_toolkits.mplot3d import Axes3D from matplotlib.animation import FuncAnimation # two-dimesional version def plot_mse_loss_surface_2d(fi...
35.193038
103
0.608488
0
0
0
0
0
0
0
0
1,742
0.156641
075fc7c73e1c7b1fe3355a9a233cd8869299a19e
7,435
py
Python
tests/qconvolutional_test.py
kshithijiyer/qkeras
78ac608c6dcd84151792a986d03fe7afb17929cf
[ "Apache-2.0" ]
null
null
null
tests/qconvolutional_test.py
kshithijiyer/qkeras
78ac608c6dcd84151792a986d03fe7afb17929cf
[ "Apache-2.0" ]
null
null
null
tests/qconvolutional_test.py
kshithijiyer/qkeras
78ac608c6dcd84151792a986d03fe7afb17929cf
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
33.490991
80
0.646537
0
0
0
0
0
0
0
0
1,732
0.232952
076073f7df321e46ea5bd065cc9331746695ec1f
2,356
py
Python
discord/ext/ui/select.py
Lapis256/discord-ext-ui
593de0a1107d2a0c26023587a2937f00ecec3ed1
[ "MIT" ]
null
null
null
discord/ext/ui/select.py
Lapis256/discord-ext-ui
593de0a1107d2a0c26023587a2937f00ecec3ed1
[ "MIT" ]
null
null
null
discord/ext/ui/select.py
Lapis256/discord-ext-ui
593de0a1107d2a0c26023587a2937f00ecec3ed1
[ "MIT" ]
null
null
null
from typing import Optional, List, TypeVar, Generic, Callable import discord.ui from .item import Item from .select_option import SelectOption from .custom import CustomSelect def _default_check(_: discord.Interaction) -> bool: return True C = TypeVar("C", bound=discord.ui.Select) class Select(Item, Generic...
28.731707
79
0.61163
2,061
0.874788
0
0
0
0
0
0
67
0.028438
0760aecd744d04b7a42ae02e90ca8b423ee0a619
2,834
py
Python
ucscsdk/mometa/storage/StorageScsiLunRef.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
9
2016-12-22T08:39:25.000Z
2019-09-10T15:36:19.000Z
ucscsdk/mometa/storage/StorageScsiLunRef.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
10
2017-01-31T06:59:56.000Z
2021-11-09T09:14:37.000Z
ucscsdk/mometa/storage/StorageScsiLunRef.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
13
2016-11-14T07:42:58.000Z
2022-02-10T17:32:05.000Z
"""This module contains the general information for StorageScsiLunRef ManagedObject.""" from ...ucscmo import ManagedObject from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta from ...ucscmeta import VersionMeta class StorageScsiLunRefConsts(): pass class StorageScsiLunRef(ManagedObject): """Th...
50.607143
251
0.642202
2,602
0.918137
0
0
0
0
0
0
933
0.329217
0761a4f4179e9679d7d567a51af6174207abac78
16,697
py
Python
saxstools/fullsaxs.py
latrocinia/saxstools
8e88474f62466b745791c0ccbb07c80a959880f3
[ "Python-2.0", "OLDAP-2.7" ]
null
null
null
saxstools/fullsaxs.py
latrocinia/saxstools
8e88474f62466b745791c0ccbb07c80a959880f3
[ "Python-2.0", "OLDAP-2.7" ]
null
null
null
saxstools/fullsaxs.py
latrocinia/saxstools
8e88474f62466b745791c0ccbb07c80a959880f3
[ "Python-2.0", "OLDAP-2.7" ]
null
null
null
from __future__ import print_function, absolute_import, division from sys import stdout as _stdout from time import time as _time import numpy as np try: import pyfftw pyfftw.interfaces.cache.enable() pyfftw.interfaces.cache.set_keepalive_time(10) rfftn = pyfftw.interfaces.numpy_fft.rfftn irfftn =...
32.675147
115
0.581302
14,025
0.839971
0
0
2,180
0.130562
0
0
3,230
0.193448
0762390f8b5995d6cf171f62842c5c4b8e02141e
985
py
Python
lib/generate_random_obs.py
zehuilu/Learning-from-Sparse-Demonstrations
4d652635c24f847fe51bc050773762b549ce41c0
[ "MIT" ]
8
2020-08-16T00:09:57.000Z
2021-09-24T00:58:46.000Z
lib/generate_random_obs.py
zehuilu/Learning-from-Sparse-Demonstrations
4d652635c24f847fe51bc050773762b549ce41c0
[ "MIT" ]
null
null
null
lib/generate_random_obs.py
zehuilu/Learning-from-Sparse-Demonstrations
4d652635c24f847fe51bc050773762b549ce41c0
[ "MIT" ]
2
2021-01-26T02:33:13.000Z
2021-08-25T01:52:07.000Z
#!/usr/bin/env python3 import os import sys import time sys.path.append(os.getcwd()+'/lib') import random from dataclasses import dataclass, field from ObsInfo import ObsInfo def generate_random_obs(num_obs: int, size_list: list, config_data): """ config_file_name = "config.json" json_file = open(config_f...
30.78125
131
0.658883
0
0
0
0
0
0
0
0
367
0.372589
07629f29c3ccce164edffac5aaf1f19ce3ce8456
6,934
py
Python
userbot/helper_funcs/misc.py
Abucuyy/Uciha
726e9cd61eabf056064e40f7b322d8993161e52a
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/helper_funcs/misc.py
Abucuyy/Uciha
726e9cd61eabf056064e40f7b322d8993161e52a
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2021-02-08T20:43:56.000Z
2021-02-08T20:43:56.000Z
userbot/helper_funcs/misc.py
Abucuyy/Uciha
726e9cd61eabf056064e40f7b322d8993161e52a
[ "Naumen", "Condor-1.1", "MS-PL" ]
5
2020-09-05T12:45:31.000Z
2020-09-25T09:04:29.000Z
# TG-UserBot - A modular Telegram UserBot script for Python. # Copyright (C) 2019 Kandarp <https://github.com/kandnub> # # TG-UserBot is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of t...
37.27957
80
0.608595
0
0
0
0
0
0
5,124
0.738967
2,065
0.297808
0763811316d721bd61d00c534d919a140fb4b71a
1,421
py
Python
gym-multilayerthinfilm/utils.py
HarryTheBird/gym-multilayerthinfilm
22eda96e71e95e9ea1b491fae633c4a32fadb023
[ "MIT" ]
10
2021-05-20T19:46:36.000Z
2022-02-24T03:06:46.000Z
gym-multilayerthinfilm/utils.py
HarryTheBird/gym-multilayerthinfilm
22eda96e71e95e9ea1b491fae633c4a32fadb023
[ "MIT" ]
null
null
null
gym-multilayerthinfilm/utils.py
HarryTheBird/gym-multilayerthinfilm
22eda96e71e95e9ea1b491fae633c4a32fadb023
[ "MIT" ]
2
2021-12-11T21:49:35.000Z
2022-03-04T06:28:57.000Z
import numpy as np def get_n_from_txt(filepath, points=None, lambda_min=400, lambda_max=700, complex_n=True): ntxt = np.loadtxt(filepath) if np.min(np.abs(ntxt[:, 0] - lambda_min)) > 25 or np.min(np.abs(ntxt[:, 0] - lambda_max)) > 25: print('No measurement data for refractive indicies are available wit...
43.060606
113
0.626319
0
0
0
0
0
0
0
0
78
0.054891
0765d0b1f7f6046c9a5ec38c71317e234a345a45
270
py
Python
pyrocco/__init__.py
joaopalmeiro/pyrocco
4144f56d654500c3ec49cb04c06b98296004eafe
[ "MIT" ]
null
null
null
pyrocco/__init__.py
joaopalmeiro/pyrocco
4144f56d654500c3ec49cb04c06b98296004eafe
[ "MIT" ]
4
2021-05-31T16:44:16.000Z
2021-05-31T17:08:04.000Z
pyrocco/__init__.py
joaopalmeiro/pyrocco
4144f56d654500c3ec49cb04c06b98296004eafe
[ "MIT" ]
null
null
null
__package_name__ = "pyrocco" __version__ = "0.1.0" __author__ = "João Palmeiro" __author_email__ = "jm.palmeiro@campus.fct.unl.pt" __description__ = "A Python CLI to add the Party Parrot to a custom background image." __url__ = "https://github.com/joaopalmeiro/pyrocco"
38.571429
86
0.766667
0
0
0
0
0
0
0
0
172
0.634686
0768b4de117d71513a10b4439456e7226bc8f05f
850
py
Python
2020/day08/machine.py
ingjrs01/adventofcode
c5e4f0158dac0efc2dbfc10167f2700693b41fea
[ "Apache-2.0" ]
null
null
null
2020/day08/machine.py
ingjrs01/adventofcode
c5e4f0158dac0efc2dbfc10167f2700693b41fea
[ "Apache-2.0" ]
null
null
null
2020/day08/machine.py
ingjrs01/adventofcode
c5e4f0158dac0efc2dbfc10167f2700693b41fea
[ "Apache-2.0" ]
null
null
null
class Machine(): def __init__(self): self.pointer = 0 self.accum = 0 self.visited = [] def run(self,program): salir = False while (salir == False): if (self.pointer in self.visited): return False if (self.pointer >= len(progr...
22.368421
54
0.483529
843
0.991765
0
0
0
0
0
0
10
0.011765
0768ed6923c47dbe150e783f6cd01fa2f7c9e54c
41
py
Python
EduData/Task/__init__.py
BAOOOOOM/EduData
affa465779cb94db00ed19291f8411229d342c0f
[ "Apache-2.0" ]
98
2019-07-05T03:27:36.000Z
2022-03-30T08:38:09.000Z
EduData/Task/__init__.py
BAOOOOOM/EduData
affa465779cb94db00ed19291f8411229d342c0f
[ "Apache-2.0" ]
45
2020-12-25T03:49:43.000Z
2021-11-26T09:45:42.000Z
EduData/Task/__init__.py
BAOOOOOM/EduData
affa465779cb94db00ed19291f8411229d342c0f
[ "Apache-2.0" ]
50
2019-08-17T05:11:15.000Z
2022-03-29T07:54:13.000Z
# coding: utf-8 # 2019/8/23 @ tongshiwei
13.666667
24
0.658537
0
0
0
0
0
0
0
0
39
0.95122
076975f577d6632b0b1b26b10892f5123c387c67
1,286
py
Python
010-round.py
richardvecsey/python-basics
b66abef77bce2ddd6f2f39b631e1dd97a9aa2fac
[ "MIT" ]
3
2019-12-29T18:52:21.000Z
2020-02-20T09:18:08.000Z
010-round.py
richardvecsey/python-basics
b66abef77bce2ddd6f2f39b631e1dd97a9aa2fac
[ "MIT" ]
null
null
null
010-round.py
richardvecsey/python-basics
b66abef77bce2ddd6f2f39b631e1dd97a9aa2fac
[ "MIT" ]
2
2020-02-20T09:18:13.000Z
2020-06-04T04:51:44.000Z
""" Round a number -------------- Input (float) A floating point number (int) Number of decimals Default value is: 0 Output (float) Rounded number (int) Whether using the default decimals value, the return number will be the nearest ...
33.842105
80
0.64619
0
0
0
0
0
0
0
0
795
0.618196
076ab2cb67c5bd176123d8332c42ca379bbe81d8
992
py
Python
service.py
Kleist/MusicPlayer
95f634d1e4d47e7b430e32ad9224d94ad0453c82
[ "MIT" ]
1
2020-08-14T21:14:09.000Z
2020-08-14T21:14:09.000Z
service.py
Kleist/MusicPlayer
95f634d1e4d47e7b430e32ad9224d94ad0453c82
[ "MIT" ]
null
null
null
service.py
Kleist/MusicPlayer
95f634d1e4d47e7b430e32ad9224d94ad0453c82
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import RPi.GPIO as GPIO from mfrc522 import SimpleMFRC522 import play import time class TagPlayer(object): def __init__(self): self._current = None self.reader = SimpleMFRC522() self._failed = 0 def step(self): id, text = self.reader.read_no_block() ...
22.545455
64
0.521169
713
0.71875
0
0
0
0
0
0
61
0.061492
076b099ed1e8933339bc07b3aea99e064efdee24
1,118
py
Python
mypy/defaults.py
ckanesan/mypy
ffb3ce925e8bb3376e19f942c7d3a3806c9bba97
[ "PSF-2.0" ]
null
null
null
mypy/defaults.py
ckanesan/mypy
ffb3ce925e8bb3376e19f942c7d3a3806c9bba97
[ "PSF-2.0" ]
8
2021-03-18T22:27:44.000Z
2022-02-10T09:18:50.000Z
mypy/defaults.py
ckanesan/mypy
ffb3ce925e8bb3376e19f942c7d3a3806c9bba97
[ "PSF-2.0" ]
1
2021-09-20T06:37:41.000Z
2021-09-20T06:37:41.000Z
import os MYPY = False if MYPY: from typing_extensions import Final PYTHON2_VERSION = (2, 7) # type: Final PYTHON3_VERSION = (3, 6) # type: Final PYTHON3_VERSION_MIN = (3, 4) # type: Final CACHE_DIR = '.mypy_cache' # type: Final CONFIG_FILE = 'mypy.ini' # type: Final SHARED_CONFIG_FILES = ['setup.cfg', ] # ...
34.9375
91
0.604651
0
0
0
0
0
0
0
0
504
0.450805
4aca7d77d6d130f3025fa754e718e7148f830e41
3,558
py
Python
skcriteria/preprocessing/push_negatives.py
elcolie/scikit-criteria
216674d699b60d68fefa98d44afd619943f3bb00
[ "BSD-3-Clause" ]
null
null
null
skcriteria/preprocessing/push_negatives.py
elcolie/scikit-criteria
216674d699b60d68fefa98d44afd619943f3bb00
[ "BSD-3-Clause" ]
null
null
null
skcriteria/preprocessing/push_negatives.py
elcolie/scikit-criteria
216674d699b60d68fefa98d44afd619943f3bb00
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # License: BSD-3 (https://tldrlegal.com/license/bsd-3-clause-license-(revised)) # Copyright (c) 2016-2021, Cabral, Juan; Luczywo, Nadia # All rights reserved. # ============================================================================= # DOCS # =========================...
30.93913
79
0.522766
826
0.232153
0
0
309
0.086847
0
0
2,885
0.810849
4acaa4e6a8b6fa3eb236788a62a84f44c80e376f
3,451
py
Python
ingenico/direct/sdk/domain/customer_token.py
Ingenico/direct-sdk-python3
d2b30b8e8afb307153a1f19ac4c054d5344449ce
[ "Apache-2.0" ]
null
null
null
ingenico/direct/sdk/domain/customer_token.py
Ingenico/direct-sdk-python3
d2b30b8e8afb307153a1f19ac4c054d5344449ce
[ "Apache-2.0" ]
1
2021-03-30T12:55:39.000Z
2021-04-08T08:23:27.000Z
ingenico/direct/sdk/domain/customer_token.py
Ingenico/direct-sdk-python3
d2b30b8e8afb307153a1f19ac4c054d5344449ce
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # This class was auto-generated from the API references found at # https://support.direct.ingenico.com/documentation/api/reference/ # from ingenico.direct.sdk.data_object import DataObject from ingenico.direct.sdk.domain.address import Address from ingenico.direct.sdk.domain.company_informatio...
41.578313
109
0.703854
3,009
0.871921
0
0
1,126
0.326282
0
0
946
0.274123
4acbbae7f94e1d806015de62ee5a96d02c3544d7
301
py
Python
inserter.py
pirate/macOS-global-autocomplete
4ba8c3efdd34e7b4c0044c50f47d21a1bafd9aac
[ "MIT" ]
23
2018-12-28T17:33:33.000Z
2022-03-07T21:25:31.000Z
inserter.py
pirate/osx-global-autocomplete
4ba8c3efdd34e7b4c0044c50f47d21a1bafd9aac
[ "MIT" ]
null
null
null
inserter.py
pirate/osx-global-autocomplete
4ba8c3efdd34e7b4c0044c50f47d21a1bafd9aac
[ "MIT" ]
2
2017-02-27T18:08:12.000Z
2018-08-27T00:40:10.000Z
import time import pykeyboard # TODO: Replace following two lines with the code that activate the application. print('Activate the application 3 seconds.') time.sleep(3) k = pykeyboard.PyKeyboard() k.press_key(k.left_key) time.sleep(1) # Hold down left key for 1 second. k.release_key(k.left_key)
21.5
80
0.770764
0
0
0
0
0
0
0
0
151
0.501661
4acbd0cbd7b35addaf03f24e1fa4d33805db8c3a
4,819
py
Python
tools/corpora.py
EleutherAI/megatron-3d
be3014d47a127f08871d0ba6d6389363f2484397
[ "MIT" ]
3
2021-02-13T21:51:45.000Z
2021-02-14T23:15:02.000Z
tools/corpora.py
EleutherAI/megatron-3d
be3014d47a127f08871d0ba6d6389363f2484397
[ "MIT" ]
13
2021-02-08T11:22:38.000Z
2021-02-18T20:13:10.000Z
tools/corpora.py
EleutherAI/megatron-3d
be3014d47a127f08871d0ba6d6389363f2484397
[ "MIT" ]
2
2021-02-13T22:13:21.000Z
2021-10-12T06:39:33.000Z
import os import tarfile from abc import ABC, abstractmethod from glob import glob import shutil import random import zstandard """ This registry is for automatically downloading and extracting datasets. To register a class you need to inherit the DataDownloader class, provide name, filetype and url attributes, and (...
35.175182
136
0.661756
3,260
0.676489
0
0
393
0.081552
0
0
1,722
0.357336
4acced6bfbc482f9d38f37f561868a587991d47b
1,575
py
Python
othello_rl/qlearning/qlearning.py
aka256/othello-rl
ef5e78c6cf6b276e16b50086b53138ab968d728c
[ "MIT" ]
null
null
null
othello_rl/qlearning/qlearning.py
aka256/othello-rl
ef5e78c6cf6b276e16b50086b53138ab968d728c
[ "MIT" ]
null
null
null
othello_rl/qlearning/qlearning.py
aka256/othello-rl
ef5e78c6cf6b276e16b50086b53138ab968d728c
[ "MIT" ]
null
null
null
from logging import getLogger logger = getLogger(__name__) class QLearning: """ Q-Learning用のクラス Attributes ---------- alpha : float 学習率α gamma : float 割引率γ data : dict Q-Learningでの学習結果の保存用辞書 init_value : float dataの初期値 """ def __init__(self, alpha: float, gamma: float, data: dict ...
17.119565
98
0.507937
1,649
0.963764
0
0
0
0
0
0
949
0.554646
4acdb07fa21e6d09ec1006ea9fc4f7c0e59b102d
6,748
py
Python
SearchService/test/unit/test_solr_interface.py
loftwah/appscale
586fc1347ebc743d7a632de698f4dbfb09ae38d6
[ "Apache-2.0" ]
790
2015-01-03T02:13:39.000Z
2020-05-10T19:53:57.000Z
SearchService/test/unit/test_solr_interface.py
loftwah/appscale
586fc1347ebc743d7a632de698f4dbfb09ae38d6
[ "Apache-2.0" ]
1,361
2015-01-08T23:09:40.000Z
2020-04-14T00:03:04.000Z
SearchService/test/unit/test_solr_interface.py
loftwah/appscale
586fc1347ebc743d7a632de698f4dbfb09ae38d6
[ "Apache-2.0" ]
155
2015-01-08T22:59:31.000Z
2020-04-08T08:01:53.000Z
#!/usr/bin/env python import os import json import sys import unittest import urllib2 from flexmock import flexmock sys.path.append(os.path.join(os.path.dirname(__file__), "../../")) import solr_interface import search_exceptions class FakeSolrDoc(): def __init__(self): self.fields = [] class FakeDocument():...
33.405941
80
0.678275
6,499
0.9631
0
0
0
0
0
0
1,303
0.193094
4acdd598615906ddfbcd01ae7441ccbc9e89653b
899
py
Python
payabbhi/error.py
ppm-avinder/payabbhi-python
0f84f01349e365753f4b83eee584618e1a855567
[ "MIT" ]
1
2018-03-06T08:30:38.000Z
2018-03-06T08:30:38.000Z
payabbhi/error.py
ppm-avinder/payabbhi-python
0f84f01349e365753f4b83eee584618e1a855567
[ "MIT" ]
null
null
null
payabbhi/error.py
ppm-avinder/payabbhi-python
0f84f01349e365753f4b83eee584618e1a855567
[ "MIT" ]
5
2018-10-08T05:56:44.000Z
2020-05-22T11:31:07.000Z
class PayabbhiError(Exception): def __init__(self, description=None, http_status=None, field=None): self.description = description self.http_status = http_status self.field = field self._message = self.error_message() super(PayabbhiError, self).__init__(self...
22.475
90
0.669633
880
0.978865
0
0
0
0
0
0
41
0.045606
4ace0f44b44658df4422d4f5661978d41ce06350
1,923
py
Python
src/mpu/__init__.py
TsinghuaAI/CPM-2-Pretrain
33003865239e7ba13a12aabf9ec2735cef66bf3b
[ "MIT" ]
54
2021-06-17T09:05:11.000Z
2022-03-18T09:12:14.000Z
src/mpu/__init__.py
TsinghuaAI/CPM-2-Pretrain
33003865239e7ba13a12aabf9ec2735cef66bf3b
[ "MIT" ]
25
2021-06-29T02:58:28.000Z
2022-03-30T04:45:06.000Z
src/mpu/__init__.py
TsinghuaAI/CPM-2-Pretrain
33003865239e7ba13a12aabf9ec2735cef66bf3b
[ "MIT" ]
11
2021-06-22T08:00:25.000Z
2022-03-04T05:41:50.000Z
# coding=utf-8 # Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
36.980769
74
0.841914
0
0
0
0
0
0
0
0
650
0.338014
4ace72273e1ae90dc1c68aa24e3b23afcdc01695
2,141
py
Python
djangosige/apps/cadastro/models/empresa.py
MateusMolina/lunoERP
0880adb93b3a2d3169c6780efa60a229272f927a
[ "MIT" ]
null
null
null
djangosige/apps/cadastro/models/empresa.py
MateusMolina/lunoERP
0880adb93b3a2d3169c6780efa60a229272f927a
[ "MIT" ]
null
null
null
djangosige/apps/cadastro/models/empresa.py
MateusMolina/lunoERP
0880adb93b3a2d3169c6780efa60a229272f927a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os from django.db import models from django.db.models.signals import post_delete from django.dispatch import receiver from .base import Pessoa from djangosige.apps.login.models import Usuario from djangosige.configs.settings import MEDIA_ROOT def logo_directory_path(inst...
32.439394
105
0.666978
1,350
0.630546
0
0
442
0.206446
0
0
300
0.140121
4acea4b00d95238388dfdf1bfda34fd153268c2f
5,858
py
Python
WDJN/eval/eval.py
silverriver/Stylized_Dialog
559dd97c4ec9c91e94deb048f789684ef3f1f9fa
[ "MIT" ]
21
2020-12-16T08:53:38.000Z
2022-01-21T09:08:55.000Z
WDJN/eval/eval.py
silverriver/Stylized_Dialog
559dd97c4ec9c91e94deb048f789684ef3f1f9fa
[ "MIT" ]
1
2020-12-27T07:56:01.000Z
2020-12-30T05:13:11.000Z
WDJN/eval/eval.py
silverriver/Stylized_Dialog
559dd97c4ec9c91e94deb048f789684ef3f1f9fa
[ "MIT" ]
1
2022-02-28T12:19:19.000Z
2022-02-28T12:19:19.000Z
import os from nltk.translate.bleu_score import corpus_bleu from nltk.translate.bleu_score import SmoothingFunction import json from tqdm import tqdm, trange from random import sample import numpy as np import pickle import argparse import bert_eval_acc import svm_eval_acc smooth = SmoothingFunction() def eval_bleu...
32.726257
118
0.602083
0
0
0
0
0
0
0
0
1,406
0.240014
4acf75fbdd9f5684eaa634c30e9274299d052baa
804
py
Python
homeassistant/components/unifi/const.py
olbjan/home-assistant-1
1adb45f74e96fc5eff137a3727647a7e428e123c
[ "Apache-2.0" ]
7
2019-02-07T14:14:12.000Z
2019-07-28T06:56:10.000Z
homeassistant/components/unifi/const.py
olbjan/home-assistant-1
1adb45f74e96fc5eff137a3727647a7e428e123c
[ "Apache-2.0" ]
6
2021-02-08T20:54:31.000Z
2022-03-12T00:50:43.000Z
homeassistant/components/unifi/const.py
olbjan/home-assistant-1
1adb45f74e96fc5eff137a3727647a7e428e123c
[ "Apache-2.0" ]
1
2020-09-23T16:41:16.000Z
2020-09-23T16:41:16.000Z
"""Constants for the UniFi component.""" import logging LOGGER = logging.getLogger(__package__) DOMAIN = "unifi" CONTROLLER_ID = "{host}-{site}" CONF_CONTROLLER = "controller" CONF_SITE_ID = "site" UNIFI_WIRELESS_CLIENTS = "unifi_wireless_clients" CONF_ALLOW_BANDWIDTH_SENSORS = "allow_bandwidth_sensors" CONF_BLOCK...
25.935484
56
0.823383
0
0
0
0
0
0
0
0
255
0.317164
4acfa6e08c91d6cf965af047f2b0bfd2e83e88a1
503
py
Python
coding_intereview/1656. Design an Ordered Stream.py
Jahidul007/Python-Bootcamp
3c870587465ff66c2c1871c8d3c4eea72463abda
[ "MIT" ]
2
2020-12-07T16:07:07.000Z
2020-12-07T16:08:53.000Z
coding_intereview/1656. Design an Ordered Stream.py
Jahidul007/Python-Bootcamp
3c870587465ff66c2c1871c8d3c4eea72463abda
[ "MIT" ]
null
null
null
coding_intereview/1656. Design an Ordered Stream.py
Jahidul007/Python-Bootcamp
3c870587465ff66c2c1871c8d3c4eea72463abda
[ "MIT" ]
1
2020-10-03T16:38:02.000Z
2020-10-03T16:38:02.000Z
class OrderedStream: def __init__(self, n: int): self.data = [None]*n self.ptr = 0 def insert(self, id: int, value: str) -> List[str]: id -= 1 self.data[id] = value if id > self.ptr: return [] while self.ptr < len(self.data) and self.data[self.ptr]: ...
26.473684
80
0.584493
373
0.741551
0
0
0
0
0
0
124
0.246521
4acfc9cbd59d86d35555e057b3b06babb6b17219
1,091
py
Python
python/test/test_tree_dp.py
EQt/treelas
24a5cebf101180822198806c0a4131b0efb7a36d
[ "MIT" ]
3
2020-06-18T13:31:26.000Z
2021-04-05T17:42:56.000Z
python/test/test_tree_dp.py
EQt/treelas
24a5cebf101180822198806c0a4131b0efb7a36d
[ "MIT" ]
null
null
null
python/test/test_tree_dp.py
EQt/treelas
24a5cebf101180822198806c0a4131b0efb7a36d
[ "MIT" ]
null
null
null
import numpy as np from treelas import post_order, TreeInstance def test_demo_3x7_postord(): parent = np.array([0, 4, 5, 0, 3, 4, 7, 8, 5, 6, 7, 8, 9, 14, 17, 12, 15, 16, 19, 16, 17]) po = post_order(parent, include_root=True) expect = np.array([12, 11, 19, 20, 21, 14, 15, 18, 17, 1...
37.62069
70
0.508708
0
0
0
0
0
0
0
0
114
0.104491
4ad0334044a6b76510a6250d8488d1fea4817857
326
py
Python
lista01/rpc/ex01_cl.py
SD-CC-UFG/leonardo.fleury
0a8dfc5752c739f5ff98890477355df8960ad730
[ "MIT" ]
null
null
null
lista01/rpc/ex01_cl.py
SD-CC-UFG/leonardo.fleury
0a8dfc5752c739f5ff98890477355df8960ad730
[ "MIT" ]
null
null
null
lista01/rpc/ex01_cl.py
SD-CC-UFG/leonardo.fleury
0a8dfc5752c739f5ff98890477355df8960ad730
[ "MIT" ]
null
null
null
import xmlrpc.client def main(): s = xmlrpc.client.ServerProxy('http://localhost:9991') nome = input("Nome: ") cargo = input("Cargo (programador, operador): ") salario = float(input("Salário: ")) print("\n\n{}".format(s.atualiza_salario(nome, cargo, salario))) if __name__ == '__main__': m...
20.375
68
0.628834
0
0
0
0
0
0
0
0
94
0.287462
4ad04912e975ba67417ff28c203441d4697e2178
846
py
Python
autocomplete/migrations/0001_initial.py
openshift-eng/art-dashboard-server
af4e78b3d2213c30038cf69de646f25fd57c9e3c
[ "Apache-2.0" ]
1
2020-09-21T06:48:47.000Z
2020-09-21T06:48:47.000Z
autocomplete/migrations/0001_initial.py
adarshtri/build_interface_server
af4e78b3d2213c30038cf69de646f25fd57c9e3c
[ "Apache-2.0" ]
5
2021-02-05T19:43:08.000Z
2021-06-04T23:23:29.000Z
autocomplete/migrations/0001_initial.py
openshift-eng/art-dashboard-server
af4e78b3d2213c30038cf69de646f25fd57c9e3c
[ "Apache-2.0" ]
6
2021-02-06T07:21:37.000Z
2021-06-07T12:40:37.000Z
# Generated by Django 3.0.7 on 2020-07-27 19:23 import build.models from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='AutoCompleteRecord', fields=[ ...
29.172414
100
0.588652
733
0.86643
0
0
0
0
0
0
167
0.1974
4ad19826ee08450eee4ee8d57542ce3dfd0b5399
636
py
Python
unet3d/config.py
fcollman/pytorch-3dunet
303336bfdc0234f075c70e0c59759d09bc4081b8
[ "MIT" ]
null
null
null
unet3d/config.py
fcollman/pytorch-3dunet
303336bfdc0234f075c70e0c59759d09bc4081b8
[ "MIT" ]
null
null
null
unet3d/config.py
fcollman/pytorch-3dunet
303336bfdc0234f075c70e0c59759d09bc4081b8
[ "MIT" ]
null
null
null
import argparse import os import torch import yaml DEFAULT_DEVICE = 'cuda:0' def load_config(): parser = argparse.ArgumentParser(description='UNet3D training') parser.add_argument('--config', type=str, help='Path to the YAML config file', required=True) args = parser.parse_args() config = _load_conf...
26.5
97
0.720126
0
0
0
0
0
0
0
0
115
0.180818
4ad2b9e71e54721776c8640bd3dfe9980a8f4ea4
654
py
Python
src/graph_transpiler/webdnn/backend/webgl/optimize_rules/simplify_channel_mode_conversion/simplify_channel_mode_conversion.py
gunpowder78/webdnn
c659ea49007f91d178ce422a1eebe289516a71ee
[ "MIT" ]
1
2018-07-26T13:52:21.000Z
2018-07-26T13:52:21.000Z
src/graph_transpiler/webdnn/backend/webgl/optimize_rules/simplify_channel_mode_conversion/simplify_channel_mode_conversion.py
gunpowder78/webdnn
c659ea49007f91d178ce422a1eebe289516a71ee
[ "MIT" ]
null
null
null
src/graph_transpiler/webdnn/backend/webgl/optimize_rules/simplify_channel_mode_conversion/simplify_channel_mode_conversion.py
gunpowder78/webdnn
c659ea49007f91d178ce422a1eebe289516a71ee
[ "MIT" ]
null
null
null
from webdnn.backend.webgl.optimize_rules.simplify_channel_mode_conversion.simplify_nonsense_channel_mode_conversion import \ SimplifyNonsenseChannelModeConversion from webdnn.backend.webgl.optimize_rules.simplify_channel_mode_conversion.simplify_redundant_channel_mode_conversion import \ SimplifyRedundantChanne...
46.714286
125
0.831804
258
0.394495
0
0
0
0
0
0
0
0
4ad2c65a15fe6f6a8837baee7e607c55330b95b9
3,998
py
Python
script.video.F4mProxy/lib/flvlib/constants.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
105
2015-11-28T00:03:11.000Z
2021-05-05T20:47:42.000Z
script.video.F4mProxy/lib/flvlib/constants.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
918
2015-11-28T14:12:40.000Z
2022-03-23T20:24:49.000Z
script.video.F4mProxy/lib/flvlib/constants.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
111
2015-12-01T14:06:10.000Z
2020-08-01T10:44:39.000Z
""" The constants used in FLV files and their meanings. """ # Tag type (TAG_TYPE_AUDIO, TAG_TYPE_VIDEO, TAG_TYPE_SCRIPT) = (8, 9, 18) # Sound format (SOUND_FORMAT_PCM_PLATFORM_ENDIAN, SOUND_FORMAT_ADPCM, SOUND_FORMAT_MP3, SOUND_FORMAT_PCM_LITTLE_ENDIAN, SOUND_FORMAT_NELLYMOSER_16KHZ, SOUND_FORMAT_NELLYMOSER_8KH...
24.679012
68
0.765883
0
0
0
0
0
0
0
0
867
0.216858
4ad2ee44fa3231c3be7b4de5ecea4010665c6467
738
py
Python
A2/semcor_chunk.py
Rogerwlk/Natural-Language-Processing
e1c0499180cec49ac0060aad7f0da00b61cfac94
[ "MIT" ]
null
null
null
A2/semcor_chunk.py
Rogerwlk/Natural-Language-Processing
e1c0499180cec49ac0060aad7f0da00b61cfac94
[ "MIT" ]
null
null
null
A2/semcor_chunk.py
Rogerwlk/Natural-Language-Processing
e1c0499180cec49ac0060aad7f0da00b61cfac94
[ "MIT" ]
null
null
null
from nltk.corpus import semcor class semcor_chunk: def __init__(self, chunk): self.chunk = chunk #returns the synset if applicable, otherwise returns None def get_syn_set(self): try: synset = self.chunk.label().synset() return synset except AttributeError: try: synset = wn.synset(self.chunk.lab...
19.945946
58
0.682927
487
0.659892
0
0
0
0
0
0
304
0.411924
4ad2ef7203bc120919170c5085d9fe1547885b6b
8,318
py
Python
gnn_model.py
thoang3/graph_neural_network_benchmark
72dc031ed23c6684c43d6f2ace03425f9b69cee6
[ "MIT" ]
null
null
null
gnn_model.py
thoang3/graph_neural_network_benchmark
72dc031ed23c6684c43d6f2ace03425f9b69cee6
[ "MIT" ]
null
null
null
gnn_model.py
thoang3/graph_neural_network_benchmark
72dc031ed23c6684c43d6f2ace03425f9b69cee6
[ "MIT" ]
null
null
null
import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers from load_cora import load_cora from baseline_model import create_ffn from utils import run_experiment from utils import display_learning_curves # Graph convolution layer class GraphConvLayer(layers.Layer): def __init__( ...
33.007937
103
0.709425
6,330
0.761
0
0
0
0
0
0
2,256
0.271219
4ad31bb3fb3f281f7ca24b5d13a95985f1d2e610
868
py
Python
deps/lib/python3.5/site-packages/netdisco/discoverables/samsung_tv.py
jfarmer08/hassio
792a6071a97bb33857c14c9937946233c620035c
[ "MIT" ]
78
2017-08-19T03:46:13.000Z
2020-02-19T04:29:45.000Z
deps/lib/python3.5/site-packages/netdisco/discoverables/samsung_tv.py
jfarmer08/hassio
792a6071a97bb33857c14c9937946233c620035c
[ "MIT" ]
5
2017-08-21T16:33:08.000Z
2018-06-21T18:37:18.000Z
deps/lib/python3.5/site-packages/netdisco/discoverables/samsung_tv.py
jfarmer08/hassio
792a6071a97bb33857c14c9937946233c620035c
[ "MIT" ]
13
2017-08-19T16:46:08.000Z
2018-11-05T23:11:34.000Z
"""Discover Samsung Smart TV services.""" from . import SSDPDiscoverable from ..const import ATTR_NAME # For some models, Samsung forces a [TV] prefix to the user-specified name. FORCED_NAME_PREFIX = '[TV]' class Discoverable(SSDPDiscoverable): """Add support for discovering Samsung Smart TV services.""" de...
33.384615
79
0.691244
657
0.756912
0
0
0
0
0
0
390
0.449309
4ad35edb76ff8aacbd63002439bbf9d2f5995fd2
59
py
Python
pyecsca/sca/re/__init__.py
scrambler-crypto/pyecsca
491abfb548455669abd470382a48dcd07b2eda87
[ "MIT" ]
24
2019-07-01T00:27:24.000Z
2022-02-17T00:46:28.000Z
pyecsca/sca/re/__init__.py
scrambler-crypto/pyecsca
491abfb548455669abd470382a48dcd07b2eda87
[ "MIT" ]
18
2020-12-10T15:08:56.000Z
2022-03-01T11:44:37.000Z
pyecsca/sca/re/__init__.py
scrambler-crypto/pyecsca
491abfb548455669abd470382a48dcd07b2eda87
[ "MIT" ]
7
2020-02-20T18:44:29.000Z
2021-11-30T21:16:44.000Z
"""Package for reverse-engineering.""" from .rpa import *
14.75
38
0.694915
0
0
0
0
0
0
0
0
38
0.644068
4ad38b4a5080c2f9ece1062934512164a3b8e38a
324
py
Python
sapmi/employees/migrations/0002_remove_employee_phone_alt.py
Juhanostby/django-apotek-sapmi
972a05ca9d54eed62b640572fcf582cc8751d15a
[ "MIT" ]
1
2021-09-04T17:29:14.000Z
2021-09-04T17:29:14.000Z
sapmi/employees/migrations/0002_remove_employee_phone_alt.py
Juhanostby/django-apotek-sapmi
972a05ca9d54eed62b640572fcf582cc8751d15a
[ "MIT" ]
1
2021-07-19T15:54:27.000Z
2021-07-20T23:01:57.000Z
sapmi/employees/migrations/0002_remove_employee_phone_alt.py
Juhanostby/django-apotek-sapmi
972a05ca9d54eed62b640572fcf582cc8751d15a
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-12-21 19:42 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('employees', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='employee', name='phone_alt', ), ...
18
47
0.58642
239
0.737654
0
0
0
0
0
0
93
0.287037
4ad430bf0f736b3775616810d3e0ff10960723c4
124
py
Python
src/model/exception/emote_fetch_error.py
konrad2508/kokomi-discord-bot
5a9d459e92d552fa24ba3ada5188db19d93f0aaa
[ "MIT" ]
2
2022-03-02T15:56:41.000Z
2022-03-10T16:30:41.000Z
src/model/exception/emote_fetch_error.py
konrad2508/kokomi-discord-bot
5a9d459e92d552fa24ba3ada5188db19d93f0aaa
[ "MIT" ]
2
2022-03-10T16:30:20.000Z
2022-03-16T14:33:59.000Z
src/model/exception/emote_fetch_error.py
konrad2508/kokomi-discord-bot
5a9d459e92d552fa24ba3ada5188db19d93f0aaa
[ "MIT" ]
null
null
null
class EmoteFetchError(Exception): '''Exception stating that there was a problem while fetching emotes from a source.'''
41.333333
89
0.766129
123
0.991935
0
0
0
0
0
0
85
0.685484
4ad45250872794a6a29b08c6da2bcb27a740d5f5
5,098
py
Python
src/sim/basicExample/main.py
andremtsilva/dissertacao
7c039ffe871468be0215c482adb42830fff586aa
[ "MIT" ]
null
null
null
src/sim/basicExample/main.py
andremtsilva/dissertacao
7c039ffe871468be0215c482adb42830fff586aa
[ "MIT" ]
null
null
null
src/sim/basicExample/main.py
andremtsilva/dissertacao
7c039ffe871468be0215c482adb42830fff586aa
[ "MIT" ]
null
null
null
""" This is the most simple scenario with a basic topology, some users and a set of apps with only one service. @author: Isaac Lera """ import os import time import json import random import logging.config import networkx as nx import numpy as np from pathlib import Path from yafs.core import Sim from yafs.a...
27.857923
156
0.652217
0
0
0
0
0
0
0
0
2,097
0.411338
4ad523fc14942dd490ad41c526c6171f60967ac3
476
py
Python
Backend/models/risklayerPrognosis.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
15
2020-04-24T20:18:11.000Z
2022-01-31T21:05:05.000Z
Backend/models/risklayerPrognosis.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
2
2021-05-19T07:15:09.000Z
2022-03-07T08:29:34.000Z
Backend/models/risklayerPrognosis.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
4
2020-04-27T16:20:13.000Z
2021-02-23T10:39:42.000Z
from db import db class RisklayerPrognosis(db.Model): __tablename__ = 'risklayer_prognosis' datenbestand = db.Column(db.TIMESTAMP, primary_key=True, nullable=False) prognosis = db.Column(db.Float, nullable=False) # class RisklayerPrognosisSchema(SQLAlchemyAutoSchema): # class Meta: # strict ...
28
76
0.72479
207
0.434874
0
0
0
0
0
0
261
0.548319
4ad5abaadbbca74176e6ec4d71b60fea9789204e
2,520
py
Python
tests.py
smartfile/django-secureform
3b7a8b90550327f370ea02c6886220b2db0517b5
[ "MIT" ]
12
2015-02-23T19:45:45.000Z
2021-05-05T20:35:26.000Z
tests.py
smartfile/django-secureform
3b7a8b90550327f370ea02c6886220b2db0517b5
[ "MIT" ]
3
2015-08-09T18:14:16.000Z
2018-10-23T03:16:38.000Z
tests.py
smartfile/django-secureform
3b7a8b90550327f370ea02c6886220b2db0517b5
[ "MIT" ]
6
2015-05-09T07:46:00.000Z
2019-11-27T09:54:57.000Z
import os import unittest os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' import django if django.VERSION >= (1, 7): django.setup() from django import forms from django.db import models from django.forms.forms import NON_FIELD_ERRORS from django_secureform.forms import SecureForm def get_form_sname(form, name...
28.965517
94
0.660714
1,675
0.664683
0
0
0
0
0
0
256
0.101587
4ad5badf5fa7e630a25fb87b42b8e063138bfecd
495
py
Python
opencv/resizing.py
hackerman-101/Hacktoberfest-2022
839f28293930987da55f8a2414efaa1cf9676cc9
[ "MIT" ]
1
2022-02-22T17:13:54.000Z
2022-02-22T17:13:54.000Z
opencv/resizing.py
hackerman-101/Hacktoberfest-2022
839f28293930987da55f8a2414efaa1cf9676cc9
[ "MIT" ]
11
2022-01-24T20:42:11.000Z
2022-02-27T23:58:24.000Z
opencv/resizing.py
hackerman-101/Hacktoberfest-2022
839f28293930987da55f8a2414efaa1cf9676cc9
[ "MIT" ]
null
null
null
import cv2 as cv import numpy as np cap = cv.VideoCapture(1) print(cap.get(cv.CAP_PROP_FRAME_WIDTH)) print(cap.get(cv.CAP_PROP_FRAME_HEIGHT)) cap.set(3,3000) cap.set(4,3000) print(cap.get(cv.CAP_PROP_FRAME_WIDTH)) print(cap.get(cv.CAP_PROP_FRAME_HEIGHT)) while (cap.isOpened()): ret , frame = cap.read() if...
18.333333
45
0.656566
0
0
0
0
0
0
0
0
11
0.022222