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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e08d5c88aa92ca1911e6cd9a7296f83193a6786b | 2,571 | py | Python | toontown/toon/ToonHeadFrame.py | P1ayerOne/src | 3a4343e29f844fe95da7d51aaee7fb680d02bf72 | [
"BSD-3-Clause"
] | null | null | null | toontown/toon/ToonHeadFrame.py | P1ayerOne/src | 3a4343e29f844fe95da7d51aaee7fb680d02bf72 | [
"BSD-3-Clause"
] | null | null | null | toontown/toon/ToonHeadFrame.py | P1ayerOne/src | 3a4343e29f844fe95da7d51aaee7fb680d02bf72 | [
"BSD-3-Clause"
] | null | null | null | from direct.gui.DirectGui import *
from pandac.PandaModules import *
from libotp import *
from . import ToonHead
from toontown.distributed import DelayDelete
from toontown.toonbase import ToontownGlobals
class ToonHeadFrame(DirectFrame):
def __init__(self, av, color = ToontownGlobals.GlobalDialogColor, g = DGG.ge... | 41.467742 | 177 | 0.64294 |
44743cacec0532f839181735e5b0a7b4dabdc99e | 4,225 | py | Python | torchgeo/datamodules/cowc.py | remtav/torchgeo | d06b103f81edec4f4e0d13ccd621d318364679a2 | [
"MIT"
] | null | null | null | torchgeo/datamodules/cowc.py | remtav/torchgeo | d06b103f81edec4f4e0d13ccd621d318364679a2 | [
"MIT"
] | null | null | null | torchgeo/datamodules/cowc.py | remtav/torchgeo | d06b103f81edec4f4e0d13ccd621d318364679a2 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""COWC datamodule."""
from typing import Any, Dict, Optional
import matplotlib.pyplot as plt
import pytorch_lightning as pl
from torch import Generator
from torch.utils.data import DataLoader, random_split
from ..datasets... | 32.007576 | 93 | 0.618462 |
9684135efc5427206b324d8a71ea31faec62351f | 4,288 | py | Python | perlin_noise.py | HarrisonGreen/Procedural-Planets | 611e1d2998fea01cacadab3fa64334a29e948d83 | [
"MIT"
] | 1 | 2022-01-13T20:50:34.000Z | 2022-01-13T20:50:34.000Z | perlin_noise.py | HarrisonGreen/Procedural-Planets | 611e1d2998fea01cacadab3fa64334a29e948d83 | [
"MIT"
] | null | null | null | perlin_noise.py | HarrisonGreen/Procedural-Planets | 611e1d2998fea01cacadab3fa64334a29e948d83 | [
"MIT"
] | null | null | null | import numpy as np
def composite_perlin(components, octaves, base_freq, freq_ratio, decay, damp, power):
"""
Generates Perlin noise with the given parameters for a list of components
Parameters
----------
components: list
A list, whose elements should each contain 3 matrices with x, y and ... | 38.285714 | 102 | 0.630131 |
2e4b2b998928a3af835ba83abf0a25979007284e | 1,512 | py | Python | tensorflow/contrib/slim/python/slim/data/dataset.py | 285219011/hello-world | dfb71ea206eb9f61e5d97c9727caa1a6449e39cb | [
"Apache-2.0"
] | 6 | 2017-04-25T01:30:41.000Z | 2019-12-11T15:08:46.000Z | tensorflow/contrib/slim/python/slim/data/dataset.py | alainrk/tensorflow | 314d9cd9b607460f8bfea80fc828b1521ca18443 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/slim/python/slim/data/dataset.py | alainrk/tensorflow | 314d9cd9b607460f8bfea80fc828b1521ca18443 | [
"Apache-2.0"
] | 8 | 2017-04-17T23:39:12.000Z | 2019-05-11T14:06:31.000Z | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 39.789474 | 80 | 0.649471 |
b5d66980949cf0d4939509eedc21682f19e5d678 | 161 | py | Python | 02/0210/p.py | kkdg/python-jogging | 6dd076bd7e4e28b877770731081448f4dc4b26d0 | [
"Apache-2.0"
] | 2 | 2015-01-08T00:34:41.000Z | 2015-01-08T13:26:00.000Z | 02/0210/p.py | kkdg/python-jogging | 6dd076bd7e4e28b877770731081448f4dc4b26d0 | [
"Apache-2.0"
] | null | null | null | 02/0210/p.py | kkdg/python-jogging | 6dd076bd7e4e28b877770731081448f4dc4b26d0 | [
"Apache-2.0"
] | null | null | null | class Parent:
def myMethod(self):
print "Me parent"
class Child(Parent):
def myMethod(self):
print "Me child"
c = Child()
c.myMethod()
| 14.636364 | 25 | 0.602484 |
dfd301f6a7e07d1cc5140f44e27a3d874a45c0f8 | 67,067 | py | Python | saleor/graphql/product/mutations/products.py | valcome-analytics/saleor | f41b5d0de897b3914fe8bfd19c4f0b3c15448fa0 | [
"CC-BY-4.0"
] | null | null | null | saleor/graphql/product/mutations/products.py | valcome-analytics/saleor | f41b5d0de897b3914fe8bfd19c4f0b3c15448fa0 | [
"CC-BY-4.0"
] | null | null | null | saleor/graphql/product/mutations/products.py | valcome-analytics/saleor | f41b5d0de897b3914fe8bfd19c4f0b3c15448fa0 | [
"CC-BY-4.0"
] | null | null | null | from collections import defaultdict
from typing import Iterable, List, Tuple, Union
import graphene
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.db import transaction
from django.db.models import Q, QuerySet
from django.template.defaultfilters import slugify
from graphene.types im... | 36.890539 | 88 | 0.639361 |
6fa87ebfa151c25247647f60dee71b059548f010 | 2,059 | py | Python | test/test_add_contact_to_group.py | voronova-ea/python_training | 78fee6ce7e3f80f2f56a35304f2b5ff3dbcf4576 | [
"Apache-2.0"
] | null | null | null | test/test_add_contact_to_group.py | voronova-ea/python_training | 78fee6ce7e3f80f2f56a35304f2b5ff3dbcf4576 | [
"Apache-2.0"
] | null | null | null | test/test_add_contact_to_group.py | voronova-ea/python_training | 78fee6ce7e3f80f2f56a35304f2b5ff3dbcf4576 | [
"Apache-2.0"
] | null | null | null | from model.contact import Contact
from model.group import Group
import random
def test_create_contact_with_adding_to_group(app, orm, data_contacts):
app.group.check(orm, Group(name="test"))
contact = data_contacts
group = random.choice(orm.get_group_list())
old_list_contacts_in_group = orm.get_contact... | 47.883721 | 132 | 0.751821 |
6100b40d817e7edb869fda6923b5abd5d7261e70 | 881 | py | Python | summary.py | bubbliiiing/arcface-tf2 | b2d6b1c10898689f0f4f6c952feefb3eb43b8e7d | [
"MIT"
] | 2 | 2022-03-08T03:49:14.000Z | 2022-03-08T09:42:29.000Z | summary.py | bubbliiiing/arcface-tf2 | b2d6b1c10898689f0f4f6c952feefb3eb43b8e7d | [
"MIT"
] | null | null | null | summary.py | bubbliiiing/arcface-tf2 | b2d6b1c10898689f0f4f6c952feefb3eb43b8e7d | [
"MIT"
] | 1 | 2022-03-16T01:51:20.000Z | 2022-03-16T01:51:20.000Z | #--------------------------------------------#
# 该部分代码只用于看网络结构,并非测试代码
#--------------------------------------------#
from nets.arcface import arcface
from utils.utils import net_flops
if __name__ == "__main__":
input_shape = [112, 112]
backbone = "mobilefacenet"
model = arcface([input_shape[0], ... | 35.24 | 104 | 0.358683 |
31af068a51e9a5325cb53e5d122ce36f055a333c | 1,101 | py | Python | events/urls.py | eddyyonnie/Neighbours | 7eaac93fcca8f6cf695ce65c883bc6515783876b | [
"MIT"
] | null | null | null | events/urls.py | eddyyonnie/Neighbours | 7eaac93fcca8f6cf695ce65c883bc6515783876b | [
"MIT"
] | 3 | 2021-03-19T01:11:02.000Z | 2021-09-08T01:02:37.000Z | events/urls.py | eddyyonnie/Neighbours | 7eaac93fcca8f6cf695ce65c883bc6515783876b | [
"MIT"
] | null | null | null | from django.conf.urls import url
from . import views
from django.conf import settings
from django.contrib.auth import views as auth_views
from django.conf.urls.static import static
from .forms import LoginForm
urlpatterns=[
url(r'^$',views.home,name='home'),
url(r'^new-project/$',views.new_project,name='new-p... | 45.875 | 147 | 0.716621 |
52c52eecea7dd4b0959b98c9b20ee89b16b1df79 | 329 | py | Python | lectures/lecture03/code/script.py | mateusza/Introduction-to-Python-Numerical-Analysis-for-Engineers-and-Scientist | a27144cc8742e67af215e8de781bd208cc1f7436 | [
"MIT"
] | 101 | 2017-11-28T15:08:25.000Z | 2022-03-26T13:59:49.000Z | lectures/lecture03/code/script.py | mateusza/Introduction-to-Python-Numerical-Analysis-for-Engineers-and-Scientist | a27144cc8742e67af215e8de781bd208cc1f7436 | [
"MIT"
] | 1 | 2017-12-16T19:41:39.000Z | 2017-12-16T19:41:39.000Z | lectures/lecture03/code/script.py | mateusza/Introduction-to-Python-Numerical-Analysis-for-Engineers-and-Scientist | a27144cc8742e67af215e8de781bd208cc1f7436 | [
"MIT"
] | 54 | 2017-12-15T19:19:53.000Z | 2022-03-01T23:36:55.000Z | # import my_simple_library.py as msl
import my_simple_library as msl
# access a class within my library
a = msl.my_simple_class()
# access an instance of this class function
a.my_class_function()
# outside functions in the library that are outside of the class
msl.function_outside_class()
msl.another_function_o... | 25.307692 | 66 | 0.793313 |
9dc1236e528f267013b7495b77a563d0b6e313d9 | 6,881 | py | Python | src/strainge/cli/straingst.py | nick-youngblut/StrainGE | bc976889ef61cb63eb76e6d3cece87d15166f330 | [
"BSD-3-Clause"
] | 16 | 2021-02-16T06:09:27.000Z | 2022-03-14T14:52:52.000Z | src/strainge/cli/straingst.py | nick-youngblut/StrainGE | bc976889ef61cb63eb76e6d3cece87d15166f330 | [
"BSD-3-Clause"
] | 8 | 2021-03-08T18:20:12.000Z | 2022-03-25T11:28:54.000Z | src/strainge/cli/straingst.py | nick-youngblut/StrainGE | bc976889ef61cb63eb76e6d3cece87d15166f330 | [
"BSD-3-Clause"
] | 3 | 2022-03-13T04:23:08.000Z | 2022-03-16T06:19:09.000Z | # Copyright (c) 2016-2019, Broad Institute, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of co... | 37.601093 | 141 | 0.604273 |
a832423c0ae0f6007021c5818a886d22bf7ded4d | 1,508 | py | Python | src2fcat_py3.py | rbliu/LSST_DM_Scripts | 0a32ba629a2b52d3add407e92ab8ff4bc3cbd64d | [
"MIT"
] | null | null | null | src2fcat_py3.py | rbliu/LSST_DM_Scripts | 0a32ba629a2b52d3add407e92ab8ff4bc3cbd64d | [
"MIT"
] | null | null | null | src2fcat_py3.py | rbliu/LSST_DM_Scripts | 0a32ba629a2b52d3add407e92ab8ff4bc3cbd64d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#!/usr/bin/env python
## last modified by Robert Liu at 6/20/2018
## This script is used to extract header and catalog from a (DM stack output) src fits file, and save it as the fiat style.
import re
import sys
import numpy as np
from astropy.io import fits
if len(sys.argv) != 2:
print("Us... | 28.45283 | 123 | 0.643236 |
1a87ffce08163466b876f8545a71ddd825ac3701 | 769 | py | Python | test.py | oxygenman/mint | 3943392a17f520917931a361af7e564d888ffcb1 | [
"Apache-2.0"
] | null | null | null | test.py | oxygenman/mint | 3943392a17f520917931a361af7e564d888ffcb1 | [
"Apache-2.0"
] | null | null | null | test.py | oxygenman/mint | 3943392a17f520917931a361af7e564d888ffcb1 | [
"Apache-2.0"
] | null | null | null | import numpy as np
test=np.load('./outputs/gBR_sBM_c01_d05_mBR0_ch02_mBR0.npy')
print(test[0])
configs['model'] = pipeline_config.multi_modal_model
configs['train_config'] = pipeline_config.train_config
configs['train_dataset'] = pipeline_config.train_dataset
configs['eval_config'] = pipeline_config.eval_config
config... | 34.954545 | 60 | 0.780234 |
a635fca1d48be383e6506d389ba33a1f5e55fe3c | 540 | py | Python | speechdb/management/commands/deltestuser.py | bmverhel/dices | 6ed1de81469616093ec1b4b00a6c88fa94ab84a1 | [
"MIT"
] | null | null | null | speechdb/management/commands/deltestuser.py | bmverhel/dices | 6ed1de81469616093ec1b4b00a6c88fa94ab84a1 | [
"MIT"
] | 1 | 2021-07-06T14:05:46.000Z | 2021-07-06T14:05:46.000Z | speechdb/management/commands/deltestuser.py | bmverhel/dices | 6ed1de81469616093ec1b4b00a6c88fa94ab84a1 | [
"MIT"
] | 3 | 2021-05-26T14:10:00.000Z | 2021-07-06T13:45:11.000Z | from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
class Command(BaseCommand):
help = 'Deletes a user'
def add_arguments(self, parser):
parser.add_argument('user', type=str)
def handle(self, *args, **options):
try:
user = Us... | 31.764706 | 61 | 0.627778 |
8bf80a32721b2fb2bcf2f5f32220cc4568112f05 | 56,706 | py | Python | src/oci/functions/functions_management_client.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | 3 | 2020-09-10T22:09:45.000Z | 2021-12-24T17:00:07.000Z | src/oci/functions/functions_management_client.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/functions/functions_management_client.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 47.853165 | 245 | 0.648062 |
9a9583aecdd5a7a1665e7c9f0542a92d623e9f01 | 6,409 | py | Python | examples/ResNet/load-resnet.py | awesome-archive/tensorpack | 55f640f70e19d538e5082a4712241ee966fcb201 | [
"Apache-2.0"
] | 2 | 2021-01-31T11:18:49.000Z | 2021-02-24T14:42:16.000Z | examples/ResNet/load-resnet.py | yangxue0827/tensorpack | e5e54e07bb47f85fc7efe9c78bde3e153ef0d49b | [
"Apache-2.0"
] | null | null | null | examples/ResNet/load-resnet.py | yangxue0827/tensorpack | e5e54e07bb47f85fc7efe9c78bde3e153ef0d49b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: load-resnet.py
# Author: Eric Yujia Huang <yujiah1@andrew.cmu.edu>
# Yuxin Wu
import argparse
import functools
import numpy as np
import re
import cv2
import six
import tensorflow as tf
from tensorpack import *
from tensorpack.dataflow.dataset import ILSVR... | 36.005618 | 110 | 0.617413 |
e8b1ca9395d815fc56963e5af1f23b3ab0139b72 | 3,092 | py | Python | interactive/interactive/unit_dict.py | NCAR/music-box-interactive | 50ee69a7cc4f2cfff5439b501339a39f80adf497 | [
"Apache-2.0"
] | 4 | 2020-07-20T17:18:51.000Z | 2022-03-17T19:08:24.000Z | interactive/interactive/unit_dict.py | NCAR/music-box-interactive | 50ee69a7cc4f2cfff5439b501339a39f80adf497 | [
"Apache-2.0"
] | 174 | 2020-07-30T16:47:53.000Z | 2022-03-29T17:54:54.000Z | interactive/interactive/unit_dict.py | NCAR/music-box-interactive | 50ee69a7cc4f2cfff5439b501339a39f80adf497 | [
"Apache-2.0"
] | 1 | 2021-01-05T22:42:55.000Z | 2021-01-05T22:42:55.000Z | #dictionary with all units and their types
unitDict = {
'ppm':{
'type': 'concentration',
'subtype': 'mixing ratio',
'factor': 1e6
},
'ppb':{
'type': 'concentration',
'subtype': 'mixing ratio',
'factor': 1e9
},
... | 25.983193 | 45 | 0.369664 |
2a1d77f63c4ebfbf95138d94ca55235d372cee25 | 2,189 | py | Python | locations/spiders/valvoline_instant_oil_change.py | mfjackson/alltheplaces | 37c90b4041c80a574e6e4c2f886883e97df4b636 | [
"MIT"
] | null | null | null | locations/spiders/valvoline_instant_oil_change.py | mfjackson/alltheplaces | 37c90b4041c80a574e6e4c2f886883e97df4b636 | [
"MIT"
] | null | null | null | locations/spiders/valvoline_instant_oil_change.py | mfjackson/alltheplaces | 37c90b4041c80a574e6e4c2f886883e97df4b636 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import re
import scrapy
from locations.items import GeojsonPointItem
from locations.hours import OpeningHours
class ValvolineInstantOilChangeSpider(scrapy.Spider):
name = "valvoline_instant_oil_change"
allowed_domains = ["vioc.com"]
start_urls = [
"https://sto... | 30.402778 | 88 | 0.517131 |
433da38f604258d1d851fbf80dbd65a6389db44c | 48,544 | py | Python | dataprep/clean/gui/clean_gui.py | jwa345/dataprep | cb386934b0e151ef538c3873ae8fa37bb8bd1513 | [
"MIT"
] | null | null | null | dataprep/clean/gui/clean_gui.py | jwa345/dataprep | cb386934b0e151ef538c3873ae8fa37bb8bd1513 | [
"MIT"
] | null | null | null | dataprep/clean/gui/clean_gui.py | jwa345/dataprep | cb386934b0e151ef538c3873ae8fa37bb8bd1513 | [
"MIT"
] | null | null | null | """
Flask backend of Dataprep.Clean GUI.
"""
# pylint: disable=R0912, R0915
from typing import Any
import threading
import io
import copy
import time
import inspect
import logging
from base64 import b64encode
from os import path
from tempfile import mkdtemp
from ast import literal_eval
import pandas as pd
from IPyt... | 33.781489 | 100 | 0.559946 |
cc8629a970b55e0d8be1e84b702191e55f8cc44d | 1,330 | py | Python | docs/version_release_fix.py | mb0rt/OpenCue | 7cce111306ccfa6c94f12806c8668866f2ee70ad | [
"Apache-2.0"
] | 334 | 2019-01-23T13:48:08.000Z | 2019-06-10T06:58:49.000Z | docs/version_release_fix.py | mb0rt/OpenCue | 7cce111306ccfa6c94f12806c8668866f2ee70ad | [
"Apache-2.0"
] | 564 | 2019-06-11T15:31:48.000Z | 2022-03-31T19:53:03.000Z | docs/version_release_fix.py | mb0rt/OpenCue | 7cce111306ccfa6c94f12806c8668866f2ee70ad | [
"Apache-2.0"
] | 155 | 2019-06-13T11:42:00.000Z | 2022-03-16T18:31:24.000Z | # Copyright Contributors to the OpenCue Project
#
# 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... | 31.666667 | 75 | 0.678947 |
bb3d4d3e9bcbc6db9bef76c51b2757a428c1089b | 307 | py | Python | __init__.py | Vianpyro/minecraft_with_python | 7b6d203bf900eae3ffa4f4929f6fe0ef2bd8fe76 | [
"MIT"
] | 1 | 2021-07-31T01:05:26.000Z | 2021-07-31T01:05:26.000Z | __init__.py | Vianpyro/minecraft_with_python | 7b6d203bf900eae3ffa4f4929f6fe0ef2bd8fe76 | [
"MIT"
] | null | null | null | __init__.py | Vianpyro/minecraft_with_python | 7b6d203bf900eae3ffa4f4929f6fe0ef2bd8fe76 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__version__ = "dev-1.0"
__author__ = "Vianpyro"
from .classes.datapack import *
from .classes.workspace import *
from .utilities.create_file import *
from .utilities.create_pack_meta import *
from .utilities.import_from_file import *
from .utilities.make_directory import * | 30.7 | 42 | 0.742671 |
0480bbc7ed2e5ecaf7754741cace415da46b0644 | 42,389 | py | Python | paddlenlp/transformers/ernie/modeling.py | JeremyZhao1998/PaddleNLP | 5a34684a7f0c8a186043fed386be4b62cb85fb15 | [
"Apache-2.0"
] | null | null | null | paddlenlp/transformers/ernie/modeling.py | JeremyZhao1998/PaddleNLP | 5a34684a7f0c8a186043fed386be4b62cb85fb15 | [
"Apache-2.0"
] | null | null | null | paddlenlp/transformers/ernie/modeling.py | JeremyZhao1998/PaddleNLP | 5a34684a7f0c8a186043fed386be4b62cb85fb15 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 41.355122 | 129 | 0.609144 |
87a0222ca2f0e41e2f6be141c95461baeab535c5 | 4,787 | py | Python | lib/exploit/other_exploit.py | furkansayim/Zeebsploit | 7ee6814ae39697b4fea53182901a8b87e2f18d7f | [
"Apache-2.0"
] | null | null | null | lib/exploit/other_exploit.py | furkansayim/Zeebsploit | 7ee6814ae39697b4fea53182901a8b87e2f18d7f | [
"Apache-2.0"
] | null | null | null | lib/exploit/other_exploit.py | furkansayim/Zeebsploit | 7ee6814ae39697b4fea53182901a8b87e2f18d7f | [
"Apache-2.0"
] | null | null | null | #-*- coding: utf-8 -*-
import requests,re
from bs4 import BeautifulSoup as bs
class apache_struts2_rce(object):
def strutsRCE(self,target,cmd):
self.target = target
self.cmd = cmd
payload = "%{(#_='multipart/form-data')."
payload += "(#dm=@ognl.OgnlContext@DEFAULT_MEMBER_... | 37.398438 | 105 | 0.494046 |
3d866ac5eefad921e972a3507c06b9702889ef13 | 9,563 | py | Python | solarpower_generation_forecasting_lstm.py | ngocneo/solar_energy_forecasting_web | ac6fbe47bc36f7367f83e35309def1cd04a47dac | [
"Apache-2.0"
] | null | null | null | solarpower_generation_forecasting_lstm.py | ngocneo/solar_energy_forecasting_web | ac6fbe47bc36f7367f83e35309def1cd04a47dac | [
"Apache-2.0"
] | null | null | null | solarpower_generation_forecasting_lstm.py | ngocneo/solar_energy_forecasting_web | ac6fbe47bc36f7367f83e35309def1cd04a47dac | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
import keras
from datetime import timedelta
from statsmodels.tsa.arima_model import ARIMA
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
from tensorflow.ke... | 28.978788 | 145 | 0.767123 |
f6570ee0b4805b71f939d155496d9716bdc203fe | 916 | py | Python | src/pdb_corner/subset_pdb_by_chain_gui.py | olgatsiouri1996/bioinfo_Gooey_scripts | 234a42e8367e8032bf1fb451716c7aa53e2f3e31 | [
"MIT"
] | null | null | null | src/pdb_corner/subset_pdb_by_chain_gui.py | olgatsiouri1996/bioinfo_Gooey_scripts | 234a42e8367e8032bf1fb451716c7aa53e2f3e31 | [
"MIT"
] | null | null | null | src/pdb_corner/subset_pdb_by_chain_gui.py | olgatsiouri1996/bioinfo_Gooey_scripts | 234a42e8367e8032bf1fb451716c7aa53e2f3e31 | [
"MIT"
] | null | null | null | # python3
from gooey import *
import Bio
from Bio.PDB import *
import warnings
from Bio import BiopythonWarning
# input parameters
@Gooey(required_cols=3, program_name='subset pdb by chain', header_bg_color= '#DCDCDC', terminal_font_color= '#DCDCDC', terminal_panel_color= '#DCDCDC')
def main():
ap = GooeyParser()
ap.... | 35.230769 | 152 | 0.716157 |
61ab10f488d3a06fd82d0439521c28e642668a73 | 2,773 | py | Python | Visualization/MarchCube.py | jzw0025/Kyber | ce2069da469095e6a086f7bbf9cd980f10563b22 | [
"Unlicense"
] | 3 | 2017-02-20T18:18:27.000Z | 2021-07-31T17:00:56.000Z | Visualization/MarchCube.py | jzw0025/Kyber | ce2069da469095e6a086f7bbf9cd980f10563b22 | [
"Unlicense"
] | null | null | null | Visualization/MarchCube.py | jzw0025/Kyber | ce2069da469095e6a086f7bbf9cd980f10563b22 | [
"Unlicense"
] | 1 | 2016-12-16T17:51:32.000Z | 2016-12-16T17:51:32.000Z | import numpy as np
from skimage import measure
#import matplotlib.pyplot as plt
#from mpl_toolkits.mplot3d import Axes3D
from mayavi import mlab
class VolumeSurface:
"""
this class return several surfaces for the reconstructed volume
"""
def __init__(self,volume, *levels):
self.vol = volume
... | 32.623529 | 138 | 0.564371 |
1f8647eb26cff6ebd58805421bbe7f0efd6ea491 | 382 | py | Python | end2end/base/base_data_loader.py | abhi608/task_oriented_nlp_system | 43621957a16d138ea96f1e0a3051d470437c5a11 | [
"MIT"
] | 1 | 2021-02-27T15:58:13.000Z | 2021-02-27T15:58:13.000Z | end2end/base/base_data_loader.py | abhi608/task_oriented_nlp_system | 43621957a16d138ea96f1e0a3051d470437c5a11 | [
"MIT"
] | null | null | null | end2end/base/base_data_loader.py | abhi608/task_oriented_nlp_system | 43621957a16d138ea96f1e0a3051d470437c5a11 | [
"MIT"
] | null | null | null |
class BaseDataLoader:
""" Base class for all data loaders.
Note:
No need to modify this in most cases.
"""
def __init__(self, batch_size):
self.batch_size = batch_size
def __iter__(self):
return NotImplementedError
def __next__(self):
return NotImplementedErro... | 19.1 | 45 | 0.643979 |
8129c8d866208c7ce78cc82acb75789f7bde3eb5 | 211 | py | Python | hello.py | FarmBot-Labs/hello-farmware | 6875a58566b4955b763e37f4333b288064da82e8 | [
"MIT"
] | null | null | null | hello.py | FarmBot-Labs/hello-farmware | 6875a58566b4955b763e37f4333b288064da82e8 | [
"MIT"
] | 1 | 2019-05-12T07:26:35.000Z | 2019-05-12T15:00:14.000Z | hello.py | FarmBot-Labs/hello-farmware | 6875a58566b4955b763e37f4333b288064da82e8 | [
"MIT"
] | 5 | 2019-02-19T06:32:39.000Z | 2019-12-12T16:33:01.000Z | #!/usr/bin/env python
'''Hello Farmware
A simple Farmware example that tells FarmBot to log a new message.
'''
from farmware_tools import device
device.log(message='Hello Farmware!', message_type='success')
| 19.181818 | 66 | 0.758294 |
8bb8b5333a6176eda7519f1a39b0f3e0902afd8b | 897 | py | Python | treeshaker/setup_utils.py | sclabs/treeshaker | a116fc98211c7a6d08387c204e52093c9685ae9c | [
"MIT"
] | 14 | 2020-04-08T18:48:23.000Z | 2022-03-18T15:48:55.000Z | treeshaker/setup_utils.py | sclabs/treeshaker | a116fc98211c7a6d08387c204e52093c9685ae9c | [
"MIT"
] | 6 | 2020-04-04T22:58:12.000Z | 2021-03-15T11:26:15.000Z | treeshaker/setup_utils.py | sclabs/treeshaker | a116fc98211c7a6d08387c204e52093c9685ae9c | [
"MIT"
] | null | null | null | import os
TEMPLATE = """
import os
from setuptools import setup, find_packages
if os.path.exists('README.md'):
with open('README.md') as fobj:
long_description = fobj.read()
else:
long_description='<name>'
setup(
name='<name>',
version='0.0.0',
description='<name>',
long_description=... | 23 | 67 | 0.636566 |
a03ba772a63b843122ba239e3d9a953a54d566c7 | 3,334 | py | Python | eeg_data_readers.py | MatthewCaine/BETA-SSVEP-speller | 73ec0d5bb4f181b4043ff4f8a6f2cd6a3f20bd96 | [
"Apache-2.0"
] | 3 | 2021-03-30T04:36:25.000Z | 2021-12-24T09:30:33.000Z | eeg_data_readers.py | MatthewCaine/BETA-SSVEP-speller | 73ec0d5bb4f181b4043ff4f8a6f2cd6a3f20bd96 | [
"Apache-2.0"
] | null | null | null | eeg_data_readers.py | MatthewCaine/BETA-SSVEP-speller | 73ec0d5bb4f181b4043ff4f8a6f2cd6a3f20bd96 | [
"Apache-2.0"
] | null | null | null | import constants
import os
import numpy as np
import mne
from os.path import dirname, join as pjoin
import scipy.io as sio
import csv
def wholeDatabaseReader():
TrialMatrix = np.zeros((constants.DATABASE_TRIALS, constants.DATABASE_SUBJECTS, constants.BLOCKS,
constants.DATABASE_NUMBER_O... | 45.054054 | 123 | 0.609178 |
2a40a3eb5ac5441e006d8de65cea98a472868078 | 10,005 | py | Python | dev_steps/photon_fromstep.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | dev_steps/photon_fromstep.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | dev_steps/photon_fromstep.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | import os,sys,time,random
import numpy as np
import chroma.api as api
if api.is_gpu_api_cuda():
import pycuda.driver as cuda
from pycuda import gpuarray as ga
elif api.is_gpu_api_opencl():
import pyopencl as cl
import pyopencl.array as ga
from chroma.tools import profile_if_possible
import chroma.event
... | 56.207865 | 169 | 0.615192 |
2c0d351ec4999581b19d8d2fbe5f9f2de343ae4c | 10,019 | py | Python | example/tutorial_cifar10.py | lllcho/tensorlayer | 87591b4945a6a67dfb4ea797a575efae997fd9d2 | [
"Apache-2.0"
] | null | null | null | example/tutorial_cifar10.py | lllcho/tensorlayer | 87591b4945a6a67dfb4ea797a575efae997fd9d2 | [
"Apache-2.0"
] | null | null | null | example/tutorial_cifar10.py | lllcho/tensorlayer | 87591b4945a6a67dfb4ea797a575efae997fd9d2 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python
# -*- coding: utf-8 -*-
# tl.prepro for data augmentation
import time
import numpy as np
import tensorflow as tf
import tensorlayer as tl
from tensorlayer.layers import *
sess = tf.InteractiveSession()
X_train, y_train, X_test, y_test = tl.files.load_cifar10_dataset(shape=(-1, 32, 32, 3), plotabl... | 52.182292 | 159 | 0.607945 |
d5cb6e391d31be5617971faebcce51cecc073e21 | 2,599 | py | Python | 5.Machine_Learning/2.regression/regression.py | utkrist-karky/Deep-Learning-Prerequisite | d56993af21babaf36893b7b19a3ba85e48440e91 | [
"MIT"
] | 1 | 2021-09-27T20:37:05.000Z | 2021-09-27T20:37:05.000Z | 5.Machine_Learning/2.regression/regression.py | utkrist-karky/Deep-Learning-Prerequisite | d56993af21babaf36893b7b19a3ba85e48440e91 | [
"MIT"
] | null | null | null | 5.Machine_Learning/2.regression/regression.py | utkrist-karky/Deep-Learning-Prerequisite | d56993af21babaf36893b7b19a3ba85e48440e91 | [
"MIT"
] | 1 | 2022-01-08T14:45:33.000Z | 2022-01-08T14:45:33.000Z | # Get the data from:
# https://archive.ics.uci.edu/ml/datasets/Airfoil+Self-Noise
from __future__ import print_function, division
from future.utils import iteritems
from builtins import range, input
import os
# Note: you may need to update your version of future
# sudo pip install -U future
# just in case we need it... | 24.752381 | 104 | 0.771066 |
7a2c3978d03f776913f17f55f57d6570de756462 | 1,215 | py | Python | roman-numerals/int-to-roman.py | libjared/datastructures | 13b1a766b8baa35e8c0ddd84cabc01c865898414 | [
"MIT"
] | null | null | null | roman-numerals/int-to-roman.py | libjared/datastructures | 13b1a766b8baa35e8c0ddd84cabc01c865898414 | [
"MIT"
] | null | null | null | roman-numerals/int-to-roman.py | libjared/datastructures | 13b1a766b8baa35e8c0ddd84cabc01c865898414 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
https://leetcode.com/submissions/detail/109869481/
"""
class Solution(object):
def intToRoman(self, num):
"""
:type num: int
:rtype: str
I - 1
V - 5
X - 10
L - 50
C - 100
D - 500
M - 1000
Examples:... | 24.3 | 134 | 0.502881 |
8f847c7937ee36c78ab5569b8582322a5a1eb184 | 509 | gyp | Python | extensions/external_extension_sample.gyp | mbbill/crosswalk | 8275d116c21430fe04c27271e4c41936e7488b57 | [
"BSD-3-Clause"
] | 1 | 2017-07-23T14:29:59.000Z | 2017-07-23T14:29:59.000Z | extensions/external_extension_sample.gyp | mbbill/crosswalk | 8275d116c21430fe04c27271e4c41936e7488b57 | [
"BSD-3-Clause"
] | null | null | null | extensions/external_extension_sample.gyp | mbbill/crosswalk | 8275d116c21430fe04c27271e4c41936e7488b57 | [
"BSD-3-Clause"
] | null | null | null | {
'targets': [
{
'target_name': 'echo_extension',
'type': 'loadable_module',
'include_dirs': [
'../..',
],
'sources': [
'test/echo_extension.c',
],
'product_dir': '<(PRODUCT_DIR)/tests/extension/echo_extension/'
},
{
'target_name': 'bad_extension',
'type': 'loadab... | 18.851852 | 67 | 0.526523 |
dbb0cc0660e57f410391888ea5228aaaea0b7255 | 2,243 | py | Python | src/app/voltdb/voltdb_src/tests/sqlcoverage/schema/matview-basic-schema.py | OpenMPDK/SMDK | 8f19d32d999731242cb1ab116a4cb445d9993b15 | [
"BSD-3-Clause"
] | 44 | 2022-03-16T08:32:31.000Z | 2022-03-31T16:02:35.000Z | src/app/voltdb/voltdb_src/tests/sqlcoverage/schema/matview-basic-schema.py | H2O0Lee/SMDK | eff49bc17a55a83ea968112feb2e2f2ea18c4ff5 | [
"BSD-3-Clause"
] | 1 | 2022-03-29T02:30:28.000Z | 2022-03-30T03:40:46.000Z | src/app/voltdb/voltdb_src/tests/sqlcoverage/schema/matview-basic-schema.py | H2O0Lee/SMDK | eff49bc17a55a83ea968112feb2e2f2ea18c4ff5 | [
"BSD-3-Clause"
] | 18 | 2022-03-19T04:41:04.000Z | 2022-03-31T03:32:12.000Z | #!/usr/bin/env python
# This file is part of VoltDB.
# Copyright (C) 2008-2020 VoltDB Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitati... | 45.77551 | 72 | 0.657156 |
bbe5473cf07b3756ddfd815aaffe596cdb6cf7c4 | 1,910 | py | Python | hazma/background_model.py | LoganAMorrison/Hazma | e9612729767ff48d5ce50633393f81ee021242d2 | [
"MIT"
] | 6 | 2019-07-30T18:14:43.000Z | 2020-10-25T04:58:44.000Z | hazma/background_model.py | LoganAMorrison/Hazma | e9612729767ff48d5ce50633393f81ee021242d2 | [
"MIT"
] | 8 | 2017-12-19T08:06:59.000Z | 2021-04-22T02:15:26.000Z | hazma/background_model.py | LoganAMorrison/Hazma | e9612729767ff48d5ce50633393f81ee021242d2 | [
"MIT"
] | 1 | 2020-04-01T11:08:49.000Z | 2020-04-01T11:08:49.000Z | import warnings
class BackgroundModel(object):
"""
Represents a gamma ray background model, which is required for computing
projected limits for planned gamma-ray detectors.
Parameters
----------
e_range : [float, float]
Minimum and maximum photon energies for which this model is val... | 31.833333 | 89 | 0.564398 |
08205ada780be2d5eecac9663bb2ce2d37b7b46f | 1,521 | py | Python | samples/generated_samples/aiplatform_v1_generated_pipeline_service_get_training_pipeline_async.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | 1 | 2022-03-30T05:23:29.000Z | 2022-03-30T05:23:29.000Z | samples/generated_samples/aiplatform_v1_generated_pipeline_service_get_training_pipeline_async.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | null | null | null | samples/generated_samples/aiplatform_v1_generated_pipeline_service_get_training_pipeline_async.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 33.065217 | 85 | 0.769231 |
6dff8f47baae84fc0b45f1294f78932e07d8e9a8 | 1,803 | py | Python | telegram_bot_sdk/telegram_objects/inputMediaAnimation.py | myOmikron/TelegramBotSDK | 526d1e276e5b37955b32772554f3682767ceeff2 | [
"MIT"
] | null | null | null | telegram_bot_sdk/telegram_objects/inputMediaAnimation.py | myOmikron/TelegramBotSDK | 526d1e276e5b37955b32772554f3682767ceeff2 | [
"MIT"
] | null | null | null | telegram_bot_sdk/telegram_objects/inputMediaAnimation.py | myOmikron/TelegramBotSDK | 526d1e276e5b37955b32772554f3682767ceeff2 | [
"MIT"
] | null | null | null | from telegram_bot_sdk.telegram_objects import inputMedia
from telegram_bot_sdk.telegram_objects.inputFile import InputFile
class InputMediaAnimation(inputMedia):
"""This class represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent
:param type_result: Type of the result, must be... | 43.97561 | 120 | 0.689961 |
cc5437a397828870d4036d4000c7fb2129dc683e | 3,537 | py | Python | HITB_2010_KL_CTF/libctf_2010_v2/ssh.py | klks/hitb_ctf | 4480a187876c7a4b7fd65d582b427db625f11483 | [
"MIT"
] | 3 | 2017-04-11T08:42:45.000Z | 2020-08-25T06:32:21.000Z | HITB_2010_KL_CTF/libctf_2010_v2/ssh.py | klks/hitb_ctf | 4480a187876c7a4b7fd65d582b427db625f11483 | [
"MIT"
] | null | null | null | HITB_2010_KL_CTF/libctf_2010_v2/ssh.py | klks/hitb_ctf | 4480a187876c7a4b7fd65d582b427db625f11483 | [
"MIT"
] | null | null | null | """Friendly Python SSH2 interface."""
import os
import tempfile
import paramiko
class Connection(object):
"""Connects and logs into the specified hostname.
Arguments that are not given are guessed from the environment."""
def __init__(self,
host,
username = None,
... | 33.685714 | 80 | 0.582414 |
22993352f1924b7b0439716b649f9807b0e6f77d | 5,103 | py | Python | app/user/tests/test_user_api.py | SatyamSuraj/recipe-app-api | 5d74f4b389baded806241c5ea7f8212d3bdc8d42 | [
"MIT"
] | null | null | null | app/user/tests/test_user_api.py | SatyamSuraj/recipe-app-api | 5d74f4b389baded806241c5ea7f8212d3bdc8d42 | [
"MIT"
] | null | null | null | app/user/tests/test_user_api.py | SatyamSuraj/recipe-app-api | 5d74f4b389baded806241c5ea7f8212d3bdc8d42 | [
"MIT"
] | null | null | null | from django.forms.fields import EmailField
from django.test import TestCase
from django.contrib.auth import get_user_model
from django.urls import reverse
from rest_framework.fields import empty
from rest_framework.test import APIClient
from rest_framework import status
CREATE_USER_URL = reverse('user:create')
TOKEN_... | 36.45 | 106 | 0.654321 |
8904c1f55035365a31a1cba755f7d4b0433efe9a | 10,707 | py | Python | mas_mt/v0.4_simple_classifier/classifier_0_feature_selection.py | tau-lex/market-analysis-system | 19926ca92bcab31a51fdac8f1910c8775d3d38d1 | [
"MIT"
] | 11 | 2018-03-08T14:23:45.000Z | 2020-08-14T03:59:43.000Z | mas_mt/v0.4_simple_classifier/classifier_0_feature_selection.py | terentjew-alexey/market-analysis-system | 19926ca92bcab31a51fdac8f1910c8775d3d38d1 | [
"MIT"
] | null | null | null | mas_mt/v0.4_simple_classifier/classifier_0_feature_selection.py | terentjew-alexey/market-analysis-system | 19926ca92bcab31a51fdac8f1910c8775d3d38d1 | [
"MIT"
] | 7 | 2017-06-01T01:28:06.000Z | 2020-07-10T22:24:42.000Z | # -*- coding: utf-8 -*-
import math
import matplotlib.pyplot as plt
import numpy as np
from mas_tools.os import get_parameters
from mas_tools.ml import plot_history
from mas_tools.data import create_timeseries_matrix
from mas_tools.data import get_delta, get_diff, get_log_diff
from mas_tools.data import get_sigmoid_to... | 35.92953 | 134 | 0.524423 |
a7155d0b69e28513ec339a018b8e5acc0047fa4c | 623 | py | Python | app.py | kecorbin/gitlab-spark | 32b133ab4e9f6b412ad258414a7a753a9b783c69 | [
"MIT"
] | null | null | null | app.py | kecorbin/gitlab-spark | 32b133ab4e9f6b412ad258414a7a753a9b783c69 | [
"MIT"
] | null | null | null | app.py | kecorbin/gitlab-spark | 32b133ab4e9f6b412ad258414a7a753a9b783c69 | [
"MIT"
] | null | null | null | import os
from flask import Flask, request
from flask_restful import Resource, Api
from ciscosparkapi import CiscoSparkAPI
from events import event_handler
app = Flask(__name__)
api = Api(app)
spark = CiscoSparkAPI()
room_id = os.getenv("SPARK_ROOM")
class Notify(Resource):
def get(self):
return "hello"
... | 23.961538 | 62 | 0.688604 |
ae8da94dd8c3c438b3291ad66d39f444ab94957b | 116 | py | Python | #1 Mundo/#7/9.py | Henrique-Navarro/phyton | 26d66847afa2b15c254677a36eb22f7558816b59 | [
"MIT"
] | null | null | null | #1 Mundo/#7/9.py | Henrique-Navarro/phyton | 26d66847afa2b15c254677a36eb22f7558816b59 | [
"MIT"
] | null | null | null | #1 Mundo/#7/9.py | Henrique-Navarro/phyton | 26d66847afa2b15c254677a36eb22f7558816b59 | [
"MIT"
] | null | null | null | a= int(input('Digite um numero: '))
print(f'{a*1}\n{a*2}\n{a*3}\n{a*4}\n{a*5}\n{a*6}\n{a*7}\n{a*8}\n{a*9}\n{a*10}') | 38.666667 | 79 | 0.508621 |
8e3f0739686ce55ceb55266ffe8ddfe55671bd95 | 7,009 | py | Python | ros/src/styx/bridge.py | mxwg/CarND-Capstone | 3c7991325fb612f52de4f26e67128a210fb31373 | [
"MIT"
] | 2 | 2018-03-17T06:06:56.000Z | 2018-04-10T19:32:10.000Z | ros/src/styx/bridge.py | mxwg/CarND-Capstone | 3c7991325fb612f52de4f26e67128a210fb31373 | [
"MIT"
] | 19 | 2018-03-10T15:02:58.000Z | 2018-04-20T05:47:55.000Z | ros/src/styx/bridge.py | mxwg/CarND-Capstone | 3c7991325fb612f52de4f26e67128a210fb31373 | [
"MIT"
] | null | null | null |
import rospy
import tf
from geometry_msgs.msg import PoseStamped, Quaternion, TwistStamped
from dbw_mkz_msgs.msg import SteeringReport, ThrottleCmd, BrakeCmd, SteeringCmd
from std_msgs.msg import Float32 as Float
from std_msgs.msg import Bool
from sensor_msgs.msg import PointCloud2
from sensor_msgs.msg import Image
i... | 33.859903 | 129 | 0.629619 |
df979b999f61d1575d8f8d9b7276d80f5d670e06 | 2,122 | py | Python | setup.py | llucid-97/rl-generalization | 5561067d6fe0f8873a1e83b2479a6a6faa820dfa | [
"MIT"
] | 84 | 2018-10-31T19:45:03.000Z | 2022-02-17T17:29:12.000Z | setup.py | llucid-97/rl-generalization | 5561067d6fe0f8873a1e83b2479a6a6faa820dfa | [
"MIT"
] | 9 | 2018-11-29T13:29:59.000Z | 2021-05-11T23:54:20.000Z | setup.py | llucid-97/rl-generalization | 5561067d6fe0f8873a1e83b2479a6a6faa820dfa | [
"MIT"
] | 15 | 2018-10-31T19:45:29.000Z | 2022-03-25T16:06:11.000Z | import os
from setuptools import setup, find_packages
import sys
if sys.version_info.major != 3:
print('This Python is only compatible with Python 3, but you are running '
'Python {}. The installation will likely fail.'.format(sys.version_info.major))
package_name = 'sunblaze_envs'
authors = ['UC Berke... | 33.15625 | 117 | 0.624882 |
27c4047661962bfef2b2171a33659cc773c8e9c5 | 496 | py | Python | src/accounts/forms.py | aliharby12/CRM-App | ec40f73882c784e1be320022e5a86f1dfc9a78d7 | [
"MIT"
] | null | null | null | src/accounts/forms.py | aliharby12/CRM-App | ec40f73882c784e1be320022e5a86f1dfc9a78d7 | [
"MIT"
] | null | null | null | src/accounts/forms.py | aliharby12/CRM-App | ec40f73882c784e1be320022e5a86f1dfc9a78d7 | [
"MIT"
] | null | null | null | from django.forms import ModelForm
from .models import Order
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
class OrderForm(ModelForm):
"""create a form to create an order"""
class Meta:
model = Order
fields = '__all__'
class UserRegisterFor... | 27.555556 | 64 | 0.695565 |
f71780c4b08f54dd66b5a1991c6159621e4cec1f | 18,071 | py | Python | test/cpython/test_audioop.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-02-06T14:28:45.000Z | 2020-02-06T14:28:45.000Z | test/cpython/test_audioop.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | test/cpython/test_audioop.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-02-06T14:29:00.000Z | 2020-02-06T14:29:00.000Z | # expected: fail
import audioop
import sys
import unittest
import struct
from test.test_support import run_unittest
formats = {
1: 'b',
2: 'h',
4: 'i',
}
def pack(width, data):
return struct.pack('=%d%s' % (len(data), formats[width]), *data)
packs = {
1: lambda *data: pack(1, data),
2: lambd... | 45.749367 | 88 | 0.531791 |
7d0d1fb02676702b156103de7e20cc713afb9013 | 225 | py | Python | oscar/apps/discount/models.py | owad/django-oscar | cfa69e37dc9abc97a7aff5c8616da319e1771008 | [
"BSD-3-Clause"
] | 1 | 2022-03-17T19:26:13.000Z | 2022-03-17T19:26:13.000Z | oscar/apps/discount/models.py | aykut/django-oscar | ca3629e74ea1e0affc55d3de4e97f523e352d267 | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/discount/models.py | aykut/django-oscar | ca3629e74ea1e0affc55d3de4e97f523e352d267 | [
"BSD-3-Clause"
] | 1 | 2019-03-23T10:26:02.000Z | 2019-03-23T10:26:02.000Z | from oscar.apps.discount.abstract_models import (AbstractDiscountOffer, PERCENTAGE_DISCOUNT,
ABSOLUTE_DISCOUNT, FINAL_PRICE)
class DiscountOffer(AbstractDiscountOffer):
pass
| 32.142857 | 93 | 0.68 |
d348f27333a7a565bde2b0004d0aed9a4d9f3f43 | 1,373 | py | Python | model_2/Buffer.py | rbccpsiiot/Digital-Twin | 47a1559b17e9fdc34d0ff455ac3d5081e9161ac7 | [
"MIT"
] | 1 | 2019-08-10T10:34:42.000Z | 2019-08-10T10:34:42.000Z | model_2/Buffer.py | rbccpsiiot/Digital-Twin | 47a1559b17e9fdc34d0ff455ac3d5081e9161ac7 | [
"MIT"
] | null | null | null | model_2/Buffer.py | rbccpsiiot/Digital-Twin | 47a1559b17e9fdc34d0ff455ac3d5081e9161ac7 | [
"MIT"
] | null | null | null | # Buffer.py
#
# A wrapper around SimPy's store resource class.
# Models a finite capacity FIFO buffer.
#
# Parameters:
# capacity: max number of jobs that can be present in the buffer at any time
#
# Author: Neha Karanjkar
# Date: 27 Oct 2017
import random,simpy
class Buffer():
def __init__(se... | 21.453125 | 78 | 0.585579 |
254ea4467d21f2ea6756b3a90a14a3b2d693b67f | 4,076 | py | Python | dj_hetmech/settings.py | dhimmel/hetmech-backend | 28d9626d75c5fa78b03ae0cb18b32f90bcf1fe8f | [
"BSD-3-Clause"
] | 4 | 2020-01-24T16:11:10.000Z | 2020-11-19T20:40:53.000Z | dj_hetmech/settings.py | dhimmel/hetmech-backend | 28d9626d75c5fa78b03ae0cb18b32f90bcf1fe8f | [
"BSD-3-Clause"
] | 57 | 2018-10-30T18:29:14.000Z | 2019-11-04T15:19:51.000Z | dj_hetmech/settings.py | dhimmel/hetmech-backend | 28d9626d75c5fa78b03ae0cb18b32f90bcf1fe8f | [
"BSD-3-Clause"
] | 3 | 2018-10-30T18:07:19.000Z | 2019-06-04T14:50:44.000Z | """
Django settings for dj_hetmech project.
Generated by 'django-admin startproject' using Django 2.1.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os... | 27.173333 | 91 | 0.694308 |
bdff1e135504ac741df44c46a143d1c7beb837ba | 139 | py | Python | Project/App/admin.py | cs-fullstack-2019-spring/django-authentication-cw-rdunavant | 256487226bd5b42d0d40bdb3b36c4e8e69aa2e0d | [
"Apache-2.0"
] | null | null | null | Project/App/admin.py | cs-fullstack-2019-spring/django-authentication-cw-rdunavant | 256487226bd5b42d0d40bdb3b36c4e8e69aa2e0d | [
"Apache-2.0"
] | null | null | null | Project/App/admin.py | cs-fullstack-2019-spring/django-authentication-cw-rdunavant | 256487226bd5b42d0d40bdb3b36c4e8e69aa2e0d | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import FoodFitnessModel
# Register your models here.
admin.site.register(FoodFitnessModel)
| 19.857143 | 37 | 0.827338 |
72c8b2d70bd1f286baa8da08ddceba2344ff6048 | 3,606 | py | Python | koku/masu/processor/aws/aws_report_parquet_processor.py | Vasyka/koku | b5aa9ec41c3b0821e74afe9ff3a5ffaedb910614 | [
"Apache-2.0"
] | 2 | 2022-01-12T03:42:39.000Z | 2022-01-12T03:42:40.000Z | koku/masu/processor/aws/aws_report_parquet_processor.py | Vasyka/koku | b5aa9ec41c3b0821e74afe9ff3a5ffaedb910614 | [
"Apache-2.0"
] | null | null | null | koku/masu/processor/aws/aws_report_parquet_processor.py | Vasyka/koku | b5aa9ec41c3b0821e74afe9ff3a5ffaedb910614 | [
"Apache-2.0"
] | 1 | 2021-07-21T09:33:59.000Z | 2021-07-21T09:33:59.000Z | #
# Copyright 2021 Red Hat Inc.
# SPDX-License-Identifier: Apache-2.0
#
"""Processor for AWS Parquet files."""
import ciso8601
import pytz
from tenant_schemas.utils import schema_context
from masu.processor.report_parquet_processor_base import ReportParquetProcessorBase
from masu.util import common as utils
from repor... | 36.424242 | 103 | 0.659456 |
58314a5149717ef5a8dec66035fc9ab6f207cb10 | 8,119 | py | Python | cosmosis-standard-library/structure/owls/owls.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | 1 | 2021-09-15T10:10:26.000Z | 2021-09-15T10:10:26.000Z | cosmosis-standard-library/structure/owls/owls.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | null | null | null | cosmosis-standard-library/structure/owls/owls.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | 1 | 2021-06-11T15:29:43.000Z | 2021-06-11T15:29:43.000Z | """
This module loads data from the powtable files which summarize the OWLS
results made by Tim Eifler et al.
I interpolate into that data using a bivariate spline to get an estimate of the
effect on the matter power from baryons at a given z and k.
This requires an additional parameter in the range (0,1) which contr... | 35.147186 | 137 | 0.596625 |
52936a39e450e4492485c4fd86ca37d57e9891d7 | 7,912 | py | Python | venv/Lib/site-packages/nbformat/tests/test_validator.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 603 | 2020-12-23T13:49:32.000Z | 2022-03-31T23:38:03.000Z | venv/Lib/site-packages/nbformat/tests/test_validator.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 387 | 2020-12-15T14:54:04.000Z | 2022-03-31T07:00:21.000Z | venv/Lib/site-packages/nbformat/tests/test_validator.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 35 | 2021-03-26T03:12:04.000Z | 2022-03-23T10:15:10.000Z | """Test nbformat.validator"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import os
import re
from .base import TestsBase
from jsonschema import ValidationError
from nbformat import read
from ..validator import isvalid, validate, iter_validate
from ..json_comp... | 33.668085 | 117 | 0.71499 |
398770a195534a6306185c132b53b1b9ff9594a3 | 1,785 | py | Python | cmsplugin_zinnia/migrations/0003_add_default_template_value.py | juanjgarcia/emencia-cmsplugin-zinnia | e9313ca9e69b65447fad21c67bc587a4f4ca66bb | [
"BSD-3-Clause"
] | 2 | 2019-09-23T15:30:29.000Z | 2020-01-29T07:23:18.000Z | cmsplugin_zinnia/migrations/0003_add_default_template_value.py | juanjgarcia/emencia-cmsplugin-zinnia | e9313ca9e69b65447fad21c67bc587a4f4ca66bb | [
"BSD-3-Clause"
] | null | null | null | cmsplugin_zinnia/migrations/0003_add_default_template_value.py | juanjgarcia/emencia-cmsplugin-zinnia | e9313ca9e69b65447fad21c67bc587a4f4ca66bb | [
"BSD-3-Clause"
] | 1 | 2021-05-05T14:37:09.000Z | 2021-05-05T14:37:09.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-11-19 16:52
from __future__ import unicode_literals
from django.db import migrations, models
from cmsplugin_zinnia.choices_helpers import (get_template_choices,
get_default_template)
class Migration(migratio... | 44.625 | 202 | 0.682353 |
b53c2e758e8ddd83c32b841d4ab04d88541de973 | 1,064 | py | Python | danmacu/values.py | belm/danmacu | f96e9f75b2a0404084de6e734d539ee73d76c15b | [
"WTFPL"
] | 21 | 2020-05-30T18:14:26.000Z | 2022-03-29T03:10:35.000Z | danmacu/values.py | belm/danmacu | f96e9f75b2a0404084de6e734d539ee73d76c15b | [
"WTFPL"
] | 4 | 2021-01-14T09:21:23.000Z | 2021-12-11T16:39:53.000Z | danmacu/values.py | belm/danmacu | f96e9f75b2a0404084de6e734d539ee73d76c15b | [
"WTFPL"
] | 1 | 2021-01-13T11:06:34.000Z | 2021-01-13T11:06:34.000Z | import enum
import time
BASE_DOMAIN = "bilibili.com"
API_PROTOCOL = "https"
API_SUB_DOMAIN = "api.live"
API_PREFIX = f"{API_PROTOCOL}://{API_SUB_DOMAIN}.{BASE_DOMAIN}"
DANMAKU_PROTOCOL = "wss"
DANMAKU_SUB_DOMAIN = "broadcastlv.chat"
DANMAKU_DOMAIN = f"{DANMAKU_SUB_DOMAIN}.{BASE_DOMAIN}"
DANMAKU_PORT = 443
DANMAKU_PA... | 24.181818 | 88 | 0.713346 |
0046b066fe52153bfdbad48dcb0db2bba1d5d1ef | 5,306 | py | Python | detectia/datamodule/create_records.py | kartik4949/detectia | e62165372b2abac63239d540dfa8c3ee0eafd75c | [
"Apache-2.0"
] | 3 | 2021-02-02T10:59:26.000Z | 2021-11-20T07:56:29.000Z | detectia/datamodule/create_records.py | kartik4949/detectia | e62165372b2abac63239d540dfa8c3ee0eafd75c | [
"Apache-2.0"
] | null | null | null | detectia/datamodule/create_records.py | kartik4949/detectia | e62165372b2abac63239d540dfa8c3ee0eafd75c | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Kartik Sharma. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 40.815385 | 88 | 0.577459 |
ffa796034aba5b1ec0527bf183f25976abbd0a69 | 7,372 | py | Python | tests/infra/member.py | fritzalder/CCF | a156bbf51dfa60bbcab28a1c9de0c4a85187751d | [
"Apache-2.0"
] | 1 | 2021-05-10T10:10:24.000Z | 2021-05-10T10:10:24.000Z | tests/infra/member.py | fritzalder/CCF | a156bbf51dfa60bbcab28a1c9de0c4a85187751d | [
"Apache-2.0"
] | 2 | 2022-02-03T06:32:47.000Z | 2022-02-09T23:00:07.000Z | tests/infra/member.py | securelogicgroup/CCF | 2bad8ca6caa146e6b7cd4167fea551d61fecabfa | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache 2.0 License.
from enum import Enum
import infra.proc
import infra.proposal
import infra.crypto
import ccf.clients
import http
import os
import base64
import json
from typing import NamedTuple, Optional
from loguru import logger as... | 34.12963 | 87 | 0.591698 |
5ff809e65f14b0f4a5384c11a546e3f44235dcca | 210 | py | Python | src/configflow/misc/__init__.py | volodymyrPivoshenko/configflow | 2158c8395c4913b836c2a27e38c51f5ec519323b | [
"MIT"
] | 8 | 2022-01-25T09:06:34.000Z | 2022-03-28T14:55:45.000Z | src/configflow/misc/__init__.py | volodymyrPivoshenko/configflow | 2158c8395c4913b836c2a27e38c51f5ec519323b | [
"MIT"
] | 23 | 2022-01-23T15:15:00.000Z | 2022-03-28T21:47:15.000Z | src/configflow/misc/__init__.py | volodymyrPivoshenko/configflow | 2158c8395c4913b836c2a27e38c51f5ec519323b | [
"MIT"
] | 1 | 2022-03-15T21:08:19.000Z | 2022-03-15T21:08:19.000Z | """Package for the utility functionality, primitive data types, mixins and helper functions."""
from configflow.misc import decorators
from configflow.misc import dictionary
from configflow.misc import string
| 35 | 95 | 0.82381 |
658845620691f853ede1510cbe45be1b242c74e9 | 2,275 | py | Python | qa/rpc-tests/test_framework/address.py | sennevb/Commercium | 7926dbfcbe48be43721fc6149117a0e9429059f5 | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/address.py | sennevb/Commercium | 7926dbfcbe48be43721fc6149117a0e9429059f5 | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/address.py | sennevb/Commercium | 7926dbfcbe48be43721fc6149117a0e9429059f5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016 The Commercium Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# address.py
#
# This file encodes and decodes BASE58 P2PKH and P2SH addresses
#
from .script import has... | 30.333333 | 71 | 0.687473 |
c7f880ff731bc13a444fd43ce3fc16cf30a4c2a1 | 493 | py | Python | 0101-0200/0199-Binary Tree Right Side View/0199-Binary Tree Right Side View.py | jiadaizhao/LeetCode | 4ddea0a532fe7c5d053ffbd6870174ec99fc2d60 | [
"MIT"
] | 49 | 2018-05-05T02:53:10.000Z | 2022-03-30T12:08:09.000Z | 0101-0200/0199-Binary Tree Right Side View/0199-Binary Tree Right Side View.py | jolly-fellow/LeetCode | ab20b3ec137ed05fad1edda1c30db04ab355486f | [
"MIT"
] | 11 | 2017-12-15T22:31:44.000Z | 2020-10-02T12:42:49.000Z | 0101-0200/0199-Binary Tree Right Side View/0199-Binary Tree Right Side View.py | jolly-fellow/LeetCode | ab20b3ec137ed05fad1edda1c30db04ab355486f | [
"MIT"
] | 28 | 2017-12-05T10:56:51.000Z | 2022-01-26T18:18:27.000Z | # Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def rightSideView(self, root: TreeNode) -> List[int]:
if root is None:
return []
level = [root]
result = []
... | 27.388889 | 91 | 0.559838 |
4fe9c23b06835e37b843ebc993c8c6b1f6752216 | 1,063 | py | Python | extra_apps/xadmin/adminx.py | Myfunny/FasterRunner | 54a95b32b01d2dad15bb5a04052e3ffed5ed730e | [
"MIT"
] | null | null | null | extra_apps/xadmin/adminx.py | Myfunny/FasterRunner | 54a95b32b01d2dad15bb5a04052e3ffed5ed730e | [
"MIT"
] | null | null | null | extra_apps/xadmin/adminx.py | Myfunny/FasterRunner | 54a95b32b01d2dad15bb5a04052e3ffed5ed730e | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import xadmin
from .models import UserSettings, Log
from xadmin.layout import *
from django.utils.translation import ugettext_lazy as _, ugettext
class UserSettingsAdmin(object):
model_icon = 'fa fa-cog'
hidden_menu = True
xadmin.site.register(UserSettings, UserSettin... | 28.72973 | 124 | 0.681091 |
2abc8dabb3d82204a2e2d920eb053602ed4d5a88 | 1,318 | py | Python | samples/openapi3/client/petstore/python-experimental/test/test_outer_enum.py | tek08/openapi-generator | 5d14b46a5e305b8f1c541b1d6d96751f0626e363 | [
"Apache-2.0"
] | null | null | null | samples/openapi3/client/petstore/python-experimental/test/test_outer_enum.py | tek08/openapi-generator | 5d14b46a5e305b8f1c541b1d6d96751f0626e363 | [
"Apache-2.0"
] | null | null | null | samples/openapi3/client/petstore/python-experimental/test/test_outer_enum.py | tek08/openapi-generator | 5d14b46a5e305b8f1c541b1d6d96751f0626e363 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
... | 22.338983 | 174 | 0.65478 |
88ec9de9a45f1eb1c2afed31a389d58af1316427 | 348 | py | Python | src/kgm/models/matching/__init__.py | mberr/rank-based-evaluation | 76a0847eecf4350d92783e9773d6fc6b6c69ca51 | [
"MIT"
] | 5 | 2021-02-16T01:04:39.000Z | 2021-09-01T01:36:02.000Z | src/kgm/models/matching/__init__.py | mberr/rank-based-evaluation | 76a0847eecf4350d92783e9773d6fc6b6c69ca51 | [
"MIT"
] | null | null | null | src/kgm/models/matching/__init__.py | mberr/rank-based-evaluation | 76a0847eecf4350d92783e9773d6fc6b6c69ca51 | [
"MIT"
] | null | null | null | # coding=utf-8
"""Models for (knowledge) graph matching."""
from .base import GraphBasedKGMatchingModel, KGMatchingModel, PureEmbeddingModel, get_matching_model_by_name
from .gcn_align import GCNAlign
__all__ = [
'GraphBasedKGMatchingModel',
'GCNAlign',
'KGMatchingModel',
'PureEmbeddingModel',
'get... | 26.769231 | 108 | 0.761494 |
0c826af70e80fa51b969ff1342c70bd21373ee6e | 7,013 | py | Python | util/vec_env.py | snasiriany/furniture | 918be936c0bbf954b751a5f7e4d5c14cf0df4442 | [
"MIT"
] | 1 | 2020-07-13T21:58:28.000Z | 2020-07-13T21:58:28.000Z | util/vec_env.py | snasiriany/furniture | 918be936c0bbf954b751a5f7e4d5c14cf0df4442 | [
"MIT"
] | null | null | null | util/vec_env.py | snasiriany/furniture | 918be936c0bbf954b751a5f7e4d5c14cf0df4442 | [
"MIT"
] | 1 | 2021-08-03T00:01:10.000Z | 2021-08-03T00:01:10.000Z | """ VecEnv from https://github.com/openai/baselines/blob/master/baselines/common/vec_env/vec_env.py """
import contextlib
import os
from abc import ABC, abstractmethod
import numpy as np
def tile_images(img_nhwc):
"""
Tile N images into one big PxQ image
(P,Q) are chosen to be as close as possible, and ... | 27.940239 | 219 | 0.622986 |
9868149b2965d796dfade88e2e0d9b5ea78628d8 | 513 | py | Python | bin/python/door2_operon_map.py | reid-wagner/proteomics-pipelines | 2214c2ad4c14fabcb50a3c0800e9d383ce73df3d | [
"MIT"
] | 2 | 2018-09-06T14:05:59.000Z | 2022-02-18T10:09:06.000Z | bin/python/door2_operon_map.py | reid-wagner/proteomics-pipelines | 2214c2ad4c14fabcb50a3c0800e9d383ce73df3d | [
"MIT"
] | 7 | 2018-09-30T00:49:04.000Z | 2022-01-27T07:55:26.000Z | bin/python/door2_operon_map.py | reid-wagner/proteomics-pipelines | 2214c2ad4c14fabcb50a3c0800e9d383ce73df3d | [
"MIT"
] | 3 | 2019-10-29T12:20:45.000Z | 2021-10-06T14:38:43.000Z | #!/usr/bin/env python3
import yaml
import json
import pandas as pd
import sys
config = yaml.load(open(sys.argv[1]).read())
operons = pd.read_csv(config['operons'], sep='\t')
outpath = sys.argv[2]
operons['GI'] = operons['GI'].apply( lambda x : str(int(x)))
operons['OperonID'] = operons['OperonID'].apply( lambda x ... | 19.730769 | 72 | 0.68616 |
988a5dd9d5d30f64c2e4cb45d4fceb3d32aa74aa | 2,835 | py | Python | examples/visualization/plot_study.py | kevtran23/optuna | 4f2fa9c60d9a216ff3cfbc0f3ca12cb32ff53434 | [
"MIT"
] | null | null | null | examples/visualization/plot_study.py | kevtran23/optuna | 4f2fa9c60d9a216ff3cfbc0f3ca12cb32ff53434 | [
"MIT"
] | null | null | null | examples/visualization/plot_study.py | kevtran23/optuna | 4f2fa9c60d9a216ff3cfbc0f3ca12cb32ff53434 | [
"MIT"
] | null | null | null | """
Optuna example that visualizes the optimization result of multi-layer perceptrons.
In this example, we optimize the validation accuracy of object recognition using
scikit-learn and Fashion-MNIST. We optimize a neural network. As it is too time
consuming to use the whole Fashion-MNIST dataset, we here use a small s... | 31.853933 | 93 | 0.734392 |
55b6d06b547b6998093038df1cb0c4184cd9671e | 928 | py | Python | rpython/translator/goal/targetlbench.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 381 | 2018-08-18T03:37:22.000Z | 2022-02-06T23:57:36.000Z | rpython/translator/goal/targetlbench.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 16 | 2018-09-22T18:12:47.000Z | 2022-02-22T20:03:59.000Z | rpython/translator/goal/targetlbench.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 55 | 2015-08-16T02:41:30.000Z | 2022-03-20T20:33:35.000Z |
from rpython.rtyper.lltypesystem import lltype
from rpython.rtyper.lltypesystem.llmemory import cast_ptr_to_adr, raw_memclear,\
raw_memcopy, sizeof, itemoffsetof
TP = lltype.GcArray(lltype.Signed)
def longername(a, b, size):
if 1:
baseofs = itemoffsetof(TP, 0)
onesize = sizeof(TP.OF)
... | 24.421053 | 81 | 0.647629 |
9e8aa744cf57dbd97e8bd2e3b21589050cf70a7f | 4,341 | py | Python | benchmark/startQiskit_noisy1294.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy1294.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy1294.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=5
# total number=52
import cirq
import qiskit
from qiskit.providers.aer import QasmSimulator
from qiskit.test.mock import FakeVigo
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import ... | 32.155556 | 82 | 0.614835 |
a3b30829a116325ccce0d896b9c1f0d3272029f2 | 578 | py | Python | mindbot/config.py | JulyJ/MindBot | e3db6d53cf4929f0fc5e0cb5f4a8ecf1aed18b47 | [
"MIT"
] | 4 | 2017-04-22T20:45:45.000Z | 2021-12-08T19:38:17.000Z | mindbot/config.py | JulyJ/MindBot | e3db6d53cf4929f0fc5e0cb5f4a8ecf1aed18b47 | [
"MIT"
] | null | null | null | mindbot/config.py | JulyJ/MindBot | e3db6d53cf4929f0fc5e0cb5f4a8ecf1aed18b47 | [
"MIT"
] | 4 | 2017-04-25T08:45:21.000Z | 2019-02-24T12:24:09.000Z | """
Please, do not forget to export required environment variables before running MindBot.
"""
import os
TELEGRAM_TOKEN = os.environ.get('TELEGRAM_TOKEN')
WEATHER_TOKEN = os.environ.get('WEATHER_TOKEN')
DICTIONARY_APP_ID = os.environ.get('DICTIONARY_APP_ID')
DICTIONARY_APP_KEY = os.environ.get('DICTIONARY_APP_KEY... | 32.111111 | 90 | 0.769896 |
f3752141bb1c3e9db433c81b4841a4b0d6c506f1 | 193 | py | Python | python/demo-django/env/bin/django-admin.py | denisroldan/talentum-2015-examples | 4980f49dca56a55d26722f4f6d1fdd88e06f38dd | [
"MIT"
] | null | null | null | python/demo-django/env/bin/django-admin.py | denisroldan/talentum-2015-examples | 4980f49dca56a55d26722f4f6d1fdd88e06f38dd | [
"MIT"
] | null | null | null | python/demo-django/env/bin/django-admin.py | denisroldan/talentum-2015-examples | 4980f49dca56a55d26722f4f6d1fdd88e06f38dd | [
"MIT"
] | null | null | null | #!/Users/denisroldan/Projects/talentum-2015-examples/python/demo-django/env/bin/python
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 32.166667 | 86 | 0.803109 |
4bdccd4734d9e6cd7f94111da7585821fa30c3b3 | 85,362 | py | Python | ckan/lib/helpers.py | franekj/star | c91ab03b1ba077b5ebeed7165d0b575b8591fb55 | [
"Apache-2.0"
] | 1 | 2019-10-09T08:46:44.000Z | 2019-10-09T08:46:44.000Z | ckan/lib/helpers.py | franekj/star | c91ab03b1ba077b5ebeed7165d0b575b8591fb55 | [
"Apache-2.0"
] | 3 | 2020-03-24T16:58:44.000Z | 2021-02-02T22:03:33.000Z | ckan/lib/helpers.py | franekj/star | c91ab03b1ba077b5ebeed7165d0b575b8591fb55 | [
"Apache-2.0"
] | 3 | 2019-09-11T10:04:59.000Z | 2020-01-30T15:55:50.000Z | # encoding: utf-8
'''Helper functions
Consists of functions to typically be used within templates, but also
available to Controllers. This module is available to templates as 'h'.
'''
import email.utils
import datetime
import logging
import re
import os
import pytz
import tzlocal
import urllib
import pprint
import co... | 32.236405 | 79 | 0.643331 |
a25d209c12093af15c5a7a741f249fa7e5074089 | 476 | py | Python | libraries/Mongo/db_connect.py | fabiano-teichmann/robot_guide | e5e9521ebddec22c082a9da227cdef7d54591ab5 | [
"Apache-1.1"
] | null | null | null | libraries/Mongo/db_connect.py | fabiano-teichmann/robot_guide | e5e9521ebddec22c082a9da227cdef7d54591ab5 | [
"Apache-1.1"
] | null | null | null | libraries/Mongo/db_connect.py | fabiano-teichmann/robot_guide | e5e9521ebddec22c082a9da227cdef7d54591ab5 | [
"Apache-1.1"
] | null | null | null | import os
from exception import NotFound
from pymongo import MongoClient
def db_connect(func):
def core(*args):
client = connect()
print(*args)
query = func(client, *args)
client.close()
if not query:
raise NotFound(*args)
return query
def co... | 18.307692 | 44 | 0.577731 |
71e37af866bd1b246e1f1e5ff17a2ed0e82dfcd3 | 7,884 | py | Python | GmailWrapper_JE/venv/Lib/site-packages/pyasn1/codec/native/decoder.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | 2 | 2022-01-06T11:52:57.000Z | 2022-01-09T01:53:56.000Z | GmailWrapper_JE/venv/Lib/site-packages/pyasn1/codec/native/decoder.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | GmailWrapper_JE/venv/Lib/site-packages/pyasn1/codec/native/decoder.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | #
# This file is part of pyasn1 software.
#
# Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com>
# License: http://snmplabs.com/pyasn1/license.html
#
from pyasn1 import debug
from pyasn1 import error
from pyasn1.type import base
from pyasn1.type import char
from pyasn1.type import tag
from pyasn1.type... | 36.841121 | 140 | 0.685058 |
4acc2fdfc6811c2eeecc48d216a7255c1a910461 | 845 | py | Python | tests/test_pandas_series_io.py | Hakonmh/featherstore | 2dacdb6645b8ad0a559c6e20b598e3f8858d14e1 | [
"MIT"
] | null | null | null | tests/test_pandas_series_io.py | Hakonmh/featherstore | 2dacdb6645b8ad0a559c6e20b598e3f8858d14e1 | [
"MIT"
] | null | null | null | tests/test_pandas_series_io.py | Hakonmh/featherstore | 2dacdb6645b8ad0a559c6e20b598e3f8858d14e1 | [
"MIT"
] | null | null | null | import pytest
from .fixtures import *
@pytest.mark.parametrize(
"original_df",
[
make_table(cols=1, astype="pandas"),
make_table(sorted_datetime_index, cols=1, astype="pandas"),
make_table(sorted_string_index, cols=1, astype="pandas"),
],
ids=["int index", "datetime index", "st... | 31.296296 | 74 | 0.640237 |
722e9e2010b19b7ffd36de282e4ac2f57d0796aa | 1,119 | py | Python | typewise_alert.test.py | clean-code-craft-tcq-1/add-variety-python-VinothRaghu | 21121ef564a50f7268da234bbff9e3d0ab672103 | [
"MIT"
] | null | null | null | typewise_alert.test.py | clean-code-craft-tcq-1/add-variety-python-VinothRaghu | 21121ef564a50f7268da234bbff9e3d0ab672103 | [
"MIT"
] | null | null | null | typewise_alert.test.py | clean-code-craft-tcq-1/add-variety-python-VinothRaghu | 21121ef564a50f7268da234bbff9e3d0ab672103 | [
"MIT"
] | null | null | null | import unittest
import typewise_alert
class TypewiseTest(unittest.TestCase):
def test_alerts(self):
self.assertTrue(typewise_alert.check_and_alert('TO_EMAIL', 'PASSIVE_COOLING', 50) == 'Temperature is too high')
self.assertTrue(typewise_alert.check_and_alert('TO_CONTROLLER', 'PASSIVE_COOLING', 50) == '... | 58.894737 | 117 | 0.74084 |
1f742d2d9968ab2e60e74620a373188e99a36ad5 | 7,680 | py | Python | src/tests/test_scraper_base.py | ictmotion/helpradar | 216ff0a4650f745bdd808cc9ae30bc345262e8d7 | [
"MIT"
] | 3 | 2020-05-08T19:16:18.000Z | 2020-12-26T02:49:50.000Z | src/tests/test_scraper_base.py | ictmotion/helpradar | 216ff0a4650f745bdd808cc9ae30bc345262e8d7 | [
"MIT"
] | 84 | 2020-04-02T17:24:41.000Z | 2021-12-13T20:39:26.000Z | src/tests/test_scraper_base.py | ictmotion/helpradar | 216ff0a4650f745bdd808cc9ae30bc345262e8d7 | [
"MIT"
] | 11 | 2020-04-07T14:48:21.000Z | 2020-12-26T02:49:51.000Z |
from datetime import datetime
from unittest import TestCase
from unittest.mock import MagicMock, Mock
from models import Platform, InitiativeImport, BatchImportState
from models.initiatives import InitiativeImportState, InitiativeGroup
from platformen import Scraper
from platformen.scraper import ScrapeException, Pla... | 36.056338 | 108 | 0.708724 |
9f4ea61dcb56472a1a7287d049db95376075e941 | 77,357 | py | Python | src/nbsphinx.py | huonw/nbsphinx | d41f7cd00b95667258692ffaaf1dcd7b2f5216aa | [
"MIT"
] | null | null | null | src/nbsphinx.py | huonw/nbsphinx | d41f7cd00b95667258692ffaaf1dcd7b2f5216aa | [
"MIT"
] | null | null | null | src/nbsphinx.py | huonw/nbsphinx | d41f7cd00b95667258692ffaaf1dcd7b2f5216aa | [
"MIT"
] | null | null | null | # Copyright (c) 2015-2020 Matthias Geier
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish,... | 34.720377 | 113 | 0.622555 |
fd2a95611aaf743f0da6a66eea12a3c6a8a7012c | 2,647 | py | Python | StructureWrapper.py | IAndreu/BioPhysics | 97220afc2a35cc3a5184c529e24d92f53ec250bb | [
"MIT"
] | null | null | null | StructureWrapper.py | IAndreu/BioPhysics | 97220afc2a35cc3a5184c529e24d92f53ec250bb | [
"MIT"
] | 1 | 2018-10-04T15:02:56.000Z | 2018-10-04T15:02:56.000Z | StructureWrapper.py | jlgelpi/BioPhysics2017-18 | cb515da62f7afa315e5b7da6d00eff54ae9a232b | [
"MIT"
] | null | null | null | #
# Convenient wrappers over BioPython classes
# Hint: Include here interaction energies
#
__author__ = "gelpi"
__date__ = "$01-nov-2017 7:17:33$"
class Residue():
oneLetterResidueCode = {
'DA' :'A', 'DC' :'C', 'DG' :'G', 'DT' :'T',
'A' :'A', 'C' :'C', 'G' :'G', 'U' :'U',
'DA3':'A', 'D... | 30.77907 | 101 | 0.537212 |
9cdc937ecd7cfd118bf117ab11f708ce9abac2c6 | 1,543 | py | Python | libs/cfitsio/cfitsio.py | rlancaste/craft-blueprints-kde | 8f2834422c96c7e5465fbe00911915066a72cc0f | [
"BSD-2-Clause"
] | null | null | null | libs/cfitsio/cfitsio.py | rlancaste/craft-blueprints-kde | 8f2834422c96c7e5465fbe00911915066a72cc0f | [
"BSD-2-Clause"
] | 1 | 2020-01-10T01:06:16.000Z | 2020-01-10T01:06:16.000Z | libs/cfitsio/cfitsio.py | rlancaste/craft-blueprints-kde | 8f2834422c96c7e5465fbe00911915066a72cc0f | [
"BSD-2-Clause"
] | 2 | 2020-01-02T18:22:12.000Z | 2020-08-05T13:39:21.000Z | import info
class subinfo(info.infoclass):
def setTargets(self):
for ver in ['3.08', '3.10', '3.14', '3.20', '3.31', '3.35', '3.45']:
self.targets[ver] = 'https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio' + ver.replace(".",
... | 48.21875 | 139 | 0.622813 |
27de69b8d76aad7f0e5eca52dcfbf7ea4585efec | 58,602 | py | Python | main.py | gd-codes/minecraft-pixel-art | f324e9d2381778a5ef3beb1b6807a3c8429b7c02 | [
"MIT"
] | 3 | 2020-10-16T11:35:02.000Z | 2021-08-11T18:16:59.000Z | main.py | gd-codes/minecraft-pixel-art | f324e9d2381778a5ef3beb1b6807a3c8429b7c02 | [
"MIT"
] | null | null | null | main.py | gd-codes/minecraft-pixel-art | f324e9d2381778a5ef3beb1b6807a3c8429b7c02 | [
"MIT"
] | null | null | null |
# Gautam D
# 24 April 2020
from PIL import Image as Img
from PIL import ImageTk
from tkinter import *
from tkinter import messagebox as mbx
from tkinter import filedialog as fd
from tkinter import simpledialog as sd
from tkinter import scrolledtext as tkst
import tkoptiondialog as opd
from datetime import... | 56.62029 | 159 | 0.558104 |
289b49e8c3bb618a8c417e069e46963146c357ea | 5,959 | py | Python | turbo_seti/find_doppler/seti_event.py | razman786/turbo_seti | 148e41cbead99cdd45517daaf7436dd4755e8f3f | [
"MIT"
] | null | null | null | turbo_seti/find_doppler/seti_event.py | razman786/turbo_seti | 148e41cbead99cdd45517daaf7436dd4755e8f3f | [
"MIT"
] | null | null | null | turbo_seti/find_doppler/seti_event.py | razman786/turbo_seti | 148e41cbead99cdd45517daaf7436dd4755e8f3f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
Main program module for executable turboSETI
'''
import sys
import os
import logging
import time
import cProfile
import pstats
from argparse import ArgumentParser
from blimpy import __version__ as BLIMPY_VERSION
from .find_doppler import FindDoppler
from .kernels import Kernels
from .turbo_s... | 40.537415 | 129 | 0.583152 |
0c5c76c1464dbe0db98419000cd3bb2b001b9ec9 | 1,627 | py | Python | Python/n-queens-ii.py | xiaohalo/LeetCode | 68211ba081934b21bb1968046b7e3c1459b3da2d | [
"MIT"
] | 9 | 2019-06-30T07:15:18.000Z | 2022-02-10T20:13:40.000Z | Python/n-queens-ii.py | xiaohalo/LeetCode | 68211ba081934b21bb1968046b7e3c1459b3da2d | [
"MIT"
] | null | null | null | Python/n-queens-ii.py | xiaohalo/LeetCode | 68211ba081934b21bb1968046b7e3c1459b3da2d | [
"MIT"
] | 9 | 2019-01-16T22:16:49.000Z | 2022-02-06T17:33:41.000Z | from __future__ import print_function
from functools import reduce
# Time: O(n!)
# Space: O(n)
#
# Follow up for N-Queens problem.
#
# Now, instead outputting board configurations, return the total number of distinct solutions.
#
# quick solution for checking if it is diagonally legal
class Solution:
# @return an... | 33.895833 | 134 | 0.593116 |
21fe83b728fb8c7f83d91e4da1abf741fd29de0f | 8,889 | py | Python | mpldatacursor/convenience.py | kail85/mpldatacursor | 2df44a3912c2684b2d66fadc7cacbb9f60a15186 | [
"MIT"
] | 165 | 2015-01-09T03:48:50.000Z | 2022-03-16T03:25:23.000Z | mpldatacursor/convenience.py | kail85/mpldatacursor | 2df44a3912c2684b2d66fadc7cacbb9f60a15186 | [
"MIT"
] | 87 | 2015-02-09T11:17:49.000Z | 2022-01-04T02:48:00.000Z | mpldatacursor/convenience.py | kail85/mpldatacursor | 2df44a3912c2684b2d66fadc7cacbb9f60a15186 | [
"MIT"
] | 46 | 2015-01-13T00:59:18.000Z | 2022-03-03T12:46:40.000Z | __license__ = """
Copyright (c) 2012 mpldatacursor developers
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, mer... | 52.288235 | 79 | 0.669817 |
277727f364ceb4e5f56f924aa8806e769a65c854 | 9,890 | py | Python | Funny_Js_Crack/87-tengxun/geetest.py | qqizai/Func_Js_Crack | 8cc8586107fecace4b71d0519cfbc760584171b1 | [
"MIT"
] | 18 | 2020-12-09T06:49:46.000Z | 2022-01-27T03:20:36.000Z | Funny_Js_Crack/87-tengxun/geetest.py | useafter/Func_Js_Crack | 8cc8586107fecace4b71d0519cfbc760584171b1 | [
"MIT"
] | null | null | null | Funny_Js_Crack/87-tengxun/geetest.py | useafter/Func_Js_Crack | 8cc8586107fecace4b71d0519cfbc760584171b1 | [
"MIT"
] | 9 | 2020-12-20T08:52:09.000Z | 2021-12-19T09:13:09.000Z | # -*- coding: utf-8 -*-
# @Time : 2019/10/18 21:03
# @Author : Esbiya
# @Email : 18829040039@163.com
# @File : geetest.py
# @Software: PyCharm
import re
import json
import time
import random
import execjs
import requests
from tengxun.img_locate import get_distance
from tengxun.get_trace import generate_trace... | 28.75 | 169 | 0.561173 |
5181a47bd0dcf3b800b73415ab7823053f62c479 | 2,691 | py | Python | lib/config.py | helpforcancer/sentinel | bbbc14a6a869e978d676e20259880a4493885dfa | [
"MIT"
] | null | null | null | lib/config.py | helpforcancer/sentinel | bbbc14a6a869e978d676e20259880a4493885dfa | [
"MIT"
] | null | null | null | lib/config.py | helpforcancer/sentinel | bbbc14a6a869e978d676e20259880a4493885dfa | [
"MIT"
] | null | null | null | """
Set up defaults and read sentinel.conf
"""
import sys
import os
from helpforcancer_config import HelpforcancerConfig
default_sentinel_config = os.path.normpath(
os.path.join(os.path.dirname(__file__), '../sentinel.conf')
)
sentinel_config_file = os.environ.get('SENTINEL_CONFIG', default_sentinel_config)
se... | 28.935484 | 97 | 0.683761 |
bb39ca2ba4a5bbdd1afc6a03a0a82ed2b6f3775c | 14,726 | py | Python | tensorflow/python/keras/distribute/collective_all_reduce_strategy_test.py | yisitu/tensorflow | 03a4c807f8124e7ec9be56e28172f8930fae69db | [
"Apache-2.0"
] | 2 | 2018-08-20T00:45:41.000Z | 2020-10-27T21:03:12.000Z | tensorflow/python/keras/distribute/collective_all_reduce_strategy_test.py | yisitu/tensorflow | 03a4c807f8124e7ec9be56e28172f8930fae69db | [
"Apache-2.0"
] | null | null | null | tensorflow/python/keras/distribute/collective_all_reduce_strategy_test.py | yisitu/tensorflow | 03a4c807f8124e7ec9be56e28172f8930fae69db | [
"Apache-2.0"
] | 1 | 2021-03-27T12:22:15.000Z | 2021-03-27T12:22:15.000Z | # Copyright 2018 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... | 40.792244 | 91 | 0.699919 |
6d7b6dc5a153ca0d30de1ccaedd96de83bd07c63 | 6,531 | py | Python | holdem_argparser.py | studiobnd/holdem_calc | fc6243d5a2bc4b9c0fc9c436e826c0f228b407c0 | [
"MIT"
] | null | null | null | holdem_argparser.py | studiobnd/holdem_calc | fc6243d5a2bc4b9c0fc9c436e826c0f228b407c0 | [
"MIT"
] | null | null | null | holdem_argparser.py | studiobnd/holdem_calc | fc6243d5a2bc4b9c0fc9c436e826c0f228b407c0 | [
"MIT"
] | 1 | 2021-12-28T10:53:38.000Z | 2021-12-28T10:53:38.000Z | import argparse
import re
import holdem_functions
# Wrapper class which holds the arguments for library calls
# Mocks actual argparse object
class LibArgs:
def __init__(self, board, exact, num, input_file, hole_cards):
self.board = board
self.cards = hole_cards
self.n = num
self.in... | 37.534483 | 78 | 0.628847 |
8421ec82785b6bb8f2ba72fb30eb39e6d58bc4ee | 102 | py | Python | tests/__init__.py | KarstenSchulz/twodolib | b9b2f0f23e5aeaf5edf5f5591319b6b3aea824d8 | [
"ISC"
] | 10 | 2015-09-24T02:23:24.000Z | 2020-03-08T09:21:20.000Z | tests/__init__.py | KarstenSchulz/twodolib | b9b2f0f23e5aeaf5edf5f5591319b6b3aea824d8 | [
"ISC"
] | 7 | 2015-09-15T15:45:00.000Z | 2020-08-21T07:04:44.000Z | tests/__init__.py | KarstenSchulz/twodolib | b9b2f0f23e5aeaf5edf5f5591319b6b3aea824d8 | [
"ISC"
] | 2 | 2017-07-03T14:15:50.000Z | 2019-08-30T13:58:39.000Z | # -*- coding: utf-8 -*-
"""Test package for `twodolib` module."""
from . import test_twodolib # noqa
| 25.5 | 41 | 0.637255 |
4482ea52e23407cf561a0c260df57f9f1540bf14 | 8,017 | py | Python | frappe/desk/doctype/dashboard_chart/test_dashboard_chart.py | ektai/erp2Dodock | 5ad64b01cba9b07437f9a27751101258679379e8 | [
"MIT"
] | null | null | null | frappe/desk/doctype/dashboard_chart/test_dashboard_chart.py | ektai/erp2Dodock | 5ad64b01cba9b07437f9a27751101258679379e8 | [
"MIT"
] | null | null | null | frappe/desk/doctype/dashboard_chart/test_dashboard_chart.py | ektai/erp2Dodock | 5ad64b01cba9b07437f9a27751101258679379e8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Frappe Technologies and Contributors
# See license.txt
from __future__ import unicode_literals
import unittest, frappe
from frappe.utils import getdate, formatdate, get_last_day
from frappe.desk.doctype.dashboard_chart.dashboard_chart import (get,
get_period_ending)
from... | 33.404167 | 146 | 0.695771 |
d3ec6e9d8a3dd4bc552e31d8d063875ce7d1d800 | 29,604 | py | Python | hummingbot/wallet/ethereum/web3_wallet_backend.py | fakecoinbase/Grandthraxslashhumming_extended | 54e959520f515697b5a88d3fc3636e702ea381e5 | [
"Apache-2.0"
] | 2 | 2020-08-02T17:56:53.000Z | 2021-02-12T18:47:04.000Z | hummingbot/wallet/ethereum/web3_wallet_backend.py | Grandthrax/humming_extended | 54e959520f515697b5a88d3fc3636e702ea381e5 | [
"Apache-2.0"
] | 1 | 2019-06-05T23:13:35.000Z | 2019-06-05T23:13:35.000Z | hummingbot/wallet/ethereum/web3_wallet_backend.py | Grandthrax/humming_extended | 54e959520f515697b5a88d3fc3636e702ea381e5 | [
"Apache-2.0"
] | 2 | 2020-08-02T17:59:03.000Z | 2021-09-05T22:19:28.000Z | import asyncio
from collections import OrderedDict
from decimal import Decimal
from eth_account import Account
from eth_account.signers.local import LocalAccount
from eth_account.messages import defunct_hash_message
from hexbytes import HexBytes
import logging
import math
import time
from typing import (
Any,
L... | 44.45045 | 119 | 0.649878 |
1715e6a77ab7bb0190ff01c76454d7123fb0a5de | 314 | py | Python | venv/Lib/site-packages/scipy/integrate/_ivp/__init__.py | unbun/snake.ai | 0c017357608dc7c06af0ca3ca57d870641461207 | [
"MIT"
] | 6,989 | 2017-07-18T06:23:18.000Z | 2022-03-31T15:58:36.000Z | venv/lib/python3.7/site-packages/scipy/integrate/_ivp/__init__.py | John1001Song/Big-Data-Robo-Adviser | 9444dce96954c546333d5aecc92a06c3bfd19aa5 | [
"MIT"
] | 1,978 | 2017-07-18T09:17:58.000Z | 2022-03-31T14:28:43.000Z | venv/lib/python3.7/site-packages/scipy/integrate/_ivp/__init__.py | John1001Song/Big-Data-Robo-Adviser | 9444dce96954c546333d5aecc92a06c3bfd19aa5 | [
"MIT"
] | 1,228 | 2017-07-18T09:03:13.000Z | 2022-03-29T05:57:40.000Z | """Suite of ODE solvers implemented in Python."""
from __future__ import division, print_function, absolute_import
from .ivp import solve_ivp
from .rk import RK23, RK45
from .radau import Radau
from .bdf import BDF
from .lsoda import LSODA
from .common import OdeSolution
from .base import DenseOutput, OdeSolver
| 28.545455 | 64 | 0.802548 |
75c6309cf97e4ca5dc8501ac22e098298875b0c1 | 2,475 | py | Python | qa/rpc-tests/mempool_spendcoinbase.py | cgoliver/pericloin | b4cc1c6567395c8fe1e4e3aef76d299da0caf3ce | [
"MIT"
] | null | null | null | qa/rpc-tests/mempool_spendcoinbase.py | cgoliver/pericloin | b4cc1c6567395c8fe1e4e3aef76d299da0caf3ce | [
"MIT"
] | null | null | null | qa/rpc-tests/mempool_spendcoinbase.py | cgoliver/pericloin | b4cc1c6567395c8fe1e4e3aef76d299da0caf3ce | [
"MIT"
] | 2 | 2017-06-09T12:57:41.000Z | 2019-02-14T15:37:02.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-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.
#
# Test spending coinbase transactions.
# The coinbase transaction in block N can appear in block
# N+10... | 38.671875 | 104 | 0.690101 |
e29b2ddc52f44b3bd449a5b6289bb98fe9af1d6f | 1,012 | py | Python | chroma-manager/tests/unit/chroma_core/helpers/mock_agent_ssh.py | GarimaVishvakarma/intel-chroma | fdf68ed00b13643c62eb7480754d3216d9295e0b | [
"MIT"
] | null | null | null | chroma-manager/tests/unit/chroma_core/helpers/mock_agent_ssh.py | GarimaVishvakarma/intel-chroma | fdf68ed00b13643c62eb7480754d3216d9295e0b | [
"MIT"
] | null | null | null | chroma-manager/tests/unit/chroma_core/helpers/mock_agent_ssh.py | GarimaVishvakarma/intel-chroma | fdf68ed00b13643c62eb7480754d3216d9295e0b | [
"MIT"
] | null | null | null |
from chroma_core.models import ManagedHost
from chroma_core.services.log import log_register
from tests.unit.chroma_core.helpers import MockAgentRpc
log = log_register('mock_agent_ssh')
class MockAgentSsh(object):
ssh_should_fail = False
def __init__(self, address, log = None, console_callback = None, timeo... | 29.764706 | 85 | 0.655138 |
a62e6b706fe93085ff57e0cf87f745dc463d0c40 | 28,161 | py | Python | python_modules/dagster/dagster_tests/core_tests/config_types_tests/test_config_type_system.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | 1 | 2021-04-27T19:49:59.000Z | 2021-04-27T19:49:59.000Z | python_modules/dagster/dagster_tests/core_tests/config_types_tests/test_config_type_system.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | 7 | 2022-03-16T06:55:04.000Z | 2022-03-18T07:03:25.000Z | python_modules/dagster/dagster_tests/core_tests/config_types_tests/test_config_type_system.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | null | null | null | import re
import typing
import pytest
from dagster import (
Any,
DagsterInvalidConfigDefinitionError,
DagsterInvalidConfigError,
DagsterInvalidDefinitionError,
Field,
Float,
Int,
List,
ModeDefinition,
Noneable,
Permissive,
PipelineDefinition,
ResourceDefinition,
... | 31.048512 | 148 | 0.665921 |
48aea3a584dd25667704b22d99d1074c481bb76c | 35,233 | py | Python | python/paddle/fluid/tests/unittests/test_imperative_save_load.py | zhupengyang/Paddle | ad6e3dd69cd915dd61287e96de7ec4ae132d24a5 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_imperative_save_load.py | zhupengyang/Paddle | ad6e3dd69cd915dd61287e96de7ec4ae132d24a5 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_imperative_save_load.py | zhupengyang/Paddle | ad6e3dd69cd915dd61287e96de7ec4ae132d24a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 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 app... | 38.380174 | 80 | 0.521755 |
c3fb84fee8dd82f53a670f55210a4c6edaecc146 | 12,606 | py | Python | CANNet_prueba.py | BioSIP/countcrowd_TFG | 0ba2c7d4e4db4710f3e345565081d499a2d62cc0 | [
"MIT"
] | null | null | null | CANNet_prueba.py | BioSIP/countcrowd_TFG | 0ba2c7d4e4db4710f3e345565081d499a2d62cc0 | [
"MIT"
] | null | null | null | CANNet_prueba.py | BioSIP/countcrowd_TFG | 0ba2c7d4e4db4710f3e345565081d499a2d62cc0 | [
"MIT"
] | null | null | null | import os
import pickle
import matplotlib.pyplot as plt
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from scipy.io import loadmat
from torch import optim
from torch.autograd import Variable
from torch.optim.lr_scheduler import StepLR
from torchvision import models
from dataset... | 33.261214 | 193 | 0.634698 |
34211c7d3dae1fea90415454f6f8d12ac324c0d1 | 1,668 | py | Python | scripts/Phenograph_LugliLab/tests/test_cluster.py | sinnamone/CRUSTY | 90c23d95cc236cbff41efe697590d71a80b187e7 | [
"MIT"
] | 35 | 2018-10-01T23:41:02.000Z | 2022-02-14T12:40:29.000Z | scripts/Phenograph_LugliLab/tests/test_cluster.py | sinnamone/CRUSTY | 90c23d95cc236cbff41efe697590d71a80b187e7 | [
"MIT"
] | 16 | 2020-05-01T15:18:17.000Z | 2021-10-19T19:49:41.000Z | scripts/Phenograph_LugliLab/tests/test_cluster.py | sinnamone/CRUSTY | 90c23d95cc236cbff41efe697590d71a80b187e7 | [
"MIT"
] | 14 | 2019-10-20T03:05:22.000Z | 2022-03-25T15:22:36.000Z | from phenograph.cluster import run_louvain, run_leiden
from scipy.sparse import coo_matrix
from numpy.testing import assert_array_equal
import numpy as np
def compare_communities(A, B):
communities_A, idx = np.unique(A, return_index=True)
communities_B, idx = np.unique(B, return_index=True)
if not np.arra... | 31.471698 | 78 | 0.690048 |
3a0d4afb1a34fd51d20256f11767517c9054ed3a | 3,636 | py | Python | django/utils/timesince.py | jommerce/django | baf9604ed8fed3e6e7ddfaca2d83c377c81399ae | [
"BSD-3-Clause",
"0BSD"
] | 16 | 2019-08-10T12:24:06.000Z | 2020-05-21T09:11:14.000Z | django/utils/timesince.py | jommerce/django | baf9604ed8fed3e6e7ddfaca2d83c377c81399ae | [
"BSD-3-Clause",
"0BSD"
] | 12 | 2019-08-10T11:55:29.000Z | 2020-05-21T04:46:30.000Z | django/utils/timesince.py | jommerce/django | baf9604ed8fed3e6e7ddfaca2d83c377c81399ae | [
"BSD-3-Clause",
"0BSD"
] | 3 | 2019-08-20T13:29:34.000Z | 2020-01-30T22:05:10.000Z | import calendar
import datetime
from django.utils.html import avoid_wrapping
from django.utils.timezone import is_aware
from django.utils.translation import gettext, ngettext_lazy
TIME_STRINGS = {
"year": ngettext_lazy("%(num)d year", "%(num)d years", "num"),
"month": ngettext_lazy("%(num)d month", "%(num)d m... | 35.647059 | 102 | 0.633938 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.