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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cc2735de3969163c2354cd50ba34baa9cf474865 | 2,799 | py | Python | test/functional/rpc_setban.py | adymoloca/flocoin | d9244577577dede975c852f6fcfe1afba4d71a57 | [
"MIT"
] | null | null | null | test/functional/rpc_setban.py | adymoloca/flocoin | d9244577577dede975c852f6fcfe1afba4d71a57 | [
"MIT"
] | null | null | null | test/functional/rpc_setban.py | adymoloca/flocoin | d9244577577dede975c852f6fcfe1afba4d71a57 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2020 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 setban rpc call."""
from test_framework.test_framework import FlocoinTestFramework
from test_... | 36.828947 | 96 | 0.652733 |
d7bde0e13dbaa70c982d0401e4b9fb25071dded4 | 1,736 | py | Python | setup.py | sergii-shcherbak/money-parser | fcccd72b2a4bc4e98a051b85fcb0c83cb3c82b5d | [
"Apache-2.0"
] | 27 | 2017-12-17T10:51:20.000Z | 2021-05-13T20:52:24.000Z | setup.py | sergii-shcherbak/money-parser | fcccd72b2a4bc4e98a051b85fcb0c83cb3c82b5d | [
"Apache-2.0"
] | null | null | null | setup.py | sergii-shcherbak/money-parser | fcccd72b2a4bc4e98a051b85fcb0c83cb3c82b5d | [
"Apache-2.0"
] | 11 | 2018-03-06T20:12:00.000Z | 2021-12-26T00:28:21.000Z | import re
import sys
import pathlib
from setuptools import setup
NAME = 'money-parser'
DESCRIPTION = 'Price and currency parsing utility'
URL = 'https://github.com/kserhii/money-parser'
AUTHOR = 'Serhii Kostel'
EMAIL = 'dodge.ksv@gmail.com'
# ------------------------------------------------
here = pathlib.Path(_... | 24.450704 | 83 | 0.637097 |
cc3b1de82ad9581acdd190191b19aaf4f52a92ea | 876 | py | Python | 1267-count-servers-that-communicate.py | daicang/Leetcode | 676b05c1222670f73294eb2ed2665433eac148f4 | [
"MIT"
] | null | null | null | 1267-count-servers-that-communicate.py | daicang/Leetcode | 676b05c1222670f73294eb2ed2665433eac148f4 | [
"MIT"
] | null | null | null | 1267-count-servers-that-communicate.py | daicang/Leetcode | 676b05c1222670f73294eb2ed2665433eac148f4 | [
"MIT"
] | null | null | null | class Solution(object):
def countServers(self, grid):
"""
:type grid: List[List[int]]
:rtype: int
"""
if not grid or not grid[0]:
return 0
rows = [0] * len(grid)
cols = [0] * len(grid[1])
for row_id, row in enumerate(grid):
fo... | 22.461538 | 60 | 0.432648 |
5d285924f4fadb3df0b57159b3f01582598311fe | 197 | py | Python | requests.py | aryan7781/GeeksFiestaAI-ML-Team-7- | 8561fdeacca6a57e9f01ae8472663e1fab2329ec | [
"MIT"
] | 3 | 2021-09-22T18:20:47.000Z | 2021-09-23T15:04:07.000Z | requests.py | SouravBiswal/GeeksFiestaAI-ML-Team-7--1 | 9b21aaa678b707daaea09f9680b6b5199428e00b | [
"MIT"
] | null | null | null | requests.py | SouravBiswal/GeeksFiestaAI-ML-Team-7--1 | 9b21aaa678b707daaea09f9680b6b5199428e00b | [
"MIT"
] | 2 | 2021-09-11T15:13:18.000Z | 2021-09-22T18:04:32.000Z | import requests
url = 'http://localhost:5000/predict_api'
r = requests.post(url,json={
'Temperature':15.6,
'Pressure':1005.2,
'Rain':0.59,
'Wind_Speed':1.3,
})
print(r.json()) | 17.909091 | 41 | 0.614213 |
40ebc9f0f1663a79f3fade2bbbf413ed5c7b9247 | 14,255 | py | Python | locust/main.py | mohdaminyuddin/locust | 3af34a341b0f0cbd806d072af42ab94c05ea0ced | [
"MIT"
] | 1 | 2017-05-26T04:26:14.000Z | 2017-05-26T04:26:14.000Z | locust/main.py | mohdaminyuddin/locust | 3af34a341b0f0cbd806d072af42ab94c05ea0ced | [
"MIT"
] | null | null | null | locust/main.py | mohdaminyuddin/locust | 3af34a341b0f0cbd806d072af42ab94c05ea0ced | [
"MIT"
] | null | null | null | import locust
import runners
import gevent
import sys
import os
import signal
import inspect
import logging
import socket
from optparse import OptionParser
import web
from log import setup_logging, console_logger
from stats import stats_printer, print_percentile_stats, print_error_report, print_stats
from inspectlocu... | 31.607539 | 228 | 0.614521 |
24f1f34afd9438512c1c150eee59db8fd726c935 | 268 | py | Python | pydenji/userproperties/cmdline.py | alanfranz/pydenji | a922f1456e0d698b3e9e0674d980ede746fc2835 | [
"Apache-2.0"
] | null | null | null | pydenji/userproperties/cmdline.py | alanfranz/pydenji | a922f1456e0d698b3e9e0674d980ede746fc2835 | [
"Apache-2.0"
] | null | null | null | pydenji/userproperties/cmdline.py | alanfranz/pydenji | a922f1456e0d698b3e9e0674d980ede746fc2835 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (C) 2010 Alan Franzoni.
#
# Commandline integration for property mapping.
class CommandLinePropertyParser(object):
def parse(self, arglist):
return [ arg[3:] for arg in arglist if arg.startswith("-PD") ]
| 20.615385 | 70 | 0.66791 |
ea936c00981123822ae50a57d7b1d7910f9c36b5 | 2,222 | py | Python | docs/make_readme.py | phljcb/tcconfig | 78d6adb35f08201bac589d6b16f22b73d4cb951d | [
"MIT"
] | null | null | null | docs/make_readme.py | phljcb/tcconfig | 78d6adb35f08201bac589d6b16f22b73d4cb951d | [
"MIT"
] | null | null | null | docs/make_readme.py | phljcb/tcconfig | 78d6adb35f08201bac589d6b16f22b73d4cb951d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import unicode_literals
import sys
import readmemaker
from path import Path
PROJECT_NAME = "tcconfig"
OUTPUT_DIR = ".."
def write_examples(maker):
maker.set_indent_level(0)
mak... | 27.775 | 90 | 0.70387 |
25551eee9be05a2a346a64afcdb529c5439ada3b | 8,711 | py | Python | lib/spack/spack/platforms/cray.py | E3SM-Project/spack | ce8f78dea5a7a7098d71632f8981d307e91567d5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | lib/spack/spack/platforms/cray.py | E3SM-Project/spack | ce8f78dea5a7a7098d71632f8981d307e91567d5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 3 | 2022-03-03T13:46:32.000Z | 2022-03-19T19:30:14.000Z | lib/spack/spack/platforms/cray.py | E3SM-Project/spack | ce8f78dea5a7a7098d71632f8981d307e91567d5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import os.path
import platform
import re
import socket
import archspec.cpu
import llnl.util.tty as tty
import ... | 39.958716 | 87 | 0.617725 |
f22a6fc561ea3e95f6700ca324c468c6eb5cb161 | 11,459 | py | Python | venv/Lib/site-packages/docutils/transforms/universal.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 1,318 | 2019-07-11T10:34:39.000Z | 2022-03-29T15:05:19.000Z | venv/Lib/site-packages/docutils/transforms/universal.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 387 | 2020-12-15T14:54:04.000Z | 2022-03-31T07:00:21.000Z | venv/Lib/site-packages/docutils/transforms/universal.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 66 | 2019-11-11T15:33:12.000Z | 2022-03-01T07:55:55.000Z | # $Id: universal.py 8671 2021-04-07 12:09:51Z milde $
# -*- coding: utf-8 -*-
# Authors: David Goodger <goodger@python.org>; Ueli Schlaepfer; Günter Milde
# Maintainer: docutils-develop@lists.sourceforge.net
# Copyright: This module has been placed in the public domain.
"""
Transforms needed by most or all documents:
... | 35.586957 | 79 | 0.59534 |
eaf5de93625115ad5b3a447161f5ddd1437a1979 | 796 | py | Python | mysite/urls.py | j54854/simulation | 4ab899165839c04a500f4ed17315bd732d1f04fc | [
"MIT"
] | null | null | null | mysite/urls.py | j54854/simulation | 4ab899165839c04a500f4ed17315bd732d1f04fc | [
"MIT"
] | null | null | null | mysite/urls.py | j54854/simulation | 4ab899165839c04a500f4ed17315bd732d1f04fc | [
"MIT"
] | null | null | null | """mysite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | 34.608696 | 77 | 0.701005 |
ef5e14180b2c181061a291286fbf3f9e918dabce | 824 | py | Python | python_reference/useful_scripts/sparsify_matrix.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | python_reference/useful_scripts/sparsify_matrix.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | python_reference/useful_scripts/sparsify_matrix.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:17:28.000Z | 2019-05-10T09:17:28.000Z | # Sebastian Raschka 2014
#
# Sparsifying a matrix by Zeroing out all elements but the top k elements in a row.
# The matrix could be a distance or similarity matrix (e.g., kernel matrix in kernel PCA),
# where we are interested to keep the top k neighbors.
import numpy as np
print('Sparsify a matrix by zeroing all el... | 21.684211 | 90 | 0.633495 |
9066d7a72f9adf622937198abd963ea1b9e04abf | 95,115 | py | Python | catboost/pytest/cuda_tests/test_gpu.py | Cyberalex13/catboost | a803e1ce12ef1af42eb59515cfc6f53c101f12bc | [
"Apache-2.0"
] | 2 | 2019-07-10T10:49:09.000Z | 2020-06-19T11:40:04.000Z | catboost/pytest/cuda_tests/test_gpu.py | Cyberalex13/catboost | a803e1ce12ef1af42eb59515cfc6f53c101f12bc | [
"Apache-2.0"
] | null | null | null | catboost/pytest/cuda_tests/test_gpu.py | Cyberalex13/catboost | a803e1ce12ef1af42eb59515cfc6f53c101f12bc | [
"Apache-2.0"
] | null | null | null | import catboost
import filecmp
import json
import numpy as np
import os
import pytest
import re
import yatest.common
from catboost_pytest_lib import (
append_params_to_cmdline,
apply_catboost,
compare_evals_with_precision,
compare_metrics_with_diff,
data_file,
execute,
execute_catboost_fit,... | 37.009728 | 169 | 0.651496 |
634ca9e780705193bb1ca1956b08fc349127a5af | 5,177 | py | Python | tests/django_app/tests.py | gadventures/django-gapi-hooked | 7da9fd580bfb17a8bd99048476a7ff00dc0df2eb | [
"MIT"
] | 1 | 2017-04-25T10:07:29.000Z | 2017-04-25T10:07:29.000Z | tests/django_app/tests.py | gadventures/django-gapi-hooked | 7da9fd580bfb17a8bd99048476a7ff00dc0df2eb | [
"MIT"
] | 13 | 2016-03-17T20:34:41.000Z | 2019-05-23T13:56:20.000Z | tests/django_app/tests.py | gadventures/django-gapi-hooked | 7da9fd580bfb17a8bd99048476a7ff00dc0df2eb | [
"MIT"
] | null | null | null | """
Tests for a view that subclasses WebhookReceiverView
"""
import json
from django.core.exceptions import ImproperlyConfigured
from hooked.utils import compute_request_signature
from hooked.views import (
APP_KEY_SETTING,
ErrorMessages,
FAIL_ON_MISMATCH_SETTING,
)
import pytest
from .urls import WEBHOOK... | 29.924855 | 80 | 0.659455 |
063b42dc58f200ca4b7a2781e49d2b3560f9ec62 | 25,995 | py | Python | setup.py | helboukkouri/apex | 3f473d34c5e2f6a0eea854a77c35317d04fc290d | [
"BSD-3-Clause"
] | 1 | 2021-09-06T09:35:02.000Z | 2021-09-06T09:35:02.000Z | setup.py | helboukkouri/apex | 3f473d34c5e2f6a0eea854a77c35317d04fc290d | [
"BSD-3-Clause"
] | null | null | null | setup.py | helboukkouri/apex | 3f473d34c5e2f6a0eea854a77c35317d04fc290d | [
"BSD-3-Clause"
] | 2 | 2021-01-24T07:27:11.000Z | 2022-03-30T21:47:25.000Z | import torch
from torch.utils import cpp_extension
from setuptools import setup, find_packages
import subprocess
import sys
import warnings
import os
# ninja build does not work unless include_dirs are abs path
this_dir = os.path.dirname(os.path.abspath(__file__))
def get_cuda_bare_metal_version(cuda_dir):
raw_o... | 61.599526 | 290 | 0.540489 |
67ac9bea9faa4b5e75729b25300104046fe03848 | 872 | py | Python | edparser/datasets/cws/sighan2005/__init__.py | attardi/iwpt-shared-task-2020 | 3a70c42d53716678776afcccf02d896655777353 | [
"Apache-2.0"
] | 3 | 2020-06-16T12:58:57.000Z | 2021-06-07T21:07:37.000Z | edparser/datasets/cws/sighan2005/__init__.py | attardi/iwpt-shared-task-2020 | 3a70c42d53716678776afcccf02d896655777353 | [
"Apache-2.0"
] | 6 | 2020-06-22T07:46:49.000Z | 2022-02-10T02:22:14.000Z | edparser/datasets/cws/sighan2005/__init__.py | attardi/iwpt-shared-task-2020 | 3a70c42d53716678776afcccf02d896655777353 | [
"Apache-2.0"
] | 2 | 2020-06-27T07:32:43.000Z | 2020-11-10T07:21:03.000Z | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2019-12-21 15:42
import os
from edparser.utils.io_util import get_resource, split_file
from edparser.utils.log_util import logger
SIGHAN2005 = 'http://sighan.cs.uchicago.edu/bakeoff2005/data/icwb2-data.zip'
def make(train):
root = get_resource(SIGHAN2005)
trai... | 37.913043 | 94 | 0.666284 |
cf49273efd63e339a1d19711b06713f2cfe44154 | 18,023 | py | Python | typhon/collocations/common.py | jmollard/typhon | 68d5ae999c340b60aa69e095b336d438632ad55c | [
"MIT"
] | null | null | null | typhon/collocations/common.py | jmollard/typhon | 68d5ae999c340b60aa69e095b336d438632ad55c | [
"MIT"
] | null | null | null | typhon/collocations/common.py | jmollard/typhon | 68d5ae999c340b60aa69e095b336d438632ad55c | [
"MIT"
] | null | null | null | """
This module provides classes and functions to find collocations between
filesets and datasets. They are inspired by the CollocatedDataset classes in
atmlab implemented by Gerrit Holl.
Created by John Mrziglod, June 2017
"""
import numba
import numpy as np
from typhon.files import FileSet
from typhon.utils.timeuti... | 37.943158 | 89 | 0.625534 |
ed6a2d2919daf2243fc120a7f183036a065f32af | 374 | py | Python | materials/sp20/lab/lab10/tests/q3_2_2.py | ds-modules/Deepnote-demo | 548c12ced6cae774ecd0036aa1e8bb833af6472c | [
"BSD-3-Clause"
] | null | null | null | materials/sp20/lab/lab10/tests/q3_2_2.py | ds-modules/Deepnote-demo | 548c12ced6cae774ecd0036aa1e8bb833af6472c | [
"BSD-3-Clause"
] | null | null | null | materials/sp20/lab/lab10/tests/q3_2_2.py | ds-modules/Deepnote-demo | 548c12ced6cae774ecd0036aa1e8bb833af6472c | [
"BSD-3-Clause"
] | null | null | null | test = {
'name': 'q3_2_2',
'points': 1,
'suites': [
{
'cases': [
{
'code': r"""
>>> np.isclose(prob_sick_given_positive, 0.3125)
True
""",
'hidden': False,
'locked': False
}
],
'scored': True,
'setup': '',
... | 16.26087 | 58 | 0.360963 |
091e8cd20f47ded2ce9aac084b6bd46ffae3e775 | 2,920 | py | Python | volatility/framework/plugins/mac/check_syscall.py | Khanejo/volatility3 | 02a1bdf9a6f1f37a04f10cd413617eb203b2a140 | [
"Linux-OpenIB"
] | null | null | null | volatility/framework/plugins/mac/check_syscall.py | Khanejo/volatility3 | 02a1bdf9a6f1f37a04f10cd413617eb203b2a140 | [
"Linux-OpenIB"
] | null | null | null | volatility/framework/plugins/mac/check_syscall.py | Khanejo/volatility3 | 02a1bdf9a6f1f37a04f10cd413617eb203b2a140 | [
"Linux-OpenIB"
] | null | null | null | # This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
#
import logging
from typing import List, Iterator, Any
from volatility.framework import exceptions, interfaces
from volatility.framew... | 44.242424 | 116 | 0.656507 |
eb0c1cbfcb8582dd6ab725789b2714833a29e4fc | 6,770 | py | Python | bindings/python/ensmallen_graph/datasets/string/desulfovibriosp31syn3.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/desulfovibriosp31syn3.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/desulfovibriosp31syn3.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | """
This file offers the methods to automatically retrieve the graph Desulfovibrio sp. 31syn3.
The graph is automatically retrieved from the STRING repository.
Report
---------------------
At the time of rendering these methods (please see datetime below), the graph
had the following characteristics:
Datetime: 20... | 35.445026 | 223 | 0.705761 |
616ed1cf3431cd084c7f98a37f131bb0bb5272ad | 1,508 | py | Python | builders/sampler_builder.py | kilsenp/person-multi-task-dataset | 2f186cafa3db2c77d8c6c4309b2cadc13d4f92ab | [
"MIT"
] | 4 | 2020-10-08T03:31:36.000Z | 2021-03-06T08:06:23.000Z | reid/scripts/triplet_reid/builders/sampler_builder.py | VisualComputingInstitute/CROWDBOT_perception | df98f3f658c39fb3fa4ac0456f1214f7918009f6 | [
"MIT"
] | 7 | 2021-06-08T20:55:10.000Z | 2022-02-10T00:38:32.000Z | reid/scripts/triplet_reid/builders/sampler_builder.py | VisualComputingInstitute/CROWDBOT_perception | df98f3f658c39fb3fa4ac0456f1214f7918009f6 | [
"MIT"
] | null | null | null | from builders import dataset_builder
from datasets.dataset import MultiDataset
from samplers import load_multi_sampler_class, get_all_multi_samplers
from samplers import load_single_sampler_class, get_all_single_samplers
from samplers import get_all_samplers
def clean(name):
# backwards compability
if name.en... | 30.16 | 90 | 0.71817 |
0996266976e91827965175f5efd042ee51cc3b87 | 17,476 | py | Python | config/settings/base.py | bihealth/digestiflow-server | 298c53f95dbf56e7be0d0b8bcceacabc21257d5f | [
"MIT"
] | 13 | 2019-11-27T19:12:15.000Z | 2021-12-01T21:32:18.000Z | config/settings/base.py | bihealth/digestiflow-server | 298c53f95dbf56e7be0d0b8bcceacabc21257d5f | [
"MIT"
] | 60 | 2019-03-27T14:43:19.000Z | 2022-03-22T09:12:53.000Z | config/settings/base.py | bihealth/digestiflow-server | 298c53f95dbf56e7be0d0b8bcceacabc21257d5f | [
"MIT"
] | 3 | 2020-11-09T07:08:42.000Z | 2022-02-09T11:37:54.000Z | """
Django settings for the SODAR Django Site template.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
import environ
from projectroles.constants import get_sodar... | 36.107438 | 100 | 0.649691 |
e0f1757a93e7a5fd09ad2b28b72c455a09f2291a | 5,064 | py | Python | source-gans/source/preprocess_input/preprocess_for_embedding.py | oneyearold751/FlowGan | 111ab6bc32d2c915a25d4433470525dd8fd37f78 | [
"MIT"
] | 4 | 2021-07-08T09:17:17.000Z | 2022-03-31T12:54:52.000Z | source-gans/source/preprocess_input/preprocess_for_embedding.py | oneyearold751/FlowGan | 111ab6bc32d2c915a25d4433470525dd8fd37f78 | [
"MIT"
] | null | null | null | source-gans/source/preprocess_input/preprocess_for_embedding.py | oneyearold751/FlowGan | 111ab6bc32d2c915a25d4433470525dd8fd37f78 | [
"MIT"
] | 2 | 2021-06-15T00:25:58.000Z | 2022-01-09T08:45:23.000Z | # Imports
import csv
import sys
import random
from datetime import datetime
import time
from random import randint
# Path to data
inputFile = sys.argv[1]
inputFileEmbedding = sys.argv[2]
outputFileData = sys.argv[3]
ipToEmbed = dict()
default = ""
with open(inputFileEmbedding, 'r') as fl:
reader = c... | 28.772727 | 129 | 0.382899 |
1434e6eb2ebdafeaa23859abaa56a887ed84af04 | 18,981 | py | Python | indico/modules/events/registration/stats.py | bkmgit/indico | d77ee121e35880a416b9b05e6098ea912d870b5c | [
"MIT"
] | 1 | 2021-06-11T20:02:10.000Z | 2021-06-11T20:02:10.000Z | indico/modules/events/registration/stats.py | bkmgit/indico | d77ee121e35880a416b9b05e6098ea912d870b5c | [
"MIT"
] | null | null | null | indico/modules/events/registration/stats.py | bkmgit/indico | d77ee121e35880a416b9b05e6098ea912d870b5c | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2022 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from collections import defaultdict, namedtuple
from itertools import chain, groupby
from indico.modules.... | 46.522059 | 120 | 0.576366 |
cddd0252432f2a5a6fa35bc2fbfe94e12c22ad0c | 964 | py | Python | pgsqltoolsservice/query_execution/contracts/query_complete_notification.py | rich617/pgtoolsservice | 24d81677eaf6f7cdb6c2caaddf1f55a90ce6006c | [
"MIT"
] | null | null | null | pgsqltoolsservice/query_execution/contracts/query_complete_notification.py | rich617/pgtoolsservice | 24d81677eaf6f7cdb6c2caaddf1f55a90ce6006c | [
"MIT"
] | null | null | null | pgsqltoolsservice/query_execution/contracts/query_complete_notification.py | rich617/pgtoolsservice | 24d81677eaf6f7cdb6c2caaddf1f55a90ce6006c | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 38.56 | 94 | 0.59751 |
a6caac1d5237d70db8c1799350a6113a0b8365ae | 3,681 | py | Python | signature_unlockbl.py | a93hmed1/Cuber | 96ec8144409beacb3c6f2ede111025920667ed68 | [
"MIT"
] | 13 | 2015-02-15T14:52:36.000Z | 2020-01-28T12:44:52.000Z | signature_unlockbl.py | a93hmed1/Cuber | 96ec8144409beacb3c6f2ede111025920667ed68 | [
"MIT"
] | null | null | null | signature_unlockbl.py | a93hmed1/Cuber | 96ec8144409beacb3c6f2ede111025920667ed68 | [
"MIT"
] | 5 | 2015-04-07T23:57:54.000Z | 2021-08-16T22:16:37.000Z | import gmpy2
from gmpy2 import mpz
import struct
from binascii import unhexlify
BITLEN = 2048
def icbrt (a1, a2):
z = gmpy2.iroot(mpz(a1), 3)
return z[0]
def forge_prefix(s, w, N):
zd = BITLEN - w
repas = s
repa = (repas >> zd)
cmax = N
cmin = 0
s = 0
while Tru... | 35.057143 | 528 | 0.657702 |
e6fe51531eb3be86112c5daa94ba7eec3ca62854 | 2,183 | py | Python | app/api/v1/views/user_view.py | munniomer/Send-IT-Api-v1 | 17041c987638c7e47c7c2ebed29bf7e2b5156bed | [
"CNRI-Python",
"OML"
] | null | null | null | app/api/v1/views/user_view.py | munniomer/Send-IT-Api-v1 | 17041c987638c7e47c7c2ebed29bf7e2b5156bed | [
"CNRI-Python",
"OML"
] | null | null | null | app/api/v1/views/user_view.py | munniomer/Send-IT-Api-v1 | 17041c987638c7e47c7c2ebed29bf7e2b5156bed | [
"CNRI-Python",
"OML"
] | 1 | 2019-02-05T07:44:19.000Z | 2019-02-05T07:44:19.000Z | """User views contains Signup and login Resources"""
from app.api.v1.models.user_model import UserModel
from flask import Flask, request, make_response, json, jsonify
from flask_restful import Resource
from validators.validators import Validators
db = UserModel()
validate = Validators()
class SignupResource(Resource... | 38.982143 | 113 | 0.656436 |
9ddb4bf486bf31b662202478901b6512796a8552 | 163 | py | Python | tapioca_the_moviedb/__init__.py | gtsalles/tapioca-the-moviedb | 4b177ba24484e99199fd48058f8670657acd45d7 | [
"MIT"
] | 2 | 2018-12-06T15:03:07.000Z | 2019-11-02T00:41:04.000Z | tapioca_the_moviedb/__init__.py | gtsalles/tapioca-the-moviedb | 4b177ba24484e99199fd48058f8670657acd45d7 | [
"MIT"
] | null | null | null | tapioca_the_moviedb/__init__.py | gtsalles/tapioca-the-moviedb | 4b177ba24484e99199fd48058f8670657acd45d7 | [
"MIT"
] | null | null | null | # coding: utf-8
__author__ = 'Gustavo Carvalho'
__email__ = 'gtcarvalho@protonmail.com'
__version__ = '0.1'
from .tapioca_the_moviedb import TheMovieDB # noqa
| 18.111111 | 51 | 0.754601 |
b3002caf6fad62fa4323c65c68724aa877cc6ad3 | 2,953 | py | Python | kyu_6/count_letters_in_string/test_count_letters_in_string.py | pedrocodacyorg2/codewars | ba3ea81125b6082d867f0ae34c6c9be15e153966 | [
"Unlicense"
] | 1 | 2022-02-12T05:56:04.000Z | 2022-02-12T05:56:04.000Z | kyu_6/count_letters_in_string/test_count_letters_in_string.py | pedrocodacyorg2/codewars | ba3ea81125b6082d867f0ae34c6c9be15e153966 | [
"Unlicense"
] | 182 | 2020-04-30T00:51:36.000Z | 2021-09-07T04:15:05.000Z | kyu_6/count_letters_in_string/test_count_letters_in_string.py | pedrocodacyorg2/codewars | ba3ea81125b6082d867f0ae34c6c9be15e153966 | [
"Unlicense"
] | 4 | 2020-04-29T22:04:20.000Z | 2021-07-13T20:04:14.000Z | # Created by Egor Kostan.
# GitHub: https://github.com/ikostan
# LinkedIn: https://www.linkedin.com/in/egor-kostan/
# FUNDAMENTALS STRINGS HASHES DATA STRUCTURES
import unittest
import allure
from utils.log_func import print_log
from kyu_6.count_letters_in_string.count_letters_in_string import letter_count
@allu... | 34.741176 | 94 | 0.552997 |
712acc93888499d295fc18d94deb9ecb39f1bdba | 174 | py | Python | tests/test_cdist.py | rafsaf/tw-complex | e34492ace6a1a49400d7aea09ac7407d53cf01f6 | [
"MIT"
] | null | null | null | tests/test_cdist.py | rafsaf/tw-complex | e34492ace6a1a49400d7aea09ac7407d53cf01f6 | [
"MIT"
] | null | null | null | tests/test_cdist.py | rafsaf/tw-complex | e34492ace6a1a49400d7aea09ac7407d53cf01f6 | [
"MIT"
] | null | null | null | from tw_complex.cdist import CDistAndKNN
import tests.utils as utils
def test_CDistAndKNN():
utils.run_all_tests(CDistAndKNN, "CDistAndKNN", _precision=0.8, draw=True)
| 24.857143 | 78 | 0.793103 |
084ee1f54f9bc89ce14eea664176a40dd7a034fc | 2,420 | py | Python | vibra.py | proximate/proximate | 671f5d816137ef83de2d8b9ccff502c9a5f2fb28 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | 3 | 2015-02-16T02:55:31.000Z | 2016-04-14T16:19:50.000Z | vibra.py | proximate/proximate | 671f5d816137ef83de2d8b9ccff502c9a5f2fb28 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | vibra.py | proximate/proximate | 671f5d816137ef83de2d8b9ccff502c9a5f2fb28 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | #
# Proximate - Peer-to-peer social networking
#
# Copyright (c) 2008-2011 Nokia Corporation
#
# All rights reserved.
#
# This software is licensed under The Clear BSD license.
# See the LICENSE file for more details.
#
""" Plugin that buzzes N900's vibrator when user marked as friend appears """
from dbus import Syst... | 33.150685 | 127 | 0.677686 |
f4f9e08a08b81a90387a159b431afbd9975d5b8d | 1,408 | py | Python | test/api/test_can_predictions.py | paulirish/covid-data-model | b93ae5d598b8378f9c1f2698e3162f87136cde74 | [
"MIT"
] | 1 | 2020-04-25T02:51:26.000Z | 2020-04-25T02:51:26.000Z | test/api/test_can_predictions.py | paulirish/covid-data-model | b93ae5d598b8378f9c1f2698e3162f87136cde74 | [
"MIT"
] | null | null | null | test/api/test_can_predictions.py | paulirish/covid-data-model | b93ae5d598b8378f9c1f2698e3162f87136cde74 | [
"MIT"
] | null | null | null | import unittest
from datetime import date
from api.can_api_definition import (
CovidActNowCountiesAPI,
CovidActNowCountySummary,
)
class CovidTimeseriesModelTest(unittest.TestCase):
def test_counties_api(self):
county_summary = CovidActNowCountySummary(
countryName = "US",
stateName = "Calif... | 26.074074 | 60 | 0.551847 |
8cffed19abc0942ef6de5d3dbb578ee93bc79b2c | 4,514 | py | Python | python_modules/libraries/dagstermill/dagstermill/cli.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | 1 | 2021-04-27T19:49:59.000Z | 2021-04-27T19:49:59.000Z | python_modules/libraries/dagstermill/dagstermill/cli.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | 7 | 2022-03-16T06:55:04.000Z | 2022-03-18T07:03:25.000Z | python_modules/libraries/dagstermill/dagstermill/cli.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | null | null | null | import copy
import os
import subprocess
import click
import nbformat
from papermill.iorw import load_notebook_node, write_ipynb
from dagster import check
from dagster.seven.json import loads
from dagster.utils import mkdir_p, safe_isfile
def get_import_cell():
return nbformat.v4.new_code_cell(source="import dag... | 32.47482 | 100 | 0.682986 |
afe8c943737bd6c55d7a5a4840d290fe2509ae00 | 2,286 | py | Python | tests/component/helpers/test_plugin.py | interest-hub/interest | e6e1def4f2999222aac2fb1d290ae94250673b89 | [
"MIT"
] | 14 | 2015-02-15T09:29:26.000Z | 2016-03-24T15:30:54.000Z | tests/component/helpers/test_plugin.py | roll/interest-py | e6e1def4f2999222aac2fb1d290ae94250673b89 | [
"MIT"
] | 17 | 2015-02-15T22:52:07.000Z | 2016-02-28T23:40:18.000Z | tests/component/helpers/test_plugin.py | roll/interest-py | e6e1def4f2999222aac2fb1d290ae94250673b89 | [
"MIT"
] | 1 | 2016-11-11T11:14:05.000Z | 2016-11-11T11:14:05.000Z | import unittest
from importlib import import_module
from unittest.mock import patch
component = import_module('interest.helpers.plugin')
class PluginImporterTest(unittest.TestCase):
# Actions
def setUp(self):
self.addCleanup(patch.stopall)
self.sys = patch.object(component, 'sys').start()
... | 34.119403 | 77 | 0.668416 |
2d03f6a90051b1a53f5b7bf753d762a4938da706 | 89 | py | Python | detlib/__init__.py | Ontheway361/mtcnn-pytorch | 5ba2611e479762039a9a7ac4079444373433dae9 | [
"MIT"
] | 5 | 2019-09-22T09:45:48.000Z | 2020-09-08T12:34:13.000Z | detlib/__init__.py | Ontheway361/mtcnn-pytorch | 5ba2611e479762039a9a7ac4079444373433dae9 | [
"MIT"
] | null | null | null | detlib/__init__.py | Ontheway361/mtcnn-pytorch | 5ba2611e479762039a9a7ac4079444373433dae9 | [
"MIT"
] | 1 | 2020-09-08T12:34:26.000Z | 2020-09-08T12:34:26.000Z | from detlib.detector.vision import easy_vis
from detlib.detector.detect import DetectFace | 44.5 | 45 | 0.876404 |
ee6049f8ba7f1713c8d6dd5fa3c054c2bf9ef1be | 29,576 | py | Python | wagtail/contrib/modeladmin/tests/test_simple_modeladmin.py | vbudovski-alliance/wagtail | f533726de39c7ddde1e113aae3f08c56056155e7 | [
"BSD-3-Clause"
] | null | null | null | wagtail/contrib/modeladmin/tests/test_simple_modeladmin.py | vbudovski-alliance/wagtail | f533726de39c7ddde1e113aae3f08c56056155e7 | [
"BSD-3-Clause"
] | null | null | null | wagtail/contrib/modeladmin/tests/test_simple_modeladmin.py | vbudovski-alliance/wagtail | f533726de39c7ddde1e113aae3f08c56056155e7 | [
"BSD-3-Clause"
] | null | null | null | from io import BytesIO
from unittest import mock
from django.contrib.auth.models import Group
from django.core import checks
from django.test import TestCase
from openpyxl import load_workbook
from wagtail.admin.admin_url_finder import AdminURLFinder
from wagtail.admin.edit_handlers import FieldPanel, TabbedInterface... | 38.560626 | 330 | 0.664322 |
705adb978f8e0c17f19a380d07035c67036cc65f | 2,491 | py | Python | app/routes.py | zfred09/vigilant-journey | 21d1ca8648d9e26134b7e569e6300d2226a50588 | [
"Apache-2.0"
] | null | null | null | app/routes.py | zfred09/vigilant-journey | 21d1ca8648d9e26134b7e569e6300d2226a50588 | [
"Apache-2.0"
] | null | null | null | app/routes.py | zfred09/vigilant-journey | 21d1ca8648d9e26134b7e569e6300d2226a50588 | [
"Apache-2.0"
] | null | null | null | from flask import render_template, flash, redirect, url_for, request, session, escape
from app import app, db
from app.forms import LoginForm
from app.models import Recipes, Ingredients
from pyqrcode import pyqrcode
import io
@app.route('/')
@app.route('/index')
def index():
recipe_id = 2
title = Recipes.query... | 31.531646 | 85 | 0.710157 |
7c60ce7150c65b6a21386258272c4a99ed6189fb | 1,389 | py | Python | username_checker/username_checker.py | bagaswastu/misc_python | ff474f1ed768b139bd9f7ebbbdae5ca515e050b2 | [
"MIT"
] | null | null | null | username_checker/username_checker.py | bagaswastu/misc_python | ff474f1ed768b139bd9f7ebbbdae5ca515e050b2 | [
"MIT"
] | null | null | null | username_checker/username_checker.py | bagaswastu/misc_python | ff474f1ed768b139bd9f7ebbbdae5ca515e050b2 | [
"MIT"
] | null | null | null | import json
from queue import Queue
import threading
from urllib.error import HTTPError
from urllib.request import urlopen
from urllib.parse import urlparse
url_list = [
"https://keybase.io/{username}",
"https://github.com/{username}",
"https://replit.com/@{username}",
]
queue = Queue()
domain_status = []
... | 23.15 | 83 | 0.636429 |
7aa9aea03f648c036e3f917aa168d3ae44afca1a | 9,544 | py | Python | docs/source/conf.py | llzzies/evennia | 135e1ba14de4ed8b3dd5a26dc57ebbb79eebf99a | [
"BSD-3-Clause"
] | null | null | null | docs/source/conf.py | llzzies/evennia | 135e1ba14de4ed8b3dd5a26dc57ebbb79eebf99a | [
"BSD-3-Clause"
] | 1 | 2021-02-28T10:18:28.000Z | 2021-02-28T10:18:28.000Z | docs/source/conf.py | trhr/evennia | 88666420f25f72ea12a4c456c9ca01233f701fb0 | [
"BSD-3-Clause"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import os
import sys
import re
import importlib
from recommonmark.transform import Auto... | 30.202532 | 91 | 0.630658 |
0b89f072818d15e204a48195a173e39dd5dfb279 | 272,072 | py | Python | HLTrigger/Configuration/test/OnLine_HLT_PIon.py | tklijnsma/cmssw | d7f103c459dd195eaa651ce0c30e4bd4bfd0fe43 | [
"Apache-2.0"
] | 2 | 2018-06-01T05:18:55.000Z | 2021-04-08T21:44:06.000Z | HLTrigger/Configuration/test/OnLine_HLT_PIon.py | tklijnsma/cmssw | d7f103c459dd195eaa651ce0c30e4bd4bfd0fe43 | [
"Apache-2.0"
] | 26 | 2018-10-30T12:47:58.000Z | 2022-03-29T08:39:00.000Z | HLTrigger/Configuration/test/OnLine_HLT_PIon.py | p2l1pfp/cmssw | 9bda22bf33ecf18dd19a3af2b3a8cbdb1de556a9 | [
"Apache-2.0"
] | 1 | 2018-09-12T13:30:34.000Z | 2018-09-12T13:30:34.000Z | # hltGetConfiguration --full --data /dev/CMSSW_11_1_0/PIon --type PIon --unprescale --process HLTPIon --globaltag auto:run3_hlt_PIon --input file:RelVal_Raw_PIon_DATA.root
# /dev/CMSSW_11_1_0/PIon/V11 (CMSSW_11_1_0)
import FWCore.ParameterSet.Config as cms
process = cms.Process( "HLTPIon" )
process.HLTConfigVersion... | 45.919325 | 250 | 0.730836 |
521fca72f177fcdaaff11f5f9473bb6cc6071d0d | 930 | py | Python | tests/unit/fixtures.py | erikdidriksen/spin2spot | aaca1aa1ccb2b9588d294420ed5cee3ef4055f8b | [
"MIT"
] | 2 | 2019-01-21T03:41:03.000Z | 2021-08-28T08:16:24.000Z | tests/unit/fixtures.py | erikdidriksen/spin2spot | aaca1aa1ccb2b9588d294420ed5cee3ef4055f8b | [
"MIT"
] | 1 | 2021-06-02T03:34:43.000Z | 2021-06-02T03:34:43.000Z | tests/unit/fixtures.py | erikdidriksen/spin2spot | aaca1aa1ccb2b9588d294420ed5cee3ef4055f8b | [
"MIT"
] | null | null | null | import json as json_
import os
from bs4 import BeautifulSoup
def fixture_folder():
"""Returns the absolute path of the fixtures folder."""
folder = os.path.dirname(__file__)
return os.path.join(folder, os.pardir, 'fixtures')
def fixture_path(filename):
"""Returns the absolute path of the given fixtu... | 26.571429 | 69 | 0.704301 |
27070ece22ea282374fb2257c045a808d89f73e0 | 6,588 | py | Python | src/reversi_zero/play_game/gui.py | Jinnrry/reversi-alpha-zero | 3ad58049e1904719336a57cb19930bc10f464efa | [
"MIT"
] | 699 | 2017-10-24T23:13:15.000Z | 2022-03-18T12:09:13.000Z | src/reversi_zero/play_game/gui.py | Jinnrry/reversi-alpha-zero | 3ad58049e1904719336a57cb19930bc10f464efa | [
"MIT"
] | 59 | 2017-10-31T14:18:42.000Z | 2022-03-11T23:14:00.000Z | src/reversi_zero/play_game/gui.py | ourobouros/reversi-alpha-zero | 789c8fd1ad19d4f4647a3bae8b438fe769137463 | [
"MIT"
] | 200 | 2017-10-24T17:12:20.000Z | 2022-01-06T05:05:39.000Z | # many code from http://d.hatena.ne.jp/yatt/20100129/1264791420
from logging import getLogger
import wx
from wx.core import CommandEvent
from reversi_zero.config import Config, GuiConfig, PlayWithHumanConfig
from reversi_zero.env.reversi_env import Player
from reversi_zero.play_game.game_model import PlayWithHuman, ... | 35.610811 | 105 | 0.579842 |
b571eaadf3324805fe0e5d3b5de3fa67bcece00d | 757 | py | Python | Database Initialization/Creators/zones_init.py | georgevangelou/Bringing_yoU_Spiti | 6b98c6f1179e8e3dd3f41ff0b3d373eb1d8643a5 | [
"Apache-2.0"
] | 2 | 2021-03-05T19:36:24.000Z | 2021-03-08T19:52:06.000Z | Database Initialization/Creators/zones_init.py | n-roussos/Bringing_yoU_Spiti | cc0946d0b8a66bb3b9d7b988622fe262a68ba3fb | [
"Apache-2.0"
] | null | null | null | Database Initialization/Creators/zones_init.py | n-roussos/Bringing_yoU_Spiti | cc0946d0b8a66bb3b9d7b988622fe262a68ba3fb | [
"Apache-2.0"
] | 1 | 2021-03-05T19:58:51.000Z | 2021-03-05T19:58:51.000Z | import random
import cards_init
random.seed(3900)
DRIVERS = 25
ZONE_IDS = [1,2,3]
insert_str = "INSERT INTO zones(zone_id, card_id) VALUES "
zonesDic = {}
i=0
for card_id in cards_init.carDic:
temp_ids = ZONE_IDS.copy()
how_many = random.randint(1,3)
selected_zones = []
for j in range(how_many):
... | 21.628571 | 79 | 0.608983 |
20cc05f9a5cee8aa82783cacd243af319ed6ae64 | 9,593 | py | Python | pandas/tests/series/test_io.py | sayanmondal2098/pandas | 2f6b90aaaab6814c102eb160c5a9c11bc04a092e | [
"BSD-3-Clause"
] | 1 | 2019-05-19T13:44:03.000Z | 2019-05-19T13:44:03.000Z | pandas/tests/series/test_io.py | sanjusci/pandas | a1fee9199eba7ebf423880243936b9f1501d3d3a | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/series/test_io.py | sanjusci/pandas | a1fee9199eba7ebf423880243936b9f1501d3d3a | [
"BSD-3-Clause"
] | 3 | 2018-01-08T08:40:55.000Z | 2019-10-07T02:02:40.000Z | # coding=utf-8
# pylint: disable-msg=E1101,W0612
import collections
from datetime import datetime
from io import StringIO
import numpy as np
import pytest
import pandas as pd
from pandas import DataFrame, Series
import pandas.util.testing as tm
from pandas.util.testing import (
assert_almost_equal, assert_frame_... | 35.928839 | 79 | 0.582821 |
fbea72ccf715818e9be68bd038a47fd3a05a28f6 | 229 | py | Python | sq.py | sim6998/Python-Tutorials | 07bead55b6b9a6bbdc2479907de06f28761aca59 | [
"MIT"
] | null | null | null | sq.py | sim6998/Python-Tutorials | 07bead55b6b9a6bbdc2479907de06f28761aca59 | [
"MIT"
] | null | null | null | sq.py | sim6998/Python-Tutorials | 07bead55b6b9a6bbdc2479907de06f28761aca59 | [
"MIT"
] | null | null | null | import queue
q = queue.Queue(maxsize=10)
for i in range(1,11):
q.put(i)
for i in range(0,10):
print(q.get())
# x = ['hello']
# x.append('smit')
# x.append('patel')
# print(x)
# print(x.pop())
# print(x) | 12.052632 | 28 | 0.537118 |
2a037b20a076241ba871fae10b416b795852299a | 46,780 | py | Python | tensorflow/python/ops/data_flow_ops.py | alephman/Tensorflow | 57ff9d9be2f1faaba9598a3d99ef6c3af02342a4 | [
"Apache-2.0"
] | 2 | 2020-08-10T01:50:22.000Z | 2020-11-25T07:54:34.000Z | tensorflow/python/ops/data_flow_ops.py | NUAAZZW/tensorflow | 57ff9d9be2f1faaba9598a3d99ef6c3af02342a4 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/data_flow_ops.py | NUAAZZW/tensorflow | 57ff9d9be2f1faaba9598a3d99ef6c3af02342a4 | [
"Apache-2.0"
] | 1 | 2020-09-07T09:14:16.000Z | 2020-09-07T09:14:16.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... | 39.644068 | 81 | 0.704938 |
22e6c6a16d920f52cce99f263a2f8dd09f4f3c34 | 4,128 | py | Python | noxfile.py | tmnhat2001/python-practice | 0d9bcabdc794a0cd83d5072e8ae158f32ca8269e | [
"MIT"
] | null | null | null | noxfile.py | tmnhat2001/python-practice | 0d9bcabdc794a0cd83d5072e8ae158f32ca8269e | [
"MIT"
] | null | null | null | noxfile.py | tmnhat2001/python-practice | 0d9bcabdc794a0cd83d5072e8ae158f32ca8269e | [
"MIT"
] | null | null | null | """Nox sessions."""
import tempfile
from typing import Any
import nox
from nox.sessions import Session
nox.options.sessions = "lint", "safety", "tests", "mypy"
package = "hypermodern_python"
def install_with_constraints(session: Session, *args: str, **kwargs: Any) -> None:
"""Install packages constrained by Poe... | 31.51145 | 97 | 0.621366 |
01f98e7ef8763f3e4f5521817a7da9b2fe80ec5f | 690 | py | Python | Support/Fuego/Pythia/pythia-0.4/packages/fuego/fuego/serialization/ckml/__init__.py | marient/PelePhysics | e6ad1839d77b194e09ab44ff850c9489652e5d81 | [
"BSD-3-Clause-LBNL"
] | 1 | 2019-04-24T13:32:23.000Z | 2019-04-24T13:32:23.000Z | Support/Fuego/Pythia/pythia-0.4/packages/fuego/fuego/serialization/ckml/__init__.py | marient/PelePhysics | e6ad1839d77b194e09ab44ff850c9489652e5d81 | [
"BSD-3-Clause-LBNL"
] | null | null | null | Support/Fuego/Pythia/pythia-0.4/packages/fuego/fuego/serialization/ckml/__init__.py | marient/PelePhysics | e6ad1839d77b194e09ab44ff850c9489652e5d81 | [
"BSD-3-Clause-LBNL"
] | null | null | null | #!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Michael A.G. Aivazis
# California Institute of Technology
# (C) 1998-2003 All Rights Reserved
#
# <LicenseText>
#
# ~~~~~~~~~~... | 18.648649 | 83 | 0.424638 |
5b6f05e8f35510fde6c47510dd35b49ccc64333e | 12,053 | py | Python | lineart_generator/pix2pix/train.py | laclark/cuneiform_lineart | e25d89c56a616cf329020eabbf97c94f9fddc503 | [
"MIT"
] | null | null | null | lineart_generator/pix2pix/train.py | laclark/cuneiform_lineart | e25d89c56a616cf329020eabbf97c94f9fddc503 | [
"MIT"
] | null | null | null | lineart_generator/pix2pix/train.py | laclark/cuneiform_lineart | e25d89c56a616cf329020eabbf97c94f9fddc503 | [
"MIT"
] | null | null | null | # Code samples from https://www.tensorflow.org/tutorials/generative/pix2pix,
# Accessed June 19, 2021.
#
# Content is 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... | 33.761905 | 85 | 0.630051 |
dde6c9d95a062ac42d27a38658928b43c77fde7e | 4,881 | py | Python | src/yafowil/widget/tiptap/tests.py | conestack/yafowil.widget.tiptap | 2b96549239731ffb14dc2c8f90d0b12dc498688a | [
"BSD-2-Clause"
] | null | null | null | src/yafowil/widget/tiptap/tests.py | conestack/yafowil.widget.tiptap | 2b96549239731ffb14dc2c8f90d0b12dc498688a | [
"BSD-2-Clause"
] | 1 | 2022-03-31T06:18:15.000Z | 2022-03-31T06:18:15.000Z | src/yafowil/widget/tiptap/tests.py | conestack/yafowil.widget.tiptap | 2b96549239731ffb14dc2c8f90d0b12dc498688a | [
"BSD-2-Clause"
] | null | null | null | from node.utils import UNSET
from yafowil.base import factory
from yafowil.compat import IS_PY2
from yafowil.tests import YafowilTestCase
import unittest
import yafowil.loader # noqa
if not IS_PY2:
from importlib import reload
class TestTiptapWidget(YafowilTestCase):
def setUp(self):
super(TestTip... | 33.431507 | 82 | 0.534112 |
d395cd5c49f8ba535f8fe116b9881ecaf24dfd13 | 96,514 | py | Python | nova/network/manager.py | taget/nova | 94cb611540fe8d14aca3bc089b9286244cb68fae | [
"Apache-2.0"
] | null | null | null | nova/network/manager.py | taget/nova | 94cb611540fe8d14aca3bc089b9286244cb68fae | [
"Apache-2.0"
] | null | null | null | nova/network/manager.py | taget/nova | 94cb611540fe8d14aca3bc089b9286244cb68fae | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you... | 44.723818 | 89 | 0.573274 |
6becfd765a5b63b86632853a618cfd197f4736ce | 1,374 | py | Python | run_app.py | SubmitCode/gpt-2 | d1b71acff13b312fea6e2b31fbdee34dacd0cc24 | [
"MIT"
] | null | null | null | run_app.py | SubmitCode/gpt-2 | d1b71acff13b312fea6e2b31fbdee34dacd0cc24 | [
"MIT"
] | null | null | null | run_app.py | SubmitCode/gpt-2 | d1b71acff13b312fea6e2b31fbdee34dacd0cc24 | [
"MIT"
] | null | null | null | from src.app import *
#app.run(debug=True)
import streamlit as st
"""
# Sprich mit der AI
[Openai](https://openai.com/blog/better-language-models/) hat Anfang dieses Jahres für Aufsehen gesorgt.
Sie veröffentlichten ein Paper in welchen sie beschreiben, wie sie eine Sprach AI mit rund
40 GB Texten trainierten. Das b... | 47.37931 | 128 | 0.786754 |
44b3c1428b7611ea25a31b9f690a168e615dc75a | 251 | py | Python | main_app/config.py | ArunRK7Codie/Sentiment-Analysis | f80fbfb2e498328d720fec917e02a58032749268 | [
"MIT"
] | null | null | null | main_app/config.py | ArunRK7Codie/Sentiment-Analysis | f80fbfb2e498328d720fec917e02a58032749268 | [
"MIT"
] | 10 | 2020-10-08T05:32:00.000Z | 2022-02-10T01:42:00.000Z | main_app/config.py | ArunRK7Codie/Sentiment-Analysis | f80fbfb2e498328d720fec917e02a58032749268 | [
"MIT"
] | null | null | null | consumer_key = 'YNLREzlEXfpbevfr85dvFzyZ6'
access_key = '1133782982202781696-eYQZ3PnsN4pzvAIBp1zXEDDtfsDgk9'
access_secret_key = '99laa4oEvoLvNMR0ySIZ6DmgbBTElqkoLSbZnBKh35MLQ'
consumer_secret_key = 'IY1dv55lP9oGaWDn9F4kNibNldvu0m96uZ0tF6JV6ZnJg5197d' | 62.75 | 74 | 0.904382 |
41b64548799897e6244e8f545a60ab8a329845ae | 10,921 | py | Python | preprocessor/preprocessor.py | dipjyoti92/FastSpeech2 | 1cb00b2562f3b27301afe5d188b71716507c51d3 | [
"MIT"
] | 1 | 2021-04-13T11:28:41.000Z | 2021-04-13T11:28:41.000Z | preprocessor/preprocessor.py | dipjyoti92/FastSpeech2 | 1cb00b2562f3b27301afe5d188b71716507c51d3 | [
"MIT"
] | null | null | null | preprocessor/preprocessor.py | dipjyoti92/FastSpeech2 | 1cb00b2562f3b27301afe5d188b71716507c51d3 | [
"MIT"
] | null | null | null | import os
import random
import json
import tgt
import librosa
import numpy as np
import pyworld as pw
from scipy.interpolate import interp1d
from sklearn.preprocessing import StandardScaler
from tqdm import tqdm
import audio as Audio
class Preprocessor:
def __init__(self, config):
self.config = config
... | 34.780255 | 90 | 0.531819 |
c661286cef85c5e1819562c97e44610d0c375e4c | 9,815 | py | Python | usp_1/semana7/backup_funciona_mas_nao_valida.py | dialup/py | 758da136b16c00a6c4f50191e233a9428bf64698 | [
"BSD-2-Clause"
] | null | null | null | usp_1/semana7/backup_funciona_mas_nao_valida.py | dialup/py | 758da136b16c00a6c4f50191e233a9428bf64698 | [
"BSD-2-Clause"
] | null | null | null | usp_1/semana7/backup_funciona_mas_nao_valida.py | dialup/py | 758da136b16c00a6c4f50191e233a9428bf64698 | [
"BSD-2-Clause"
] | null | null | null | # vim: set fileencoding=utf-8 :
# -*- coding: utf-8 -*-
'''
Bem-vindo ao detector automático de COH-PIAH.
Entre o tamanho medio de palavra: 4.79
Entre a relação Type-Token: 0.72
Entre a Razão Hapax Legomana: 0.56
Entre o tamanho médio de sentença: 80.5
Entre a complexidade média da sentença: 2.5
Entre o tamanho medio... | 50.592784 | 765 | 0.7081 |
468a8ce89a4109ab5ab83ee39bbb0d5e06b93a55 | 2,241 | py | Python | Python/SplitSort.py | mcurlee3/3155Final | ea6a1b88a8e055a948c565317a92265f15c3a2bd | [
"MIT"
] | null | null | null | Python/SplitSort.py | mcurlee3/3155Final | ea6a1b88a8e055a948c565317a92265f15c3a2bd | [
"MIT"
] | null | null | null | Python/SplitSort.py | mcurlee3/3155Final | ea6a1b88a8e055a948c565317a92265f15c3a2bd | [
"MIT"
] | null | null | null | import pandas as pd
df_main = pd.read_csv("Data - General Data.csv")
cHappiness = df_main.sort_values(by='Happiness Value', ascending=False)
cGDP = df_main.sort_values(by='Logged GDP per capita', ascending=False)
cSocialSupport = df_main.sort_values(by='Social support', ascending=False)
cHLExpectancy = df_main.sort_va... | 36.737705 | 82 | 0.750112 |
1d03888d651467dfc4c9f9c388445115f357e222 | 4,320 | py | Python | ukpopulation/utils.py | ld-archer/ukpopulation | 620b2bf8ea5d4f8f02d98eaa94e7500e899d3c9d | [
"MIT"
] | 7 | 2019-01-30T01:05:18.000Z | 2022-01-27T10:35:06.000Z | ukpopulation/utils.py | ld-archer/ukpopulation | 620b2bf8ea5d4f8f02d98eaa94e7500e899d3c9d | [
"MIT"
] | 39 | 2018-05-24T20:40:00.000Z | 2020-11-04T12:22:37.000Z | ukpopulation/utils.py | nismod/population | 8decf6906ef686fd767ebf7013a60811d6052cb0 | [
"MIT"
] | 8 | 2018-06-22T14:34:13.000Z | 2021-07-07T09:42:38.000Z | """
Common utility functions for NPP/SNPP
"""
import os
import numpy as np
from pathlib import Path
# Country enumerations
EN = "en"
WA = "wa"
SC = "sc"
NI = "ni"
# Aggregations
EW = [EN, WA]
GB = [EN, WA, SC]
UK = [EN, WA, SC, NI]
# ONS country codes
CODES = {
EN: "E92000001",
WA: "W92000004",
SC: "S92... | 28.8 | 131 | 0.660648 |
fbf324105b3c8f76168e2492d7a2ca52f25c9708 | 504 | py | Python | scripts/01929.py | JihoChoi/BOJ | 08974a9db8ebaa299ace242e951cac53ab55fc4d | [
"MIT"
] | null | null | null | scripts/01929.py | JihoChoi/BOJ | 08974a9db8ebaa299ace242e951cac53ab55fc4d | [
"MIT"
] | null | null | null | scripts/01929.py | JihoChoi/BOJ | 08974a9db8ebaa299ace242e951cac53ab55fc4d | [
"MIT"
] | null | null | null | # Prime Numbers, Sieve of Eratosthenes
def prime_list(min_num, max_num):
sieve = [True] * (max_num + 1) # Sieve of Eratosthenes
m = int(max_num ** 0.5) # sqrt(n)
for i in range(2, m + 1):
if sieve[i] == True:
for j in range(i+i, max_num+1, i):
sieve[j] = False
siev... | 26.526316 | 69 | 0.573413 |
5cc103c7f72aa6568c8956eee39dafa3edf06c99 | 90,787 | py | Python | src/transformers/generation_tf_utils.py | liminghao1630/transformers | 207594be81b8e5a8589c8b11c3b236924555d806 | [
"Apache-2.0"
] | 3 | 2021-12-27T20:13:38.000Z | 2021-12-28T14:11:20.000Z | src/transformers/generation_tf_utils.py | liminghao1630/transformers | 207594be81b8e5a8589c8b11c3b236924555d806 | [
"Apache-2.0"
] | 2 | 2022-01-06T05:40:05.000Z | 2022-01-06T15:12:29.000Z | src/transformers/generation_tf_utils.py | liminghao1630/transformers | 207594be81b8e5a8589c8b11c3b236924555d806 | [
"Apache-2.0"
] | 3 | 2022-01-06T04:44:13.000Z | 2022-02-18T23:35:21.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, 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 cop... | 54.428657 | 246 | 0.648937 |
c9cf2d1661d5cb798210c5296069bd0428e11c35 | 3,938 | py | Python | salt/states/postgres_cluster.py | springborland/salt | bee85e477d57e9a171884e54fefb9a59d0835ed0 | [
"Apache-2.0"
] | 1 | 2020-04-09T03:25:10.000Z | 2020-04-09T03:25:10.000Z | salt/states/postgres_cluster.py | springborland/salt | bee85e477d57e9a171884e54fefb9a59d0835ed0 | [
"Apache-2.0"
] | null | null | null | salt/states/postgres_cluster.py | springborland/salt | bee85e477d57e9a171884e54fefb9a59d0835ed0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Management of PostgreSQL clusters
=================================
The postgres_cluster state module is used to manage PostgreSQL clusters.
Clusters can be set as either absent or present
.. code-block:: yaml
create cluster 9.3 main:
postgres_cluster.present:
- name: ... | 29.17037 | 85 | 0.577704 |
50272c5e8d3425d0781bd6a8c4dc96abd793a28f | 13,822 | py | Python | gluoncv/torch/engine/config/directpose.py | RafLit/gluon-cv | dae504a4de8fff1421fd4fe398accbe396c504cc | [
"Apache-2.0"
] | 5,447 | 2018-04-25T18:02:51.000Z | 2022-03-31T00:59:49.000Z | gluoncv/torch/engine/config/directpose.py | RafLit/gluon-cv | dae504a4de8fff1421fd4fe398accbe396c504cc | [
"Apache-2.0"
] | 1,566 | 2018-04-25T21:14:04.000Z | 2022-03-31T06:42:42.000Z | gluoncv/torch/engine/config/directpose.py | RafLit/gluon-cv | dae504a4de8fff1421fd4fe398accbe396c504cc | [
"Apache-2.0"
] | 1,345 | 2018-04-25T18:44:13.000Z | 2022-03-30T19:32:53.000Z | """Default setting in training/testing for directpose"""
from yacs.config import CfgNode as CN
_C = CN()
# ---------------------------------------------------------------------------- #
# Distributed DataParallel setting: DDP_CONFIG
# ---------------------------------------------------------------------------- #
_C... | 43.465409 | 124 | 0.694979 |
57288f42dd7e8e6e3ac4ef3a45827697241f0422 | 54,521 | py | Python | django/db/models/query.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | django/db/models/query.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | django/db/models/query.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | """
The main QuerySet implementation. This provides the public API for the ORM.
"""
import copy
from itertools import izip
from django.db import connections, router, transaction, IntegrityError
from django.db.models.aggregates import Aggregate
from django.db.models.fields import DateField
from django.db.models.query_... | 37.420041 | 127 | 0.585829 |
187264e6f737e91433e82d4012d55ad6d9662853 | 3,108 | py | Python | demos/python_demos/accuracy_checker/accuracy_checker/postprocessor/correct_yolo_v2_boxes.py | asmorkalov/open_model_zoo | 633b84eafee670c97d0da6985fbc76c2143fc7ae | [
"Apache-2.0"
] | 2 | 2019-05-21T06:31:41.000Z | 2019-06-12T07:47:18.000Z | demos/python_demos/accuracy_checker/accuracy_checker/postprocessor/correct_yolo_v2_boxes.py | asmorkalov/open_model_zoo | 633b84eafee670c97d0da6985fbc76c2143fc7ae | [
"Apache-2.0"
] | 1 | 2021-03-19T12:30:19.000Z | 2021-03-22T12:14:31.000Z | demos/python_demos/accuracy_checker/accuracy_checker/postprocessor/correct_yolo_v2_boxes.py | asmorkalov/open_model_zoo | 633b84eafee670c97d0da6985fbc76c2143fc7ae | [
"Apache-2.0"
] | 2 | 2019-06-12T10:28:32.000Z | 2019-06-17T21:47:54.000Z | """
Copyright (c) 2018 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,... | 42 | 108 | 0.632561 |
d926903d50dfe3dfd61aa6531f888fff71bb7063 | 1,163 | py | Python | reservation_units/migrations/0026_reservation_unit_purpose.py | SuviVappula/tilavarauspalvelu-core | ad7dec36e392a7b2927e2f825c3b0eb29b700793 | [
"MIT"
] | null | null | null | reservation_units/migrations/0026_reservation_unit_purpose.py | SuviVappula/tilavarauspalvelu-core | ad7dec36e392a7b2927e2f825c3b0eb29b700793 | [
"MIT"
] | null | null | null | reservation_units/migrations/0026_reservation_unit_purpose.py | SuviVappula/tilavarauspalvelu-core | ad7dec36e392a7b2927e2f825c3b0eb29b700793 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.13 on 2021-11-05 12:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('reservation_units', '0025_reservationunit_hauki_resource_id'),
]
operations = [
migrations.CreateModel(
name='ReservationUnitPu... | 35.242424 | 159 | 0.607911 |
de5b9afce2e5389bc6f529373b47811d6da025e6 | 2,208 | py | Python | bootcamp/wiki/plugins/macros/mdx/wikilinks.py | basiltiger/easy_bootcamp | 875b9ed287f1a7824bb38f142dbe2f3b1ce54389 | [
"MIT"
] | null | null | null | bootcamp/wiki/plugins/macros/mdx/wikilinks.py | basiltiger/easy_bootcamp | 875b9ed287f1a7824bb38f142dbe2f3b1ce54389 | [
"MIT"
] | null | null | null | bootcamp/wiki/plugins/macros/mdx/wikilinks.py | basiltiger/easy_bootcamp | 875b9ed287f1a7824bb38f142dbe2f3b1ce54389 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Extend the shipped Markdown extension 'wikilinks'
"""
from __future__ import unicode_literals
import re
import markdown
from django.core.urlresolvers import reverse
from markdown.extensions import wikilinks
def build_url(label, base, end, md):
""" Build a url from the label, a base, an... | 32.470588 | 79 | 0.597373 |
6027d3dd4e0b0437a19803124ff72d6b8d67c0bf | 7,717 | py | Python | src/transformers/models/performer/__init__.py | valgi0/transformers | d90c84726f13a81766c65f5759894e282ef7941f | [
"Apache-2.0"
] | null | null | null | src/transformers/models/performer/__init__.py | valgi0/transformers | d90c84726f13a81766c65f5759894e282ef7941f | [
"Apache-2.0"
] | null | null | null | src/transformers/models/performer/__init__.py | valgi0/transformers | d90c84726f13a81766c65f5759894e282ef7941f | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | 39.574359 | 115 | 0.711157 |
98b0ecc9b9f5ef1d14a4c2471b88a6a1329cf594 | 1,537 | py | Python | jdcloud_sdk/services/cps/apis/DescribeOSRequest.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | jdcloud_sdk/services/cps/apis/DescribeOSRequest.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | jdcloud_sdk/services/cps/apis/DescribeOSRequest.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 30.137255 | 85 | 0.698113 |
7c5573b4a9586ef01e1f762566b8c02919caea9d | 2,595 | py | Python | pysm/pydebug/debug_prediction.py | binh-vu/semantic-modeling | b387584502ba1daa6abd6b7573828416f6426b49 | [
"MIT"
] | 3 | 2019-10-31T15:26:20.000Z | 2022-03-03T06:04:03.000Z | pysm/pydebug/debug_prediction.py | binh-vu/semantic-modeling | b387584502ba1daa6abd6b7573828416f6426b49 | [
"MIT"
] | 1 | 2021-10-05T14:57:29.000Z | 2022-03-27T01:58:41.000Z | pysm/pydebug/debug_prediction.py | binh-vu/semantic-modeling | b387584502ba1daa6abd6b7573828416f6426b49 | [
"MIT"
] | null | null | null | import shutil
import ujson, sys
from typing import *
from pathlib import Path
from multiprocessing.pool import ThreadPool
from data_structure import *
from semantic_modeling.config import config
from semantic_modeling.data_io import *
from semantic_modeling.assembling.autolabel.auto_label import AutoLabel
from pydebug.... | 37.608696 | 102 | 0.676686 |
f3e2ee03f38af4d08c574c969b50b9b6391fc303 | 7,391 | bzl | Python | src/main/starlark/release_archive/repository.bzl | mai93/rules_kotlin | cb1c71911bb9880d94102dc0caa85f8ec43abb23 | [
"Apache-2.0"
] | null | null | null | src/main/starlark/release_archive/repository.bzl | mai93/rules_kotlin | cb1c71911bb9880d94102dc0caa85f8ec43abb23 | [
"Apache-2.0"
] | null | null | null | src/main/starlark/release_archive/repository.bzl | mai93/rules_kotlin | cb1c71911bb9880d94102dc0caa85f8ec43abb23 | [
"Apache-2.0"
] | null | null | null | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
versions = struct(
RULES_KOTLIN = struct(
urls = [
"https://github.com/bazelbuild/rules_kotlin/archive/v1.5.0-beta-3.zip",
],
sha256 = "d8650bb939d... | 37.517766 | 102 | 0.630767 |
a066df256c0659c5d61828ed7ca117055a00600f | 956 | py | Python | backend/migrations/versions/74f2bccb1af4_.py | rkc7h/ithriv | 7fa1edd7535510147578a8c3e7478968afd18a2e | [
"MIT"
] | null | null | null | backend/migrations/versions/74f2bccb1af4_.py | rkc7h/ithriv | 7fa1edd7535510147578a8c3e7478968afd18a2e | [
"MIT"
] | null | null | null | backend/migrations/versions/74f2bccb1af4_.py | rkc7h/ithriv | 7fa1edd7535510147578a8c3e7478968afd18a2e | [
"MIT"
] | 1 | 2021-02-10T18:17:09.000Z | 2021-02-10T18:17:09.000Z | """empty message
Revision ID: 74f2bccb1af4
Revises: 4a97b5eabce9
Create Date: 2018-05-29 09:17:52.862709
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '74f2bccb1af4'
down_revision = '4a97b5eabce9'
branch_labels = None
depends_on = None
def upgrade():
# ... | 26.555556 | 65 | 0.686192 |
f41f98de15c108d3bbd3e3378df5cce03f3ed1d8 | 4,649 | py | Python | qiskit/aqua/circuits/weighted_sum_operator.py | stefan-woerner/aqua | 12e1b867e254977d9c5992612a7919d8fe016cb4 | [
"Apache-2.0"
] | 504 | 2018-12-15T16:34:03.000Z | 2022-03-26T11:24:53.000Z | qiskit/aqua/circuits/weighted_sum_operator.py | stefan-woerner/aqua | 12e1b867e254977d9c5992612a7919d8fe016cb4 | [
"Apache-2.0"
] | 746 | 2018-12-16T16:44:42.000Z | 2021-07-10T16:59:43.000Z | qiskit/aqua/circuits/weighted_sum_operator.py | stefan-woerner/aqua | 12e1b867e254977d9c5992612a7919d8fe016cb4 | [
"Apache-2.0"
] | 421 | 2018-12-22T14:49:00.000Z | 2022-03-04T09:47:07.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2019, 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 37.796748 | 99 | 0.637556 |
17732d448b28cc484c9e158c4bb544e071711d83 | 2,023 | py | Python | ismore/invasive/analysis/quick_process_BA.py | srsummerson/bmi_python | 7eca891f078ce15b2b9cf85f1309346d6fb9fccb | [
"Apache-2.0"
] | null | null | null | ismore/invasive/analysis/quick_process_BA.py | srsummerson/bmi_python | 7eca891f078ce15b2b9cf85f1309346d6fb9fccb | [
"Apache-2.0"
] | 12 | 2020-07-31T18:58:31.000Z | 2022-02-10T14:36:00.000Z | ismore/invasive/analysis/quick_process_BA.py | srsummerson/bmi_python | 7eca891f078ce15b2b9cf85f1309346d6fb9fccb | [
"Apache-2.0"
] | 4 | 2020-03-06T15:39:00.000Z | 2021-05-26T17:03:21.000Z | from ismore import brainamp_channel_lists
from db import dbfunctions as dbfn
import numpy as np
import scipy.signal
import tables
def get_filtered_data(te = 11198, chan_names = brainamp_channel_lists.sleep_mont_new):
tsk = dbfn.TaskEntry(te)
supp = '/storage/supp_hdf/'+tsk.name+'.supp.hdf'
supp_hdf = tabl... | 29.75 | 86 | 0.588235 |
16e846fa2cbbcc800d204887d37154e5a8c8912c | 3,846 | py | Python | cos_fits_to_dat.py | davidjwilson/djw_hst_tools | 2832d9f27a3bc97e517d731cdfdeae5da772c1d9 | [
"MIT"
] | null | null | null | cos_fits_to_dat.py | davidjwilson/djw_hst_tools | 2832d9f27a3bc97e517d731cdfdeae5da772c1d9 | [
"MIT"
] | null | null | null | cos_fits_to_dat.py | davidjwilson/djw_hst_tools | 2832d9f27a3bc97e517d731cdfdeae5da772c1d9 | [
"MIT"
] | 1 | 2018-02-13T15:27:05.000Z | 2018-02-13T15:27:05.000Z | import numpy as np
import matplotlib.pyplot as plt
import os
import astropy.io.fits as fits
from astropy.convolution import convolve, Box1DKernel
import glob
"""
Extracts COS spectra from x1dsum.fits files and saves it as an ascii .dat file with columns wavelength, flux, error, dq
Usage:
call the function cos_fi... | 38.079208 | 178 | 0.651326 |
938570a07c94f813a26b3f30e5fc5600bdbc70fa | 8,688 | py | Python | cupy/statistics/meanvar.py | mnicely/cupy | 9ed1d0db1404e9baa3c139032515d6028078bc91 | [
"MIT"
] | 1 | 2020-12-27T13:06:35.000Z | 2020-12-27T13:06:35.000Z | cupy/statistics/meanvar.py | mnicely/cupy | 9ed1d0db1404e9baa3c139032515d6028078bc91 | [
"MIT"
] | 4 | 2020-09-15T01:49:38.000Z | 2020-12-11T03:52:35.000Z | cupy/statistics/meanvar.py | mnicely/cupy | 9ed1d0db1404e9baa3c139032515d6028078bc91 | [
"MIT"
] | 2 | 2018-07-21T13:44:26.000Z | 2019-03-25T11:30:16.000Z | import functools
import numpy
import cupy
from cupy.core import _routines_statistics as _statistics
def median(a, axis=None, out=None, overwrite_input=False, keepdims=False):
"""Compute the median along the specified axis.
Returns the median of the array elements.
Args:
a (cupy.ndarray): Array ... | 34.339921 | 79 | 0.610727 |
8a135a027036a2ccf9e9438e98b39ba2c4c7bd63 | 3,169 | py | Python | docker/dockerTrader/language/english/text.py | DongfengXu/VNPY | a42c6204ee20925ce09289380985a0c58dcd168b | [
"MIT"
] | null | null | null | docker/dockerTrader/language/english/text.py | DongfengXu/VNPY | a42c6204ee20925ce09289380985a0c58dcd168b | [
"MIT"
] | null | null | null | docker/dockerTrader/language/english/text.py | DongfengXu/VNPY | a42c6204ee20925ce09289380985a0c58dcd168b | [
"MIT"
] | null | null | null | # encoding: UTF-8
SAVE_DATA = 'Save Data'
CONTRACT_SYMBOL = 'Symbol'
CONTRACT_NAME = 'Name'
LAST_PRICE = 'Last'
PRE_CLOSE_PRICE = 'PreClose'
VOLUME = 'Volume'
OPEN_INTEREST = 'Open Interest'
OPEN_PRICE = 'Open'
HIGH_PRICE = 'High'
LOW_PRICE = 'Low'
TIME = 'Time'
GATEWAY = 'Gateway'
CONTENT = 'Content'
ERROR_CODE = u... | 23.649254 | 73 | 0.735563 |
86b0710ba94da5cdf40bb0ceacbfa3cf98a8ecb0 | 9,120 | py | Python | catalog_maker/cli.py | roocs/catalog-maker | 245c65520bdc3258783c47cacc70e6e1cf65f2fe | [
"BSD-3-Clause"
] | 1 | 2022-01-22T08:33:23.000Z | 2022-01-22T08:33:23.000Z | catalog_maker/cli.py | roocs/catalog-maker | 245c65520bdc3258783c47cacc70e6e1cf65f2fe | [
"BSD-3-Clause"
] | 7 | 2021-05-27T09:02:15.000Z | 2021-12-16T09:13:22.000Z | catalog_maker/cli.py | roocs/catalog-maker | 245c65520bdc3258783c47cacc70e6e1cf65f2fe | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Console script for roocs_utils.catalog_maker package."""
import argparse
import sys
from roocs_utils.project_utils import derive_ds_id
from catalog_maker import CONFIG, logging
from catalog_maker.batch import BatchManager
from catalog_maker.catalog import to_csv, updat... | 25.4039 | 120 | 0.636623 |
e6261b59628901eba95bf0f700d164b701a86979 | 4,169 | py | Python | tests/integration/test_when_kwarg_matching.py | P4rk/known_side_effects | 685285856ec2bdd8fcfc2326ecff0f9e7c26a4f8 | [
"MIT"
] | 8 | 2019-08-05T16:40:05.000Z | 2021-09-26T17:20:12.000Z | tests/integration/test_when_kwarg_matching.py | P4rk/known_side_effects | 685285856ec2bdd8fcfc2326ecff0f9e7c26a4f8 | [
"MIT"
] | 8 | 2019-07-08T17:53:59.000Z | 2020-11-19T05:38:21.000Z | tests/integration/test_when_kwarg_matching.py | P4rk/known_side_effects | 685285856ec2bdd8fcfc2326ecff0f9e7c26a4f8 | [
"MIT"
] | null | null | null | from unittest import TestCase
import known_side_effects
from unittest.mock import Mock
from parameterized import parameterized
from known_side_effects import UnmatchedArguments
from known_side_effects import AnyArg, NotNone
known_side_effects.extend(Mock)
class TestBasicKwargs(TestCase):
def setUp(self):
... | 28.360544 | 68 | 0.536819 |
d00792739bd6a675b9fdce7c0f3d8d5fb881de1e | 16,115 | py | Python | sheetshuttle/sheet_collector.py | noorbuchi/GridGopher | 84f7701439c60d8392b3d920babf2d7a345fb042 | [
"MIT"
] | 1 | 2022-02-08T20:37:55.000Z | 2022-02-08T20:37:55.000Z | sheetshuttle/sheet_collector.py | GatorEducator/SheetShuttle | 84f7701439c60d8392b3d920babf2d7a345fb042 | [
"MIT"
] | 15 | 2022-01-27T15:44:33.000Z | 2022-03-21T00:54:38.000Z | sheetshuttle/sheet_collector.py | noorbuchi/GridGopher | 84f7701439c60d8392b3d920babf2d7a345fb042 | [
"MIT"
] | null | null | null | """Set up object oriented structure for Google Sheet data retrieval."""
import json
import os
import pathlib
import pickle
from typing import Dict, List
import pandas as pd # type: ignore[import]
import yaml
from google.oauth2 import service_account # type: ignore[import]
from googleapiclient.discovery import build... | 36.132287 | 98 | 0.520447 |
64cf8370d0f690af80d5478898ea84ffec942bb8 | 8,849 | py | Python | do_make_db_tab_from_cornell_movie.py | davidcliebman68/awesome-chatbot | 64d3e201d519946c7c66a64b5143527d18506c3d | [
"MIT"
] | 1 | 2020-02-10T19:20:15.000Z | 2020-02-10T19:20:15.000Z | do_make_db_tab_from_cornell_movie.py | davidcliebman68/awesome-chatbot | 64d3e201d519946c7c66a64b5143527d18506c3d | [
"MIT"
] | null | null | null | do_make_db_tab_from_cornell_movie.py | davidcliebman68/awesome-chatbot | 64d3e201d519946c7c66a64b5143527d18506c3d | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import codecs
import sqlite3
import os
from datetime import datetime
import sys
import argparse
print(sys.argv)
if len(sys.argv) > 1:
txtname = sys.argv[1]
print(txtname)
print('this first arg should be the path to the movie corpus file.')
parser = argparse.ArgumentParser(description=... | 34.701961 | 238 | 0.545259 |
0432919330f9b6ab907a06c40a7319f1339a6c99 | 8,399 | py | Python | util/generateCoverage.py | abostico/former2 | 1056e64c55c1940103253da093a800eeae31994b | [
"MIT"
] | null | null | null | util/generateCoverage.py | abostico/former2 | 1056e64c55c1940103253da093a800eeae31994b | [
"MIT"
] | null | null | null | util/generateCoverage.py | abostico/former2 | 1056e64c55c1940103253da093a800eeae31994b | [
"MIT"
] | null | null | null | import os
import json
import pprint
import math
import re
import collections
services = None
cfn_spec = None
tf_resources = []
cfn_types = []
cfn_occurances = []
tf_occurances = []
cfn_exceptions = {
'AWS::CloudFormation::CustomResource': 'N/A',
'AWS::CloudFormation::Macro': 'N/A',
'AWS::CloudFormation::S... | 38.705069 | 134 | 0.573044 |
e32d7d2596038d415d8a9a75e0363fec8789ab55 | 1,528 | py | Python | demo/05_curve_field_demo.py | bond-anton/Space | ac107d88f79fed544a58b868f87375a210e9913e | [
"Apache-2.0"
] | null | null | null | demo/05_curve_field_demo.py | bond-anton/Space | ac107d88f79fed544a58b868f87375a210e9913e | [
"Apache-2.0"
] | 9 | 2016-02-15T06:26:52.000Z | 2016-04-10T17:26:23.000Z | demo/05_curve_field_demo.py | bond-anton/BDSpace | ac107d88f79fed544a58b868f87375a210e9913e | [
"Apache-2.0"
] | null | null | null | import numpy as np
from BDSpace.Coordinates import Cartesian
from BDSpace import Space
from BDSpace.Curve.Parametric import Helix
from BDSpace.Field import HyperbolicPotentialCurveConservativeField
import BDSpaceVis as Visual
from mayavi import mlab
space = Space('Charged helix')
coordinate_system = Cartesian()
coor... | 35.534884 | 99 | 0.709424 |
6c1cc469d247589232732187c10468535f3f2965 | 20,553 | py | Python | sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/_vaults_operations.py | JianpingChen/azure-sdk-for-python | 3072fc8c0366287fbaea1b02493a50259c3248a2 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/_vaults_operations.py | JianpingChen/azure-sdk-for-python | 3072fc8c0366287fbaea1b02493a50259c3248a2 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/_vaults_operations.py | JianpingChen/azure-sdk-for-python | 3072fc8c0366287fbaea1b02493a50259c3248a2 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 46.186517 | 181 | 0.651535 |
4192c8c2ba38d7c3e9e4a9a39c5a2cff4e0c2624 | 1,376 | py | Python | SerialController/Commands/PythonCommands/ImageProcessingOnly/JPN_Repop_Shiny.py | junkypoke/Poke-Controller | 2303b8444d82cbd1a5cdfea241e57fdad2a837c6 | [
"MIT"
] | 2 | 2021-04-21T13:23:03.000Z | 2021-04-21T13:23:06.000Z | SerialController/Commands/PythonCommands/ImageProcessingOnly/JPN_Repop_Shiny.py | junkypoke/Poke-Controller | 2303b8444d82cbd1a5cdfea241e57fdad2a837c6 | [
"MIT"
] | null | null | null | SerialController/Commands/PythonCommands/ImageProcessingOnly/JPN_Repop_Shiny.py | junkypoke/Poke-Controller | 2303b8444d82cbd1a5cdfea241e57fdad2a837c6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from Commands.PythonCommandBase import PythonCommand, ImageProcPythonCommand
from Commands.Keys import KeyPress, Button, Direction, Stick, Hat
class AutoEncount(ImageProcPythonCommand):
NAME = 'JPN(漢字)_リポップ色違い厳選'
def __init__(self,cam):
super().__init__(... | 35.282051 | 106 | 0.521802 |
b98cbd97b5ca94dc550e860c58a5d767c05e55a5 | 21,681 | py | Python | medium_to_ghost/medium_post_parser.py | ageitgey/medium_to_ghost | 0403e8e7b005e1b5af78b4ae58199d3b513416cc | [
"MIT"
] | 120 | 2018-08-30T02:38:49.000Z | 2021-11-09T10:16:33.000Z | medium_to_ghost/medium_post_parser.py | ageitgey/medium_to_ghost | 0403e8e7b005e1b5af78b4ae58199d3b513416cc | [
"MIT"
] | 17 | 2018-08-29T12:40:31.000Z | 2021-01-04T13:14:27.000Z | medium_to_ghost/medium_post_parser.py | ageitgey/medium_to_ghost | 0403e8e7b005e1b5af78b4ae58199d3b513416cc | [
"MIT"
] | 15 | 2018-08-29T15:55:09.000Z | 2021-12-17T06:00:39.000Z | from html.parser import HTMLParser
import json
from medium_to_ghost.image_downloader import download_image_with_local_cache
from bs4 import BeautifulSoup
import logging
from pathlib import Path
def parse_medium_filename(filename):
status = "published"
date, slug = filename.split("_")
slug = slug.split(".... | 42.595285 | 127 | 0.586458 |
cb8c12b6f39669b6d5d1a576a6f598d29ff87bab | 4,245 | py | Python | user/models.py | Mhs-220/NetworkSecurityProject | 20dc7fcafc4647a15670a813cbdfefa66b7cda56 | [
"MIT"
] | null | null | null | user/models.py | Mhs-220/NetworkSecurityProject | 20dc7fcafc4647a15670a813cbdfefa66b7cda56 | [
"MIT"
] | null | null | null | user/models.py | Mhs-220/NetworkSecurityProject | 20dc7fcafc4647a15670a813cbdfefa66b7cda56 | [
"MIT"
] | null | null | null | import os
import hashlib
import binascii
import hmac
import base64
import sqlite3
from sqlite3 import Error, IntegrityError, OperationalError
from manager import db_path
from db.injection import escape_sql_injection
def valid_login(username, password, saved_hmac):
conn = sqlite3.connect(db_path)
crsr = con... | 33.690476 | 118 | 0.655359 |
4d4bfaee3341919fa20bf5307e43547abaa65fbf | 5,102 | py | Python | python/setup.py | mrapplexz/triton | 38b8f48a88a82aa73cd00c8d08923dc8763b26ac | [
"MIT"
] | null | null | null | python/setup.py | mrapplexz/triton | 38b8f48a88a82aa73cd00c8d08923dc8763b26ac | [
"MIT"
] | null | null | null | python/setup.py | mrapplexz/triton | 38b8f48a88a82aa73cd00c8d08923dc8763b26ac | [
"MIT"
] | null | null | null | import os
import re
import sys
import sysconfig
import platform
import subprocess
import distutils
import glob
from distutils.version import LooseVersion
from setuptools import setup, Extension, find_packages
from torch.utils.cpp_extension import include_paths, library_paths
from setuptools.command.build_ext import bui... | 42.165289 | 146 | 0.636417 |
74fbcf37f68537547fb1cd4d65d377df4859185f | 871 | py | Python | test/test_FakeStateMachine-runCondition.py | GetThematic/step-functions-state-machine | afd4d84d01b07a0df4bb81279ea6cc1688e07506 | [
"Apache-2.0"
] | null | null | null | test/test_FakeStateMachine-runCondition.py | GetThematic/step-functions-state-machine | afd4d84d01b07a0df4bb81279ea6cc1688e07506 | [
"Apache-2.0"
] | null | null | null | test/test_FakeStateMachine-runCondition.py | GetThematic/step-functions-state-machine | afd4d84d01b07a0df4bb81279ea6cc1688e07506 | [
"Apache-2.0"
] | null | null | null | import pytest
import step_functions_local
from step_functions_local.state_machine import RunStateResult
from .utils import load_fixture, increment
def test_runCondition():
definition = load_fixture("./fixtures/definitions/states-with-common-prefix.json", validate=False)
state_machine = step_functions_local.... | 43.55 | 156 | 0.732491 |
1fb218d753edcea802bfc93ff09353bc2cebac8d | 10,144 | py | Python | models/flowplusplus/nn.py | guillefix/mt-lightning | 56e93a569d85a768c178b15461e5362c25fdc3e3 | [
"MIT"
] | 46 | 2021-06-29T01:30:59.000Z | 2022-02-21T14:07:43.000Z | models/flowplusplus/nn.py | guillefix/mt-lightning | 56e93a569d85a768c178b15461e5362c25fdc3e3 | [
"MIT"
] | 4 | 2021-07-08T06:34:09.000Z | 2022-02-08T12:56:20.000Z | models/flowplusplus/nn.py | guillefix/transflower-lightning | 56e93a569d85a768c178b15461e5362c25fdc3e3 | [
"MIT"
] | 5 | 2021-07-14T03:18:37.000Z | 2021-11-18T08:14:05.000Z | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils import weight_norm
from models.util import concat_elu, WNConv2d
class NN(nn.Module):
"""Neural network used to parametrize the transformations of an MLCoupling.
An `NN` is a stack of blocks, where each block co... | 37.850746 | 137 | 0.603411 |
fee26a01bf41b82c45ffa499419d0ae43db6c3ae | 6,031 | py | Python | scripts/email_users_with_invalidated_externalaccounts.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | 1 | 2015-10-02T18:35:53.000Z | 2015-10-02T18:35:53.000Z | scripts/email_users_with_invalidated_externalaccounts.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | 4 | 2016-05-13T14:24:16.000Z | 2017-03-30T15:28:31.000Z | scripts/email_users_with_invalidated_externalaccounts.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | null | null | null | import argparse
import logging
from framework.mongo import database
from framework.email import tasks
from framework.transactions.context import TokuTransaction
from scripts import utils as script_utils
from website.app import init_app
from website import settings
logger = logging.getLogger(__name__)
EMAILS_SENT_TO =... | 44.674074 | 437 | 0.66523 |
b5bccd59d7dad369bc1873ee738a5bfdafc9ad2b | 553 | py | Python | dpaybase/chains.py | dpays/dpay-python | 09218d2edc6361a0ebe8095b13c30d59b31a051c | [
"MIT"
] | null | null | null | dpaybase/chains.py | dpays/dpay-python | 09218d2edc6361a0ebe8095b13c30d59b31a051c | [
"MIT"
] | null | null | null | dpaybase/chains.py | dpays/dpay-python | 09218d2edc6361a0ebe8095b13c30d59b31a051c | [
"MIT"
] | null | null | null | default_prefix = "DWB"
known_chains = {
"BEX": {
"chain_id": "38f14b346eb697ba04ae0f5adcfaa0a437ed3711197704aa256a14cb9b4a8f26",
"prefix": "DWB",
"dpay_symbol": "BEX",
"bbd_symbol": "BBD",
"vests_symbol": "VESTS",
},
"BET": {
"chain_id":
"9afbce9f... | 23.041667 | 87 | 0.515371 |
81c4fb9b35014644d1412f23f7c634dbcc94b735 | 4,014 | py | Python | glue_jupyter/widgets/subset_select_vuetify.py | Carifio24/glue-jupyter | 4c859da2a3360af11ddd32c77bcef042a2bac984 | [
"BSD-3-Clause"
] | 1 | 2022-01-28T21:32:48.000Z | 2022-01-28T21:32:48.000Z | glue_jupyter/widgets/subset_select_vuetify.py | Carifio24/glue-jupyter | 4c859da2a3360af11ddd32c77bcef042a2bac984 | [
"BSD-3-Clause"
] | 7 | 2022-03-23T14:47:41.000Z | 2022-03-23T15:16:58.000Z | glue_jupyter/widgets/subset_select_vuetify.py | Carifio24/glue-jupyter | 4c859da2a3360af11ddd32c77bcef042a2bac984 | [
"BSD-3-Clause"
] | null | null | null | import ipyvuetify as v
import traitlets
from glue.core import message as msg
from glue.core.hub import HubListener
__all__ = ['SubsetSelect']
def subset_to_dict(subset):
return {
'label': subset.label,
'color': subset.style.color
}
class SubsetSelect(v.VuetifyTemplate, HubListener):
""... | 37.166667 | 100 | 0.619581 |
669ab2863fc218161b5b4cd01dbc49a7fc1b5b39 | 1,993 | py | Python | aidet/model/arch/nanodet_plus.py | zcl912/AIdetection | 54fa6fea92fd63540ca372ccdc70bc201aac8b52 | [
"Apache-2.0"
] | null | null | null | aidet/model/arch/nanodet_plus.py | zcl912/AIdetection | 54fa6fea92fd63540ca372ccdc70bc201aac8b52 | [
"Apache-2.0"
] | null | null | null | aidet/model/arch/nanodet_plus.py | zcl912/AIdetection | 54fa6fea92fd63540ca372ccdc70bc201aac8b52 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 zcl
#
# 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... | 33.216667 | 88 | 0.637732 |
9562a7c6295c87a79eef41ce673b2e9516aa867a | 42,610 | py | Python | ProjectFiles/bin/Release/2.80/scripts/addons_contrib/io_atomblend_utilities/io_atomblend_utilities.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2019-07-08T15:51:14.000Z | 2019-07-08T15:51:14.000Z | ProjectFiles/bin/Release/2.80/scripts/addons_contrib/io_atomblend_utilities/io_atomblend_utilities.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | ProjectFiles/bin/Release/2.80/scripts/addons_contrib/io_atomblend_utilities/io_atomblend_utilities.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 45.378062 | 136 | 0.524314 |
d139b41d843ddb7e3c455e5da52cc54492f059a9 | 1,620 | py | Python | packages/python/plotly/plotly/validators/scatterternary/unselected/marker/__init__.py | sgn/plotly.py | 587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6 | [
"MIT"
] | 3 | 2020-02-04T21:39:20.000Z | 2020-11-17T19:07:07.000Z | packages/python/plotly/plotly/validators/scatterternary/unselected/marker/__init__.py | sgn/plotly.py | 587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6 | [
"MIT"
] | 12 | 2020-06-06T01:22:26.000Z | 2022-03-12T00:13:42.000Z | packages/python/plotly/plotly/validators/scatterternary/unselected/marker/__init__.py | sgn/plotly.py | 587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6 | [
"MIT"
] | 17 | 2019-11-21T14:11:29.000Z | 2019-11-21T15:26:23.000Z | import _plotly_utils.basevalidators
class SizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self,
plotly_name="size",
parent_name="scatterternary.unselected.marker",
**kwargs
):
super(SizeValidator, self).__init__(
plotly_name=plotly... | 27.457627 | 69 | 0.599383 |
d2fe30975a215ca7e33cb6e93c0d27bef6e80c0f | 6,469 | py | Python | awx/main/tests/unit/utils/test_common.py | fimbaz/awx | 0c637e7979eb0b08ac673a073adf3b3ce2a9acd6 | [
"Apache-2.0"
] | null | null | null | awx/main/tests/unit/utils/test_common.py | fimbaz/awx | 0c637e7979eb0b08ac673a073adf3b3ce2a9acd6 | [
"Apache-2.0"
] | null | null | null | awx/main/tests/unit/utils/test_common.py | fimbaz/awx | 0c637e7979eb0b08ac673a073adf3b3ce2a9acd6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2017 Ansible, Inc.
# All Rights Reserved.
import os
import pytest
from uuid import uuid4
import json
import yaml
from unittest import mock
from backports.tempfile import TemporaryDirectory
from django.conf import settings
from rest_framework.exceptions import ParseError
from ... | 30.088372 | 102 | 0.666873 |
8f12cfac870965d26e70c867bcb559535ec9b512 | 4,266 | py | Python | tests/minimize_test.py | dominicrufa/jax-md | ef427b235ae02646d476b02e2bc05e4f278388af | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tests/minimize_test.py | dominicrufa/jax-md | ef427b235ae02646d476b02e2bc05e4f278388af | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tests/minimize_test.py | dominicrufa/jax-md | ef427b235ae02646d476b02e2bc05e4f278388af | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2019 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 31.6 | 77 | 0.641585 |
16c857e5e35094de7eda63b376413524a2a63e89 | 3,614 | py | Python | tests/test_creation.py | equancy/cookiecutter-data-science-project | 889d918da941c4c95b4cb6f858eff8f2023bb6ae | [
"MIT"
] | null | null | null | tests/test_creation.py | equancy/cookiecutter-data-science-project | 889d918da941c4c95b4cb6f858eff8f2023bb6ae | [
"MIT"
] | null | null | null | tests/test_creation.py | equancy/cookiecutter-data-science-project | 889d918da941c4c95b4cb6f858eff8f2023bb6ae | [
"MIT"
] | null | null | null | import os
import pytest
from subprocess import check_output
from conftest import system_check
def no_curlies(filepath):
""" Utility to make sure no curly braces appear in a file.
That is, was jinja able to render everthing?
"""
with open(filepath, 'r') as f:
data = f.read()
template_s... | 30.116667 | 78 | 0.55285 |
47a2c61c839129950648309ad0bfdfbc2ca0c63f | 5,851 | py | Python | itests/pages/service_accounts.py | aneeq009/merou | 7a87b43aaf64244932fa460842132a2d9329e704 | [
"Apache-2.0"
] | 58 | 2017-05-26T06:46:24.000Z | 2022-03-25T20:55:51.000Z | itests/pages/service_accounts.py | aneeq009/merou | 7a87b43aaf64244932fa460842132a2d9329e704 | [
"Apache-2.0"
] | 74 | 2017-06-16T17:48:37.000Z | 2022-03-28T23:09:54.000Z | itests/pages/service_accounts.py | aneeq009/merou | 7a87b43aaf64244932fa460842132a2d9329e704 | [
"Apache-2.0"
] | 43 | 2017-05-20T22:11:51.000Z | 2022-03-25T00:24:56.000Z | from __future__ import annotations
from typing import TYPE_CHECKING
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.select import Select
from itests.pages.base import BaseElement, BaseModal, BasePage
if TYPE_CHECKING:
from selenium.webdriver.remote.webelement import WebElement
... | 30.957672 | 80 | 0.669971 |
d21f85ad2560f358496871cf3e890c67ebe69814 | 8,453 | py | Python | test/functional/ncc_searchlog_restart_node.py | nccproject/ncc | 068ccc82a73d28136546095261ad8ccef7e541a3 | [
"MIT"
] | null | null | null | test/functional/ncc_searchlog_restart_node.py | nccproject/ncc | 068ccc82a73d28136546095261ad8ccef7e541a3 | [
"MIT"
] | null | null | null | test/functional/ncc_searchlog_restart_node.py | nccproject/ncc | 068ccc82a73d28136546095261ad8ccef7e541a3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
from tes... | 57.89726 | 1,470 | 0.774636 |
614b63dd099154607d80cc286da707582db19911 | 1,115 | py | Python | app/api/v1/tokens.py | camisatx/flasker | affc9fc13742e18434961b8ec15f133cc246dcd5 | [
"MIT"
] | 3 | 2020-12-12T01:30:08.000Z | 2021-10-13T16:47:56.000Z | app/api/v1/tokens.py | camisatx/flasker | affc9fc13742e18434961b8ec15f133cc246dcd5 | [
"MIT"
] | null | null | null | app/api/v1/tokens.py | camisatx/flasker | affc9fc13742e18434961b8ec15f133cc246dcd5 | [
"MIT"
] | 1 | 2020-12-12T01:30:13.000Z | 2020-12-12T01:30:13.000Z | from flask import g, jsonify
from app import db
from app.api.v1 import bp
from app.api.v1.auth import basic_auth, token_auth
@bp.route('/tokens', methods=['GET'])
@token_auth.login_required
def check_token():
"""Check if the user's token is still active. If they are able to login
with it, then the token is a... | 27.195122 | 75 | 0.682511 |
141f0ed591cd5c490a67c5ad2d87f68a8f4d80bf | 1,747 | py | Python | src/Chapter13/Exercise7.py | djeada/thinkpython | e8f6e83cfb36ec80f7f27e1aa3f08a0bf541a6a3 | [
"MIT"
] | 3 | 2019-11-10T15:32:52.000Z | 2019-11-20T21:47:31.000Z | src/Chapter13/Exercise7.py | djeada/thinkpython | e8f6e83cfb36ec80f7f27e1aa3f08a0bf541a6a3 | [
"MIT"
] | null | null | null | src/Chapter13/Exercise7.py | djeada/thinkpython | e8f6e83cfb36ec80f7f27e1aa3f08a0bf541a6a3 | [
"MIT"
] | null | null | null | """
Exercise 7
This algorithm works, but it is not very efficient; each time you choose a
random word, it rebuilds the list, which is as big as the original book. An
obvious improvement is to build the list once and then make multiple selections,
but the list is still big.
An alternative is:
Use keys to get ... | 28.639344 | 81 | 0.646251 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.