hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 4 247 | max_issues_repo_name stringlengths 4 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 4 247 | max_forks_repo_name stringlengths 4 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.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9400ae0c2a63c58b7f5acadb97e29bed0e18a486 | 37 | py | Python | ctaAnalysis/tools/__init__.py | sergiohcdna/ctaAnalysis | 1e4924fafa7e90f7d31abc5a60c2a8da796d95ad | [
"BSD-3-Clause"
] | null | null | null | ctaAnalysis/tools/__init__.py | sergiohcdna/ctaAnalysis | 1e4924fafa7e90f7d31abc5a60c2a8da796d95ad | [
"BSD-3-Clause"
] | 13 | 2021-02-05T00:19:53.000Z | 2021-11-23T03:54:12.000Z | ctadmtool/tools/__init__.py | sergiohcdna/ctadmtool | d509d51033855de5fb54d0c9be5fda84a2ed629e | [
"BSD-3-Clause"
] | 3 | 2020-12-16T15:26:57.000Z | 2021-08-17T17:23:40.000Z | # Sergio, 2020
__all__ = ['misc']
| 9.25 | 18 | 0.567568 | # Sergio, 2020
__all__ = ['misc']
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
325c5c8856fcecf4145f1fd3a4d98ecc4b6316f0 | 3,208 | py | Python | dlkit/handcar/id/objects.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 2 | 2018-02-23T12:16:11.000Z | 2020-10-08T17:54:24.000Z | dlkit/handcar/id/objects.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 87 | 2017-04-21T18:57:15.000Z | 2021-12-13T19:43:57.000Z | dlkit/handcar/id/objects.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 1 | 2018-03-01T16:44:25.000Z | 2018-03-01T16:44:25.000Z | # -*- coding: utf-8 -*-
# This module contains all the Object classes used by the MIT Core Concept
# Catalog (MC3) Handcar based implementation of the OSID Id Service.
from .. import settings
INVALID = 0
VALID = 1
| 34.869565 | 139 | 0.61783 | # -*- coding: utf-8 -*-
# This module contains all the Object classes used by the MIT Core Concept
# Catalog (MC3) Handcar based implementation of the OSID Id Service.
from ...abstract_osid.id import objects as abc_id_objects
from ..osid import objects as osid_objects
from .. import settings
from ..primitives import ... | 0 | 0 | 0 | 2,679 | 0 | 0 | 0 | 200 | 112 |
8c56c7778e3d3ca390901a23125a7ad8c3c8efc4 | 295 | py | Python | surnames/constants.py | mleila/surname_predictor | 76ad33bd8c5a0bf3e10c6f7808d5deb2b7e75558 | [
"MIT"
] | null | null | null | surnames/constants.py | mleila/surname_predictor | 76ad33bd8c5a0bf3e10c6f7808d5deb2b7e75558 | [
"MIT"
] | null | null | null | surnames/constants.py | mleila/surname_predictor | 76ad33bd8c5a0bf3e10c6f7808d5deb2b7e75558 | [
"MIT"
] | null | null | null | # dataframe column names
SURNAME = 'surname'
ORIGIN = 'nationality'
# split types
TRAIN = 'train'
VALID = 'val'
TEST = 'test'
# special tokens
START_TOKEN = '<start>'
END_TOKEN = '<end>'
MASK_TOKEN = '<mask>'
UNK_TOKEN = '<unk>'
# data dictionary keys
X_DATA = 'x_data'
Y_TARGET = 'y_target'
| 15.526316 | 24 | 0.677966 | # dataframe column names
SURNAME = 'surname'
ORIGIN = 'nationality'
# split types
TRAIN = 'train'
VALID = 'val'
TEST = 'test'
# special tokens
START_TOKEN = '<start>'
END_TOKEN = '<end>'
MASK_TOKEN = '<mask>'
UNK_TOKEN = '<unk>'
# data dictionary keys
X_DATA = 'x_data'
Y_TARGET = 'y_target'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
016a58877a8d91c56314f3013d344fa95000512f | 1,931 | py | Python | src/qfit/remove_duplicates.py | sakibh/qfit-3.0 | fcc9d56b21d2d16ffb2796da0d48003649a31909 | [
"MIT"
] | null | null | null | src/qfit/remove_duplicates.py | sakibh/qfit-3.0 | fcc9d56b21d2d16ffb2796da0d48003649a31909 | [
"MIT"
] | null | null | null | src/qfit/remove_duplicates.py | sakibh/qfit-3.0 | fcc9d56b21d2d16ffb2796da0d48003649a31909 | [
"MIT"
] | null | null | null | """Delete duplicate atom entries"""
| 31.655738 | 74 | 0.625583 | """Delete duplicate atom entries"""
import numpy as np
import argparse
import logging
import os
import sys
import time
from string import ascii_uppercase
from . import Structure
from .structure import residue_type
from .structure.residue import _RotamerResidue
from .structure.rotamers import ROTAMERS
def parse_args():... | 0 | 0 | 0 | 0 | 0 | 1,582 | 0 | 24 | 288 |
71cfdf0afcbd0f1da08e9e27344b801abf853d7f | 1,641 | py | Python | doc/scripts/cts.py | joepatmckenna/fem | 18b3e3cb0b83f7a4eb464c84f09f00673ea2fcb3 | [
"MIT"
] | null | null | null | doc/scripts/cts.py | joepatmckenna/fem | 18b3e3cb0b83f7a4eb464c84f09f00673ea2fcb3 | [
"MIT"
] | null | null | null | doc/scripts/cts.py | joepatmckenna/fem | 18b3e3cb0b83f7a4eb464c84f09f00673ea2fcb3 | [
"MIT"
] | null | null | null | from scipy.special import erf as erf
import matplotlib.pyplot as plt
import numpy as np
n = 20
dt, T = 1., int(1e4)
l = np.int(np.ceil(T / dt))
sqrt_dt = np.sqrt(dt)
sqrt_2 = np.sqrt(2)
rat = sqrt_dt / sqrt_2
w = np.random.uniform(-0.5, 0.5, size=(n, n))
w[np.diag_indices_from(w)] -= 2.0
w /= np.sqrt(n)
x = np.zero... | 20.012195 | 79 | 0.549055 | from scipy.linalg import solve
from scipy.special import erf as erf
import matplotlib.pyplot as plt
import numpy as np
n = 20
dt, T = 1., int(1e4)
l = np.int(np.ceil(T / dt))
sqrt_dt = np.sqrt(dt)
sqrt_2 = np.sqrt(2)
rat = sqrt_dt / sqrt_2
w = np.random.uniform(-0.5, 0.5, size=(n, n))
w[np.diag_indices_from(w)] -= 2... | 0 | 0 | 0 | 0 | 0 | 518 | 0 | 9 | 45 |
47153e4f3910187d299ca8e599918d5ac05186be | 251 | py | Python | dataview/testapi/views.py | srkama/haysolr | 0195f5fc113e416a4cabf3f5ceb1ba55901e4aaa | [
"Apache-2.0"
] | null | null | null | dataview/testapi/views.py | srkama/haysolr | 0195f5fc113e416a4cabf3f5ceb1ba55901e4aaa | [
"Apache-2.0"
] | null | null | null | dataview/testapi/views.py | srkama/haysolr | 0195f5fc113e416a4cabf3f5ceb1ba55901e4aaa | [
"Apache-2.0"
] | null | null | null | # Create your views here.
| 22.818182 | 60 | 0.737052 | # Create your views here.
from django.shortcuts import render
from .froms import SampleSearchForm
def index(request):
form = SampleSearchForm(request.GET)
results = form.search()
return render(request,'index.html', {'samples':results})
| 0 | 0 | 0 | 0 | 0 | 128 | 0 | 28 | 67 |
4e1933358b9560b15caf019fc50fb29bbee92a56 | 547 | py | Python | structure_api/avg_df.py | vanducng/learning-spark | b7e93361b1ae37fbcd718c4d7034b8355b65fd94 | [
"MIT"
] | null | null | null | structure_api/avg_df.py | vanducng/learning-spark | b7e93361b1ae37fbcd718c4d7034b8355b65fd94 | [
"MIT"
] | null | null | null | structure_api/avg_df.py | vanducng/learning-spark | b7e93361b1ae37fbcd718c4d7034b8355b65fd94 | [
"MIT"
] | null | null | null | from pyspark.sql import SparkSession
from pyspark.sql.functions import avg
spark = SparkSession\
.builder\
.appName("SparkApp")\
.master("local[*]")\
.getOrCreate()
# Create a DataFrame using SparkSession
data_df = spark.createDataFrame([("Brooke", 20), ("Denny", 31), ("Jules", 30), ("... | 32.176471 | 124 | 0.66362 | from pyspark.sql import SparkSession
from pyspark.sql.functions import avg
spark = SparkSession\
.builder\
.appName("SparkApp")\
.master("local[*]")\
.getOrCreate()
# Create a DataFrame using SparkSession
data_df = spark.createDataFrame([("Brooke", 20), ("Denny", 31), ("Jules", 30), ("... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a663960c1739bc8ef160b45aee91ec709b69de9f | 2,950 | py | Python | mobile_platform/scan_black/test.py | tkuiclab/wrs2018 | d7556a09d265f17ec461571b73271a4d97df397c | [
"MIT"
] | 3 | 2020-02-17T12:56:22.000Z | 2020-09-30T11:17:03.000Z | mobile_platform/scan_black/test.py | i-am-neet/wrs2020 | 3b388eac6832f2559c59fa0c1f7732589c5eff0c | [
"MIT"
] | 12 | 2019-05-14T12:24:02.000Z | 2020-03-24T14:00:48.000Z | mobile_platform/scan_black/test.py | i-am-neet/wrs2020 | 3b388eac6832f2559c59fa0c1f7732589c5eff0c | [
"MIT"
] | 8 | 2020-02-17T12:55:59.000Z | 2021-07-22T12:24:15.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-+
import sys
sys.path.insert(1,'/usr/local/lib/python3.5/dist-packages')
INNER_X = 100
INNER_Y = 30
OUTER_X = 150
OUTER_Y = 60
RANGE = 20
if __name__ == "__main__":
main() | 33.522727 | 121 | 0.477966 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-+
import sys
sys.path.insert(1,'/usr/local/lib/python3.5/dist-packages')
import numpy as np
import cv2
INNER_X = 100
INNER_Y = 30
OUTER_X = 150
OUTER_Y = 60
RANGE = 20
def main():
cap = cv2.VideoCapture(0)
while(True):
# Capture frame... | 0 | 0 | 0 | 0 | 0 | 2,654 | 0 | -14 | 73 |
d883291bc2bbbb898330f761e0a95b399364a7cc | 2,618 | py | Python | isplutils/data_siamese.py | 18845635368/multicard | 7e16dc70b69efde5e462ba49916adbea32aa6f53 | [
"Apache-2.0"
] | null | null | null | isplutils/data_siamese.py | 18845635368/multicard | 7e16dc70b69efde5e462ba49916adbea32aa6f53 | [
"Apache-2.0"
] | null | null | null | isplutils/data_siamese.py | 18845635368/multicard | 7e16dc70b69efde5e462ba49916adbea32aa6f53 | [
"Apache-2.0"
] | null | null | null | """
Video Face Manipulation Detection Through Ensemble of CNNs
Image and Sound Processing Lab - Politecnico di Milano
Nicol Bonettini
Edoardo Daniele Cannas
Sara Mandelli
Luca Bondi
Paolo Bestagini
"""
| 33.139241 | 119 | 0.618029 | """
Video Face Manipulation Detection Through Ensemble of CNNs
Image and Sound Processing Lab - Politecnico di Milano
Nicolò Bonettini
Edoardo Daniele Cannas
Sara Mandelli
Luca Bondi
Paolo Bestagini
"""
from typing import List
import albumentations as A
import pandas as pd
from albumentations.pytorch import ToTensor... | 2 | 0 | 0 | 2,197 | 0 | 0 | 0 | 80 | 135 |
150dc44042c03b128ac4b49331e9ff6154ff9474 | 390 | py | Python | src/nlplib/core/base.py | rectangletangle/nlplib | 7dcc0daf050a73c03b7d7f0257ad0b862586a6e3 | [
"BSD-2-Clause"
] | 1 | 2015-11-18T12:59:52.000Z | 2015-11-18T12:59:52.000Z | src/nlplib/core/base.py | rectangletangle/nlplib | 7dcc0daf050a73c03b7d7f0257ad0b862586a6e3 | [
"BSD-2-Clause"
] | null | null | null | src/nlplib/core/base.py | rectangletangle/nlplib | 7dcc0daf050a73c03b7d7f0257ad0b862586a6e3 | [
"BSD-2-Clause"
] | null | null | null |
__all__ = ['Base']
| 24.375 | 109 | 0.684615 |
from nlplib.general.represent import represented_nonliterally
__all__ = ['Base']
class Base :
''' A base class for all of the core classes. '''
def __repr__ (self, *args, **kw) :
# This method can take arguments so subclasses can use the same logic for building their own specific
# represen... | 0 | 0 | 0 | 282 | 0 | 0 | 0 | 40 | 46 |
dfcbcd2d73ef45a209524fcae2dd34a83f28b792 | 12,118 | py | Python | mi/dataset/parser/test/test_presf_abc_dcl.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/parser/test/test_presf_abc_dcl.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/parser/test/test_presf_abc_dcl.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
"""
@package mi.dataset.parser.test.test_presf_abc_dcl
@file marine-integrations/mi/dataset/parser/test/test_presf_abc_dcl.py
@author Christopher Fortin
@brief Test code for a presf_abc_dcl data parser
"""
import os
from mi.core.log import get_logger
log = get_logger()
from mi.dataset.test.te... | 40.259136 | 102 | 0.598531 | #!/usr/bin/env python
"""
@package mi.dataset.parser.test.test_presf_abc_dcl
@file marine-integrations/mi/dataset/parser/test/test_presf_abc_dcl.py
@author Christopher Fortin
@brief Test code for a presf_abc_dcl data parser
"""
import os
from nose.plugins.attrib import attr
from mi.core.log import get_logger
log =... | 0 | 10,907 | 0 | 0 | 0 | 0 | 0 | 430 | 113 |
74eccbf460275ab0094db55c36be373789e51107 | 4,674 | py | Python | wal_e/log_help.py | fdr/heroku-wal-e | 0145e81611e06328de228d2ac4820f3afae2f5c1 | [
"BSD-3-Clause"
] | 1 | 2022-02-15T18:18:43.000Z | 2022-02-15T18:18:43.000Z | wal_e/log_help.py | fdr/heroku-wal-e | 0145e81611e06328de228d2ac4820f3afae2f5c1 | [
"BSD-3-Clause"
] | null | null | null | wal_e/log_help.py | fdr/heroku-wal-e | 0145e81611e06328de228d2ac4820f3afae2f5c1 | [
"BSD-3-Clause"
] | null | null | null | """
A module to assist with using the Python logging module
"""
import errno
import logging
import logging.handlers
import os
import time
def configure(*args, **kwargs):
"""
Borrowed from logging.basicConfig
Uses the UTCFormatter instead of the regular Formatter
Also, opts you into syslogging.
... | 29.961538 | 80 | 0.60077 | """
A module to assist with using the Python logging module
"""
import errno
import logging
import logging.handlers
import os
import time
class UTCFormatter(logging.Formatter):
# Undocumented, seemingly still in 2.7 (see
# http://od-eon.com/blogs/stefan/logging-utc-timestamps-python/)
converter = time.... | 0 | 272 | 0 | 2,673 | 0 | 0 | 0 | 0 | 46 |
5210b1901d945e9a11aa2f5a6efe75f6dbdb368b | 12,560 | py | Python | aether-client-library/aether/client/__init__.py | eHealthAfrica/aether | 6845d7eeebd4ae57332f73d74db3617e00032204 | [
"Apache-2.0"
] | 14 | 2018-08-09T20:57:16.000Z | 2020-10-11T12:22:18.000Z | aether-client-library/aether/client/__init__.py | eHealthAfrica/aether | 6845d7eeebd4ae57332f73d74db3617e00032204 | [
"Apache-2.0"
] | 148 | 2018-07-24T10:52:29.000Z | 2022-02-10T09:06:44.000Z | aether-client-library/aether/client/__init__.py | eHealthAfrica/aether | 6845d7eeebd4ae57332f73d74db3617e00032204 | [
"Apache-2.0"
] | 6 | 2018-07-25T13:33:10.000Z | 2019-09-23T03:02:09.000Z | # Copyright (C) 2019 by eHealth Africa : http://www.eHealthAfrica.org
#
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with
# the License. Y... | 39.873016 | 95 | 0.621258 | # Copyright (C) 2019 by eHealth Africa : http://www.eHealthAfrica.org
#
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with
# the License. Y... | 0 | 0 | 0 | 10,169 | 0 | 408 | 0 | 207 | 358 |
8c8cfd328504be103ff94c746740ccfadc6e6ba8 | 6,574 | py | Python | src/twcrawl/crawler.py | hohl/twcrawl | d4979840f4a9e5dc8683a617aeacf7e8a6a23045 | [
"MIT"
] | null | null | null | src/twcrawl/crawler.py | hohl/twcrawl | d4979840f4a9e5dc8683a617aeacf7e8a6a23045 | [
"MIT"
] | null | null | null | src/twcrawl/crawler.py | hohl/twcrawl | d4979840f4a9e5dc8683a617aeacf7e8a6a23045 | [
"MIT"
] | null | null | null | from typing import TypeVar
T = TypeVar("T")
| 36.320442 | 94 | 0.607241 | import asyncio
import json
import logging
import sys
from abc import ABC, abstractmethod
from typing import List, TypeVar, Generic, Union, NoReturn, Iterator, Iterable
from sqlalchemy import and_, or_
from .models import session_scope, Session
from .twitter import *
T = TypeVar("T")
class BaseCrawler(ABC, Generic[T]... | 3 | 213 | 1,631 | 4,300 | 0 | 0 | 0 | 64 | 314 |
e9a1306d6a782d59aad5f7711f4de67d6c9b0f65 | 4,057 | py | Python | doop/tle.py | nimbus-bp-1729/doop | 376d57b9c3134b08b78fdf872c65b2d494385ee7 | [
"MIT"
] | null | null | null | doop/tle.py | nimbus-bp-1729/doop | 376d57b9c3134b08b78fdf872c65b2d494385ee7 | [
"MIT"
] | null | null | null | doop/tle.py | nimbus-bp-1729/doop | 376d57b9c3134b08b78fdf872c65b2d494385ee7 | [
"MIT"
] | null | null | null | from math import pi, pow
from datetime import datetime, timedelta, timezone
from doop.constants import Earth
from collections import namedtuple
from enum import IntFlag
ID = namedtuple("ID", "launch_year launch_number piece")
Object = namedtuple("Object", "name number classification")
EphemerisType = IntFlag("Epheme... | 26.00641 | 103 | 0.559527 | from math import pi, pow
from datetime import datetime, timedelta, timezone
from doop.constants import Earth
from collections import namedtuple
from enum import IntFlag
ID = namedtuple("ID", "launch_year launch_number piece")
Object = namedtuple("Object", "name number classification")
EphemerisType = IntFlag("Epheme... | 0 | 0 | 0 | 0 | 0 | 284 | 0 | 0 | 46 |
3d7dd15c50610db8a0d116ee9bdca1196589e3f8 | 771 | py | Python | embeds/bin.py | kaniblu/vhda | 35941097ef552568c29f66cc55d8ce1927f34978 | [
"MIT"
] | 3 | 2021-01-12T05:43:20.000Z | 2021-03-05T17:03:06.000Z | embeds/bin.py | kaniblu/vhda | 35941097ef552568c29f66cc55d8ce1927f34978 | [
"MIT"
] | null | null | null | embeds/bin.py | kaniblu/vhda | 35941097ef552568c29f66cc55d8ce1927f34978 | [
"MIT"
] | null | null | null | __all__ = ["BinaryEmbeddings"]
| 21.416667 | 77 | 0.671855 | __all__ = ["BinaryEmbeddings"]
from dataclasses import dataclass, field
import numpy as np
from gensim.models import KeyedVectors
from .embeddings import Embeddings
@dataclass
class BinaryEmbeddings(Embeddings):
path: str
_w2v: KeyedVectors = field(init=False, default=None)
def __post_init__(self):
... | 0 | 579 | 0 | 0 | 0 | 0 | 0 | 46 | 114 |
ae1da8ecac817ec988e5a00fe09bc2fb5b5778e3 | 3,856 | py | Python | sw/1.0/ostur_controller/Ostur.py | alvarop/ostur | 6e56a3f53ac3ca09c12586cd35d0b829dd3d6e78 | [
"MIT"
] | 7 | 2017-11-30T20:22:02.000Z | 2021-01-03T02:22:52.000Z | sw/1.0/ostur_controller/Ostur.py | alvarop/ostur | 6e56a3f53ac3ca09c12586cd35d0b829dd3d6e78 | [
"MIT"
] | null | null | null | sw/1.0/ostur_controller/Ostur.py | alvarop/ostur | 6e56a3f53ac3ca09c12586cd35d0b829dd3d6e78 | [
"MIT"
] | 1 | 2018-02-26T02:53:14.000Z | 2018-02-26T02:53:14.000Z | '''
Ostur Cheese Cave Controller Logger
'''
| 29.212121 | 75 | 0.571317 | '''
Ostur Cheese Cave Controller Logger
'''
import serial
import sys
import time
from datetime import datetime
class InvalidRelayException(Exception):
pass
class Ostur:
DEBUG = False
# Hardcoding until we can read values back from device
__CMD_MAX_STR_LEN = 1024
def __init__(self, serial_de... | 0 | 0 | 0 | 3,695 | 0 | 0 | 0 | -21 | 135 |
13e16d24168aa4bc3a5045fef015708e7fefe50a | 2,590 | py | Python | src/python/gudhi/point_cloud/dtm.py | yuichi-ike/gudhi-devel | 97e889f34e929f3c2306803b6c37b57926bd1245 | [
"MIT"
] | null | null | null | src/python/gudhi/point_cloud/dtm.py | yuichi-ike/gudhi-devel | 97e889f34e929f3c2306803b6c37b57926bd1245 | [
"MIT"
] | null | null | null | src/python/gudhi/point_cloud/dtm.py | yuichi-ike/gudhi-devel | 97e889f34e929f3c2306803b6c37b57926bd1245 | [
"MIT"
] | null | null | null | # This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
# See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
# Author(s): Marc Glisse
#
# Copyright (C) 2020 Inria
#
# Modification(s):
# - YYYY/MM Author: Description of the modification... | 36.478873 | 112 | 0.599228 | # This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
# See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
# Author(s): Marc Glisse
#
# Copyright (C) 2020 Inria
#
# Modification(s):
# - YYYY/MM Author: Description of the modification... | 0 | 0 | 0 | 2,118 | 0 | 0 | 0 | 13 | 46 |
aafa8b1b4621d4e3e6267e970f97d0d9477edc5e | 161 | py | Python | 1 Semestre/Analise e Projeto de Algoritmos (Mauricio)/Aula 8 Estrutura de Controle (Repeticao)/Exercicio 3.py | LukasHeidern/Univem-Aulas | 3e7f24eb90a0bfe2af8d49ead958cf4d7072257c | [
"MIT"
] | null | null | null | 1 Semestre/Analise e Projeto de Algoritmos (Mauricio)/Aula 8 Estrutura de Controle (Repeticao)/Exercicio 3.py | LukasHeidern/Univem-Aulas | 3e7f24eb90a0bfe2af8d49ead958cf4d7072257c | [
"MIT"
] | null | null | null | 1 Semestre/Analise e Projeto de Algoritmos (Mauricio)/Aula 8 Estrutura de Controle (Repeticao)/Exercicio 3.py | LukasHeidern/Univem-Aulas | 3e7f24eb90a0bfe2af8d49ead958cf4d7072257c | [
"MIT"
] | null | null | null |
num = int(input("Digite o numero:"))
print(f"Divisores de {num} -",end=" ")
for i in range(1, (num//2) + 1):
if num % i == 0:
print(f"{i}",end=" ") | 23 | 38 | 0.503106 |
num = int(input("Digite o numero:"))
print(f"Divisores de {num} -",end=" ")
for i in range(1, (num//2) + 1):
if num % i == 0:
print(f"{i}",end=" ") | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
95294ab081fc0b2769f2d33d172149c71b9fc808 | 1,878 | py | Python | net_cut/net_cut.py | viccsneto/python_ethical_hacking | a16765b3c18272dcb61a77cc14e78431f626eb11 | [
"MIT"
] | null | null | null | net_cut/net_cut.py | viccsneto/python_ethical_hacking | a16765b3c18272dcb61a77cc14e78431f626eb11 | [
"MIT"
] | null | null | null | net_cut/net_cut.py | viccsneto/python_ethical_hacking | a16765b3c18272dcb61a77cc14e78431f626eb11 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import optparse
DEFAULT_QUEUE_NUM = 0
exit_code = 0
dropped_packet_count = 0
parser = optparse.OptionParser()
parser.add_option("-q", "--queue-num", dest="queue_num", default=DEFAULT_QUEUE_NUM, help="IPTables Queue Num")
parser.add_option("-s", "--start-queue", dest="start_queue", action="store... | 31.830508 | 143 | 0.722577 | #!/usr/bin/env python3
import subprocess
import netfilterqueue
import sys
import optparse
DEFAULT_QUEUE_NUM = 0
exit_code = 0
dropped_packet_count = 0
parser = optparse.OptionParser()
parser.add_option("-q", "--queue-num", dest="queue_num", default=DEFAULT_QUEUE_NUM, help="IPTables Queue Num")
parser.add_option("-s",... | 0 | 0 | 0 | 0 | 0 | 772 | 0 | -15 | 185 |
e32c58c97c4ff497019f49a9328b267e2620aeed | 2,231 | py | Python | python/app/plugins/http/Weblogic/CVE_2019_2618.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 351 | 2020-02-26T05:23:26.000Z | 2022-03-26T12:39:19.000Z | python/app/plugins/http/Weblogic/CVE_2019_2618.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 15 | 2020-03-26T07:31:49.000Z | 2022-03-09T02:12:17.000Z | python/app/plugins/http/Weblogic/CVE_2019_2618.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 99 | 2020-02-28T07:30:46.000Z | 2022-03-16T16:41:09.000Z | #!/usr/bin/env python3
if __name__ == "__main__":
CVE_2019_2618 = CVE_2019_2618_BaseVerify('http://127.0.0.1:7001')
print(CVE_2019_2618.check())
| 36.57377 | 240 | 0.57463 | #!/usr/bin/env python3
from app.lib.utils.request import request
from app.lib.utils.common import get_useragent
class CVE_2019_2618_BaseVerify:
def __init__(self, url):
self.info = {
'name': 'CVE-2019-2618',
'description': 'Weblogic File Upload Vulnerability, 受影响版本: Weblogic 10.3.6... | 57 | 0 | 0 | 1,942 | 0 | 0 | 0 | 45 | 68 |
d449ed0b3fbab952801199527dde633eb20b3eaa | 10,631 | py | Python | rumi/processing/test_demand.py | prayas-energy/Rumi | fd7f0cf4eba08b4efa1a643217caff7f876fb394 | [
"Apache-2.0"
] | 1 | 2021-11-24T07:22:15.000Z | 2021-11-24T07:22:15.000Z | rumi/processing/test_demand.py | prayas-energy/Rumi | fd7f0cf4eba08b4efa1a643217caff7f876fb394 | [
"Apache-2.0"
] | null | null | null | rumi/processing/test_demand.py | prayas-energy/Rumi | fd7f0cf4eba08b4efa1a643217caff7f876fb394 | [
"Apache-2.0"
] | 1 | 2022-02-09T11:11:35.000Z | 2022-02-09T11:11:35.000Z | # Copyright 2021 Prayas Energy Group(https://www.prayaspune.org/peg/)
#
# 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... | 43.569672 | 84 | 0.508419 | # Copyright 2021 Prayas Energy Group(https://www.prayaspune.org/peg/)
#
# 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... | 0 | 0 | 0 | 0 | 0 | 9,447 | 0 | 26 | 524 |
072688e3c77eb588671a0b65a0cbdc9e38f17317 | 2,805 | py | Python | psycopg2-master/tests/test_errors.py | HabeshaQueen/Gallery-App | 17f7932e0db95a4750bcccf2302efc2c4cdbca4a | [
"Unlicense"
] | null | null | null | psycopg2-master/tests/test_errors.py | HabeshaQueen/Gallery-App | 17f7932e0db95a4750bcccf2302efc2c4cdbca4a | [
"Unlicense"
] | null | null | null | psycopg2-master/tests/test_errors.py | HabeshaQueen/Gallery-App | 17f7932e0db95a4750bcccf2302efc2c4cdbca4a | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# test_errors.py - unit test for psycopg2.errors module
#
# Copyright (C) 2018-2019 Daniele Varrazzo <daniele.varrazzo@gmail.com>
#
# psycopg2 is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software... | 32.241379 | 73 | 0.693405 | #!/usr/bin/env python
# test_errors.py - unit test for psycopg2.errors module
#
# Copyright (C) 2018-2019 Daniele Varrazzo <daniele.varrazzo@gmail.com>
#
# psycopg2 is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software... | 0 | 0 | 0 | 1,423 | 0 | 57 | 0 | 65 | 157 |
89514c5395dbbbfa4247af56024e46d7ae08d8d0 | 467 | py | Python | google_apis/build/check_internal.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | google_apis/build/check_internal.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 113 | 2015-05-04T09:58:14.000Z | 2022-01-31T19:35:03.000Z | google_apis/build/check_internal.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""google_api's auto-internal gyp integration.
Takes one argument, a path. Prints 1 if the path exists, 0 if not.
"""
from __fut... | 21.227273 | 72 | 0.715203 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""google_api's auto-internal gyp integration.
Takes one argument, a path. Prints 1 if the path exists, 0 if not.
"""
from __fut... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c0bcc4af37f58824d46a99b31f274f1522b50b73 | 1,994 | py | Python | coq/doc/tools/coqrst/notations/TacticNotationsVisitor.py | reichel3/TacTok | c344e76263de04311af8a0030c07aec95d87f71c | [
"MIT"
] | 7 | 2020-11-23T02:45:36.000Z | 2022-03-18T03:03:33.000Z | coq/doc/tools/coqrst/notations/TacticNotationsVisitor.py | reichel3/TacTok | c344e76263de04311af8a0030c07aec95d87f71c | [
"MIT"
] | 4 | 2021-02-23T03:03:51.000Z | 2021-11-13T00:07:38.000Z | coq/doc/tools/coqrst/notations/TacticNotationsVisitor.py | reichel3/TacTok | c344e76263de04311af8a0030c07aec95d87f71c | [
"MIT"
] | 2 | 2021-01-19T17:56:28.000Z | 2022-03-28T04:39:41.000Z | # Generated from TacticNotations.g by ANTLR 4.7
if __name__ is not None and "." in __name__:
from .TacticNotationsParser import TacticNotationsParser
else:
from TacticNotationsParser import TacticNotationsParser
# This class defines a complete generic visitor for a parse tree produced by TacticNotationsParser.... | 33.79661 | 99 | 0.768305 | # Generated from TacticNotations.g by ANTLR 4.7
from antlr4 import *
if __name__ is not None and "." in __name__:
from .TacticNotationsParser import TacticNotationsParser
else:
from TacticNotationsParser import TacticNotationsParser
# This class defines a complete generic visitor for a parse tree produced by T... | 0 | 0 | 0 | 1,600 | 0 | 0 | 0 | -1 | 45 |
62941d3702260ceaa3821d90ec0322e63b7e46c3 | 335 | py | Python | leetcode/1941_check_if_all_characters_have_equal_number_of_occurrences.py | jacquerie/leetcode | a05e6b832eb0e0740aaff7b2eb3109038ad404bf | [
"MIT"
] | 3 | 2018-05-10T09:56:49.000Z | 2020-11-07T18:09:42.000Z | leetcode/1941_check_if_all_characters_have_equal_number_of_occurrences.py | jacquerie/leetcode | a05e6b832eb0e0740aaff7b2eb3109038ad404bf | [
"MIT"
] | null | null | null | leetcode/1941_check_if_all_characters_have_equal_number_of_occurrences.py | jacquerie/leetcode | a05e6b832eb0e0740aaff7b2eb3109038ad404bf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
if __name__ == '__main__':
solution = Solution()
assert solution.areOccurrencesEqual('abcabc')
assert not solution.areOccurrencesEqual('aaabb')
| 20.9375 | 52 | 0.674627 | # -*- coding: utf-8 -*-
from collections import Counter
class Solution:
def areOccurrencesEqual(self, s: str) -> bool:
return len(set(Counter(s).values())) == 1
if __name__ == '__main__':
solution = Solution()
assert solution.areOccurrencesEqual('abcabc')
assert not solution.areOccurrences... | 0 | 0 | 0 | 95 | 0 | 0 | 0 | 10 | 46 |
d5671e122aab6c9af0eb8a1d60cab4c0433d82bd | 6,280 | py | Python | count/plot.py | rsspp/experiments | b2d341afc514c05c51c165803d4b7ed153ab3716 | [
"BSD-3-Clause"
] | 4 | 2019-12-17T18:20:42.000Z | 2020-05-24T05:50:13.000Z | count/plot.py | rsspp/experiments | b2d341afc514c05c51c165803d4b7ed153ab3716 | [
"BSD-3-Clause"
] | 6 | 2020-04-15T17:09:29.000Z | 2021-05-03T13:24:04.000Z | count/plot.py | rsspp/experiments | b2d341afc514c05c51c165803d4b7ed153ab3716 | [
"BSD-3-Clause"
] | null | null | null | import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.ticker as ticker
from matplotlib.ticker import FormatStrFormatter
from matplotlib.ticker import FuncFormatter
import traceback
#################################################
################################... | 33.763441 | 226 | 0.619745 | from common import *
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.lines import Line2D
import matplotlib.ticker as ticker
import os
from matplotlib import container
from common import *
from collections import OrderedDict
from matplotlib.markers import Marker... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 154 |
100530c3926985002bd78d1a4aff73fdf7b9828b | 1,978 | py | Python | .history/Hackerrank/set_intersection_operation_20200518113131.py | EvanthiosPapadopoulos/Python3 | ab773fd458e365c1510f98ecac65965234c881e8 | [
"MIT"
] | 1 | 2020-05-18T17:50:00.000Z | 2020-05-18T17:50:00.000Z | Hackerrank/Python/set_intersection_operation.py | EvanthiosPapadopoulos/Python3 | ab773fd458e365c1510f98ecac65965234c881e8 | [
"MIT"
] | null | null | null | Hackerrank/Python/set_intersection_operation.py | EvanthiosPapadopoulos/Python3 | ab773fd458e365c1510f98ecac65965234c881e8 | [
"MIT"
] | null | null | null | '''
A&B.png
.intersection()
The .intersection() operator returns the intersection of a set and the set of elements in an iterable.
Sometimes, the & operator is used in place of the .intersection() operator, but it only operates on the set of elements in set.
The set is immutable to the .intersection() operation (or & ... | 33.525424 | 234 | 0.72548 | '''
A&B.png
.intersection()
The .intersection() operator returns the intersection of a set and the set of elements in an iterable.
Sometimes, the & operator is used in place of the .intersection() operator, but it only operates on the set of elements in set.
The set is immutable to the .intersection() operation (or & ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bf47b796015dc3bc7e17058c2132d1bf7f75995c | 8,908 | py | Python | fuzzysets/plot.py | StiliyanDr/fuzzy-sets | 9355ac5da7d96ea32675ea96fb116ce8dfd5cf91 | [
"MIT"
] | 1 | 2021-09-22T13:40:25.000Z | 2021-09-22T13:40:25.000Z | fuzzysets/plot.py | StiliyanDr/fuzzy-sets | 9355ac5da7d96ea32675ea96fb116ce8dfd5cf91 | [
"MIT"
] | null | null | null | fuzzysets/plot.py | StiliyanDr/fuzzy-sets | 9355ac5da7d96ea32675ea96fb116ce8dfd5cf91 | [
"MIT"
] | 1 | 2021-12-04T00:11:15.000Z | 2021-12-04T00:11:15.000Z | import matplotlib.pyplot as plt
import numpy as np
from fuzzysets import utils
from fuzzysets.sets.base import FuzzySet
from fuzzysets.sets.continuous import ContinuousFuzzySet
_X_LIMITS = (0., 10.)
_Y_LABEL = "(x)"
def plot_tfn_operations(first_name="A",
second_name="B",
... | 29.496689 | 71 | 0.515828 | import matplotlib.pyplot as plt
import numpy as np
from fuzzysets import utils
from fuzzysets.sets.base import FuzzySet
from fuzzysets.sets.continuous import ContinuousFuzzySet
from fuzzysets.sets.finite import FiniteFuzzySet
from fuzzysets.tfn import TriangularFuzzyNumber as TFN
_X_LIMITS = (0., 10.)
_Y_LABEL = "... | 4 | 0 | 0 | 0 | 0 | 4,009 | 0 | 60 | 320 |
c0fc9d0c0d08a050eb767e998e266ec9f2cf3bbb | 4,220 | py | Python | lvreuse/analysis/performance/unvail_mass_contours.py | mvernacc/lvreuse | e2ac6aca334b49b0d4f5f881861cb42ce86dd130 | [
"MIT"
] | 7 | 2019-10-01T04:21:23.000Z | 2022-03-22T15:20:38.000Z | lvreuse/analysis/performance/unvail_mass_contours.py | mvernacc/lvreuse | e2ac6aca334b49b0d4f5f881861cb42ce86dd130 | [
"MIT"
] | null | null | null | lvreuse/analysis/performance/unvail_mass_contours.py | mvernacc/lvreuse | e2ac6aca334b49b0d4f5f881861cb42ce86dd130 | [
"MIT"
] | 6 | 2019-10-01T04:21:24.000Z | 2021-02-15T17:07:10.000Z | """Plot contours of first stage unvaiable mass vs recovery hardware factor and recovery propellant factor."""
fontsize = 15
if __name__ == '__main__':
main()
| 36.37931 | 117 | 0.609953 | """Plot contours of first stage unvaiable mass vs recovery hardware factor and recovery propellant factor."""
import os.path
from collections import namedtuple
import numpy as np
from matplotlib import pyplot as plt
from lvreuse.performance.unavail_mass import unavail_mass
fontsize = 15
def main():
plot_contou... | 0 | 0 | 0 | 0 | 0 | 3,816 | 0 | 54 | 182 |
62f9e0cd2165187d330bdb9d1f77fc07f08139d7 | 23 | py | Python | heima/register.py | teashell/test | 2855ec7f757660deb6a309d2d6672aa5d8fbf09a | [
"MIT"
] | null | null | null | heima/register.py | teashell/test | 2855ec7f757660deb6a309d2d6672aa5d8fbf09a | [
"MIT"
] | null | null | null | heima/register.py | teashell/test | 2855ec7f757660deb6a309d2d6672aa5d8fbf09a | [
"MIT"
] | null | null | null | print('1.0!!!')
| 11.5 | 22 | 0.608696 | print('版本1.0终于完成了!!!')
| 21 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7272413d89891daa3d79e7ec3ce1c5f269d502a5 | 1,063 | py | Python | salt/serializers/python.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 12 | 2015-01-21T00:18:25.000Z | 2021-07-11T07:35:26.000Z | salt/serializers/python.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 86 | 2017-01-27T11:54:46.000Z | 2020-05-20T06:25:26.000Z | salt/serializers/python.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 12 | 2015-01-05T09:50:42.000Z | 2019-08-19T01:43:40.000Z | # -*- coding: utf-8 -*-
'''
salt.serializers.python
~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 2016.3.0
Implements a Python serializer (via pprint.format)
'''
from __future__ import absolute_import, unicode_literals
import pprint
try:
import simplejson as _json
except ImportError:
import j... | 24.159091 | 79 | 0.658514 | # -*- coding: utf-8 -*-
'''
salt.serializers.python
~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 2016.3.0
Implements a Python serializer (via pprint.format)
'''
from __future__ import absolute_import, unicode_literals
import pprint
try:
import simplejson as _json
except ImportError:
import j... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9855771e77c842d03deab1f80cc752646725a238 | 11,139 | py | Python | rkquery.py | zacharyvoase/rkquery | 698fd771d4e4875e11f1a0d414034088bd121910 | [
"Unlicense"
] | 1 | 2021-11-15T09:39:06.000Z | 2021-11-15T09:39:06.000Z | rkquery.py | zacharyvoase/rkquery | 698fd771d4e4875e11f1a0d414034088bd121910 | [
"Unlicense"
] | null | null | null | rkquery.py | zacharyvoase/rkquery | 698fd771d4e4875e11f1a0d414034088bd121910 | [
"Unlicense"
] | null | null | null | """
rkQuery is a library for programmatically building Riak search queries. It aims
to be easy to use, powerful, and protect from injection attacks that would be
possible with simple string interpolation.
Just start playing around with the ``Q`` object:
>>> from rkquery import Q
>>> Q("some literal")
<Q: ... | 27.708955 | 79 | 0.601939 | """
rkQuery is a library for programmatically building Riak search queries. It aims
to be easy to use, powerful, and protect from injection attacks that would be
possible with simple string interpolation.
Just start playing around with the ``Q`` object:
>>> from rkquery import Q
>>> Q("some literal")
<Q: ... | 0 | 405 | 0 | 6,208 | 0 | 1,108 | 0 | -11 | 459 |
18a53a8dfe122f01cb3df9630c28d959c726ec6d | 2,175 | py | Python | examples/grpc/python/generated/system_api_pb2_grpc.py | niclaslind/signalbroker-server | afb80514dcbabe561ac2da42adc08843a15c37c5 | [
"Apache-2.0"
] | 17 | 2020-06-20T11:29:43.000Z | 2022-03-21T05:53:06.000Z | examples/grpc/python/generated/system_api_pb2_grpc.py | niclaslind/signalbroker-server | afb80514dcbabe561ac2da42adc08843a15c37c5 | [
"Apache-2.0"
] | 2 | 2020-07-09T10:22:50.000Z | 2020-09-01T14:46:40.000Z | examples/grpc/python/generated/system_api_pb2_grpc.py | niclaslind/signalbroker-server | afb80514dcbabe561ac2da42adc08843a15c37c5 | [
"Apache-2.0"
] | 3 | 2020-07-17T20:04:36.000Z | 2022-01-24T14:19:46.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
| 33.984375 | 74 | 0.747126 | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import common_pb2 as common__pb2
class SystemServiceStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
... | 0 | 0 | 0 | 1,282 | 0 | 705 | 0 | 1 | 114 |
75b6600aee5b2cca86d627adb98aae7e7ba450c1 | 230 | py | Python | rooms/templatetags/custom_template_tags.py | pawelkonior/idoctor_2 | 58e2835cea813921fbaa47cc0d65b93e4539d5b0 | [
"Beerware"
] | 1 | 2021-07-12T10:22:29.000Z | 2021-07-12T10:22:29.000Z | rooms/templatetags/custom_template_tags.py | pawelkonior/idoctor_2 | 58e2835cea813921fbaa47cc0d65b93e4539d5b0 | [
"Beerware"
] | null | null | null | rooms/templatetags/custom_template_tags.py | pawelkonior/idoctor_2 | 58e2835cea813921fbaa47cc0d65b93e4539d5b0 | [
"Beerware"
] | 1 | 2021-07-01T10:37:12.000Z | 2021-07-01T10:37:12.000Z | from django import template
register = template.Library()
| 15.333333 | 37 | 0.595652 | from django import template
register = template.Library()
@register.simple_tag
def make_color(val=None):
colors = {
1: 'success',
2: 'info',
3: 'warning'
}
return colors.get(val, 'success')
| 0 | 147 | 0 | 0 | 0 | 0 | 0 | 0 | 23 |
87abab63c3ad42b3d3f549da610833111b19ed37 | 650 | py | Python | build/lib.linux-x86_64-2.7/django_es/__init__.py | GuillaumeCisco/django-es | 967937fe75e633baca8482d6a396ff2e31a293ae | [
"BSD-3-Clause"
] | 5 | 2017-01-19T13:08:11.000Z | 2020-05-18T09:39:14.000Z | django_es/__init__.py | GuillaumeCisco/django-es | 967937fe75e633baca8482d6a396ff2e31a293ae | [
"BSD-3-Clause"
] | null | null | null | django_es/__init__.py | GuillaumeCisco/django-es | 967937fe75e633baca8482d6a396ff2e31a293ae | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from django.contrib.admin.decorators import register
from elasticsearch import Elasticsearch
__author__ = 'guillaume'
# cache es_instance
es_instance = getattr(settings, 'ES_CLIENT', Elasticsearch())
# This import need to be placed after for avoiding circular dependencies
from .mappi... | 26 | 72 | 0.795385 | from django.conf import settings
from django.contrib.admin.decorators import register
from django.utils.module_loading import autodiscover_modules
from elasticsearch import Elasticsearch
__author__ = 'guillaume'
# cache es_instance
es_instance = getattr(settings, 'ES_CLIENT', Elasticsearch())
# This import need to b... | 0 | 0 | 0 | 0 | 0 | 56 | 0 | 39 | 45 |
4db2717e5a83ee36aaf7eb15f8fea36ec1b425b7 | 322 | py | Python | beginner_contest/131/D.py | FGtatsuro/myatcoder | 25a3123be6a6311e7d1c25394987de3e35575ff4 | [
"MIT"
] | null | null | null | beginner_contest/131/D.py | FGtatsuro/myatcoder | 25a3123be6a6311e7d1c25394987de3e35575ff4 | [
"MIT"
] | null | null | null | beginner_contest/131/D.py | FGtatsuro/myatcoder | 25a3123be6a6311e7d1c25394987de3e35575ff4 | [
"MIT"
] | null | null | null | import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
n = int(input())
jobs = [0] * n
for i in range(n):
jobs[i] = tuple(map(int, input().split()))
jobs = sorted(jobs, key=lambda x: x[1])
_sum = 0
for j in jobs:
_sum += j[0]
if _sum > j[1]:
print('No')
sys.exit(0)
print('Yes'... | 18.941176 | 46 | 0.571429 | import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
n = int(input())
jobs = [0] * n
for i in range(n):
jobs[i] = tuple(map(int, input().split()))
jobs = sorted(jobs, key=lambda x: x[1])
_sum = 0
for j in jobs:
_sum += j[0]
if _sum > j[1]:
print('No')
sys.exit(0)
print('Yes'... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5fae8505dd8a0a74027ce2619e6d4180d42d19a9 | 2,483 | py | Python | Gquadruplex_cgcc.py | TaliaferroLab/AnalysisScripts | 3df37d2f8fca9bc402afe5ea870c42200fca1ed3 | [
"MIT"
] | null | null | null | Gquadruplex_cgcc.py | TaliaferroLab/AnalysisScripts | 3df37d2f8fca9bc402afe5ea870c42200fca1ed3 | [
"MIT"
] | null | null | null | Gquadruplex_cgcc.py | TaliaferroLab/AnalysisScripts | 3df37d2f8fca9bc402afe5ea870c42200fca1ed3 | [
"MIT"
] | 1 | 2021-10-30T07:37:19.000Z | 2021-10-30T07:37:19.000Z | #Usage: python Gquadruplex_cgcc.py <fasta> <windowsize> <output> <class> <region>
import sys
scores, medianscores, maxscores = iteratefasta(sys.argv[1], sys.argv[2])
with open(sys.argv[3], 'a') as outfile:
'''
for score in scores:
cGcCscore, binnumber = score[0], score[1]
outfile.write(str(cGcCscore) + '\t' + st... | 28.215909 | 107 | 0.653645 | #Usage: python Gquadruplex_cgcc.py <fasta> <windowsize> <output> <class> <region>
import re
import sys
from Bio import SeqIO
import numpy as np
def getscore(seq):
#Given a sequence, calculate its cG/cC score.
#First, get the longest consecutive substring of Gs and of Cs
#http://stackoverflow.com/questions/18776238... | 0 | 0 | 0 | 0 | 0 | 1,798 | 0 | -15 | 113 |
c8e4c5ec8f8c318472c3a85298e440748b16d8ef | 6,698 | py | Python | variflight.py | chengqidexue/VariFlightSpider | 57a39401676df2cd3f1c053f54b43437429e67ed | [
"MIT"
] | null | null | null | variflight.py | chengqidexue/VariFlightSpider | 57a39401676df2cd3f1c053f54b43437429e67ed | [
"MIT"
] | null | null | null | variflight.py | chengqidexue/VariFlightSpider | 57a39401676df2cd3f1c053f54b43437429e67ed | [
"MIT"
] | 1 | 2021-01-02T14:15:26.000Z | 2021-01-02T14:15:26.000Z |
if __name__ == "__main__":
main() | 35.62766 | 185 | 0.550761 | import datetime
import time
import requests
import json
import xundaili
from lxml import etree
class VariFlightSpider(object):
def __init__(self):
self.start_url = 'http://www.variflight.com'
self.file_name = datetime.datetime.now().strftime('%Y-%m-%d')+"-flight.json" #写入的文件名 2020-12-08-flight.... | 798 | 0 | 0 | 5,444 | 0 | 803 | 0 | -37 | 179 |
5e921f94a9420f9bdd5b5ae8ad7b356439d7536a | 3,782 | py | Python | zun/scheduler/client/query.py | wanghuiict/zun | 2f4a3a2ba06d7ca83002418d4003ee5dece70952 | [
"Apache-2.0"
] | 83 | 2016-09-14T22:06:26.000Z | 2022-01-27T03:49:52.000Z | zun/scheduler/client/query.py | wanghuiict/zun | 2f4a3a2ba06d7ca83002418d4003ee5dece70952 | [
"Apache-2.0"
] | 2 | 2017-06-22T21:58:47.000Z | 2019-04-10T03:17:44.000Z | zun/scheduler/client/query.py | wanghuiict/zun | 2f4a3a2ba06d7ca83002418d4003ee5dece70952 | [
"Apache-2.0"
] | 54 | 2016-09-29T10:16:02.000Z | 2022-01-28T19:12:49.000Z | # Copyright (c) 2014 Red Hat, 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 require... | 39.395833 | 79 | 0.655738 | # Copyright (c) 2014 Red Hat, 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 require... | 0 | 0 | 0 | 2,743 | 0 | 0 | 0 | 95 | 202 |
8ba0f85d7303e1ffde0721293edaae838e243d27 | 2,083 | py | Python | tests/test_integration_tests.py | kitmccoll/lattice_mc | 37ff69fb30182fa40bf36b4e1cd367698f5181dc | [
"MIT"
] | 24 | 2017-05-30T13:11:30.000Z | 2022-03-18T09:41:17.000Z | tests/test_integration_tests.py | kitmccoll/lattice_mc | 37ff69fb30182fa40bf36b4e1cd367698f5181dc | [
"MIT"
] | 5 | 2017-10-18T09:19:04.000Z | 2020-08-10T11:38:34.000Z | tests/test_integration_tests.py | kitmccoll/lattice_mc | 37ff69fb30182fa40bf36b4e1cd367698f5181dc | [
"MIT"
] | 5 | 2017-10-17T13:51:27.000Z | 2022-03-02T13:46:21.000Z | import unittest
if __name__ == '__main__':
unittest.main()
| 44.319149 | 102 | 0.635622 | import unittest
import lattice_mc
import random
import numpy as np
class IntegrationTestCase( unittest.TestCase ):
def test_simulation_runs_with_selected_sites( self ):
a, b, c, = 4, 4, 4
spacing = 1.0
n_atoms = 32
selected_sites = 'L'
number_of_jumps = 10
s = latti... | 0 | 0 | 0 | 1,945 | 0 | 0 | 0 | -15 | 89 |
0b80185147d689b6bafb48449707093945268d4d | 255 | py | Python | .bin/pinger.py | asadboi123/ldriveheroku | 0fc5afbc03ce57783bf59bed342ba2135a9a3583 | [
"MIT"
] | 50 | 2021-01-02T12:23:57.000Z | 2022-03-11T23:00:48.000Z | .bin/pinger.py | asadboi123/ldriveheroku | 0fc5afbc03ce57783bf59bed342ba2135a9a3583 | [
"MIT"
] | 2 | 2021-02-10T08:58:51.000Z | 2021-02-20T16:24:01.000Z | .bin/pinger.py | asadboi123/ldriveheroku | 0fc5afbc03ce57783bf59bed342ba2135a9a3583 | [
"MIT"
] | 229 | 2021-01-03T11:05:11.000Z | 2022-03-28T21:47:22.000Z | import os
import time
import requests
url = os.environ.get("PINGER")
if url:
if url.endswith("/"):
url = url[:-1]
while True:
time.sleep(int(os.environ.get("PINGER_INTERVAL", 900)))
requests.get("%s/api/v1/ping" % (url))
| 19.615385 | 63 | 0.6 | import os
import time
import requests
url = os.environ.get("PINGER")
if url:
if url.endswith("/"):
url = url[:-1]
while True:
time.sleep(int(os.environ.get("PINGER_INTERVAL", 900)))
requests.get("%s/api/v1/ping" % (url))
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
53e6ab3be4642b1203b53267c2bec46a13d6ee2d | 739 | py | Python | src/sentry/eventtypes/base.py | mastacheata/sentry | cc4536901db0323d1e6433416abf1d0ecd977d61 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/eventtypes/base.py | mastacheata/sentry | cc4536901db0323d1e6433416abf1d0ecd977d61 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/eventtypes/base.py | mastacheata/sentry | cc4536901db0323d1e6433416abf1d0ecd977d61 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
| 21.114286 | 63 | 0.61705 | from __future__ import absolute_import
from sentry.utils.strings import truncatechars, strip
class BaseEvent(object):
id = None
def __init__(self, data):
self.data = data
def has_metadata(self):
raise NotImplementedError
def get_metadata(self):
raise NotImplementedError
c... | 0 | 0 | 0 | 597 | 0 | 0 | 0 | 32 | 69 |
74cbe07a3a7e894ff8aa4c4edc9a779ab7607cc3 | 3,028 | py | Python | day-14-higher-lower/main.py | Janell-Huyck/100-Days-of-Code | c73326d779d8555d8dbbcdee3ce600807ec3bb73 | [
"MIT"
] | 1 | 2021-11-28T23:34:01.000Z | 2021-11-28T23:34:01.000Z | day-14-higher-lower/main.py | Janell-Huyck/100-Days-of-Code | c73326d779d8555d8dbbcdee3ce600807ec3bb73 | [
"MIT"
] | null | null | null | day-14-higher-lower/main.py | Janell-Huyck/100-Days-of-Code | c73326d779d8555d8dbbcdee3ce600807ec3bb73 | [
"MIT"
] | null | null | null | import random
import os
from art import logo, vs
from game import data
score = 0
start_game()
| 24.819672 | 84 | 0.689894 | import random
import os
from art import logo, vs
from game-data import data
score = 0
def reset_screen():
os.system('cls||clear')
print(logo)
def print_instructions():
print("""
Higher Lower is a guessing game based on your best guess for
which of two people or things have more followers on Instagram,
... | 0 | 0 | 0 | 0 | 0 | 2,650 | 0 | 5 | 276 |
69eafb8d22c418aeedbdbbb18aa070ccd5c5354c | 1,041 | py | Python | tests/test_conversion.py | tommyjcarpenter/osmtogeojson | 2e11abfb25d870d6fcf38af0fb3dff3ab458fbf1 | [
"MIT"
] | 1 | 2019-04-17T10:23:15.000Z | 2019-04-17T10:23:15.000Z | tests/test_conversion.py | tommyjcarpenter/osmtogeojson | 2e11abfb25d870d6fcf38af0fb3dff3ab458fbf1 | [
"MIT"
] | 7 | 2019-04-17T10:22:56.000Z | 2020-07-09T18:51:30.000Z | tests/test_conversion.py | tommyjcarpenter/osmtogeojson | 2e11abfb25d870d6fcf38af0fb3dff3ab458fbf1 | [
"MIT"
] | 1 | 2019-04-25T16:51:06.000Z | 2019-04-25T16:51:06.000Z | import unittest
if __name__ == '__main__':
unittest.main() | 33.580645 | 89 | 0.698367 | import json
import unittest
from osmtogeojson import osmtogeojson
class ConversionTest(unittest.TestCase):
# We want to see the differences
maxDiff = None
def test_relation_with_different_member_types_becomes_GeometryCollection(self):
self.compare_files("geomcollection_overpass.json", "geomcolle... | 0 | 0 | 0 | 904 | 0 | 0 | 0 | 6 | 68 |
f7857465790d57abdd66554c20541c5a3f396f52 | 102 | py | Python | ideias/genetica/her_mendeliana_simples.py | ppedraum/logica_programacao | 548654b2e55d9e895d98a90be06baf88719e9833 | [
"MIT"
] | null | null | null | ideias/genetica/her_mendeliana_simples.py | ppedraum/logica_programacao | 548654b2e55d9e895d98a90be06baf88719e9833 | [
"MIT"
] | null | null | null | ideias/genetica/her_mendeliana_simples.py | ppedraum/logica_programacao | 548654b2e55d9e895d98a90be06baf88719e9833 | [
"MIT"
] | null | null | null | pai = input("gentipo do pai: ")
mae = input("gentipo da me: ")
if pai="AA":
print("dominante") | 20.4 | 32 | 0.617647 | pai = input("genótipo do pai: ")
mae = input("genótipo da mãe: ")
if pai="AA":
print("dominante") | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f05e0a1120f454645e9fd4bfcde547c11c9b107f | 16,735 | py | Python | foreman_hostgroup.py | Nosmoht/ansible-module-foreman | d5509cc74025c842fb1c63aae4e1d36c31ce026d | [
"Apache-2.0"
] | 53 | 2016-05-05T03:36:17.000Z | 2022-01-04T18:02:05.000Z | foreman_hostgroup.py | Nosmoht/ansible-module-foreman | d5509cc74025c842fb1c63aae4e1d36c31ce026d | [
"Apache-2.0"
] | 29 | 2016-03-11T15:29:21.000Z | 2020-10-22T02:56:18.000Z | foreman_hostgroup.py | Nosmoht/ansible-module-foreman | d5509cc74025c842fb1c63aae4e1d36c31ce026d | [
"Apache-2.0"
] | 33 | 2016-03-01T18:48:35.000Z | 2021-01-16T13:55:09.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Ansible module to manage Foreman hostgroup resources.
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at you... | 36.942605 | 120 | 0.610696 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Ansible module to manage Foreman hostgroup resources.
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at you... | 0 | 0 | 0 | 0 | 0 | 11,727 | 0 | 54 | 143 |
6e48ac02cf53f8c3f3573cd7979b2391d412eac4 | 1,393 | py | Python | cdd/tests/test_source_transformer.py | offscale/cdd-python | 535018ec31fa086b5e79832499f26c6f129daaac | [
"Apache-2.0",
"MIT"
] | 4 | 2021-05-28T14:50:58.000Z | 2022-03-01T23:22:14.000Z | cdd/tests/test_source_transformer.py | SamuelMarks/doctrans | 7e5305cfcc20e6dd75b710c564dde6f1ecb0c1a2 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-02-19T04:13:38.000Z | 2021-02-19T04:13:38.000Z | cdd/tests/test_source_transformer.py | offscale/cdd-python | 535018ec31fa086b5e79832499f26c6f129daaac | [
"Apache-2.0",
"MIT"
] | 3 | 2020-09-09T21:23:09.000Z | 2021-02-13T07:53:07.000Z | """
Tests for source_transformer
"""
from cdd.tests.utils_for_tests import unittest_main
unittest_main()
| 25.796296 | 81 | 0.573582 | """
Tests for source_transformer
"""
from ast import ClassDef
from unittest import TestCase
from unittest.mock import patch
from cdd.pure_utils import PY_GTE_3_9
from cdd.tests.utils_for_tests import unittest_main
class TestSourceTransformer(TestCase):
"""
Tests for source_transformer
"""
def test_... | 0 | 0 | 0 | 1,135 | 0 | 0 | 0 | 37 | 113 |
67c079fe61654bcc40a15be4e82c92072b4f95a1 | 3,930 | py | Python | deamon.py | wilgaboury/goodwill-sniper | 34db23139bfd5225771f8ad430fc8bef1b9c86c2 | [
"MIT"
] | 1 | 2021-09-04T09:14:26.000Z | 2021-09-04T09:14:26.000Z | deamon.py | wilgaboury/goodwill-sniper | 34db23139bfd5225771f8ad430fc8bef1b9c86c2 | [
"MIT"
] | null | null | null | deamon.py | wilgaboury/goodwill-sniper | 34db23139bfd5225771f8ad430fc8bef1b9c86c2 | [
"MIT"
] | null | null | null | import json
import socket
from apscheduler.schedulers.background import BackgroundScheduler
init_config = json.loads(open('config.json', 'r').read())
scheduler = BackgroundScheduler()
jobs = {}
load_jobs()
scheduler.start()
while True:
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind((... | 36.728972 | 201 | 0.643257 | import sqlite3
import json
import datetime
import pause
import utils
import math
import socket
import time
from dateutil.parser import parse
from multiprocessing.connection import Listener
from selenium.webdriver import Firefox
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Se... | 0 | 0 | 0 | 0 | 0 | 2,243 | 0 | 156 | 400 |
8fcc1099511bc3c065f1a4aeef4738b1f149ca31 | 3,108 | py | Python | core_scripts/config_parse/config_parse.py | Nijta/project-NN-Pytorch-scripts | 06a50ab072613fb60b8b8e1cea85c4aa8e75549d | [
"BSD-3-Clause"
] | 150 | 2020-06-04T00:02:50.000Z | 2022-03-30T03:32:56.000Z | core_scripts/config_parse/config_parse.py | Nijta/project-NN-Pytorch-scripts | 06a50ab072613fb60b8b8e1cea85c4aa8e75549d | [
"BSD-3-Clause"
] | 15 | 2020-06-17T04:08:33.000Z | 2022-03-01T03:42:25.000Z | core_scripts/config_parse/config_parse.py | Nijta/project-NN-Pytorch-scripts | 06a50ab072613fb60b8b8e1cea85c4aa8e75549d | [
"BSD-3-Clause"
] | 23 | 2020-06-16T03:28:35.000Z | 2022-03-15T03:46:13.000Z | #!/usr/bin/env python
"""
config_parse
Configuration parser
"""
from __future__ import absolute_import
__author__ = "Xin Wang"
__email__ = "wangxin@nii.ac.jp"
__copyright__ = "Copyright 2020, Xin Wang"
| 32.041237 | 74 | 0.583333 | #!/usr/bin/env python
"""
config_parse
Configuration parser
"""
from __future__ import absolute_import
import os
import sys
import configparser
import core_scripts.other_tools.list_tools as nii_list_tools
import core_scripts.other_tools.display as nii_display
__author__ = "Xin Wang"
__email__ = "wangxin@nii.ac.jp"... | 0 | 0 | 0 | 2,719 | 0 | 0 | 0 | 47 | 135 |
2e04d572b5203b979dc04c82efd41ddcca243b21 | 225 | py | Python | worf_web/worf/css/data_create.py | The4thIdeaHackathon/worf | cc6585529745fd04d41a5563e84e1f93e8d3a9d3 | [
"Unlicense"
] | null | null | null | worf_web/worf/css/data_create.py | The4thIdeaHackathon/worf | cc6585529745fd04d41a5563e84e1f93e8d3a9d3 | [
"Unlicense"
] | null | null | null | worf_web/worf/css/data_create.py | The4thIdeaHackathon/worf | cc6585529745fd04d41a5563e84e1f93e8d3a9d3 | [
"Unlicense"
] | null | null | null | maps={}
maps['']=[]
maps[''].append(["",{'lat':35.8430711,'lon':127.1279931}])
maps[''].append(["",{'lat':35.8430713,'lon':127.1279933}])
maps[''].append(["",{'lat':35.8430712,'lon':127.1279929}]) | 45 | 68 | 0.631111 | maps={}
maps['닭갈비']=[]
maps['닭갈비'].append(["고수닭갈비",{'lat':35.8430711,'lon':127.1279931}])
maps['닭갈비'].append(["춘천닭갈비",{'lat':35.8430713,'lon':127.1279933}])
maps['닭갈비'].append(["황제춘천닭갈비",{'lat':35.8430712,'lon':127.1279929}]) | 87 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f626ef085756d90783bf070370e4e5b0071ab708 | 2,061 | py | Python | opteryx/storage/cache/memory_cache.py | mabel-dev/mabel-sql | 1a39253333233f5181be78b9e3c45aea1eb2afe3 | [
"Apache-2.0"
] | 1 | 2022-02-05T18:36:09.000Z | 2022-02-05T18:36:09.000Z | opteryx/storage/cache/memory_cache.py | mabel-dev/mabel-sql | 1a39253333233f5181be78b9e3c45aea1eb2afe3 | [
"Apache-2.0"
] | 43 | 2021-12-29T22:33:49.000Z | 2022-03-25T20:12:07.000Z | opteryx/storage/cache/memory_cache.py | mabel-dev/mabel-sql | 1a39253333233f5181be78b9e3c45aea1eb2afe3 | [
"Apache-2.0"
] | 1 | 2022-01-26T21:44:15.000Z | 2022-01-26T21:44:15.000Z | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | 36.803571 | 87 | 0.665696 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | 0 | 0 | 0 | 1,140 | 0 | 0 | 0 | 10 | 69 |
dc358a9f802d15441b604dd329c57bb2f459e75f | 3,564 | py | Python | setup.py | benchmarking-suite/benchmarking-controller | 98171af05ff765c4f68d13373381660119eb1ee4 | [
"Apache-2.0"
] | null | null | null | setup.py | benchmarking-suite/benchmarking-controller | 98171af05ff765c4f68d13373381660119eb1ee4 | [
"Apache-2.0"
] | null | null | null | setup.py | benchmarking-suite/benchmarking-controller | 98171af05ff765c4f68d13373381660119eb1ee4 | [
"Apache-2.0"
] | null | null | null | # Benchmarking Suite
# Copyright 2014-2017 Engineering Ingegneria Informatica S.p.A.
#
# 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 ... | 35.287129 | 118 | 0.682099 | # Benchmarking Suite
# Copyright 2014-2017 Engineering Ingegneria Informatica S.p.A.
#
# 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 ... | 0 | 0 | 0 | 964 | 0 | 0 | 0 | 25 | 45 |
8009d2fe2177a1c7fb979b28371d421d5527fcee | 188 | py | Python | apps/intro/urls.py | mrtaalebi/sitigo | cce8b4f5299b58d7365789ead416d4568b443743 | [
"Apache-2.0"
] | null | null | null | apps/intro/urls.py | mrtaalebi/sitigo | cce8b4f5299b58d7365789ead416d4568b443743 | [
"Apache-2.0"
] | 8 | 2020-02-12T01:02:15.000Z | 2022-03-11T23:53:39.000Z | apps/intro/urls.py | mrtaalebi/sitigo | cce8b4f5299b58d7365789ead416d4568b443743 | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url
from apps.intro import views
app_name = "intro"
urlpatterns = [
url(r'^$', views.homepage, name='homepage'),
]
| 18.8 | 48 | 0.718085 | from django.conf.urls import url
from django.urls import path, include
from apps.intro import views
app_name = "intro"
urlpatterns = [
url(r'^$', views.homepage, name='homepage'),
]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 22 |
000c669132896ab4b233ea35186d256adfb0cf4c | 1,960 | py | Python | elisa_4_keymap.py | christianbitter/Elisa | efb2e155f42cd0c648a2c6c5c67393284f553c51 | [
"MIT"
] | 1 | 2019-07-24T19:57:53.000Z | 2019-07-24T19:57:53.000Z | elisa_4_keymap.py | christianbitter/Elisa | efb2e155f42cd0c648a2c6c5c67393284f553c51 | [
"MIT"
] | null | null | null | elisa_4_keymap.py | christianbitter/Elisa | efb2e155f42cd0c648a2c6c5c67393284f553c51 | [
"MIT"
] | null | null | null | # auth: christian bitter
# desc: in this tutorial we register key events and display some text accordingly
# specifically, we are going to listen for the 4 arrow keys
import pygame
from pygame.locals import QUIT
if not pygame.font:
print("Pygame - fonts not loaded")
if not pygame.mixer:
print("Pygame - ... | 25.454545 | 81 | 0.661224 | # auth: christian bitter
# desc: in this tutorial we register key events and display some text accordingly
# specifically, we are going to listen for the 4 arrow keys
import pygame
from pygame.locals import K_LEFT, K_RIGHT, K_DOWN, K_UP, QUIT
if not pygame.font:
print("Pygame - fonts not loaded")
if not pyg... | 0 | 0 | 0 | 0 | 0 | 277 | 0 | 31 | 23 |
0ff7b46df9e126b5b2c2b88eb28ddfeae187a1e1 | 10,063 | py | Python | rich_text.py | ThePaperTop/rich-text | a10c124e0ead94949f6ef67ae097b9cf37918f45 | [
"MIT"
] | null | null | null | rich_text.py | ThePaperTop/rich-text | a10c124e0ead94949f6ef67ae097b9cf37918f45 | [
"MIT"
] | null | null | null | rich_text.py | ThePaperTop/rich-text | a10c124e0ead94949f6ef67ae097b9cf37918f45 | [
"MIT"
] | null | null | null | from enums import enum
from fontlist import FontList
__all_fonts__ = FontList.all()
font_roles = enum(title=0,
body=1,
mono=2,
cursive=3,
inherit=-1)
if __name__ == "__main__":
import lipsum
block_styles, inline_styles = default_s... | 33.101974 | 75 | 0.428799 | from enums import enum
from fontlist import FontList
from datetime import datetime
__all_fonts__ = FontList.all()
class FontFamily(object):
def __init__(self, font_name):
self.all = __all_fonts__.by_partial_name(font_name)
try:
self.regular = [
font for font in self.al... | 0 | 0 | 0 | 4,493 | 0 | 3,328 | 0 | 8 | 256 |
cebc3b4479681cc9d95fe3c06dc0136edf95edcb | 1,629 | py | Python | tests/api/rating_change_tests.py | ericbrandwein/CodeforcesAPI | 12ae641910a3308033584dc518bb2fc0173e56f3 | [
"MIT"
] | null | null | null | tests/api/rating_change_tests.py | ericbrandwein/CodeforcesAPI | 12ae641910a3308033584dc518bb2fc0173e56f3 | [
"MIT"
] | null | null | null | tests/api/rating_change_tests.py | ericbrandwein/CodeforcesAPI | 12ae641910a3308033584dc518bb2fc0173e56f3 | [
"MIT"
] | null | null | null | """
This module provides classes for testing RatingChange object
"""
import unittest
if __name__ == '__main__':
unittest.main()
| 29.089286 | 78 | 0.626765 | """
This module provides classes for testing RatingChange object
"""
import unittest
from codeforces import RatingChange
class RatingChangeTests(unittest.TestCase):
def setUp(self):
self.rating = RatingChange()
def test_load_from_dict(self):
d = {
"contestId": 1,
"c... | 0 | 0 | 0 | 1,433 | 0 | 0 | 0 | 14 | 46 |
312249c4565121034d3b98d883e39d378e737909 | 8,361 | py | Python | mars/lib/filesystem/arrow.py | wjsi/mars | a69fb19edfe748d4393b90ff2c4941a76c084596 | [
"Apache-2.0"
] | 1 | 2022-02-02T03:03:48.000Z | 2022-02-02T03:03:48.000Z | mars/lib/filesystem/arrow.py | wjsi/mars | a69fb19edfe748d4393b90ff2c4941a76c084596 | [
"Apache-2.0"
] | null | null | null | mars/lib/filesystem/arrow.py | wjsi/mars | a69fb19edfe748d4393b90ff2c4941a76c084596 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# 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 a... | 34.692946 | 86 | 0.63246 | # Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# 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 a... | 0 | 5,073 | 0 | 1,860 | 0 | 0 | 0 | 267 | 248 |
30259fce527c13406f1130e23e88fc151f23ca85 | 7,421 | py | Python | utils.py | ericlearning/generative-pix2pix | 96323c9418be9886295e95b3fa9f66fd7c8de60e | [
"MIT"
] | 4 | 2019-05-07T10:27:09.000Z | 2022-01-09T11:13:14.000Z | utils.py | ericlearning/generative-pix2pix | 96323c9418be9886295e95b3fa9f66fd7c8de60e | [
"MIT"
] | null | null | null | utils.py | ericlearning/generative-pix2pix | 96323c9418be9886295e95b3fa9f66fd7c8de60e | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch.optim as optim
| 31.713675 | 151 | 0.695863 | import os
import cv2
import glob
import torch
import imageio
import numpy as np
import pandas as pd
import seaborn as sn
import torch.nn as nn
import torch.optim as optim
import matplotlib.pyplot as plt
from sklearn.metrics import confusion_matrix
from scipy.io import wavfile
from PIL import Image
from losses.losses im... | 0 | 0 | 0 | 0 | 0 | 6,749 | 0 | -9 | 631 |
e3918fd80eee0b068dc9a9677ed899c09e21a3e7 | 343 | py | Python | unbrake-api/unbrake_api/management/commands/check_all.py | fga-eps-mds/2019.1-Simulador-de-Frenagem | a7452511fa7059121cd9035a7b21f3cd8fec1548 | [
"MIT"
] | 9 | 2019-03-23T02:56:08.000Z | 2019-08-29T21:32:00.000Z | unbrake-api/unbrake_api/management/commands/check_all.py | fga-eps-mds/2019.1-Simulador-de-Frenagem | a7452511fa7059121cd9035a7b21f3cd8fec1548 | [
"MIT"
] | 260 | 2019-03-23T01:07:29.000Z | 2022-03-29T16:31:48.000Z | unbrake-api/unbrake_api/management/commands/check_all.py | fga-eps-mds/2019.1-Simulador-de-Frenagem | a7452511fa7059121cd9035a7b21f3cd8fec1548 | [
"MIT"
] | 2 | 2019-05-07T03:39:58.000Z | 2019-09-09T07:02:11.000Z | '''
Link check_all script to a manage.py command
'''
| 20.176471 | 46 | 0.688047 | '''
Link check_all script to a manage.py command
'''
from django.core.management import BaseCommand
from ._script import run_script
class Command(BaseCommand):
'''
Run general script for checking
'''
help = "Run general script for checking"
def handle(self, *args, **options):
run_script(... | 0 | 0 | 0 | 186 | 0 | 0 | 0 | 35 | 68 |
ba6104851df8b7dbbd940824e5d111a5cd3626f2 | 1,369 | py | Python | Fundamentals/Exercises/Objects_and_Classes_Exercise/7_articles.py | tankishev/Python | 60e511fc901f136b88c681f77f209fe2f8c46447 | [
"MIT"
] | 2 | 2022-03-04T11:39:03.000Z | 2022-03-13T07:13:23.000Z | Fundamentals/Exercises/Objects_and_Classes_Exercise/7_articles.py | tankishev/Python | 60e511fc901f136b88c681f77f209fe2f8c46447 | [
"MIT"
] | null | null | null | Fundamentals/Exercises/Objects_and_Classes_Exercise/7_articles.py | tankishev/Python | 60e511fc901f136b88c681f77f209fe2f8c46447 | [
"MIT"
] | null | null | null | # Create a class called Article. The __init__ method should accept 3 arguments: title: str, content: str, and author: str.
# The class should also have 4 methods:
# edit(new_content: str) - changes the old content to the new one
# change_author(new_author: str) - changes the old author with the new one
# rename(new... | 32.595238 | 123 | 0.680058 | # Create a class called Article. The __init__ method should accept 3 arguments: title: str, content: str, and author: str.
# The class should also have 4 methods:
# • edit(new_content: str) - changes the old content to the new one
# • change_author(new_author: str) - changes the old author with the new one
# • rename(... | 12 | 0 | 0 | 494 | 0 | 0 | 0 | 0 | 23 |
5612b8bf357afbf7097afadabcace8dc11dbcac7 | 776 | py | Python | testmain.py | tinapiao/Software-IC-Automation | 74b23cd94aa6e4658b110e93b5deb635e014f3a6 | [
"BSD-3-Clause"
] | null | null | null | testmain.py | tinapiao/Software-IC-Automation | 74b23cd94aa6e4658b110e93b5deb635e014f3a6 | [
"BSD-3-Clause"
] | null | null | null | testmain.py | tinapiao/Software-IC-Automation | 74b23cd94aa6e4658b110e93b5deb635e014f3a6 | [
"BSD-3-Clause"
] | null | null | null |
# import bag package
import bag
#import scripts_dsn.diffamp_simple as diffamp
# import BAG demo Python modules
import bag_testbenches.scripts_dsn.CML as diffamp
# load circuit specifications from file
#spec_fname = os.path.join(os.environ['BAG_WORK_DIR'], 'specs_demo/demo.yaml')
#top_specs = read_yaml(spec_fname)
#... | 25.866667 | 78 | 0.784794 | import os
# import bag package
import bag
from bag.io import read_yaml
#import scripts_dsn.diffamp_simple as diffamp
# import BAG demo Python modules
import xbase_demo.core as demo_core
import xbase_demo.demo_layout.core as layout_core
import bag_testbenches.scripts_dsn.CML as diffamp
from bag_testbenches.verificatio... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 111 |
44bcc8573d3ef61acd2992fbec25472214e1d267 | 232 | py | Python | 2. Programming Fundamentals With Python (May 2021)/02.Exercise - basic syntax, conditional statements and loops/08_mutate_strings.py | kzborisov/SoftUni | ccb2b8850adc79bfb2652a45124c3ff11183412e | [
"MIT"
] | 1 | 2021-02-07T07:51:12.000Z | 2021-02-07T07:51:12.000Z | 2. Programming Fundamentals With Python (May 2021)/02.Exercise - basic syntax, conditional statements and loops/08_mutate_strings.py | kzborisov/softuni | 9c5b45c74fa7d9748e9b3ea65a5ae4e15c142751 | [
"MIT"
] | null | null | null | 2. Programming Fundamentals With Python (May 2021)/02.Exercise - basic syntax, conditional statements and loops/08_mutate_strings.py | kzborisov/softuni | 9c5b45c74fa7d9748e9b3ea65a5ae4e15c142751 | [
"MIT"
] | null | null | null | # Task 08. Mutate Strings
str_1 = input()
str_2 = input()
new_str = list(str_1)
for ch in range(len(str_2)):
if new_str[ch] == str_2[ch]:
continue
else:
new_str[ch] = str_2[ch]
print(''.join(new_str))
| 16.571429 | 32 | 0.590517 | # Task 08. Mutate Strings
str_1 = input()
str_2 = input()
new_str = list(str_1)
for ch in range(len(str_2)):
if new_str[ch] == str_2[ch]:
continue
else:
new_str[ch] = str_2[ch]
print(''.join(new_str))
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
daf7bbf528eecfc39806ad1df5f4173a2638a8c5 | 8,329 | py | Python | ci/github/views.py | andrsd/civet | ac9ffffdea987437a5eb75779b9c7fe681e1ba85 | [
"Apache-2.0"
] | 29 | 2016-11-29T15:15:56.000Z | 2021-09-08T04:04:53.000Z | ci/github/views.py | andrsd/civet | ac9ffffdea987437a5eb75779b9c7fe681e1ba85 | [
"Apache-2.0"
] | 108 | 2016-11-29T17:29:00.000Z | 2022-03-21T21:00:10.000Z | ci/github/views.py | andrsd/civet | ac9ffffdea987437a5eb75779b9c7fe681e1ba85 | [
"Apache-2.0"
] | 11 | 2016-11-29T15:15:53.000Z | 2020-05-15T12:22:55.000Z |
# Copyright 2016 Battelle Energy Alliance, 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 agr... | 37.859091 | 126 | 0.660944 |
# Copyright 2016 Battelle Energy Alliance, 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 agr... | 0 | 700 | 0 | 0 | 0 | 5,042 | 0 | 132 | 158 |
a25e232751b5f51be5c187bec639e23262562e0c | 2,207 | py | Python | tools/create_sns_topic.py | shawn-rusaw/aws-lambda-fsm-workflows | 9fcf5af14bf0f4500d4a7e7b3e0eda00423c1d42 | [
"Apache-2.0"
] | 21 | 2017-01-26T21:23:57.000Z | 2021-08-07T02:56:49.000Z | tools/create_sns_topic.py | shawn-rusaw/aws-lambda-fsm-workflows | 9fcf5af14bf0f4500d4a7e7b3e0eda00423c1d42 | [
"Apache-2.0"
] | 151 | 2016-11-29T05:09:33.000Z | 2021-05-19T22:47:58.000Z | tools/create_sns_topic.py | shawn-rusaw/aws-lambda-fsm-workflows | 9fcf5af14bf0f4500d4a7e7b3e0eda00423c1d42 | [
"Apache-2.0"
] | 17 | 2016-11-29T05:07:58.000Z | 2021-05-04T21:22:29.000Z | #!/usr/bin/env python
# Copyright 2016-2020 Workiva 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 ... | 31.084507 | 78 | 0.772089 | #!/usr/bin/env python
# Copyright 2016-2020 Workiva 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 ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0841530bc74bf8c0db4bcd2d3e30bbb4ae1e7f42 | 3,851 | py | Python | Birnn_Transformer/ncc/optimizers/lr_schedulers/cosine_lr_scheduler.py | code-backdoor/code-backdoor | 1eeb3d79aa8a54c8f08e8d0156b569de5edd974e | [
"MIT"
] | 71 | 2020-12-04T02:18:13.000Z | 2022-03-30T15:19:50.000Z | ncc/optimizers/lr_schedulers/cosine_lr_scheduler.py | hrshy0629/naturalcc | 9c3329dd8387c8242deb52bf590ebe3ac795f8de | [
"MIT"
] | 4 | 2021-03-10T17:48:50.000Z | 2022-03-13T10:42:22.000Z | ncc/optimizers/lr_schedulers/cosine_lr_scheduler.py | hrshy0629/naturalcc | 9c3329dd8387c8242deb52bf590ebe3ac795f8de | [
"MIT"
] | 11 | 2020-12-09T12:17:44.000Z | 2022-03-30T09:02:13.000Z | # -*- coding: utf-8 -*-
| 38.51 | 118 | 0.615425 | # -*- coding: utf-8 -*-
import math
from ncc import LOGGER
from . import NccLRScheduler, register_lr_scheduler
@register_lr_scheduler('cosine')
class CosineSchedule(NccLRScheduler):
"""Assign LR based on a cyclical schedule that follows the cosine function.
See https://arxiv.org/pdf/1608.03983.pdf for deta... | 0 | 3,714 | 0 | 0 | 0 | 0 | 0 | 21 | 91 |
fe2464bc85b9ac26573daa40fd617ad447cf0359 | 3,013 | py | Python | src/sentry/api/serializers/models/team.py | tobetterman/sentry | fe85d3aee19dcdbfdd27921c4fb04529fc995a79 | [
"BSD-3-Clause"
] | 1 | 2017-08-30T06:55:25.000Z | 2017-08-30T06:55:25.000Z | src/sentry/api/serializers/models/team.py | tobetterman/sentry | fe85d3aee19dcdbfdd27921c4fb04529fc995a79 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/api/serializers/models/team.py | tobetterman/sentry | fe85d3aee19dcdbfdd27921c4fb04529fc995a79 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
| 33.10989 | 85 | 0.58845 | from __future__ import absolute_import
import itertools
from collections import defaultdict
from django.conf import settings
from sentry.api.serializers import Serializer, register, serialize
from sentry.auth.utils import is_active_superuser
from sentry.models import (
OrganizationAccessRequest, OrganizationMemb... | 0 | 1,810 | 0 | 792 | 0 | 0 | 0 | 189 | 181 |
7375e4ed247022f1f551b99ffa4c57ce695c9dc6 | 729 | py | Python | tests/test_librispeech.py | muxgt/pycadl | 9231fd4d945d959038a3760354bc891cbf7225b8 | [
"ECL-2.0",
"Apache-2.0"
] | 398 | 2017-09-05T20:46:59.000Z | 2022-02-24T12:58:09.000Z | tests/test_librispeech.py | muxgt/pycadl | 9231fd4d945d959038a3760354bc891cbf7225b8 | [
"ECL-2.0",
"Apache-2.0"
] | 9 | 2017-09-24T06:08:10.000Z | 2022-02-09T23:28:13.000Z | tests/test_librispeech.py | muxgt/pycadl | 9231fd4d945d959038a3760354bc891cbf7225b8 | [
"ECL-2.0",
"Apache-2.0"
] | 75 | 2017-09-05T23:45:43.000Z | 2021-07-13T03:59:26.000Z | from numpy.testing import run_module_suite
if __name__ == "__main__":
run_module_suite()
| 31.695652 | 80 | 0.720165 | from cadl import librispeech
from cadl.utils import exists
from numpy.testing import run_module_suite
def test_librispeech_exists():
assert(exists('http://www.openslr.org/resources/12/dev-clean.tar.gz'))
assert(exists('http://www.openslr.org/resources/12/train-clean-100.tar.gz'))
assert(exists('http://www... | 0 | 0 | 0 | 0 | 0 | 506 | 0 | 15 | 113 |
ad13fef763043c937edc4e73c310ae7cd29627a4 | 9,620 | py | Python | aquaticore/fish/views.py | rockerBOO/aquaticore | d50be480d14f6d858610181eee15c3cc8d9544bb | [
"MIT"
] | null | null | null | aquaticore/fish/views.py | rockerBOO/aquaticore | d50be480d14f6d858610181eee15c3cc8d9544bb | [
"MIT"
] | null | null | null | aquaticore/fish/views.py | rockerBOO/aquaticore | d50be480d14f6d858610181eee15c3cc8d9544bb | [
"MIT"
] | null | null | null | from datetime import datetime
# Order
# Family
# Genus | 27.175141 | 145 | 0.709563 | from django.template import Context, loader, RequestContext
from django.http import HttpResponse, HttpResponseRedirect
from aquaticore.fish.models import *
from django.shortcuts import render_to_response, get_object_or_404
from datetime import datetime
from math import *
from flickrapi import FlickrAPI
from django.core... | 0 | 0 | 0 | 0 | 0 | 8,773 | 0 | 195 | 592 |
9879f1cf19982e777aa4b4987cd2a585d02d48f0 | 4,348 | py | Python | src/enamlnative/android/android_image_view.py | codelv/enaml-native | 04c3a015bcd649f374c5ecd98fcddba5e4fbdbdc | [
"MIT"
] | 237 | 2017-09-15T19:31:45.000Z | 2022-03-17T04:22:20.000Z | src/enamlnative/android/android_image_view.py | codelv/enaml-native | 04c3a015bcd649f374c5ecd98fcddba5e4fbdbdc | [
"MIT"
] | 74 | 2017-09-06T20:16:41.000Z | 2022-03-05T13:34:35.000Z | src/enamlnative/android/android_image_view.py | codelv/enaml-native | 04c3a015bcd649f374c5ecd98fcddba5e4fbdbdc | [
"MIT"
] | 22 | 2017-09-15T19:32:11.000Z | 2022-03-17T18:33:39.000Z | """
Copyright (c) 2017, Jairus Martin.
Distributed under the terms of the MIT License.
The full license is in the file LICENSE, distributed with this software.
Created on July 6, 2017
@author: jrm
"""
| 35.349593 | 79 | 0.622355 | """
Copyright (c) 2017, Jairus Martin.
Distributed under the terms of the MIT License.
The full license is in the file LICENSE, distributed with this software.
Created on July 6, 2017
@author: jrm
"""
from atom.api import Typed, set_default
from enamlnative.widgets.image_view import ProxyImageView
from .android_v... | 0 | 0 | 0 | 3,718 | 0 | 0 | 0 | 143 | 274 |
133d41e356882f26e51c05bbf4d12aee972772d8 | 699 | py | Python | tests/unit_tests.py | kairstenfay/Tinder | c6b2c73f7b8c8244795f7753198a1979da29a2ef | [
"MIT"
] | null | null | null | tests/unit_tests.py | kairstenfay/Tinder | c6b2c73f7b8c8244795f7753198a1979da29a2ef | [
"MIT"
] | null | null | null | tests/unit_tests.py | kairstenfay/Tinder | c6b2c73f7b8c8244795f7753198a1979da29a2ef | [
"MIT"
] | null | null | null | import unittest
sys.path.insert(0, str(Path(__file__).parent.parent))
if __name__ == '__main__':
unittest.main()
| 24.964286 | 69 | 0.597997 | import unittest
sys.path.insert(0, str(Path(__file__).parent.parent))
from lib.io import read_json
class TestHarvest(unittest.TestCase):
def setUp(self):
self.data = read_json()
def testInstances(self):
self.assertEqual(self.instances, {
'target': None,
'complete_tos'... | 0 | 0 | 0 | 528 | 0 | 0 | 0 | 7 | 46 |
f0107eafdab4f32711f7ff8dddcac518075514f1 | 551 | py | Python | tests/conftest.py | axiom-data-science/erddap-metrics | a5a96710605448f5f6cb8b2d6c5d856d31dcb523 | [
"Apache-2.0"
] | 3 | 2021-01-13T18:04:43.000Z | 2021-08-20T23:52:28.000Z | tests/conftest.py | axiom-data-science/erddap-metrics | a5a96710605448f5f6cb8b2d6c5d856d31dcb523 | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | axiom-data-science/erddap-metrics | a5a96710605448f5f6cb8b2d6c5d856d31dcb523 | [
"Apache-2.0"
] | 1 | 2021-01-13T18:04:57.000Z | 2021-01-13T18:04:57.000Z | #!python
# coding=utf-8
| 23.956522 | 97 | 0.780399 | #!python
# coding=utf-8
import pytest
import responses
from erddap_metrics.lib.erddap_metrics import ErddapMetrics
@pytest.fixture
def mocked_responses():
# Use to mock calls to requests library
# https://github.com/getsentry/responses
with responses.RequestsMock(assert_all_requests_are_fired=False) as ... | 0 | 386 | 0 | 0 | 0 | 0 | 0 | 25 | 114 |
c07856d51a08b8678414b494cb30fd1e6711ee69 | 11,935 | py | Python | tests/test_rio_info.py | johanvdw/rasterio | 0a515f127ff14739e86a2214301933b5f4acedf3 | [
"BSD-3-Clause"
] | null | null | null | tests/test_rio_info.py | johanvdw/rasterio | 0a515f127ff14739e86a2214301933b5f4acedf3 | [
"BSD-3-Clause"
] | null | null | null | tests/test_rio_info.py | johanvdw/rasterio | 0a515f127ff14739e86a2214301933b5f4acedf3 | [
"BSD-3-Clause"
] | null | null | null | import logging
import sys
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
| 26.880631 | 98 | 0.598995 | import json
import logging
import sys
from click.testing import CliRunner
import rasterio
from rasterio.rio import info
from rasterio.rio.main import main_group
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
def test_edit_nodata_err(data):
runner = CliRunner()
inputfile = str(data.join('RGB.b... | 0 | 0 | 0 | 0 | 0 | 10,702 | 0 | 25 | 1,078 |
5676df5a20f80caeeb952bbf83a6e8e37af40189 | 405 | py | Python | main.py | albul-k/scraper_smart-lab.ru | 89327e227e294e312fb6bebf93b9a6d41be8af98 | [
"MIT"
] | null | null | null | main.py | albul-k/scraper_smart-lab.ru | 89327e227e294e312fb6bebf93b9a6d41be8af98 | [
"MIT"
] | null | null | null | main.py | albul-k/scraper_smart-lab.ru | 89327e227e294e312fb6bebf93b9a6d41be8af98 | [
"MIT"
] | null | null | null |
from scrapy.crawler import CrawlerProcess
from scrapy.settings import Settings
from smartlab import settings
from smartlab.spiders.smartlab_dividend import SmartlabDividendSpider
if __name__ == '__main__':
crawl_settings = Settings()
crawl_settings.setmodule(settings)
crawl_proc = CrawlerProcess(settings... | 28.928571 | 69 | 0.809877 |
from scrapy.crawler import CrawlerProcess
from scrapy.settings import Settings
from smartlab import settings
from smartlab.spiders.smartlab_dividend import SmartlabDividendSpider
if __name__ == '__main__':
crawl_settings = Settings()
crawl_settings.setmodule(settings)
crawl_proc = CrawlerProcess(settings... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8b9d4eaa41a79adaf5f4d145fd6d5bbbcec75438 | 222 | py | Python | ipetgui/__init__.py | stephenjmaher/ipet | 3a23d81ba6ed7cb41e86211cb0507170e8cd205a | [
"MIT"
] | 14 | 2016-12-20T06:49:32.000Z | 2021-05-12T11:17:27.000Z | ipetgui/__init__.py | stephenjmaher/ipet | 3a23d81ba6ed7cb41e86211cb0507170e8cd205a | [
"MIT"
] | 69 | 2016-12-15T16:37:27.000Z | 2021-08-16T10:12:36.000Z | ipetgui/__init__.py | stephenjmaher/ipet | 3a23d81ba6ed7cb41e86211cb0507170e8cd205a | [
"MIT"
] | 11 | 2016-12-30T07:46:18.000Z | 2021-10-09T02:34:45.000Z | # -*- coding: utf-8 -*-
__all__ = ["ExperimentManagement",
]
| 31.714286 | 60 | 0.824324 | # -*- coding: utf-8 -*-
from .IpetEvaluationEditorApp import IpetEvaluationEditorApp
from .IpetPbHistoryWindow import IpetPbHistoryWindow
from .QIPETApplication import QIPETApplication
__all__ = ["ExperimentManagement",
]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 95 | 66 |
e2dd2151dfc240ee32b4dd93b1af07435104245a | 1,783 | py | Python | src/gcc/mem_profile_run.py | vishalbelsare/iisignature | fd26aeaddac0577d44163586f8394d4255cca586 | [
"MIT"
] | 52 | 2016-06-02T14:51:49.000Z | 2022-03-02T12:03:35.000Z | src/gcc/mem_profile_run.py | ViewFuture/iisignature | 14084c0fb5661943ef944ff23492c6aeb50d7896 | [
"MIT"
] | 16 | 2017-08-15T13:52:20.000Z | 2022-01-15T18:17:37.000Z | src/gcc/mem_profile_run.py | ViewFuture/iisignature | 14084c0fb5661943ef944ff23492c6aeb50d7896 | [
"MIT"
] | 16 | 2016-12-03T20:41:07.000Z | 2022-01-06T11:40:23.000Z | import sqlite3
#valgrind -q --tool=massif --massif-out-file=mem_profile.massif --depth=1 ./mem_profilee 2 8 S H
##ms_print massif.out.`cat mem_profile_pid.txt`
##ms_print mem_profile.massif
#grep mem_heap_B mem_profile.massif |cut -c 12- |sort -n | tail -n 1
con = sqlite3.connect("mem_profile.sqlite")
con.cursor().ex... | 37.145833 | 133 | 0.637128 | import subprocess, sqlite3
#valgrind -q --tool=massif --massif-out-file=mem_profile.massif --depth=1 ./mem_profilee 2 8 S H
##ms_print massif.out.`cat mem_profile_pid.txt`
##ms_print mem_profile.massif
#grep mem_heap_B mem_profile.massif |cut -c 12- |sort -n | tail -n 1
def get_usage(d,m, use_compiled, use_lyndon):
... | 0 | 0 | 0 | 0 | 0 | 960 | 0 | 12 | 46 |
3fd797f815d3bbcd0991c6234751e93c4147276f | 3,943 | py | Python | data/load_data_gse68465.py | lucasvenez/mult | d5977f628f89a7f8f3ff31ba5c0b0be908d5e5c1 | [
"Apache-2.0"
] | 12 | 2020-10-13T01:27:35.000Z | 2021-11-22T13:42:26.000Z | data/load_data_gse68465.py | lucasvenez/mult | d5977f628f89a7f8f3ff31ba5c0b0be908d5e5c1 | [
"Apache-2.0"
] | null | null | null | data/load_data_gse68465.py | lucasvenez/mult | d5977f628f89a7f8f3ff31ba5c0b0be908d5e5c1 | [
"Apache-2.0"
] | 2 | 2020-10-12T13:40:41.000Z | 2022-03-29T05:28:59.000Z | from data import load_data_gse
def load_data_gse68465(verbose=-1, read_as_ndarray=False):
"""
This method loads the data set of the project GSE68465 available at
https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE68465. This project
reports a large, training/testing, multi-site, blinded validation... | 39.43 | 106 | 0.684251 | from data import load_data_gse
import pandas as pd
def processing_gse68465(clinical):
assert isinstance(clinical, pd.DataFrame), \
'Invalid clinical type. It should be a pandas data frame.'
# cleaning clinical markers
clinical = clinical.replace({'na': None, 'NA': None, 'Unknown': None})
c... | 0 | 0 | 0 | 0 | 0 | 2,782 | 0 | -2 | 46 |
7c88942c3ef4a78fc2881eb6e9dbc84b32baecca | 876 | py | Python | sa/profiles/ZTE/ZXDSL98xx/get_chassis_id.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | 1 | 2019-09-20T09:36:48.000Z | 2019-09-20T09:36:48.000Z | sa/profiles/ZTE/ZXDSL98xx/get_chassis_id.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | sa/profiles/ZTE/ZXDSL98xx/get_chassis_id.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# ZTE.ZXDSL98xx.get_chassis_id
# ---------------------------------------------------------------------
# Copyright (C) 2007-2018 The NOC Project
# See LICENSE for details
# ---------------------------------------------------... | 32.444444 | 97 | 0.493151 | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# ZTE.ZXDSL98xx.get_chassis_id
# ---------------------------------------------------------------------
# Copyright (C) 2007-2018 The NOC Project
# See LICENSE for details
# ---------------------------------------------------... | 0 | 0 | 0 | 393 | 0 | 0 | 0 | 46 | 89 |
1ef6577bf132b0e73d893697c3440ea15c1d212a | 4,426 | py | Python | python/tests/unit/test_command_builder.py | digital-asset/dazl-client | 5d54edaea26d7704cc8d73e5945b37ed2806265b | [
"Apache-2.0"
] | 8 | 2019-09-08T09:41:03.000Z | 2022-02-19T12:54:30.000Z | python/tests/unit/test_command_builder.py | digital-asset/dazl-client | 5d54edaea26d7704cc8d73e5945b37ed2806265b | [
"Apache-2.0"
] | 55 | 2019-05-30T23:00:31.000Z | 2022-01-24T01:51:32.000Z | python/tests/unit/test_command_builder.py | digital-asset/dazl-client | 5d54edaea26d7704cc8d73e5945b37ed2806265b | [
"Apache-2.0"
] | 9 | 2019-06-30T18:15:27.000Z | 2021-12-03T10:15:27.000Z | # Copyright (c) 2017-2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
from dazl.client.commands import CommandDefaults
from dazl.damlast.lookup import parse_type_con_name
from dazl.prim import ContractId, Party
SOME_TEMPLATE_NAME = parse_type_con... | 36.578512 | 102 | 0.638048 | # Copyright (c) 2017-2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
from unittest import TestCase
from dazl.client.commands import CommandBuilder, CommandDefaults, CommandPayload, create
from dazl.damlast.lookup import parse_type_con_name
from ... | 0 | 0 | 0 | 3,611 | 0 | 0 | 0 | 73 | 90 |
6425da93e71073c780a9415437ef2fbe735fd071 | 6,781 | py | Python | indexator/json2html.py | timtim1342/tsakorpus | 8bd136b85bc164e62be562cad102a0b0ee1fd037 | [
"MIT"
] | 7 | 2021-06-20T16:22:22.000Z | 2022-01-31T13:51:43.000Z | indexator/json2html.py | timtim1342/tsakorpus | 8bd136b85bc164e62be562cad102a0b0ee1fd037 | [
"MIT"
] | 3 | 2021-06-08T18:56:47.000Z | 2022-01-06T13:35:30.000Z | indexator/json2html.py | timtim1342/tsakorpus | 8bd136b85bc164e62be562cad102a0b0ee1fd037 | [
"MIT"
] | 6 | 2021-06-08T18:07:01.000Z | 2022-03-08T00:21:13.000Z | import sys
sys.path.insert(0, '../search/web_app')
if __name__ == '__main__':
j2h = JSON2HTML()
j2h.process_file('../corpus/beserman_multimedia/json_disamb/2014/LV_AS-2014.08.09-TA_MU-cow_1.json',
'../search/corpus_html/beserman_multimedia/1.json')
j2h.process_file('../corpus/beserm... | 43.191083 | 117 | 0.536499 | import os
import sys
import json
import re
from werkzeug.utils import secure_filename
from json_doc_reader import JSONDocReader
sys.path.insert(0, '../search/web_app')
from corpus_settings import CorpusSettings
from response_processors import SentenceViewer
class JSON2HTML:
"""
Contains methods for translati... | 0 | 0 | 0 | 6,084 | 0 | 0 | 0 | 53 | 177 |
b8b826a88e19affc912d666152aca3a34a719d46 | 1,992 | py | Python | prometheus_ncs2_exporter/main.py | adaptant-labs/prometheus_ncs2_exporter | 669cd9b355e86325475292e688eb69a03e977e7a | [
"Apache-2.0"
] | null | null | null | prometheus_ncs2_exporter/main.py | adaptant-labs/prometheus_ncs2_exporter | 669cd9b355e86325475292e688eb69a03e977e7a | [
"Apache-2.0"
] | null | null | null | prometheus_ncs2_exporter/main.py | adaptant-labs/prometheus_ncs2_exporter | 669cd9b355e86325475292e688eb69a03e977e7a | [
"Apache-2.0"
] | null | null | null |
if __name__ == '__main__':
main()
| 44.266667 | 106 | 0.653614 | import argparse
import prometheus_client
from time import sleep
from . import NCS2Exporter, NCS2DeviceExporter, UsageFormatter
def main():
parser = argparse.ArgumentParser(description='Prometheus Exporter for Intel NCS2 Metrics',
formatter_class=UsageFormatter)
parser.add_... | 0 | 0 | 0 | 0 | 0 | 1,801 | 0 | 39 | 111 |
5a54a2321f3562809615ac74a12f6ec9cd0b0448 | 24,839 | py | Python | d2lzh/ssd_utils.py | LinJianping/d2l-zh | fa4d48d1335f5f2cf5dc99e66fb975127be7e105 | [
"Apache-2.0"
] | 1 | 2019-11-19T02:32:26.000Z | 2019-11-19T02:32:26.000Z | d2lzh/ssd_utils.py | LinJianping/d2l-zh | fa4d48d1335f5f2cf5dc99e66fb975127be7e105 | [
"Apache-2.0"
] | null | null | null | d2lzh/ssd_utils.py | LinJianping/d2l-zh | fa4d48d1335f5f2cf5dc99e66fb975127be7e105 | [
"Apache-2.0"
] | null | null | null | import os
import errno
import torch
import json
import torch.nn as nn
import torchvision.transforms as transforms
import torch.optim as optim
import sys
d2lzh = sys.modules[__name__]
# Defined in file: ./chapter_preface/preface.md
from matplotlib import pyplot as plt
import d2lzh as d2l
from collections import namedt... | 36.208455 | 163 | 0.579411 | import os
import errno
from tqdm import tqdm
import torch
import json
import numpy as np
from PIL import Image
import torch.nn as nn
import torchvision.transforms as transforms
import torch.optim as optim
import torch.nn.functional as F
import sys
d2lzh = sys.modules[__name__]
# Defined in file: ./chapter_preface/pref... | 0 | 0 | 0 | 2,570 | 0 | 14,956 | 0 | -39 | 796 |
0adc93ac338432e2d493a7a375a842b18ed4d55d | 1,537 | py | Python | tests/test_lexicon.py | WithPrecedent/sourdough | 52d99ca056cda93fb3e913fbca3d9a5947ec3513 | [
"Apache-2.0"
] | null | null | null | tests/test_lexicon.py | WithPrecedent/sourdough | 52d99ca056cda93fb3e913fbca3d9a5947ec3513 | [
"Apache-2.0"
] | null | null | null | tests/test_lexicon.py | WithPrecedent/sourdough | 52d99ca056cda93fb3e913fbca3d9a5947ec3513 | [
"Apache-2.0"
] | null | null | null | """
test_lexicon: unit tests for Lexicon
Corey Rayburn Yung <coreyrayburnyung@gmail.com>
Copyright 2020-2021, Corey Rayburn Yung
License: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0)
"""
if __name__ == '__main__':
test_lexicon()
| 26.5 | 77 | 0.688354 | """
test_lexicon: unit tests for Lexicon
Corey Rayburn Yung <coreyrayburnyung@gmail.com>
Copyright 2020-2021, Corey Rayburn Yung
License: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0)
"""
import dataclasses
import sourdough
@dataclasses.dataclass
class AComponent(sourdough.project.Component):
pass
... | 0 | 120 | 0 | 0 | 0 | 1,056 | 0 | -8 | 115 |
7df171d697be07980d3ae3403ae76de2f49142b1 | 7,258 | py | Python | null_models.py | COSIN3-UOC/null_models | 72ec686eeeb07192109b888c7ed458db2b9c1974 | [
"MIT"
] | null | null | null | null_models.py | COSIN3-UOC/null_models | 72ec686eeeb07192109b888c7ed458db2b9c1974 | [
"MIT"
] | null | null | null | null_models.py | COSIN3-UOC/null_models | 72ec686eeeb07192109b888c7ed458db2b9c1974 | [
"MIT"
] | 1 | 2021-12-15T12:42:22.000Z | 2021-12-15T12:42:22.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 4 13:22:11 2021
@author: mariapalazzi
"""
import random
import numpy as np
from scipy.optimize import root
from required_functions_null_models import avg_degrees_expoRG
#%%
def exponentialRG_proportional_proportional(M):
'''
Solve the syste... | 31.833333 | 131 | 0.615597 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 4 13:22:11 2021
@author: mariapalazzi
"""
import random
import numpy as np
from scipy.optimize import root
from required_functions_null_models import avg_degrees_expoRG
#%%
def exponentialRG_proportional_proportional(M):
'''
Solve the syste... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
943f4985ff55131db2ea467bdf35f99ca2544369 | 2,112 | py | Python | GUI/ErrorsTab.py | jabez007/Training_Helpyr | 10fa5ed239dd661f3ca9239d1948a03d3ec26ce7 | [
"MIT"
] | null | null | null | GUI/ErrorsTab.py | jabez007/Training_Helpyr | 10fa5ed239dd661f3ca9239d1948a03d3ec26ce7 | [
"MIT"
] | null | null | null | GUI/ErrorsTab.py | jabez007/Training_Helpyr | 10fa5ed239dd661f3ca9239d1948a03d3ec26ce7 | [
"MIT"
] | null | null | null |
# # # #
if __name__ == '__main__':
main()
| 27.076923 | 78 | 0.508049 | from Tkinter import *
import os
import TabbedUI
from MyTab import MyTab
import Log
class ErrorsTab(MyTab):
def __init__(self, *args, **kwargs):
MyTab.__init__(self, *args, **kwargs)
self.errors = dict()
self.init_ui()
def init_ui(self):
# Errors Tabs Frame
errors_t... | 0 | 0 | 0 | 1,879 | 0 | 52 | 0 | -27 | 157 |
46181e1e3f8c2a40fd1a40df1162e5eefca2c2d3 | 775 | py | Python | src/db/config.py | pritamps/PDF-Package | 91b418dd6582c6f40f4c68df79ea0e7b378d7780 | [
"MIT"
] | null | null | null | src/db/config.py | pritamps/PDF-Package | 91b418dd6582c6f40f4c68df79ea0e7b378d7780 | [
"MIT"
] | null | null | null | src/db/config.py | pritamps/PDF-Package | 91b418dd6582c6f40f4c68df79ea0e7b378d7780 | [
"MIT"
] | null | null | null | """
Define Database Configuration
"""
APP_CONFIG = {
'development': DevelopmentConfig,
'production': ProductionConfig
}
| 22.142857 | 95 | 0.677419 | """
Define Database Configuration
"""
class Config:
"""
Common configurations
"""
SQLALCHEMY_DATABASE_URI = 'postgresql://pdfbuilder:FKQMoXB7BQyU1zp59DGu@db:5432/pdfbuilder'
SQLALCHEMY_BINDS = {
'backup': 'postgresql://pdfbuilderbackup:FKQMoXB7BQyU1zp59DGu@backupdb:5432'
'/... | 0 | 0 | 0 | 578 | 0 | 0 | 0 | 0 | 67 |
e35de8e6235aaf18b85d8b07a9fc44fe6787f8da | 1,230 | py | Python | tables3_api/__init__.py | sot/tables3_api | ca1763d92b050082eba5bb36e11143ca3bf3b645 | [
"BSD-3-Clause"
] | null | null | null | tables3_api/__init__.py | sot/tables3_api | ca1763d92b050082eba5bb36e11143ca3bf3b645 | [
"BSD-3-Clause"
] | 1 | 2017-06-05T17:05:22.000Z | 2017-06-21T14:06:47.000Z | tables3_api/__init__.py | sot/tables3_api | ca1763d92b050082eba5bb36e11143ca3bf3b645 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import tables
from distutils.version import LooseVersion
import ska_helpers
__version__ = ska_helpers.get_version(__package__)
def test(*args, **kwargs):
"""
Run py.test unit tests.
"""
import testr
return testr.test(*args, **kwargs)... | 36.176471 | 80 | 0.76748 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import tables
from distutils.version import LooseVersion
import ska_helpers
__version__ = ska_helpers.get_version(__package__)
def test(*args, **kwargs):
"""
Run py.test unit tests.
"""
import testr
return testr.test(*args, **kwargs)... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
888429a40a83538c6d94c836ba2ee5de879f5601 | 3,662 | py | Python | project/core/views.py | bmogyorodi/recipe_search | 0e7fa4b961342b6c37f36f444337109836618938 | [
"BSD-3-Clause"
] | 1 | 2021-08-13T08:33:09.000Z | 2021-08-13T08:33:09.000Z | project/core/views.py | bmogyorodi/recipe_search | 0e7fa4b961342b6c37f36f444337109836618938 | [
"BSD-3-Clause"
] | null | null | null | project/core/views.py | bmogyorodi/recipe_search | 0e7fa4b961342b6c37f36f444337109836618938 | [
"BSD-3-Clause"
] | 2 | 2021-08-13T08:33:35.000Z | 2022-02-21T19:42:23.000Z |
from data.models import Ingredient
search_ingredients = list(Ingredient.objects.values_list("title", flat=True))
search_ingredients.remove("")
| 36.989899 | 79 | 0.621245 | from django.shortcuts import render
from django.core.paginator import Paginator
from django.db.models import Count
from data.models import Recipe, Ingredient, Tag
from data.search import recipe_search
from time import time
search_ingredients = list(Ingredient.objects.values_list("title", flat=True))
search_ingredie... | 0 | 0 | 0 | 0 | 0 | 3,279 | 0 | 78 | 157 |
478bbe45749ad5ef790ad64584389bfca2e71184 | 5,174 | py | Python | src/ZEO/scripts/zeopack.py | azmeuk/ZEO | 8de475763467b054d87ad310f1696cc713db9135 | [
"ZPL-2.1"
] | 40 | 2015-11-26T18:40:29.000Z | 2022-03-15T06:45:43.000Z | src/ZEO/scripts/zeopack.py | azmeuk/ZEO | 8de475763467b054d87ad310f1696cc713db9135 | [
"ZPL-2.1"
] | 138 | 2015-01-05T16:05:09.000Z | 2022-03-31T14:02:40.000Z | src/ZEO/scripts/zeopack.py | azmeuk/ZEO | 8de475763467b054d87ad310f1696cc713db9135 | [
"ZPL-2.1"
] | 24 | 2015-04-03T07:05:13.000Z | 2021-12-24T06:10:54.000Z | #!/usr/bin/env python2.3
usage = """Usage: %prog [options] [servers]
Pack one or more storages hosted by ZEO servers.
The positional arguments specify 0 or more tcp servers to pack, where
each is of the form:
host:port[:name]
"""
WAIT = 10 # wait no more than 10 seconds for client to connect
if __name__ == "... | 28.119565 | 76 | 0.54194 | #!/usr/bin/env python2.3
import logging
import optparse
import socket
import sys
import time
import traceback
import ZEO.ClientStorage
from six.moves import map
from six.moves import zip
usage = """Usage: %prog [options] [servers]
Pack one or more storages hosted by ZEO servers.
The positional arguments specify 0 o... | 0 | 0 | 0 | 0 | 0 | 4,622 | 0 | -36 | 245 |
4fbfe08aa627d5cc2b383f3fa8353d8b4d0264df | 3,449 | py | Python | lg_common/src/lg_common/managed_window.py | carlosvquezada/lg_ros_nodes | 7560e99272d06ef5c80a5444131dad72c078a718 | [
"Apache-2.0"
] | null | null | null | lg_common/src/lg_common/managed_window.py | carlosvquezada/lg_ros_nodes | 7560e99272d06ef5c80a5444131dad72c078a718 | [
"Apache-2.0"
] | null | null | null | lg_common/src/lg_common/managed_window.py | carlosvquezada/lg_ros_nodes | 7560e99272d06ef5c80a5444131dad72c078a718 | [
"Apache-2.0"
] | null | null | null |
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
| 30.522124 | 94 | 0.581618 | import rospy
import subprocess
import threading
import re
from lg_common.msg import WindowGeometry
import awesome
class ManagedWindow(object):
def __init__(self, w_name=None, w_class=None, w_instance=None,
geometry=None, visible=True, chrome_kiosk_workaround=False):
self.w_name = w_name
... | 0 | 1,420 | 0 | 1,835 | 0 | 0 | 0 | -18 | 156 |
31b425a735268e180e4e8027dbcbd72731ddf94a | 2,913 | py | Python | tests/test_hyperloglog.py | ShadowJonathan/txredisapi | 5da94b91e7936af8fddba824da21cde428581996 | [
"Apache-2.0"
] | 104 | 2015-01-05T16:10:44.000Z | 2019-10-14T14:59:10.000Z | tests/test_hyperloglog.py | ShadowJonathan/txredisapi | 5da94b91e7936af8fddba824da21cde428581996 | [
"Apache-2.0"
] | 55 | 2015-01-22T11:25:20.000Z | 2019-11-19T21:39:32.000Z | tests/test_hyperloglog.py | ShadowJonathan/txredisapi | 5da94b91e7936af8fddba824da21cde428581996 | [
"Apache-2.0"
] | 50 | 2015-03-01T10:26:28.000Z | 2019-11-17T23:26:51.000Z | # coding: utf-8
# Copyright 2009 Alexandre Fiori
#
# 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... | 34.270588 | 74 | 0.628562 | # coding: utf-8
# Copyright 2009 Alexandre Fiori
#
# 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... | 0 | 1,680 | 0 | 451 | 0 | 0 | 0 | 76 | 114 |
755867e640b3e9aa0483afbaf0a9529f9ac14052 | 1,507 | py | Python | components/studio/files/tests.py | aitmlouk/stackn | c8029394a15b03796a4864938f9db251b65c7354 | [
"Apache-2.0"
] | 25 | 2020-05-08T22:24:54.000Z | 2022-03-11T18:16:58.000Z | components/studio/files/tests.py | aitmlouk/stackn | c8029394a15b03796a4864938f9db251b65c7354 | [
"Apache-2.0"
] | 75 | 2020-05-08T22:15:59.000Z | 2021-11-22T10:00:04.000Z | components/studio/files/tests.py | aitmlouk/stackn | c8029394a15b03796a4864938f9db251b65c7354 | [
"Apache-2.0"
] | 12 | 2020-11-04T13:09:46.000Z | 2022-03-14T16:22:40.000Z | from django.conf import settings
base_dir = settings.GIT_REPOS_ROOT
| 28.980769 | 86 | 0.698739 | import os
import pathlib
import shutil
from django.test import TestCase
from django.contrib.auth.models import User
from django.conf import settings
from .helpers import _create_userdir, _safe_to_create, create_repository
base_dir = settings.GIT_REPOS_ROOT
class FilesTestCase(TestCase):
def setUp(self):
... | 0 | 0 | 0 | 1,225 | 0 | 0 | 0 | 57 | 155 |
37343c9d70f7a8de6f910b99303fe94699270b70 | 83 | py | Python | HackerRank/Python/Introduction/Arithmetic Operators.py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | HackerRank/Python/Introduction/Arithmetic Operators.py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | HackerRank/Python/Introduction/Arithmetic Operators.py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | a=int(input())
b=int(input())
print ("""{a+b}
{a-b}
{a*b}""")
| 11.857143 | 19 | 0.349398 | a=int(input())
b=int(input())
print ("""{a+b}
{a-b}
{a*b}""")
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5ac2cce3590436cc23fcfc34ea006b85943beee0 | 11,178 | py | Python | controllers/turistas entrantes ine_controller.py | SergioCMDev/Busines-Inteligence-applied-to-tourism | 61834a46fce22453e94b7bbdf8d4ecdcf128285a | [
"Apache-2.0"
] | null | null | null | controllers/turistas entrantes ine_controller.py | SergioCMDev/Busines-Inteligence-applied-to-tourism | 61834a46fce22453e94b7bbdf8d4ecdcf128285a | [
"Apache-2.0"
] | null | null | null | controllers/turistas entrantes ine_controller.py | SergioCMDev/Busines-Inteligence-applied-to-tourism | 61834a46fce22453e94b7bbdf8d4ecdcf128285a | [
"Apache-2.0"
] | null | null | null | from ..DB.Repositorio_Turistas_Entrantes_INE import RepositoryTuristasEntrantesINE as DBRepository
from ..Utilidades.Conversores import Conversores as Conversor
def obtener_porcentaje_turistas_entrantes_en_ciudad_destino_desde_ciudad_origen_en_rango_anio_mensualmente(CiudadDestino, CiudadOrigen, AnioInicio, AnioFin):... | 40.647273 | 219 | 0.763285 | from ..DB.Repositorio_Turistas_Entrantes_INE import RepositoryTuristasEntrantesINE as DBRepository
from ..Utilidades.Conversores import Conversores as Conversor
def obtener_porcentaje_turistas_entrantes_en_ciudad_destino_desde_ciudad_origen_en_rango_anio_mensualmente(CiudadDestino, CiudadOrigen, AnioInicio, AnioFin):... | 72 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0b7009bcdc5db355d12c4f4c0cb1c7074cb5b9e9 | 5,787 | py | Python | components/collector/tests/source_collectors/ojaudit/test_violations.py | Erik-Stel/quality-time | 602b6970e5d9088cb89cc6d488337349e54e1c9a | [
"Apache-2.0"
] | null | null | null | components/collector/tests/source_collectors/ojaudit/test_violations.py | Erik-Stel/quality-time | 602b6970e5d9088cb89cc6d488337349e54e1c9a | [
"Apache-2.0"
] | null | null | null | components/collector/tests/source_collectors/ojaudit/test_violations.py | Erik-Stel/quality-time | 602b6970e5d9088cb89cc6d488337349e54e1c9a | [
"Apache-2.0"
] | null | null | null | """Unit tests for the OJAudit violations collector."""
| 29.227273 | 92 | 0.561604 | """Unit tests for the OJAudit violations collector."""
from ..source_collector_test_case import SourceCollectorTestCase
class OJAuditViolationsTest(SourceCollectorTestCase):
"""Unit tests for the OJAudit violations collector."""
SOURCE_TYPE = "ojaudit"
METRIC_TYPE = "violations"
async def test_viol... | 0 | 0 | 5,383 | 259 | 0 | 0 | 0 | 43 | 46 |
082f8f5fa91995970b233c68b4a4869d27e72382 | 6,944 | py | Python | test/terra/utils/ref_initialize.py | mtreinish/qiskit-aer | ef2e910b474379bb3a6f45e1b4f42cc3dc39c0c0 | [
"Apache-2.0"
] | null | null | null | test/terra/utils/ref_initialize.py | mtreinish/qiskit-aer | ef2e910b474379bb3a6f45e1b4f42cc3dc39c0c0 | [
"Apache-2.0"
] | null | null | null | test/terra/utils/ref_initialize.py | mtreinish/qiskit-aer | ef2e910b474379bb3a6f45e1b4f42cc3dc39c0c0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Test circuits and reference outputs for initialize instruction.
"""
from numpy import array, sqrt
from qiskit import Qua... | 38.364641 | 99 | 0.461262 | # -*- coding: utf-8 -*-
# Copyright 2019, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Test circuits and reference outputs for initialize instruction.
"""
from numpy import array, sqrt
from qiskit import Qua... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b3e7cc95229ebb81ae9e4c304046134dc45b170f | 1,336 | py | Python | tests/func_tests/test_hints.py | grololo06/jinja2schema | f8bb41d3bac44349fab049673f5d08cd5a8acf48 | [
"BSD-3-Clause"
] | null | null | null | tests/func_tests/test_hints.py | grololo06/jinja2schema | f8bb41d3bac44349fab049673f5d08cd5a8acf48 | [
"BSD-3-Clause"
] | 1 | 2020-09-02T13:00:23.000Z | 2020-09-02T13:00:23.000Z | tests/func_tests/test_hints.py | grololo06/jinja2schema | f8bb41d3bac44349fab049673f5d08cd5a8acf48 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# noinspection PyUnusedLocal
# noinspection PyUnusedLocal
| 23.857143 | 152 | 0.677395 | # coding: utf-8
import pytest
from jinja2 import PackageLoader, Environment
from jinja2schema.config import Config
from jinja2schema.core import infer
from jinja2schema.model import Dictionary, String
@pytest.fixture
def env():
loader = PackageLoader('tests', 'templates')
return Environment(loader=loader)
... | 0 | 219 | 0 | 0 | 0 | 713 | 0 | 75 | 247 |
758c113640674f72d739e6b93e1e55b4d8b9b772 | 2,220 | py | Python | challenge_1_test.py | canberkgurel/Path-Planning-with-Holonomic-Constraints | 939aedf4d23e8f9e21c5675f9b98b8605ea88ac2 | [
"MIT"
] | null | null | null | challenge_1_test.py | canberkgurel/Path-Planning-with-Holonomic-Constraints | 939aedf4d23e8f9e21c5675f9b98b8605ea88ac2 | [
"MIT"
] | null | null | null | challenge_1_test.py | canberkgurel/Path-Planning-with-Holonomic-Constraints | 939aedf4d23e8f9e21c5675f9b98b8605ea88ac2 | [
"MIT"
] | 1 | 2019-09-30T01:00:03.000Z | 2019-09-30T01:00:03.000Z | #!/usr/bin/env python
import sys
import unittest
if __name__ == '__main__':
if '--viz' in sys.argv:
Challenge1TestCase.VIZ = True
sys.argv.pop()
unittest.main()
| 29.210526 | 76 | 0.568919 | #!/usr/bin/env python
import sys
import numpy as np
import unittest
from path_finder import PathFinder
from path_validator import PathValidator
from path_visualizer import PathVisualizer
from waypoint import Waypoint
class Challenge1TestCase(unittest.TestCase):
VIZ = False
def setUp(self):
self.pa... | 0 | 0 | 0 | 1,839 | 0 | 0 | 0 | 58 | 134 |
407272fef3de45eeb6c18d580f32522f8ee584ea | 5,492 | py | Python | Fingerprint/Fingerprint.py | ShivamDa/Postioning_Systems_and_Techniques | 2e9c78fecd3121f9c78a673d81a40930a5e71c61 | [
"Apache-2.0"
] | 1 | 2021-12-31T01:42:22.000Z | 2021-12-31T01:42:22.000Z | Fingerprint/Fingerprint.py | ShivamDa/Postioning_Systems_and_Techniques | 2e9c78fecd3121f9c78a673d81a40930a5e71c61 | [
"Apache-2.0"
] | null | null | null | Fingerprint/Fingerprint.py | ShivamDa/Postioning_Systems_and_Techniques | 2e9c78fecd3121f9c78a673d81a40930a5e71c61 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 15 15:15:56 2021
@author: Shiv
"""
import datetime
# define the cell class
# K-nearest Neighbors(Choose 4 nearest APs out of the whole list we have)
# Calculate the barryCenter of the 4 points we found with the fingerprinting database
# -----... | 34.980892 | 126 | 0.537509 | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 15 15:15:56 2021
@author: Shiv
"""
from math import sqrt
from numpy import arange
import datetime
from operator import itemgetter as ig
class Location():
def __init__(self, x=0, y=0, z=0):
self.x = x
self.y = y
self.z = z
... | 0 | 0 | 0 | 1,926 | 0 | 1,705 | 0 | 19 | 240 |
353a8069c1d2107faef927177d814c053b772e01 | 11,668 | py | Python | src/python/CarTrackerPiCam.py | globalfish/kitt | 17bbdd21f31795a96d2bf6518ca32a8513706f5c | [
"MIT"
] | null | null | null | src/python/CarTrackerPiCam.py | globalfish/kitt | 17bbdd21f31795a96d2bf6518ca32a8513706f5c | [
"MIT"
] | null | null | null | src/python/CarTrackerPiCam.py | globalfish/kitt | 17bbdd21f31795a96d2bf6518ca32a8513706f5c | [
"MIT"
] | null | null | null | #
# Car sensor demo using OpenCV
#
# Author: vswamina, Sept 2017.
# 2017_09_09 Created from code in globalfish/FaceTracker
# With a lot of help from the Internet
import cv2
#
# Type of camera you want to use: we keep the code here but we shall use the PiCamera
#
DLINK930 = 1 # D-Link camera model 930. URL = user:pass... | 30.385417 | 95 | 0.562307 | #
# Car sensor demo using OpenCV
#
# Author: vswamina, Sept 2017.
# 2017_09_09 Created from code in globalfish/FaceTracker
# With a lot of help from the Internet
import cv2
import json
import threading
import time
from espeak import espeak
#
# Type of camera you want to use: we keep the code here but we shall use the... | 0 | 0 | 0 | 9,056 | 0 | 204 | 0 | -21 | 160 |