hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e4fe79f0f4e807d29b31e2f44b12e6c575fc1020 | 22,051 | py | Python | cime/scripts/lib/CIME/tests/SystemTests/test_system_tests_compare_two.py | meng630/GMD_E3SM_SCM | 990f84598b79f9b4763c3a825a7d25f4e0f5a565 | [
"FTL",
"zlib-acknowledgement",
"RSA-MD"
] | null | null | null | cime/scripts/lib/CIME/tests/SystemTests/test_system_tests_compare_two.py | meng630/GMD_E3SM_SCM | 990f84598b79f9b4763c3a825a7d25f4e0f5a565 | [
"FTL",
"zlib-acknowledgement",
"RSA-MD"
] | null | null | null | cime/scripts/lib/CIME/tests/SystemTests/test_system_tests_compare_two.py | meng630/GMD_E3SM_SCM | 990f84598b79f9b4763c3a825a7d25f4e0f5a565 | [
"FTL",
"zlib-acknowledgement",
"RSA-MD"
] | null | null | null | #!/usr/bin/env python
"""
This module contains unit tests of the core logic in SystemTestsCompareTwo.
"""
# Ignore privacy concerns for unit tests, so that unit tests can access
# protected members of the system under test
#
# pylint:disable=protected-access
import unittest
from collections import namedtuple
import ... | 39.166963 | 106 | 0.610993 |
c023cf3fd1c272c817e90e9cbfd190157116bcb9 | 1,506 | py | Python | training/data/r_dataset.py | ristea/arim | 1ca94f9b83c38e3c115c16c5d7b62e626303f7c8 | [
"MIT"
] | 10 | 2020-08-06T08:03:08.000Z | 2021-11-15T21:37:17.000Z | training/data/r_dataset.py | ristea/arim | 1ca94f9b83c38e3c115c16c5d7b62e626303f7c8 | [
"MIT"
] | null | null | null | training/data/r_dataset.py | ristea/arim | 1ca94f9b83c38e3c115c16c5d7b62e626303f7c8 | [
"MIT"
] | 2 | 2020-03-02T08:14:25.000Z | 2020-09-25T14:34:50.000Z | import torch.utils.data
from scipy import signal
import numpy as np
from training.utils.stft_local import stft
class RadarDataset(torch.utils.data.Dataset):
def __init__(self, path, config):
self.config = config
allData = np.load(path, allow_pickle=True)
# This should be modified in accor... | 40.702703 | 121 | 0.622178 |
f6d7dcf4d7bd2705a69d2beb706fe385cbe0d635 | 42,340 | py | Python | faculty_cli/cli.py | ASIDataScience/faculty-cli | 9acbac4d6a84ba0728ad8ef1ea03045ad966e5fb | [
"Apache-2.0"
] | 3 | 2019-01-21T13:42:31.000Z | 2019-01-30T15:31:23.000Z | faculty_cli/cli.py | ASIDataScience/faculty-cli | 9acbac4d6a84ba0728ad8ef1ea03045ad966e5fb | [
"Apache-2.0"
] | 2 | 2019-01-23T13:40:44.000Z | 2019-01-30T12:17:42.000Z | faculty_cli/cli.py | ASIDataScience/faculty-cli | 9acbac4d6a84ba0728ad8ef1ea03045ad966e5fb | [
"Apache-2.0"
] | null | null | null | # Copyright 2016-2022 Faculty Science Limited
#
# 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... | 29.139711 | 79 | 0.624539 |
bb7f7f82241737c96d74ed0cf0d71b4ed07e57e0 | 2,276 | py | Python | code/protocol.py | renes/MaverickBBQ | 432e146c371d59ef9e8050ce95264b62aac897b3 | [
"MIT"
] | 2 | 2020-01-26T16:46:44.000Z | 2021-12-12T11:22:13.000Z | code/protocol.py | renes/MaverickBBQ | 432e146c371d59ef9e8050ce95264b62aac897b3 | [
"MIT"
] | null | null | null | code/protocol.py | renes/MaverickBBQ | 432e146c371d59ef9e8050ce95264b62aac897b3 | [
"MIT"
] | 3 | 2018-08-21T20:12:56.000Z | 2021-12-12T11:22:30.000Z | import quart
def calc_chksum(bitlist):
# Berechnet die Checksumme anhand der Daten
chksum_data = 0
for i in range(12):
chksum_data |= quart.quart(bitlist[(6 + i) * 4:(6 + i) * 4 + 4]) << 22 - 2 * i
mask = 0x3331;
chksum = 0x0;
for i in range(24):
if (chksum_data >> i) & 0x01:
... | 24.73913 | 89 | 0.552724 |
b077d85df23943a302bb2586a1ba30bf50462788 | 4,824 | py | Python | src/common/genertools/__init__.py | atsu-kan/quml | 174fb68ef10c75307865a6af546d39c899a266cf | [
"Apache-2.0"
] | null | null | null | src/common/genertools/__init__.py | atsu-kan/quml | 174fb68ef10c75307865a6af546d39c899a266cf | [
"Apache-2.0"
] | 1 | 2020-04-14T12:50:26.000Z | 2020-04-14T12:50:26.000Z | src/common/genertools/__init__.py | atsu-kan/quml | 174fb68ef10c75307865a6af546d39c899a266cf | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 AIST
#
# 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, softwar... | 44.256881 | 202 | 0.71165 |
f368494b0f41904abaec0f36aea3cad8250ca933 | 3,657 | py | Python | EXPC_all_UKESM_ssp126.py | JamieDWilson/CMIP6_BCP | 9be1278f8832eb4839152686c3011c8afc6ea18f | [
"CC-BY-4.0"
] | null | null | null | EXPC_all_UKESM_ssp126.py | JamieDWilson/CMIP6_BCP | 9be1278f8832eb4839152686c3011c8afc6ea18f | [
"CC-BY-4.0"
] | null | null | null | EXPC_all_UKESM_ssp126.py | JamieDWilson/CMIP6_BCP | 9be1278f8832eb4839152686c3011c8afc6ea18f | [
"CC-BY-4.0"
] | null | null | null |
#!/usr/bin/env python3
#Control run before this script: module load jaspy
# run before this script: source /gws/pw/j05/cop26_hackathons/bristol/activate-env
from itertools import chain
import glob
import os
import xarray as xr
import numpy as np
import seawater as sw
from netCDF4 import Dataset,num2date,date2num
... | 37.701031 | 162 | 0.7621 |
a648ceb5cd09a134cf20c2d19f759748cfccf384 | 3,374 | py | Python | django_chart_app/settings.py | elduha/python2_ass2 | 68e688efb87940bdb7c421751bb52c0aa1cbc8f1 | [
"MIT"
] | null | null | null | django_chart_app/settings.py | elduha/python2_ass2 | 68e688efb87940bdb7c421751bb52c0aa1cbc8f1 | [
"MIT"
] | null | null | null | django_chart_app/settings.py | elduha/python2_ass2 | 68e688efb87940bdb7c421751bb52c0aa1cbc8f1 | [
"MIT"
] | null | null | null | """
Django settings for django_chart_app project.
Generated by 'django-admin startproject' using Django 4.0.1.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""
fro... | 26.155039 | 91 | 0.694132 |
598e2c01d494f2c027c351e45763e49703f5ca24 | 9,091 | py | Python | transfer_with_auxiliarary/utils.py | hardyqr/multilingual_VSE | 35c8776d42e368f5c0b9d972ee5cb73a2963eaf7 | [
"Apache-2.0"
] | null | null | null | transfer_with_auxiliarary/utils.py | hardyqr/multilingual_VSE | 35c8776d42e368f5c0b9d972ee5cb73a2963eaf7 | [
"Apache-2.0"
] | null | null | null | transfer_with_auxiliarary/utils.py | hardyqr/multilingual_VSE | 35c8776d42e368f5c0b9d972ee5cb73a2963eaf7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import io
import numpy as np
import collections
import sys
import pickle
import torch.nn as nn
import torc... | 32.123675 | 127 | 0.590034 |
febd2cc16d9a6517c447de141bd6629a66633745 | 726 | py | Python | docs/samples/python/simple_anonymization_example.py | msebragge/presidio | 8d8ae75a6c29521415b953104fdf5735459555d3 | [
"MIT"
] | 1 | 2021-09-23T06:54:31.000Z | 2021-09-23T06:54:31.000Z | docs/samples/python/simple_anonymization_example.py | msebragge/presidio | 8d8ae75a6c29521415b953104fdf5735459555d3 | [
"MIT"
] | 1 | 2022-01-27T20:34:16.000Z | 2022-01-27T20:34:16.000Z | docs/samples/python/simple_anonymization_example.py | msebragge/presidio | 8d8ae75a6c29521415b953104fdf5735459555d3 | [
"MIT"
] | 1 | 2021-03-22T05:38:02.000Z | 2021-03-22T05:38:02.000Z | from presidio_analyzer import AnalyzerEngine, PatternRecognizer
from presidio_anonymizer import AnonymizerEngine
from presidio_anonymizer.entities.engine import OperatorConfig
text_to_anonymize = "His name is Tom and his phone number is 212-555-5555"
analyzer = AnalyzerEngine()
anonymizer = AnonymizerEngine()
... | 34.571429 | 84 | 0.778237 |
2e33debe051166794f15ec58b80808b447c38ab8 | 4,359 | py | Python | history/02/single-channel-train/first/train.py | josslei/gesture-recog | 092ba107d0b2f45750d55e855811741c76425a06 | [
"MIT"
] | null | null | null | history/02/single-channel-train/first/train.py | josslei/gesture-recog | 092ba107d0b2f45750d55e855811741c76425a06 | [
"MIT"
] | null | null | null | history/02/single-channel-train/first/train.py | josslei/gesture-recog | 092ba107d0b2f45750d55e855811741c76425a06 | [
"MIT"
] | 2 | 2020-12-05T05:21:29.000Z | 2021-07-28T06:13:01.000Z | import torch
import torch.nn as tnn
import torchvision.datasets as dsets
import torchvision.transforms as transforms
BATCH_SIZE = 10
LEARNING_RATE = 0.01
EPOCH = 1000
N_CLASSES = 3
transform = transforms.Compose([
transforms.RandomResizedCrop(224),
transforms.RandomHorizontalFlip(),
transforms.Grayscale()... | 32.288889 | 103 | 0.605643 |
3016745f493b0e67ffaf3cc7adf14b824299808d | 2,259 | py | Python | capslock/decorators.py | tahmid-choyon/capslock | dde335b2ab73cbf7199e081fedb594d01f6c2021 | [
"MIT"
] | null | null | null | capslock/decorators.py | tahmid-choyon/capslock | dde335b2ab73cbf7199e081fedb594d01f6c2021 | [
"MIT"
] | null | null | null | capslock/decorators.py | tahmid-choyon/capslock | dde335b2ab73cbf7199e081fedb594d01f6c2021 | [
"MIT"
] | null | null | null | """
This module introduces some decorators that can
be used for some frequent tasks.
Author: Faruk Ahmad
Date: 23/02/2021
Email: faruk.csebrur@gmail.com
"""
import os
import functools
import time
from datetime import datetime
from capslock.utils import read_timing_db, write_timing_db, plot_time
import numpy as np
... | 32.73913 | 105 | 0.602922 |
dc03ff94ac5d2f4ddf2b9dfa94899bd3e357873e | 890 | py | Python | tests/common/integration_features/test_fixes_integration.py | kylelaker/checkov | 6eada26030a87f397a6bf1831827b3dc6c5dad2d | [
"Apache-2.0"
] | 5 | 2021-07-29T18:08:40.000Z | 2022-03-21T04:39:32.000Z | tests/common/integration_features/test_fixes_integration.py | kylelaker/checkov | 6eada26030a87f397a6bf1831827b3dc6c5dad2d | [
"Apache-2.0"
] | 16 | 2021-03-09T07:38:38.000Z | 2021-06-09T03:53:55.000Z | tests/common/integration_features/test_fixes_integration.py | kylelaker/checkov | 6eada26030a87f397a6bf1831827b3dc6c5dad2d | [
"Apache-2.0"
] | 2 | 2021-08-23T13:25:36.000Z | 2021-11-05T21:44:52.000Z | import os
import unittest
from checkov.common.bridgecrew.integration_features.features.fixes_integration import FixesIntegration
from checkov.common.bridgecrew.platform_integration import BcPlatformIntegration
class TestFixesIntegration(unittest.TestCase):
def test_integration_valid(self):
instance = Bc... | 28.709677 | 102 | 0.757303 |
f800c9bf9464515deca27b24f96deff4090fce39 | 729 | py | Python | src/algorithms/solution.py | trdvangraft/evoalg | 1320d564bc4820d5e403d3333970785cac574333 | [
"MIT"
] | null | null | null | src/algorithms/solution.py | trdvangraft/evoalg | 1320d564bc4820d5e403d3333970785cac574333 | [
"MIT"
] | null | null | null | src/algorithms/solution.py | trdvangraft/evoalg | 1320d564bc4820d5e403d3333970785cac574333 | [
"MIT"
] | null | null | null | import abc
import numpy as np
class Solution(metaclass=abc.ABCMeta):
@abc.abstractmethod
def unpack(self):
pass
class PSOSolution:
def __init__(self, location, velocity):
self.location = location
self.velocity = velocity
self.fitness = np.inf
self.p... | 26.035714 | 59 | 0.622771 |
29b8e07d39f653492d1974baa837843f03df0917 | 583 | py | Python | checkers.py | fruitnuke/curses | e5a38ec762b4a4618809c42234136f62afd052af | [
"Unlicense"
] | 3 | 2015-03-31T12:27:45.000Z | 2017-12-29T14:59:51.000Z | checkers.py | fruitnuke/curses | e5a38ec762b4a4618809c42234136f62afd052af | [
"Unlicense"
] | null | null | null | checkers.py | fruitnuke/curses | e5a38ec762b4a4618809c42234136f62afd052af | [
"Unlicense"
] | null | null | null | import argparse
import curses
def main(scr, n):
curses.curs_set(0)
maxy, maxx = scr.getmaxyx()
for y in range(maxy-1):
for x in range(maxx):
xx = int(x / 2)
board_row = int(y / n)
if not abs(board_row % 2 - int((xx % (2 * n)) / n)):
scr.addstr(y... | 24.291667 | 64 | 0.567753 |
4cd1984e710fcd6f9ab7a348033b86e5d69d4315 | 1,486 | py | Python | caldavclientlibrary/browser/commands/emptytrash.py | LaudateCorpus1/ccs-caldavclientlibrary | 5b1db7f3b49f03ba715f7286f71ddb9f54ddddac | [
"Apache-2.0"
] | 49 | 2016-08-22T17:34:34.000Z | 2021-11-08T09:47:45.000Z | caldavclientlibrary/browser/commands/emptytrash.py | DalavanCloud/ccs-caldavclientlibrary | ce8d554b8a0bcb13468f2dc87eef77da2302d6b3 | [
"Apache-2.0"
] | null | null | null | caldavclientlibrary/browser/commands/emptytrash.py | DalavanCloud/ccs-caldavclientlibrary | ce8d554b8a0bcb13468f2dc87eef77da2302d6b3 | [
"Apache-2.0"
] | 18 | 2017-01-21T22:28:04.000Z | 2022-03-26T11:57:30.000Z | ##
# Copyright (c) 2007-2016 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 30.958333 | 82 | 0.692463 |
dab1378eca306cda8b445bed76b3cc1ff41490b1 | 2,301 | py | Python | theories/symcollab/theories/listing.py | symcollab/CryptoSolve | fc5c709cfeb9de7728b7baddc5d5da60d13ede0a | [
"BSD-3-Clause"
] | 1 | 2021-02-09T20:06:29.000Z | 2021-02-09T20:06:29.000Z | theories/symcollab/theories/listing.py | symcollab/CryptoSolve | fc5c709cfeb9de7728b7baddc5d5da60d13ede0a | [
"BSD-3-Clause"
] | null | null | null | theories/symcollab/theories/listing.py | symcollab/CryptoSolve | fc5c709cfeb9de7728b7baddc5d5da60d13ede0a | [
"BSD-3-Clause"
] | null | null | null | """
The listing module is responsible for defining
a list symbolically. Also contains common
computations on lists.
"""
from symcollab.algebra import Constant, Function, Variable
from symcollab.rewrite import RewriteRule, RewriteSystem
from .inductive import Inductive, TheorySystem
from .nat import Nat
__all__ = ['Lis... | 28.407407 | 113 | 0.703607 |
d34b3c24a5631791682521968bb0fb08805f63e8 | 849 | py | Python | test/win/gyptest-link-tsaware.py | chlorm-forks/gyp | a8921fcaab1a18c8cf7e4ab09ceb940e336918ec | [
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | test/win/gyptest-link-tsaware.py | chlorm-forks/gyp | a8921fcaab1a18c8cf7e4ab09ceb940e336918ec | [
"BSD-3-Clause"
] | 1,432 | 2017-06-21T04:08:48.000Z | 2020-08-25T16:21:15.000Z | test/win/gyptest-link-tsaware.py | chlorm-forks/gyp | a8921fcaab1a18c8cf7e4ab09ceb940e336918ec | [
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Make sure tsaware setting is extracted properly.
"""
import TestGyp
import sys
if sys.platform == 'win32':
test = TestGyp.TestGyp(f... | 24.970588 | 79 | 0.713781 |
07852ef18b228f340aba9104f87d2e86ba535d9b | 267 | py | Python | freckle_budgets/tests/urls.py | bitmazk/django-freckle-budgets | 377752fb377121ed065e189c84671c8afb76fbd0 | [
"MIT"
] | null | null | null | freckle_budgets/tests/urls.py | bitmazk/django-freckle-budgets | 377752fb377121ed065e189c84671c8afb76fbd0 | [
"MIT"
] | null | null | null | freckle_budgets/tests/urls.py | bitmazk/django-freckle-budgets | 377752fb377121ed065e189c84671c8afb76fbd0 | [
"MIT"
] | null | null | null | """URLs to run the tests."""
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^admin/', include(admin.site.urls)),
url(r'^', include('freckle_budgets.urls')),
)
| 20.538462 | 51 | 0.681648 |
3d952f91bfd3bca9d699de43176200b765d96ddb | 1,212 | py | Python | 3M/W13/Test2.py | allenalvin333/Hackerrank_Prep | 26ed5b874daba4775d006824d36f9e82ea5ff1ea | [
"MIT"
] | 2 | 2021-11-25T13:38:36.000Z | 2021-11-25T13:42:56.000Z | 3M/W13/Test2.py | allenalvin333/Hackerrank_Prep | 26ed5b874daba4775d006824d36f9e82ea5ff1ea | [
"MIT"
] | null | null | null | 3M/W13/Test2.py | allenalvin333/Hackerrank_Prep | 26ed5b874daba4775d006824d36f9e82ea5ff1ea | [
"MIT"
] | 1 | 2021-11-25T13:38:43.000Z | 2021-11-25T13:38:43.000Z | # Mock Test II
#!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'findConnectedComponents' function below.
#
# The function is expected to return an INTEGER.
# The function accepts LONG_INTEGER_ARRAY d as parameter.
#
from itertools import combinations
def f(w, c=0):
whi... | 20.542373 | 57 | 0.4967 |
cc7f9fae87d137f37dde5e04c93580dd711decfd | 578 | py | Python | tools/run.py | diffiii/DFX | ac7581b0a3d1adef1da7176f94abb7f9301a03c0 | [
"MIT"
] | 1 | 2021-05-06T00:40:50.000Z | 2021-05-06T00:40:50.000Z | tools/run.py | diffiii/DFX | ac7581b0a3d1adef1da7176f94abb7f9301a03c0 | [
"MIT"
] | null | null | null | tools/run.py | diffiii/DFX | ac7581b0a3d1adef1da7176f94abb7f9301a03c0 | [
"MIT"
] | null | null | null | from src.core import Core
import time
class Run:
def __init__(self, core: Core, compiled_file: str, speed: float = 0.1):
self.__core = core
self.__speed = speed
with open(compiled_file, 'r') as file:
self.__program = file.readlines()
for i, line in enumerate(self.__prog... | 28.9 | 75 | 0.588235 |
cea277df81e67a285fbed24acb7edced8fb67351 | 7,697 | py | Python | ycommander/commands/base.py | Yasukazu/YCommander | fed500d0e0283e7c15550737e58b2ecfca2e23e7 | [
"MIT"
] | 1 | 2020-08-30T17:37:34.000Z | 2020-08-30T17:37:34.000Z | ycommander/commands/base.py | Yasukazu/Commander | fed500d0e0283e7c15550737e58b2ecfca2e23e7 | [
"MIT"
] | null | null | null | ycommander/commands/base.py | Yasukazu/Commander | fed500d0e0283e7c15550737e58b2ecfca2e23e7 | [
"MIT"
] | null | null | null | # _ __
# | |/ /___ ___ _ __ ___ _ _ ®
# | ' </ -_) -_) '_ \/ -_) '_|
# |_|\_\___\___| .__/\___|_|
# |_|
#
# Keeper Commander
# Copyright 2018 Keeper Security Inc.
# Contact: ops@keepersecurity.com
#
import argparse
import shlex
import logging
import os
import re
import csv
import sys
from tabulate imp... | 33.320346 | 120 | 0.594647 |
b795f400388b8f737dd72aca34ddbeeaa9a18102 | 1,511 | py | Python | _cron/memberships.py | Memberships-Affiliate-Management-API/membership_and_affiliate_api | 038cb2d4dfa4a47fb8e31dc9d00cd36dd28867d5 | [
"MIT"
] | 1 | 2021-08-31T15:24:48.000Z | 2021-08-31T15:24:48.000Z | _cron/memberships.py | freelancing-solutions/membership_and_affiliate_api | 038cb2d4dfa4a47fb8e31dc9d00cd36dd28867d5 | [
"MIT"
] | 1 | 2021-10-13T14:11:15.000Z | 2021-10-13T14:11:15.000Z | _cron/memberships.py | Memberships-Affiliate-Management-API/membership_and_affiliate_api | 038cb2d4dfa4a47fb8e31dc9d00cd36dd28867d5 | [
"MIT"
] | 1 | 2021-08-31T15:25:28.000Z | 2021-08-31T15:25:28.000Z | """
**Memberships Management Cron Jobs**
runs tasks to:
1. check if users paid for their membership plans
1.a if not paid then check if grace period has expired, if it expired then downgrade plan to unpaid plan
1.b send notifications to users of actions taken here
"""
__developer... | 39.763158 | 116 | 0.739246 |
c7f85db74125b8e43e413537eaf57363d8c817a1 | 1,723 | py | Python | tests/components/litterrobot/test_switch.py | kristianheljas/homeassistant-core | eb7220ff262fe81d53c929884107bcedc8af7850 | [
"Apache-2.0"
] | null | null | null | tests/components/litterrobot/test_switch.py | kristianheljas/homeassistant-core | eb7220ff262fe81d53c929884107bcedc8af7850 | [
"Apache-2.0"
] | 51 | 2020-10-14T01:19:07.000Z | 2022-03-31T06:02:48.000Z | tests/components/litterrobot/test_switch.py | kristianheljas/homeassistant-core | eb7220ff262fe81d53c929884107bcedc8af7850 | [
"Apache-2.0"
] | 1 | 2021-08-16T02:53:15.000Z | 2021-08-16T02:53:15.000Z | """Test the Litter-Robot switch entity."""
from datetime import timedelta
import pytest
from homeassistant.components.litterrobot.hub import REFRESH_WAIT_TIME
from homeassistant.components.switch import (
DOMAIN as PLATFORM_DOMAIN,
SERVICE_TURN_OFF,
SERVICE_TURN_ON,
)
from homeassistant.const import ATTR_... | 28.716667 | 85 | 0.724898 |
60d4040e36211edc53ea97e1999b74d9d63c5d60 | 2,473 | py | Python | localstack/utils/archives.py | parampavar/localstack | dc3d17305f560feb768cea8fcf9cd3c6f618a56c | [
"Apache-2.0"
] | null | null | null | localstack/utils/archives.py | parampavar/localstack | dc3d17305f560feb768cea8fcf9cd3c6f618a56c | [
"Apache-2.0"
] | null | null | null | localstack/utils/archives.py | parampavar/localstack | dc3d17305f560feb768cea8fcf9cd3c6f618a56c | [
"Apache-2.0"
] | null | null | null | import io
import logging
import os
import tarfile
import zipfile
from subprocess import Popen
from typing import Optional, Union
from .run import run
from .strings import truncate
LOG = logging.getLogger(__name__)
def is_zip_file(content):
stream = io.BytesIO(content)
return zipfile.is_zipfile(stream)
def... | 34.347222 | 96 | 0.660736 |
8239cca7908dc36304136658a4f062a1da24e2c1 | 18,803 | py | Python | WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py | JavaScriptTesting/LJS | 9818dbdb421036569fff93124ac2385d45d01c3a | [
"Apache-2.0"
] | 1 | 2019-06-18T06:52:54.000Z | 2019-06-18T06:52:54.000Z | WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py | JavaScriptTesting/LJS | 9818dbdb421036569fff93124ac2385d45d01c3a | [
"Apache-2.0"
] | null | null | null | WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py | JavaScriptTesting/LJS | 9818dbdb421036569fff93124ac2385d45d01c3a | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | 46.542079 | 175 | 0.675318 |
f809d8f2838058286bf33cf8e493c75231a6ce06 | 36,349 | py | Python | cinder/tests/unit/volume/drivers/netapp/dataontap/client/test_client_7mode.py | 2020human/cinder | 04528318848620e4ce2639ea2dd5323783dc7a1f | [
"Apache-2.0"
] | null | null | null | cinder/tests/unit/volume/drivers/netapp/dataontap/client/test_client_7mode.py | 2020human/cinder | 04528318848620e4ce2639ea2dd5323783dc7a1f | [
"Apache-2.0"
] | null | null | null | cinder/tests/unit/volume/drivers/netapp/dataontap/client/test_client_7mode.py | 2020human/cinder | 04528318848620e4ce2639ea2dd5323783dc7a1f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 Alex Meade. All rights reserved.
# Copyright (c) 2015 Dustin Schoenbrun. All rights reserved.
# Copyright (c) 2016 Mike Rooney. All rights reserved.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance wit... | 42.070602 | 79 | 0.57787 |
2c50067f0640971494d646079e6a12a29c33730c | 5,454 | py | Python | compare_gui/image_compare.py | jpypi/dup-image-search | c75100a820c290f33608993e3f9fa13b074801ab | [
"MIT"
] | 1 | 2015-11-25T10:34:24.000Z | 2015-11-25T10:34:24.000Z | compare_gui/image_compare.py | jpypi/dup-image-search | c75100a820c290f33608993e3f9fa13b074801ab | [
"MIT"
] | 1 | 2015-06-24T23:40:57.000Z | 2015-06-25T00:06:10.000Z | compare_gui/image_compare.py | jpypi/dup-image-search | c75100a820c290f33608993e3f9fa13b074801ab | [
"MIT"
] | 3 | 2015-06-11T21:37:16.000Z | 2019-06-05T10:55:27.000Z | #!/usr/bin/python
"""
image_compare.py
Takes an input file that contains, line by line, a list of:
filepath1,filepath2
Where filepath1 and filepath2 point to valid image files that may be
considered to be similar. The user decides whether they are similar
and responds YES or NO, then the... | 29.641304 | 97 | 0.63183 |
53743fadf9590687fd4da46096d382856a689919 | 2,110 | py | Python | quiz/signals/handlers.py | OnGridSystems/VeraWebApp | e6e4a43a1b65bdbca852aace4c3fe5f5c274bd9f | [
"MIT"
] | null | null | null | quiz/signals/handlers.py | OnGridSystems/VeraWebApp | e6e4a43a1b65bdbca852aace4c3fe5f5c274bd9f | [
"MIT"
] | null | null | null | quiz/signals/handlers.py | OnGridSystems/VeraWebApp | e6e4a43a1b65bdbca852aace4c3fe5f5c274bd9f | [
"MIT"
] | 2 | 2018-09-08T15:43:55.000Z | 2018-10-04T17:19:29.000Z | from django.db.models.signals import post_save, pre_save, m2m_changed
from django.dispatch import receiver
from jobboard.handlers.oracle import OracleHandler
from pipeline.tasks import candidate_level_up
from quiz.models import ExamPassed, AnswerForVerification, ActionExam
from quiz.tasks import ProcessExam, VerifyAns... | 42.2 | 104 | 0.703318 |
83f42b38285d9c629ec729791f8983fc8fc981ba | 1,596 | py | Python | lattedb/project/formfac/models/data/tsliced_spec4d.py | callat-qcd/lattedb | 75c06748f3d59332a84ec1b5794c215c5974a46f | [
"BSD-3-Clause"
] | 1 | 2019-12-11T02:33:23.000Z | 2019-12-11T02:33:23.000Z | lattedb/project/formfac/models/data/tsliced_spec4d.py | callat-qcd/lattedb | 75c06748f3d59332a84ec1b5794c215c5974a46f | [
"BSD-3-Clause"
] | 10 | 2020-01-29T17:06:01.000Z | 2021-05-31T14:41:19.000Z | lattedb/project/formfac/models/data/tsliced_spec4d.py | callat-qcd/lattedb | 75c06748f3d59332a84ec1b5794c215c5974a46f | [
"BSD-3-Clause"
] | null | null | null | """Models of time sliced spectrum 4D files.
"""
from django.db import models
from lattedb.project.formfac.models.data import (
AbstractSpectrum4DFile,
PhysicalSpectrum4DFile,
)
from lattedb.project.formfac.models.data.tsliced_savged_spec4d import (
TSlicedSAveragedSpectrum4DFile,
)
class TSlicedSpectrum4... | 28 | 82 | 0.677945 |
c55be52afccbf3889cf7ed972478bef86d423927 | 3,095 | py | Python | guild/commands/select.py | msarahan/guildai | 99bdd09683291dbc206b6dde1b327d47401d29eb | [
"Apache-2.0"
] | null | null | null | guild/commands/select.py | msarahan/guildai | 99bdd09683291dbc206b6dde1b327d47401d29eb | [
"Apache-2.0"
] | null | null | null | guild/commands/select.py | msarahan/guildai | 99bdd09683291dbc206b6dde1b327d47401d29eb | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-2022 TensorHub, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 25.368852 | 76 | 0.676898 |
056c7f84d185c43dc7e01c75a55903bd54aed776 | 735 | py | Python | SparkCourses/20-02-2019/Section2/word-count-better-sorted.py | AUIArafat/udemy_pyspark_taming | 000ab1c138b47b40e1218d935ab7910be9a06234 | [
"MIT"
] | null | null | null | SparkCourses/20-02-2019/Section2/word-count-better-sorted.py | AUIArafat/udemy_pyspark_taming | 000ab1c138b47b40e1218d935ab7910be9a06234 | [
"MIT"
] | null | null | null | SparkCourses/20-02-2019/Section2/word-count-better-sorted.py | AUIArafat/udemy_pyspark_taming | 000ab1c138b47b40e1218d935ab7910be9a06234 | [
"MIT"
] | null | null | null | import re
from pyspark import SparkConf, SparkContext
def normalizeWords(text):
return re.compile(r'\W+', re.UNICODE).split(text.lower())
conf = SparkConf().setMaster("local").setAppName("WordCount")
sc = SparkContext(conf = conf)
input = sc.textFile("/home/bjit-557/BigData/February/SparkCourses/20-02-2... | 33.409091 | 97 | 0.677551 |
7d10b6b3eac41c85a5dbf5003938da66683e6a54 | 620 | py | Python | tradit-inscriptio/app_utils/db_setup.py | Ncediso/tradit-inscriptio | cd00dd4b31b100d96a15c4c38af9cd67cfeba23e | [
"MIT"
] | null | null | null | tradit-inscriptio/app_utils/db_setup.py | Ncediso/tradit-inscriptio | cd00dd4b31b100d96a15c4c38af9cd67cfeba23e | [
"MIT"
] | null | null | null | tradit-inscriptio/app_utils/db_setup.py | Ncediso/tradit-inscriptio | cd00dd4b31b100d96a15c4c38af9cd67cfeba23e | [
"MIT"
] | null | null | null | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
import traceback
# print("I have been called {}".format(__name__))
engine = create_engine('sqlite:///kga_reporting.db', convert_unicode=True)
db_session = scoped_session(... | 34.444444 | 89 | 0.783871 |
c14643cdc4e541cb651c7e20605c787c1dc91dfe | 63,664 | py | Python | theano/gpuarray/basic_ops.py | eigenfoo/Theano-PyMC | d079273a9f8f8991923391eb7a83416bdd1b659e | [
"BSD-3-Clause"
] | null | null | null | theano/gpuarray/basic_ops.py | eigenfoo/Theano-PyMC | d079273a9f8f8991923391eb7a83416bdd1b659e | [
"BSD-3-Clause"
] | null | null | null | theano/gpuarray/basic_ops.py | eigenfoo/Theano-PyMC | d079273a9f8f8991923391eb7a83416bdd1b659e | [
"BSD-3-Clause"
] | null | null | null | import copy
import os
import re
from collections import deque
import numpy as np
import theano
from theano import Apply, Op, Type, Variable, config, tensor
from theano.gof import COp, HideC, ParamsType
from theano.gof.opt import copy_stack_trace
from theano.gof.utils import MethodNotDefined
from theano.gradient impor... | 31.784324 | 127 | 0.521629 |
5a2f533fd6ada0e6469e1955b7d675f4155d90e0 | 7,455 | py | Python | nova/api/openstack/compute/migrate_server.py | adallaway/nova | e73000e9e0699f9396bba3c7e87789d85ca59a2d | [
"Apache-2.0"
] | 1 | 2021-06-10T17:08:14.000Z | 2021-06-10T17:08:14.000Z | nova/api/openstack/compute/migrate_server.py | adallaway/nova | e73000e9e0699f9396bba3c7e87789d85ca59a2d | [
"Apache-2.0"
] | 1 | 2021-02-16T10:17:26.000Z | 2021-02-17T17:44:15.000Z | nova/api/openstack/compute/migrate_server.py | wmousa/nova | a7dd1f8881484ba0bf4270dd48109c2be142c333 | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 OpenStack Foundation
# Copyright 2013 IBM Corp.
#
# 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 requir... | 45.457317 | 78 | 0.639302 |
572ab08138903089779b7198b63faa5aab83636f | 4,185 | py | Python | examples/butteryfly_network.py | eric-downes/mesh-networking | 7e5ea32038b4e082e5e408213cb900e5cbe1a72c | [
"MIT"
] | 368 | 2015-01-30T21:33:39.000Z | 2022-03-19T14:34:02.000Z | examples/butteryfly_network.py | eric-downes/mesh-networking | 7e5ea32038b4e082e5e408213cb900e5cbe1a72c | [
"MIT"
] | 10 | 2015-08-07T02:14:30.000Z | 2019-06-13T21:53:37.000Z | examples/butteryfly_network.py | eric-downes/mesh-networking | 7e5ea32038b4e082e5e408213cb900e5cbe1a72c | [
"MIT"
] | 76 | 2015-03-01T00:27:34.000Z | 2022-03-01T14:51:21.000Z | # -*- coding: utf-8 -*-
# Nick Sweeting 2016/10/08
# Butterfly Network
#
# Simulate a butterfly network where addresses can be used to determine routing paths.
# MIT 6.042J Mathematics for Computer Science: Lecture 9
# https://www.youtube.com/watch?v=bTyxpoi2dmM
import math
import time
from mesh.node import Node
from... | 33.75 | 135 | 0.590681 |
b2f421969d872d9031ea751dfa9a91c7a6e59b33 | 7,444 | py | Python | electronics_lib/EInk_E2154fs091.py | tengisd/PolymorphicBlocks | 240a11f813762c4eb5a97c9d9766a0af19cd8f3a | [
"BSD-3-Clause"
] | null | null | null | electronics_lib/EInk_E2154fs091.py | tengisd/PolymorphicBlocks | 240a11f813762c4eb5a97c9d9766a0af19cd8f3a | [
"BSD-3-Clause"
] | null | null | null | electronics_lib/EInk_E2154fs091.py | tengisd/PolymorphicBlocks | 240a11f813762c4eb5a97c9d9766a0af19cd8f3a | [
"BSD-3-Clause"
] | null | null | null | from typing import *
from electronics_abstract_parts import *
class E2154fs091_Device(DiscreteChip, FootprintBlock):
def __init__(self) -> None:
super().__init__()
self.pwr = self.Port(VoltageSink(
voltage_limits=(2.4, 3.6)*Volt, current_draw=(0, 10)*mAmp
), [Power])
self.gnd = self.Port(Grou... | 42.295455 | 168 | 0.659592 |
19a0d6a428da35a00321505eb8ae21fd010896c4 | 1,744 | py | Python | tests/test_config.py | PontusPersson/iotedgehubdev | 52291bda1452e5e0708577ee163b0593b2949017 | [
"MIT"
] | 80 | 2018-09-11T07:28:42.000Z | 2022-03-01T06:51:42.000Z | tests/test_config.py | PontusPersson/iotedgehubdev | 52291bda1452e5e0708577ee163b0593b2949017 | [
"MIT"
] | 176 | 2018-09-11T07:11:22.000Z | 2022-03-28T17:12:16.000Z | tests/test_config.py | PontusPersson/iotedgehubdev | 52291bda1452e5e0708577ee163b0593b2949017 | [
"MIT"
] | 35 | 2018-11-05T02:53:06.000Z | 2022-03-18T16:53:27.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import os
import unittest
from iotedgehubdev import configs
from iotedgehubdev.hostplatform import HostPlatform
class TestGetIniConfig(unittest.TestCase):
@classmethod
def cleanup(cls):
iniFile = HostPlatfo... | 29.559322 | 70 | 0.681193 |
e6d4cadcfd491b323aa76b6d98fb9cc34d917ec6 | 213 | py | Python | mischief/views/base_view.py | lemming-online/mischief | 1bddca9214141b62da279092be57f3d7b6377015 | [
"MIT"
] | null | null | null | mischief/views/base_view.py | lemming-online/mischief | 1bddca9214141b62da279092be57f3d7b6377015 | [
"MIT"
] | 2 | 2017-10-31T02:26:31.000Z | 2017-12-07T01:09:25.000Z | mischief/views/base_view.py | lemming-online/mischief | 1bddca9214141b62da279092be57f3d7b6377015 | [
"MIT"
] | null | null | null | from flask_classful import FlaskView
class BaseView(FlaskView):
# base view to add default parameter
base_args = ['args']
# this will prevent flask_classful from
# adding an "<args>" parameter to the URL
| 26.625 | 43 | 0.746479 |
1867b97d7ca58b68856fa495cd303ca6907bbe10 | 9,033 | py | Python | git_number.py | azunite/chrome_build | fed8b4e9c12aa9a0e33680e223b6327a65b2c268 | [
"BSD-3-Clause"
] | 12 | 2015-08-28T06:19:25.000Z | 2019-02-19T10:05:58.000Z | git_number.py | azunite/chrome_build | fed8b4e9c12aa9a0e33680e223b6327a65b2c268 | [
"BSD-3-Clause"
] | 1 | 2017-06-18T00:25:03.000Z | 2017-11-29T16:01:48.000Z | git_number.py | azunite/chrome_build | fed8b4e9c12aa9a0e33680e223b6327a65b2c268 | [
"BSD-3-Clause"
] | 19 | 2016-03-25T08:12:35.000Z | 2022-02-14T06:05:26.000Z | #!/usr/bin/env python
# Copyright 2013 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.
"""Usage: %prog [options] [<commitref>]*
If no <commitref>'s are supplied, it defaults to HEAD.
Calculates the generation number for ... | 31.694737 | 80 | 0.680173 |
b1d4909e988c09be4a277b2137820649e648fb55 | 589 | py | Python | default.py | mpomarlan/abe_sim | 288d641662d78dc2f2086570d2a7a7099dfb76a2 | [
"BSD-2-Clause"
] | null | null | null | default.py | mpomarlan/abe_sim | 288d641662d78dc2f2086570d2a7a7099dfb76a2 | [
"BSD-2-Clause"
] | null | null | null | default.py | mpomarlan/abe_sim | 288d641662d78dc2f2086570d2a7a7099dfb76a2 | [
"BSD-2-Clause"
] | 2 | 2021-03-17T15:07:51.000Z | 2021-07-06T19:50:43.000Z | from morse.builder import *
from abe_sim.builder.robots import Abe
from morse.core import blenderapi
import time
import math
robot = Abe()
robot.translate(1.0, 0.0, 0.0)
robot.add_default_interface('socket')
#env = Environment('abe_sim/environments/abe_sim.blend', fastmode = False)
env = Environment('abe_sim/envi... | 26.772727 | 88 | 0.752122 |
b88b9ae087698d4a88b76b6c4fe911812955c214 | 6,023 | py | Python | decorators.py | opengovt/openroads-geostore | 336bdc352252ae34a66746e632ae0b8df66c04c0 | [
"MIT"
] | 1 | 2019-10-11T14:43:53.000Z | 2019-10-11T14:43:53.000Z | decorators.py | opengovt/openroads-geostore | 336bdc352252ae34a66746e632ae0b8df66c04c0 | [
"MIT"
] | null | null | null | decorators.py | opengovt/openroads-geostore | 336bdc352252ae34a66746e632ae0b8df66c04c0 | [
"MIT"
] | null | null | null | from functions import *
from settings import *
from cookie import *
import urllib
import logging
def api_logged_in_required(permissions=[], level=1):
def decorator(fn):
'''So we can decorate any RequestHandler with #@admin_required'''
def wrapper(self, *args, **kwargs):
response = {
... | 37.880503 | 80 | 0.474514 |
0866152fefe989c442e5152de6ecb122a43a82b4 | 662 | py | Python | tests/dlkit/primordium/locale/types/test_format.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 2 | 2018-02-23T12:16:11.000Z | 2020-10-08T17:54:24.000Z | tests/dlkit/primordium/locale/types/test_format.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 87 | 2017-04-21T18:57:15.000Z | 2021-12-13T19:43:57.000Z | tests/dlkit/primordium/locale/types/test_format.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 1 | 2018-03-01T16:44:25.000Z | 2018-03-01T16:44:25.000Z | import pytest
from dlkit.abstract_osid.osid import errors
from dlkit.primordium.locale.types.format import get_type_data
class TestFormat(object):
def test_get_type_data_with_format(self):
results = get_type_data('troff')
assert results['identifier'] == 'TROFF'
assert results['domain'] ==... | 34.842105 | 93 | 0.693353 |
31e5195bbc9bc8ad7a54868b11640dd3c3497007 | 16,788 | py | Python | setup.py | ShutoIna/mpcpptest | 9a38cb3937650f11323fb9a36bab34c5ad865837 | [
"Apache-2.0"
] | 1 | 2021-07-06T20:04:58.000Z | 2021-07-06T20:04:58.000Z | setup.py | ShutoIna/mpcpptest | 9a38cb3937650f11323fb9a36bab34c5ad865837 | [
"Apache-2.0"
] | null | null | null | setup.py | ShutoIna/mpcpptest | 9a38cb3937650f11323fb9a36bab34c5ad865837 | [
"Apache-2.0"
] | 1 | 2022-01-22T20:56:51.000Z | 2022-01-22T20:56:51.000Z | """Copyright 2020-2021 The MediaPipe Authors.
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 writ... | 36.259179 | 167 | 0.686085 |
1d2f6e55ec796bb1a7ddab8a93af7735714c696b | 1,358 | py | Python | guessingGame.py | richachoudhary12/Number-Guessing-Game | 50c957108c90d872e36adbc5184c9f327f9ea9ae | [
"MIT"
] | null | null | null | guessingGame.py | richachoudhary12/Number-Guessing-Game | 50c957108c90d872e36adbc5184c9f327f9ea9ae | [
"MIT"
] | null | null | null | guessingGame.py | richachoudhary12/Number-Guessing-Game | 50c957108c90d872e36adbc5184c9f327f9ea9ae | [
"MIT"
] | 1 | 2021-03-04T14:46:31.000Z | 2021-03-04T14:46:31.000Z |
import random
print("Number Guessing Game")
# randint function to generate the random number between 1 to 9
number = random.randint(1, 9)
# number of chances to be given to the user to guess the number
# or it is the inputs given by user into input box here number of chances are 5
chances = 0
print("... | 29.521739 | 80 | 0.664948 |
86c2da7163a3d357621ca733f60124d1cbf99b26 | 2,174 | py | Python | multitier/utils.py | knivets/djaodjin-multitier | faef56e9424ab493c9e0fca0b6fd56231a648070 | [
"BSD-2-Clause"
] | null | null | null | multitier/utils.py | knivets/djaodjin-multitier | faef56e9424ab493c9e0fca0b6fd56231a648070 | [
"BSD-2-Clause"
] | null | null | null | multitier/utils.py | knivets/djaodjin-multitier | faef56e9424ab493c9e0fca0b6fd56231a648070 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2017, Djaodjin Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and t... | 48.311111 | 78 | 0.74931 |
b78d2b195fdcceb48092e78b4a5936b1bee2cabf | 44,653 | py | Python | Examples/DbList/Fun.py | wxh0000mm/TKinterDesigner | 01878e78746082413a09444283edbd52118d15ef | [
"Apache-2.0"
] | 1 | 2022-03-09T08:43:41.000Z | 2022-03-09T08:43:41.000Z | Examples/WebbrowserProject/Fun.py | wxh0000mm/TKinterDesigner | 01878e78746082413a09444283edbd52118d15ef | [
"Apache-2.0"
] | null | null | null | Examples/WebbrowserProject/Fun.py | wxh0000mm/TKinterDesigner | 01878e78746082413a09444283edbd52118d15ef | [
"Apache-2.0"
] | null | null | null | #This file does not support direct editing
#coding=utf-8
import os
from os.path import abspath, dirname
import tkinter
import tkinter.simpledialog
G_UIElementUserDataArray={}
G_UIElementArray={}
G_UIElementVariableArray={}
G_UIInputDataArray={}
G_UIElementAlias={}
G_UIGroupDictionary={}
G_UIStyleDictionary={}
G_Cu... | 51.681713 | 421 | 0.617831 |
8a25b50319900197c9ffc4ec32d4ae41e43fec5e | 7,784 | py | Python | tv_show_ratings/main.py | ErikKalkoken/tv-show-ratings | c528e28acdbe5d0d146d559056394975e2d25e02 | [
"MIT"
] | 1 | 2020-10-14T20:48:14.000Z | 2020-10-14T20:48:14.000Z | tv_show_ratings/main.py | ErikKalkoken/tv-show-ratings | c528e28acdbe5d0d146d559056394975e2d25e02 | [
"MIT"
] | null | null | null | tv_show_ratings/main.py | ErikKalkoken/tv-show-ratings | c528e28acdbe5d0d146d559056394975e2d25e02 | [
"MIT"
] | null | null | null | import argparse
from datetime import datetime
import json
import re
import sys
from imdb import IMDb, IMDbError
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from tv_show_ratings import __version__, __title__
def get_args(sys_args):
"""parses the arguments from command line and retur... | 30.40625 | 80 | 0.598279 |
a3043bc7050a8abe2c24f3ab2fe64bd9ed8f420d | 2,749 | py | Python | tests/test_io.py | BioinfoTongLI/deepBlink | aa819b71f380507f9fcfa0664ab0f5a8eca4b209 | [
"MIT"
] | 13 | 2020-07-02T13:15:55.000Z | 2022-01-17T13:16:27.000Z | tests/test_io.py | BioinfoTongLI/deepBlink | aa819b71f380507f9fcfa0664ab0f5a8eca4b209 | [
"MIT"
] | 71 | 2020-06-29T08:43:20.000Z | 2022-03-29T12:03:09.000Z | tests/test_io.py | BioinfoTongLI/deepBlink | aa819b71f380507f9fcfa0664ab0f5a8eca4b209 | [
"MIT"
] | 5 | 2020-09-18T12:32:12.000Z | 2021-11-03T07:33:43.000Z | """Unittests for the deepblink.io module."""
# pylint: disable=missing-function-docstring
from pathlib import Path
import os
import tempfile
import numpy as np
import pytest
import skimage.io
from deepblink.io import basename
from deepblink.io import grab_files
from deepblink.io import load_image
from deepblink.io i... | 27.767677 | 87 | 0.600946 |
d61b6eef64537e66aca8e538ba84619441992737 | 1,498 | py | Python | face.py | jithinrkoshy/faceocv | e398fa5d90f676e9d39d0ef42ffc71c9bc70c7f3 | [
"MIT"
] | null | null | null | face.py | jithinrkoshy/faceocv | e398fa5d90f676e9d39d0ef42ffc71c9bc70c7f3 | [
"MIT"
] | null | null | null | face.py | jithinrkoshy/faceocv | e398fa5d90f676e9d39d0ef42ffc71c9bc70c7f3 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
import pickle
face_cascade = cv2.CascadeClassifier(
'/home/jrkjithin/.local/lib/python3.6/site-packages/cv2/data/haarcascade_frontalface_alt2.xml')
recognizer = cv2.face.LBPHFaceRecognizer_create()
recognizer.read("trainner.yml")
label={"person" : 1}
with open("label.pickle","rb") as ... | 31.87234 | 99 | 0.623498 |
14dbf94a141779bcce3128b1be8bb5e8d1a24639 | 320,552 | py | Python | python/mxnet/ndarray/numpy/_op.py | pengujoa/2020-1_Project_for_graduation | e243b9fb7ef0076f97e99643105a1fd5ba3fc181 | [
"BSL-1.0",
"Apache-2.0"
] | null | null | null | python/mxnet/ndarray/numpy/_op.py | pengujoa/2020-1_Project_for_graduation | e243b9fb7ef0076f97e99643105a1fd5ba3fc181 | [
"BSL-1.0",
"Apache-2.0"
] | null | null | null | python/mxnet/ndarray/numpy/_op.py | pengujoa/2020-1_Project_for_graduation | e243b9fb7ef0076f97e99643105a1fd5ba3fc181 | [
"BSL-1.0",
"Apache-2.0"
] | null | null | null | # pylint: disable=C0302
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "... | 33.252282 | 141 | 0.60136 |
3e30d30cdcd523555241f67b5cf0040ed9667b9a | 3,736 | py | Python | src/cnn_class2/tf_resnet_identity_block.py | JouniVatanen/NLP-and-Deep-Learning | 2fddcc2c39787713d33d17e80565de4ed073ca60 | [
"MIT"
] | 1 | 2020-05-24T06:55:31.000Z | 2020-05-24T06:55:31.000Z | Machine Learning/cnn_class2/tf_resnet_identity_block.py | Ashleshk/Machine-Learning-Data-Science-Deep-Learning | 03357ab98155bf73b8f1d2fd53255cc16bea2333 | [
"MIT"
] | null | null | null | Machine Learning/cnn_class2/tf_resnet_identity_block.py | Ashleshk/Machine-Learning-Data-Science-Deep-Learning | 03357ab98155bf73b8f1d2fd53255cc16bea2333 | [
"MIT"
] | 1 | 2020-03-16T13:11:14.000Z | 2020-03-16T13:11:14.000Z | # https://deeplearningcourses.com/c/advanced-computer-vision
# https://www.udemy.com/advanced-computer-vision
from __future__ import print_function, division
from builtins import range, input
# Note: you may need to update your version of future
# sudo pip install -U future
import tensorflow as tf
import numpy as np
... | 31.394958 | 72 | 0.682548 |
030ee3082a89b7de03c91e2f5c0e4714602048f3 | 703 | py | Python | create/migrations/0001_initial.py | Phist0ne/webvirtcloud | d94ca38e5c8b5bb1323d33067ee6b991775cc390 | [
"Apache-2.0"
] | 2 | 2018-03-14T09:46:49.000Z | 2019-05-14T11:45:14.000Z | create/migrations/0001_initial.py | JamesLinus/webvirtcloud | d94ca38e5c8b5bb1323d33067ee6b991775cc390 | [
"Apache-2.0"
] | 4 | 2020-02-12T03:16:43.000Z | 2021-06-10T22:08:23.000Z | create/migrations/0001_initial.py | caicloud/webvirtcloud | d94ca38e5c8b5bb1323d33067ee6b991775cc390 | [
"Apache-2.0"
] | 1 | 2019-06-11T19:54:08.000Z | 2019-06-11T19:54:08.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Flavor',
fields=[
('id', models.AutoField(verbo... | 26.037037 | 114 | 0.527738 |
9ba91539b8a21d57c06367471a457ecc3383cd89 | 957 | py | Python | env/lib/python3.8/site-packages/plotly/validators/scatterternary/_textposition.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | env/lib/python3.8/site-packages/plotly/validators/scatterternary/_textposition.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | env/lib/python3.8/site-packages/plotly/validators/scatterternary/_textposition.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import _plotly_utils.basevalidators
class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="textposition", parent_name="scatterternary", **kwargs
):
super(TextpositionValidator, self).__init__(
plotly_name=plotly_name,
... | 31.9 | 80 | 0.475444 |
8892da338aa182142eff2bee07b2f7a1f9e9b70e | 254 | py | Python | uts/uts_17_aut_py/4/A.py | viad00/code_olymp | 90f20f9fd075e8967d02baf7554fcf24f4ae089c | [
"MIT"
] | null | null | null | uts/uts_17_aut_py/4/A.py | viad00/code_olymp | 90f20f9fd075e8967d02baf7554fcf24f4ae089c | [
"MIT"
] | null | null | null | uts/uts_17_aut_py/4/A.py | viad00/code_olymp | 90f20f9fd075e8967d02baf7554fcf24f4ae089c | [
"MIT"
] | null | null | null | n, k, x = list(map(int, input().split()))
from itertools import combinations_with_replacement
cnt = 0
for i in combinations_with_replacement(range(1, n+1), k):
if cnt == x:
for j in i:
print(j, end=' ')
break
cnt += 1
| 25.4 | 57 | 0.590551 |
79ec5a1c2820d0f674e9d541e62b56775d6fa1d8 | 811 | py | Python | cpdb/twitterbot/management/commands/register_webhook.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 25 | 2018-07-20T22:31:40.000Z | 2021-07-15T16:58:41.000Z | cpdb/twitterbot/management/commands/register_webhook.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 13 | 2018-06-18T23:08:47.000Z | 2022-02-10T07:38:25.000Z | cpdb/twitterbot/management/commands/register_webhook.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 6 | 2018-05-17T21:59:43.000Z | 2020-11-17T00:30:26.000Z | import json
from requests.exceptions import HTTPError
from twitterbot.twitter_base_command import TwitterBaseCommand
class Command(TwitterBaseCommand):
def add_arguments(self, parser):
super(Command, self).add_arguments(parser)
parser.add_argument(
'--url',
dest='url',
... | 28.964286 | 70 | 0.636252 |
2ae6e2e2354b79346530efc77edbb1c2e098e690 | 9,998 | py | Python | test/test_files/pylops/pytests/test_prestack.py | SoftwareUnderstanding/inspect4py | 9c4d7252535082ad938b26baf281d93f3a27285e | [
"BSD-3-Clause"
] | 2 | 2022-02-15T20:30:57.000Z | 2022-03-17T00:50:37.000Z | test/test_files/pylops/pytests/test_prestack.py | SoftwareUnderstanding/code_inspector | a820b5a7bb18f5df9c3e79346108d8280b20c39a | [
"BSD-3-Clause"
] | 101 | 2021-06-09T14:19:59.000Z | 2022-01-24T13:24:39.000Z | test/test_files/pylops/pytests/test_prestack.py | SoftwareUnderstanding/inspect4py | 9c4d7252535082ad938b26baf281d93f3a27285e | [
"BSD-3-Clause"
] | 1 | 2021-09-22T06:59:32.000Z | 2021-09-22T06:59:32.000Z | import pytest
import numpy as np
from numpy.testing import assert_array_almost_equal
from scipy.signal import filtfilt
from pylops.utils import dottest
from pylops.utils.wavelets import ricker
from pylops.avo.prestack import _linearizations, PrestackLinearModelling, \
PrestackWaveletModelling, PrestackInversion
... | 40.97541 | 79 | 0.578616 |
7c4ae579492b9a0261a1ba15b45f2269562a1513 | 32,264 | py | Python | theano/gof/toolbox.py | MarcoGorelli/Theano-PyMC | 55ef0e6b7380e062bdd09fcd7f820643f8521fb0 | [
"BSD-3-Clause"
] | null | null | null | theano/gof/toolbox.py | MarcoGorelli/Theano-PyMC | 55ef0e6b7380e062bdd09fcd7f820643f8521fb0 | [
"BSD-3-Clause"
] | null | null | null | theano/gof/toolbox.py | MarcoGorelli/Theano-PyMC | 55ef0e6b7380e062bdd09fcd7f820643f8521fb0 | [
"BSD-3-Clause"
] | null | null | null | import copy
import inspect
import sys
import time
from collections import OrderedDict
from functools import partial
from io import StringIO
import numpy as np
import theano
from theano import config
from theano.gof.graph import equal_computations, inputs, io_toposort, variables
class AlreadyThere(Exception):
""... | 34.141799 | 87 | 0.580213 |
cd6fe3c95cc3bfd1e69985d030dce833361daf7e | 5,036 | py | Python | notebooks/group07/downloader.py | LSDE-Flickr-ML-Classification/data-pipeline | 364b10a9c70217c48c597ac5cc5e96065a08da8a | [
"Apache-2.0"
] | null | null | null | notebooks/group07/downloader.py | LSDE-Flickr-ML-Classification/data-pipeline | 364b10a9c70217c48c597ac5cc5e96065a08da8a | [
"Apache-2.0"
] | null | null | null | notebooks/group07/downloader.py | LSDE-Flickr-ML-Classification/data-pipeline | 364b10a9c70217c48c597ac5cc5e96065a08da8a | [
"Apache-2.0"
] | null | null | null | # Databricks notebook source
import requests
import io
import os
from pyspark.sql.functions import col
from timeit import default_timer as timer
from datetime import timedelta
from torchvision import transforms
from PIL import Image
# COMMAND ----------
# OUTPUT_FILE = "/mnt/group07/final_data_product/downloaded_imag... | 31.672956 | 160 | 0.710286 |
df013b69fcc5836d7264b16d229fd67c9a706637 | 652 | py | Python | mesa/visualization/modules/__init__.py | fire-suppression-abm/mesa | 8498eea3e5d4a739aee3b003107a0e7de59c5026 | [
"Apache-2.0"
] | 6 | 2019-12-21T21:15:54.000Z | 2021-04-20T17:35:24.000Z | mesa/visualization/modules/__init__.py | fire-suppression-abm/mesa | 8498eea3e5d4a739aee3b003107a0e7de59c5026 | [
"Apache-2.0"
] | 40 | 2019-08-07T13:57:52.000Z | 2022-03-18T05:21:42.000Z | mesa/visualization/modules/__init__.py | fire-suppression-abm/mesa | 8498eea3e5d4a739aee3b003107a0e7de59c5026 | [
"Apache-2.0"
] | 2 | 2020-05-16T12:41:17.000Z | 2021-01-20T17:04:48.000Z | # -*- coding: utf-8 -*-
"""
Container for all built-in visualization modules.
"""
from mesa.visualization.modules.CanvasGridVisualization import CanvasGrid # noqa
from mesa.visualization.modules.ChartVisualization import ChartModule # noqa
from mesa.visualization.modules.PieChartVisualization import PieChartModule ... | 50.153846 | 83 | 0.834356 |
4c399ae44d938029ae9558130b9e7a842beebca7 | 2,620 | py | Python | filter.py | carolninganga/week6Project | 4d6f61d3284cd144de395a739aafc4a1b124b543 | [
"Apache-2.0"
] | null | null | null | filter.py | carolninganga/week6Project | 4d6f61d3284cd144de395a739aafc4a1b124b543 | [
"Apache-2.0"
] | null | null | null | filter.py | carolninganga/week6Project | 4d6f61d3284cd144de395a739aafc4a1b124b543 | [
"Apache-2.0"
] | null | null | null | # Caroline Ninganga
# CS 5001
# Week6 Project
# 03/15/2021
import graphicsPlus as gr
import sys
# #function named something like swapRedBlue that takes in one argument, which will be an Image object
# def swapRedBlue( src ):
# rows = src.getHeight()
# cols = src.getWidth()
# # loop through the rows of the... | 36.388889 | 122 | 0.61145 |
32a3779a6a49a1e117e6d4990e4ff00f8a428945 | 5,842 | py | Python | backend/mapreduce/api/map_job/map_job_control.py | hjfreyer/marry-fuck-kill | eec431e78e318638610aeead5780746e1559cbfe | [
"Apache-2.0"
] | null | null | null | backend/mapreduce/api/map_job/map_job_control.py | hjfreyer/marry-fuck-kill | eec431e78e318638610aeead5780746e1559cbfe | [
"Apache-2.0"
] | null | null | null | backend/mapreduce/api/map_job/map_job_control.py | hjfreyer/marry-fuck-kill | eec431e78e318638610aeead5780746e1559cbfe | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""User API for controlling Map job execution."""
from google.appengine.api import taskqueue
from google.appengine.datastore import datastore_rpc
from google.appengine.ext import db
from mapreduce import model
from mapreduce import util
from mapreduce.api.map_job import map_job_config
# pylint: ... | 29.505051 | 80 | 0.705923 |
dfb286ff0e9d0a817b8388ea9f65d7660affea59 | 9,382 | py | Python | sahara_dashboard/content/data_processing/jobs/job_templates/tests.py | mail2nsrajesh/sahara-dashboard | 5f07d19d68fe61fbe3eb0360e98a60e8cef28853 | [
"Apache-2.0"
] | null | null | null | sahara_dashboard/content/data_processing/jobs/job_templates/tests.py | mail2nsrajesh/sahara-dashboard | 5f07d19d68fe61fbe3eb0360e98a60e8cef28853 | [
"Apache-2.0"
] | null | null | null | sahara_dashboard/content/data_processing/jobs/job_templates/tests.py | mail2nsrajesh/sahara-dashboard | 5f07d19d68fe61fbe3eb0360e98a60e8cef28853 | [
"Apache-2.0"
] | null | null | null | # 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 t... | 44.67619 | 77 | 0.498081 |
ba954f594d368db39c9246ac205ca0f705985b05 | 1,387 | py | Python | 6_deep_projects/Formula1/f1_data_readers/Constructor.py | ProGabe/teals | 7ebf0b6e6f81d8a4c44baa7b5d3a9d95267ec1e3 | [
"MIT"
] | null | null | null | 6_deep_projects/Formula1/f1_data_readers/Constructor.py | ProGabe/teals | 7ebf0b6e6f81d8a4c44baa7b5d3a9d95267ec1e3 | [
"MIT"
] | null | null | null | 6_deep_projects/Formula1/f1_data_readers/Constructor.py | ProGabe/teals | 7ebf0b6e6f81d8a4c44baa7b5d3a9d95267ec1e3 | [
"MIT"
] | null | null | null | '''
Abstraction over data/constructors.csv
Functionlity not complete, enough to get driver history.
'''
from multi_command_utils.data_finder import find_file_root
from multi_command_utils.data_file import DataFile, column_data
constructor_data_file = 'constructors.csv'
constructor_data_directory = find_file_r... | 30.152174 | 87 | 0.695025 |
e96a08191b83df913f19a72d702b148377561a27 | 736 | py | Python | flask_ext.py | ianzhengnan/learnpy | ed1736ac976d56253183399466a167fb9319f869 | [
"Apache-2.0"
] | 1 | 2017-06-12T03:12:29.000Z | 2017-06-12T03:12:29.000Z | flask_ext.py | ianzhengnan/learnpy | ed1736ac976d56253183399466a167fb9319f869 | [
"Apache-2.0"
] | null | null | null | flask_ext.py | ianzhengnan/learnpy | ed1736ac976d56253183399466a167fb9319f869 | [
"Apache-2.0"
] | null | null | null |
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route('/', methods=['GET', 'POST'])
def home():
return '<h1>Home</h1>'
@app.route('/signin', methods=['GET'])
def signin_form():
return '''<form action="/signin" method="post"
<p><input name="username"></p>
... | 26.285714 | 86 | 0.570652 |
e7cd297bd5944023802c7ea52f17df1ecf02488c | 8,810 | py | Python | homeassistant/components/mill/climate.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/mill/climate.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | homeassistant/components/mill/climate.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Support for mill wifi-enabled home heaters."""
import mill
import voluptuous as vol
from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import (
FAN_OFF,
FAN_ON,
ClimateEntityFeature,
HVACAction,
HVACMode,
)
from homeassistant.config_entries imp... | 35.524194 | 87 | 0.682066 |
9c70fa08c9a4fc8c7d5a5366240bfe10d23ffce1 | 8,188 | py | Python | ci/performance_tests/test_performance.py | haje01/ray | e1c9a869ed3eb83f41f142b841854192ce65f0c3 | [
"Apache-2.0"
] | 1 | 2021-06-17T08:35:56.000Z | 2021-06-17T08:35:56.000Z | ci/performance_tests/test_performance.py | GitHubBeinner/ray | d20696300e2c4aad90c0deece2b3af7e70fc6056 | [
"Apache-2.0"
] | null | null | null | ci/performance_tests/test_performance.py | GitHubBeinner/ray | d20696300e2c4aad90c0deece2b3af7e70fc6056 | [
"Apache-2.0"
] | 2 | 2019-09-04T13:27:51.000Z | 2019-09-17T04:20:38.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import logging
import numpy as np
import time
import ray
from ray.tests.cluster_utils import Cluster
logger = logging.getLogger(__name__)
parser = argparse.ArgumentParser(
description="Pa... | 32.363636 | 79 | 0.633244 |
9bdf7484293ac1ad517f7f7b77d9e39dcacd7f84 | 15,396 | py | Python | imageclassification/src/sample/fine_tune_hybrid_predict.py | waikato-datamining/keras-imaging | f044f883242895c18cfdb31a827bc32bdb0405ed | [
"MIT"
] | null | null | null | imageclassification/src/sample/fine_tune_hybrid_predict.py | waikato-datamining/keras-imaging | f044f883242895c18cfdb31a827bc32bdb0405ed | [
"MIT"
] | null | null | null | imageclassification/src/sample/fine_tune_hybrid_predict.py | waikato-datamining/keras-imaging | f044f883242895c18cfdb31a827bc32bdb0405ed | [
"MIT"
] | 1 | 2020-04-16T15:29:28.000Z | 2020-04-16T15:29:28.000Z | import os
import shutil
import sys
from random import Random
from wai.annotations.core.util import chain_map
from wai.annotations.main import main as wai_annotations_main
from sample import *
from sample.splitters import RandomSplitter, TopNSplitter
INIT_LR = 1e-4
BS = 5
SEED = 42
VALIDATION_PERCENT = 0.15
LR = 0.02... | 36.570071 | 127 | 0.591647 |
372ef3ee1d5ae0a125fad3c58a776ec9392c03bb | 11,123 | py | Python | core/controllers/platform_feature_test.py | swyuan27/oppia | da4c733659b8813eccf738ff8be19123ebcdeb15 | [
"Apache-2.0"
] | 5,422 | 2015-08-14T01:56:44.000Z | 2022-03-31T23:31:56.000Z | core/controllers/platform_feature_test.py | omprakash1999mina/oppia | 00282e533b5832cb763100de1a5cc727644d64ef | [
"Apache-2.0"
] | 14,178 | 2015-08-14T05:21:45.000Z | 2022-03-31T23:54:10.000Z | core/controllers/platform_feature_test.py | omprakash1999mina/oppia | 00282e533b5832cb763100de1a5cc727644d64ef | [
"Apache-2.0"
] | 3,574 | 2015-08-14T04:20:06.000Z | 2022-03-29T01:52:37.000Z | # Copyright 2020 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 39.443262 | 80 | 0.624382 |
d1bcfb88dc7f405ebdde9363c8661ff894407153 | 3,779 | py | Python | example_userdata_stream_new_style.py | hth945/unicorn-binance-websocket-api | 90b3a9c6853c985a3128d3e8239a6febbb644dd1 | [
"MIT"
] | 404 | 2019-11-13T02:22:39.000Z | 2021-12-31T08:48:10.000Z | example_userdata_stream_new_style.py | gladiopeace/unicorn-binance-websocket-api | 5bddc943343766210e8635d551084e566ffe0c21 | [
"MIT"
] | 181 | 2019-11-02T21:10:17.000Z | 2021-12-31T12:55:51.000Z | example_userdata_stream_new_style.py | gladiopeace/unicorn-binance-websocket-api | 5bddc943343766210e8635d551084e566ffe0c21 | [
"MIT"
] | 103 | 2019-11-16T23:39:24.000Z | 2021-12-28T05:15:05.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# File: example_userdata_stream_new_style.py
#
# Part of ‘UNICORN Binance WebSocket API’
# Project website: https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api
# Documentation: https://oliver-zehentleitner.github.io/unicorn-binance-websocket-api
# PyPI:... | 40.202128 | 123 | 0.769516 |
d6e59286d6dc7b7ab8af55a91a77b6b299a794c9 | 4,311 | py | Python | atakama/plugin_base.py | aman-atakama/atakama_sdk | 6e917e81c07495324fd5ab1208a63217b7e4c3fd | [
"BSD-3-Clause"
] | null | null | null | atakama/plugin_base.py | aman-atakama/atakama_sdk | 6e917e81c07495324fd5ab1208a63217b7e4c3fd | [
"BSD-3-Clause"
] | 11 | 2021-08-04T23:40:55.000Z | 2022-03-23T19:34:30.000Z | atakama/plugin_base.py | aman-atakama/atakama_sdk | 6e917e81c07495324fd5ab1208a63217b7e4c3fd | [
"BSD-3-Clause"
] | null | null | null | """Atakama plugin base lib."""
import abc
import os
import sys
import importlib
from typing import TypeVar, List, Type, Any, Dict
SDK_VERSION_NAME = "ATAKAMA_SDK_VERSION"
def is_abstract(cls):
"""Return true if the class has __abstractmethods__"""
return bool(getattr(cls, "__abstractmethods__", False))
de... | 26.447853 | 100 | 0.656692 |
f2d38f8d128d0594f7416c8146abb6f6b2c257ee | 2,360 | py | Python | xmr_to_btc.py | miuho/Bitcoin-Mixing | 88f0f3d109d662096a5ca188e67c4001b4485cf2 | [
"MIT"
] | null | null | null | xmr_to_btc.py | miuho/Bitcoin-Mixing | 88f0f3d109d662096a5ca188e67c4001b4485cf2 | [
"MIT"
] | null | null | null | xmr_to_btc.py | miuho/Bitcoin-Mixing | 88f0f3d109d662096a5ca188e67c4001b4485cf2 | [
"MIT"
] | 2 | 2020-01-17T07:59:57.000Z | 2021-03-27T14:20:37.000Z | # xmr_to_btc.py
# convert Monero to Bitcoin
#
# HingOn Miu
# https://xmr.to/
import io
import random
import string
import json
import requests
# xmr.to API base URL
xmrto_api_url = "https://xmr.to/api/v2/xmr2btc/"
# API endpoint
create_order_endpoint = "order_create/"
query_status_endpoint = "order_status_query/"
... | 25.934066 | 79 | 0.756356 |
08b69a2329673fb4464c154219638398865bddb3 | 887 | py | Python | tests/utils/test_version_class.py | vhermecz/sqlalchemy-continuum | ce18c2ed4a5b7dbb2cb7b821f52ffe05f5202a38 | [
"BSD-3-Clause"
] | 401 | 2015-01-08T12:18:26.000Z | 2022-03-19T03:56:02.000Z | tests/utils/test_version_class.py | vhermecz/sqlalchemy-continuum | ce18c2ed4a5b7dbb2cb7b821f52ffe05f5202a38 | [
"BSD-3-Clause"
] | 171 | 2015-01-16T14:26:37.000Z | 2022-03-19T03:49:36.000Z | tests/utils/test_version_class.py | vhermecz/sqlalchemy-continuum | ce18c2ed4a5b7dbb2cb7b821f52ffe05f5202a38 | [
"BSD-3-Clause"
] | 107 | 2015-02-05T06:56:35.000Z | 2022-03-18T10:46:16.000Z | from pytest import raises
from sqlalchemy_continuum import ClassNotVersioned, version_class
from sqlalchemy_continuum.manager import VersioningManager
from sqlalchemy_continuum.model_builder import ModelBuilder
from tests import TestCase
class TestVersionClass(TestCase):
def test_version_class_for_versioned_clas... | 36.958333 | 65 | 0.766629 |
9e7b9afc8212e5d876c8fb32fb040c7bbc2092e6 | 3,393 | py | Python | Versionsxyzzy/xyzzyold.py | Robseg/vampy2017cs | f65edd0145bf2af518ee85b51c3ed9027efeff4f | [
"MIT"
] | null | null | null | Versionsxyzzy/xyzzyold.py | Robseg/vampy2017cs | f65edd0145bf2af518ee85b51c3ed9027efeff4f | [
"MIT"
] | null | null | null | Versionsxyzzy/xyzzyold.py | Robseg/vampy2017cs | f65edd0145bf2af518ee85b51c3ed9027efeff4f | [
"MIT"
] | null | null | null | yaxis = 0
xaxis = 0
dead = 0
torch = 0
key = 0
doorone = 0
while dead == 0:
if yaxis == 0 and xaxis == 0:
answer = input("You are in a stone hallway with two exits. Go north, or south?: ")
if answer == "north":
yaxis = yaxis + 1
elif answer == "south":
yaxis = yaxis - 1
#------------------------------... | 39.917647 | 263 | 0.574713 |
803b2e95bd018346e34d79bba95e8d43467c0d84 | 1,565 | py | Python | sorting.py | amnksngh/algorithms | 6ae8f6a8ba78caf3ed3f268061ab3287569b3c77 | [
"MIT"
] | 1 | 2022-01-01T17:38:53.000Z | 2022-01-01T17:38:53.000Z | sorting.py | amnksngh/algorithms | 6ae8f6a8ba78caf3ed3f268061ab3287569b3c77 | [
"MIT"
] | null | null | null | sorting.py | amnksngh/algorithms | 6ae8f6a8ba78caf3ed3f268061ab3287569b3c77 | [
"MIT"
] | null | null | null | def insertion_sort(A, reverse = False):
"""Assumes A is a list of integers, by default reverse = False
Returns the sorted A in non-decreasing order if reverse = False,
and in non-increasing order if reverse = True.
****************************************
The complexity of the algo... | 29.528302 | 100 | 0.425559 |
90c1d7ed04ccee3bfc507618df3ef4267fa80b20 | 3,363 | py | Python | server/djangobackend/settings.py | sabinamp/agfzb-CloudAppDevelopment_Capstone | 07ac3398599e82227494627f5adfba762c2d685e | [
"Apache-2.0"
] | null | null | null | server/djangobackend/settings.py | sabinamp/agfzb-CloudAppDevelopment_Capstone | 07ac3398599e82227494627f5adfba762c2d685e | [
"Apache-2.0"
] | null | null | null | server/djangobackend/settings.py | sabinamp/agfzb-CloudAppDevelopment_Capstone | 07ac3398599e82227494627f5adfba762c2d685e | [
"Apache-2.0"
] | null | null | null | """
Django settings for djangobackend project.
Generated by 'django-admin startproject' using Django 3.1.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
import ... | 28.025 | 91 | 0.700862 |
ade4976d2c23c9be33db61b4dabfec4ee326bf27 | 373,400 | py | Python | src/genie/libs/parser/iosxr/tests/test_show_isis.py | filippohronsky/genieparser | 85e4b7a8f101e5cd44d4d7116e0e7a1af13fe9df | [
"Apache-2.0"
] | 2 | 2021-01-27T03:37:39.000Z | 2021-01-27T03:40:50.000Z | src/genie/libs/parser/iosxr/tests/test_show_isis.py | filippohronsky/genieparser | 85e4b7a8f101e5cd44d4d7116e0e7a1af13fe9df | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxr/tests/test_show_isis.py | filippohronsky/genieparser | 85e4b7a8f101e5cd44d4d7116e0e7a1af13fe9df | [
"Apache-2.0"
] | null | null | null | # Python
import unittest
from unittest.mock import Mock
# Metaparser
from genie.metaparser.util.exceptions import SchemaEmptyParserError, SchemaMissingKeyError
# iosxr show_isis
from genie.libs.parser.iosxr.show_isis import (
ShowIsis,
ShowIsisLspLog,
ShowIsisSpfLog,
ShowIsisProtocol,
ShowIsisHost... | 48.829606 | 148 | 0.307667 |
7dfa6e103abfa2186f4af1ce117e731b60e6621e | 8,430 | py | Python | var/docs/conf.py | michailbrynard/django-skeleton | 772cd579cad1b8853ed6f1a2c14cbacac2ba41da | [
"MIT"
] | null | null | null | var/docs/conf.py | michailbrynard/django-skeleton | 772cd579cad1b8853ed6f1a2c14cbacac2ba41da | [
"MIT"
] | null | null | null | var/docs/conf.py | michailbrynard/django-skeleton | 772cd579cad1b8853ed6f1a2c14cbacac2ba41da | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# one-server documentation build configuration file, created by
# sphinx-quickstart on Sat Feb 21 10:59:15 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
#... | 31.222222 | 79 | 0.715896 |
a3365ddeb508c34d1f8f38a0604a34a766c53ec5 | 9,562 | py | Python | msr-flows/msbr_compare/serpent_calculations.py | gwenchee/msr-neutronics | c79dcfb111eddd2ccc3d51cec07b0605539121d0 | [
"BSD-3-Clause"
] | 1 | 2022-02-28T20:05:42.000Z | 2022-02-28T20:05:42.000Z | msr-flows/msbr_compare/serpent_calculations.py | gwenchee/msr-neutronics | c79dcfb111eddd2ccc3d51cec07b0605539121d0 | [
"BSD-3-Clause"
] | null | null | null | msr-flows/msbr_compare/serpent_calculations.py | gwenchee/msr-neutronics | c79dcfb111eddd2ccc3d51cec07b0605539121d0 | [
"BSD-3-Clause"
] | null | null | null | from scipy.optimize import root
import serpentTools as st
import numpy as np
class linear_generation:
"""
This class is used to implement the linear generation approximation
for type 1 Serpent flow.
Linear generation is approximated by running with no depletion (CTRL-run)
for the time... | 32.859107 | 77 | 0.568082 |
ec6803abcc60deaa9f4216cc753bebd01a890f2a | 1,895 | py | Python | monitoring/streamlit.py | jqueguiner/polyglot | 6ef4f08a94ccdffbfba56b837735cc38e06ea068 | [
"MIT"
] | 12 | 2019-12-24T15:22:29.000Z | 2020-12-24T08:08:30.000Z | monitoring/streamlit.py | jqueguiner/polyglot | 6ef4f08a94ccdffbfba56b837735cc38e06ea068 | [
"MIT"
] | 1 | 2020-06-09T18:30:08.000Z | 2020-06-09T18:30:08.000Z | monitoring/streamlit.py | jqueguiner/polyglot | 6ef4f08a94ccdffbfba56b837735cc38e06ea068 | [
"MIT"
] | null | null | null | import streamlit as st
import time
import numpy as np
import random
import psycopg2
import yaml
import os
import pandas as pd
import pandas.io.sql as sqlio
filepath = os.environ['CONFIG_FILE_PATH']
with open(filepath, 'r') as ymlfile:
cfg = yaml.load(ymlfile, Loader=yaml.FullLoader)
dbconf=cfg['pgsql']
def con... | 30.079365 | 226 | 0.669657 |
73e482448824dc4046dc633b7752ce46ab2f59e8 | 2,254 | py | Python | aleph/serializers/roles.py | Ueland/aleph | d644e5f8b956c7186a59f3ce1c16798017961765 | [
"MIT"
] | null | null | null | aleph/serializers/roles.py | Ueland/aleph | d644e5f8b956c7186a59f3ce1c16798017961765 | [
"MIT"
] | null | null | null | aleph/serializers/roles.py | Ueland/aleph | d644e5f8b956c7186a59f3ce1c16798017961765 | [
"MIT"
] | null | null | null | from flask import request
from marshmallow import Schema, post_dump
from marshmallow.fields import Nested, String, Boolean
from marshmallow.validate import Email, Length
from aleph.core import url_for
from aleph.model import Role
from aleph.serializers.common import BaseSchema
MIN_LENGTH = Length(min=Role.PASSWORD_MI... | 28.531646 | 57 | 0.644632 |
6043a2986031b59d99e424098ba65fea4e77984b | 3,378 | py | Python | tests/common.py | chmduquesne/tofbot | a30f61c904e7f16ea387ab9e9555716d365264a0 | [
"BSD-2-Clause"
] | 5 | 2016-01-21T09:37:05.000Z | 2020-03-24T11:42:48.000Z | tests/common.py | chmduquesne/tofbot | a30f61c904e7f16ea387ab9e9555716d365264a0 | [
"BSD-2-Clause"
] | 11 | 2015-12-14T19:05:53.000Z | 2020-11-16T15:40:49.000Z | tests/common.py | chmduquesne/tofbot | a30f61c904e7f16ea387ab9e9555716d365264a0 | [
"BSD-2-Clause"
] | 8 | 2015-12-11T18:06:44.000Z | 2022-03-24T12:37:21.000Z | import unittest
from bot import Tofbot
from collections import namedtuple
def print_resp(msg):
print(" -> %s" % msg)
TestOrigin = namedtuple('TestOrigin', ['sender', 'nick'])
TestOrigin.__test__ = False
def bot_input(bot, msg):
return bot_action(bot, lambda: bot.send(msg))
def bot_action(bot, action):
... | 25.208955 | 72 | 0.57016 |
77627e5c5491467d39ca41a04f75afa7b5299f6e | 1,744 | py | Python | tests/test_visitors/test_ast/test_statements/test_wrong_named_keyword.py | cdhiraj40/wemake-python-styleguide | 7cef9be081d594c30045b7a98cae77a9be46e1aa | [
"MIT"
] | 1,931 | 2018-03-17T13:52:45.000Z | 2022-03-27T09:39:17.000Z | tests/test_visitors/test_ast/test_statements/test_wrong_named_keyword.py | cdhiraj40/wemake-python-styleguide | 7cef9be081d594c30045b7a98cae77a9be46e1aa | [
"MIT"
] | 2,231 | 2018-03-09T21:19:05.000Z | 2022-03-31T08:35:37.000Z | tests/test_visitors/test_ast/test_statements/test_wrong_named_keyword.py | cdhiraj40/wemake-python-styleguide | 7cef9be081d594c30045b7a98cae77a9be46e1aa | [
"MIT"
] | 492 | 2018-05-18T21:20:28.000Z | 2022-03-20T14:11:50.000Z | import pytest
from wemake_python_styleguide.violations.best_practices import (
WrongNamedKeywordViolation,
)
from wemake_python_styleguide.visitors.ast.statements import (
WrongNamedKeywordVisitor,
)
@pytest.mark.parametrize('code', [
'print(**{"@": "2"})',
'print(**{"2ab": "2"})',
'print(**{"!":... | 26.029851 | 66 | 0.56422 |
296e410578d132e80d3218e225963e34c6c5ba8f | 22,966 | py | Python | lib/joblib/memory.py | splunk/splunk-app-splunkgit | 11658bd1000464e09064a2d7cc6937fa1af75f2b | [
"Apache-2.0"
] | 25 | 2015-02-07T17:26:21.000Z | 2021-06-23T00:51:38.000Z | lib/joblib/memory.py | splunk/splunk-app-splunkgit | 11658bd1000464e09064a2d7cc6937fa1af75f2b | [
"Apache-2.0"
] | 1 | 2018-11-02T22:50:42.000Z | 2018-11-05T20:48:32.000Z | lib/joblib/memory.py | splunk/splunk-app-splunkgit | 11658bd1000464e09064a2d7cc6937fa1af75f2b | [
"Apache-2.0"
] | 23 | 2015-02-07T17:25:53.000Z | 2022-03-27T09:05:42.000Z | """
A context object for caching a function's return value each time it
is called with the same input arguments.
"""
# Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org>
# Copyright (c) 2009 Gael Varoquaux
# License: BSD Style, 3 clauses.
import os
import shutil
import sys
import time
import pydoc
tr... | 39.66494 | 79 | 0.538448 |
539052b3ddb5dbf11346c7a3844b25c8a0baf061 | 726 | py | Python | metricfarmer/extensions/mf/targets/file_text.py | useblocks/metricfarmer | 556b459d081f84b0d9285266ba472c7ed27ddd46 | [
"MIT"
] | null | null | null | metricfarmer/extensions/mf/targets/file_text.py | useblocks/metricfarmer | 556b459d081f84b0d9285266ba472c7ed27ddd46 | [
"MIT"
] | 2 | 2019-08-17T07:32:17.000Z | 2019-08-23T13:21:31.000Z | metricfarmer/extensions/mf/targets/file_text.py | useblocks/metricfarmer | 556b459d081f84b0d9285266ba472c7ed27ddd46 | [
"MIT"
] | null | null | null | import os
from metricfarmer.exceptions import ExtensionException
def target_file_text(metrics, **kwargs):
if 'path' not in kwargs:
raise ExtensionException('Path parameter must be specified for mf.file_text')
path = kwargs['path']
override = kwargs.get('override', False)
if os.path.exists(pa... | 34.571429 | 109 | 0.634986 |
607468398df255c57e31f18cb31f0bf9e895219a | 413 | py | Python | Desafio026.py | sidneyalex/Desafios-do-Curso | 11605caf59fb8b456adaca78a41eae2f7469ab7b | [
"MIT"
] | null | null | null | Desafio026.py | sidneyalex/Desafios-do-Curso | 11605caf59fb8b456adaca78a41eae2f7469ab7b | [
"MIT"
] | null | null | null | Desafio026.py | sidneyalex/Desafios-do-Curso | 11605caf59fb8b456adaca78a41eae2f7469ab7b | [
"MIT"
] | null | null | null | #Faça um pgm que leia uma frase pelo teclado e mostre:
#Quantas vezes aparece a letra"A".
#Em que posição ela aparece a primeira vez.
#Em que posição ela aparece a última vez.
frase = input('Digite uma frase: ').strip().lower()
print('\nForam digitadas {} vezes a letra "A"'.format(frase.count('a')))
print('ela aparece ... | 51.625 | 111 | 0.707022 |
edf86a699444492ae2109a5688ca22d00f811bc3 | 1,970 | py | Python | txweb/tests/helper.py | devdave/txWeb | e447fbefd16134cb2f83323c04c20c41638d7da3 | [
"MIT"
] | null | null | null | txweb/tests/helper.py | devdave/txWeb | e447fbefd16134cb2f83323c04c20c41638d7da3 | [
"MIT"
] | 4 | 2020-11-03T19:59:05.000Z | 2021-06-02T03:22:25.000Z | txweb/tests/helper.py | devdave/txWeb | e447fbefd16134cb2f83323c04c20c41638d7da3 | [
"MIT"
] | null | null | null |
import unittest
import typing as T
from unittest.mock import MagicMock
from dataclasses import dataclass
from io import BytesIO
import pytest
from txweb.lib.str_request import StrRequest
from txweb import Application
from twisted.web.test.test_web import DummyRequest
from twisted.web.test import requesthelper
cl... | 21.648352 | 83 | 0.648731 |
1a953469963fcfd7bb7e4f824cb9482e3602f68b | 3,467 | py | Python | nevergrad/functions/test_corefuncs.py | Ellawin/nevergrad | d4ea61d0fff9292045f72714b26972ea1e48bd88 | [
"MIT"
] | 2 | 2021-04-13T12:14:46.000Z | 2021-07-07T14:37:50.000Z | nevergrad/functions/test_corefuncs.py | Ellawin/nevergrad | d4ea61d0fff9292045f72714b26972ea1e48bd88 | [
"MIT"
] | null | null | null | nevergrad/functions/test_corefuncs.py | Ellawin/nevergrad | d4ea61d0fff9292045f72714b26972ea1e48bd88 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import typing as tp
import numpy as np
from nevergrad.common import testing
from . import corefuncs
@testing.parametriz... | 43.3375 | 126 | 0.661956 |
ea9baa6ce2c6746338390ebc7e862458939b6387 | 12,885 | py | Python | rich/live.py | 2d4d/rich | ac7267af0ae4a157f1fc9657599fac2e1ce78158 | [
"MIT"
] | null | null | null | rich/live.py | 2d4d/rich | ac7267af0ae4a157f1fc9657599fac2e1ce78158 | [
"MIT"
] | null | null | null | rich/live.py | 2d4d/rich | ac7267af0ae4a157f1fc9657599fac2e1ce78158 | [
"MIT"
] | null | null | null | import sys
from threading import Event, RLock, Thread
from typing import IO, Any, Callable, List, Optional
from . import get_console
from .console import Console, ConsoleRenderable, RenderableType, RenderHook
from .control import Control
from .file_proxy import FileProxy
from .jupyter import JupyterMixin
from .live_re... | 36.709402 | 156 | 0.589833 |
6379c1cbfe3b4245b433c9ec6fd9bff0b5e7e664 | 7,323 | py | Python | Tests/GUI/DMachineSetup/test_PHoleM58.py | carbon-drive/pyleecan | e89d4fe97f23f6182c19127d2c6a2133614e169d | [
"Apache-2.0"
] | null | null | null | Tests/GUI/DMachineSetup/test_PHoleM58.py | carbon-drive/pyleecan | e89d4fe97f23f6182c19127d2c6a2133614e169d | [
"Apache-2.0"
] | null | null | null | Tests/GUI/DMachineSetup/test_PHoleM58.py | carbon-drive/pyleecan | e89d4fe97f23f6182c19127d2c6a2133614e169d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
from random import uniform
from PySide2 import QtWidgets
from PySide2.QtTest import QTest
from pyleecan.Classes.LamHole import LamHole
from pyleecan.Classes.HoleM58 import HoleM58
from pyleecan.GUI.Dialog.DMatLib.MatLib import MatLib
from pyleecan.GUI.Dialog.DMachineSetup.SMHoleMag... | 37.172589 | 86 | 0.595521 |
d4b2ddfd89a676f59340134420c0ea1655a6e49b | 1,473 | py | Python | venv/Lib/site-packages/pynance/dateutils.py | LeonardoHMS/imobi | 6b2b97a05df67ea7d493f7b601382f65c6629cc2 | [
"MIT"
] | 35 | 2015-03-12T04:16:14.000Z | 2020-12-17T18:10:15.000Z | venv/Lib/site-packages/pynance/dateutils.py | LeonardoHMS/imobi | 6b2b97a05df67ea7d493f7b601382f65c6629cc2 | [
"MIT"
] | 31 | 2015-03-16T21:31:04.000Z | 2021-01-26T00:12:34.000Z | venv/Lib/site-packages/pynance/dateutils.py | LeonardoHMS/imobi | 6b2b97a05df67ea7d493f7b601382f65c6629cc2 | [
"MIT"
] | 18 | 2015-09-30T10:40:26.000Z | 2021-01-25T21:20:44.000Z | """
.. Copyright (c) 2016 Marshall Farrier
license http://opensource.org/licenses/MIT
Dateutils (:mod:`pynance.dateutils`)
========================================
.. versionadded:: 0.5.0
.. currentmodule:: pynance.dateutils
Utility functions for working with dates.
"""
from pandas import Timestamp
from pandas.... | 31.340426 | 106 | 0.675492 |
651da2123eaa892739ea5d2f87c2b374775118b3 | 4,882 | py | Python | Conteudo das Aulas/149/template/head.py | cerberus707/lab-python | ebba3c9cde873d70d4bb61084f79ce30b7f9e047 | [
"Apache-2.0"
] | null | null | null | Conteudo das Aulas/149/template/head.py | cerberus707/lab-python | ebba3c9cde873d70d4bb61084f79ce30b7f9e047 | [
"Apache-2.0"
] | null | null | null | Conteudo das Aulas/149/template/head.py | cerberus707/lab-python | ebba3c9cde873d70d4bb61084f79ce30b7f9e047 | [
"Apache-2.0"
] | null | null | null | #!/Anaconda3/python
# -*- coding: UTF-8 -*-
__author__ = 'pedro'
def main(form, session):
html = """
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=devic... | 44.788991 | 147 | 0.472347 |
74dfb9922a8099c0a55bb0c58c25c76a57f9bc5c | 3,624 | py | Python | cairis/gui/TaskCharacteristicsDialog.py | RachelLar/cairis_update | 0b1d6d17ce49bc74887d1684e28c53c1b06e2fa2 | [
"Apache-2.0"
] | null | null | null | cairis/gui/TaskCharacteristicsDialog.py | RachelLar/cairis_update | 0b1d6d17ce49bc74887d1684e28c53c1b06e2fa2 | [
"Apache-2.0"
] | null | null | null | cairis/gui/TaskCharacteristicsDialog.py | RachelLar/cairis_update | 0b1d6d17ce49bc74887d1684e28c53c1b06e2fa2 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may... | 44.740741 | 233 | 0.778698 |
d75e5b701599b1a031cc65c2858ee4406077d150 | 11,948 | py | Python | tests/integration/preview/understand/assistant/test_task.py | BrimmingDev/twilio-python | 3226b5fed92b3c2ce64f03e6b19fc4792ef7647f | [
"MIT"
] | 1,362 | 2015-01-04T10:25:18.000Z | 2022-03-24T10:07:08.000Z | tests/integration/preview/understand/assistant/test_task.py | BrimmingDev/twilio-python | 3226b5fed92b3c2ce64f03e6b19fc4792ef7647f | [
"MIT"
] | 299 | 2015-01-30T09:52:39.000Z | 2022-03-31T23:03:02.000Z | tests/integration/preview/understand/assistant/test_task.py | BrimmingDev/twilio-python | 3226b5fed92b3c2ce64f03e6b19fc4792ef7647f | [
"MIT"
] | 622 | 2015-01-03T04:43:09.000Z | 2022-03-29T14:11:00.000Z | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from tests import IntegrationTestCase
from tests.holodeck import Request
from twilio.base.exceptions import TwilioException
from twilio.http.response import Response
class TaskTestCase(IntegrationT... | 49.168724 | 179 | 0.608721 |
59263037e657f6ceb0dc176364077398e109dc6d | 29,966 | py | Python | tests/components/mqtt/test_legacy_vacuum.py | andersop91/core | 0e0ef0aa17073609eae7c974cf4c73306b7c414b | [
"Apache-2.0"
] | 4 | 2021-07-11T09:11:00.000Z | 2022-02-27T14:43:50.000Z | tests/components/mqtt/test_legacy_vacuum.py | andersop91/core | 0e0ef0aa17073609eae7c974cf4c73306b7c414b | [
"Apache-2.0"
] | 277 | 2021-10-04T06:39:33.000Z | 2021-12-28T22:04:17.000Z | tests/components/mqtt/test_legacy_vacuum.py | andersop91/core | 0e0ef0aa17073609eae7c974cf4c73306b7c414b | [
"Apache-2.0"
] | 1 | 2022-01-12T22:14:01.000Z | 2022-01-12T22:14:01.000Z | """The tests for the Legacy Mqtt vacuum platform."""
from copy import deepcopy
import json
from unittest.mock import patch
import pytest
from homeassistant.components import vacuum
from homeassistant.components.mqtt import CONF_COMMAND_TOPIC
from homeassistant.components.mqtt.vacuum import schema_legacy as mqttvacuum... | 33.481564 | 88 | 0.697224 |
ea15ec97d29cc8d9bb0c588f1d8086a483e9b7be | 707 | py | Python | DSA/DP/leetcode/tribonacci_approaches.py | RohanMiraje/DSAwithPython | ea4884afcac9d6cc2817a93e918c829dd10cef5d | [
"MIT"
] | 2 | 2020-02-12T03:00:03.000Z | 2020-07-06T17:27:03.000Z | DSA/DP/leetcode/tribonacci_approaches.py | RohanMiraje/DSAwithPython | ea4884afcac9d6cc2817a93e918c829dd10cef5d | [
"MIT"
] | null | null | null | DSA/DP/leetcode/tribonacci_approaches.py | RohanMiraje/DSAwithPython | ea4884afcac9d6cc2817a93e918c829dd10cef5d | [
"MIT"
] | null | null | null | class Solution:
def tribonacci(self, n: int) -> int:
# fib = [0]*41
# fib[0] = 0
# fib[1] = 1
# fib [2] = 1
# for i in range(n+1):
# fib[i+3] = fib[i] + fib[i+1] + fib[i+2]
# return fib[n]
dp ... | 24.37931 | 61 | 0.353607 |
7ee46a2b264c081c6db940f43770cb4e2d1e31e3 | 7,896 | py | Python | lambdas/search/index.py | fiskus/quilt | a5945a111a3065ecd23e64d069aa67e42492c5f2 | [
"Apache-2.0"
] | null | null | null | lambdas/search/index.py | fiskus/quilt | a5945a111a3065ecd23e64d069aa67e42492c5f2 | [
"Apache-2.0"
] | null | null | null | lambdas/search/index.py | fiskus/quilt | a5945a111a3065ecd23e64d069aa67e42492c5f2 | [
"Apache-2.0"
] | null | null | null | """
Sends the request to ElasticSearch.
TODO: Implement a higher-level search API.
"""
from copy import deepcopy
import os
from itertools import filterfalse, tee
from aws_requests_auth.boto_utils import BotoAWSRequestsAuth
from elasticsearch import Elasticsearch, RequestsHttpConnection
from t4_lambda_shared.decorato... | 32.628099 | 97 | 0.517604 |
ff4ba3cb1e0fe51ae43afabccfa22d8377dacf43 | 21,142 | py | Python | models/official/detection/modeling/architecture/nn_ops.py | piotrgiedziun/tpu | c7562a4d9542f61e2bddc96b43dc2452ce95945a | [
"Apache-2.0"
] | null | null | null | models/official/detection/modeling/architecture/nn_ops.py | piotrgiedziun/tpu | c7562a4d9542f61e2bddc96b43dc2452ce95945a | [
"Apache-2.0"
] | null | null | null | models/official/detection/modeling/architecture/nn_ops.py | piotrgiedziun/tpu | c7562a4d9542f61e2bddc96b43dc2452ce95945a | [
"Apache-2.0"
] | null | null | null | # Lint as: python2, python3
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | 36.388985 | 92 | 0.678365 |
b7988dbc391f150e8d171dcfc57dbaac0ac9f74b | 2,321 | py | Python | evaluate.py | onehaitao/distant-supervised-relation-extraction | cd740c3699b991365755ec892d6848c8b6e2ef89 | [
"MIT"
] | 16 | 2021-01-28T07:20:32.000Z | 2022-03-28T01:03:25.000Z | evaluate.py | qhLin1997/relation-extraction-distant-supervised-learning | 709ac0c41b762c8e78422d41f9c32b1b433cf95d | [
"MIT"
] | 5 | 2021-09-04T02:47:08.000Z | 2022-03-28T06:28:36.000Z | evaluate.py | onehaitao/distant-supervised-relation-extraction | cd740c3699b991365755ec892d6848c8b6e2ef89 | [
"MIT"
] | 2 | 2021-09-22T02:58:00.000Z | 2022-03-24T02:38:51.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# @Version : Python 3.6
import os
import sklearn.metrics
import torch
import torch.nn.functional as F
import numpy as np
from tqdm import tqdm
class Eval(object):
def __init__(self, class_num, config):
self.class_num = class_num
self.device = config... | 33.637681 | 71 | 0.547609 |
ac81d5391d4f545337ae774932d27972a3c07b42 | 3,890 | py | Python | ios_code_generator/bxrouter.py | banxi1988/iOSDevScripts | d7b18b962c7f60ec3eb592288defd21814038d30 | [
"MIT"
] | null | null | null | ios_code_generator/bxrouter.py | banxi1988/iOSDevScripts | d7b18b962c7f60ec3eb592288defd21814038d30 | [
"MIT"
] | null | null | null | ios_code_generator/bxrouter.py | banxi1988/iOSDevScripts | d7b18b962c7f60ec3eb592288defd21814038d30 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = 'banxi'
import sys
import re
import urlparse
FIELD_DELIMETER = ';'
# User(/)
# api/product/isuser_product?id=24351
def _to_snake_case(name):
words = name.split("_")
return ''.join([word.capitalize() for word in words if word])
class Router(object):
def __init__(se... | 29.923077 | 124 | 0.593573 |
95ea42043d09ce823cf46239e0cee6241c12980f | 3,329 | py | Python | test_gallery/main.py | Soichi-Tamashiro/kivy-photo-app-with-gallery | 294d104497786be6a6df2b6ed5d8718c4ea13829 | [
"MIT"
] | null | null | null | test_gallery/main.py | Soichi-Tamashiro/kivy-photo-app-with-gallery | 294d104497786be6a6df2b6ed5d8718c4ea13829 | [
"MIT"
] | null | null | null | test_gallery/main.py | Soichi-Tamashiro/kivy-photo-app-with-gallery | 294d104497786be6a6df2b6ed5d8718c4ea13829 | [
"MIT"
] | null | null | null | from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
from kivy.properties import StringProperty
from kivymd.app import MDApp
from kivymd.theming import ThemableBehavior
from kivymd.uix.list import OneLineIconListItem, MDList
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.screenmanager import ... | 26.007813 | 95 | 0.587564 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.