hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
cec890183bbac8661c59286f3a8b1f4c191a7210
19,239
py
Python
pyredner/shape.py
yihang99/redner
4c7e1b5c7eb2be079f4eb99e794aa6609de887f5
[ "MIT" ]
null
null
null
pyredner/shape.py
yihang99/redner
4c7e1b5c7eb2be079f4eb99e794aa6609de887f5
[ "MIT" ]
null
null
null
pyredner/shape.py
yihang99/redner
4c7e1b5c7eb2be079f4eb99e794aa6609de887f5
[ "MIT" ]
null
null
null
import pyredner import torch import math import redner from typing import Optional def compute_vertex_normal(vertices: torch.Tensor, indices: torch.Tensor, weighting_scheme: str = 'max'): """ Compute vertex normal by weighted average of nearby face normal...
44.74186
147
0.569208
007949e214fdd7b2f5836a3e55ea1db058df576a
15,967
py
Python
src/roar/compound_image_folder_dataset.py
YaNgZhAnG-V5/RoarTorch
c994e16f956f1a76edda9bb1cca5998cb06f1ce3
[ "MIT" ]
null
null
null
src/roar/compound_image_folder_dataset.py
YaNgZhAnG-V5/RoarTorch
c994e16f956f1a76edda9bb1cca5998cb06f1ce3
[ "MIT" ]
null
null
null
src/roar/compound_image_folder_dataset.py
YaNgZhAnG-V5/RoarTorch
c994e16f956f1a76edda9bb1cca5998cb06f1ce3
[ "MIT" ]
null
null
null
from copy import deepcopy import numpy as np import torch import torchvision import torchvision.transforms as T from PIL import Image from torch.utils.data import DataLoader from src.dataset import factory as dataset_factory from src.roar import roar_core from src.utils.sysutils import get_cores_count class Compoun...
46.281159
142
0.63174
e1e76488c050925ac08cc3faa725e2213bc97fbd
107
py
Python
track/__init__.py
yxtj/VideoServing
52d1c1c97021f11cc4d77c181ac1144fe3a789ce
[ "MIT" ]
null
null
null
track/__init__.py
yxtj/VideoServing
52d1c1c97021f11cc4d77c181ac1144fe3a789ce
[ "MIT" ]
null
null
null
track/__init__.py
yxtj/VideoServing
52d1c1c97021f11cc4d77c181ac1144fe3a789ce
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .centroidtracker import CentroidTracker from .sorttracker import SortTracker
21.4
44
0.766355
5a3933c14b8886718458269603da2239d36db66a
4,879
py
Python
src/TeamAssigner.py
unithmallavaram/TeamFormationAssistant_V2
c2fd982765adf0c716bb836732a4dcae66c3a2ce
[ "MIT" ]
2
2020-09-24T04:38:02.000Z
2020-10-05T01:37:53.000Z
src/TeamAssigner.py
unithmallavaram/TeamFormationAssistant_V2
c2fd982765adf0c716bb836732a4dcae66c3a2ce
[ "MIT" ]
20
2020-09-21T01:31:50.000Z
2020-10-01T11:37:25.000Z
src/TeamAssigner.py
unithmallavaram/TeamFormationAssistant_V2
c2fd982765adf0c716bb836732a4dcae66c3a2ce
[ "MIT" ]
3
2020-09-25T21:05:11.000Z
2021-09-11T15:12:42.000Z
import pandas as pd import mysql.connector import math connection = mysql.connector.connect( host="sefall2021.cosnmrdyk6wi.us-east-2.rds.amazonaws.com", database='teamformationassistant', user="root", password="SEFall2021" ) def persistTeamData(teamData): if connection.is_connected(): cursor = connect...
38.417323
179
0.651158
72920b8387be430edac3ae75a1cfb39808a8ecb8
455
py
Python
evap/evaluation/migrations/0038_questionnaire_staff_only.py
JenniferStamm/EvaP
1d71e4efcd34d01f28e30c6026c8dcc708921193
[ "MIT" ]
null
null
null
evap/evaluation/migrations/0038_questionnaire_staff_only.py
JenniferStamm/EvaP
1d71e4efcd34d01f28e30c6026c8dcc708921193
[ "MIT" ]
null
null
null
evap/evaluation/migrations/0038_questionnaire_staff_only.py
JenniferStamm/EvaP
1d71e4efcd34d01f28e30c6026c8dcc708921193
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('evaluation', '0037_specify_on_delete'), ] operations = [ migrations.AddField( model_name='questionnaire', ...
22.75
92
0.632967
fa3675b07dd3eed75f3c7e37cade05d365bb4341
6,355
py
Python
test/functional/rpc_createmultisig.py
nccproject/ncc
068ccc82a73d28136546095261ad8ccef7e541a3
[ "MIT" ]
null
null
null
test/functional/rpc_createmultisig.py
nccproject/ncc
068ccc82a73d28136546095261ad8ccef7e541a3
[ "MIT" ]
null
null
null
test/functional/rpc_createmultisig.py
nccproject/ncc
068ccc82a73d28136546095261ad8ccef7e541a3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test multisig RPCs""" from test_framework.test_framework import BitcoinTestFramework from test_framewo...
41.809211
160
0.654131
f670947956cda28cd9f49c37f93fda53e1f88ca8
362
py
Python
sponsor/helpers.py
Make-Munich/SaBoT
cabc7e2f5e0f7166d94d2ef683f75d8d3be02834
[ "MIT" ]
19
2016-04-09T10:13:26.000Z
2020-06-21T23:14:16.000Z
sponsor/helpers.py
Make-Munich/SaBoT
cabc7e2f5e0f7166d94d2ef683f75d8d3be02834
[ "MIT" ]
13
2017-01-14T20:42:45.000Z
2019-08-10T22:48:44.000Z
sponsor/helpers.py
Make-Munich/SaBoT
cabc7e2f5e0f7166d94d2ef683f75d8d3be02834
[ "MIT" ]
9
2016-04-09T12:52:48.000Z
2018-08-16T19:08:16.000Z
import os.path from django.conf import settings def sponsor_filesanitize(fileattr, sponsor): f = getattr(sponsor, fileattr) if not f: return None absolutePath = settings.MEDIA_ROOT + f.name (base, name) = os.path.split(absolutePath) (oldname, ext) = os.path.splitext(name) newname = sponsor.contact.companyNa...
21.294118
44
0.748619
c683449b2b44f124b2a5867406368bade0d19af1
2,272
py
Python
fno4vc/project_path.py
slimgroup/FNOs4VC
53504f72c8280442da41a4340cf0e4455556f97e
[ "MIT" ]
null
null
null
fno4vc/project_path.py
slimgroup/FNOs4VC
53504f72c8280442da41a4340cf0e4455556f97e
[ "MIT" ]
null
null
null
fno4vc/project_path.py
slimgroup/FNOs4VC
53504f72c8280442da41a4340cf0e4455556f97e
[ "MIT" ]
null
null
null
import git import os from typing import Optional def gitdir() -> str: """Find the absolute path to the GitHub repository root. """ git_repo = git.Repo(os.getcwd(), search_parent_directories=True) git_root = git_repo.git.rev_parse('--show-toplevel') return git_root def datadir(path: str, mkdir: O...
34.424242
79
0.675176
2aa8d99b6e1a1720cc940aa7842f281e4e14c140
1,310
py
Python
redditchat/core/migrations/0003_auto__add_field_room_shortname_display.py
reverie/seddit.com
3ffeeae66c85a3b4dd0f164929f171bd7dc23a2f
[ "MIT" ]
null
null
null
redditchat/core/migrations/0003_auto__add_field_room_shortname_display.py
reverie/seddit.com
3ffeeae66c85a3b4dd0f164929f171bd7dc23a2f
[ "MIT" ]
4
2020-02-11T23:01:20.000Z
2021-06-10T17:58:40.000Z
redditchat/core/migrations/0003_auto__add_field_room_shortname_display.py
reverie/seddit.com
3ffeeae66c85a3b4dd0f164929f171bd7dc23a2f
[ "MIT" ]
null
null
null
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Room.shortname_display' db.add_column('core_room', 'shortname_display', self.gf('django.db...
38.529412
149
0.601527
d95c653bfae34df2c41d126c6226dde8b2556c7e
5,812
py
Python
test/functional/p2p_fingerprint.py
mitchelvanamstel/SAPP
8ccd8b949c814388f5f0e2e20e8016d38e291876
[ "MIT" ]
83
2018-11-17T02:20:34.000Z
2022-01-26T05:05:44.000Z
test/functional/p2p_fingerprint.py
mitchelvanamstel/SAPP
8ccd8b949c814388f5f0e2e20e8016d38e291876
[ "MIT" ]
42
2017-09-12T03:09:56.000Z
2021-01-27T18:43:28.000Z
test/functional/p2p_fingerprint.py
mitchelvanamstel/SAPP
8ccd8b949c814388f5f0e2e20e8016d38e291876
[ "MIT" ]
37
2015-10-02T19:33:04.000Z
2021-04-21T22:26:23.000Z
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test various fingerprinting protections. If an stale block more than a month old or its header are requeste...
37.986928
79
0.685478
01cb7b968bb34021e5f08a583b90562a727000c9
2,084
py
Python
apps/account/utils.py
kush-josh/smart-content
6070a72d4e190eb5de63495c094785ab4c190b5b
[ "MIT" ]
null
null
null
apps/account/utils.py
kush-josh/smart-content
6070a72d4e190eb5de63495c094785ab4c190b5b
[ "MIT" ]
7
2018-02-23T09:35:55.000Z
2018-02-23T11:56:18.000Z
apps/account/utils.py
joshtechnologygroup/smart-content
6070a72d4e190eb5de63495c094785ab4c190b5b
[ "MIT" ]
1
2018-02-25T18:56:33.000Z
2018-02-25T18:56:33.000Z
from apps.account import models as account_models from libs import peers_utils new_user_url = "addAuthor/" new_contract_url = "addContract/" new_content_url = "addContent/" updated_content_url = "addContentContract/" def broadcast_new_user_account(account): """ :param account: :return: """ if ac...
23.954023
81
0.666507
0c1c74d1aaa30c0e4ef78d135d20eca469e1f1b6
2,180
py
Python
bindings/python/cntk/ops/tests/combine_test.py
digimatronics/MS_Deep_Learning_Cognitive
4a6e8488fb5f3111151431289bbb72707f8c9c13
[ "RSA-MD" ]
1
2021-07-16T05:38:50.000Z
2021-07-16T05:38:50.000Z
bindings/python/cntk/ops/tests/combine_test.py
trevhartzell/CNTK
dcdbd0d787580206d99d00d49c7db2fe4236431a
[ "RSA-MD" ]
null
null
null
bindings/python/cntk/ops/tests/combine_test.py
trevhartzell/CNTK
dcdbd0d787580206d99d00d49c7db2fe4236431a
[ "RSA-MD" ]
1
2021-01-21T05:58:03.000Z
2021-01-21T05:58:03.000Z
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.md file in the project root # for full license information. # ============================================================================== """ Unit tests for combine operation, only forward pass is tested """ from __futur...
33.538462
104
0.659174
f192fb00f54200570b03de6d09375f974bba3efc
888
py
Python
core/urls.py
LFTPadilla/backend
701ed24d519b3e70beeecffb51c11fc7fe3d8c14
[ "MIT" ]
null
null
null
core/urls.py
LFTPadilla/backend
701ed24d519b3e70beeecffb51c11fc7fe3d8c14
[ "MIT" ]
null
null
null
core/urls.py
LFTPadilla/backend
701ed24d519b3e70beeecffb51c11fc7fe3d8c14
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- """ License: MIT Copyright (c) 2019 - present AppSeed.us """ from django.contrib import admin from django.urls import path, include # add this from django.contrib.auth.models import User from rest_framework import routers router = routers.DefaultRouter() #router.register(r'', UserViewSet) ...
26.117647
82
0.663288
20ac91c1322d46b0683e04deed22b87da9255917
406
py
Python
indicoio/preprocess/pdf.py
IndicoDataSolutions/indicoio
2d92b09dddbac892934cbc4265f26ea9a4c89fac
[ "MIT" ]
null
null
null
indicoio/preprocess/pdf.py
IndicoDataSolutions/indicoio
2d92b09dddbac892934cbc4265f26ea9a4c89fac
[ "MIT" ]
3
2020-01-22T15:30:43.000Z
2020-02-10T15:50:19.000Z
indicoio/preprocess/pdf.py
IndicoDataSolutions/indicoio-py
2d92b09dddbac892934cbc4265f26ea9a4c89fac
[ "MIT" ]
null
null
null
from pathlib import Path import base64 def pdf_preprocess(pdf): """ Load pdfs from local filepath if not already b64 encoded """ path = Path(pdf) if path.exists(): # a filepath is provided, read and encode with path.open("rb") as f: return base64.b64encode(f.read()).dec...
23.882353
61
0.6133
6b20f9d84d79443a3539df571b982bb835d2f6d8
1,559
py
Python
vzug/vzug.py
tcinbis/python-vzug
7064fe3f00743e036bb20cd8a7e7909c91cff313
[ "Apache-2.0" ]
null
null
null
vzug/vzug.py
tcinbis/python-vzug
7064fe3f00743e036bb20cd8a7e7909c91cff313
[ "Apache-2.0" ]
null
null
null
vzug/vzug.py
tcinbis/python-vzug
7064fe3f00743e036bb20cd8a7e7909c91cff313
[ "Apache-2.0" ]
null
null
null
"""A Python Client to get Infos from V-ZUG devices.""" import logging import json import requests from yarl import URL from . import make_call from .constants import ( API, DEVICE_STATUS, ) _LOGGER = logging.getLogger(__name__) class VZUG: """A class for handling the communication with a V-ZUG device.""" ...
31.816327
108
0.649775
e81a8b428d6e12b2f1febbb65e14002ec427a172
2,969
py
Python
cv_lib/cv_lib/utils.py
elmajdma/seismic-deeplearning
bc084abe153509c40b45f8bf0f80dfda1049d7dc
[ "MIT" ]
270
2019-12-17T13:40:51.000Z
2022-03-20T10:02:11.000Z
cv_lib/cv_lib/utils.py
elmajdma/seismic-deeplearning
bc084abe153509c40b45f8bf0f80dfda1049d7dc
[ "MIT" ]
233
2019-12-18T17:59:36.000Z
2021-08-03T13:43:49.000Z
cv_lib/cv_lib/utils.py
elmajdma/seismic-deeplearning
bc084abe153509c40b45f8bf0f80dfda1049d7dc
[ "MIT" ]
118
2019-12-17T13:41:43.000Z
2022-03-29T02:06:36.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import os import logging from PIL import Image import numpy as np from matplotlib import pyplot as plt def normalize(array, MIN, MAX): """ Normalizes a segmentation image array by the global range of the data, MIN and MAX, for use ...
34.523256
99
0.677332
a27f4171c3366755409098afa7ef72e3fb7b9bea
3,048
py
Python
tests/unit/sagemaker/monitor/test_data_capture_config.py
eitansela/sagemaker-python-sdk
aa54102b5113b1d39bbbd4d9d341775f84641681
[ "Apache-2.0" ]
1
2021-07-22T00:23:51.000Z
2021-07-22T00:23:51.000Z
tests/unit/sagemaker/monitor/test_data_capture_config.py
eitansela/sagemaker-python-sdk
aa54102b5113b1d39bbbd4d9d341775f84641681
[ "Apache-2.0" ]
24
2021-05-18T07:10:27.000Z
2021-05-28T13:36:51.000Z
tests/unit/sagemaker/monitor/test_data_capture_config.py
eitansela/sagemaker-python-sdk
aa54102b5113b1d39bbbd4d9d341775f84641681
[ "Apache-2.0" ]
1
2021-09-27T04:08:37.000Z
2021-09-27T04:08:37.000Z
# Copyright 2019-2020 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://aws.amazon.com/apache2.0/ # # or in the "license" fil...
43.542857
93
0.815945
cbeb67bf1fd08a3c02cdb61e1ab99251507a47cb
453
py
Python
Others/ddcc/ddcc2020-qual/a.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
2
2020-06-12T09:54:23.000Z
2021-05-04T01:34:07.000Z
Others/ddcc/ddcc2020-qual/a.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
961
2020-06-23T07:26:22.000Z
2022-03-31T21:34:52.000Z
Others/ddcc/ddcc2020-qual/a.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- def main(): x, y = map(int, input().split()) ans = 0 if x == 1: ans += 300000 elif x == 2: ans += 200000 elif x == 3: ans += 100000 if y == 1: ans += 300000 elif y == 2: ans += 200000 elif y == 3: ...
15.1
37
0.381898
1a4f98b28bd1740021ee5fd3efdf4e08dad3127f
3,497
py
Python
tests/unit/test_cache.py
tevansuk/pip
87a2bedc170fbf9594ae6d79f3a19efc0fd63f3c
[ "MIT" ]
null
null
null
tests/unit/test_cache.py
tevansuk/pip
87a2bedc170fbf9594ae6d79f3a19efc0fd63f3c
[ "MIT" ]
null
null
null
tests/unit/test_cache.py
tevansuk/pip
87a2bedc170fbf9594ae6d79f3a19efc0fd63f3c
[ "MIT" ]
null
null
null
import os from pip._vendor.packaging.tags import Tag from pip._internal.cache import WheelCache, _hash_dict from pip._internal.models.format_control import FormatControl from pip._internal.models.link import Link from pip._internal.utils.compat import expanduser from pip._internal.utils.misc import ensure_dir def t...
35.323232
78
0.686017
02fdc4913719e38395b3e92717cbf6fe9bb6b616
4,382
py
Python
grafana_backup/dataDefinition/DataDefinition.py
primoz-p/grafana-backup-tool
13038a645a32f59483f7d7e068d953c5c98aaa5c
[ "MIT" ]
null
null
null
grafana_backup/dataDefinition/DataDefinition.py
primoz-p/grafana-backup-tool
13038a645a32f59483f7d7e068d953c5c98aaa5c
[ "MIT" ]
null
null
null
grafana_backup/dataDefinition/DataDefinition.py
primoz-p/grafana-backup-tool
13038a645a32f59483f7d7e068d953c5c98aaa5c
[ "MIT" ]
null
null
null
import abc import os from abc import ABC from grafana_backup.commons import save_json class DataDefinition(ABC): def __init__(self, settings, name): self.name = name self.backup_dir = settings.get('BACKUP_DIR') self.timestamp = settings.get('TIMESTAMP') self.limit = settings.get(...
41.339623
271
0.529895
7dbe726b3c59d90f26772d4d475bb9b4fd445fe6
5,588
py
Python
test/sessionfixtures.py
Pytwitcher/pytwitcher-api
d53ac5ad5ca113ecb7da542e8cdcbbf8c762b336
[ "BSD-3-Clause" ]
26
2015-05-13T15:49:29.000Z
2021-02-12T00:27:02.000Z
test/sessionfixtures.py
Pytwitcher/pytwitcher-api
d53ac5ad5ca113ecb7da542e8cdcbbf8c762b336
[ "BSD-3-Clause" ]
21
2015-03-15T13:39:21.000Z
2018-06-02T01:12:15.000Z
test/sessionfixtures.py
Pytwitcher/pytwitcher-api
d53ac5ad5ca113ecb7da542e8cdcbbf8c762b336
[ "BSD-3-Clause" ]
3
2016-09-16T10:53:03.000Z
2017-08-26T22:42:32.000Z
import mock import pytest import requests from pytwitcherapi import session, constants def create_mockresponse(returnvalue): """Create a response that will return the given value when calling the json method :param returnvalue: the returnvalue for the response.json method :type returnvalue: :class:`dict...
32.678363
86
0.704009
dd0b668ed4c2e0bd9ea1ac268b71815ec6ec5ed8
489
py
Python
tests/helpers.py
graingert/compose
371ea479f5995a31145ee1f597aae8c08110aa25
[ "Apache-2.0" ]
null
null
null
tests/helpers.py
graingert/compose
371ea479f5995a31145ee1f597aae8c08110aa25
[ "Apache-2.0" ]
null
null
null
tests/helpers.py
graingert/compose
371ea479f5995a31145ee1f597aae8c08110aa25
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import unicode_literals from compose.config.config import ConfigDetails from compose.config.config import ConfigFile from compose.config.config import load def build_config(contents, **kwargs): return load(build_config_details(contents, **kwargs)) def buil...
28.764706
87
0.789366
d96bef468600ed3dcdc0bc994b07361d70617610
1,651
py
Python
src/tox/package/view.py
Djailla/tox
a9ec66182dffd76cf9569d1e8b956d082b26545c
[ "MIT" ]
1
2022-03-29T12:44:45.000Z
2022-03-29T12:44:45.000Z
src/tox/package/view.py
Djailla/tox
a9ec66182dffd76cf9569d1e8b956d082b26545c
[ "MIT" ]
4
2021-03-31T20:05:34.000Z
2022-01-13T03:08:13.000Z
src/tox/package/view.py
Djailla/tox
a9ec66182dffd76cf9569d1e8b956d082b26545c
[ "MIT" ]
null
null
null
import os from itertools import chain import six from tox.reporter import verbosity1 def create_session_view(package, temp_dir): """once we build a package we cannot return that directly, as a subsequent call might delete that package (in order to do its own build); therefore we need to return a view of...
34.395833
96
0.674137
c7c71cd5a559cf610c50bfac57457cfedac770c5
57,115
py
Python
Lib/tkinter/ttk.py
shawwn/cpython
0ff8a3b374286d2218fc18f47556a5ace202dad3
[ "0BSD" ]
1,886
2021-05-03T23:58:43.000Z
2022-03-31T19:15:58.000Z
Lib/tkinter/ttk.py
shawwn/cpython
0ff8a3b374286d2218fc18f47556a5ace202dad3
[ "0BSD" ]
70
2021-05-04T23:25:35.000Z
2022-03-31T18:42:08.000Z
Lib/tkinter/ttk.py
shawwn/cpython
0ff8a3b374286d2218fc18f47556a5ace202dad3
[ "0BSD" ]
52
2021-05-04T21:26:03.000Z
2022-03-08T18:02:56.000Z
"""Ttk wrapper. This module provides classes to allow using Tk themed widget set. Ttk is based on a revised and enhanced version of TIP #48 (http://tip.tcl.tk/48) specified style engine. Its basic idea is to separate, to the extent possible, the code implementing a widget's behavior from the code implementing its ap...
34.365223
80
0.617719
3f14e5002842205715ffd89e6a0357cc8c769dd3
5,400
py
Python
savu/plugins/ring_removal/ring_removal_filtering.py
dtasev/Savu
acb2578c85472e76cb292c4242c1ed2f2332f3e3
[ "Apache-2.0" ]
null
null
null
savu/plugins/ring_removal/ring_removal_filtering.py
dtasev/Savu
acb2578c85472e76cb292c4242c1ed2f2332f3e3
[ "Apache-2.0" ]
1
2019-07-30T12:31:51.000Z
2019-07-30T12:31:51.000Z
savu/plugins/ring_removal/ring_removal_filtering.py
DTasev/Savu
acb2578c85472e76cb292c4242c1ed2f2332f3e3
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Diamond Light Source Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
41.221374
78
0.637037
7e10e294e2ba42c523107723d10e94cae28917af
11,063
py
Python
programs/tests.py
bycristhian/psp
019825e010386b6acc8c5466e7a6765218cb10d9
[ "MIT" ]
2
2020-09-04T17:06:41.000Z
2020-10-05T01:46:20.000Z
programs/tests.py
bycristhian/psp
019825e010386b6acc8c5466e7a6765218cb10d9
[ "MIT" ]
null
null
null
programs/tests.py
bycristhian/psp
019825e010386b6acc8c5466e7a6765218cb10d9
[ "MIT" ]
null
null
null
# Django from django.test import TestCase from django.urls import reverse_lazy # Models from django.contrib.auth.models import User from users.models import Profile from logs.models import Phase from programs.models import ProgrammingLanguage, Program from projects.models import Project, Module # Forms from programs...
33.322289
170
0.6143
5fd68643ea87d55fcf328d9df328b64126f0f3fd
9,757
py
Python
tensorlayer/iterate.py
awesome-archive/tensorlayer
120a79f957926475b6f3db02da71a269f8130771
[ "Apache-2.0" ]
null
null
null
tensorlayer/iterate.py
awesome-archive/tensorlayer
120a79f957926475b6f3db02da71a269f8130771
[ "Apache-2.0" ]
null
null
null
tensorlayer/iterate.py
awesome-archive/tensorlayer
120a79f957926475b6f3db02da71a269f8130771
[ "Apache-2.0" ]
1
2018-03-12T23:57:57.000Z
2018-03-12T23:57:57.000Z
#! /usr/bin/python # -*- coding: utf-8 -*- import numpy as np from six.moves import xrange def minibatches(inputs=None, targets=None, batch_size=None, shuffle=False): """Generate a generator that input a group of example in numpy.array and their labels, return the examples and labels by the given batch size....
35.871324
212
0.556524
adb3d05bf0d3c7dbf8d3e295dc5fb8e3a79aa3a4
286
py
Python
setup.py
ezdookie/django-country-site
d534a0bd80af20fd05dbf133d917155533bd628c
[ "MIT" ]
null
null
null
setup.py
ezdookie/django-country-site
d534a0bd80af20fd05dbf133d917155533bd628c
[ "MIT" ]
null
null
null
setup.py
ezdookie/django-country-site
d534a0bd80af20fd05dbf133d917155533bd628c
[ "MIT" ]
null
null
null
from setuptools import setup setup( name='django-country-site', version='0.1.0', url='https://github.com/ezdookie/django-country-site', author='ezdookie', author_email='brian@bleax.com', license='MIT', packages=['django_country_site'], zip_safe=False )
22
58
0.671329
ed38bcc8413b94fcd3835bb447cae5c1aaa787db
246,033
py
Python
config/main.py
davidpil2002/sonic-utilities
576c9efc0dc33a047b9bb31fd58b53866cd62206
[ "Apache-2.0" ]
null
null
null
config/main.py
davidpil2002/sonic-utilities
576c9efc0dc33a047b9bb31fd58b53866cd62206
[ "Apache-2.0" ]
null
null
null
config/main.py
davidpil2002/sonic-utilities
576c9efc0dc33a047b9bb31fd58b53866cd62206
[ "Apache-2.0" ]
null
null
null
#!/usr/sbin/env python import click import ipaddress import json import jsonpatch import netaddr import netifaces import os import re import subprocess import sys import time import itertools from collections import OrderedDict from generic_config_updater.generic_updater import GenericUpdater, ConfigFormat from minig...
39.296119
210
0.674804
2a3dde9e3bd483a48f160360de3862a25ad2fe6a
1,015
py
Python
2020/Day1/functiondemo1.py
vishipayyallore/learning-python_2021
e091d47d167ecb510ea0819b64a78bd58c2a42b3
[ "Apache-2.0" ]
1
2020-09-17T15:06:44.000Z
2020-09-17T15:06:44.000Z
2020/Day1/functiondemo1.py
vishipayyallore/learning-python_2020
e091d47d167ecb510ea0819b64a78bd58c2a42b3
[ "Apache-2.0" ]
null
null
null
2020/Day1/functiondemo1.py
vishipayyallore/learning-python_2020
e091d47d167ecb510ea0819b64a78bd58c2a42b3
[ "Apache-2.0" ]
null
null
null
# Variables with Global Scope name = '' age = 0 salary = 0.0 is_manager = False def get_employee_details(): # using global variables global name, age, salary, is_manager print("Starting the Function") name = input('Enter your name: ') age = int(input('Enter your age: ')) salary = float(input('...
29.852941
65
0.528079
66a87a0dd2a0a3ca61ada7fe59cb7f3d931f694e
6,597
py
Python
tests/ut/python/dataset/test_ten_crop.py
ZephyrChenzf/mindspore
8f191847cf71e12715ced96bc3575914f980127a
[ "Apache-2.0" ]
1
2020-06-17T07:05:45.000Z
2020-06-17T07:05:45.000Z
tests/ut/python/dataset/test_ten_crop.py
ZephyrChenzf/mindspore
8f191847cf71e12715ced96bc3575914f980127a
[ "Apache-2.0" ]
null
null
null
tests/ut/python/dataset/test_ten_crop.py
ZephyrChenzf/mindspore
8f191847cf71e12715ced96bc3575914f980127a
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
34.539267
117
0.690011
a2c9003674ae4f2d8facde3567026305a61228e8
3,295
py
Python
rastervision/command/train_command_config.py
xiaospica/raster-vision
aa98412245fb768762ad2920da0241b56c5ece3d
[ "Apache-2.0" ]
1
2019-07-11T02:32:29.000Z
2019-07-11T02:32:29.000Z
rastervision/command/train_command_config.py
xiaospica/raster-vision
aa98412245fb768762ad2920da0241b56c5ece3d
[ "Apache-2.0" ]
null
null
null
rastervision/command/train_command_config.py
xiaospica/raster-vision
aa98412245fb768762ad2920da0241b56c5ece3d
[ "Apache-2.0" ]
null
null
null
from copy import deepcopy import rastervision as rv from rastervision.command import (TrainCommand, CommandConfig, CommandConfigBuilder) from rastervision.protos.command_pb2 \ import CommandConfig as CommandConfigMsg from rastervision.rv_config import RVConfig from rastervision.co...
28.405172
79
0.618513
0592968fd14fb47312963c3fec2a945f78c3c709
4,432
py
Python
bitmovin_api_sdk/models/ignoring.py
jaythecaesarean/bitmovin-api-sdk-python
48166511fcb9082041c552ace55a9b66cc59b794
[ "MIT" ]
11
2019-07-03T10:41:16.000Z
2022-02-25T21:48:06.000Z
bitmovin_api_sdk/models/ignoring.py
jaythecaesarean/bitmovin-api-sdk-python
48166511fcb9082041c552ace55a9b66cc59b794
[ "MIT" ]
8
2019-11-23T00:01:25.000Z
2021-04-29T12:30:31.000Z
bitmovin_api_sdk/models/ignoring.py
jaythecaesarean/bitmovin-api-sdk-python
48166511fcb9082041c552ace55a9b66cc59b794
[ "MIT" ]
13
2020-01-02T14:58:18.000Z
2022-03-26T12:10:30.000Z
# coding: utf-8 from enum import Enum from six import string_types, iteritems from bitmovin_api_sdk.common.poscheck import poscheck_model from bitmovin_api_sdk.models.ignored_by import IgnoredBy import pprint import six class Ignoring(object): @poscheck_model def __init__(self, ignored_by=No...
31.432624
164
0.615749
b8ab7717a1ed96aee5c6e99c7569fb6ab0a6e811
1,120
py
Python
rllab/torch/algos/advantages.py
NeurIPSPaperSubmission7934/code_submission
713fce673e8e3ba30b559d4eebe6d3e4891069ed
[ "Apache-2.0" ]
null
null
null
rllab/torch/algos/advantages.py
NeurIPSPaperSubmission7934/code_submission
713fce673e8e3ba30b559d4eebe6d3e4891069ed
[ "Apache-2.0" ]
null
null
null
rllab/torch/algos/advantages.py
NeurIPSPaperSubmission7934/code_submission
713fce673e8e3ba30b559d4eebe6d3e4891069ed
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 Copyright holder of the paper Generative Adversarial Model Learning # submitted to NeurIPS 2019 for review # All rights reserved. def gae(rewards, masks, values, discount, gae_lambda, use_gpu=False): if use_gpu: rewards, masks, values = rewards.cpu(), masks.cpu(), values.cpu() ten...
38.62069
88
0.663393
c66a53677bbe7a4b254f58acd63a88c785d8735b
24,111
py
Python
demo/forms.py
prafullkotecha/django-material
a81641634893db132d17a4b355b66c3e12bceeff
[ "BSD-3-Clause" ]
null
null
null
demo/forms.py
prafullkotecha/django-material
a81641634893db132d17a4b355b66c3e12bceeff
[ "BSD-3-Clause" ]
null
null
null
demo/forms.py
prafullkotecha/django-material
a81641634893db132d17a4b355b66c3e12bceeff
[ "BSD-3-Clause" ]
1
2021-11-04T15:25:11.000Z
2021-11-04T15:25:11.000Z
import datetime from django.template import Template from material import Layout, Row, Column, Fieldset, Span2, Span3, Span5, Span6, Span10 from . import demo as forms COUNTRY_CHOICES = ( ('', 'Country'), (244, 'Aaland Islands'), (1, 'Afghanistan'), (2, 'Albania'), (3, 'Algeria'), (4, 'American Samoa'), (5,...
47.183953
124
0.593049
0d9affe1b4b5bf374095c471dcd5d57cbbb13ea8
6,257
py
Python
server/scripts/recommendation/train.py
exKAZUu-Research/WillingQuiz
e785a12997c30cbc5bfcc5737a466d49cd80015c
[ "BSD-3-Clause" ]
null
null
null
server/scripts/recommendation/train.py
exKAZUu-Research/WillingQuiz
e785a12997c30cbc5bfcc5737a466d49cd80015c
[ "BSD-3-Clause" ]
8
2019-12-18T15:34:48.000Z
2019-12-18T15:34:52.000Z
server/scripts/recommendation/train.py
exKAZUu-Research/WillingQuiz
e785a12997c30cbc5bfcc5737a466d49cd80015c
[ "BSD-3-Clause" ]
null
null
null
import sys import pandas as pd import numpy as np from sklearn.ensemble import RandomForestRegressor import pickle import json import datetime import util MAX_USER_DURATION = 30 MIN_REQUIRED_USER_DURATION = 7 MIN_DATE = datetime.date(2017, 3, 6) MAX_DATE = datetime.date(2999, 12, 31) class NotEnoughDataError(Except...
36.805882
171
0.677321
7d2babec8a2ba637f43a56309ff191e4814739ae
2,237
py
Python
problems/776_split_bst.py
apoorvkk/LeetCodeSolutions
1c3461cfc05deb930d0866428eb00362b4338aab
[ "MIT" ]
1
2018-02-03T14:17:18.000Z
2018-02-03T14:17:18.000Z
problems/776_split_bst.py
apoorvkk/LeetCodeSolutions
1c3461cfc05deb930d0866428eb00362b4338aab
[ "MIT" ]
null
null
null
problems/776_split_bst.py
apoorvkk/LeetCodeSolutions
1c3461cfc05deb930d0866428eb00362b4338aab
[ "MIT" ]
null
null
null
''' URL: https://leetcode.com/problems/split-bst/description/ (Recursive version) Time complexity: O(log n) (Recursive version) Space complexity: O(height of tree) (Iterative version) Time complexity: O(log n) (Iterative version) Space complexity: O(height of tree) ''' class Solution: def splitBST(self, root, V): ...
30.22973
68
0.510952
8fd5a7f8c39e3ce82dda2aaebc745e748bf5e696
12,218
py
Python
api/tests/opentrons/protocol_runner/test_protocol_runner.py
Opentrons/labware
e21d8db51eac5818477264a45ef12c0a2d15fb72
[ "Apache-2.0" ]
2
2015-11-10T17:49:51.000Z
2016-01-15T04:43:37.000Z
api/tests/opentrons/protocol_runner/test_protocol_runner.py
Opentrons/labware
e21d8db51eac5818477264a45ef12c0a2d15fb72
[ "Apache-2.0" ]
null
null
null
api/tests/opentrons/protocol_runner/test_protocol_runner.py
Opentrons/labware
e21d8db51eac5818477264a45ef12c0a2d15fb72
[ "Apache-2.0" ]
null
null
null
"""Tests for the ProtocolRunner class.""" import pytest from decoy import Decoy, matchers from pathlib import Path from typing import List, cast from opentrons_shared_data.protocol.dev_types import ( JsonProtocol as LegacyJsonProtocolDict, ) from opentrons.hardware_control import API as HardwareAPI from opentrons...
30.468828
86
0.720658
f5ccdaaa925b9a269aac6a699446a5e798109106
2,267
py
Python
alipay/aop/api/domain/AlipayFundTransAuctionBalanceQueryModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AlipayFundTransAuctionBalanceQueryModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AlipayFundTransAuctionBalanceQueryModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayFundTransAuctionBalanceQueryModel(object): def __init__(self): self._biz_id = None self._inst_id = None self._user_id = None self._verify_id = None @pro...
26.360465
69
0.565064
a932fada06a10c506cabaa74ae5bbc7ad93f37cc
1,173
py
Python
cron/poll_issue_close_stale.py
ECrownofFire/chaos
0cfbb85ab52654967909aef54eff3a0e62b641bd
[ "MIT" ]
1,804
2017-05-23T02:34:27.000Z
2017-05-26T00:44:44.000Z
cron/poll_issue_close_stale.py
ECrownofFire/chaos
0cfbb85ab52654967909aef54eff3a0e62b641bd
[ "MIT" ]
345
2017-05-20T23:55:12.000Z
2017-06-19T07:48:58.000Z
cron/poll_issue_close_stale.py
ECrownofFire/chaos
0cfbb85ab52654967909aef54eff3a0e62b641bd
[ "MIT" ]
248
2017-05-23T02:00:07.000Z
2017-05-26T00:00:28.000Z
import arrow import logging import settings import github_api as gh __log = logging.getLogger("stale_issues") def poll_issue_close_stale(api): """ Looks through all open issues. For any open issue, if the issue is too old and has not been recently commented on, chaosbot issues a /vote close... "...
29.325
84
0.641944
852ffdd7c6e355d5a6cab28af8bb07957e23ec96
355
py
Python
gumo/pullqueue/worker/domain/configuration/__init__.py
gumo-py/gumo-pullqueue
a8458b9931c14a8f71f447e6ca84892efb82ea2d
[ "MIT" ]
null
null
null
gumo/pullqueue/worker/domain/configuration/__init__.py
gumo-py/gumo-pullqueue
a8458b9931c14a8f71f447e6ca84892efb82ea2d
[ "MIT" ]
25
2019-04-22T14:03:46.000Z
2022-02-11T02:50:23.000Z
gumo/pullqueue/worker/domain/configuration/__init__.py
gumo-py/gumo-pullqueue
a8458b9931c14a8f71f447e6ca84892efb82ea2d
[ "MIT" ]
null
null
null
import dataclasses import os from typing import Optional @dataclasses.dataclass(frozen=True) class PullQueueWorkerConfiguration: server_url: str polling_sleep_seconds: int request_logger: object = None target_audience_client_id: Optional[str] = None worker_name: str = dataclasses.field(default_fac...
27.307692
86
0.777465
c416a946c0acf7ac1a9bd9c6820216fd7e2aa066
20,400
py
Python
nemo/collections/nlp/models/intent_slot_classification/intent_slot_classification_model.py
Troublem1/NeMo
b03e5683438a64c08569d8436ac6680597e2b8af
[ "Apache-2.0" ]
null
null
null
nemo/collections/nlp/models/intent_slot_classification/intent_slot_classification_model.py
Troublem1/NeMo
b03e5683438a64c08569d8436ac6680597e2b8af
[ "Apache-2.0" ]
null
null
null
nemo/collections/nlp/models/intent_slot_classification/intent_slot_classification_model.py
Troublem1/NeMo
b03e5683438a64c08569d8436ac6680597e2b8af
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
42.061856
223
0.655147
3a599ffa05e1b3de2ef24adde8391167d20ba454
26,995
py
Python
exact_sync/v1/api/annotation_media_files_api.py
maubreville/EXACT-Sync
47a47e5af360292677601a877e0765d5e01bd2df
[ "MIT" ]
4
2020-10-22T08:46:00.000Z
2021-09-22T21:40:03.000Z
exact_sync/v1/api/annotation_media_files_api.py
maubreville/EXACT-Sync
47a47e5af360292677601a877e0765d5e01bd2df
[ "MIT" ]
null
null
null
exact_sync/v1/api/annotation_media_files_api.py
maubreville/EXACT-Sync
47a47e5af360292677601a877e0765d5e01bd2df
[ "MIT" ]
1
2020-07-26T15:16:17.000Z
2020-07-26T15:16:17.000Z
# coding: utf-8 """ EXACT - API API to interact with the EXACT Server # noqa: E501 OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import from exact_sync.v1.api.pagination_base_api import PaginationBaseAPI import ...
39.466374
133
0.611372
e3cc81715ba207db2360371f7349896ae4fea881
26,737
py
Python
venv/lib/python3.8/site-packages/pygments/lexers/markup.py
felipesch92/projeto_kivy
382827b9a632c5c3989a3129a2d3ee29b0defcf3
[ "MIT" ]
603
2020-12-23T13:49:32.000Z
2022-03-31T23:38:03.000Z
venv/lib/python3.8/site-packages/pygments/lexers/markup.py
felipesch92/projeto_kivy
382827b9a632c5c3989a3129a2d3ee29b0defcf3
[ "MIT" ]
387
2020-12-15T14:54:04.000Z
2022-03-31T07:00:21.000Z
venv/lib/python3.8/site-packages/pygments/lexers/markup.py
felipesch92/projeto_kivy
382827b9a632c5c3989a3129a2d3ee29b0defcf3
[ "MIT" ]
63
2015-01-04T07:11:06.000Z
2020-11-28T21:24:42.000Z
""" pygments.lexers.markup ~~~~~~~~~~~~~~~~~~~~~~ Lexers for non-HTML markup languages. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexers.html import HtmlLexer, XmlLexer from pygments.lexers.javascript im...
35.04194
101
0.468602
6555074969dda11c81f20e0ef8c55d83a364038b
3,131
py
Python
ticketing/tests/test_signing.py
autlamps/tessera-backend
1d02e8e3651c1ad75bdf4e5d0e61765a2a6de0c2
[ "MIT" ]
null
null
null
ticketing/tests/test_signing.py
autlamps/tessera-backend
1d02e8e3651c1ad75bdf4e5d0e61765a2a6de0c2
[ "MIT" ]
1
2018-08-14T03:15:00.000Z
2018-08-21T00:33:34.000Z
ticketing/tests/test_signing.py
autlamps/tessera-backend
1d02e8e3651c1ad75bdf4e5d0e61765a2a6de0c2
[ "MIT" ]
null
null
null
import base64 from unittest import TestCase import rsa from django.contrib.auth.models import User from tessera import settings from ticketing.models import Account, BalanceTicket, Driver, Route from ticketing.userticket.createqrcode import QRCode class SignTestCase(TestCase): def setUp(self): User.ob...
35.579545
73
0.565315
84de0cc0612bcdfb098e5f18fa3eef84f63752bc
15,662
py
Python
saleor/product/utils.py
VanilleBid/weekly-saleor
e776e86ee7ce710929ef33878d936e2a8367a217
[ "BSD-3-Clause" ]
null
null
null
saleor/product/utils.py
VanilleBid/weekly-saleor
e776e86ee7ce710929ef33878d936e2a8367a217
[ "BSD-3-Clause" ]
86
2018-03-08T14:19:19.000Z
2018-05-12T14:55:16.000Z
saleor/product/utils.py
VanilleBid/weekly-saleor
e776e86ee7ce710929ef33878d936e2a8367a217
[ "BSD-3-Clause" ]
2
2018-03-05T12:29:10.000Z
2018-09-28T12:40:52.000Z
from collections import defaultdict, namedtuple from urllib.parse import urlencode from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.db.models import F from django.utils.encoding import smart_text from django_prices.templatetags import prices_i18n from prices import Pric...
36.087558
107
0.690653
ce2ee077c855bc9ddee4150343cf83f7fba4783b
3,574
py
Python
notes/reference/tutorials/an-introduction-to-asynch-programming-and-twisted/exercises/part_8_ex_1.py
aav789/study-notes
34eca00cd48869ba7a79c0ea7d8948ee9bde72b9
[ "MIT" ]
43
2015-06-10T14:48:00.000Z
2020-11-29T16:22:28.000Z
notes/reference/tutorials/an-introduction-to-asynch-programming-and-twisted/exercises/part_8_ex_1.py
aav789/study-notes
34eca00cd48869ba7a79c0ea7d8948ee9bde72b9
[ "MIT" ]
1
2021-11-01T12:01:44.000Z
2021-11-01T12:01:44.000Z
notes/reference/tutorials/an-introduction-to-asynch-programming-and-twisted/exercises/part_8_ex_1.py
lextoumbourou/notes
5f94c59a467eb3eb387542bdce398abc0365e6a7
[ "MIT" ]
40
2015-03-02T10:33:59.000Z
2020-05-24T12:17:05.000Z
# This is the Twisted Get Poetry Now! client, version 4.0 import optparse, sys from twisted.internet import defer from twisted.internet.protocol import Protocol, ClientFactory def TimeoutError(Exception): print "We timeout out!" pass def parse_args(): usage = """usage: %prog [options] [hostname]:port ....
23.826667
80
0.641298
d864172faae91b60392338b05f6ccce53d0b46ed
2,112
py
Python
app/api/device/device_parameter.py
zldevil2011/zhengsheng
93f7e486289f7685460fbab7a474aaac8e5b275e
[ "MIT" ]
null
null
null
app/api/device/device_parameter.py
zldevil2011/zhengsheng
93f7e486289f7685460fbab7a474aaac8e5b275e
[ "MIT" ]
null
null
null
app/api/device/device_parameter.py
zldevil2011/zhengsheng
93f7e486289f7685460fbab7a474aaac8e5b275e
[ "MIT" ]
null
null
null
# coding=utf-8 from rest_framework import status from app.models import Device, Parameter from rest_framework.views import APIView from rest_framework.response import Response from app.serializer import DeviceSerializer import time class DeviceParameter(APIView): def post(self, request, format=None): requ...
43.102041
199
0.601799
e47a385d2cb0ebef43c2b624e881430f82f0860a
18,776
py
Python
azure/mgmt/network/v2017_03_01/operations/route_tables_operations.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
azure/mgmt/network/v2017_03_01/operations/route_tables_operations.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
azure/mgmt/network/v2017_03_01/operations/route_tables_operations.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
44.91866
144
0.654825
b7394eddf3a58700fc40f63d95fc0a386e5c217e
3,540
py
Python
sudoku_buddy/base.py
papalotis/sudoku-buddy
9e7f14d9e8a5a79d8c241cb87282fb1872efc439
[ "MIT" ]
null
null
null
sudoku_buddy/base.py
papalotis/sudoku-buddy
9e7f14d9e8a5a79d8c241cb87282fb1872efc439
[ "MIT" ]
null
null
null
sudoku_buddy/base.py
papalotis/sudoku-buddy
9e7f14d9e8a5a79d8c241cb87282fb1872efc439
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding:utf-8 -*- """ Description: Base file for sudoku solver implementation Project: sudoku-buddy """ import numpy as np from numpy.typing import ArrayLike, NDArray class Sudoku: SUDOKU_SIZE = 9 SUDOKU_SIZE_SQUARE = 81 BOX_SIZE = 3 EMPTY_VALUE = 0 def _get_neighbor...
35.4
82
0.650847
5ebfda7c679d4c0de2437eb1d2e34c7a0557a5d1
220
py
Python
linprog_solver/simplex/templatetags/simplex_extras.py
apirobot/django-linprog-solver-website
a90018c257b1d0a4c064baea1bb7c6e22bac1ab9
[ "MIT" ]
2
2017-04-22T11:25:00.000Z
2020-04-05T20:22:41.000Z
linprog_solver/simplex/templatetags/simplex_extras.py
apirobot/django-linprog-solver-website
a90018c257b1d0a4c064baea1bb7c6e22bac1ab9
[ "MIT" ]
null
null
null
linprog_solver/simplex/templatetags/simplex_extras.py
apirobot/django-linprog-solver-website
a90018c257b1d0a4c064baea1bb7c6e22bac1ab9
[ "MIT" ]
null
null
null
from django import template register = template.Library() @register.inclusion_tag('simplex/_solution_steps.html') def show_solution_steps(solution_steps): return { 'solution_steps': solution_steps, }
18.333333
55
0.745455
0380e01c2394fcd90d506c92c08f4facb6b495ab
2,692
py
Python
homeassistant/components/homeassistant/triggers/time_pattern.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
11
2018-02-16T15:35:47.000Z
2020-01-14T15:20:00.000Z
homeassistant/components/homeassistant/triggers/time_pattern.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
77
2020-07-16T16:43:09.000Z
2022-03-31T06:14:37.000Z
homeassistant/components/homeassistant/triggers/time_pattern.py
Vaarlion/core
f3de8b9f28de01abf72c0f5bb0b457eb1841f201
[ "Apache-2.0" ]
7
2021-03-20T12:34:01.000Z
2021-12-02T10:13:52.000Z
"""Offer time listening automation rules.""" import voluptuous as vol from homeassistant.const import CONF_PLATFORM from homeassistant.core import HassJob, callback from homeassistant.helpers import config_validation as cv from homeassistant.helpers.event import async_track_time_change # mypy: allow-untyped-defs, no-...
29.911111
85
0.616642
3a5e79c79832fab002ad2867765386567e3ce39c
8,882
py
Python
doublePendulum_HNN/validate_doublePendulum_HNN.py
pkmtum/Physics-enhanced_NN_SmallData
532e9a2f8609b92e5717ebf4f2c3cb74500e2221
[ "MIT" ]
2
2021-11-27T15:55:11.000Z
2021-12-12T10:43:55.000Z
doublePendulum_HNN/validate_doublePendulum_HNN.py
pkmtum/Physics-enhanced_NN_SmallData
532e9a2f8609b92e5717ebf4f2c3cb74500e2221
[ "MIT" ]
null
null
null
doublePendulum_HNN/validate_doublePendulum_HNN.py
pkmtum/Physics-enhanced_NN_SmallData
532e9a2f8609b92e5717ebf4f2c3cb74500e2221
[ "MIT" ]
null
null
null
import jax import jax.numpy as jnp from jax.experimental import stax from jax.experimental.ode import odeint from functools import partial # import matplotlib.pyplot as plt import pickle import os def wrap_state(state): # wrap generalized coordinates to [-pi, pi) phi1 = (state[0] + jnp.pi) % (2 * ...
37.957265
121
0.587255
804ff70f1a9bb1f403d60a1805b2bd08206826b4
4,726
py
Python
tinydb/storages.py
annihilatorrrr/tinydb
569447981a9f0d383c4be5556cd336c9ed7ef758
[ "MIT" ]
null
null
null
tinydb/storages.py
annihilatorrrr/tinydb
569447981a9f0d383c4be5556cd336c9ed7ef758
[ "MIT" ]
null
null
null
tinydb/storages.py
annihilatorrrr/tinydb
569447981a9f0d383c4be5556cd336c9ed7ef758
[ "MIT" ]
null
null
null
""" Contains the :class:`base class <tinydb.storages.Storage>` for storages and implementations. """ import io import json import os from abc import ABC, abstractmethod from typing import Dict, Any, Optional __all__ = ('Storage', 'JSONStorage', 'MemoryStorage') def touch(path: str, create_dirs: bool): """ C...
28.299401
106
0.613627
7c2539f6e1a9fa08f28a64bd1fc892d739903f1e
7,102
py
Python
Prediction_Algorithm-Motion/prediction_alg_motion.py
cantiusdeepan/Cadrea
bdd341f8e9ee7a5103611d5bdac1a820ab9fdd81
[ "MIT" ]
null
null
null
Prediction_Algorithm-Motion/prediction_alg_motion.py
cantiusdeepan/Cadrea
bdd341f8e9ee7a5103611d5bdac1a820ab9fdd81
[ "MIT" ]
null
null
null
Prediction_Algorithm-Motion/prediction_alg_motion.py
cantiusdeepan/Cadrea
bdd341f8e9ee7a5103611d5bdac1a820ab9fdd81
[ "MIT" ]
null
null
null
#Motion prediction Web service #Gets real-time motion values and then sends the prediction of motion for the next time instant #Communication is via MQTT import json import time import paho.mqtt.client as MQTT import random import fpformat import numpy from datetime import datetime # It writes the weeks in a nested l...
33.186916
153
0.610955
8bf6795e6745d48287cd8717c7ad9b24bc3cc7de
15,582
py
Python
rllib/util/neural_networks/tests/test_neural_networks.py
shenao-zhang/DCPU
0da9aa2b7878b54ba4ee4dca894c2e86cdc0d559
[ "MIT" ]
null
null
null
rllib/util/neural_networks/tests/test_neural_networks.py
shenao-zhang/DCPU
0da9aa2b7878b54ba4ee4dca894c2e86cdc0d559
[ "MIT" ]
null
null
null
rllib/util/neural_networks/tests/test_neural_networks.py
shenao-zhang/DCPU
0da9aa2b7878b54ba4ee4dca894c2e86cdc0d559
[ "MIT" ]
null
null
null
import pytest import torch import torch.distributions import torch.jit import torch.testing from rllib.util.distributions import Delta from rllib.util.neural_networks import ( CategoricalNN, DeterministicNN, Ensemble, FelixNet, HeteroGaussianNN, HomoGaussianNN, ) from rllib.util.neural_networks...
33.947712
88
0.610255
01547496c2f987415f81cf04e8b3598a591d4cee
2,386
py
Python
code/feedback-server.py
bahruzjabiyev/t-reqs-http-fuzzer
92cd4dff0a0786ada75d0b52ef02a062e03cb043
[ "MIT" ]
113
2021-09-22T06:23:26.000Z
2022-01-05T14:47:34.000Z
code/feedback-server.py
bahruzjabiyev/T-Reqs-HTTP-Fuzzer
92cd4dff0a0786ada75d0b52ef02a062e03cb043
[ "MIT" ]
null
null
null
code/feedback-server.py
bahruzjabiyev/T-Reqs-HTTP-Fuzzer
92cd4dff0a0786ada75d0b52ef02a062e03cb043
[ "MIT" ]
11
2022-01-17T08:49:29.000Z
2022-03-10T06:00:37.000Z
import socket import threading import re import sys s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(('', 8080)) s.listen() def get_body(data): body = b'None' body_length = -1 try: parts = data.split(b'\r\n\r\n') if parts...
29.825
162
0.551551
cbfed1b26e66db00cc3592c10062c8d0cf12000f
2,082
py
Python
adminmgr/media/code/A3/task3/BD_0980_1528_1600.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
9
2019-11-08T02:05:27.000Z
2021-12-13T12:06:35.000Z
adminmgr/media/code/A3/task3/BD_0980_1528_1600.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
6
2019-11-27T03:23:16.000Z
2021-06-10T19:15:13.000Z
adminmgr/media/code/A3/task3/BD_0980_1528_1600.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
4
2019-11-26T17:04:27.000Z
2021-12-13T11:57:03.000Z
import findspark findspark.init() from pyspark import SparkConf,SparkContext from pyspark.streaming import StreamingContext from pyspark.sql import Row,SQLContext import sys import requests from operator import add def aggregate_tweets_count(new_values, total_sum): return sum(new_values) + (total_sum or 0...
33.047619
145
0.710855
01841b238714213808b042ecf349886b81f0a5fa
5,609
py
Python
examples/migration.py
czyzq/mstrio-py
b25fd19936b659d503a7eaaa96c8d0b4e118cb7c
[ "Apache-2.0" ]
1
2022-02-15T13:18:04.000Z
2022-02-15T13:18:04.000Z
examples/migration.py
czyzq/mstrio-py
b25fd19936b659d503a7eaaa96c8d0b4e118cb7c
[ "Apache-2.0" ]
null
null
null
examples/migration.py
czyzq/mstrio-py
b25fd19936b659d503a7eaaa96c8d0b4e118cb7c
[ "Apache-2.0" ]
null
null
null
"""This is the demo script meant to show how administrator can perform a migration of objects from one environment to another. This script will not work without replacing parameters with real values. Its basic goal is to present what can be done with this module and to ease its usage. `mstrio.server.migration` module...
36.422078
90
0.780531
cf20ba15eecc7fa755fea4ca0804522f5407a856
5,915
py
Python
zeeko/telemetry/tests/test_pipeline.py
alexrudy/Zeeko
fb4992724620ed548dd32c3201f79f5b7bebfe32
[ "BSD-3-Clause" ]
2
2017-07-23T22:06:05.000Z
2020-02-28T07:54:15.000Z
zeeko/telemetry/tests/test_pipeline.py
alexrudy/Zeeko
fb4992724620ed548dd32c3201f79f5b7bebfe32
[ "BSD-3-Clause" ]
1
2020-10-29T19:54:06.000Z
2020-10-29T19:54:06.000Z
zeeko/telemetry/tests/test_pipeline.py
alexrudy/Zeeko
fb4992724620ed548dd32c3201f79f5b7bebfe32
[ "BSD-3-Clause" ]
null
null
null
import pytest import h5py import time import zmq import numpy as np from ...tests.test_helpers import ZeekoTestBase from ..pipeline import create_pipeline @pytest.fixture def chunksize(): """The size of chunks.""" return 10 @pytest.fixture def pipeline(address, context, chunksize, filename): """Pipeline""...
38.16129
104
0.591885
eb8a7bd8a188145d153878bd6f18c9496a964887
8,017
py
Python
zbunker/routes.py
CYBERDEVILZ/zbunker-website
a03e5b4772ee06e2ebb4b6a4ef2cae7587c08d37
[ "MIT" ]
null
null
null
zbunker/routes.py
CYBERDEVILZ/zbunker-website
a03e5b4772ee06e2ebb4b6a4ef2cae7587c08d37
[ "MIT" ]
null
null
null
zbunker/routes.py
CYBERDEVILZ/zbunker-website
a03e5b4772ee06e2ebb4b6a4ef2cae7587c08d37
[ "MIT" ]
1
2022-02-14T04:16:50.000Z
2022-02-14T04:16:50.000Z
from logging import exception from wtforms.validators import ValidationError from zbunker import app, db, mail from flask_mail import Message from flask import render_template, redirect, flash, url_for, request, jsonify, session from zbunker.forms import ( LoginForm, RegistrationForm, OTPForm, ResetPass...
26.199346
88
0.598104
9009fa9c92a74ec1910ef291f001c6c3e24f3b5e
281
py
Python
wsltools/utils/faker/providers/ssn/ko_KR/__init__.py
Symbo1/wsltools
0b6e536fc85c707a1c81f0296c4e91ca835396a1
[ "MIT" ]
412
2020-04-16T08:11:58.000Z
2022-02-02T19:49:53.000Z
wsltools/utils/faker/providers/ssn/ko_KR/__init__.py
Symbo1/wsltools
0b6e536fc85c707a1c81f0296c4e91ca835396a1
[ "MIT" ]
1
2020-04-16T14:03:46.000Z
2020-04-17T03:41:18.000Z
wsltools/utils/faker/providers/ssn/ko_KR/__init__.py
Symbo1/wsltools
0b6e536fc85c707a1c81f0296c4e91ca835396a1
[ "MIT" ]
33
2020-04-16T08:48:53.000Z
2021-10-20T04:39:29.000Z
# -*- coding: UTF-8 -*- from __future__ import unicode_literals from .. import Provider as SsnProvider class Provider(SsnProvider): ssn_formats = ("##0#0#-1######", "##0#1#-1######", "##0#2#-1######", "##0#0#-2######", "##0#1#-2######", "##0#2#-2######")
28.1
72
0.462633
e37a6b1177c102760b336feefea726faa205d8fb
69
py
Python
ulfy/__init__.py
cdaversin/ulfy
42dfe51c821acffbccc0df26d7b9549a5cb949eb
[ "MIT" ]
null
null
null
ulfy/__init__.py
cdaversin/ulfy
42dfe51c821acffbccc0df26d7b9549a5cb949eb
[ "MIT" ]
null
null
null
ulfy/__init__.py
cdaversin/ulfy
42dfe51c821acffbccc0df26d7b9549a5cb949eb
[ "MIT" ]
null
null
null
from sympy_expr import Expression from ufl_sympy import ufl_to_sympy
23
34
0.884058
7ada3a902e7038c7713340ec590f332a8075264c
5,242
py
Python
visigoth/common/button/button.py
visigoths/visigoth
c5297148209d630f6668f0e5ba3039a8856d8320
[ "MIT" ]
null
null
null
visigoth/common/button/button.py
visigoths/visigoth
c5297148209d630f6668f0e5ba3039a8856d8320
[ "MIT" ]
1
2021-01-26T16:55:48.000Z
2021-09-03T15:29:14.000Z
visigoth/common/button/button.py
visigoths/visigoth
c5297148209d630f6668f0e5ba3039a8856d8320
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # visigoth: A lightweight Python3 library for rendering data visualizations in SVG # Copyright (C) 2020-2021 Visigoth Developers # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software # and associated documentation files (the "Software"), to...
41.603175
180
0.649943
521f338df6f97388eb1fd7429d28f19e02fa753e
6,236
py
Python
Script/BOM formatter/test_xlsx.py
vitalii17/SVLib
693273bc960f1acf2bb1dca27269a0ddebd75aa9
[ "MIT" ]
null
null
null
Script/BOM formatter/test_xlsx.py
vitalii17/SVLib
693273bc960f1acf2bb1dca27269a0ddebd75aa9
[ "MIT" ]
null
null
null
Script/BOM formatter/test_xlsx.py
vitalii17/SVLib
693273bc960f1acf2bb1dca27269a0ddebd75aa9
[ "MIT" ]
null
null
null
import sys import os from enum import Enum, unique from operator import itemgetter from itertools import groupby from openpyxl import load_workbook, Workbook from openpyxl.styles import Font project_name = "ProjName" project_ver = "v1.0" def main(args): if len(args) > 1: pass else: ...
36.899408
110
0.544901
89078389d7765e94127cb47f9e31f162a59d40ba
1,006
py
Python
examples/supervised_learning/trees_ensembles/random_forest_regressor.py
cesar0205/machine_learning_algorithms
7cd7c7295e2fb7357123cd81cb3e43c485930d74
[ "Apache-2.0" ]
null
null
null
examples/supervised_learning/trees_ensembles/random_forest_regressor.py
cesar0205/machine_learning_algorithms
7cd7c7295e2fb7357123cd81cb3e43c485930d74
[ "Apache-2.0" ]
null
null
null
examples/supervised_learning/trees_ensembles/random_forest_regressor.py
cesar0205/machine_learning_algorithms
7cd7c7295e2fb7357123cd81cb3e43c485930d74
[ "Apache-2.0" ]
null
null
null
from supervised_learning.trees.random_forests import RandomForestRegressor import numpy as np import matplotlib.pyplot as plt def main(): #100 samples of the sin(x) function in the range 0 - 2*pi in order to apply a regressor. T = 100; X = np.linspace(0, 2 * np.pi, T); y = np.sin(X); N = 30 #70...
27.189189
92
0.647117
f3d48c0760d7ea7df3530bb67267d039f4b2d1c2
5,008
py
Python
src/solution/my_edge_app/data-analytics/program/data_analytics.py
industrial-edge/Developer-Guide-Hands-on-App
6dbf01f3945f138f01f75f1f9f3906ddd0420b10
[ "Unlicense" ]
10
2021-05-06T09:13:47.000Z
2022-03-17T11:04:38.000Z
src/solution/my_edge_app/data-analytics/program/data_analytics.py
industrial-edge/Developer-Guide-Hands-on-App
6dbf01f3945f138f01f75f1f9f3906ddd0420b10
[ "Unlicense" ]
6
2021-04-30T07:07:44.000Z
2021-05-31T07:08:32.000Z
src/solution/my_edge_app/data-analytics/program/data_analytics.py
industrial-edge/Developer-Guide-Hands-on-App
6dbf01f3945f138f01f75f1f9f3906ddd0420b10
[ "Unlicense" ]
6
2021-04-29T17:54:16.000Z
2022-03-17T11:02:34.000Z
# Copyright 2021 Siemens AG # This file is subject to the terms and conditions of the MIT License. # See LICENSE file in the top-level directory. """Module Data Analytics. This module consists of DataGenerator class and also the function to generate bivariate normal distributed datasets. """ import paho.mqtt.clie...
37.373134
113
0.653554
a122980a9ce8eb09db8c74e43804f478daed3512
167
py
Python
faker/__init__.py
errbufferoverfl/faker
f518bfa3dcfd0433289fab69a1e5b972350fb4b4
[ "MIT" ]
null
null
null
faker/__init__.py
errbufferoverfl/faker
f518bfa3dcfd0433289fab69a1e5b972350fb4b4
[ "MIT" ]
null
null
null
faker/__init__.py
errbufferoverfl/faker
f518bfa3dcfd0433289fab69a1e5b972350fb4b4
[ "MIT" ]
null
null
null
from faker.factory import Factory from faker.generator import Generator from faker.proxy import Faker VERSION = '8.14.1' __all__ = ('Factory', 'Generator', 'Faker')
20.875
43
0.754491
145e1ed9595c90d8a47f2e33ac5aa5cc1bbaf480
12,734
py
Python
addons/io_scene_gltf2/blender/exp/gltf2_blender_image.py
doc22940/glTF-Blender-IO
73d9e3c8b00eb8f2fe7b6ba3e62231e55a0573b4
[ "Apache-2.0" ]
1
2020-06-22T10:45:09.000Z
2020-06-22T10:45:09.000Z
addons/io_scene_gltf2/blender/exp/gltf2_blender_image.py
MozillaReality/glTF-Blender-IO
9dde650dc77fd1a1c9552a2773f0c3533f70683c
[ "Apache-2.0" ]
null
null
null
addons/io_scene_gltf2/blender/exp/gltf2_blender_image.py
MozillaReality/glTF-Blender-IO
9dde650dc77fd1a1c9552a2773f0c3533f70683c
[ "Apache-2.0" ]
null
null
null
# Copyright 2018-2019 The glTF-Blender-IO authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
37.125364
96
0.612847
90cf8b02294adc91a11d9fbe06eaa11c14d32e38
2,961
py
Python
mahotas/tests/test_bbox.py
langner/mahotas
1840b629fab325e7fb700f90cf2b662ff35e4205
[ "BSL-1.0" ]
1
2021-02-18T00:37:56.000Z
2021-02-18T00:37:56.000Z
mahotas/tests/test_bbox.py
langner/mahotas
1840b629fab325e7fb700f90cf2b662ff35e4205
[ "BSL-1.0" ]
null
null
null
mahotas/tests/test_bbox.py
langner/mahotas
1840b629fab325e7fb700f90cf2b662ff35e4205
[ "BSL-1.0" ]
1
2019-10-30T19:26:12.000Z
2019-10-30T19:26:12.000Z
import numpy as np import mahotas import mahotas as mh from mahotas import bbox from nose.tools import raises def test_croptobbox(): X,Y = np.meshgrid(np.arange(16)-8,np.arange(16)-8) ball = ((X**2+Y**2) < 32).astype(np.uint8) assert mahotas.croptobbox(ball).sum() == ball.sum() assert mahotas.croptobbo...
26.20354
69
0.57717
0b9bea81e4f27a041795c2e005f39cf1ddead028
42,849
py
Python
main_benchmark.py
peterfeifanchen/scGNN
4ef9013ad0f44f9f51708e9bb60e5138f5706593
[ "MIT" ]
2
2022-01-07T04:37:33.000Z
2022-01-08T04:24:00.000Z
main_benchmark.py
peterfeifanchen/scGNN
4ef9013ad0f44f9f51708e9bb60e5138f5706593
[ "MIT" ]
null
null
null
main_benchmark.py
peterfeifanchen/scGNN
4ef9013ad0f44f9f51708e9bb60e5138f5706593
[ "MIT" ]
2
2021-07-27T05:54:50.000Z
2021-08-11T05:54:16.000Z
import time import resource import datetime import argparse import sys import numpy as np import pickle as pkl import networkx as nx import scipy.sparse as sp import torch from torch.utils.data import Dataset, DataLoader from torch import nn, optim from torch.nn import functional as F from sklearn.decomposition import ...
52.640049
257
0.645359
94908a0cc4aa0a1f9b50fb67fb6b0f7e1a0226fd
4,645
py
Python
rasa_nlu_gao/models/elmo_cn/modules/token_embedder.py
1073521013/rasa_nlu_gq
6c8bea1b14390246b39770abc544986f4c7acf26
[ "Apache-2.0" ]
3
2020-08-03T00:21:04.000Z
2021-09-01T06:20:00.000Z
rasa_nlu_gao/models/elmo_cn/modules/token_embedder.py
1073521013/rasa_nlu_gq
6c8bea1b14390246b39770abc544986f4c7acf26
[ "Apache-2.0" ]
1
2022-02-10T06:42:23.000Z
2022-02-10T06:42:23.000Z
rasa_nlu_gao/models/elmo_cn/modules/token_embedder.py
1073521013/rasa_nlu_gq
6c8bea1b14390246b39770abc544986f4c7acf26
[ "Apache-2.0" ]
4
2019-06-06T08:05:22.000Z
2020-08-07T08:07:22.000Z
from __future__ import absolute_import from __future__ import unicode_literals import logging import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import copy from .highway import Highway class LstmTokenEmbedder(nn.Module): def __init__(self, config, wor...
36.574803
118
0.676426
4ba7b0f57e6e4a060c5e1fd4c9d8a1237db3ecf9
1,592
py
Python
pathattach/parseide.py
CookiePLMonster/butcher-tools
d63ec0411c4342c594b5927e0bc85c81af8c2e0b
[ "MIT" ]
7
2017-04-10T12:23:26.000Z
2020-05-07T21:57:02.000Z
pathattach/parseide.py
CookiePLMonster/butcher-tools
d63ec0411c4342c594b5927e0bc85c81af8c2e0b
[ "MIT" ]
null
null
null
pathattach/parseide.py
CookiePLMonster/butcher-tools
d63ec0411c4342c594b5927e0bc85c81af8c2e0b
[ "MIT" ]
null
null
null
import fileinput def parseIdePath( files ): # We store IDE paths in a dictionary with modelID key, but IPL paths should be stored # in a plain list class PATHnode: def __init__(self): self.NodeType = 0 self.NextNode = -1 self.IsCrossRoad = False self.Pos = () self.Median = 0.0 self.LeftLanes = -...
25.269841
86
0.626256
e2e3cdd73a9dc552850f477e5467ec071c8554d1
13,353
py
Python
tests/poller_test.py
lumatijev/mitogen
b610b0c93bbab1bc0fbe86cfcc4f3a56fd2b2c14
[ "BSD-3-Clause" ]
null
null
null
tests/poller_test.py
lumatijev/mitogen
b610b0c93bbab1bc0fbe86cfcc4f3a56fd2b2c14
[ "BSD-3-Clause" ]
null
null
null
tests/poller_test.py
lumatijev/mitogen
b610b0c93bbab1bc0fbe86cfcc4f3a56fd2b2c14
[ "BSD-3-Clause" ]
null
null
null
import errno import os import select import socket import sys import time import unittest2 import mitogen.core import mitogen.parent import testlib try: next except NameError: # Python 2.4 from mitogen.core import next class SockMixin(object): def tearDown(self): self.close_socks() ...
30.486301
79
0.621883
fa4bda5c23b5ae0a830e880a5f010d903822e4b3
12,041
py
Python
idaes/generic_models/properties/core/state_definitions/FpcTP.py
eslickj/idaes-pse
328ed07ffb0b4d98c03e972675ea32c41dd2531a
[ "RSA-MD" ]
112
2019-02-11T23:16:36.000Z
2022-03-23T20:59:57.000Z
idaes/generic_models/properties/core/state_definitions/FpcTP.py
eslickj/idaes-pse
328ed07ffb0b4d98c03e972675ea32c41dd2531a
[ "RSA-MD" ]
621
2019-03-01T14:44:12.000Z
2022-03-31T19:49:25.000Z
idaes/generic_models/properties/core/state_definitions/FpcTP.py
eslickj/idaes-pse
328ed07ffb0b4d98c03e972675ea32c41dd2531a
[ "RSA-MD" ]
154
2019-02-01T23:46:33.000Z
2022-03-23T15:07:10.000Z
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the softwar...
38.717042
81
0.614318
6e742b9a38c5d55840e3a40f2750517afd450536
736
py
Python
core/venom.py
p-panagiotis/venom-virtual-assistant
40db8cceedb71934e708624141da8e641460feb7
[ "MIT" ]
null
null
null
core/venom.py
p-panagiotis/venom-virtual-assistant
40db8cceedb71934e708624141da8e641460feb7
[ "MIT" ]
null
null
null
core/venom.py
p-panagiotis/venom-virtual-assistant
40db8cceedb71934e708624141da8e641460feb7
[ "MIT" ]
null
null
null
import sys from core.configs import Configuration from core.intents import welcome from core.logs import Logger from core.modules.input_mod import take_input from core.modules.listen_mod import listen from core.modules.output_mod import output from core.modules.process_mod import process cfg = None def run(): #...
23
76
0.691576
71921c81fa9c543f5bc024eec280a0a8bc358985
1,985
py
Python
src/cfnlint/rules/templates/Base.py
j0lly/cfn-python-lint
3032bab8fe190763bd0df1c34905c3528ceb411f
[ "MIT-0" ]
1
2019-03-19T22:49:38.000Z
2019-03-19T22:49:38.000Z
src/cfnlint/rules/templates/Base.py
j0lly/cfn-python-lint
3032bab8fe190763bd0df1c34905c3528ceb411f
[ "MIT-0" ]
null
null
null
src/cfnlint/rules/templates/Base.py
j0lly/cfn-python-lint
3032bab8fe190763bd0df1c34905c3528ceb411f
[ "MIT-0" ]
1
2020-05-04T16:32:19.000Z
2020-05-04T16:32:19.000Z
""" Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 ...
39.7
100
0.690176
8926e56139ffa4920903be26e85c580ca2377074
72
py
Python
hello.py
lazyxu/pythonvm
8c25acc6ee1e01a0bb65bb35aae987264d6876aa
[ "MIT" ]
null
null
null
hello.py
lazyxu/pythonvm
8c25acc6ee1e01a0bb65bb35aae987264d6876aa
[ "MIT" ]
null
null
null
hello.py
lazyxu/pythonvm
8c25acc6ee1e01a0bb65bb35aae987264d6876aa
[ "MIT" ]
null
null
null
i = 0 while i < 5: i = i + 1 if i > 3: break print(i)
8
13
0.375
a47ed9ddcc0c6f4acfa918695d52e9eed1a040ba
110
py
Python
src/utilities/data_structures/binary_heap.py
xproj2501x/ecs-python
7947a9e8551c0f379ac59f57e0268b4054aaafae
[ "MIT" ]
null
null
null
src/utilities/data_structures/binary_heap.py
xproj2501x/ecs-python
7947a9e8551c0f379ac59f57e0268b4054aaafae
[ "MIT" ]
null
null
null
src/utilities/data_structures/binary_heap.py
xproj2501x/ecs-python
7947a9e8551c0f379ac59f57e0268b4054aaafae
[ "MIT" ]
null
null
null
class BinaryHeap: def __init__(self): self._size = [] def insert(self, data): pass
12.222222
27
0.545455
d00661b0be7317ca2d5993b496320b0eaba6e2a6
3,284
py
Python
2020/day14.py
Ceridan/advent-of-code
e52dad16c9b5a82c341f76cc9d51d59ff3228ff6
[ "MIT" ]
null
null
null
2020/day14.py
Ceridan/advent-of-code
e52dad16c9b5a82c341f76cc9d51d59ff3228ff6
[ "MIT" ]
null
null
null
2020/day14.py
Ceridan/advent-of-code
e52dad16c9b5a82c341f76cc9d51d59ff3228ff6
[ "MIT" ]
null
null
null
import itertools import os import re from typing import List def part1(instructions: List[str]) -> int: memory = {} mask = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' for instr in instructions: if instr.startswith('mask'): mask = re.findall(r'([01X]+)', instr)[0] else: ...
28.068376
104
0.624543
50f53979250345a40028d796d5e43c6da5130913
2,787
py
Python
mspray/apps/mda/urls.py
onaio/mspray
b3e0f4b5855abbf0298de6b66f2e9f472f2bf838
[ "Apache-2.0" ]
null
null
null
mspray/apps/mda/urls.py
onaio/mspray
b3e0f4b5855abbf0298de6b66f2e9f472f2bf838
[ "Apache-2.0" ]
76
2018-03-15T09:37:56.000Z
2019-05-15T12:45:51.000Z
mspray/apps/mda/urls.py
onaio/mspray
b3e0f4b5855abbf0298de6b66f2e9f472f2bf838
[ "Apache-2.0" ]
1
2020-10-31T07:15:22.000Z
2020-10-31T07:15:22.000Z
# -*- coding: utf-8 -*- """MDA urls""" from django.conf.urls import include from django.urls import path, re_path from rest_framework import routers from mspray.apps.main.views import ( districts, household, household_buffer, performance, sprayday, target_area, ) from mspray.apps.main.views.mo...
32.406977
79
0.643703
17faf253e80cc90c47a5ac57bce8a89c6e565ee4
5,891
py
Python
cupy/cuda/__init__.py
kalvdans/cupy
07a052f90811349501bda2320a04a57705608ce9
[ "MIT" ]
1
2020-12-27T13:06:35.000Z
2020-12-27T13:06:35.000Z
cupy/cuda/__init__.py
trivialfis/cupy
e0f0b3bba0fa1e809780350a4562b2ed1d1fe024
[ "MIT" ]
4
2020-09-15T01:49:38.000Z
2020-12-11T03:52:35.000Z
cupy/cuda/__init__.py
trivialfis/cupy
e0f0b3bba0fa1e809780350a4562b2ed1d1fe024
[ "MIT" ]
2
2018-07-21T13:44:26.000Z
2019-03-25T11:30:16.000Z
import contextlib import warnings from cupy._environment import get_cuda_path, get_nvcc_path # NOQA from cupy.cuda import compiler # NOQA from cupy.cuda import device # NOQA from cupy.cuda import function # NOQA from cupy.cuda import memory # NOQA from cupy.cuda import memory_hook # NOQA from cupy.cuda import me...
34.652941
100
0.7211
71996117aad08baad13c78005e99de5d470893ce
467
py
Python
tests/sql_in_python_variables_example.py
AzisK/readsql
8a26e87df1bc74756a675b54acdb563b004a7384
[ "MIT" ]
62
2020-08-19T17:09:34.000Z
2022-02-04T13:35:55.000Z
tests/sql_in_python_variables_example.py
AzisK/readsql
8a26e87df1bc74756a675b54acdb563b004a7384
[ "MIT" ]
null
null
null
tests/sql_in_python_variables_example.py
AzisK/readsql
8a26e87df1bc74756a675b54acdb563b004a7384
[ "MIT" ]
1
2020-12-31T08:35:18.000Z
2020-12-31T08:35:18.000Z
def get_sql(): limit = 6 sql = f"SELEct speed from world where animal='dolphin' limit {limit}" return sql def get_query_template(): limit = 6 query_template = ( f"SELEct speed from world where animal='dolphin' group by family limit {limit}" ) return query_template def get_query()...
24.578947
112
0.670236
0f60cea830424eb8e4ae4c3185d8a7ca25b84a8f
584
py
Python
dino/sizes.py
00ff0000red/raw-wasm
a2b2fa9c826c5df51bb1b6bb07739bd5f7eacd61
[ "MIT" ]
314
2019-05-30T06:35:03.000Z
2022-03-12T21:44:04.000Z
dino/sizes.py
00ff0000red/raw-wasm
a2b2fa9c826c5df51bb1b6bb07739bd5f7eacd61
[ "MIT" ]
3
2019-06-15T17:36:28.000Z
2021-01-23T00:42:11.000Z
dino/sizes.py
00ff0000red/raw-wasm
a2b2fa9c826c5df51bb1b6bb07739bd5f7eacd61
[ "MIT" ]
13
2020-07-05T20:31:29.000Z
2022-03-07T08:15:48.000Z
import math sizes = [ ('dead', 20, 22, 83), ('stand', 20, 22, 83), ('run1', 20, 22, 83), ('run2', 20, 22, 83), ('duck1', 28, 13, 83), ('duck2', 28, 13, 83), ('cactus1', 13, 26, 83), ('cactus2', 19, 18, 83), ('cactus3', 28, 18, 83), ('cactus4', 9, 18, 83), ('cactus5', 40, 26, 83), ('cloud', 26, ...
22.461538
51
0.467466
e35f7c828c9bc97d77b9df140bead122e920e3bf
847
py
Python
tests/chemistry/test_morgan_fingerprint.py
StephenSchroeder/pyjanitor
56ffe6048ffbcedc1680f52f26547e0d09053d26
[ "MIT" ]
null
null
null
tests/chemistry/test_morgan_fingerprint.py
StephenSchroeder/pyjanitor
56ffe6048ffbcedc1680f52f26547e0d09053d26
[ "MIT" ]
null
null
null
tests/chemistry/test_morgan_fingerprint.py
StephenSchroeder/pyjanitor
56ffe6048ffbcedc1680f52f26547e0d09053d26
[ "MIT" ]
null
null
null
import importlib import pytest import janitor.chemistry # noqa: disable=unused-import @pytest.mark.skipif( importlib.util.find_spec("rdkit") is None, reason="rdkit tests only required for CI", ) @pytest.mark.chemistry def test_morgan_fingerprint_counts(chemdf): morgans = chemdf.smiles2mol("smiles", "mo...
26.46875
68
0.690673
8d5505f61d84857286b67a3603351adfc3259492
399
py
Python
PythonChallenge/Ex31/31_04.py
YorkFish/git_study
6e023244daaa22e12b24e632e76a13e5066f2947
[ "MIT" ]
null
null
null
PythonChallenge/Ex31/31_04.py
YorkFish/git_study
6e023244daaa22e12b24e632e76a13e5066f2947
[ "MIT" ]
null
null
null
PythonChallenge/Ex31/31_04.py
YorkFish/git_study
6e023244daaa22e12b24e632e76a13e5066f2947
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding:utf-8 from PIL import Image img1 = Image.open("mandelbrot.gif") img2 = Image.open("newMandelbrot.gif") diff = [(i-j) for i,j in zip(img1.getdata(), img2.getdata()) if i != j] filterdiff = [(0, 255)[e>0] for e in diff] # [i>0 and 255 or 0 for i in diff] plot = Image.new('L', (23, 73))...
26.6
78
0.631579
1511878b830e6281d248f01d2152353c1ebf2f3a
4,518
py
Python
limbo/plugins/mlb.py
uilab-github/slask
aded42ac86484e24cd4fa437d8f0ce54fe738695
[ "MIT" ]
null
null
null
limbo/plugins/mlb.py
uilab-github/slask
aded42ac86484e24cd4fa437d8f0ce54fe738695
[ "MIT" ]
null
null
null
limbo/plugins/mlb.py
uilab-github/slask
aded42ac86484e24cd4fa437d8f0ce54fe738695
[ "MIT" ]
1
2015-02-09T08:28:08.000Z
2015-02-09T08:28:08.000Z
# -*- coding: utf-8 -*- """!mlb <team> will return that team's upcoming games""" from datetime import datetime import re import requests from bs4 import BeautifulSoup as Soup schedules = { 'arizona diamondbacks': 'http://espn.go.com/mlb/team/schedule/_/name/ari/arizona-diamondbacks', 'atlanta braves': 'http:...
48.06383
101
0.651173
9ddaa03428dbfb50e3afe6f5c1e9b99a6dc38782
1,354
py
Python
mayan/apps/acls/classes.py
edsonbin/maxacali
1fd3ac99543788f77f1a7795981179b2cc8c4421
[ "Apache-2.0" ]
null
null
null
mayan/apps/acls/classes.py
edsonbin/maxacali
1fd3ac99543788f77f1a7795981179b2cc8c4421
[ "Apache-2.0" ]
null
null
null
mayan/apps/acls/classes.py
edsonbin/maxacali
1fd3ac99543788f77f1a7795981179b2cc8c4421
[ "Apache-2.0" ]
2
2020-02-24T21:02:31.000Z
2021-01-05T23:52:01.000Z
from __future__ import unicode_literals, absolute_import import logging from django.apps import apps logger = logging.getLogger(__name__) class ModelPermission(object): _registry = {} _proxies = {} _inheritances = {} @classmethod def register(cls, model, permissions): cls._registry.set...
25.54717
82
0.672083
98af4e6130677ad8ef848649da67d94537aa59e8
4,456
py
Python
azure/mgmt/compute/v2017_03_30/operations/virtual_machine_sizes_operations.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2022-01-25T22:52:58.000Z
2022-01-25T22:52:58.000Z
azure/mgmt/compute/v2017_03_30/operations/virtual_machine_sizes_operations.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
azure/mgmt/compute/v2017_03_30/operations/virtual_machine_sizes_operations.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
41.64486
144
0.633752
568650581a94318d5f390fda7c310671d62bf57e
1,283
py
Python
setup.py
initios/aeat-web-services
3e9533c6f5675df679ea6b42b07304ba938ebcb5
[ "MIT" ]
7
2018-01-04T10:57:54.000Z
2021-07-30T09:56:22.000Z
setup.py
initios/aeat-web-services
3e9533c6f5675df679ea6b42b07304ba938ebcb5
[ "MIT" ]
18
2018-01-04T10:27:01.000Z
2018-02-20T13:56:19.000Z
setup.py
initios/aeat-web-services
3e9533c6f5675df679ea6b42b07304ba938ebcb5
[ "MIT" ]
2
2018-11-07T09:07:50.000Z
2020-12-10T09:47:00.000Z
#!/usr/bin/env python # Copyright 2018 Initios Desarrollos # # All rights reserved import os import setuptools base_dir = os.path.dirname(__file__) about = {} with open(os.path.join(base_dir, 'src', 'aeat', '__about__.py')) as f: exec(f.read(), about) with open(os.path.join(base_dir, 'README.rst')) as f: ...
22.910714
78
0.638348
4482e52a5711b5cd9f93597edbad77bce68ca735
21,523
py
Python
beta_rec/models/sgl.py
Alva112358/beta-recsys
c245d0d826132a1859987a5a4ac85869019d6686
[ "MIT" ]
null
null
null
beta_rec/models/sgl.py
Alva112358/beta-recsys
c245d0d826132a1859987a5a4ac85869019d6686
[ "MIT" ]
null
null
null
beta_rec/models/sgl.py
Alva112358/beta-recsys
c245d0d826132a1859987a5a4ac85869019d6686
[ "MIT" ]
null
null
null
import numpy as np import scipy.sparse as sp import torch import torch.nn as nn from beta_rec.models.torch_engine import ModelEngine def randint_choice(high, size=None, replace=True, p=None, exclusion=None): """Return random integers from `0` (inclusive) to `high` (exclusive).""" a = np.arange(high) if e...
36.728669
89
0.592529
3799510bfdd90fcecba718d31b26dfdd79c92864
5,831
py
Python
pspy/so_window.py
xgarrido/pspy
8c1c13828ca982a1747ddeed2ee9c35b09fd9f0b
[ "BSD-3-Clause" ]
6
2020-01-26T22:00:31.000Z
2021-05-04T08:13:44.000Z
pspy/so_window.py
simonsobs/pspy
b1faf15eb7c9f4c2bee80fe5cfafaab1d4bc6470
[ "BSD-3-Clause" ]
5
2021-02-12T13:04:08.000Z
2022-01-24T18:57:34.000Z
pspy/so_window.py
xgarrido/pspy
8c1c13828ca982a1747ddeed2ee9c35b09fd9f0b
[ "BSD-3-Clause" ]
1
2021-11-02T11:01:58.000Z
2021-11-02T11:01:58.000Z
""" routines for window function generation """ import healpy as hp import numpy as np from pixell import curvedsky, enmap from pspy import sph_tools def get_distance(binary, rmax=None): """Get the distance to the closest masked pixels for CAR and healpix so_map binary. Parameters ---------- binary...
28.169082
94
0.59338
6a78d9aca4d14708856986a330049bdfc97fcc0a
99
py
Python
tests/test_exception_notregistered/registered_blocks.py
WGBH/wagtail-streamfieldtools
192f86845532742b0b7d432bef3987357833b8ed
[ "MIT" ]
6
2015-12-14T17:59:22.000Z
2016-09-28T10:38:54.000Z
tests/test_exception_notregistered/registered_blocks.py
WGBH/wagtail-streamfieldtools
192f86845532742b0b7d432bef3987357833b8ed
[ "MIT" ]
10
2016-05-13T17:59:31.000Z
2022-03-11T23:13:01.000Z
tests/test_exception_notregistered/registered_blocks.py
WGBH/wagtail-streamfieldtools
192f86845532742b0b7d432bef3987357833b8ed
[ "MIT" ]
2
2016-03-18T18:56:58.000Z
2016-05-13T18:14:15.000Z
from streamfield_tools.registry import block_registry block_registry.unregister_block('boo_urns')
24.75
53
0.878788
1aeb7219b22cd025bb26fcd32aeef6342f184266
765
py
Python
EdmFest/landing/migrations/0010_auto_20200127_2019.py
Mrgove10/EdmFest
38f79ff0586476022b91199f17f6721aa53eb377
[ "MIT" ]
null
null
null
EdmFest/landing/migrations/0010_auto_20200127_2019.py
Mrgove10/EdmFest
38f79ff0586476022b91199f17f6721aa53eb377
[ "MIT" ]
1
2020-06-06T01:16:59.000Z
2020-06-06T01:16:59.000Z
EdmFest/landing/migrations/0010_auto_20200127_2019.py
Mrgove10/EdmFest
38f79ff0586476022b91199f17f6721aa53eb377
[ "MIT" ]
null
null
null
# Generated by Django 2.2.9 on 2020-01-27 19:19 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('landing', '0009_auto_20200127_2018'), ] operations = [ migrations.AlterFie...
27.321429
90
0.620915
7eb9c3e6e2e793eb8e48f0dbb9f553d1daa688dc
5,401
py
Python
venv/Lib/site-packages/caffe2/python/scope_test.py
Westlanderz/AI-Plat1
1187c22819e5135e8e8189c99b86a93a0d66b8d8
[ "MIT" ]
1
2022-01-08T12:30:44.000Z
2022-01-08T12:30:44.000Z
venv/Lib/site-packages/caffe2/python/scope_test.py
Westlanderz/AI-Plat1
1187c22819e5135e8e8189c99b86a93a0d66b8d8
[ "MIT" ]
null
null
null
venv/Lib/site-packages/caffe2/python/scope_test.py
Westlanderz/AI-Plat1
1187c22819e5135e8e8189c99b86a93a0d66b8d8
[ "MIT" ]
null
null
null
from caffe2.python import scope, core, workspace import unittest import threading import time SUCCESS_COUNT = 0 def thread_runner(idx, testobj): global SUCCESS_COUNT testobj.assertEquals(scope.CurrentNameScope(), "") testobj.assertEquals(scope.CurrentDeviceScope(), None) names...
35.300654
89
0.623588
8336a8442ad25d8dda25ebb5c595dced8655847c
3,488
py
Python
contrib/go/src/python/pants/contrib/go/subsystems/archive_retriever.py
mpopenko-exos/pants
47d27037c8b13291fc9023e56ddd1b1defdf1b8e
[ "Apache-2.0" ]
null
null
null
contrib/go/src/python/pants/contrib/go/subsystems/archive_retriever.py
mpopenko-exos/pants
47d27037c8b13291fc9023e56ddd1b1defdf1b8e
[ "Apache-2.0" ]
1
2018-09-04T17:37:34.000Z
2018-09-04T19:42:58.000Z
contrib/go/src/python/pants/contrib/go/subsystems/archive_retriever.py
mpopenko-exos/pants
47d27037c8b13291fc9023e56ddd1b1defdf1b8e
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import logging import os import shutil from contextlib import closing, contextmanager from urllib.parse import urlparse import requests from pants.fs.archive import archiver_for_path from...
38.32967
98
0.6832
66d64699ef792f77ee32a8276c0aa4845d4c29a1
35,011
py
Python
module_constants.py
vornne/pw_module_system
a35fd5d89cbb4e684ddf2fe4a6de9fe5066b9988
[ "BSD-3-Clause" ]
17
2015-01-19T07:53:57.000Z
2021-07-10T02:26:51.000Z
module_constants.py
vornne/pw_module_system
a35fd5d89cbb4e684ddf2fe4a6de9fe5066b9988
[ "BSD-3-Clause" ]
1
2017-08-31T03:55:09.000Z
2017-08-31T03:55:09.000Z
module_constants.py
vornne/pw_module_system
a35fd5d89cbb4e684ddf2fe4a6de9fe5066b9988
[ "BSD-3-Clause" ]
14
2015-05-03T05:20:01.000Z
2021-12-29T17:10:50.000Z
############################################################## # These constants are used in various files. # If you need to define a value that will be used in those files, # just define it here rather than copying it across each file, so # that it will be easy to change it if you need to. ############################...
54.534268
180
0.702379
350835b40c02a596f127ba587ff1d2a25f67cf06
1,565
py
Python
day_05/py3/main.py
musale/advent-of-code-2020
cd467ec5f85a2733552bdf0984d1e8ce5e8b846c
[ "MIT" ]
null
null
null
day_05/py3/main.py
musale/advent-of-code-2020
cd467ec5f85a2733552bdf0984d1e8ce5e8b846c
[ "MIT" ]
null
null
null
day_05/py3/main.py
musale/advent-of-code-2020
cd467ec5f85a2733552bdf0984d1e8ce5e8b846c
[ "MIT" ]
null
null
null
def part_1(): file = open('day_05/input.txt', 'r') highest_id = 0 for lineWithOptionNewLine in file: line = lineWithOptionNewLine.strip('\n') left = 0 right = 127 for letter in line[:-3]: mid = (left + right) // 2 if letter == "F": rig...
22.681159
48
0.434505
d96a1b29cd7a53e3fe6baf11a18264e5522dba64
4,719
py
Python
lcm/ns_vls/biz/delete_vls.py
onap/vfc-nfvo-lcm
b7d4d015fa96a246d73d863092d3362afcedc284
[ "Apache-2.0" ]
4
2018-08-29T02:51:38.000Z
2021-11-16T11:36:11.000Z
lcm/ns_vls/biz/delete_vls.py
onap/vfc-nfvo-lcm
b7d4d015fa96a246d73d863092d3362afcedc284
[ "Apache-2.0" ]
null
null
null
lcm/ns_vls/biz/delete_vls.py
onap/vfc-nfvo-lcm
b7d4d015fa96a246d73d863092d3362afcedc284
[ "Apache-2.0" ]
1
2019-05-12T08:21:19.000Z
2019-05-12T08:21:19.000Z
# Copyright 2016 ZTE 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 in ...
44.942857
113
0.672388
893a232aa1158c7d138a2853922125313b44ecca
8,587
py
Python
mmhelper/bacteria_tracking.py
jmetz/momanalysis
8d71490c99127568b184784890258e9a6ef876ef
[ "MIT" ]
null
null
null
mmhelper/bacteria_tracking.py
jmetz/momanalysis
8d71490c99127568b184784890258e9a6ef876ef
[ "MIT" ]
3
2019-07-25T13:43:15.000Z
2019-11-04T12:39:22.000Z
mmhelper/bacteria_tracking.py
jmetz/momanalysis
8d71490c99127568b184784890258e9a6ef876ef
[ "MIT" ]
1
2021-03-28T03:00:21.000Z
2021-03-28T03:00:21.000Z
# FILE : bacteria_tracking.py # CREATED : 14/11/17 13:08:52 # AUTHOR : A. Smith <as624@exeter.ac.uk> # DESCRIPTION : Bacteria tracking functions # """Bacteria tracking functions """ from functools import reduce from skimage.measure import regionprops import numpy as np def find_changes(in_list, option_...
43.150754
98
0.63666