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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2d2af0f28011528a2d6ef57a8fde31ab7d31de44 | 743 | py | Python | tests/test_collection_client.py | ocefpaf/pystac-client | ddf0e0566b2b1783a4d32d3d77f9f51b80270df3 | [
"Apache-2.0"
] | 52 | 2021-04-15T23:24:12.000Z | 2022-03-09T23:02:27.000Z | tests/test_collection_client.py | ocefpaf/pystac-client | ddf0e0566b2b1783a4d32d3d77f9f51b80270df3 | [
"Apache-2.0"
] | 119 | 2021-04-13T11:42:01.000Z | 2022-02-24T10:02:35.000Z | tests/test_collection_client.py | ocefpaf/pystac-client | ddf0e0566b2b1783a4d32d3d77f9f51b80270df3 | [
"Apache-2.0"
] | 14 | 2021-04-13T19:00:19.000Z | 2022-02-23T09:17:30.000Z | import pytest
from pystac_client import CollectionClient
from pystac_client.client import Client
from .helpers import STAC_URLS
class TestCollectionClient:
@pytest.mark.vcr
def test_instance(self):
client = Client.open(STAC_URLS['PLANETARY-COMPUTER'])
collection = client.get_collection('aste... | 29.72 | 67 | 0.699865 | 610 | 0.820996 | 0 | 0 | 572 | 0.769852 | 0 | 0 | 95 | 0.12786 |
2d2b1238c9004522816921ce7316d847dd12d582 | 7,135 | py | Python | frasco_models/backends/sqlalchemy.py | frascoweb/frasco-models | f7c1e14424cadf3dc07c2bd81cc32b0fd046ccba | [
"MIT"
] | 1 | 2015-09-24T10:01:03.000Z | 2015-09-24T10:01:03.000Z | frasco_models/backends/sqlalchemy.py | frascoweb/frasco-models | f7c1e14424cadf3dc07c2bd81cc32b0fd046ccba | [
"MIT"
] | null | null | null | frasco_models/backends/sqlalchemy.py | frascoweb/frasco-models | f7c1e14424cadf3dc07c2bd81cc32b0fd046ccba | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from frasco import copy_extra_feature_options, current_app
from frasco.utils import JSONEncoder, ContextStack, DelayedCallsContext
from frasco_models import Backend, ModelSchemaError, and_, split_field_operator, QueryError
from frasco_models.utils import clean_proxy
from flask_sql... | 35.675 | 117 | 0.623266 | 6,317 | 0.885354 | 0 | 0 | 519 | 0.07274 | 0 | 0 | 527 | 0.073861 |
2d2bf38cdd992aadb6144180b5dfb94255173ff3 | 538 | py | Python | 17.05.2022/POO/parte1/teste3/main.py | N0N4T0/python-codes | ac2b884f86749a8b179ff972cdb316ec4e005b32 | [
"MIT"
] | null | null | null | 17.05.2022/POO/parte1/teste3/main.py | N0N4T0/python-codes | ac2b884f86749a8b179ff972cdb316ec4e005b32 | [
"MIT"
] | null | null | null | 17.05.2022/POO/parte1/teste3/main.py | N0N4T0/python-codes | ac2b884f86749a8b179ff972cdb316ec4e005b32 | [
"MIT"
] | null | null | null | from pessoa import Pessoa
p1 = Pessoa('Luiz', 29)
p2 = Pessoa('Joana', 59)
# Teste para já está comendo
# p1.comer('maçã')
# p1.comer('maçã')
# Teste para não está comendo
# p1.para_comer()
# Teste para já está falando
# p1.falar('Política')
# p1.falar('Política')
# Teste para não falar comendo
# p1.comer('maçã')
#... | 17.354839 | 35 | 0.684015 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 419 | 0.749553 |
2d2cf88bb3da622870d5871c45371991a12f449f | 2,135 | py | Python | assignment2/AssignmentMaterial_2/Framework/VideoCaptureDevices/Enumerations.py | ecly/assignment1_bsii | eeb2bd6bfa3071df53457ce2a2ab723c6fedffe3 | [
"MIT"
] | null | null | null | assignment2/AssignmentMaterial_2/Framework/VideoCaptureDevices/Enumerations.py | ecly/assignment1_bsii | eeb2bd6bfa3071df53457ce2a2ab723c6fedffe3 | [
"MIT"
] | null | null | null | assignment2/AssignmentMaterial_2/Framework/VideoCaptureDevices/Enumerations.py | ecly/assignment1_bsii | eeb2bd6bfa3071df53457ce2a2ab723c6fedffe3 | [
"MIT"
] | null | null | null | #<!--------------------------------------------------------------------------->
#<!-- ITU - IT University of Copenhagen -->
#<!-- SSS - Software and Systems Section -->
#<!--------------------------------------------------------------------------->
... | 68.870968 | 79 | 0.444496 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,875 | 0.87822 |
2d2db398b4ddbcc67edec80cc25d50f9ccebdf17 | 2,022 | py | Python | pipeline/run_perturbation_test.py | martin-fabbri/nlp-behavioral-testing | 352cab74f5d62561e08d92135e4609db1fe38fd5 | [
"Apache-2.0"
] | null | null | null | pipeline/run_perturbation_test.py | martin-fabbri/nlp-behavioral-testing | 352cab74f5d62561e08d92135e4609db1fe38fd5 | [
"Apache-2.0"
] | 1 | 2021-02-19T08:08:52.000Z | 2021-02-19T08:08:52.000Z | pipeline/run_perturbation_test.py | martin-fabbri/nlp-behavioral-testing | 352cab74f5d62561e08d92135e4609db1fe38fd5 | [
"Apache-2.0"
] | null | null | null | import json
import nlpaug.augmenter.char as nac
import pandas as pd
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
from transformers.tokenization_utils import PreTrainedTokenizer
from config import Config
transformer_model = "distilbert-base-uncased-finetuned-sst-2-english"
# l... | 31.59375 | 87 | 0.740851 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 423 | 0.209199 |
2d2e70b06755b783fc866f681653a747759d1c68 | 4,534 | py | Python | quant.py | coreyauger/ema-65-crossover-kaggle | 5b84294381b01b9f0f84f14006572c9cb9e5cca7 | [
"MIT"
] | null | null | null | quant.py | coreyauger/ema-65-crossover-kaggle | 5b84294381b01b9f0f84f14006572c9cb9e5cca7 | [
"MIT"
] | null | null | null | quant.py | coreyauger/ema-65-crossover-kaggle | 5b84294381b01b9f0f84f14006572c9cb9e5cca7 | [
"MIT"
] | 1 | 2021-05-01T15:50:17.000Z | 2021-05-01T15:50:17.000Z |
from functools import reduce
import numpy as np
import matplotlib.pyplot as plt
from dateutil import parser
import glob
import os
import csv
import json
def loadData(path, subset = -1, loadDebug = False):
allFiles = glob.glob(os.path.join(path, "data_*.csv"))
if(subset > 0):
allFiles = allFile... | 40.846847 | 123 | 0.604764 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 944 | 0.208205 |
2d2e9702d8917bd50d220179a5ae3d2d3a0df138 | 71 | py | Python | common/__init__.py | wupengyue/AdminLTE | 7a15c85a2a9ceb22f1b9c67437113df9aebf77bf | [
"MIT"
] | null | null | null | common/__init__.py | wupengyue/AdminLTE | 7a15c85a2a9ceb22f1b9c67437113df9aebf77bf | [
"MIT"
] | null | null | null | common/__init__.py | wupengyue/AdminLTE | 7a15c85a2a9ceb22f1b9c67437113df9aebf77bf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Date : 2017-07-18 20:12:08
# @Author :
| 14.2 | 32 | 0.478873 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.943662 |
2d2eb9e41d9b7aaa806035fe7e73dc2a5bc3e057 | 5,913 | py | Python | Scripts/GeoDBSCAN.py | Holisticnature/geo-learn | cfa4485b376ae1b22457251bcddbe26bac103a10 | [
"Apache-2.0"
] | 4 | 2018-03-06T14:38:42.000Z | 2018-06-04T14:57:26.000Z | Scripts/GeoDBSCAN.py | Holisticnature/geo-learn | cfa4485b376ae1b22457251bcddbe26bac103a10 | [
"Apache-2.0"
] | null | null | null | Scripts/GeoDBSCAN.py | Holisticnature/geo-learn | cfa4485b376ae1b22457251bcddbe26bac103a10 | [
"Apache-2.0"
] | null | null | null | # --------------------------------
# Name: GeoDBSCAN.py
# Purpose: This script is intended to allow ArcGIS users that have Scikit Learn installed in their python installation
# utilize DBSCAN to create clusters of geographic features based on their centroids.
# Current Owner: David Wasserman
# Last Modified: 4/5/2020
#... | 51.417391 | 325 | 0.690851 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,688 | 0.454592 |
2d2f252fd1115185175d6bc733e90a8c70405560 | 1,607 | py | Python | version_v4/inference_traffic_light_gps_deep_ranking_only_final.py | mayanks888/QATM_pytorch_ros2 | 936ff265e4c0f0cbfa63855e07a95e15b2b0e336 | [
"MIT"
] | null | null | null | version_v4/inference_traffic_light_gps_deep_ranking_only_final.py | mayanks888/QATM_pytorch_ros2 | 936ff265e4c0f0cbfa63855e07a95e15b2b0e336 | [
"MIT"
] | null | null | null | version_v4/inference_traffic_light_gps_deep_ranking_only_final.py | mayanks888/QATM_pytorch_ros2 | 936ff265e4c0f0cbfa63855e07a95e15b2b0e336 | [
"MIT"
] | null | null | null | #this implementation mainly work on grey scale image
import argparse
import shutil
from pathlib import Path
import natsort
from qatm_pytorch_v3 import CreateModel, ImageDataset,ImageDataset_2, plot_result_mayank, nms, run_one_sample_mayank
from torchvision import models
import torch
from utils import *
from imageload... | 30.903846 | 116 | 0.781581 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 342 | 0.212819 |
2d3055e14122623c95b8881341a1fc725f67eb41 | 1,017 | py | Python | examples/research/O2-graphene/O2-C24/proj/O2-C24.py | fishjojo/pydmfe | 93cfc655314933d3531b5733521a1f95a044f6cb | [
"MIT"
] | 3 | 2021-02-26T06:26:00.000Z | 2022-02-20T08:58:20.000Z | examples/research/O2-graphene/O2-C24/proj/O2-C24.py | fishjojo/pydmfet | 93cfc655314933d3531b5733521a1f95a044f6cb | [
"MIT"
] | null | null | null | examples/research/O2-graphene/O2-C24/proj/O2-C24.py | fishjojo/pydmfet | 93cfc655314933d3531b5733521a1f95a044f6cb | [
"MIT"
] | null | null | null | from pydmfet import proj_ao, tools
from pydmfet.qcwrap.pyscf_rks_ao import rks_ao
from pyscf import gto,scf
import numpy as np
from pyscf.tools import molden
t0 = tools.time0()
bas ='6-31G*'
temp = 0.005
mol = gto.Mole()
mol.atom = open('O2-C24.xyz').read()
mol.basis = bas
mol.charge = 0
mol.build(max_memory = 2400... | 21.1875 | 90 | 0.707965 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 250 | 0.245821 |
2d3114636772e658c9c73b2f51a905eee17cc3c7 | 5,376 | py | Python | anchore_engine/db/db_account_users.py | dspalmer99/anchore-engine | 8c61318be6fec5d767426fa4ccd98472cc85b5cd | [
"Apache-2.0"
] | 1 | 2020-06-22T07:27:41.000Z | 2020-06-22T07:27:41.000Z | anchore_engine/db/db_account_users.py | dspalmer99/anchore-engine | 8c61318be6fec5d767426fa4ccd98472cc85b5cd | [
"Apache-2.0"
] | 4 | 2020-11-07T00:16:02.000Z | 2020-11-08T20:52:06.000Z | anchore_engine/db/db_account_users.py | dspalmer99/anchore-engine | 8c61318be6fec5d767426fa4ccd98472cc85b5cd | [
"Apache-2.0"
] | 1 | 2019-11-23T03:39:28.000Z | 2019-11-23T03:39:28.000Z | """
Interface to the account_users table. Data format is dicts, not objects.
"""
from passlib import pwd
from passlib.context import CryptContext
from anchore_engine.db import AccountUser, AccessCredential, UserAccessCredentialTypes
from anchore_engine.db.entities.common import anchore_now
from anchore_engine.configur... | 29.701657 | 130 | 0.693824 | 1,586 | 0.295015 | 0 | 0 | 0 | 0 | 0 | 0 | 879 | 0.163504 |
2d32dfae4e4a82d0da73b0d4fd9b140d33288330 | 2,314 | py | Python | pymmw/lib/probe.py | iljoobaek/Radar_boundary_detection | e7a61827e57eac29d4a1200a2856ce3bc00b92cf | [
"MIT"
] | null | null | null | pymmw/lib/probe.py | iljoobaek/Radar_boundary_detection | e7a61827e57eac29d4a1200a2856ce3bc00b92cf | [
"MIT"
] | null | null | null | pymmw/lib/probe.py | iljoobaek/Radar_boundary_detection | e7a61827e57eac29d4a1200a2856ce3bc00b92cf | [
"MIT"
] | null | null | null | #
# Copyright (c) 2019, Manfred Constapel
# This file is licensed under the terms of the MIT license.
#
import sys, time
from lib.utility import *
# ------------------------------------------------
VID, PID = 0x0451, 0xbef3 # XDS110
# ------------------------------------------------
try:
import usb
except Ex... | 30.853333 | 87 | 0.544512 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 604 | 0.26102 |
2d34c64aae2f99b093c4f7a0e488c069a1328360 | 3,760 | py | Python | pandajedi/jedibrokerage/JobBrokerBase.py | PanDAWMS/panda-jedi | e4c90563b3b9e9521cb73ccdedaa8ecaa38af5ed | [
"Apache-2.0"
] | 2 | 2020-04-17T10:24:09.000Z | 2020-05-12T17:59:06.000Z | pandajedi/jedibrokerage/JobBrokerBase.py | PanDAWMS/panda-jedi | e4c90563b3b9e9521cb73ccdedaa8ecaa38af5ed | [
"Apache-2.0"
] | 20 | 2015-08-25T13:40:14.000Z | 2022-03-29T12:50:46.000Z | pandajedi/jedibrokerage/JobBrokerBase.py | PanDAWMS/panda-jedi | e4c90563b3b9e9521cb73ccdedaa8ecaa38af5ed | [
"Apache-2.0"
] | 10 | 2015-05-27T14:01:42.000Z | 2021-09-20T17:38:02.000Z | from pandajedi.jedicore import Interaction
# base class for job brokerage
class JobBrokerBase (object):
def __init__(self,ddmIF,taskBufferIF):
self.ddmIF = ddmIF
self.taskBufferIF = taskBufferIF
self.liveCounter = None
self.lockID = None
self.baseLockID = None
self.... | 32.982456 | 133 | 0.655053 | 3,645 | 0.969415 | 0 | 0 | 0 | 0 | 0 | 0 | 480 | 0.12766 |
2d3623ec2975daf6edfc533f9031ebffefe6e10e | 1,467 | py | Python | src/datasets/negative_samplers/popular.py | JiachengLi1995/FastRec | 88174f8beb822c6b5b348c888de184d48d9d013c | [
"MIT"
] | null | null | null | src/datasets/negative_samplers/popular.py | JiachengLi1995/FastRec | 88174f8beb822c6b5b348c888de184d48d9d013c | [
"MIT"
] | null | null | null | src/datasets/negative_samplers/popular.py | JiachengLi1995/FastRec | 88174f8beb822c6b5b348c888de184d48d9d013c | [
"MIT"
] | null | null | null | from .base import AbstractNegativeSampler
from tqdm import trange
from tqdm import tqdm
from collections import Counter
import numpy as np
class PopularNegativeSampler(AbstractNegativeSampler):
@classmethod
def code(cls):
return 'popular'
def generate_negative_samples(self):
popularity... | 30.5625 | 99 | 0.625085 | 1,322 | 0.901159 | 0 | 0 | 56 | 0.038173 | 0 | 0 | 34 | 0.023177 |
2d365b35f584f4bd5f75c5a5f91f7420fadca6f3 | 650 | py | Python | Ebooks/migrations/0009_auto_20180729_1706.py | Akash4307/Wise-master | 5f484e3791a8e4361d8bcad570ac2661636a5cfc | [
"Apache-2.0"
] | null | null | null | Ebooks/migrations/0009_auto_20180729_1706.py | Akash4307/Wise-master | 5f484e3791a8e4361d8bcad570ac2661636a5cfc | [
"Apache-2.0"
] | 8 | 2021-03-18T21:30:54.000Z | 2022-03-02T14:56:55.000Z | Ebooks/migrations/0009_auto_20180729_1706.py | Akash4307/Wise-master | 5f484e3791a8e4361d8bcad570ac2661636a5cfc | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.0.6 on 2018-07-30 00:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Ebooks', '0008_pdfinfo_pdfdescription'),
]
operations = [
migrations.AddField(
model_name='pdfinfo',
name='PdfEmail'... | 25 | 64 | 0.590769 | 557 | 0.856923 | 0 | 0 | 0 | 0 | 0 | 0 | 128 | 0.196923 |
2d366ae91d3744d540214d0d257991a1dc1a1f6f | 290 | py | Python | skyportal/handlers/api/internal/__init__.py | jialin-wu-02/skyportal | 29d606ad8567b2230fb0553b18dd3cb9d3ab2d84 | [
"BSD-3-Clause"
] | null | null | null | skyportal/handlers/api/internal/__init__.py | jialin-wu-02/skyportal | 29d606ad8567b2230fb0553b18dd3cb9d3ab2d84 | [
"BSD-3-Clause"
] | 156 | 2019-10-17T19:35:22.000Z | 2021-08-01T13:23:47.000Z | skyportal/handlers/api/internal/__init__.py | jialin-wu-02/skyportal | 29d606ad8567b2230fb0553b18dd3cb9d3ab2d84 | [
"BSD-3-Clause"
] | null | null | null | from .plot import PlotPhotometryHandler, PlotSpectroscopyHandler
from .token import TokenHandler
from .dbinfo import DBInfoHandler
from .profile import ProfileHandler
from .source_views import SourceViewsHandler
from .instrument_observation_params import InstrumentObservationParamsHandler
| 41.428571 | 77 | 0.889655 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2d3685b227eda67cb5f0fb424b7e5b1d410a46d7 | 2,854 | py | Python | td/lab3_skeleton.py | K1ntus/Deep-Learning | 8737c0cf32d34d1533f249ddd3eb8ada181fb7ad | [
"MIT"
] | null | null | null | td/lab3_skeleton.py | K1ntus/Deep-Learning | 8737c0cf32d34d1533f249ddd3eb8ada181fb7ad | [
"MIT"
] | null | null | null | td/lab3_skeleton.py | K1ntus/Deep-Learning | 8737c0cf32d34d1533f249ddd3eb8ada181fb7ad | [
"MIT"
] | null | null | null | from __future__ import print_function
import tensorflow as tf
import keras
from keras.datasets import mnist
from keras.models import Sequential,model_from_json
from keras.layers import Dense, Dropout
from keras.optimizers import RMSprop
import numpy as np
def save_model(model,filename):
model_json = model.to_jso... | 30.361702 | 126 | 0.70042 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 769 | 0.269446 |
2d36c1e2e090aa8edbe34bd4cb5777a00843c1e4 | 9,733 | py | Python | image/modified/m_vqvae_multi_level8.py | arash-safari/vp | 377e0172112157b79690b32349481a17e7590063 | [
"MIT"
] | null | null | null | image/modified/m_vqvae_multi_level8.py | arash-safari/vp | 377e0172112157b79690b32349481a17e7590063 | [
"MIT"
] | null | null | null | image/modified/m_vqvae_multi_level8.py | arash-safari/vp | 377e0172112157b79690b32349481a17e7590063 | [
"MIT"
] | null | null | null | import sys
import torch
from torch import nn
from torch.nn import functional as F
# sys.path.append('../')
#
# from image.vqvae import Quantize
# Copyright 2018 The Sonnet Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance... | 34.392226 | 90 | 0.551526 | 8,811 | 0.905271 | 0 | 0 | 0 | 0 | 0 | 0 | 1,499 | 0.154012 |
2d3973da3a5de2c1e31fc0e0d24cbc8b6577547e | 848 | py | Python | Quiron/reports/migrations/0001_initial.py | CesarNav/Quiron | 5e20e891436513cf664fba9806d57b104b65d9cd | [
"MIT"
] | null | null | null | Quiron/reports/migrations/0001_initial.py | CesarNav/Quiron | 5e20e891436513cf664fba9806d57b104b65d9cd | [
"MIT"
] | null | null | null | Quiron/reports/migrations/0001_initial.py | CesarNav/Quiron | 5e20e891436513cf664fba9806d57b104b65d9cd | [
"MIT"
] | null | null | null | # Generated by Django 3.1.3 on 2020-12-09 13:40
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('patients', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='... | 31.407407 | 142 | 0.612028 | 722 | 0.851415 | 0 | 0 | 0 | 0 | 0 | 0 | 165 | 0.194575 |
2d3b6a39414163158df318015d15ebef78eb5567 | 10,249 | py | Python | tests/test_data_loader.py | cccntu/accelerate | 4ad11b12d97717db0931de1c17d562bd5c7f4f41 | [
"Apache-2.0"
] | 2,313 | 2021-03-05T21:49:49.000Z | 2022-03-31T05:26:00.000Z | tests/test_data_loader.py | cccntu/accelerate | 4ad11b12d97717db0931de1c17d562bd5c7f4f41 | [
"Apache-2.0"
] | 230 | 2021-03-05T22:00:05.000Z | 2022-03-31T21:38:44.000Z | tests/test_data_loader.py | cccntu/accelerate | 4ad11b12d97717db0931de1c17d562bd5c7f4f41 | [
"Apache-2.0"
] | 152 | 2021-03-06T04:25:37.000Z | 2022-03-26T03:09:36.000Z | # Copyright 2021 The HuggingFace Team. 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 applicabl... | 45.959641 | 119 | 0.630208 | 9,470 | 0.923993 | 206 | 0.0201 | 0 | 0 | 0 | 0 | 1,684 | 0.164309 |
2d3ba84e7f3d9f50d96ba09e4dc3290fe2df32cc | 121 | py | Python | receipts_storage/forms/__init__.py | albinmedoc/receipts_storage | 2c3e2a19312d5ca8ec31bf2f0c6315f29d5fd923 | [
"MIT"
] | null | null | null | receipts_storage/forms/__init__.py | albinmedoc/receipts_storage | 2c3e2a19312d5ca8ec31bf2f0c6315f29d5fd923 | [
"MIT"
] | null | null | null | receipts_storage/forms/__init__.py | albinmedoc/receipts_storage | 2c3e2a19312d5ca8ec31bf2f0c6315f29d5fd923 | [
"MIT"
] | null | null | null | from .product import ProductForm
from .receipt import ReceiptForm
from .user import LoginForm, RegisterForm, EditUserForm | 40.333333 | 55 | 0.85124 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2d3bab9f16bf5a40e3ec217903602e93ce9b678d | 9,435 | py | Python | Core/DatabaseTools/DatabaseManager/abstractDatabase.py | jpesperidiao/MOPA | 6fbf097a22d42d82eeb36c6f247eb0d8fb6ac586 | [
"MIT"
] | null | null | null | Core/DatabaseTools/DatabaseManager/abstractDatabase.py | jpesperidiao/MOPA | 6fbf097a22d42d82eeb36c6f247eb0d8fb6ac586 | [
"MIT"
] | 1 | 2020-06-07T00:19:54.000Z | 2020-06-07T00:19:54.000Z | Core/DatabaseTools/DatabaseManager/abstractDatabase.py | jpesperidiao/MOPA | 6fbf097a22d42d82eeb36c6f247eb0d8fb6ac586 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
/***************************************************************************
MOPA
An independet project
Método de Obtenção da Posição de Atirador
-------------------
begin : 2019-01-15
git sha ... | 35.205224 | 83 | 0.546688 | 8,108 | 0.858716 | 0 | 0 | 0 | 0 | 0 | 0 | 5,358 | 0.567465 |
2d3d4864859ee40632563ce0af32cebdd0937175 | 32,094 | py | Python | scheduler/routes.py | ddiatlov/scheduler | f3343f20a2d104e20ec0031af6f6de2313656212 | [
"MIT"
] | null | null | null | scheduler/routes.py | ddiatlov/scheduler | f3343f20a2d104e20ec0031af6f6de2313656212 | [
"MIT"
] | null | null | null | scheduler/routes.py | ddiatlov/scheduler | f3343f20a2d104e20ec0031af6f6de2313656212 | [
"MIT"
] | null | null | null | import calendar
import os
from datetime import datetime
from dateutil.parser import parse
# server side rendering related imports
from flask import render_template, url_for, flash, redirect, request, jsonify, send_from_directory
# login related imports
from flask_login import login_user, logout_user, login_required, c... | 39.330882 | 120 | 0.593226 | 0 | 0 | 0 | 0 | 29,998 | 0.934692 | 0 | 0 | 5,121 | 0.159563 |
2d3e7b2b839bb5d6d6c94bfdbafba9f0cd43ac82 | 1,248 | py | Python | encrypt.py | grkrama/SampleEncryptionProgram | 4ac5698d5c0205b2313c1cb9e80e5525f441e7dc | [
"MIT"
] | null | null | null | encrypt.py | grkrama/SampleEncryptionProgram | 4ac5698d5c0205b2313c1cb9e80e5525f441e7dc | [
"MIT"
] | null | null | null | encrypt.py | grkrama/SampleEncryptionProgram | 4ac5698d5c0205b2313c1cb9e80e5525f441e7dc | [
"MIT"
] | null | null | null | import base64
import os
from cryptography.fernet import Fernet
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
def getKey (salt, password):
print(password)
print(salt)
kdf = PBKDF2HMAC(
algorithm=hashes.SHA256(),
... | 22.690909 | 73 | 0.625801 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 455 | 0.364583 |
2d3ea1065e8e6914e61c9e8dc14c875d892ae858 | 6,320 | py | Python | projects/mid_atlantic/study/plot_Fig3_storage_potential.py | EnergyModels/caes | 7bb3e7f9cfbfcc2e781918333f6be3b718ca0743 | [
"MIT"
] | 1 | 2022-03-30T07:40:45.000Z | 2022-03-30T07:40:45.000Z | projects/mid_atlantic/study/plot_Fig3_storage_potential.py | EnergyModels/caes | 7bb3e7f9cfbfcc2e781918333f6be3b718ca0743 | [
"MIT"
] | null | null | null | projects/mid_atlantic/study/plot_Fig3_storage_potential.py | EnergyModels/caes | 7bb3e7f9cfbfcc2e781918333f6be3b718ca0743 | [
"MIT"
] | 1 | 2021-11-02T17:02:27.000Z | 2021-11-02T17:02:27.000Z | import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from mpl_toolkits.axes_grid1.inset_locator import zoomed_inset_axes, mark_inset
from math import pi
import numpy as np
import matplotlib.colors as colors
import matplotlib.patches as mpatches
df = pd.read_csv('all_analysis.csv')
# f, a = plt.su... | 36.744186 | 119 | 0.637184 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,558 | 0.404747 |
2d3ece024c6e3b371b3ce91027eb8030eb483366 | 508 | py | Python | Ene-Jun-2020/lopez-flores-jorge-luis/Practica1/practica1.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 41 | 2017-09-26T09:36:32.000Z | 2022-03-19T18:05:25.000Z | Ene-Jun-2020/lopez-flores-jorge-luis/Practica1/practica1.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 67 | 2017-09-11T05:06:12.000Z | 2022-02-14T04:44:04.000Z | Ene-Jun-2020/lopez-flores-jorge-luis/Practica1/practica1.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 210 | 2017-09-01T00:10:08.000Z | 2022-03-19T18:05:12.000Z | ############Con una función##########################
print('Valor de M:')
M = int(input())
print('Valor de N:')
N = int(input())
def potencia(M, N):
resultado=1
for i in range(N):
resultado *= M
return resultado
print(M**N)
print(pow(M, N))
print(potencia(M,N))
#########################Con... | 17.517241 | 74 | 0.494094 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 193 | 0.379175 |
2d3ffe34f95afc554efd559de389de6e17e5f469 | 2,353 | py | Python | setup.py | diecutter/piecutter | 250a90a4cae1b72ff3c141dffb8c58de74dbedfd | [
"BSD-3-Clause"
] | 2 | 2016-05-02T02:22:34.000Z | 2021-02-08T18:17:30.000Z | setup.py | diecutter/piecutter | 250a90a4cae1b72ff3c141dffb8c58de74dbedfd | [
"BSD-3-Clause"
] | 2 | 2016-03-22T10:09:13.000Z | 2016-07-01T08:04:43.000Z | setup.py | diecutter/piecutter | 250a90a4cae1b72ff3c141dffb8c58de74dbedfd | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Python packaging."""
import os
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
class Tox(TestCommand):
"""Test command that runs tox."""
def finalize_options(self):
TestCommand.finalize_options(self)
... | 25.576087 | 76 | 0.640034 | 362 | 0.153781 | 0 | 0 | 0 | 0 | 0 | 0 | 861 | 0.36576 |
2d40243559b725d753f07723a2dc092564c538dc | 12,205 | py | Python | energy_demand/plotting/plotting_results.py | nismod/energy_demand | 247fcea074a846026710ed9b039b22f8b9835643 | [
"MIT"
] | 14 | 2018-02-23T10:03:45.000Z | 2022-03-03T13:59:30.000Z | energy_demand/plotting/plotting_results.py | nismod/energy_demand | 247fcea074a846026710ed9b039b22f8b9835643 | [
"MIT"
] | 59 | 2017-02-22T15:03:30.000Z | 2020-12-16T12:26:17.000Z | energy_demand/plotting/plotting_results.py | nismod/energy_demand | 247fcea074a846026710ed9b039b22f8b9835643 | [
"MIT"
] | 5 | 2017-08-22T11:31:42.000Z | 2020-06-24T18:30:12.000Z | """Plotting model results and storing as PDF to result folder
"""
import os
import logging
from energy_demand.technologies import tech_related
from energy_demand.plotting import plotting_styles
from energy_demand.plotting import fig_lad_related
from energy_demand.plotting import fig_one_fueltype_multiple_regions_peak... | 38.140625 | 118 | 0.583367 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,652 | 0.381155 |
2d40c1c0d41fce2558ee51eafbcd6328fd08433e | 2,637 | py | Python | models.py | hpaul/iconic_network | f2e4678dd0acd2ccc1fefde9fba34b69c99c7ba7 | [
"MIT"
] | null | null | null | models.py | hpaul/iconic_network | f2e4678dd0acd2ccc1fefde9fba34b69c99c7ba7 | [
"MIT"
] | 5 | 2021-03-10T00:31:40.000Z | 2022-02-26T20:47:30.000Z | models.py | hpaul/iconic_network | f2e4678dd0acd2ccc1fefde9fba34b69c99c7ba7 | [
"MIT"
] | 1 | 2019-05-27T20:45:02.000Z | 2019-05-27T20:45:02.000Z | from playhouse.sqlite_ext import *
from playhouse.migrate import *
from peewee import *
# The initialisation
db = SqliteDatabase('../cache/iconic.db', pragmas={
'journal_mode': 'wal',
'cache_size': '-2000',
'fullfsync': 'on',
'journal_size_limit': '-1',
'threads': '8',
'foreign_keys': 1, # Enf... | 31.771084 | 92 | 0.708381 | 1,365 | 0.517634 | 0 | 0 | 0 | 0 | 0 | 0 | 1,081 | 0.409936 |
2d40ed8fbb09f62fdaa077c4ee9a62191cabbc99 | 23,977 | py | Python | ublox/modules.py | pwitab/ublox | 30fc175c6c1b6d2077523d2b676ca8a3a50c86b2 | [
"MIT"
] | 9 | 2018-10-18T12:57:17.000Z | 2022-01-12T05:37:55.000Z | ublox/modules.py | pwitab/ublox | 30fc175c6c1b6d2077523d2b676ca8a3a50c86b2 | [
"MIT"
] | 5 | 2018-10-23T07:42:12.000Z | 2019-09-29T10:16:04.000Z | ublox/modules.py | pwitab/ublox | 30fc175c6c1b6d2077523d2b676ca8a3a50c86b2 | [
"MIT"
] | 4 | 2018-10-12T18:34:12.000Z | 2022-01-13T01:11:17.000Z | import time
import serial
import binascii
from collections import namedtuple
import logging
from ublox.socket import UDPSocket
logger = logging.getLogger(__name__)
Stats = namedtuple('Stats', 'type name value')
class CMEError(Exception):
"""CME ERROR on Module"""
class ATError(Exception):
"""AT Command E... | 34.058239 | 80 | 0.591275 | 23,745 | 0.990324 | 0 | 0 | 1,089 | 0.045419 | 0 | 0 | 8,333 | 0.347541 |
2d4193bd35998684210f11a056d6009a9bc98371 | 6,965 | py | Python | tests/cli/test_cap_table.py | PillarDevelopment/sto | a3067f5a31053dc780c4812d38e062ff4726b21a | [
"Apache-2.0"
] | 71 | 2018-11-30T10:15:23.000Z | 2022-03-31T23:51:22.000Z | tests/cli/test_cap_table.py | PillarDevelopment/sto | a3067f5a31053dc780c4812d38e062ff4726b21a | [
"Apache-2.0"
] | 7 | 2019-01-24T10:23:41.000Z | 2021-06-01T22:43:59.000Z | tests/cli/test_cap_table.py | PillarDevelopment/sto | a3067f5a31053dc780c4812d38e062ff4726b21a | [
"Apache-2.0"
] | 32 | 2018-11-29T21:19:51.000Z | 2022-03-14T06:32:01.000Z | import pytest
from sto.distribution import read_csv
from sto.ethereum.issuance import contract_status
from sto.ethereum.status import update_status
from sto.ethereum.tokenscan import token_scan
from sto.generic.captable import generate_cap_table, print_cap_table
from sto.models.implementation import TokenScanStatus, T... | 29.264706 | 146 | 0.576884 | 0 | 0 | 0 | 0 | 5,171 | 0.742426 | 0 | 0 | 1,492 | 0.214214 |
2d44bdb8e298f04d76d63165a0c0c77c08501a4e | 5,729 | py | Python | Descriptive_Evaluation_System.py | ananya-sundar/Descriptive-Answer-Evaluation-System | fea3f56e5058bd75526de23e198e0d512addcdf6 | [
"MIT"
] | null | null | null | Descriptive_Evaluation_System.py | ananya-sundar/Descriptive-Answer-Evaluation-System | fea3f56e5058bd75526de23e198e0d512addcdf6 | [
"MIT"
] | null | null | null | Descriptive_Evaluation_System.py | ananya-sundar/Descriptive-Answer-Evaluation-System | fea3f56e5058bd75526de23e198e0d512addcdf6 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
import six
import language_check
from tkinter import *
from tkinter import messagebox
import rake
import operator
import io
counter=1
file=open("questions.txt","r")
q=[line.rstrip('\n') for line in file]
totmark=[0,0,0,0,0,0]
def nex():
... | 24.908696 | 103 | 0.612498 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,446 | 0.2524 |
2d452d14cedfb9fd0b00a34f2acdf709cc1787cb | 4,364 | py | Python | tabnine-vim/third_party/ycmd/ycmd/tests/rust/subcommands_test.py | MrMonk3y/vimrc | 950230fb3fd7991d1234c2ab516ec03245945677 | [
"MIT"
] | null | null | null | tabnine-vim/third_party/ycmd/ycmd/tests/rust/subcommands_test.py | MrMonk3y/vimrc | 950230fb3fd7991d1234c2ab516ec03245945677 | [
"MIT"
] | null | null | null | tabnine-vim/third_party/ycmd/ycmd/tests/rust/subcommands_test.py | MrMonk3y/vimrc | 950230fb3fd7991d1234c2ab516ec03245945677 | [
"MIT"
] | null | null | null | # Copyright (C) 2015-2018 ycmd contributors
#
# This file is part of ycmd.
#
# ycmd is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
#... | 32.325926 | 71 | 0.601512 | 0 | 0 | 199 | 0.0456 | 2,817 | 0.645509 | 0 | 0 | 1,336 | 0.306141 |
2d458b40385031e7f090e9d9647595375cf582aa | 2,684 | py | Python | stubs.min/System/Windows/Media/__init___parts/FontFamilyConverter.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2017-07-25T14:30:18.000Z | 2017-07-25T14:30:18.000Z | stubs.min/System/Windows/Media/__init___parts/FontFamilyConverter.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/System/Windows/Media/__init___parts/FontFamilyConverter.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class FontFamilyConverter(TypeConverter):
"""
Converts instances of the System.String type to and from System.Windows.Media.FontFamily instances.
FontFamilyConverter()
"""
def CanConvertFrom(self,*__args):
"""
CanConvertFrom(self: FontFamilyConverter,td: ITypeDescriptorContext,t: Type) -> bool
... | 39.470588 | 139 | 0.726528 | 2,682 | 0.999255 | 0 | 0 | 0 | 0 | 0 | 0 | 2,456 | 0.915052 |
2d465237176feff79968938e709149dcf5d817b3 | 805 | py | Python | E5b_global_variables_version_b.py | charles-stan/learn_python_Stanier | 740a7104fcbd739663d703d3770f9e31509300f8 | [
"MIT"
] | 2 | 2019-10-04T14:53:20.000Z | 2019-10-29T18:16:15.000Z | E5b_global_variables_version_b.py | charles-stan/learn_python_Stanier | 740a7104fcbd739663d703d3770f9e31509300f8 | [
"MIT"
] | null | null | null | E5b_global_variables_version_b.py | charles-stan/learn_python_Stanier | 740a7104fcbd739663d703d3770f9e31509300f8 | [
"MIT"
] | null | null | null | """
Demonstrating simple global variables
File: E5_global_variables_version_b.py
Author: Charles Stanier, charles-stanier@uiowa.edu
Date: August 14, 2019
Written/Tested In: Python 3.7.3
Program Objective: Demonstrate the use of global variable for constant
Modifications: none so far
"""
# these two li... | 25.967742 | 71 | 0.688199 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 555 | 0.689441 |
2d46d52a8dcd2cbb0a0b701447415ac2dddac192 | 240 | py | Python | probdrift/__init__.py | MikeOMa/MV_Prediction | 81552cbd9ad256959d631b2c80c7d5dde4bed105 | [
"Apache-2.0"
] | 1 | 2021-06-08T19:55:14.000Z | 2021-06-08T19:55:14.000Z | probdrift/__init__.py | MikeOMa/MV_Prediction | 81552cbd9ad256959d631b2c80c7d5dde4bed105 | [
"Apache-2.0"
] | 2 | 2021-11-04T08:41:17.000Z | 2022-01-05T08:36:17.000Z | probdrift/__init__.py | MikeOMa/MV_Prediction | 81552cbd9ad256959d631b2c80c7d5dde4bed105 | [
"Apache-2.0"
] | null | null | null | X_VAR = ["Tx", "Ty", "Wx", "Wy", "u_av", "v_av", "lon", "lat", "t"]
Y_VAR = ["u", "v"]
mpl_config = {
"text.usetex": True,
"font.size": 12,
"text.latex.preamble": r"\usepackage{amsmath}",
"font.family": "Times New Roman",
}
| 26.666667 | 67 | 0.529167 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.604167 |
7409b7db18856a3e31c375938ade5b50aa04e657 | 7,121 | py | Python | app/modules/talkingHeads/network/components.py | andy6804tw/talking-hands-API | 4895c980565082b0fdcabbc704ee871855e6d5f5 | [
"MIT"
] | null | null | null | app/modules/talkingHeads/network/components.py | andy6804tw/talking-hands-API | 4895c980565082b0fdcabbc704ee871855e6d5f5 | [
"MIT"
] | 4 | 2021-06-08T20:44:12.000Z | 2022-03-12T00:09:38.000Z | app/modules/talkingHeads/network/components.py | andy6804tw/talking-hands-API | 4895c980565082b0fdcabbc704ee871855e6d5f5 | [
"MIT"
] | null | null | null | """ In this file, PyTorch modules are defined to be used in the Talking Heads model. """
import torch
import torch.nn as nn
from torch.nn import functional as F
def init_conv(conv):
nn.init.xavier_uniform_(conv.weight)
if conv.bias is not None:
conv.bias.data.zero_()
# region General Blocks
class ... | 29.670833 | 103 | 0.61452 | 6,671 | 0.936807 | 0 | 0 | 0 | 0 | 0 | 0 | 618 | 0.086786 |
7409f1af0ea4329b3748af9c24220e3c22dd281d | 869 | py | Python | lambdafunctions/RDS failover/snapshot_creation.py | khihouston/AWS_Lambda | af36fb469a5e71569d4b6f2ae96bb2de91b3cf4a | [
"Apache-2.0"
] | null | null | null | lambdafunctions/RDS failover/snapshot_creation.py | khihouston/AWS_Lambda | af36fb469a5e71569d4b6f2ae96bb2de91b3cf4a | [
"Apache-2.0"
] | null | null | null | lambdafunctions/RDS failover/snapshot_creation.py | khihouston/AWS_Lambda | af36fb469a5e71569d4b6f2ae96bb2de91b3cf4a | [
"Apache-2.0"
] | null | null | null | import botocore
import datetime
import re
import logging
import boto3
region='us-west-1'
db_instance_class='db.m4.large'
db_subnet='default'
instances = ['master']
print('Loading function')
def lambda_handler(event, context):
source = boto3.client('rds', region_name=region)
for instance in... | 36.208333 | 111 | 0.644419 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 220 | 0.253165 |
740aae137142ec825a3f7da2840a35af235b0779 | 22,382 | py | Python | Python/firms/main_static.py | lnsongxf/OG-USA | 9e92129e67f4aea5f3a6b8da4110bf67b99ce88a | [
"CC0-1.0"
] | 1 | 2017-05-23T13:57:53.000Z | 2017-05-23T13:57:53.000Z | Python/firms/main_static.py | lnsongxf/OG-USA | 9e92129e67f4aea5f3a6b8da4110bf67b99ce88a | [
"CC0-1.0"
] | null | null | null | Python/firms/main_static.py | lnsongxf/OG-USA | 9e92129e67f4aea5f3a6b8da4110bf67b99ce88a | [
"CC0-1.0"
] | 1 | 2021-06-03T19:06:24.000Z | 2021-06-03T19:06:24.000Z | '''
------------------------------------------------------------------------
This program runs the steady state solver as well as the time path
solver for the OG model with S-period lived agents, exogenous labor,
M industries, and I goods.
This Python script calls the following other file(s) with the associated... | 48.030043 | 149 | 0.583058 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13,549 | 0.605353 |
740ae050de236b941d1df03dc6f2237703df6297 | 1,812 | py | Python | PythonInterview/DesigPattern/StructuralModel/Decorator.py | xtawfnhdx/PythonInterview | 515675ffd86eb1ad3bfa631fd3c88fddcf411e98 | [
"Apache-2.0"
] | null | null | null | PythonInterview/DesigPattern/StructuralModel/Decorator.py | xtawfnhdx/PythonInterview | 515675ffd86eb1ad3bfa631fd3c88fddcf411e98 | [
"Apache-2.0"
] | null | null | null | PythonInterview/DesigPattern/StructuralModel/Decorator.py | xtawfnhdx/PythonInterview | 515675ffd86eb1ad3bfa631fd3c88fddcf411e98 | [
"Apache-2.0"
] | null | null | null | from abc import ABC, abstractmethod
class Component(ABC):
"""
基本组件接口
"""
@abstractmethod
def operation(self) -> str:
"""
定义具体操作
:return:
"""
pass
class ConcreteComponent(Component):
def operation(self) -> str:
return "基本组件的基础实现"
class Decora... | 17.423077 | 49 | 0.596578 | 903 | 0.465464 | 0 | 0 | 262 | 0.135052 | 0 | 0 | 930 | 0.479381 |
740b1289aa49c74c0bf1b913185895b820bbdd76 | 3,009 | py | Python | crispr_ont_prediction.py | Peppags/A-CNNCrispr | 6022dd34b54172d7e6c99435ac5f34314212e269 | [
"MIT"
] | 3 | 2021-03-11T07:47:47.000Z | 2021-06-02T10:36:24.000Z | crispr_ont_prediction.py | Peppags/A-CNNCrispr | 6022dd34b54172d7e6c99435ac5f34314212e269 | [
"MIT"
] | 3 | 2021-04-26T15:26:23.000Z | 2022-03-28T02:12:12.000Z | crispr_ont_prediction.py | Peppags/CRISPRont-CRISPRofft | 6022dd34b54172d7e6c99435ac5f34314212e269 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
from keras.preprocessing import text, sequence
from keras.models import Model
from keras.layers import Input, Embedding
from keras.layers.core import Dropout
from keras.layers.convolutional import Conv1D, AveragePooling1D
from keras.layers impo... | 30.704082 | 75 | 0.653373 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 236 | 0.078431 |
740b5f12a51ad3dfb5a4576acd413d48c9392fc3 | 439 | py | Python | 769.py | wilbertgeng/LeetCode_exercise | f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc | [
"MIT"
] | null | null | null | 769.py | wilbertgeng/LeetCode_exercise | f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc | [
"MIT"
] | null | null | null | 769.py | wilbertgeng/LeetCode_exercise | f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc | [
"MIT"
] | null | null | null | """769. Max Chunks To Make Sorted"""
class Solution(object):
def maxChunksToSorted(self, arr):
"""
:type arr: List[int]
:rtype: int
"""
min_index_for_chunk_end = arr[0]
chunks = 0
for i in range(len(arr)):
min_index_for_chunk_end = max(min_index_... | 24.388889 | 74 | 0.548975 | 400 | 0.911162 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.22779 |
740c8021591632f8589b775ff0990d59d773eb73 | 6,023 | py | Python | sr_tutorial.py | briliantnugraha/pytorch_tutorial | 640996759a2a3545429760d17b94a1f4896525fb | [
"MIT"
] | null | null | null | sr_tutorial.py | briliantnugraha/pytorch_tutorial | 640996759a2a3545429760d17b94a1f4896525fb | [
"MIT"
] | null | null | null | sr_tutorial.py | briliantnugraha/pytorch_tutorial | 640996759a2a3545429760d17b94a1f4896525fb | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.optim as optim
import torch.utils.data
import torch.nn.functional as F
import torchvision
import torchvision.models as models
from torchvision import transforms
from PIL import Image
from time import time
import matplotlib.pyplot as plt
import os
import numpy as np
import... | 33.837079 | 105 | 0.61315 | 1,440 | 0.239084 | 0 | 0 | 0 | 0 | 0 | 0 | 895 | 0.148597 |
740c8dc8dddfb897c3530278bf49ab1ef511472e | 9,517 | py | Python | articles/test_editarticle.py | kylejuliandev/dev_blog_assignment | 272466cb591f9b45fb81c2a42e86b25bff3cd9ad | [
"MIT"
] | null | null | null | articles/test_editarticle.py | kylejuliandev/dev_blog_assignment | 272466cb591f9b45fb81c2a42e86b25bff3cd9ad | [
"MIT"
] | null | null | null | articles/test_editarticle.py | kylejuliandev/dev_blog_assignment | 272466cb591f9b45fb81c2a42e86b25bff3cd9ad | [
"MIT"
] | null | null | null | from uuid import uuid4
from django.test import TestCase
from accounts.models import User
from articles.models import Article
from articles.testhelpers import create_user, create_mock_article, get_random_string
class EditArticleTest(TestCase):
def __init__(self, methodName: str = ...) -> None:
super().__ini... | 41.199134 | 87 | 0.651151 | 9,306 | 0.977829 | 0 | 0 | 0 | 0 | 0 | 0 | 2,855 | 0.299989 |
740dc09c5d5989b4dd60755f7fb722bb32c864ad | 13,953 | py | Python | pysrc/op-eff-plot.py | TUD-UCB-Boda/tud_boda | aa52c85aa0af1110f6f1f5a50c71bb37994b332a | [
"BSD-2-Clause"
] | 62 | 2015-03-19T09:55:50.000Z | 2022-02-27T19:06:52.000Z | pysrc/op-eff-plot.py | moskewcz/boda | 27ec86e03ad004ad8beac7f7d74a5b0ef7676ef6 | [
"BSD-2-Clause"
] | 31 | 2015-12-02T23:36:06.000Z | 2019-04-17T20:11:28.000Z | pysrc/op-eff-plot.py | TUD-UCB-Boda/tud_boda | aa52c85aa0af1110f6f1f5a50c71bb37994b332a | [
"BSD-2-Clause"
] | 24 | 2015-05-20T14:33:15.000Z | 2021-04-25T01:08:36.000Z | from matplotlib import rc
rc('text', usetex=True) # this is if you want to use latex to print text. If you do you can create strings that go on labels or titles like this for example (with an r in front): r"$n=$ " + str(int(n))
from numpy import *
from pylab import *
import random
from matplotlib.font_manager import Fo... | 45.301948 | 359 | 0.600731 | 10,162 | 0.728302 | 96 | 0.00688 | 0 | 0 | 0 | 0 | 3,916 | 0.280656 |
740f425c8945d1c545b1860aad74bb81820a3743 | 40,565 | py | Python | src/AE_academico/views.py | furthz/Colegio | 573e9e4006c0d1cd33190b53da5988fdc0c9ca4c | [
"MIT"
] | 2 | 2017-09-26T14:15:43.000Z | 2018-03-19T01:03:28.000Z | src/AE_academico/views.py | furthz/Colegio | 573e9e4006c0d1cd33190b53da5988fdc0c9ca4c | [
"MIT"
] | 1 | 2017-10-21T22:30:39.000Z | 2017-10-21T22:30:39.000Z | src/AE_academico/views.py | furthz/Colegio | 573e9e4006c0d1cd33190b53da5988fdc0c9ca4c | [
"MIT"
] | 9 | 2017-07-22T16:13:29.000Z | 2020-11-12T21:03:36.000Z | import datetime
import json
import calendar
from django.http import HttpResponse
from django.shortcuts import render, redirect
from django.urls import reverse_lazy, reverse
from django.views.generic import FormView
from django.views.generic import ListView, CreateView, UpdateView, DeleteView, DetailView
from django.vi... | 38.305005 | 155 | 0.611414 | 36,783 | 0.906543 | 0 | 0 | 0 | 0 | 0 | 0 | 7,957 | 0.196106 |
74107fc9a92af6c2a19b0d4f04f980ee2043b713 | 1,273 | py | Python | replacement_algorithm/general.py | sunsihtf/simple-cache-policy-simulator | b3736312c759e5a6c43f8b4768ca63c3c39a97ae | [
"MIT"
] | 6 | 2018-11-22T07:16:30.000Z | 2021-04-19T13:12:41.000Z | replacement_algorithm/general.py | sunsihtf/simple-cache-policy-simulator | b3736312c759e5a6c43f8b4768ca63c3c39a97ae | [
"MIT"
] | null | null | null | replacement_algorithm/general.py | sunsihtf/simple-cache-policy-simulator | b3736312c759e5a6c43f8b4768ca63c3c39a97ae | [
"MIT"
] | 1 | 2019-04-21T08:16:58.000Z | 2019-04-21T08:16:58.000Z | from abc import ABCMeta, abstractmethod
import collections
class ReplaceAlgo(metaclass=ABCMeta):
def __init__(self, capacity):
self.cache_capacity = capacity
self.cache_size = 0
self.cache_stack = collections.OrderedDict()
self.write2disk = 0
self.transportfrombackend = 0
... | 28.288889 | 116 | 0.590731 | 1,207 | 0.948154 | 0 | 0 | 106 | 0.083268 | 0 | 0 | 263 | 0.206599 |
7410a9d371811ecb288d58e5e4a3a8a6f106fa60 | 5,547 | py | Python | bir_open_manipulator_p_with_gripper_cam_moveit/src/bir_omp_catch_simulation.py | Brazilian-Institute-of-Robotics/bir_open_manipulator_p | ce5eec7de2d361becddb3eecc44700cb12990083 | [
"Apache-2.0"
] | 1 | 2020-03-03T18:18:42.000Z | 2020-03-03T18:18:42.000Z | bir_open_manipulator_p_with_gripper_cam_moveit/src/bir_omp_catch_simulation.py | Brazilian-Institute-of-Robotics/bir_open_manipulator_p | ce5eec7de2d361becddb3eecc44700cb12990083 | [
"Apache-2.0"
] | null | null | null | bir_open_manipulator_p_with_gripper_cam_moveit/src/bir_omp_catch_simulation.py | Brazilian-Institute-of-Robotics/bir_open_manipulator_p | ce5eec7de2d361becddb3eecc44700cb12990083 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
import rospy
from math import pi
import moveit_commander
from moveit_msgs.msg import DisplayTrajectory
from apriltag_ros.msg import AprilTagDetectionArray
# CONSTANTS
N_ROBOT_JOINTS = 6
POSE_TOLERANCE = 0.05
FRAMES_LIMIT = 25
ROTATION_DEGREE = -10
J1_LIMIT_DEGREE = -90
class openMan... | 37.47973 | 128 | 0.579773 | 4,873 | 0.878493 | 0 | 0 | 0 | 0 | 0 | 0 | 1,623 | 0.292591 |
741163dbbe679412527cbd7810452d4d457b3e59 | 780 | py | Python | tests/test_read.py | markreidvfx/pyavb | 48b05a84ff9752703a9218d5ca157ee672b020ab | [
"MIT"
] | 21 | 2019-02-05T22:08:32.000Z | 2022-03-07T03:37:59.000Z | tests/test_read.py | markreidvfx/pyavb | 48b05a84ff9752703a9218d5ca157ee672b020ab | [
"MIT"
] | 10 | 2019-07-25T04:03:44.000Z | 2021-08-12T21:31:37.000Z | tests/test_read.py | markreidvfx/pyavb | 48b05a84ff9752703a9218d5ca157ee672b020ab | [
"MIT"
] | 1 | 2020-02-20T15:08:40.000Z | 2020-02-20T15:08:40.000Z | from __future__ import (
unicode_literals,
absolute_import,
print_function,
division,
)
import os
import unittest
import avb
import avb.utils
test_file_01 = os.path.join(os.path.dirname(__file__), 'test_files', 'test_file_01.avb')
class TestRead(unittest.TestCase):
def test_basic(self):
... | 22.285714 | 88 | 0.608974 | 476 | 0.610256 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.084615 |
7411a2ab5983624eb22485823a916a1cbef00994 | 2,278 | py | Python | game.py | akash1309/Rod-and-Ball-Game | cd492ca8fea0cbb391de44c44b71984efe0e01ab | [
"MIT"
] | null | null | null | game.py | akash1309/Rod-and-Ball-Game | cd492ca8fea0cbb391de44c44b71984efe0e01ab | [
"MIT"
] | null | null | null | game.py | akash1309/Rod-and-Ball-Game | cd492ca8fea0cbb391de44c44b71984efe0e01ab | [
"MIT"
] | null | null | null | import sys, pygame
from pygame.locals import *
import time
import pygame.freetype
pygame.init()
size = width, height = 800, 600
ball_speed = [3, 7]
black = 0, 0, 0
rod_speed = [5,0]
score = 1
green = (0, 255, 0)
blue = (0, 0, 128)
white = (255, 255, 255)
screen = pygame.display.set_mode(size)
#ball loading and sho... | 25.032967 | 73 | 0.627744 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 314 | 0.13784 |
74121ac3394a3fef86202bc8cb9f42490a0298e6 | 888 | py | Python | oasis/clipper_offsetting.py | AmericaMakes/OASIS-marcwang | 7aa10040251d7a1b807a773a45d123e1a52faac5 | [
"BSD-2-Clause"
] | 1 | 2021-03-07T14:47:09.000Z | 2021-03-07T14:47:09.000Z | oasis/clipper_offsetting.py | AmericaMakes/OASIS-marcwang | 7aa10040251d7a1b807a773a45d123e1a52faac5 | [
"BSD-2-Clause"
] | null | null | null | oasis/clipper_offsetting.py | AmericaMakes/OASIS-marcwang | 7aa10040251d7a1b807a773a45d123e1a52faac5 | [
"BSD-2-Clause"
] | 1 | 2021-03-07T00:24:57.000Z | 2021-03-07T00:24:57.000Z | import pyclipper
from shapely.geometry import Polygon
from typing import List
from oasis.util import clean_polygon, convert_to_clipper, convert_from_clipper
class ClipperOffsetting():
def __init__(self, poly : Polygon, clipper_scale : int = 1000) -> None:
self.poly = clean_polygon(poly)
self.offs... | 40.363636 | 88 | 0.699324 | 729 | 0.820946 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
74123240b191374d6f68a590cb14714bf9a10b24 | 357 | py | Python | src/sentry/middleware/social_auth.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | 1 | 2020-02-27T02:46:25.000Z | 2020-02-27T02:46:25.000Z | src/sentry/middleware/social_auth.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | 1 | 2020-11-05T14:54:44.000Z | 2020-11-19T21:54:19.000Z | src/sentry/middleware/social_auth.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | 1 | 2017-02-09T06:36:57.000Z | 2017-02-09T06:36:57.000Z | from __future__ import absolute_import
from social_auth.middleware import SocialAuthExceptionMiddleware
from sentry.utils import auth
from sentry.utils.http import absolute_uri
class SentrySocialAuthExceptionMiddleware(SocialAuthExceptionMiddleware):
def get_redirect_uri(self, request, exception):
retur... | 29.75 | 73 | 0.840336 | 175 | 0.490196 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
74125f79f17723620cc7a6ba5aaba2ad79f03c5e | 1,013 | py | Python | tests/app/migrations/0002_visit.py | zostera/django-attrs | c1f1b4bb4bfb9cf836423cd5c7f121d61322a86b | [
"BSD-3-Clause"
] | null | null | null | tests/app/migrations/0002_visit.py | zostera/django-attrs | c1f1b4bb4bfb9cf836423cd5c7f121d61322a86b | [
"BSD-3-Clause"
] | null | null | null | tests/app/migrations/0002_visit.py | zostera/django-attrs | c1f1b4bb4bfb9cf836423cd5c7f121d61322a86b | [
"BSD-3-Clause"
] | 1 | 2019-12-01T22:14:45.000Z | 2019-12-01T22:14:45.000Z | # Generated by Django 2.1.3 on 2018-11-27 09:55
import attrs.fields
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [("app", "0001_initial")]
operations = [
migrations.CreateModel(
name="Visit",
... | 28.138889 | 86 | 0.446199 | 867 | 0.855874 | 0 | 0 | 0 | 0 | 0 | 0 | 118 | 0.116486 |
7412ae64b971ee798f8e6d33e8212d9bb55ee3b7 | 2,798 | py | Python | src/py/args_definition.py | snwjas/RandomDesktopBackground-WEBUI | 1e34fb38a1088687987a9c2acd0ce5386b70489c | [
"MIT"
] | 17 | 2022-02-16T11:16:05.000Z | 2022-03-17T07:44:12.000Z | src/py/args_definition.py | snwjas/RandomDesktopBackground-WEBUI | 1e34fb38a1088687987a9c2acd0ce5386b70489c | [
"MIT"
] | 1 | 2022-03-11T08:40:05.000Z | 2022-03-12T02:04:06.000Z | src/py/args_definition.py | snwjas/RandomDesktopBackground-WEBUI | 1e34fb38a1088687987a9c2acd0ce5386b70489c | [
"MIT"
] | 4 | 2022-02-17T11:10:09.000Z | 2022-03-18T00:45:07.000Z | # -*-coding:utf-8-*-
"""
程序启动参数定义、获取与解析
@author Myles Yang
"""
import argparse
import const_config as const
""" 设置命令参数时的KEY """
# 程序运行方式
ARG_KEY_RUN = ARG_RUN = '--run'
# 程序日志记录方式
ARG_KEY_LOG = ARG_LOG = '--log'
# 创建程序快捷方式
ARG_KEY_LNK = ARG_LNK = '--lnk'
# 启动环境
ARG_KEY_ENV = ARG_ENV = '--env'
# 运行中可执行指令
ARG_KEY_CM... | 23.512605 | 102 | 0.605432 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,213 | 0.360797 |
741323c5ca5353953499cc57c205c55afeeb9d7b | 693 | py | Python | spec/puzzle/puzzlepedia/annotation_widget_spec.py | PhilHarnish/forge | 663f19d759b94d84935c14915922070635a4af65 | [
"MIT"
] | 2 | 2020-08-18T18:43:09.000Z | 2020-08-18T20:05:59.000Z | spec/puzzle/puzzlepedia/annotation_widget_spec.py | PhilHarnish/forge | 663f19d759b94d84935c14915922070635a4af65 | [
"MIT"
] | null | null | null | spec/puzzle/puzzlepedia/annotation_widget_spec.py | PhilHarnish/forge | 663f19d759b94d84935c14915922070635a4af65 | [
"MIT"
] | null | null | null | from puzzle.constraints import constraints, validator
from puzzle.puzzlepedia import annotation_widget
from spec.mamba import *
widget_patch = mock.patch('puzzle.puzzlepedia.annotation_widget.widgets')
class TestConstraints(constraints.Constraints):
test: str = 'value'
with description('annotation_widget'):
w... | 26.653846 | 74 | 0.746032 | 69 | 0.099567 | 0 | 0 | 0 | 0 | 0 | 0 | 118 | 0.170274 |
7413824fcd9d05cbbace3c88ba8b9036d58fbdad | 1,805 | py | Python | PRESUBMIT.py | Acidburn0zzz/trace-viewer | c4d7cee712b0306afc564787085cff76fd5bb5d9 | [
"BSD-3-Clause"
] | 2 | 2015-02-07T05:19:08.000Z | 2016-12-12T21:17:50.000Z | PRESUBMIT.py | Acidburn0zzz/trace-viewer | c4d7cee712b0306afc564787085cff76fd5bb5d9 | [
"BSD-3-Clause"
] | null | null | null | PRESUBMIT.py | Acidburn0zzz/trace-viewer | c4d7cee712b0306afc564787085cff76fd5bb5d9 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import sys
_EXCLUDED_PATHS = []
_LICENSE_HEADER = (
r".*? Copyright \(c\) 20\d\d The Chromium Authors\. All rights reserved\."
"\n"
r... | 28.650794 | 77 | 0.750693 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 360 | 0.199446 |
741439917b675f387d0d33e33aee90e37fbeb997 | 249 | py | Python | Configuration/Geometry/python/GeometrySLHCSimIdeal_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Configuration/Geometry/python/GeometrySLHCSimIdeal_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Configuration/Geometry/python/GeometrySLHCSimIdeal_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
# Ideal geometry, needed for simulation
from SLHCUpgradeSimulations.Geometry.Phase1_R30F12_cmsSimIdealGeometryXML_cff import *
from Geometry.TrackerNumberingBuilder.trackerNumbering2026Geometry_cfi import *
| 41.5 | 86 | 0.883534 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.156627 |
7415036718c53bd964690f45e8224fa5a56b1622 | 3,043 | py | Python | chromepasswords.py | petreleon/Python-Examples | f6841a9757373703163aa527933f1483566b4a08 | [
"MIT"
] | null | null | null | chromepasswords.py | petreleon/Python-Examples | f6841a9757373703163aa527933f1483566b4a08 | [
"MIT"
] | null | null | null | chromepasswords.py | petreleon/Python-Examples | f6841a9757373703163aa527933f1483566b4a08 | [
"MIT"
] | null | null | null | import os
import json
import base64
import sqlite3
import win32crypt
from Crypto.Cipher import AES
import shutil
from datetime import timezone, datetime, timedelta
def chrome_date_and_time(chrome_data):
# Chrome_data format is 'year-month-date
# hr:mins:seconds.milliseconds
# This will return datetime.datetime Obj... | 26.46087 | 108 | 0.723957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,159 | 0.380874 |
7418ced2999b5c9ae7697c9504a1ff1a23adb71d | 2,437 | py | Python | prototype/webapp.py | Tethik/whistleblower | 56747cbf3c4eda95cee7eded36b4a853d33d6ee3 | [
"MIT"
] | 1 | 2016-06-20T12:35:42.000Z | 2016-06-20T12:35:42.000Z | prototype/webapp.py | Tethik/whistleblower | 56747cbf3c4eda95cee7eded36b4a853d33d6ee3 | [
"MIT"
] | null | null | null | prototype/webapp.py | Tethik/whistleblower | 56747cbf3c4eda95cee7eded36b4a853d33d6ee3 | [
"MIT"
] | null | null | null | import os
from flask import Flask, request, redirect, url_for, render_template, send_from_directory, jsonify
from werkzeug import secure_filename
import uuid
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = 'upload/'
app.config['REPLY_FOLDER'] = 'replies/'
app.config['CLIENT_FOLDER'] = 'client/'
def upload_file_to... | 31.24359 | 98 | 0.664341 | 0 | 0 | 0 | 0 | 1,811 | 0.743127 | 0 | 0 | 731 | 0.299959 |
7419bb062ae8d53ccf6a7504895e66cc726771c1 | 346 | pyw | Python | file.pyw | ArezalGame89/Corn-Engine | fb71f501943bd4136268309059e81f0e4f3ceb79 | [
"MIT"
] | null | null | null | file.pyw | ArezalGame89/Corn-Engine | fb71f501943bd4136268309059e81f0e4f3ceb79 | [
"MIT"
] | null | null | null | file.pyw | ArezalGame89/Corn-Engine | fb71f501943bd4136268309059e81f0e4f3ceb79 | [
"MIT"
] | null | null | null | from tkinter import *
from tkinter import filedialog
import os
def openFile():
filepath = filedialog.askopenfilename(initialdir="/",title="Open file",filetypes= (("text files","*.txt"),("all files","*.*")))
os.startfile(filepath)
window = Tk()
button = Button(text="OpenFile",command=openFile)
button... | 28.833333 | 132 | 0.687861 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.17052 |
7419ef6e8a86a4875ecbf0d4658e76a557acec43 | 703 | py | Python | ats/urls.py | bitrecruiter/ats_project | cf363d6163a2b9369839b476b60908f2982f80b3 | [
"WTFPL"
] | null | null | null | ats/urls.py | bitrecruiter/ats_project | cf363d6163a2b9369839b476b60908f2982f80b3 | [
"WTFPL"
] | null | null | null | ats/urls.py | bitrecruiter/ats_project | cf363d6163a2b9369839b476b60908f2982f80b3 | [
"WTFPL"
] | 3 | 2016-07-20T11:17:37.000Z | 2018-12-31T06:00:27.000Z | from django.conf.urls import patterns, include, url
from ats.views import *
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'bcauth_project.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^job/(?P<job_id>\d+)/', JobView.as_view(), name='ats_job'),
url(r'^jobs/', JobLis... | 41.352941 | 77 | 0.641536 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 290 | 0.412518 |
741d95c42594e69744089d0d1e3f7163af1adde1 | 526 | py | Python | P1/plot_VI.py | xyp8023/lab1 | ac9693636f25b8e65236503035d241f124568d42 | [
"MIT"
] | null | null | null | P1/plot_VI.py | xyp8023/lab1 | ac9693636f25b8e65236503035d241f124568d42 | [
"MIT"
] | null | null | null | P1/plot_VI.py | xyp8023/lab1 | ac9693636f25b8e65236503035d241f124568d42 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import argparse
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument(
"--T", type=int, default=46,
help="Time-horizon.")
args = parser.parse_args()
T = args.T
data_dir = 'dat... | 25.047619 | 61 | 0.718631 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 95 | 0.180608 |
741dcec3224bbbaf709d95744c9d3eef8f6a4ddd | 2,808 | py | Python | main.py | sakunamary/raspi-info | 5a22165505947ef6b687d03ed23d963a2db0fe1f | [
"MIT"
] | null | null | null | main.py | sakunamary/raspi-info | 5a22165505947ef6b687d03ed23d963a2db0fe1f | [
"MIT"
] | null | null | null | main.py | sakunamary/raspi-info | 5a22165505947ef6b687d03ed23d963a2db0fe1f | [
"MIT"
] | null | null | null |
import time
import datetime
import threading
from get_net_info import RaspberryMonitorNetSpeed as rmn
import subprocess
import Adafruit_SSD1306
import Adafruit_GPIO.SPI as SPI
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
# Raspberry Pi pin configuration:
RST = None # on the PiOLED... | 27.529412 | 91 | 0.614672 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 826 | 0.29416 |
741df03c605f7c8edfa55bf4c10a819be3562916 | 1,929 | py | Python | 2015/rock-paper-scissors/rpsls_adv.py | axvr/codedump | 1e4a35f8e200048b47915466a35403f6ba5cd539 | [
"CC0-1.0"
] | 1 | 2018-09-23T06:11:28.000Z | 2018-09-23T06:11:28.000Z | 2015/rock-paper-scissors/rpsls_adv.py | axvr/codedump | 1e4a35f8e200048b47915466a35403f6ba5cd539 | [
"CC0-1.0"
] | null | null | null | 2015/rock-paper-scissors/rpsls_adv.py | axvr/codedump | 1e4a35f8e200048b47915466a35403f6ba5cd539 | [
"CC0-1.0"
] | null | null | null | # Rock, Paper, Scissors, Lizard, Spock - Advanced
# rpsls_adv.py for Python 3.4 | Written by Alex Vear
# Written: 19th December 2015 | Modified: 22nd December 2015
# Public domain. No rights reserved.
import random
playAgain='y'
while playAgain=='y' or playAgain=='Y':
win=0
print("\nScissors cuts Paper \nPape... | 42.866667 | 272 | 0.557802 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 939 | 0.486781 |
741ed06c043f7ccdfa760d57025904d088b9dea1 | 3,222 | py | Python | python/sklearn/examples/decomposition/plot_ica_vs_pca.py | seckcoder/lang-learn | 1e0d6f412bbd7f89b1af00293fd907ddb3c1b571 | [
"Unlicense"
] | 1 | 2017-10-14T04:23:45.000Z | 2017-10-14T04:23:45.000Z | python/sklearn/examples/decomposition/plot_ica_vs_pca.py | seckcoder/lang-learn | 1e0d6f412bbd7f89b1af00293fd907ddb3c1b571 | [
"Unlicense"
] | null | null | null | python/sklearn/examples/decomposition/plot_ica_vs_pca.py | seckcoder/lang-learn | 1e0d6f412bbd7f89b1af00293fd907ddb3c1b571 | [
"Unlicense"
] | null | null | null | """
==========================
FastICA on 2D point clouds
==========================
Illustrate visually the results of :ref:`ICA` vs :ref:`PCA` in the
feature space.
Representing ICA in the feature space gives the view of 'geometric ICA':
ICA is an algorithm that finds directions in the feature space
corresponding t... | 31.588235 | 79 | 0.647114 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,757 | 0.545313 |
74211c834b2dd1dade05058e46154bf5ab314dc4 | 709 | py | Python | supabase_client/supebase_exceptions.py | keosariel/supabase-client | 0a0e1dfe00ed6171d65f8c022ce23a6e90216616 | [
"MIT"
] | 6 | 2021-08-07T20:51:09.000Z | 2022-03-03T18:18:42.000Z | supabase_client/supebase_exceptions.py | keosariel/supabase-client | 0a0e1dfe00ed6171d65f8c022ce23a6e90216616 | [
"MIT"
] | null | null | null | supabase_client/supebase_exceptions.py | keosariel/supabase-client | 0a0e1dfe00ed6171d65f8c022ce23a6e90216616 | [
"MIT"
] | 2 | 2021-08-11T03:35:35.000Z | 2022-03-15T14:53:42.000Z | class SupabaseError(Exception):
"""Base class for all supabase errors
:param message: A human-readable error message string.
"""
def __init__(self, message):
Exception.__init__(self, message)
class ClientConnectorError(SupabaseError):
def __init__(self, message):
SupabaseError... | 24.448276 | 62 | 0.717913 | 696 | 0.981664 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.153738 |
742178c1a58413819c231f7bb06c85855868f4e1 | 3,085 | py | Python | main.py | jleightcap/ScrollingScore | 8b87e3571117001ecc9e26c79526f3ece91169d4 | [
"MIT"
] | 8 | 2017-10-04T21:02:36.000Z | 2021-01-22T19:32:27.000Z | main.py | jleightcap/ScrollingScore | 8b87e3571117001ecc9e26c79526f3ece91169d4 | [
"MIT"
] | 1 | 2018-10-30T01:06:37.000Z | 2018-10-30T01:12:23.000Z | main.py | jleightcap/ScrollingScore | 8b87e3571117001ecc9e26c79526f3ece91169d4 | [
"MIT"
] | null | null | null | import os, sys
from PIL import Image
### TERMINAL ARGUMENTS ###
# -h := help
# -q := quiet
# -single := forced one page per slide
args = sys.argv[1:]
# -h, print README and quit
if "-h" in args:
with open('./README.md') as f:
print(f.read())
quit()
# -q, toggle print statem... | 29.663462 | 93 | 0.540032 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 851 | 0.275851 |
7421d098ae659b63003aa81062297c85c4db845e | 5,395 | py | Python | converter.py | soodoku/digitaltv-coverage-in-uk | 9c4e95aaa41099d0528528bbb8a4e78abc8670e0 | [
"MIT"
] | 2 | 2015-07-20T14:46:36.000Z | 2015-07-20T19:31:31.000Z | converter.py | soodoku/digitaltv-coverage-in-uk | 9c4e95aaa41099d0528528bbb8a4e78abc8670e0 | [
"MIT"
] | null | null | null | converter.py | soodoku/digitaltv-coverage-in-uk | 9c4e95aaa41099d0528528bbb8a4e78abc8670e0 | [
"MIT"
] | 1 | 2021-05-04T04:23:19.000Z | 2021-05-04T04:23:19.000Z | '''
Parse coverage checker html files.
Write out data to a csv.
INPUT: html files in MY_DATA_FOLDERS
OUTPUT: csv file called OUTPUT_FILE
'''
from os import walk
import re
MY_DATA_FOLDERS = ["cov_checker"] # Folder to be processed
OUTPUT_FILE = "output.csv" # csv output result
DIGITAL_SEVICES = set()
CHA... | 35.032468 | 146 | 0.566636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,945 | 0.360519 |
742202ac1771508baccbc0fe5b6b22965932ae34 | 405 | py | Python | docs/advanced/v1 cookbook/uses/2017-12-19 search abf for comments/go.py | konung-yaropolk/pyABF | b5620e73ac5d060129b844da44f8b2611536ac56 | [
"MIT"
] | 74 | 2017-11-06T17:53:48.000Z | 2022-03-27T12:14:46.000Z | docs/advanced/v1 cookbook/uses/2017-12-19 search abf for comments/go.py | konung-yaropolk/pyABF | b5620e73ac5d060129b844da44f8b2611536ac56 | [
"MIT"
] | 116 | 2018-01-16T21:36:29.000Z | 2022-03-31T11:46:04.000Z | docs/advanced/v1 cookbook/uses/2017-12-19 search abf for comments/go.py | konung-yaropolk/pyABF | b5620e73ac5d060129b844da44f8b2611536ac56 | [
"MIT"
] | 30 | 2018-06-28T13:19:53.000Z | 2022-03-25T02:52:48.000Z | import glob
import sys
import os
sys.path.insert(0,os.path.abspath("../../../src/"))
import pyabf
if __name__=="__main__":
PATH=R"X:\Data\projects\2017-01-09 AT1-Cre mice\2017-01-09 global expression NTS\data"
for fname in sorted(glob.glob(PATH+"/*.abf")):
abf=pyabf.ABF(fname)
if not abf.commen... | 28.928571 | 90 | 0.646914 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 120 | 0.296296 |
74228016d8241f1954f19c1130b86873a1c9adff | 311 | py | Python | regtests/calling/keyword.py | idobatter/PythonJS | 0161dd5aba6caeaf5b06e74cc8524efd04a36143 | [
"BSD-3-Clause"
] | 1 | 2015-11-06T02:36:29.000Z | 2015-11-06T02:36:29.000Z | regtests/calling/keyword.py | idobatter/PythonJS | 0161dd5aba6caeaf5b06e74cc8524efd04a36143 | [
"BSD-3-Clause"
] | null | null | null | regtests/calling/keyword.py | idobatter/PythonJS | 0161dd5aba6caeaf5b06e74cc8524efd04a36143 | [
"BSD-3-Clause"
] | null | null | null | """keywords"""
def f(a, b=None, c=None):
return (a+b) * c
def f2(**kw):
a = 0
for key in kw:
a += kw[key]
return a
def main():
TestError( f(1, b=2, c=3) == 9) ## inorder works in javascript mode
TestError( f(1, c=3, b=2) == 9) ## out of order fails in javascript mode
TestError( f2(x=1,y=2) == 3 ) | 20.733333 | 74 | 0.572347 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 89 | 0.286174 |
7423abd661f73d484f9731e84a27b1c7ed10e42f | 1,372 | py | Python | imp_flask/views/imp_flask/products.py | thijsmie/imp_flask | 2cad9f628c54572c02a5f893ef9c0cb1149b18ea | [
"MIT"
] | 1 | 2019-06-13T07:28:02.000Z | 2019-06-13T07:28:02.000Z | imp_flask/views/imp_flask/products.py | k-automation/imp_flask | 2cad9f628c54572c02a5f893ef9c0cb1149b18ea | [
"MIT"
] | 4 | 2016-12-06T11:25:36.000Z | 2021-04-29T07:43:14.000Z | imp_flask/views/imp_flask/products.py | k-automation/imp_flask | 2cad9f628c54572c02a5f893ef9c0cb1149b18ea | [
"MIT"
] | 2 | 2017-09-06T14:26:04.000Z | 2018-02-03T18:55:36.000Z | from flask import render_template
from flask_login import login_required
from imp_flask.blueprints import products
from imp_flask.models.imps import Product, Mod
from imp_flask.forms.product import Product as ProductForm
@products.route('/', defaults=dict(page=1))
@products.route('/page/<int:page>')
@login... | 31.906977 | 122 | 0.706268 | 0 | 0 | 0 | 0 | 1,124 | 0.819242 | 0 | 0 | 168 | 0.122449 |
74242d1feb64459e2d3f13e6fe80316eb9b3ead9 | 370 | py | Python | Section 3/cisco_iosxr_napalm_example.py | magnusmel/-Hands-on-Network-Programming-with-Python | f1d8856791aed3392ac0ee280e4d3470afa63e9c | [
"MIT"
] | 8 | 2018-07-05T09:22:11.000Z | 2021-11-08T13:11:00.000Z | Section 3/cisco_iosxr_napalm_example.py | magnusmel/-Hands-on-Network-Programming-with-Python | f1d8856791aed3392ac0ee280e4d3470afa63e9c | [
"MIT"
] | null | null | null | Section 3/cisco_iosxr_napalm_example.py | magnusmel/-Hands-on-Network-Programming-with-Python | f1d8856791aed3392ac0ee280e4d3470afa63e9c | [
"MIT"
] | 6 | 2018-11-02T04:00:47.000Z | 2021-04-22T12:01:54.000Z | #
# Example From:
# https://xrdocs.io/application-hosting/tutorials/2016-08-15-netmiko-and-napalm-with-ios-xr-quick-look/
#
from napalm import get_network_driver
import pprint
driver = get_network_driver('iosxr')
device = driver('172.16.1.13', 'cisco', 'cisco')
device.open()
pprint.pprint(device.get_facts())
pprin... | 21.764706 | 103 | 0.751351 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 156 | 0.421622 |
742448e3aae25772c6b6399b5c670e3dc3e6f144 | 33 | py | Python | deployment/__init__.py | maxfrei750/CarbonBlackSegmentation | ff5aeaf03a9c60c1a0396f1d2b6d5a3347808a30 | [
"MIT"
] | null | null | null | deployment/__init__.py | maxfrei750/CarbonBlackSegmentation | ff5aeaf03a9c60c1a0396f1d2b6d5a3347808a30 | [
"MIT"
] | null | null | null | deployment/__init__.py | maxfrei750/CarbonBlackSegmentation | ff5aeaf03a9c60c1a0396f1d2b6d5a3347808a30 | [
"MIT"
] | null | null | null | from .segmenter import Segmenter
| 16.5 | 32 | 0.848485 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
742519fcfb7dd6c47cbb93d0049edd5300973d43 | 1,598 | py | Python | textcrawler/textcrawler/spiders/voz.py | rootofmylife/vietnamese-text-generation | f95fa3667a908ce213c0c24ac2cf5ed26ec5fa7c | [
"MIT"
] | null | null | null | textcrawler/textcrawler/spiders/voz.py | rootofmylife/vietnamese-text-generation | f95fa3667a908ce213c0c24ac2cf5ed26ec5fa7c | [
"MIT"
] | null | null | null | textcrawler/textcrawler/spiders/voz.py | rootofmylife/vietnamese-text-generation | f95fa3667a908ce213c0c24ac2cf5ed26ec5fa7c | [
"MIT"
] | null | null | null | import scrapy
class VozSpider(scrapy.Spider):
name = 'voz'
start_urls = ['https://voz.vn/f/chuyen-tro-linh-tinh.17/']
custom_settings = { 'FEED_URI': "voz_%(time)s.json",
'FEED_FORMAT': 'json',
'FEED_EXPORT_ENCODING': 'utf-8'}
def parse(self, response):
... | 44.388889 | 196 | 0.597622 | 1,582 | 0.989987 | 1,300 | 0.813517 | 0 | 0 | 0 | 0 | 550 | 0.34418 |
7425fc6532aea46b8665f27922b3825d84d16f07 | 717 | py | Python | Ylperj-database/CarModelsCreate.py | shoter/ylperJ | 716d38b4b13388b1d96919d8b21aa7e340f3efd1 | [
"MIT"
] | null | null | null | Ylperj-database/CarModelsCreate.py | shoter/ylperJ | 716d38b4b13388b1d96919d8b21aa7e340f3efd1 | [
"MIT"
] | 6 | 2020-04-23T18:32:52.000Z | 2021-12-09T21:22:18.000Z | Ylperj-database/CarModelsCreate.py | shoter/ylperJ | 716d38b4b13388b1d96919d8b21aa7e340f3efd1 | [
"MIT"
] | null | null | null | Engines = [
(1, "Diesel"),
(2, "Gasoline"),
(3, "Electric")
]
Luxuries = [
(1, "Cheap"),
(2, "Standard"),
(3, "Luxurious")
]
Companies = [
(1, 'Skoda'),
(2, 'Volvo'),
(3, 'Toyota'),
(4, 'Fiat')
]
def CalculateFuelConsumption(engineId, companyId, luxuryId):
return 100 + eng... | 22.40625 | 66 | 0.432357 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 0.165969 |
74261de06eee7feae9c74658beccdee5c04a750e | 6,912 | py | Python | tests/test_octodns_provider_yaml.py | jrunkel/octodns | 5429a64e51321d282f0aa82ac06f1ca68ec5bf3c | [
"MIT"
] | null | null | null | tests/test_octodns_provider_yaml.py | jrunkel/octodns | 5429a64e51321d282f0aa82ac06f1ca68ec5bf3c | [
"MIT"
] | null | null | null | tests/test_octodns_provider_yaml.py | jrunkel/octodns | 5429a64e51321d282f0aa82ac06f1ca68ec5bf3c | [
"MIT"
] | null | null | null | #
#
#
from __future__ import absolute_import, division, print_function, \
unicode_literals
from os.path import dirname, isfile, join
from unittest import TestCase
from yaml import safe_load
from yaml.constructor import ConstructorError
from octodns.record import Create
from octodns.provider.yaml import YamlProvi... | 38.614525 | 77 | 0.568287 | 6,491 | 0.939091 | 0 | 0 | 0 | 0 | 0 | 0 | 1,841 | 0.266348 |
7426de94b22c4fbcf84a5f14e77b0aacfb42e96e | 4,853 | py | Python | tests/route53/test_route53.py | kazhala/fawsf | 4abefb2301f7b489b11ed3f0b303faafa5941d5b | [
"MIT"
] | 66 | 2020-07-26T12:43:30.000Z | 2022-01-25T12:09:40.000Z | tests/route53/test_route53.py | kazhala/fawsf | 4abefb2301f7b489b11ed3f0b303faafa5941d5b | [
"MIT"
] | null | null | null | tests/route53/test_route53.py | kazhala/fawsf | 4abefb2301f7b489b11ed3f0b303faafa5941d5b | [
"MIT"
] | 3 | 2020-07-26T22:09:45.000Z | 2020-07-28T01:09:26.000Z | import unittest
import os
import io
import sys
from unittest.mock import patch
from fzfaws.route53 import Route53
from fzfaws.utils import Pyfzf, FileLoader
from botocore.paginate import Paginator
from pathlib import Path
class TestRoute53(unittest.TestCase):
def setUp(self):
fileloader = FileLoader()
... | 34.664286 | 86 | 0.53163 | 4,628 | 0.953637 | 0 | 0 | 2,405 | 0.49557 | 0 | 0 | 1,099 | 0.226458 |
742a29eaa70feec6aa524c7f468332e53208a8f5 | 1,163 | py | Python | detection/base_model.py | JakubPetriska/moving-sprites-object-detection | 3dc48a8c5b46b0ee9b08b90b0bf1607753e5c659 | [
"Apache-2.0"
] | 6 | 2018-03-01T10:02:16.000Z | 2020-06-19T12:42:14.000Z | detection/base_model.py | JakubPetriska/moving-sprites-object-detection | 3dc48a8c5b46b0ee9b08b90b0bf1607753e5c659 | [
"Apache-2.0"
] | null | null | null | detection/base_model.py | JakubPetriska/moving-sprites-object-detection | 3dc48a8c5b46b0ee9b08b90b0bf1607753e5c659 | [
"Apache-2.0"
] | null | null | null | from abc import ABC, abstractmethod
from keras.models import model_from_json
class BaseModel(ABC):
def __init__(self,
model_file_path=None,
weights_file_path=None,
verbosity=1):
if model_file_path:
with open(model_file_path, 'r') as model_fil... | 25.844444 | 64 | 0.623388 | 1,082 | 0.930353 | 0 | 0 | 317 | 0.272571 | 0 | 0 | 6 | 0.005159 |
742a3ab0f1445fb6ee395010f779ab9f70f5457e | 6,504 | py | Python | rs_course/utils.py | inpefess/recommender-systems-course | 1f890b12e0b6c6ffefe7822a8b878c322c469543 | [
"Apache-2.0"
] | null | null | null | rs_course/utils.py | inpefess/recommender-systems-course | 1f890b12e0b6c6ffefe7822a8b878c322c469543 | [
"Apache-2.0"
] | 11 | 2022-01-31T11:05:16.000Z | 2022-03-06T19:45:40.000Z | rs_course/utils.py | inpefess/recommender-systems-course | 1f890b12e0b6c6ffefe7822a8b878c322c469543 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021-2022 Boris Shminke
#
# 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 wr... | 33.875 | 79 | 0.667897 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,623 | 0.40329 |
742ba0c76a2e61d537ebb0628dbe4ec0329259e6 | 5,194 | py | Python | tests/base/fluids/test_fluid.py | DHaspel/cavsim | a23e344b47b970e1a90e04c071e06860935d1694 | [
"Apache-2.0"
] | null | null | null | tests/base/fluids/test_fluid.py | DHaspel/cavsim | a23e344b47b970e1a90e04c071e06860935d1694 | [
"Apache-2.0"
] | null | null | null | tests/base/fluids/test_fluid.py | DHaspel/cavsim | a23e344b47b970e1a90e04c071e06860935d1694 | [
"Apache-2.0"
] | null | null | null | from unittest import TestCase
import numpy as np
import numpy.testing as npt
from cavsim.base.fluids.fluid import Fluid
class TestFluid(TestCase):
def setUp(self):
self.fluid = Fluid(1, 2, 3, 4, 5, 6)
def tearDown(self):
del self.fluid
self.fluid = None
def test___init__(self):
... | 39.953846 | 93 | 0.670004 | 5,071 | 0.976319 | 0 | 0 | 0 | 0 | 0 | 0 | 104 | 0.020023 |
742d53fcb251b5c4874903797e2381fec53f64e4 | 1,738 | py | Python | day/6/survey_pt2.py | philparkbot/advent2020 | e5ee7e0703ae82d4c773024e4289d7d37879af35 | [
"MIT"
] | null | null | null | day/6/survey_pt2.py | philparkbot/advent2020 | e5ee7e0703ae82d4c773024e4289d7d37879af35 | [
"MIT"
] | null | null | null | day/6/survey_pt2.py | philparkbot/advent2020 | e5ee7e0703ae82d4c773024e4289d7d37879af35 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
'''
Input is a group of one or more lines with letters.
Each letter = question to which the answer was 'yes'.
Each line represents survey answers by a person, contains one or more letter.
Adjacent lines are part of the same group.
For each group, count the number of questions to which all peo... | 25.188406 | 80 | 0.521864 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 761 | 0.43786 |
742d81b9ef0eae8d2a138809ba186426bf9511d7 | 882 | py | Python | test/ut/tools/annotation/testcase/annotated/handwrite.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 9,680 | 2019-05-07T01:42:30.000Z | 2022-03-31T16:48:33.000Z | test/ut/tools/annotation/testcase/annotated/handwrite.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 1,957 | 2019-05-06T21:44:21.000Z | 2022-03-31T09:21:53.000Z | test/ut/tools/annotation/testcase/annotated/handwrite.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 1,571 | 2019-05-07T06:42:55.000Z | 2022-03-31T03:19:24.000Z | import nni
def max_pool(k):
pass
h_conv1 = 1
nni.choice({'foo': foo, 'bar': bar})(1)
conv_size = nni.choice({2: 2, 3: 3, 5: 5, 7: 7}, name='conv_size')
abc = nni.choice({'2': '2', 3: 3, '(5 * 6)': 5 * 6, 7: 7}, name='abc')
h_pool1 = nni.function_choice({'max_pool': lambda : max_pool(h_conv1),
'h_conv1': lambda... | 36.75 | 78 | 0.643991 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 186 | 0.210884 |
742d95bbe3f86400b205fe61790ce9cbad881b41 | 7,019 | py | Python | scripts/update-seminars.py | geem-lab/seminars | 0ea259c902c98ca49a1da252a331ac21eb1e094a | [
"MIT"
] | 6 | 2022-03-09T13:10:24.000Z | 2022-03-28T22:20:39.000Z | scripts/update-seminars.py | geem-lab/seminars | 0ea259c902c98ca49a1da252a331ac21eb1e094a | [
"MIT"
] | 9 | 2022-03-08T22:35:29.000Z | 2022-03-28T14:33:10.000Z | scripts/update-seminars.py | geem-lab/seminars | 0ea259c902c98ca49a1da252a331ac21eb1e094a | [
"MIT"
] | null | null | null | from __future__ import annotations
import calendar
import logging
import os
from dataclasses import dataclass
from datetime import datetime
import dateparser
import requests
from markdown import markdown
def request_github_api(
query_url: str, owner="geem-lab", token=None, logger=None
) -> dict:
if token is... | 26.486792 | 140 | 0.583274 | 4,874 | 0.694104 | 0 | 0 | 4,896 | 0.697237 | 0 | 0 | 1,253 | 0.178439 |
742e0248a8aa9b41dc85de4de72c884d496f20d9 | 3,245 | py | Python | sdk/python/pulumi_aws_native/location/get_place_index.py | pulumi/pulumi-aws-native | 1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3 | [
"Apache-2.0"
] | 29 | 2021-09-30T19:32:07.000Z | 2022-03-22T21:06:08.000Z | sdk/python/pulumi_aws_native/location/get_place_index.py | pulumi/pulumi-aws-native | 1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3 | [
"Apache-2.0"
] | 232 | 2021-09-30T19:26:26.000Z | 2022-03-31T23:22:06.000Z | sdk/python/pulumi_aws_native/location/get_place_index.py | pulumi/pulumi-aws-native | 1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3 | [
"Apache-2.0"
] | 4 | 2021-11-10T19:42:01.000Z | 2022-02-05T10:15:49.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__a... | 34.521277 | 124 | 0.67396 | 1,721 | 0.530354 | 245 | 0.075501 | 1,706 | 0.525732 | 0 | 0 | 766 | 0.236055 |
742f0630007375e4ed1fb342a09ab11f33680542 | 611 | py | Python | dashboard/migrations/0030_auto_20171107_1924.py | eric-scott-owens/loopla | 1fd5e6e7e9907198ff904111010b362a129d5e39 | [
"MIT"
] | null | null | null | dashboard/migrations/0030_auto_20171107_1924.py | eric-scott-owens/loopla | 1fd5e6e7e9907198ff904111010b362a129d5e39 | [
"MIT"
] | 6 | 2020-06-05T22:27:20.000Z | 2022-03-24T10:25:50.000Z | dashboard/migrations/0030_auto_20171107_1924.py | eric-scott-owens/loopla | 1fd5e6e7e9907198ff904111010b362a129d5e39 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-11-07 19:24
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0029_auto_20171017_2329'),
]
operations = [
migrations.RenameField(
... | 23.5 | 49 | 0.603928 | 461 | 0.754501 | 0 | 0 | 0 | 0 | 0 | 0 | 198 | 0.324059 |
742f356276917a64ca8c8ca59a40f2174ed1eff3 | 707 | py | Python | teamcat_service/doraemon/doraemon/api/ci/filters/ci_taskflow_filter.py | zhangyin2088/Teamcat | be9be8d7c1e58c8d2d22ab78d25783d9aee4de71 | [
"Apache-2.0"
] | 6 | 2018-11-26T08:42:52.000Z | 2020-06-01T08:33:48.000Z | teamcat_service/doraemon/doraemon/api/ci/filters/ci_taskflow_filter.py | zhangyin2088/Teamcat | be9be8d7c1e58c8d2d22ab78d25783d9aee4de71 | [
"Apache-2.0"
] | null | null | null | teamcat_service/doraemon/doraemon/api/ci/filters/ci_taskflow_filter.py | zhangyin2088/Teamcat | be9be8d7c1e58c8d2d22ab78d25783d9aee4de71 | [
"Apache-2.0"
] | 1 | 2019-01-22T06:45:36.000Z | 2019-01-22T06:45:36.000Z | # coding=utf-8
'''
Created on 2016-12-5
@author: Administrator
'''
from doraemon.ci.models import CITaskFlow, CIFlowSectionHistory, CITaskFlowHistory
from url_filter.filtersets.django import ModelFilterSet
class CITaskFlowFilterSet(ModelFilterSet):
class Meta(object):
model = CITaskFlow
fields =... | 25.25 | 85 | 0.705799 | 490 | 0.693069 | 0 | 0 | 0 | 0 | 0 | 0 | 165 | 0.23338 |
7431452de01929e5a219b4f8d212634cdab0aa06 | 387 | py | Python | failures/mapper.py | ALaks96/MapReduce_Pyspark_Large_Matrix_Multiplication | 1a37a4a66464e7f11295ebf55507853b959748ad | [
"MIT"
] | null | null | null | failures/mapper.py | ALaks96/MapReduce_Pyspark_Large_Matrix_Multiplication | 1a37a4a66464e7f11295ebf55507853b959748ad | [
"MIT"
] | null | null | null | failures/mapper.py | ALaks96/MapReduce_Pyspark_Large_Matrix_Multiplication | 1a37a4a66464e7f11295ebf55507853b959748ad | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
# input comes from STDIN (standard input)
for line in sys.stdin:
# remove leading and trailing whitespace
line = line.strip()
# split the line into words
element1 = line.split(',')
c = 0
for element in element1:
c += 1
if c == 1:
... | 16.125 | 44 | 0.537468 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 128 | 0.330749 |
74315d90853ccb50d6e8d6018b567f14aa463a3b | 5,589 | py | Python | winchester/db/alembic_command.py | SandyWalsh/stacktach-winchester | ac49955386b695868945a28b6597fe72b3b657e6 | [
"Apache-2.0"
] | null | null | null | winchester/db/alembic_command.py | SandyWalsh/stacktach-winchester | ac49955386b695868945a28b6597fe72b3b657e6 | [
"Apache-2.0"
] | null | null | null | winchester/db/alembic_command.py | SandyWalsh/stacktach-winchester | ac49955386b695868945a28b6597fe72b3b657e6 | [
"Apache-2.0"
] | null | null | null | from alembic import util, command, config
import argparse
import inspect
class AlembicCommandLine(object):
prog = None
description = None
allowed_commands = None
def __init__(self, prog=None, description=None, allowed_commands=None):
if prog is not None:
self.prog = prog
i... | 39.083916 | 77 | 0.501879 | 5,430 | 0.971551 | 0 | 0 | 0 | 0 | 0 | 0 | 1,142 | 0.20433 |
74316554f8575ef9ba36a94a68a372ec2ee916f0 | 7,892 | py | Python | tests/test_glamor_functions.py | Denis-Alexeev/pytest-glamor-allure | e7b5f11115eefd61ab1c7b775d6bafec0b1623e2 | [
"MIT"
] | 8 | 2021-11-15T21:59:46.000Z | 2022-03-28T07:49:55.000Z | tests/test_glamor_functions.py | Denis-Alexeev/pytest-glamor-allure | e7b5f11115eefd61ab1c7b775d6bafec0b1623e2 | [
"MIT"
] | 11 | 2021-11-15T16:07:35.000Z | 2022-02-17T08:20:05.000Z | tests/test_glamor_functions.py | Denis-Alexeev/pytest-glamor-allure | e7b5f11115eefd61ab1c7b775d6bafec0b1623e2 | [
"MIT"
] | 2 | 2021-12-28T08:27:35.000Z | 2022-01-17T02:19:26.000Z | """
Here we test `glamor.include_scope_in_title` and
`glamor.logging_allure_steps` functions.
"""
import io
import logging
from allure_commons_test.container import has_container
from allure_commons_test.report import has_test_case
from hamcrest import assert_that
from glamor.patches import PatchHelper, include_scope... | 30.708171 | 79 | 0.578814 | 7,021 | 0.889635 | 1,105 | 0.140015 | 7,180 | 0.909782 | 0 | 0 | 2,054 | 0.260264 |
743174fff100b9f86539866eae286cdca4d3bcac | 51 | py | Python | enthought/pyface/message_dialog.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/pyface/message_dialog.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | enthought/pyface/message_dialog.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | null | null | null | # proxy module
from pyface.message_dialog import *
| 17 | 35 | 0.803922 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.27451 |
7433c8c30300e5235615677f9a888944d6d1c778 | 1,827 | py | Python | gorzdrav_parser.py | hound672/gorzdrav_parser | a6e5175111e8a0072484cb1b8c73dcc9afeec172 | [
"MIT"
] | null | null | null | gorzdrav_parser.py | hound672/gorzdrav_parser | a6e5175111e8a0072484cb1b8c73dcc9afeec172 | [
"MIT"
] | null | null | null | gorzdrav_parser.py | hound672/gorzdrav_parser | a6e5175111e8a0072484cb1b8c73dcc9afeec172 | [
"MIT"
] | 1 | 2021-02-07T19:46:37.000Z | 2021-02-07T19:46:37.000Z | import requests
import pprint
import time
from datetime import datetime
def send_push(text):
try:
print(f"Send push: {text}")
TOKEN = "put your token here"
args = {"title": text, "identifier": TOKEN}
requests.get("https://pushmeapi.jagcesar.se", params=args)
except Exception as... | 26.478261 | 80 | 0.570881 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 630 | 0.344828 |
7434f4f146e47baaf237cd225371fc355a0742ea | 1,801 | py | Python | django/core/model_fields.py | chanhosuh/bitcoin-monitor | acecfcf020cf2debfdf3a2e8c446007d7412d8e1 | [
"MIT"
] | 1 | 2020-01-01T15:54:45.000Z | 2020-01-01T15:54:45.000Z | django/core/model_fields.py | chanhosuh/bitcoin-monitor | acecfcf020cf2debfdf3a2e8c446007d7412d8e1 | [
"MIT"
] | 13 | 2019-02-28T03:24:54.000Z | 2021-09-22T17:50:00.000Z | django/core/model_fields.py | chanhosuh/bitcoin-monitor | acecfcf020cf2debfdf3a2e8c446007d7412d8e1 | [
"MIT"
] | null | null | null | from django.core.exceptions import ValidationError
from django.db import models
from django.db.models.fields import BigIntegerField
from django.utils.translation import ugettext_lazy as _
from .bitcoin import Bitcoin
HEX_CHARS = "0123456789abcdefABCDEF"
def validate_hex(hex_string):
if not (len(hex_string) % 2... | 31.051724 | 87 | 0.654636 | 1,224 | 0.679622 | 0 | 0 | 0 | 0 | 0 | 0 | 429 | 0.238201 |
743528a5657356c58159ba08649a9c47c2edc92a | 239 | py | Python | Python3/96.unique-binary-search-trees.py | 610yilingliu/leetcode | 30d071b3685c2131bd3462ba77c6c05114f3f227 | [
"MIT"
] | null | null | null | Python3/96.unique-binary-search-trees.py | 610yilingliu/leetcode | 30d071b3685c2131bd3462ba77c6c05114f3f227 | [
"MIT"
] | null | null | null | Python3/96.unique-binary-search-trees.py | 610yilingliu/leetcode | 30d071b3685c2131bd3462ba77c6c05114f3f227 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=96 lang=python3
#
# [96] Unique Binary Search Trees
#
# @lc code=start
class Solution:
def numTrees(self, n: int):
if n < 2:
return n
dp = [0] * n
# @lc code=end
| 13.277778 | 37 | 0.502092 | 107 | 0.447699 | 0 | 0 | 0 | 0 | 0 | 0 | 103 | 0.430962 |
743567e6130a8957b1d579546a0e934b198dfa8b | 3,064 | py | Python | launchpad_rgb/__init__.py | HitmanBobina47/launchpad_rgb | cf073ce3662e110b30a4e7647750d86d53ec027f | [
"MIT"
] | 7 | 2019-04-09T01:47:00.000Z | 2020-11-11T01:38:46.000Z | launchpad_rgb/__init__.py | HitmanBobina47/launchpad_rgb | cf073ce3662e110b30a4e7647750d86d53ec027f | [
"MIT"
] | null | null | null | launchpad_rgb/__init__.py | HitmanBobina47/launchpad_rgb | cf073ce3662e110b30a4e7647750d86d53ec027f | [
"MIT"
] | 1 | 2019-12-07T11:36:21.000Z | 2019-12-07T11:36:21.000Z | from typing import Callable, List
class Message():
"""
Stores the notes and their new colors.
All functions return themselves (except for xy), so you can chain calls.
To get the actual sysex data (not including the 0xF0 to start and 0xF7 to end the message),
call the object like a function.
Exa... | 37.82716 | 157 | 0.56299 | 3,029 | 0.988577 | 0 | 0 | 0 | 0 | 0 | 0 | 1,402 | 0.457572 |
7436b8a2d033f080a4d8a0fedb57c06470287cd7 | 1,377 | py | Python | deepcell_label/exporters_test.py | naterenegar/deepcell-label | 5ebe3dd5786746dbdea3dc2ff37f07bb45ebffb8 | [
"Apache-2.0"
] | null | null | null | deepcell_label/exporters_test.py | naterenegar/deepcell-label | 5ebe3dd5786746dbdea3dc2ff37f07bb45ebffb8 | [
"Apache-2.0"
] | 2 | 2020-10-15T23:09:02.000Z | 2020-10-22T19:59:09.000Z | deepcell_label/exporters_test.py | naterenegar/deepcell-label | 5ebe3dd5786746dbdea3dc2ff37f07bb45ebffb8 | [
"Apache-2.0"
] | null | null | null | """Tests for exporters.py"""
import pytest
import io
from deepcell_label import models
from deepcell_label import exporters
from deepcell_label.conftest import DummyLoader
@pytest.fixture
def npz_exporter(app, db_session):
with app.app_context():
db_session.autoflush = False
project = models.Pro... | 27.54 | 69 | 0.682643 | 679 | 0.493101 | 0 | 0 | 512 | 0.371823 | 0 | 0 | 86 | 0.062455 |
743894d56d7c6c4c5887273915d861d1f752013b | 6,047 | py | Python | petition.py | corazzon/petitions | 76b2110cb7b664fa25a6a71527d50a5e8a9acf9a | [
"MIT"
] | 1 | 2019-02-18T00:47:07.000Z | 2019-02-18T00:47:07.000Z | petition.py | corazzon/petitions | 76b2110cb7b664fa25a6a71527d50a5e8a9acf9a | [
"MIT"
] | null | null | null | petition.py | corazzon/petitions | 76b2110cb7b664fa25a6a71527d50a5e8a9acf9a | [
"MIT"
] | 2 | 2018-05-31T07:57:54.000Z | 2021-09-07T22:47:38.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import csv
import logging
import os
import random
import re
from concurrent.futures import ThreadPoolExecutor
from typing import Dict
from urllib import request
from urllib.error import HTTPError
from bs4 import BeautifulSoup
DATA_DIR = 'data'
CSV_FILE_WHOLE = os.path.join(DA... | 30.235 | 79 | 0.592525 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,372 | 0.352295 |
7438b8b5f4189488f134c9a9c07bc97d4f67a23a | 1,080 | py | Python | Examples/QLinearGradientDemo.py | GrayLand119/PyQt5-Demos | 792379b4f474abd00aceb2982aad599277a6139d | [
"MIT"
] | null | null | null | Examples/QLinearGradientDemo.py | GrayLand119/PyQt5-Demos | 792379b4f474abd00aceb2982aad599277a6139d | [
"MIT"
] | null | null | null | Examples/QLinearGradientDemo.py | GrayLand119/PyQt5-Demos | 792379b4f474abd00aceb2982aad599277a6139d | [
"MIT"
] | null | null | null | from PyQt5 import QtGui
from PyQt5.QtWidgets import QApplication, QMainWindow
import sys
from PyQt5.QtGui import QPainter, QBrush, QPen, QLinearGradient
from PyQt5.QtCore import Qt
class Window(QMainWindow):
def __init__(self):
super().__init__()
self.title = "PyQt5 Window"
self.top = 200... | 25.116279 | 70 | 0.641667 | 826 | 0.764815 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.022222 |
743957d3765da76f1e6b4404e6ebe330d6e23d9d | 317 | py | Python | lnbits/extensions/lndhub/views.py | sidahmedabdelillah/attigoBTC | f121184bab7f4704b54eff6d0ac27afa1ed524ed | [
"MIT"
] | null | null | null | lnbits/extensions/lndhub/views.py | sidahmedabdelillah/attigoBTC | f121184bab7f4704b54eff6d0ac27afa1ed524ed | [
"MIT"
] | null | null | null | lnbits/extensions/lndhub/views.py | sidahmedabdelillah/attigoBTC | f121184bab7f4704b54eff6d0ac27afa1ed524ed | [
"MIT"
] | null | null | null | from quart import render_template, g
from lnbits.decorators import check_user_exists, validate_uuids
from . import lndhub_ext
@lndhub_ext.route("/")
@validate_uuids(["usr"], required=True)
@check_user_exists()
async def lndhub_index():
return await render_template("lndhub/index.html", user=g.user)
| 26.416667 | 67 | 0.753943 | 0 | 0 | 0 | 0 | 180 | 0.567823 | 93 | 0.293375 | 27 | 0.085174 |
743ac42a3fd4814460f31cd2fc79206de9e65dfa | 600 | py | Python | misago/misago/users/models/deleteduser.py | vascoalramos/misago-deployment | 20226072138403108046c0afad9d99eb4163cedc | [
"MIT"
] | 2 | 2021-03-06T21:06:13.000Z | 2021-03-09T15:05:12.000Z | misago/misago/users/models/deleteduser.py | vascoalramos/misago-deployment | 20226072138403108046c0afad9d99eb4163cedc | [
"MIT"
] | null | null | null | misago/misago/users/models/deleteduser.py | vascoalramos/misago-deployment | 20226072138403108046c0afad9d99eb4163cedc | [
"MIT"
] | null | null | null | from django.db import models
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
class DeletedUser(models.Model):
DELETED_BY_SELF = 1
DELETED_BY_STAFF = 2
DELETED_BY_SYSTEM = 3
DELETED_BY_CHOICES = (
(DELETED_BY_SELF, _("By self")),
(DELETED_BY_ST... | 27.272727 | 87 | 0.7 | 478 | 0.796667 | 0 | 0 | 0 | 0 | 0 | 0 | 35 | 0.058333 |
743c019783cebe50823cfa7cf0403d2a844efab9 | 26,854 | py | Python | kernel/components/boosting/horzsecureboost/horz_secureboosting_client.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 39 | 2021-10-12T01:43:27.000Z | 2022-03-28T04:46:35.000Z | kernel/components/boosting/horzsecureboost/horz_secureboosting_client.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 6 | 2021-10-14T02:11:47.000Z | 2022-03-23T02:41:50.000Z | kernel/components/boosting/horzsecureboost/horz_secureboosting_client.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 10 | 2021-10-14T09:36:03.000Z | 2022-02-10T11:05:12.000Z | # Copyright 2021 Tianmian Tech. 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 la... | 46.379965 | 221 | 0.624116 | 23,728 | 0.883593 | 0 | 0 | 562 | 0.020928 | 0 | 0 | 3,828 | 0.142549 |