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
414f7280cd93e5089d6f6aa6dc83bc369a28e220
67
py
Python
plugins/rest/komand_rest/actions/delete/__init__.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
46
2019-06-05T20:47:58.000Z
2022-03-29T10:18:01.000Z
plugins/rest/komand_rest/actions/delete/__init__.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
386
2019-06-07T20:20:39.000Z
2022-03-30T17:35:01.000Z
plugins/rest/komand_rest/actions/delete/__init__.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
43
2019-07-09T14:13:58.000Z
2022-03-28T12:04:46.000Z
# GENERATED BY KOMAND SDK - DO NOT EDIT from .action import Delete
22.333333
39
0.761194
c14ade6f148776a9ecf8a30fd7efd742c87f2343
7,800
py
Python
python_modules/dagster-graphql/dagster_graphql_tests/graphql/execution_queries.py
vatervonacht/dagster
595d78c883ef20618052ac1575fe46cde51fd541
[ "Apache-2.0" ]
3
2020-04-28T16:27:33.000Z
2020-07-22T07:43:30.000Z
python_modules/dagster-graphql/dagster_graphql_tests/graphql/execution_queries.py
vatervonacht/dagster
595d78c883ef20618052ac1575fe46cde51fd541
[ "Apache-2.0" ]
null
null
null
python_modules/dagster-graphql/dagster_graphql_tests/graphql/execution_queries.py
vatervonacht/dagster
595d78c883ef20618052ac1575fe46cde51fd541
[ "Apache-2.0" ]
1
2021-02-21T12:16:47.000Z
2021-02-21T12:16:47.000Z
FRAGMENTS = ''' fragment metadataEntryFragment on EventMetadataEntry { label description ... on EventPathMetadataEntry { path } ... on EventJsonMetadataEntry { jsonString } ... on EventTextMetadataEntry { text } ... on EventUrlMetadataEntry { url }...
23.214286
85
0.436538
5daa563bb23075763431da94804e01f024a06eb7
60
py
Python
autowebprint/displays/__init__.py
CreeperLin/autowebprint
9a38155b61ed94c7844abcdb0d33ebfdd4a23148
[ "MIT" ]
1
2021-04-16T08:18:58.000Z
2021-04-16T08:18:58.000Z
autowebprint/displays/__init__.py
CreeperLin/autowebprint
9a38155b61ed94c7844abcdb0d33ebfdd4a23148
[ "MIT" ]
null
null
null
autowebprint/displays/__init__.py
CreeperLin/autowebprint
9a38155b61ed94c7844abcdb0d33ebfdd4a23148
[ "MIT" ]
null
null
null
from .xvfb import XvfbDisplay from .none import NoneDisplay
20
29
0.833333
68f87e350bfcf97845c5f8fa9864b2101c30381e
971
py
Python
sanic_apache_accesslogs/templates.py
arnulfojr/sanic-apache-access-logs
d690f7399545e1d26116a24a144b56e2faca7729
[ "MIT" ]
1
2018-05-19T06:56:00.000Z
2018-05-19T06:56:00.000Z
sanic_apache_accesslogs/templates.py
arnulfojr/sanic_apache_accesslogs
d690f7399545e1d26116a24a144b56e2faca7729
[ "MIT" ]
null
null
null
sanic_apache_accesslogs/templates.py
arnulfojr/sanic_apache_accesslogs
d690f7399545e1d26116a24a144b56e2faca7729
[ "MIT" ]
null
null
null
import sys # Logger Template LOGGER_DEFAULT = { 'level': 'INFO', 'handlers': [], 'propagate': True, 'qualname': '' } # Handler template for stdout HANDLER_TEMPLATE = { 'class': 'logging.StreamHandler', 'formatter': '', 'stream': sys.stdout, 'level': 'INFO' } # Logging dict configur...
23.119048
63
0.450051
48d62c50258f77c9df5eb7d1bccd6cff91088029
828
py
Python
lib/ult/timer.py
DirtyHarryLYL/DJ-RN
7f362693f433d49e2fb5c0fc6216218d464c612b
[ "Apache-2.0" ]
96
2020-03-07T09:23:56.000Z
2022-01-05T08:31:59.000Z
lib/ult/timer.py
DirtyHarryLYL/DJ-RN
7f362693f433d49e2fb5c0fc6216218d464c612b
[ "Apache-2.0" ]
71
2020-04-21T07:25:51.000Z
2022-03-01T12:17:06.000Z
lib/ult/timer.py
DirtyHarryLYL/DJ-RN
7f362693f433d49e2fb5c0fc6216218d464c612b
[ "Apache-2.0" ]
14
2020-04-20T08:53:10.000Z
2022-02-27T05:24:23.000Z
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- import time class Timer(object): """A simple timer.""" def __i...
26.709677
58
0.507246
c8cb5b67a626dcfbbe32bad305c1ba898cafffc7
1,083
py
Python
main.py
joy-mdy-geo/ufc
634d480423f6da3beefe7ab0fad9b409e8bf6b16
[ "MIT" ]
1
2018-11-02T01:07:28.000Z
2018-11-02T01:07:28.000Z
main.py
joy-mdy-geo/ufc
634d480423f6da3beefe7ab0fad9b409e8bf6b16
[ "MIT" ]
4
2018-08-24T04:33:16.000Z
2018-09-04T05:54:39.000Z
main.py
joy-mdy-geo/ufc
634d480423f6da3beefe7ab0fad9b409e8bf6b16
[ "MIT" ]
2
2018-08-24T12:37:33.000Z
2018-08-26T10:06:45.000Z
from flask import Flask, render_template, jsonify, request import controller import pyperclip app = Flask(__name__) @app.route('/') @app.route('/index') def index(): return render_template('index.html') @app.route('/detect') def detect(): return render_template('detect.html') @app.route('/about') def abo...
20.055556
67
0.68144
89bc6e734b376eda440de91c5a669928d0410148
3,823
py
Python
poly.py
HenrySwanson/math-lib
17a15062ae7502b2e9528d9be976fb57f169de53
[ "MIT" ]
null
null
null
poly.py
HenrySwanson/math-lib
17a15062ae7502b2e9528d9be976fb57f169de53
[ "MIT" ]
null
null
null
poly.py
HenrySwanson/math-lib
17a15062ae7502b2e9528d9be976fb57f169de53
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from itertools import zip_longest from ring import Ring, RingElt, RingProperties import collections from typing import TypeVar, Sequence, List, Union class PolyRingElt(RingElt): domain: "PolyRing" coeffs: List[RingElt] # Basics def __init__(self, domain: "PolyRing", coeffs: Un...
28.110294
88
0.579126
0af43bf6c4364ad616066a1dec4e034857a683a5
12,939
py
Python
tests/lib/test_ntp.py
intel-hpdd/iml-common
096c96fec661a76f0812869560f28d55c7aafe8f
[ "MIT" ]
1
2018-02-13T13:37:08.000Z
2018-02-13T13:37:08.000Z
tests/lib/test_ntp.py
intel-hpdd/iml-common
096c96fec661a76f0812869560f28d55c7aafe8f
[ "MIT" ]
27
2017-06-22T13:00:17.000Z
2018-05-16T19:55:13.000Z
tests/lib/test_ntp.py
intel-hpdd/iml-common
096c96fec661a76f0812869560f28d55c7aafe8f
[ "MIT" ]
2
2018-06-18T08:51:29.000Z
2019-04-30T07:49:43.000Z
import mock from django.utils import unittest from iml_common.lib.ntp import NTPConfig class TestNTPConfig(unittest.TestCase): """ Test class for NTPConfig """ def setUp(self): super(TestNTPConfig, self).setUp() self.ntp = NTPConfig() # Static assignments for use in tests se...
46.376344
115
0.615117
b2538e8a4602b41fcae889f438bf4faa6a570160
1,758
py
Python
lib/surface/ml_engine/__init__.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
null
null
null
lib/surface/ml_engine/__init__.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
null
null
null
lib/surface/ml_engine/__init__.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
1
2020-07-24T20:13:29.000Z
2020-07-24T20:13:29.000Z
# Copyright 2016 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 by applicable law or ag...
37.404255
80
0.754835
a5e81d044bec4a811f10d98bae822aa474fff321
2,765
py
Python
tag.py
wiloon/pythonx
c6032ce62d3e7dce52756fc1fcf938cd970bc2fb
[ "Apache-2.0" ]
null
null
null
tag.py
wiloon/pythonx
c6032ce62d3e7dce52756fc1fcf938cd970bc2fb
[ "Apache-2.0" ]
null
null
null
tag.py
wiloon/pythonx
c6032ce62d3e7dce52756fc1fcf938cd970bc2fb
[ "Apache-2.0" ]
null
null
null
import os import logging logging.basicConfig(level=logging.DEBUG) subTitleSet = set([]) articleIndex = 0 for root, dirs, files in os.walk("/home/wiloon/workspace/my-projects/wiloon.com/content/post"): logging.debug("file list size: " + str(len(files))) for name in files: fullName = os.path.join(root, n...
33.719512
95
0.520796
36b325195548d6e052e32890a37957f2011f5fc4
37,825
py
Python
venv/lib/python3.6/site-packages/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_disk.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_disk.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_disk.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' --- module: ovirt_disk short_descripti...
41.024946
152
0.612108
7bd84c9f9d0569c02d68b50300a57d2b50652ef6
693
py
Python
emql/adapters/__init__.py
google/pymql
22e39ed3ae7630f80924ffc6fdd90bfa1f795f49
[ "Apache-2.0" ]
10
2020-08-05T19:13:21.000Z
2022-03-15T19:11:21.000Z
emql/adapters/__init__.py
teeler/pymql
22e39ed3ae7630f80924ffc6fdd90bfa1f795f49
[ "Apache-2.0" ]
1
2020-08-05T03:08:32.000Z
2020-08-05T03:08:32.000Z
emql/adapters/__init__.py
teeler/pymql
22e39ed3ae7630f80924ffc6fdd90bfa1f795f49
[ "Apache-2.0" ]
6
2020-08-05T03:07:39.000Z
2021-11-16T11:23:21.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
34.65
74
0.757576
00f39da220a46174fa51f87a6efa26838c317b23
21,926
py
Python
python/jsbeautifier/javascript/tokenizer.py
scil/js-beautify
97caa308491e1379b226c514f677fa4f278e15d4
[ "MIT" ]
null
null
null
python/jsbeautifier/javascript/tokenizer.py
scil/js-beautify
97caa308491e1379b226c514f677fa4f278e15d4
[ "MIT" ]
null
null
null
python/jsbeautifier/javascript/tokenizer.py
scil/js-beautify
97caa308491e1379b226c514f677fa4f278e15d4
[ "MIT" ]
null
null
null
# The MIT License (MIT) # # Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. # # 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 ...
35.826797
178
0.537444
41fe6d8e46bee57b6a0d4a084352e79b3d28338f
99
py
Python
tasks/constants.py
ntk148v/csi-gcs
cf1db7c5febacf4e68aa5c4411cca68b08935570
[ "Apache-2.0", "MIT" ]
null
null
null
tasks/constants.py
ntk148v/csi-gcs
cf1db7c5febacf4e68aa5c4411cca68b08935570
[ "Apache-2.0", "MIT" ]
null
null
null
tasks/constants.py
ntk148v/csi-gcs
cf1db7c5febacf4e68aa5c4411cca68b08935570
[ "Apache-2.0", "MIT" ]
null
null
null
GCSFUSE_VERSION = '0.40.0' REPO = 'ofekmeister' IMAGE = 'csi-gcs' DRIVER_NAME = f'{REPO}/{IMAGE}'
16.5
31
0.666667
f219fe2400179f33bc6aed780294f6a2f8f8fca9
1,017
py
Python
examples/basic_metadata.py
Voyz/databay
a13edd548bf6a9f651230134ac357d848b6d55e0
[ "Apache-2.0" ]
175
2020-08-20T12:59:42.000Z
2021-12-30T05:33:32.000Z
examples/basic_metadata.py
00mjk/databay
b11a43b02bed001d0aef89f796b63dfba2da7363
[ "Apache-2.0" ]
25
2020-08-23T19:56:53.000Z
2021-04-08T03:14:35.000Z
examples/basic_metadata.py
00mjk/databay
b11a43b02bed001d0aef89f796b63dfba2da7363
[ "Apache-2.0" ]
11
2020-08-29T14:18:40.000Z
2021-06-29T05:34:09.000Z
from datetime import timedelta from databay import Link from databay.inlets import RandomIntInlet from databay.outlet import Outlet from databay.planners import SchedulePlanner from databay.record import Record class ConditionalPrintOutlet(Outlet): SHOULD_PRINT = 'ConditionalPrintOutlet.SHOULD_PRINT' """Whe...
29.057143
58
0.747296
6859e528cc2f8bc21df0fc113e476030678142f7
469
py
Python
hpc-historias-clinicas/epicrisis/migrations/0003_auto_20150510_1157.py
btenaglia/hpc-historias-clinicas
649d8660381381b1c591667760c122d73071d5ec
[ "BSD-3-Clause" ]
null
null
null
hpc-historias-clinicas/epicrisis/migrations/0003_auto_20150510_1157.py
btenaglia/hpc-historias-clinicas
649d8660381381b1c591667760c122d73071d5ec
[ "BSD-3-Clause" ]
null
null
null
hpc-historias-clinicas/epicrisis/migrations/0003_auto_20150510_1157.py
btenaglia/hpc-historias-clinicas
649d8660381381b1c591667760c122d73071d5ec
[ "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 = [ ('epicrisis', '0002_auto_20150510_1155'), ] operations = [ migrations.AlterField( model_name='epicrisis', ...
22.333333
75
0.616205
f9a44e6241a3b0b1849066b92d31001304ae9925
69
py
Python
backend/api/gunicorn_conf.py
Anyesh/mychef
7d83f947e939847d7f41df9e8fd174cf3f914c46
[ "MIT" ]
null
null
null
backend/api/gunicorn_conf.py
Anyesh/mychef
7d83f947e939847d7f41df9e8fd174cf3f914c46
[ "MIT" ]
null
null
null
backend/api/gunicorn_conf.py
Anyesh/mychef
7d83f947e939847d7f41df9e8fd174cf3f914c46
[ "MIT" ]
null
null
null
bind = "0.0.0.0:8000" worker_class = "uvicorn.workers.UvicornWorker"
23
46
0.73913
8ba7050fc8e27da058dcea3b03456d7cd774dee0
633
py
Python
setup.py
what-digital/aldryn-basic-auth
175b9ef003ddcb1c5c908eca4c01302165c61c13
[ "MIT" ]
null
null
null
setup.py
what-digital/aldryn-basic-auth
175b9ef003ddcb1c5c908eca4c01302165c61c13
[ "MIT" ]
null
null
null
setup.py
what-digital/aldryn-basic-auth
175b9ef003ddcb1c5c908eca4c01302165c61c13
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup, find_packages from aldryn_basic_auth import __version__ REQUIREMENTS = [ # dependency for constance database backend 'django-picklefield>=0.3.2', # dependency for managing settings via admin 'django-constance', 'aldryn-addons', 'six', ] se...
23.444444
48
0.690363
38e461afb371eedfed33470aa7053283c3e3c970
631
py
Python
init/knn.py
salildabholkar/Machine-Learning
9de82f84977e3c60262f5474d5c11171b76c0915
[ "MIT" ]
null
null
null
init/knn.py
salildabholkar/Machine-Learning
9de82f84977e3c60262f5474d5c11171b76c0915
[ "MIT" ]
null
null
null
init/knn.py
salildabholkar/Machine-Learning
9de82f84977e3c60262f5474d5c11171b76c0915
[ "MIT" ]
null
null
null
from sklearn.model_selection import train_test_split from sklearn.datasets import make_classification from code import knn from utils.helpers import accuracy def knn_init(): X, y = make_classification(n_samples=1000, n_features=5, n_informative=5, n_redundant=0, n_classes=3) X...
27.434783
89
0.709984
c0e0296ecfcc5946541e6286ce0b3f2a9ada5ad2
5,784
py
Python
yelp/campgrounds.py
cwithmichael/yelp-camp-flask
15d05285ff198256c396e51456a9a88bc836a342
[ "MIT" ]
null
null
null
yelp/campgrounds.py
cwithmichael/yelp-camp-flask
15d05285ff198256c396e51456a9a88bc836a342
[ "MIT" ]
null
null
null
yelp/campgrounds.py
cwithmichael/yelp-camp-flask
15d05285ff198256c396e51456a9a88bc836a342
[ "MIT" ]
null
null
null
import functools from flask import ( Blueprint, flash, g, redirect, render_template, request, session, url_for, json, jsonify, current_app, ) import os import wtforms import requests from cloudinary.uploader import upload from cloudinary.api import delete_resources from clou...
33.433526
106
0.645228
6039de2966429b248be65c525939f8e705292489
3,794
py
Python
plugins/helpers.py
savezmalik786/Unlimited-Filter-Bot2
f2a7b68054ca55d062d9e881f061e4bee7a98358
[ "MIT" ]
351
2021-03-24T05:31:15.000Z
2022-03-30T02:01:57.000Z
plugins/helpers.py
savezmalik786/Unlimited-Filter-Bot2
f2a7b68054ca55d062d9e881f061e4bee7a98358
[ "MIT" ]
7
2021-03-24T16:57:32.000Z
2022-02-11T05:09:01.000Z
plugins/helpers.py
savezmalik786/Unlimited-Filter-Bot2
f2a7b68054ca55d062d9e881f061e4bee7a98358
[ "MIT" ]
837
2021-03-24T05:49:37.000Z
2022-03-30T23:48:42.000Z
import re from typing import List from pyrogram.types import InlineKeyboardButton BTN_URL_REGEX = re.compile( r"(\[([^\[]+?)\]\((buttonurl|buttonalert):(?:/{0,2})(.+?)(:same)?\))" ) SMART_OPEN = '“' SMART_CLOSE = '”' START_CHAR = ('\'', '"', SMART_OPEN) def split_quotes(text: str) -> List: if any(text.st...
31.098361
102
0.493938
0e370c775c1faf7e2338ca28071392b5203e7342
147
py
Python
Layers/__init__.py
michalnand/machine_vision
66391b78bf1ccfc67bffdfbc6530c6b339334766
[ "MIT" ]
null
null
null
Layers/__init__.py
michalnand/machine_vision
66391b78bf1ccfc67bffdfbc6530c6b339334766
[ "MIT" ]
null
null
null
Layers/__init__.py
michalnand/machine_vision
66391b78bf1ccfc67bffdfbc6530c6b339334766
[ "MIT" ]
null
null
null
from .Thresholding import * from .AdaptiveThresholding import * from .Edges import * from .Corners import *
36.75
36
0.571429
497bd61a79fd4b233fd8a88c93a40cb187ba723c
1,215
py
Python
bites/bite214.py
ChidinmaKO/Chobe-bitesofpy
2f933e6c8877a37d1ce7ef54ea22169fc67417d3
[ "MIT" ]
null
null
null
bites/bite214.py
ChidinmaKO/Chobe-bitesofpy
2f933e6c8877a37d1ce7ef54ea22169fc67417d3
[ "MIT" ]
null
null
null
bites/bite214.py
ChidinmaKO/Chobe-bitesofpy
2f933e6c8877a37d1ce7ef54ea22169fc67417d3
[ "MIT" ]
1
2019-07-16T19:12:52.000Z
2019-07-16T19:12:52.000Z
# def countdown(): # """Write a generator that counts from 100 to 1""" # number = 100 # while number > 0: # yield number # number -= 1 # another way def countdown(): """Write a generator that counts from 100 to 1""" for i in reversed(range(1, 101)): yield i ...
27
56
0.492181
ef093c624b9985711bfe0d8340ff632ffd75284b
4,199
py
Python
bot/services/message_handling_service.py
andrewpadg/ClemBot
8f036e7f5bd220d9108481515ff33a85bdf68619
[ "MIT" ]
null
null
null
bot/services/message_handling_service.py
andrewpadg/ClemBot
8f036e7f5bd220d9108481515ff33a85bdf68619
[ "MIT" ]
null
null
null
bot/services/message_handling_service.py
andrewpadg/ClemBot
8f036e7f5bd220d9108481515ff33a85bdf68619
[ "MIT" ]
null
null
null
import logging import re import discord import bot.messaging.messenger as messenger from bot.consts import Colors, DesignatedChannels from bot.data.message_repository import MessageRepository from bot.messaging.events import Events from bot.services.base_service import BaseService log = logging.getLogger(__name__) ...
47.715909
154
0.690641
d208b21cfb56c5ebf40da8eb766147dd70eb12f7
2,006
py
Python
shub/login.py
PyExplorer/shub
dc38191e6593f3c012cb89ed1551f8b0dd2981d8
[ "BSD-3-Clause" ]
111
2015-02-05T15:24:15.000Z
2022-03-31T03:31:22.000Z
shub/login.py
PyExplorer/shub
dc38191e6593f3c012cb89ed1551f8b0dd2981d8
[ "BSD-3-Clause" ]
355
2015-01-01T16:18:46.000Z
2022-03-18T15:41:10.000Z
shub/login.py
PyExplorer/shub
dc38191e6593f3c012cb89ed1551f8b0dd2981d8
[ "BSD-3-Clause" ]
79
2015-02-23T17:07:32.000Z
2022-01-03T09:15:39.000Z
from __future__ import absolute_import import click import requests from six.moves import input from six.moves.urllib.parse import urljoin from shub.config import (load_shub_config, GLOBAL_SCRAPINGHUB_YML_PATH, ShubConfig) from shub.exceptions import AlreadyLoggedInException from shub.utils im...
32.885246
77
0.707378
067061ad2378d21750f0d8ced4d88b57e8b9a303
1,419
py
Python
tests/gbe/test_coordinator_performer_autocomplete.py
bethlakshmi/gbe-divio-djangocms-python2.7
6e9b2c894162524bbbaaf73dcbe927988707231d
[ "Apache-2.0" ]
1
2021-03-14T11:56:47.000Z
2021-03-14T11:56:47.000Z
tests/gbe/test_coordinator_performer_autocomplete.py
bethlakshmi/gbe-divio-djangocms-python2.7
6e9b2c894162524bbbaaf73dcbe927988707231d
[ "Apache-2.0" ]
180
2019-09-15T19:52:46.000Z
2021-11-06T23:48:01.000Z
tests/gbe/test_coordinator_performer_autocomplete.py
bethlakshmi/gbe-divio-djangocms-python2.7
6e9b2c894162524bbbaaf73dcbe927988707231d
[ "Apache-2.0" ]
null
null
null
from django.test import TestCase from django.test import Client from django.urls import reverse from tests.factories.gbe_factories import ( PersonaFactory, ProfileFactory, TroupeFactory, ) from tests.functions.gbe_functions import ( grant_privilege, login_as, ) from gbe.functions import validate_pro...
34.609756
77
0.700493
419d027f8ad54507c1363f7ee60a4904eaf6dd2c
313
py
Python
CamJam EduKit 2 - GPIO Zero/Code/3-temperature.py
CamJam-EduKit/EduKit2
e7920420fa6b46233304ae57d8eb39255ade3e1e
[ "MIT" ]
45
2016-02-03T21:59:28.000Z
2021-11-14T02:24:02.000Z
CamJam EduKit 2 - GPIO Zero/Code/3-temperature.py
CamJam-EduKit/EduKit2
e7920420fa6b46233304ae57d8eb39255ade3e1e
[ "MIT" ]
7
2017-05-24T11:44:31.000Z
2022-03-13T11:56:08.000Z
CamJam EduKit 2 - GPIO Zero/Code/3-temperature.py
CamJam-EduKit/EduKit2
e7920420fa6b46233304ae57d8eb39255ade3e1e
[ "MIT" ]
29
2016-02-13T13:37:54.000Z
2021-04-28T16:43:49.000Z
# CamJam EduKit 2 - Sensors # Worksheet 3 - Temperature # Import Libraries import time from w1thermsensor import W1ThermSensor sensor = W1ThermSensor() # Print out the temperature until the program is stopped. while True: print(sensor.get_temperature(W1ThermSensor.DEGREES_C), "Celcius") time.sleep(1)
22.357143
69
0.769968
90fbff5629debabfdc0c690f205d6f044154ade4
68,437
py
Python
src/sage/schemes/elliptic_curves/height.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
null
null
null
src/sage/schemes/elliptic_curves/height.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
null
null
null
src/sage/schemes/elliptic_curves/height.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
1
2020-07-24T12:20:37.000Z
2020-07-24T12:20:37.000Z
r""" Canonical heights for elliptic curves over number fields Also, rigorous lower bounds for the canonical height of non-torsion points, implementing the algorithms in [CS]_ (over `\QQ`) and [TT]_, which also refer to [CPS]_. AUTHORS: - Robert Bradshaw (2010): initial version - John Cremona (2014): added many docs...
33.432829
505
0.538875
845de2f37ed06cb0d42fc3b5e981e9fce3d5e60d
1,241
py
Python
challenges/linked_list/linked_list/tests/ll_kth_from_end.py
nsinner1/data-structures-and-algorithms-python
6c15d3805ba052d6b884c8ddae1c926d81b97118
[ "MIT" ]
null
null
null
challenges/linked_list/linked_list/tests/ll_kth_from_end.py
nsinner1/data-structures-and-algorithms-python
6c15d3805ba052d6b884c8ddae1c926d81b97118
[ "MIT" ]
null
null
null
challenges/linked_list/linked_list/tests/ll_kth_from_end.py
nsinner1/data-structures-and-algorithms-python
6c15d3805ba052d6b884c8ddae1c926d81b97118
[ "MIT" ]
null
null
null
import pytest from linked_list.linked_list import Node, LinkedList linked_list = LinkedList() values = ['a', 'b', 'c', 'd','e'] for el in values: linked_list.insert(el) def test_list_nodes_order(): assert "e, d, c, b, a" == linked_list.__str__() @pytest.mark.parametrize("test_input,expected", [(0, 'a'), (1...
30.268293
112
0.68332
1481725b7bf2d51206c9cd0e3a2a3e33de1415fd
2,482
py
Python
Geometry/HGCalCommonData/test/testHGCalWafer_cfg.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
1
2020-02-07T11:20:02.000Z
2020-02-07T11:20:02.000Z
Geometry/HGCalCommonData/test/testHGCalWafer_cfg.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
7
2016-07-17T02:34:54.000Z
2019-08-13T07:58:37.000Z
Geometry/HGCalCommonData/test/testHGCalWafer_cfg.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
1
2021-03-04T00:00:02.000Z
2021-03-04T00:00:02.000Z
import FWCore.ParameterSet.Config as cms process = cms.Process("PROD") process.load("SimGeneral.HepPDTESSource.pdt_cfi") #process.load("Geometry.HGCalCommonData.testHGCV8XML_cfi") #process.load("Geometry.CMSCommonData.cmsExtendedGeometry2026D35XML_cfi") #process.load("Geometry.CMSCommonData.cmsExtendedGeometry2026D41X...
44.321429
79
0.600725
9ac15cffba65be351afefeb9ee8c5dca144dbe66
6,094
py
Python
backend/www/auth_google.py
sleepingAnt/viewfinder
9caf4e75faa8070d85f605c91d4cfb52c4674588
[ "Apache-2.0" ]
645
2015-01-03T02:03:59.000Z
2021-12-03T08:43:16.000Z
backend/www/auth_google.py
hoowang/viewfinder
9caf4e75faa8070d85f605c91d4cfb52c4674588
[ "Apache-2.0" ]
null
null
null
backend/www/auth_google.py
hoowang/viewfinder
9caf4e75faa8070d85f605c91d4cfb52c4674588
[ "Apache-2.0" ]
222
2015-01-07T05:00:52.000Z
2021-12-06T09:54:26.000Z
# Copyright 2011 Viewfinder Inc. All Rights Reserved. """Authentication and authorization for Google. The flow via the web application is: - /register/google: redirects to _OAUTH2_AUTH_URL, asking permission for contacts list, which in turn redirects to: - /register/google?code=<auth_code>: sends a requ...
46.519084
107
0.70955
f1200d2af7a9a35ef57bb5134c257b1e33ae0c52
356
py
Python
examples/redelay_lists/consumer.py
rcelha/redelay
445c0b8e85a835b44b1d813bf960fa7e27ab245c
[ "MIT" ]
6
2021-05-15T23:13:07.000Z
2022-02-21T13:58:35.000Z
examples/redelay_lists/consumer.py
rcelha/redelay
445c0b8e85a835b44b1d813bf960fa7e27ab245c
[ "MIT" ]
null
null
null
examples/redelay_lists/consumer.py
rcelha/redelay
445c0b8e85a835b44b1d813bf960fa7e27ab245c
[ "MIT" ]
null
null
null
""" consumer.py Remove 10 items from "timetable:result" and exit """ import datetime import redis r = redis.Redis(port=6666) for i in range(10): now = datetime.datetime.now() _, timetable_item = r.blpop("timetable:result") item_time = datetime.datetime.fromtimestamp(float(timetable_item)) print(f"{n...
20.941176
70
0.710674
be6dc512b83c7afc60d52a7639bafb41257996c8
2,665
py
Python
lib/galaxy/util/filelock.py
innovate-invent/galaxy
10aa953a40e171246bdd1804c74e8019da8e8200
[ "CC-BY-3.0" ]
4
2018-10-29T18:34:38.000Z
2021-09-29T23:30:42.000Z
lib/galaxy/util/filelock.py
innovate-invent/galaxy
10aa953a40e171246bdd1804c74e8019da8e8200
[ "CC-BY-3.0" ]
30
2016-10-20T15:35:12.000Z
2018-10-02T15:59:54.000Z
lib/galaxy/util/filelock.py
innovate-invent/galaxy
10aa953a40e171246bdd1804c74e8019da8e8200
[ "CC-BY-3.0" ]
7
2016-11-03T19:11:01.000Z
2020-05-11T14:23:52.000Z
"""Code obtained from https://github.com/dmfrey/FileLock. See full license at: https://github.com/dmfrey/FileLock/blob/master/LICENSE.txt """ import errno import os import time class FileLockException(Exception): pass class FileLock(object): """ A file locking mechanism that has context-manager support s...
32.108434
84
0.589493
c2dfc5dd775b4d28f47f70dfa3d2bcb66a5aa132
2,156
py
Python
offline/middleware.py
fedorov/IDC-WebApp
a2e2ef492d6d227c1b617e0da2a77a710e5415a6
[ "Apache-2.0", "BSD-3-Clause" ]
5
2020-02-28T16:33:00.000Z
2021-04-13T16:49:45.000Z
offline/middleware.py
fedorov/IDC-WebApp
a2e2ef492d6d227c1b617e0da2a77a710e5415a6
[ "Apache-2.0", "BSD-3-Clause" ]
436
2020-02-11T02:30:52.000Z
2022-03-31T18:40:45.000Z
offline/middleware.py
fedorov/IDC-WebApp
a2e2ef492d6d227c1b617e0da2a77a710e5415a6
[ "Apache-2.0", "BSD-3-Clause" ]
2
2020-10-09T20:24:28.000Z
2021-06-09T20:32:48.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import absolute_import #!/usr/bin/python # -*- coding: utf-8 -*- from builtins import object from . import offline from .views import offline_view # Customized for IDC by spaquett@systemsbiology.org # Changes: # - Added exception for admin/ and static/ (so ...
34.222222
140
0.668367
5616539816ee10a4e3cf69ead09eb2489e3f1e3a
2,873
py
Python
neighbourhood/tests.py
Maryan23/MyHood
338d76399cbdeded96d2ed3b19928146322cb705
[ "MIT" ]
null
null
null
neighbourhood/tests.py
Maryan23/MyHood
338d76399cbdeded96d2ed3b19928146322cb705
[ "MIT" ]
null
null
null
neighbourhood/tests.py
Maryan23/MyHood
338d76399cbdeded96d2ed3b19928146322cb705
[ "MIT" ]
null
null
null
from django.test import TestCase from .models import * from django.contrib.auth.models import User class LocationTestClass(TestCase): def setUp(self): self.kasarani = Location(name='Test Location',created_on='12/02/21',updated_on='01/03/2021') def test_instance(self): self.assertTrue(isinstan...
31.922222
201
0.66307
442d8a9791f3e16398c957fbcb87cb4b598238e0
5,241
py
Python
src/classifier/naive_bayes_classifier.py
angnuoli/data-preprocess
7b09f17c031daeccd8feddfac3625149f60fc629
[ "MIT" ]
2
2018-03-25T18:12:16.000Z
2018-07-25T12:38:20.000Z
src/classifier/naive_bayes_classifier.py
angnuoli/data-preprocess
7b09f17c031daeccd8feddfac3625149f60fc629
[ "MIT" ]
1
2021-04-27T09:11:45.000Z
2021-04-27T09:11:45.000Z
src/classifier/naive_bayes_classifier.py
angnuoli/data-preprocess
7b09f17c031daeccd8feddfac3625149f60fc629
[ "MIT" ]
1
2018-04-09T08:44:11.000Z
2018-04-09T08:44:11.000Z
import numpy as np from src.data_structure.data_structure import StaticData from src.metric.metric import calculate_tf_idf, add_value class NaiveBayesClassifier: """ Naive Bayes Classifier """ def __init__(self, feature_vector=None, vocabulary=None, n=0): self.class_possibility_list = [] ...
40.945313
106
0.569739
da6eaf06ae9117fe70d4a0e744ac71be0179a342
1,782
py
Python
tests/test_doc_examples.py
SPSCommerce/cloud-custodian
757252d1387efb20602ad2aa455f525c4154a85d
[ "Apache-2.0" ]
null
null
null
tests/test_doc_examples.py
SPSCommerce/cloud-custodian
757252d1387efb20602ad2aa455f525c4154a85d
[ "Apache-2.0" ]
null
null
null
tests/test_doc_examples.py
SPSCommerce/cloud-custodian
757252d1387efb20602ad2aa455f525c4154a85d
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
34.941176
92
0.648148
af607a5df3e8e030c63b11db5e86cb94066747d7
41,470
py
Python
mesonbuild/compilers/cuda.py
cclauss/meson
ba432c87a4fefcb784b9b23ac691e870735c044f
[ "Apache-2.0" ]
null
null
null
mesonbuild/compilers/cuda.py
cclauss/meson
ba432c87a4fefcb784b9b23ac691e870735c044f
[ "Apache-2.0" ]
null
null
null
mesonbuild/compilers/cuda.py
cclauss/meson
ba432c87a4fefcb784b9b23ac691e870735c044f
[ "Apache-2.0" ]
null
null
null
# Copyright 2012-2017 The Meson development team # 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 agree...
53.509677
138
0.508295
d3d14729dfce74d09d3967d163b77db6ae90ba0e
4,043
py
Python
sdk/python/pulumi_aws/cloudwatch/log_group.py
Charliekenney23/pulumi-aws
55bd0390160d27350b297834026fee52114a2d41
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/cloudwatch/log_group.py
Charliekenney23/pulumi-aws
55bd0390160d27350b297834026fee52114a2d41
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/cloudwatch/log_group.py
Charliekenney23/pulumi-aws
55bd0390160d27350b297834026fee52114a2d41
[ "ECL-2.0", "Apache-2.0" ]
1
2021-03-08T15:05:29.000Z
2021-03-08T15:05:29.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from .. import utilities, tables class LogGroup(pulumi.CustomResource)...
43.010638
172
0.684887
c4fa672ba60c2f1776874017cd796d917993ec62
1,029
py
Python
recipes/feature_pipeline_recipes/pyspark/setup.py
vidit-bhatia/experience-platform-dsw-reference
6bf93ab57dd09bb39d15f6fcc6d1397c28f16783
[ "Apache-2.0" ]
18
2018-12-13T18:53:31.000Z
2021-09-29T20:14:05.000Z
recipes/feature_pipeline_recipes/pyspark/setup.py
vidit-bhatia/experience-platform-dsw-reference
6bf93ab57dd09bb39d15f6fcc6d1397c28f16783
[ "Apache-2.0" ]
27
2019-01-02T22:52:51.000Z
2021-05-26T15:14:17.000Z
recipes/feature_pipeline_recipes/pyspark/setup.py
isabella232/experience-platform-dsw-reference
eefac0af53b63b922d34f40d92e07b110e1829fc
[ "Apache-2.0" ]
18
2019-01-09T19:34:57.000Z
2020-10-19T11:06:50.000Z
##################################################################### # ADOBE CONFIDENTIAL # ___________________ # # Copyright 2020 Adobe # All Rights Reserved. # # NOTICE: All information contained herein is, and remains # the property of Adobe and its suppliers, if any. The intellectual # and technical concepts co...
35.482759
69
0.65792
83c8df1f47f4cc2cf928bce5e2eb2d215df483d7
13,648
py
Python
cryptoapis/model/address_coins_transaction_confirmed.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
5
2021-05-17T04:45:03.000Z
2022-03-23T12:51:46.000Z
cryptoapis/model/address_coins_transaction_confirmed.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
null
null
null
cryptoapis/model/address_coins_transaction_confirmed.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
2
2021-06-02T07:32:26.000Z
2022-02-12T02:36:23.000Z
""" CryptoAPIs Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei...
47.554007
484
0.603971
a31a10259641e1fcfd479e06fc9d7c9a78d4a2d8
3,058
py
Python
socfaker/qualysguard.py
atstpls/soc-faker
119fcb9c4329a918ef9001ac5eaa36251b862bf0
[ "MIT" ]
null
null
null
socfaker/qualysguard.py
atstpls/soc-faker
119fcb9c4329a918ef9001ac5eaa36251b862bf0
[ "MIT" ]
null
null
null
socfaker/qualysguard.py
atstpls/soc-faker
119fcb9c4329a918ef9001ac5eaa36251b862bf0
[ "MIT" ]
null
null
null
import random, pendulum from string import digits from .employee import Employee class QualysGuard(object): def scan(self, count=1, host_count=1): sc = 0 return_list = [] while sc < count: employee = Employee() hosts = self.__get_scanned_hosts(host_count=host_coun...
26.136752
168
0.50654
d14835b23d861f2c5d98a4e654495f66b74dd5f6
33,245
py
Python
sdk/python/pulumi_azure/mssql/server_extended_auditing_policy.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/mssql/server_extended_auditing_policy.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/mssql/server_extended_auditing_policy.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
51.864275
252
0.692134
f5bcb9347c69a53cc28996f20f45fff19f24f672
8,266
py
Python
setup/terraform/resources/labs/__init__.py
rch/edge2ai-workshop
32af34e39439d17c2a73ba85e69248e88928a187
[ "Apache-2.0" ]
null
null
null
setup/terraform/resources/labs/__init__.py
rch/edge2ai-workshop
32af34e39439d17c2a73ba85e69248e88928a187
[ "Apache-2.0" ]
null
null
null
setup/terraform/resources/labs/__init__.py
rch/edge2ai-workshop
32af34e39439d17c2a73ba85e69248e88928a187
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import logging import os import re import socket import time from abc import ABCMeta, abstractmethod from contextlib import contextmanager from datetime import datetime from importlib import import_module from inspect import getmembers import requests logging.basicConfig...
31.310606
115
0.636705
fb7b2ec321146b8002350e7c5e8275cd40a43761
52,237
py
Python
virtual/lib/python3.6/site-packages/sqlalchemy/sql/type_api.py
claudinemahoro/pitch
b30bbf369d1e71e52d1febbab95c3d3eebf02625
[ "MIT" ]
10
2021-05-31T07:18:08.000Z
2022-03-19T09:20:11.000Z
virtual/lib/python3.6/site-packages/sqlalchemy/sql/type_api.py
claudinemahoro/pitch
b30bbf369d1e71e52d1febbab95c3d3eebf02625
[ "MIT" ]
34
2020-05-11T14:07:27.000Z
2020-11-08T15:23:27.000Z
virtual/lib/python3.6/site-packages/sqlalchemy/sql/type_api.py
claudinemahoro/pitch
b30bbf369d1e71e52d1febbab95c3d3eebf02625
[ "MIT" ]
4
2020-11-14T17:05:36.000Z
2020-11-16T18:44:54.000Z
# sql/types_api.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Base types API. """ from . import operators from .base import SchemaEventTarg...
34.941137
81
0.643107
4fb52321c098b455685f29943aeba359554eb262
2,926
py
Python
server/weather-script.py
chriselsen/Kindle_Weather-Display
18c7638cd5e3138352a4c1ed40deef4572749b6f
[ "MIT" ]
1
2018-02-07T16:16:51.000Z
2018-02-07T16:16:51.000Z
server/weather-script.py
chriselsen/Kindle_Weather-Display
18c7638cd5e3138352a4c1ed40deef4572749b6f
[ "MIT" ]
null
null
null
server/weather-script.py
chriselsen/Kindle_Weather-Display
18c7638cd5e3138352a4c1ed40deef4572749b6f
[ "MIT" ]
null
null
null
#!/usr/bin/python2 # Kindle Weather Display # Matthew Petroff (http://mpetroff.net/) # September 2012 from xml.dom import minidom import datetime import codecs try: # Python 3 from urllib.request import urlopen except ImportError: # Python 2 from urllib2 import urlopen # # Geographic location # lati...
34.833333
212
0.706083
e43b352954d90d05d4bc72e3068bcd2f176effa6
19,639
py
Python
hpobench/benchmarks/ml/xgboost_benchmark.py
Neeratyoy/HPOBench
ae5d56652f1a9b5fa6d83f8f0019150b6f050f9e
[ "Apache-2.0" ]
null
null
null
hpobench/benchmarks/ml/xgboost_benchmark.py
Neeratyoy/HPOBench
ae5d56652f1a9b5fa6d83f8f0019150b6f050f9e
[ "Apache-2.0" ]
null
null
null
hpobench/benchmarks/ml/xgboost_benchmark.py
Neeratyoy/HPOBench
ae5d56652f1a9b5fa6d83f8f0019150b6f050f9e
[ "Apache-2.0" ]
null
null
null
""" Changelog: ========== 0.0.2: * Change the search space definiton to match the paper: (https://arxiv.org/pdf/1802.09596.pdf) eta: [1e-5, 1] (def: 0.3) -> [2**-10, 1] (def: 0.3) min_child_weight: [0,05, 10] (def: 1) -> [1, 2**7] (def: 1) colsample_bytree: [0,05, 1] (def: 1) ...
45.992974
119
0.603391
93ca5ebf1dfeeb784c9531a6d49d1925b844f4e0
851
py
Python
Python/longest-subarray-of-1s-after-deleting-one-element.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
Python/longest-subarray-of-1s-after-deleting-one-element.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
Python/longest-subarray-of-1s-after-deleting-one-element.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
# Time: O(n) # Space: O(1) class Solution(object): def longestSubarray(self, nums): """ :type nums: List[int] :rtype: int """ count, left = 0, 0 for right in range(len(nums)): count += (nums[right] == 0) if count >= 2: count -...
24.314286
46
0.444183
313e470cff72a9ff28759ea12451017d80262dc6
954
py
Python
data-programming/label/lfs/__init__.py
nulberry/ADaPT-ML
d16d7f92aebcfdd76d2f92a3b64d2fb744959e3a
[ "MIT" ]
5
2021-12-21T17:39:59.000Z
2022-03-14T21:41:04.000Z
data-programming/label/lfs/__init__.py
nulberry/ADaPT-ML
d16d7f92aebcfdd76d2f92a3b64d2fb744959e3a
[ "MIT" ]
11
2022-01-19T22:04:04.000Z
2022-03-14T22:49:50.000Z
data-programming/label/lfs/__init__.py
nulberry/ADaPT-ML
d16d7f92aebcfdd76d2f92a3b64d2fb744959e3a
[ "MIT" ]
1
2022-02-25T00:56:33.000Z
2022-02-25T00:56:33.000Z
""" Initialize the classes that store the mapping between class labels and the number they will represent in the label matrix. For binary classification tasks, indicate which label is the positive class and which label is the negative class -- this will make the labels compatible with the modelling evaluation function...
23.268293
116
0.674004
f69b18949b92c79cb65260e497819f7e0d9cf59a
2,827
py
Python
createdomain.py
muzznak/pyviyatools
58a99656e0a773370c050de191999fbc98ac5f03
[ "Apache-2.0" ]
25
2019-04-09T19:52:54.000Z
2022-03-07T02:11:58.000Z
createdomain.py
muzznak/pyviyatools
58a99656e0a773370c050de191999fbc98ac5f03
[ "Apache-2.0" ]
49
2018-12-13T15:53:16.000Z
2022-03-09T15:31:13.000Z
createdomain.py
muzznak/pyviyatools
58a99656e0a773370c050de191999fbc98ac5f03
[ "Apache-2.0" ]
25
2019-08-23T19:58:29.000Z
2022-02-24T16:14:03.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # # createdomain.py # December 2017 # # create a viya domain # # Change History # # 27JAN2017 Comments added # 27JAN2017 Added the ability to create connection domains # 29JAN2017 Added choices to validate type of domain # 29SEP2018 make group list comma seperated # ...
28.846939
150
0.721259
1c13d9959ddf35b45a9c13a4751c0f7a486ad58c
6,238
py
Python
tests/New_Rochelle/2021/check_population.py
atruszkowska/NR-population-revac
3f35be85755bc7233cd1330ea1fbc0346c8dc04c
[ "MIT" ]
null
null
null
tests/New_Rochelle/2021/check_population.py
atruszkowska/NR-population-revac
3f35be85755bc7233cd1330ea1fbc0346c8dc04c
[ "MIT" ]
null
null
null
tests/New_Rochelle/2021/check_population.py
atruszkowska/NR-population-revac
3f35be85755bc7233cd1330ea1fbc0346c8dc04c
[ "MIT" ]
1
2021-09-21T18:56:10.000Z
2021-09-21T18:56:10.000Z
# ------------------------------------------------------------------ # # Check generated population # # ------------------------------------------------------------------ import sys py_path = '../../../src/mobility/' sys.path.insert(0, py_path) py_path = '../../../input_verification/' sys.path.insert(0, py_path) im...
33.005291
157
0.767554
51c50b82525a722f951de1b155bbad3b16bf1cca
1,864
py
Python
src/data/bigmart.py
SpencerOfwiti/exploratory-data-analysis
da2bb515f87e5f926daabc1a04f029d26146b5ab
[ "MIT" ]
null
null
null
src/data/bigmart.py
SpencerOfwiti/exploratory-data-analysis
da2bb515f87e5f926daabc1a04f029d26146b5ab
[ "MIT" ]
null
null
null
src/data/bigmart.py
SpencerOfwiti/exploratory-data-analysis
da2bb515f87e5f926daabc1a04f029d26146b5ab
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns #%% create dataframe df = pd.read_csv('../../data/raw/bigmart.csv') print(df.head()) print(df.shape) print(df.columns) #%% Descriptive analysis # numeric columns print(df.describe()) #%% categorical variables cat = df.dtypes...
28.242424
77
0.734442
00e0788e542e4087320aad0db3122c3e0b19a2d4
2,734
py
Python
uvicore/auth/authenticators/base.py
uvicore/framework
9c21b85e9e470c6d789899340332a9abd0b26ab1
[ "MIT" ]
11
2021-03-22T22:07:49.000Z
2022-03-08T16:18:33.000Z
uvicore/auth/authenticators/base.py
uvicore/framework
9c21b85e9e470c6d789899340332a9abd0b26ab1
[ "MIT" ]
12
2021-03-04T05:51:24.000Z
2021-09-22T05:16:18.000Z
uvicore/auth/authenticators/base.py
uvicore/framework
9c21b85e9e470c6d789899340332a9abd0b26ab1
[ "MIT" ]
2
2021-03-25T14:49:56.000Z
2021-11-17T23:20:29.000Z
import uvicore from uvicore.support import module from uvicore.support.dumper import dump, dd from uvicore.http.request import HTTPConnection from uvicore.contracts import UserInfo, UserProvider from uvicore.typing import Dict, Optional, List, Tuple from uvicore.contracts import Authenticator as AuthenticatorInterface ...
39.057143
137
0.682516
267db19fa6c144722d15e23628b990ade0b2cc61
118
py
Python
tests/cli/__init__.py
cicdw/great_expectations
0aecddf7da591df19389c8abadbb1700a51b8739
[ "Apache-2.0" ]
1
2020-04-07T22:15:13.000Z
2020-04-07T22:15:13.000Z
tests/cli/__init__.py
cicdw/great_expectations
0aecddf7da591df19389c8abadbb1700a51b8739
[ "Apache-2.0" ]
1
2020-03-26T12:34:24.000Z
2020-03-26T12:34:24.000Z
tests/cli/__init__.py
cicdw/great_expectations
0aecddf7da591df19389c8abadbb1700a51b8739
[ "Apache-2.0" ]
null
null
null
# Since our cli produces unicode output, but we want tests in python2 as well from __future__ import unicode_literals
39.333333
77
0.822034
b35399fea6276ed10550069d32f8621f65b9a091
2,180
py
Python
examples/text_graph/erniesage/data/graph_reader.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
examples/text_graph/erniesage/data/graph_reader.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
examples/text_graph/erniesage/data/graph_reader.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
31.142857
74
0.556422
19c5df86846b9f923fbbcde42348c05fae0a266f
3,563
py
Python
src/dataset.py
Abhishek-Aditya-bs/ESRGAN-Pytorch
401485eadb2c8915ed328e5ee20f86d858dfe0ed
[ "MIT" ]
1
2022-03-03T06:18:04.000Z
2022-03-03T06:18:04.000Z
src/dataset.py
Abhishek-Aditya-bs/ESRGAN-Pytorch
401485eadb2c8915ed328e5ee20f86d858dfe0ed
[ "MIT" ]
null
null
null
src/dataset.py
Abhishek-Aditya-bs/ESRGAN-Pytorch
401485eadb2c8915ed328e5ee20f86d858dfe0ed
[ "MIT" ]
null
null
null
import io import os import lmdb from PIL import Image from torch import Tensor from torch.utils.data import Dataset from torchvision import transforms from torchvision.transforms.functional import InterpolationMode as IMode from .imgproc import image2tensor, random_crop, random_horizontally_flip, random_rotate, center_...
38.728261
132
0.669941
9591a015021d75bf33a1566270318608ab5d2f23
11,443
py
Python
models/lattice_cls.py
KaidongLi/pytorch-LatticePointClassifier
5c00bb0f808a928ea57acb8a79364d62eb955cee
[ "MIT" ]
null
null
null
models/lattice_cls.py
KaidongLi/pytorch-LatticePointClassifier
5c00bb0f808a928ea57acb8a79364d62eb955cee
[ "MIT" ]
null
null
null
models/lattice_cls.py
KaidongLi/pytorch-LatticePointClassifier
5c00bb0f808a928ea57acb8a79364d62eb955cee
[ "MIT" ]
1
2022-03-29T21:03:38.000Z
2022-03-29T21:03:38.000Z
''' Author: Kaidong Li Purpose: Lattice Point Classifier (LPC) ''' import torch.nn as nn import torch.utils.data import torch.nn.functional as F from pointnet import STN3d #, PointNetEncoder #, feature_transform_reguliarzer import math from resnet import resnet50 class SparseSum(torch.autograd.Function): @stati...
34.466867
142
0.594425
9f5c038c248f164aa354ec08c5e505614220a373
3,587
py
Python
tests/unittestcore.py
scopely/target-bigquery
a1ecfdb20a68fefa3a6f0209df48ac897bb8972a
[ "BSD-3-Clause" ]
null
null
null
tests/unittestcore.py
scopely/target-bigquery
a1ecfdb20a68fefa3a6f0209df48ac897bb8972a
[ "BSD-3-Clause" ]
null
null
null
tests/unittestcore.py
scopely/target-bigquery
a1ecfdb20a68fefa3a6f0209df48ac897bb8972a
[ "BSD-3-Clause" ]
null
null
null
import json import os import sys import unittest import re from google.cloud import bigquery class BaseUnitTest(unittest.TestCase): def setUp(self): os.environ["TARGET_BIGQUERY_STATE_FILE"] = "state.json.tmp" self.delete_temp_state() os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = os.pat...
34.161905
128
0.596041
eb3a315acab6d12b83ce9db8bb6c5c867747401b
24,086
py
Python
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/services/services/campaign_feed_service/client.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
7
2021-02-21T10:39:41.000Z
2021-12-07T07:31:28.000Z
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/services/services/campaign_feed_service/client.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
6
2021-02-02T23:46:11.000Z
2021-11-15T01:46:02.000Z
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/services/services/campaign_feed_service/client.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
4
2021-01-28T23:25:45.000Z
2021-08-30T01:55:16.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
44.936567
154
0.641285
514c9ff1f99ddd2df5c227f7b64ee1fae7053654
1,851
py
Python
app.py
tian2992/FlickrFilm
e3d66cc39d0041e465e7b528c8a1619e26e6993c
[ "ISC", "X11" ]
null
null
null
app.py
tian2992/FlickrFilm
e3d66cc39d0041e465e7b528c8a1619e26e6993c
[ "ISC", "X11" ]
null
null
null
app.py
tian2992/FlickrFilm
e3d66cc39d0041e465e7b528c8a1619e26e6993c
[ "ISC", "X11" ]
null
null
null
import os import re from flask import Flask from flask import render_template import logging app = Flask(__name__) import flickrapi USER_ID = "12983620@N00" APIKI = "70ee1002979542fbca5710bba213f39b" SICRET = "3c9741afa399e6ce" flickr = flickrapi.FlickrAPI(APIKI, SICRET) def build_url(photo, size): return "ht...
29.854839
111
0.614803
703b7fa60b3b635ce41e3a86b28e77723d7a03c7
3,925
py
Python
ceilometer/storage/sqlalchemy/migrate_repo/versions/016_simpler_alarm.py
citrix-openstack-build/ceilometer
29f2ffc7e511a152d6e8742cd233c3dc399b8fff
[ "Apache-2.0" ]
null
null
null
ceilometer/storage/sqlalchemy/migrate_repo/versions/016_simpler_alarm.py
citrix-openstack-build/ceilometer
29f2ffc7e511a152d6e8742cd233c3dc399b8fff
[ "Apache-2.0" ]
null
null
null
ceilometer/storage/sqlalchemy/migrate_repo/versions/016_simpler_alarm.py
citrix-openstack-build/ceilometer
29f2ffc7e511a152d6e8742cd233c3dc399b8fff
[ "Apache-2.0" ]
null
null
null
# -*- encoding: utf-8 -*- # # Copyright © 2013 eNovance <licensing@enovance.com> # # Author: Mehdi Abaakouk <mehdi.abaakouk@enovance.com> # # 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 # # ...
35.681818
78
0.610191
b4e165d2d9c6b5b5a5cee7ca3fb9734c3507d902
1,884
py
Python
plato/trainers/fedsarah.py
iQua/plato
76fdac06af8b4d85922cd12749b4a687e3161745
[ "Apache-2.0" ]
null
null
null
plato/trainers/fedsarah.py
iQua/plato
76fdac06af8b4d85922cd12749b4a687e3161745
[ "Apache-2.0" ]
null
null
null
plato/trainers/fedsarah.py
iQua/plato
76fdac06af8b4d85922cd12749b4a687e3161745
[ "Apache-2.0" ]
1
2021-05-18T15:03:32.000Z
2021-05-18T15:03:32.000Z
""" A customized trainer for FedSarah. """ import numpy as np import torch from plato.config import Config from plato.utils import optimizers from plato.trainers import basic class Trainer(basic.Trainer): """The federated learning trainer for the FedSarah client""" def __init__(self, model=None): """...
34.254545
73
0.66242
5f6d2ef78ae6b1f80fbb020a4e46af03ef09c3cc
188
py
Python
demo/simple.py
sugarflower/pyg
0dfce5d4a253bd0df4d311a989d4a96e64e9b20d
[ "MIT" ]
2
2019-05-22T03:06:45.000Z
2019-10-01T23:17:06.000Z
demo/simple.py
sugarflower/pyg
0dfce5d4a253bd0df4d311a989d4a96e64e9b20d
[ "MIT" ]
null
null
null
demo/simple.py
sugarflower/pyg
0dfce5d4a253bd0df4d311a989d4a96e64e9b20d
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import pyg class main: def setup(self): pyg.setSize((128,128)) pyg.setTitle("Simple") def loop(self): pass if __name__ == "__main__": m = main() pyg.run(m)
12.533333
26
0.643617
4f0d85477a37c7314b7c3d45aaf692a474ec7bb0
3,080
py
Python
decoder.py
typhoonese/elgamal
63a5df4da60b0f177df4b5c300b98d73251913f5
[ "MIT" ]
null
null
null
decoder.py
typhoonese/elgamal
63a5df4da60b0f177df4b5c300b98d73251913f5
[ "MIT" ]
null
null
null
decoder.py
typhoonese/elgamal
63a5df4da60b0f177df4b5c300b98d73251913f5
[ "MIT" ]
null
null
null
# Implements a recursive binary search approach to decode a given encoded value to readable form # The encoding algorithm can be found in def encode. import utils.encode import utils.plainText # returns true if target encoding is bigger than or equal to temp encoding def isDiffBigger(asciiCode, guessLength, targetEn...
38.987342
144
0.656494
8f3b5fae02fe6dbdab4df460d06348a89912cf90
5,840
py
Python
inv/migrations/0017_initial_technologies.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
84
2017-10-22T11:01:39.000Z
2022-02-27T03:43:48.000Z
inv/migrations/0017_initial_technologies.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
22
2017-12-11T07:21:56.000Z
2021-09-23T02:53:50.000Z
inv/migrations/0017_initial_technologies.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
23
2017-12-06T06:59:52.000Z
2022-02-24T00:02:25.000Z
# ---------------------------------------------------------------------- # Create initial technologies for migration purposes # ---------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # ---------------------------------------------------...
41.41844
86
0.405479
f166b83cb55b6c74eee0dd5f0a9ce8e64248745d
9,515
py
Python
AlphaGoZero/code/UI/UI.py
OoSnowfxm/AlphaZero_Othello
3e94ac29dbac413502eb85628a0f8eb6d402d5e9
[ "MIT" ]
null
null
null
AlphaGoZero/code/UI/UI.py
OoSnowfxm/AlphaZero_Othello
3e94ac29dbac413502eb85628a0f8eb6d402d5e9
[ "MIT" ]
null
null
null
AlphaGoZero/code/UI/UI.py
OoSnowfxm/AlphaZero_Othello
3e94ac29dbac413502eb85628a0f8eb6d402d5e9
[ "MIT" ]
null
null
null
''' @Author: fxm @Date: Dec 27, 2020. @Title: UI class. ''' import sys sys.path.append('..') import pygame import logging from pygame.locals import * import pygame.gfxdraw from collections import namedtuple from Framework.Net import dotdict from Othello.Board import Board log = logging.getLogger(__name__) ...
43.447489
122
0.521913
3e7e5b99024eed696c479cb6fd460b90f86f510a
11,069
py
Python
deprecated/dbupdater.py
alex-ip/agdc
9e9eb556c33792440a3736f64cd5f628cf3a1385
[ "BSD-3-Clause" ]
null
null
null
deprecated/dbupdater.py
alex-ip/agdc
9e9eb556c33792440a3736f64cd5f628cf3a1385
[ "BSD-3-Clause" ]
null
null
null
deprecated/dbupdater.py
alex-ip/agdc
9e9eb556c33792440a3736f64cd5f628cf3a1385
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python #=============================================================================== # Copyright (c) 2014 Geoscience Australia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ar...
45.55144
137
0.615954
f7076c0d99ab4811272b1a459a9679fad5e7f7dd
4,300
py
Python
virtual/lib/python3.6/site-packages/PIL/WmfImagePlugin.py
GabrielSpear/PersonalGallery
e863339af357469598ed3380d1449f579ce2a3b2
[ "MIT" ]
1
2021-02-08T07:49:35.000Z
2021-02-08T07:49:35.000Z
virtual/lib/python3.6/site-packages/PIL/WmfImagePlugin.py
GabrielSpear/PersonalGallery
e863339af357469598ed3380d1449f579ce2a3b2
[ "MIT" ]
2
2017-05-07T06:30:37.000Z
2017-05-08T06:58:23.000Z
virtual/lib/python3.6/site-packages/PIL/WmfImagePlugin.py
GabrielSpear/PersonalGallery
e863339af357469598ed3380d1449f579ce2a3b2
[ "MIT" ]
2
2019-05-19T08:12:45.000Z
2021-08-28T07:16:42.000Z
# # The Python Imaging Library # $Id$ # # WMF stub codec # # history: # 1996-12-14 fl Created # 2004-02-22 fl Turned into a stub driver # 2004-02-23 fl Added EMF support # # Copyright (c) Secret Labs AB 1997-2004. All rights reserved. # Copyright (c) Fredrik Lundh 1996. # # See the README file for information on...
25.443787
92
0.550233
31d2089592c7207ab92dd9ac347a04779a68c866
3,645
py
Python
oliver/lib/parsing.py
stjudecloud/oliver
292e61b64563417800817b196b2621a501957718
[ "MIT" ]
35
2020-02-27T21:19:33.000Z
2022-02-02T10:16:39.000Z
oliver/lib/parsing.py
stjudecloud/oliver
292e61b64563417800817b196b2621a501957718
[ "MIT" ]
107
2020-01-18T01:13:31.000Z
2022-03-28T10:30:53.000Z
oliver/lib/parsing.py
stjudecloud/oliver
292e61b64563417800817b196b2621a501957718
[ "MIT" ]
4
2020-02-21T04:42:42.000Z
2022-01-26T22:48:08.000Z
import json import os import re from typing import Any, Dict, List, Optional, Tuple from urllib.parse import urlparse from ..lib import constants, errors def is_url(url_string: str) -> bool: try: scheme = urlparse(url_string).scheme return scheme in ("http", "https") except: return F...
29.395161
87
0.562414
019723f7a9990f689f6e68ef1abff8f05178b798
3,197
py
Python
python/ray/tune/examples/ax_example.py
couturierc/ray
785670bc18a8595219c96e9512192922fafcf510
[ "Apache-2.0" ]
null
null
null
python/ray/tune/examples/ax_example.py
couturierc/ray
785670bc18a8595219c96e9512192922fafcf510
[ "Apache-2.0" ]
null
null
null
python/ray/tune/examples/ax_example.py
couturierc/ray
785670bc18a8595219c96e9512192922fafcf510
[ "Apache-2.0" ]
null
null
null
"""This test checks that AxSearch is functional. It also checks that it is usable with a separate scheduler. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import ray from ray.tune import run from ray.tune.schedulers import AsyncHyp...
27.324786
79
0.511417
0ab4345cefb1f967f55d450cfe2ad16a569f4fa5
3,039
py
Python
mozi/model.py
hycis/Mozi
7f2eccbe3169c10d231e07edf8bc650039fa4eb2
[ "MIT" ]
122
2015-07-24T09:29:06.000Z
2022-02-22T02:51:00.000Z
mozi/model.py
hycis/Mozi
7f2eccbe3169c10d231e07edf8bc650039fa4eb2
[ "MIT" ]
4
2015-07-27T04:37:11.000Z
2020-04-04T08:05:00.000Z
mozi/model.py
hycis/Mozi
7f2eccbe3169c10d231e07edf8bc650039fa4eb2
[ "MIT" ]
27
2015-07-24T12:59:35.000Z
2020-04-14T00:21:43.000Z
import theano class Model(object): def test_fprop(self, input_state): pass def train_fprop(self, input_state): pass class Sequential(Model): def __init__(self, input_var, output_var, verbose=True): """ PARAM: input_var (T.vector() | T.matrix() | T.tensor3()...
33.032609
108
0.596578
d604382c15505997af1f2d675995ba3a25b618ab
22,302
py
Python
trackintel/preprocessing/positionfixes.py
RhnSharma/trackintel
33d6205475ad8c4a859a9a5883241fe1098997b2
[ "MIT" ]
null
null
null
trackintel/preprocessing/positionfixes.py
RhnSharma/trackintel
33d6205475ad8c4a859a9a5883241fe1098997b2
[ "MIT" ]
null
null
null
trackintel/preprocessing/positionfixes.py
RhnSharma/trackintel
33d6205475ad8c4a859a9a5883241fe1098997b2
[ "MIT" ]
null
null
null
import datetime import warnings import geopandas as gpd import numpy as np import pandas as pd from shapely.geometry import LineString, Point from tqdm import tqdm from trackintel.geogr.distances import haversine_dist def generate_staypoints( pfs_input, method="sliding", distance_metric="haversine", ...
42.079245
121
0.64891
03e5a4d2d0ce7e9a875ed05b8d533ec3e2644655
52,814
py
Python
mne/channels/channels.py
adykstra/mne-python
f37903d48850a8af4eb6535df7d8dd1b5219385e
[ "BSD-3-Clause" ]
1
2022-03-24T01:18:03.000Z
2022-03-24T01:18:03.000Z
mne/channels/channels.py
gkmaro634/mne-python
5409a89233b764f3f3f3136cf9bf6b8d5fb0a4fe
[ "BSD-3-Clause" ]
null
null
null
mne/channels/channels.py
gkmaro634/mne-python
5409a89233b764f3f3f3136cf9bf6b8d5fb0a4fe
[ "BSD-3-Clause" ]
null
null
null
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Denis Engemann <denis.engemann@gmail.com> # Andrew Dykstra <andrew.r.dykstra@gmail.com> # Teon Brooks <teon.brooks@gmail.com> # # License: BSD (3-clause) import os ...
37.5633
79
0.58831
cdc8e5dc9d5209f976ca60217afdcc71309192bf
873
py
Python
moviesproject/movies/views.py
Diegomca98/movies-project
39cfb7cde6142a7694052ddd413745aff035d57b
[ "MIT" ]
null
null
null
moviesproject/movies/views.py
Diegomca98/movies-project
39cfb7cde6142a7694052ddd413745aff035d57b
[ "MIT" ]
null
null
null
moviesproject/movies/views.py
Diegomca98/movies-project
39cfb7cde6142a7694052ddd413745aff035d57b
[ "MIT" ]
null
null
null
from django.shortcuts import render from .models import Movies from django.views.generic.list import ListView from django.core.paginator import Paginator #Pagination for normal Views # Create your views here. class MoviesList(ListView): model = Movies template_name = 'movies.html' context_object_name =...
30.103448
76
0.710195
0fe1f31a605c812cf13ec4af57134d41fffe010f
1,820
py
Python
glib_wrappers.py
rafiw/textual-switcher
b9678c5249573b9142687721f40e3f4037e86f74
[ "MIT" ]
10
2018-05-24T07:39:14.000Z
2021-09-15T08:20:31.000Z
glib_wrappers.py
rafiw/textual-switcher
b9678c5249573b9142687721f40e3f4037e86f74
[ "MIT" ]
null
null
null
glib_wrappers.py
rafiw/textual-switcher
b9678c5249573b9142687721f40e3f4037e86f74
[ "MIT" ]
5
2018-05-15T11:53:20.000Z
2021-03-08T23:21:37.000Z
from gi.repository import GLib, Gio def register_signal(callback, signal_type): def register_signal(): GLib.idle_add(install_glib_handler, signal_type, priority=GLib.PRIORITY_HIGH) def handler(*args): signal_nr = args[0] if signal_nr == signal_type: callback() ...
31.37931
95
0.629121
5bed5b2e80cbc9eeecf1b5de6c2bcc27d90da163
666
py
Python
lexparse/error.py
frenchie16/lxscript
8e5e8814969753148d16913cbe2c838a13c8ed99
[ "Unlicense" ]
2
2015-04-11T05:44:07.000Z
2015-04-12T00:42:15.000Z
lexparse/error.py
frenchie16/lxscript
8e5e8814969753148d16913cbe2c838a13c8ed99
[ "Unlicense" ]
null
null
null
lexparse/error.py
frenchie16/lxscript
8e5e8814969753148d16913cbe2c838a13c8ed99
[ "Unlicense" ]
null
null
null
import antlr4.error.ErrorListener class _ExceptionErrorListener(antlr4.error.ErrorListener.ErrorListener): def __init__(self, error_class): self.error_class = error_class def syntaxError(self, recognizer, offendingSymbol, line, charPositionInLine, msg, e): raise self.error_class(e) class _A...
25.615385
89
0.746246
e975ca612e1af56b7a139f72f02dc2063f7992fc
8,200
py
Python
seaborn/tests/test_rcmod.py
tomasojea/seaborn
9b03f8138949402a351fa06e2598144812aae586
[ "BSD-3-Clause" ]
1
2020-09-12T11:58:04.000Z
2020-09-12T11:58:04.000Z
seaborn/tests/test_rcmod.py
tomasojea/seaborn
9b03f8138949402a351fa06e2598144812aae586
[ "BSD-3-Clause" ]
1
2020-10-31T23:31:41.000Z
2020-10-31T23:31:41.000Z
seaborn/tests/test_rcmod.py
tomasojea/seaborn
9b03f8138949402a351fa06e2598144812aae586
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import matplotlib as mpl import nose import matplotlib.pyplot as plt import nose.tools as nt import numpy.testing as npt from .. import rcmod, palettes, utils class RCParamTester(object): def flatten_list(self, orig_list): iter_list = map(np.atleast_1d, orig_list) flat_list =...
28.873239
78
0.622805
b2e32217475c7f06c86540f1118071dd17a201b9
1,094
py
Python
python/rps.py
cl33per/java-baby
05febea73f9ea78c6d3f88b066a14542fbcdb163
[ "MIT" ]
null
null
null
python/rps.py
cl33per/java-baby
05febea73f9ea78c6d3f88b066a14542fbcdb163
[ "MIT" ]
null
null
null
python/rps.py
cl33per/java-baby
05febea73f9ea78c6d3f88b066a14542fbcdb163
[ "MIT" ]
null
null
null
from random import randint playOptions = ["Rock", "Paper", "Scissors"] #random select index betwee 0 and 2 computer = playOptions[randint(0,2)] #Set player player = False while player == False: player = raw_input("Rock, Paper, Scissors?") #raw_input forces input as string if player == computer: prin...
33.151515
82
0.596892
ca2c4bb9b1432bde5e4abe635599f57527cae38e
3,072
py
Python
basketball_reference_scraper/lookup.py
jsidhu26/basketball_reference_scraper
8f1adfbc98e57a4edf02a785a8aef1f3d0f044ce
[ "MIT" ]
null
null
null
basketball_reference_scraper/lookup.py
jsidhu26/basketball_reference_scraper
8f1adfbc98e57a4edf02a785a8aef1f3d0f044ce
[ "MIT" ]
null
null
null
basketball_reference_scraper/lookup.py
jsidhu26/basketball_reference_scraper
8f1adfbc98e57a4edf02a785a8aef1f3d0f044ce
[ "MIT" ]
null
null
null
import unidecode, os, sys, unicodedata """ Bounded levenshtein algorithm credited to user amirouche on stackoverflow. Implementation borrowed from https://stackoverflow.com/questions/59686989/levenshtein-distance-with-bound-limit """ def levenshtein(s1, s2, maximum): if len(s1) > len(s2): ...
37.012048
116
0.560221
67a192cf235eea4212b1a7fe2ab0668aa716f566
5,767
py
Python
rllib/utils/exploration/stochastic_sampling.py
77loopin/ray
9322f6aab53f4ca5baf5a3573e1ffde12feae519
[ "Apache-2.0" ]
39
2021-02-02T23:09:31.000Z
2022-03-28T16:39:12.000Z
rllib/utils/exploration/stochastic_sampling.py
77loopin/ray
9322f6aab53f4ca5baf5a3573e1ffde12feae519
[ "Apache-2.0" ]
70
2019-03-13T05:25:48.000Z
2022-03-26T07:05:19.000Z
rllib/utils/exploration/stochastic_sampling.py
77loopin/ray
9322f6aab53f4ca5baf5a3573e1ffde12feae519
[ "Apache-2.0" ]
20
2021-02-05T05:51:39.000Z
2022-03-04T21:13:24.000Z
import gym import numpy as np import tree # pip install dm_tree from typing import Union from ray.rllib.models.action_dist import ActionDistribution from ray.rllib.models.modelv2 import ModelV2 from ray.rllib.utils.annotations import override from ray.rllib.utils.exploration.exploration import Exploration from ray.rl...
40.612676
79
0.598752
16bfc60610fea6703370d58349036be190a06d86
3,133
py
Python
runway/module/cloudformation.py
asksmruti/runway
8aca76df9372e3d13eb35e12f81758f618e89e74
[ "Apache-2.0" ]
1
2021-07-13T19:57:40.000Z
2021-07-13T19:57:40.000Z
runway/module/cloudformation.py
asksmruti/runway
8aca76df9372e3d13eb35e12f81758f618e89e74
[ "Apache-2.0" ]
null
null
null
runway/module/cloudformation.py
asksmruti/runway
8aca76df9372e3d13eb35e12f81758f618e89e74
[ "Apache-2.0" ]
null
null
null
"""Cloudformation module.""" from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING, Any, Dict, Optional, Union, cast from .._logging import PrefixAdaptor from ..cfngin.cfngin import CFNgin from .base import RunwayModule if TYPE_CHECKING: from .._logging impor...
37.297619
86
0.649218
1546ad18c1946f78237b9c92ab596212029fb444
410
py
Python
pepipost/models/sort_enum.py
kanhaiya2012/Sample
6c3d549525b7883913a4677c3eb6f14c8da34b9b
[ "MIT" ]
null
null
null
pepipost/models/sort_enum.py
kanhaiya2012/Sample
6c3d549525b7883913a4677c3eb6f14c8da34b9b
[ "MIT" ]
null
null
null
pepipost/models/sort_enum.py
kanhaiya2012/Sample
6c3d549525b7883913a4677c3eb6f14c8da34b9b
[ "MIT" ]
1
2020-05-17T17:55:30.000Z
2020-05-17T17:55:30.000Z
# -*- coding: utf-8 -*- """ pepipost This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). """ class SortEnum(object): """Implementation of the 'sort' enum. TODO: type enum description here. Attributes: ASC: TODO: type description here. ...
16.4
84
0.558537
ce8a1c6bba284d68628edfc1aae37a6912f0f838
734
py
Python
igibson/examples/demo/env_example.py
Kathryn-cat/iGibson
43e21a4b97ce473c78aeb1eeb080fab239154ae6
[ "MIT" ]
null
null
null
igibson/examples/demo/env_example.py
Kathryn-cat/iGibson
43e21a4b97ce473c78aeb1eeb080fab239154ae6
[ "MIT" ]
null
null
null
igibson/examples/demo/env_example.py
Kathryn-cat/iGibson
43e21a4b97ce473c78aeb1eeb080fab239154ae6
[ "MIT" ]
null
null
null
import logging import os import igibson from igibson.envs.igibson_env import iGibsonEnv from igibson.render.profiler import Profiler def main(): config_filename = os.path.join(igibson.example_config_path, "turtlebot_demo.yaml") env = iGibsonEnv(config_file=config_filename, mode="headless") for j in range...
28.230769
86
0.623978
88bd988ea1464f9ed41b4d940ea24666b8fd81a5
1,090
py
Python
run.py
reversinglabs/reversinglabs-ransomware-feed-for-threatconnect
e87cfc71de99203f6cc4218d4ff521a9d8906f2a
[ "MIT" ]
18
2017-01-09T22:17:49.000Z
2022-01-24T20:46:42.000Z
run.py
reversinglabs/reversinglabs-ransomware-feed-for-threatconnect
e87cfc71de99203f6cc4218d4ff521a9d8906f2a
[ "MIT" ]
84
2017-04-11T13:47:49.000Z
2022-03-21T20:12:57.000Z
run.py
reversinglabs/reversinglabs-ransomware-feed-for-threatconnect
e87cfc71de99203f6cc4218d4ff521a9d8906f2a
[ "MIT" ]
43
2017-01-05T20:40:26.000Z
2022-03-31T19:18:02.000Z
"""Job App""" # standard library import traceback # first-party from app_lib import AppLib # pylint: disable=no-member def run() -> None: """Update path and run the App.""" # update the path to ensure the App has access to required modules app_lib = AppLib() app_lib.update_path() # import modul...
22.244898
70
0.620183
b33efccc5f2cc2cce31e3a7900ebd28b86f2ee4d
4,079
py
Python
docat/tests/test_utils.py
dinakar29/docat
5a5b3c64c77955d9a43030914fc6d807f6856570
[ "MIT" ]
null
null
null
docat/tests/test_utils.py
dinakar29/docat
5a5b3c64c77955d9a43030914fc6d807f6856570
[ "MIT" ]
null
null
null
docat/tests/test_utils.py
dinakar29/docat
5a5b3c64c77955d9a43030914fc6d807f6856570
[ "MIT" ]
null
null
null
from pathlib import Path from mock import MagicMock, mock_open, patch from docat.utils import create_nginx_config, create_symlink, extract_archive, remove_docs def test_symlink_creation(): """ Tests the creation of a symlink """ source = MagicMock() destination = MagicMock() destination.exis...
32.632
134
0.715126
1673b15c5d04704fd30be8011bf309c56d2c142c
1,904
py
Python
tools/summary_network.py
EileenWang90/mmpose
3fa1328a3b6351bf9b35df60d4d959973a6f8a71
[ "Apache-2.0" ]
null
null
null
tools/summary_network.py
EileenWang90/mmpose
3fa1328a3b6351bf9b35df60d4d959973a6f8a71
[ "Apache-2.0" ]
null
null
null
tools/summary_network.py
EileenWang90/mmpose
3fa1328a3b6351bf9b35df60d4d959973a6f8a71
[ "Apache-2.0" ]
null
null
null
import argparse # import tensorwatch as tw from mmcv import Config # from mmcv.cnn import get_model_complexity_info from torchstat_utils import model_stats import sys sys.path.append('.') from mmpose.models import build_posenet def parse_args(): parser = argparse.ArgumentParser(description='Train a segmentor') ...
28.41791
79
0.633403
73a172006d492b0fa116f29543b090b454c563c3
7,866
py
Python
pylearn2/datasets/cifar10.py
tzuyangliu/pylearn2
d647ca0221f603f211b8462356e7b2ca9b43790b
[ "BSD-3-Clause" ]
2,045
2015-01-01T14:07:52.000Z
2022-03-08T08:56:41.000Z
pylearn2/datasets/cifar10.py
tzuyangliu/pylearn2
d647ca0221f603f211b8462356e7b2ca9b43790b
[ "BSD-3-Clause" ]
305
2015-01-02T13:18:24.000Z
2021-08-20T18:03:28.000Z
pylearn2/datasets/cifar10.py
tzuyangliu/pylearn2
d647ca0221f603f211b8462356e7b2ca9b43790b
[ "BSD-3-Clause" ]
976
2015-01-01T17:08:51.000Z
2022-03-25T19:53:17.000Z
""" .. todo:: WRITEME """ import os import logging import numpy from theano.compat.six.moves import xrange from pylearn2.datasets import cache, dense_design_matrix from pylearn2.expr.preprocessing import global_contrast_normalize from pylearn2.utils import contains_nan from pylearn2.utils import serial from pyle...
30.022901
78
0.518815
735d28e2ec71df0ae363a6102fd6309d87be64ab
1,910
py
Python
duro/utils/global_config.py
TargetProcess/duro
3e70c17aed3d6d8714c94f0dfda539969d22157a
[ "MIT" ]
4
2020-01-31T13:54:51.000Z
2020-04-17T15:53:02.000Z
duro/utils/global_config.py
TargetProcess/duro
3e70c17aed3d6d8714c94f0dfda539969d22157a
[ "MIT" ]
null
null
null
duro/utils/global_config.py
TargetProcess/duro
3e70c17aed3d6d8714c94f0dfda539969d22157a
[ "MIT" ]
1
2020-04-14T12:32:08.000Z
2020-04-14T12:32:08.000Z
import configparser from typing import NamedTuple, Optional import networkx as nx class GlobalConfig(NamedTuple): db_path: str views_path: str logs_path: str graph: nx.DiGraph use_git: bool class SlackConfig(NamedTuple): url: str success_channel: str failure_channel: str log_cha...
31.311475
83
0.648168
63fd53258708802e259d57c8b885ac1c9d1cee81
50,418
py
Python
egs/wsj/s5/steps/libs/nnet3/train/common_tmp.py
zeek-han/kaldi
e3ed0812db7abd3c266d5616babfd0adff8260ac
[ "Apache-2.0" ]
null
null
null
egs/wsj/s5/steps/libs/nnet3/train/common_tmp.py
zeek-han/kaldi
e3ed0812db7abd3c266d5616babfd0adff8260ac
[ "Apache-2.0" ]
null
null
null
egs/wsj/s5/steps/libs/nnet3/train/common_tmp.py
zeek-han/kaldi
e3ed0812db7abd3c266d5616babfd0adff8260ac
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Vijayaditya Peddinti. # 2016 Vimal Manohar # Apache 2.0 """This module contains classes and methods common to training of nnet3 neural networks. """ from __future__ import division import argparse import glob import logging import os import math import re import shutil import libs....
48.572254
101
0.543715
7540a0d6a380ec652e054482fe0d99c83620c228
5,117
py
Python
simdna/synthetic/loadedmotifs.py
hannahgz/simdna
095a4988f73899df4546b099462b1790f20595b0
[ "MIT" ]
3
2018-09-13T08:09:57.000Z
2020-04-10T15:35:19.000Z
simdna/synthetic/loadedmotifs.py
hannahgz/simdna
095a4988f73899df4546b099462b1790f20595b0
[ "MIT" ]
null
null
null
simdna/synthetic/loadedmotifs.py
hannahgz/simdna
095a4988f73899df4546b099462b1790f20595b0
[ "MIT" ]
2
2018-01-05T14:58:09.000Z
2020-09-09T07:54:46.000Z
from __future__ import absolute_import, division, print_function from simdna.synthetic.core import DefaultNameMixin from simdna import pwm from simdna import util from collections import OrderedDict class AbstractLoadedMotifs(object): """Class representing loaded PWMs. A class that contains instances of ``pw...
35.047945
77
0.636506
2e4568e22187cc9a543f428a32a9ed8c11f1e88f
1,318
py
Python
app/core/tests/test_models.py
anishpathak0148/recipe-app-using-DjangoDRF
2bc791e173948ac4bd0f8ba5b99cceedf61d4a39
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
anishpathak0148/recipe-app-using-DjangoDRF
2bc791e173948ac4bd0f8ba5b99cceedf61d4a39
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
anishpathak0148/recipe-app-using-DjangoDRF
2bc791e173948ac4bd0f8ba5b99cceedf61d4a39
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model class ModelTests(TestCase): def test_create_user_with_email_successfull(self): """Test creating a new user with an email is successfull""" email = 'anishpathak@gmail.com' password = 'Testanish@1234' us...
31.380952
71
0.645675
3d8a9b189f7704136c9170a5719d85ffff35233c
7,735
py
Python
tools/lightning_train_net.py
apivovarov/d2go
44e410843fb10508c911022a80f15276c76d9e60
[ "Apache-2.0" ]
null
null
null
tools/lightning_train_net.py
apivovarov/d2go
44e410843fb10508c911022a80f15276c76d9e60
[ "Apache-2.0" ]
null
null
null
tools/lightning_train_net.py
apivovarov/d2go
44e410843fb10508c911022a80f15276c76d9e60
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import os from dataclasses import dataclass from typing import Any, Dict, List, Optional, Type import pytorch_lightning as pl # type: ignore from d2go.config import CfgNode, temp_defrost from d2go.runner imp...
32.5
86
0.679767
e52d8e7ac85f320ebf4c501ad744f1774a7e0310
236
py
Python
tools/update-solutions.py
aitc-h/euler
6fc07c741c31a632ce6f11f65c11007cd6c7eb29
[ "MIT" ]
null
null
null
tools/update-solutions.py
aitc-h/euler
6fc07c741c31a632ce6f11f65c11007cd6c7eb29
[ "MIT" ]
null
null
null
tools/update-solutions.py
aitc-h/euler
6fc07c741c31a632ce6f11f65c11007cd6c7eb29
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from os import listdir from os.path import isfile, join def valid(f): return isfile(join(path, f)) and f.name[0]!="_" path = "../src" onlyfiles = [f for f in listdir(path) if isfile(join(path, f))]
23.6
64
0.644068
66ad901465ad03b26a6308994ed81d6a2128ee8d
3,874
py
Python
Outils/IHM/TRUST_WIZARD/src/TRUST_WIZARDGUI.py
cea-trust-platform/trust-code
c4f42d8f8602a8cc5e0ead0e29dbf0be8ac52f72
[ "BSD-3-Clause" ]
12
2021-06-30T18:50:38.000Z
2022-03-23T09:03:16.000Z
Outils/IHM/TRUST_WIZARD/src/TRUST_WIZARDGUI.py
pledac/trust-code
46ab5c5da3f674185f53423090f526a38ecdbad1
[ "BSD-3-Clause" ]
null
null
null
Outils/IHM/TRUST_WIZARD/src/TRUST_WIZARDGUI.py
pledac/trust-code
46ab5c5da3f674185f53423090f526a38ecdbad1
[ "BSD-3-Clause" ]
2
2021-10-04T09:19:39.000Z
2021-12-15T14:21:04.000Z
# -*- coding: latin-1 -*- #**************************************************************************** # Copyright (c) 2015 - 2016, CEA # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # 1. Redistr...
38.74
260
0.656944
234e54ba0d2df049823772423b0800b23907684d
7,379
py
Python
fixture/contact.py
marygovory/python_training
5ba12d7ac8813215e0392a85b2ef4f314aae38b3
[ "Apache-2.0" ]
null
null
null
fixture/contact.py
marygovory/python_training
5ba12d7ac8813215e0392a85b2ef4f314aae38b3
[ "Apache-2.0" ]
null
null
null
fixture/contact.py
marygovory/python_training
5ba12d7ac8813215e0392a85b2ef4f314aae38b3
[ "Apache-2.0" ]
null
null
null
from model.contact import Contact import re class ContactHelper: def __init__(self, app): self.app = app def open_add_contact_page(self): wd = self.app.wd wd.find_element_by_link_text("add new").click() def create_contact(self, contact): wd = self.app.wd self.ope...
41.689266
121
0.652663
00718a0c5e999dd36da343e3aaf18b5060bb40d3
6,121
py
Python
src/strips_hgn/models/hypergraph_nets_adaptor.py
matgreco/trainhgn
4da36033512b904e0547b31e5cb8ad9249e1d343
[ "MIT" ]
5
2020-11-29T05:22:24.000Z
2022-01-28T22:52:43.000Z
src/strips_hgn/models/hypergraph_nets_adaptor.py
matgreco/trainhgn
4da36033512b904e0547b31e5cb8ad9249e1d343
[ "MIT" ]
null
null
null
src/strips_hgn/models/hypergraph_nets_adaptor.py
matgreco/trainhgn
4da36033512b904e0547b31e5cb8ad9249e1d343
[ "MIT" ]
4
2020-08-14T01:26:52.000Z
2021-08-30T14:21:53.000Z
import logging from itertools import cycle, islice from typing import Callable, List, Optional import torch from hypergraph_nets.hypergraphs import ( EDGES, GLOBALS, N_EDGE, N_NODE, NODES, RECEIVERS, SENDERS, ZERO_PADDING, HypergraphsTuple, ) from strips_hgn.hypergraph.hypergraph_v...
30.152709
103
0.61771
d4f058a6e556a8f59a334ee0c1a34af2987677d3
38,380
py
Python
qick_lib/qick/qick_asm.py
Fermilab-Quantum-Science/qick_interpreter
08eed3c63a3ff83da9d11a9c681e6a1c9596e413
[ "MIT" ]
null
null
null
qick_lib/qick/qick_asm.py
Fermilab-Quantum-Science/qick_interpreter
08eed3c63a3ff83da9d11a9c681e6a1c9596e413
[ "MIT" ]
null
null
null
qick_lib/qick/qick_asm.py
Fermilab-Quantum-Science/qick_interpreter
08eed3c63a3ff83da9d11a9c681e6a1c9596e413
[ "MIT" ]
null
null
null
""" The higher-level driver for the QICK library. Contains an tProc assembly language wrapper class and auxiliary functions. """ import numpy as np fs_adc = 384*8 fs_dac = 384*16 fs_proc=384 def freq2reg(f): """ Converts frequency in MHz to tProc DAC register value. :param f: frequency (MHz) :type f...
44.267589
314
0.562741
e25c70f68bd0e51d2adfc3dbb44d41d717e003f0
530
py
Python
project-euler/python/09_special-pythagorean-triplet.py
jydiw/assorted-algorithms
7af26520055104dcaf1ff21d94ece27d81c97918
[ "MIT" ]
null
null
null
project-euler/python/09_special-pythagorean-triplet.py
jydiw/assorted-algorithms
7af26520055104dcaf1ff21d94ece27d81c97918
[ "MIT" ]
null
null
null
project-euler/python/09_special-pythagorean-triplet.py
jydiw/assorted-algorithms
7af26520055104dcaf1ff21d94ece27d81c97918
[ "MIT" ]
null
null
null
''' A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a2 + b2 = c2 For example, 32 + 42 = 9 + 16 = 25 = 52. There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc. ''' def pythagorean_triplet(s): triplets = [] for a in range(1, s): b = (s**2...
23.043478
78
0.59434
d02c621a24bd1c825ab809d723cf25b4d4ba370f
15,614
py
Python
test/test_client.py
rajrohith/kafka-python
a3995b38210d3700855d5b438529a5387c095569
[ "Apache-2.0" ]
2
2018-06-29T18:01:20.000Z
2021-05-28T17:43:47.000Z
test/test_client.py
thaiphamquoc/kafka-python
9b552f2e100c499d2744d6063f416310d302d5b6
[ "Apache-2.0" ]
null
null
null
test/test_client.py
thaiphamquoc/kafka-python
9b552f2e100c499d2744d6063f416310d302d5b6
[ "Apache-2.0" ]
null
null
null
import socket from mock import ANY, MagicMock, patch from operator import itemgetter import six from . import unittest from kafka import SimpleClient from kafka.errors import ( KafkaUnavailableError, LeaderNotAvailableError, KafkaTimeoutError, UnknownTopicOrPartitionError, ConnectionError, FailedPayloadsError...
38.458128
106
0.617779
8de923ea369a22ed501dfbd6f1b5ea94e82ff58f
742
py
Python
data/kdtree/generate_synthetic.py
weld-project/clamor
72e7a75e608bb3407ab6f7ee47f24f707932b71a
[ "Apache-2.0" ]
null
null
null
data/kdtree/generate_synthetic.py
weld-project/clamor
72e7a75e608bb3407ab6f7ee47f24f707932b71a
[ "Apache-2.0" ]
null
null
null
data/kdtree/generate_synthetic.py
weld-project/clamor
72e7a75e608bb3407ab6f7ee47f24f707932b71a
[ "Apache-2.0" ]
null
null
null
import numpy as np nodes_outfile = 'nodes_synthetic.csv' queries_outfile = 'queries_synthetic.csv' scale = 100.0 gauss_x = np.random.normal(0, scale, size=4000000) gauss_y = np.random.normal(0, scale, size=4000000) points = list(zip(gauss_x, gauss_y)) with open(nodes_outfile, 'w') as nf: for p in points: ...
25.586207
50
0.622642