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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bb924b1ee6d90156d1e01f699e9ef25f50435df2 | 538 | py | Python | internet/ipv4/_reverse_insort.py | idin/internet | f427a9978e8cc3a543ed9c9f9200784bdffd5850 | [
"MIT"
] | 1 | 2019-05-04T07:32:05.000Z | 2019-05-04T07:32:05.000Z | internet/ipv4/_reverse_insort.py | idin/internet | f427a9978e8cc3a543ed9c9f9200784bdffd5850 | [
"MIT"
] | null | null | null | internet/ipv4/_reverse_insort.py | idin/internet | f427a9978e8cc3a543ed9c9f9200784bdffd5850 | [
"MIT"
] | null | null | null | def reverse_insort(a, x, lo=0, hi=None):
"""Insert item x in list a, and keep it reverse-sorted assuming a
is reverse-sorted.
If x is already in a, insert it to the right of the rightmost x.
Optional args lo (default 0) and hi (default len(a)) bound the
slice of a to be searched.
"""
if lo... | 28.315789 | 69 | 0.576208 |
48d2ab7cee6700c08b88cbb722512ce16ce3e377 | 11,932 | py | Python | chatterbot/trainers.py | vjzanne/ChatterbotSpacy | 7d264f82d863c493c437138b6b25c2fbb587cf10 | [
"BSD-3-Clause"
] | 1 | 2019-12-23T10:04:28.000Z | 2019-12-23T10:04:28.000Z | chatterbot/trainers.py | sithivitken/ChatterBot | 1a03dcb45cba7bdc24d3db5e750582e0cb1518e2 | [
"BSD-3-Clause"
] | null | null | null | chatterbot/trainers.py | sithivitken/ChatterBot | 1a03dcb45cba7bdc24d3db5e750582e0cb1518e2 | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
import csv
import time
from dateutil import parser as date_parser
from chatterbot.conversation import Statement
from chatterbot.tagging import PosLemmaTagger
from chatterbot import utils
class Trainer(object):
"""
Base class for all other trainer classes.
:param boolean show_training... | 34.091429 | 100 | 0.592189 |
c9a2e5c7dda17e0239761e7b1006c603289dcdc0 | 9,324 | py | Python | docs/source/conf.py | longhotsummer/xmldiff | 34b810f4394965aadeca31204e6b76eb023fd11a | [
"MIT"
] | 144 | 2018-04-18T17:47:24.000Z | 2022-03-24T06:02:28.000Z | docs/source/conf.py | longhotsummer/xmldiff | 34b810f4394965aadeca31204e6b76eb023fd11a | [
"MIT"
] | 78 | 2018-05-22T11:06:59.000Z | 2022-02-11T13:13:53.000Z | docs/source/conf.py | longhotsummer/xmldiff | 34b810f4394965aadeca31204e6b76eb023fd11a | [
"MIT"
] | 39 | 2018-09-19T02:34:21.000Z | 2022-03-31T03:45:00.000Z | #
# xmldiff documentation build configuration file, created by
# sphinx-quickstart on Tue Sep 4 12:07:12 2018.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values ... | 32.601399 | 86 | 0.707958 |
a98f1a9a92704d47b67a161adef8c769099e99f3 | 2,609 | py | Python | hyppo/ksample/base.py | bstraus1/hyppo | cf0ebed8fdb23078447a06ceb4eed4aca92a287c | [
"Apache-2.0"
] | null | null | null | hyppo/ksample/base.py | bstraus1/hyppo | cf0ebed8fdb23078447a06ceb4eed4aca92a287c | [
"Apache-2.0"
] | null | null | null | hyppo/ksample/base.py | bstraus1/hyppo | cf0ebed8fdb23078447a06ceb4eed4aca92a287c | [
"Apache-2.0"
] | null | null | null | from abc import ABC, abstractmethod
class KSampleTest(ABC):
"""
A base class for a k-sample test.
Parameters
----------
compute_distance : callable(), optional (default: None)
A function that computes the distance among the samples within each
data matrix.
Valid strings fo... | 36.746479 | 87 | 0.606746 |
3634454544fe4ec79e8c80a4618ef48c76de9b68 | 12,025 | py | Python | tests/components/zwave_js/test_init.py | ezcGman/core | 557ec374f176d219b53b12e999e334f0006e8aa8 | [
"Apache-2.0"
] | null | null | null | tests/components/zwave_js/test_init.py | ezcGman/core | 557ec374f176d219b53b12e999e334f0006e8aa8 | [
"Apache-2.0"
] | null | null | null | tests/components/zwave_js/test_init.py | ezcGman/core | 557ec374f176d219b53b12e999e334f0006e8aa8 | [
"Apache-2.0"
] | null | null | null | """Test the Z-Wave JS init module."""
from copy import deepcopy
from unittest.mock import patch
import pytest
from zwave_js_server.exceptions import BaseZwaveJSServerError
from zwave_js_server.model.node import Node
from homeassistant.components.hassio.handler import HassioAPIError
from homeassistant.components.zwave... | 34.554598 | 87 | 0.735218 |
a6406d38de772d64ff38102d9cdfdd8a2f8f393c | 430 | py | Python | Python/EjemplosParcial/1.py | Camiloasc1/OperativeSystemsUNAL | a07bfc235789b7a8848280a549a6b2c9602e61b5 | [
"MIT"
] | null | null | null | Python/EjemplosParcial/1.py | Camiloasc1/OperativeSystemsUNAL | a07bfc235789b7a8848280a549a6b2c9602e61b5 | [
"MIT"
] | null | null | null | Python/EjemplosParcial/1.py | Camiloasc1/OperativeSystemsUNAL | a07bfc235789b7a8848280a549a6b2c9602e61b5 | [
"MIT"
] | null | null | null | import thread
import threading
import time
def proc(n, lock):
while True:
lock.acquire()
print 'Process #', n, '- working'
# work
lock.release()
time.sleep(0.1)
def main():
lock = threading.Lock()
thread.start_new_thread(proc, (1, lock))
thread.start_new_threa... | 17.916667 | 44 | 0.593023 |
9766934f046514b3cccf4db66fbe59628da07644 | 4,688 | py | Python | scipy/sparse/csgraph/tests/test_flow.py | Ennosigaeon/scipy | 2d872f7cf2098031b9be863ec25e366a550b229c | [
"BSD-3-Clause"
] | 353 | 2020-12-10T10:47:17.000Z | 2022-03-31T23:08:29.000Z | scipy/sparse/csgraph/tests/test_flow.py | Ennosigaeon/scipy | 2d872f7cf2098031b9be863ec25e366a550b229c | [
"BSD-3-Clause"
] | 80 | 2020-12-10T09:54:22.000Z | 2022-03-30T22:08:45.000Z | scipy/sparse/csgraph/tests/test_flow.py | Ennosigaeon/scipy | 2d872f7cf2098031b9be863ec25e366a550b229c | [
"BSD-3-Clause"
] | 63 | 2020-12-10T17:10:34.000Z | 2022-03-28T16:27:07.000Z | import numpy as np
from numpy.testing import assert_array_equal
import pytest
from scipy.sparse import csr_matrix, csc_matrix
from scipy.sparse.csgraph import maximum_flow
def test_raises_on_dense_input():
with pytest.raises(TypeError):
graph = np.array([[0, 1], [0, 0]])
maximum_flow(graph, 0, 1)... | 37.504 | 75 | 0.49744 |
671cfb1e82f7a437bf191bc5a8ae7bf67bc37f25 | 548 | py | Python | nydkcd11/blog/migrations/0004_image_image.py | asi14/nydkc11 | 4c40f7f3d0829ee3659a5edc9a03ffdb47b5bdc4 | [
"MIT"
] | null | null | null | nydkcd11/blog/migrations/0004_image_image.py | asi14/nydkc11 | 4c40f7f3d0829ee3659a5edc9a03ffdb47b5bdc4 | [
"MIT"
] | 9 | 2020-02-11T21:47:24.000Z | 2022-03-11T23:11:44.000Z | nydkcd11/blog/migrations/0004_image_image.py | asi14/nydkc11 | 4c40f7f3d0829ee3659a5edc9a03ffdb47b5bdc4 | [
"MIT"
] | 1 | 2018-04-26T04:37:10.000Z | 2018-04-26T04:37:10.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-06-21 14:13
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('blog', '0003_video_video'),
]
operations = [
m... | 23.826087 | 96 | 0.633212 |
be6b8b5a1179419828824caaaa4d593199129fb1 | 380 | py | Python | setup.py | kevinjalbert/notion_scripts | 27f909ca7c53a99651a52fe76c6aa062b8ed034c | [
"MIT"
] | 22 | 2019-09-10T00:23:03.000Z | 2022-03-10T03:14:29.000Z | setup.py | kevinjalbert/notion_scripts | 27f909ca7c53a99651a52fe76c6aa062b8ed034c | [
"MIT"
] | null | null | null | setup.py | kevinjalbert/notion_scripts | 27f909ca7c53a99651a52fe76c6aa062b8ed034c | [
"MIT"
] | 1 | 2020-08-19T15:40:16.000Z | 2020-08-19T15:40:16.000Z | from setuptools import setup
setup(name='notion-scripts',
version='0.2.1',
description='Shared collection of common Notion Scripts used in my projects',
url='http://github.com/kevinjalbert/notion-scripts',
author='Kevin Jalbert',
author_email='kevin.j.jalbert@gmail.com',
license='MI... | 31.666667 | 83 | 0.676316 |
cb70443893aca23a243fd8991e650d5610ade330 | 11,083 | py | Python | fairseq_cli/train.py | AppleHolic/fairseq | c5b32cb2bde59a7bb7987b22864731fe927523d4 | [
"MIT"
] | 180 | 2020-02-17T17:19:21.000Z | 2022-03-28T03:29:35.000Z | fairseq_cli/train.py | AppleHolic/fairseq | c5b32cb2bde59a7bb7987b22864731fe927523d4 | [
"MIT"
] | 18 | 2020-11-06T17:11:22.000Z | 2021-09-13T15:23:03.000Z | fairseq_cli/train.py | AppleHolic/fairseq | c5b32cb2bde59a7bb7987b22864731fe927523d4 | [
"MIT"
] | 35 | 2020-02-20T19:35:38.000Z | 2022-02-18T01:08:52.000Z | #!/usr/bin/env python3 -u
# 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.
"""
Train a new model on one or across multiple GPUs.
"""
import logging
import math
import os
import random
import ... | 35.522436 | 117 | 0.66814 |
9914d1f28f8b836355744f1ad9233b1ff66a6e62 | 4,968 | py | Python | ironic/conf/opts.py | cargonza2016/packages | ccb6038e728f5b580cb05416752358db570424ee | [
"Apache-2.0"
] | null | null | null | ironic/conf/opts.py | cargonza2016/packages | ccb6038e728f5b580cb05416752358db570424ee | [
"Apache-2.0"
] | null | null | null | ironic/conf/opts.py | cargonza2016/packages | ccb6038e728f5b580cb05416752358db570424ee | [
"Apache-2.0"
] | null | null | null | # 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, software
# distributed under the Li... | 38.511628 | 77 | 0.757649 |
8329c0975b039a0a32ac20d0f8bbd7ca3584fd94 | 2,290 | py | Python | ForecastIO/forecastio.py | c17r/tsace | 59c6e0388429943dc3de879745119f9c94cd9ccc | [
"MIT"
] | null | null | null | ForecastIO/forecastio.py | c17r/tsace | 59c6e0388429943dc3de879745119f9c94cd9ccc | [
"MIT"
] | null | null | null | ForecastIO/forecastio.py | c17r/tsace | 59c6e0388429943dc3de879745119f9c94cd9ccc | [
"MIT"
] | null | null | null | """
Contains all the methods for interactive with ForecastIO's weather API
service.
Public Methods:
get_weather -- Returns weather information for a given coordinate
"""
from django.conf import settings
import requests
def _get_value(haystack, needles, missing_value=None):
"""
Safely traverses a many-lev... | 30.533333 | 74 | 0.620961 |
4026816aadcb3788d032b079a1998a1edd541767 | 2,278 | py | Python | dataset/load_dataset.py | saivirtue/easy-eye-app | ed8d3462f6b2292458d679a7dde2c19f3cb86224 | [
"Apache-2.0"
] | 3 | 2021-10-19T23:59:54.000Z | 2021-11-26T09:05:33.000Z | dataset/load_dataset.py | saivirtue/easy-eye-app | ed8d3462f6b2292458d679a7dde2c19f3cb86224 | [
"Apache-2.0"
] | null | null | null | dataset/load_dataset.py | saivirtue/easy-eye-app | ed8d3462f6b2292458d679a7dde2c19f3cb86224 | [
"Apache-2.0"
] | 1 | 2022-03-29T18:55:07.000Z | 2022-03-29T18:55:07.000Z | # 匯入必要套件
import ntpath
import os
import pickle
from itertools import groupby
import cv2
import numpy as np
from imutils import paths
# 匯入人臉偵測方法 (你可以依據喜好更換不同方法)
from face_detection.opencv_dnns import detect
def load_images(input_path, min_size=15):
# 載入所有圖片
image_paths = list(paths.list_images(input_path))
... | 25.886364 | 96 | 0.6036 |
b9caec2608946c4314687b92c4dcb4713554f908 | 262 | py | Python | centralauth/client/urls.py | lenarother/django-centralauth | dadd78191d879c96fc2730cb5625ab833c1ea0da | [
"MIT"
] | 6 | 2018-11-22T15:06:57.000Z | 2021-03-16T18:44:41.000Z | centralauth/client/urls.py | lenarother/django-centralauth | dadd78191d879c96fc2730cb5625ab833c1ea0da | [
"MIT"
] | 10 | 2021-05-04T18:55:50.000Z | 2021-06-01T22:58:43.000Z | centralauth/client/urls.py | lenarother/django-centralauth | dadd78191d879c96fc2730cb5625ab833c1ea0da | [
"MIT"
] | 1 | 2019-04-30T08:07:38.000Z | 2019-04-30T08:07:38.000Z | from django.conf.urls import url
from .views import CallbackView, LoginView
app_name = 'centralauth_client'
urlpatterns = [
url('^login/$', LoginView.as_view(), name='login'),
url('^login/callback/$', CallbackView.as_view(), name='login-callback'),
]
| 23.818182 | 76 | 0.706107 |
7ba2570ab9a394b6214446774c3379f51cf5f887 | 704 | py | Python | kolibri/core/content/constants/schema_versions.py | priyanka-choubey/kolibri | 4070dc158634ab47c6e127768f0aed7548c0a182 | [
"MIT"
] | 1 | 2019-12-04T10:48:53.000Z | 2019-12-04T10:48:53.000Z | kolibri/core/content/constants/schema_versions.py | priyanka-choubey/kolibri | 4070dc158634ab47c6e127768f0aed7548c0a182 | [
"MIT"
] | 3 | 2021-03-10T08:57:45.000Z | 2021-09-02T07:03:34.000Z | kolibri/core/content/constants/schema_versions.py | priyanka-choubey/kolibri | 4070dc158634ab47c6e127768f0aed7548c0a182 | [
"MIT"
] | 1 | 2019-12-04T12:26:16.000Z | 2019-12-04T12:26:16.000Z | V020BETA1 = "v0.2.0-beta1"
V040BETA3 = "v0.4.0-beta3"
NO_VERSION = "unversioned"
VERSION_1 = "1"
VERSION_2 = "2"
VERSION_3 = "3"
# List of the content db schema versions, ordered from most recent to least recent.
# When a new schema version is generated, it should be added here, at the top of the list.
CONTENT_DB... | 23.466667 | 90 | 0.742898 |
53626a75217bc730ee4cd4649588e48960dec17d | 18,438 | py | Python | frappe/custom/doctype/customize_form/customize_form.py | juhiwue/frappe | 77f88af74e037dcca0bae3f3ef1e8cae7fb0f699 | [
"MIT"
] | null | null | null | frappe/custom/doctype/customize_form/customize_form.py | juhiwue/frappe | 77f88af74e037dcca0bae3f3ef1e8cae7fb0f699 | [
"MIT"
] | null | null | null | frappe/custom/doctype/customize_form/customize_form.py | juhiwue/frappe | 77f88af74e037dcca0bae3f3ef1e8cae7fb0f699 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
"""
Customize Form is a Single DocType used to mask the Property Setter
Thus providing a better UI from user perspective
"""
import json
import frappe
import frappe.translate
fr... | 31.250847 | 113 | 0.708266 |
5a488c78cf255ac36931cd334e02387574d2ddc3 | 13,186 | py | Python | skydoc/macro_extractor_test.py | kendalllaneee/skydoc | 26492f39a450782c79184086dadcfd4bedf28b86 | [
"Apache-2.0"
] | 56 | 2016-03-30T22:37:51.000Z | 2021-11-09T12:13:05.000Z | skydoc/macro_extractor_test.py | kendalllaneee/skydoc | 26492f39a450782c79184086dadcfd4bedf28b86 | [
"Apache-2.0"
] | 196 | 2016-03-30T22:54:15.000Z | 2021-06-30T09:47:57.000Z | skydoc/macro_extractor_test.py | kendalllaneee/skydoc | 26492f39a450782c79184086dadcfd4bedf28b86 | [
"Apache-2.0"
] | 56 | 2016-03-30T23:12:03.000Z | 2021-11-09T12:12:56.000Z | # Copyright 2016 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... | 27.877378 | 114 | 0.526467 |
2ccc521e0703d975444bcc6f05cc9d4733527467 | 210 | py | Python | learn-python/variable/integer/stats.py | Moazzam125/learn-python | a0a92a5f4d1a031d0f66a7d10682c1844b1da80d | [
"MIT"
] | 2 | 2020-12-25T06:42:13.000Z | 2020-12-25T10:25:55.000Z | learn-python/variable/integer/stats.py | Moazzam125/learn-python | a0a92a5f4d1a031d0f66a7d10682c1844b1da80d | [
"MIT"
] | null | null | null | learn-python/variable/integer/stats.py | Moazzam125/learn-python | a0a92a5f4d1a031d0f66a7d10682c1844b1da80d | [
"MIT"
] | 2 | 2021-12-27T06:15:40.000Z | 2022-01-05T15:08:29.000Z | '''' Statistics of integers '''
### BASIC
sample_stat = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# Minimum value
print(min(sample_stat))
# Maximum value
print(max(sample_stat))
# Sum value
print(sum(sample_stat)) | 12.352941 | 44 | 0.642857 |
75452cd4f35aa37ca9f79e01de4ba2a374b45697 | 16,076 | py | Python | google/cloud/dialogflow_v2/services/answer_records/async_client.py | rogers140/python-dialogflow | d9ce91f8590947736560727624fbc0846601ce1c | [
"Apache-2.0"
] | null | null | null | google/cloud/dialogflow_v2/services/answer_records/async_client.py | rogers140/python-dialogflow | d9ce91f8590947736560727624fbc0846601ce1c | [
"Apache-2.0"
] | null | null | null | google/cloud/dialogflow_v2/services/answer_records/async_client.py | rogers140/python-dialogflow | d9ce91f8590947736560727624fbc0846601ce1c | [
"Apache-2.0"
] | null | null | null | # -*- 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... | 42.755319 | 138 | 0.657066 |
8304ce3e6606b76f2ec3c687035dd3050c02c5ec | 4,840 | py | Python | demo/mmaction2/webcam_demo.py | ZJCV/TSN | ec6ad668d20f477df44eab7035e2553d95a835f3 | [
"Apache-2.0"
] | 2 | 2021-11-29T10:29:40.000Z | 2022-03-22T02:39:44.000Z | demo/mmaction2/webcam_demo.py | ZJCV/TSN | ec6ad668d20f477df44eab7035e2553d95a835f3 | [
"Apache-2.0"
] | 1 | 2022-03-13T09:28:52.000Z | 2022-03-13T09:28:52.000Z | demo/mmaction2/webcam_demo.py | ZJCV/TSN | ec6ad668d20f477df44eab7035e2553d95a835f3 | [
"Apache-2.0"
] | 1 | 2021-03-09T08:14:22.000Z | 2021-03-09T08:14:22.000Z | # -*- coding: utf-8 -*-
"""
@date: 2021/1/14 下午2:51
@file: visualization.py
@author: zj
@description:
"""
from operator import itemgetter
import numpy as np
import torch
from collections import deque
from threading import Thread
from tsn.model.recognizers.build import build_recognizer
from tsn.data.transforms.build... | 32.05298 | 103 | 0.630579 |
b1994d3dc36bcdcc2a007d57bf08ff6036e1be16 | 1,407 | py | Python | app/__init__.py | idayrus/evoting | 241d92a4d68f524365a6322b5bbcfaa7d9abc8a3 | [
"MIT"
] | 1 | 2021-12-24T06:41:45.000Z | 2021-12-24T06:41:45.000Z | app/__init__.py | idayrus/evoting | 241d92a4d68f524365a6322b5bbcfaa7d9abc8a3 | [
"MIT"
] | null | null | null | app/__init__.py | idayrus/evoting | 241d92a4d68f524365a6322b5bbcfaa7d9abc8a3 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_login import LoginManager
# Import
from app.helper.sqlalchemy import MyQuery
from app.helper.rproxy import ReverseProxied
# Init app
app = Flask(
__name__,
static_url_path = '/file/public',
static_... | 26.055556 | 67 | 0.808813 |
ad123096a30b87e32aa1673c76d5a1d6105b643d | 6,974 | py | Python | test/functional/wallet_txn_doublespend.py | tachacoin/tachacoin | a40df0f17ac1c201d3e339944c8c74e668c61a1b | [
"MIT"
] | null | null | null | test/functional/wallet_txn_doublespend.py | tachacoin/tachacoin | a40df0f17ac1c201d3e339944c8c74e668c61a1b | [
"MIT"
] | null | null | null | test/functional/wallet_txn_doublespend.py | tachacoin/tachacoin | a40df0f17ac1c201d3e339944c8c74e668c61a1b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet accounts properly when there is a double-spend conflict."""
from decimal import Decimal... | 46.18543 | 145 | 0.641812 |
d88375b259782254cc1d9cc198eab80ecb034131 | 7,090 | py | Python | my_classes/.history/Tuples/name_tuples_20210722171757.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | my_classes/.history/Tuples/name_tuples_20210722171757.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | my_classes/.history/Tuples/name_tuples_20210722171757.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | """ Tuple as Data Structure
We have see how we interpreted tuples as data structures
The position of the object contained in the tuple gives it meaning
For example, we can represent a 2D coordinate as: (10, 20)
x y
If pt is a position tuple, we can re... | 31.793722 | 154 | 0.625529 |
4078d8b2f7989b1dfcd78a1544c877a0e0904fa1 | 2,114 | py | Python | bot.py | szkp0151/discord_voiceroid | a427f1d0ed9539d2c1f3753303ab58613b297c3d | [
"MIT"
] | null | null | null | bot.py | szkp0151/discord_voiceroid | a427f1d0ed9539d2c1f3753303ab58613b297c3d | [
"MIT"
] | null | null | null | bot.py | szkp0151/discord_voiceroid | a427f1d0ed9539d2c1f3753303ab58613b297c3d | [
"MIT"
] | 2 | 2021-07-05T13:07:01.000Z | 2021-07-05T14:19:24.000Z | from ui import SelectTextChannel, SelectVoiceChannel
import discord
import asyncio
from discord.ext import commands
from text2wav import text2wav
from Item import Item
import pyvcroid2
class VoiceroidTTSBot(commands.Cog):
def __init__(self, bot, vc):
self.bot: commands.Bot = bot
self.v... | 37.75 | 85 | 0.586093 |
d9eb7ba21aec17b2fa14826f60962f15b7bc9bff | 28,725 | py | Python | tests/cfgparse_py_doctest.py | vlotorev/cfgparse | d44668d35a7697c76c500f2f7322c4f4b6328e68 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/cfgparse_py_doctest.py | vlotorev/cfgparse | d44668d35a7697c76c500f2f7322c4f4b6328e68 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/cfgparse_py_doctest.py | vlotorev/cfgparse | d44668d35a7697c76c500f2f7322c4f4b6328e68 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | r"""
[Check __repr__ and __str__ methods]
>>> c = cfgparse.ConfigParser()
>>> c.add_option('name') # doctest: +ELLIPSIS
<Option at ...: name>
>>> c.add_option('very_long_name',dest='dest') # doctest: +ELLIPSIS
<Option at ...: very_long_name>
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ... | 26.74581 | 104 | 0.562855 |
3f1c30a8a9b943d3e36af0ba70f949f9bf566499 | 2,766 | py | Python | search/globs.py | nealedj/search | 608dc52a43024b83f2d3c0cc1c769e461712083f | [
"MIT"
] | 53 | 2015-02-27T15:17:49.000Z | 2022-02-12T11:42:34.000Z | search/globs.py | nealedj/search | 608dc52a43024b83f2d3c0cc1c769e461712083f | [
"MIT"
] | 32 | 2015-01-20T13:03:55.000Z | 2019-05-14T10:29:52.000Z | search/globs.py | nealedj/search | 608dc52a43024b83f2d3c0cc1c769e461712083f | [
"MIT"
] | 21 | 2015-06-05T09:07:07.000Z | 2021-09-14T11:01:43.000Z | # -*- coding: utf-8 -*-
import re
CHARACTER_MAP = {
u'À': 'A',
u'Á': 'A',
u'Â': 'A',
u'Ã': 'A',
u'Ä': 'A',
u'Å': 'A',
u'Æ': 'Ae',
u'Ā': 'A',
u'Ą': 'A',
u'Ă': 'A',
u'Ç': 'C',
u'Ć': 'C',
u'Č': 'C',
u'Ĉ': 'C',
u'Ċ': 'C',
u'Ď': 'D',
u'Đ': 'D',
u'È': ... | 15.032609 | 81 | 0.222343 |
11405b8229a957c82534710791b34fa35fe922a3 | 38,240 | py | Python | pysnmp/EQLSTORAGEPOOL-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/EQLSTORAGEPOOL-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/EQLSTORAGEPOOL-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module EQLSTORAGEPOOL-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/EQLSTORAGEPOOL-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:50:54 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, ... | 138.050542 | 8,551 | 0.814278 |
55782e187294837231c76b13783716c6cd73a8e0 | 24,474 | py | Python | mayan/apps/django_gpg/tests/literals.py | darrenflexxu/Mayan-EDMS | 6707365bfacd137e625ddc1b990168012246fa07 | [
"Apache-2.0"
] | null | null | null | mayan/apps/django_gpg/tests/literals.py | darrenflexxu/Mayan-EDMS | 6707365bfacd137e625ddc1b990168012246fa07 | [
"Apache-2.0"
] | 5 | 2021-03-19T22:59:52.000Z | 2022-03-12T00:13:16.000Z | mayan/apps/django_gpg/tests/literals.py | Sumit-Kumar-Jha/mayan | 5b7ddeccf080b9e41cc1074c70e27dfe447be19f | [
"Apache-2.0"
] | 1 | 2020-07-29T21:03:27.000Z | 2020-07-29T21:03:27.000Z | from __future__ import unicode_literals
import os
from django.conf import settings
MOCK_SEARCH_KEYS_RESPONSE = [
{
'algo': u'1',
'date': u'1311475606',
'expires': u'1643601600',
'keyid': u'607138F1AECC5A5CA31CB7715F3F7F75D210724D',
'length': u'2048',
'type': u'pub'... | 64.746032 | 73 | 0.941203 |
f2f43e7133f91c8d65d9bcf572dc27fc3bb84d84 | 64 | py | Python | tests/__init__.py | GersbachKa/PsrSigSim | 641eed431775588889dee6c5f0aba808e7bf4ec6 | [
"MIT"
] | 13 | 2020-03-06T16:41:05.000Z | 2021-12-22T02:26:40.000Z | tests/__init__.py | GersbachKa/PsrSigSim | 641eed431775588889dee6c5f0aba808e7bf4ec6 | [
"MIT"
] | 80 | 2018-09-25T18:37:30.000Z | 2021-09-16T13:39:43.000Z | tests/__init__.py | GersbachKa/PsrSigSim | 641eed431775588889dee6c5f0aba808e7bf4ec6 | [
"MIT"
] | 9 | 2018-10-29T14:31:40.000Z | 2021-09-08T13:55:02.000Z | # -*- coding: utf-8 -*-
"""Unit test package for psrsigsim."""
| 16 | 38 | 0.578125 |
79467145daba1d832ff132b59b7a6cb22dc1057d | 1,829 | py | Python | giantstar/utils/fileReader.py | DaoSen-v/gaintstar | 5ecae8652c9f71aaa78cc0fd181d431cb130cab1 | [
"MIT"
] | 1 | 2021-08-06T08:32:15.000Z | 2021-08-06T08:32:15.000Z | giantstar/utils/fileReader.py | DaoSen-v/gaintstar | 5ecae8652c9f71aaa78cc0fd181d431cb130cab1 | [
"MIT"
] | null | null | null | giantstar/utils/fileReader.py | DaoSen-v/gaintstar | 5ecae8652c9f71aaa78cc0fd181d431cb130cab1 | [
"MIT"
] | null | null | null | # _*_encoding=utf8_*_
# @Time : 2021/6/10 16:07
# @Author : xuyong
# @Email: yong1.xu@casstime.com
import json
from typing import List
import pymysql
import pandas
from giantstar.globalSetting import plus_setting
from giantstar.utils.error import DatabaseNoSuchData, DataIndexError
class ExcelReader:
files = p... | 29.5 | 112 | 0.642428 |
67fa2cf2b51b355d422b50d34f60083708fe5b92 | 978 | py | Python | tests/test_spin_add.py | haakoek/quantum-systems | 1d3421f15e8ba3ec203cbdda538e033bf9987682 | [
"MIT"
] | null | null | null | tests/test_spin_add.py | haakoek/quantum-systems | 1d3421f15e8ba3ec203cbdda538e033bf9987682 | [
"MIT"
] | null | null | null | tests/test_spin_add.py | haakoek/quantum-systems | 1d3421f15e8ba3ec203cbdda538e033bf9987682 | [
"MIT"
] | null | null | null | import pytest
import numpy as np
from quantum_systems import BasisSet
def test_add_spin_spf():
spf = (np.arange(15) + 1).reshape(3, 5).T
n = 3
n_a = 2
n_b = n - n_a
l = 2 * spf.shape[0]
assert l == 10
m_a = l // 2 - n_a
assert m_a == 3
m_b = l // 2 - n_b
assert m_b == 4
... | 20.375 | 50 | 0.637014 |
de4be25eda5366672f2e96ecd8899c407fa311d3 | 1,176 | py | Python | src/ethereum/homestead/vm/precompiled_contracts/sha256.py | muddlebee/execution-specs | f8f051a95ae2b0ff1dc0fd7b69b5aa6a9bbfea9e | [
"CC0-1.0"
] | 102 | 2021-08-19T02:44:03.000Z | 2022-03-27T23:46:00.000Z | src/ethereum/homestead/vm/precompiled_contracts/sha256.py | muddlebee/execution-specs | f8f051a95ae2b0ff1dc0fd7b69b5aa6a9bbfea9e | [
"CC0-1.0"
] | 264 | 2021-08-18T14:15:26.000Z | 2022-03-31T12:24:23.000Z | src/ethereum/tangerine_whistle/vm/precompiled_contracts/sha256.py | ultratwo/execution-specs | 55d7fd716fc194b30e37a6e487c191445dfec9bc | [
"CC0-1.0"
] | 30 | 2021-08-20T05:38:34.000Z | 2022-01-19T06:49:29.000Z | """
Ethereum Virtual Machine (EVM) SHA256 PRECOMPILED CONTRACT
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. contents:: Table of Contents
:backlinks: none
:local:
Introduction
------------
Implementation of the `SHA256` precompiled contract.
"""
import hashlib
from ethereum.base_types import... | 24.5 | 76 | 0.654762 |
9032d2d0b5de647acf3c052ee99865eda8c2841b | 2,149 | py | Python | astroquery/heasarc/tests/test_heasarc_remote.py | daisycodes/astroquery | e7ea01c520660251c18b5fefe10f4054b4ced64c | [
"BSD-3-Clause"
] | null | null | null | astroquery/heasarc/tests/test_heasarc_remote.py | daisycodes/astroquery | e7ea01c520660251c18b5fefe10f4054b4ced64c | [
"BSD-3-Clause"
] | null | null | null | astroquery/heasarc/tests/test_heasarc_remote.py | daisycodes/astroquery | e7ea01c520660251c18b5fefe10f4054b4ced64c | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import print_function
import pytest
import requests
from ...heasarc import Heasarc
from ...utils import commons
@pytest.mark.remote_data
class TestHeasarc:
def test_basic_example(self):
mission = 'rosmaster'
object_... | 30.267606 | 77 | 0.641228 |
6ea2b796d80c22b3d9e53a299abae68bc2e8b771 | 1,663 | py | Python | mpmi_sc/src/gym/setup.py | argallab/mpmi_shared_control | 4c2346a3ddcc3ab4e70556ba7498970cb28116a0 | [
"MIT"
] | 7 | 2019-05-22T06:36:01.000Z | 2021-04-10T13:50:17.000Z | mpmi_sc/src/gym/setup.py | argallab/mpmi_shared_control | 4c2346a3ddcc3ab4e70556ba7498970cb28116a0 | [
"MIT"
] | null | null | null | mpmi_sc/src/gym/setup.py | argallab/mpmi_shared_control | 4c2346a3ddcc3ab4e70556ba7498970cb28116a0 | [
"MIT"
] | 3 | 2019-05-08T19:48:32.000Z | 2020-04-19T04:29:53.000Z | from setuptools import setup, find_packages
import sys, os.path
# Don't import gym module here, since deps may not be installed
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'gym'))
from version import VERSION
# Environment-specific dependencies.
extras = {
'atari': ['atari_py>=0.1.1', 'Pillow', 'PyOpe... | 32.607843 | 111 | 0.629585 |
774bb4a6459a09bb9aeab9813aa1ad902dd786ba | 363 | py | Python | other/dingding/dingtalk/api/rest/OapiAttendanceGroupScheduleClearRequest.py | hth945/pytest | 83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc | [
"Apache-2.0"
] | null | null | null | other/dingding/dingtalk/api/rest/OapiAttendanceGroupScheduleClearRequest.py | hth945/pytest | 83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc | [
"Apache-2.0"
] | null | null | null | other/dingding/dingtalk/api/rest/OapiAttendanceGroupScheduleClearRequest.py | hth945/pytest | 83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc | [
"Apache-2.0"
] | null | null | null | '''
Created by auto_sdk on 2021.02.04
'''
from dingtalk.api.base import RestApi
class OapiAttendanceGroupScheduleClearRequest(RestApi):
def __init__(self,url=None):
RestApi.__init__(self,url)
self.op_userid = None
self.param = None
def getHttpMethod(self):
return 'POST'
def getapiname(self):
return 'ding... | 22.6875 | 56 | 0.763085 |
5e8fc07874f43d479e82c6bf77296da2484a8c19 | 6,542 | py | Python | docs/conf.py | arijitdas123student/jina | 54d916e362bde0391b0af0f12241d531b8453247 | [
"Apache-2.0"
] | 15,179 | 2020-04-28T10:23:56.000Z | 2022-03-31T14:35:25.000Z | docs/conf.py | arijitdas123student/jina | 54d916e362bde0391b0af0f12241d531b8453247 | [
"Apache-2.0"
] | 3,912 | 2020-04-28T13:01:29.000Z | 2022-03-31T14:36:46.000Z | docs/conf.py | arijitdas123student/jina | 54d916e362bde0391b0af0f12241d531b8453247 | [
"Apache-2.0"
] | 1,955 | 2020-04-28T10:50:49.000Z | 2022-03-31T12:28:34.000Z | import os
import re
import sys
from os import path
sys.path.insert(0, path.abspath('..'))
project = 'Jina'
slug = re.sub(r'\W+', '-', project.lower())
author = 'Jina AI'
copyright = 'Jina AI Limited. All rights reserved.'
source_suffix = ['.rst', '.md']
master_doc = 'index'
language = 'en'
repo_dir = '../'
try:
... | 29.468468 | 150 | 0.646591 |
866235604d71e02b27a9bfbff1ee6cce42683d8a | 12,908 | py | Python | bokeh/core/property/bases.py | Navera-Arifi/bokeh | a7bacd9c5908f514016e019fe1d645b69cb1fbf0 | [
"BSD-3-Clause"
] | null | null | null | bokeh/core/property/bases.py | Navera-Arifi/bokeh | a7bacd9c5908f514016e019fe1d645b69cb1fbf0 | [
"BSD-3-Clause"
] | null | null | null | bokeh/core/property/bases.py | Navera-Arifi/bokeh | a7bacd9c5908f514016e019fe1d645b69cb1fbf0 | [
"BSD-3-Clause"
] | null | null | null | ''' Provide base classes for the Bokeh property system.
.. note::
These classes form part of the very low-level machinery that implements
the Bokeh model and property system. It is unlikely that any of these
classes or their methods will be applicable to any standard usage or to
anyone who is not direc... | 30.587678 | 108 | 0.614813 |
5e3131fc5c62892cbb2919c579814a98be87245f | 278 | py | Python | propara/commonsense/background_knowledge/kb0_nothing.py | keisks/propara | 49fa8fe0481291df18b2c7b48e7ba1dafaad48e2 | [
"Apache-2.0"
] | 84 | 2018-06-02T02:00:53.000Z | 2022-03-13T12:17:42.000Z | propara/commonsense/background_knowledge/kb0_nothing.py | keisks/propara | 49fa8fe0481291df18b2c7b48e7ba1dafaad48e2 | [
"Apache-2.0"
] | 3 | 2018-10-31T00:28:31.000Z | 2020-05-12T01:06:53.000Z | propara/commonsense/background_knowledge/kb0_nothing.py | keisks/propara | 49fa8fe0481291df18b2c7b48e7ba1dafaad48e2 | [
"Apache-2.0"
] | 13 | 2018-09-14T20:37:51.000Z | 2021-03-23T09:24:49.000Z | from propara.commonsense import model_output_loader
from propara.commonsense.background_knowledge.kb import KB
class KB0Nothing(KB):
def __init__(self):
super().__init__()
self.name = 'kb_none'
def prob_of(self, process_id, cand):
return 1.0
| 21.384615 | 58 | 0.701439 |
f742862ba0025cfcee3d87f7cfc4d5fe793f283d | 20,962 | py | Python | plaso/engine/extractors.py | jonathan-greig/plaso | b88a6e54c06a162295d09b016bddbfbfe7ca9070 | [
"Apache-2.0"
] | 1,253 | 2015-01-02T13:58:02.000Z | 2022-03-31T08:43:39.000Z | plaso/engine/extractors.py | jonathan-greig/plaso | b88a6e54c06a162295d09b016bddbfbfe7ca9070 | [
"Apache-2.0"
] | 3,388 | 2015-01-02T11:17:58.000Z | 2022-03-30T10:21:45.000Z | plaso/engine/extractors.py | jonathan-greig/plaso | b88a6e54c06a162295d09b016bddbfbfe7ca9070 | [
"Apache-2.0"
] | 376 | 2015-01-20T07:04:54.000Z | 2022-03-04T23:53:00.000Z | # -*- coding: utf-8 -*-
"""The extractor class definitions.
An extractor is a class used to extract information from "raw" data.
"""
import copy
import re
import pysigscan
from dfvfs.helpers import file_system_searcher
from dfvfs.lib import definitions as dfvfs_definitions
from dfvfs.lib import errors as dfvfs_erro... | 36.519164 | 80 | 0.710094 |
b4070d39ec1dfd84505c6c309ffaa75b83ced04f | 13,745 | py | Python | clubcpg_prelim/PReLIM.py | waterlandlab/CluBCpG | 610b11d1a743b763ccd93622b3c14f0cc71301a7 | [
"MIT"
] | 9 | 2019-06-28T14:53:30.000Z | 2021-12-26T00:41:32.000Z | clubcpg_prelim/PReLIM.py | waterlandlab/CluBCpG | 610b11d1a743b763ccd93622b3c14f0cc71301a7 | [
"MIT"
] | 13 | 2019-05-28T21:36:28.000Z | 2022-03-19T22:42:12.000Z | clubcpg_prelim/PReLIM.py | waterlandlab/CluBCpG | 610b11d1a743b763ccd93622b3c14f0cc71301a7 | [
"MIT"
] | 4 | 2019-06-24T17:58:43.000Z | 2021-06-02T12:31:56.000Z | from __future__ import print_function
"""
Author:
Jack Duryea
Waterland Lab
Computational Epigenetics Section
Baylor College of Medicine
Created April 2018
Updated April 11 2019: use random forests as model
PReLIM: Preceise Read Level Imputation of Methylation
PReLIM imputes missing CpG methylation
states in CpG... | 24.588551 | 144 | 0.699236 |
c72ae3e4f228478a50a298b50928bd94c0c71987 | 200 | py | Python | India_Bazaar_Project/store/urls.py | ghoshrohit72/India-Shopping-Mart | fbabb38c7cdff098767eeb0043724dcdd1e84676 | [
"MIT"
] | null | null | null | India_Bazaar_Project/store/urls.py | ghoshrohit72/India-Shopping-Mart | fbabb38c7cdff098767eeb0043724dcdd1e84676 | [
"MIT"
] | null | null | null | India_Bazaar_Project/store/urls.py | ghoshrohit72/India-Shopping-Mart | fbabb38c7cdff098767eeb0043724dcdd1e84676 | [
"MIT"
] | null | null | null |
from django.contrib import admin
from django.urls import path
from . import views
urlpatterns = [
path('', views.home, name='home'),
path('product/', views.productPage, name='product'),
]
| 18.181818 | 56 | 0.685 |
365435c9a3dfe2240999e0cbb1066059aba573ad | 17,030 | py | Python | simpleToy.py | betairylia/Pokemon-Showdown-Win-Rate-Prediction | 15430e512df81f420ad884a2058dc362da6b1ad0 | [
"MIT"
] | 2 | 2020-08-13T00:38:49.000Z | 2020-10-21T16:39:07.000Z | simpleToy.py | betairylia/Pokemon-Showdown-Win-Rate-Prediction | 15430e512df81f420ad884a2058dc362da6b1ad0 | [
"MIT"
] | null | null | null | simpleToy.py | betairylia/Pokemon-Showdown-Win-Rate-Prediction | 15430e512df81f420ad884a2058dc362da6b1ad0 | [
"MIT"
] | null | null | null | import tensorflow as tf
import tensorlayer as tl
import numpy as np
import scipy
import time
import math
import argparse
import random
import sys
import os
import matplotlib.pyplot as plt
from model import *
from tensorlayer.prepro import *
from tensorlayer.layers import *
from termcolor import colore... | 44.698163 | 254 | 0.590194 |
d99658786403c678f16e6cf618c8a8cc07074f68 | 5,151 | py | Python | platform/x11/detect.py | KwesiDavis/godot | 2cc60386d83d06e3b2005f0d2e3094eebfb9e382 | [
"CC-BY-3.0",
"MIT"
] | 1 | 2020-06-13T05:57:51.000Z | 2020-06-13T05:57:51.000Z | platform/x11/detect.py | vision-kwest/godot-mirror | 2cc60386d83d06e3b2005f0d2e3094eebfb9e382 | [
"CC-BY-3.0",
"MIT"
] | null | null | null | platform/x11/detect.py | vision-kwest/godot-mirror | 2cc60386d83d06e3b2005f0d2e3094eebfb9e382 | [
"CC-BY-3.0",
"MIT"
] | null | null | null |
import os
import sys
def is_active():
return True
def get_name():
return "X11"
def can_build():
if (os.name!="posix"):
return False
if sys.platform == "darwin":
return False # no x11 on mac for now
errorval=os.system("pkg-config --version > /dev/null")
if (errorval):
print("pkg-co... | 27.545455 | 135 | 0.651136 |
e5544040c034015902264179c4012556e5c1a07f | 2,494 | py | Python | components/gcp/container/component_sdk/python/tests/google/ml_engine/test__wait_job.py | Strasser-Pablo/pipelines | a1d513eb412f3ffd44edf82af2fa7edb05c3b952 | [
"Apache-2.0"
] | 2,860 | 2018-05-24T04:55:01.000Z | 2022-03-31T13:49:56.000Z | components/gcp/container/component_sdk/python/tests/google/ml_engine/test__wait_job.py | Strasser-Pablo/pipelines | a1d513eb412f3ffd44edf82af2fa7edb05c3b952 | [
"Apache-2.0"
] | 7,331 | 2018-05-16T09:03:26.000Z | 2022-03-31T23:22:04.000Z | components/gcp/container/component_sdk/python/tests/google/ml_engine/test__wait_job.py | Strasser-Pablo/pipelines | a1d513eb412f3ffd44edf82af2fa7edb05c3b952 | [
"Apache-2.0"
] | 1,359 | 2018-05-15T11:05:41.000Z | 2022-03-31T09:42:09.000Z | # Copyright 2019 The Kubeflow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 35.628571 | 74 | 0.682037 |
c0cd7156a5558f17812b0443d696f1fb387f846c | 436 | py | Python | clstk/utils/colors.py | nisargjhaveri/summarizer | 6e2a234b2748e3a0e1660dc0404696aa4c10a585 | [
"MIT"
] | 5 | 2018-06-01T14:29:59.000Z | 2021-03-19T04:59:03.000Z | clstk/utils/colors.py | nisargjhaveri/summarizer | 6e2a234b2748e3a0e1660dc0404696aa4c10a585 | [
"MIT"
] | null | null | null | clstk/utils/colors.py | nisargjhaveri/summarizer | 6e2a234b2748e3a0e1660dc0404696aa4c10a585 | [
"MIT"
] | 1 | 2019-04-02T05:07:02.000Z | 2019-04-02T05:07:02.000Z | BLACK = '\033[30m'
RED = '\033[31m'
GREEN = '\033[32m'
YELLOW = '\033[33m'
BLUE = '\033[34m'
MAGENTA = '\033[35m'
CYAN = '\033[36m'
END = '\033[0m'
disableColors = False
def enclose(str, color):
return color + str + END if not disableColors else str
def isDisabled():
return disableColors
def disable():
... | 15.034483 | 58 | 0.655963 |
878f0bf8ad8133599803c77307b8559fe1418719 | 10,372 | py | Python | test/functional/zerocoin_publicSpend_reorg.py | wincash/Wincashcoin | 388475f047679be33849e6d15f5464007b1338c7 | [
"MIT"
] | 10 | 2019-09-11T13:54:07.000Z | 2020-08-31T17:54:35.000Z | test/functional/zerocoin_publicSpend_reorg.py | AdamRoxann/wincash_project | f763b7280033376bbee481573c680b7fa2d032ec | [
"MIT"
] | 1 | 2020-04-11T03:40:34.000Z | 2020-04-11T03:40:34.000Z | test/functional/zerocoin_publicSpend_reorg.py | AdamRoxann/wincash_project | f763b7280033376bbee481573c680b7fa2d032ec | [
"MIT"
] | 6 | 2019-06-29T02:39:51.000Z | 2021-05-20T19:44:27.000Z | # !/usr/bin/env python3
# Copyright (c) 2019 The WINCASHCOIN developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Covers the scenario of two valid PoS blocks with same height
and same coinstake input.
'''
from copy impo... | 49.626794 | 126 | 0.638835 |
5f6bbbce6779cd70333ff2b5565488b82c63f14a | 10,708 | py | Python | python/cuml/test/test_dbscan.py | frankier/cuml | c2f246a923232a63c65082036a3bd1278a2fa7d7 | [
"Apache-2.0"
] | null | null | null | python/cuml/test/test_dbscan.py | frankier/cuml | c2f246a923232a63c65082036a3bd1278a2fa7d7 | [
"Apache-2.0"
] | null | null | null | python/cuml/test/test_dbscan.py | frankier/cuml | c2f246a923232a63c65082036a3bd1278a2fa7d7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019-2021, NVIDIA 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 agre... | 33.567398 | 79 | 0.608517 |
bc4c69989188305e661487962184bace7ca42d34 | 1,441 | py | Python | demo/person/project/infrastructure/drivers/elasticsearch/connector.py | giovannifarlley/ms--fastapi-template | 5bbd6903305db07cc18330ec86fb04ca518e9dab | [
"MIT"
] | 24 | 2021-03-07T13:00:35.000Z | 2022-02-11T03:41:51.000Z | demo/person/project/infrastructure/drivers/elasticsearch/connector.py | giovannifarlley/ms--fastapi-template | 5bbd6903305db07cc18330ec86fb04ca518e9dab | [
"MIT"
] | 2 | 2021-05-15T01:05:17.000Z | 2021-08-13T13:53:57.000Z | demo/person/project/infrastructure/drivers/elasticsearch/connector.py | giovannifarlley/ms--fastapi-template | 5bbd6903305db07cc18330ec86fb04ca518e9dab | [
"MIT"
] | 4 | 2021-04-27T12:18:33.000Z | 2021-10-03T23:43:23.000Z | from elasticsearch import Elasticsearch
from project.infrastructure.environments.loader import Configs
from project.infrastructure.monitoring_layer.aplication_general_log import Log
from project.infrastructure.monitoring_layer.aplication_kpi import Monitor
import sys
log = Log()
class Elk(object):
def __init__... | 27.188679 | 78 | 0.616933 |
435b7734dfe2076df4a5244d530b70af34c3669b | 5,387 | py | Python | source/conf.py | cotobadesign/cotoba-agent-oss-docs | 7b3358495ff61a52202a8f048d540c488472023a | [
"MIT"
] | null | null | null | source/conf.py | cotobadesign/cotoba-agent-oss-docs | 7b3358495ff61a52202a8f048d540c488472023a | [
"MIT"
] | 1 | 2021-03-31T19:46:46.000Z | 2021-03-31T19:46:46.000Z | source/conf.py | cotobadesign/cotoba-agent-oss-docs | 7b3358495ff61a52202a8f048d540c488472023a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 29.437158 | 79 | 0.657694 |
db06c3005e22f36b041eb2fec82043e23f75beb3 | 33,800 | py | Python | trainer_.py | coderlifer/route_duration_prediction | b2d8eeec7b518b52b61295dd80ea850fe150ba9b | [
"MIT"
] | null | null | null | trainer_.py | coderlifer/route_duration_prediction | b2d8eeec7b518b52b61295dd80ea850fe150ba9b | [
"MIT"
] | null | null | null | trainer_.py | coderlifer/route_duration_prediction | b2d8eeec7b518b52b61295dd80ea850fe150ba9b | [
"MIT"
] | null | null | null | import os.path
import shutil
import sys
import numpy as np
import tensorflow as tf
from tqdm import trange
from typing import List, Tuple
import heapq
import logging
import pandas as pd
from enum import Enum
from hparams import build_from_set, build_hparams
from feeder import VarFeeder
from input_pipe import InputPipe... | 42.039801 | 120 | 0.605444 |
8b7e89e9994708fe7be786596277588be037b4e3 | 2,834 | py | Python | torch_geometric/utils/__init__.py | rusty1s/pytorch-geometric | ded9a7b10ad8ebc19c97e567c7bb1ae6605253db | [
"MIT"
] | 2,350 | 2021-09-12T08:32:50.000Z | 2022-03-31T18:09:36.000Z | torch_geometric/utils/__init__.py | rusty1s/pytorch-geometric | ded9a7b10ad8ebc19c97e567c7bb1ae6605253db | [
"MIT"
] | 588 | 2021-09-12T08:49:08.000Z | 2022-03-31T21:02:13.000Z | torch_geometric/utils/__init__.py | rusty1s/pytorch-geometric | ded9a7b10ad8ebc19c97e567c7bb1ae6605253db | [
"MIT"
] | 505 | 2021-09-13T13:13:32.000Z | 2022-03-31T15:54:00.000Z | from .degree import degree
from .softmax import softmax
from .dropout import dropout_adj
from .sort_edge_index import sort_edge_index
from .coalesce import coalesce
from .undirected import is_undirected, to_undirected
from .loop import (contains_self_loops, remove_self_loops,
segregate_self_loops, ad... | 31.842697 | 77 | 0.741002 |
f73dc793dc595d0d972e0c483dbf269d153d71ac | 5,405 | py | Python | tests/test_setup.py | fanmolh/mysql-connector-python | 2c46b9ea8005a7902b274c893ba4a22f58fbaecd | [
"Artistic-1.0-Perl"
] | 1 | 2019-12-23T05:21:34.000Z | 2019-12-23T05:21:34.000Z | tests/test_setup.py | aliang2017/mysql-connector-python | e424cbf2ba6093caaa96bda1db5dbdfec2e60e1c | [
"Artistic-1.0-Perl"
] | 1 | 2019-10-24T02:06:24.000Z | 2019-10-24T02:06:24.000Z | tests/test_setup.py | aliang2017/mysql-connector-python | e424cbf2ba6093caaa96bda1db5dbdfec2e60e1c | [
"Artistic-1.0-Perl"
] | 1 | 2020-07-20T23:26:58.000Z | 2020-07-20T23:26:58.000Z | # Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0, as
# published by the Free Software Foundation.
#
# This program is also distributed with certain s... | 36.52027 | 79 | 0.642183 |
ac7e576037bf926efd9290ecfb77c61e214a641f | 9,380 | py | Python | load2es.py | sirensolutions/library-beam | 8b5f62d55391b26d12e7a7c88ae26d58f2666b73 | [
"Apache-2.0"
] | null | null | null | load2es.py | sirensolutions/library-beam | 8b5f62d55391b26d12e7a7c88ae26d58f2666b73 | [
"Apache-2.0"
] | 4 | 2018-10-25T13:55:27.000Z | 2019-07-24T12:30:46.000Z | load2es.py | sirensolutions/library-beam | 8b5f62d55391b26d12e7a7c88ae26d58f2666b73 | [
"Apache-2.0"
] | null | null | null | import argparse
import codecs
import gzip
import json
import logging
import time
from functools import partial
from itertools import islice
from multiprocessing.dummy import Pool
from tempfile import NamedTemporaryFile
from elasticsearch import Elasticsearch
from elasticsearch.helpers import streaming_bulk, parallel_b... | 37.670683 | 124 | 0.462047 |
f58e22540c37a0635568cb0ac540751ff653398d | 1,246 | py | Python | src/oci/announcements_service/announcement_client_composite_operations.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 249 | 2017-09-11T22:06:05.000Z | 2022-03-04T17:09:29.000Z | src/oci/announcements_service/announcement_client_composite_operations.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 228 | 2017-09-11T23:07:26.000Z | 2022-03-23T10:58:50.000Z | src/oci/announcements_service/announcement_client_composite_operations.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 224 | 2017-09-27T07:32:43.000Z | 2022-03-25T16:55:42.000Z | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 49.84 | 245 | 0.73756 |
779ebd5c7697f32157dee2b41443eae4684b776b | 3,582 | py | Python | examples/video_analysis_per_frame.py | Borda/ImageAI | a87e7012d2ca4086bffd6092d036086b6e5a4a4d | [
"MIT"
] | null | null | null | examples/video_analysis_per_frame.py | Borda/ImageAI | a87e7012d2ca4086bffd6092d036086b6e5a4a4d | [
"MIT"
] | 1 | 2019-05-15T08:03:05.000Z | 2019-05-15T08:03:05.000Z | examples/video_analysis_per_frame.py | Borda/ImageAI | a87e7012d2ca4086bffd6092d036086b6e5a4a4d | [
"MIT"
] | null | null | null | import os
from matplotlib import pyplot as plt
from imageai.Detection import VideoObjectDetection
COLOR_INDEX = {'bus': 'red', 'handbag': 'steelblue', 'giraffe': 'orange', 'spoon': 'gray', 'cup': 'yellow', 'chair': 'green', 'elephant': 'pink', 'truck': 'indigo', 'motorcycle': 'azure', 'refrigerator': 'gold', 'keyboar... | 56.857143 | 1,792 | 0.669738 |
001c6b4747201d5ba58bcce89d9c2e04e4aae3ac | 3,931 | py | Python | src/models/train_model.py | AntonRydahl/MNIST_VAE_SWEEP | 90f3a76a732f716d524e9d3d8fcb9248097934f7 | [
"MIT"
] | null | null | null | src/models/train_model.py | AntonRydahl/MNIST_VAE_SWEEP | 90f3a76a732f716d524e9d3d8fcb9248097934f7 | [
"MIT"
] | null | null | null | src/models/train_model.py | AntonRydahl/MNIST_VAE_SWEEP | 90f3a76a732f716d524e9d3d8fcb9248097934f7 | [
"MIT"
] | null | null | null | from torch.optim import Adam
import torch
import torch.nn as nn
from torchvision.utils import save_image
from vae import *
from data_loader import TrainLoader,TestLoader
import wandb
import argparse
def train_and_test():
parser = argparse.ArgumentParser()
args, leftovers = parser.parse_known_arg... | 30.952756 | 81 | 0.60519 |
3585de29cac788b1769265621fefb75f66777c0b | 11,542 | py | Python | nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Variables/__init__.py | LP-Codes/Nuitka | 2939da85f74127fb3ff6c1155a44bd73e8f5b2a9 | [
"Apache-2.0"
] | null | null | null | nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Variables/__init__.py | LP-Codes/Nuitka | 2939da85f74127fb3ff6c1155a44bd73e8f5b2a9 | [
"Apache-2.0"
] | 1 | 2021-06-10T06:47:04.000Z | 2021-06-10T06:47:04.000Z | nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Variables/__init__.py | LP-Codes/Nuitka | 2939da85f74127fb3ff6c1155a44bd73e8f5b2a9 | [
"Apache-2.0"
] | null | null | null | """engine.SCons.Variables
This file defines the Variables class that is used to add user-friendly
customizable variables to an SCons build.
"""
#
# Copyright (c) 2001 - 2019 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated document... | 35.84472 | 126 | 0.570438 |
fda583a4fb87537e927780e87df3410d587eaf2f | 304 | py | Python | rankings/filters.py | dlanghorne0428/dancesport-tracker-projec | e55d91a4f03c26d6ee8c28846a809064adfdb158 | [
"MIT"
] | null | null | null | rankings/filters.py | dlanghorne0428/dancesport-tracker-projec | e55d91a4f03c26d6ee8c28846a809064adfdb158 | [
"MIT"
] | 87 | 2020-04-15T22:29:03.000Z | 2022-01-02T02:21:28.000Z | rankings/filters.py | dlanghorne0428/dancesport-tracker-projec | e55d91a4f03c26d6ee8c28846a809064adfdb158 | [
"MIT"
] | null | null | null | import django_filters
from django import forms
from .models import Dancer
class DancerFilter(django_filters.FilterSet):
name_last = django_filters.CharFilter(lookup_expr='icontains', widget=forms.TextInput(attrs={'size':12}))
class Meta:
model = Dancer
fields = ['dancer_type']
| 27.636364 | 109 | 0.736842 |
22480da26e521be6c37dc3fd357106be220b9ef6 | 6,048 | py | Python | source/lambda/quicksight-custom-resources/util/quicksight_application.py | swipswaps/discovering-hot-topics-using-machine-learning | 6de8b4670e5a00ad5bf2eb7c27895241d4ea95bf | [
"Apache-2.0"
] | 8 | 2021-09-25T10:14:30.000Z | 2022-02-14T10:45:00.000Z | source/lambda/quicksight-custom-resources/util/quicksight_application.py | swipswaps/discovering-hot-topics-using-machine-learning | 6de8b4670e5a00ad5bf2eb7c27895241d4ea95bf | [
"Apache-2.0"
] | 21 | 2021-07-22T19:02:25.000Z | 2022-02-14T16:28:18.000Z | source/lambda/quicksight-custom-resources/util/quicksight_application.py | swipswaps/discovering-hot-topics-using-machine-learning | 6de8b4670e5a00ad5bf2eb7c27895241d4ea95bf | [
"Apache-2.0"
] | 7 | 2021-09-28T03:09:08.000Z | 2022-02-24T16:33:25.000Z | # #####################################################################################################################
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# ... | 40.590604 | 119 | 0.596892 |
af121447c5a59fb40794dc6d89b6dc28c1ad9d9b | 25,259 | py | Python | Cinder/Queens/huawei_conf.py | bingyanh/OpenStack_Driver | 8c94f6f86a5ebb1e663aa73df0847cfad09d2960 | [
"Apache-2.0"
] | 14 | 2019-05-25T01:55:50.000Z | 2021-02-23T06:54:06.000Z | Cinder/Queens/huawei_conf.py | bingyanh/OpenStack_Driver | 8c94f6f86a5ebb1e663aa73df0847cfad09d2960 | [
"Apache-2.0"
] | 4 | 2019-12-31T08:46:30.000Z | 2021-10-30T09:27:58.000Z | Cinder/Queens/huawei_conf.py | bingyanh/OpenStack_Driver | 8c94f6f86a5ebb1e663aa73df0847cfad09d2960 | [
"Apache-2.0"
] | 17 | 2019-07-31T03:13:07.000Z | 2022-02-21T08:09:15.000Z | # Copyright (c) 2016 Huawei Technologies Co., Ltd.
# 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
#
# ... | 40.157393 | 80 | 0.570411 |
4bdb76d08648b067b6a37577e83b411ebf86e1c6 | 2,421 | py | Python | tests/aiotest/test_add_reader.py | oremanj/trio-asyncio | 35fbf0d366b3359fc749ae7165a19c4196452382 | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/aiotest/test_add_reader.py | oremanj/trio-asyncio | 35fbf0d366b3359fc749ae7165a19c4196452382 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-01-04T20:19:32.000Z | 2021-01-04T20:19:32.000Z | tests/aiotest/test_add_reader.py | oremanj/trio-asyncio | 35fbf0d366b3359fc749ae7165a19c4196452382 | [
"Apache-2.0",
"MIT"
] | null | null | null | from __future__ import absolute_import
from tests.aiotest import socketpair
from tests import aiotest
import pytest
import trio
class TestAddReader:
@pytest.mark.trio
async def test_add_reader(self, loop):
result = {'received': None}
rsock, wsock = socketpair()
ready = trio.Event()
... | 27.827586 | 60 | 0.557208 |
38191cd7112ac517a935e6c50079c39e9ec2db2f | 3,986 | py | Python | tolteca/simu0/tests/test_toltec_array_loading_model.py | dennis-l/tolteca | 1dffaffb585eb7027e26b34ae01e8632bef134cb | [
"BSD-3-Clause"
] | 2 | 2021-09-28T18:51:37.000Z | 2021-12-28T00:25:51.000Z | tolteca/simu0/tests/test_toltec_array_loading_model.py | dennis-l/tolteca | 1dffaffb585eb7027e26b34ae01e8632bef134cb | [
"BSD-3-Clause"
] | 2 | 2021-11-04T22:32:03.000Z | 2022-01-11T21:40:34.000Z | tolteca/simu0/tests/test_toltec_array_loading_model.py | dennis-l/tolteca | 1dffaffb585eb7027e26b34ae01e8632bef134cb | [
"BSD-3-Clause"
] | 2 | 2021-07-23T14:00:51.000Z | 2021-07-27T15:34:48.000Z | #! /usr/bin/env python
from ..toltec import ArrayLoadingModel
import astropy.units as u
# import pytest
from astropy.tests.helper import assert_quantity_allclose
def test_array_loading_model():
alm_a1100 = ArrayLoadingModel(array_name='a1100', atm_model_name='am_q50')
assert ArrayLoadingModel(array_name='a... | 34.362069 | 78 | 0.612644 |
62cb87477b4865823c9a300f713858dab833f898 | 3,647 | py | Python | qtum_electrum/constants.py | TuoUP/qtum-electrum | d353c3cacce62214660a91836b68133aa92710d3 | [
"MIT"
] | null | null | null | qtum_electrum/constants.py | TuoUP/qtum-electrum | d353c3cacce62214660a91836b68133aa92710d3 | [
"MIT"
] | null | null | null | qtum_electrum/constants.py | TuoUP/qtum-electrum | d353c3cacce62214660a91836b68133aa92710d3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2018 The Electrum developers
#
# 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,
# includi... | 28.271318 | 82 | 0.682753 |
8b5e3f6c8aacd56928face756eefb3dacd6e28f5 | 222 | py | Python | test/input/061.py | EliRibble/pyfmt | e84a5531a7c06703eddd9dbc2072b0c8deae8c57 | [
"MIT"
] | null | null | null | test/input/061.py | EliRibble/pyfmt | e84a5531a7c06703eddd9dbc2072b0c8deae8c57 | [
"MIT"
] | null | null | null | test/input/061.py | EliRibble/pyfmt | e84a5531a7c06703eddd9dbc2072b0c8deae8c57 | [
"MIT"
] | null | null | null | def frobulate(bar=None, bif=None, fiz=None):
print(bar, bif, fiz)
frobulate(
bif="So we can suppress the horizontal layout",
bar="This needs to be a really long line",
fiz="And test the alpha ordering",
)
| 24.666667 | 51 | 0.675676 |
a947ee64e8a03175267865488129ee24186ef322 | 3,866 | py | Python | demo/polarization_optimization/polarization_optimizer.py | wi11dey/pylabnet | a6e3362f727c45aaa60e61496e858ae92e85574d | [
"MIT"
] | 10 | 2020-01-07T23:28:49.000Z | 2022-02-02T19:09:17.000Z | demo/polarization_optimization/polarization_optimizer.py | wi11dey/pylabnet | a6e3362f727c45aaa60e61496e858ae92e85574d | [
"MIT"
] | 249 | 2019-12-28T19:38:49.000Z | 2022-03-28T16:45:32.000Z | demo/polarization_optimization/polarization_optimizer.py | wi11dey/pylabnet | a6e3362f727c45aaa60e61496e858ae92e85574d | [
"MIT"
] | 5 | 2020-11-17T19:45:10.000Z | 2022-01-04T18:07:04.000Z | import ctypes
import pyvisa
from pylabnet.utils.logging.logger import LogClient
from pylabnet.network.core.generic_server import GenericServer
#from pylabnet.network.client_server.pol_paddles import Client
from pylabnet.hardware.power_meter.thorlabs_pm320e import Driver
from pylabnet.hardware.polarization.polarization_... | 31.950413 | 158 | 0.668132 |
b52873f623583fc982c0b9a8d25e310302db8fc4 | 4,952 | py | Python | SimVascular-master/Python/site-packages/sv_ml/sv_wrapper.py | mccsssk2/SimVascularPM3_March2020 | 3cce6cc7be66545bea5dc3915a2db50a3892bf04 | [
"BSD-3-Clause"
] | null | null | null | SimVascular-master/Python/site-packages/sv_ml/sv_wrapper.py | mccsssk2/SimVascularPM3_March2020 | 3cce6cc7be66545bea5dc3915a2db50a3892bf04 | [
"BSD-3-Clause"
] | null | null | null | SimVascular-master/Python/site-packages/sv_ml/sv_wrapper.py | mccsssk2/SimVascularPM3_March2020 | 3cce6cc7be66545bea5dc3915a2db50a3892bf04 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) Stanford University, The Regents of the University of
# California, and others.
#
# All Rights Reserved.
#
# See Copyright-SimVascular.txt for additional details.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentatio... | 33.917808 | 84 | 0.656906 |
da7aa1c9c58740c8021912e8dbe9b9f2c4137b1c | 1,787 | py | Python | tests/test_window_message.py | Perlence/EmbedPython.ahk | 17ecfbc41757e5ba5008dcd157d1528d7b57decd | [
"BSD-3-Clause"
] | 34 | 2020-10-29T10:09:56.000Z | 2022-03-25T02:04:20.000Z | tests/test_window_message.py | Perlence/EmbedPython.ahk | 17ecfbc41757e5ba5008dcd157d1528d7b57decd | [
"BSD-3-Clause"
] | 9 | 2021-02-16T05:59:31.000Z | 2022-02-16T08:13:14.000Z | tests/test_window_message.py | Perlence/EmbedPython.ahk | 17ecfbc41757e5ba5008dcd157d1528d7b57decd | [
"BSD-3-Clause"
] | 6 | 2021-02-15T14:40:00.000Z | 2022-01-02T17:07:53.000Z | import os
import sys
import pytest
import ahkpy as ahk
def test_on_message(request):
args = ()
@ahk.on_message(0x5555)
def handler(w_param, l_param, msg, hwnd):
nonlocal args
args = (w_param, l_param, msg, hwnd)
return 42
request.addfinalizer(handler.unregister)
win = ... | 23.207792 | 69 | 0.641298 |
ac175aa795892d23904392c8fcf615293ef7805d | 856 | py | Python | prices-python/plotdata.py | AndrewVetovitz/tendies | e8eed54db775727c28b664804f5d4f0c76c42a19 | [
"MIT"
] | null | null | null | prices-python/plotdata.py | AndrewVetovitz/tendies | e8eed54db775727c28b664804f5d4f0c76c42a19 | [
"MIT"
] | null | null | null | prices-python/plotdata.py | AndrewVetovitz/tendies | e8eed54db775727c28b664804f5d4f0c76c42a19 | [
"MIT"
] | null | null | null | import plotly.graph_objects as go
def plot(elements):
fig = go.Figure()
for elm in elements:
df = elm[0]
x = elm[1]
y = elm[2]
fig.add_scatter(x=df[x], y=df[y])
fig.update_xaxes(
rangeslider_visible=True,
rangeselector=dict(
butto... | 29.517241 | 96 | 0.418224 |
9c1399a5628e929d25b9df5c60c6fa6443681bce | 3,796 | py | Python | abroca/compute_abroca.py | VaibhavKaushik3220/abroca | 6dd11e83c089798738cfe2532716ba8585d1292a | [
"MIT"
] | null | null | null | abroca/compute_abroca.py | VaibhavKaushik3220/abroca | 6dd11e83c089798738cfe2532716ba8585d1292a | [
"MIT"
] | null | null | null | abroca/compute_abroca.py | VaibhavKaushik3220/abroca | 6dd11e83c089798738cfe2532716ba8585d1292a | [
"MIT"
] | 2 | 2020-10-27T00:54:34.000Z | 2021-08-16T17:37:39.000Z | from abroca.utils import *
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
import sklearn.metrics as metrics
from scipy import interpolate
from scipy import integrate
import matplotlib.pyplot as plt
from sklearn import preprocessing
def compute_abroca(
df,
pred_col,... | 37.584158 | 135 | 0.694679 |
81acf163623e498f705d4aeb3bdf5b0e350f3364 | 49,356 | py | Python | odoo-13.0/venv/lib/python3.8/site-packages/reportlab/lib/utils.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | 12 | 2019-08-02T07:58:16.000Z | 2022-01-31T23:45:08.000Z | odoo-13.0/venv/lib/python3.8/site-packages/reportlab/lib/utils.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | 10 | 2019-12-26T17:31:31.000Z | 2022-03-21T22:17:33.000Z | odoo-13.0/venv/lib/python3.8/site-packages/reportlab/lib/utils.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | 11 | 2019-07-31T16:23:36.000Z | 2022-01-29T08:30:07.000Z | #Copyright ReportLab Europe Ltd. 2000-2017
#see license.txt for license details
# $URI:$
__version__='3.3.0'
__doc__='''Gazillions of miscellaneous internal utility functions'''
import os, sys, time, types, datetime
from base64 import decodestring as base64_decodestring, encodestring as base64_encodestring
from report... | 32.492429 | 181 | 0.55045 |
d4ae762b18c3ef73941f565dc75589b5afc88783 | 2,087 | py | Python | KFold_lightgbm.py | raph-m/safe_driver_prediction | a4963c59b0941e23fcc90f5db8e0dbf10bfcc3f4 | [
"MIT"
] | null | null | null | KFold_lightgbm.py | raph-m/safe_driver_prediction | a4963c59b0941e23fcc90f5db8e0dbf10bfcc3f4 | [
"MIT"
] | 15 | 2020-01-28T22:21:40.000Z | 2022-03-11T23:19:31.000Z | KFold_lightgbm.py | raph-m/safe_driver_prediction | a4963c59b0941e23fcc90f5db8e0dbf10bfcc3f4 | [
"MIT"
] | 1 | 2018-02-28T15:10:43.000Z | 2018-02-28T15:10:43.000Z | #import time
import lightgbm as lgb
import numpy as np
import pandas as pd
from sklearn.model_selection import KFold
from util import gini_lgbm
from preprocessing import preproc
####################### Data Preprocessing #####################
# Importing the dataset
dataset_train = pd.read_csv('train.csv')
# Impor... | 28.589041 | 117 | 0.655486 |
243190a82fc46f8e14b2a235cc744574eb2e543f | 22,868 | py | Python | manila/tests/share/test_share_types.py | openstack/manila | 1ebae738c235c6f1874ac7b11307e0d5fb567dba | [
"Apache-2.0"
] | 159 | 2015-01-02T09:35:15.000Z | 2022-01-04T11:51:34.000Z | manila/tests/share/test_share_types.py | openstack/manila | 1ebae738c235c6f1874ac7b11307e0d5fb567dba | [
"Apache-2.0"
] | 5 | 2015-07-24T09:28:21.000Z | 2020-11-20T04:33:51.000Z | manila/tests/share/test_share_types.py | openstack/manila | 1ebae738c235c6f1874ac7b11307e0d5fb567dba | [
"Apache-2.0"
] | 128 | 2015-01-05T22:52:28.000Z | 2021-12-29T14:00:58.000Z | # Copyright 2015 Deutsche Telekom AG. All rights reserved.
# Copyright 2015 Tom Barron. All rights reserved.
# Copyright 2015 Mirantis, 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... | 39.157534 | 78 | 0.600883 |
d12faa71f36a8724ea06ad14a72bf4b9d4b1540b | 19,355 | py | Python | utils.py | zhenhao-huang/CPM-1-Finetune-Text-Generation | 22e0595bea7807d8cd8cb3af8ad6ec4679ca253d | [
"MIT"
] | 5 | 2021-07-06T11:34:11.000Z | 2022-01-20T07:15:38.000Z | utils.py | zhenhao-huang/CPM-1-Finetune-Text-Generation | 22e0595bea7807d8cd8cb3af8ad6ec4679ca253d | [
"MIT"
] | 3 | 2021-10-13T15:28:09.000Z | 2022-01-26T16:23:15.000Z | utils.py | zhenhao-huang/CPM-1-Finetune-Text-Generation | 22e0595bea7807d8cd8cb3af8ad6ec4679ca253d | [
"MIT"
] | null | null | null | # coding=utf-8
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | 34.624329 | 160 | 0.618032 |
58889e56a40a3625fffb550cb3017c8b99833f75 | 15,817 | py | Python | images/hub/jupyterhub_config.py | danielballan/zero-to-jupyterhub-k8s | 016c33dc29be11771fe9b7cd165076b0be81f0d4 | [
"BSD-3-Clause"
] | null | null | null | images/hub/jupyterhub_config.py | danielballan/zero-to-jupyterhub-k8s | 016c33dc29be11771fe9b7cd165076b0be81f0d4 | [
"BSD-3-Clause"
] | null | null | null | images/hub/jupyterhub_config.py | danielballan/zero-to-jupyterhub-k8s | 016c33dc29be11771fe9b7cd165076b0be81f0d4 | [
"BSD-3-Clause"
] | null | null | null | import os
import glob
from tornado.httpclient import AsyncHTTPClient
from kubernetes import client
from z2jh import get_config, get_secret, set_config_if_not_none
# Configure JupyterHub to use the curl backend for making HTTP requests,
# rather than the pure-python implementations. The default one starts
# being too ... | 43.334247 | 136 | 0.714674 |
9fb452dad49f4661215deb05c956c72717a3b3ac | 11,443 | py | Python | examples/mnist_pruning.py | rushic24/dm-haiku | 8ee1a2125587831783ae7ae1e74baacec23ae56d | [
"Apache-2.0"
] | null | null | null | examples/mnist_pruning.py | rushic24/dm-haiku | 8ee1a2125587831783ae7ae1e74baacec23ae56d | [
"Apache-2.0"
] | null | null | null | examples/mnist_pruning.py | rushic24/dm-haiku | 8ee1a2125587831783ae7ae1e74baacec23ae56d | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 DeepMind Technologies Limited. 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 ... | 37.890728 | 80 | 0.709342 |
bdc393531921c403dd959d7ce135daa801e6b900 | 1,680 | py | Python | profiles_api/models.py | pyvonpyton/profiles-rest-api | 831d509c6a7da93422a9bb7e86a579684b54e13c | [
"MIT"
] | null | null | null | profiles_api/models.py | pyvonpyton/profiles-rest-api | 831d509c6a7da93422a9bb7e86a579684b54e13c | [
"MIT"
] | null | null | null | profiles_api/models.py | pyvonpyton/profiles-rest-api | 831d509c6a7da93422a9bb7e86a579684b54e13c | [
"MIT"
] | null | null | null |
from django.db import models
from django.contrib.auth.models import AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
from django.contrib.auth.models import BaseUserManager
# Create your models here.
class UserProfileManager(BaseUserManager):
"""Manager for user Profiles"""
def creat... | 28 | 64 | 0.673214 |
fa689f858e6451005849d131a10ffabc096ca4b7 | 50,627 | py | Python | plenum/common/ledger_manager.py | rhzs/indy-plenum | a1ee6f3d081e802b404637026dc6f8ef3ec82a40 | [
"Apache-2.0"
] | null | null | null | plenum/common/ledger_manager.py | rhzs/indy-plenum | a1ee6f3d081e802b404637026dc6f8ef3ec82a40 | [
"Apache-2.0"
] | null | null | null | plenum/common/ledger_manager.py | rhzs/indy-plenum | a1ee6f3d081e802b404637026dc6f8ef3ec82a40 | [
"Apache-2.0"
] | 1 | 2020-01-24T09:36:13.000Z | 2020-01-24T09:36:13.000Z | import heapq
import math
import operator
import time
from collections import Callable, Counter
from functools import partial
from random import shuffle
from typing import Any, List, Dict, Tuple
from typing import Optional
from ledger.merkle_verifier import MerkleVerifier
from ledger.util import F
from plenum.common.co... | 44.605286 | 92 | 0.586505 |
318850ada968e978e2c504b52c1ba8aba61a0490 | 15,993 | py | Python | src/timetabling/aperiodic/robustness-evaluation/robtim/opt/ean_generator.py | railtoolkit/OpenLinTim | 27eba8b6038946ce162e9f7bbc0bd23045029d51 | [
"MIT"
] | null | null | null | src/timetabling/aperiodic/robustness-evaluation/robtim/opt/ean_generator.py | railtoolkit/OpenLinTim | 27eba8b6038946ce162e9f7bbc0bd23045029d51 | [
"MIT"
] | null | null | null | src/timetabling/aperiodic/robustness-evaluation/robtim/opt/ean_generator.py | railtoolkit/OpenLinTim | 27eba8b6038946ce162e9f7bbc0bd23045029d51 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__all__ = [
"EANGenerator",
"IncrementalSlackEANGenerator",
"IncreasingSlackEANGenerator",
"GiveTheRichEANGenerator",
"GiveTheRichWeightedEANGenerator",
]
import operator
from robtim import Dataset, LinTimCSVWriter
class EAN... | 48.317221 | 152 | 0.60514 |
3f2ff98f369763346d0f1298e7b7035beee5c7ae | 127 | py | Python | napari/_vispy/image.py | danielballan/napari | 9963d6bf52971f8f240b507be206ec682487fb4a | [
"BSD-3-Clause"
] | null | null | null | napari/_vispy/image.py | danielballan/napari | 9963d6bf52971f8f240b507be206ec682487fb4a | [
"BSD-3-Clause"
] | null | null | null | napari/_vispy/image.py | danielballan/napari | 9963d6bf52971f8f240b507be206ec682487fb4a | [
"BSD-3-Clause"
] | null | null | null | from .vendored import ImageVisual
from vispy.scene.visuals import create_visual_node
Image = create_visual_node(ImageVisual)
| 21.166667 | 50 | 0.850394 |
a45ff0092898190f1810d88af6b4fb85691fcbc3 | 314 | py | Python | test/a.py | WenHao0804/my-vim-translator | 8a4c52f4d9830537d06ab533fdafe7743d8b635a | [
"MIT"
] | null | null | null | test/a.py | WenHao0804/my-vim-translator | 8a4c52f4d9830537d06ab533fdafe7743d8b635a | [
"MIT"
] | null | null | null | test/a.py | WenHao0804/my-vim-translator | 8a4c52f4d9830537d06ab533fdafe7743d8b635a | [
"MIT"
] | null | null | null | #coding=utf-8
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--type', action='store', default='en2ch')
parser.add_argument('--content', action='store', default='')
parser.add_argument('--engine', action='store', default='aiciba')
args = parser.parse_args()
print(args)
print(args.content)
| 31.4 | 65 | 0.742038 |
389283abd0d0030d9c45ce69b18f1b58f5538864 | 4,808 | py | Python | apps/demo/streamlit_app/composer/appfactory.py | sugatoray/genespeak | c3f57ad9fbedd5845fd279adcd83826b9a32e952 | [
"MIT"
] | 5 | 2022-01-16T12:12:09.000Z | 2022-03-11T23:17:43.000Z | apps/demo/streamlit_app/composer/appfactory.py | sugatoray/genespeak | c3f57ad9fbedd5845fd279adcd83826b9a32e952 | [
"MIT"
] | 3 | 2022-01-21T05:00:18.000Z | 2022-01-30T10:00:30.000Z | apps/demo/streamlit_app/composer/appfactory.py | sugatoray/genespeak | c3f57ad9fbedd5845fd279adcd83826b9a32e952 | [
"MIT"
] | null | null | null | from textwrap import dedent
from typing import Dict, Tuple
import streamlit as st
from composer import utils as U
from composer import visualization as V
Defaults = U.Defaults
__all__ = [
"setup_app",
"setup_preamble",
"setup_sidebar",
]
def setup_sidebar() -> Tuple[Dict, Dict]:
with st.sidebar:
... | 36.424242 | 158 | 0.601498 |
fb8342b5f26268488655a1946502baea97d68570 | 12,336 | py | Python | publisher/admin.py | svleeuwen/django-model-publisher | 15a3aaf8e26c54c36a91be66cce7cc19fb27d687 | [
"BSD-3-Clause"
] | null | null | null | publisher/admin.py | svleeuwen/django-model-publisher | 15a3aaf8e26c54c36a91be66cce7cc19fb27d687 | [
"BSD-3-Clause"
] | null | null | null | publisher/admin.py | svleeuwen/django-model-publisher | 15a3aaf8e26c54c36a91be66cce7cc19fb27d687 | [
"BSD-3-Clause"
] | null | null | null | import json
import django
from django.contrib.admin import ModelAdmin, SimpleListFilter
from django.contrib import messages
from django.conf.urls import url
from django.core.exceptions import PermissionDenied
try:
from django.urls import reverse
except ImportError:
# django < 1.10
from django.core.urlresol... | 34.362117 | 99 | 0.625973 |
e8ec1996569b85d3c3beafad797c7f34395bbea1 | 1,335 | py | Python | tests/integration/deciders/test_05.py | EpicWink/floto | eb0d93d032b5e14e304e350cee28f27cfe735b73 | [
"MIT"
] | 43 | 2016-02-29T17:44:57.000Z | 2021-12-28T00:41:47.000Z | tests/integration/deciders/test_05.py | EpicWink/floto | eb0d93d032b5e14e304e350cee28f27cfe735b73 | [
"MIT"
] | 9 | 2016-02-29T23:38:36.000Z | 2016-09-02T21:48:00.000Z | tests/integration/deciders/test_05.py | EpicWink/floto | eb0d93d032b5e14e304e350cee28f27cfe735b73 | [
"MIT"
] | 10 | 2016-02-29T16:53:09.000Z | 2018-12-12T00:06:08.000Z | import uuid
from test_helper import get_result
import floto
import floto.api
import floto.decider
from floto.specs import DeciderSpec
from floto.specs.task import ActivityTask
def test_05():
domain = 'floto_test'
rs = floto.specs.retry_strategy.InstantRetry(retries=8)
activity_task = ActivityTask(domain... | 35.131579 | 87 | 0.614981 |
df4c7be398ddfa442cec4d08d3ff6dd6c438dfff | 2,051 | py | Python | AppData/AppConfig.py | thekoc/ginkgo-sql-gui | f5f2523df42d505ffdc06b3a1b80dba4181c7b83 | [
"Apache-2.0"
] | null | null | null | AppData/AppConfig.py | thekoc/ginkgo-sql-gui | f5f2523df42d505ffdc06b3a1b80dba4181c7b83 | [
"Apache-2.0"
] | null | null | null | AppData/AppConfig.py | thekoc/ginkgo-sql-gui | f5f2523df42d505ffdc06b3a1b80dba4181c7b83 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*
import ConfigParser
import os
import threading
import sys
# path = os.path.abspath(__file__)
# dir_path = os.path.dirname(path)
if getattr(sys, 'frozen', False):
os.chdir(sys._MEIPASS)
class AppConfig(object):
file_path = 'app.cfg'
lock = threading.Lock()
def _... | 25.962025 | 59 | 0.556314 |
b4bee6aeaf401e12968e6974a0ac390aaaef01ed | 6,024 | py | Python | utils/datasets.py | kingwang1995/fast-vehicle-detection | 270e93b80abc00bb45b45d44e78ddd6f2e099f14 | [
"MIT"
] | null | null | null | utils/datasets.py | kingwang1995/fast-vehicle-detection | 270e93b80abc00bb45b45d44e78ddd6f2e099f14 | [
"MIT"
] | null | null | null | utils/datasets.py | kingwang1995/fast-vehicle-detection | 270e93b80abc00bb45b45d44e78ddd6f2e099f14 | [
"MIT"
] | null | null | null | import glob
import random
import os
import sys
import numpy as np
from PIL import Image
import torch
import torch.nn.functional as F
from utils.augmentations import augment
from torch.utils.data import Dataset
import torchvision.transforms as transforms
# 图像的转换流程:PIL→numpy→pad→transform→tensor
# 对numpy格式的img进行paddi... | 33.281768 | 122 | 0.598606 |
5b1b5aa309012c459bf7c7c6d1812e5cdcaf41ff | 1,922 | py | Python | datahub/activity_stream/serializers.py | alixedi/data-hub-api-cd-poc | a5e5ea45bb496c0d2a06635864514af0c7d4291a | [
"MIT"
] | null | null | null | datahub/activity_stream/serializers.py | alixedi/data-hub-api-cd-poc | a5e5ea45bb496c0d2a06635864514af0c7d4291a | [
"MIT"
] | null | null | null | datahub/activity_stream/serializers.py | alixedi/data-hub-api-cd-poc | a5e5ea45bb496c0d2a06635864514af0c7d4291a | [
"MIT"
] | null | null | null | from rest_framework import serializers
class ActivitySerializer(serializers.Serializer):
"""
Generic serializer for activity.
Implements methods for serializing objects that are common across
activity stream serializers.
"""
def _get_company(self, company):
"""
Get a serializ... | 29.569231 | 71 | 0.555671 |
66b34335ee407e2b3e64b9392eb58ca74ef0a2e0 | 23,714 | py | Python | scvi/external/gimvi/_model.py | Koncopd/scvi-tools | 5496b993b07e94ac4a6f111589d61a34154bb126 | [
"BSD-3-Clause"
] | 398 | 2017-10-11T06:19:23.000Z | 2020-09-14T02:46:25.000Z | scvi/external/gimvi/_model.py | Koncopd/scvi-tools | 5496b993b07e94ac4a6f111589d61a34154bb126 | [
"BSD-3-Clause"
] | 708 | 2017-11-13T14:51:21.000Z | 2020-09-16T21:09:19.000Z | scvi/external/gimvi/_model.py | Koncopd/scvi-tools | 5496b993b07e94ac4a6f111589d61a34154bb126 | [
"BSD-3-Clause"
] | 154 | 2017-10-16T06:53:59.000Z | 2020-09-11T23:06:30.000Z | import logging
import os
import warnings
from itertools import cycle
from typing import List, Optional, Union
import numpy as np
import torch
from anndata import AnnData
from torch.utils.data import DataLoader
from scvi import REGISTRY_KEYS
from scvi.data import AnnDataManager
from scvi.data._compat import registry_f... | 35.028065 | 115 | 0.583115 |
c1b92c4cf27feb17c5ee1ffe5d0ffb9d6ae97c98 | 7,403 | py | Python | snakemake/remote/EGA.py | Maarten0110/snakemake | ccddf98521774bb7a6662c3a0b0b8dcf6e8a31de | [
"MIT"
] | null | null | null | snakemake/remote/EGA.py | Maarten0110/snakemake | ccddf98521774bb7a6662c3a0b0b8dcf6e8a31de | [
"MIT"
] | null | null | null | snakemake/remote/EGA.py | Maarten0110/snakemake | ccddf98521774bb7a6662c3a0b0b8dcf6e8a31de | [
"MIT"
] | null | null | null | __author__ = "Johannes Köster"
__copyright__ = "Copyright 2022, Johannes Köster"
__email__ = "johannes.koester@tu-dortmund.de"
__license__ = "MIT"
import os
import json
import time
import uuid
from collections import namedtuple
import hashlib
import requests
from requests.auth import HTTPBasicAuth
from snakemake.re... | 29.730924 | 94 | 0.548967 |
3fdcba54169cce308798c2ce6783a824a96079a5 | 21,758 | py | Python | jni-build/jni/include/tensorflow/python/framework/tensor_util_test.py | rcelebi/android-elfali | 4ea14a58a18356ef9e16aba2e7dae84c02afba12 | [
"Apache-2.0"
] | 680 | 2016-12-03T14:38:28.000Z | 2022-02-16T04:06:45.000Z | tensorflow/python/framework/tensor_util_test.py | alainrk/tensorflow | 314d9cd9b607460f8bfea80fc828b1521ca18443 | [
"Apache-2.0"
] | 38 | 2016-11-17T08:43:51.000Z | 2019-11-12T12:27:04.000Z | tensorflow/python/framework/tensor_util_test.py | alainrk/tensorflow | 314d9cd9b607460f8bfea80fc828b1521ca18443 | [
"Apache-2.0"
] | 250 | 2016-12-05T10:37:17.000Z | 2022-03-18T21:26:55.000Z | # Copyright 2015 The TensorFlow 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 applica... | 36.082919 | 119 | 0.626758 |
53cfdbdc033c3851a00496cc54094486c0c42b00 | 892 | gyp | Python | chrome/browser/resources/settings/privacy_page/compiled_resources2.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | chrome/browser/resources/settings/privacy_page/compiled_resources2.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chrome/browser/resources/settings/privacy_page/compiled_resources2.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'privacy_page_browser_proxy',
'dependencies': [
'<(DEPTH)/ui/webui/resources/js/compiled_resources2.... | 34.307692 | 83 | 0.639013 |
797114dc66a715efe9ae180d3e041e0834637aa9 | 421 | py | Python | blog/migrations/0004_auto_20200419_1049.py | ekesel/gyanism | deaeba2f61be23927b51f955d290685b56db3558 | [
"Apache-2.0"
] | 2 | 2021-04-14T18:01:12.000Z | 2021-09-05T13:53:09.000Z | blog/migrations/0004_auto_20200419_1049.py | ekesel/gyanism | deaeba2f61be23927b51f955d290685b56db3558 | [
"Apache-2.0"
] | null | null | null | blog/migrations/0004_auto_20200419_1049.py | ekesel/gyanism | deaeba2f61be23927b51f955d290685b56db3558 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.9 on 2020-04-19 05:19
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0003_auto_20200418_1626'),
]
operations = [
migrations.AlterModelOptions(
name='post',
options={},
),
... | 19.136364 | 47 | 0.548694 |
8e1c0bcc603dc8d3bebcba04cec575144aa2e769 | 1,605 | py | Python | basisopt/opt/preconditioners.py | robashaw/basisopt | c02fd307bc72c576ed298ea14648818b237d2f30 | [
"MIT"
] | 4 | 2022-03-23T09:22:54.000Z | 2022-03-26T13:18:45.000Z | basisopt/opt/preconditioners.py | robashaw/basisopt | c02fd307bc72c576ed298ea14648818b237d2f30 | [
"MIT"
] | null | null | null | basisopt/opt/preconditioners.py | robashaw/basisopt | c02fd307bc72c576ed298ea14648818b237d2f30 | [
"MIT"
] | 1 | 2022-03-23T09:22:54.000Z | 2022-03-23T09:22:54.000Z | # preconditioners, needs expanding
import numpy as np
def inverse(inv_func):
"""Decorator that adds an inverse function as an attribute
All preconditioners must be decorated with an inverse,
which should usually have the same signature as the parent.
Arguments:
inv_func (func)... | 27.672414 | 69 | 0.595639 |
7b4d138548c359d502cbe8e802821c0ac40b2b16 | 904 | py | Python | testing/scipy_distutils-0.3.3_34.586/scipy_distutils_version.py | fireballpoint1/fortranTOpy | 55843a62c6f0a2f8e2a777ef70193940d3d2d141 | [
"Apache-2.0"
] | 1 | 2018-08-26T05:10:56.000Z | 2018-08-26T05:10:56.000Z | testing/scipy_distutils-0.3.3_34.586/scipy_distutils_version.py | fireballpoint1/fortranTOpy | 55843a62c6f0a2f8e2a777ef70193940d3d2d141 | [
"Apache-2.0"
] | null | null | null | testing/scipy_distutils-0.3.3_34.586/scipy_distutils_version.py | fireballpoint1/fortranTOpy | 55843a62c6f0a2f8e2a777ef70193940d3d2d141 | [
"Apache-2.0"
] | 1 | 2018-06-26T18:06:44.000Z | 2018-06-26T18:06:44.000Z | major = 0
minor = 3
micro = 3
#release_level = 'alpha'
release_level = ''
try:
from __cvs_version__ import cvs_version
cvs_minor = cvs_version[-3]
cvs_serial = cvs_version[-1]
except ImportError,msg:
cvs_minor = 0
cvs_serial = 0
if cvs_minor or cvs_serial:
if release_level:
scipy_distut... | 32.285714 | 84 | 0.551991 |
fcc08dbddf72a9cb32e566f959912ee342304156 | 209 | py | Python | setup.py | ryanxjhan/AI-Space-Invader | 256365ca5e55af93fdf6db45d604d08aa4fad905 | [
"MIT"
] | null | null | null | setup.py | ryanxjhan/AI-Space-Invader | 256365ca5e55af93fdf6db45d604d08aa4fad905 | [
"MIT"
] | null | null | null | setup.py | ryanxjhan/AI-Space-Invader | 256365ca5e55af93fdf6db45d604d08aa4fad905 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from distutils.core import setup
setup(
name='DeepRL Project 2',
version='1.0',
description='Library for Deep Reinforcement Learning Project 2',
packages=['deeprl_p2'])
| 20.9 | 68 | 0.698565 |
f968c4bf3b38492907160dc840e929802afe6a0c | 4,201 | py | Python | onnxruntime/test/python/onnx_backend_test_series.py | hwangdeyu/onnxruntime | 989fe2498f4dd0beaf1b4324bf74a39abaf86a29 | [
"MIT"
] | 1 | 2020-10-13T08:53:44.000Z | 2020-10-13T08:53:44.000Z | onnxruntime/test/python/onnx_backend_test_series.py | harish-kamath/onnxruntime_vw | 2c731cbf5aceb42182f1b40183a4e18d12a832c7 | [
"MIT"
] | null | null | null | onnxruntime/test/python/onnx_backend_test_series.py | harish-kamath/onnxruntime_vw | 2c731cbf5aceb42182f1b40183a4e18d12a832c7 | [
"MIT"
] | 1 | 2020-07-24T13:15:31.000Z | 2020-07-24T13:15:31.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import argparse
import json
import sys
import os
import platform
import unittest
import onnx
import onnx.backend.test
import numpy as np
import onnxruntime.backend as c2
pytest_plugins = 'onnx.backend.test.report',
class ... | 36.530435 | 136 | 0.679124 |
3a0c948e7d86fd14061ae67e5f1bad8c51cc06ab | 360 | py | Python | 7day/re/Re14.py | jsjang93/joony | 62f7a325094c887212b894932263bf84500e0f03 | [
"MIT"
] | null | null | null | 7day/re/Re14.py | jsjang93/joony | 62f7a325094c887212b894932263bf84500e0f03 | [
"MIT"
] | null | null | null | 7day/re/Re14.py | jsjang93/joony | 62f7a325094c887212b894932263bf84500e0f03 | [
"MIT"
] | null | null | null | import re
print(re.search("\d","우기는 1994년에 입대하였습니다"))
print(re.search("\d+","우기는 1994년에 입대하였습니다"))
print(re.match("\d+","우기는 1994년에 입대하였습니다"))
print(re.match("\d+","1994년에 우기는 입대하였습니다"))
print(re.findall("\d+","우기는 1994년에 5월 31에 입대하였습니다"))
print(re.split("[:]+","사과 귤 : 포도 토마토"))
print(re.split("[: ]+","사과 귤 : 포도 토마토"))... | 36 | 52 | 0.616667 |
426137f3c83952c8d8e70cb0ef073e2146332cc9 | 686 | py | Python | start.py | materialscloud-org/mc-epfl | 926ccd9adacd9c82fd29780b6916383669837b13 | [
"MIT"
] | null | null | null | start.py | materialscloud-org/mc-epfl | 926ccd9adacd9c82fd29780b6916383669837b13 | [
"MIT"
] | 5 | 2018-01-10T10:38:54.000Z | 2018-06-07T11:09:55.000Z | start.py | materialscloud-org/mc-epfl | 926ccd9adacd9c82fd29780b6916383669837b13 | [
"MIT"
] | 1 | 2018-10-30T18:00:38.000Z | 2018-10-30T18:00:38.000Z | import ipywidgets as ipw
def get_start_widget(appbase, jupbase, notebase):
#http://fontawesome.io/icons/
template = """
<table>
<tr>
<th style="text-align:center"></th>
<th style="width:70px" rowspan=2></th>
<th style="text-align:center"></th>
<tr>
<td valign="top"><ul>
... | 25.407407 | 83 | 0.59621 |
5e61185f2dd27685a70d16a423bfc01947057639 | 987 | py | Python | internal/handlers/unitedkingdom2.py | fillingthemoon/cartogram-web | 58b645bca0c22b9bccdb2a5a8213a5a24a7e5958 | [
"MIT"
] | null | null | null | internal/handlers/unitedkingdom2.py | fillingthemoon/cartogram-web | 58b645bca0c22b9bccdb2a5a8213a5a24a7e5958 | [
"MIT"
] | 20 | 2019-10-20T11:27:38.000Z | 2022-03-12T00:28:17.000Z | internal/handlers/unitedkingdom2.py | fillingthemoon/cartogram-web | 58b645bca0c22b9bccdb2a5a8213a5a24a7e5958 | [
"MIT"
] | 16 | 2019-08-22T04:49:44.000Z | 2021-06-09T04:44:57.000Z | import settings
import handlers.base_handler
import csv
class CartogramHandler(handlers.base_handler.BaseCartogramHandler):
def get_name(self):
return "United Kingdom"
def get_gen_file(self):
return "{}/gbr_processedmap.json".format(settings.CARTOGRAM_DATA_DIR)
def validate_values(se... | 27.416667 | 224 | 0.630193 |
a1daa8a21ea2600ebd818c7f4e90a8499e0e4818 | 3,357 | py | Python | sbr/elements.py | mortenbruhn/convert-to-sbr-xml | 3092b4a2bff49eed256561f39e30b326cc880013 | [
"MIT"
] | 1 | 2018-06-17T14:39:04.000Z | 2018-06-17T14:39:04.000Z | sbr/elements.py | mortenbruhn/convert-to-sbr-xml | 3092b4a2bff49eed256561f39e30b326cc880013 | [
"MIT"
] | null | null | null | sbr/elements.py | mortenbruhn/convert-to-sbr-xml | 3092b4a2bff49eed256561f39e30b326cc880013 | [
"MIT"
] | 1 | 2021-08-18T12:03:52.000Z | 2021-08-18T12:03:52.000Z | from tree.elements import Node
class _Collection(Node):
_required_attributes = {"backup_set", "backup_date"}
def calculated_attributes(self):
return {'count': len(self._children)}
def append(self, event):
self._children.append(event)
def extend(self, events):
self._children.extend(events)
def... | 26.433071 | 361 | 0.680369 |
9a480a7bbfae0aea3be2b035163aca9091a3215d | 794 | py | Python | venv/bin/rst2odt.py | ssenti/grapeful | 5094b027a5390df4bf5ac4c7408059c7bc8c8b5f | [
"MIT"
] | null | null | null | venv/bin/rst2odt.py | ssenti/grapeful | 5094b027a5390df4bf5ac4c7408059c7bc8c8b5f | [
"MIT"
] | 1 | 2021-06-02T02:44:52.000Z | 2021-06-02T02:44:52.000Z | venv/bin/rst2odt.py | ssenti/grapeful | 5094b027a5390df4bf5ac4c7408059c7bc8c8b5f | [
"MIT"
] | null | null | null | #!/Users/jinhongkim/grapeful-yes/venv/bin/python
# $Id: rst2odt.py 5839 2009-01-07 19:09:28Z dkuhlman $
# Author: Dave Kuhlman <dkuhlman@rexx.com>
# Copyright: This module has been placed in the public domain.
"""
A front end to the Docutils Publisher, producing OpenOffice documents.
"""
import sys
try:
import l... | 25.612903 | 78 | 0.754408 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.