hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
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
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
51bf6c172ef68bea7970866713cd4c84a6e48a1e
903
py
Python
tests/conftest.py
SimmonsRitchie/topojoin
5c5848ae05a249c38babdc449dbd89df1b644b61
[ "MIT" ]
1
2020-08-04T04:36:05.000Z
2020-08-04T04:36:05.000Z
tests/conftest.py
SimmonsRitchie/topojoin
5c5848ae05a249c38babdc449dbd89df1b644b61
[ "MIT" ]
null
null
null
tests/conftest.py
SimmonsRitchie/topojoin
5c5848ae05a249c38babdc449dbd89df1b644b61
[ "MIT" ]
null
null
null
import pytest from pathlib import Path root = Path(__file__).parent.resolve() @pytest.fixture(scope="session") def csv_path() -> str: """ Returns a path to a CSV file. The file has a column called 'fips' representing unique county IDs. It joins with a column called 'GEOID' in the topojson file at topo_p...
30.1
117
0.707641
import pytest from pathlib import Path root = Path(__file__).parent.resolve() @pytest.fixture(scope="session") def csv_path() -> str: """ Returns a path to a CSV file. The file has a column called 'fips' representing unique county IDs. It joins with a column called 'GEOID' in the topojson file at topo_p...
44
0
22
118a87702ee3127da4c1f6e2158bb95a97d28155
4,605
py
Python
examples/plot_2_mne_feature_distributions.py
ryanhammonds/bycycle
c285c5b1bf5de985cea3f0898bf8e2b01171feca
[ "Apache-2.0" ]
48
2019-03-04T22:37:15.000Z
2022-03-28T16:55:52.000Z
examples/plot_2_mne_feature_distributions.py
ryanhammonds/bycycle
c285c5b1bf5de985cea3f0898bf8e2b01171feca
[ "Apache-2.0" ]
83
2019-02-01T19:09:23.000Z
2022-01-10T20:27:29.000Z
examples/plot_2_mne_feature_distributions.py
ryanhammonds/bycycle
c285c5b1bf5de985cea3f0898bf8e2b01171feca
[ "Apache-2.0" ]
15
2019-06-04T23:22:37.000Z
2021-12-21T07:49:31.000Z
""" 3. MNE Interface Cycle Feature Distributions ============================================ Compute bycycle feature distributions using MNE objects. """ #################################################################################################### # Import Packages and Load Data # ----------------------------...
35.976563
100
0.529859
""" 3. MNE Interface Cycle Feature Distributions ============================================ Compute bycycle feature distributions using MNE objects. """ #################################################################################################### # Import Packages and Load Data # ----------------------------...
0
0
0
1577e6530be911e68c9eb3af07ca1ad157afab06
2,358
py
Python
recipes/Python/101521_Using_translate_wbinary_files__like_finding/recipe-101521.py
tdiprima/code
61a74f5f93da087d27c70b2efe779ac6bd2a3b4f
[ "MIT" ]
2,023
2017-07-29T09:34:46.000Z
2022-03-24T08:00:45.000Z
recipes/Python/101521_Using_translate_wbinary_files__like_finding/recipe-101521.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
32
2017-09-02T17:20:08.000Z
2022-02-11T17:49:37.000Z
recipes/Python/101521_Using_translate_wbinary_files__like_finding/recipe-101521.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
780
2017-07-28T19:23:28.000Z
2022-03-25T20:39:41.000Z
import string #Translate in python has 2 pieces, a translation table and the translate call. #The translation table is a list of 256 characters. Changing the order of the #characters is used for mapping norm = string.maketrans('', '') #builds list of all characters print len(norm) #256 characters print string.maketr...
36.84375
109
0.736217
import string #Translate in python has 2 pieces, a translation table and the translate call. #The translation table is a list of 256 characters. Changing the order of the #characters is used for mapping norm = string.maketrans('', '') #builds list of all characters print len(norm) #256 characters print string.maketr...
0
0
0
fe18c96add59a11529a5587939eebb7d941428ad
131
py
Python
manti_by/apps/gallery/urls.py
manti-by/m2
ee2d2bad412c265962675c94dbfd29cdec07910c
[ "BSD-3-Clause" ]
2
2017-09-07T09:28:29.000Z
2018-04-10T03:03:32.000Z
manti_by/apps/gallery/urls.py
manti-by/m2
ee2d2bad412c265962675c94dbfd29cdec07910c
[ "BSD-3-Clause" ]
11
2021-03-23T13:59:39.000Z
2022-02-02T10:16:58.000Z
manti_by/apps/gallery/urls.py
manti-by/Manti.by
ee2d2bad412c265962675c94dbfd29cdec07910c
[ "BSD-3-Clause" ]
null
null
null
from django.urls import path from manti_by.apps.gallery import views urlpatterns = [path("", views.index, name="gallery_list")]
18.714286
58
0.755725
from django.urls import path from manti_by.apps.gallery import views urlpatterns = [path("", views.index, name="gallery_list")]
0
0
0
91b3caaa30001b46485a1441a222116f60bbc77c
4,615
py
Python
hydra/core/config_store.py
mshvartsman/hydra
65057c36c05187fdadd07db4f4b4e086a22fc030
[ "MIT" ]
1
2020-07-13T09:06:16.000Z
2020-07-13T09:06:16.000Z
hydra/core/config_store.py
mshvartsman/hydra
65057c36c05187fdadd07db4f4b4e086a22fc030
[ "MIT" ]
6
2021-03-01T21:23:23.000Z
2022-02-27T09:15:03.000Z
hydra/core/config_store.py
mshvartsman/hydra
65057c36c05187fdadd07db4f4b4e086a22fc030
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy from dataclasses import dataclass from typing import Any, Dict, List, Optional from omegaconf import DictConfig, OmegaConf from hydra.core.object_type import ObjectType from hydra.core.singleton import Singleton from hydra.plugins.conf...
30.163399
86
0.573781
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy from dataclasses import dataclass from typing import Any, Dict, List, Optional from omegaconf import DictConfig, OmegaConf from hydra.core.object_type import ObjectType from hydra.core.singleton import Singleton from hydra.plugins.conf...
2,489
1,583
175
d3ef1724b8bc12f6a1aa9f8f8073ede202d7c53c
3,452
py
Python
airflow/providers/google/cloud/sensors/looker.py
JGoldman110/airflow
93e2c945b1be5b7c9700e780d2aa67846503763b
[ "Apache-2.0" ]
1
2022-03-25T23:49:03.000Z
2022-03-25T23:49:03.000Z
airflow/providers/google/cloud/sensors/looker.py
JGoldman110/airflow
93e2c945b1be5b7c9700e780d2aa67846503763b
[ "Apache-2.0" ]
2
2019-02-16T19:00:53.000Z
2019-05-09T23:29:14.000Z
airflow/providers/google/cloud/sensors/looker.py
samhita-alla/airflow
5b8c3819900793f6530a7313a05a181edf86f224
[ "Apache-2.0" ]
1
2022-03-03T18:47:49.000Z
2022-03-03T18:47:49.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
40.611765
110
0.704519
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
1,744
0
81
68b5756d00b8538620dba0ede613869bdfbb77a0
23,457
py
Python
tests/bindings/python/test_annotator.py
awickens/libcellml
1fe0aecc9651285dfa6b9d43c0b45edf1378edf5
[ "Apache-2.0" ]
1
2020-11-16T05:43:00.000Z
2020-11-16T05:43:00.000Z
tests/bindings/python/test_annotator.py
awickens/libcellml
1fe0aecc9651285dfa6b9d43c0b45edf1378edf5
[ "Apache-2.0" ]
16
2019-11-29T11:36:30.000Z
2021-03-08T23:59:14.000Z
tests/bindings/python/test_annotator.py
kerimoyle/libcellml
63b677e4b22c28a7dcb69513df1495f0f8eccefa
[ "Apache-2.0" ]
null
null
null
# # Tests the Component class bindings # import unittest from test_resources import file_contents if __name__ == '__main__': unittest.main()
43.278598
119
0.629236
# # Tests the Component class bindings # import unittest from test_resources import file_contents class AnnotatorTestCase(unittest.TestCase): def test_create_destroy(self): from libcellml import Annotator x = Annotator() self.assertIsNotNone(x) del x def test_item(self): ...
22,858
22
428
56e9acadfe961a3967a4d97ab8d11fe03412f68a
2,220
py
Python
neurotin/psd/ratio.py
mscheltienne/neurotin-analysis
841b7d86c0c990169cceb02b40d9eb6bd0d07612
[ "MIT" ]
null
null
null
neurotin/psd/ratio.py
mscheltienne/neurotin-analysis
841b7d86c0c990169cceb02b40d9eb6bd0d07612
[ "MIT" ]
null
null
null
neurotin/psd/ratio.py
mscheltienne/neurotin-analysis
841b7d86c0c990169cceb02b40d9eb6bd0d07612
[ "MIT" ]
null
null
null
import pandas as pd from ..utils._docs import fill_doc from .average import add_average_column @fill_doc def ratio(df_alpha, df_delta): """Compute the ratio of alpha/delta band power. Parameters ---------- %(df_psd)s Contains alpha-band PSD. %(df_psd)s Contains delta-band PSD. ...
31.267606
69
0.593694
import pandas as pd from ..utils._docs import fill_doc from .average import add_average_column @fill_doc def ratio(df_alpha, df_delta): """Compute the ratio of alpha/delta band power. Parameters ---------- %(df_psd)s Contains alpha-band PSD. %(df_psd)s Contains delta-band PSD. ...
0
0
0
5fd260181261f402ed2fa28662e4a4e336f57098
2,751
py
Python
tests/test_variable.py
ctgk/pygrad
8d7bdedf92481c62a692c9fd2edca6616cf1ecae
[ "MIT" ]
4
2020-10-17T19:09:29.000Z
2022-02-20T05:38:49.000Z
tests/test_variable.py
ctgk/pygrad
8d7bdedf92481c62a692c9fd2edca6616cf1ecae
[ "MIT" ]
null
null
null
tests/test_variable.py
ctgk/pygrad
8d7bdedf92481c62a692c9fd2edca6616cf1ecae
[ "MIT" ]
null
null
null
import numpy as np import pytest import numgrad as ng @pytest.mark.parametrize('function, expect', [ (lambda: np.asarray(ng.Variable([0, 1])), np.array([0., 1.])), (lambda: 0. in ng.Variable(0.), TypeError), (lambda: 0. in ng.Variable([0.]), True), (lambda: 1. in ng.Variable([[0., 1.], [2., 3.]...
29.902174
79
0.592148
import numpy as np import pytest import numgrad as ng def test_init_error(): with pytest.raises(ValueError): ng.Variable(1, dtype=int) def test_init(): ng.Variable([1, 2]) def test_init_pass_dtype(): assert ng.Variable(1, np.float32).dtype == np.float32 def test_default_dtype(): assert ...
1,026
0
182
68d5e93d27f4249eff91d5f5e7f3be29efc707ac
489
py
Python
examples/OpenCV/client_cv.py
BassmanBiff/NumpySocket
67eb3a1bd7aaae4a08d17e8b76a7cb2f2e7bf2c9
[ "MIT" ]
null
null
null
examples/OpenCV/client_cv.py
BassmanBiff/NumpySocket
67eb3a1bd7aaae4a08d17e8b76a7cb2f2e7bf2c9
[ "MIT" ]
null
null
null
examples/OpenCV/client_cv.py
BassmanBiff/NumpySocket
67eb3a1bd7aaae4a08d17e8b76a7cb2f2e7bf2c9
[ "MIT" ]
1
2019-08-28T13:55:33.000Z
2019-08-28T13:55:33.000Z
# From https://stackoverflow.com/questions/30988033/ # sending-live-video-frame-over-network-in-python-opencv from numpysocket import NumpySocket import cv2 npSocket = NumpySocket() npSocket.startClient(9999) # Read until video is completed while True: # Capture frame-by-frame frame = npSocket.recieveNu...
22.227273
61
0.707566
# From https://stackoverflow.com/questions/30988033/ # sending-live-video-frame-over-network-in-python-opencv from numpysocket import NumpySocket import cv2 npSocket = NumpySocket() npSocket.startClient(9999) # Read until video is completed while True: # Capture frame-by-frame frame = npSocket.recieveNu...
0
0
0
85fc2248d4d3ed6a0a85011b45f719c4363bb0ff
2,768
py
Python
cliAssistant.py
dailyideas/naming-media-files-by-datetime
b678387887c4d801269c9c9302183472425ce39b
[ "MIT" ]
null
null
null
cliAssistant.py
dailyideas/naming-media-files-by-datetime
b678387887c4d801269c9c9302183472425ce39b
[ "MIT" ]
null
null
null
cliAssistant.py
dailyideas/naming-media-files-by-datetime
b678387887c4d801269c9c9302183472425ce39b
[ "MIT" ]
null
null
null
import datetime, os, sys import subprocess #### #### #### #### #### #### Functions #### #### #### #### #### #### #### #### #### #### #### #### Main #### #### #### #### #### #### try: ## Variables initialization targetDirectory = GetTargetDirectory() alternativeDate = GetAlternativeDate() ...
34.6
154
0.634393
import datetime, os, sys import subprocess #### #### #### #### #### #### Functions #### #### #### #### #### #### def ExitHandler() -> None: print("Bye") input("Press any key to continue ...") sys.exit() ## NOTE: try-except will catch sys.exit() as it raises SystemExit def CheckAndRaiseExiting(userInp...
1,929
0
137
54e5a8165da0d8dfbe5e8c477e69f5e99c3172a7
871
py
Python
opentsdb/tests/conftest.py
razvandimescu/opentsdb-py
61c15302468769121f94323493e88cb51efcea15
[ "MIT" ]
48
2016-12-27T10:11:41.000Z
2021-11-15T16:05:24.000Z
opentsdb/tests/conftest.py
razvandimescu/opentsdb-py
61c15302468769121f94323493e88cb51efcea15
[ "MIT" ]
8
2017-10-08T16:20:30.000Z
2022-02-23T08:36:52.000Z
opentsdb/tests/conftest.py
razvandimescu/opentsdb-py
61c15302468769121f94323493e88cb51efcea15
[ "MIT" ]
17
2017-10-01T01:14:55.000Z
2021-11-15T16:05:24.000Z
from os import environ import pytest from opentsdb import TSDBClient, TSDBConnectProtocols, Counter @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture
21.775
96
0.774971
from os import environ import pytest from opentsdb import TSDBClient, TSDBConnectProtocols, Counter @pytest.fixture def tsdb_host(): return environ.get('OPEN_TSDB_HOST', '127.0.0.1') @pytest.fixture def tsdb_port(): return int(environ.get('OPEN_TSDB_PORT', '4242')) @pytest.fixture def http_client(tsdb_h...
442
63
155
0cb89ef3105a3391063eea1ce036c19f90092b77
145
py
Python
bitcoinExchange/exchange/apps.py
pogginicolo98/start2impact_exchange
559c42cdeb2dec890d4b1145ed66a1a2f7c362cb
[ "MIT" ]
1
2021-09-08T16:39:07.000Z
2021-09-08T16:39:07.000Z
bitcoinExchange/exchange/apps.py
pogginicolo98/start2impact_exchange
559c42cdeb2dec890d4b1145ed66a1a2f7c362cb
[ "MIT" ]
null
null
null
bitcoinExchange/exchange/apps.py
pogginicolo98/start2impact_exchange
559c42cdeb2dec890d4b1145ed66a1a2f7c362cb
[ "MIT" ]
null
null
null
from django.apps import AppConfig
16.111111
33
0.703448
from django.apps import AppConfig class ExchangeConfig(AppConfig): name = 'exchange' def ready(self): import exchange.signals
27
60
23
a6c8600552c317e6e49247d8616f175a7c726357
1,804
py
Python
cuhk01/imgdump.py
hashknot/person-reid
64a8c441388ea53555669986338af0b40bd854de
[ "MIT" ]
null
null
null
cuhk01/imgdump.py
hashknot/person-reid
64a8c441388ea53555669986338af0b40bd854de
[ "MIT" ]
null
null
null
cuhk01/imgdump.py
hashknot/person-reid
64a8c441388ea53555669986338af0b40bd854de
[ "MIT" ]
null
null
null
#!/usr/bin/env python2.7 import numpy as np import os import random import sys from scipy.ndimage import imread dataset = sys.argv[1] outputdir = sys.argv[2] if len(sys.argv) == 3 else 'data' minibatches = 10 minibatch_size = 500 split_channels = lambda x: np.array((x[:,:,0], x[:,:,1], x[:,:,2])) images = os.listd...
27.333333
75
0.681264
#!/usr/bin/env python2.7 import numpy as np import os import random import sys from scipy.ndimage import imread dataset = sys.argv[1] outputdir = sys.argv[2] if len(sys.argv) == 3 else 'data' minibatches = 10 minibatch_size = 500 split_channels = lambda x: np.array((x[:,:,0], x[:,:,1], x[:,:,2])) images = os.listd...
0
0
0
e17f1b01d929a76c04c55e4b7778db57f587b103
1,428
py
Python
log_request_id/session.py
adaniels21487/django-log-request-id
54d1afc17ac292c6243dc05d11968fef3997e767
[ "BSD-2-Clause" ]
254
2015-01-16T05:47:19.000Z
2022-03-27T22:42:24.000Z
log_request_id/session.py
adaniels21487/django-log-request-id
54d1afc17ac292c6243dc05d11968fef3997e767
[ "BSD-2-Clause" ]
49
2015-01-08T08:46:27.000Z
2022-03-10T10:20:13.000Z
log_request_id/session.py
adaniels21487/django-log-request-id
54d1afc17ac292c6243dc05d11968fef3997e767
[ "BSD-2-Clause" ]
69
2015-01-07T15:10:31.000Z
2022-03-21T07:54:20.000Z
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from requests import Session as BaseSession from log_request_id import DEFAULT_NO_REQUEST_ID, OUTGOING_REQUEST_ID_HEADER_SETTING, REQUEST_ID_HEADER_SETTING, local
44.625
118
0.641457
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from requests import Session as BaseSession from log_request_id import DEFAULT_NO_REQUEST_ID, OUTGOING_REQUEST_ID_HEADER_SETTING, REQUEST_ID_HEADER_SETTING, local class Session(BaseSession): def __init__(self, *args, **kwarg...
729
422
23
e544c1c41f6b5815b1af020f16d4d26968390842
6,956
py
Python
mopidy_rehabradio/playback.py
rehabradio/mopidy-rehabradio
ac1b405768bd916994f97f2bb0185e8c02ccec0f
[ "Apache-2.0" ]
null
null
null
mopidy_rehabradio/playback.py
rehabradio/mopidy-rehabradio
ac1b405768bd916994f97f2bb0185e8c02ccec0f
[ "Apache-2.0" ]
null
null
null
mopidy_rehabradio/playback.py
rehabradio/mopidy-rehabradio
ac1b405768bd916994f97f2bb0185e8c02ccec0f
[ "Apache-2.0" ]
null
null
null
# future imports from __future__ import unicode_literals # stdlib imports import logging import time import threading # third-party imports import pykka from mopidy.core import CoreListener logger = logging.getLogger(__name__) class WebhookPlayback(pykka.ThreadingActor, CoreListener): """Control the tracklist...
34.954774
85
0.576768
# future imports from __future__ import unicode_literals # stdlib imports import logging import time import threading # third-party imports import pykka from mopidy.core import CoreListener logger = logging.getLogger(__name__) class WebhookPlayback(pykka.ThreadingActor, CoreListener): """Control the tracklist...
1,605
0
108
5441bba384db1d128e7c42810c49df716c0a04a0
158
py
Python
bling-dump.py
Webstume/scantoken
a85f2ada3d7f3237ab55f29079d04e5a8bf6bbd7
[ "Apache-2.0" ]
null
null
null
bling-dump.py
Webstume/scantoken
a85f2ada3d7f3237ab55f29079d04e5a8bf6bbd7
[ "Apache-2.0" ]
null
null
null
bling-dump.py
Webstume/scantoken
a85f2ada3d7f3237ab55f29079d04e5a8bf6bbd7
[ "Apache-2.0" ]
1
2020-10-28T20:42:18.000Z
2020-10-28T20:42:18.000Z
from lxml import html import requests import sqlite3 c = sqlite3.connect('bling.db') oldscore={} for row in c.execute('SELECT * FROM users'): print(row)
14.363636
44
0.721519
from lxml import html import requests import sqlite3 c = sqlite3.connect('bling.db') oldscore={} for row in c.execute('SELECT * FROM users'): print(row)
0
0
0
d898719794542f33de1c997341b8110887ee93f7
8,084
py
Python
vgn/functions.py
becheran/vgn
908159ff05ba3e3c53d154685164a5de5b2b94a4
[ "MIT" ]
5
2020-03-06T20:52:23.000Z
2022-01-09T21:37:00.000Z
vgn/functions.py
becheran/vgn
908159ff05ba3e3c53d154685164a5de5b2b94a4
[ "MIT" ]
null
null
null
vgn/functions.py
becheran/vgn
908159ff05ba3e3c53d154685164a5de5b2b94a4
[ "MIT" ]
null
null
null
from vgn.exceptions import VgnGetError from vgn.data_classes import * import vgn.converter as conv import datetime import asyncio import aiohttp if __name__ == '__main__': asyncio.run(main())
41.670103
120
0.599332
from vgn.exceptions import VgnGetError from vgn.data_classes import * import vgn.converter as conv import datetime import asyncio import aiohttp class VGNClient: async def __aenter__(self): self._client_session = aiohttp.ClientSession() return self async def __aexit__(self, *args, **kwargs): ...
1,081
6,757
46
9943bc8976a4b591060e0a0646265c5cdbf12a4e
88
py
Python
src/dcat_ap_no_validator_service/service/__init__.py
Informasjonsforvaltning/dcat-ap-no-validator-service
45c1f762429427591840a15ece4b70617d2f3c8a
[ "Apache-2.0" ]
1
2021-02-08T09:36:08.000Z
2021-02-08T09:36:08.000Z
src/dcat_ap_no_validator_service/service/__init__.py
Informasjonsforvaltning/dcat-ap-no-validator-service
45c1f762429427591840a15ece4b70617d2f3c8a
[ "Apache-2.0" ]
63
2020-11-12T13:54:40.000Z
2022-03-14T12:04:31.000Z
src/dcat_ap_no_validator_service/service/__init__.py
Informasjonsforvaltning/dcat-ap-no-validator-service
45c1f762429427591840a15ece4b70617d2f3c8a
[ "Apache-2.0" ]
null
null
null
"""Package for all services.""" from .validator_service import Config, ValidatorService
29.333333
55
0.795455
"""Package for all services.""" from .validator_service import Config, ValidatorService
0
0
0
2c22cabaf6d13aa9ba7757a44da8dd804f3e8ff6
1,614
py
Python
rls/utils/sundry_utils.py
StepNeverStop/RLs
25cc97c96cbb19fe859c9387b7547cbada2c89f2
[ "Apache-2.0" ]
371
2019-04-26T00:37:33.000Z
2022-03-31T07:33:12.000Z
rls/utils/sundry_utils.py
BlueFisher/RLs
25cc97c96cbb19fe859c9387b7547cbada2c89f2
[ "Apache-2.0" ]
47
2019-07-21T11:51:57.000Z
2021-08-31T08:45:22.000Z
rls/utils/sundry_utils.py
BlueFisher/RLs
25cc97c96cbb19fe859c9387b7547cbada2c89f2
[ "Apache-2.0" ]
102
2019-06-29T13:11:15.000Z
2022-03-28T13:51:04.000Z
#!/usr/bin/env python3 # encoding: utf-8 import os import random from typing import NoReturn import numpy as np import torch as th from rls.utils.display import colorize from rls.utils.logging_utils import get_logger logger = get_logger(__name__) def check_or_create(dicpath: str, name: str = '') -> NoReturn: ...
23.391304
80
0.600372
#!/usr/bin/env python3 # encoding: utf-8 import os import random from typing import NoReturn import numpy as np import torch as th from rls.utils.display import colorize from rls.utils.logging_utils import get_logger logger = get_logger(__name__) def check_or_create(dicpath: str, name: str = '') -> NoReturn: ...
171
496
46
9be4a1d169d9ecdf8d1741de65b4d8927bfa3dd7
5,685
py
Python
mmdet/models/detectors/seq_ssd_dnt.py
ktw361/mmdetection_impl
d09f5320290699cdae0817c9f6a52e8e07c1e098
[ "Apache-2.0" ]
2
2021-05-09T15:49:35.000Z
2021-05-22T02:16:14.000Z
mmdet/models/detectors/seq_ssd_dnt.py
ktw361/mmdetection_impl
d09f5320290699cdae0817c9f6a52e8e07c1e098
[ "Apache-2.0" ]
null
null
null
mmdet/models/detectors/seq_ssd_dnt.py
ktw361/mmdetection_impl
d09f5320290699cdae0817c9f6a52e8e07c1e098
[ "Apache-2.0" ]
1
2021-05-09T15:49:43.000Z
2021-05-09T15:49:43.000Z
import torch.nn as nn from mmdet.core import bbox2result from .. import builder from ..registry import DETECTORS from .seq_base import SeqBaseDetector @DETECTORS.register_module
37.156863
85
0.581003
import torch.nn as nn from mmdet.core import bbox2result from .. import builder from ..registry import DETECTORS from .seq_base import SeqBaseDetector @DETECTORS.register_module class SeqSSDDnT(SeqBaseDetector): def __init__(self, backbone, neck=None, bbox_head=N...
5,256
12
238
48a811bb993c0019431ed5bb84886410d9075233
831
py
Python
logparser.py
ncos/gitparser
27f814f8bb8ddfdde174ff1277c38f1cad56b12f
[ "MIT" ]
null
null
null
logparser.py
ncos/gitparser
27f814f8bb8ddfdde174ff1277c38f1cad56b12f
[ "MIT" ]
null
null
null
logparser.py
ncos/gitparser
27f814f8bb8ddfdde174ff1277c38f1cad56b12f
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import operator labels = {} f = open('log.txt', 'r') for line in f.readlines(): s = line.strip().split('| ') name = s[0].split(' ')[0].strip() if len(s) != 2: safe_add(name, 'other') continue lbls = s[1].strip().split(';') for lab...
18.466667
93
0.535499
#!/usr/bin/python # -*- coding: utf-8 -*- import operator labels = {} def safe_add(user, label): if label not in labels.keys(): labels[label] = {} if user not in labels[label].keys(): labels[label][user] = 1 return labels[label][user] += 1 f = open('log.txt', 'r') for lin...
186
0
23
c938ec918fe4df83bcdb7352aaff7d9528da5f95
1,192
py
Python
cpo/lib/fyre/data/quick_burn_max_hours_data.py
IBM/cloud-pak-operations-cli
45ddcefb4302801c9a833d1359ea4d740c384556
[ "Apache-2.0" ]
7
2021-12-07T09:16:24.000Z
2022-03-08T12:38:54.000Z
cpo/lib/fyre/data/quick_burn_max_hours_data.py
IBM/cloud-pak-operations-cli
45ddcefb4302801c9a833d1359ea4d740c384556
[ "Apache-2.0" ]
3
2021-11-26T09:43:03.000Z
2021-12-14T08:04:53.000Z
cpo/lib/fyre/data/quick_burn_max_hours_data.py
IBM/cloud-pak-operations-cli
45ddcefb4302801c9a833d1359ea4d740c384556
[ "Apache-2.0" ]
1
2022-03-10T07:14:49.000Z
2022-03-10T07:14:49.000Z
# Copyright 2021, 2022 IBM Corporation # # 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 ...
38.451613
104
0.766779
# Copyright 2021, 2022 IBM Corporation # # 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 ...
395
7
76
e1ef5151fe0aa8273bff8cce8b0bea40347a50f6
4,243
py
Python
data/goslar/myinv.py
LIAG-S2/SAEM
17af3a5015f37adb50f8b47086214aed90d1c4e5
[ "Apache-2.0" ]
null
null
null
data/goslar/myinv.py
LIAG-S2/SAEM
17af3a5015f37adb50f8b47086214aed90d1c4e5
[ "Apache-2.0" ]
null
null
null
data/goslar/myinv.py
LIAG-S2/SAEM
17af3a5015f37adb50f8b47086214aed90d1c4e5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Nov 7 12:21:17 2017 @author: Rochlitz.R """ import matplotlib.pyplot as plt import numpy as np import pygimli as pg from custEM.meshgen.invmesh_tools import PrismWorld from custEM.meshgen import meshgen_utils as mu from custEM.inv.inv_utils import MultiFWD xt, zt = np.load...
31.198529
78
0.602168
# -*- coding: utf-8 -*- """ Created on Tue Nov 7 12:21:17 2017 @author: Rochlitz.R """ import matplotlib.pyplot as plt import numpy as np import pygimli as pg from custEM.meshgen.invmesh_tools import PrismWorld from custEM.meshgen import meshgen_utils as mu from custEM.inv.inv_utils import MultiFWD xt, zt = np.load...
33
0
23
2ded969c18fb89b666664bb84245401e24294dd0
6,837
py
Python
agent/tests/workload_managers/slurm/test_slurmctld_prolog.py
omnivector-solutions/license-manager
9eb1e4569d692aef83a2388096e7413bc010be61
[ "MIT" ]
2
2020-11-15T22:54:39.000Z
2022-02-15T07:58:55.000Z
agent/tests/workload_managers/slurm/test_slurmctld_prolog.py
omnivector-solutions/license-manager
9eb1e4569d692aef83a2388096e7413bc010be61
[ "MIT" ]
2
2022-02-18T19:36:45.000Z
2022-03-16T23:07:44.000Z
agent/tests/workload_managers/slurm/test_slurmctld_prolog.py
omnivector-solutions/license-manager
9eb1e4569d692aef83a2388096e7413bc010be61
[ "MIT" ]
null
null
null
""" Test Prolog script. """ from unittest import mock import pytest from lm_agent.workload_managers.slurm.slurmctld_prolog import prolog as main @pytest.mark.asyncio @mock.patch("lm_agent.workload_managers.slurm.slurmctld_prolog.sys") @mock.patch("lm_agent.workload_managers.slurm.slurmctld_prolog.get_job_context") ...
37.157609
94
0.774609
""" Test Prolog script. """ from unittest import mock import pytest from lm_agent.workload_managers.slurm.slurmctld_prolog import prolog as main @pytest.mark.asyncio @mock.patch("lm_agent.workload_managers.slurm.slurmctld_prolog.sys") @mock.patch("lm_agent.workload_managers.slurm.slurmctld_prolog.get_job_context") ...
4,470
0
110
11a6fdbc062928222df6546d356adc6bc8f20004
1,231
py
Python
blogapp/contexts.py
Vaiterius/Miniblog-App
09ef0c93399454da04a55117f6b38f62ea65acb8
[ "MIT" ]
null
null
null
blogapp/contexts.py
Vaiterius/Miniblog-App
09ef0c93399454da04a55117f6b38f62ea65acb8
[ "MIT" ]
null
null
null
blogapp/contexts.py
Vaiterius/Miniblog-App
09ef0c93399454da04a55117f6b38f62ea65acb8
[ "MIT" ]
null
null
null
"""Context processors and other useful functions""" from re import template from flask import Blueprint, current_app as app from datetime import datetime from blogapp import fc contexts_bp = Blueprint("contexts_bp", __name__) @contexts_bp.app_context_processor def datetime_processor(): """Inject current date/t...
30.775
77
0.708367
"""Context processors and other useful functions""" from re import template from flask import Blueprint, current_app as app from datetime import datetime from blogapp import fc contexts_bp = Blueprint("contexts_bp", __name__) @contexts_bp.app_context_processor def datetime_processor(): """Inject current date/t...
118
0
26
9981d08b07ef247bb97b93765a73202f94d5ed49
311
py
Python
setup.py
ozars/pip-subdir-example
00e36374d4efc6cda582979a27afa269e374e038
[ "CC0-1.0" ]
null
null
null
setup.py
ozars/pip-subdir-example
00e36374d4efc6cda582979a27afa269e374e038
[ "CC0-1.0" ]
null
null
null
setup.py
ozars/pip-subdir-example
00e36374d4efc6cda582979a27afa269e374e038
[ "CC0-1.0" ]
null
null
null
from setuptools import setup from pathlib import Path subpackage_path = (Path(__file__).parent / "deps" / "subpackage").resolve() setup( name="mainpackage", version="0.1", packages="mainpackage", install_requires=[ f"subpackage @ git+file://{subpackage_path}#subpackage-0.1", ], )
22.214286
75
0.672026
from setuptools import setup from pathlib import Path subpackage_path = (Path(__file__).parent / "deps" / "subpackage").resolve() setup( name="mainpackage", version="0.1", packages="mainpackage", install_requires=[ f"subpackage @ git+file://{subpackage_path}#subpackage-0.1", ], )
0
0
0
90d681cae5c2dce94c7ea35d9f3d524b06814158
24,958
py
Python
src/config/device-manager/device_manager/device_manager.py
codilime/contrail-controller-arch
e87a974950fc1bbdc2b834212dbdfee5e94008de
[ "Apache-2.0" ]
null
null
null
src/config/device-manager/device_manager/device_manager.py
codilime/contrail-controller-arch
e87a974950fc1bbdc2b834212dbdfee5e94008de
[ "Apache-2.0" ]
null
null
null
src/config/device-manager/device_manager/device_manager.py
codilime/contrail-controller-arch
e87a974950fc1bbdc2b834212dbdfee5e94008de
[ "Apache-2.0" ]
1
2020-07-04T12:08:02.000Z
2020-07-04T12:08:02.000Z
# # Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. # """ This file contains implementation of managing physical router configuration """ # Import kazoo.client before monkey patching from cfgm_common.zkclient import ZookeeperClient from gevent import monkey monkey.patch_all() from cfgm_common.vnc_kombu...
41.252893
92
0.577049
# # Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. # """ This file contains implementation of managing physical router configuration """ # Import kazoo.client before monkey patching from cfgm_common.zkclient import ZookeeperClient from gevent import monkey monkey.patch_all() from cfgm_common.vnc_kombu...
11,439
3,556
92
4ed26aa71fa95806a78963b45e018b32b1b16344
2,599
py
Python
contrib/python-sdk/test/test_job.py
hongpu-corp/pai
23b812b1bae7bc9c9a14b88393411144dde8293e
[ "MIT" ]
2
2020-08-27T05:21:14.000Z
2020-09-29T14:34:09.000Z
contrib/python-sdk/test/test_job.py
hongpu-corp/pai
23b812b1bae7bc9c9a14b88393411144dde8293e
[ "MIT" ]
178
2020-12-10T19:40:01.000Z
2022-02-27T09:53:15.000Z
contrib/python-sdk/test/test_job.py
hongpu-corp/pai
23b812b1bae7bc9c9a14b88393411144dde8293e
[ "MIT" ]
1
2020-11-17T08:19:48.000Z
2020-11-17T08:19:48.000Z
# Copyright (c) Microsoft Corporation # All rights reserved. # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the Software without restriction, including without limitation # the rights to ...
49.980769
128
0.711043
# Copyright (c) Microsoft Corporation # All rights reserved. # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the Software without restriction, including without limitation # the rights to ...
1,288
22
77
38731772eeac59e3d9a1d21beb19182530f71cbe
4,912
py
Python
runtool/tests/test_job_dispatching/test_job_dispatcher.py
Schmedu/gluon-ts-tools
bf05de991a23c740d61679dfa50a078c88518e14
[ "Apache-2.0" ]
1
2021-03-31T11:49:25.000Z
2021-03-31T11:49:25.000Z
runtool/tests/test_job_dispatching/test_job_dispatcher.py
Schmedu/gluon-ts-tools
bf05de991a23c740d61679dfa50a078c88518e14
[ "Apache-2.0" ]
1
2021-04-01T12:28:02.000Z
2021-04-01T12:28:02.000Z
runtool/tests/test_job_dispatching/test_job_dispatcher.py
Schmedu/gluon-ts-tools
bf05de991a23c740d61679dfa50a078c88518e14
[ "Apache-2.0" ]
2
2021-04-29T17:49:48.000Z
2022-01-31T09:39:46.000Z
# Copyright 2021 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
32.966443
115
0.674878
# Copyright 2021 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
2,110
0
162
ad4b427cd9126b20fc2c02a86d6159a529a5e8ee
3,148
py
Python
examples/full_binary_tree.py
ccoakley/dbcbet
0110f7f02c9cec21d550ac59750bf6db9ee8e095
[ "MIT" ]
2
2020-04-22T20:19:56.000Z
2020-11-10T16:40:10.000Z
examples/full_binary_tree.py
ccoakley/dbcbet
0110f7f02c9cec21d550ac59750bf6db9ee8e095
[ "MIT" ]
null
null
null
examples/full_binary_tree.py
ccoakley/dbcbet
0110f7f02c9cec21d550ac59750bf6db9ee8e095
[ "MIT" ]
null
null
null
"""A full binary tree example""" from dbcbet.dbcbet import pre, post, inv, bet, finitize, finitize_method from dbcbet.helpers import state, argument_types @inv(full_tree_invariant) if __name__ == "__main__": bet(FullBinaryTree).run()
31.79798
92
0.640407
"""A full binary tree example""" from dbcbet.dbcbet import pre, post, inv, bet, finitize, finitize_method from dbcbet.helpers import state, argument_types def full_tree_invariant(self): return self._leaf() or self._full() def is_full(self): return self._full() def is_leaf(self): return self._leaf() @in...
1,967
844
91
9330e26c51ef23651b439dc4c82f55ebd5f26cc1
1,807
py
Python
utils/train_test_split.py
abhatta1234/face_analysis_pytorch
2abe930c0ca02a1fd819d4710fd9bff392f32f58
[ "MIT" ]
27
2020-05-19T16:51:42.000Z
2022-02-28T05:00:16.000Z
utils/train_test_split.py
abhatta1234/face_analysis_pytorch
2abe930c0ca02a1fd819d4710fd9bff392f32f58
[ "MIT" ]
3
2020-04-09T04:46:24.000Z
2020-10-21T18:57:05.000Z
utils/train_test_split.py
abhatta1234/face_analysis_pytorch
2abe930c0ca02a1fd819d4710fd9bff392f32f58
[ "MIT" ]
10
2020-05-11T19:50:30.000Z
2022-03-16T11:49:52.000Z
import argparse import random import numpy as np if __name__ == "__main__": parser = argparse.ArgumentParser(description="Create train and test splits.") parser.add_argument("-i", "--image_list", help="List of images to split.") parser.add_argument( "-p", "--percent", help="Percent of data used...
29.145161
81
0.65689
import argparse import random import numpy as np def get_classes_count(array): array = np.sort(array.astype("int")) classes_dict = {} classes, classes_count = np.unique(array, return_counts=True) for i in range(len(classes)): classes_dict[classes[i]] = classes_count[i] return classes_di...
1,295
0
46
c0047c3c04d44f7662b9fa3ff0cf4b5ad252eeba
657
py
Python
LeetCode/TopKfrequent.py
Jaidev810/Competitive-Questions
5d5b28be69e8572e9b4353e9790ee39b56769fc3
[ "MIT" ]
1
2021-02-27T06:12:55.000Z
2021-02-27T06:12:55.000Z
LeetCode/TopKfrequent.py
Jaidev810/Competitive-Questions
5d5b28be69e8572e9b4353e9790ee39b56769fc3
[ "MIT" ]
1
2021-02-02T08:52:17.000Z
2021-02-03T08:19:12.000Z
LeetCode/TopKfrequent.py
Jaidev810/Competitive-Questions
5d5b28be69e8572e9b4353e9790ee39b56769fc3
[ "MIT" ]
null
null
null
import heapq arr = [3, 0, 1, 0] k = 1 li = kFrequent(arr, k) print(li)
16.425
44
0.48554
import heapq def kFrequent(arr, k): n = len(arr) freq = list() d = dict() for i in arr: d[i] = d.get(i, 0) + 1 for i in d: freq.append(d[i]) heap = freq[:k] heapq.heapify(heap) for i in range(k, len(freq)): if heap[0] < freq[i]: heapq.h...
562
0
23
527c822161319075c66ba376a2c71f2a3789aa82
981
py
Python
src/main.py
2118-full-stack-python-codo-a-codo/clase-22
6b3db51406e85e343d00539638dcea9306236a51
[ "MIT" ]
null
null
null
src/main.py
2118-full-stack-python-codo-a-codo/clase-22
6b3db51406e85e343d00539638dcea9306236a51
[ "MIT" ]
null
null
null
src/main.py
2118-full-stack-python-codo-a-codo/clase-22
6b3db51406e85e343d00539638dcea9306236a51
[ "MIT" ]
13
2021-06-18T22:31:00.000Z
2021-06-25T21:58:41.000Z
from math.utils import * def main(): """ main() -> None """ myVariable = complex() print(myVariable) sumatoria(3) print(calVolumenParalelepipedo(2, 3, 10)) print(sumatoria(3)) print(sumatoriaLambda(3)) return None sumatoriaLambda = lambda x: (x * (x + 1)) / 2 # print(result...
19.235294
89
0.61264
from math.utils import * def main(): """ main() -> None """ myVariable = complex() print(myVariable) sumatoria(3) print(calVolumenParalelepipedo(2, 3, 10)) print(sumatoria(3)) print(sumatoriaLambda(3)) return None sumatoriaLambda = lambda x: (x * (x + 1)) / 2 # print(result...
0
0
0
f94bb7d82e48623ee2ee98f8725951e7e565525b
207
py
Python
numba/tests/test_unbound_variables.py
liuzhenhai/numba
855a2b262ae3d82bd6ac1c3e1c0acb36ee2e2acf
[ "BSD-2-Clause" ]
1
2015-01-29T06:52:36.000Z
2015-01-29T06:52:36.000Z
numba/tests/test_unbound_variables.py
shiquanwang/numba
a41c85fdd7d6abf8ea1ebe9116939ddc2217193b
[ "BSD-2-Clause" ]
null
null
null
numba/tests/test_unbound_variables.py
shiquanwang/numba
a41c85fdd7d6abf8ea1ebe9116939ddc2217193b
[ "BSD-2-Clause" ]
null
null
null
from numba import * a = 10 b = 11 c = 12 func = jitter() assert func() == (20, 22)
10.35
25
0.487923
from numba import * a = 10 b = 11 c = 12 def jitter(): a = 20 b = 21 c = 22 @jit(object_()) def func(): return a, c return func func = jitter() assert func() == (20, 22)
99
0
23
07b3fe050dd8aba94b1a7ac455bd9bc8824e2813
6,908
py
Python
poezio/tabs/listtab.py
louiz/poezio
8edef603fb12e1f79719f09dd0eed7c7f399c8fc
[ "Zlib" ]
1
2021-10-10T18:20:02.000Z
2021-10-10T18:20:02.000Z
poezio/tabs/listtab.py
louiz/poezio
8edef603fb12e1f79719f09dd0eed7c7f399c8fc
[ "Zlib" ]
null
null
null
poezio/tabs/listtab.py
louiz/poezio
8edef603fb12e1f79719f09dd0eed7c7f399c8fc
[ "Zlib" ]
null
null
null
""" A generic tab that displays a serie of items in a scrollable, searchable, sortable list. It should be inherited, to actually provide methods that insert items in the list, and that lets the user interact with them. """ import curses import collections import logging from typing import Dict, Callable from poezio ...
33.862745
79
0.613926
""" A generic tab that displays a serie of items in a scrollable, searchable, sortable list. It should be inherited, to actually provide methods that insert items in the list, and that lets the user interact with them. """ import curses import collections import logging from typing import Dict, Callable from poezio ...
3,257
3,143
23
ebba62b7baa76e44699e25199dc269d3a03448b5
363
py
Python
board/urls.py
ChoiEunji0114/mju_festival
a28a6600b51925288a861babefe3f2b1f01f68c6
[ "MIT" ]
7
2019-05-09T15:18:17.000Z
2019-05-16T15:46:25.000Z
board/urls.py
ChoiEunji0114/mju_festival
a28a6600b51925288a861babefe3f2b1f01f68c6
[ "MIT" ]
7
2020-06-05T20:48:43.000Z
2022-02-10T07:15:09.000Z
board/urls.py
ChoiEunji0114/mju_festival
a28a6600b51925288a861babefe3f2b1f01f68c6
[ "MIT" ]
3
2019-05-12T07:30:48.000Z
2019-05-15T12:33:05.000Z
from django.urls import path from . import views urlpatterns = [ path('', views.home, name='board_home'), path('new/', views.new, name='board_new'), path('detail/<int:board_id>', views.detail, name='board_detail'), path('delete/<int:board_id>', views.delete, name='board_delete'), path('edit/<int:bo...
36.3
69
0.669421
from django.urls import path from . import views urlpatterns = [ path('', views.home, name='board_home'), path('new/', views.new, name='board_new'), path('detail/<int:board_id>', views.detail, name='board_detail'), path('delete/<int:board_id>', views.delete, name='board_delete'), path('edit/<int:bo...
0
0
0
042f25bed6eb41f3b3c624060da54487a5e11a4f
1,010
py
Python
day09_2.py
filippocorradino/advent_of_code_2020
be46aabf8c58e4e96f541f3555646e1a4875861a
[ "MIT" ]
1
2020-12-01T09:28:43.000Z
2020-12-01T09:28:43.000Z
day09_2.py
filippocorradino/advent_of_code_2020
be46aabf8c58e4e96f541f3555646e1a4875861a
[ "MIT" ]
null
null
null
day09_2.py
filippocorradino/advent_of_code_2020
be46aabf8c58e4e96f541f3555646e1a4875861a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 """ Advent of Code 2020 - Day 9 - Challenge 2 https://adventofcode.com/2020/day/9 Solution: 35602097 """ __author__ = "Filippo Corradino" __email__ = "filippo.corradino@gmail.com" from day09_1 import find_invalid if __name__ == "__main__": main()
25.25
68
0.60297
#!/usr/bin/env python # encoding: utf-8 """ Advent of Code 2020 - Day 9 - Challenge 2 https://adventofcode.com/2020/day/9 Solution: 35602097 """ __author__ = "Filippo Corradino" __email__ = "filippo.corradino@gmail.com" from day09_1 import find_invalid def main(ifile='inputs/day_09_input.txt', preamble=25): w...
689
0
23
19f9dec0a5382290dfe8ea07a917e0029022e9b7
2,249
py
Python
jupyterlab/PreviewSearchPage.py
Larz60p/MakerProjectApril2019
2fd4d68aa66c1f4ad3b01f6a9589a078319280d7
[ "MIT" ]
1
2019-04-25T22:53:52.000Z
2019-04-25T22:53:52.000Z
jupyterlab/PreviewSearchPage.py
Larz60p/MakerProjectApril2019
2fd4d68aa66c1f4ad3b01f6a9589a078319280d7
[ "MIT" ]
null
null
null
jupyterlab/PreviewSearchPage.py
Larz60p/MakerProjectApril2019
2fd4d68aa66c1f4ad3b01f6a9589a078319280d7
[ "MIT" ]
null
null
null
# PreviesSearchPage.py from selenium import webdriver from selenium.webdriver.common.by import By from bs4 import BeautifulSoup import BusinessPaths import time import PrettifyPage import CreateDict import json import sys if __name__ == '__main__': PreviewSearchPage()
34.075758
121
0.649622
# PreviesSearchPage.py from selenium import webdriver from selenium.webdriver.common.by import By from bs4 import BeautifulSoup import BusinessPaths import time import PrettifyPage import CreateDict import json import sys class PreviewSearchPage: def __init__(self): self.bpath = BusinessPaths.BusinessPat...
1,777
3
192
ef3ca4c47347792c652cb4a02c6e84dcd3261f80
2,454
py
Python
app/room/lobby/lobby_events_models.py
hmajid2301/banter-bus-core-api
79a304965b58f0cb131e0770ffc3bd734ec4dc60
[ "Apache-2.0" ]
null
null
null
app/room/lobby/lobby_events_models.py
hmajid2301/banter-bus-core-api
79a304965b58f0cb131e0770ffc3bd734ec4dc60
[ "Apache-2.0" ]
null
null
null
app/room/lobby/lobby_events_models.py
hmajid2301/banter-bus-core-api
79a304965b58f0cb131e0770ffc3bd734ec4dc60
[ "Apache-2.0" ]
null
null
null
from typing import List, Union from pydantic import BaseModel, validator from app.event_models import EventModel JOIN_ROOM = "JOIN_ROOM" REJOIN_ROOM = "REJOIN_ROOM" ROOM_JOINED = "ROOM_JOINED" NEW_ROOM_JOINED = "NEW_ROOM_JOINED" KICK_PLAYER = "KICK_PLAYER" PLAYER_KICKED = "PLAYER_KICKED" PLAYER_DISCONNECTED = "PLAYE...
19.171875
43
0.685412
from typing import List, Union from pydantic import BaseModel, validator from app.event_models import EventModel JOIN_ROOM = "JOIN_ROOM" REJOIN_ROOM = "REJOIN_ROOM" ROOM_JOINED = "ROOM_JOINED" NEW_ROOM_JOINED = "NEW_ROOM_JOINED" KICK_PLAYER = "KICK_PLAYER" PLAYER_KICKED = "PLAYER_KICKED" PLAYER_DISCONNECTED = "PLAYE...
616
1,142
253
af00604e8cec5ece69bda0fcc4b6b77604e5f984
2,070
py
Python
Session09_AWSSagemakerAndLargeScaleModelTraining/utils_cifar.py
garima-mahato/TSAI_EMLO1.0
f1478572a20988296831e70d6cf1dac9b36e7573
[ "Apache-2.0" ]
null
null
null
Session09_AWSSagemakerAndLargeScaleModelTraining/utils_cifar.py
garima-mahato/TSAI_EMLO1.0
f1478572a20988296831e70d6cf1dac9b36e7573
[ "Apache-2.0" ]
null
null
null
Session09_AWSSagemakerAndLargeScaleModelTraining/utils_cifar.py
garima-mahato/TSAI_EMLO1.0
f1478572a20988296831e70d6cf1dac9b36e7573
[ "Apache-2.0" ]
null
null
null
import torch import torchvision import torchvision.transforms as transforms import matplotlib.pyplot as plt import numpy as np classes = ('beaver','dolphin','otter','seal','whale','aquarium fish','flatfish','ray','shark','trout','orchids','poppies','roses','sunflowers','tulips','bottles','bowls','cans','cups','plates'...
57.5
936
0.637681
import torch import torchvision import torchvision.transforms as transforms import matplotlib.pyplot as plt import numpy as np classes = ('beaver','dolphin','otter','seal','whale','aquarium fish','flatfish','ray','shark','trout','orchids','poppies','roses','sunflowers','tulips','bottles','bowls','cans','cups','plates'...
870
0
95
557db076fc25c985a349f5da185ef3f69dff348f
435
py
Python
suspicious/migrations/0003_suspicious_mac.py
NumanIbnMazid/magfetch
fb6297fd3b2277bf48289ff95d1ed4f071b9aded
[ "MIT" ]
1
2020-03-13T07:09:34.000Z
2020-03-13T07:09:34.000Z
suspicious/migrations/0003_suspicious_mac.py
NumanIbnMazid/magfetch
fb6297fd3b2277bf48289ff95d1ed4f071b9aded
[ "MIT" ]
8
2020-02-11T23:52:58.000Z
2022-03-11T23:42:09.000Z
suspicious/migrations/0003_suspicious_mac.py
NumanIbnMazid/magfetch
fb6297fd3b2277bf48289ff95d1ed4f071b9aded
[ "MIT" ]
1
2020-03-13T07:09:35.000Z
2020-03-13T07:09:35.000Z
# Generated by Django 2.1.7 on 2019-04-26 09:16 from django.db import migrations, models
22.894737
102
0.616092
# Generated by Django 2.1.7 on 2019-04-26 09:16 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('suspicious', '0002_suspicious_ip'), ] operations = [ migrations.AddField( model_name='suspicious', name='mac', ...
0
321
23
4d1420ceee345823dfa047e8767832ea59517104
121
py
Python
keras_efficientnets/__init__.py
devinwang/keras-efficientnets
692776594b798ec2a174c55f45e06dfe362d9cb1
[ "MIT" ]
1
2019-08-09T21:06:38.000Z
2019-08-09T21:06:38.000Z
keras_efficientnets/__init__.py
devinwang/keras-efficientnets
692776594b798ec2a174c55f45e06dfe362d9cb1
[ "MIT" ]
null
null
null
keras_efficientnets/__init__.py
devinwang/keras-efficientnets
692776594b798ec2a174c55f45e06dfe362d9cb1
[ "MIT" ]
null
null
null
from keras_efficientnets.efficientnet import * from keras_efficientnets.config import BlockArgs __version__ = '0.1.6.1'
24.2
48
0.826446
from keras_efficientnets.efficientnet import * from keras_efficientnets.config import BlockArgs __version__ = '0.1.6.1'
0
0
0
0984ccd85e47d788cdbe4d321f70bfd7214ca50f
663
py
Python
pikapi/spiders/__init__.py
yeshl/pikapi
3aff872c02c432991376bfd04284b97a185c91ab
[ "Apache-2.0" ]
null
null
null
pikapi/spiders/__init__.py
yeshl/pikapi
3aff872c02c432991376bfd04284b97a185c91ab
[ "Apache-2.0" ]
null
null
null
pikapi/spiders/__init__.py
yeshl/pikapi
3aff872c02c432991376bfd04284b97a185c91ab
[ "Apache-2.0" ]
null
null
null
from pikapi.spiders.spider_by_browser import * from pikapi.spiders.spider_by_cookie import * from pikapi.spiders.spider_by_req import * all_providers = [ SpiderXiladaili, SpiderYqie, SpiderZdaye, SpiderSuperfastip, SpiderXsdaili, SpiderCrossincode, SpiderTxt, SpiderKxdaili, SpiderJ...
18.416667
46
0.71644
from pikapi.spiders.spider_by_browser import * from pikapi.spiders.spider_by_cookie import * from pikapi.spiders.spider_by_req import * all_providers = [ SpiderXiladaili, SpiderYqie, SpiderZdaye, SpiderSuperfastip, SpiderXsdaili, SpiderCrossincode, SpiderTxt, SpiderKxdaili, SpiderJ...
0
0
0
84439ad92b590765aa87bac53211938c3317f694
2,273
py
Python
vis_row_depth.py
tim885/DeepDepthRefiner
a59f376b5b0ff01b0d166ec8d946a20c81a6b190
[ "MIT" ]
4
2020-05-25T02:53:49.000Z
2022-03-03T03:11:38.000Z
data/vis_row_depth.py
YoungXIAO13/DeepDepthRefiner
055380e99f94206b5a098debca6c93aa274f9d29
[ "MIT" ]
null
null
null
data/vis_row_depth.py
YoungXIAO13/DeepDepthRefiner
055380e99f94206b5a098debca6c93aa274f9d29
[ "MIT" ]
2
2020-03-31T18:07:41.000Z
2021-06-26T23:57:03.000Z
import argparse import os from scipy.io import loadmat import numpy as np import cv2 import matplotlib matplotlib.use('agg') # use matplotlib without GUI support import matplotlib.pyplot as plt parser = argparse.ArgumentParser() parser.add_argument('--data_dir', type=str, default='/home/xuchong/Projects/occ_edge_or...
30.716216
166
0.703036
import argparse import os from scipy.io import loadmat import numpy as np import cv2 import matplotlib matplotlib.use('agg') # use matplotlib without GUI support import matplotlib.pyplot as plt parser = argparse.ArgumentParser() parser.add_argument('--data_dir', type=str, default='/home/xuchong/Projects/occ_edge_or...
300
0
22
89bc650b351296268570ec4daf49e811a3b26cc7
4,301
py
Python
datasets/mvn_pretrain.py
ZhengPeng7/PSxMVN
a8787946bdb2c97643041d24f7be53ae128f8494
[ "MIT" ]
5
2021-12-07T03:11:02.000Z
2022-01-22T15:52:19.000Z
datasets/mvn_pretrain.py
ZhengPeng7/PSxMVN
a8787946bdb2c97643041d24f7be53ae128f8494
[ "MIT" ]
2
2021-12-18T07:24:25.000Z
2022-03-31T08:43:48.000Z
datasets/mvn_pretrain.py
ZhengPeng7/GLCNet
5ec7d4eb0ddece3f789df0b25f414bc4b5ac1d9e
[ "MIT" ]
null
null
null
import os import os.path as osp import re import numpy as np from numpy import array, int32 from scipy.io import loadmat from .base import BaseDataset
37.077586
105
0.516624
import os import os.path as osp import re import numpy as np from numpy import array, int32 from scipy.io import loadmat from .base import BaseDataset class MVN_pretrain(BaseDataset): def __init__(self, root, transforms, split): self.name = "MVN_pretrain" self.img_prefix = osp.join(root, "frames...
3,598
526
23
0b0ed57b1d31e159aa68e36722ffa323f273b4a6
4,375
py
Python
pyge/gameObjects/primitives.py
Jonathan-Andrews/pyGE-Python-Game-Engine
747e38b9a9f752bfee89bef54417be6723329e90
[ "MIT" ]
1
2020-03-02T18:34:18.000Z
2020-03-02T18:34:18.000Z
pyge/gameObjects/primitives.py
Jonathan-Andrews/pyGE-Python-Game-Engine
747e38b9a9f752bfee89bef54417be6723329e90
[ "MIT" ]
null
null
null
pyge/gameObjects/primitives.py
Jonathan-Andrews/pyGE-Python-Game-Engine
747e38b9a9f752bfee89bef54417be6723329e90
[ "MIT" ]
1
2020-05-10T14:03:58.000Z
2020-05-10T14:03:58.000Z
""" A list of functions that return gameObject classes of primitive shapes. """ from math import cos, sin, pi from .object2d import Object2D # ---------------------------------------------------------------------------------------- def draw_square(x:float, y:float, height:float = 1, width:float = 1, fill...
33.914729
148
0.585829
""" A list of functions that return gameObject classes of primitive shapes. """ from math import cos, sin, pi from .object2d import Object2D # ---------------------------------------------------------------------------------------- def draw_square(x:float, y:float, height:float = 1, width:float = 1, fill...
0
0
0
1ccc3c0d1862b99f87b021ff7667ea871018f267
27,305
py
Python
mds_plugin/network.py
mike-lischke/mysql-shell-plugins
d7d15591dd8e70f7f5ef8ea579e0797eff30fa0a
[ "Apache-2.0", "CC0-1.0" ]
11
2022-03-02T11:04:16.000Z
2022-03-29T05:28:23.000Z
mds_plugin/network.py
mike-lischke/mysql-shell-plugins
d7d15591dd8e70f7f5ef8ea579e0797eff30fa0a
[ "Apache-2.0", "CC0-1.0" ]
1
2022-03-25T15:12:16.000Z
2022-03-31T18:59:22.000Z
mds_plugin/network.py
mike-lischke/mysql-shell-plugins
d7d15591dd8e70f7f5ef8ea579e0797eff30fa0a
[ "Apache-2.0", "CC0-1.0" ]
3
2022-03-24T11:32:12.000Z
2022-03-25T20:40:14.000Z
# Copyright (c) 2021, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, # as published by the Free Software Foundation. # # This program is also distributed with certain software (including #...
38.135475
85
0.587255
# Copyright (c) 2021, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, # as published by the Free Software Foundation. # # This program is also distributed with certain software (including #...
3,746
0
125
94f255977493d198ff2cd8edf28b1c3eaffc4cd9
5,614
py
Python
chess/lib/gui.py
SamMatzko/My-PyChess
4b1b30b03b85679a2480e86b649614917a156ab0
[ "MIT" ]
64
2019-10-27T06:49:57.000Z
2022-03-29T11:07:07.000Z
chess/lib/gui.py
SamMatzko/My-PyChess
4b1b30b03b85679a2480e86b649614917a156ab0
[ "MIT" ]
11
2020-01-28T08:16:25.000Z
2021-12-13T18:44:12.000Z
chess/lib/gui.py
SamMatzko/My-PyChess
4b1b30b03b85679a2480e86b649614917a156ab0
[ "MIT" ]
30
2020-01-09T10:05:01.000Z
2022-03-18T18:16:30.000Z
""" This file is a part of My-PyChess application. In this file, we define some basic gui-related functions For a better understanding of the variables used here, checkout docs.txt """ import pygame from tools.loader import CHESS, BACK, putNum, putLargeNum from tools import sound # Apply 'convert_alpha()' o...
37.178808
81
0.528144
""" This file is a part of My-PyChess application. In this file, we define some basic gui-related functions For a better understanding of the variables used here, checkout docs.txt """ import pygame from tools.loader import CHESS, BACK, putNum, putLargeNum from tools import sound # Apply 'convert_alpha()' o...
4,560
0
187
e58d18a4188f5278cc3645bd10b1ba575317585f
1,011
py
Python
froide/team/urls.py
lanmarc77/froide
bddc8bb27c8a7c2a959003dda724194948bc381a
[ "MIT" ]
null
null
null
froide/team/urls.py
lanmarc77/froide
bddc8bb27c8a7c2a959003dda724194948bc381a
[ "MIT" ]
null
null
null
froide/team/urls.py
lanmarc77/froide
bddc8bb27c8a7c2a959003dda724194948bc381a
[ "MIT" ]
null
null
null
from django.urls import path from .views import ( TeamListView, TeamDetailView, CreateTeamView, InviteTeamMemberView, JoinTeamView, ChangeTeamMemberRoleView, DeleteTeamMemberRoleView, JoinTeamUserView, DeleteTeamView ) urlpatterns = [ path('', TeamListView.as_view(), name='team-list'), path('creat...
38.884615
71
0.67458
from django.urls import path from .views import ( TeamListView, TeamDetailView, CreateTeamView, InviteTeamMemberView, JoinTeamView, ChangeTeamMemberRoleView, DeleteTeamMemberRoleView, JoinTeamUserView, DeleteTeamView ) urlpatterns = [ path('', TeamListView.as_view(), name='team-list'), path('creat...
0
0
0
8648427b141a81717f91928d45d78d1381e8f771
500
py
Python
hardware/servo/__init__.py
jpalczewski/pills
ab0cf0feedbdfe069a0dad76c8a45ee9ab4cfc26
[ "MIT" ]
null
null
null
hardware/servo/__init__.py
jpalczewski/pills
ab0cf0feedbdfe069a0dad76c8a45ee9ab4cfc26
[ "MIT" ]
null
null
null
hardware/servo/__init__.py
jpalczewski/pills
ab0cf0feedbdfe069a0dad76c8a45ee9ab4cfc26
[ "MIT" ]
null
null
null
import time import board import pwmio from adafruit_motor import servo
23.809524
57
0.722
import time import board import pwmio from adafruit_motor import servo def right_rotate(): rightServoPin = pwmio.PWMOut(board.D17, frequency=50) rightServo = servo.ContinuousServo(rightServoPin) rightServo.throttle = 0.08 time.sleep(0.1) rightServo.throttle = 0.0 def left_rotate(): lef...
376
0
51
886d142c514e19d696465e7f00befa959fe90b28
10,444
py
Python
training/ticketing_system/views.py
aberon10/training
7f418d563280b9d1ab939935206b023e4206cb54
[ "MIT" ]
null
null
null
training/ticketing_system/views.py
aberon10/training
7f418d563280b9d1ab939935206b023e4206cb54
[ "MIT" ]
null
null
null
training/ticketing_system/views.py
aberon10/training
7f418d563280b9d1ab939935206b023e4206cb54
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import time from django.db.models import Q from django.shortcuts import render from django.http import HttpResponseRedirect from django.http import HttpResponseNotFound from django.contrib.auth.hashers import make_password from django.contrib.auth.hashers import check_password from django.views....
33.367412
79
0.493776
# -*- coding: utf-8 -*- import time from django.db.models import Q from django.shortcuts import render from django.http import HttpResponseRedirect from django.http import HttpResponseNotFound from django.contrib.auth.hashers import make_password from django.contrib.auth.hashers import check_password from django.views....
8,892
16
293
2cd4b352e3ce6d32d5fe1fe1431c15e7c5cbd407
897
py
Python
linear_algebra/Gauss_elim_example.py
mattzett/EP501_python
6b6cc87e435a372f84aa1f68c13cc8c73d477998
[ "MIT" ]
null
null
null
linear_algebra/Gauss_elim_example.py
mattzett/EP501_python
6b6cc87e435a372f84aa1f68c13cc8c73d477998
[ "MIT" ]
1
2020-10-06T13:29:01.000Z
2020-10-06T13:29:01.000Z
linear_algebra/Gauss_elim_example.py
mattzett/EP501_python
6b6cc87e435a372f84aa1f68c13cc8c73d477998
[ "MIT" ]
6
2020-09-01T10:35:59.000Z
2020-09-18T10:12:59.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Aug 20 15:40:51 2020 @author: zettergm known issues: 1) Need to control number of decimal places in output printing to improve readability """ import numpy as np from elimtools import Gauss_elim,backsub nrow=10 ncol=10 A=np.random.randn(nrow,ncol)...
27.181818
89
0.683389
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Aug 20 15:40:51 2020 @author: zettergm known issues: 1) Need to control number of decimal places in output printing to improve readability """ import numpy as np from elimtools import Gauss_elim,backsub nrow=10 ncol=10 A=np.random.randn(nrow,ncol)...
0
0
0
bbed0d926f4b21ac78cf6111053350a3ef352712
5,534
py
Python
Hiking_project_trailscraper.py
edeneault/pyfe_capstone_hikingtrails
849328a47095933f2e8ce8a8a5a0d56d04dd3807
[ "MIT" ]
2
2020-08-10T13:18:31.000Z
2021-10-02T18:05:55.000Z
Hiking_project_trailscraper.py
edeneault/pyfe_capstone_hikingtrails
849328a47095933f2e8ce8a8a5a0d56d04dd3807
[ "MIT" ]
null
null
null
Hiking_project_trailscraper.py
edeneault/pyfe_capstone_hikingtrails
849328a47095933f2e8ce8a8a5a0d56d04dd3807
[ "MIT" ]
null
null
null
################################################################################ # #### Hiking_project_trailsraper.py ##### # # #### written by: Etienne Deneault ##### # ##########################################################################...
44.272
709
0.564149
################################################################################ # #### Hiking_project_trailsraper.py ##### # # #### written by: Etienne Deneault ##### # ##########################################################################...
421
0
23
860e087d2cc5e2026e5ed61697c96f45cf4a41b9
42,444
py
Python
zvmsdk/database.py
iaasci-ibm/python-zvm-sdk
cd73087ca1b6d48897fd39c512aae1f7e5f5371e
[ "Apache-2.0" ]
null
null
null
zvmsdk/database.py
iaasci-ibm/python-zvm-sdk
cd73087ca1b6d48897fd39c512aae1f7e5f5371e
[ "Apache-2.0" ]
6
2020-02-25T03:27:47.000Z
2021-04-08T12:52:49.000Z
zvmsdk/database.py
iaasci-ibm/python-zvm-sdk
cd73087ca1b6d48897fd39c512aae1f7e5f5371e
[ "Apache-2.0" ]
2
2020-07-14T09:27:54.000Z
2021-04-13T09:06:00.000Z
# Copyright 2017,2021 IBM Corp. # # 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 agr...
38.975207
79
0.527589
# Copyright 2017,2021 IBM Corp. # # 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 agr...
28,260
12,704
203
ed35d1eff08218ca131c5f14d91b3125155013d6
2,076
py
Python
tests/test_api/test_databases.py
quantori/async-couch
c46ce8da6f058024c95db67151a4498042280206
[ "MIT" ]
1
2020-05-01T01:53:23.000Z
2020-05-01T01:53:23.000Z
tests/test_api/test_databases.py
quantori/async-couch
c46ce8da6f058024c95db67151a4498042280206
[ "MIT" ]
2
2020-05-09T19:02:18.000Z
2021-12-27T10:46:14.000Z
tests/test_api/test_databases.py
quantori/async-couch
c46ce8da6f058024c95db67151a4498042280206
[ "MIT" ]
2
2021-12-24T09:14:39.000Z
2022-01-26T08:18:03.000Z
from typing import Callable from async_couch import CouchClient db_name = 'test_db_01' invalid_db_name = 'invalid_%^^&_name' non_existing_db = 'non_existing_database' doc_id = None
28.833333
72
0.74422
from typing import Callable from async_couch import CouchClient db_name = 'test_db_01' invalid_db_name = 'invalid_%^^&_name' non_existing_db = 'non_existing_database' doc_id = None def test_create(async_run: Callable, client: CouchClient): response = async_run(client.db_create(invalid_db_name)) assert resp...
1,745
0
138
f77aadb1a8300f3980338c3873142149680e9b5d
3,510
py
Python
lib/extras/cocoa_definitions.py
cduhard/vimconfig
caf4eb276aafb92ebd6bec7f36f4fc04fba70605
[ "MIT" ]
1
2016-05-09T09:06:18.000Z
2016-05-09T09:06:18.000Z
lib/extras/cocoa_definitions.py
cduhard/vimconfig
caf4eb276aafb92ebd6bec7f36f4fc04fba70605
[ "MIT" ]
null
null
null
lib/extras/cocoa_definitions.py
cduhard/vimconfig
caf4eb276aafb92ebd6bec7f36f4fc04fba70605
[ "MIT" ]
null
null
null
#!/usr/bin/python '''Creates a folder containing text files of Cocoa keywords.''' import os, commands, re from sys import argv def find(searchpath, ext): '''Mimics the "find searchpath -name *.ext" unix command.''' results = [] for path, dirs, files in os.walk(searchpath): for filename in files: ...
37.741935
80
0.601994
#!/usr/bin/python '''Creates a folder containing text files of Cocoa keywords.''' import os, commands, re from sys import argv def find(searchpath, ext): '''Mimics the "find searchpath -name *.ext" unix command.''' results = [] for path, dirs, files in os.walk(searchpath): for filename in files: ...
0
0
0
344d442d85a139cfdea7e2f40c9bf045c0e2dee0
808
py
Python
benchmarks/intersperse/intersperse.py
hirnimeshrampuresoftware/iteration_utilities
a77a3d880a52cb663538d67415520d74e418a906
[ "Apache-2.0" ]
72
2016-09-12T03:01:02.000Z
2022-03-05T16:54:45.000Z
benchmarks/intersperse/intersperse.py
hirnimeshrampuresoftware/iteration_utilities
a77a3d880a52cb663538d67415520d74e418a906
[ "Apache-2.0" ]
127
2016-09-14T02:07:33.000Z
2022-03-19T13:17:32.000Z
benchmarks/intersperse/intersperse.py
hirnimeshrampuresoftware/iteration_utilities
a77a3d880a52cb663538d67415520d74e418a906
[ "Apache-2.0" ]
11
2017-02-22T20:40:37.000Z
2022-03-05T16:55:40.000Z
import iteration_utilities import more_itertools import toolz import cytoolz import pydash
31.076923
80
0.77599
import iteration_utilities import more_itertools import toolz import cytoolz import pydash def bench_iu_intersperse(iterable, func=iteration_utilities.intersperse): iteration_utilities.consume(func(iterable, 2), None) def bench_more_itertools_intersperse(iterable, func=more_itertools.intersperse): iteration_u...
579
0
138
fba73375fa965c956afa537dc1de06b0ce34438e
1,931
py
Python
threads.py
techborn/pIRC
cb866e307e082947ef209bca88d01706311552c3
[ "MIT" ]
null
null
null
threads.py
techborn/pIRC
cb866e307e082947ef209bca88d01706311552c3
[ "MIT" ]
null
null
null
threads.py
techborn/pIRC
cb866e307e082947ef209bca88d01706311552c3
[ "MIT" ]
null
null
null
import threading import sys from traceback import print_tb,print_exc from random import randint from time import ctime as now class JobThread(threading.Thread): """ Thread that executes a job every N milliseconds """ def shutdown(self): """ Stop this thread """ self._fi...
30.650794
90
0.489384
import threading import sys from traceback import print_tb,print_exc from random import randint from time import ctime as now class JobThread(threading.Thread): """ Thread that executes a job every N milliseconds """ def __init__(self, func, ref): threading.Thread.__init__(self) self._...
233
0
62
fb7197d2b1374d676009db827b83327d4a1efba1
3,725
py
Python
applications/trilinos_application/test_examples/cantilever2d.gid/cantilever2dstatic.py
jiaqiwang969/Kratos-test
ed082abc163e7b627f110a1ae1da465f52f48348
[ "BSD-4-Clause" ]
null
null
null
applications/trilinos_application/test_examples/cantilever2d.gid/cantilever2dstatic.py
jiaqiwang969/Kratos-test
ed082abc163e7b627f110a1ae1da465f52f48348
[ "BSD-4-Clause" ]
null
null
null
applications/trilinos_application/test_examples/cantilever2d.gid/cantilever2dstatic.py
jiaqiwang969/Kratos-test
ed082abc163e7b627f110a1ae1da465f52f48348
[ "BSD-4-Clause" ]
null
null
null
import mpi #needed to use mpi ################################################################## ################################################################## #setting the domain size for the problem to be solved domain_size = 2 ################################################################## #################...
31.567797
94
0.721611
import mpi #needed to use mpi ################################################################## ################################################################## #setting the domain size for the problem to be solved domain_size = 2 ################################################################## #################...
0
0
0
2f83da54d897e766d0d3af8c0eb9288935bf6e10
17,675
py
Python
uranai.py
heeeedgehog/chat2021
a7e0b06ec7dc6cf66092afda18bbc770c58fd5b6
[ "CC0-1.0" ]
null
null
null
uranai.py
heeeedgehog/chat2021
a7e0b06ec7dc6cf66092afda18bbc770c58fd5b6
[ "CC0-1.0" ]
null
null
null
uranai.py
heeeedgehog/chat2021
a7e0b06ec7dc6cf66092afda18bbc770c58fd5b6
[ "CC0-1.0" ]
null
null
null
import re import time import random import IPython from google.colab import output n = 0 # アイコンの指定 BOT_ICON = 'https://3.bp.blogspot.com/-qbORCFE5qhk/UmTBJwEYKjI/AAAAAAAAZYY/nbjieynFcLQ/s800/job_uranaishi.png' YOUR_ICON = 'https://3.bp.blogspot.com/-nHZhTWISMxk/Vw5KxMQxRhI/AAAAAAAA5tQ/HR_btIW3k1ISG3GGNG1HFpsgk38wSu...
36.518595
169
0.606789
import re import time import random import IPython from google.colab import output n = 0 def chat(text, **kw): #チャット用の関数(ここを書き換える) global n n += 1 return 'ほ' * n # アイコンの指定 BOT_ICON = 'https://3.bp.blogspot.com/-qbORCFE5qhk/UmTBJwEYKjI/AAAAAAAAZYY/nbjieynFcLQ/s800/job_uranaishi.png' YOUR_ICON = 'https://3.bp....
25,871
0
160
7de1aa8a34f62c7e9615ba4c4b38a1f8141a275a
21,397
py
Python
test/python/T0_t/WMBS_t/JobSplitting_t/Repack_t.py
silviodonato/T0
a093729d08b31175ed35cd20e889bd7094ce152a
[ "Apache-2.0" ]
6
2016-03-09T14:36:19.000Z
2021-07-27T01:28:00.000Z
test/python/T0_t/WMBS_t/JobSplitting_t/Repack_t.py
silviodonato/T0
a093729d08b31175ed35cd20e889bd7094ce152a
[ "Apache-2.0" ]
193
2015-01-07T21:03:43.000Z
2022-03-31T12:22:18.000Z
test/python/T0_t/WMBS_t/JobSplitting_t/Repack_t.py
silviodonato/T0
a093729d08b31175ed35cd20e889bd7094ce152a
[ "Apache-2.0" ]
36
2015-01-28T19:01:54.000Z
2021-12-15T17:18:20.000Z
#!/usr/bin/env python """ _Repack_t_ Repack job splitting test """ import unittest import threading import logging import time from WMCore.WMBS.File import File from WMCore.WMBS.Fileset import Fileset from WMCore.WMBS.Subscription import Subscription from WMCore.WMBS.Workflow import Workflow from WMCore.DataStructs...
36.576068
104
0.504463
#!/usr/bin/env python """ _Repack_t_ Repack job splitting test """ import unittest import threading import logging import time from WMCore.WMBS.File import File from WMCore.WMBS.Fileset import Fileset from WMCore.WMBS.Subscription import Subscription from WMCore.WMBS.Workflow import Workflow from WMCore.DataStructs...
0
0
0
71b47648bb110a0a8317411106c6b0ab97f3e2a5
54,933
py
Python
src/ext_libs/edflibpy/edfwriter.py
greydongilmore/merPrep
d84fd5617667180ae88805a7b73d5865b79026bd
[ "MIT" ]
null
null
null
src/ext_libs/edflibpy/edfwriter.py
greydongilmore/merPrep
d84fd5617667180ae88805a7b73d5865b79026bd
[ "MIT" ]
null
null
null
src/ext_libs/edflibpy/edfwriter.py
greydongilmore/merPrep
d84fd5617667180ae88805a7b73d5865b79026bd
[ "MIT" ]
null
null
null
############################################################################# # # Copyright (c) 2020 Teunis van Beelen # All rights reserved. # # Email: teuniz@protonmail.com # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are m...
33.232305
182
0.615623
############################################################################# # # Copyright (c) 2020 Teunis van Beelen # All rights reserved. # # Email: teuniz@protonmail.com # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are m...
24,396
9
313
420095f4362447fc720d1fd33b252646beb57b3f
208
py
Python
001146StepikPyBegin/Stepik001146PyBeginсh07p03st13С09_01_my_20200421.py
SafonovMikhail/python_000577
739f764e80f1ca354386f00b8e9db1df8c96531d
[ "Apache-2.0" ]
null
null
null
001146StepikPyBegin/Stepik001146PyBeginсh07p03st13С09_01_my_20200421.py
SafonovMikhail/python_000577
739f764e80f1ca354386f00b8e9db1df8c96531d
[ "Apache-2.0" ]
null
null
null
001146StepikPyBegin/Stepik001146PyBeginсh07p03st13С09_01_my_20200421.py
SafonovMikhail/python_000577
739f764e80f1ca354386f00b8e9db1df8c96531d
[ "Apache-2.0" ]
null
null
null
n = int(input()) nums = [] nums2 = [] for i in range(n): nums.append(int(input())) print("nums.append", nums) nums2 = sorted(nums) print("sorted(nums)", nums2) print(nums2[n - 2]) print(nums2[n - 1])
18.909091
30
0.605769
n = int(input()) nums = [] nums2 = [] for i in range(n): nums.append(int(input())) print("nums.append", nums) nums2 = sorted(nums) print("sorted(nums)", nums2) print(nums2[n - 2]) print(nums2[n - 1])
0
0
0
254ccfaca8edcb40b06fda26e201fd147b513ea3
4,127
py
Python
src/rendering/SceneLib/Resize_background.py
whong92/3D_DL
3c15bca3cc87c3197d38a785f6d1146911a82921
[ "MIT" ]
35
2019-03-04T00:06:20.000Z
2022-02-04T22:34:17.000Z
src/rendering/SceneLib/Resize_background.py
921kiyo/C530
e64402575661a1e534cb8effe122d8fe8aed156e
[ "MIT" ]
3
2021-03-12T13:12:26.000Z
2022-01-17T08:47:49.000Z
src/rendering/SceneLib/Resize_background.py
921kiyo/C530
e64402575661a1e534cb8effe122d8fe8aed156e
[ "MIT" ]
12
2019-09-26T08:35:18.000Z
2021-12-09T05:39:59.000Z
# -*- coding: utf-8 -*- """ Created on Mon Feb 5 17:01:13 2018 @author: Pavel """ """ This function will take the whole of SUN database and flaten it into a single folder while resizing and cropping all images into given square shape. If the file is smaller than that, it will be ignored. """ import os from PIL imp...
39.682692
125
0.650594
# -*- coding: utf-8 -*- """ Created on Mon Feb 5 17:01:13 2018 @author: Pavel """ """ This function will take the whole of SUN database and flaten it into a single folder while resizing and cropping all images into given square shape. If the file is smaller than that, it will be ignored. """ import os from PIL imp...
0
0
0
72a88471bb9c6af600de78e7cd1a66ac516acbbc
3,133
py
Python
UNetDataset.py
maxgraf96/DLAM_Assignment
cbd2ce1fbc39c187ff2b1a4259a36559dd50e772
[ "MIT" ]
2
2020-09-19T08:17:46.000Z
2021-07-16T08:25:57.000Z
UNetDataset.py
maxgraf96/DLAM_Assignment
cbd2ce1fbc39c187ff2b1a4259a36559dd50e772
[ "MIT" ]
null
null
null
UNetDataset.py
maxgraf96/DLAM_Assignment
cbd2ce1fbc39c187ff2b1a4259a36559dd50e772
[ "MIT" ]
null
null
null
from pathlib import Path import numpy as np import torch from torch.utils.data import Dataset from Hyperparameters import sep, unet_width from Util import get_spectrogram class UNetDataset(Dataset): """ Dataset for accessing data opints of the autoencoder output. """ def __init__(self, root_dir, gt_...
36.858824
111
0.659751
from pathlib import Path import numpy as np import torch from torch.utils.data import Dataset from Hyperparameters import sep, unet_width from Util import get_spectrogram class UNetDataset(Dataset): """ Dataset for accessing data opints of the autoencoder output. """ def __init__(self, root_dir, gt_...
1,283
0
80
f00f66813b04f934b6b0813a40351b94837d4d46
10,764
py
Python
src/ipycbm/plugins/foi/foi_help.py
VP-GEO/cbm
4ed229f6b6455435b6d032deb8a39dba4ecee7a2
[ "BSD-3-Clause" ]
null
null
null
src/ipycbm/plugins/foi/foi_help.py
VP-GEO/cbm
4ed229f6b6455435b6d032deb8a39dba4ecee7a2
[ "BSD-3-Clause" ]
null
null
null
src/ipycbm/plugins/foi/foi_help.py
VP-GEO/cbm
4ed229f6b6455435b6d032deb8a39dba4ecee7a2
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of CbM (https://github.com/ec-jrc/cbm). # Author : Gilbert Voican, Konstantinos Anastasakis # Credits : GTCAP Team # Copyright : 2021 European Commission, Joint Research Centre # License : 3-Clause BSD from ipywidgets import (HTML, HBox, VBox,...
66.444444
551
0.764028
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of CbM (https://github.com/ec-jrc/cbm). # Author : Gilbert Voican, Konstantinos Anastasakis # Credits : GTCAP Team # Copyright : 2021 European Commission, Joint Research Centre # License : 3-Clause BSD from ipywidgets import (HTML, HBox, VBox,...
10,363
0
115
3ea000e536560e123345143a404fffc37a3b77ef
242
gyp
Python
gyp/catch.cc.gyp
anvaka/Catch
7fa9ecd62bd1ecf2f479e6c0b1416e400112c51b
[ "BSL-1.0" ]
null
null
null
gyp/catch.cc.gyp
anvaka/Catch
7fa9ecd62bd1ecf2f479e6c0b1416e400112c51b
[ "BSL-1.0" ]
null
null
null
gyp/catch.cc.gyp
anvaka/Catch
7fa9ecd62bd1ecf2f479e6c0b1416e400112c51b
[ "BSL-1.0" ]
1
2021-07-21T17:06:42.000Z
2021-07-21T17:06:42.000Z
{ "targets": [{ "target_name": "catch.cc", "type": "none", "direct_dependent_settings": { "include_dirs": [ "../single_include" ], }, "sources": [ "../include/catch_with_main.hpp" ], }] }
16.133333
38
0.479339
{ "targets": [{ "target_name": "catch.cc", "type": "none", "direct_dependent_settings": { "include_dirs": [ "../single_include" ], }, "sources": [ "../include/catch_with_main.hpp" ], }] }
0
0
0
933a0aecc9f59faff16390b28bbca8a395484165
28,142
py
Python
hockeyGamePrediction/model.py
PhysicsUofRAUI/HockeyPredictionModels
64c4dd8e456ec248751d499dd1b3bc5d3b57ef16
[ "MIT" ]
null
null
null
hockeyGamePrediction/model.py
PhysicsUofRAUI/HockeyPredictionModels
64c4dd8e456ec248751d499dd1b3bc5d3b57ef16
[ "MIT" ]
null
null
null
hockeyGamePrediction/model.py
PhysicsUofRAUI/HockeyPredictionModels
64c4dd8e456ec248751d499dd1b3bc5d3b57ef16
[ "MIT" ]
null
null
null
import numpy import pandas as pd from keras.models import Sequential from keras.layers import Dense from keras.wrappers.scikit_learn import KerasClassifier from sklearn.model_selection import cross_val_score from sklearn.preprocessing import LabelEncoder from sklearn.model_selection import StratifiedKFold from sklearn....
44.669841
365
0.725215
import numpy import pandas as pd from keras.models import Sequential from keras.layers import Dense from keras.wrappers.scikit_learn import KerasClassifier from sklearn.model_selection import cross_val_score from sklearn.preprocessing import LabelEncoder from sklearn.model_selection import StratifiedKFold from sklearn....
543
0
22
542b5806c4a13f0aaa38eda82badbe8c249801d5
121
py
Python
encoding/__init__.py
yohan-pg/stylegan2-ada-pytorch
e1225b08d55ff5ca38e1646fa430d3c3c3bb3c68
[ "BSD-Source-Code" ]
null
null
null
encoding/__init__.py
yohan-pg/stylegan2-ada-pytorch
e1225b08d55ff5ca38e1646fa430d3c3c3bb3c68
[ "BSD-Source-Code" ]
null
null
null
encoding/__init__.py
yohan-pg/stylegan2-ada-pytorch
e1225b08d55ff5ca38e1646fa430d3c3c3bb3c68
[ "BSD-Source-Code" ]
null
null
null
from .stylegan_encoder_network import * from .encoder import * from .encoding_dataset import * from .tensorboard import *
30.25
39
0.809917
from .stylegan_encoder_network import * from .encoder import * from .encoding_dataset import * from .tensorboard import *
0
0
0
5c6fd27905a5bef9aa55be20386c404c8c3495b4
8,224
py
Python
s1acker/s1acker.py
quinoa42/s1acker
79e520fb3a1d4bd4cc573c45e799d75637ccc00c
[ "MIT" ]
null
null
null
s1acker/s1acker.py
quinoa42/s1acker
79e520fb3a1d4bd4cc573c45e799d75637ccc00c
[ "MIT" ]
null
null
null
s1acker/s1acker.py
quinoa42/s1acker
79e520fb3a1d4bd4cc573c45e799d75637ccc00c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ s1acker.s1acker ~~~~~~~~~~~~~~ This module provides functions that deal with s1 search interface. :copyright: (c) 2017 by quinoa42. :license: MIT, see LICENSE for more details. """ import logging import os.path as op import re import time from itertools import chain fr...
30.572491
79
0.536722
# -*- coding: utf-8 -*- """ s1acker.s1acker ~~~~~~~~~~~~~~ This module provides functions that deal with s1 search interface. :copyright: (c) 2017 by quinoa42. :license: MIT, see LICENSE for more details. """ import logging import os.path as op import re import time from itertools import chain fr...
187
0
108
3be4556a4ed0d130e75c6ce7e4ffbc24aa80f072
6,656
py
Python
qt-creator-opensource-src-4.6.1/scripts/uichanges.py
kevinlq/Qt-Creator-Opensource-Study
b8cadff1f33f25a5d4ef33ed93f661b788b1ba0f
[ "MIT" ]
5
2018-12-22T14:49:13.000Z
2022-01-13T07:21:46.000Z
qt-creator-opensource-src-4.6.1/scripts/uichanges.py
kevinlq/Qt-Creator-Opensource-Study
b8cadff1f33f25a5d4ef33ed93f661b788b1ba0f
[ "MIT" ]
null
null
null
qt-creator-opensource-src-4.6.1/scripts/uichanges.py
kevinlq/Qt-Creator-Opensource-Study
b8cadff1f33f25a5d4ef33ed93f661b788b1ba0f
[ "MIT" ]
8
2018-07-17T03:55:48.000Z
2021-12-22T06:37:53.000Z
#!/usr/bin/env python ############################################################################ # # Copyright (C) 2016 The Qt Company Ltd. # Contact: https://www.qt.io/licensing/ # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt licenses may use this file in #...
29.582222
100
0.589844
#!/usr/bin/env python ############################################################################ # # Copyright (C) 2016 The Qt Company Ltd. # Contact: https://www.qt.io/licensing/ # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt licenses may use this file in #...
3,440
19
253
1c815d912194a3342599e0c10f8f781a58a15488
14,539
py
Python
kinopoisk/tests/movie.py
nine9797/kinopoiskpy
72f7597200dd1f1a1db5e3019e77489b868886a4
[ "BSD-3-Clause" ]
null
null
null
kinopoisk/tests/movie.py
nine9797/kinopoiskpy
72f7597200dd1f1a1db5e3019e77489b868886a4
[ "BSD-3-Clause" ]
null
null
null
kinopoisk/tests/movie.py
nine9797/kinopoiskpy
72f7597200dd1f1a1db5e3019e77489b868886a4
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # flake8: noqa: E501 from __future__ import unicode_literals from datetime import datetime from kinopoisk.movie import Movie from .base import BaseTest
46.302548
862
0.656716
# -*- coding: utf-8 -*- # flake8: noqa: E501 from __future__ import unicode_literals from datetime import datetime from kinopoisk.movie import Movie from .base import BaseTest class MovieTest(BaseTest): def test_movie_posters_page_source(self): m = Movie(id=51319) m.get_content('posters') ...
3,892
12,618
23
189671d6644f6055e5c2938128947d789ac96739
4,792
py
Python
src/utils/data_drift_setup.py
nfmoore/aml-batch-deployment-template
6248310690ddbbbe027fd33e90dae95af0aeff8d
[ "MIT" ]
null
null
null
src/utils/data_drift_setup.py
nfmoore/aml-batch-deployment-template
6248310690ddbbbe027fd33e90dae95af0aeff8d
[ "MIT" ]
null
null
null
src/utils/data_drift_setup.py
nfmoore/aml-batch-deployment-template
6248310690ddbbbe027fd33e90dae95af0aeff8d
[ "MIT" ]
null
null
null
import os import sys from argparse import ArgumentParser from azureml.core import Dataset, Datastore, Workspace from azureml.data.dataset_factory import DataType from azureml.datadrift import DataDriftDetector target_dataset_timestamp_column = "datetime" input_schema_dir = os.path.join("input", "schema") data_dir = "...
34.978102
122
0.706386
import os import sys from argparse import ArgumentParser from azureml.core import Dataset, Datastore, Workspace from azureml.data.dataset_factory import DataType from azureml.datadrift import DataDriftDetector target_dataset_timestamp_column = "datetime" input_schema_dir = os.path.join("input", "schema") data_dir = "...
4,345
0
46
4ccbcc7c5db6b2d148de0aa6c68316018fe7d135
8,315
py
Python
scripts/plot_exp_normal.py
LequnWang/Improve-Screening-via-Calibrated-Subset-Selection
de397a600b7ac1d4a2a844c58bb7ebde29841b2a
[ "MIT" ]
4
2022-03-16T08:40:10.000Z
2022-03-17T13:02:17.000Z
scripts/plot_exp_normal.py
Networks-Learning/Improve-Screening-via-Calibrated-Subset-Selection
de397a600b7ac1d4a2a844c58bb7ebde29841b2a
[ "MIT" ]
null
null
null
scripts/plot_exp_normal.py
Networks-Learning/Improve-Screening-via-Calibrated-Subset-Selection
de397a600b7ac1d4a2a844c58bb7ebde29841b2a
[ "MIT" ]
1
2022-03-16T08:29:05.000Z
2022-03-16T08:29:05.000Z
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.ticker as ticker import numpy as np import os from plot_constants import * plt.rcParams.update(params) plt.rc('font', family='serif') if __name__ == "__main__": fig, axs = plt.subplots(1, 4) fig.set_size_inches(28, 6) ...
48.625731
148
0.613109
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.ticker as ticker import numpy as np import os from plot_constants import * plt.rcParams.update(params) plt.rc('font', family='serif') if __name__ == "__main__": fig, axs = plt.subplots(1, 4) fig.set_size_inches(28, 6) ...
0
0
0
2047cd9bc642977e2dc261bae40c74e7151587bf
4,206
py
Python
fast_tmp/models.py
Chise1/fast-tmp2
0dd34ac3ec7ea5452c1e4b8d922a40665264f42b
[ "Apache-2.0" ]
1
2021-07-02T09:14:12.000Z
2021-07-02T09:14:12.000Z
fast_tmp/models.py
Chise1/fast-tmp2
0dd34ac3ec7ea5452c1e4b8d922a40665264f42b
[ "Apache-2.0" ]
null
null
null
fast_tmp/models.py
Chise1/fast-tmp2
0dd34ac3ec7ea5452c1e4b8d922a40665264f42b
[ "Apache-2.0" ]
null
null
null
from typing import List, Type, Union from pydantic import BaseModel from tortoise import Model, fields from fast_tmp.utils.password import make_password, verify_password
28.228188
75
0.562292
from typing import List, Type, Union from pydantic import BaseModel from tortoise import Model, fields from fast_tmp.utils.password import make_password, verify_password class Permission(Model): label = fields.CharField(max_length=128) codename = fields.CharField(max_length=128, unique=True) @classmeth...
748
3,252
92
e9fb83f0e912cc4646c31575e133ff91af6a28c9
28,793
py
Python
python/plot_line.py
meudnaes/VoronoiRT
448eead8fa6e911ed40e2dfaba5baa1c9ef54cf2
[ "MIT" ]
1
2021-12-03T08:56:57.000Z
2021-12-03T08:56:57.000Z
python/plot_line.py
meudnaes/VoronoiRT
448eead8fa6e911ed40e2dfaba5baa1c9ef54cf2
[ "MIT" ]
2
2022-02-18T09:50:16.000Z
2022-03-08T12:10:56.000Z
python/plot_line.py
meudnaes/VoronoiRT
448eead8fa6e911ed40e2dfaba5baa1c9ef54cf2
[ "MIT" ]
null
null
null
import numpy as np import matplotlib as mpl # import matplotlib.cm as cm import matplotlib.pyplot as plt import matplotlib.patheffects as pe from brightness_temperature import * from plot_searchlight import get_intensity, font_size, iunits #plt.rc('text.latex', preamble=r'\usepackage{cmbright}') #plt.rc('text', usete...
44.296923
122
0.576216
import numpy as np import matplotlib as mpl # import matplotlib.cm as cm import matplotlib.pyplot as plt import matplotlib.patheffects as pe from brightness_temperature import * from plot_searchlight import get_intensity, font_size, iunits #plt.rc('text.latex', preamble=r'\usepackage{cmbright}') #plt.rc('text', usete...
0
0
0
d3c30d1b644c751ac6a4f91eab9ed0dd6ae26c2f
732
py
Python
Chapter 04/Gradient.py
bpbpublications/Neural-Network-for-Beginners
aa04574e2990920e5e0a65ed5af674adc61388c1
[ "MIT" ]
2
2021-11-24T02:51:58.000Z
2022-02-03T12:50:15.000Z
Chapter 04/Gradient.py
bpbpublications/Neural-Network-for-Beginners
aa04574e2990920e5e0a65ed5af674adc61388c1
[ "MIT" ]
null
null
null
Chapter 04/Gradient.py
bpbpublications/Neural-Network-for-Beginners
aa04574e2990920e5e0a65ed5af674adc61388c1
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pylab as plt from Gradient_2D import numerical_gradient init_x = np.array([-4.0, 5.0]) lr = 0.1 step_num = 30 x, x_history = gradient_descent(function, init_x, lr=lr, step_num=step_num) plt.plot( [-6, 6], [0,0], '--b') plt.plot( [0,0], [-6, 6], '--b') plt.plot(x_history[:,0], ...
19.263158
75
0.613388
import numpy as np import matplotlib.pylab as plt from Gradient_2D import numerical_gradient def gradient_descent(f, init_x, lr=0.01, step_num=100): x = init_x x_history = [] for i in range(step_num): x_history.append( x.copy() ) grad = numerical_gradient(f, x) x -= lr * grad ...
259
0
46
e646cda38f01dba017b607a2f6a89de3e52ca797
835
py
Python
ball_finder.py
daniyalmaroufi/ball_tracker
cefe2ae5a44efd59b51e769df92891510e788277
[ "Apache-2.0" ]
null
null
null
ball_finder.py
daniyalmaroufi/ball_tracker
cefe2ae5a44efd59b51e769df92891510e788277
[ "Apache-2.0" ]
null
null
null
ball_finder.py
daniyalmaroufi/ball_tracker
cefe2ae5a44efd59b51e769df92891510e788277
[ "Apache-2.0" ]
null
null
null
import cv2 import numpy as np cap=cv2.VideoCapture(0) max_radius=0 max_center=(0,0) lower=np.array([7,137,132]) upper=np.array([25,255,255]) while True: ret, frame = cap.read() if frame is None: break hsv=cv2.cvtColor(frame,cv2.COLOR_BGR2HSV) out=cv2.inRange(hsv,lower,upper) erosion=cv...
18.977273
77
0.640719
import cv2 import numpy as np cap=cv2.VideoCapture(0) max_radius=0 max_center=(0,0) lower=np.array([7,137,132]) upper=np.array([25,255,255]) while True: ret, frame = cap.read() if frame is None: break hsv=cv2.cvtColor(frame,cv2.COLOR_BGR2HSV) out=cv2.inRange(hsv,lower,upper) erosion=cv...
0
0
0
482cc4f47d8b8d0dcca00547e7c10c5371ad6158
5,760
py
Python
mycroft/enclosure/display_manager.py
assistent-cat/mycroft-core
6f8bae6ba136c9dd66ca47aaadd75e214d006190
[ "Apache-2.0" ]
6,099
2016-05-17T19:41:56.000Z
2022-03-31T15:34:48.000Z
mycroft/enclosure/display_manager.py
assistent-cat/mycroft-core
6f8bae6ba136c9dd66ca47aaadd75e214d006190
[ "Apache-2.0" ]
2,567
2016-05-20T16:23:11.000Z
2022-03-23T01:54:39.000Z
mycroft/enclosure/display_manager.py
assistent-cat/mycroft-core
6f8bae6ba136c9dd66ca47aaadd75e214d006190
[ "Apache-2.0" ]
1,563
2016-05-20T15:06:21.000Z
2022-03-30T01:28:12.000Z
# Copyright 2017 Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
30.315789
88
0.66059
# Copyright 2017 Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
519
0
188
6c862f20c5d3e486d175bf3acd79343a9866965f
1,403
py
Python
rsa/rsa.py
VirangParekh/Rabin-Research
9a7f2e5b90bb9dcfde839976d7f22a4166c80025
[ "MIT" ]
null
null
null
rsa/rsa.py
VirangParekh/Rabin-Research
9a7f2e5b90bb9dcfde839976d7f22a4166c80025
[ "MIT" ]
1
2021-12-25T07:18:25.000Z
2021-12-25T07:18:25.000Z
rsa/rsa.py
VirangParekh/Rabin-Research
9a7f2e5b90bb9dcfde839976d7f22a4166c80025
[ "MIT" ]
null
null
null
from typing import Any, Tuple from Crypto.Cipher import PKCS1_OAEP from Crypto.PublicKey import RSA def keyGen(key_size: int) -> Tuple[Any, Any]: """Genrates key for RSA algorithm. Parameters ---------- key_size : int Size of key """ key_pair = RSA.generate(key_size) private_key...
20.940299
67
0.637919
from typing import Any, Tuple from Crypto.Cipher import PKCS1_OAEP from Crypto.PublicKey import RSA def keyGen(key_size: int) -> Tuple[Any, Any]: """Genrates key for RSA algorithm. Parameters ---------- key_size : int Size of key """ key_pair = RSA.generate(key_size) private_key...
0
0
0
187fd1823b90924a4639f10746378163e4c943d5
21,116
py
Python
veracode-da-reset-scheduler.py
dennismedeiros/veracode-da-reset-recheduler
c2c7b583371443de2bdcd1b2dd766a70acf78274
[ "MIT" ]
null
null
null
veracode-da-reset-scheduler.py
dennismedeiros/veracode-da-reset-recheduler
c2c7b583371443de2bdcd1b2dd766a70acf78274
[ "MIT" ]
null
null
null
veracode-da-reset-scheduler.py
dennismedeiros/veracode-da-reset-recheduler
c2c7b583371443de2bdcd1b2dd766a70acf78274
[ "MIT" ]
null
null
null
import sys import requests import getopt import json import calendar import math from datetime import datetime, timezone, timedelta from veracode_api_signing.plugin_requests import RequestsAuthPluginVeracodeHMAC api_base = "https://api.veracode.com/was/configservice/v1/" headers = { "User-Agent": "Dynamic Analysi...
36.916084
140
0.667693
import sys import requests import getopt import json import calendar import math from datetime import datetime, timezone, timedelta from veracode_api_signing.plugin_requests import RequestsAuthPluginVeracodeHMAC api_base = "https://api.veracode.com/was/configservice/v1/" headers = { "User-Agent": "Dynamic Analysi...
15,689
255
531
1a4b3288f13e95b037d8ec4988f07395f199a3ba
1,293
py
Python
students/K33401/Nguyen_tuan/lap3/my_app/lap3/urls.py
emina13/ITMO_ICT_WebDevelopment_2021-2022
498a6138e352e7e0ca40d1eb301bc29416158f51
[ "MIT" ]
7
2021-09-02T08:20:58.000Z
2022-01-12T11:48:07.000Z
students/K33401/Nguyen_tuan/lap3/my_app/lap3/urls.py
emina13/ITMO_ICT_WebDevelopment_2021-2022
498a6138e352e7e0ca40d1eb301bc29416158f51
[ "MIT" ]
76
2021-09-17T23:01:50.000Z
2022-03-18T16:42:03.000Z
students/K33401/Nguyen_tuan/lap3/my_app/lap3/urls.py
emina13/ITMO_ICT_WebDevelopment_2021-2022
498a6138e352e7e0ca40d1eb301bc29416158f51
[ "MIT" ]
60
2021-09-04T16:47:39.000Z
2022-03-21T04:41:27.000Z
from django.contrib import admin from django.urls import path, include from .views import * urlpatterns = [ path('staff/all', StaffListView.as_view()), path('staff/<int:pk>', StaffRetrieveView.as_view()), path('staff/update/<int:pk>', StaffUpdateView.as_view()), path('staff/new', StaffCreateV...
39.181818
70
0.668987
from django.contrib import admin from django.urls import path, include from .views import * urlpatterns = [ path('staff/all', StaffListView.as_view()), path('staff/<int:pk>', StaffRetrieveView.as_view()), path('staff/update/<int:pk>', StaffUpdateView.as_view()), path('staff/new', StaffCreateV...
0
0
0
136e5cea11ebe14ca22086997403538c7375eb0f
2,274
py
Python
models/resnet.py
sin1012/kaggle-birdcall-identification
737ccca47d66009b4d14fb8e5ba3c6226fd2fa1b
[ "MIT" ]
1
2021-02-11T10:35:02.000Z
2021-02-11T10:35:02.000Z
models/resnet.py
sin1012/kaggle-birdcall-identification
737ccca47d66009b4d14fb8e5ba3c6226fd2fa1b
[ "MIT" ]
null
null
null
models/resnet.py
sin1012/kaggle-birdcall-identification
737ccca47d66009b4d14fb8e5ba3c6226fd2fa1b
[ "MIT" ]
null
null
null
import torch.nn as nn from torchvision import models import torch.nn.functional as F import torch """ # https://zhuanlan.zhihu.com/p/93806755 class res50(torch.nn.Module): def __init__(self, num_classes): super(res50, self).__init__() resnet = resnet50(pretrained=True) self.bac...
34.984615
72
0.547493
import torch.nn as nn from torchvision import models import torch.nn.functional as F import torch class ResNet(nn.Module): def __init__(self, base_model_name: str, pretrained=False, num_classes=264): super().__init__() base_model = models.__getattribute__(base_model_name...
1,028
3
81
41929837401832ee79471043f80fbf8fdcd626c3
218
py
Python
findmax_a0201.py
lsm4446/study_python
d05077b319c98007af26c92f69f5d59fe33483d0
[ "BSD-2-Clause" ]
1
2020-02-17T01:25:35.000Z
2020-02-17T01:25:35.000Z
findmax_a0201.py
lsm4446/study_python
d05077b319c98007af26c92f69f5d59fe33483d0
[ "BSD-2-Clause" ]
2
2021-03-31T19:32:47.000Z
2021-12-13T20:33:30.000Z
findmax_a0201.py
lsm4446/study_python
d05077b319c98007af26c92f69f5d59fe33483d0
[ "BSD-2-Clause" ]
null
null
null
v = [17, 92, 18, 33, 58, 7, 33, 42, 79, 37] print(find_max(v))
19.818182
44
0.454128
def find_max(a): n = len(a) max_v = a[0] for i in range(1, n-1): if a[i] > max_v: max_v = a[i] return max_v v = [17, 92, 18, 33, 58, 7, 33, 42, 79, 37] print(find_max(v))
128
0
23
aad07478504a872413e780025845c6c8770504f0
82
py
Python
rest-api/flask_app/database/__init__.py
sinedie/Flask-Svelte-Websockets-Nginx-Docker
76daeec2c76f9f27ca526f53393ab4363020b92b
[ "WTFPL" ]
4
2021-11-21T14:04:15.000Z
2022-03-20T15:28:14.000Z
rest-api/flask_app/database/__init__.py
sinedie/Utimate-flask-websocket-template
76daeec2c76f9f27ca526f53393ab4363020b92b
[ "WTFPL" ]
null
null
null
rest-api/flask_app/database/__init__.py
sinedie/Utimate-flask-websocket-template
76daeec2c76f9f27ca526f53393ab4363020b92b
[ "WTFPL" ]
null
null
null
from flask_app.database.db import * from flask_app.database.models.User import *
20.5
44
0.804878
from flask_app.database.db import * from flask_app.database.models.User import *
0
0
0
5243d2c8c712d26818f8e8ea1412002a743a4516
25,802
py
Python
odin/bay/layers/count_layers.py
tirkarthi/odin-ai
7900bef82ad8801d0c73880330d5b24d9ff7cd06
[ "MIT" ]
7
2020-12-29T19:35:58.000Z
2022-01-31T21:01:30.000Z
odin/bay/layers/count_layers.py
tirkarthi/odin-ai
7900bef82ad8801d0c73880330d5b24d9ff7cd06
[ "MIT" ]
3
2020-02-06T16:44:17.000Z
2020-09-26T05:26:14.000Z
odin/bay/layers/count_layers.py
tirkarthi/odin-ai
7900bef82ad8801d0c73880330d5b24d9ff7cd06
[ "MIT" ]
6
2019-02-14T01:36:28.000Z
2020-10-30T13:16:32.000Z
from __future__ import absolute_import, division, print_function import numpy as np import tensorflow as tf from tensorflow.python import keras from tensorflow_probability.python import distributions as tfd from tensorflow_probability.python import layers as tfl from tensorflow_probability.python.internal import \ ...
38.858434
88
0.621037
from __future__ import absolute_import, division, print_function import numpy as np import tensorflow as tf from tensorflow.python import keras from tensorflow_probability.python import distributions as tfd from tensorflow_probability.python import layers as tfl from tensorflow_probability.python.internal import \ ...
6,480
0
222
d25cb3fd32b7633613323994b081ae1c14b9eeca
4,934
py
Python
tools/pe_absorbing_layer.py
qgoestch/sinecity_testcases
ec04ba707ff69b5c1b4b42e56e522855a2f34a65
[ "BSD-3-Clause" ]
null
null
null
tools/pe_absorbing_layer.py
qgoestch/sinecity_testcases
ec04ba707ff69b5c1b4b42e56e522855a2f34a65
[ "BSD-3-Clause" ]
null
null
null
tools/pe_absorbing_layer.py
qgoestch/sinecity_testcases
ec04ba707ff69b5c1b4b42e56e522855a2f34a65
[ "BSD-3-Clause" ]
1
2021-02-18T13:07:10.000Z
2021-02-18T13:07:10.000Z
# -*- coding: utf-8 -*- ## # \file pe_absorbing_layer.py # \title Definition of an absorbing layer for the parabolic equation. # \author Pierre Chobeau # \version 0.1 # \license BSD 3-Clause License # \inst UMRAE (Ifsttar Nantes), LAUM (Le Mans Université) # \date 2017, 20 Nov. ## import numpy as np ...
39.790323
79
0.59546
# -*- coding: utf-8 -*- ## # \file pe_absorbing_layer.py # \title Definition of an absorbing layer for the parabolic equation. # \author Pierre Chobeau # \version 0.1 # \license BSD 3-Clause License # \inst UMRAE (Ifsttar Nantes), LAUM (Le Mans Université) # \date 2017, 20 Nov. ## import numpy as np ...
0
0
0
140f8439b5d15391db4146dff52f3c3f1194c8fe
38,736
py
Python
pyinstaller-1.5.1/mf.py
rafidhoda/differentiator_utility
b30ef54abef5bde46fb2d3eac8cb43218a7a4c17
[ "Xnet", "X11" ]
null
null
null
pyinstaller-1.5.1/mf.py
rafidhoda/differentiator_utility
b30ef54abef5bde46fb2d3eac8cb43218a7a4c17
[ "Xnet", "X11" ]
null
null
null
pyinstaller-1.5.1/mf.py
rafidhoda/differentiator_utility
b30ef54abef5bde46fb2d3eac8cb43218a7a4c17
[ "Xnet", "X11" ]
null
null
null
# # Copyright (C) 2005, Giovanni Bajo # # Based on previous work under copyright (c) 2002 McMillan Enterprises, Inc. # # This program 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 2 # of the L...
34.960289
126
0.531263
# # Copyright (C) 2005, Giovanni Bajo # # Based on previous work under copyright (c) 2002 McMillan Enterprises, Inc. # # This program 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 2 # of the L...
25,945
911
1,829
e64e863a0b58c3f15bec05073314440019656578
1,201
py
Python
examples/precession/run.py
davidcortesortuno/finmag
9ac0268d2c0e45faf1284cee52a73525aa589e2b
[ "BSL-1.0" ]
10
2018-03-24T07:43:17.000Z
2022-03-26T10:42:27.000Z
examples/precession/run.py
davidcortesortuno/finmag
9ac0268d2c0e45faf1284cee52a73525aa589e2b
[ "BSL-1.0" ]
21
2018-03-26T15:08:53.000Z
2021-07-10T16:11:14.000Z
examples/precession/run.py
davidcortesortuno/finmag
9ac0268d2c0e45faf1284cee52a73525aa589e2b
[ "BSL-1.0" ]
7
2018-04-09T11:50:48.000Z
2021-06-10T09:23:25.000Z
import os import numpy as np import dolfin as df import matplotlib.pyplot as plt from finmag import Simulation from finmag.energies import Demag, Exchange MODULE_DIR = os.path.dirname(os.path.abspath(__file__)) IMAGE = os.path.join(MODULE_DIR, 'precession.png') ts = np.linspace(0, 3e-10) subfigures = ("without prece...
29.292683
82
0.666112
import os import numpy as np import dolfin as df import matplotlib.pyplot as plt from finmag import Simulation from finmag.energies import Demag, Exchange MODULE_DIR = os.path.dirname(os.path.abspath(__file__)) IMAGE = os.path.join(MODULE_DIR, 'precession.png') ts = np.linspace(0, 3e-10) def run_simulation(do_preces...
390
0
23
40225abe760d693f16341c302f8c573ee9c5473a
816
py
Python
examples/frequency_analysis_histogram.py
gregariouspanda/typex
750008dcdfe40b185ae8b3737807d0e639d0cc68
[ "MIT" ]
null
null
null
examples/frequency_analysis_histogram.py
gregariouspanda/typex
750008dcdfe40b185ae8b3737807d0e639d0cc68
[ "MIT" ]
null
null
null
examples/frequency_analysis_histogram.py
gregariouspanda/typex
750008dcdfe40b185ae8b3737807d0e639d0cc68
[ "MIT" ]
2
2017-12-11T04:22:55.000Z
2017-12-11T19:50:13.000Z
#!/usr/bin/env python3 import sys import matplotlib.pyplot as plt import numpy as np from typex.encryptor import Encryptor plt.rcdefaults() input_text = sys.stdin.read() letter_appearances = {} for char in Encryptor.ALPHABET: letter_appearances[char] = 0 for char in input_text: if char.upper() in Encryptor.A...
26.322581
70
0.747549
#!/usr/bin/env python3 import sys import matplotlib.pyplot as plt import numpy as np from typex.encryptor import Encryptor plt.rcdefaults() input_text = sys.stdin.read() letter_appearances = {} for char in Encryptor.ALPHABET: letter_appearances[char] = 0 for char in input_text: if char.upper() in Encryptor.A...
0
0
0
74b752dff6dd5efadda095f5b6bf56e760c586a4
7,851
py
Python
inventory/inventory/inventory/api/controllers/v1/__init__.py
xe1gyq/metal
25a21d840d4b846c5aacd054b266cdcb6db799e5
[ "Apache-2.0" ]
null
null
null
inventory/inventory/inventory/api/controllers/v1/__init__.py
xe1gyq/metal
25a21d840d4b846c5aacd054b266cdcb6db799e5
[ "Apache-2.0" ]
null
null
null
inventory/inventory/inventory/api/controllers/v1/__init__.py
xe1gyq/metal
25a21d840d4b846c5aacd054b266cdcb6db799e5
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2018 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # import pecan from pecan import rest from inventory.api.controllers.v1 import base from inventory.api.controllers.v1 import cpu from inventory.api.controllers.v1 import ethernet_port from inventory.api.controllers.v1 import host...
39.452261
75
0.440708
# # Copyright (c) 2018 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # import pecan from pecan import rest from inventory.api.controllers.v1 import base from inventory.api.controllers.v1 import cpu from inventory.api.controllers.v1 import ethernet_port from inventory.api.controllers.v1 import host...
5,450
0
79
583941451aed5816930ab28bef8e0198021e08fd
475
py
Python
thumbor_extras/detectors/tests/dnn_face_detector_test.py
imaus10/thumbor_extras
f58180c20b158944c428287bdc36715454ac88ea
[ "MIT" ]
null
null
null
thumbor_extras/detectors/tests/dnn_face_detector_test.py
imaus10/thumbor_extras
f58180c20b158944c428287bdc36715454ac88ea
[ "MIT" ]
1
2022-01-24T01:58:52.000Z
2022-01-24T01:58:52.000Z
thumbor_extras/detectors/tests/dnn_face_detector_test.py
imaus10/thumbor_extras
f58180c20b158944c428287bdc36715454ac88ea
[ "MIT" ]
null
null
null
import pytest from thumbor_extras.detectors.dnn_face_detector import Detector @pytest.mark.parametrize('image_context_arg', [ 'face_image_context', 'gray_face_image_context', 'cmyk_face_image_context' ])
39.583333
78
0.804211
import pytest from thumbor_extras.detectors.dnn_face_detector import Detector @pytest.mark.parametrize('image_context_arg', [ 'face_image_context', 'gray_face_image_context', 'cmyk_face_image_context' ]) def test_should_detect_one_face(image_context_arg, request): image_context = request.getfixturevalue(image_...
244
0
22
e4e4e7645e91953a23f21606ced25be76fbd2205
746
py
Python
src/__main__.py
Ewpratten/Longboard-HUD
973745f895c8c0a71e6684c853799a9b35160c67
[ "MIT" ]
null
null
null
src/__main__.py
Ewpratten/Longboard-HUD
973745f895c8c0a71e6684c853799a9b35160c67
[ "MIT" ]
null
null
null
src/__main__.py
Ewpratten/Longboard-HUD
973745f895c8c0a71e6684c853799a9b35160c67
[ "MIT" ]
null
null
null
import time hall1 = Sensor(1) hall1.enable() # set start times to show display is working t1 = 999 while True: td1 = hall1.getDiff() if td1 != None: t1 = td1 printToDisplay(t1)
16.577778
65
0.663539
import time def printToDisplay(text): print("Display: " + str(text)) class Sensor(object): def __init__(self, id): self.id = id self.enabled = False self.saftey = True # Must disable to use, just a saftey feature self.lasttime = time.clock() def enable(self): self.saftey = False def disable(self): ...
389
0
169
68078f27b729fd91dbdb5c54a57c4c3759703cec
15,955
py
Python
jc_curve25519.py
david-oswald/jc_curve25519
fa65318cb37507bdc2e5dab6433fd9518991953f
[ "MIT" ]
23
2016-02-07T16:17:50.000Z
2021-04-24T13:58:25.000Z
jc_curve25519.py
petrs/jc_curve25519
d1b13138fe80145200c42eba713480525c50ec19
[ "MIT" ]
5
2019-04-12T14:33:08.000Z
2021-05-08T07:31:58.000Z
jc_curve25519.py
petrs/jc_curve25519
d1b13138fe80145200c42eba713480525c50ec19
[ "MIT" ]
5
2018-08-20T21:00:42.000Z
2022-03-24T06:29:38.000Z
""" By David Oswald, d.f.oswald@cs.bham.ac.uk 26 August 2015 Some of this code is based on information or code from - Sam Kerr: http://samuelkerr.com/?p=431 - Eli Bendersky: http://eli.thegreenplace.net/2009/03/07/computing-modular-square-roots-in-python/ - http://cr.yp.to/highspeed/naclcrypto-20090310.pdf,...
30.741811
120
0.558195
""" By David Oswald, d.f.oswald@cs.bham.ac.uk 26 August 2015 Some of this code is based on information or code from - Sam Kerr: http://samuelkerr.com/?p=431 - Eli Bendersky: http://eli.thegreenplace.net/2009/03/07/computing-modular-square-roots-in-python/ - http://cr.yp.to/highspeed/naclcrypto-20090310.pdf,...
6,376
7,813
46
36aeae624d800b1126072615eb1b4ee584a4eae3
1,126
py
Python
027_solution.py
ed-cetera/project-euler-python
59359991ba9bbd7d419e2c7e133d67a6992695b1
[ "MIT" ]
null
null
null
027_solution.py
ed-cetera/project-euler-python
59359991ba9bbd7d419e2c7e133d67a6992695b1
[ "MIT" ]
null
null
null
027_solution.py
ed-cetera/project-euler-python
59359991ba9bbd7d419e2c7e133d67a6992695b1
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import math import time if __name__ == "__main__": start = time.time() main() end = time.time() print("Duration: {0:0.6f}s".format(end - start))
24.478261
62
0.550622
#!/usr/bin/env python3 import math import time def is_prime(number): if number < 2: return False for divisor in range(2, int(math.sqrt(number)) + 1): if number % divisor == 0: return False return True def main(): upper_limit_b = 1000 noninclusive_absolute_limit_a = 1...
891
0
46
5eea5e403210f775ae6dcdbeaa2ec5a1460617ab
4,687
py
Python
Scripts/unitydownloadurl.py
litefeel/Unity-CrossPlatformAPI
93ed5f643b681ad318b871ea27cbf3cdb9b27e43
[ "Apache-2.0" ]
15
2018-03-07T07:09:09.000Z
2021-03-11T01:27:30.000Z
Scripts/unitydownloadurl.py
litefeel/Unity-CrossPlatformAPI
93ed5f643b681ad318b871ea27cbf3cdb9b27e43
[ "Apache-2.0" ]
null
null
null
Scripts/unitydownloadurl.py
litefeel/Unity-CrossPlatformAPI
93ed5f643b681ad318b871ea27cbf3cdb9b27e43
[ "Apache-2.0" ]
5
2018-03-16T03:51:20.000Z
2021-11-18T17:20:30.000Z
#!/bin/python # coding=utf-8 from optparse import OptionParser import urllib import re osmap = { 'mac' : 'Mac', 'osx' : 'Mac', 'win' : 'Windows', 'win64' : 'Windows64', 'win32' : 'Windows32', } # -------------- main -------------- if __name__ == '__main__': usage = "usage: %prog [optio...
36.333333
157
0.610412
#!/bin/python # coding=utf-8 from optparse import OptionParser import urllib import re def getRealBetaUrlTuples(pageUrl): f = urllib.urlopen(pageUrl) data = f.read() # <a href="http://beta.unity3d.com/download/0df597686c75/Windows64EditorInstaller/UnitySetup64-5.4.0b19.exe">Unity Editor 64-bit &#40;Win&#...
3,453
0
138
1c9cb6f9f6c27e46815710c307595f67692f16b9
10,220
py
Python
esp8266/clock/dictionary.py
JiangYangJie/Embedded
70dba3a1e5c1fb7b9a7d8b633a5fc05138894456
[ "MIT" ]
1
2019-07-23T07:14:07.000Z
2019-07-23T07:14:07.000Z
esp8266/clock/dictionary.py
JiangYangJie/Embedded
70dba3a1e5c1fb7b9a7d8b633a5fc05138894456
[ "MIT" ]
null
null
null
esp8266/clock/dictionary.py
JiangYangJie/Embedded
70dba3a1e5c1fb7b9a7d8b633a5fc05138894456
[ "MIT" ]
2
2019-07-22T11:42:55.000Z
2019-12-15T01:43:19.000Z
dicts={ 0xe88f9c: [0x00,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,0x07,0x00,0x02,0x01,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x30,0x00,0x00, 0x00,0x00,0x1C,0x18,0x18,0xFF,0x18,0x18,0x10,0x00,0xFF,0x02,0x01,0x81,0xC0,0xC0,0x41,0x01,0xFF,0x07,0x0D,0x19,0x31,0x61,0xC1,0x01,0x01,0x01,0x01,0x0...
116.136364
162
0.773092
dicts={ 0xe88f9c: [0x00,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,0x07,0x00,0x02,0x01,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x30,0x00,0x00, 0x00,0x00,0x1C,0x18,0x18,0xFF,0x18,0x18,0x10,0x00,0xFF,0x02,0x01,0x81,0xC0,0xC0,0x41,0x01,0xFF,0x07,0x0D,0x19,0x31,0x61,0xC1,0x01,0x01,0x01,0x01,0x0...
0
0
0
7d4a312a91cae98ca206b778df797f5e09d5ada2
3,468
py
Python
models/losses.py
jlfilho/sr-tf2
5309c69d252aad7a8e9260106353fd8acca29c6a
[ "MIT" ]
null
null
null
models/losses.py
jlfilho/sr-tf2
5309c69d252aad7a8e9260106353fd8acca29c6a
[ "MIT" ]
null
null
null
models/losses.py
jlfilho/sr-tf2
5309c69d252aad7a8e9260106353fd8acca29c6a
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np # computes VGG loss or content loss
45.631579
233
0.674164
import tensorflow as tf import numpy as np class VGGLossNoActivation(object): def __init__(self, image_shape,loss_fn): self.model = self.create_model(image_shape) self.loss_fn = loss_fn def create_model(self,image_shape): vgg19 = tf.keras.applications.vgg19....
2,996
14
360
5e138e09c8b64263e8eeb8357515801717bba6fb
738
py
Python
pytglib/api/functions/get_suitable_discussion_chats.py
iTeam-co/pytglib
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
6
2019-10-30T08:57:27.000Z
2021-02-08T14:17:43.000Z
pytglib/api/functions/get_suitable_discussion_chats.py
iTeam-co/python-telegram
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
1
2021-08-19T05:44:10.000Z
2021-08-19T07:14:56.000Z
pytglib/api/functions/get_suitable_discussion_chats.py
iTeam-co/python-telegram
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
5
2019-12-04T05:30:39.000Z
2021-05-21T18:23:32.000Z
from ..utils import Object class GetSuitableDiscussionChats(Object): """ Returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel. Basic group chats need to be first upgraded to supergroups before they can be set as a discussion group Attributes: ...
23.806452
214
0.663957
from ..utils import Object class GetSuitableDiscussionChats(Object): """ Returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel. Basic group chats need to be first upgraded to supergroups before they can be set as a discussion group Attributes: ...
149
0
53