hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fd107c2da7b904339edb0406a2c83b2ca10efada | 8,850 | py | Python | coadd_mdetsims/tests/test_shear_bias_meas.py | beckermr/metadetect-coadding-sims | 15ccaec353aa61c69ac9d78d1dfca8ce25bca3cf | [
"BSD-3-Clause"
] | null | null | null | coadd_mdetsims/tests/test_shear_bias_meas.py | beckermr/metadetect-coadding-sims | 15ccaec353aa61c69ac9d78d1dfca8ce25bca3cf | [
"BSD-3-Clause"
] | null | null | null | coadd_mdetsims/tests/test_shear_bias_meas.py | beckermr/metadetect-coadding-sims | 15ccaec353aa61c69ac9d78d1dfca8ce25bca3cf | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pytest
from ..shear_bias_meas import (
measure_shear_metadetect, estimate_m_and_c,
estimate_m_and_c_patch_avg)
def test_measure_shear_metadetect_smoke():
dtype = [('flags', 'i4'), ('wmom_g', 'f4', (2,)),
('wmom_s2n', 'f4'), ('wmom_T_ratio', 'f4'), ('ormask', 'i4')]
... | 34.570313 | 77 | 0.490508 | 0 | 0 | 0 | 0 | 6,773 | 0.765311 | 0 | 0 | 1,365 | 0.154237 |
fd1270311d2747042f749172a656ddde2d001d75 | 1,221 | py | Python | src/topologies/simple.py | sevenEng/Resolving-Consensus | a508701e19bd4ec0df735f5b094487983272dbb6 | [
"MIT"
] | null | null | null | src/topologies/simple.py | sevenEng/Resolving-Consensus | a508701e19bd4ec0df735f5b094487983272dbb6 | [
"MIT"
] | null | null | null | src/topologies/simple.py | sevenEng/Resolving-Consensus | a508701e19bd4ec0df735f5b094487983272dbb6 | [
"MIT"
] | null | null | null | from mininet.net import Mininet
from mininet.node import Controller, UserSwitch, IVSSwitch, OVSSwitch
from mininet.log import info, setLogLevel
setLogLevel("info")
import importlib
switch_num = 1
def add_switch(net):
global switch_num
res = "s%s" % str(switch_num)
switch_num += 1
return net.addSwitc... | 18.784615 | 69 | 0.633907 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.108927 |
fd1396e2ed5013e365c0832fe7ee283e5e1bda20 | 856 | py | Python | lunchapi/permissions.py | pesusieni999/lunchapplication | 2aa2a4320a2ad85b39b74c5dcc3d960a46cdb6ef | [
"MIT"
] | null | null | null | lunchapi/permissions.py | pesusieni999/lunchapplication | 2aa2a4320a2ad85b39b74c5dcc3d960a46cdb6ef | [
"MIT"
] | null | null | null | lunchapi/permissions.py | pesusieni999/lunchapplication | 2aa2a4320a2ad85b39b74c5dcc3d960a46cdb6ef | [
"MIT"
] | null | null | null | from rest_framework import permissions
__author__ = "Ville Myllynen"
__copyright__ = "Copyright 2017, Ohsiha Project"
__credits__ = ["Ville Myllynen"]
__license__ = "MIT"
__version__ = "1.0"
__maintainer__ = "Ville Myllynen"
__email__ = "ville.myllynen@student.tut.fi"
__status__ = "Development"
class IsOwnerOrReadO... | 31.703704 | 73 | 0.712617 | 556 | 0.649533 | 0 | 0 | 0 | 0 | 0 | 0 | 426 | 0.497664 |
fd139df441393f7003990ec4900a0d7e845e7545 | 3,994 | py | Python | MsSampleFmpDevicePkg/Tools/ConvertCerToH.py | kuqin12/mu_plus | f78c66d0508a7b884b3f73d7c86648656bf07fbb | [
"BSD-2-Clause"
] | null | null | null | MsSampleFmpDevicePkg/Tools/ConvertCerToH.py | kuqin12/mu_plus | f78c66d0508a7b884b3f73d7c86648656bf07fbb | [
"BSD-2-Clause"
] | null | null | null | MsSampleFmpDevicePkg/Tools/ConvertCerToH.py | kuqin12/mu_plus | f78c66d0508a7b884b3f73d7c86648656bf07fbb | [
"BSD-2-Clause"
] | null | null | null | ##
# Copyright (c) 2016, Microsoft Corporation
# 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... | 33.847458 | 107 | 0.73986 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,912 | 0.729094 |
fd16505a157e42c0095152f4d85cf3c6e225daa0 | 2,899 | py | Python | webtraversallibrary/app_info.py | redfungus/webtraversallibrary | d5013edc061deba40e859dcfcda314c7055ce82a | [
"Apache-2.0"
] | null | null | null | webtraversallibrary/app_info.py | redfungus/webtraversallibrary | d5013edc061deba40e859dcfcda314c7055ce82a | [
"Apache-2.0"
] | null | null | null | webtraversallibrary/app_info.py | redfungus/webtraversallibrary | d5013edc061deba40e859dcfcda314c7055ce82a | [
"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 not u... | 32.573034 | 111 | 0.67506 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,872 | 0.64574 |
fd166522613f70d68340ce87a9e8c0bff5f78c6b | 4,863 | py | Python | aws_reporting.py | jeberhar/DevOpsLearner | f9dce9cf2dc6e75494c1372a339e9f13e836102d | [
"MIT"
] | null | null | null | aws_reporting.py | jeberhar/DevOpsLearner | f9dce9cf2dc6e75494c1372a339e9f13e836102d | [
"MIT"
] | null | null | null | aws_reporting.py | jeberhar/DevOpsLearner | f9dce9cf2dc6e75494c1372a339e9f13e836102d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import boto
import boto.ec2
import sys
from boto.ec2.connection import EC2Connection
import pprint
account_string = "YOUR_ACCOUNT_STRING" #change this for each AWS account
class ansi_color: #unused class due to CSV file limitations
red = '\033[31m'
green = '\033[32m'
re... | 37.122137 | 267 | 0.584002 | 156 | 0.032079 | 0 | 0 | 0 | 0 | 0 | 0 | 1,872 | 0.384948 |
fd1683f2abe7dd47f1cee08ed7abab26a488dbc0 | 1,832 | py | Python | code/functions/one_hop_majority_vote.py | YatongChen/decoupled_smoothing_on_graph | b5110db92841c00193577adb0f5d3daa70f46845 | [
"MIT"
] | 5 | 2019-02-25T20:05:47.000Z | 2021-06-23T21:38:52.000Z | code/functions/one_hop_majority_vote.py | YatongChen/decoupled_smoothing_on_graphs | b5110db92841c00193577adb0f5d3daa70f46845 | [
"MIT"
] | null | null | null | code/functions/one_hop_majority_vote.py | YatongChen/decoupled_smoothing_on_graphs | b5110db92841c00193577adb0f5d3daa70f46845 | [
"MIT"
] | null | null | null | # one hop helper function
def one_hop_majority_vote(G, gender_y_update,train_index, test_index):
A = np.array(nx.adjacency_matrix(G).todense())
D = np.diag(np.sum(A, axis=1))
d = np.diag(D)
theta = [None]*len(gender_y_update)
accuracy_score_benchmark = np.sum(gender_y_update[train_index])/len(train... | 50.888889 | 231 | 0.69869 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.042031 |
fd16885dbeb4939e362807cdc853aa44683b010f | 18,284 | py | Python | alphago/alphago.py | noahwaterfieldprice/alphago | 4a7bba6d9758ccf1d2f2d7ae964b5d5d48021ee8 | [
"MIT"
] | 4 | 2018-02-12T09:11:26.000Z | 2022-01-24T20:46:15.000Z | alphago/alphago.py | noahwaterfieldprice/alphago | 4a7bba6d9758ccf1d2f2d7ae964b5d5d48021ee8 | [
"MIT"
] | null | null | null | alphago/alphago.py | noahwaterfieldprice/alphago | 4a7bba6d9758ccf1d2f2d7ae964b5d5d48021ee8 | [
"MIT"
] | 3 | 2018-08-23T15:08:54.000Z | 2020-03-13T14:21:08.000Z | from collections import OrderedDict
import numpy as np
from tqdm import tqdm
import tensorflow as tf
from .player import MCTSPlayer, RandomPlayer, OptimalPlayer
from .evaluator import evaluate
from .mcts_tree import MCTSNode, mcts
from .utilities import sample_distribution
__all__ = ["train_alphago", "self_play", "p... | 39.152034 | 80 | 0.644553 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,753 | 0.424032 |
fd16ab23714a63a2de7b1edeefc67fc983b65d54 | 835 | py | Python | SRCTF/SRCTF/django_reuse/reuse/migrations/0002_auto_20160829_1452.py | yinyueacm/work-uga | d8fd104b8c5600e1715491fc5eeffaf5c0b5896c | [
"MIT"
] | 1 | 2019-01-11T03:20:34.000Z | 2019-01-11T03:20:34.000Z | SRCTF/SRCTF/django_reuse/reuse/migrations/0002_auto_20160829_1452.py | yinyueacm/yinyue-thesis | d8fd104b8c5600e1715491fc5eeffaf5c0b5896c | [
"MIT"
] | null | null | null | SRCTF/SRCTF/django_reuse/reuse/migrations/0002_auto_20160829_1452.py | yinyueacm/yinyue-thesis | d8fd104b8c5600e1715491fc5eeffaf5c0b5896c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-29 14:52
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('reuse', '0001_initial'),
]
operations = [
m... | 28.793103 | 118 | 0.602395 | 645 | 0.772455 | 0 | 0 | 0 | 0 | 0 | 0 | 156 | 0.186826 |
fd17609bb6160f46ba3a4f3809db927e0e55536c | 5,976 | py | Python | complexity_science/ca/ca/ca1d.py | KristerJazz/complexity-science | 2340b7467d50c45d06fa93db7603f7f2778d3c4c | [
"BSD-3-Clause"
] | null | null | null | complexity_science/ca/ca/ca1d.py | KristerJazz/complexity-science | 2340b7467d50c45d06fa93db7603f7f2778d3c4c | [
"BSD-3-Clause"
] | 2 | 2021-03-28T16:23:00.000Z | 2021-04-05T08:10:35.000Z | complexity_science/ca/ca/ca1d.py | KristerJazz/complexity-science | 2340b7467d50c45d06fa93db7603f7f2778d3c4c | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from .rule_manager import RuleManager
class CA1D():
def __init__(self, N):
"""
Creates an uninitialized 1D cellular automata object with length N
-------------
Parameters:
N = number of cells
n1 : left neigh... | 29.15122 | 138 | 0.54836 | 5,877 | 0.983434 | 0 | 0 | 0 | 0 | 0 | 0 | 3,440 | 0.575636 |
fd1902e85156fc45744e6e48892733db33d5f755 | 4,373 | py | Python | extract_skip_thought.py | youngfly11/ReferCOCO-Pretraining-Detectron2 | 8c8536a4d822b3cf9140380442a440d42e948c38 | [
"Apache-2.0"
] | 2 | 2020-08-14T08:00:53.000Z | 2020-11-21T11:01:55.000Z | extract_skip_thought.py | youngfly11/ReferCOCO-Pretraining-Detectron2 | 8c8536a4d822b3cf9140380442a440d42e948c38 | [
"Apache-2.0"
] | null | null | null | extract_skip_thought.py | youngfly11/ReferCOCO-Pretraining-Detectron2 | 8c8536a4d822b3cf9140380442a440d42e948c38 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3.6
# -*- coding: utf-8 -*-
# @Time : 2020/6/25 22:41
# @Author : Yongfei Liu
# @Email : liuyf3@shanghaitech.edu.cn
import numpy as np
import os.path as osp
import os
import pickle
from collections import OrderedDict
import torch
import json
from detectron2.data.datasets.builtin_meta import CO... | 30.58042 | 104 | 0.607363 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,546 | 0.353533 |
fd1912c311e861ca371e1043073ef9f199c996c4 | 4,909 | py | Python | pyutil_mongo/cfg.py | chhsiao1981/pyutil_mongo | facea2376b48dd7157d4633ab8128c8daf7e59ef | [
"MIT"
] | null | null | null | pyutil_mongo/cfg.py | chhsiao1981/pyutil_mongo | facea2376b48dd7157d4633ab8128c8daf7e59ef | [
"MIT"
] | null | null | null | pyutil_mongo/cfg.py | chhsiao1981/pyutil_mongo | facea2376b48dd7157d4633ab8128c8daf7e59ef | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Attributes:
config (dict): Description
logger (logging.Logger): Description
"""
import logging
import pymongo
logger = None
config = {}
class MongoMap(object):
"""Info about MongoDB
Attributes:
ca (None, optional): ssl-ca
cert (None, optional): ssl-cert
... | 28.375723 | 243 | 0.646771 | 1,113 | 0.226726 | 0 | 0 | 0 | 0 | 0 | 0 | 1,780 | 0.362599 |
fd196b9ee70ef729b16290f14477ca8c3d79df73 | 172 | py | Python | exhaustive_search/05_multiple-arrays/05-01-01.py | fumiyanll23/algo-method | d86ea1d399cbc5a1db0ae49d0c82e41042f661ab | [
"MIT"
] | null | null | null | exhaustive_search/05_multiple-arrays/05-01-01.py | fumiyanll23/algo-method | d86ea1d399cbc5a1db0ae49d0c82e41042f661ab | [
"MIT"
] | null | null | null | exhaustive_search/05_multiple-arrays/05-01-01.py | fumiyanll23/algo-method | d86ea1d399cbc5a1db0ae49d0c82e41042f661ab | [
"MIT"
] | null | null | null | # input
N, M = map(int, input().split())
As = [*map(int, input().split())]
Bs = [*map(int, input().split())]
# compute
# output
print(sum(A > B for B in Bs for A in As))
| 17.2 | 41 | 0.569767 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.139535 |
fd19ca0b5b114583ad7ed023250d660c51840010 | 141 | py | Python | solutions/1639.py | nxexox/acm.timus | 9548d2a0b54fdd99bd60071f3be2fb7f897a7303 | [
"MIT"
] | null | null | null | solutions/1639.py | nxexox/acm.timus | 9548d2a0b54fdd99bd60071f3be2fb7f897a7303 | [
"MIT"
] | null | null | null | solutions/1639.py | nxexox/acm.timus | 9548d2a0b54fdd99bd60071f3be2fb7f897a7303 | [
"MIT"
] | null | null | null | #!/usr/bin/python
a, b = [int(i) for i in input().split()]
c = a * b
if c % 2 == 0:
print('[:=[first]')
else:
print('[second]=:]')
| 14.1 | 40 | 0.475177 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.297872 |
fd19e6853abb785c9505d8a5f4aaf9326f1ad438 | 374 | py | Python | lstmcpipe/config/__init__.py | cta-observatory/lst-i-rf | 7a634e0b3b07dda2b20df47875d97616eab65821 | [
"MIT"
] | 2 | 2021-02-01T17:30:46.000Z | 2021-02-22T13:59:49.000Z | lstmcpipe/config/__init__.py | cta-observatory/lst-i-rf | 7a634e0b3b07dda2b20df47875d97616eab65821 | [
"MIT"
] | 106 | 2021-04-16T21:15:20.000Z | 2022-03-31T23:02:50.000Z | lstmcpipe/config/__init__.py | cta-observatory/lstmcpipe | 7a634e0b3b07dda2b20df47875d97616eab65821 | [
"MIT"
] | 3 | 2022-03-02T09:23:09.000Z | 2022-03-03T16:00:25.000Z | import os
from shutil import which
from .pipeline_config import load_config
__all__ = ["load_config"]
def export_env(outdir="."):
if which("conda") is not None:
os.system((f"conda env export > {os.path.join(outdir, 'conda_env.yml')}"))
elif which("pip") is not None:
os.system(f"python -m pip ... | 28.769231 | 87 | 0.671123 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 157 | 0.419786 |
fd1a5012b7966cdeb8f03d71591cc6d8a74c6420 | 2,337 | py | Python | tests/stakkr_compose_test.py | dwade75/stakkr | ae77607e84b5b305ae8f5a14eb8f22237d943a29 | [
"Apache-2.0"
] | null | null | null | tests/stakkr_compose_test.py | dwade75/stakkr | ae77607e84b5b305ae8f5a14eb8f22237d943a29 | [
"Apache-2.0"
] | null | null | null | tests/stakkr_compose_test.py | dwade75/stakkr | ae77607e84b5b305ae8f5a14eb8f22237d943a29 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import stakkr.stakkr_compose as sc
import subprocess
import unittest
base_dir = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, base_dir + '/../')
# https://docs.python.org/3/library/unittest.html#assert-methods
class StakkrComposeTest(unittest.TestCase):
services = {
'... | 31.16 | 86 | 0.670946 | 2,037 | 0.87163 | 0 | 0 | 0 | 0 | 0 | 0 | 445 | 0.190415 |
fd1dc3801dfc8c9bd5d0968ee738990d98e2881b | 2,792 | py | Python | DQIC/backtesting/run.py | bladezzw/DeepQuantInChina | ce74a9bf8db91e3545ccc3e7af81f80796a536fa | [
"MIT"
] | 8 | 2019-04-14T03:05:19.000Z | 2020-02-13T18:35:41.000Z | DQIC/backtesting/run.py | bladezzw/DeepQuantInChina | ce74a9bf8db91e3545ccc3e7af81f80796a536fa | [
"MIT"
] | null | null | null | DQIC/backtesting/run.py | bladezzw/DeepQuantInChina | ce74a9bf8db91e3545ccc3e7af81f80796a536fa | [
"MIT"
] | 2 | 2019-05-08T08:23:50.000Z | 2020-01-23T03:54:41.000Z | import os,sys
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
sys.path.append(BASE_DIR)
import datetime
import time
from backtesting.backtest import Backtest
from backtesting.data import HistoricCSVDataHandler
from backtesting.execution import SimulatedExecutionHandler
from backtesting.portfolio import Portfolio... | 33.638554 | 78 | 0.567335 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 497 | 0.173291 |
fd1e95f3c8250711415f3acb25bf5e3b26c63f39 | 3,306 | py | Python | Emergency/DB/DRAW3D.py | LeeDaeil/CNS_Autonomous | 2ae3688cfd654b9669893e3cdf4cdf1ac0748b9f | [
"Apache-2.0"
] | 2 | 2020-03-22T14:35:00.000Z | 2020-05-26T05:06:41.000Z | Emergency/DB/DRAW3D.py | LeeDaeil/CNS_Autonomous | 2ae3688cfd654b9669893e3cdf4cdf1ac0748b9f | [
"Apache-2.0"
] | null | null | null | Emergency/DB/DRAW3D.py | LeeDaeil/CNS_Autonomous | 2ae3688cfd654b9669893e3cdf4cdf1ac0748b9f | [
"Apache-2.0"
] | null | null | null | import matplotlib.pylab as plt
import numpy as np
import pandas as pd
from COMMONTOOL import PTCureve
DB = pd.read_csv('0_228.txt')
# DB = pd.read_csv('../3차 검증/322.txt')
# target_time = 100
# for i in range(0, len(DB)):
# if DB['KCNTOMS'].loc[i] != target_time:
# DB.drop([i], inplace=True)
# else:
#... | 30.897196 | 85 | 0.5366 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 608 | 0.183022 |
fd1f6bede9086f03b21d05de1c334c5625e057f0 | 658 | py | Python | aeroplast/images.py | kk6/aeroplast | 8347bf071f43a560b865a7f37b76fb05f5cea57d | [
"MIT"
] | 1 | 2019-11-12T07:02:20.000Z | 2019-11-12T07:02:20.000Z | aeroplast/images.py | kk6/aeroplast | 8347bf071f43a560b865a7f37b76fb05f5cea57d | [
"MIT"
] | 14 | 2018-11-13T09:57:09.000Z | 2019-04-05T20:02:46.000Z | aeroplast/images.py | kk6/aeroplast | 8347bf071f43a560b865a7f37b76fb05f5cea57d | [
"MIT"
] | 1 | 2018-12-20T07:52:59.000Z | 2018-12-20T07:52:59.000Z | # -*- coding: utf-8 -*-
"""
Transparent PNG conversion
~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
from PIL import Image
def get_new_size(original_size):
"""
Returns each width and height plus 2px.
:param original_size: Original image's size
:return: Width / height after calculation
:rtype: tuple
"""
... | 18.8 | 50 | 0.617021 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 466 | 0.708207 |
fd22786701bf4e42b8d3932674e46c80a650982c | 678 | py | Python | common/common/management/commands/makemessages.py | FSTUM/rallyetool-v2 | 2f3e2b5cb8655abe023ed1215b7182430b75bb23 | [
"MIT"
] | 1 | 2021-10-30T09:31:02.000Z | 2021-10-30T09:31:02.000Z | common/common/management/commands/makemessages.py | FSTUM/rallyetool-v2 | 2f3e2b5cb8655abe023ed1215b7182430b75bb23 | [
"MIT"
] | 9 | 2021-11-23T10:13:43.000Z | 2022-03-01T15:04:15.000Z | common/common/management/commands/makemessages.py | CommanderStorm/rallyetool-v2 | 721413d6df8afc9347dac7ee83deb3a0ad4c01bc | [
"MIT"
] | 1 | 2021-10-16T09:07:47.000Z | 2021-10-16T09:07:47.000Z | from django.core.management.commands import makemessages
class Command(makemessages.Command):
def build_potfiles(self):
potfiles = super().build_potfiles()
for potfile in sorted(set(potfiles)):
self._remove_pot_creation_date(potfile)
return potfiles
@staticmethod
def... | 27.12 | 64 | 0.610619 | 618 | 0.911504 | 0 | 0 | 378 | 0.557522 | 0 | 0 | 31 | 0.045723 |
fd2333a5ba2bad8fcd4a158981a7c15852072e07 | 6,529 | py | Python | app/api/v2/users/views_update.py | Raywire/iReporter | ac58414b84b9c96f0be5e0d477355d0811d8b9c5 | [
"MIT"
] | 3 | 2019-01-09T15:17:28.000Z | 2019-12-01T18:40:50.000Z | app/api/v2/users/views_update.py | Raywire/iReporter | ac58414b84b9c96f0be5e0d477355d0811d8b9c5 | [
"MIT"
] | 13 | 2018-11-30T05:33:13.000Z | 2021-04-30T20:46:41.000Z | app/api/v2/users/views_update.py | Raywire/iReporter | ac58414b84b9c96f0be5e0d477355d0811d8b9c5 | [
"MIT"
] | 3 | 2018-12-02T16:10:12.000Z | 2019-01-04T14:51:04.000Z | """Views for users"""
from flask_restful import Resource
from flask import jsonify, request
from app.api.v2.users.models import UserModel
from app.api.v2.decorator import token_required, get_token
from app.api.v2.send_email import send
class UserStatus(Resource):
"""Class with method for updating a specific user... | 33.482051 | 135 | 0.551386 | 6,278 | 0.961556 | 0 | 0 | 5,602 | 0.858018 | 0 | 0 | 2,047 | 0.313524 |
fd247bba2b56b1306086374a12025c1833517c10 | 7,357 | py | Python | LoadDataAndPrepare/Make_Dictionaries/4_make_reviews_all_words_vocab_dictionary.py | ngrover2/Automatic_Lexicon_Induction | b58a1d55f294293161dc23ab2e6d669c1c5e90d8 | [
"MIT"
] | null | null | null | LoadDataAndPrepare/Make_Dictionaries/4_make_reviews_all_words_vocab_dictionary.py | ngrover2/Automatic_Lexicon_Induction | b58a1d55f294293161dc23ab2e6d669c1c5e90d8 | [
"MIT"
] | null | null | null | LoadDataAndPrepare/Make_Dictionaries/4_make_reviews_all_words_vocab_dictionary.py | ngrover2/Automatic_Lexicon_Induction | b58a1d55f294293161dc23ab2e6d669c1c5e90d8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import os
import traceback
import ujson
from pprint import pprint
from textblob import TextBlob as tb
from textblob import Word as wd
import shutil
from collections import defaultdict
from gensim.corpora import Dictionary
from socialconfig import config
class get_reviews_iterable(ob... | 42.773256 | 156 | 0.740791 | 6,956 | 0.945494 | 276 | 0.037515 | 0 | 0 | 0 | 0 | 1,254 | 0.17045 |
fd25176d16569d58b76384f5892d5e731b3f5603 | 434 | py | Python | tests/test_demo.py | PrabhuLoganathan/Pytest-Selenium-POM--Google | d0b50faf28a0c3797d1b0bc838d77f82dd0be81c | [
"MIT"
] | null | null | null | tests/test_demo.py | PrabhuLoganathan/Pytest-Selenium-POM--Google | d0b50faf28a0c3797d1b0bc838d77f82dd0be81c | [
"MIT"
] | 1 | 2021-04-22T12:02:19.000Z | 2021-04-22T12:02:19.000Z | tests/test_demo.py | wadle/test_demo_pytest_selenium | bc9f2b4a9da895568da2cc3f0bc904f78775884c | [
"MIT"
] | 1 | 2020-11-26T20:03:07.000Z | 2020-11-26T20:03:07.000Z | from pages.demo_page import DemoPage
class TestDemo:
def test_open_page(self, browser):
"""
:param browser:
:return:
"""
obj = DemoPage(browser)
obj.open_page()
def test_verify_page_title(self, browser):
"""
:param browser:
:return:
... | 16.074074 | 46 | 0.532258 | 392 | 0.903226 | 0 | 0 | 0 | 0 | 0 | 0 | 122 | 0.281106 |
fd266f079f9daa527e01e31d5df3c4df79e8150b | 1,126 | py | Python | day 03/day03_part1.py | MischaDy/PyAdventOfCode2020 | 3e0a1a61ac930d7e30a0104ac617008297508fcb | [
"CC0-1.0"
] | 2 | 2020-12-17T18:49:20.000Z | 2021-02-20T16:48:14.000Z | day 03/day03_part1.py | MischaDy/PyAdventOfCode2020 | 3e0a1a61ac930d7e30a0104ac617008297508fcb | [
"CC0-1.0"
] | null | null | null | day 03/day03_part1.py | MischaDy/PyAdventOfCode2020 | 3e0a1a61ac930d7e30a0104ac617008297508fcb | [
"CC0-1.0"
] | 3 | 2020-12-20T19:08:32.000Z | 2020-12-26T22:11:15.000Z | from helpers.cyclic_list import CyclicList
from helpers.coordinates2d import Coordinates2D
RUN_TEST = False
TEST_SOLUTION = 7
TEST_INPUT_FILE = 'test_input_day_03.txt'
INPUT_FILE = 'input_day_03.txt'
START = Coordinates2D((0, 0)) # top left corner
TRAJECTORY = Coordinates2D((3, 1)) # right 3, down 1
ARGS = [START... | 26.186047 | 86 | 0.688277 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.103908 |
fd279c40ef3cc1786017d66b7c1e1b885d2e67e1 | 807 | py | Python | binary_tree/e_path_sum.py | dhrubach/python-code-recipes | 14356c6adb1946417482eaaf6f42dde4b8351d2f | [
"MIT"
] | null | null | null | binary_tree/e_path_sum.py | dhrubach/python-code-recipes | 14356c6adb1946417482eaaf6f42dde4b8351d2f | [
"MIT"
] | null | null | null | binary_tree/e_path_sum.py | dhrubach/python-code-recipes | 14356c6adb1946417482eaaf6f42dde4b8351d2f | [
"MIT"
] | null | null | null | ###############################################
# LeetCode Problem Number : 112
# Difficulty Level : Easy
# URL : https://leetcode.com/problems/path-sum/
###############################################
from binary_search_tree.tree_node import TreeNode
class BinaryTree:
def hasPathSum(self, root: TreeNode, sum: in... | 25.21875 | 59 | 0.484511 | 552 | 0.684015 | 0 | 0 | 0 | 0 | 0 | 0 | 197 | 0.244114 |
fd2a11e31304af5fc6efc0099f574785c36f1cf8 | 127 | py | Python | High School/9th Grade APCSP (Python)/Unit 7/07.02.03.py | SomewhereOutInSpace/Computer-Science-Class | f5d21850236a7a18dc53b4a650ecbe9a11781f1d | [
"Unlicense"
] | null | null | null | High School/9th Grade APCSP (Python)/Unit 7/07.02.03.py | SomewhereOutInSpace/Computer-Science-Class | f5d21850236a7a18dc53b4a650ecbe9a11781f1d | [
"Unlicense"
] | null | null | null | High School/9th Grade APCSP (Python)/Unit 7/07.02.03.py | SomewhereOutInSpace/Computer-Science-Class | f5d21850236a7a18dc53b4a650ecbe9a11781f1d | [
"Unlicense"
] | null | null | null | st1 = input()
st2 = input()
st3 = input()
listy = [st1, st2, st3]
listy.sort()
print(listy[0])
print(listy[1])
print(listy[2])
| 14.111111 | 23 | 0.629921 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fd2a6655ca5c2bb5ada546fc62616fc063ba84a1 | 3,900 | py | Python | tests/unit/guests/linux/storage/disk.py | tessia-project/tessia-baselib | 07004b7f6462f081a6f7e810954fd7e0d2cdcf6b | [
"Apache-2.0"
] | 1 | 2022-01-27T01:32:14.000Z | 2022-01-27T01:32:14.000Z | tests/unit/guests/linux/storage/disk.py | tessia-project/tessia-baselib | 07004b7f6462f081a6f7e810954fd7e0d2cdcf6b | [
"Apache-2.0"
] | null | null | null | tests/unit/guests/linux/storage/disk.py | tessia-project/tessia-baselib | 07004b7f6462f081a6f7e810954fd7e0d2cdcf6b | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 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 required by applicable law or agreed to in writing, sof... | 30 | 78 | 0.646923 | 2,792 | 0.715897 | 0 | 0 | 0 | 0 | 0 | 0 | 1,740 | 0.446154 |
fd2a6afac5326ae943f8dfecdd01a780b28ea0e3 | 5,888 | py | Python | scripts/mv_drawables.py | euitam/MoveDrawable | 33923276d856de8effff9e958ba7a33767739137 | [
"Apache-2.0"
] | null | null | null | scripts/mv_drawables.py | euitam/MoveDrawable | 33923276d856de8effff9e958ba7a33767739137 | [
"Apache-2.0"
] | null | null | null | scripts/mv_drawables.py | euitam/MoveDrawable | 33923276d856de8effff9e958ba7a33767739137 | [
"Apache-2.0"
] | null | null | null | import sys, os, errno, shutil, signal, subprocess
from glob import glob
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
def printTitle():
print bcolors.WARNING
print " _ _... | 28.038095 | 160 | 0.667969 | 178 | 0.030231 | 0 | 0 | 0 | 0 | 0 | 0 | 1,553 | 0.263757 |
fd2ae8dc293d1b7377165b6678e015927d2d75d1 | 5,479 | py | Python | kornia/x/trainer.py | AK391/kornia | a2535eb7593ee2fed94d23cc720804a16f9f0e7e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kornia/x/trainer.py | AK391/kornia | a2535eb7593ee2fed94d23cc720804a16f9f0e7e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kornia/x/trainer.py | AK391/kornia | a2535eb7593ee2fed94d23cc720804a16f9f0e7e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import logging
from typing import Callable, Dict
import torch
import torch.nn as nn
from torch.utils.data import DataLoader
# the accelerator library is a requirement for the Trainer
# but it is optional for grousnd base user of kornia.
try:
from accelerate import Accelerator
except ImportError:
Accelerator =... | 34.459119 | 95 | 0.632962 | 4,882 | 0.891039 | 0 | 0 | 86 | 0.015696 | 0 | 0 | 2,259 | 0.412302 |
fd2c1f1342cad7325a43f5762d5c2d1d94cfe573 | 2,795 | py | Python | datasets/transformations/jpeg_compress.py | bytedance/Hammer | 388ed20b3d9b34f33f5357d75f8fe5d726782ec8 | [
"MIT"
] | 97 | 2022-02-08T09:00:57.000Z | 2022-03-23T05:33:35.000Z | datasets/transformations/jpeg_compress.py | bytedance/Hammer | 388ed20b3d9b34f33f5357d75f8fe5d726782ec8 | [
"MIT"
] | null | null | null | datasets/transformations/jpeg_compress.py | bytedance/Hammer | 388ed20b3d9b34f33f5357d75f8fe5d726782ec8 | [
"MIT"
] | 7 | 2022-02-08T15:13:02.000Z | 2022-03-19T19:11:13.000Z | # python3.7
"""Implements JPEG compression on images."""
import cv2
import numpy as np
try:
import nvidia.dali.fn as fn
import nvidia.dali.types as types
except ImportError:
fn = None
from utils.formatting_utils import format_range
from .base_transformation import BaseTransformation
__all__ = ['JpegComp... | 35.379747 | 80 | 0.65975 | 2,465 | 0.881932 | 0 | 0 | 0 | 0 | 0 | 0 | 872 | 0.311986 |
fd2ca1a6e56d2464e000ae2d9a68e5afd6f6c238 | 2,046 | py | Python | venv/VFR/flask_app_3d.py | flhataf/Virtual-Fitting-Room | e5b41849df963cebd3b7deb7e87d643ece5b6d18 | [
"MIT"
] | null | null | null | venv/VFR/flask_app_3d.py | flhataf/Virtual-Fitting-Room | e5b41849df963cebd3b7deb7e87d643ece5b6d18 | [
"MIT"
] | null | null | null | venv/VFR/flask_app_3d.py | flhataf/Virtual-Fitting-Room | e5b41849df963cebd3b7deb7e87d643ece5b6d18 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Feb 15 00:31:35 2021
@author: RayaBit
"""
from flask import Flask, render_template, Response
from imutils.video import VideoStream
from skeletonDetector import skeleton
import cv2
from skeleton3DDetector import Skeleton3dDetector
from visualization import Visualizer
import t... | 26.571429 | 115 | 0.616813 | 0 | 0 | 1,422 | 0.695015 | 195 | 0.095308 | 0 | 0 | 525 | 0.256598 |
fd2dbbfa0aac3167c6b35b08529f51283edf8826 | 8,144 | py | Python | schedsi/threads/thread.py | z33ky/schedsi | 3affe28a3e1d2001c639d7c0423cb105d1991590 | [
"CC0-1.0"
] | 1 | 2017-08-03T12:58:53.000Z | 2017-08-03T12:58:53.000Z | schedsi/threads/thread.py | z33ky/schedsi | 3affe28a3e1d2001c639d7c0423cb105d1991590 | [
"CC0-1.0"
] | null | null | null | schedsi/threads/thread.py | z33ky/schedsi | 3affe28a3e1d2001c639d7c0423cb105d1991590 | [
"CC0-1.0"
] | null | null | null | """Define the :class:`Thread`."""
import threading
from schedsi.cpu import request as cpurequest
from schedsi.cpu.time import Time
#: Whether to log individual times, or only the sum
LOG_INDIVIDUAL = True
class _ThreadStats: # pylint: disable=too-few-public-methods
"""Thread statistics."""
def __init__(s... | 32.706827 | 94 | 0.608915 | 7,930 | 0.973723 | 1,215 | 0.14919 | 0 | 0 | 0 | 0 | 3,229 | 0.396488 |
fd2e8e4f0baea2b1df6722ef44a729d6280f10cc | 5,552 | py | Python | application/src/initializer/auxiliary_methods.py | eyardley/CSC648-SoftwareEngineering-Snapster | 6dbe1cf9b34de6d6dbc6be75db3a34583f67c01a | [
"MIT"
] | null | null | null | application/src/initializer/auxiliary_methods.py | eyardley/CSC648-SoftwareEngineering-Snapster | 6dbe1cf9b34de6d6dbc6be75db3a34583f67c01a | [
"MIT"
] | 3 | 2021-06-08T21:39:12.000Z | 2022-01-13T02:46:20.000Z | application/src/initializer/auxiliary_methods.py | eyardley/CSC648-SoftwareEngineering-Snapster | 6dbe1cf9b34de6d6dbc6be75db3a34583f67c01a | [
"MIT"
] | 1 | 2021-05-09T21:01:28.000Z | 2021-05-09T21:01:28.000Z |
def fill_team_about(db):
###############################
# FILL TEAM ABOUT TABLE #
###############################
print('Inserting data into team member profiles table')
add_about_team_query = ("INSERT INTO team_about "
"(name, link, position, image, description,... | 52.377358 | 263 | 0.568444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,596 | 0.647695 |
fd3187f8e540b93ec7789114fa6cc6e3969608ec | 1,335 | py | Python | pyBRML/pyBRML/core.py | anich003/brml_toolkit | de8218bdf333902431d4c0055fcf5cb3dc47d0c1 | [
"MIT"
] | null | null | null | pyBRML/pyBRML/core.py | anich003/brml_toolkit | de8218bdf333902431d4c0055fcf5cb3dc47d0c1 | [
"MIT"
] | null | null | null | pyBRML/pyBRML/core.py | anich003/brml_toolkit | de8218bdf333902431d4c0055fcf5cb3dc47d0c1 | [
"MIT"
] | null | null | null | import copy
from pyBRML import utils
from pyBRML import Array
def multiply_potentials(list_of_potentials):
"""
Returns the product of each potential in list_of_potentials, useful for
calculating joint probabilities.
For example, if the joint probability of a system is defined as
p(A,B,C) = p(... | 35.131579 | 94 | 0.743071 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 761 | 0.570037 |
fd3394f2b7968055dc2a5d2b8bdde46ae4644c49 | 2,098 | py | Python | lib/akf_known_uncategories.py | UB-Mannheim/docxstruct | dd6d99b6fd6f5660fdc61a14b60e70a54ac9be85 | [
"Apache-2.0"
] | 1 | 2019-03-06T14:59:44.000Z | 2019-03-06T14:59:44.000Z | lib/akf_known_uncategories.py | UB-Mannheim/docxstruct | dd6d99b6fd6f5660fdc61a14b60e70a54ac9be85 | [
"Apache-2.0"
] | null | null | null | lib/akf_known_uncategories.py | UB-Mannheim/docxstruct | dd6d99b6fd6f5660fdc61a14b60e70a54ac9be85 | [
"Apache-2.0"
] | null | null | null | import re
class KnownUncategories(object):
"""
List of known entries in test_data which are no categories,
but are recognized as such
"""
def __init__(self):
# un-category regex strings (care for commas)
self.uc = [
"Beteiligung", # 1956: is part of B... | 31.313433 | 108 | 0.515253 | 2,088 | 0.994759 | 0 | 0 | 117 | 0.055741 | 0 | 0 | 968 | 0.461172 |
fd33bdf592a5bbf5b20d72627b7e89fa294ef5bf | 1,640 | py | Python | maps/templatetags/mapas_tags.py | lsalta/mapground | d927d283dab6f756574bd88b3251b9e68f000ca7 | [
"MIT"
] | null | null | null | maps/templatetags/mapas_tags.py | lsalta/mapground | d927d283dab6f756574bd88b3251b9e68f000ca7 | [
"MIT"
] | 3 | 2020-02-11T23:04:56.000Z | 2021-06-10T18:07:53.000Z | maps/templatetags/mapas_tags.py | lsalta/mapground | d927d283dab6f756574bd88b3251b9e68f000ca7 | [
"MIT"
] | 1 | 2021-08-20T14:49:09.000Z | 2021-08-20T14:49:09.000Z | from django import template
register = template.Library()
def mostrar_resumen_mapa(context, m, order_by):
# print context
to_return = {
'mapa': m,
'order_by': order_by,
}
return to_return
@register.inclusion_tag('mapas/lista_mapas.html')
def mostrar_mapas(lista_mapas, order_by):
to_return = {
... | 22.777778 | 83 | 0.668902 | 0 | 0 | 0 | 0 | 201 | 0.122561 | 0 | 0 | 570 | 0.347561 |
fd349e3352814cffd9d5b6c0c4f84624bb4c6bc6 | 1,868 | py | Python | app/services/aggregator/aggr.py | maestro-server/report-app | 0bf9014400f2979c51c1c544347d5134c73facdf | [
"Apache-2.0"
] | 1 | 2020-05-19T20:18:05.000Z | 2020-05-19T20:18:05.000Z | app/services/aggregator/aggr.py | maestro-server/report-app | 0bf9014400f2979c51c1c544347d5134c73facdf | [
"Apache-2.0"
] | 2 | 2019-10-21T14:56:04.000Z | 2020-03-27T12:48:26.000Z | app/services/aggregator/aggr.py | maestro-server/report-app | 0bf9014400f2979c51c1c544347d5134c73facdf | [
"Apache-2.0"
] | null | null | null | import pandas as pd
from pydash.objects import get
class Aggregator(object):
def __init__(self, field, lens=None, sublens='_id', include=[], opts={}):
self._field = field
self._lens = lens
self._sublens = sublens
self._result = []
self._transf = []
self._include = ... | 23.64557 | 77 | 0.556745 | 1,814 | 0.971092 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.01606 |
fd375dd0458ad06acf734748313eaba69b115090 | 310 | py | Python | email.py | zhaoxiaoyunok/python-library-fuzzers | 83db496f75280795415821097802a96fbf72f50f | [
"MIT"
] | 4 | 2019-07-03T06:01:08.000Z | 2019-07-29T08:07:54.000Z | email.py | zhaoxiaoyunok/python-library-fuzzers | 83db496f75280795415821097802a96fbf72f50f | [
"MIT"
] | null | null | null | email.py | zhaoxiaoyunok/python-library-fuzzers | 83db496f75280795415821097802a96fbf72f50f | [
"MIT"
] | 4 | 2019-07-03T03:24:56.000Z | 2021-12-11T12:30:31.000Z | from email.parser import BytesParser, Parser
from email.policy import default, HTTP
def FuzzerRunOne(FuzzerInput):
try:
Parser(policy=HTTP).parsestr(FuzzerInput.decode("utf-8", "replace"))
# #Parser(policy=default).parsestr(FuzzerInput.decode("utf-8", "replace"))
except:
pass
| 28.181818 | 81 | 0.696774 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 93 | 0.3 |
fd37bfae595f1bdb3cabeb62c9beddb408f90236 | 315 | py | Python | tests/conftest.py | calpt/flask-filealchemy | b3575299f0230d5a64865af8066122c2e0c485ec | [
"MIT"
] | 16 | 2018-10-16T03:32:39.000Z | 2020-09-04T02:05:37.000Z | tests/conftest.py | calpt/flask-filealchemy | b3575299f0230d5a64865af8066122c2e0c485ec | [
"MIT"
] | 8 | 2019-02-25T10:59:15.000Z | 2019-03-11T08:36:57.000Z | tests/conftest.py | calpt/flask-filealchemy | b3575299f0230d5a64865af8066122c2e0c485ec | [
"MIT"
] | 3 | 2019-11-22T23:46:16.000Z | 2020-06-05T19:17:23.000Z | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
import pytest
@pytest.fixture
def app():
return Flask(__name__)
@pytest.fixture
def db(app):
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
return SQLAlchemy(app)
| 18.529412 | 64 | 0.742857 | 0 | 0 | 0 | 0 | 231 | 0.733333 | 0 | 0 | 77 | 0.244444 |
fd3bd480b9c0a1b8e0dc9e02d722d288943bec44 | 357 | py | Python | DataStructuresAndAlgorithms/sorting algorithms/SelectionSort.py | armaan2k/Training-Exercises | 6dd94efb6cd6e0dc6c24e2b7d5e74588a74d190d | [
"MIT"
] | null | null | null | DataStructuresAndAlgorithms/sorting algorithms/SelectionSort.py | armaan2k/Training-Exercises | 6dd94efb6cd6e0dc6c24e2b7d5e74588a74d190d | [
"MIT"
] | null | null | null | DataStructuresAndAlgorithms/sorting algorithms/SelectionSort.py | armaan2k/Training-Exercises | 6dd94efb6cd6e0dc6c24e2b7d5e74588a74d190d | [
"MIT"
] | null | null | null | def selection_sort(A):
n = len(A)
for i in range(n - 1):
position = i
for j in range(i + 1, n):
if A[j] < A[position]:
position = j
temp = A[i]
A[i] = A[position]
A[position] = temp
A = [3, 5, 8, 9, 6, 2]
print('Original Array: ', A)
selectio... | 21 | 34 | 0.473389 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.095238 |
fd3cb5b3e208b581d3cf014077d7e88f0727e79e | 3,465 | py | Python | books/models.py | MattRijk/finance-ebook-site | c564d4bc9578f0a6f47efa53f0c81893fbee08f7 | [
"MIT"
] | 1 | 2020-05-16T12:48:02.000Z | 2020-05-16T12:48:02.000Z | books/models.py | MattRijk/finance-ebook-site | c564d4bc9578f0a6f47efa53f0c81893fbee08f7 | [
"MIT"
] | null | null | null | books/models.py | MattRijk/finance-ebook-site | c564d4bc9578f0a6f47efa53f0c81893fbee08f7 | [
"MIT"
] | 3 | 2017-12-06T11:18:10.000Z | 2020-05-16T12:49:32.000Z | from django.db import models
from django.core.urlresolvers import reverse
from django.utils import timezone
from django.utils.text import slugify
class Author(models.Model):
name = models.CharField(max_length=50, unique=False)
slug = models.SlugField(max_length=200, blank=True, unique=False)
def ... | 33 | 72 | 0.610967 | 3,226 | 0.931025 | 0 | 0 | 0 | 0 | 0 | 0 | 200 | 0.05772 |
fd3e69529a275a604f79403141c9d3a32f7b625b | 341 | py | Python | bucketlist_django/bucketlist_django/settings/development.py | andela-tadesanya/django-bucketlist-application | 315ceb77e635fe051b5600ada460af938c140af1 | [
"MIT"
] | null | null | null | bucketlist_django/bucketlist_django/settings/development.py | andela-tadesanya/django-bucketlist-application | 315ceb77e635fe051b5600ada460af938c140af1 | [
"MIT"
] | null | null | null | bucketlist_django/bucketlist_django/settings/development.py | andela-tadesanya/django-bucketlist-application | 315ceb77e635fe051b5600ada460af938c140af1 | [
"MIT"
] | null | null | null | # load defaults and override with devlopment settings
from defaults import *
DEBUG = True
WSGI_APPLICATION = 'bucketlist_django.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'bucketlist',
'USER': 'bucketlist',
'PASSWORD': ... | 21.3125 | 59 | 0.653959 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 204 | 0.59824 |
fd45eaa50a88cd4355e2753ab9dc9b6e727d52ec | 1,198 | py | Python | storyboard/tests/plugin/scheduler/test_base.py | Sitcode-Zoograf/storyboard | 5833f87e20722c524a1e4a0b8e1fb82206fb4e5c | [
"Apache-2.0"
] | null | null | null | storyboard/tests/plugin/scheduler/test_base.py | Sitcode-Zoograf/storyboard | 5833f87e20722c524a1e4a0b8e1fb82206fb4e5c | [
"Apache-2.0"
] | null | null | null | storyboard/tests/plugin/scheduler/test_base.py | Sitcode-Zoograf/storyboard | 5833f87e20722c524a1e4a0b8e1fb82206fb4e5c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
#
# 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... | 29.219512 | 78 | 0.717863 | 484 | 0.404007 | 0 | 0 | 0 | 0 | 0 | 0 | 728 | 0.607679 |
fd464df7fbbebbe26bc4d827bb8cf980aecbe03a | 13,019 | py | Python | src/model/build_models.py | VinGPan/classification_model_search | fab7ce6fc131b858f1b79633e0f7b86d1446c93d | [
"MIT"
] | null | null | null | src/model/build_models.py | VinGPan/classification_model_search | fab7ce6fc131b858f1b79633e0f7b86d1446c93d | [
"MIT"
] | null | null | null | src/model/build_models.py | VinGPan/classification_model_search | fab7ce6fc131b858f1b79633e0f7b86d1446c93d | [
"MIT"
] | null | null | null | import os
import os.path
import pickle
from shutil import copyfile
import numpy as np
import pandas as pd
import xgboost as xgb
from sklearn.decomposition import KernelPCA
from sklearn.decomposition import PCA
from sklearn.ensemble import AdaBoostClassifier
from sklearn.ensemble import GradientBoostingClassifier
from ... | 47.688645 | 118 | 0.541132 | 0 | 0 | 0 | 0 | 7,659 | 0.588294 | 0 | 0 | 3,653 | 0.28059 |
fd4aa50f6950d8285cebb403be0898f64adbb857 | 2,495 | py | Python | gleague/gleague/frontend/seasons.py | Nuqlear/genkstaleague | 664ed1d3ebea9c43053546fc2d658083cc16526b | [
"MIT"
] | 7 | 2015-08-18T01:21:48.000Z | 2021-04-30T03:10:38.000Z | gleague/gleague/frontend/seasons.py | Nuqlear/genkstaleague | 664ed1d3ebea9c43053546fc2d658083cc16526b | [
"MIT"
] | 1 | 2019-04-28T10:02:39.000Z | 2019-05-06T08:11:56.000Z | gleague/gleague/frontend/seasons.py | Nuqlear/genkstaleague | 664ed1d3ebea9c43053546fc2d658083cc16526b | [
"MIT"
] | 3 | 2015-08-14T09:42:25.000Z | 2018-11-08T07:07:58.000Z | from flask import Blueprint
from flask import abort
from flask import render_template
from flask import request
from flask import current_app
from sqlalchemy import desc
from gleague.core import db
from gleague.models import Match
from gleague.models import Season
from gleague.models import SeasonStats
from gleague.mo... | 34.652778 | 83 | 0.710621 | 0 | 0 | 0 | 0 | 1,806 | 0.723848 | 0 | 0 | 326 | 0.130661 |
fd4d6ed01b3decd5927f1d836a338350d16f500c | 941 | py | Python | LC_problems/822.py | Howardhuang98/Blog | cf58638d6d0bbf55b95fe08e43798e7dd14219ac | [
"MIT"
] | null | null | null | LC_problems/822.py | Howardhuang98/Blog | cf58638d6d0bbf55b95fe08e43798e7dd14219ac | [
"MIT"
] | null | null | null | LC_problems/822.py | Howardhuang98/Blog | cf58638d6d0bbf55b95fe08e43798e7dd14219ac | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
@File : 822.py
@Contact : huanghoward@foxmail.com
@Modify Time : 2022/3/29 13:19
------------
"""
from typing import List
class Solution:
def flipgame(self, fronts: List[int], backs: List[int]) -> int:
ans = float('+inf')
fo... | 27.676471 | 67 | 0.420829 | 665 | 0.706695 | 0 | 0 | 0 | 0 | 0 | 0 | 185 | 0.196599 |
fd4d784f79a128a2168a7d3f9c317a2fb64d12f1 | 22,795 | py | Python | result/analyze.py | kuriatsu/PIE_RAS | 8dd33b4d4f7b082337a2645c0a72082374768b52 | [
"Apache-2.0"
] | null | null | null | result/analyze.py | kuriatsu/PIE_RAS | 8dd33b4d4f7b082337a2645c0a72082374768b52 | [
"Apache-2.0"
] | null | null | null | result/analyze.py | kuriatsu/PIE_RAS | 8dd33b4d4f7b082337a2645c0a72082374768b52 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python3
# -*- coding: utf-8 -*-
import pickle
import pandas as pd
import xml.etree.ElementTree as ET
import math
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
import csv
import glob
import scikit_posthocs as sp
from scipy import stats
import os
from scipy import stats
import scik... | 44.696078 | 222 | 0.612547 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,655 | 0.29195 |
fd4df1f5acd3eb66e203334228aa56f68ab7a4a9 | 302 | py | Python | tests/huge.py | nbdy/podb | 684ed6b8330c0d18a2b89d6521cb15586d1f95a4 | [
"MIT"
] | null | null | null | tests/huge.py | nbdy/podb | 684ed6b8330c0d18a2b89d6521cb15586d1f95a4 | [
"MIT"
] | null | null | null | tests/huge.py | nbdy/podb | 684ed6b8330c0d18a2b89d6521cb15586d1f95a4 | [
"MIT"
] | null | null | null | import unittest
from podb import DB
from tqdm import tqdm
from . import HugeDBItem
db = DB("huge")
class HugeDBTest(unittest.TestCase):
def test_huge_insert(self):
for _ in tqdm(range(1000000)):
db.insert(HugeDBItem.random())
if __name__ == '__main__':
unittest.main()
| 17.764706 | 42 | 0.682119 | 150 | 0.496689 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.05298 |
fd5095688e3adf6f9ca25f40240ff9d7e4246e41 | 153 | py | Python | moto/sts/__init__.py | pll/moto | e49e67aba5d108b03865bdb42124206ea7e572ea | [
"Apache-2.0"
] | null | null | null | moto/sts/__init__.py | pll/moto | e49e67aba5d108b03865bdb42124206ea7e572ea | [
"Apache-2.0"
] | null | null | null | moto/sts/__init__.py | pll/moto | e49e67aba5d108b03865bdb42124206ea7e572ea | [
"Apache-2.0"
] | null | null | null | from .models import sts_backend
from ..core.models import base_decorator
sts_backends = {"global": sts_backend}
mock_sts = base_decorator(sts_backends)
| 25.5 | 40 | 0.810458 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.052288 |
fd518544ef8c44c965453eb8925336fcec4f3ee3 | 3,005 | py | Python | convert_nbrId_to_orgnr.py | obtitus/barnehagefakta_osm | 4539525f6defcc67a087cc57baad996f8d76b8bd | [
"Apache-2.0"
] | 1 | 2018-10-05T17:00:23.000Z | 2018-10-05T17:00:23.000Z | convert_nbrId_to_orgnr.py | obtitus/barnehagefakta_osm | 4539525f6defcc67a087cc57baad996f8d76b8bd | [
"Apache-2.0"
] | 6 | 2016-05-29T09:33:06.000Z | 2019-12-18T20:24:50.000Z | convert_nbrId_to_orgnr.py | obtitus/barnehagefakta_osm | 4539525f6defcc67a087cc57baad996f8d76b8bd | [
"Apache-2.0"
] | null | null | null | # Database switched from having nsrId to using orgnr, this script helps with this conversion.
import os
import re
import json
import subprocess
from glob import glob
from utility_to_osm import file_util
if __name__ == '__main__':
data_dir = 'data' #'barnehagefakta_osm_data/data'
nsrId_to_orgnr_filename = 'nsr... | 40.608108 | 110 | 0.509151 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 547 | 0.18203 |
fd51dbb2cb05ef487bcf83c509336b681bc19872 | 769 | py | Python | regcore/tests/layer_tests.py | navigo/regulations-core | 0b2a2034baacfa1cc5ff87f14db7d1aaa8d260c3 | [
"CC0-1.0"
] | 17 | 2016-06-14T19:06:02.000Z | 2021-10-03T23:46:00.000Z | regcore/tests/layer_tests.py | navigo/regulations-core | 0b2a2034baacfa1cc5ff87f14db7d1aaa8d260c3 | [
"CC0-1.0"
] | 42 | 2016-04-06T22:34:26.000Z | 2020-04-14T22:00:24.000Z | regcore/tests/layer_tests.py | navigo/regulations-core | 0b2a2034baacfa1cc5ff87f14db7d1aaa8d260c3 | [
"CC0-1.0"
] | 20 | 2016-05-04T06:04:34.000Z | 2020-10-07T16:16:03.000Z | from django.test import TestCase
from regcore.layer import standardize_params
class LayerParamsTests(TestCase):
def test_old_format(self):
lp = standardize_params('label', 'version')
self.assertEqual(lp.doc_type, 'cfr')
self.assertEqual(lp.doc_id, 'version/label')
self.assertEqual... | 33.434783 | 55 | 0.669701 | 687 | 0.893368 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.170351 |
fd5213aa3c0233313738c5ac6fd68800d2601767 | 459 | py | Python | asal.py | kedigucuk01/asal-sayi-bulucu | dffc81cec5c4bbd6b4423d8991a5559a79f26f92 | [
"MIT"
] | 2 | 2021-06-10T16:27:42.000Z | 2021-06-11T10:54:24.000Z | asal.py | kedigucuk01/asal-sayi-bulucu | dffc81cec5c4bbd6b4423d8991a5559a79f26f92 | [
"MIT"
] | 1 | 2021-06-15T11:08:58.000Z | 2021-08-10T20:23:11.000Z | asal.py | kedigucuk01/asal-sayi-bulucu | dffc81cec5c4bbd6b4423d8991a5559a79f26f92 | [
"MIT"
] | null | null | null | while True:
try:
i = int(input("Sayı giriniz: ")) # 2
except ValueError:
print("Hata Kodu: 5786, \nAçıklama: Lütfen bir \"tam sayı\" giriniz.")
else:
for s in range(2, i, 1):
if i%s == 0:
print(f"{i} sayısı, asal değildir.")
break
else:
if s == i - 1:
print(f"{i} sayısı, as... | 20.863636 | 73 | 0.542484 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 224 | 0.468619 |
fd543b58f8ff3f846e998d58939fe4d5bc4acf05 | 5,859 | py | Python | main.py | MO-RISE/crowsnest-connector-cluon-n2k | 11eaefd8ebe76829ec8fe91f99da9acbc84e5187 | [
"Apache-2.0"
] | null | null | null | main.py | MO-RISE/crowsnest-connector-cluon-n2k | 11eaefd8ebe76829ec8fe91f99da9acbc84e5187 | [
"Apache-2.0"
] | null | null | null | main.py | MO-RISE/crowsnest-connector-cluon-n2k | 11eaefd8ebe76829ec8fe91f99da9acbc84e5187 | [
"Apache-2.0"
] | null | null | null | """Main entrypoint for this application"""
from pathlib import Path
from math import degrees
from datetime import datetime
import logging
import warnings
from environs import Env
from streamz import Stream
from paho.mqtt.client import Client as MQTT
from pycluon import OD4Session, Envelope as cEnvelope
from pycluo... | 30.046154 | 135 | 0.70524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,821 | 0.310804 |
fd54b2677eda2400e60664de51925feee4550c09 | 7,569 | py | Python | cocapi/client/api.py | bim-ba/coc-api | 69ff957803cb991dfad8df3af752d193171f2ef0 | [
"Unlicense"
] | 1 | 2022-03-29T12:39:36.000Z | 2022-03-29T12:39:36.000Z | cocapi/client/api.py | bim-ba/coc-api | 69ff957803cb991dfad8df3af752d193171f2ef0 | [
"Unlicense"
] | null | null | null | cocapi/client/api.py | bim-ba/coc-api | 69ff957803cb991dfad8df3af752d193171f2ef0 | [
"Unlicense"
] | null | null | null | from typing import Any, Optional
from dataclasses import dataclass, field
import aiohttp
from ..types import aliases
from ..types import exceptions
@dataclass
class BaseMethod:
# config
base_url: aliases.Url | None = field(init=False, default=None)
default_http_method: aliases.RequestMethod | None = fie... | 34.880184 | 143 | 0.62069 | 4,480 | 0.591888 | 0 | 0 | 1,262 | 0.166733 | 2,890 | 0.381821 | 3,797 | 0.501651 |
fd56674cc383ba9fa6321e89c2463e251d94abf2 | 28,594 | py | Python | ratings.py | struct-rgb/ratings | 40d56455406cfee9731c564e54ed7610b5a9641c | [
"MIT"
] | null | null | null | ratings.py | struct-rgb/ratings | 40d56455406cfee9731c564e54ed7610b5a9641c | [
"MIT"
] | null | null | null | ratings.py | struct-rgb/ratings | 40d56455406cfee9731c564e54ed7610b5a9641c | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import re
import json
import random
from pathlib import Path
from datetime import date
from typing import Any, Callable, Set, Tuple
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
from tags import Filter, Box, CompilationError, escape, enum_subject_parser_factory, tagset,... | 26.305428 | 148 | 0.708435 | 20,378 | 0.712667 | 0 | 0 | 3,710 | 0.129747 | 0 | 0 | 3,782 | 0.132266 |
fd567ff8b78d041903de62043964d3c66a7450a4 | 10,218 | py | Python | K64F Python Interfacing Testing/Loop_Read.py | Marnold212/CamLab-K64F | 20689b4be38aa329990dbfe13eec43d74b3ae27a | [
"Apache-2.0"
] | null | null | null | K64F Python Interfacing Testing/Loop_Read.py | Marnold212/CamLab-K64F | 20689b4be38aa329990dbfe13eec43d74b3ae27a | [
"Apache-2.0"
] | null | null | null | K64F Python Interfacing Testing/Loop_Read.py | Marnold212/CamLab-K64F | 20689b4be38aa329990dbfe13eec43d74b3ae27a | [
"Apache-2.0"
] | null | null | null | import numpy as np
from serial.serialutil import SerialException
import serial.tools.list_ports as port_list
import serial
import time
def Hex_To_Dec(input): # input of form "40048024"
return int(input, 16)
def Hex_To_Bin(input): # input of form "40048024"
return bin(int(input, 16))
def Hex_To_Bytes(input):... | 47.305556 | 224 | 0.641124 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,763 | 0.466138 |
fd57c568a71d49ca653bf0ce40af26241330267b | 190 | py | Python | geosolver/text/generate_rules.py | mhrmm/geosolver | 13ae2972c58d5ba4c4878576f9fba8569cc99629 | [
"Apache-2.0"
] | 83 | 2015-09-14T13:50:42.000Z | 2022-03-12T10:24:38.000Z | geosolver/text/generate_rules.py | nehamjadhav/geosolver | 13ae2972c58d5ba4c4878576f9fba8569cc99629 | [
"Apache-2.0"
] | 8 | 2021-07-21T09:55:42.000Z | 2022-02-15T02:31:47.000Z | geosolver/text/generate_rules.py | nehamjadhav/geosolver | 13ae2972c58d5ba4c4878576f9fba8569cc99629 | [
"Apache-2.0"
] | 33 | 2015-06-16T18:52:43.000Z | 2021-12-16T08:58:27.000Z | from geosolver.ontology.ontology_definitions import FunctionSignature, signatures
from geosolver.text.rule import TagRule
from geosolver.utils.num import is_number
__author__ = 'minjoon'
| 23.75 | 81 | 0.847368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.047368 |
fd5911cef504b719bc6cc6d734809ba588ffa54f | 1,433 | py | Python | fhir_dataframes/store.py | Tiro-health/fhir-dataframes | 57086b7bb385ffbce55f57747903eca7a7f84665 | [
"MIT"
] | 1 | 2022-02-09T08:16:09.000Z | 2022-02-09T08:16:09.000Z | fhir_dataframes/store.py | Tiro-health/fhir-dataframes | 57086b7bb385ffbce55f57747903eca7a7f84665 | [
"MIT"
] | null | null | null | fhir_dataframes/store.py | Tiro-health/fhir-dataframes | 57086b7bb385ffbce55f57747903eca7a7f84665 | [
"MIT"
] | null | null | null | from __future__ import annotations
from itertools import tee
from typing import Iterable, Optional, Sequence, Union
import pandas as pd
from tiro_fhir import Resource
from fhir_dataframes import code_accessor
class LocalFHIRStore:
def __init__(self, resources: Iterable[Resource] = []):
self._resources: It... | 30.489362 | 87 | 0.686671 | 1,221 | 0.852059 | 0 | 0 | 379 | 0.26448 | 0 | 0 | 45 | 0.031403 |
fd5ed16b310aacd62d38f7ed79f88685cc24b454 | 1,189 | py | Python | senlerpy/senler.py | tezmen/SenlerPy | ce8ab8512ed795e8e6f1e7ff76f54c6aa2d3cd82 | [
"Apache-2.0"
] | 2 | 2019-03-19T08:46:27.000Z | 2020-11-12T10:55:59.000Z | senlerpy/senler.py | tezmen/SenlerPy | ce8ab8512ed795e8e6f1e7ff76f54c6aa2d3cd82 | [
"Apache-2.0"
] | 1 | 2021-03-30T16:55:09.000Z | 2021-03-30T16:55:09.000Z | senlerpy/senler.py | tezmen/SenlerPy | ce8ab8512ed795e8e6f1e7ff76f54c6aa2d3cd82 | [
"Apache-2.0"
] | 7 | 2019-03-19T08:47:35.000Z | 2021-08-24T11:47:41.000Z | # -*- coding: utf-8 -*-
import json
import logging
from .request import RequestApi
from .exceptions import ApiError, WrongId, HttpError
logger = logging.getLogger(__name__)
class Senler:
def __init__(self, secret, vk_group_id=None):
self.vk_group = vk_group_id
self.__secret = str(secret).strip()
self._rq = Re... | 25.847826 | 81 | 0.735071 | 1,012 | 0.851135 | 0 | 0 | 181 | 0.152229 | 0 | 0 | 212 | 0.178301 |
fd5f3466a377d682676cf2f35cddaec4567f59df | 11,354 | py | Python | robinhoodbot/main.py | bpk9/Robinhood-Stock-Trading-Bot | c2ab0dd58f5236ee051ad38277c8ba5c46bd0aa4 | [
"MIT"
] | null | null | null | robinhoodbot/main.py | bpk9/Robinhood-Stock-Trading-Bot | c2ab0dd58f5236ee051ad38277c8ba5c46bd0aa4 | [
"MIT"
] | null | null | null | robinhoodbot/main.py | bpk9/Robinhood-Stock-Trading-Bot | c2ab0dd58f5236ee051ad38277c8ba5c46bd0aa4 | [
"MIT"
] | null | null | null | import pyotp
import robin_stocks as r
import pandas as pd
import numpy as np
import ta as ta
from pandas.plotting import register_matplotlib_converters
from ta import *
from misc import *
from tradingstats import *
from config import *
#Log in to Robinhood
#Put your username and password in a config.py file in the sam... | 42.365672 | 201 | 0.656068 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,418 | 0.477189 |
fd60adf005e921981d0393064770bc769120bb9d | 3,401 | py | Python | slivka/server/forms/file_proxy.py | warownia1/Slivca | 5491afec63c8cd41d6f1389a5dd0ba9877b888a1 | [
"Apache-2.0"
] | 5 | 2016-09-01T15:30:46.000Z | 2019-07-15T12:26:46.000Z | slivka/server/forms/file_proxy.py | warownia1/Slivca | 5491afec63c8cd41d6f1389a5dd0ba9877b888a1 | [
"Apache-2.0"
] | 75 | 2016-08-31T11:32:49.000Z | 2021-05-12T14:33:17.000Z | slivka/server/forms/file_proxy.py | warownia1/Slivca | 5491afec63c8cd41d6f1389a5dd0ba9877b888a1 | [
"Apache-2.0"
] | 3 | 2017-06-01T10:21:04.000Z | 2020-06-12T10:32:49.000Z | import io
import os
import shutil
from base64 import urlsafe_b64decode
from bson import ObjectId
from slivka.db.documents import UploadedFile, JobRequest
class FileProxy:
_file: io.IOBase = None
closed = property(lambda self: self._file is None or self.file.closed)
fileno = property(lambda self: self.f... | 31.490741 | 76 | 0.612173 | 3,242 | 0.953249 | 0 | 0 | 706 | 0.207586 | 0 | 0 | 402 | 0.118201 |
fd618c3a159e9f99d7c6ca6d044db4a500817e13 | 1,160 | py | Python | debug_toolbar/panels/profiling.py | chrismaille/fastapi-debug-toolbar | 76d1e78eda4a23fc2b3e3d3c978ee9d8dbf025ae | [
"BSD-3-Clause"
] | 36 | 2021-07-22T08:11:31.000Z | 2022-01-31T13:09:26.000Z | debug_toolbar/panels/profiling.py | chrismaille/fastapi-debug-toolbar | 76d1e78eda4a23fc2b3e3d3c978ee9d8dbf025ae | [
"BSD-3-Clause"
] | 10 | 2021-07-21T19:39:38.000Z | 2022-02-26T15:35:35.000Z | debug_toolbar/panels/profiling.py | chrismaille/fastapi-debug-toolbar | 76d1e78eda4a23fc2b3e3d3c978ee9d8dbf025ae | [
"BSD-3-Clause"
] | 2 | 2021-07-28T09:55:13.000Z | 2022-02-18T11:29:25.000Z | import typing as t
from fastapi import Request, Response
from pyinstrument import Profiler
from starlette.concurrency import run_in_threadpool
from debug_toolbar.panels import Panel
from debug_toolbar.types import Stats
from debug_toolbar.utils import is_coroutine, matched_endpoint
class ProfilingPanel(Panel):
... | 30.526316 | 82 | 0.70431 | 872 | 0.751724 | 0 | 0 | 0 | 0 | 769 | 0.662931 | 43 | 0.037069 |
fd63367d2463bae216c32c0f3162ba07be04c060 | 3,003 | py | Python | test/system/auto/simple/compaction.py | marciosilva/accumulo | 70404cbd1e0a2d2b7c2235009e158979abeef35f | [
"Apache-2.0"
] | 3 | 2021-11-11T05:18:23.000Z | 2021-11-11T05:18:43.000Z | test/system/auto/simple/compaction.py | jatrost/accumulo | 6be40f2f3711aaa7d0b68b5b6852b79304af3cff | [
"Apache-2.0"
] | 1 | 2021-06-22T09:52:37.000Z | 2021-06-22T09:52:37.000Z | test/system/auto/simple/compaction.py | isabella232/accumulo-1 | 70404cbd1e0a2d2b7c2235009e158979abeef35f | [
"Apache-2.0"
] | 1 | 2021-06-22T09:33:38.000Z | 2021-06-22T09:33:38.000Z | # 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 not use ... | 33.741573 | 109 | 0.656011 | 1,975 | 0.657676 | 0 | 0 | 0 | 0 | 0 | 0 | 1,342 | 0.446886 |
fd651bee99ddf05837b752023ba0b7975d179d63 | 660 | py | Python | src/featurehub/problems/__init__.py | vishalbelsare/FeatureHub | dca517338b6e1359faa47ba309f05691cb96e8f8 | [
"MIT"
] | 85 | 2017-09-11T22:37:34.000Z | 2022-02-26T09:07:05.000Z | src/featurehub/problems/__init__.py | HDI-Project/FeatureFactory | dca517338b6e1359faa47ba309f05691cb96e8f8 | [
"MIT"
] | 5 | 2018-08-08T15:34:36.000Z | 2018-11-15T04:52:10.000Z | src/featurehub/problems/__init__.py | HDI-Project/FeatureFactory | dca517338b6e1359faa47ba309f05691cb96e8f8 | [
"MIT"
] | 18 | 2017-11-01T04:14:16.000Z | 2021-09-27T00:53:32.000Z | import imp
import sys
from sqlalchemy.exc import ProgrammingError
from featurehub.user.session import Session
from featurehub.admin.admin import Commands
try:
for _problem in Commands().get_problems():
# Create a session for each problem and make it importable
_commands = Session(_problem)
... | 33 | 71 | 0.725758 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 204 | 0.309091 |
b5b97c67425c6b42d928076e5a8d8cb8fc8a23c8 | 12,107 | py | Python | python/lexical_analysis.py | Compiler-Construction-Uni-Freiburg/lecture-notes-2021 | 56300e6649e32f0594bbbd046a2e19351c57dd0c | [
"BSD-3-Clause"
] | 1 | 2022-01-05T07:11:01.000Z | 2022-01-05T07:11:01.000Z | python/lexical_analysis.py | Compiler-Construction-Uni-Freiburg/lecture-notes-2021 | 56300e6649e32f0594bbbd046a2e19351c57dd0c | [
"BSD-3-Clause"
] | null | null | null | python/lexical_analysis.py | Compiler-Construction-Uni-Freiburg/lecture-notes-2021 | 56300e6649e32f0594bbbd046a2e19351c57dd0c | [
"BSD-3-Clause"
] | null | null | null | from dataclasses import dataclass
from functools import reduce
from typing import Callable, Iterable, Iterator
'''
The first phase of a compiler is called `lexical analysis` implemented by a `scanner` or `lexer`.
It breaks a program into a sequence `lexemes`:
meaningful substrings of the input.
It also transforms... | 32.810298 | 105 | 0.641943 | 1,737 | 0.142435 | 186 | 0.015252 | 1,848 | 0.151538 | 0 | 0 | 4,534 | 0.371792 |
b5ba7ba10498502b304fe0e8be303cfbec8a9050 | 179 | py | Python | tapiriik/web/views/dashboard.py | prohfesor/tapiriik | 0c476f8bb6b3d51674f0117b054777405ff2ee0d | [
"Apache-2.0"
] | 1,445 | 2015-01-01T21:43:31.000Z | 2022-03-17T13:40:23.000Z | tapiriik/web/views/dashboard.py | prohfesor/tapiriik | 0c476f8bb6b3d51674f0117b054777405ff2ee0d | [
"Apache-2.0"
] | 441 | 2015-01-02T03:37:49.000Z | 2022-03-31T18:18:03.000Z | tapiriik/web/views/dashboard.py | prohfesor/tapiriik | 0c476f8bb6b3d51674f0117b054777405ff2ee0d | [
"Apache-2.0"
] | 333 | 2015-01-06T12:14:15.000Z | 2022-03-27T19:58:48.000Z | from django.shortcuts import render
from django.views.decorators.csrf import ensure_csrf_cookie
@ensure_csrf_cookie
def dashboard(req):
return render(req, "dashboard.html")
| 22.375 | 59 | 0.810056 | 0 | 0 | 0 | 0 | 80 | 0.446927 | 0 | 0 | 16 | 0.089385 |
b5bab08cb20bbb7d8d1adf2e537dc3cd96869fbf | 2,830 | py | Python | rcommander/src/rcommander/trigger_tool.py | rummanwaqar/rcommander-core | 7106d5868db76c47dea6ad11118a54351a8bd390 | [
"BSD-3-Clause"
] | 4 | 2015-04-08T09:57:43.000Z | 2021-08-12T01:44:37.000Z | rcommander/src/rcommander/trigger_tool.py | jhu-lcsr-forks/rcommander-core | 1a0350e9b93687eff6a4407f72b5250be5f56919 | [
"BSD-3-Clause"
] | 1 | 2015-03-12T09:10:27.000Z | 2015-03-12T09:10:27.000Z | rcommander/src/rcommander/trigger_tool.py | jhu-lcsr-forks/rcommander-core | 1a0350e9b93687eff6a4407f72b5250be5f56919 | [
"BSD-3-Clause"
] | 3 | 2015-03-12T10:59:17.000Z | 2021-06-21T02:13:57.000Z | import tool_utils as tu
import PyQt4.QtGui as qtg
import PyQt4.QtCore as qtc
from PyQt4.QtGui import *
from PyQt4.QtCore import *
import smach
import rospy
from msg import Trigger
TRIGGER_TOPIC = 'trigger'
class TriggerTool(tu.ToolBase):
def __init__(self, rcommander):
tu.ToolBase.__init__(self, rcomman... | 29.479167 | 99 | 0.639929 | 2,613 | 0.923322 | 0 | 0 | 0 | 0 | 0 | 0 | 345 | 0.121908 |
b5bace535ed77ddf8b3b03e2ed93c9e75ae9c3a6 | 1,488 | py | Python | tests/helpers/fake_tunnel.py | intdata-bsc/idact | 54cb65a711c145351e205970c27c83e6393cccf5 | [
"MIT"
] | 5 | 2018-12-06T15:40:34.000Z | 2019-06-19T11:22:58.000Z | tests/helpers/fake_tunnel.py | garstka/idact | b9c8405c94db362c4a51d6bfdf418b14f06f0da1 | [
"MIT"
] | 9 | 2018-12-06T16:35:26.000Z | 2019-04-28T19:01:40.000Z | tests/helpers/fake_tunnel.py | intdata-bsc/idact | 54cb65a711c145351e205970c27c83e6393cccf5 | [
"MIT"
] | 2 | 2019-04-28T19:18:58.000Z | 2019-06-17T06:56:28.000Z | from contextlib import contextmanager
from idact import ClusterConfig
from idact.detail.nodes.node_impl import NodeImpl
from idact.detail.tunnel.tunnel_internal import TunnelInternal
class FakeTunnel(TunnelInternal):
"""Does nothing besides holding the remote port.
Local port is ignored.
:param ... | 22.892308 | 68 | 0.625672 | 892 | 0.599462 | 390 | 0.262097 | 616 | 0.413978 | 0 | 0 | 279 | 0.1875 |
b5bbdd0d4bc19356fb3ff4442955d7c4c889b2e9 | 3,226 | py | Python | app/airtable/base_school_db/educators_schools.py | WildflowerSchools/wf-airtable-api | 963021e5108462d33efa222fedb00890e1788ad6 | [
"MIT"
] | null | null | null | app/airtable/base_school_db/educators_schools.py | WildflowerSchools/wf-airtable-api | 963021e5108462d33efa222fedb00890e1788ad6 | [
"MIT"
] | null | null | null | app/airtable/base_school_db/educators_schools.py | WildflowerSchools/wf-airtable-api | 963021e5108462d33efa222fedb00890e1788ad6 | [
"MIT"
] | null | null | null | from datetime import date
from typing import Optional, Union
from pydantic import BaseModel, Field, validator
from . import educators as educators_models
from . import schools as schools_models
from app.airtable.response import AirtableResponse
from app.airtable.validators import get_first_or_default_none
class Cr... | 32.26 | 119 | 0.712027 | 2,901 | 0.899256 | 0 | 0 | 0 | 0 | 0 | 0 | 168 | 0.052077 |
b5bc0b82b561c3ccd0c214272db1e77e19243f08 | 4,003 | py | Python | rad/rest/client/cli/zpool/cmd_zpool_list.py | guillermomolina/rad-rest-client | c22528764bdf9dddc5ff7d269d7465d34878a7e3 | [
"Apache-2.0"
] | 1 | 2021-09-17T13:40:13.000Z | 2021-09-17T13:40:13.000Z | rad/rest/client/cli/zpool/cmd_zpool_list.py | guillermomolina/rad-rest-client | c22528764bdf9dddc5ff7d269d7465d34878a7e3 | [
"Apache-2.0"
] | null | null | null | rad/rest/client/cli/zpool/cmd_zpool_list.py | guillermomolina/rad-rest-client | c22528764bdf9dddc5ff7d269d7465d34878a7e3 | [
"Apache-2.0"
] | 1 | 2021-09-17T16:26:32.000Z | 2021-09-17T16:26:32.000Z | # Copyright 2021, Guillermo Adrián Molina
#
# 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 ... | 43.043011 | 105 | 0.572321 | 3,088 | 0.771229 | 0 | 0 | 1,804 | 0.450549 | 0 | 0 | 1,047 | 0.261489 |
b5bcf620df665e14fd0ade4b0917ffe41b1ea768 | 3,736 | py | Python | Sofware/main.py | Mark-MDO47/PiPod | 990042ff5ad69d9fc93d1bd5bd684db730156222 | [
"MIT"
] | 63 | 2018-08-02T20:50:41.000Z | 2022-03-02T02:42:48.000Z | Sofware/main.py | Mark-MDO47/PiPod | 990042ff5ad69d9fc93d1bd5bd684db730156222 | [
"MIT"
] | 2 | 2018-08-30T16:31:48.000Z | 2021-12-02T01:28:23.000Z | Sofware/main.py | Mark-MDO47/PiPod | 990042ff5ad69d9fc93d1bd5bd684db730156222 | [
"MIT"
] | 14 | 2018-08-05T04:45:07.000Z | 2022-02-18T10:56:20.000Z | #!/usr/bin/python3
import playback
import display
import navigation
import device
import pygame
done = False
music = playback.music()
view = display.view()
menu = navigation.menu()
PiPod = device.PiPod()
menu.loadMetadata()
status = PiPod.getStatus()
songMetadata = music.getStatus()
displayUpdate = pygame.USEREVENT ... | 34.592593 | 103 | 0.482869 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 496 | 0.132762 |
b5bd68a22d06b0793abe8bb8a40789d31dac7150 | 3,250 | py | Python | cloudshell/cli/session/telnet_session.py | test-gh-org-workflow/probable-garbanzo | c6b8a0dbc573a2a0073b5ab7c8619c4d0baf7088 | [
"Apache-2.0"
] | 4 | 2017-01-31T14:05:19.000Z | 2019-04-10T16:35:44.000Z | cloudshell/cli/session/telnet_session.py | test-gh-org-workflow/probable-garbanzo | c6b8a0dbc573a2a0073b5ab7c8619c4d0baf7088 | [
"Apache-2.0"
] | 89 | 2016-05-25T14:17:38.000Z | 2022-03-17T13:09:59.000Z | cloudshell/cli/session/telnet_session.py | test-gh-org-workflow/probable-garbanzo | c6b8a0dbc573a2a0073b5ab7c8619c4d0baf7088 | [
"Apache-2.0"
] | 6 | 2016-07-21T12:24:10.000Z | 2022-02-21T06:33:18.000Z | import socket
import telnetlib
from collections import OrderedDict
from cloudshell.cli.session.connection_params import ConnectionParams
from cloudshell.cli.session.expect_session import ExpectSession
from cloudshell.cli.session.session_exceptions import (
SessionException,
SessionReadEmptyData,
SessionRea... | 27.542373 | 88 | 0.614462 | 2,912 | 0.896 | 0 | 0 | 0 | 0 | 0 | 0 | 356 | 0.109538 |
b5bdd10944be47a0eef70a2d5c3fc45fddcfaaf6 | 5,698 | py | Python | src/contentbase/auditor.py | ClinGen/clincoded | 5624c74546ce2a44eda00ee632a8de8c2099da10 | [
"MIT"
] | 30 | 2015-09-23T20:38:57.000Z | 2021-03-10T03:12:46.000Z | src/contentbase/auditor.py | ClinGen/clincoded | 5624c74546ce2a44eda00ee632a8de8c2099da10 | [
"MIT"
] | 2,132 | 2015-06-08T21:50:35.000Z | 2022-02-15T22:44:18.000Z | src/contentbase/auditor.py | ClinGen/clincoded | 5624c74546ce2a44eda00ee632a8de8c2099da10 | [
"MIT"
] | 10 | 2015-09-25T20:11:25.000Z | 2020-12-09T02:58:44.000Z | """ Cross-object data auditing
Schema validation allows for checking values within a single object.
We also need to perform higher order checking between linked objects.
"""
from past.builtins import basestring
import logging
import venusian
logger = logging.getLogger(__name__)
def includeme(config):
config.re... | 32.56 | 92 | 0.551071 | 3,792 | 0.665497 | 0 | 0 | 0 | 0 | 0 | 0 | 849 | 0.149 |
b5be5d0470828bf2d8483755e027514f357777f6 | 1,694 | py | Python | PyTrinamic/ic/TMC2130/TMC2130.py | trinamic-AA/PyTrinamic | b054f4baae8eb6d3f5d2574cf69c232f66abb4ee | [
"MIT"
] | 37 | 2019-01-13T11:08:45.000Z | 2022-03-25T07:18:15.000Z | PyTrinamic/ic/TMC2130/TMC2130.py | trinamic-AA/PyTrinamic | b054f4baae8eb6d3f5d2574cf69c232f66abb4ee | [
"MIT"
] | 56 | 2019-02-25T02:48:27.000Z | 2022-03-31T08:45:34.000Z | PyTrinamic/ic/TMC2130/TMC2130.py | trinamic-AA/PyTrinamic | b054f4baae8eb6d3f5d2574cf69c232f66abb4ee | [
"MIT"
] | 26 | 2019-01-14T05:20:16.000Z | 2022-03-08T13:27:35.000Z | '''
Created on 14.10.2019
@author: JM
'''
from PyTrinamic.ic.TMC2130.TMC2130_register import TMC2130_register
from PyTrinamic.ic.TMC2130.TMC2130_register_variant import TMC2130_register_variant
from PyTrinamic.ic.TMC2130.TMC2130_fields import TMC2130_fields
from PyTrinamic.helpers import TMC_helpers
class TMC2130():... | 32.576923 | 183 | 0.707202 | 1,389 | 0.819953 | 0 | 0 | 0 | 0 | 0 | 0 | 250 | 0.14758 |
b5be6e33c1957ff7fe4d9e1d181d17faa43d7603 | 319 | py | Python | setup.py | space-cadet/tncontract | a5503951e218a91e9ba03e11c601b95b6bfcb72a | [
"MIT"
] | 39 | 2016-09-19T01:22:43.000Z | 2022-01-12T07:26:29.000Z | setup.py | space-cadet/tncontract | a5503951e218a91e9ba03e11c601b95b6bfcb72a | [
"MIT"
] | 9 | 2016-09-25T22:51:35.000Z | 2019-07-14T16:56:12.000Z | setup.py | space-cadet/tncontract | a5503951e218a91e9ba03e11c601b95b6bfcb72a | [
"MIT"
] | 12 | 2017-02-14T11:55:30.000Z | 2021-02-01T01:09:31.000Z | from setuptools import setup, find_packages
# Get version from tncontract/version.py
exec(open("tncontract/version.py").read())
setup(
name = "tncontract",
version = __version__,
packages = find_packages(),
author = "Andrew Darmawan",
license = "MIT",
install_requires = ["numpy", "scipy"],
)
| 22.785714 | 43 | 0.677116 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 111 | 0.347962 |
b5bf153601a744508ecc99c7f24b1fb9627883ce | 150 | py | Python | exampleb.py | JFletcher94/tBot | 051281c81b5712f7ecdb4355b7ea7f6551dec7c7 | [
"MIT"
] | null | null | null | exampleb.py | JFletcher94/tBot | 051281c81b5712f7ecdb4355b7ea7f6551dec7c7 | [
"MIT"
] | null | null | null | exampleb.py | JFletcher94/tBot | 051281c81b5712f7ecdb4355b7ea7f6551dec7c7 | [
"MIT"
] | null | null | null | #exampleb generates a full tweet
#examplet only calls get_string()
def get_string():
'''generate full tweet text'''
return 'example #text'
| 18.75 | 34 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.733333 |
b5bf895845b26e76fb4d05e08f9ee6d0b182cce7 | 37 | py | Python | reto_numeros_nones.py | Naxred/PensamientoComputacionalPython | a19fe394fd8b6265d486d432bbc5774d0cf35368 | [
"Unlicense"
] | null | null | null | reto_numeros_nones.py | Naxred/PensamientoComputacionalPython | a19fe394fd8b6265d486d432bbc5774d0cf35368 | [
"Unlicense"
] | null | null | null | reto_numeros_nones.py | Naxred/PensamientoComputacionalPython | a19fe394fd8b6265d486d432bbc5774d0cf35368 | [
"Unlicense"
] | null | null | null | for x in range(1,100,2):
print(x) | 18.5 | 24 | 0.594595 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b5c11f56555074149df0acc7544e0c995e6baf54 | 3,213 | py | Python | gryphon/data_service/auditors/trades_volume_auditor.py | qiquanzhijia/gryphon | 7bb2c646e638212bd1352feb1b5d21536a5b918d | [
"Apache-2.0"
] | 1,109 | 2019-06-20T19:23:27.000Z | 2022-03-20T14:03:43.000Z | gryphon/data_service/auditors/trades_volume_auditor.py | qiquanzhijia/gryphon | 7bb2c646e638212bd1352feb1b5d21536a5b918d | [
"Apache-2.0"
] | 63 | 2019-06-21T05:36:17.000Z | 2021-05-26T21:08:15.000Z | gryphon/data_service/auditors/trades_volume_auditor.py | qiquanzhijia/gryphon | 7bb2c646e638212bd1352feb1b5d21536a5b918d | [
"Apache-2.0"
] | 181 | 2019-06-20T19:42:05.000Z | 2022-03-21T13:05:13.000Z | # -*- coding: utf-8 -*-
from datetime import timedelta
from delorean import Delorean
from sqlalchemy import and_
from twisted.internet import defer
from twisted.internet import reactor
from twisted.internet.defer import inlineCallbacks
from twisted.internet.task import LoopingCall
from twisted.python import log
from ... | 32.13 | 91 | 0.591659 | 2,512 | 0.781824 | 2,412 | 0.7507 | 2,309 | 0.718643 | 0 | 0 | 164 | 0.051043 |
b5c68bd329a9e17d20d1b6dbb51e72b824cb0447 | 370 | py | Python | shablbot/__main__.py | Blackgard/vk-bot-python | 5d1eb269d76567a8e31dec47c0ea3c5cc1bcbc3c | [
"MIT"
] | 5 | 2019-11-12T05:15:07.000Z | 2022-01-20T06:26:55.000Z | shablbot/__main__.py | Blackgard/vk-bot-python | 5d1eb269d76567a8e31dec47c0ea3c5cc1bcbc3c | [
"MIT"
] | 1 | 2021-06-02T00:33:47.000Z | 2021-06-02T00:33:47.000Z | shablbot/__main__.py | Blackgard/vk-bot-python | 5d1eb269d76567a8e31dec47c0ea3c5cc1bcbc3c | [
"MIT"
] | 2 | 2021-12-18T17:03:10.000Z | 2022-01-29T17:08:35.000Z | """
Shablbot manager commands
"""
import sys
def main():
try:
from shablbot.core.manager_commands import manager_command
except ImportError as exc:
raise ImportError(
"Couldn't import Shablbot. Are you sure it's installed and activate venv?"
) from exc
manager_command(... | 18.5 | 86 | 0.654054 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.316216 |
b5c6fd5f851fb29a3b78c943cdd438c87f4e64cf | 726 | py | Python | Patterns_Custom_Row-Column_PYTHON.py | sukantadas194/Patters.Python | 14e62b61defca2e1f192f6ac8b1484c0a9745cfb | [
"BSD-2-Clause"
] | null | null | null | Patterns_Custom_Row-Column_PYTHON.py | sukantadas194/Patters.Python | 14e62b61defca2e1f192f6ac8b1484c0a9745cfb | [
"BSD-2-Clause"
] | null | null | null | Patterns_Custom_Row-Column_PYTHON.py | sukantadas194/Patters.Python | 14e62b61defca2e1f192f6ac8b1484c0a9745cfb | [
"BSD-2-Clause"
] | null | null | null |
#Print Custom Row-Column Patterns..
#e.g. '''@ @ @ @
# @ @ @ @
# @ @ @ @'''
w = print("What do you want to print?")
wa = str(input("Answer : "))
try:
m1 = print("How many rows do you want to print?")
n1 = int(input("Answer : "))
m2 = print("How many columns do you want to print?... | 26.888889 | 61 | 0.506887 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.508264 |
b5c737a61480861fc56685c1832b7805d5bbd65b | 17,116 | py | Python | app/cluegame.py | dabreese00/clue-solver | 3b99778075882974459e1c75792e7d051b6fe20a | [
"MIT"
] | null | null | null | app/cluegame.py | dabreese00/clue-solver | 3b99778075882974459e1c75792e7d051b6fe20a | [
"MIT"
] | null | null | null | app/cluegame.py | dabreese00/clue-solver | 3b99778075882974459e1c75792e7d051b6fe20a | [
"MIT"
] | null | null | null | """cluegame.py -- Classes to track Clue game events and make inferences
The board game Clue is also known as Cluedo. This module contains classes that
make it possible to record specific knowledge-generating events that a Clue
player may observe during the course of a game (such as, for example, that
Player A showed ... | 37.535088 | 79 | 0.62649 | 14,715 | 0.859722 | 0 | 0 | 510 | 0.029797 | 0 | 0 | 8,394 | 0.490418 |
b5cdf29e6b6b8257a8b1c9b388ba9bf3693defbc | 726 | py | Python | config.py | adesolagbenga0052/web-app | c6d6ca3f998897986ac25a1e93477af0a8bfacf6 | [
"Apache-2.0"
] | null | null | null | config.py | adesolagbenga0052/web-app | c6d6ca3f998897986ac25a1e93477af0a8bfacf6 | [
"Apache-2.0"
] | null | null | null | config.py | adesolagbenga0052/web-app | c6d6ca3f998897986ac25a1e93477af0a8bfacf6 | [
"Apache-2.0"
] | null | null | null | """Flask configuration."""
from os import environ, path
basedir = path.abspath(path.dirname(__file__))
class Config:
"""Base config."""
SECRET_KEY = "qsZ5srBF9-j3tgdMsd11hdbg2VLUyKQYqWFQ1EZyKI6PDVVTLXduxWoM1N0wESR0zFvSPFDs9ogpMjgl9wFxXw"
STATIC_FOLDER = 'static'
TEMPLATES_FOLDER = 'templates'... | 27.923077 | 106 | 0.698347 | 596 | 0.820937 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.305785 |
b5cff4fdd46f8909e02bbf2707f338423530762f | 691 | py | Python | tests/test_metrics.py | tolmanam/python-nomad-alt | f93d3f6553cdb1ee16dadabd385208b5cc550024 | [
"MIT"
] | null | null | null | tests/test_metrics.py | tolmanam/python-nomad-alt | f93d3f6553cdb1ee16dadabd385208b5cc550024 | [
"MIT"
] | null | null | null | tests/test_metrics.py | tolmanam/python-nomad-alt | f93d3f6553cdb1ee16dadabd385208b5cc550024 | [
"MIT"
] | null | null | null | from nomad_alt import Nomad
import json
import uuid
from pprint import pformat
import os
import pytest
import nomad_alt.exceptions
import tests.common as common
@pytest.fixture
def nomad_setup():
n = Nomad(host=common.IP, port=common.NOMAD_PORT, ssl_verify=False, token=common.NOMAD_TOKEN)
with open(common.EX... | 24.678571 | 97 | 0.732272 | 0 | 0 | 272 | 0.393632 | 288 | 0.416787 | 0 | 0 | 46 | 0.06657 |
b5d0213de62ed3ea48e3a10bf0cc5d6b41c2e553 | 5,979 | py | Python | djproject/pictureupload/views.py | missingDown/webForUpload | fbd5ed9e8cfcd4ad906913f4a31c24e87919f9a3 | [
"MIT"
] | null | null | null | djproject/pictureupload/views.py | missingDown/webForUpload | fbd5ed9e8cfcd4ad906913f4a31c24e87919f9a3 | [
"MIT"
] | null | null | null | djproject/pictureupload/views.py | missingDown/webForUpload | fbd5ed9e8cfcd4ad906913f4a31c24e87919f9a3 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
import logging
import json
import base64
import time
# Create your views here.
logger = logging.getLogger(__name__)
# 文件上传:form-data/Multipart方式 POST方法
def index(request):
sendfile = request.FILES.items()
haveFiles = False
for key,... | 38.082803 | 85 | 0.632882 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,267 | 0.355719 |
b5d05429ba74cb0c817d19e6c37641ec569991cf | 2,191 | py | Python | logparser/logs/logs.py | rkorte/rticonnextdds-logparser | e8d0446c8d1318e68886a58e95c3f1ba4a1fa455 | [
"Apache-2.0"
] | 11 | 2016-06-28T13:26:01.000Z | 2021-06-07T09:18:32.000Z | logparser/logs/logs.py | rkorte/rticonnextdds-logparser | e8d0446c8d1318e68886a58e95c3f1ba4a1fa455 | [
"Apache-2.0"
] | 27 | 2016-10-26T19:57:16.000Z | 2019-04-12T16:48:11.000Z | logparser/logs/logs.py | rkorte/rticonnextdds-logparser | e8d0446c8d1318e68886a58e95c3f1ba4a1fa455 | [
"Apache-2.0"
] | 7 | 2016-08-28T17:24:15.000Z | 2021-12-10T11:28:20.000Z | # Log Parser for RTI Connext.
#
# Copyright 2016 Real-Time Innovations, 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
#
# ... | 40.574074 | 76 | 0.748517 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 977 | 0.445915 |
b5d0c034f7242aa14fa3baca13d703e86f187f17 | 276 | py | Python | torrents/tests/test_file.py | noahgoldman/torwiz | 213be5cf3b62d2c18c09e2fe4b869c549c263f32 | [
"MIT"
] | 1 | 2015-03-09T01:58:23.000Z | 2015-03-09T01:58:23.000Z | torrents/tests/test_file.py | noahgoldman/torwiz | 213be5cf3b62d2c18c09e2fe4b869c549c263f32 | [
"MIT"
] | 3 | 2015-04-01T22:49:58.000Z | 2015-05-01T19:09:11.000Z | torrents/tests/test_file.py | noahgoldman/torwiz | 213be5cf3b62d2c18c09e2fe4b869c549c263f32 | [
"MIT"
] | null | null | null | from bson.objectid import ObjectId
from torrents.file import TorrentFile
class TestTorrentFile:
def test_get_output_file(self):
id1 = ObjectId()
file1 = TorrentFile(id1)
assert file1.get_output_file() == 'torrent_files/' + str(id1) + '.torrent'
| 25.090909 | 82 | 0.695652 | 200 | 0.724638 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.094203 |
b5d13876f65729d4efb83ad2b61955efd49a0d23 | 2,444 | py | Python | google/cloud/storage/benchmarks/storage_throughput_plots.py | millerantonio810/google-cloud-cpp | 71582d922bc22b0dcbc58234f36c726ea3b7c171 | [
"Apache-2.0"
] | 1 | 2021-01-16T02:43:50.000Z | 2021-01-16T02:43:50.000Z | google/cloud/storage/benchmarks/storage_throughput_plots.py | millerantonio810/google-cloud-cpp | 71582d922bc22b0dcbc58234f36c726ea3b7c171 | [
"Apache-2.0"
] | null | null | null | google/cloud/storage/benchmarks/storage_throughput_plots.py | millerantonio810/google-cloud-cpp | 71582d922bc22b0dcbc58234f36c726ea3b7c171 | [
"Apache-2.0"
] | 1 | 2020-05-09T20:12:05.000Z | 2020-05-09T20:12:05.000Z | #!/usr/bin/env python3
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 26.857143 | 86 | 0.657529 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,173 | 0.479951 |
b5d20cd2d199da5465fadfa36c7ff94c0bda75f4 | 711 | py | Python | djAidESILV/products/migrations/0002_auto_20200522_1921.py | Kulumbaf/AidESILV | 04dad828048edffdd3662b24c415edce22fd3ea3 | [
"MIT"
] | null | null | null | djAidESILV/products/migrations/0002_auto_20200522_1921.py | Kulumbaf/AidESILV | 04dad828048edffdd3662b24c415edce22fd3ea3 | [
"MIT"
] | null | null | null | djAidESILV/products/migrations/0002_auto_20200522_1921.py | Kulumbaf/AidESILV | 04dad828048edffdd3662b24c415edce22fd3ea3 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.12 on 2020-05-22 19:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='product',
name='baby_product',
... | 29.625 | 186 | 0.590717 | 619 | 0.868163 | 0 | 0 | 0 | 0 | 0 | 0 | 215 | 0.301543 |
b5d2438e72ede4149becee229525d2ab304971e9 | 939 | py | Python | vietocr/train.py | lzmisscc/vietocr | df0d9a53e714d08d6b0b4ee52ab46fbc0b991bf3 | [
"Apache-2.0"
] | null | null | null | vietocr/train.py | lzmisscc/vietocr | df0d9a53e714d08d6b0b4ee52ab46fbc0b991bf3 | [
"Apache-2.0"
] | null | null | null | vietocr/train.py | lzmisscc/vietocr | df0d9a53e714d08d6b0b4ee52ab46fbc0b991bf3 | [
"Apache-2.0"
] | null | null | null | import argparse
import logging
from vietocr.model.trainer import Trainer
from vietocr.tool.config import Cfg
import sys
sys.path.insert(0, './')
from char import character
logging.basicConfig(level=logging.INFO, )
def main():
parser = argparse.ArgumentParser()
parser.add_argument('config', help='see example at ... | 28.454545 | 68 | 0.707135 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 272 | 0.28967 |
b5d34bad89b324ae2f55b466eea757d21d9ed3d6 | 363 | py | Python | django_eveonline_connector/migrations/0018_remove_evetoken_primary.py | KryptedGaming/django-eveonline-connector | 95fa146f4fcdf6bce84548b5cac1e5bf09cd72a0 | [
"MIT"
] | 3 | 2020-03-07T13:58:45.000Z | 2021-02-06T20:16:50.000Z | django_eveonline_connector/migrations/0018_remove_evetoken_primary.py | KryptedGaming/django-eveonline-connector | 95fa146f4fcdf6bce84548b5cac1e5bf09cd72a0 | [
"MIT"
] | 66 | 2019-12-17T20:54:22.000Z | 2021-06-10T20:39:04.000Z | django_eveonline_connector/migrations/0018_remove_evetoken_primary.py | KryptedGaming/django-eveonline-connector | 95fa146f4fcdf6bce84548b5cac1e5bf09cd72a0 | [
"MIT"
] | 2 | 2020-01-17T20:04:52.000Z | 2021-07-11T22:11:42.000Z | # Generated by Django 2.2.10 on 2020-02-27 18:21
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('django_eveonline_connector', '0017_primaryevecharacterassociation'),
]
operations = [
migrations.RemoveField(
model_name='evetoken',
... | 20.166667 | 78 | 0.630854 | 277 | 0.763085 | 0 | 0 | 0 | 0 | 0 | 0 | 132 | 0.363636 |
b5d4e05a5e5fe08d9de941f7f2c1980a53f27d2a | 598 | py | Python | Plug-and-play module/SematicEmbbedBlock.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 923 | 2020-01-11T06:36:53.000Z | 2022-03-31T00:26:57.000Z | Plug-and-play module/SematicEmbbedBlock.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 25 | 2020-02-27T08:35:46.000Z | 2022-01-25T08:54:19.000Z | Plug-and-play module/SematicEmbbedBlock.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 262 | 2020-01-02T02:19:40.000Z | 2022-03-23T04:56:16.000Z | import torch.nn as nn
"""
https://zhuanlan.zhihu.com/p/76378871
arxiv: 1804.03821
ExFuse
"""
class SematicEmbbedBlock(nn.Module):
def __init__(self, high_in_plane, low_in_plane, out_plane):
super(SematicEmbbedBlock, self).__init__()
self.conv3x3 = nn.Conv2d(high_in_plane, out_plane, 3, 1, 1)
... | 29.9 | 67 | 0.688963 | 503 | 0.841137 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0.117057 |
b5d543bdac2737ffc8b7efa718d7cd3c1a92a7cd | 1,539 | py | Python | utilities.py | Fredrik-Oberg/volkswagencarnet | 877123f4053c66d11d1f99abfc1dc4bbc74effde | [
"MIT"
] | null | null | null | utilities.py | Fredrik-Oberg/volkswagencarnet | 877123f4053c66d11d1f99abfc1dc4bbc74effde | [
"MIT"
] | null | null | null | utilities.py | Fredrik-Oberg/volkswagencarnet | 877123f4053c66d11d1f99abfc1dc4bbc74effde | [
"MIT"
] | null | null | null | from datetime import date, datetime
from base64 import b64encode
from string import ascii_letters as letters, digits
from sys import argv
from os import environ as env
from os.path import join, dirname, expanduser
from itertools import product
import json
import logging
import re
_LOGGER = logging.getLogger(__name__)
... | 19.481013 | 82 | 0.587394 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 842 | 0.547109 |
b5d85732ed11a9abee1adac3c37bfb5f5d7fe0c2 | 9,874 | py | Python | nslsii/__init__.py | ke-zhang-rd/nslsii | d3f942cda8eac713ac625dbcf4285e108c04f154 | [
"BSD-3-Clause"
] | null | null | null | nslsii/__init__.py | ke-zhang-rd/nslsii | d3f942cda8eac713ac625dbcf4285e108c04f154 | [
"BSD-3-Clause"
] | null | null | null | nslsii/__init__.py | ke-zhang-rd/nslsii | d3f942cda8eac713ac625dbcf4285e108c04f154 | [
"BSD-3-Clause"
] | null | null | null | from IPython import get_ipython
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
def import_star(module, ns):
def public(name):
return not name.startswith('_')
ns.update({name: getattr(module, name)
for name in dir(module) if public(name)})
d... | 34.404181 | 79 | 0.645331 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,370 | 0.543853 |
b5d8aec11bfc5cc12bac4a3e909d08cecced6658 | 6,260 | py | Python | utils/depot.py | Nikronic/Optimized-MDVRP | 92587bf4c110c7e6597cc3120dd0556a6e170ce2 | [
"MIT"
] | 16 | 2019-09-08T13:04:10.000Z | 2022-03-04T06:52:34.000Z | utils/depot.py | zhangruijuan/Optimized-MDVRP | 92587bf4c110c7e6597cc3120dd0556a6e170ce2 | [
"MIT"
] | 6 | 2019-09-19T20:38:19.000Z | 2019-10-14T17:35:54.000Z | utils/depot.py | Nikronic/Optimized-MDVRP | 92587bf4c110c7e6597cc3120dd0556a6e170ce2 | [
"MIT"
] | 4 | 2021-01-15T11:45:16.000Z | 2021-12-18T14:14:54.000Z | import numpy as np
from typing import List
from copy import deepcopy
from utils.customer import Customer
class Depot:
"""
Depot class represents a list of nodes assigned to this depot which we call a route.
This class is going to be filled by `Customers` class.
"""
def __init__(self, id, x, y, c... | 35.367232 | 118 | 0.585304 | 6,151 | 0.982588 | 0 | 0 | 0 | 0 | 0 | 0 | 3,044 | 0.486262 |
b5d915f6cc267b773bbe24b2332fae333a3982c5 | 714 | py | Python | fake.py | Wsky51/dfs-node-restapi | bab7605c609d4b53cd11686a576b74c1ae2871b7 | [
"Apache-2.0"
] | null | null | null | fake.py | Wsky51/dfs-node-restapi | bab7605c609d4b53cd11686a576b74c1ae2871b7 | [
"Apache-2.0"
] | null | null | null | fake.py | Wsky51/dfs-node-restapi | bab7605c609d4b53cd11686a576b74c1ae2871b7 | [
"Apache-2.0"
] | null | null | null | """create fake data to the db file"""
from config import data_nodes, get_db
from type import DataNodeStatus, DataNode
from datetime import timedelta
from config import get_second_datetime
def create_fake_data_status(data_node: DataNode):
now = get_second_datetime()
db = get_db()
for i in range(100):
... | 24.62069 | 49 | 0.648459 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0.096154 |
b5d9899c07fca487f770f0c61e19c1fd8ac3a831 | 78 | py | Python | config.py | NormanLo4319/Project-1 | a7b6bf6adc681a94cc23be5934ddbed1cf7ab6a6 | [
"MIT"
] | 1 | 2020-07-19T07:10:01.000Z | 2020-07-19T07:10:01.000Z | config.py | NormanLo4319/Food-Enviroment-Project | a7b6bf6adc681a94cc23be5934ddbed1cf7ab6a6 | [
"MIT"
] | null | null | null | config.py | NormanLo4319/Food-Enviroment-Project | a7b6bf6adc681a94cc23be5934ddbed1cf7ab6a6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
gkey="Enter Your Key Here"
| 8.666667 | 26 | 0.602564 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 65 | 0.833333 |
b5da3aa622fc6ae31ee50b900da3081886393cc7 | 215 | py | Python | category_tree/helper.py | bharathramh92/shop | 0c5800b2d36fbe1bfffaf555c3dc741d020aa5d7 | [
"MIT"
] | 1 | 2016-05-27T22:13:37.000Z | 2016-05-27T22:13:37.000Z | category_tree/helper.py | bharathramh92/shop | 0c5800b2d36fbe1bfffaf555c3dc741d020aa5d7 | [
"MIT"
] | null | null | null | category_tree/helper.py | bharathramh92/shop | 0c5800b2d36fbe1bfffaf555c3dc741d020aa5d7 | [
"MIT"
] | null | null | null | from category_tree.categories import data
def get_store_name_from_child(store_id):
while data[store_id]['parent_category'] is not None:
store_id = data[store_id]['parent_category']
return store_id
| 26.875 | 56 | 0.75814 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.15814 |
b5db0b0b72cf05ff56cc67988018bcfa4797221d | 371 | py | Python | tests/pull_keys.py | patleeman/geckoboard_push | 52c05db22b3c630d326a9650551720f583f0168f | [
"MIT"
] | null | null | null | tests/pull_keys.py | patleeman/geckoboard_push | 52c05db22b3c630d326a9650551720f583f0168f | [
"MIT"
] | null | null | null | tests/pull_keys.py | patleeman/geckoboard_push | 52c05db22b3c630d326a9650551720f583f0168f | [
"MIT"
] | null | null | null | '''
Module to pull keys from test geckoboard widgets.
'''
import os
import json
def get_keys():
settings_folder = os.path.dirname(__file__)
settings_file = os.path.join(settings_folder,'gecko_settings.json')
with open(settings_file, 'r') as file:
json_data = json.load(file)
return json_dat... | 23.1875 | 71 | 0.692722 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0.245283 |
b5db74f8420d00fdc906f19f599f41aad18c69af | 2,596 | py | Python | pajbot/web/common/menu.py | JoachimFlottorp/pajbot | 4fb88c403dedb20d95be80e38da72be1ed064901 | [
"MIT"
] | 128 | 2015-12-28T01:02:30.000Z | 2019-05-24T21:20:50.000Z | pajbot/web/common/menu.py | JoachimFlottorp/pajbot | 4fb88c403dedb20d95be80e38da72be1ed064901 | [
"MIT"
] | 277 | 2015-05-03T18:48:57.000Z | 2019-05-23T17:41:28.000Z | pajbot/web/common/menu.py | JoachimFlottorp/pajbot | 4fb88c403dedb20d95be80e38da72be1ed064901 | [
"MIT"
] | 96 | 2015-08-07T18:49:50.000Z | 2019-05-20T19:49:27.000Z | from __future__ import annotations
from typing import Any, Dict, List, Union
import logging
from pajbot.web.utils import get_cached_enabled_modules
log = logging.getLogger(__name__)
class MenuItem:
def __init__(
self,
href: Union[str, List[MenuItem]],
menu_id: str,
caption: str... | 35.081081 | 108 | 0.571649 | 446 | 0.171803 | 0 | 0 | 1,939 | 0.746918 | 0 | 0 | 888 | 0.342065 |
b5db8ac1529ed13c3cad056d88e711f36bbfbbe1 | 611 | py | Python | Python/463.py | FlyAndNotDown/LeetCode | 889819ff7f64819e966fc6f9dd80110cf2bf6d3c | [
"MIT"
] | 4 | 2018-06-18T05:39:25.000Z | 2022-01-04T07:35:52.000Z | Python/463.py | FlyAndNotDown/LeetCode | 889819ff7f64819e966fc6f9dd80110cf2bf6d3c | [
"MIT"
] | 20 | 2019-11-30T03:42:40.000Z | 2020-05-17T03:25:43.000Z | Python/463.py | FlyAndNotDown/LeetCode | 889819ff7f64819e966fc6f9dd80110cf2bf6d3c | [
"MIT"
] | 2 | 2020-02-08T14:10:42.000Z | 2021-09-23T13:51:36.000Z | """
@no 463
@name Island Perimeter
"""
class Solution:
def islandPerimeter(self, grid):
"""
:type grid: List[List[int]]
:rtype: int
"""
ans = 0
for i in range(len(grid)):
for j in range(len(grid[i])):
if grid[i][j] == 1:
... | 30.55 | 80 | 0.392799 | 571 | 0.934534 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.178396 |