hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a165d7edf0cd5d351db2dc85677d2a528c744d9 | 1,058 | py | Python | util/tools.py | damogranlabs/classy_blocks | 5f23cc2d391c6c7487045b1ce9a01ad3c5ea0b55 | [
"MIT"
] | 32 | 2020-06-16T11:06:11.000Z | 2022-03-19T14:31:24.000Z | util/tools.py | damogranlabs/classy_blocks | 5f23cc2d391c6c7487045b1ce9a01ad3c5ea0b55 | [
"MIT"
] | 12 | 2020-12-04T08:24:23.000Z | 2022-03-21T06:40:33.000Z | util/tools.py | damogranlabs/classy_blocks | 5f23cc2d391c6c7487045b1ce9a01ad3c5ea0b55 | [
"MIT"
] | 12 | 2020-11-19T16:18:18.000Z | 2022-03-03T08:37:35.000Z | import jinja2
import numpy as np
# mesh utils
def template_to_dict(template_path, dict_path, context):
""" renders template with context to product a dictionary (or anything else) """
template_file = open(template_path, "r")
template_text = template_file.read()
template_file.close()
template = jin... | 35.266667 | 99 | 0.710775 |
4a165e45c68e8becdae59b5f3ef5e9739ddb0fac | 145 | py | Python | pyplotlm/tools.py | esmondhkchu/pyplotlm | 23de6f133ef792588964aaa45f08e06dee2e9ff8 | [
"MIT"
] | null | null | null | pyplotlm/tools.py | esmondhkchu/pyplotlm | 23de6f133ef792588964aaa45f08e06dee2e9ff8 | [
"MIT"
] | null | null | null | pyplotlm/tools.py | esmondhkchu/pyplotlm | 23de6f133ef792588964aaa45f08e06dee2e9ff8 | [
"MIT"
] | null | null | null | class Error(Exception):
""" base class
"""
pass
class DimensionError(Error):
""" raise when dimension mismatch
"""
pass
| 14.5 | 37 | 0.593103 |
4a165e86577f180dae63bb1ba4ab53126ee6e3a6 | 17,953 | py | Python | yt/frontends/ramses/field_handlers.py | tukss/yt | 8bf6fce609cad3d4b291ebd94667019ab2e18377 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/frontends/ramses/field_handlers.py | tukss/yt | 8bf6fce609cad3d4b291ebd94667019ab2e18377 | [
"BSD-3-Clause-Clear"
] | 8 | 2020-04-02T16:51:49.000Z | 2022-01-11T14:12:44.000Z | yt/frontends/ramses/field_handlers.py | tukss/yt | 8bf6fce609cad3d4b291ebd94667019ab2e18377 | [
"BSD-3-Clause-Clear"
] | 2 | 2020-08-12T15:46:11.000Z | 2021-02-09T13:09:17.000Z | import abc
import glob
import os
from yt.config import ytcfg
from yt.funcs import mylog
from yt.utilities.cython_fortran_utils import FortranFile
from .io import _read_fluid_file_descriptor
from .io_utils import read_offset
FIELD_HANDLERS = set()
def get_field_handlers():
return FIELD_HANDLERS
def register_f... | 31.331588 | 88 | 0.526709 |
4a165f815b17b7bc7a2911f9d2de8c31b3135a71 | 5,375 | py | Python | onegeo_api/utils.py | neogeo-technologies/onegeo-api | a6b1801f691098b8213f0c06fd9e3e374c4cf4a0 | [
"Apache-2.0"
] | null | null | null | onegeo_api/utils.py | neogeo-technologies/onegeo-api | a6b1801f691098b8213f0c06fd9e3e374c4cf4a0 | [
"Apache-2.0"
] | null | null | null | onegeo_api/utils.py | neogeo-technologies/onegeo-api | a6b1801f691098b8213f0c06fd9e3e374c4cf4a0 | [
"Apache-2.0"
] | 1 | 2019-10-18T13:52:03.000Z | 2019-10-18T13:52:03.000Z | # Copyright (c) 2017-2019 Neogeo-Technologies.
# 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... | 32.77439 | 91 | 0.571721 |
4a1660f90d1db1bfaa16dfddf4a5ddf2f913db43 | 2,254 | bzl | Python | config/config.bzl | zeroxoneb/antlir | 811d88965610d16a5c85d831d317f087797ca732 | [
"MIT"
] | 28 | 2020-08-11T16:22:46.000Z | 2022-03-04T15:41:52.000Z | config/config.bzl | zeroxoneb/antlir | 811d88965610d16a5c85d831d317f087797ca732 | [
"MIT"
] | 137 | 2020-08-11T16:07:49.000Z | 2022-02-27T10:59:05.000Z | config/config.bzl | zeroxoneb/antlir | 811d88965610d16a5c85d831d317f087797ca732 | [
"MIT"
] | 10 | 2020-09-10T00:01:28.000Z | 2022-03-08T18:00:28.000Z | # 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.
# This dict is imported into `//antlir/bzl:constants.bzl` to provide per
# repository configuration.
do_not_use_repo_cfg = {
"antlir_linux... | 40.981818 | 87 | 0.635759 |
4a16610e990af86131080a26abedf4b4dc18ac62 | 1,731 | py | Python | jsuarez/MPIUtils.py | jarbus/neural-mmo | 7ad02fab50f2781c0a71f7d2afd10c1503110736 | [
"MIT"
] | 1,450 | 2019-03-04T15:47:38.000Z | 2022-03-30T03:33:35.000Z | jsuarez/MPIUtils.py | jarbus/neural-mmo | 7ad02fab50f2781c0a71f7d2afd10c1503110736 | [
"MIT"
] | 34 | 2019-03-05T09:50:38.000Z | 2021-08-31T15:20:27.000Z | jsuarez/MPIUtils.py | LaudateCorpus1/neural-mmo | a9a7c34a1fb24fbf252e2958bdb869c213e580a3 | [
"MIT"
] | 164 | 2019-03-04T16:09:19.000Z | 2022-02-26T15:43:40.000Z | #Author: Joseph Suarez
from pdb import set_trace as T
import sys, builtins
import numpy as np
from mpi4py import MPI
from mpi4py.MPI import COMM_WORLD as comm
MASTER = 0
SILENT = 1
ALL = 2
class LoadBalancer:
def __init__(self, cores):
self.nCores = len(cores)
self.cores = cores
self.loa... | 21.109756 | 59 | 0.649913 |
4a16635070e8956ec2175584c1cb3eecef76768d | 2,038 | py | Python | docs/DSDC/miniprez/OLD_MINIPREZ/tests/test_slide.py | thoppe/Presentation_Topics | e9aba07e9ab087b44e6044c6082ba8e873a9b4fd | [
"MIT"
] | 2 | 2018-12-03T17:03:19.000Z | 2018-12-10T16:42:39.000Z | docs/DSDC/miniprez/OLD_MINIPREZ/tests/test_slide.py | thoppe/Presentation_Topics_in_NLP | e9aba07e9ab087b44e6044c6082ba8e873a9b4fd | [
"MIT"
] | 1 | 2019-02-19T15:12:19.000Z | 2019-02-19T15:12:19.000Z | docs/DSDC/miniprez/OLD_MINIPREZ/tests/test_slide.py | thoppe/Presentation_Topics_in_NLP | e9aba07e9ab087b44e6044c6082ba8e873a9b4fd | [
"MIT"
] | 1 | 2019-02-19T12:51:37.000Z | 2019-02-19T12:51:37.000Z | from miniprez.parser import section
from nose.tools import assert_equal
slide0 = '''
---- .alignright
@h1 .text-data Good morning
@p Time to rise and shine!
'''
slide0_out = '''<section class="alignright"><h1 class="text-data"><text>Good morning<p><text>Time to rise and shine!</text></p></text></h1></section>'''
s... | 26.467532 | 256 | 0.64475 |
4a166515fbc0b485abfd1a2ec82cbd61084d1dc8 | 434 | py | Python | calamari_ocr/ocr/text_processing/default_text_postprocessor.py | Nesbi/calamari | 25eb872118d15d0740f702ef42ef6f785e1a5858 | [
"Apache-2.0"
] | 5 | 2021-02-12T16:22:46.000Z | 2021-03-08T13:04:15.000Z | calamari_ocr/ocr/text_processing/default_text_postprocessor.py | Nesbi/calamari | 25eb872118d15d0740f702ef42ef6f785e1a5858 | [
"Apache-2.0"
] | 1 | 2020-05-06T15:03:17.000Z | 2020-05-07T15:22:01.000Z | calamari_ocr/ocr/text_processing/default_text_postprocessor.py | Nesbi/calamari | 25eb872118d15d0740f702ef42ef6f785e1a5858 | [
"Apache-2.0"
] | null | null | null | from calamari_ocr.ocr.text_processing import \
MultiTextProcessor, StripTextProcessor, BidiTextProcessor, \
TextNormalizer, TextRegularizer
class DefaultTextPostprocessor(MultiTextProcessor):
def __init__(self):
super().__init__(
[
TextNormalizer(),
Text... | 27.125 | 64 | 0.601382 |
4a16659896cf53326603b031f3035dbfc1999eec | 6,755 | py | Python | plugins/modules/oci_waas_policy_custom_protection_rules_facts.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_waas_policy_custom_protection_rules_facts.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_waas_policy_custom_protection_rules_facts.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2020, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 32.166667 | 158 | 0.641599 |
4a166762d595f091ce89d041f648357a21abfdd4 | 4,347 | py | Python | models/wide_resnet_bn_imagenet64.py | shizhouxing/Fast-Certified-Robust-Training | addac383f6fac58d1bae8a231cf0ac9dab405a06 | [
"BSD-3-Clause"
] | 16 | 2021-04-06T11:57:39.000Z | 2022-03-02T12:18:24.000Z | models/wide_resnet_bn_imagenet64.py | shizhouxing/Fast-Certified-Robust-Training | addac383f6fac58d1bae8a231cf0ac9dab405a06 | [
"BSD-3-Clause"
] | 1 | 2021-10-30T02:11:57.000Z | 2021-11-12T01:30:59.000Z | models/wide_resnet_bn_imagenet64.py | shizhouxing/Fast-Certified-Robust-Training | addac383f6fac58d1bae8a231cf0ac9dab405a06 | [
"BSD-3-Clause"
] | 1 | 2022-01-06T07:54:34.000Z | 2022-01-06T07:54:34.000Z | import torch
import torch.nn as nn
import torch.nn.init as init
import torch.nn.functional as F
import sys
import numpy as np
def conv3x3(in_planes, out_planes, stride=1):
return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=True)
def conv1x1(in_planes, out_planes, stride = 1):
... | 32.931818 | 147 | 0.600874 |
4a1667c3146b6e8cc76715fbe1b6860e1ea8ad19 | 5,628 | py | Python | core/downloaders/QBittorrent.py | yannickbilcot/Watcher3 | b6d2524efa99a0f59878e0cbb630bc2420e7f1ee | [
"Apache-2.0"
] | 68 | 2019-07-08T13:46:26.000Z | 2022-03-29T05:35:25.000Z | core/downloaders/QBittorrent.py | yannickbilcot/Watcher3 | b6d2524efa99a0f59878e0cbb630bc2420e7f1ee | [
"Apache-2.0"
] | 172 | 2019-07-21T18:39:16.000Z | 2022-03-29T09:31:51.000Z | core/downloaders/QBittorrent.py | yannickbilcot/Watcher3 | b6d2524efa99a0f59878e0cbb630bc2420e7f1ee | [
"Apache-2.0"
] | 31 | 2019-08-25T13:20:04.000Z | 2022-03-29T05:34:28.000Z | import logging
import json
import core
from core.helpers import Torrent, Url
logging = logging.getLogger(__name__)
cookie = None
def _send(method, post_data=None):
''' Sends API request to QBittorrent
method (str): name of method to call. *must* include category (ie 'query/preferences')
post_data (dic... | 32.16 | 96 | 0.637704 |
4a1667d131cb26985f3a94a4b217d982524f7798 | 1,683 | py | Python | robustness-calculation.py | jscohen4/cohen-policy-tree-adaptation | a6efafda591e5850fc264f3756cce2bb8e07719f | [
"MIT"
] | 1 | 2022-01-05T12:20:18.000Z | 2022-01-05T12:20:18.000Z | robustness-calculation.py | jscohen4/cohen-policy-tree-adaptation | a6efafda591e5850fc264f3756cce2bb8e07719f | [
"MIT"
] | null | null | null | robustness-calculation.py | jscohen4/cohen-policy-tree-adaptation | a6efafda591e5850fc264f3756cce2bb8e07719f | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from subprocess import call
import random
import json
import os
from os import listdir
from os.path import isfile, join
import seaborn as sns
import pickle
from matplotlib import cm
seed_policy_adjust = json.load(open('nondom-tracker/seed_policy_ad... | 34.346939 | 114 | 0.718954 |
4a1669634ab30d1149054d70a5876b2699ec5866 | 1,448 | py | Python | tests/assignments/test_assignment4.py | acc-cosc-1336/cosc-1336-spring-2018-EricScotty | 80c0249a583dc178cfc7bb95b851d7f3240dc3e9 | [
"MIT"
] | null | null | null | tests/assignments/test_assignment4.py | acc-cosc-1336/cosc-1336-spring-2018-EricScotty | 80c0249a583dc178cfc7bb95b851d7f3240dc3e9 | [
"MIT"
] | null | null | null | tests/assignments/test_assignment4.py | acc-cosc-1336/cosc-1336-spring-2018-EricScotty | 80c0249a583dc178cfc7bb95b851d7f3240dc3e9 | [
"MIT"
] | null | null | null | import unittest
from src.assignments.assignment4 import sample_function
from src.assignments.assignment4 import factorial
class Test_Assign4(unittest.TestCase):
def test_sample_one(self):
'''
This is an example to guide you in creating test cases.
The sample_function takes an argu... | 28.96 | 114 | 0.665746 |
4a16696e86ee6f894c59fe16bbc9340fe41a149e | 27,669 | py | Python | cinder/scheduler/manager.py | lightsey/cinder | e03d68e42e57a63f8d0f3e177fb4287290612b24 | [
"Apache-2.0"
] | 3 | 2015-04-02T21:44:36.000Z | 2016-04-29T21:19:04.000Z | cinder/scheduler/manager.py | lightsey/cinder | e03d68e42e57a63f8d0f3e177fb4287290612b24 | [
"Apache-2.0"
] | 3 | 2016-04-29T21:45:26.000Z | 2016-05-04T19:41:23.000Z | cinder/scheduler/manager.py | lightsey/cinder | e03d68e42e57a63f8d0f3e177fb4287290612b24 | [
"Apache-2.0"
] | 4 | 2016-01-27T00:25:52.000Z | 2021-03-25T19:54:08.000Z | # Copyright (c) 2010 OpenStack Foundation
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in complianc... | 43.098131 | 79 | 0.577614 |
4a166a2e52683ab8718dd3ff17394c00808348c3 | 3,603 | py | Python | stackoverflow_highest_votes_questions/superpower/middlewares.py | ayang818/- | 45d3ea9367475285126c5b385a104e702f9b3a05 | [
"MIT"
] | 3 | 2019-05-24T07:11:52.000Z | 2020-09-04T06:34:52.000Z | stackoverflow_highest_votes_questions/superpower/middlewares.py | ayang818/spider_training | 45d3ea9367475285126c5b385a104e702f9b3a05 | [
"MIT"
] | null | null | null | stackoverflow_highest_votes_questions/superpower/middlewares.py | ayang818/spider_training | 45d3ea9367475285126c5b385a104e702f9b3a05 | [
"MIT"
] | 2 | 2019-11-16T05:42:43.000Z | 2019-12-13T02:28:03.000Z | # -*- coding: utf-8 -*-
# Define here the models for your spider middleware
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/spider-middleware.html
from scrapy import signals
class SuperpowerSpiderMiddleware(object):
# Not all methods need to be defined. If a method is not defined,
# scra... | 34.644231 | 78 | 0.666667 |
4a166ae2397328369c92e4ac71f95a7d9f477285 | 410 | py | Python | AuE893_spring20_Shubham_Horane/build/assignment2_pkg/catkin_generated/pkg.installspace.context.pc.py | shorane/ROS_Autonomous_TurtleBot | 0da048aa5f8e03f2d5c1c9d686586b59ed7dfec5 | [
"MIT"
] | null | null | null | AuE893_spring20_Shubham_Horane/build/assignment2_pkg/catkin_generated/pkg.installspace.context.pc.py | shorane/ROS_Autonomous_TurtleBot | 0da048aa5f8e03f2d5c1c9d686586b59ed7dfec5 | [
"MIT"
] | null | null | null | AuE893_spring20_Shubham_Horane/build/assignment2_pkg/catkin_generated/pkg.installspace.context.pc.py | shorane/ROS_Autonomous_TurtleBot | 0da048aa5f8e03f2d5c1c9d686586b59ed7dfec5 | [
"MIT"
] | null | null | null | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "assignment2_ws"
PROJECT_SPACE_DIR = "... | 45.555556 | 84 | 0.729268 |
4a166ba54d2e8144d8ca0aa640ee0a6bb946ed7e | 3,815 | py | Python | libnessus/test/test_report.py | bmx0r/python-libnessus | bc4ed69bf4c2f6bab2f4c3be7e38613f8c344a62 | [
"CC-BY-3.0"
] | 13 | 2015-12-12T23:23:24.000Z | 2022-01-21T01:50:05.000Z | libnessus/test/test_report.py | bmx0r/python-libnessus | bc4ed69bf4c2f6bab2f4c3be7e38613f8c344a62 | [
"CC-BY-3.0"
] | 5 | 2015-08-26T16:00:34.000Z | 2019-09-25T18:55:12.000Z | libnessus/test/test_report.py | bmx0r/python-libnessus | bc4ed69bf4c2f6bab2f4c3be7e38613f8c344a62 | [
"CC-BY-3.0"
] | 12 | 2015-02-16T01:41:55.000Z | 2022-01-21T01:50:07.000Z | #!/usr/bin/env python
from libnessus.objects.reporthost import NessusReportHost
from .test_nessus import TestNessus
from datetime import datetime
import copy
class TestNessusReport(TestNessus):
"""Test Report object"""
def test_hosts(self):
""" Check that all obj in this array are NessusReportHost
... | 39.739583 | 84 | 0.516645 |
4a166c11f5e913adff19743983c9c187190f136b | 2,950 | py | Python | gridnetwork/workers/worker.py | shashigharti/PyGridNetwork | b69c0988031177c39f555d6e561ecdf6661e5d56 | [
"Apache-2.0"
] | null | null | null | gridnetwork/workers/worker.py | shashigharti/PyGridNetwork | b69c0988031177c39f555d6e561ecdf6661e5d56 | [
"Apache-2.0"
] | null | null | null | gridnetwork/workers/worker.py | shashigharti/PyGridNetwork | b69c0988031177c39f555d6e561ecdf6661e5d56 | [
"Apache-2.0"
] | 1 | 2021-07-06T04:32:24.000Z | 2021-07-06T04:32:24.000Z | import time
import json
import requests
import re
import asyncio
from ..codes import MSG_FIELD, GRID_EVENTS, NODE_EVENTS, WORKER_PROPERTIES
from ..utils.wrappers import threaded
class Worker(object):
"""Worker class for running PySyft models for training and inference."""
def __init__(self, id: str, socket):... | 33.522727 | 89 | 0.586102 |
4a166c35715ae8e7234db657dd25d606b0e56041 | 4,066 | py | Python | nuplan/planning/metrics/utils/expert_comparisons.py | motional/nuplan-devkit | e39029e788b17f47f2fcadb774098ef8fbdd0d67 | [
"Apache-2.0"
] | 128 | 2021-12-06T15:41:14.000Z | 2022-03-29T13:16:32.000Z | nuplan/planning/metrics/utils/expert_comparisons.py | motional/nuplan-devkit | e39029e788b17f47f2fcadb774098ef8fbdd0d67 | [
"Apache-2.0"
] | 28 | 2021-12-11T08:11:31.000Z | 2022-03-25T02:35:43.000Z | nuplan/planning/metrics/utils/expert_comparisons.py | motional/nuplan-devkit | e39029e788b17f47f2fcadb774098ef8fbdd0d67 | [
"Apache-2.0"
] | 14 | 2021-12-11T04:12:26.000Z | 2022-03-24T06:38:30.000Z | from typing import List, Optional, Union
import numpy as np
import numpy.typing as npt
from nuplan.common.actor_state.ego_state import EgoState
from nuplan.common.actor_state.state_representation import Point2D, StateSE2
from nuplan.common.geometry.compute import principal_value
from nuplan.planning.metrics.utils.sta... | 43.255319 | 114 | 0.734629 |
4a166dd66943484428f2df3dc9e6663e8e496914 | 1,199 | py | Python | packages/ekstep_pipelines_tests/common/audio_commons/transcription_clients_tests/ekstepmodel_transcription_client_tests.py | jeevan-revaneppa-hirethanad/audio-to-speech-pipeline | a5bd7f0321834507e4157eb1aea8659cd205bf1c | [
"MIT"
] | 23 | 2021-03-20T13:24:37.000Z | 2022-03-26T19:02:33.000Z | packages/ekstep_pipelines_tests/common/audio_commons/transcription_clients_tests/ekstepmodel_transcription_client_tests.py | jeevan-revaneppa-hirethanad/audio-to-speech-pipeline | a5bd7f0321834507e4157eb1aea8659cd205bf1c | [
"MIT"
] | 10 | 2021-04-06T14:00:35.000Z | 2022-03-16T12:27:13.000Z | packages/ekstep_pipelines_tests/common/audio_commons/transcription_clients_tests/ekstepmodel_transcription_client_tests.py | jeevan-revaneppa-hirethanad/audio-to-speech-pipeline | a5bd7f0321834507e4157eb1aea8659cd205bf1c | [
"MIT"
] | 16 | 2021-03-30T10:57:34.000Z | 2022-03-23T01:07:19.000Z | import unittest
from unittest import mock
from unittest.mock import Mock
from ekstep_data_pipelines.common.audio_commons.transcription_clients.azure_transcription_client import (
EkstepTranscriptionClient,
)
class TestEkstepTranscriptionClient(unittest.TestCase):
def setUp(self):
super(TestEkstepTran... | 29.243902 | 105 | 0.659716 |
4a166f014aed87519bb8382d268c82a891d8a838 | 32,296 | py | Python | papers/alt-ed-prestige/data/analysis_1_vars.py | Vandivier/research-dissertation-case-for-alt-ed | 58907cb10ceadec981beba15077d4c6e939307ec | [
"MIT"
] | null | null | null | papers/alt-ed-prestige/data/analysis_1_vars.py | Vandivier/research-dissertation-case-for-alt-ed | 58907cb10ceadec981beba15077d4c6e939307ec | [
"MIT"
] | 2 | 2022-01-13T04:03:23.000Z | 2022-03-12T01:02:54.000Z | papers/alt-ed-prestige/data/analysis_1_vars.py | Vandivier/research-dissertation-case-for-alt-ed | 58907cb10ceadec981beba15077d4c6e939307ec | [
"MIT"
] | null | null | null | # ref: alt-ed-covid-2...analysis_1_vars_and_regression.py
# ref: alt-ed-matching-effects-2...analysis_1_vars_and_regression.py
import numpy as np
import pandas as pd
from sklearn.linear_model import LinearRegression
import statsmodels.api as sm
from statsmodels.iolib.summary2 import summary_col
def fsImproveProviderN... | 67.4238 | 203 | 0.753437 |
4a1670262c718dec13595c07b3c6d75c404f93f0 | 375 | py | Python | Strings/string_method_quiz_FIXME.py | lvolkmann/couch-to-coder-python-exercises | afecb696d93eead9ba50613dc0723f2eca92d11a | [
"MIT"
] | null | null | null | Strings/string_method_quiz_FIXME.py | lvolkmann/couch-to-coder-python-exercises | afecb696d93eead9ba50613dc0723f2eca92d11a | [
"MIT"
] | null | null | null | Strings/string_method_quiz_FIXME.py | lvolkmann/couch-to-coder-python-exercises | afecb696d93eead9ba50613dc0723f2eca92d11a | [
"MIT"
] | null | null | null | # How do get rid of the white space around variable animal if animal = “ dog “?
animal = " dog "
# I have a long string of numbers separated by commas in variable x. I want to find the index of the first occurrence of 72. How?
x = "126354186372555"
#I want to figure out how many occurrences of 72 occur in a str... | 34.090909 | 129 | 0.722667 |
4a16707a376e93dca4a67a6779091eb06bac7d39 | 16,911 | py | Python | pandas/core/internals/concat.py | r00ta/pandas | 33f91d8f9f2e84f2b5f3ac3f0481b691c977c427 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2019-04-16T21:03:23.000Z | 2021-05-08T13:25:44.000Z | pandas/core/internals/concat.py | chanson90/pandas | 3f1e5940e3929577f094ea2708f94ee184e7a336 | [
"BSD-3-Clause"
] | null | null | null | pandas/core/internals/concat.py | chanson90/pandas | 3f1e5940e3929577f094ea2708f94ee184e7a336 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# TODO: Needs a better name; too many modules are already called "concat"
from collections import defaultdict
import copy
import numpy as np
from pandas._libs import internals as libinternals, tslibs
from pandas.util._decorators import cache_readonly
from pandas.core.dtypes.cast import maybe_... | 35.085062 | 89 | 0.57779 |
4a1670b127aeebe2125fb62a73f870aca422b118 | 8,819 | py | Python | .history/pages/intro_20220303154518.py | rypaik/Streamlit_Ref | 5ce11cecbe8307238463c126b88b3beed66c99fa | [
"MIT"
] | null | null | null | .history/pages/intro_20220303154518.py | rypaik/Streamlit_Ref | 5ce11cecbe8307238463c126b88b3beed66c99fa | [
"MIT"
] | null | null | null | .history/pages/intro_20220303154518.py | rypaik/Streamlit_Ref | 5ce11cecbe8307238463c126b88b3beed66c99fa | [
"MIT"
] | null | null | null | """
Off Multipage Cheatsheet
https://github.com/daniellewisDL/streamlit-cheat-sheet
@daniellewisDL : https://github.com/daniellewisDL
"""
import streamlit as st
from pathlib import Path
import base64
from modules.toc import *
# Initial page config
st.set_page_config(
page_title='Code Compendium Intro Page',
... | 27.135385 | 228 | 0.660392 |
4a1671ca249faaeaa3480c87b129f6244898f043 | 2,700 | py | Python | supports/integration-test/test_stress_sync_10MB.py | ypang2017/Test | 6f3cb231b2030f5c02f030730153e2a8516df2b2 | [
"Apache-2.0"
] | 2 | 2018-02-02T08:18:20.000Z | 2020-11-16T11:03:23.000Z | supports/integration-test/test_stress_sync_10MB.py | ypang2017/Compression | 6f3cb231b2030f5c02f030730153e2a8516df2b2 | [
"Apache-2.0"
] | null | null | null | supports/integration-test/test_stress_sync_10MB.py | ypang2017/Compression | 6f3cb231b2030f5c02f030730153e2a8516df2b2 | [
"Apache-2.0"
] | null | null | null | import unittest
import time
from util import *
# 10MB
FILE_SIZE = 10 * 1024 * 1024
DEST_DIR = "hdfs://datanode3:9000/dest"
class TestStressDR(unittest.TestCase):
def test_sync_rule_10000(self):
# file : every 1s | path matches "/1MB/*" | sync -dest
# file_path = create_random_file(10 * 1024 * 10... | 31.395349 | 81 | 0.568519 |
4a1672f6d7034131ab41f544f7c74cc0b0396a5e | 5,182 | py | Python | orcid_api_v3/models/services_v30_rc1.py | tenet-ac-za/NZ-ORCID-Hub | f1183fbb94509b102fa58d7812ed33d8f35c5d4d | [
"MIT"
] | 15 | 2017-02-06T01:41:57.000Z | 2021-07-22T08:53:40.000Z | orcid_api_v3/models/services_v30_rc1.py | tenet-ac-za/NZ-ORCID-Hub | f1183fbb94509b102fa58d7812ed33d8f35c5d4d | [
"MIT"
] | 82 | 2017-03-23T00:30:04.000Z | 2022-02-01T00:10:34.000Z | orcid_api_v3/models/services_v30_rc1.py | tenet-ac-za/NZ-ORCID-Hub | f1183fbb94509b102fa58d7812ed33d8f35c5d4d | [
"MIT"
] | 6 | 2017-03-23T07:26:05.000Z | 2021-02-23T11:20:21.000Z | # coding: utf-8
"""
ORCID Member
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: Latest
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import si... | 31.216867 | 143 | 0.620996 |
4a167362dabebe28d03e306344265a6919d5d1e2 | 905 | py | Python | barriers/views/assessments/base.py | felix781/market-access-python-frontend | 3b0e49feb4fdf0224816326938a46002aa4a2b1c | [
"MIT"
] | 1 | 2021-12-15T04:14:03.000Z | 2021-12-15T04:14:03.000Z | barriers/views/assessments/base.py | felix781/market-access-python-frontend | 3b0e49feb4fdf0224816326938a46002aa4a2b1c | [
"MIT"
] | 19 | 2019-12-11T11:32:47.000Z | 2022-03-29T15:40:57.000Z | barriers/views/assessments/base.py | felix781/market-access-python-frontend | 3b0e49feb4fdf0224816326938a46002aa4a2b1c | [
"MIT"
] | 2 | 2021-02-09T09:38:45.000Z | 2021-03-29T19:07:09.000Z | from django.urls import reverse
from django.views.generic import FormView
from ..mixins import BarrierMixin
class ArchiveAssessmentBase(BarrierMixin, FormView):
template_name = "barriers/assessments/archive.html"
title = "Archive assessment"
def get_context_data(self, **kwargs):
context_data = s... | 29.193548 | 65 | 0.661878 |
4a167383cab41e128a748c824b552c2e1372bd01 | 9,250 | py | Python | pymongo/errors.py | blink1073/mongo-python-driver | 98d393336411b7cd5ad4e184ca45192f76fb48e8 | [
"Apache-2.0"
] | null | null | null | pymongo/errors.py | blink1073/mongo-python-driver | 98d393336411b7cd5ad4e184ca45192f76fb48e8 | [
"Apache-2.0"
] | null | null | null | pymongo/errors.py | blink1073/mongo-python-driver | 98d393336411b7cd5ad4e184ca45192f76fb48e8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2009-present MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 30.730897 | 96 | 0.691243 |
4a1673e20407147a9f33e507c8ac5f941efffe95 | 49,002 | py | Python | tests/db_interaction/test_postgresql.py | TSPereira/support_toolkit | d9b0488d69dccc38b73cd67ea33f4f53983cf77f | [
"MIT"
] | 4 | 2021-01-05T14:03:54.000Z | 2021-01-29T14:48:09.000Z | tests/db_interaction/test_postgresql.py | TSPereira/support_toolkit | d9b0488d69dccc38b73cd67ea33f4f53983cf77f | [
"MIT"
] | null | null | null | tests/db_interaction/test_postgresql.py | TSPereira/support_toolkit | d9b0488d69dccc38b73cd67ea33f4f53983cf77f | [
"MIT"
] | null | null | null | import logging
import os
import unittest
import pandas as pd
from pandas.io.sql import DatabaseError
import psycopg2
from ml_toolkit.db_interaction.api import PostgreSQLManager
from ml_toolkit.utils.io_utl import get_decorators
print({k: v for k, v in os.environ.items() if k.startswith('POSTGRES')})
CFG = dict(user... | 47.026871 | 120 | 0.62226 |
4a1673e5433e5323a9fa05cabaf816a05f2ee0c1 | 5,559 | py | Python | test/unit/test_laziness.py | tj-sun/PyOP2 | 72f49dd562e34efaf9482c3638572879fcb7921d | [
"BSD-3-Clause"
] | null | null | null | test/unit/test_laziness.py | tj-sun/PyOP2 | 72f49dd562e34efaf9482c3638572879fcb7921d | [
"BSD-3-Clause"
] | null | null | null | test/unit/test_laziness.py | tj-sun/PyOP2 | 72f49dd562e34efaf9482c3638572879fcb7921d | [
"BSD-3-Clause"
] | null | null | null | # This file is part of PyOP2
#
# PyOP2 is Copyright (c) 2012, Imperial College London and
# others. Please see the AUTHORS file in the main source directory for
# a full list of copyright holders. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted ... | 33.690909 | 99 | 0.648678 |
4a1674d9fa96065214786f2dcc8f898a77e14fc4 | 1,319 | py | Python | analyzer/settings_analyzer/migrations/0002_auto_20171105_0501.py | LaSoftRepo/analyzer | 320536cc86df7514c8dea979585ea70665ff83eb | [
"MIT"
] | null | null | null | analyzer/settings_analyzer/migrations/0002_auto_20171105_0501.py | LaSoftRepo/analyzer | 320536cc86df7514c8dea979585ea70665ff83eb | [
"MIT"
] | null | null | null | analyzer/settings_analyzer/migrations/0002_auto_20171105_0501.py | LaSoftRepo/analyzer | 320536cc86df7514c8dea979585ea70665ff83eb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-11-05 03:01
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('settings_analyzer', '0001_initial'),
]
operations = [
migrations.AlterField... | 28.673913 | 61 | 0.570887 |
4a1674f5b43882d4a6cc396fca0125df626a8738 | 2,286 | py | Python | api_test.py | Narutlih/Api | 5835c8cffaa5d719898cb0e69348675c81de7525 | [
"BSD-3-Clause"
] | null | null | null | api_test.py | Narutlih/Api | 5835c8cffaa5d719898cb0e69348675c81de7525 | [
"BSD-3-Clause"
] | null | null | null | api_test.py | Narutlih/Api | 5835c8cffaa5d719898cb0e69348675c81de7525 | [
"BSD-3-Clause"
] | null | null | null | import vk
import time
import collections
import xlsxwriter
session = vk.Session(
access_token='a59e5aaa3a3775c46c9a7a522ec899a4c26dc533b97e507fd4fa194a3eea4aa7836c78fc11b429235c23d')
vk_api = vk.API(session)
deq = collections.deque(maxlen=4)
def pause_request():
deq.appendleft(time.time())
i... | 32.657143 | 129 | 0.555556 |
4a167582011af7acbf30c0298f015353262aa38c | 2,062 | py | Python | joker/server/connection_utils.py | PuNkYsHuNgRy/joker-blockchain | e49d6b9aa46e6097e216561bd7563b50519aae13 | [
"Apache-2.0"
] | 4 | 2022-03-04T06:08:15.000Z | 2022-03-17T19:14:22.000Z | joker/server/connection_utils.py | zcomputerwiz/joker-blockchain | 72cf94708acd49e0cbcc63c74d5ddb1e1045b8a5 | [
"Apache-2.0"
] | 1 | 2022-03-29T13:20:11.000Z | 2022-03-29T13:20:11.000Z | joker/server/connection_utils.py | zcomputerwiz/joker-blockchain | 72cf94708acd49e0cbcc63c74d5ddb1e1045b8a5 | [
"Apache-2.0"
] | 3 | 2022-03-10T22:26:44.000Z | 2022-03-15T08:46:15.000Z | import asyncio
import random
from typing import Any, List, Optional, Tuple
from joker.server.ws_connection import WSJokerConnection
async def send_all_first_reply(
func: str, arg: Any, peers: List[WSJokerConnection], timeout=15
) -> Optional[Tuple[Any, WSJokerConnection]]:
"""performs an API request to peers... | 30.776119 | 121 | 0.64355 |
4a1675bdee4bf9b2bd87d5c8f5285017e3d88e9d | 482 | py | Python | tests/test_tutorial/test_response_change_status_code/test_tutorial001.py | jfunez/fastapi | 7372f6ba11abb515a7f11814dba52a1d1c0925f0 | [
"MIT"
] | 2 | 2020-04-09T07:11:28.000Z | 2020-12-12T14:04:35.000Z | tests/test_tutorial/test_response_change_status_code/test_tutorial001.py | jfunez/fastapi | 7372f6ba11abb515a7f11814dba52a1d1c0925f0 | [
"MIT"
] | 1 | 2021-03-27T18:37:32.000Z | 2021-05-25T15:08:24.000Z | tests/test_tutorial/test_response_change_status_code/test_tutorial001.py | jfunez/fastapi | 7372f6ba11abb515a7f11814dba52a1d1c0925f0 | [
"MIT"
] | 1 | 2021-02-03T00:43:04.000Z | 2021-02-03T00:43:04.000Z | from fastapi.testclient import TestClient
from response_change_status_code.tutorial001 import app
client = TestClient(app)
def test_path_operation():
response = client.put("/get-or-create-task/foo")
print(response.content)
assert response.status_code == 200
assert response.json() == "Listen to the B... | 30.125 | 58 | 0.732365 |
4a1675f3675bc773b04679b34bdd50a37fe73af3 | 761 | py | Python | spark_auto_mapper_fhir/value_sets/condition_cause_codes.py | imranq2/SparkAutoMapper.FHIR | dd23b218fb0097d1edc2f3e688e8d6d4d7278bd2 | [
"Apache-2.0"
] | 1 | 2020-10-31T23:25:07.000Z | 2020-10-31T23:25:07.000Z | spark_auto_mapper_fhir/value_sets/condition_cause_codes.py | icanbwell/SparkAutoMapper.FHIR | 98f368e781b46523142c7cb513c670d659a93c9b | [
"Apache-2.0"
] | null | null | null | spark_auto_mapper_fhir/value_sets/condition_cause_codes.py | icanbwell/SparkAutoMapper.FHIR | 98f368e781b46523142c7cb513c670d659a93c9b | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from spark_auto_mapper_fhir.fhir_types.uri import FhirUri
from spark_auto_mapper_fhir.value_sets.generic_type import GenericTypeCode
from spark_auto_mapper.type_definitions.defined_types import AutoMapperTextInputType
# This file is auto-generated by generate_classes so do not edi... | 30.44 | 84 | 0.767411 |
4a16760b02edae0c2ecc99b2909230a1bfd30a71 | 3,038 | py | Python | terrascript/vsphere/r.py | vfoucault/python-terrascript | fe82b3d7e79ffa72b7871538f999828be0a115d0 | [
"BSD-2-Clause"
] | null | null | null | terrascript/vsphere/r.py | vfoucault/python-terrascript | fe82b3d7e79ffa72b7871538f999828be0a115d0 | [
"BSD-2-Clause"
] | null | null | null | terrascript/vsphere/r.py | vfoucault/python-terrascript | fe82b3d7e79ffa72b7871538f999828be0a115d0 | [
"BSD-2-Clause"
] | null | null | null | from terrascript import _resource
class vsphere_custom_attribute(_resource): pass
custom_attribute = vsphere_custom_attribute
class vsphere_datastore_cluster(_resource): pass
datastore_cluster = vsphere_datastore_cluster
class vsphere_resource_pool(_resource): pass
resource_pool = vsphere_resource_pool
class vsphere... | 33.384615 | 89 | 0.890718 |
4a1677625406ca42701a0f8b37f4bb6373b89704 | 205 | py | Python | basic/yield_t.py | by46/geek | 04b08d0dff80c524bd471ead3fe524423eebf123 | [
"MIT"
] | null | null | null | basic/yield_t.py | by46/geek | 04b08d0dff80c524bd471ead3fe524423eebf123 | [
"MIT"
] | null | null | null | basic/yield_t.py | by46/geek | 04b08d0dff80c524bd471ead3fe524423eebf123 | [
"MIT"
] | null | null | null | class Demo(object):
@property
def names(self):
for i in range(10):
yield i
if __name__ == '__main__':
demo = Demo()
for name in demo.names:
print(name) | 20.5 | 28 | 0.521951 |
4a1677f5ca54e31bb5b52bad8636d0cd99dfd126 | 830 | py | Python | almoxarifado/migrations/0028_auto_20171020_2006.py | rvmoura96/projeto-almoxarifado | 4ca5e5d00f449a940f7c601479bb3fe14c54f012 | [
"MIT"
] | 1 | 2019-05-24T17:39:01.000Z | 2019-05-24T17:39:01.000Z | almoxarifado/migrations/0028_auto_20171020_2006.py | rvmoura96/projeto-almoxarifado | 4ca5e5d00f449a940f7c601479bb3fe14c54f012 | [
"MIT"
] | null | null | null | almoxarifado/migrations/0028_auto_20171020_2006.py | rvmoura96/projeto-almoxarifado | 4ca5e5d00f449a940f7c601479bb3fe14c54f012 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-20 22:06
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('almoxarifado', '0027_auto_20171020_2006'),
]
operations = [
m... | 26.774194 | 65 | 0.563855 |
4a1679b8c5212e88aa0275d51cbea986b1984d4b | 7,977 | py | Python | sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_locations_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_locations_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_locations_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.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 ... | 45.067797 | 154 | 0.655384 |
4a167b558344719984a31126be631fbbb5e0110c | 2,740 | py | Python | app.py | certanet/quipto | e70a7021bb0859f707af7d162e295583d6178d48 | [
"MIT"
] | null | null | null | app.py | certanet/quipto | e70a7021bb0859f707af7d162e295583d6178d48 | [
"MIT"
] | null | null | null | app.py | certanet/quipto | e70a7021bb0859f707af7d162e295583d6178d48 | [
"MIT"
] | null | null | null | import base64
import os
from getpass import getpass
from Crypto import Random
from Crypto.Cipher import AES
from pbkdf2 import PBKDF2
class Quipto:
def __init__(self):
pass
def pad_data(self, data):
if len(data) % 16 == 0:
return data
databytes = bytearray(data)
p... | 26.862745 | 66 | 0.55146 |
4a167bacb330ca50b453df079b6c6582d6b34b0d | 89,159 | py | Python | test/test_collection.py | infinite-skx/mongo-python-driver | bdafc357331813222b1e677b66041dad1fc852a5 | [
"Apache-2.0"
] | null | null | null | test/test_collection.py | infinite-skx/mongo-python-driver | bdafc357331813222b1e677b66041dad1fc852a5 | [
"Apache-2.0"
] | 1 | 2021-12-24T11:32:17.000Z | 2021-12-24T11:32:17.000Z | test/test_collection.py | Surfndez/mongo-python-driver | 51691246e9b2ef8446f3716c9ba7bab1a9f4e1ad | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2009-present MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 40.545248 | 87 | 0.566236 |
4a167c22faac175ab381de646ded195c3ce51750 | 3,155 | py | Python | pic.py | JettChenT/photoship | 4da7ad7275b29a07b8cf64ba2aa66c5dd14cc3a0 | [
"MIT"
] | null | null | null | pic.py | JettChenT/photoship | 4da7ad7275b29a07b8cf64ba2aa66c5dd14cc3a0 | [
"MIT"
] | null | null | null | pic.py | JettChenT/photoship | 4da7ad7275b29a07b8cf64ba2aa66c5dd14cc3a0 | [
"MIT"
] | null | null | null | import pygame, sys, random, math
SCREEN_W, SCREEN_H = 1024, 768
class CLS_pic(object):
def __init__(self,fileName):
img = pygame.image.load(fileName)
self.img = pygame.transform.scale(img,(SCREEN_W,SCREEN_H))
self.x,self.y = 0,0
self.w,self.h = self.img.get_size()
def draw(self,... | 38.012048 | 66 | 0.475119 |
4a167d633b45b95930a06f6a297d0ee4b527e622 | 2,794 | py | Python | data/pre-processing scripts/german_data_categorizing.py | UCLA-StarAI/LearnFairNB | f922d885399955737bd9f16a104f700004cd3846 | [
"Fair"
] | 3 | 2019-07-07T17:29:49.000Z | 2021-03-20T18:52:28.000Z | data/pre-processing scripts/german_data_categorizing.py | UCLA-StarAI/LearnFairNB | f922d885399955737bd9f16a104f700004cd3846 | [
"Fair"
] | 1 | 2019-11-23T22:26:05.000Z | 2019-11-23T22:26:05.000Z | data/pre-processing scripts/german_data_categorizing.py | UCLA-StarAI/LearnFairNB | f922d885399955737bd9f16a104f700004cd3846 | [
"Fair"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
import numpy as np
# In[2]:
df = pd.read_csv('../data/german.data',delimiter=r"\s+")
df.columns = [
"Attribute1", "Attribute2", "Attribute3", "Attribute4", "Attribute5",
"Attribute6", "Attribute7", "Attribute8", "Attribute9", "Attribute1... | 24.508772 | 134 | 0.710809 |
4a167e3834f30c1e27497d347339cd88d8c0d4fa | 1,617 | py | Python | tests/tensorflow/test_helpers.py | MaximProshin/nncf | 2290d2f4cebcf6749e419dc76850e7bd8b7d8da1 | [
"Apache-2.0"
] | 136 | 2020-06-01T14:03:31.000Z | 2020-10-28T06:10:50.000Z | tests/tensorflow/test_helpers.py | MaximProshin/nncf | 2290d2f4cebcf6749e419dc76850e7bd8b7d8da1 | [
"Apache-2.0"
] | 133 | 2020-05-26T13:48:04.000Z | 2020-10-28T05:25:55.000Z | tests/tensorflow/test_helpers.py | MaximProshin/nncf | 2290d2f4cebcf6749e419dc76850e7bd8b7d8da1 | [
"Apache-2.0"
] | 36 | 2020-05-28T08:18:39.000Z | 2020-10-27T14:46:58.000Z | """
Copyright (c) 2022 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 writin... | 38.5 | 73 | 0.693878 |
4a167e5b2fda2df432243f281d34abb7f126f3d8 | 813 | py | Python | maple/envs/wrappers/discretize_env.py | UT-Austin-RPL/maple | aef9fe9869945df5bbd1b02fd40813aac135cf5a | [
"MIT"
] | 9 | 2021-10-08T23:54:58.000Z | 2022-03-24T08:51:53.000Z | maple/envs/wrappers/discretize_env.py | UT-Austin-RPL/maple | aef9fe9869945df5bbd1b02fd40813aac135cf5a | [
"MIT"
] | 1 | 2022-02-14T02:32:27.000Z | 2022-02-21T15:02:00.000Z | maple/envs/wrappers/discretize_env.py | UT-Austin-RPL/maple | aef9fe9869945df5bbd1b02fd40813aac135cf5a | [
"MIT"
] | 1 | 2022-01-05T11:47:19.000Z | 2022-01-05T11:47:19.000Z | import itertools
import numpy as np
from gym import Env
from gym.spaces import Discrete
from maple.envs.proxy_env import ProxyEnv
class DiscretizeEnv(ProxyEnv, Env):
def __init__(self, wrapped_env, num_bins):
super().__init__(wrapped_env)
low = self.wrapped_env.action_space.low
high = se... | 28.034483 | 72 | 0.672817 |
4a167eeae6075630d74f69178dfbfed15abe2f90 | 23,366 | py | Python | att_SVHN_1hop.py | Yu-Hyun/Hopfield-ODE | 24a3bdc70ddefd69e69e04332c2ea51fb5d1b5a2 | [
"MIT"
] | null | null | null | att_SVHN_1hop.py | Yu-Hyun/Hopfield-ODE | 24a3bdc70ddefd69e69e04332c2ea51fb5d1b5a2 | [
"MIT"
] | null | null | null | att_SVHN_1hop.py | Yu-Hyun/Hopfield-ODE | 24a3bdc70ddefd69e69e04332c2ea51fb5d1b5a2 | [
"MIT"
] | 1 | 2021-07-19T05:36:56.000Z | 2021-07-19T05:36:56.000Z | import os
import argparse
import logging
import time
import numpy as np
import scipy.linalg
import torch
import torch.nn as nn
from torch.utils.data import DataLoader
import torchvision.datasets as datasets
import torchvision.transforms as transforms
from torch.autograd import Function
import torch.jit
f... | 33.765896 | 154 | 0.598904 |
4a168102d14a7aabe149a24b76d2a7ab0b4c621f | 2,058 | py | Python | PythonBaseDemo/GraphicInterfaceProgrammin/11.5/Listbox_test3.py | CypHelp/TestNewWorldDemo | ee6f73df05756f191c1c56250fa290461fdd1b9a | [
"Apache-2.0"
] | null | null | null | PythonBaseDemo/GraphicInterfaceProgrammin/11.5/Listbox_test3.py | CypHelp/TestNewWorldDemo | ee6f73df05756f191c1c56250fa290461fdd1b9a | [
"Apache-2.0"
] | null | null | null | PythonBaseDemo/GraphicInterfaceProgrammin/11.5/Listbox_test3.py | CypHelp/TestNewWorldDemo | ee6f73df05756f191c1c56250fa290461fdd1b9a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#########################################################################
# 网站: <a href="http://www.crazyit.org">疯狂Java联盟</a> #
# author yeeku.H.lee kongyeeku@163.com #
# #
# version 1.0 ... | 42.875 | 76 | 0.392128 |
4a16812120954745ef61049ecc31aad183f3ae71 | 5,592 | py | Python | contrib/seeds/makeseeds.py | Zoras2/CryptoDezireCash | e7c108f4dab1289459e2cfc0651836c1a4769996 | [
"MIT"
] | 1 | 2019-01-25T16:46:28.000Z | 2019-01-25T16:46:28.000Z | contrib/seeds/makeseeds.py | Zoras2/CryptoDezireCash | e7c108f4dab1289459e2cfc0651836c1a4769996 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | Zoras2/CryptoDezireCash | e7c108f4dab1289459e2cfc0651836c1a4769996 | [
"MIT"
] | 1 | 2019-02-26T20:43:54.000Z | 2019-02-26T20:43:54.000Z | #!/usr/bin/env python3
# Copyright (c) 2013-2018 The Bitcoin Core developers
# Copyright (c) 2018 The Crypto Dezire Cash developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Generate seeds.txt from Pieter's DNS seeder
#
... | 32.323699 | 186 | 0.570458 |
4a168121c92bbeee725e722dc396427f5761f7fe | 685 | py | Python | stai/types/announcement.py | STATION-I/staicoin-blockchain | b8686c75dd5fe7883115d9613858c9c8cadfc4a7 | [
"Apache-2.0"
] | 10 | 2021-10-02T18:33:56.000Z | 2021-11-14T17:10:48.000Z | stai/types/announcement.py | STATION-I/staicoin-blockchain | b8686c75dd5fe7883115d9613858c9c8cadfc4a7 | [
"Apache-2.0"
] | 14 | 2021-10-07T22:10:15.000Z | 2021-12-21T09:13:49.000Z | stai/types/announcement.py | STATION-I/staicoin-blockchain | b8686c75dd5fe7883115d9613858c9c8cadfc4a7 | [
"Apache-2.0"
] | 6 | 2021-10-29T19:36:59.000Z | 2021-12-19T19:52:57.000Z | from dataclasses import dataclass
from typing import Optional
from stai.types.blockchain_format.sized_bytes import bytes32
from stai.util.hash import std_hash
@dataclass(frozen=True)
class Announcement:
origin_info: bytes32
message: bytes
morph_bytes: Optional[bytes] = None # CATs morph their announceme... | 29.782609 | 115 | 0.705109 |
4a16822d175607267baef3fff301104566fc7f12 | 3,271 | py | Python | audit_web_client/flask/api/user_db.py | levon003/wiki-ores-feedback | 29e7f1a41b16a7c57448d5bbc5801653debbc115 | [
"MIT"
] | 2 | 2022-03-27T19:24:30.000Z | 2022-03-29T16:15:31.000Z | audit_web_client/flask/api/user_db.py | levon003/wiki-ores-feedback | 29e7f1a41b16a7c57448d5bbc5801653debbc115 | [
"MIT"
] | 1 | 2021-04-23T21:03:45.000Z | 2021-04-23T21:03:45.000Z | audit_web_client/flask/api/user_db.py | levon003/wiki-ores-feedback | 29e7f1a41b16a7c57448d5bbc5801653debbc115 | [
"MIT"
] | null | null | null | import click
from flask import current_app, g
from flask.cli import with_appcontext
import sqlalchemy as sa
from sqlalchemy import create_engine, Table, Column, Integer, SmallInteger, String, MetaData, ForeignKey, Text, Boolean, Float, Index, bindparam
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlal... | 33.721649 | 144 | 0.722409 |
4a16824ad0a8aea2f4a61f86f7cebca56fabe7b7 | 9,402 | py | Python | main.py | hacker1383/id-bot | 233a88b2f2c2c97fc2f260494c00458b3aa6b5df | [
"MIT"
] | null | null | null | main.py | hacker1383/id-bot | 233a88b2f2c2c97fc2f260494c00458b3aa6b5df | [
"MIT"
] | null | null | null | main.py | hacker1383/id-bot | 233a88b2f2c2c97fc2f260494c00458b3aa6b5df | [
"MIT"
] | null | null | null | #info bot created by negative
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
import telebot
from telebot import types
import json
import os
import config
import random
import requests as req
bot = telebot.TeleBot(config.token)
@bot.message_handler(commands=['start', 'help'])
def welcome(m):
cid = m.chat.i... | 50.278075 | 387 | 0.634546 |
4a16829e5944d3dbd9d0bcb1eae537fa5c910b25 | 6,522 | py | Python | grin-py/grinbase/model/blocks.py | hunternsk/grin-pool | 06cbf33acedc3cff63ed05aedda1191b2312d9a4 | [
"Apache-2.0"
] | 130 | 2018-06-05T21:45:29.000Z | 2022-01-13T22:37:20.000Z | grin-py/grinbase/model/blocks.py | hunternsk/grin-pool | 06cbf33acedc3cff63ed05aedda1191b2312d9a4 | [
"Apache-2.0"
] | 30 | 2018-07-10T22:23:50.000Z | 2022-01-22T11:01:49.000Z | grin-py/grinbase/model/blocks.py | hunternsk/grin-pool | 06cbf33acedc3cff63ed05aedda1191b2312d9a4 | [
"Apache-2.0"
] | 78 | 2018-07-05T00:32:22.000Z | 2021-05-30T07:57:50.000Z | #!/usr/bin/python3
import datetime
import operator
from sqlalchemy import Column, Integer, String, BigInteger, SmallInteger, Boolean, DateTime, func, asc, and_
from sqlalchemy.orm import relationship
from grinbase.dbaccess import database
from grinbase.model import Base
# This table contains a record for each block... | 37.918605 | 250 | 0.613615 |
4a1682a09eb0d7deb4c9a68617db0269db947f72 | 698 | py | Python | utils/api_utils.py | samujjwaal/multilingual-chatbot | c7d75a1d60a8e2b726012ba87b8a3813f5e92e35 | [
"MIT"
] | null | null | null | utils/api_utils.py | samujjwaal/multilingual-chatbot | c7d75a1d60a8e2b726012ba87b8a3813f5e92e35 | [
"MIT"
] | null | null | null | utils/api_utils.py | samujjwaal/multilingual-chatbot | c7d75a1d60a8e2b726012ba87b8a3813f5e92e35 | [
"MIT"
] | null | null | null | # import libraries
import json
import requests
# huggingface API key
API_TOKEN = "Replace with your API"
API_URL = "https://api-inference.huggingface.co/models"
headers = {"Authorization": f"Bearer {API_TOKEN}"}
# to generate payload for API call
def query(payload, model_name):
data = json.dumps(payloa... | 29.083333 | 70 | 0.691977 |
4a1684474ad19e2b204ad283780350ea17014d66 | 309 | py | Python | 181/order.py | xtakacsx/bitesofpy | 91487cbf58af5eb58a0343ff2231a90c1032acb0 | [
"MIT"
] | 1 | 2020-01-10T00:05:34.000Z | 2020-01-10T00:05:34.000Z | 181/order.py | xtakacsx/bitesofpy | 91487cbf58af5eb58a0343ff2231a90c1032acb0 | [
"MIT"
] | null | null | null | 181/order.py | xtakacsx/bitesofpy | 91487cbf58af5eb58a0343ff2231a90c1032acb0 | [
"MIT"
] | null | null | null | import bisect
class OrderedList:
def __init__(self):
self._numbers = []
def add(self, num):
# self._numbers.insert(bisect.bisect(self._numbers, num), num)
bisect.insort(self._numbers, num)
def __str__(self):
return ', '.join(str(num) for num in self._numbers)
| 20.6 | 70 | 0.624595 |
4a1684723da1c91143c40c40ac5e80127ef5154b | 10,412 | py | Python | neural_compressor/ux/utils/parser.py | mdfaijul/neural-compressor | e1d59da3790f9ff9647a21d2ff23da98c78a9682 | [
"Apache-2.0"
] | 100 | 2020-12-01T02:40:12.000Z | 2021-09-09T08:14:22.000Z | neural_compressor/ux/utils/parser.py | mdfaijul/neural-compressor | e1d59da3790f9ff9647a21d2ff23da98c78a9682 | [
"Apache-2.0"
] | 25 | 2021-01-05T00:16:17.000Z | 2021-09-10T03:24:01.000Z | neural_compressor/ux/utils/parser.py | mdfaijul/neural-compressor | e1d59da3790f9ff9647a21d2ff23da98c78a9682 | [
"Apache-2.0"
] | 25 | 2020-12-01T19:07:08.000Z | 2021-08-30T14:20:07.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2021 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 applicab... | 37.861818 | 99 | 0.543892 |
4a16868c7faaf29ad09f2bee65cf07fa5d05fc9f | 15,964 | py | Python | gpt2generator.py | sokonashi/gensokyo-bot | cd96cc18635ff7888b10ffcd4c07966d0f65eba9 | [
"MIT"
] | null | null | null | gpt2generator.py | sokonashi/gensokyo-bot | cd96cc18635ff7888b10ffcd4c07966d0f65eba9 | [
"MIT"
] | null | null | null | gpt2generator.py | sokonashi/gensokyo-bot | cd96cc18635ff7888b10ffcd4c07966d0f65eba9 | [
"MIT"
] | null | null | null | import os
from pathlib import Path
from typing import Union
import torch
import torch.nn.functional as F
import re
from gpt2 import GPT2LMHeadModelExperimental
from transformers import GPT2Tokenizer, GPT2LMHeadModel
from getconfig import settings, logger
from utils import cut_trailing_sentence, output, clear_lines, fo... | 42.684492 | 239 | 0.616637 |
4a16870aafa6e4cf4d9be5ffe78209d5bbe4ace5 | 74,449 | py | Python | pythonwhois/parse.py | ShakedShechter/python-whois | b0e710f73f5046cbb948351cc00a2c267b84e36a | [
"WTFPL"
] | null | null | null | pythonwhois/parse.py | ShakedShechter/python-whois | b0e710f73f5046cbb948351cc00a2c267b84e36a | [
"WTFPL"
] | null | null | null | pythonwhois/parse.py | ShakedShechter/python-whois | b0e710f73f5046cbb948351cc00a2c267b84e36a | [
"WTFPL"
] | null | null | null | from __future__ import print_function
import re, sys, datetime, csv, pkgutil
from . import net, shared
try:
from io import StringIO
except ImportError:
from cStringIO import StringIO
def pkgdata(name):
data = pkgutil.get_data("pythonwhois", name)
if sys.version_info < (3, 0):
return data
else:
return data.d... | 74.00497 | 769 | 0.581029 |
4a168771885f338dcf56e6ebbc1cd64eb0047c1d | 16,030 | py | Python | models/heading_markup.py | asvbkr/ttb_client_py | 84bf655c797d301c597d00cf7947495874d936b2 | [
"Apache-2.0"
] | 9 | 2019-08-17T15:04:09.000Z | 2020-07-13T09:56:36.000Z | models/heading_markup.py | asvbkr/ttb_client_py | 84bf655c797d301c597d00cf7947495874d936b2 | [
"Apache-2.0"
] | null | null | null | models/heading_markup.py | asvbkr/ttb_client_py | 84bf655c797d301c597d00cf7947495874d936b2 | [
"Apache-2.0"
] | 2 | 2019-07-13T05:41:12.000Z | 2020-04-20T21:45:46.000Z | # coding: utf-8
# noinspection SpellCheckingInspection
"""
TamTam Bot API
# About Bot API allows bots to interact with TamTam. Methods are called by sending HTTPS requests to [botapi.tamtam.chat](https://botapi.tamtam.chat) domain. Bots are third-party applications that use TamTam features. A bot can legitima... | 149.813084 | 13,145 | 0.706987 |
4a16879a6f61289396bea23c9f7b7df403dff233 | 23,869 | py | Python | staff_manage_sdk/model/monitor/alert_rule_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | staff_manage_sdk/model/monitor/alert_rule_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | staff_manage_sdk/model/monitor/alert_rule_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: alert_rule.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf ... | 46.801961 | 2,272 | 0.747245 |
4a1687e9af702bc0b8b21d589266629b67053f1c | 827 | py | Python | scripts/report.py | aw32/sched | b6ef35c5b517875a5954c70e2dc366fab3721a60 | [
"BSD-2-Clause"
] | null | null | null | scripts/report.py | aw32/sched | b6ef35c5b517875a5954c70e2dc366fab3721a60 | [
"BSD-2-Clause"
] | null | null | null | scripts/report.py | aw32/sched | b6ef35c5b517875a5954c70e2dc366fab3721a60 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2019, Alex Wiens <awiens@mail.upb.de>, Achim Lösch <achim.loesch@upb.de>
# SPDX-License-Identifier: BSD-2-Clause
import os
import os.path
import mako.template
script_path = os.path.dirname(os.path.realpath(__file__))
mako_report = mako.template.Template(filename=os.path.join(script... | 35.956522 | 108 | 0.748489 |
4a1688976e9e74026b05708729bc151474ae8eda | 472 | py | Python | plotly/validators/layout/scene/zaxis/_gridwidth.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 2 | 2020-03-24T11:41:14.000Z | 2021-01-14T07:59:43.000Z | plotly/validators/layout/scene/zaxis/_gridwidth.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | plotly/validators/layout/scene/zaxis/_gridwidth.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 4 | 2019-06-03T14:49:12.000Z | 2022-01-06T01:05:12.000Z | import _plotly_utils.basevalidators
class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self,
plotly_name='gridwidth',
parent_name='layout.scene.zaxis',
**kwargs
):
super(GridwidthValidator, self).__init__(
plotly_name=plot... | 23.6 | 71 | 0.586864 |
4a1688afea12786c1e6c458b1f989e91b946db05 | 392 | py | Python | android/image/models.py | gwhong917/A_C_C | 1cd75a2e439f86bcbf1e6d9e1ac454f7dd276540 | [
"MIT"
] | null | null | null | android/image/models.py | gwhong917/A_C_C | 1cd75a2e439f86bcbf1e6d9e1ac454f7dd276540 | [
"MIT"
] | null | null | null | android/image/models.py | gwhong917/A_C_C | 1cd75a2e439f86bcbf1e6d9e1ac454f7dd276540 | [
"MIT"
] | null | null | null | from django.db import models
# plt_num = plate_detection(
class PicPost(models.Model):
model_pic = models.ImageField(upload_to='image/%Y/%m/%d', max_length=1000)
time = models.DateTimeField(auto_now_add=True)
userid = models.IntegerField();
lat = models.FloatField(null=True)
lng = models.FloatField... | 35.636364 | 78 | 0.732143 |
4a16894b9f589d39b1f69b4b565ebced08c34575 | 168 | py | Python | docs/ETC/UnusedModes/S - Grid Squares/info.py | kbsezginel/etcviz | 3a10e1fbfe0e2b032e87b20a58386c412f59ff28 | [
"BSD-3-Clause"
] | 1 | 2021-11-17T15:00:14.000Z | 2021-11-17T15:00:14.000Z | docs/ETC/UnusedModes/S - Grid Squares/info.py | kbsezginel/etcviz | 3a10e1fbfe0e2b032e87b20a58386c412f59ff28 | [
"BSD-3-Clause"
] | null | null | null | docs/ETC/UnusedModes/S - Grid Squares/info.py | kbsezginel/etcviz | 3a10e1fbfe0e2b032e87b20a58386c412f59ff28 | [
"BSD-3-Clause"
] | null | null | null | name = "S - Grid Squares"
description = "Grid of oscillating squares"
knob1 = "X Offset"
knob2 = "Y Offset"
knob3 = "Size"
knob4 = "Color"
released = "March 21 2017"
| 21 | 43 | 0.672619 |
4a168a45e998dee023459944c11764027f516d78 | 19,013 | py | Python | ucscsdk/mometa/ether/EtherServerIntFIo.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | null | null | null | ucscsdk/mometa/ether/EtherServerIntFIo.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | null | null | null | ucscsdk/mometa/ether/EtherServerIntFIo.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for EtherServerIntFIo ManagedObject."""
from ...ucscmo import ManagedObject
from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta
from ...ucscmeta import VersionMeta
class EtherServerIntFIoConsts():
ADMIN_SPEED_10GBPS = "10gbps"
ADMIN_SPEED_1GBPS = "1... | 61.332258 | 1,522 | 0.681113 |
4a168a6deaa94e3ec426e38381e73b6c993bbc39 | 3,876 | py | Python | datumaro/tests/test_datumaro_format.py | SUNx2YCH/cvat | 7e8fc2366afe2b41f534633e4b9d42fbd580546a | [
"MIT"
] | null | null | null | datumaro/tests/test_datumaro_format.py | SUNx2YCH/cvat | 7e8fc2366afe2b41f534633e4b9d42fbd580546a | [
"MIT"
] | null | null | null | datumaro/tests/test_datumaro_format.py | SUNx2YCH/cvat | 7e8fc2366afe2b41f534633e4b9d42fbd580546a | [
"MIT"
] | null | null | null | import numpy as np
from unittest import TestCase
from datumaro.components.project import Project
from datumaro.components.extractor import (Extractor, DatasetItem,
AnnotationType, Label, Mask, Points, Polygon,
PolyLine, Bbox, Caption,
LabelCategories, MaskCategories, PointsCategories
)
from datumaro.plugi... | 38.76 | 79 | 0.518576 |
4a168d0d90d32611c48f1ebe2f90a2e03edd664c | 1,393 | py | Python | disk/migrations/0001_initial.py | L316645200/bkapp | a593126fe00827543fe0e31f37aed7ac2e4bbe14 | [
"Apache-2.0"
] | null | null | null | disk/migrations/0001_initial.py | L316645200/bkapp | a593126fe00827543fe0e31f37aed7ac2e4bbe14 | [
"Apache-2.0"
] | 2 | 2020-06-05T23:50:18.000Z | 2021-06-10T22:07:04.000Z | disk/migrations/0001_initial.py | SalomeL/bkapp | a593126fe00827543fe0e31f37aed7ac2e4bbe14 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hosts', '0008_auto_20191028_1810'),
]
operations = [
migrations.CreateModel(
name='DiskUsage',
field... | 42.212121 | 132 | 0.603733 |
4a168d67fd68e3ae67904ee37faaa8cb93938d8a | 1,875 | py | Python | Problem18.py | Cleancode404/ProjectEuler | 2f93b256b107bfb6a395b8aa197cfeacc599b00b | [
"MIT"
] | null | null | null | Problem18.py | Cleancode404/ProjectEuler | 2f93b256b107bfb6a395b8aa197cfeacc599b00b | [
"MIT"
] | null | null | null | Problem18.py | Cleancode404/ProjectEuler | 2f93b256b107bfb6a395b8aa197cfeacc599b00b | [
"MIT"
] | null | null | null | #maximum path sum I
"""
By starting at the top of the triangle below and moving to
adjacent numbers on the row below,
the maximum total from top to bottom is 23.
3
7 4
2 4 6
8 5 9 3
That is, 3 + 7 + 4 + 9 = 23.
Find the maximum total from top to bottom of the triangle below:
75
95 64
17 47 82
18 35 87 10
20 04 82... | 30.241935 | 88 | 0.511467 |
4a168dbd44c687fee2b8efb496dc0cc170b2c4e5 | 5,105 | py | Python | insights/core/remote_resource.py | Siddhantrao/insights-core | 03807b46b3678b7c1376cd4afb7413ec36b054b4 | [
"Apache-2.0"
] | null | null | null | insights/core/remote_resource.py | Siddhantrao/insights-core | 03807b46b3678b7c1376cd4afb7413ec36b054b4 | [
"Apache-2.0"
] | null | null | null | insights/core/remote_resource.py | Siddhantrao/insights-core | 03807b46b3678b7c1376cd4afb7413ec36b054b4 | [
"Apache-2.0"
] | null | null | null | import requests
import redis
import calendar
from cachecontrol.heuristics import BaseHeuristic
from cachecontrol.wrapper import CacheControl
from cachecontrol.caches.file_cache import FileCache
from datetime import datetime, timedelta
from email.utils import parsedate, formatdate
from cachecontrol.caches.redis_cache ... | 37.262774 | 109 | 0.659158 |
4a168e780a35166d73625058adea95a45028f90d | 12,785 | py | Python | torchtools/trainer.py | Time1ess/torchtools | 1c48591188827f8a7403162728f86229203354c5 | [
"BSD-3-Clause"
] | 16 | 2017-08-15T14:01:13.000Z | 2020-12-21T11:23:31.000Z | torchtools/trainer.py | Time1ess/torchtools | 1c48591188827f8a7403162728f86229203354c5 | [
"BSD-3-Clause"
] | null | null | null | torchtools/trainer.py | Time1ess/torchtools | 1c48591188827f8a7403162728f86229203354c5 | [
"BSD-3-Clause"
] | 2 | 2017-12-28T14:09:09.000Z | 2020-07-14T14:29:30.000Z | # coding: UTF-8
import torch
from tqdm import tqdm, trange
from torchtools import TRAIN_MODE, VALIDATE_MODE, TEST_MODE
from torchtools.callbacks import Hook, Callback
from torchtools.exceptions import (
HookTypeError, TrainerTerminatedException)
from torchtools.meters import Meter
class Trainer(object):
"""... | 34.00266 | 78 | 0.546734 |
4a168efd50746a1be1babb3d8c81ec9d4f0259ec | 52,271 | py | Python | puzzler/puzzles/pentacubes.py | tiwo/puzzler | 7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e | [
"Intel"
] | null | null | null | puzzler/puzzles/pentacubes.py | tiwo/puzzler | 7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e | [
"Intel"
] | null | null | null | puzzler/puzzles/pentacubes.py | tiwo/puzzler | 7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e | [
"Intel"
] | 1 | 2022-01-02T16:54:14.000Z | 2022-01-02T16:54:14.000Z | #!/usr/bin/env python
# $Id$
# Author: David Goodger <goodger@python.org>
# Copyright: (C) 1998-2015 by David J. Goodger
# License: GPL 2 (see __init__.py)
"""
Concrete pentacube puzzles.
"""
from puzzler.puzzles import Puzzle3D, Puzzle2D
from puzzler.puzzles.polycubes import (
SolidPentominoes, Pentacubes, Pen... | 25.585414 | 82 | 0.572535 |
4a168f1d0efe38704b80d6a8934625ed67b53d9a | 332 | py | Python | pypy/module/binascii/interp_crc32.py | Qointum/pypy | c0ed88efbc135a75a535f4534ca1f3baf0bf39d8 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | pypy/module/binascii/interp_crc32.py | Qointum/pypy | c0ed88efbc135a75a535f4534ca1f3baf0bf39d8 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | pypy/module/binascii/interp_crc32.py | Qointum/pypy | c0ed88efbc135a75a535f4534ca1f3baf0bf39d8 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | from pypy.interpreter.gateway import unwrap_spec
from rpython.rlib.rarithmetic import r_uint
from rpython.rlib import rzipfile
@unwrap_spec(data='bufferstr', oldcrc='truncatedint_w')
def crc32(space, data, oldcrc=0):
"Compute the CRC-32 incrementally."
crc = rzipfile.crc32(data, r_uint(oldcrc))
return spac... | 33.2 | 55 | 0.771084 |
4a168f41d12c1449570c5f1289a7fa038fd4ae77 | 1,123 | py | Python | backend/dvadmin/system/management/commands/init.py | hojongss3ch8j/marcglasbergo | e03a3924210237d4e07cc116cf1d22ab5a1f2280 | [
"Apache-2.0"
] | 60 | 2021-07-22T06:39:11.000Z | 2022-03-30T12:45:46.000Z | backend/dvadmin/system/management/commands/init.py | hojongss3ch8j/marcglasbergo | e03a3924210237d4e07cc116cf1d22ab5a1f2280 | [
"Apache-2.0"
] | 1 | 2021-09-26T21:36:28.000Z | 2021-09-26T21:36:28.000Z | backend/dvadmin/system/management/commands/init.py | hojongss3ch8j/marcglasbergo | e03a3924210237d4e07cc116cf1d22ab5a1f2280 | [
"Apache-2.0"
] | 24 | 2021-07-19T15:07:33.000Z | 2022-03-23T09:00:15.000Z | import logging
from django.core.management.base import BaseCommand
from application import settings
logger = logging.getLogger(__name__)
class Command(BaseCommand):
"""
项目初始化命令: python manage.py init
"""
def add_arguments(self, parser):
parser.add_argument('init_name', nargs='*', type=str,... | 28.075 | 84 | 0.590383 |
4a168f8d457b70069ff2aaabe0b6b3e0f5dc582d | 13,758 | py | Python | tests/test_dse.py | jrt54/total_variation | 6611bcddc0e8fe5a49414b004e5b9da9dec4fd6a | [
"MIT"
] | 1 | 2018-10-02T00:36:53.000Z | 2018-10-02T00:36:53.000Z | tests/test_dse.py | jrt54/total_variation | 6611bcddc0e8fe5a49414b004e5b9da9dec4fd6a | [
"MIT"
] | null | null | null | tests/test_dse.py | jrt54/total_variation | 6611bcddc0e8fe5a49414b004e5b9da9dec4fd6a | [
"MIT"
] | null | null | null | from conftest import EVAL
from sympy import sin # noqa
import numpy as np
import pytest
from conftest import x, y, z, time, skipif_yask # noqa
from devito import Eq # noqa
from devito.ir import Stencil, Expression, FindNodes, TemporariesGraph, clusterize
from devito.dse import rewrite, common_subexprs_elimination,... | 38.75493 | 89 | 0.566071 |
4a168fb77dc07945c99df32b9a259bbc17575dc8 | 608 | py | Python | ENCODN/FRAMES/CODONS.py | akshitadixit/ENCODN | 7b4ecaba10314f9f59f53e9b479016b21f8b632b | [
"RSA-MD"
] | 6 | 2020-10-07T13:09:38.000Z | 2021-01-16T17:16:51.000Z | ENCODN/FRAMES/CODONS.py | akshitadixit/ENCODN | 7b4ecaba10314f9f59f53e9b479016b21f8b632b | [
"RSA-MD"
] | 27 | 2020-10-09T09:14:23.000Z | 2021-01-22T07:16:43.000Z | ENCODN/FRAMES/CODONS.py | DSC-IIIT-Kalyani/ENCODN | 62752ac7e368b294ec9613a1f73cb3f1f7c878f5 | [
"RSA-MD"
] | 14 | 2020-10-07T14:25:59.000Z | 2021-02-21T16:54:37.000Z | from tkinter import *
from tkinter import ttk
t_names = ["CODONS"]
frames = []
fr_names = []
def CODONS(master=None):
s = ttk.Style(master)
s.configure('lefttab.TNotebook',padding=[20,20], tabposition='wn')
nb = ttk.Notebook(master, s='lefttab.TNotebook', width=800, height=570)
nb.grid(row=0, colum... | 24.32 | 73 | 0.662829 |
4a16914556135e3e400a94736e1cc043c193defc | 1,072 | py | Python | swift/common/middleware/tempurl.py | IPVL/swift_test | 41d1ee3d575036a0788425b20da87aeee00bb605 | [
"MIT"
] | null | null | null | swift/common/middleware/tempurl.py | IPVL/swift_test | 41d1ee3d575036a0788425b20da87aeee00bb605 | [
"MIT"
] | null | null | null | swift/common/middleware/tempurl.py | IPVL/swift_test | 41d1ee3d575036a0788425b20da87aeee00bb605 | [
"MIT"
] | null | null | null | from swift.ipvl.inspect_custom import whoami, whosdaddy
pass # (WIS) print __name__
class TempURL(object):
"""docstring for TempURL"""
def __init__(self, app, conf, methods):
pass # (WIS) print "%s %s (%s -> %s)" % (__name__, self.__class__.__name__, whosdaddy(), whoami())
self.app = app
... | 34.580645 | 107 | 0.635261 |
4a1691e0314caa229d15b5bd9f9f1714472ec996 | 1,716 | py | Python | homeassistant/components/iaqualink/sensor.py | joshwapohlmann/home-assistant | f3fa073045a39845e638aacf48e658d1f04e4801 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/iaqualink/sensor.py | joshwapohlmann/home-assistant | f3fa073045a39845e638aacf48e658d1f04e4801 | [
"Apache-2.0"
] | 39 | 2016-12-16T12:40:34.000Z | 2017-02-13T17:53:42.000Z | homeassistant/components/iaqualink/sensor.py | joshwapohlmann/home-assistant | f3fa073045a39845e638aacf48e658d1f04e4801 | [
"Apache-2.0"
] | null | null | null | """Support for Aqualink temperature sensors."""
import logging
from typing import Optional
from iaqualink import AqualinkSensor
from homeassistant.components.sensor import DOMAIN
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS, TEMP_FAHRENHEI... | 28.6 | 87 | 0.695804 |
4a1692dbd53bff4c76fa30e905b9f838eff69448 | 91,624 | py | Python | sympy/assumptions/tests/test_query.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 1 | 2016-02-22T22:46:50.000Z | 2016-02-22T22:46:50.000Z | sympy/assumptions/tests/test_query.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 7 | 2017-05-01T14:15:32.000Z | 2017-09-06T20:44:24.000Z | sympy/assumptions/tests/test_query.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 1 | 2016-04-06T15:05:37.000Z | 2016-04-06T15:05:37.000Z | from sympy.abc import t, w, x, y, z, n, k, m, p, i
from sympy.assumptions import (ask, AssumptionsContext, Q, register_handler,
remove_handler)
from sympy.assumptions.assume import global_assumptions
from sympy.assumptions.ask import compute_known_facts, single_fact_lookup
from sympy.assumptions.handlers import... | 41.421338 | 111 | 0.620056 |
4a16938e8edfed0e79226a6f214abf171b03016c | 1,995 | py | Python | bot/youtube.py | zd4y/discordbot | 57432b4e577241058e02c609ca36eae4b52911dc | [
"MIT"
] | null | null | null | bot/youtube.py | zd4y/discordbot | 57432b4e577241058e02c609ca36eae4b52911dc | [
"MIT"
] | null | null | null | bot/youtube.py | zd4y/discordbot | 57432b4e577241058e02c609ca36eae4b52911dc | [
"MIT"
] | null | null | null | import asyncio
from .utils import fetch
from .config import Settings
from aiohttp import ClientSession
base_url = 'https://www.googleapis.com/youtube/v3/{}'
async def fetch_youtube(session: ClientSession, resource: str, part: str, **kwargs) -> dict:
params = {
'part': part,
'key': Settings.YOUT... | 28.5 | 130 | 0.701754 |
4a16939300c91a4bc6c2820b7421c58ecf1d1105 | 2,728 | py | Python | queue_/queue_from_stack.py | mgaranina/programming-2021-19fpl | e3f9b95167cd3fd793dcd891a222127c2f1c9abf | [
"MIT"
] | null | null | null | queue_/queue_from_stack.py | mgaranina/programming-2021-19fpl | e3f9b95167cd3fd793dcd891a222127c2f1c9abf | [
"MIT"
] | null | null | null | queue_/queue_from_stack.py | mgaranina/programming-2021-19fpl | e3f9b95167cd3fd793dcd891a222127c2f1c9abf | [
"MIT"
] | null | null | null | """
Programming for linguists
Implementation of the data structure "Queue" from stack
"""
from queue_.queue_ import FullQueue, InfiniteQueue
from stack.stack import Stack
# pylint: disable=invalid-name
class Queue_:
"""
Queue Data Structure from stack
"""
def __init__(self, data: Stack = Stack(), m... | 26.745098 | 67 | 0.578446 |
4a169453e35d3d586acca4930dd23d93d6d21daf | 6,858 | py | Python | homeassistant/components/influxdb/sensor.py | lkollar/home-assistant | f4f7c25f744c0678b12acb2cc905894cca9f46ef | [
"Apache-2.0"
] | 5 | 2020-09-17T10:48:51.000Z | 2021-11-22T00:08:17.000Z | homeassistant/components/influxdb/sensor.py | lkollar/home-assistant | f4f7c25f744c0678b12acb2cc905894cca9f46ef | [
"Apache-2.0"
] | 9 | 2022-01-27T06:32:10.000Z | 2022-03-31T07:07:51.000Z | homeassistant/components/influxdb/sensor.py | lkollar/home-assistant | f4f7c25f744c0678b12acb2cc905894cca9f46ef | [
"Apache-2.0"
] | 6 | 2019-12-01T19:06:52.000Z | 2020-09-17T00:57:06.000Z | """InfluxDB component which allows you to get data from an Influx database."""
from datetime import timedelta
import logging
from influxdb import InfluxDBClient, exceptions
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_HOST,
CONF_NA... | 31.458716 | 88 | 0.631234 |
4a1694929dc9a5a1d78bce2f99be04de0f1ba8e5 | 5,752 | py | Python | fluid/PaddleNLP/text_matching_on_quora/quora_question_pairs.py | awesome-archive/models-1 | 747f947eff1511d3291d86dcd27736214dfbf2bc | [
"Apache-2.0"
] | 1 | 2019-03-07T12:50:05.000Z | 2019-03-07T12:50:05.000Z | fluid/PaddleNLP/text_matching_on_quora/quora_question_pairs.py | ThinkPeace/models | 5d25e00c94943e50e64780a244136f88f13c0a88 | [
"Apache-2.0"
] | null | null | null | fluid/PaddleNLP/text_matching_on_quora/quora_question_pairs.py | ThinkPeace/models | 5d25e00c94943e50e64780a244136f88f13c0a88 | [
"Apache-2.0"
] | 1 | 2019-04-02T07:57:06.000Z | 2019-04-02T07:57:06.000Z | # Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 29.19797 | 107 | 0.631085 |
4a16966add4aa0356c31409a94ea8d01231f5ec8 | 208 | py | Python | w05/e15.py | Luccifer/PythonCoruseraHSE | 653d6a24325789342f0d033717ba548dc6e90483 | [
"Unlicense"
] | 1 | 2020-01-12T12:55:07.000Z | 2020-01-12T12:55:07.000Z | w05/e15.py | Luccifer/PythonCourseraHSE | 653d6a24325789342f0d033717ba548dc6e90483 | [
"Unlicense"
] | null | null | null | w05/e15.py | Luccifer/PythonCourseraHSE | 653d6a24325789342f0d033717ba548dc6e90483 | [
"Unlicense"
] | null | null | null | # Количество положительных
def number_of_positive(nums):
i = 0
for num in nums:
if num > 0:
i += 1
print(i)
nums = list(map(int, input().split()))
number_of_positive(nums)
| 14.857143 | 38 | 0.586538 |
4a16975aed7cca7304da6dd733ece2218dd21774 | 5,538 | py | Python | opencell/scripts/export_annotations.py | czbiohub/opencell-portal-pub | 2b056924e4f55490b16349ff0dcf3e719ab516c7 | [
"Unlicense"
] | 2 | 2022-02-17T16:24:49.000Z | 2022-03-02T22:26:48.000Z | opencell/scripts/export_annotations.py | czbiohub/opencell-portal-pub | 2b056924e4f55490b16349ff0dcf3e719ab516c7 | [
"Unlicense"
] | null | null | null | opencell/scripts/export_annotations.py | czbiohub/opencell-portal-pub | 2b056924e4f55490b16349ff0dcf3e719ab516c7 | [
"Unlicense"
] | null | null | null |
import argparse
import datetime
import os
import pandas as pd
import re
import sqlalchemy as sa
from opencell.database import utils
def timestamp():
return datetime.datetime.now().strftime('%Y-%m-%d')
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('--dst-dir', dest='dst_dir')... | 31.645714 | 97 | 0.644276 |
4a1698ade7b95251f3fa2601f7b754ca4aed5580 | 1,978 | py | Python | apps/accounts/tests/test_authentication.py | SCiO-systems/qcat | 8c2b8e07650bc2049420fa6de758fba7e50c2f28 | [
"Apache-2.0"
] | null | null | null | apps/accounts/tests/test_authentication.py | SCiO-systems/qcat | 8c2b8e07650bc2049420fa6de758fba7e50c2f28 | [
"Apache-2.0"
] | null | null | null | apps/accounts/tests/test_authentication.py | SCiO-systems/qcat | 8c2b8e07650bc2049420fa6de758fba7e50c2f28 | [
"Apache-2.0"
] | null | null | null | from apps.accounts.client import WocatWebsiteUserClient
from django.contrib.auth import get_user_model
from apps.qcat.tests import TestCase
User = get_user_model()
def get_mock_validate_session_values():
"""
Returns mock values that correspond to the actual validate_session
function in accounts.authenti... | 29.969697 | 78 | 0.689585 |
4a1698fafc9517037afd6ce00f4b449009b48d79 | 2,499 | py | Python | tests/integ/test_tf_cifar.py | evanfwelch/sagemaker-python-sdk | 8b3d113a23c09995c6a6a5d12d4364e27bfd549d | [
"Apache-2.0"
] | null | null | null | tests/integ/test_tf_cifar.py | evanfwelch/sagemaker-python-sdk | 8b3d113a23c09995c6a6a5d12d4364e27bfd549d | [
"Apache-2.0"
] | null | null | null | tests/integ/test_tf_cifar.py | evanfwelch/sagemaker-python-sdk | 8b3d113a23c09995c6a6a5d12d4364e27bfd549d | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fil... | 40.306452 | 110 | 0.720688 |
4a16999cb76dbaf316bdcfbe3135547370167c60 | 103 | py | Python | python/random/random_id.py | gerritjvv/program-helpers | c219531a461ff5a8eb3c1c10a9029e98712e8047 | [
"MIT"
] | null | null | null | python/random/random_id.py | gerritjvv/program-helpers | c219531a461ff5a8eb3c1c10a9029e98712e8047 | [
"MIT"
] | null | null | null | python/random/random_id.py | gerritjvv/program-helpers | c219531a461ff5a8eb3c1c10a9029e98712e8047 | [
"MIT"
] | null | null | null | import binascii
import os
def random_id():
return binascii.b2a_hex(os.urandom(8)).decode('utf-8') | 17.166667 | 58 | 0.728155 |
4a16999f28afa49a2bb470e850cd49a2c0e5147b | 325 | py | Python | binary_tree/migrations/0002_remove_binarytree_status.py | vintkor/cryptotrade | cd27b5d58e4149cf9ad5e035983fcec566369833 | [
"MIT"
] | 1 | 2019-07-26T09:54:32.000Z | 2019-07-26T09:54:32.000Z | binary_tree/migrations/0002_remove_binarytree_status.py | shamanu4/test_project | 8ec52b5ab88c7bae4e469dc04fe64630e2f081fa | [
"MIT"
] | 6 | 2020-06-05T19:00:20.000Z | 2022-03-11T23:29:35.000Z | binary_tree/migrations/0002_remove_binarytree_status.py | vintkor/cryptotrade | cd27b5d58e4149cf9ad5e035983fcec566369833 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.7 on 2018-07-12 16:48
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('binary_tree', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='binarytree',
name='status',
),
... | 18.055556 | 47 | 0.587692 |
4a169ac071b49f9f2229214c2f852d9e468fa411 | 3,976 | py | Python | Chapter 09/Windows/import_world_borders.py | PacktPublishing/Python-Geospatial-Development-Third-Edition | e1e1f52da8509876e8576e081de9d5f251a21f77 | [
"MIT"
] | 44 | 2016-06-14T05:36:10.000Z | 2022-01-30T18:29:44.000Z | Chapter 09/Windows/import_world_borders.py | KonstantinKlepikov/Python-Geospatial-Development-Third-Edition | ca3545dbab75dac63080582538de40d4d1c15dab | [
"MIT"
] | null | null | null | Chapter 09/Windows/import_world_borders.py | KonstantinKlepikov/Python-Geospatial-Development-Third-Edition | ca3545dbab75dac63080582538de40d4d1c15dab | [
"MIT"
] | 48 | 2016-12-11T08:53:46.000Z | 2022-02-10T12:10:34.000Z | # import_world_borders.py
# DELETE FROM countries;
# ALTER TABLE countries DROP COLUMN outline;
# ALTER TABLE countries ADD COLUMN outline GEOMETRY(GEOMETRY, 4326);
import os.path
import psycopg2
import osgeo.ogr
import shapely.wkt
from shapely.geometry import MultiPolygon
from shapely.affinity import translate
###... | 29.894737 | 79 | 0.595825 |
4a169aed019c69300fdec39bda5cd4f7bca45ae5 | 270 | py | Python | pickle_io.py | steveli/mogp | d142e7b9e5b7dbc67cfae4760c837cafd9691a51 | [
"MIT"
] | 7 | 2019-07-18T19:55:26.000Z | 2022-02-14T13:55:04.000Z | pickle_io.py | steveli/mogp | d142e7b9e5b7dbc67cfae4760c837cafd9691a51 | [
"MIT"
] | null | null | null | pickle_io.py | steveli/mogp | d142e7b9e5b7dbc67cfae4760c837cafd9691a51 | [
"MIT"
] | 2 | 2020-01-28T15:46:15.000Z | 2020-09-16T07:31:13.000Z | import cPickle as pickle
def pickle_load(filename):
with open(filename, 'rb') as f:
dat = pickle.load(f)
return dat
def pickle_save(filename, *args):
with open(filename, 'wb') as f:
pickle.dump(args, f, protocol=pickle.HIGHEST_PROTOCOL)
| 19.285714 | 62 | 0.662963 |
4a169c4eed216a3a9025750f87e733f810e723b8 | 5,618 | py | Python | otk/asbp/plotting.py | draustin/otk | c6e91423ec79b85b380ee9385f6d27c91f92503d | [
"MIT"
] | 7 | 2020-05-17T14:26:42.000Z | 2022-02-14T04:52:54.000Z | otk/asbp/plotting.py | uamhforever/otk | c6e91423ec79b85b380ee9385f6d27c91f92503d | [
"MIT"
] | 17 | 2020-04-10T22:50:00.000Z | 2020-06-18T04:54:19.000Z | otk/asbp/plotting.py | uamhforever/otk | c6e91423ec79b85b380ee9385f6d27c91f92503d | [
"MIT"
] | 1 | 2022-02-14T04:52:45.000Z | 2022-02-14T04:52:45.000Z | import numpy as np
from PyQt5 import QtCore
import pyqtgraph_extended as pg
from . import sa, math
def make_Er_image_item(r_support, Er, rs_center=(0, 0), quantity='waves'):
x, y, Eru = sa.unroll_r(r_support, Er, rs_center)
if quantity == 'amplitude':
data = abs(Eru)
lut = pg.get_colormap_lut()... | 40.417266 | 126 | 0.647739 |
4a169c914a3aed3e96b57c1b28da5bf6533aec52 | 4,263 | py | Python | OnshoreBattlebot2018/Entities/Ranger.py | roy-love/BattleCode2018-ReferenceBot | c017cf804728dd1555ab6a60acdd2a6f7a929281 | [
"MIT"
] | null | null | null | OnshoreBattlebot2018/Entities/Ranger.py | roy-love/BattleCode2018-ReferenceBot | c017cf804728dd1555ab6a60acdd2a6f7a929281 | [
"MIT"
] | null | null | null | OnshoreBattlebot2018/Entities/Ranger.py | roy-love/BattleCode2018-ReferenceBot | c017cf804728dd1555ab6a60acdd2a6f7a929281 | [
"MIT"
] | null | null | null | import random
import sys
import traceback
import battlecode as bc
from Controllers.MissionController import *
from .IRobot import IRobot
class Ranger(IRobot):
"""This is the Ranger robot"""
# change init definition to include any controllers needed in the instructor as we need them
# For example: it will eventuall... | 40.216981 | 102 | 0.749472 |
4a169d04be1b41ac02cc58d6064dabfd7a79dbd8 | 38,400 | py | Python | pygoslin/parser/FattyAcidParserEventHandler.py | lifs-tools/pygoslin | e6cdd437db5926aee5dff1b7cfb00ff267fb976d | [
"MIT"
] | null | null | null | pygoslin/parser/FattyAcidParserEventHandler.py | lifs-tools/pygoslin | e6cdd437db5926aee5dff1b7cfb00ff267fb976d | [
"MIT"
] | 2 | 2021-04-06T09:00:21.000Z | 2022-01-07T16:13:51.000Z | pygoslin/parser/FattyAcidParserEventHandler.py | lifs-tools/pygoslin | e6cdd437db5926aee5dff1b7cfb00ff267fb976d | [
"MIT"
] | 2 | 2020-07-13T14:16:24.000Z | 2021-04-06T08:39:20.000Z | """
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
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 ... | 42.430939 | 636 | 0.570339 |
4a169d1416909c47b1fa942049ce64b9a9c0d54f | 1,531 | py | Python | apps/modules/permission/apis/url_permission.py | yeayee/osroom | f7084843ea4b75505283f8b23da60471ba8fc9bb | [
"BSD-2-Clause"
] | 1 | 2019-05-12T14:54:40.000Z | 2019-05-12T14:54:40.000Z | apps/modules/permission/apis/url_permission.py | yeayee/osroom | f7084843ea4b75505283f8b23da60471ba8fc9bb | [
"BSD-2-Clause"
] | null | null | null | apps/modules/permission/apis/url_permission.py | yeayee/osroom | f7084843ea4b75505283f8b23da60471ba8fc9bb | [
"BSD-2-Clause"
] | null | null | null | # -*-coding:utf-8-*-
from flask import request
from apps.configs.sys_config import METHOD_WARNING
from apps.core.blueprint import api
from apps.core.flask.login_manager import osr_login_required
from apps.core.flask.permission import permission_required
from apps.core.flask.response import response_format
from apps.mod... | 28.351852 | 109 | 0.634226 |
4a169d9c285c53f3dcfad2fc64985dda159bb23d | 2,483 | py | Python | antiphishme/src/models/certs_model.py | TheArqsz/AntiPhishMe-backend | 3ae38059e410152ae1976815c209829ac08f47a5 | [
"MIT"
] | 1 | 2020-05-28T11:45:22.000Z | 2020-05-28T11:45:22.000Z | antiphishme/src/models/certs_model.py | TheArqsz/AntiPhishMe-backend | 3ae38059e410152ae1976815c209829ac08f47a5 | [
"MIT"
] | 1 | 2021-03-31T19:56:26.000Z | 2021-03-31T19:56:26.000Z | antiphishme/src/models/certs_model.py | TheArqsz/AntiPhishMe-backend | 3ae38059e410152ae1976815c209829ac08f47a5 | [
"MIT"
] | 2 | 2020-05-28T16:45:45.000Z | 2021-09-07T14:16:44.000Z | import json
import datetime
import sqlalchemy
from antiphishme.src.helpers.consts import Const
from antiphishme.src.db_config import db
class Certs(db.Model):
__tablename__ = 'certs'
id = db.Column(db.Integer(), primary_key=True)
caid = db.Column(db.Integer(), unique=True, nullable=False)
is_bad = db... | 36.514706 | 189 | 0.655256 |
4a169e3572aa2010c56b469e15c888c253654126 | 26,680 | py | Python | panel/tests/test_param.py | rupakgoyal/panel- | 4e1e01e1766ebfc2fc1efb409734fd51efc60c01 | [
"BSD-3-Clause"
] | 1 | 2019-10-15T13:21:20.000Z | 2019-10-15T13:21:20.000Z | panel/tests/test_param.py | rupakgoyal/panel- | 4e1e01e1766ebfc2fc1efb409734fd51efc60c01 | [
"BSD-3-Clause"
] | null | null | null | panel/tests/test_param.py | rupakgoyal/panel- | 4e1e01e1766ebfc2fc1efb409734fd51efc60c01 | [
"BSD-3-Clause"
] | null | null | null | import os
import param
from bokeh.models import (
Div, Slider, Select, RangeSlider, MultiSelect, Row as BkRow,
CheckboxGroup, Toggle, Button, TextInput as BkTextInput,
Tabs as BkTabs, Column as BkColumn, TextInput)
from panel.pane import Pane, PaneBase, Matplotlib, Bokeh
from panel.layout import Tabs, Row... | 26.68 | 95 | 0.658808 |
4a169e4af95a6c920a56c7664af43f85dfed03af | 3,786 | py | Python | tests/unit/extraction_rules/test_audit_policy.py | luisr-escobar/dynatrace-gcp-function | b404873eb59bf79993b820aa80248d26882185f5 | [
"Apache-2.0"
] | 19 | 2020-09-30T13:52:39.000Z | 2022-02-23T12:43:53.000Z | tests/unit/extraction_rules/test_audit_policy.py | luisr-escobar/dynatrace-gcp-function | b404873eb59bf79993b820aa80248d26882185f5 | [
"Apache-2.0"
] | 87 | 2020-10-02T19:59:43.000Z | 2022-03-31T11:54:42.000Z | tests/unit/extraction_rules/test_audit_policy.py | luisr-escobar/dynatrace-gcp-function | b404873eb59bf79993b820aa80248d26882185f5 | [
"Apache-2.0"
] | 13 | 2020-10-27T08:14:46.000Z | 2022-01-09T23:45:44.000Z | # Copyright 2020 Dynatrace 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... | 37.485149 | 117 | 0.641838 |
4a169f719da28befbe6651b3d3f58f6c180ddb76 | 187,654 | py | Python | lib/sqlalchemy/sql/compiler.py | petit87/sqlalchemy | 67d674bd63ca36ac32b23f96e2b19e9dac6b0863 | [
"MIT"
] | null | null | null | lib/sqlalchemy/sql/compiler.py | petit87/sqlalchemy | 67d674bd63ca36ac32b23f96e2b19e9dac6b0863 | [
"MIT"
] | null | null | null | lib/sqlalchemy/sql/compiler.py | petit87/sqlalchemy | 67d674bd63ca36ac32b23f96e2b19e9dac6b0863 | [
"MIT"
] | null | null | null | # sql/compiler.py
# Copyright (C) 2005-2022 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
"""Base SQL and DDL compiler implementations.
Classes provided include:
:class:`.... | 33.92768 | 92 | 0.561816 |
4a16a00f15b2f0e72ec4ec89b32f6998084234f9 | 17,939 | py | Python | train.py | Shreeyak/pytorch-deeplabv3-alphapilot | 30db7cfc8bf699253308d28c19f03e6249aea9a1 | [
"MIT"
] | null | null | null | train.py | Shreeyak/pytorch-deeplabv3-alphapilot | 30db7cfc8bf699253308d28c19f03e6249aea9a1 | [
"MIT"
] | null | null | null | train.py | Shreeyak/pytorch-deeplabv3-alphapilot | 30db7cfc8bf699253308d28c19f03e6249aea9a1 | [
"MIT"
] | null | null | null | import argparse
import glob
import os
import socket
import timeit
from collections import OrderedDict
from datetime import datetime
import numpy as np
from matplotlib import pyplot as plt
from PIL import Image
from PIL.ImageMath import eval
from tqdm import tqdm
import imgaug as ia
import oyaml
# PyTorch includes
imp... | 40.585973 | 183 | 0.61213 |
4a16a01bee25ace29ff1ce09407ef8f7f370d7c9 | 10,033 | py | Python | pywikibot/families/wikipedia_family.py | Amitie10g/pywikibot | 9c1ee13eb3e5077f929eaeef4959b76b0151b616 | [
"MIT"
] | null | null | null | pywikibot/families/wikipedia_family.py | Amitie10g/pywikibot | 9c1ee13eb3e5077f929eaeef4959b76b0151b616 | [
"MIT"
] | null | null | null | pywikibot/families/wikipedia_family.py | Amitie10g/pywikibot | 9c1ee13eb3e5077f929eaeef4959b76b0151b616 | [
"MIT"
] | null | null | null | """Family module for Wikipedia."""
#
# (C) Pywikibot team, 2004-2021
#
# Distributed under the terms of the MIT license.
#
from pywikibot import family
# The Wikimedia family that is known as Wikipedia, the Free Encyclopedia
class Family(family.SubdomainFamily, family.WikimediaFamily):
"""Family module for Wikip... | 43.812227 | 82 | 0.424399 |
4a16a0db65c77bfab77ff3fb0b8633bc3bcb9ed3 | 2,808 | py | Python | main.py | Sech1/Longest_Path_Dag | b22158a5e2345791a8a87e326145aab1d42627f0 | [
"CECILL-B"
] | null | null | null | main.py | Sech1/Longest_Path_Dag | b22158a5e2345791a8a87e326145aab1d42627f0 | [
"CECILL-B"
] | null | null | null | main.py | Sech1/Longest_Path_Dag | b22158a5e2345791a8a87e326145aab1d42627f0 | [
"CECILL-B"
] | null | null | null | import networkx as nx
from graph import *
def main():
graphs = read_in_files()
for graph in graphs:
dag_sp(graph, graph.sources, 14)
def read_in_files():
graphs = list()
files = ['input/BAinCS.gml', 'input/BSinCS.gml', 'input/BSinECE.gml']
for file in files:
with open(file) as ... | 32.275862 | 90 | 0.631766 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.