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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7946eba0c1e55e4a1157a500dbd117640402cec4 | 3,256 | py | Python | viewport_experimental.py | Euclideon/vaultsdkpython | cea55dead80fc32618e72158c2eab783833e16c1 | [
"MIT"
] | 2 | 2020-07-14T19:35:13.000Z | 2020-08-13T08:18:42.000Z | viewport_experimental.py | Euclideon/vaultsdkpython | cea55dead80fc32618e72158c2eab783833e16c1 | [
"MIT"
] | 17 | 2020-05-13T04:56:44.000Z | 2020-08-12T05:09:24.000Z | viewport_experimental.py | Euclideon/vaultsdkpython | cea55dead80fc32618e72158c2eab783833e16c1 | [
"MIT"
] | null | null | null | """
module containing experimental features relating to extending viewports
"""
from pygletExample import *
class VDKViewPort3D(VDKViewPort):
"""
Viewport quad with 3D faces, used for constructing ViewPrisms
"""
def __init__(self, width, height, centreX, centreY, parent, horizontalDirection = [1,0,0], ... | 40.7 | 124 | 0.541769 |
7946ec7361437e45e755b6b33241ab9f2084317a | 1,330 | py | Python | omoide_index/tests/infra/test_memory_calculator.py | IgorZyktin/omoide-index | b64cdc9e661b0b3d3b25a460f8bb0ef689ea81ad | [
"MIT"
] | null | null | null | omoide_index/tests/infra/test_memory_calculator.py | IgorZyktin/omoide-index | b64cdc9e661b0b3d3b25a460f8bb0ef689ea81ad | [
"MIT"
] | 16 | 2021-12-22T02:27:24.000Z | 2022-03-31T02:26:07.000Z | omoide_index/tests/infra/test_memory_calculator.py | IgorZyktin/omoide-index | b64cdc9e661b0b3d3b25a460f8bb0ef689ea81ad | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tests.
"""
import pytest
from omoide_index.infra import MemoryCalculator
@pytest.fixture
def infra_memory_calculator_instance():
return MemoryCalculator()
def test_memory_calculator_consumption_str(infra_memory_calculator_instance):
# arrange
inst = infra_memory_calculator_... | 21.111111 | 77 | 0.627068 |
7946ecb5eb7e85f6a542f25548362b5f4424ac41 | 8,534 | py | Python | telethon/events/inlinequery.py | bb010g/Telethon | 278f0e9e983d938589b6d541e71135ad5b6857c5 | [
"MIT"
] | null | null | null | telethon/events/inlinequery.py | bb010g/Telethon | 278f0e9e983d938589b6d541e71135ad5b6857c5 | [
"MIT"
] | null | null | null | telethon/events/inlinequery.py | bb010g/Telethon | 278f0e9e983d938589b6d541e71135ad5b6857c5 | [
"MIT"
] | null | null | null | import inspect
import re
import asyncio
from .common import EventBuilder, EventCommon, name_inner_event
from .. import utils
from ..tl import types, functions, custom
from ..tl.custom.sendergetter import SenderGetter
@name_inner_event
class InlineQuery(EventBuilder):
"""
Represents an inline query event (wh... | 36.008439 | 81 | 0.537263 |
7946ed067052491e80c247db87a53b2dccc8de94 | 9,054 | py | Python | electrum_mars/mnemonic.py | marscoin/electrum-mars | e95274b0ad959bdb02226c988303339a24acb8bf | [
"MIT"
] | 3 | 2021-08-15T08:05:00.000Z | 2021-11-21T21:35:10.000Z | electrum_mars/mnemonic.py | marscoin/electrum-mars | e95274b0ad959bdb02226c988303339a24acb8bf | [
"MIT"
] | 1 | 2021-12-02T08:04:05.000Z | 2021-12-02T08:04:05.000Z | electrum_mars/mnemonic.py | marscoin/electrum-mars | e95274b0ad959bdb02226c988303339a24acb8bf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2014 Thomas Voegtlin
#
# 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... | 34.295455 | 140 | 0.631434 |
7946f05d249527a7e7b3a7d0478153fea321a0eb | 295 | py | Python | pyscf/pbc/df/__init__.py | nmardirossian/pyscf | 57c8912dcfcc1157a822feede63df54ed1067115 | [
"BSD-2-Clause"
] | 1 | 2018-05-02T19:55:30.000Z | 2018-05-02T19:55:30.000Z | pyscf/pbc/df/__init__.py | nmardirossian/pyscf | 57c8912dcfcc1157a822feede63df54ed1067115 | [
"BSD-2-Clause"
] | null | null | null | pyscf/pbc/df/__init__.py | nmardirossian/pyscf | 57c8912dcfcc1157a822feede63df54ed1067115 | [
"BSD-2-Clause"
] | 1 | 2018-12-06T03:10:50.000Z | 2018-12-06T03:10:50.000Z | from . import incore
from . import outcore
from . import fft
from . import aft
from . import df
from . import mdf
from .df import DF, GDF
from .mdf import MDF
from .aft import AFTDF
from .fft import FFTDF
from pyscf.df.addons import aug_etb
# For backward compatibility
pwdf = aft
PWDF = AFTDF
| 18.4375 | 35 | 0.755932 |
7946f0b8e4c098dbe1e4ad5721b49aaa6ec77b3d | 93 | py | Python | build/lib/pyconfluent/kafka_streams/errors/kafka_streams_error.py | newellp2019/pyconfluent | b1de0b8255678c2e6a3a7d016df57b9f40cdc861 | [
"MIT"
] | null | null | null | build/lib/pyconfluent/kafka_streams/errors/kafka_streams_error.py | newellp2019/pyconfluent | b1de0b8255678c2e6a3a7d016df57b9f40cdc861 | [
"MIT"
] | null | null | null | build/lib/pyconfluent/kafka_streams/errors/kafka_streams_error.py | newellp2019/pyconfluent | b1de0b8255678c2e6a3a7d016df57b9f40cdc861 | [
"MIT"
] | null | null | null | """
Run time exception thrown on error
"""
class KafkaStreamsError(RuntimeError):
pass
| 11.625 | 38 | 0.72043 |
7946f1928208bba17eee8e65a266e0aa4268aa7e | 4,582 | py | Python | src/final_solution/param_search.py | federicoBetti/DataScienceCompetition_FutureSales | f78e38f39b5ecda2a67b4bfbf476cdc6a4a41460 | [
"MIT"
] | null | null | null | src/final_solution/param_search.py | federicoBetti/DataScienceCompetition_FutureSales | f78e38f39b5ecda2a67b4bfbf476cdc6a4a41460 | [
"MIT"
] | null | null | null | src/final_solution/param_search.py | federicoBetti/DataScienceCompetition_FutureSales | f78e38f39b5ecda2a67b4bfbf476cdc6a4a41460 | [
"MIT"
] | null | null | null | import os
import hyperopt
import pandas as pd
from hyperopt import fmin, tpe, STATUS_OK, Trials
from hyperopt import hp
from hyperopt.pyll import scope
from sklearn.linear_model import LinearRegression
from xgboost import XGBRegressor
from src.utils.memory_managment import save_object
def trainXGBoost(train_x, trai... | 29.371795 | 106 | 0.693147 |
7946f1be1d664cd8ee5a6ae2688f723c400d759b | 7,155 | py | Python | d3rlpy/algos/torch/awr_impl.py | YangRui2015/d3rlpy | da778b2a2b0afbafe25395296baecd0d4d0cd0d5 | [
"MIT"
] | 1 | 2021-05-08T06:21:05.000Z | 2021-05-08T06:21:05.000Z | d3rlpy/algos/torch/awr_impl.py | YangRui2015/d3rlpy | da778b2a2b0afbafe25395296baecd0d4d0cd0d5 | [
"MIT"
] | null | null | null | d3rlpy/algos/torch/awr_impl.py | YangRui2015/d3rlpy | da778b2a2b0afbafe25395296baecd0d4d0cd0d5 | [
"MIT"
] | null | null | null | from abc import ABCMeta, abstractmethod
from typing import Any, Optional, Sequence
import numpy as np
import torch
from torch.optim import Optimizer
from ...augmentation import AugmentationPipeline
from ...gpu import Device
from ...models.builders import (
create_categorical_policy,
create_squashed_normal_pol... | 29.937238 | 80 | 0.667785 |
7946f1d56291481d29bb3c995f90d24a25290ffc | 4,321 | py | Python | libs/base/lblogs.py | wildscsi/ecopos | 9922bb5160227777401eb33fa9a01cfba5730781 | [
"MIT"
] | null | null | null | libs/base/lblogs.py | wildscsi/ecopos | 9922bb5160227777401eb33fa9a01cfba5730781 | [
"MIT"
] | 1 | 2021-11-04T20:43:03.000Z | 2021-11-04T20:43:03.000Z | libs/base/lblogs.py | wildscsi/ecopos | 9922bb5160227777401eb33fa9a01cfba5730781 | [
"MIT"
] | 1 | 2021-11-04T19:43:53.000Z | 2021-11-04T19:43:53.000Z | __author__ = 'BM'
# -*- coding: utf-8 -*-
import os
from datetime import *
class WrLog:
def __init__(self):
self.nolog = False
self.logsize = 1024*1024 # 1Mb = 1024*1024
self.filename = 'app'
self.path = ''
self.errmsg = ''
def writelog(self, cmsg=''... | 37.25 | 102 | 0.505439 |
7946f51e65f446569c19e6ee3d32b5ee4cbb9c07 | 2,570 | py | Python | frameworks/kafka/tests/test_overlay.py | smush618/dcos-commons | 3c69642c79f197f4b28deb8d4e2df9160e77906b | [
"Apache-2.0"
] | null | null | null | frameworks/kafka/tests/test_overlay.py | smush618/dcos-commons | 3c69642c79f197f4b28deb8d4e2df9160e77906b | [
"Apache-2.0"
] | null | null | null | frameworks/kafka/tests/test_overlay.py | smush618/dcos-commons | 3c69642c79f197f4b28deb8d4e2df9160e77906b | [
"Apache-2.0"
] | null | null | null | import pytest
import sdk_install as install
import sdk_networks
import sdk_tasks
import sdk_utils
from tests import config, test_utils
@pytest.fixture(scope="module", autouse=True)
def configure_package(configure_security):
try:
install.uninstall(config.PACKAGE_NAME, config.SERVICE_NAME)
config.in... | 31.341463 | 123 | 0.770428 |
7946f5382ff287a8d517671bf9e58f49f64afe21 | 26 | py | Python | urlkeyword/__init__.py | jleeothon/urlkeyword | ef745e08a90cba56038d508667fb0f6acc3e41ce | [
"MIT"
] | 3 | 2021-05-21T03:45:59.000Z | 2022-01-23T18:26:45.000Z | urlkeyword/__init__.py | jleeothon/urlkeyword | ef745e08a90cba56038d508667fb0f6acc3e41ce | [
"MIT"
] | 13 | 2021-04-03T19:56:35.000Z | 2022-01-23T18:39:47.000Z | urlkeyword/__init__.py | jleeothon/urlkeyword | ef745e08a90cba56038d508667fb0f6acc3e41ce | [
"MIT"
] | 2 | 2022-02-02T03:15:51.000Z | 2022-03-07T10:00:41.000Z | from .validators import *
| 13 | 25 | 0.769231 |
7946f5ff3699e956e0f938fb9e77a062d3fe66d5 | 3,266 | py | Python | structural_model/constants.py | zibneuro/udvary-et-al-2022 | 8b456c41e72958677cb6035028d9c23013cb7c7e | [
"MIT"
] | 1 | 2022-03-11T13:43:50.000Z | 2022-03-11T13:43:50.000Z | structural_model/constants.py | zibneuro/udvary-et-al-2022 | 8b456c41e72958677cb6035028d9c23013cb7c7e | [
"MIT"
] | null | null | null | structural_model/constants.py | zibneuro/udvary-et-al-2022 | 8b456c41e72958677cb6035028d9c23013cb7c7e | [
"MIT"
] | null | null | null | import numpy as np
def getLayerDepths():
name_depthRange = {}
name_depthRange["L1"] = [0, 157]
name_depthRange["L2"] = [157, 367]
name_depthRange["L23"] = [157, 576]
name_depthRange["L3"] = [367, 576]
name_depthRange["L4"] = [576, 855]
name_depthRange["L5A"] = [855, 1102]
name_depthRan... | 25.716535 | 70 | 0.578996 |
7946f6b1c8f826896cff47686312fe45dc991a35 | 52,772 | py | Python | torch/quantization/observer.py | rodrigoberriel/pytorch | 97e86cf3197823cc598e6380ed47bcc385e50077 | [
"Intel"
] | null | null | null | torch/quantization/observer.py | rodrigoberriel/pytorch | 97e86cf3197823cc598e6380ed47bcc385e50077 | [
"Intel"
] | null | null | null | torch/quantization/observer.py | rodrigoberriel/pytorch | 97e86cf3197823cc598e6380ed47bcc385e50077 | [
"Intel"
] | null | null | null | import re
import warnings
from abc import ABCMeta, abstractmethod
from collections import OrderedDict
from functools import partial
from typing import Any, List, Tuple, Optional, Dict, Union
import torch
import torch.nn as nn
from .utils import check_min_max_valid, calculate_qmin_qmax
class _PartialWrapper(object):
... | 38.974889 | 123 | 0.62914 |
7946f9458a8f7140073a29465eb3912be5b48b1a | 75 | py | Python | demo.py | radroid/AI-in-Enterprise | e46d0af47823b9fedf9ae5788c8d742c0c191a57 | [
"MIT"
] | null | null | null | demo.py | radroid/AI-in-Enterprise | e46d0af47823b9fedf9ae5788c8d742c0c191a57 | [
"MIT"
] | null | null | null | demo.py | radroid/AI-in-Enterprise | e46d0af47823b9fedf9ae5788c8d742c0c191a57 | [
"MIT"
] | null | null | null | # This is a simple program to be uplaoded to GitHub.
print('Hello World')
| 18.75 | 52 | 0.733333 |
7946fa5cdd1268d423a8a01f7ff812ad95e292a0 | 241 | py | Python | Aniyom Ebenezer/Phase 2/LIST/Day_40_Challenge_Solution/Question 4 Solution.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 6 | 2020-05-23T19:53:25.000Z | 2021-05-08T20:21:30.000Z | Aniyom Ebenezer/Phase 2/LIST/Day_40_Challenge_Solution/Question 4 Solution.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 8 | 2020-05-14T18:53:12.000Z | 2020-07-03T00:06:20.000Z | Aniyom Ebenezer/Phase 2/LIST/Day_40_Challenge_Solution/Question 4 Solution.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 39 | 2020-05-10T20:55:02.000Z | 2020-09-12T17:40:59.000Z | """
Write a Python program to print the numbers of specified list after removing even numbers from it.
"""
numbers = [1, 2, 4, 3, 5, 4, 5, 7, 89, 32, 40]
specified_list =[x for (i,x) in enumerate(numbers) if x % 2 != 0]
print(specified_list) | 40.166667 | 98 | 0.680498 |
7946fb38fa24260cdb59e40d66acccebed52e887 | 1,781 | py | Python | models/networks/simple_nn.py | Piko-Piko-Pon-Taro/navict-recommender | 7eeaf0f77e500c1c0ecb15f9613aa08c2ef5c83c | [
"MIT"
] | null | null | null | models/networks/simple_nn.py | Piko-Piko-Pon-Taro/navict-recommender | 7eeaf0f77e500c1c0ecb15f9613aa08c2ef5c83c | [
"MIT"
] | 9 | 2021-05-03T01:38:46.000Z | 2021-07-14T13:13:25.000Z | models/networks/simple_nn.py | Piko-Piko-Pon-Taro/navict-recommender | 7eeaf0f77e500c1c0ecb15f9613aa08c2ef5c83c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""CBOW Embedding"""
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision.models as models
from models.base_model import BaseModel
from models.networks.cbow_embedder import Net as CBOW
class Net(nn.Module):
"""Network for CBOW"""
""" CBOW """
... | 24.067568 | 118 | 0.588995 |
7946fbecb0ad2a597ac5afe18f58f64781f6dee3 | 3,004 | py | Python | 2.DataPrepare/split_c18.py | NIA-Adp-Healthcare/test-project | 4ee172cdff14827b6946e672144ee381647d82ad | [
"MIT"
] | null | null | null | 2.DataPrepare/split_c18.py | NIA-Adp-Healthcare/test-project | 4ee172cdff14827b6946e672144ee381647d82ad | [
"MIT"
] | null | null | null | 2.DataPrepare/split_c18.py | NIA-Adp-Healthcare/test-project | 4ee172cdff14827b6946e672144ee381647d82ad | [
"MIT"
] | null | null | null |
import sys
import pandas as pd
import os
import glob
from sklearn.model_selection import train_test_split
# split_dataset(img_list, ALL_TEST, ALL_VALID, ALL_TRAIN)
def split_dataset(file_list, test_rid_list, valid_rid_list, train_rid_list):
print("FILES", len(file_list))
print("TEST LIST", len... | 31.291667 | 110 | 0.641811 |
7946fc2212cd78f528c0bff5184424dbd2cd4c88 | 1,777 | py | Python | src/framat/_util.py | airinnova/FramAT | 4177a95b4ed8d95a8330365e32ca13ac9ef24640 | [
"Apache-2.0"
] | 9 | 2019-08-13T18:49:22.000Z | 2022-03-31T08:40:29.000Z | src/framat/_util.py | airinnova/FramAT | 4177a95b4ed8d95a8330365e32ca13ac9ef24640 | [
"Apache-2.0"
] | 5 | 2020-01-08T08:38:25.000Z | 2022-02-07T17:01:45.000Z | src/framat/_util.py | airinnova/FramAT | 4177a95b4ed8d95a8330365e32ca13ac9ef24640 | [
"Apache-2.0"
] | 5 | 2019-09-20T18:47:20.000Z | 2022-01-11T13:08:55.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# Copyright 2019-2020 Airinnova AB and the FramAT authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You ... | 27.765625 | 97 | 0.605515 |
7946fcfce808e38cd3ff96968412ed809d88663b | 1,223 | py | Python | smacha/test/smacha_test_examples/nesting_params.py | ReconCell/smacha | 253215a35d2d091bf50c28c1ba876209b82d2400 | [
"BSD-3-Clause"
] | 16 | 2019-04-16T07:44:30.000Z | 2022-03-10T08:04:45.000Z | smacha/test/smacha_test_examples/nesting_params.py | ReconCell/smacha | 253215a35d2d091bf50c28c1ba876209b82d2400 | [
"BSD-3-Clause"
] | 2 | 2019-07-18T09:11:00.000Z | 2019-09-26T10:21:26.000Z | smacha/test/smacha_test_examples/nesting_params.py | ReconCell/smacha | 253215a35d2d091bf50c28c1ba876209b82d2400 | [
"BSD-3-Clause"
] | 2 | 2019-08-21T20:14:54.000Z | 2019-09-19T13:26:34.000Z | #!/usr/bin/env python
import smach
# define state Foo
class Foo(smach.State):
def __init__(self, name, outcome):
smach.State.__init__(self, outcomes=['outcome_a','outcome_b'])
self._name = name
self._outcome = outcome
def execute(self, userdata):
smach.loginfo('Executing stat... | 27.795455 | 73 | 0.537204 |
7946fd3dcc568389ee67d29cba0fd77e6dcfdea4 | 73,301 | py | Python | libutil.py | dwlee08/dnfp-analyzer | 4ae4ec4d32c08288b997c83655a0c97c7d347216 | [
"Apache-2.0"
] | null | null | null | libutil.py | dwlee08/dnfp-analyzer | 4ae4ec4d32c08288b997c83655a0c97c7d347216 | [
"Apache-2.0"
] | null | null | null | libutil.py | dwlee08/dnfp-analyzer | 4ae4ec4d32c08288b997c83655a0c97c7d347216 | [
"Apache-2.0"
] | 1 | 2020-12-10T06:24:34.000Z | 2020-12-10T06:24:34.000Z | #!/usr/bin/python3
#-*- coding:utf-8 -*-
import os
from json import loads
import json
import urllib.request
from urllib import parse as urlparse
import time
import numpy as np
import random
from io import BytesIO
from parse import compile
import sys
import subprocess
import math
import re
import datetime
from time imp... | 40.927415 | 158 | 0.366339 |
7946fe2aeb47cc09a8bde3d964fb24ca01ff4a2d | 6,562 | py | Python | modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_optimize.py | Aexyn/webrtc2 | daea5bf2deb843567a792f22ea2047a037e09d78 | [
"DOC",
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_optimize.py | modulesio/webrtc | ea143e774b4c00a74b617f272f5a8f71169cf24e | [
"DOC",
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_optimize.py | modulesio/webrtc | ea143e774b4c00a74b617f272f5a8f71169cf24e | [
"DOC",
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/env python
# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All c... | 36.455556 | 80 | 0.674489 |
7946fffaba9c93c4ec0138fc131478b28bfaf59f | 89 | py | Python | run.py | rabramley/telomere | e0246c0be18ce0b7e9d4ca88999626a005fede80 | [
"MIT"
] | null | null | null | run.py | rabramley/telomere | e0246c0be18ce0b7e9d4ca88999626a005fede80 | [
"MIT"
] | null | null | null | run.py | rabramley/telomere | e0246c0be18ce0b7e9d4ca88999626a005fede80 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from app import telomere
telomere.run(host='0.0.0.0', debug=True)
| 17.8 | 40 | 0.719101 |
7947013d8121bc25db6fbfdeec8607b6be530f9c | 409 | py | Python | iioy/movies/models/movie_rating.py | tizz98/iioy-v4 | 64d12fafb3c758f8291c6f577aba203932c44cbd | [
"MIT"
] | null | null | null | iioy/movies/models/movie_rating.py | tizz98/iioy-v4 | 64d12fafb3c758f8291c6f577aba203932c44cbd | [
"MIT"
] | 2 | 2020-06-05T18:23:54.000Z | 2021-03-19T22:02:23.000Z | iioy/movies/models/movie_rating.py | tizz98/iioy-v4 | 64d12fafb3c758f8291c6f577aba203932c44cbd | [
"MIT"
] | null | null | null | from django.db import models
from django_extensions.db.models import TimeStampedModel
class MovieRating(TimeStampedModel):
source = models.TextField()
value = models.TextField()
movie = models.ForeignKey(
to='movies.Movie',
related_name='ratings',
on_delete=models.CASCADE,
)
... | 24.058824 | 65 | 0.679707 |
79470150321b5821c928d9445069d9847b8e8d1d | 4,631 | py | Python | test/functional/combine_logs.py | anandhu-here/chuckrum | f2a734745e752cda50f5556cded7a713d969f4bc | [
"MIT"
] | null | null | null | test/functional/combine_logs.py | anandhu-here/chuckrum | f2a734745e752cda50f5556cded7a713d969f4bc | [
"MIT"
] | 1 | 2021-07-12T07:38:58.000Z | 2021-07-12T07:38:58.000Z | test/functional/combine_logs.py | anandhu-here/chuckrum | f2a734745e752cda50f5556cded7a713d969f4bc | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Combine logs from multiple chuckrum nodes as well as the test_framework log.
This streams the combined log output to stdout. Use combine_logs.py > outputfile
to write to an outputfile."""
import argparse
from collections import defaultdict, namedtuple
import heapq
import itertools
import os
... | 40.269565 | 196 | 0.618657 |
7947034c6b0d8b6a09cf2c5f960cd4da1240c1a9 | 2,925 | py | Python | driving_kalman.py | mihaigalos/DrivingKalman | c6bff74d1c7cd1994fe941a5a95a3a0e260c00d1 | [
"MIT"
] | null | null | null | driving_kalman.py | mihaigalos/DrivingKalman | c6bff74d1c7cd1994fe941a5a95a3a0e260c00d1 | [
"MIT"
] | null | null | null | driving_kalman.py | mihaigalos/DrivingKalman | c6bff74d1c7cd1994fe941a5a95a3a0e260c00d1 | [
"MIT"
] | null | null | null | # Adapted from https://stackoverflow.com/questions/47210512/using-pykalman-on-raw-acceleration-data-to-calculate-position
# on dataset from https://github.com/mmalekzadeh/motion-sense
from pykalman import KalmanFilter
import numpy as np
import matplotlib.pyplot as plt
from numpy import genfromtxt
AccX_HP = genfromtx... | 26.351351 | 121 | 0.648547 |
7947034e8d769a6a2c756434a17ff141700c941d | 11,654 | py | Python | src/training/network_training/nnUNetTrainerV2_DP.py | YZArren/ETCI2021 | 6dffb759b3439bc597e835f8dbd610ab4706e269 | [
"Apache-2.0"
] | 5 | 2021-07-26T12:19:08.000Z | 2022-01-18T07:50:12.000Z | src/training/network_training/nnUNetTrainerV2_DP.py | YZArren/ETCI2021 | 6dffb759b3439bc597e835f8dbd610ab4706e269 | [
"Apache-2.0"
] | null | null | null | src/training/network_training/nnUNetTrainerV2_DP.py | YZArren/ETCI2021 | 6dffb759b3439bc597e835f8dbd610ab4706e269 | [
"Apache-2.0"
] | 1 | 2022-03-02T15:19:07.000Z | 2022-03-02T15:19:07.000Z | # Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany
#
# 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://w... | 45.346304 | 124 | 0.596276 |
79470405ae200ae24d0ad0c23c149bf223d866e8 | 3,964 | py | Python | saleor/account/utils.py | sebasgoldberg/saleor | 2e94e8df80f305889434f549a4da6abc1257b598 | [
"CC-BY-4.0"
] | 1 | 2020-04-08T14:24:43.000Z | 2020-04-08T14:24:43.000Z | saleor/account/utils.py | sebasgoldberg/saleor | 2e94e8df80f305889434f549a4da6abc1257b598 | [
"CC-BY-4.0"
] | 10 | 2021-03-19T04:33:44.000Z | 2022-03-12T00:45:59.000Z | saleor/account/utils.py | sebasgoldberg/saleor | 2e94e8df80f305889434f549a4da6abc1257b598 | [
"CC-BY-4.0"
] | 4 | 2020-05-08T07:17:03.000Z | 2020-05-16T12:34:57.000Z | import os
import random
import jwt
from django.conf import settings
from django.core.exceptions import ValidationError
from django.core.files import File
from django.utils import timezone
from ..account.error_codes import AccountErrorCode
from ..checkout import AddressType
from ..core.utils import create_thumbnails
f... | 32.760331 | 87 | 0.703078 |
794706b3c7e50240edce37cb61c48a2b9be260d1 | 1,064 | py | Python | gravityspytools/collection_to_subjectset/forms.py | Gravity-Spy/gravityspytools | 23ef83e36ed934f7c39440bf43f4d5c7b7b4abb0 | [
"BSD-3-Clause"
] | 4 | 2019-03-11T12:32:24.000Z | 2020-12-01T06:31:39.000Z | gravityspytools/collection_to_subjectset/forms.py | johnwick211/gravityspytools | 23ef83e36ed934f7c39440bf43f4d5c7b7b4abb0 | [
"BSD-3-Clause"
] | 19 | 2018-01-29T21:28:39.000Z | 2020-07-14T18:38:23.000Z | gravityspytools/collection_to_subjectset/forms.py | johnwick211/gravityspytools | 23ef83e36ed934f7c39440bf43f4d5c7b7b4abb0 | [
"BSD-3-Clause"
] | 4 | 2018-02-02T16:47:16.000Z | 2020-12-01T06:31:49.000Z | from django import forms
import panoptes_client
class SearchForm(forms.Form):
username = forms.CharField(label='The Zoo username of the collection owner', max_length=100)
collection_display_name = forms.CharField(label='The display name of the collection as it is in the url. If the collecion url is https://ww... | 50.666667 | 209 | 0.668233 |
7947086a836610c8280f78fa44fe081e98cb729c | 12,826 | py | Python | pontoon/sync/tests/test_core.py | zbraniecki/pontoon | d559316783938bc66d5d9a52dcdb01137475c259 | [
"BSD-3-Clause"
] | 1 | 2017-04-04T06:55:46.000Z | 2017-04-04T06:55:46.000Z | pontoon/sync/tests/test_core.py | zbraniecki/pontoon | d559316783938bc66d5d9a52dcdb01137475c259 | [
"BSD-3-Clause"
] | null | null | null | pontoon/sync/tests/test_core.py | zbraniecki/pontoon | d559316783938bc66d5d9a52dcdb01137475c259 | [
"BSD-3-Clause"
] | null | null | null | import os.path
from django_nose.tools import (
assert_equal,
assert_false,
assert_not_equal,
assert_raises,
assert_true
)
from mock import ANY, Mock, patch, PropertyMock, MagicMock
from pontoon.base.models import (
Entity,
Repository,
Resource,
TranslatedResource,
)
from pontoon.ba... | 39.223242 | 97 | 0.677608 |
794709794a8012f56bb9469cb256b06877905b67 | 31,821 | py | Python | ansible_navigator/actions/run.py | ptoal/ansible-navigator | 47d51e4c2861903e002f6ad58707a2126af18f00 | [
"Apache-2.0",
"MIT"
] | null | null | null | ansible_navigator/actions/run.py | ptoal/ansible-navigator | 47d51e4c2861903e002f6ad58707a2126af18f00 | [
"Apache-2.0",
"MIT"
] | null | null | null | ansible_navigator/actions/run.py | ptoal/ansible-navigator | 47d51e4c2861903e002f6ad58707a2126af18f00 | [
"Apache-2.0",
"MIT"
] | null | null | null | """ :run
"""
import curses
import datetime
import json
import logging
import os
import re
import shlex
import shutil
import uuid
from math import floor
from queue import Queue
from typing import Any
from typing import Callable
from typing import Dict
from typing import List
from typing import Optional
from typing impo... | 36.119183 | 100 | 0.554602 |
7947099da5d94978d65208650463b1519b38bf4e | 3,183 | py | Python | tv.boxeeplay.svtplay3/settings.py | BoxeePlay/svtplay3 | 8bbaf5af0ec6927417ff1172bd0ea10b61fab605 | [
"MIT"
] | 1 | 2015-03-03T14:59:02.000Z | 2015-03-03T14:59:02.000Z | tv.boxeeplay.svtplay3/settings.py | BoxeePlay/svtplay3 | 8bbaf5af0ec6927417ff1172bd0ea10b61fab605 | [
"MIT"
] | null | null | null | tv.boxeeplay.svtplay3/settings.py | BoxeePlay/svtplay3 | 8bbaf5af0ec6927417ff1172bd0ea10b61fab605 | [
"MIT"
] | null | null | null | #encoding:utf-8
#author:Andreas Pehrson
#project:boxeeplay.tv
import mc
from logger import BPLog, Level
USE_PIRATEPLAY_KEY = "use_pirateplay"
BITRATE_LIMIT_KEY = "bitrate_limit"
def conf():
return mc.GetApp().GetLocalConfig()
def activate():
decision = mc.ShowDialogSelect("Jag vill ändra...", [get_option_st... | 34.225806 | 291 | 0.700283 |
79470a3e7e9fc34968d9340c4c032e16fd48e191 | 11,524 | py | Python | scripts/test_globalF.py | Tarekbouamer/Image-Retrieval-for-Image-Based-Localization | fcad9af4f558bebb3cbec1d08e49603a452f439d | [
"BSD-3-Clause"
] | 3 | 2021-01-15T13:58:22.000Z | 2021-01-22T00:03:34.000Z | scripts/test_globalF.py | Tarekbouamer/Image-Retrieval-for-Image-Based-Localization | fcad9af4f558bebb3cbec1d08e49603a452f439d | [
"BSD-3-Clause"
] | null | null | null | scripts/test_globalF.py | Tarekbouamer/Image-Retrieval-for-Image-Based-Localization | fcad9af4f558bebb3cbec1d08e49603a452f439d | [
"BSD-3-Clause"
] | null | null | null | import argparse
import os
import time
import pickle
import numpy as np
import torch
from torch.utils.model_zoo import load_url
from torchvision import transforms
from cirtorch.models.GF_net import init_network, extract_vectors
from cirtorch.datasets.datahelpers import cid2filename
from cirtorch.datasets.testdataset ... | 43.486792 | 162 | 0.599098 |
79470abaee1d412287761485b77daf98d263b262 | 2,734 | py | Python | poc.py | hcongvan/emotion-recognition-neural-networks | e98b1ce21599e83fccb97a31386ecd8ebfc6d3b3 | [
"MIT"
] | null | null | null | poc.py | hcongvan/emotion-recognition-neural-networks | e98b1ce21599e83fccb97a31386ecd8ebfc6d3b3 | [
"MIT"
] | null | null | null | poc.py | hcongvan/emotion-recognition-neural-networks | e98b1ce21599e83fccb97a31386ecd8ebfc6d3b3 | [
"MIT"
] | null | null | null | # Proof-of-concept
import cv2
import sys
from constants import *
from emotion_recognition import EmotionRecognition
import numpy as np
import pdb
cascade_classifier = cv2.CascadeClassifier(CASC_PATH)
def brighten(data,b):
datab = data * b
return datab
def format_image(image):
if len(image.shape) > 2 ... | 28.778947 | 150 | 0.644111 |
79470bc632bfdd5e3ab8a407df89043379e127a5 | 1,632 | py | Python | SRWLIB_ExampleViewDataFile.py | mrakitin/SRW-gui | 9c603d5a407dfa36ba92e8646d1a57151de825ed | [
"Apache-2.0"
] | null | null | null | SRWLIB_ExampleViewDataFile.py | mrakitin/SRW-gui | 9c603d5a407dfa36ba92e8646d1a57151de825ed | [
"Apache-2.0"
] | null | null | null | SRWLIB_ExampleViewDataFile.py | mrakitin/SRW-gui | 9c603d5a407dfa36ba92e8646d1a57151de825ed | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#############################################################################
# SRWLIB Example View Data File: View data stored in a file
# v 0.01
#############################################################################
from __future__ import print_function #Python 2.7 compatibility
from u... | 49.454545 | 187 | 0.588848 |
79470bece896f0caea5cb18cf4b22ee0b32b2bd1 | 602 | py | Python | If_and_circulation.py | Becavalier/Python-Practice-Cases | 23139e8bab0f5c712d38f378364842262d17e520 | [
"MIT"
] | 1 | 2016-08-18T00:53:51.000Z | 2016-08-18T00:53:51.000Z | If_and_circulation.py | Becavalier/Python-Practice-Cases | 23139e8bab0f5c712d38f378364842262d17e520 | [
"MIT"
] | null | null | null | If_and_circulation.py | Becavalier/Python-Practice-Cases | 23139e8bab0f5c712d38f378364842262d17e520 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# If
age = 3;
if age >= 18:
print('adult');
elif age >= 6:
print('teenager');
else:
print('kid');
s = input('birth: ');
birth = int(s);
if birth < 2000:
print('00前');
else:
print('00后');
# Circulation
names = ['Michael', 'Bob', 'Tracy'];
for name i... | 13.377778 | 41 | 0.51495 |
79470c218eb93beb3cbe517362d3c67eafa14117 | 1,446 | py | Python | chameleon/legacy/skfeature/utility/mutual_information.py | diviyat/chameleon | 12c212ef3ecaab73e6b2a4ae378b25495926ad75 | [
"MIT"
] | 2 | 2021-10-21T23:09:00.000Z | 2021-12-14T07:55:43.000Z | chameleon/legacy/skfeature/utility/mutual_information.py | diviyat/chameleon | 12c212ef3ecaab73e6b2a4ae378b25495926ad75 | [
"MIT"
] | null | null | null | chameleon/legacy/skfeature/utility/mutual_information.py | diviyat/chameleon | 12c212ef3ecaab73e6b2a4ae378b25495926ad75 | [
"MIT"
] | null | null | null | import chameleon.legacy.skfeature.utility.entropy_estimators as ee
def information_gain(f1, f2):
"""
This function calculates the information gain, where ig(f1,f2) = H(f1) - H(f1|f2)
Input
-----
f1: {numpy array}, shape (n_samples,)
f2: {numpy array}, shape (n_samples,)
Output
------... | 21.58209 | 101 | 0.584371 |
79470c6ffe2f20b3049cbc386160009ef026da3d | 1,716 | py | Python | xlsxwriter/test/comparison/test_table08.py | shareablee/XlsxWriter | 3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/comparison/test_table08.py | shareablee/XlsxWriter | 3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/comparison/test_table08.py | shareablee/XlsxWriter | 3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 31.2 | 101 | 0.52331 |
79470c836165dc8858da71bf43bd6b14c83a53dd | 68 | py | Python | bci_learning_studio/__init__.py | hellomoto-ai/bci-learning-studio | f37256bd0e2d85590ff258f14d70f09afcd9609f | [
"MIT"
] | null | null | null | bci_learning_studio/__init__.py | hellomoto-ai/bci-learning-studio | f37256bd0e2d85590ff258f14d70f09afcd9609f | [
"MIT"
] | 13 | 2018-11-28T05:00:00.000Z | 2019-01-07T04:06:37.000Z | bci_learning_studio/__init__.py | hellomoto-ai/bci-learning-studio | f37256bd0e2d85590ff258f14d70f09afcd9609f | [
"MIT"
] | null | null | null | __all__ = [
'__version__',
]
from ._version import __version__
| 11.333333 | 33 | 0.691176 |
79470f8e4c770d0b26e1dd0a0fc2b31f65659d51 | 9,021 | py | Python | src/python/ilp_pipeline_config.py | hhelm10/distPURL | 735480bceff38b7a10ea618c13fe93a5b3d26910 | [
"MIT"
] | 2 | 2021-04-27T15:26:00.000Z | 2021-09-12T23:15:02.000Z | src/python/ilp_pipeline_config.py | hhelm10/distPURL | 735480bceff38b7a10ea618c13fe93a5b3d26910 | [
"MIT"
] | null | null | null | src/python/ilp_pipeline_config.py | hhelm10/distPURL | 735480bceff38b7a10ea618c13fe93a5b3d26910 | [
"MIT"
] | 2 | 2021-04-27T15:26:33.000Z | 2021-09-13T12:32:24.000Z | """
Copyright (c) Microsoft Corporation.
Licensed under the MIT license.
"""
import logging
import os
import sys
from typing import *
from typing import List, Any, Dict
from multiprocessing import Lock
from datetime import datetime
from pytz import timezone
from ilp_common import *
from ilp_common_classes import *
f... | 42.551887 | 342 | 0.651923 |
79471059b35427cd96ca20cc6bb060b2e13e059e | 2,290 | py | Python | lncrawl/sources/tapread.py | betabeast12/lightnovel-crawler | 215b20846a71ad37ec893799cf684c76af707e62 | [
"Apache-2.0"
] | 2 | 2021-05-01T23:21:35.000Z | 2022-01-15T20:05:17.000Z | lncrawl/sources/tapread.py | dragonroad99/lncrawlod | a2f5e8fb115822d855baa992ecc65741822e315b | [
"Apache-2.0"
] | 4 | 2021-03-31T20:08:34.000Z | 2021-12-13T20:49:55.000Z | lncrawl/sources/tapread.py | dragonroad99/lncrawlod | a2f5e8fb115822d855baa992ecc65741822e315b | [
"Apache-2.0"
] | 1 | 2020-05-21T23:40:47.000Z | 2020-05-21T23:40:47.000Z | # -*- coding: utf-8 -*-
import logging
from urllib.parse import urlparse
from ..utils.crawler import Crawler
logger = logging.getLogger(__name__)
chapter_list_url = 'https://www.tapread.com/book/contents?bookId=%s'
chapter_url = 'https://www.tapread.com/book/chapter?bookId=%s&chapterId=%s'
class TapreadCrawler(Craw... | 32.714286 | 83 | 0.567686 |
794711790c51b1f818edfafbd0bdc0ffd8bf4765 | 10,925 | py | Python | compound_disease/compound_treats_disease/edge_prediction_experiment/edge_prediction_experiment.py | ajlee21/snorkeling | 93ca5269199a55ed2093334cb32b6d3120ae3535 | [
"CC0-1.0",
"BSD-3-Clause"
] | null | null | null | compound_disease/compound_treats_disease/edge_prediction_experiment/edge_prediction_experiment.py | ajlee21/snorkeling | 93ca5269199a55ed2093334cb32b6d3120ae3535 | [
"CC0-1.0",
"BSD-3-Clause"
] | null | null | null | compound_disease/compound_treats_disease/edge_prediction_experiment/edge_prediction_experiment.py | ajlee21/snorkeling | 93ca5269199a55ed2093334cb32b6d3120ae3535 | [
"CC0-1.0",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Compound Treats Disease Edge Prediction
# This notebook is designed to take the next step moving from predicted sentences to edge predictions. After training the discriminator model, each sentences contains a confidence score for the likelihood of mentioning a relationship. M... | 23.596112 | 515 | 0.660137 |
794712af13447b27948a2be27b8ed594d55572aa | 9,275 | py | Python | src/geneflow/extend/data_manager_contexts.py | 82ndAirborneDiv/geneflow2 | 521544adbae1221d2d80496016548670ce5391c1 | [
"Apache-2.0"
] | null | null | null | src/geneflow/extend/data_manager_contexts.py | 82ndAirborneDiv/geneflow2 | 521544adbae1221d2d80496016548670ce5391c1 | [
"Apache-2.0"
] | null | null | null | src/geneflow/extend/data_manager_contexts.py | 82ndAirborneDiv/geneflow2 | 521544adbae1221d2d80496016548670ce5391c1 | [
"Apache-2.0"
] | null | null | null | """
This module contains data management extension functions for various contexts.
"""
import glob
import os
import shutil
from geneflow.log import Log
from geneflow.uri_parser import URIParser
from geneflow.extend.agave_wrapper import AgaveWrapper
### Local data management functions and move/copy with Local as sou... | 22.788698 | 92 | 0.570135 |
7947148c3dc373d9f56992cc048c15d158fab7b0 | 742 | py | Python | hello_app/plotly/__init__.py | agaitskellwork/flask2 | d1de6baf721f3a4d7ccf8afbc39e08683eb7642d | [
"MIT"
] | null | null | null | hello_app/plotly/__init__.py | agaitskellwork/flask2 | d1de6baf721f3a4d7ccf8afbc39e08683eb7642d | [
"MIT"
] | null | null | null | hello_app/plotly/__init__.py | agaitskellwork/flask2 | d1de6baf721f3a4d7ccf8afbc39e08683eb7642d | [
"MIT"
] | null | null | null | """Initialize Flask app."""
from ddtrace import patch_all
from flask import Flask
from flask_assets import Environment
patch_all()
def init_app():
"""Construct core Flask application with embedded Dash app."""
app = Flask(__name__, instance_relative_config=False)
app.config.from_object("config.Config")
... | 24.733333 | 66 | 0.692722 |
7947159b76871693b28d5bca513dbd85fdfa6e77 | 2,220 | py | Python | odds/scraper.py | nik849/Odds | a2403e5f5428fcf826322b59410471ec97a6aa26 | [
"MIT"
] | 1 | 2017-11-05T20:41:12.000Z | 2017-11-05T20:41:12.000Z | odds/scraper.py | nik849/Odds | a2403e5f5428fcf826322b59410471ec97a6aa26 | [
"MIT"
] | 2 | 2021-03-31T18:43:15.000Z | 2021-12-13T19:46:28.000Z | odds/scraper.py | nik849/Odds | a2403e5f5428fcf826322b59410471ec97a6aa26 | [
"MIT"
] | null | null | null | import pandas
import requests
class scrape:
"""
Scraping class, using asyncio and aiophttp.
"""
def __init__(self, url):
"""
Initialiser for scrape class.
"""
self.URL = url
def _get(self, port=None):
"""
Method to scrape a single page and return a ... | 29.6 | 64 | 0.541441 |
794715a9a7dee6c86ae10497f790c75abeafa000 | 2,589 | py | Python | caffe2/python/modifier_context.py | KevinKecc/caffe2 | a2b6c6e2f0686358a84277df65e9489fb7d9ddb2 | [
"Apache-2.0"
] | 585 | 2015-08-10T02:48:52.000Z | 2021-12-01T08:46:59.000Z | caffe2/python/modifier_context.py | mingzhe09088/caffe2 | 8f41717c46d214aaf62b53e5b3b9b308b5b8db91 | [
"Apache-2.0"
] | 27 | 2018-04-14T06:44:22.000Z | 2018-08-01T18:02:39.000Z | caffe2/python/modifier_context.py | mingzhe09088/caffe2 | 8f41717c46d214aaf62b53e5b3b9b308b5b8db91 | [
"Apache-2.0"
] | 183 | 2015-08-10T02:49:04.000Z | 2021-12-01T08:47:13.000Z | # Copyright (c) 2016-present, Facebook, 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... | 31.192771 | 78 | 0.677868 |
79471627f96f2d3da751e1335163ae36d5daae5a | 195 | py | Python | app/api/__init__.py | typ0520/flask-blog | 198898c2576962fb635e518dd32147b56cc3ba5f | [
"Apache-2.0"
] | 1 | 2017-08-07T10:49:49.000Z | 2017-08-07T10:49:49.000Z | app/api/__init__.py | typ0520/flask-blog | 198898c2576962fb635e518dd32147b56cc3ba5f | [
"Apache-2.0"
] | null | null | null | app/api/__init__.py | typ0520/flask-blog | 198898c2576962fb635e518dd32147b56cc3ba5f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'typ0520'
from flask import Blueprint
api = Blueprint('api', __name__)
from . import authentication, posts, users, comments, errors
| 19.5 | 60 | 0.707692 |
7947162fae6fa8268965ea38631a7f9a631f0b3f | 686 | py | Python | app/core/migrations/0003_ingredient.py | arona504/recipe-api | 27acd3d1b1908248cb5e53d78e911f8abaec8fc4 | [
"MIT"
] | null | null | null | app/core/migrations/0003_ingredient.py | arona504/recipe-api | 27acd3d1b1908248cb5e53d78e911f8abaec8fc4 | [
"MIT"
] | null | null | null | app/core/migrations/0003_ingredient.py | arona504/recipe-api | 27acd3d1b1908248cb5e53d78e911f8abaec8fc4 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2020-04-21 17:43
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0002_tag'),
]
operations = [
migrations.CreateModel(
... | 28.583333 | 118 | 0.618076 |
79471647145c001f33f3289666fe54f4eb1e45aa | 444 | py | Python | raiden/messages/cmdid.py | luehrsFred/raiden | a1b118ebe14badb1acd0744b2d7f2b39f8ba5313 | [
"MIT"
] | null | null | null | raiden/messages/cmdid.py | luehrsFred/raiden | a1b118ebe14badb1acd0744b2d7f2b39f8ba5313 | [
"MIT"
] | 69 | 2020-07-21T05:49:21.000Z | 2022-03-08T18:09:44.000Z | raiden/messages/cmdid.py | luehrsFred/raiden | a1b118ebe14badb1acd0744b2d7f2b39f8ba5313 | [
"MIT"
] | null | null | null | import enum
@enum.unique
class CmdId(enum.Enum):
""" Identifier for off-chain messages.
These magic numbers are used to identify the type of a message.
"""
PROCESSED = 0
PING = 1
PONG = 2
SECRETREQUEST = 3
UNLOCK = 4
LOCKEDTRANSFER = 7
REFUNDTRANSFER = 8
REVEALSECRET = 11... | 18.5 | 67 | 0.644144 |
794716c12e2c51044e5d52eb20108781b83aa94a | 981 | py | Python | sample_project/env/lib/python3.9/site-packages/qtpy/Qt3DInput.py | Istiakmorsalin/ML-Data-Science | 681e68059b146343ef55b0671432dc946970730d | [
"MIT"
] | 4 | 2021-11-19T03:25:13.000Z | 2022-02-24T15:32:30.000Z | sample_project/env/lib/python3.9/site-packages/qtpy/Qt3DInput.py | Istiakmorsalin/ML-Data-Science | 681e68059b146343ef55b0671432dc946970730d | [
"MIT"
] | null | null | null | sample_project/env/lib/python3.9/site-packages/qtpy/Qt3DInput.py | Istiakmorsalin/ML-Data-Science | 681e68059b146343ef55b0671432dc946970730d | [
"MIT"
] | 3 | 2020-08-04T02:48:32.000Z | 2020-08-17T01:20:09.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright © 2009- The Spyder Development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# -----------------------------------------------------------------------------
"... | 36.333333 | 80 | 0.561672 |
794717b6ae039d7359e14e4b2ff18feac4c29ec6 | 8,265 | py | Python | bert-sst2/bert_sst2.py | yyxx1997/pytorch | 3d9fca2119c260317c06b11aa8bdb9b29b4c8cca | [
"MIT"
] | 1 | 2022-02-17T11:34:02.000Z | 2022-02-17T11:34:02.000Z | bert-sst2/bert_sst2.py | yyxx1997/pytorch | 3d9fca2119c260317c06b11aa8bdb9b29b4c8cca | [
"MIT"
] | null | null | null | bert-sst2/bert_sst2.py | yyxx1997/pytorch | 3d9fca2119c260317c06b11aa8bdb9b29b4c8cca | [
"MIT"
] | 1 | 2022-03-17T10:36:58.000Z | 2022-03-17T10:36:58.000Z | # -*- coding: utf-8 -*-
# @Time : 2021/1/11 9:09
# @Author : yx
# @File : bert_sst2.py
import torch
import torch.nn as nn
from torch.optim import Adam
from torch.utils.data import Dataset, DataLoader
from transformers import BertModel
from tqdm import tqdm
import os
import time
from transformers import BertTokenizer
f... | 32.667984 | 110 | 0.66824 |
794717b6cf3b92d6c4748c894de5e5a27422406e | 1,078 | py | Python | LC/74.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | 2 | 2018-02-24T17:20:02.000Z | 2018-02-24T17:25:43.000Z | LC/74.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | null | null | null | LC/74.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | null | null | null | class Solution(object):
def searchMatrix(self, matrix, target):
"""
:type matrix: List[List[int]]
:type target: int
:rtype: bool
"""
m = len(matrix)
n = len(matrix[0]) if m else 0
if m * n == 0:
return False
if target < matrix[0][0]... | 26.292683 | 60 | 0.396104 |
7947187f8c809c12d5b883cb598cfa7083adde50 | 649 | py | Python | snakepit/adapters/pip.py | kk6/pip-require | 09ef6da8a13ec65cdaea653b6d69f8218ee1da2e | [
"MIT"
] | 1 | 2018-08-27T10:11:21.000Z | 2018-08-27T10:11:21.000Z | snakepit/adapters/pip.py | kk6/pip-require | 09ef6da8a13ec65cdaea653b6d69f8218ee1da2e | [
"MIT"
] | 2 | 2015-11-20T06:55:37.000Z | 2015-11-22T17:03:14.000Z | snakepit/adapters/pip.py | kk6/pip-require | 09ef6da8a13ec65cdaea653b6d69f8218ee1da2e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Adapter of pip module."""
from __future__ import absolute_import, division, print_function, unicode_literals
import pip
def install(packages, options):
"""Execute `pip install`.
:param packages: Package name list.
:return: If `pip install` is successful, then return 0 else 1.... | 24.037037 | 82 | 0.657935 |
794718f0f368c542ad42a45410bc21c8376ac316 | 6,003 | py | Python | docs/conf.py | MorrisMA/py65 | bda1553ff88fc577944bde3d7cb3e75a3b83ccfa | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | MorrisMA/py65 | bda1553ff88fc577944bde3d7cb3e75a3b83ccfa | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | MorrisMA/py65 | bda1553ff88fc577944bde3d7cb3e75a3b83ccfa | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# test documentation build configuration file, created by
# sphinx-quickstart on Sun Nov 30 14:39:06 2008.
#
# This file is execfile()d with the current dir set to its containing
# directory.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleab... | 30.784615 | 79 | 0.729635 |
79471a236af4e0e4a170b71a7efd197a63ece32a | 27,131 | py | Python | wgail_info_0/models.py | liubaoryol/InfoGAIL | 89f553da1ed415f8383c0f9e8c3774debc628dcd | [
"MIT"
] | null | null | null | wgail_info_0/models.py | liubaoryol/InfoGAIL | 89f553da1ed415f8383c0f9e8c3774debc628dcd | [
"MIT"
] | null | null | null | wgail_info_0/models.py | liubaoryol/InfoGAIL | 89f553da1ed415f8383c0f9e8c3774debc628dcd | [
"MIT"
] | null | null | null | from utils import *
import numpy as np
import time
import math
import argparse
from keras.initializers import normal, identity, uniform
from keras.models import model_from_json
from keras.models import Sequential, Model
from keras.layers import Dense, BatchNormalization, Activation, Convolution2D, MaxPooling2D, Flatten... | 43.618971 | 122 | 0.570454 |
79471ac969dd0b15dc004a68049eb9673c928b2c | 2,582 | py | Python | river/metrics/fowlkes_mallows.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 1,105 | 2019-01-24T15:15:30.000Z | 2020-11-10T18:27:00.000Z | river/metrics/fowlkes_mallows.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 328 | 2019-01-25T13:48:43.000Z | 2020-11-11T11:41:44.000Z | river/metrics/fowlkes_mallows.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 150 | 2019-01-29T19:05:21.000Z | 2020-11-11T11:50:14.000Z | import math
from river import metrics
__all__ = ["FowlkesMallows"]
class FowlkesMallows(metrics.base.MultiClassMetric):
r"""Fowlkes-Mallows Index.
The Fowlkes-Mallows Index [^1] [^2] is an external evaluation method that is
used to determine the similarity between two clusterings, and also a metric
... | 31.108434 | 103 | 0.647947 |
79471b7e8c70b597c18a2028023b4e0bd4bf6540 | 17,810 | py | Python | elasticsearch/transport.py | shub1095/elasticsearch-py | 778c7e4ac000b51ced7c9a1a588200ec395e40ca | [
"Apache-2.0"
] | null | null | null | elasticsearch/transport.py | shub1095/elasticsearch-py | 778c7e4ac000b51ced7c9a1a588200ec395e40ca | [
"Apache-2.0"
] | null | null | null | elasticsearch/transport.py | shub1095/elasticsearch-py | 778c7e4ac000b51ced7c9a1a588200ec395e40ca | [
"Apache-2.0"
] | 1 | 2020-08-04T11:42:43.000Z | 2020-08-04T11:42:43.000Z | # Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use ... | 39.8434 | 95 | 0.616788 |
79471bce507a8a833060d8eb8f6f34c58aa6bb7d | 3,016 | py | Python | submission_patch.py | doublechenching/ship_detection | 1ba4926e0d28043863df05ae8afc3d5b336b350d | [
"Apache-2.0"
] | 8 | 2019-03-12T08:47:37.000Z | 2021-05-13T05:28:20.000Z | submission_patch.py | doublechenching/ship_detection | 1ba4926e0d28043863df05ae8afc3d5b336b350d | [
"Apache-2.0"
] | null | null | null | submission_patch.py | doublechenching/ship_detection | 1ba4926e0d28043863df05ae8afc3d5b336b350d | [
"Apache-2.0"
] | null | null | null | #encoding: utf-8
from __future__ import print_function
from utils import init_env
init_env('1')
from config import config as cfg
from models.patch_dense_unet import dense121_unet
from dataset.data import compose_ndcube, decompose_ndimage
import os
import glob
import numpy as np
from dataset.data import rle_encode
from ... | 35.482353 | 101 | 0.66313 |
79471c8306b7078fd9c52c359a3fc526d7e31533 | 5,223 | py | Python | scripts/auto_nav_guidance.py | vanttec/rb_missions | f05384f84a256b9f64defaef625bee689b79701f | [
"MIT"
] | null | null | null | scripts/auto_nav_guidance.py | vanttec/rb_missions | f05384f84a256b9f64defaef625bee689b79701f | [
"MIT"
] | null | null | null | scripts/auto_nav_guidance.py | vanttec/rb_missions | f05384f84a256b9f64defaef625bee689b79701f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
from std_msgs.msg import String
from std_msgs.msg import Float64
from std_msgs.msg import Int32
from custom_msgs.msg import obj_detected
from custom_msgs.msg import obj_detected_list
from geometry_msgs.msg import Pose2D
import numpy as np
import math
import time
#import matplotlib.py... | 30.905325 | 161 | 0.548152 |
79471d2c8ff431311b7675ff0e4d1680dff8526c | 810 | py | Python | gallery/urls.py | Nyota254/my-gallery | 956262b746ea65bccb7842e54e76a1d7474c643a | [
"MIT"
] | null | null | null | gallery/urls.py | Nyota254/my-gallery | 956262b746ea65bccb7842e54e76a1d7474c643a | [
"MIT"
] | 6 | 2020-06-05T23:32:54.000Z | 2021-06-09T18:28:32.000Z | gallery/urls.py | Nyota254/my-gallery | 956262b746ea65bccb7842e54e76a1d7474c643a | [
"MIT"
] | 1 | 2019-10-13T10:05:40.000Z | 2019-10-13T10:05:40.000Z | """gallery URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based... | 35.217391 | 77 | 0.708642 |
79471d57640fa4b9231c1ff021231c8e7d4f1086 | 23,312 | py | Python | Wrapping/Python/vtk/wx/wxVTKRenderWindow.py | Lin1225/vtk_v5.10.0 | b54ac74f4716572862365fbff28cd0ecb8d08c3d | [
"BSD-3-Clause"
] | 1 | 2021-10-13T01:57:14.000Z | 2021-10-13T01:57:14.000Z | Wrapping/Python/vtk/wx/wxVTKRenderWindow.py | Lin1225/vtk_v5.10.0 | b54ac74f4716572862365fbff28cd0ecb8d08c3d | [
"BSD-3-Clause"
] | null | null | null | Wrapping/Python/vtk/wx/wxVTKRenderWindow.py | Lin1225/vtk_v5.10.0 | b54ac74f4716572862365fbff28cd0ecb8d08c3d | [
"BSD-3-Clause"
] | 5 | 2015-03-23T21:13:19.000Z | 2022-01-03T11:15:39.000Z | """
A simple VTK widget for wxPython.
Find wxPython info at http://wxPython.org
Created by David Gobbi, December 2001
Based on vtkTkRenderWindget.py
Updated to new wx namespace and some cleaning by Andrea Gavana,
December 2006
"""
"""
Please see the example at the end of this file.
-------------------------------... | 30.43342 | 77 | 0.575026 |
79471da6604539c7e590e8eda7fab5640057d702 | 1,985 | py | Python | src/api/StockService.py | webclinic017/stocksim | bdc658eb7d08b228eb47a92964f474cf33c2f226 | [
"MIT"
] | 3 | 2019-10-16T16:27:06.000Z | 2019-12-30T16:16:32.000Z | src/api/StockService.py | webclinic017/stocksim | bdc658eb7d08b228eb47a92964f474cf33c2f226 | [
"MIT"
] | 20 | 2019-10-10T20:01:54.000Z | 2019-12-10T05:03:12.000Z | src/api/StockService.py | webclinic017/stocksim | bdc658eb7d08b228eb47a92964f474cf33c2f226 | [
"MIT"
] | 2 | 2020-11-11T15:29:26.000Z | 2020-12-02T01:06:33.000Z | import json
from flask import render_template
from flask_restful import Resource, reqparse
from flask_jwt_extended import (create_access_token, create_refresh_token, jwt_required, jwt_refresh_token_required, get_jwt_identity, get_raw_jwt)
from controllers.StockController import StockController
from models.assets impor... | 30.538462 | 147 | 0.713854 |
79471f91c34e8d7ace449201d6c823778ec68a43 | 5,538 | py | Python | setup.py | mos3abof/dir2html | fe8f09a43ebbcf9913e31ea3bf799eefc8654ea8 | [
"MIT"
] | 1 | 2018-11-21T12:55:47.000Z | 2018-11-21T12:55:47.000Z | setup.py | mos3abof/dir2html | fe8f09a43ebbcf9913e31ea3bf799eefc8654ea8 | [
"MIT"
] | 17 | 2018-11-21T12:33:55.000Z | 2018-11-21T14:41:58.000Z | setup.py | mos3abof/dir2html | fe8f09a43ebbcf9913e31ea3bf799eefc8654ea8 | [
"MIT"
] | null | null | null | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
from os import path
# io.open is needed for projects that support Python 2.7
# It ensures op... | 39.276596 | 89 | 0.665222 |
79472016f82c670ec23409193dda7bbc698e9c52 | 2,657 | py | Python | test/data_processing/base_data_processor_test.py | spencerking/qiskit-experiments | 11a254b010afe35933aaabac70de12b5b5a244bf | [
"Apache-2.0"
] | null | null | null | test/data_processing/base_data_processor_test.py | spencerking/qiskit-experiments | 11a254b010afe35933aaabac70de12b5b5a244bf | [
"Apache-2.0"
] | 1 | 2021-06-01T01:43:52.000Z | 2021-06-01T01:43:52.000Z | test/data_processing/base_data_processor_test.py | spencerking/qiskit-experiments | 11a254b010afe35933aaabac70de12b5b5a244bf | [
"Apache-2.0"
] | 2 | 2021-05-17T10:13:20.000Z | 2021-06-01T01:34:34.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 33.632911 | 85 | 0.621001 |
7947205d7b124abc0236cf35ac8f0d0f3f4d2756 | 5,950 | py | Python | test.py | czella/poker-player-theempiredidnothingwrong | fd064967b9ff37c81a22cb22e72ff086a752e158 | [
"MIT"
] | null | null | null | test.py | czella/poker-player-theempiredidnothingwrong | fd064967b9ff37c81a22cb22e72ff086a752e158 | [
"MIT"
] | null | null | null | test.py | czella/poker-player-theempiredidnothingwrong | fd064967b9ff37c81a22cb22e72ff086a752e158 | [
"MIT"
] | null | null | null | import player
import json
testJSon_one_high = json.loads("""{"community_cards": [],
"minimum_raise": 2,
"big_blind": 4,
"orbits": 0,
"in_action": 3,
"bet_index": 2,
"current_buy_in": 4,
"round": 0,
"players": [{"id": 0, "bet": 0, "version": "Pony 1.0.0", "time_used": 0, "stack": 1000, "status": "active", "name"... | 39.666667 | 138 | 0.482857 |
7947227eb14292f59667dcd8dae977259e513856 | 4,933 | py | Python | scripts/pyqtgraph-develop/examples/__main__.py | kuldeepaman/tf-pose | 8050912c52a7b4f3c8a2656f267d47ba21d093f6 | [
"Apache-2.0"
] | null | null | null | scripts/pyqtgraph-develop/examples/__main__.py | kuldeepaman/tf-pose | 8050912c52a7b4f3c8a2656f267d47ba21d093f6 | [
"Apache-2.0"
] | null | null | null | scripts/pyqtgraph-develop/examples/__main__.py | kuldeepaman/tf-pose | 8050912c52a7b4f3c8a2656f267d47ba21d093f6 | [
"Apache-2.0"
] | null | null | null | import sys, os
if __name__ == "__main__" and (__package__ is None or __package__==''):
parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, parent_dir)
import examples
__package__ = "examples"
import pyqtgraph as pg
import subprocess
from pyqtgraph.python2_... | 34.256944 | 122 | 0.579769 |
794722eb5e6a8a8c2eaeba7de981d8963f81ab68 | 1,907 | py | Python | practiceCR/restAPI/models.py | faisaladisoe/learn-python-rest-API | d597f38eea4aff54889c241303df5136dc9278ae | [
"MIT"
] | null | null | null | practiceCR/restAPI/models.py | faisaladisoe/learn-python-rest-API | d597f38eea4aff54889c241303df5136dc9278ae | [
"MIT"
] | null | null | null | practiceCR/restAPI/models.py | faisaladisoe/learn-python-rest-API | d597f38eea4aff54889c241303df5136dc9278ae | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Biodata(models.Model):
nickname = models.CharField(max_length = 20, null = True)
fullname = models.CharField(max_length = 100, null = True)
CLASSROOM_CHOICES = (
('12 IPA 1', '12 IPA 1'),
('12 IPA 2', '12 IPA 2'),
... | 31.262295 | 68 | 0.505506 |
79472384747a0ca864b420aaaf702e46b4c64004 | 6,191 | py | Python | src/test_workflow/integ_test/integ_test_suite.py | VijayanB/opensearch-build | c84c06cffee2396360c0ae8f41f0027982e0b2d8 | [
"Apache-2.0"
] | null | null | null | src/test_workflow/integ_test/integ_test_suite.py | VijayanB/opensearch-build | c84c06cffee2396360c0ae8f41f0027982e0b2d8 | [
"Apache-2.0"
] | null | null | null | src/test_workflow/integ_test/integ_test_suite.py | VijayanB/opensearch-build | c84c06cffee2396360c0ae8f41f0027982e0b2d8 | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
import glob
import logging
import os
from git.git_repository import GitRepository
from paths.script_finder import ScriptFinder... | 39.941935 | 120 | 0.633177 |
794723b171c2cb1868e1c2891e709109b0f92ddf | 3,238 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_configuration.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_configuration.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_configuration.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 ... | 44.972222 | 129 | 0.68252 |
7947242267b9a3c24f97e667faebe3d047946bcd | 2,263 | py | Python | src/emoji_prediction/config/ABCDM_config.py | Ehsan-Tavan/Emoji-Prediction | f79e19ac3b975b7d43bb1971f12afeffda1a072d | [
"MIT"
] | 1 | 2020-11-11T04:35:33.000Z | 2020-11-11T04:35:33.000Z | src/emoji_prediction/config/ABCDM_config.py | Ehsan-Tavan/Emoji-Prediction | f79e19ac3b975b7d43bb1971f12afeffda1a072d | [
"MIT"
] | null | null | null | src/emoji_prediction/config/ABCDM_config.py | Ehsan-Tavan/Emoji-Prediction | f79e19ac3b975b7d43bb1971f12afeffda1a072d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint: disable-msg=no-member
"""
ABCDM_config.py is a module for ABCDM model config
"""
import torch
__author__ = "Ehsan Tavan"
__project__ = "Persian Emoji Prediction"
__credits__ = ["Ehsan Tavan"]
__license__ = "Public Domain"
__version__ = "1.0.0"
__maintainer__ =... | 31.873239 | 87 | 0.714538 |
7947278a711fa0097a7a51f1aa722134292f1353 | 27,513 | py | Python | nrm_analysis/misctools/mask_definitions.py | vandalt/ImPlaneIA | 72b22e487ef45a8a665e4a6a88a91e99e382fdd0 | [
"BSD-3-Clause"
] | null | null | null | nrm_analysis/misctools/mask_definitions.py | vandalt/ImPlaneIA | 72b22e487ef45a8a665e4a6a88a91e99e382fdd0 | [
"BSD-3-Clause"
] | null | null | null | nrm_analysis/misctools/mask_definitions.py | vandalt/ImPlaneIA | 72b22e487ef45a8a665e4a6a88a91e99e382fdd0 | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
from __future__ import print_function
import numpy as np
import math
import sys
import time
from nrm_analysis.misctools.utils import makedisk, rotate2dccw
from astropy.io import fits
from copy import copy
"""
================
NRM_mask_definitions
================
A module defining mask geometry... | 38.587658 | 130 | 0.589285 |
794727abf7142ffbc261e4a1a49b5f0c79b14daa | 1,742 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/sensu/sensu_go/tests/unit/plugins/filter/test_package_name.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/sensu/sensu_go/tests/unit/plugins/filter/test_package_name.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/sensu/sensu_go/tests/unit/plugins/filter/test_package_name.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | # Copyright: (c) 2020, XLAB Steampunk <steampunk@xlab.si>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import sys
import pytest
from ansible_collections.sensu.sensu_go.plugins.filt... | 29.525424 | 92 | 0.630884 |
7947284b67f1da002bca200aa1819af6491a4871 | 66 | py | Python | addons/checks/__init__.py | enterspeed/kurisu | 48163391d1861fe92125f59dad63884d5e767ab2 | [
"MIT"
] | 10 | 2017-06-10T21:22:21.000Z | 2021-01-22T13:45:31.000Z | addons/checks/__init__.py | enterspeed/kurisu | 48163391d1861fe92125f59dad63884d5e767ab2 | [
"MIT"
] | 1 | 2018-06-08T18:18:17.000Z | 2018-06-08T21:12:23.000Z | addons/checks/__init__.py | enterspeed/makisekurisu | 48163391d1861fe92125f59dad63884d5e767ab2 | [
"MIT"
] | 3 | 2017-06-10T21:22:22.000Z | 2021-01-29T00:23:10.000Z | from addons.checks import checks
from addons.checks import errors
| 22 | 32 | 0.848485 |
7947284bab43037b9b043e76a4c98c1aab80d885 | 432 | py | Python | award/api/urls.py | margaret254/Awwards | 9af3de00c4200b86c92b16b141a4642fe8f02c87 | [
"MIT"
] | null | null | null | award/api/urls.py | margaret254/Awwards | 9af3de00c4200b86c92b16b141a4642fe8f02c87 | [
"MIT"
] | 9 | 2020-02-12T03:24:03.000Z | 2022-02-10T14:10:21.000Z | award/api/urls.py | margaret254/Awwards | 9af3de00c4200b86c92b16b141a4642fe8f02c87 | [
"MIT"
] | 1 | 2020-06-05T17:47:06.000Z | 2020-06-05T17:47:06.000Z | from django.urls import path
from award.api.views import(
api_detail_award_view,
api_update_award_view,
api_delete_award_view,
api_create_award_view
)
app_name = 'award'
urlpatterns = [
path('<slug>/', api_detail_award_view, name="detail"),
path('<slug>/update', api_update_award_view, name="update"),
path('<s... | 21.6 | 61 | 0.752315 |
79472870ae23492e959b3e728a3208fd1fa720fa | 514 | py | Python | env/lib/python3.8/site-packages/plotly/validators/mesh3d/_visible.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | env/lib/python3.8/site-packages/plotly/validators/mesh3d/_visible.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | env/lib/python3.8/site-packages/plotly/validators/mesh3d/_visible.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import _plotly_utils.basevalidators
class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="visible", parent_name="mesh3d", **kwargs):
super(VisibleValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 36.714286 | 78 | 0.643969 |
794728abe39bf42e1e0e72d5c6382d9f34f070f5 | 3,609 | py | Python | py/simulator/game.py | coderanger/farmrpg-ext | bade8519fcd0481b08ecba3f8554fde2de5828ed | [
"Apache-2.0"
] | 8 | 2022-02-04T05:57:47.000Z | 2022-03-25T08:02:42.000Z | py/simulator/game.py | coderanger/farmrpg-ext | bade8519fcd0481b08ecba3f8554fde2de5828ed | [
"Apache-2.0"
] | null | null | null | py/simulator/game.py | coderanger/farmrpg-ext | bade8519fcd0481b08ecba3f8554fde2de5828ed | [
"Apache-2.0"
] | 2 | 2022-02-07T05:38:33.000Z | 2022-02-07T05:54:51.000Z | from __future__ import annotations
import datetime
from io import StringIO
from typing import Optional
import attrs
import structlog
from .ai import AI
from .buildings import HayField, RaptorPen, Sawmill
from .farm import Farm
from .player import Player
from .steak_market import SteakMarket
from .utils import format... | 33.728972 | 82 | 0.610973 |
794729e152b3f51acb5a858812fa29d853af4f73 | 8,792 | py | Python | kivy/input/providers/probesysfs.py | CharaD7/kivy | 85065fe6633f5ac831c193dc84e3f636b789cc3a | [
"MIT"
] | 2 | 2021-05-16T09:46:14.000Z | 2021-11-17T11:23:15.000Z | kivy/input/providers/probesysfs.py | CharaD7/kivy | 85065fe6633f5ac831c193dc84e3f636b789cc3a | [
"MIT"
] | 1 | 2016-11-11T13:45:42.000Z | 2016-11-11T13:45:42.000Z | kivy/input/providers/probesysfs.py | CharaD7/kivy | 85065fe6633f5ac831c193dc84e3f636b789cc3a | [
"MIT"
] | 2 | 2020-03-28T10:18:00.000Z | 2021-02-13T06:34:14.000Z | '''
Auto Create Input Provider Config Entry for Available MT Hardware (linux only).
===============================================================================
Thanks to Marc Tardif for the probing code, taken from scan-for-mt-device.
The device discovery is done by this provider. However, the reading of
input ca... | 35.451613 | 79 | 0.540833 |
79472ac373fdba478d4002e0cab601b3e723ab0d | 5,079 | py | Python | CV19Dash/_notebooks/covid_overview.py | Ehnryu/archives | 36f5d1b8b0168ada3a1a25fbe3112709f4134652 | [
"MIT"
] | 1,740 | 2020-03-19T17:26:24.000Z | 2022-03-30T08:04:55.000Z | CV19Dash/_notebooks/covid_overview.py | Ehnryu/archives | 36f5d1b8b0168ada3a1a25fbe3112709f4134652 | [
"MIT"
] | 3,565 | 2020-03-29T04:44:21.000Z | 2022-03-31T20:29:54.000Z | CV19Dash/_notebooks/covid_overview.py | Ehnryu/archives | 36f5d1b8b0168ada3a1a25fbe3112709f4134652 | [
"MIT"
] | 516 | 2020-03-19T16:28:36.000Z | 2022-03-28T15:22:19.000Z | import pandas as pd
base_url = 'https://raw.githubusercontent.com/pratapvardhan/notebooks/master/covid19/'
paths = {
'mapping': base_url + 'mapping_countries.csv',
'overview': base_url + 'overview.tpl'
}
def get_mappings(url):
df = pd.read_csv(url, encoding='utf-8')
return {
'df': df,
... | 39.992126 | 95 | 0.642646 |
79472ad2586ec0ebbc5692bb8e966c704385cdfa | 62,484 | py | Python | manta/cmdln.py | joyent/python-manta | f68ef142bdbac058c981e3b28e18d77612f5b7c6 | [
"MIT"
] | 16 | 2015-01-24T22:52:08.000Z | 2020-04-12T20:41:54.000Z | manta/cmdln.py | joyent/python-manta | f68ef142bdbac058c981e3b28e18d77612f5b7c6 | [
"MIT"
] | 42 | 2015-01-21T23:38:40.000Z | 2020-09-30T20:53:12.000Z | manta/cmdln.py | joyent/python-manta | f68ef142bdbac058c981e3b28e18d77612f5b7c6 | [
"MIT"
] | 18 | 2015-01-21T23:39:25.000Z | 2020-11-28T17:32:08.000Z | #!/usr/bin/env python
# Copyright (c) 2012 Trent Mick
# Copyright (c) 2002-2009 ActiveState Software Inc.
# License: MIT (see LICENSE.txt for license details)
# Author: Trent Mick
"""An improvement on Python's standard cmd.py module.
As with cmd.py, this module provides "a simple framework for writing
line-oriented c... | 36.097054 | 83 | 0.554014 |
79472afda37eabd0815e3f8c258ec1bcd55ef2cb | 10,153 | py | Python | MultiTool_src/Modules/proxy_checker.py | Reven8e/multitool | 7a70cc8200f08e917ecf538e7589a2eba97e38bb | [
"MIT"
] | 17 | 2020-11-17T17:40:26.000Z | 2022-03-13T07:05:43.000Z | MultiTool_src/Modules/proxy_checker.py | Reven8e/multitool | 7a70cc8200f08e917ecf538e7589a2eba97e38bb | [
"MIT"
] | null | null | null | MultiTool_src/Modules/proxy_checker.py | Reven8e/multitool | 7a70cc8200f08e917ecf538e7589a2eba97e38bb | [
"MIT"
] | 5 | 2020-11-17T17:55:04.000Z | 2021-12-15T20:59:37.000Z | import random, time, sys, subprocess, threading, pycurl, os, requests
from colorama import Fore
class Proxy_Checker():
def __init__(self):
subprocess.call('clear', shell=True)
sys.setrecursionlimit(10**6)
print(f"""{Fore.BLUE}
██▓███ ██▀███ ▒█████ ▒██ ██▓██ ██▓ ▄▄▄█████▓▒█████ ▒... | 54.005319 | 204 | 0.504087 |
79472b249a47ce17f0bf199424f6d6172c76bf52 | 6,164 | py | Python | sphinx_gallery/notebook.py | ksunden/sphinx-gallery | 7f26c1a6fc8f53169af2e5fa558d0efbfb32fb4f | [
"BSD-3-Clause"
] | null | null | null | sphinx_gallery/notebook.py | ksunden/sphinx-gallery | 7f26c1a6fc8f53169af2e5fa558d0efbfb32fb4f | [
"BSD-3-Clause"
] | null | null | null | sphinx_gallery/notebook.py | ksunden/sphinx-gallery | 7f26c1a6fc8f53169af2e5fa558d0efbfb32fb4f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
r"""
Parser for Jupyter notebooks
============================
Class that holds the Jupyter notebook information
"""
# Author: Óscar Nájera
# License: 3-clause BSD
from __future__ import division, absolute_import, print_function
from functools import partial
import argparse
import json
import... | 30.666667 | 79 | 0.572193 |
79472b2a7262f4908984c2732bffbfcf4699d39a | 1,368 | py | Python | glue-scripts/process_marketing_data.py | biswas/aws-serverless-etl | 062c013d2025ad1be9cd65bcf5a4663be479396d | [
"Unlicense"
] | null | null | null | glue-scripts/process_marketing_data.py | biswas/aws-serverless-etl | 062c013d2025ad1be9cd65bcf5a4663be479396d | [
"Unlicense"
] | 1 | 2022-02-04T23:00:32.000Z | 2022-02-04T23:00:32.000Z | glue-scripts/process_marketing_data.py | biswas/aws-serverless-etl | 062c013d2025ad1be9cd65bcf5a4663be479396d | [
"Unlicense"
] | null | null | null | import sys
import pyspark.sql.functions as func
from awsglue.dynamicframe import DynamicFrame
from awsglue.transforms import *
from awsglue.utils import getResolvedOptions
from pyspark.context import SparkContext
from awsglue.context import GlueContext
from awsglue.job import Job
args = getResolvedOptions(sys.argv, ['... | 31.813953 | 98 | 0.739766 |
79472c022a4eb58620afb086a13e6cf1fd6b7ca5 | 8,089 | py | Python | calc_metrics.py | maua-maua-maua/nvGAN | edea24c58646780c9fb8ea942e49708ce9d62421 | [
"MIT"
] | null | null | null | calc_metrics.py | maua-maua-maua/nvGAN | edea24c58646780c9fb8ea942e49708ce9d62421 | [
"MIT"
] | null | null | null | calc_metrics.py | maua-maua-maua/nvGAN | edea24c58646780c9fb8ea942e49708ce9d62421 | [
"MIT"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this sof... | 43.256684 | 154 | 0.664606 |
79472cdbb5787bbb74b76e1e8d236cdb5bfff36b | 4,151 | py | Python | 3d_classification/ignite/densenet_evaluation_dict.py | tommydino93/tutorials | aca1f3c44e6697029a8b81c86497ca19bf433698 | [
"Apache-2.0"
] | 535 | 2020-09-16T06:23:49.000Z | 2022-03-31T13:48:34.000Z | 3d_classification/ignite/densenet_evaluation_dict.py | tommydino93/tutorials | aca1f3c44e6697029a8b81c86497ca19bf433698 | [
"Apache-2.0"
] | 454 | 2020-09-16T02:11:17.000Z | 2022-03-31T20:00:09.000Z | 3d_classification/ignite/densenet_evaluation_dict.py | tommydino93/tutorials | aca1f3c44e6697029a8b81c86497ca19bf433698 | [
"Apache-2.0"
] | 289 | 2020-09-21T16:24:53.000Z | 2022-03-31T13:04:14.000Z | # Copyright 2020 MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, s... | 39.160377 | 108 | 0.695736 |
79472db7498321532b0da88898cf94fe3736043a | 14,987 | py | Python | bundle/Conque-GDB/autoload/conque_term/conque_sole.py | wonwooddo/vim_setup | 7555031a846ceb2986f491fd1738a5b5263af2f1 | [
"MIT"
] | 1 | 2018-02-15T10:33:31.000Z | 2018-02-15T10:33:31.000Z | bundle/Conque-GDB/autoload/conque_term/conque_sole.py | wonwooddo/vim_setup | 7555031a846ceb2986f491fd1738a5b5263af2f1 | [
"MIT"
] | 2 | 2018-11-30T10:33:35.000Z | 2019-03-07T12:04:56.000Z | bundle/Conque-GDB/autoload/conque_term/conque_sole.py | wonwooddo/vim_setup | 7555031a846ceb2986f491fd1738a5b5263af2f1 | [
"MIT"
] | 2 | 2020-11-08T06:02:44.000Z | 2020-11-19T01:45:01.000Z | # FILE: autoload/conque_term/conque_sole.py
# AUTHOR: Nico Raffo <nicoraffo@gmail.com>
# WEBSITE: http://conque.googlecode.com
# MODIFIED: 2011-09-12
# VERSION: 2.3, for Vim 7.0
# LICENSE:
# Conque - Vim terminal/console emulator
# Copyright (C) 2009-2011 Nico Raffo
#
# MIT License
#
# Permission is hereby gran... | 32.439394 | 143 | 0.575832 |
79472e5043ed044b0831d6e3d903523186f0f8dc | 788 | py | Python | leetcode/007_reverse-integer.py | heyf/cloaked-octo-adventure | 8180684a8a1859efb836edd48556b5f3088be398 | [
"MIT"
] | null | null | null | leetcode/007_reverse-integer.py | heyf/cloaked-octo-adventure | 8180684a8a1859efb836edd48556b5f3088be398 | [
"MIT"
] | null | null | null | leetcode/007_reverse-integer.py | heyf/cloaked-octo-adventure | 8180684a8a1859efb836edd48556b5f3088be398 | [
"MIT"
] | null | null | null | '''
7. Reverse Integer
https://leetcode.com/problems/reverse-integer/
'''
class Solution(object):
def reverse(self, x):
"""
:type x: int
:rtype: int
"""
ret = 0
sign = 1
if x < 0:
x = -x
sign = -1
while x > 0:
digit... | 21.297297 | 61 | 0.458122 |
79472ef1c0fb88dd174511473e3956ae8727e364 | 1,314 | py | Python | website/forms.py | Jason13201/Lets-tidy-up-this-space | ca815f1e8227e7b60c9047c7a36d05355616021b | [
"MIT"
] | 2 | 2021-03-15T04:34:29.000Z | 2021-03-15T04:34:56.000Z | website/forms.py | Jason13201/Lets-tidy-up-this-space | ca815f1e8227e7b60c9047c7a36d05355616021b | [
"MIT"
] | null | null | null | website/forms.py | Jason13201/Lets-tidy-up-this-space | ca815f1e8227e7b60c9047c7a36d05355616021b | [
"MIT"
] | 1 | 2021-03-15T04:35:18.000Z | 2021-03-15T04:35:18.000Z | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField, BooleanField, DecimalField
from wtforms.fields.html5 import EmailField
from wtforms.validators import DataRequired, Length, Email, EqualTo
class RegistrationForm(FlaskForm):
username = StringField(
"Username",
... | 30.55814 | 87 | 0.649163 |
79472f3d8a59a37784856594f2e3a95c926e8dcb | 268 | py | Python | Exercises/Exercise1.py | davidavg/OOP_Python | ca4e8376a50b9c81b5ac18c466bd8d147bdbe679 | [
"MIT"
] | null | null | null | Exercises/Exercise1.py | davidavg/OOP_Python | ca4e8376a50b9c81b5ac18c466bd8d147bdbe679 | [
"MIT"
] | null | null | null | Exercises/Exercise1.py | davidavg/OOP_Python | ca4e8376a50b9c81b5ac18c466bd8d147bdbe679 | [
"MIT"
] | null | null | null | '''
Created on Aug 13, 2018
@author: david avalos
'''
class Calculator:
def addition(self, a, b):
print(a+b)
def subtraction(self, a, b):
print(a-b)
obj = Calculator()
obj.addition(5,2)
obj.subtraction(5,2)
| 14.888889 | 32 | 0.533582 |
79472fcbf7f028caab53f1c890fa17d95483484a | 1,029 | py | Python | data-science_interview_problems/app/forms.py | Max1993Liu/data-science-interview-problems | e71eed547f46bc2652722ed1f006be1ec6acf03c | [
"MIT"
] | null | null | null | data-science_interview_problems/app/forms.py | Max1993Liu/data-science-interview-problems | e71eed547f46bc2652722ed1f006be1ec6acf03c | [
"MIT"
] | null | null | null | data-science_interview_problems/app/forms.py | Max1993Liu/data-science-interview-problems | e71eed547f46bc2652722ed1f006be1ec6acf03c | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField, SubmitField
from wtforms.validators import DataRequired, EqualTo
from wtforms import ValidationError
from app.models import User
class LoginForm(FlaskForm):
username = StringField("Username", validators=[DataRequired()])
... | 36.75 | 95 | 0.781341 |
794730b5e6382952686cfa0e4cd6ef3754920115 | 2,209 | py | Python | modules/python/test/test_houghcircles.py | paleozogt/opencv | c4b158ff91b2acb33252f4169ef0b24e0427e3e9 | [
"BSD-3-Clause"
] | 6 | 2018-03-08T09:06:31.000Z | 2021-05-16T22:07:34.000Z | modules/python/test/test_houghcircles.py | LiangYue1981816/ComputeVision-opencv | 1f214d232daa6f6a4d0f297327e656f638e8e13a | [
"BSD-3-Clause"
] | 1 | 2019-10-10T22:25:52.000Z | 2019-10-10T22:25:52.000Z | modules/python/test/test_houghcircles.py | LiangYue1981816/ComputeVision-opencv | 1f214d232daa6f6a4d0f297327e656f638e8e13a | [
"BSD-3-Clause"
] | 11 | 2016-03-20T18:32:24.000Z | 2020-12-31T21:22:22.000Z | #!/usr/bin/python
'''
This example illustrates how to use cv2.HoughCircles() function.
'''
# Python 2/3 compatibility
from __future__ import print_function
import cv2
import numpy as np
import sys
from numpy import pi, sin, cos
from tests_common import NewOpenCVTests
def circleApproximation(circle):
nPoints =... | 25.988235 | 99 | 0.574468 |
794730e959856d88fa1d09587f498ac7b3ec2ede | 76,997 | py | Python | tests/unit/gapic/compute_v1/test_backend_buckets.py | georgiyekkert/python-compute | d128efbb3bf10af9b41e55b20aaa8080b3221e77 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/compute_v1/test_backend_buckets.py | georgiyekkert/python-compute | d128efbb3bf10af9b41e55b20aaa8080b3221e77 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/compute_v1/test_backend_buckets.py | georgiyekkert/python-compute | d128efbb3bf10af9b41e55b20aaa8080b3221e77 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 38.672526 | 116 | 0.689079 |
794732c144f962df5c34da9e89f7fe633ccfc5ce | 1,295 | py | Python | network.py | priyavrat-misra/fashion-mnist | 9e9d18612b7556dbff5849be87cb35c296993d9e | [
"MIT"
] | 1 | 2021-12-09T06:58:28.000Z | 2021-12-09T06:58:28.000Z | network.py | priyavrat-misra/fashion-mnist | 9e9d18612b7556dbff5849be87cb35c296993d9e | [
"MIT"
] | null | null | null | network.py | priyavrat-misra/fashion-mnist | 9e9d18612b7556dbff5849be87cb35c296993d9e | [
"MIT"
] | null | null | null | import torch.nn as nn
class Network(nn.Module):
def __init__(self):
super().__init__()
self.layer1 = nn.Sequential(
nn.Conv2d(in_channels=1, out_channels=8,
kernel_size=5, stride=1, padding=2),
nn.BatchNorm2d(num_features=8),
nn.ReLU(),
... | 30.116279 | 61 | 0.522008 |
794733b463f811a61585dbc78228d7c99d4a57f7 | 1,400 | py | Python | custom_components/smartthinq/__init__.py | csirk51/hass-smartthinq | bd59f776b445c4c0d5626a836711d3fe1d85edc2 | [
"MIT"
] | null | null | null | custom_components/smartthinq/__init__.py | csirk51/hass-smartthinq | bd59f776b445c4c0d5626a836711d3fe1d85edc2 | [
"MIT"
] | null | null | null | custom_components/smartthinq/__init__.py | csirk51/hass-smartthinq | bd59f776b445c4c0d5626a836711d3fe1d85edc2 | [
"MIT"
] | null | null | null | """
Support for LG Smartthinq device.
This is made for korean only.
If you want to apply other county devices, you should change the code little bit.
"""
import logging
import wideq
import voluptuous as vol
from homeassistant.const import (
CONF_TOKEN, )
import homeassistant.helpers.config_validation as cv
from h... | 22.222222 | 81 | 0.682143 |
794733d7b532de6b215695d5b56304168386af8d | 14,510 | py | Python | lib/python2.7/site-packages/pelican/settings.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | lib/python2.7/site-packages/pelican/settings.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | lib/python2.7/site-packages/pelican/settings.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import six
import copy
import inspect
import os
import locale
import logging
try:
# SourceFileLoader is the recommended way in 3.3+
from importlib.machinery import SourceFileLoader
load_source = lambda name, path: SourceFileLo... | 37.984293 | 132 | 0.617298 |
794734326ea80688441217658443c159a118c41b | 33,961 | py | Python | cinder/volume/drivers/rbd.py | oodrive/cinder | 40b43d6698128ab26b056586e0a5c5e818e21c11 | [
"Apache-2.0"
] | 1 | 2015-11-25T10:18:28.000Z | 2015-11-25T10:18:28.000Z | cinder/volume/drivers/rbd.py | oodrive/cinder | 40b43d6698128ab26b056586e0a5c5e818e21c11 | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/rbd.py | oodrive/cinder | 40b43d6698128ab26b056586e0a5c5e818e21c11 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 OpenStack Foundation
#
# 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 l... | 39.35226 | 79 | 0.576308 |
79473461c93af9057724f218135752c6c9a50273 | 26,904 | py | Python | src/typhoonae/redis/tests/test_datastore_redis.py | ukris/typhoonae.redis | ef43f4448bfc59e643b6344064759633dbbb1ab6 | [
"Apache-2.0"
] | null | null | null | src/typhoonae/redis/tests/test_datastore_redis.py | ukris/typhoonae.redis | ef43f4448bfc59e643b6344064759633dbbb1ab6 | [
"Apache-2.0"
] | null | null | null | src/typhoonae/redis/tests/test_datastore_redis.py | ukris/typhoonae.redis | ef43f4448bfc59e643b6344064759633dbbb1ab6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2010 Tobias Rodäbel
#
# 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 ... | 30.853211 | 80 | 0.583408 |
794734eceab228f17ef1907a17686ea853aa3b2c | 4,636 | py | Python | tests/tests_preprocessing/test_preprocessing_categorical_integers.py | michaelneale/mljar-supervised | 8d1b5fdd56e994a7f13ec5f6d2033830744f3d6f | [
"MIT"
] | 1 | 2020-03-13T09:44:41.000Z | 2020-03-13T09:44:41.000Z | tests/tests_preprocessing/test_preprocessing_categorical_integers.py | wambagilles/mljar-supervised | 3192c91979b31810b249767a63e60ee74068c668 | [
"MIT"
] | null | null | null | tests/tests_preprocessing/test_preprocessing_categorical_integers.py | wambagilles/mljar-supervised | 3192c91979b31810b249767a63e60ee74068c668 | [
"MIT"
] | 1 | 2021-03-12T05:48:45.000Z | 2021-03-12T05:48:45.000Z | import unittest
import tempfile
import numpy as np
import pandas as pd
from supervised.preprocessing.preprocessing_categorical import PreprocessingCategorical
class PreprocessingCategoricalIntegersTest(unittest.TestCase):
def test_constructor_preprocessing_categorical(self):
"""
Check if Prepr... | 35.937984 | 87 | 0.561044 |
7947351288e440875dd9116b3060ca2dde6d9779 | 12,552 | py | Python | examples/mmt_train_kmeans.py | Dingyuan-Zheng/ctf-UDA | 3e3c67f68d7eb0b52a16a259e5a77e153062c4fd | [
"MIT"
] | null | null | null | examples/mmt_train_kmeans.py | Dingyuan-Zheng/ctf-UDA | 3e3c67f68d7eb0b52a16a259e5a77e153062c4fd | [
"MIT"
] | null | null | null | examples/mmt_train_kmeans.py | Dingyuan-Zheng/ctf-UDA | 3e3c67f68d7eb0b52a16a259e5a77e153062c4fd | [
"MIT"
] | null | null | null | from __future__ import print_function, absolute_import
import argparse
import os.path as osp
import random
import numpy as np
import sys
from sklearn.cluster import KMeans
from sklearn.preprocessing import normalize
import torch
from torch import nn
from torch.backends import cudnn
from torch.utils.data import DataLo... | 44.828571 | 138 | 0.661648 |
7947363d31f128ce3314e0feec37c2c15fa8503d | 7,881 | py | Python | tests/msg_hz_test.py | suet-lee/mycelium | db83cd3ab00697f28b2def2cebcdef52698fdd92 | [
"Apache-2.0"
] | 6 | 2021-05-23T17:36:02.000Z | 2022-01-21T20:34:17.000Z | tests/msg_hz_test.py | suet-lee/mycelium | db83cd3ab00697f28b2def2cebcdef52698fdd92 | [
"Apache-2.0"
] | null | null | null | tests/msg_hz_test.py | suet-lee/mycelium | db83cd3ab00697f28b2def2cebcdef52698fdd92 | [
"Apache-2.0"
] | 1 | 2021-06-17T20:35:10.000Z | 2021-06-17T20:35:10.000Z | #!/usr/bin/env python3
# Set MAVLink protocol to 2.
import os
os.environ["MAVLINK20"] = "1"
import time
import threading
import traceback
import logging
from apscheduler.schedulers.background import BackgroundScheduler
from mycelium.components import RedisBridge, Connector
from mycelium_utils import Scripter, utils,... | 44.778409 | 169 | 0.544601 |
79473741de85ba6e6a2fc642ec790b1794a14534 | 5,944 | py | Python | nyflow/core_simple.py | namyoungkim/NyFlow | d6c749e5a88e1ef3b6c73a1f927ab83abe1d7a3f | [
"MIT"
] | null | null | null | nyflow/core_simple.py | namyoungkim/NyFlow | d6c749e5a88e1ef3b6c73a1f927ab83abe1d7a3f | [
"MIT"
] | 1 | 2021-09-22T15:34:31.000Z | 2021-09-22T15:34:31.000Z | nyflow/core_simple.py | namyoungkim/nyflow | d6c749e5a88e1ef3b6c73a1f927ab83abe1d7a3f | [
"MIT"
] | null | null | null | import weakref
import numpy as np
import contextlib
# =============================================================================
# Config
# =============================================================================
class Config:
enable_backprop = True
@contextlib.contextmanager
def using_config(name, valu... | 22.096654 | 79 | 0.4857 |
794737a97c176c9f701f94c89a9d3fa6ea1cba13 | 601 | py | Python | python/cartpole1.py | lusing/mljs | 4c708bb8e0759803ed94ead3e9cfadc3a97d6ed8 | [
"MIT"
] | null | null | null | python/cartpole1.py | lusing/mljs | 4c708bb8e0759803ed94ead3e9cfadc3a97d6ed8 | [
"MIT"
] | null | null | null | python/cartpole1.py | lusing/mljs | 4c708bb8e0759803ed94ead3e9cfadc3a97d6ed8 | [
"MIT"
] | null | null | null | import gym
def cartpole():
environment = gym.make('CartPole-v1')
environment.reset()
for i in range(1000):
# environment.render()
action = environment.action_space.sample()
observation, reward, done, info = environment.step(action)
print("Step {}:".format(i))
print("... | 28.619048 | 66 | 0.577371 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.