hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
972
max_issues_repo_name
stringlengths
6
130
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
3
972
max_forks_repo_name
stringlengths
6
130
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
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
c2c69d4f5aa158318f2362e729326512c8cab2cd
51,558
py
Python
tests/unit/utils/test_network.py
magenta-aps/salt
b6c78ecba697b1d7ba96ea95be300d12d8abf2d1
[ "Apache-2.0" ]
1
2021-09-06T00:14:04.000Z
2021-09-06T00:14:04.000Z
tests/unit/utils/test_network.py
magenta-aps/salt
b6c78ecba697b1d7ba96ea95be300d12d8abf2d1
[ "Apache-2.0" ]
2
2021-04-30T21:17:57.000Z
2021-12-13T20:40:23.000Z
tests/unit/utils/test_network.py
magenta-aps/salt
b6c78ecba697b1d7ba96ea95be300d12d8abf2d1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import, print_function, unicode_literals import logging import socket import textwrap import pytest import salt.exceptions # Import salt libs import salt.utils.network as network from salt._compat import ipaddress from tests.support.mock im...
40.628842
196
0.523217
d6be63b1d2cc4089aa47f506f68e8cace0cd20d9
258
py
Python
jogo-velha-py-main/game.py
DanielDDHM/my-projects-py
f6c3af7f6cd61c69234d25c956027e8c7e626470
[ "MIT" ]
null
null
null
jogo-velha-py-main/game.py
DanielDDHM/my-projects-py
f6c3af7f6cd61c69234d25c956027e8c7e626470
[ "MIT" ]
null
null
null
jogo-velha-py-main/game.py
DanielDDHM/my-projects-py
f6c3af7f6cd61c69234d25c956027e8c7e626470
[ "MIT" ]
null
null
null
import pygame as pg,sys from pygame.locals import * import time #initialize global variables XO = 'x' winner = None draw = False width = 400 height = 400 white = (255, 255, 255) line_color = (10,10,10) #TicTacToe 3x3 board TTT = [[None]*3,[None]*3,[None]*3]
18.428571
34
0.697674
58d6dcf588df374dca401792eb78c9ed452f04ef
2,047
py
Python
app.py
eliza-jane/blue-hills-climate-data
9cd94cf6e8048b71324bdff185cf0abf3af053b6
[ "MIT" ]
null
null
null
app.py
eliza-jane/blue-hills-climate-data
9cd94cf6e8048b71324bdff185cf0abf3af053b6
[ "MIT" ]
null
null
null
app.py
eliza-jane/blue-hills-climate-data
9cd94cf6e8048b71324bdff185cf0abf3af053b6
[ "MIT" ]
null
null
null
import dash import dash_core_components as dcc import dash_html_components as html import plotly.graph_objs as go import pandas as pd app = dash.Dash() df = pd.read_csv('data/1919_2019_global-monthly.csv') month_numbers = { "January": "01", "February": "02", "March": "03", "April": "04", "May...
25.911392
90
0.572545
ea9bceb1fc71e9aee29714b165ad473534137f7d
25,680
py
Python
datalocker/views.py
PSUEducationalEquity/datalocker
d27544407492404cac8302fb969b0a40b770ad06
[ "BSD-3-Clause" ]
1
2016-03-21T13:42:35.000Z
2016-03-21T13:42:35.000Z
datalocker/views.py
PSUEducationalEquity/datalocker
d27544407492404cac8302fb969b0a40b770ad06
[ "BSD-3-Clause" ]
null
null
null
datalocker/views.py
PSUEducationalEquity/datalocker
d27544407492404cac8302fb969b0a40b770ad06
[ "BSD-3-Clause" ]
1
2015-08-28T13:11:04.000Z
2015-08-28T13:11:04.000Z
### Copyright 2015 The Pennsylvania State University. Office of the Vice Provost for Educational Equity. All Rights Reserved. ### from django.conf import settings from django.contrib import messages from django.contrib.auth import REDIRECT_FIELD_NAME from django.contrib.auth.decorators import permission_required from ...
36.220028
129
0.632671
6542ab2e4f3062d8793fe957d141aab8126088e6
2,897
py
Python
skimage/io/tests/test_multi_image.py
jaidevd/scikit-image
62d6a3d7e95a228c729c9ff99b4f45336a210885
[ "BSD-3-Clause" ]
1
2019-09-08T15:01:42.000Z
2019-09-08T15:01:42.000Z
skimage/io/tests/test_multi_image.py
jaidevd/scikit-image
62d6a3d7e95a228c729c9ff99b4f45336a210885
[ "BSD-3-Clause" ]
null
null
null
skimage/io/tests/test_multi_image.py
jaidevd/scikit-image
62d6a3d7e95a228c729c9ff99b4f45336a210885
[ "BSD-3-Clause" ]
1
2021-09-28T18:22:50.000Z
2021-09-28T18:22:50.000Z
import os import numpy as np from numpy.testing import assert_raises, assert_equal, assert_allclose from skimage import data_dir from skimage.io.collection import MultiImage, ImageCollection import six class TestMultiImage(): def setUp(self): # This multipage TIF file was created with imagemagick: ...
33.298851
81
0.582672
5973513cf4c0bb8378b571b2a7dcaad4c362851d
14,783
py
Python
shadowsocks/shell.py
xiaobailong24-shadowsocks/SSR-manyuser
0b94af0b7d721cb14d1c1a16a2e8a54e559fb616
[ "Apache-2.0" ]
6
2018-01-06T12:10:30.000Z
2020-09-01T16:53:42.000Z
shadowsocks/shell.py
xiaobailong24-shadowsocks/SSR-manyuser
0b94af0b7d721cb14d1c1a16a2e8a54e559fb616
[ "Apache-2.0" ]
null
null
null
shadowsocks/shell.py
xiaobailong24-shadowsocks/SSR-manyuser
0b94af0b7d721cb14d1c1a16a2e8a54e559fb616
[ "Apache-2.0" ]
6
2017-10-18T09:30:19.000Z
2021-08-04T01:19:28.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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 b...
35.450839
97
0.574511
0fed9219bffd444bafa85622fd3377d76e50c5c1
3,285
py
Python
mesh_process_2d.py
TOPDyn/TOPDyn
27f5d2e025de99f14e755dd377e8177e24aa87b2
[ "MIT" ]
9
2020-12-09T12:56:02.000Z
2021-07-07T14:48:24.000Z
mesh_process_2d.py
TOPDyn/TOPDyn
27f5d2e025de99f14e755dd377e8177e24aa87b2
[ "MIT" ]
null
null
null
mesh_process_2d.py
TOPDyn/TOPDyn
27f5d2e025de99f14e755dd377e8177e24aa87b2
[ "MIT" ]
3
2020-12-08T21:52:54.000Z
2020-12-10T22:32:38.000Z
import gmsh import numpy as np def import_mesh(path): coord, connect = generate(path) return coord, connect def generate(path): _initialize_gmsh(path) _set_gmsh_options() nodal_coordinates_matrix, connectivity_matrix = _get_matrices() _finalize_gmsh() return nodal_coordinates_matrix, ...
38.197674
131
0.708676
504dceac582d0a622b1cbdd26d31e27df1351c6d
6,621
py
Python
oscwdFileopenclose-1.py
shyed2001/Python_Programming
93ef958e3d8aa77f9191b550972235ce4fe4a6cb
[ "bzip2-1.0.6" ]
2
2019-05-01T04:32:14.000Z
2019-05-04T11:28:18.000Z
oscwdFileopenclose-1.py
shyed2001/python-learning-basics
93ef958e3d8aa77f9191b550972235ce4fe4a6cb
[ "bzip2-1.0.6" ]
null
null
null
oscwdFileopenclose-1.py
shyed2001/python-learning-basics
93ef958e3d8aa77f9191b550972235ce4fe4a6cb
[ "bzip2-1.0.6" ]
null
null
null
print("""Must run the IDE or text editor as adminstrator to run/edit/save this program/script as/if these files are in C drive of the computer""") import os dirpath = os.getcwd() print("current directory is : " + dirpath) foldername = os.path.basename(dirpath) print("Directory name is : " + foldername) ...
34.128866
77
0.65987
da7a9073a49a334098b3a1ac5e905171474399f9
2,866
py
Python
ambari-common/src/main/python/resource_management/libraries/providers/xml_config.py
kennyballou/ambari
8985bcf11296d540a861a8634c17d6b9b1accd5a
[ "Apache-2.0" ]
null
null
null
ambari-common/src/main/python/resource_management/libraries/providers/xml_config.py
kennyballou/ambari
8985bcf11296d540a861a8634c17d6b9b1accd5a
[ "Apache-2.0" ]
null
null
null
ambari-common/src/main/python/resource_management/libraries/providers/xml_config.py
kennyballou/ambari
8985bcf11296d540a861a8634c17d6b9b1accd5a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ 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");...
40.942857
174
0.72889
25c9ffe039c200a717a48b5c8f7da0cc1ed5378c
2,699
py
Python
tests/test_app.py
abusyd1/SFIAProject1
96246383b993ffb1f9cd98d378180edf0db20d3d
[ "Unlicense" ]
null
null
null
tests/test_app.py
abusyd1/SFIAProject1
96246383b993ffb1f9cd98d378180edf0db20d3d
[ "Unlicense" ]
null
null
null
tests/test_app.py
abusyd1/SFIAProject1
96246383b993ffb1f9cd98d378180edf0db20d3d
[ "Unlicense" ]
1
2021-06-02T06:59:05.000Z
2021-06-02T06:59:05.000Z
#!/usr/bin/python3 import unittest from flask_testing import TestCase from flask import url_for from application import app, db from application.models import Parent, Player class TestBase(TestCase): def create_app(self): app.config.update(SQLALCHEMY_DATABASE_URI="sqlite:///") app.config['SECRET_...
33.320988
124
0.674324
0a8c4036d640ae0b0f4e77b1dd2a8bc007884225
229
py
Python
AIClient_Python/src/aiclient/Singleton.py
CSGames-Archive/AI-2015
dcb49b93de4d2bdfb5600ae6be47ce513cc65c47
[ "MIT" ]
1
2015-12-18T01:56:34.000Z
2015-12-18T01:56:34.000Z
AIClient_Python/src/aiclient/Singleton.py
CSGames-Archive/AI-2015
dcb49b93de4d2bdfb5600ae6be47ce513cc65c47
[ "MIT" ]
null
null
null
AIClient_Python/src/aiclient/Singleton.py
CSGames-Archive/AI-2015
dcb49b93de4d2bdfb5600ae6be47ce513cc65c47
[ "MIT" ]
1
2019-04-16T00:28:02.000Z
2019-04-16T00:28:02.000Z
''' Created on Dec 17, 2014 @author: scarriere ''' def Singleton(klass): ''' Call to get the singleton instance of a class ''' if not klass._instance: klass._instance = klass() return klass._instance
17.615385
49
0.633188
f59970b777a0a28fc51d8d173fe3752458a50cee
3,551
py
Python
dagda/analysis/static/util/utils.py
datamachines/dagda
2eac1e59b0e039efc73af640092ad5d60bbbc1c1
[ "Apache-2.0" ]
null
null
null
dagda/analysis/static/util/utils.py
datamachines/dagda
2eac1e59b0e039efc73af640092ad5d60bbbc1c1
[ "Apache-2.0" ]
null
null
null
dagda/analysis/static/util/utils.py
datamachines/dagda
2eac1e59b0e039efc73af640092ad5d60bbbc1c1
[ "Apache-2.0" ]
null
null
null
# # Licensed to Dagda under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Dagda licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance...
36.608247
114
0.683469
3185435e0833e80153adb799f68f03c9ac026175
6,610
py
Python
archive.py
supernifty/deduplicating_archive
2dfa10a6cf8bb1b2a2b55d5af6ca89adcb8b9407
[ "MIT" ]
null
null
null
archive.py
supernifty/deduplicating_archive
2dfa10a6cf8bb1b2a2b55d5af6ca89adcb8b9407
[ "MIT" ]
null
null
null
archive.py
supernifty/deduplicating_archive
2dfa10a6cf8bb1b2a2b55d5af6ca89adcb8b9407
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' Deduplicating archiver Copies files to a target dir and generates symlinks in the original file positions Duplicate files point to the same file A sqlite database tracks all generated symlinks Example usage: python archive.py --source ./test_source/ --target ./test_target/ --verbose...
45.273973
206
0.604992
532f1de00026796999be2dfecd7a5bb0a4704b45
2,299
py
Python
fuji_server/client/fuji_test.py
FAIRsFAIR/fuji
71b771ec29b4a4405720b87a32631d05f4543a7b
[ "MIT" ]
null
null
null
fuji_server/client/fuji_test.py
FAIRsFAIR/fuji
71b771ec29b4a4405720b87a32631d05f4543a7b
[ "MIT" ]
null
null
null
fuji_server/client/fuji_test.py
FAIRsFAIR/fuji
71b771ec29b4a4405720b87a32631d05f4543a7b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import configparser as ConfigParser import json import os from pathlib import Path from fuji_server.controllers.fair_check import FAIRCheck from fuji_server.helper.preprocessor import Preprocessor identifier = 'https://doi.org/10.1594/PANGAEA.902845' oai_pmh = 'http://ws.pangaea.de/oai/' debug ...
44.211538
112
0.759896
dbe0d87eea3b99c3538408172b57144e2ac47916
948
py
Python
openstates/data/migrations/0009_auto_20200429_0913.py
washabstract/openstates-core
ea69564f1f56fe4a80181b0aa715731bbc47e3f5
[ "MIT" ]
9
2020-04-04T00:19:07.000Z
2022-02-27T02:24:12.000Z
openstates/data/migrations/0009_auto_20200429_0913.py
washabstract/openstates-core
ea69564f1f56fe4a80181b0aa715731bbc47e3f5
[ "MIT" ]
17
2020-03-31T18:19:59.000Z
2022-01-03T15:18:48.000Z
openstates/data/migrations/0009_auto_20200429_0913.py
washabstract/openstates-core
ea69564f1f56fe4a80181b0aa715731bbc47e3f5
[ "MIT" ]
19
2020-04-10T21:32:21.000Z
2022-03-02T20:23:21.000Z
# Generated by Django 3.0.5 on 2020-04-29 09:13 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("data", "0008_person_current_state")] operations = [ migrations.AlterField( model_name="bill", name="first_action_date", ...
29.625
75
0.593882
6450f3672d01551e2844ece9657e39444965595a
1,091
py
Python
applications/COL380/uploads/UploadDB.TarFile.b12360829ff324e8.4465736b746f702e7461722e/run.py
BSatyaKishore/Portal4COL380
0095224cf6381dad620ecc6f101c7690d38593c4
[ "BSD-3-Clause" ]
null
null
null
applications/COL380/uploads/UploadDB.TarFile.b12360829ff324e8.4465736b746f702e7461722e/run.py
BSatyaKishore/Portal4COL380
0095224cf6381dad620ecc6f101c7690d38593c4
[ "BSD-3-Clause" ]
null
null
null
applications/COL380/uploads/UploadDB.TarFile.b12360829ff324e8.4465736b746f702e7461722e/run.py
BSatyaKishore/Portal4COL380
0095224cf6381dad620ecc6f101c7690d38593c4
[ "BSD-3-Clause" ]
null
null
null
import os #import requests import sys, urllib2, urllib comp_err_file = open("compile.e", 'r') comp_err_str = comp_err_file.read() comp_out_file = open("compile.o", 'r') comp_out_str = comp_out_file.read() fileName = str(sys.argv[1]) print 'something' data = urllib.urlencode({'fileName':fileName,'compileO':comp_out_...
43.64
113
0.721357
8ff31435de1bdb19fe77ce8f5867a720af7517c3
8,601
py
Python
lib/dspace.py
hbeyer/pylib
b2fdaa9159946982a6c0f9a9bd6e58a0503bcc51
[ "MIT" ]
null
null
null
lib/dspace.py
hbeyer/pylib
b2fdaa9159946982a6c0f9a9bd6e58a0503bcc51
[ "MIT" ]
null
null
null
lib/dspace.py
hbeyer/pylib
b2fdaa9159946982a6c0f9a9bd6e58a0503bcc51
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- from lib import pica from lib import sru from lib import xmlreader as xr from lib import dataset as ds from ext import dspace_rest_client as drc import xml.etree.ElementTree as et import urllib.request as ur import re import os import json import shutil import glob import log...
45.75
135
0.597372
32d103177dad4b6314963f921f0d87e022c87cd4
262
py
Python
ABC_B/ABC027_B.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
ABC_B/ABC027_B.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
ABC_B/ABC027_B.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
n = int(input()) al = list(map(int, input().split())) if sum(al) % n != 0: print(-1) else: ave = sum(al) // n population = 0 ans = 0 for a in al: population += (a-ave) if population != 0: ans += 1 print(ans)
16.375
36
0.461832
051113b7f3078df61ecb80a722bb23f2afe4f31f
973
py
Python
scripts/pyqtgraph-develop/pyqtgraph/widgets/HistogramLUTWidget.py
kuldeepaman/tf-pose
8050912c52a7b4f3c8a2656f267d47ba21d093f6
[ "Apache-2.0" ]
null
null
null
scripts/pyqtgraph-develop/pyqtgraph/widgets/HistogramLUTWidget.py
kuldeepaman/tf-pose
8050912c52a7b4f3c8a2656f267d47ba21d093f6
[ "Apache-2.0" ]
null
null
null
scripts/pyqtgraph-develop/pyqtgraph/widgets/HistogramLUTWidget.py
kuldeepaman/tf-pose
8050912c52a7b4f3c8a2656f267d47ba21d093f6
[ "Apache-2.0" ]
null
null
null
""" Widget displaying an image histogram along with gradient editor. Can be used to adjust the appearance of images. This is a wrapper around HistogramLUTItem """ from ..Qt import QtGui, QtCore from .GraphicsView import GraphicsView from ..graphicsItems.HistogramLUTItem import HistogramLUTItem __all__ = ['Hi...
28.617647
113
0.684481
d08ae8789898c4738d28c21f170c93f77147277f
3,347
py
Python
chainer/functions/activation/softmax.py
mingxiaoh/chainer-v3
815ff00f5eaf7944d6e8a75662ff64a2fe046a4d
[ "BSD-3-Clause" ]
7
2017-05-08T07:02:40.000Z
2018-12-02T18:35:39.000Z
chainer/functions/activation/softmax.py
mingxiaoh/chainer-v3
815ff00f5eaf7944d6e8a75662ff64a2fe046a4d
[ "BSD-3-Clause" ]
null
null
null
chainer/functions/activation/softmax.py
mingxiaoh/chainer-v3
815ff00f5eaf7944d6e8a75662ff64a2fe046a4d
[ "BSD-3-Clause" ]
1
2021-05-27T16:52:11.000Z
2021-05-27T16:52:11.000Z
import numpy from chainer import cuda from chainer import function from chainer.utils import type_check if cuda.cudnn_enabled: cudnn = cuda.cudnn libcudnn = cudnn.cudnn _cudnn_version = libcudnn.getVersion() _algorithm = libcudnn.CUDNN_SOFTMAX_ACCURATE _mode = libcudnn.CUDNN_SOFTMAX_MODE_CHANNEL ...
34.864583
78
0.58291
1bf105a6bb6e7bdc9946f964861a0a05d19553b1
383
py
Python
titan/react_pkg/reactapp/makefile_rules.py
mnieber/gen
65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9
[ "MIT" ]
null
null
null
titan/react_pkg/reactapp/makefile_rules.py
mnieber/gen
65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9
[ "MIT" ]
null
null
null
titan/react_pkg/reactapp/makefile_rules.py
mnieber/gen
65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9
[ "MIT" ]
null
null
null
from moonleap import chop0 from titan.tools_pkg.makefile import MakefileRule def get_runserver(): return MakefileRule( name="runserver", text=chop0( """ runserver: \tyarn start """ ), ) def get_install(): return MakefileRule( name="install", text=chop0...
14.185185
49
0.556136
4e104be8bf4cebfc1f1fecbf28e1d4ee6ac7f7cd
8,948
py
Python
pubsub/google/cloud/pubsub_v1/subscriber/client.py
y1ngyang/google-cloud-python
1acc8c22664229b6681ff91654932998e611e1c2
[ "Apache-2.0" ]
null
null
null
pubsub/google/cloud/pubsub_v1/subscriber/client.py
y1ngyang/google-cloud-python
1acc8c22664229b6681ff91654932998e611e1c2
[ "Apache-2.0" ]
1
2021-06-25T15:16:57.000Z
2021-06-25T15:16:57.000Z
pubsub/google/cloud/pubsub_v1/subscriber/client.py
y1ngyang/google-cloud-python
1acc8c22664229b6681ff91654932998e611e1c2
[ "Apache-2.0" ]
null
null
null
# Copyright 2017, Google LLC 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 applicable law or a...
40.306306
79
0.65333
7d5008336701fe75524a30ee1d3c5bf559dab852
803
py
Python
week6/w6e4.py
melphick/pybasics
68508d10b7509943b629b3c627252de60b6a5744
[ "Apache-2.0" ]
null
null
null
week6/w6e4.py
melphick/pybasics
68508d10b7509943b629b3c627252de60b6a5744
[ "Apache-2.0" ]
null
null
null
week6/w6e4.py
melphick/pybasics
68508d10b7509943b629b3c627252de60b6a5744
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python """ This script will take one variable 'ip_address' and return the IP address in dotted binary format always padded to eight binary digits (for example,  00001010.01011000.00010001.00010111). """ import sys def ip_bin_convert(ip_addr): ip_list = ip_addr.split('.') bin_list = ip_list[:] ...
22.305556
82
0.636364
1fca27e4be03dd6bf037b15519204c0c6681fbbe
341
py
Python
src/DbMeta_1.py
ytyaru/Python.Metaclass.Private.20180224190000
523a7e90f5752926a6447bc42e617b98e5c2c4a6
[ "CC0-1.0" ]
null
null
null
src/DbMeta_1.py
ytyaru/Python.Metaclass.Private.20180224190000
523a7e90f5752926a6447bc42e617b98e5c2c4a6
[ "CC0-1.0" ]
null
null
null
src/DbMeta_1.py
ytyaru/Python.Metaclass.Private.20180224190000
523a7e90f5752926a6447bc42e617b98e5c2c4a6
[ "CC0-1.0" ]
null
null
null
class DbMeta(type): def __new__(cls, name, bases, attrs): attrs['_{0}__secret'.format(name)] = 'my_secret' # Db.__secret 定義 return type.__new__(cls, name, bases, attrs) def __init__(cls, name, bases, attrs): setattr(cls, 'Secret', property(lambda cls: attrs['_{0}__secret'.format(name)])...
42.625
107
0.653959
2c8c0e2284d5557163ecf63c940dd999f70eef8a
5,315
py
Python
cookie_consent/util.py
nicktgr15/django-cookie-consent
5e455baa37c6216cc6989ee285e0c20253c7ffdc
[ "BSD-2-Clause" ]
1
2020-08-02T00:38:50.000Z
2020-08-02T00:38:50.000Z
cookie_consent/util.py
nicktgr15/django-cookie-consent
5e455baa37c6216cc6989ee285e0c20253c7ffdc
[ "BSD-2-Clause" ]
null
null
null
cookie_consent/util.py
nicktgr15/django-cookie-consent
5e455baa37c6216cc6989ee285e0c20253c7ffdc
[ "BSD-2-Clause" ]
4
2019-05-02T15:12:51.000Z
2021-01-20T13:12:44.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.utils.encoding import smart_str from cookie_consent.cache import ( get_cookie_group, all_cookie_groups, get_cookie, ) from cookie_consent.models import ( ACTION_ACCEPTED, ACTION_DECLINED, LogItem, ) fr...
29.859551
76
0.670555
31a1bd54d4d443dd1e5c810697c84f9e56829da4
2,080
py
Python
cerebralcortex/test_suite/test_gps_cluster_udf.py
MD2Korg/CerebralCortex-2.0
8dfcef1ba96fb8653980d1cd3eee7ed3d7f28b60
[ "BSD-2-Clause" ]
1
2020-10-19T14:36:59.000Z
2020-10-19T14:36:59.000Z
cerebralcortex/test_suite/test_gps_cluster_udf.py
MD2Korg/CerebralCortex-2.0
8dfcef1ba96fb8653980d1cd3eee7ed3d7f28b60
[ "BSD-2-Clause" ]
4
2019-05-16T15:41:06.000Z
2020-04-07T06:41:39.000Z
cerebralcortex/test_suite/test_gps_cluster_udf.py
MD2Korg/CerebralCortex-2.0
8dfcef1ba96fb8653980d1cd3eee7ed3d7f28b60
[ "BSD-2-Clause" ]
10
2019-01-25T20:16:54.000Z
2021-05-04T16:53:46.000Z
# Copyright (c) 2019, MD2K Center of Excellence # - Nasir Ali <nasir.ali08@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above cop...
42.44898
88
0.745192
6d9fcdf9f78f417ce9771c2072463fec42fc0595
4,405
py
Python
ReferentialGym/utils/streamHandler/StreamHandler.py
Near32/ReferentialGameGym
afe22da2ac20c0d24e93b4dbd1f1ad61374d1a6c
[ "MIT" ]
19
2019-11-20T05:50:37.000Z
2022-03-15T09:10:25.000Z
ReferentialGym/utils/streamHandler/StreamHandler.py
Near32/ReferentialGameGym
afe22da2ac20c0d24e93b4dbd1f1ad61374d1a6c
[ "MIT" ]
null
null
null
ReferentialGym/utils/streamHandler/StreamHandler.py
Near32/ReferentialGameGym
afe22da2ac20c0d24e93b4dbd1f1ad61374d1a6c
[ "MIT" ]
5
2020-12-20T23:00:23.000Z
2022-01-06T08:42:24.000Z
from typing import Dict, List import copy class StreamHandler(object): def __init__(self): self.placeholders = {} def register(self, placeholder_id:str): self.update(placeholder_id=placeholder_id, stream_data={}) def reset(self, placeholder_id:str): self.update(placeholder_id=pla...
37.974138
138
0.598638
611a0d163f8ca7a02d7de820f9d406d9b14c0f74
1,035
py
Python
Fluids/PointRendererFluxSimple.py
samgeen/Hegelian
5fc9b939f2e40119f18c0f6c8d314b33e27442c9
[ "MIT" ]
null
null
null
Fluids/PointRendererFluxSimple.py
samgeen/Hegelian
5fc9b939f2e40119f18c0f6c8d314b33e27442c9
[ "MIT" ]
null
null
null
Fluids/PointRendererFluxSimple.py
samgeen/Hegelian
5fc9b939f2e40119f18c0f6c8d314b33e27442c9
[ "MIT" ]
null
null
null
''' Created on Nov 8, 2012 @author: samgeen ''' from OpenGL.GL import * from PointRenderer import PointRenderer class PointRendererSimple(PointRenderer): ''' Render the flux from TODO: DECOUPLE FLUX CALCULATIONS FROM POINT RENDERER ''' def __init__(self): ''' Constructor ...
22.021277
56
0.575845
3e060222d2bf17bf38e5b2e8c376ab22ee4c915a
42,687
py
Python
test/functional/test_framework/test_framework.py
gorzek/jokecoin
c3edbbc9b5bb26718e8cb63eded9e05c7852df1b
[ "MIT" ]
null
null
null
test/functional/test_framework/test_framework.py
gorzek/jokecoin
c3edbbc9b5bb26718e8cb63eded9e05c7852df1b
[ "MIT" ]
null
null
null
test/functional/test_framework/test_framework.py
gorzek/jokecoin
c3edbbc9b5bb26718e8cb63eded9e05c7852df1b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Copyright (c) 2014-2020 The Dash Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Base class for RPC testing.""" import copy from coll...
41.93222
310
0.606227
492d501df38fe7dde4f8419e65c4ae98bd10b9db
9,061
py
Python
src/original/mobile_net_features_superpixels.py
virtualgraham/fgraph
d31a6253ea2fbc391d3e8e7c2d570ce83abeef86
[ "Apache-2.0" ]
null
null
null
src/original/mobile_net_features_superpixels.py
virtualgraham/fgraph
d31a6253ea2fbc391d3e8e7c2d570ce83abeef86
[ "Apache-2.0" ]
null
null
null
src/original/mobile_net_features_superpixels.py
virtualgraham/fgraph
d31a6253ea2fbc391d3e8e7c2d570ce83abeef86
[ "Apache-2.0" ]
null
null
null
from keras.applications import mobilenetv2 import numpy as np import cv2 import hnswlib from os import listdir, path from database_v2 import PatchGraphDatabase import time import pymeanshift as pms patch_size = 96 window_size = 96 channel_count = 3 patch_occupancy_threshold = .75 images_directory = "/Users/user/Desk...
36.684211
169
0.702351
e633e7b3ef3ff4d1a2f44f21cfa9bab3152465f4
15,682
py
Python
ledger/payments/invoice/models.py
wilsonc86/ledger
a60a681e547f37e4ac81cb93dffaf90aea8c8151
[ "Apache-2.0" ]
null
null
null
ledger/payments/invoice/models.py
wilsonc86/ledger
a60a681e547f37e4ac81cb93dffaf90aea8c8151
[ "Apache-2.0" ]
null
null
null
ledger/payments/invoice/models.py
wilsonc86/ledger
a60a681e547f37e4ac81cb93dffaf90aea8c8151
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import traceback import decimal from django.db import models,transaction from django.db.models import Q from django.db.models import Sum from django.db.models.functions import Coalesce from django.conf import settings from django.dispatch import receiver from django.db.models.sig...
40.107417
192
0.61612
c30abf35cd63d77ae1bb20422af9a935a291aeb9
617
py
Python
test/test_log.py
jakubgs/rbackup
d85c3397f53d7a04ac1b5241f0ea8cede339cc86
[ "BSD-3-Clause" ]
1
2018-01-02T16:28:43.000Z
2018-01-02T16:28:43.000Z
test/test_log.py
jakubgs/rbackup
d85c3397f53d7a04ac1b5241f0ea8cede339cc86
[ "BSD-3-Clause" ]
3
2017-12-16T00:46:42.000Z
2017-12-19T13:08:43.000Z
test/test_log.py
jakubgs/rbackup
d85c3397f53d7a04ac1b5241f0ea8cede339cc86
[ "BSD-3-Clause" ]
null
null
null
from mock import patch from logging import Logger, INFO, DEBUG from rbackup.log import setup_logging @patch('rbackup.log.logging.FileHandler') def test_setup_logging(m_fhandler): log = setup_logging('test_file') assert isinstance(log, Logger) assert log.level == INFO assert m_fhandler.called log.r...
29.380952
48
0.752026
5f37d00cdf59b0ca3bebf0e51cbf4af1a6b811b2
6,599
py
Python
indy_node/test/request_handlers/test_revoc_reg_entry_handler.py
harunpehlivan/indy-node
3c783228dc06c33c2b1cf5c124c7dc3e1721c894
[ "Apache-2.0" ]
null
null
null
indy_node/test/request_handlers/test_revoc_reg_entry_handler.py
harunpehlivan/indy-node
3c783228dc06c33c2b1cf5c124c7dc3e1721c894
[ "Apache-2.0" ]
null
null
null
indy_node/test/request_handlers/test_revoc_reg_entry_handler.py
harunpehlivan/indy-node
3c783228dc06c33c2b1cf5c124c7dc3e1721c894
[ "Apache-2.0" ]
null
null
null
import pytest from indy_common.constants import REVOC_REG_ENTRY, REVOC_REG_DEF_ID, ISSUANCE_BY_DEFAULT, \ VALUE, ISSUANCE_TYPE, ISSUED, REVOKED, ACCUM from indy_node.server.request_handlers.domain_req_handlers.revoc_reg_def_handler import RevocRegDefHandler from indy_node.server.request_handlers.domain_req_handler...
51.96063
115
0.668889
36f25d29f1ba01c06a587cd53c1927e06d9ebc3d
11,004
py
Python
arcade/examples/platform_tutorial/09_endgame.py
LiorAvrahami/arcade
fce254a9eb89629de1f99d57a63759a2953184e9
[ "MIT" ]
1
2021-03-04T14:02:29.000Z
2021-03-04T14:02:29.000Z
arcade/examples/platform_tutorial/09_endgame.py
LiorAvrahami/arcade
fce254a9eb89629de1f99d57a63759a2953184e9
[ "MIT" ]
1
2019-08-11T18:47:27.000Z
2019-08-12T03:02:11.000Z
arcade/examples/platform_tutorial/09_endgame.py
LiorAvrahami/arcade
fce254a9eb89629de1f99d57a63759a2953184e9
[ "MIT" ]
null
null
null
""" Platformer Game """ import arcade # Constants SCREEN_WIDTH = 1000 SCREEN_HEIGHT = 650 SCREEN_TITLE = "Platformer" # Constants used to scale our sprites from their original size CHARACTER_SCALING = 1 TILE_SCALING = 0.5 COIN_SCALING = 0.5 SPRITE_PIXEL_SIZE = 128 GRID_PIXEL_SIZE = (SPRITE_PIXEL_SIZE * TILE_SCALING) ...
35.61165
106
0.583788
f4398e3d197cfb649f017d11b19283cfa385f3dc
1,079
py
Python
sis/clients/migrations/0005_auto_20150205_1519.py
delphcf/sis
8a77df020463bb9c28b1a7555574014e830eeab3
[ "BSD-3-Clause" ]
null
null
null
sis/clients/migrations/0005_auto_20150205_1519.py
delphcf/sis
8a77df020463bb9c28b1a7555574014e830eeab3
[ "BSD-3-Clause" ]
null
null
null
sis/clients/migrations/0005_auto_20150205_1519.py
delphcf/sis
8a77df020463bb9c28b1a7555574014e830eeab3
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('clients', '0004_auto_20150128_1412'), ] operations = [ migrations.AlterField( model_name='referral', ...
30.828571
117
0.591288
64298c5cb303b8ed3d219900a9389d8bf4187eb2
3,100
py
Python
Code_Python/dashboard/web_app/table.py
RichardScottOZ/QMineral_Modeller
98a43b7c5aeacc9ea0a49c7dc0980b283562d926
[ "BSD-3-Clause" ]
14
2021-05-08T01:35:18.000Z
2022-01-23T09:54:03.000Z
Code_Python/dashboard/web_app/table.py
RichardScottOZ/QMineral_Modeller
98a43b7c5aeacc9ea0a49c7dc0980b283562d926
[ "BSD-3-Clause" ]
3
2021-06-10T19:38:50.000Z
2021-06-22T23:39:27.000Z
Code_Python/dashboard/web_app/table.py
RichardScottOZ/QMineral_Modeller
98a43b7c5aeacc9ea0a49c7dc0980b283562d926
[ "BSD-3-Clause" ]
3
2021-06-22T21:40:39.000Z
2022-01-16T19:39:07.000Z
import dash_html_components as html import base64 import datetime import io import dash_table import dash_core_components as dcc def parse_contents(contents, filename, date): import qmin content_type, content_string = contents.split(',') decoded = base64.b64decode(content_string) try: if 'csv'...
31.958763
87
0.577097
d45c04cb30bf08619081b98502352279147789b4
19,670
py
Python
samtranslator/model/stepfunctions/events.py
hawflau/serverless-application-model
d2cf4b7e23d26cdf677c564d53bb58e6a5b6cac2
[ "Apache-2.0" ]
1,279
2020-08-25T03:33:15.000Z
2022-03-31T09:49:22.000Z
samtranslator/model/stepfunctions/events.py
hawflau/serverless-application-model
d2cf4b7e23d26cdf677c564d53bb58e6a5b6cac2
[ "Apache-2.0" ]
797
2020-08-24T23:30:05.000Z
2022-03-31T22:28:29.000Z
samtranslator/model/stepfunctions/events.py
hawflau/serverless-application-model
d2cf4b7e23d26cdf677c564d53bb58e6a5b6cac2
[ "Apache-2.0" ]
431
2020-08-27T20:47:26.000Z
2022-03-31T23:57:55.000Z
from six import string_types import json from samtranslator.metrics.method_decorator import cw_timer from samtranslator.model import PropertyType, ResourceMacro from samtranslator.model.events import EventsRule from samtranslator.model.iam import IAMRole, IAMRolePolicies from samtranslator.model.types import dict_of, ...
44.004474
123
0.649161
3a88fcfdb3a4a5798d74b3914ee9bde0047d0860
494
py
Python
plotly/validators/contourcarpet/colorbar/_title.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
2
2018-12-03T15:20:42.000Z
2018-12-03T15:20:47.000Z
plotly/validators/contourcarpet/colorbar/_title.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
1
2020-12-15T16:56:11.000Z
2020-12-15T16:56:11.000Z
plotly/validators/contourcarpet/colorbar/_title.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
2
2019-06-17T01:35:57.000Z
2020-11-03T01:07:19.000Z
import _plotly_utils.basevalidators class TitleValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name='title', parent_name='contourcarpet.colorbar', **kwargs ): super(TitleValidator, self).__init__( plotly_name=plotly_name,...
26
67
0.609312
2d2e709f39f705a5bc1d3aa05cd72377635b49b4
2,144
py
Python
Media/common/Interface/FrameXML/MvUnit.py
dmacka/MultiverseClientServer
b64d7d754a0b2b1a3e5acabd4d6ebb80ab1d9379
[ "MIT" ]
5
2020-04-29T19:14:57.000Z
2022-02-18T08:48:37.000Z
Media/common/Interface/FrameXML/MvUnit.py
dmacka/MultiverseClientServer
b64d7d754a0b2b1a3e5acabd4d6ebb80ab1d9379
[ "MIT" ]
null
null
null
Media/common/Interface/FrameXML/MvUnit.py
dmacka/MultiverseClientServer
b64d7d754a0b2b1a3e5acabd4d6ebb80ab1d9379
[ "MIT" ]
2
2021-03-09T06:53:30.000Z
2021-03-27T12:02:39.000Z
def UnitFrame_OnEvent(frame, event): if event.eventType == "UNIT_NAME_UPDATE": unit = event.eventArgs[0] if unit == frame.Properties["unit"]: frame.Properties["name"].SetText(MarsUnit.UnitName(unit)) def UnitFrame_Update(frame): unit = frame.Properties["unit"] if not UnitExi...
36.965517
96
0.710821
ab173994fd5ea219de2a65bf025b29fc3eccae70
5,256
bzl
Python
repositories.bzl
jakebiesinger-storyhealth/rules_nodejs
8df86ccb799e4f9f3c4b26174f09b58a89ef3639
[ "Apache-2.0" ]
null
null
null
repositories.bzl
jakebiesinger-storyhealth/rules_nodejs
8df86ccb799e4f9f3c4b26174f09b58a89ef3639
[ "Apache-2.0" ]
null
null
null
repositories.bzl
jakebiesinger-storyhealth/rules_nodejs
8df86ccb799e4f9f3c4b26174f09b58a89ef3639
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
38.933333
134
0.685502
d3c1642333f1db1e8379565c1911deabc65e190f
2,099
py
Python
examples/dfp/v201505/contact_service/get_uninvited_contacts.py
wbrp/googleads-python-lib
c0f8ce6c4acfe88ce8f913a4f0e0e92b548e1022
[ "Apache-2.0" ]
1
2020-05-23T11:32:32.000Z
2020-05-23T11:32:32.000Z
examples/dfp/v201505/contact_service/get_uninvited_contacts.py
cmm08/googleads-python-lib
97743df32eff92cf00cb8beaddcda42dfa0a37f4
[ "Apache-2.0" ]
null
null
null
examples/dfp/v201505/contact_service/get_uninvited_contacts.py
cmm08/googleads-python-lib
97743df32eff92cf00cb8beaddcda42dfa0a37f4
[ "Apache-2.0" ]
2
2018-04-20T02:16:33.000Z
2020-11-12T20:58:54.000Z
#!/usr/bin/python # # Copyright 2015 Google Inc. 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 b...
31.80303
77
0.708433
ed9d57fe8edbace6d5bfc309507e23602ae1a69d
382
py
Python
dataset/DeepFakes/faceswap-master/lib/multithreading.py
MrThiago/FaceForensics
1806e70d0dd2294a12a8afd1c3f59d6ecac639bf
[ "MIT" ]
1,930
2018-04-20T14:52:01.000Z
2022-03-30T13:53:31.000Z
dataset/DeepFakes/faceswap-master/lib/multithreading.py
chrisgorgo/FaceForensics
a815daa9ebb7c12240a4b7162c431af0e1b959fa
[ "MIT" ]
68
2019-02-14T09:09:02.000Z
2022-03-23T08:55:23.000Z
dataset/DeepFakes/faceswap-master/lib/multithreading.py
chrisgorgo/FaceForensics
a815daa9ebb7c12240a4b7162c431af0e1b959fa
[ "MIT" ]
499
2018-04-20T11:27:11.000Z
2022-03-29T16:29:50.000Z
import multiprocessing as mp method = None def pool_process(method_to_run, data, processes=None): global method if processes is None: processes = mp.cpu_count() method = method_to_run pool = mp.Pool(processes=processes) for i in pool.imap_unordered(runner, data): yield i if i is n...
22.470588
54
0.685864
2abeef8bfbb079384643c58d0177f6538c878d40
4,818
py
Python
g2pw/utils.py
ishine/g2pW
e4e25f0607f7499c2dd0ed9bcb35e60d7676d323
[ "Apache-2.0" ]
3
2022-03-24T08:31:45.000Z
2022-03-29T16:46:07.000Z
g2pw/utils.py
ishine/g2pW
e4e25f0607f7499c2dd0ed9bcb35e60d7676d323
[ "Apache-2.0" ]
1
2022-03-22T07:30:46.000Z
2022-03-22T07:30:46.000Z
g2pw/utils.py
ishine/g2pW
e4e25f0607f7499c2dd0ed9bcb35e60d7676d323
[ "Apache-2.0" ]
2
2022-03-23T00:54:24.000Z
2022-03-24T08:31:47.000Z
import re import logging import sys class RunningAverage: def __init__(self): self.values = [] def add(self, val): self.values.append(val) def add_all(self, vals): self.values += vals def get(self): if len(self.values) == 0: return None return sum...
29.740741
79
0.615816
75f7e973e6cc8b0752c0d0fdcafb190907b2ef4e
3,858
py
Python
src/lambda_router/config.py
jpaidoussi/lambda-router
c7909e6667f2fc837f34f54ccffcc409e33cebb6
[ "BSD-3-Clause" ]
null
null
null
src/lambda_router/config.py
jpaidoussi/lambda-router
c7909e6667f2fc837f34f54ccffcc409e33cebb6
[ "BSD-3-Clause" ]
null
null
null
src/lambda_router/config.py
jpaidoussi/lambda-router
c7909e6667f2fc837f34f54ccffcc409e33cebb6
[ "BSD-3-Clause" ]
1
2021-03-05T06:50:26.000Z
2021-03-05T06:50:26.000Z
import os from typing import Any, Dict, Mapping from . import exceptions def str_to_bool(bool_as_string: str) -> bool: """ A converter that converts a string representation of ``True`` into a boolean. The following (case insensitive) strings will be return a ``True`` result: 'true', 't', '1', 'yes',...
35.072727
118
0.629601
28b0251dfe32632ac393f6298bacdebad9ec7e6a
298
py
Python
ch0/ch0-12.py
ValentynaGorbachenko/cd2
ad9e05092ddca9bfef29f185b23fdf5b22099e05
[ "MIT" ]
null
null
null
ch0/ch0-12.py
ValentynaGorbachenko/cd2
ad9e05092ddca9bfef29f185b23fdf5b22099e05
[ "MIT" ]
null
null
null
ch0/ch0-12.py
ValentynaGorbachenko/cd2
ad9e05092ddca9bfef29f185b23fdf5b22099e05
[ "MIT" ]
null
null
null
# Whoa, that sucker's huge ''' Add odd integers from -300000 to 300000, and console.log the final sum ''' def oddSum(beg, end): sum=0 if beg > end: print "Error" if beg+end==0: print sum else: for i in range(beg, end+1): if i%2==1: sum+=i print sum # print sum oddSum(10,27)
16.555556
70
0.624161
7d2330719a3d114b3844a433390b4717a48bca4a
2,337
py
Python
EducationalRound108/F_Chests_and_Keys.py
tqa236/codeforces
81ad7bdb7786455f83d48d59a8884f62ded66caf
[ "MIT" ]
null
null
null
EducationalRound108/F_Chests_and_Keys.py
tqa236/codeforces
81ad7bdb7786455f83d48d59a8884f62ded66caf
[ "MIT" ]
null
null
null
EducationalRound108/F_Chests_and_Keys.py
tqa236/codeforces
81ad7bdb7786455f83d48d59a8884f62ded66caf
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys from io import BytesIO, IOBase import math from collections import Counter def func(n, m, chests, keys, prices): if sum(keys) < sum(chests): return -1 pass def main(): n, m = [int(i) for i in parse_input().split()] chests = [int(i) for i in parse_i...
28.5
81
0.579375
5087b6c7840379cd600500b431ffb25ab9ab05d2
1,058
py
Python
software/glasgow/auth/challenge.py
DurandA/glasgow
ba322cb1fc1a974adeeea1efe41e959148f296f3
[ "Apache-2.0", "0BSD" ]
null
null
null
software/glasgow/auth/challenge.py
DurandA/glasgow
ba322cb1fc1a974adeeea1efe41e959148f296f3
[ "Apache-2.0", "0BSD" ]
null
null
null
software/glasgow/auth/challenge.py
DurandA/glasgow
ba322cb1fc1a974adeeea1efe41e959148f296f3
[ "Apache-2.0", "0BSD" ]
null
null
null
import usb1 import asyncio import os from ..device.hardware import GlasgowHardwareDevice from ecdsa import NIST256p, VerifyingKey from ecdsa.ellipticcurve import Point as ECDSA_Point from binascii import hexlify, unhexlify x, y = ( int('4addc7fb8998e8d9864d96a8899bab108ba47abe9087de214ded324a47fd87df', 16), i...
34.129032
93
0.783554
612b4e0474a1886fa8801bde7fdd29ce0a9c7e21
4,668
py
Python
degmo/vae/vae.py
IcarusWizard/Deep-Generative-Models
4117c11ad944bdeff106a80adbb3642a076af64e
[ "MIT" ]
2
2019-11-21T15:50:59.000Z
2019-12-17T02:44:19.000Z
degmo/vae/vae.py
IcarusWizard/Deep-Generative-Models
4117c11ad944bdeff106a80adbb3642a076af64e
[ "MIT" ]
null
null
null
degmo/vae/vae.py
IcarusWizard/Deep-Generative-Models
4117c11ad944bdeff106a80adbb3642a076af64e
[ "MIT" ]
1
2021-07-02T05:49:29.000Z
2021-07-02T05:49:29.000Z
import torch from torch.functional import F import numpy as np from .modules import MLPEncoder, MLPDecoder, ConvEncoder, ConvDecoder from .utils import get_kl, LOG2PI from .trainer import VAETrainer class VAE(torch.nn.Module): r""" Variational Auto-Encoder: http://arxiv.org/abs/1312.6114 ...
37.645161
127
0.578406
d99471b8b9c22a202bc93f7497dfd6ecc1031038
577
py
Python
8kyu/test_pre-fizzbuzz_workout_1.py
adun/codewars.py
89e7d81e9ca05a432007d634892c1cba28f5b715
[ "MIT" ]
null
null
null
8kyu/test_pre-fizzbuzz_workout_1.py
adun/codewars.py
89e7d81e9ca05a432007d634892c1cba28f5b715
[ "MIT" ]
null
null
null
8kyu/test_pre-fizzbuzz_workout_1.py
adun/codewars.py
89e7d81e9ca05a432007d634892c1cba28f5b715
[ "MIT" ]
null
null
null
# This is the first step to understanding FizzBuzz. # Your inputs: a positive integer, n, greater than or equal to one. n is provided, # you have NO CONTROL over its value. # Your expected output is an array of positive integers from 1 to n (inclusive). # Your job is to write an algorithm that gets you from the input t...
32.055556
82
0.674177
0631c3e675c28455cba691021c7efe417a1e961f
856
py
Python
resources/DataMining/APIs_Call/APICallSample.py
andy897221/Proof-of-Play-Flow-Demo
018ec382801f1363711b7680e728535a2ac94d26
[ "MIT" ]
null
null
null
resources/DataMining/APIs_Call/APICallSample.py
andy897221/Proof-of-Play-Flow-Demo
018ec382801f1363711b7680e728535a2ac94d26
[ "MIT" ]
null
null
null
resources/DataMining/APIs_Call/APICallSample.py
andy897221/Proof-of-Play-Flow-Demo
018ec382801f1363711b7680e728535a2ac94d26
[ "MIT" ]
null
null
null
# defined a day matches by randSampledDailyPlayerCount.py import math, time, requests, json url = 'https://api.opendota.com/api/explorer?sql={}' SQL = "SELECT COUNT(match_id) FROM public_matches WHERE lobby_type = 7 and game_mode = 22 and start_time >= {} and start_time < {}" day_start_time = 1533081600 aDay = 86400 ...
42.8
236
0.71028
8d55f8262d8f6ce9aa7d1b75088011b4d2641fb9
46,095
py
Python
contrib/runners/python_runner/tests/unit/test_pythonrunner.py
timgates42/st2
0e8ae756f30ffe2e017c64bff67830abdee7f7c9
[ "Apache-2.0" ]
null
null
null
contrib/runners/python_runner/tests/unit/test_pythonrunner.py
timgates42/st2
0e8ae756f30ffe2e017c64bff67830abdee7f7c9
[ "Apache-2.0" ]
15
2021-02-11T22:58:54.000Z
2021-08-06T18:03:47.000Z
contrib/runners/python_runner/tests/unit/test_pythonrunner.py
timgates42/st2
0e8ae756f30ffe2e017c64bff67830abdee7f7c9
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 ...
45.45858
100
0.660202
bc6fbe83e9eeef092cfc061b984a87c396996a52
3,484
py
Python
gimmemotifs/commands/cluster.py
simonvh/gimmemotifs
e40ab914a93210864c358b39ae677ac0792a80f2
[ "MIT" ]
20
2015-08-22T23:14:12.000Z
2018-07-24T15:41:58.000Z
gimmemotifs/commands/cluster.py
simonvh/gimmemotifs
e40ab914a93210864c358b39ae677ac0792a80f2
[ "MIT" ]
62
2015-05-01T10:02:47.000Z
2018-11-05T15:39:44.000Z
gimmemotifs/commands/cluster.py
simonvh/gimmemotifs
e40ab914a93210864c358b39ae677ac0792a80f2
[ "MIT" ]
8
2016-01-06T15:54:41.000Z
2018-08-24T15:26:12.000Z
#!/usr/bin/env python # Copyright (c) 2009-2019 Simon van Heeringen <s.vanheeringen@science.ru.nl> # # This module is free software. You can redistribute it and/or modify it under # the terms of the MIT License, see the file COPYING included with this # distribution. from gimmemotifs.motif import read_motifs from gimm...
30.295652
86
0.535878
1c443523f65f5f8c973e9eb58b9cf057505dc784
630
py
Python
tests/unit/db/test_users.py
jaimecruz21/lifeloopweb
ba0ffe1ea94ba3323a4e9c66c9506a338cae3212
[ "MIT" ]
null
null
null
tests/unit/db/test_users.py
jaimecruz21/lifeloopweb
ba0ffe1ea94ba3323a4e9c66c9506a338cae3212
[ "MIT" ]
null
null
null
tests/unit/db/test_users.py
jaimecruz21/lifeloopweb
ba0ffe1ea94ba3323a4e9c66c9506a338cae3212
[ "MIT" ]
null
null
null
import pytest from lifeloopweb.db.models import User from lifeloopweb import exception import tests class TestUser(tests.TestBase): def test_get_email_from_full_name_and_email(self): full_name_and_email = "Jason Meridth (jason@meridth.io)" result = User.get_email_from_full_name_and_email( ...
33.157895
73
0.757143
2edde60e5f0ae8d4aaaa16e19837731138d6f997
29,791
py
Python
tests/postgres.py
Walicen/peewee
e9c8bbf912903e167e052d07f6247801dd0346aa
[ "MIT" ]
1
2019-05-06T08:20:41.000Z
2019-05-06T08:20:41.000Z
tests/postgres.py
Walicen/peewee
e9c8bbf912903e167e052d07f6247801dd0346aa
[ "MIT" ]
null
null
null
tests/postgres.py
Walicen/peewee
e9c8bbf912903e167e052d07f6247801dd0346aa
[ "MIT" ]
null
null
null
#coding:utf-8 import datetime import uuid from decimal import Decimal as Dc from types import MethodType from peewee import * from playhouse.postgres_ext import * from .base import BaseTestCase from .base import ModelTestCase from .base import TestModel from .base import db_loader from .base import requires_models fr...
34.965962
99
0.543151
0050f4b8b7750ffca4ce7ad4c8709b2cae606b1c
5,457
py
Python
benchmarks/f3_wrong_hints_permutations/scaling_software_termination/9-2Nested_false-termination_3.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/f3_wrong_hints_permutations/scaling_software_termination/9-2Nested_false-termination_3.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/f3_wrong_hints_permutations/scaling_software_termination/9-2Nested_false-termination_3.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import Tuple, FrozenSet from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode import pysmt.typing as types from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
29.819672
77
0.577973
01a9f6b6c792792f496eb5566de27b76dec66348
3,887
py
Python
chimera/calibrate.py
caltech-chimera/PyChimera
61beeacea703d745b2f385b4f2197ce9c842f650
[ "MIT" ]
1
2019-03-20T20:58:49.000Z
2019-03-20T20:58:49.000Z
chimera/calibrate.py
caltech-chimera/PyChimera
61beeacea703d745b2f385b4f2197ce9c842f650
[ "MIT" ]
null
null
null
chimera/calibrate.py
caltech-chimera/PyChimera
61beeacea703d745b2f385b4f2197ce9c842f650
[ "MIT" ]
3
2020-01-29T04:59:36.000Z
2020-09-29T22:51:53.000Z
from __future__ import division import numpy as np def masterbias(image, skip = 0): """ Create an average master bias frame. Parameters ---------- image : numpy array 3D bias array from CHIMERA skip : int Number of frames of skip from start. Default is 0 (no fra...
26.993056
83
0.603036
7ebae7f0116f484f30d0c2dc2a5ad55dd7ee34bd
1,647
py
Python
model-optimizer/mo/utils/utils_test.py
apexxs/dldt
17e66dc5a6631d630da454506902bd7c25d4170b
[ "Apache-2.0" ]
2
2021-04-19T06:08:35.000Z
2021-08-25T02:43:43.000Z
model-optimizer/mo/utils/utils_test.py
apexxs/dldt
17e66dc5a6631d630da454506902bd7c25d4170b
[ "Apache-2.0" ]
6
2022-01-11T18:56:22.000Z
2022-02-21T13:20:20.000Z
model-optimizer/mo/utils/utils_test.py
apexxs/dldt
17e66dc5a6631d630da454506902bd7c25d4170b
[ "Apache-2.0" ]
3
2021-02-05T17:11:17.000Z
2021-04-19T08:33:31.000Z
""" Copyright (c) 2018 Intel 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 wri...
39.214286
95
0.693382
06e3d5b534a394b949e71192382de38477050c22
17
py
Python
login.py
zerotsou/test
409c3bafe36ff7aebb3c8eacdc36d26752ff24f1
[ "MIT" ]
null
null
null
login.py
zerotsou/test
409c3bafe36ff7aebb3c8eacdc36d26752ff24f1
[ "MIT" ]
null
null
null
login.py
zerotsou/test
409c3bafe36ff7aebb3c8eacdc36d26752ff24f1
[ "MIT" ]
null
null
null
num = 1 num2 = 2
5.666667
8
0.529412
2e595684e454fd8c14f60599a2410a0f2b883780
5,896
py
Python
22/22b.py
atnguyen1/Adventofcode2020
c57ed78354d21eb60a699ac11e4708093922cc33
[ "MIT" ]
null
null
null
22/22b.py
atnguyen1/Adventofcode2020
c57ed78354d21eb60a699ac11e4708093922cc33
[ "MIT" ]
null
null
null
22/22b.py
atnguyen1/Adventofcode2020
c57ed78354d21eb60a699ac11e4708093922cc33
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import argparse import re from collections import defaultdict, deque import sys # Memoize deck states and who wins GLOBAL_STATES = dict() GLOBAL_GAME_COUNT = 1 class Combat(): def __init__(self, one, two, game_count): self.player1 = deque(one) self.player2 = deque(two) ...
34.682353
108
0.540706
72ad61b9c560d01b439b0fdd0242a76b7d44e507
5,388
py
Python
tests/test_training_topic.py
martenson/planemo
dd4814afef0b7019ff0b5cea175724f70cc51dcf
[ "CC-BY-3.0" ]
null
null
null
tests/test_training_topic.py
martenson/planemo
dd4814afef0b7019ff0b5cea175724f70cc51dcf
[ "CC-BY-3.0" ]
null
null
null
tests/test_training_topic.py
martenson/planemo
dd4814afef0b7019ff0b5cea175724f70cc51dcf
[ "CC-BY-3.0" ]
null
null
null
"""Training:topic functions.""" import os import shutil from planemo.training.topic import Topic from planemo.training.utils import load_yaml from .test_utils import TEST_DATA_DIR def test_topic_init(): """Test :func:`planemo.training.topic.Topic.init`.""" # test requirement with default parameter topic ...
34.318471
101
0.694878
2d97d842c153bb8dff9d96b8ffacb20e915f1ddf
435
py
Python
less2_task5.py
rezapci/Algorithms-with-Python
5f4faf2d463f33375856f5a5ab525467d303aa24
[ "MIT" ]
null
null
null
less2_task5.py
rezapci/Algorithms-with-Python
5f4faf2d463f33375856f5a5ab525467d303aa24
[ "MIT" ]
null
null
null
less2_task5.py
rezapci/Algorithms-with-Python
5f4faf2d463f33375856f5a5ab525467d303aa24
[ "MIT" ]
null
null
null
# Link to flowcharts: # https://drive.google.com/file/d/12xTQSyUeeSIWUDkwn3nWW-KHMmj31Rxy/view?usp=sharing # Display the codes and characters of the ASCII table, starting with the character at number 32 and ending with the 127th inclusive. # Execute the output in tabular form: ten pairs of "code-symbol" in each line. ...
39.545455
132
0.685057
eb92fcee003eb3966bbb74f3b56473341c576e06
3,616
py
Python
scripts/tree_collapse_species.py
CGATOxford/Optic
2df92e953b5139ff4e5c383cb4383e6367cd47f1
[ "MIT" ]
null
null
null
scripts/tree_collapse_species.py
CGATOxford/Optic
2df92e953b5139ff4e5c383cb4383e6367cd47f1
[ "MIT" ]
null
null
null
scripts/tree_collapse_species.py
CGATOxford/Optic
2df92e953b5139ff4e5c383cb4383e6367cd47f1
[ "MIT" ]
1
2020-03-31T22:55:50.000Z
2020-03-31T22:55:50.000Z
""" tree_collapse_species.py - collapse single species nodes ======================================================== :Author: Andreas Heger :Release: $Id$ :Date: |today| :Tags: Python Purpose ------- This script reads a collection of trees from stdin and collapses nodes that have children of the same species. Us...
23.94702
80
0.545077
7f8acb8c32c99c7ba80d8e3a3829f071d7d4f17b
8,329
py
Python
tools/efro/terminal.py
BombSquaders/ballistica
bd1b98dfb9bf1c8c0a05a5feed44a6c8d9513e17
[ "MIT" ]
null
null
null
tools/efro/terminal.py
BombSquaders/ballistica
bd1b98dfb9bf1c8c0a05a5feed44a6c8d9513e17
[ "MIT" ]
null
null
null
tools/efro/terminal.py
BombSquaders/ballistica
bd1b98dfb9bf1c8c0a05a5feed44a6c8d9513e17
[ "MIT" ]
null
null
null
# Copyright (c) 2011-2020 Eric Froemling # # 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 use, copy, modify, merge, publish,...
31.549242
79
0.632849
b14cd68fe652ab1fca376338561e4b0e51d2104c
86,639
py
Python
Bio/Seq.py
bneron/biopython
2c52e57661c8f6cdf4a191850b2f6871f8582af7
[ "PostgreSQL" ]
null
null
null
Bio/Seq.py
bneron/biopython
2c52e57661c8f6cdf4a191850b2f6871f8582af7
[ "PostgreSQL" ]
null
null
null
Bio/Seq.py
bneron/biopython
2c52e57661c8f6cdf4a191850b2f6871f8582af7
[ "PostgreSQL" ]
null
null
null
# Copyright 2000-2002 Brad Chapman. # Copyright 2004-2005 by M de Hoon. # Copyright 2007-2014 by Peter Cock. # All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Provides objects ...
39.309891
177
0.601542
4fc681dde9753227d2b0614cbf87a3230048c605
7,814
py
Python
Lib/asyncio/queues.py
hroncok/cpython
b64de46aae148cfab0980e0ad478da7aafc44900
[ "PSF-2.0" ]
32
2018-06-02T16:55:29.000Z
2022-03-10T19:39:13.000Z
Lib/asyncio/queues.py
hroncok/cpython
b64de46aae148cfab0980e0ad478da7aafc44900
[ "PSF-2.0" ]
26
2018-05-24T16:37:47.000Z
2021-03-02T04:57:11.000Z
Lib/asyncio/queues.py
hroncok/cpython
b64de46aae148cfab0980e0ad478da7aafc44900
[ "PSF-2.0" ]
8
2019-11-25T13:37:19.000Z
2021-11-04T16:59:36.000Z
"""Queues""" __all__ = ['Queue', 'PriorityQueue', 'LifoQueue', 'QueueFull', 'QueueEmpty'] import collections import heapq from . import events from . import locks from .coroutines import coroutine class QueueEmpty(Exception): """Exception raised when Queue.get_nowait() is called on a Queue object which is ...
30.885375
79
0.59611
ba0d085f6cc1892db75c0b30e3398f97e9eccdf2
900
py
Python
lab1-python/src/sandbox.py
ArtemK123/MachineLearning
022fa1ab231b3011ce3d4a868a87a8cc9ebeb70e
[ "MIT" ]
null
null
null
lab1-python/src/sandbox.py
ArtemK123/MachineLearning
022fa1ab231b3011ce3d4a868a87a8cc9ebeb70e
[ "MIT" ]
null
null
null
lab1-python/src/sandbox.py
ArtemK123/MachineLearning
022fa1ab231b3011ce3d4a868a87a8cc9ebeb70e
[ "MIT" ]
null
null
null
import pandas as pd from sklearn.model_selection import train_test_split df = pd.read_csv('../resources/wikipedia-detox-250-line-data.tsv', sep='\t') text_input = df['SentimentText'] y_input = df['Sentiment'] from sklearn.model_selection import train_test_split X_text_train, X_text_test, y_train, y_test = train...
33.333333
115
0.755556
75d3a59c2cccd8a19788fb416ceee975185a91b5
7,503
py
Python
docs/examples/use_cases/pytorch/single_stage_detector/main.py
cyyever/DALI
e2b2d5a061da605e3e9e681017a7b2d53fe41a62
[ "ECL-2.0", "Apache-2.0" ]
3,967
2018-06-19T04:39:09.000Z
2022-03-31T10:57:53.000Z
docs/examples/use_cases/pytorch/single_stage_detector/main.py
cyyever/DALI
e2b2d5a061da605e3e9e681017a7b2d53fe41a62
[ "ECL-2.0", "Apache-2.0" ]
3,494
2018-06-21T07:09:58.000Z
2022-03-31T19:44:51.000Z
docs/examples/use_cases/pytorch/single_stage_detector/main.py
cyyever/DALI
e2b2d5a061da605e3e9e681017a7b2d53fe41a62
[ "ECL-2.0", "Apache-2.0" ]
531
2018-06-19T23:53:10.000Z
2022-03-30T08:35:59.000Z
import os import sys import time from argparse import ArgumentParser import math import numpy as np import time import torch from torch.optim.lr_scheduler import MultiStepLR import torch.utils.data.distributed from src.model import model, Loss from src.utils import dboxes300_coco, Encoder from src.evaluate import ev...
32.480519
123
0.637212
1b48302049dd3785bf8fa87dcf0b7447e647557c
3,873
py
Python
jsonism/checker.py
bmcollier/jsonvalidator
1d45cc2047958402773da849d7984285d1676cce
[ "BSD-3-Clause" ]
1
2022-03-09T07:23:10.000Z
2022-03-09T07:23:10.000Z
jsonism/checker.py
bmcollier/jsonvalidator
1d45cc2047958402773da849d7984285d1676cce
[ "BSD-3-Clause" ]
3
2022-03-09T10:16:40.000Z
2022-03-12T07:58:12.000Z
jsonism/checker.py
bmcollier/jsonvalidator
1d45cc2047958402773da849d7984285d1676cce
[ "BSD-3-Clause" ]
null
null
null
import logging from jsonism.types import Integer, String, Boolean, Float def validate(input: any, schema: any, allow_empty_lists=False, parent=None): """ Validate a top-level element. JSON supports lists, dicts and raw elements at the top level. :param input: JSON to be validated, as Python list, dict or ...
36.196262
117
0.615027
b1860fb601a7694c018fb877b37b48ad74188426
4,014
py
Python
tests/test_mdp.py
bgalbraith/macarico
448e3e7f088dde0f4eb016fbdee857221b9523fb
[ "MIT" ]
121
2019-04-09T15:44:26.000Z
2022-03-29T19:56:19.000Z
tests/test_mdp.py
bgalbraith/macarico
448e3e7f088dde0f4eb016fbdee857221b9523fb
[ "MIT" ]
1
2019-04-10T16:07:04.000Z
2019-05-09T00:41:19.000Z
tests/test_mdp.py
bgalbraith/macarico
448e3e7f088dde0f4eb016fbdee857221b9523fb
[ "MIT" ]
11
2019-04-09T16:13:34.000Z
2019-09-30T23:31:14.000Z
from __future__ import division, generators, print_function import random import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable as Var import macarico.util macarico.util.reseed() from macarico.annealing import ExponentialAnnealing, stochastic from macarico.lts.maximum...
34.016949
84
0.604136
b61e0ca05e1005455fba07a43269d7ea930eca57
4,848
py
Python
app/__init__.py
ykatzir/qapp-gsuite-react
a2935b27049372d65f7c995fef14642685306a0e
[ "Apache-2.0" ]
null
null
null
app/__init__.py
ykatzir/qapp-gsuite-react
a2935b27049372d65f7c995fef14642685306a0e
[ "Apache-2.0" ]
null
null
null
app/__init__.py
ykatzir/qapp-gsuite-react
a2935b27049372d65f7c995fef14642685306a0e
[ "Apache-2.0" ]
null
null
null
# pylint: skip-file __author__ = 'IBM' import os.path import sys import json import re from flask import Flask, Blueprint from flask import send_from_directory, render_template, request from flask_restplus import Api from flask_sqlalchemy import SQLAlchemy from flask_marshmallow import Marshmallow from q...
31.277419
152
0.613036
620919a7422d7c64f5d1cb8817f78e8ccc82aa86
7,388
py
Python
flaskr/templates/solver_google.py
sa-tony/full-stack-vrp
803ea720b99c46f819b4d9a3d076b655383eec75
[ "MIT" ]
null
null
null
flaskr/templates/solver_google.py
sa-tony/full-stack-vrp
803ea720b99c46f819b4d9a3d076b655383eec75
[ "MIT" ]
7
2020-08-19T00:57:33.000Z
2022-02-26T18:42:12.000Z
flaskr/templates/solver_google.py
sa-tony/full-stack-vrp
803ea720b99c46f819b4d9a3d076b655383eec75
[ "MIT" ]
2
2020-05-21T23:20:18.000Z
2020-07-06T14:51:34.000Z
from .solver import BaseSolver from typing import List from ortools.constraint_solver import routing_enums_pb2 from ortools.constraint_solver import pywrapcp import os class GoogleLocalSearchSolver(BaseSolver): def solve(self) -> List[List[int]]: def print_solution(manager, routing, assignment): ...
43.204678
112
0.607742
819db9bafffd87422a6ee29a1b2d1cf9979a194b
547
py
Python
backend/domain/rules/auth/change_password.py
uesleicarvalhoo/Ecommerce
1d8d0f0c522dcd27fd90e315989b6fa93caf62b8
[ "MIT" ]
null
null
null
backend/domain/rules/auth/change_password.py
uesleicarvalhoo/Ecommerce
1d8d0f0c522dcd27fd90e315989b6fa93caf62b8
[ "MIT" ]
null
null
null
backend/domain/rules/auth/change_password.py
uesleicarvalhoo/Ecommerce
1d8d0f0c522dcd27fd90e315989b6fa93caf62b8
[ "MIT" ]
null
null
null
from uuid import UUID from backend.domain.contracts import AuthenticationService, Client, ClientService class ChangePassword: def __init__(self, service: ClientService, authentication: AuthenticationService) -> None: self.service = service self.auth = authentication def handle(self, client_i...
28.789474
94
0.729433
dd231e5b9d281b72ec25bebecc447b8d6b38c37f
6,806
py
Python
tests/test_cli.py
jayvdb/django-codemod
8626e6bb5383d9ef3b733861d6996213d90cf26d
[ "MIT" ]
null
null
null
tests/test_cli.py
jayvdb/django-codemod
8626e6bb5383d9ef3b733861d6996213d90cf26d
[ "MIT" ]
2
2022-01-19T14:30:11.000Z
2022-01-28T14:32:34.000Z
tests/test_cli.py
jayvdb/django-codemod
8626e6bb5383d9ef3b733861d6996213d90cf26d
[ "MIT" ]
null
null
null
import click import pytest from click.testing import CliRunner from libcst.codemod import ParallelTransformResult from django_codemod import cli from django_codemod.cli import DEPRECATED_IN, REMOVED_IN, build_command, call_command @pytest.fixture() def cli_runner(): return CliRunner() @pytest.fixture() def gat...
29.982379
85
0.647223
ad32cf011a074e00aeab31c04da3d497ac400c4d
566
py
Python
tests/nose_plugin.py
xzchsia/shadowsocks-analysis
9d8e3e2d3b3e2b41cee51bed99231803e9b13539
[ "MIT" ]
42
2016-09-21T09:48:48.000Z
2022-02-10T14:57:35.000Z
tests/nose_plugin.py
wyqwyq/shadowsocks
ea535c74b21144c769dd41e6ccba36498801db85
[ "MIT" ]
null
null
null
tests/nose_plugin.py
wyqwyq/shadowsocks
ea535c74b21144c769dd41e6ccba36498801db85
[ "MIT" ]
25
2015-08-22T05:41:51.000Z
2019-11-11T09:58:35.000Z
import nose from nose.plugins.base import Plugin class ExtensionPlugin(Plugin): name = "ExtensionPlugin" def options(self, parser, env): Plugin.options(self, parser, env) def configure(self, options, config): Plugin.configure(self, options, config) self.enabled = True def w...
20.214286
47
0.655477
e105c463b3b7f4ab305c4ff5fddc29fa9faa8246
6,484
py
Python
homeassistant/components/rfxtrx/sensor.py
djbowers/home-assistant
cecdce07cc8b24ab353e74bec6bb78ef9c0fdf7f
[ "Apache-2.0" ]
null
null
null
homeassistant/components/rfxtrx/sensor.py
djbowers/home-assistant
cecdce07cc8b24ab353e74bec6bb78ef9c0fdf7f
[ "Apache-2.0" ]
37
2020-07-17T23:20:00.000Z
2022-03-31T06:01:48.000Z
homeassistant/components/rfxtrx/sensor.py
djbowers/home-assistant
cecdce07cc8b24ab353e74bec6bb78ef9c0fdf7f
[ "Apache-2.0" ]
null
null
null
"""Support for RFXtrx sensors.""" import logging from RFXtrx import ControlEvent, SensorEvent from homeassistant.components.sensor import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_SIGNAL_STRENGTH, DEVICE_CLASS_TEMPERATURE, ) from homeassistant.const import CONF_DEVICES from homeassis...
28.690265
85
0.623689
222760d9c1a74a14a1fa8b22a7634a35a0b00165
7,300
py
Python
examples/point_pillars/configs/kitti_point_pillars_mghead_syncbn.py
yjmade/Det3D
5cefdde927d9a1d3ee53316300daf023add3fa1e
[ "Apache-2.0" ]
null
null
null
examples/point_pillars/configs/kitti_point_pillars_mghead_syncbn.py
yjmade/Det3D
5cefdde927d9a1d3ee53316300daf023add3fa1e
[ "Apache-2.0" ]
null
null
null
examples/point_pillars/configs/kitti_point_pillars_mghead_syncbn.py
yjmade/Det3D
5cefdde927d9a1d3ee53316300daf023add3fa1e
[ "Apache-2.0" ]
null
null
null
import itertools import logging import os from det3d.builder import build_box_coder from det3d.utils.config_tool import get_downsample_factor # norm_cfg = dict(type='SyncBN', eps=1e-3, momentum=0.01) norm_cfg = None pc_range = [0, -39.68, -3, 69.12, 39.68, 1] voxel_size = [0.16, 0.16, 4.0] tasks = [ dict(num_clas...
27.54717
88
0.646849
d6d755a3ca524f0c96bbce69357e50df56960524
88
py
Python
interviews/google-2018/longest_increasing_subsequence.py
ridhwaans/exercise-vault
eaa4a33d08988b43fb627781d9edf5fe85ca9072
[ "MIT" ]
null
null
null
interviews/google-2018/longest_increasing_subsequence.py
ridhwaans/exercise-vault
eaa4a33d08988b43fb627781d9edf5fe85ca9072
[ "MIT" ]
8
2021-03-18T23:06:00.000Z
2021-06-14T21:46:01.000Z
interviews/google-2018/longest_increasing_subsequence.py
ridhwaans/practice-vault
46d3afb62377ae6e9c62c5a388fdffa6d4db3a1a
[ "MIT" ]
null
null
null
''' Given an unsorted array of integers, find the longest increasing subsequence '''
22
77
0.738636
f43c34ba5ca6b4d4962ac38746ca77a772f20e94
9,154
py
Python
cibyl/cli/validator.py
adrianfusco/cibyl
421fb537e21abddeecdde42c18f4de60425cc804
[ "Apache-2.0" ]
null
null
null
cibyl/cli/validator.py
adrianfusco/cibyl
421fb537e21abddeecdde42c18f4de60425cc804
[ "Apache-2.0" ]
null
null
null
cibyl/cli/validator.py
adrianfusco/cibyl
421fb537e21abddeecdde42c18f4de60425cc804
[ "Apache-2.0" ]
null
null
null
""" # Copyright 2022 Red Hat # # 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.953191
79
0.582041
dac10da468025e16410ed11f05b8e3389503e195
529
py
Python
main.py
FelipeCapati/ann-artificial-neural-network-perceptron
4e934b9bc34a1dd3e2966404625ad29e6fd3902a
[ "MIT" ]
null
null
null
main.py
FelipeCapati/ann-artificial-neural-network-perceptron
4e934b9bc34a1dd3e2966404625ad29e6fd3902a
[ "MIT" ]
null
null
null
main.py
FelipeCapati/ann-artificial-neural-network-perceptron
4e934b9bc34a1dd3e2966404625ad29e6fd3902a
[ "MIT" ]
null
null
null
import numpy as np from perceptron import Perceptron training_inputs = [] training_inputs.append(np.array([1, 1])) training_inputs.append(np.array([1, 0])) training_inputs.append(np.array([0, 1])) training_inputs.append(np.array([0, 0])) labels = np.array([1, 0, 0, 0]) perceptron = Perceptron(2) perceptron.train(tra...
23
41
0.733459
12c52eeed8a6c832531005e8790d6e64b273ecac
13,459
py
Python
live_test.py
ewh/sendgrid-python
b07bbfaeb9d43cca7f87a17829706af5e1297b3f
[ "MIT" ]
2
2019-08-31T17:06:44.000Z
2019-10-02T20:38:49.000Z
live_test.py
ewh/sendgrid-python
b07bbfaeb9d43cca7f87a17829706af5e1297b3f
[ "MIT" ]
1
2020-05-08T03:38:07.000Z
2020-05-08T03:38:07.000Z
live_test.py
ewh/sendgrid-python
b07bbfaeb9d43cca7f87a17829706af5e1297b3f
[ "MIT" ]
null
null
null
## Send a Single Email to a Single Recipient import os import json from sendgrid import SendGridAPIClient from sendgrid.helpers.mail import Mail, From, To, Subject, PlainTextContent, HtmlContent, SendGridException message = Mail(from_email=From('dx@sendgrid.com', 'DX'), to_emails=To('elmer.thomas@sendgr...
37.70028
215
0.692919
12dfc180b0b8b699aa8d60c6a9c4d59ade498f22
66,593
py
Python
pylinkvalidator/included/bs4/element.py
airsource/pylinkvalidator
5a52fea64ecdb867a3390a97c023765265d88d23
[ "MIT" ]
127
2015-07-06T03:19:23.000Z
2022-03-14T18:34:11.000Z
pylinkvalidator/included/bs4/element.py
airsource/pylinkvalidator
5a52fea64ecdb867a3390a97c023765265d88d23
[ "MIT" ]
32
2015-07-06T03:18:46.000Z
2020-12-14T13:14:23.000Z
pylinkvalidator/included/bs4/element.py
airsource/pylinkvalidator
5a52fea64ecdb867a3390a97c023765265d88d23
[ "MIT" ]
36
2015-08-06T18:44:53.000Z
2022-01-09T12:38:29.000Z
import sys if sys.version_info[0] < 3: import collections import re import sys import warnings from pylinkvalidator.included.bs4.dammit import EntitySubstitution DEFAULT_OUTPUT_ENCODING = "utf-8" PY3K = (sys.version_info[0] > 2) whitespace_re = re.compile("\s+") def _alias(attr)...
41.542732
117
0.528149
2e9e1648a52c645156673c4d8a46e6b35acfb485
425
py
Python
samples/get_users.py
voximplant/apiclient-python
860fc054f546152a101e29b1af388c381075ac47
[ "MIT" ]
8
2019-06-11T07:46:38.000Z
2021-04-02T17:37:08.000Z
samples/get_users.py
NikolasMelui/apiclient-python
c94caacc07e2cdc11edd022c6f9dff3feffe8edc
[ "MIT" ]
5
2019-06-05T18:34:40.000Z
2020-07-23T10:45:19.000Z
samples/get_users.py
NikolasMelui/apiclient-python
c94caacc07e2cdc11edd022c6f9dff3feffe8edc
[ "MIT" ]
6
2019-07-09T05:59:35.000Z
2021-07-08T22:37:59.000Z
from voximplant.apiclient import VoximplantAPI, VoximplantException if __name__ == "__main__": voxapi = VoximplantAPI("credentials.json") # Get two first identities. APPLICATION_ID = 1 COUNT = 2 try: res = voxapi.get_users(application_id=APPLICATION_ID, count=COUNT) ...
23.611111
67
0.644706
9454e92c1dbe7163af41e1f364c044175b824dd6
7,040
py
Python
examples_python/interactive_xy.py
notpeter/AxiDraw_API
d9c35eb93fd85f96cf197908415822af9a725b41
[ "MIT" ]
null
null
null
examples_python/interactive_xy.py
notpeter/AxiDraw_API
d9c35eb93fd85f96cf197908415822af9a725b41
[ "MIT" ]
3
2021-01-17T04:31:57.000Z
2021-01-17T04:36:41.000Z
examples_python/interactive_xy.py
notpeter/AxiDraw_API
d9c35eb93fd85f96cf197908415822af9a725b41
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -#- ''' interactive_xy.py Demonstrate use of axidraw module in "interactive" mode. Run this demo by calling: python interactive_xy.py (There is also a separate "plot" mode, which can be used for plotting an SVG file, rather than moving to various points upon command.) A...
32.442396
101
0.699148
5decb5e3f5cbaf569d68ed5f97b6cfd7ed323324
842
py
Python
three-connector/events.py
ukonpower/three-connector
9583312c4955000da7d16b7535ffac9c4dd37ab6
[ "MIT" ]
3
2022-03-26T09:36:26.000Z
2022-03-30T00:41:57.000Z
three-connector/events.py
ukonpower/three-connector
9583312c4955000da7d16b7535ffac9c4dd37ab6
[ "MIT" ]
1
2022-03-22T00:56:39.000Z
2022-03-22T00:56:39.000Z
three-connector/events.py
ukonpower/three-connector
9583312c4955000da7d16b7535ffac9c4dd37ab6
[ "MIT" ]
null
null
null
import bpy; from bpy.app.handlers import persistent from .managers.fcurve import FCurveManager from .operators.export_gltf import THREECONNECTOR_OT_ExportGLTF @persistent def on_load(scene = None, context = None): FCurveManager.update() @persistent def on_save(scene = None, context = None): THREECONNEC...
27.16129
69
0.776722
81e5e2d1ce3ea14536c2151274d5002615372b21
4,380
py
Python
test/UniformPDF.py
zoidy/puq
ed70f113f7c135ee61adeebfc9bd18c541970caf
[ "MIT" ]
null
null
null
test/UniformPDF.py
zoidy/puq
ed70f113f7c135ee61adeebfc9bd18c541970caf
[ "MIT" ]
null
null
null
test/UniformPDF.py
zoidy/puq
ed70f113f7c135ee61adeebfc9bd18c541970caf
[ "MIT" ]
null
null
null
#! /usr/bin/env python ''' Testsuite for the UniformPDF class ''' import numpy as np from puq import * import scipy.stats as stats def _hisplot(y, nbins): n, bins = np.histogram(y, nbins, normed=True) mids = bins[:-1] + np.diff(bins) / 2.0 return mids, n def compare_curves(x1, y1, x2, y2, **args): ay ...
24.886364
83
0.603196
0129e133debdd0bb7a9efc7213f0153f83e22422
2,220
py
Python
src/chembl_core_model/models/general.py
BNext-IQT/chembl_webservices_py3
42ccb39f0121835ca7ee9ac8ddd04cb513998079
[ "Apache-2.0" ]
5
2020-10-23T11:56:59.000Z
2021-06-05T16:30:10.000Z
src/chembl_core_model/models/general.py
BNext-IQT/chembl_webservices_py3
42ccb39f0121835ca7ee9ac8ddd04cb513998079
[ "Apache-2.0" ]
9
2020-02-11T08:01:40.000Z
2021-06-10T19:41:03.000Z
src/chembl_core_model/models/general.py
BNext-IQT/chembl_webservices_py3
42ccb39f0121835ca7ee9ac8ddd04cb513998079
[ "Apache-2.0" ]
4
2020-02-11T10:45:22.000Z
2021-06-07T01:48:02.000Z
__author__ = 'mnowotka' from chembl_core_db.db.customFields import * from chembl_core_db.db.models.abstractModel import ChemblCoreAbstractModel from chembl_core_db.db.models.abstractModel import ChemblModelMetaClass from django.utils import six # -----------------------------------------------------------------------...
43.529412
219
0.598198
5b46edac2953d91449e5ded97c4d7d216352df1f
1,543
py
Python
data/dataloaders/loaders/d10_1038_s41467_021_24110_y/homosapiens_dermis_2021_10x3v2_deng_001.py
johnmous/sfaira
c50240a74530e614ab7681bf9c63b04cb815b361
[ "BSD-3-Clause" ]
null
null
null
data/dataloaders/loaders/d10_1038_s41467_021_24110_y/homosapiens_dermis_2021_10x3v2_deng_001.py
johnmous/sfaira
c50240a74530e614ab7681bf9c63b04cb815b361
[ "BSD-3-Clause" ]
null
null
null
data/dataloaders/loaders/d10_1038_s41467_021_24110_y/homosapiens_dermis_2021_10x3v2_deng_001.py
johnmous/sfaira
c50240a74530e614ab7681bf9c63b04cb815b361
[ "BSD-3-Clause" ]
null
null
null
import anndata import gzip import os import pandas as pd import scipy.io import tarfile sample_dict = { 'GSM4994379_KL1': "KF1", 'GSM4994380_KL2': "KF2", 'GSM4994381_KL3': "KF3", 'GSM4994382_NS1': "NF1", 'GSM4994383_NS2': "NF2", 'GSM4994384_NS3': "NF3", } def load(data_dir, sample_fn, **kwarg...
40.605263
144
0.645496
0bcd2334242a2a4303f99f4b4b3fe5d77c6dd774
4,391
py
Python
data_preprocessing/plot/counties_plot.py
facebookresearch/Context-Aware-Representation-Crop-Yield-Prediction
9c29459e9521303f40d9d6aaa938da0c23ab4ad8
[ "MIT" ]
12
2020-09-17T21:55:18.000Z
2022-01-14T21:05:23.000Z
data_preprocessing/plot/counties_plot.py
hulaba/Context-Aware-Representation-Crop-Yield-Prediction
9c29459e9521303f40d9d6aaa938da0c23ab4ad8
[ "MIT" ]
null
null
null
data_preprocessing/plot/counties_plot.py
hulaba/Context-Aware-Representation-Crop-Yield-Prediction
9c29459e9521303f40d9d6aaa938da0c23ab4ad8
[ "MIT" ]
5
2020-10-10T10:18:14.000Z
2021-12-21T07:36:27.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from bs4 import BeautifulSoup from pathlib import Path import matplotlib as mpl import matplotlib.pyplot as plt import p...
37.211864
113
0.592348
3c8b39a76fe36f52bcfe0452b7b638423a302fd0
1,514
py
Python
ioos_metrics.py
MathewBiddle/ioos_by_the_numbers
635d44b1dbedb196eea20d8c469eee8d39fbdbcc
[ "MIT" ]
null
null
null
ioos_metrics.py
MathewBiddle/ioos_by_the_numbers
635d44b1dbedb196eea20d8c469eee8d39fbdbcc
[ "MIT" ]
null
null
null
ioos_metrics.py
MathewBiddle/ioos_by_the_numbers
635d44b1dbedb196eea20d8c469eee8d39fbdbcc
[ "MIT" ]
null
null
null
import datetime as dt import pandas as pd from fiscalyear import * # gather FY start/end dates for previous quarter fq = FiscalQuarter.current().prev_fiscal_quarter start_date = fq.start.strftime('%Y-%m-%d') end_date = fq.end.strftime('%Y-%m-%d') start = dt.datetime.strptime(start_date,'%Y-%m-%d') end = dt.datetime....
35.209302
97
0.687583
c41a098037ecd852ef12dd9f252ed586e21e1cad
748
py
Python
local_server/test/fixtures/dataset_config_outline.py
cellgeni/cellxgene
2c0a36d6aea1e0f469c613105a363f4eff53abfd
[ "MIT" ]
3
2019-11-11T15:41:07.000Z
2020-12-14T08:47:35.000Z
local_server/test/fixtures/dataset_config_outline.py
cellgeni/cellxgene
2c0a36d6aea1e0f469c613105a363f4eff53abfd
[ "MIT" ]
null
null
null
local_server/test/fixtures/dataset_config_outline.py
cellgeni/cellxgene
2c0a36d6aea1e0f469c613105a363f4eff53abfd
[ "MIT" ]
1
2021-05-12T15:15:05.000Z
2021-05-12T15:15:05.000Z
f""" dataset: app: scripts: {scripts} #list of strs (filenames) or dicts containing keys inline_scripts: {inline_scripts} #list of strs (filenames) authentication_enable: {authentication_enable} presentation: max_categories: {max_categories} custom_colors: {custom_colors} user_annotations: ...
23.375
73
0.709893
0edb2bf7b6c2a4d60ef24f4759c3b54d846f79af
582
py
Python
coinflip.py
Nahom2162002/pythonprograms
e0acc561e568aa1e67f9d80908d43780209e50f0
[ "MIT" ]
null
null
null
coinflip.py
Nahom2162002/pythonprograms
e0acc561e568aa1e67f9d80908d43780209e50f0
[ "MIT" ]
null
null
null
coinflip.py
Nahom2162002/pythonprograms
e0acc561e568aa1e67f9d80908d43780209e50f0
[ "MIT" ]
null
null
null
import random def main(): userguess = input("Let's do a coin flip, heads or tails?") flip = random.randint(1, 10) if flip >= 1 and flip <= 5: result = "heads" else: result = "tails" correct = False while correct == False: if userguess == result: c...
24.25
63
0.491409
608fe9f1fea1bbf2e74f87c91dac0908c64f13e9
31,677
py
Python
conans/test/integration/command/info/info_test.py
Wonders11/conan
28ec09f6cbf1d7e27ec27393fd7bbc74891e74a8
[ "MIT" ]
6,205
2015-12-01T13:40:05.000Z
2022-03-31T07:30:25.000Z
conans/test/integration/command/info/info_test.py
Wonders11/conan
28ec09f6cbf1d7e27ec27393fd7bbc74891e74a8
[ "MIT" ]
8,747
2015-12-01T16:28:48.000Z
2022-03-31T23:34:53.000Z
conans/test/integration/command/info/info_test.py
Wonders11/conan
28ec09f6cbf1d7e27ec27393fd7bbc74891e74a8
[ "MIT" ]
961
2015-12-01T16:56:43.000Z
2022-03-31T13:50:52.000Z
import json import os import textwrap import unittest from datetime import datetime from conans import __version__ as client_version from conans.test.utils.tools import TestClient, GenConanfile, NO_SETTINGS_PACKAGE_ID from conans.util.files import save, load class InfoTest(unittest.TestCase): def _create(self, ...
43.813278
101
0.574234
9842a3ccf256b66e396092595e8c461d2789a109
2,657
py
Python
experiments/plot_tools.py
stevenengler/witness-encryption
061882a69b8d55571186b3aa1e402335e3e9bf09
[ "MIT" ]
null
null
null
experiments/plot_tools.py
stevenengler/witness-encryption
061882a69b8d55571186b3aa1e402335e3e9bf09
[ "MIT" ]
1
2021-06-27T15:14:29.000Z
2021-06-27T21:01:06.000Z
experiments/plot_tools.py
stevenengler/witness-encryption
061882a69b8d55571186b3aa1e402335e3e9bf09
[ "MIT" ]
1
2021-06-27T15:15:46.000Z
2021-06-27T15:15:46.000Z
import matplotlib.pylab as plt import matplotlib.ticker as ticker from matplotlib.ticker import FormatStrFormatter from matplotlib import transforms from matplotlib import lines from matplotlib.ticker import ScalarFormatter # import statistics import math import numpy as np # CB_color_cycle = ['#377eb8', '#ff7f00', '#4...
33.2125
192
0.679714
2ba29a9d2039b21196a30b2b905d5fc5297671ed
20,922
py
Python
tests/test_proxy_functional.py
ods/aiohttp
8c45b4ea5faa93c70eded0e4a3f6fe483ac987c0
[ "Apache-2.0" ]
3
2019-01-15T04:17:33.000Z
2019-03-13T13:12:15.000Z
tests/test_proxy_functional.py
ods/aiohttp
8c45b4ea5faa93c70eded0e4a3f6fe483ac987c0
[ "Apache-2.0" ]
null
null
null
tests/test_proxy_functional.py
ods/aiohttp
8c45b4ea5faa93c70eded0e4a3f6fe483ac987c0
[ "Apache-2.0" ]
1
2019-01-06T11:51:49.000Z
2019-01-06T11:51:49.000Z
import asyncio import os import pathlib from unittest import mock import pytest from yarl import URL import aiohttp from aiohttp import web @pytest.fixture def proxy_test_server(aiohttp_raw_server, loop, monkeypatch): """Handle all proxy requests and imitate remote server response.""" _patch_ssl_transport(...
32.187692
79
0.66724
e8d02e720ff0f6c243f8be7c454e1d77dddab141
12,276
py
Python
test/programytest/client.py
motazsaad/fit-bot-fb-clt
580477aa1ec91855b621d9ae276f2705962f6a87
[ "MIT" ]
null
null
null
test/programytest/client.py
motazsaad/fit-bot-fb-clt
580477aa1ec91855b621d9ae276f2705962f6a87
[ "MIT" ]
null
null
null
test/programytest/client.py
motazsaad/fit-bot-fb-clt
580477aa1ec91855b621d9ae276f2705962f6a87
[ "MIT" ]
4
2019-04-01T15:42:23.000Z
2020-11-05T08:14:27.000Z
import logging import os import os.path from programy.clients.client import BotClient from programy.config.programy import ProgramyConfiguration from programy.clients.events.console.config import ConsoleConfiguration from programy.storage.stores.file.config import FileStorageConfiguration from programy.storage.stores.f...
64.610526
183
0.755947
c37c67038f1ed963b86f401d68918aed7d88e455
3,468
py
Python
tests/network/test_floatingip.py
bclau/ceilometer
90ad86c08494596dfa03c8cbfcea2c2be58fc8dc
[ "Apache-2.0" ]
null
null
null
tests/network/test_floatingip.py
bclau/ceilometer
90ad86c08494596dfa03c8cbfcea2c2be58fc8dc
[ "Apache-2.0" ]
null
null
null
tests/network/test_floatingip.py
bclau/ceilometer
90ad86c08494596dfa03c8cbfcea2c2be58fc8dc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # Copyright © 2012 eNovance <licensing@enovance.com> # # Copyright 2013 IBM Corp # All Rights Reserved. # # Author: Julien Danjou <julien@danjou.info> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
36.893617
76
0.653979
faf515ccfce3b044647dc4b05409efb00571c48c
2,307
py
Python
huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/model/resource_refer_alias.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/model/resource_refer_alias.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/model/resource_refer_alias.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class ResourceReferAlias: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key...
26.825581
79
0.53186
c7bc49f0b60379c2e135205a15a70d5b9fa91ef2
1,628
py
Python
convert_to_onnx.py
potipot/ultra_light_face
4b8489e2e207cf490549f94de1e35212e846f115
[ "MIT" ]
null
null
null
convert_to_onnx.py
potipot/ultra_light_face
4b8489e2e207cf490549f94de1e35212e846f115
[ "MIT" ]
null
null
null
convert_to_onnx.py
potipot/ultra_light_face
4b8489e2e207cf490549f94de1e35212e846f115
[ "MIT" ]
null
null
null
""" This code is used to convert the pytorch model into an onnx format model. """ import sys from pathlib import Path import torch.onnx from vision.ssd.config.fd_config import define_img_size input_img_size = 640 # define input size ,default optional(128/160/320/480/640/1280) define_img_size(input_img_size) from vis...
36.177778
119
0.756143
c5cffa1b65cc3dc78b2a78bf73b409ec9244ae12
44
py
Python
src/notion/types.py
nvo87/education-backend
1f008bd396b5dde4483af611532826a9bca9fef5
[ "MIT" ]
62
2021-09-22T18:38:26.000Z
2022-03-29T06:09:42.000Z
src/notion/types.py
nvo87/education-backend
1f008bd396b5dde4483af611532826a9bca9fef5
[ "MIT" ]
50
2021-09-16T07:17:31.000Z
2022-03-26T12:06:58.000Z
src/notion/types.py
nvo87/education-backend
1f008bd396b5dde4483af611532826a9bca9fef5
[ "MIT" ]
16
2021-10-17T17:43:31.000Z
2022-03-26T11:22:45.000Z
BlockId = str __all__ = [ 'BlockId', ]
7.333333
14
0.545455
a535734d0b9c7dd415d6a3ff58336ed10e3d4958
1,104
py
Python
LeetCode/count-primes.py
amgad01/algorithms
53eecf06e907cde806d4b78dc78fcd70d0271e3e
[ "MIT" ]
1
2021-03-05T18:13:02.000Z
2021-03-05T18:13:02.000Z
LeetCode/count-primes.py
amgad01/algorithms
53eecf06e907cde806d4b78dc78fcd70d0271e3e
[ "MIT" ]
null
null
null
LeetCode/count-primes.py
amgad01/algorithms
53eecf06e907cde806d4b78dc78fcd70d0271e3e
[ "MIT" ]
1
2021-07-25T01:55:12.000Z
2021-07-25T01:55:12.000Z
def count_primes(n): """Count the number of prime numbers less than a non-negative number, n. # extra: return the prime numbers :type n: int :rtype: int """ prime_numbers = [] if n < 2: return 0 prime = [1] * n # fill a list of length n with 1 for i in range(2, n): i...
32.470588
114
0.587862