hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e03372c545727bf02da983c175a8b95af089be73 | 25,226 | py | Python | lib/googlecloudsdk/core/credentials/store.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/core/credentials/store.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/core/credentials/store.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | 1 | 2020-07-24T20:13:29.000Z | 2020-07-24T20:13:29.000Z | # Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 33.860403 | 80 | 0.722271 |
54cf6c01143c0b4a3e9b95f89197f999c638ea3b | 397 | py | Python | school_app/wsgi.py | shravakushwaha/school_system | 840f414a7a56b5d424695af811b621c18a1ec72a | [
"MIT"
] | 235 | 2020-05-05T21:05:22.000Z | 2022-03-27T07:41:51.000Z | school_app/wsgi.py | shravakushwaha/school_system | 840f414a7a56b5d424695af811b621c18a1ec72a | [
"MIT"
] | 24 | 2020-05-05T21:44:40.000Z | 2022-03-12T00:28:02.000Z | school_app/wsgi.py | shravakushwaha/school_system | 840f414a7a56b5d424695af811b621c18a1ec72a | [
"MIT"
] | 133 | 2020-05-05T20:53:42.000Z | 2022-03-30T00:34:56.000Z | """
WSGI config for school_app project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SE... | 23.352941 | 78 | 0.788413 |
a8d0293d13645c65b473cb28ef3e0bfc9a6c2a82 | 106,124 | py | Python | tensorflow/python/ops/nn_ops.py | nuchi/tensorflow | 3bc595df1d9ea2015fa892bbd69c38ae4c4857d3 | [
"Apache-2.0"
] | 1 | 2018-04-18T02:47:44.000Z | 2018-04-18T02:47:44.000Z | tensorflow/python/ops/nn_ops.py | Richardyouth/tensorflow | 3bc595df1d9ea2015fa892bbd69c38ae4c4857d3 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/nn_ops.py | Richardyouth/tensorflow | 3bc595df1d9ea2015fa892bbd69c38ae4c4857d3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.539493 | 98 | 0.682456 |
1f4b1b74e576123650bec973b1d4271bd8415a29 | 1,022 | py | Python | web/addons/payment_buckaroo/__init__.py | diogocs1/comps | 63df07f6cf21c41e4527c06e2d0499f23f4322e7 | [
"Apache-2.0"
] | 1 | 2019-12-29T11:53:56.000Z | 2019-12-29T11:53:56.000Z | odoo/addons/payment_buckaroo/__init__.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | null | null | null | odoo/addons/payment_buckaroo/__init__.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | 3 | 2020-10-08T14:42:10.000Z | 2022-01-28T14:12:29.000Z | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | 42.583333 | 78 | 0.609589 |
1eb3c6c734eea8abb2d8859234449a197d36dd54 | 1,033 | py | Python | docs/source/conf.py | achillesrasquinha/fluxviz | aa0f1af34aa379d51aba45f6a87e38303a86a2f0 | [
"MIT"
] | 1 | 2020-05-04T04:51:47.000Z | 2020-05-04T04:51:47.000Z | docs/source/conf.py | achillesrasquinha/fluxviz | aa0f1af34aa379d51aba45f6a87e38303a86a2f0 | [
"MIT"
] | 2 | 2020-02-10T21:57:02.000Z | 2021-06-02T01:07:08.000Z | docs/source/conf.py | achillesrasquinha/fluxviz | aa0f1af34aa379d51aba45f6a87e38303a86a2f0 | [
"MIT"
] | 1 | 2020-02-12T17:17:50.000Z | 2020-02-12T17:17:50.000Z | import sys
import os, os.path as osp
import datetime as dt
def pardir(path, level = 1):
for _ in range(level):
path = osp.dirname(path)
return path
BASEDIR = osp.abspath(pardir(__file__, 3))
DOCSDIR = osp.join(BASEDIR, "docs")
SRCDIR = osp.join(BASEDIR, "src")
NOW = dt.datetime.now()
sys.path.in... | 19.12963 | 66 | 0.621491 |
eabc5f69f472b240841ecc9fee7080050835237a | 2,277 | py | Python | core/brain/show/last/requests/reaction.py | vsilent/smarty-bot | 963cba05433be14494ba339343c9903ccab3c37d | [
"MIT"
] | 1 | 2016-10-08T09:01:05.000Z | 2016-10-08T09:01:05.000Z | core/brain/show/last/requests/reaction.py | vsilent/smarty-bot | 963cba05433be14494ba339343c9903ccab3c37d | [
"MIT"
] | 1 | 2019-09-24T09:56:52.000Z | 2019-09-24T09:56:52.000Z | core/brain/show/last/requests/reaction.py | vsilent/smarty-bot | 963cba05433be14494ba339343c9903ccab3c37d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Author:
Description:
'''
from core.broadcast import say, bang
from core.people.person import Profile, ProfileRequest, Session
class Reaction:
"""class Reaction"""
response = ''
request = ''
def __str__(self):
return 'My new reaction'
@cl... | 27.107143 | 78 | 0.508564 |
deb082caff9c21321823545e551ea94b8f3dcd9b | 22 | py | Python | my_test_proj/__init__.py | Naman-Goyal/4995-demo | b00bdfcd5f33edbcbb73eb0cf14b6129bb8583e6 | [
"MIT"
] | null | null | null | my_test_proj/__init__.py | Naman-Goyal/4995-demo | b00bdfcd5f33edbcbb73eb0cf14b6129bb8583e6 | [
"MIT"
] | null | null | null | my_test_proj/__init__.py | Naman-Goyal/4995-demo | b00bdfcd5f33edbcbb73eb0cf14b6129bb8583e6 | [
"MIT"
] | null | null | null | from .foo import inc
| 7.333333 | 20 | 0.727273 |
9519866a9a7051fcdfedf64c5faf8ba13ea5643f | 1,306 | py | Python | src/ui/questions.py | giansalex/repo_info_extractor | fa31940964e31c2d1aa3cdfd302539e02f70f511 | [
"MIT"
] | null | null | null | src/ui/questions.py | giansalex/repo_info_extractor | fa31940964e31c2d1aa3cdfd302539e02f70f511 | [
"MIT"
] | null | null | null | src/ui/questions.py | giansalex/repo_info_extractor | fa31940964e31c2d1aa3cdfd302539e02f70f511 | [
"MIT"
] | null | null | null | from whaaaaat import style_from_dict, Token, prompt, print_json, default_style, Separator
class Questions:
def ask_primary_remote_url(self, repo):
'''
Promots the user the possible remote ULRs and ask her to select the primary
'''
choices = []
for remote in repo.original_re... | 33.487179 | 155 | 0.538285 |
4dc76e1bd6ddca0f450caf27139b7b7bc6d190dd | 9,392 | py | Python | spinup/run.py | Gerkinator/spinningup | a4ccfb447329e89007a36908133a3b0867b5664c | [
"MIT"
] | null | null | null | spinup/run.py | Gerkinator/spinningup | a4ccfb447329e89007a36908133a3b0867b5664c | [
"MIT"
] | null | null | null | spinup/run.py | Gerkinator/spinningup | a4ccfb447329e89007a36908133a3b0867b5664c | [
"MIT"
] | null | null | null | import spinup
from spinup.user_config import DEFAULT_BACKEND
from spinup.utils.run_utils import ExperimentGrid
from spinup.utils.serialization_utils import convert_json
import argparse
import gym
import json
import os, subprocess, sys
import os.path as osp
import string
import tensorflow as tf
import torch
from copy im... | 37.269841 | 87 | 0.636286 |
537419de88fe69cb5646b5526f922469c005ab29 | 45,676 | py | Python | allennlp/models/encoder_decoders/copynet_seq2seq.py | entslscheia/allennlp | eeba62e34c8e211ed5963f830528c957f178607b | [
"Apache-2.0"
] | null | null | null | allennlp/models/encoder_decoders/copynet_seq2seq.py | entslscheia/allennlp | eeba62e34c8e211ed5963f830528c957f178607b | [
"Apache-2.0"
] | null | null | null | allennlp/models/encoder_decoders/copynet_seq2seq.py | entslscheia/allennlp | eeba62e34c8e211ed5963f830528c957f178607b | [
"Apache-2.0"
] | 1 | 2021-09-21T12:03:27.000Z | 2021-09-21T12:03:27.000Z | import logging
from typing import Dict, Tuple, List, Any, Union
import numpy
from overrides import overrides
import torch
from torch.nn.modules.linear import Linear
from torch.nn.modules.rnn import LSTMCell
from allennlp.common.util import START_SYMBOL, END_SYMBOL
from allennlp.data.vocabulary import Vocabulary
from ... | 50.920847 | 106 | 0.661573 |
e47aa7aa50233a2aa9a8e9c0c1213af7149b3ad9 | 6,450 | py | Python | code/inference.py | i-need-sleep/MMCoref | bba168760841ececd4e906b07e8153c0a92b0f49 | [
"MIT"
] | 2 | 2021-10-29T22:06:43.000Z | 2021-12-21T01:58:01.000Z | code/inference.py | i-need-sleep/MMCoref | bba168760841ececd4e906b07e8153c0a92b0f49 | [
"MIT"
] | null | null | null | code/inference.py | i-need-sleep/MMCoref | bba168760841ececd4e906b07e8153c0a92b0f49 | [
"MIT"
] | 1 | 2022-03-31T09:22:24.000Z | 2022-03-31T09:22:24.000Z | import os
import json
import torch
from Transformers_VQA.dataset_final import make_final_loader
from Transformers_VQA.modified_uniter import Modified_Uniter
from Transformers_VQA.modified_uniter_KBid import Modified_Uniter_KBid
from Transformers_VQA.modified_uniter_sceneseg import Modified_Uniter_sceneseg
def inferen... | 42.434211 | 157 | 0.597519 |
9b001f46c2262f49679077382a11915a7e5e5e0c | 2,371 | py | Python | distblast/hadoop/distblast_pipes.py | bgruening/bcbb | dbfb52711f0bfcc1d26c5a5b53c9ff4f50dc0027 | [
"MIT"
] | 339 | 2015-01-04T13:23:04.000Z | 2022-03-25T23:09:09.000Z | distblast/hadoop/distblast_pipes.py | bgruening/bcbb | dbfb52711f0bfcc1d26c5a5b53c9ff4f50dc0027 | [
"MIT"
] | 39 | 2015-01-14T21:31:09.000Z | 2021-11-18T15:15:33.000Z | distblast/hadoop/distblast_pipes.py | bgruening/bcbb | dbfb52711f0bfcc1d26c5a5b53c9ff4f50dc0027 | [
"MIT"
] | 176 | 2015-01-10T17:40:44.000Z | 2022-03-25T05:14:21.000Z | #!/usr/bin/env python
"""Process a fasta file through Hadoop one record at a time using pydoop.
"""
import sys
import os
import json
import logging
logging.basicConfig(level=logging.DEBUG)
from pydoop.pipes import Mapper, Reducer, Factory, runTask
from pydoop.pipes import RecordReader, InputSplit, RecordWriter
from py... | 32.040541 | 80 | 0.646984 |
5b4fbbeb0661708083f4f75a2a1867005816654e | 9,389 | py | Python | lib/utils/keypoints.py | terrychenism/Detectron | 400687fb105e6a64d75d420e86e843971653409f | [
"Apache-2.0"
] | 14 | 2018-03-17T13:11:27.000Z | 2019-02-17T18:17:54.000Z | lib/utils/keypoints.py | terrychenism/Detectron | 400687fb105e6a64d75d420e86e843971653409f | [
"Apache-2.0"
] | null | null | null | lib/utils/keypoints.py | terrychenism/Detectron | 400687fb105e6a64d75d420e86e843971653409f | [
"Apache-2.0"
] | 6 | 2018-05-10T09:25:42.000Z | 2018-10-15T13:18:37.000Z | # Copyright (c) 2017-present, Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 35.033582 | 80 | 0.607732 |
007efcea58e6fa3c8f9cec6e7e31341aaff2bd14 | 3,401 | py | Python | tensorflow/python/training/gradient_descent.py | wainshine/tensorflow | dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d | [
"Apache-2.0"
] | 54 | 2017-06-17T14:07:48.000Z | 2022-03-29T02:11:20.000Z | tensorflow/python/training/gradient_descent.py | wainshine/tensorflow | dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d | [
"Apache-2.0"
] | 19 | 2021-12-28T12:44:55.000Z | 2022-01-13T08:11:28.000Z | tensorflow/python/training/gradient_descent.py | wainshine/tensorflow | dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d | [
"Apache-2.0"
] | 11 | 2018-04-19T22:36:01.000Z | 2021-08-02T08:44:43.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.975904 | 80 | 0.727433 |
69fb4de71951084d73a21c14b03adf75d5ec4e35 | 305 | py | Python | main.py | zsewa/app-template | 8fe7e66d8c09a44846a5501d6a1535bc9d185548 | [
"Apache-2.0"
] | null | null | null | main.py | zsewa/app-template | 8fe7e66d8c09a44846a5501d6a1535bc9d185548 | [
"Apache-2.0"
] | null | null | null | main.py | zsewa/app-template | 8fe7e66d8c09a44846a5501d6a1535bc9d185548 | [
"Apache-2.0"
] | null | null | null | from bottle import Bottle
from api.http_ctrl import api_server
from api.http_web import web_server
from app import app
server = Bottle()
if __name__ == '__main__':
app.register()
server.mount('/api', api_server)
server.mount('/web', web_server)
server.run(host='localhost', port=5000)
| 20.333333 | 43 | 0.721311 |
f4c303e269bc2c5237e68a7481f42ffe6226c62c | 3,103 | py | Python | life_manage/life_manage/settings.py | chengfeiZhou/Campus-cloud-life-platform | 6189e822db150fdeade931886c79a59e001d9ada | [
"MIT"
] | null | null | null | life_manage/life_manage/settings.py | chengfeiZhou/Campus-cloud-life-platform | 6189e822db150fdeade931886c79a59e001d9ada | [
"MIT"
] | 1 | 2021-03-10T22:10:08.000Z | 2021-03-10T22:10:08.000Z | life_manage/life_manage/settings.py | chengfeiZhou/Campus-cloud-life-platform | 6189e822db150fdeade931886c79a59e001d9ada | [
"MIT"
] | null | null | null | """
Django settings for life_manage project.
Generated by 'django-admin startproject' using Django 3.0.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import o... | 25.644628 | 91 | 0.69739 |
50ceae38e17c80649c10a9d6fd4323f1efc2cdbc | 7,886 | py | Python | RDT_2_1/RDT.py | poncem91/rdt2_1-rdt3_0 | 88f37934963d2252a579ccf38765152dc4641860 | [
"Apache-2.0"
] | 1 | 2020-12-09T09:53:21.000Z | 2020-12-09T09:53:21.000Z | RDT_2_1/RDT.py | poncem91/rdt2_1-rdt3_0 | 88f37934963d2252a579ccf38765152dc4641860 | [
"Apache-2.0"
] | null | null | null | RDT_2_1/RDT.py | poncem91/rdt2_1-rdt3_0 | 88f37934963d2252a579ccf38765152dc4641860 | [
"Apache-2.0"
] | 1 | 2021-11-15T10:06:21.000Z | 2021-11-15T10:06:21.000Z | import threading
import Network
import argparse
import hashlib
from time import sleep
# keeps print statements from overlapping
def print_lock(statement):
with threading.Lock():
print(statement)
class Packet:
# the number of bytes used to store packet length
seq_num_S_length = 10
length_S_le... | 38.096618 | 145 | 0.618057 |
743008d7b9995598698133239ccf65b07892a9be | 3,697 | py | Python | examples/run_sakt.py | jdxyw/deepKT | 985c67f257d56e30de89872e2c54d8c7859c9147 | [
"MIT"
] | 5 | 2021-05-19T05:05:16.000Z | 2022-03-31T02:41:14.000Z | examples/run_sakt.py | jdxyw/deepKT | 985c67f257d56e30de89872e2c54d8c7859c9147 | [
"MIT"
] | 1 | 2021-09-07T07:10:56.000Z | 2021-09-07T07:27:23.000Z | examples/run_sakt.py | jdxyw/deepKT | 985c67f257d56e30de89872e2c54d8c7859c9147 | [
"MIT"
] | 1 | 2022-03-08T07:37:53.000Z | 2022-03-08T07:37:53.000Z | import sys
sys.path.insert(0, "..")
import argparse
import torch
import torch.optim
import deepkt.utils
from deepkt.data import SAKTDataset
from deepkt.model import SAKTModel
from deepkt.loss import SAKTLoss
from torch.utils.data import DataLoader
import pandas as pd
import logging
logging.basicConfig(format='%(leve... | 38.113402 | 110 | 0.503381 |
34548047db0a4742aa01c51a0081a891ca421a93 | 30,366 | py | Python | examples/python/cvrptw_plot.py | leandromundim/or-tools | 592e4878caf1f989bb65f21c2270f82d19957370 | [
"Apache-2.0"
] | 2 | 2018-05-31T09:07:23.000Z | 2020-01-21T11:36:59.000Z | examples/python/cvrptw_plot.py | leandromundim/or-tools | 592e4878caf1f989bb65f21c2270f82d19957370 | [
"Apache-2.0"
] | null | null | null | examples/python/cvrptw_plot.py | leandromundim/or-tools | 592e4878caf1f989bb65f21c2270f82d19957370 | [
"Apache-2.0"
] | 2 | 2018-05-31T12:36:37.000Z | 2020-01-02T08:21:31.000Z | # This Python file uses the following encoding: utf-8
# Copyright 2015 Tin Arm Engineering AB
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | 40.814516 | 84 | 0.594579 |
51eac4448ea07048508752db882e075b20469407 | 16,564 | py | Python | client/env.py | FooJiaYin/carla-rl | 46abf25a57571ce8f64dfd86bd8eb6547281cf49 | [
"MIT"
] | 80 | 2019-01-30T13:14:11.000Z | 2022-02-14T08:51:01.000Z | client/env.py | renweiya/carla-rl | e3ea0df450fe9716c6f1d2e6fbaec05009fb7da8 | [
"MIT"
] | 8 | 2019-02-03T18:21:36.000Z | 2020-10-23T00:51:30.000Z | client/env.py | renweiya/carla-rl | e3ea0df450fe9716c6f1d2e6fbaec05009fb7da8 | [
"MIT"
] | 27 | 2019-03-15T08:22:19.000Z | 2022-03-20T05:37:48.000Z | import time
import os
import cv2
import skvideo.io
import numpy as np
import rewards
import experiment_suites
import carla.driving_benchmark.experiment_suites as experiment_suites_benchmark
from carla.client import VehicleControl
from carla.planner.planner import Planner
from carla.settings import CarlaSettings
from ... | 42.255102 | 120 | 0.608549 |
c5d538dfa54dd3521805b015c57b23cc35317c92 | 1,901 | py | Python | tests/requirements.py | maparent/alembic | a294f8cc3f2e5fc2cad048bc4ce27c57554e2688 | [
"MIT"
] | null | null | null | tests/requirements.py | maparent/alembic | a294f8cc3f2e5fc2cad048bc4ce27c57554e2688 | [
"MIT"
] | null | null | null | tests/requirements.py | maparent/alembic | a294f8cc3f2e5fc2cad048bc4ce27c57554e2688 | [
"MIT"
] | null | null | null | from alembic.testing.requirements import SuiteRequirements
from alembic.testing import exclusions
from alembic import util
class DefaultRequirements(SuiteRequirements):
@property
def schemas(self):
"""Target database must support external schemas, and have one
named 'test_schema'."""
... | 28.373134 | 73 | 0.654392 |
e882d02d747ed0bbacacc40d7ee92a58cec46f13 | 3,883 | py | Python | metrics/pearsonr/pearsonr.py | shirte/datasets | 16ab1566d963f521a1a3df9c41a20f599078bb2e | [
"Apache-2.0"
] | 2 | 2021-08-28T06:48:02.000Z | 2021-08-28T23:18:34.000Z | metrics/pearsonr/pearsonr.py | shirte/datasets | 16ab1566d963f521a1a3df9c41a20f599078bb2e | [
"Apache-2.0"
] | null | null | null | metrics/pearsonr/pearsonr.py | shirte/datasets | 16ab1566d963f521a1a3df9c41a20f599078bb2e | [
"Apache-2.0"
] | 4 | 2021-07-25T17:09:39.000Z | 2022-02-12T03:30:08.000Z | # coding=utf-8
# Copyright 2021 The HuggingFace Datasets Authors and the current dataset script contributor.
#
# 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/lice... | 39.222222 | 110 | 0.685295 |
4c93aae46392f14e01c7daedcc4b49bf6b719247 | 4,031 | py | Python | cryptocurrencies/script.py | szypkiwonsz/Cryptocurrency-Script | e9ec7803fd78c49a598bfb3c89c800c347d5eb34 | [
"MIT"
] | null | null | null | cryptocurrencies/script.py | szypkiwonsz/Cryptocurrency-Script | e9ec7803fd78c49a598bfb3c89c800c347d5eb34 | [
"MIT"
] | null | null | null | cryptocurrencies/script.py | szypkiwonsz/Cryptocurrency-Script | e9ec7803fd78c49a598bfb3c89c800c347d5eb34 | [
"MIT"
] | 1 | 2021-09-29T18:34:11.000Z | 2021-09-29T18:34:11.000Z | import click
from cache_handler import CacheHandler
from data_exporters import JsonExporter, CsvExporter
from data_loaders import DatabaseDataLoader
from query_handler import AveragePriceHandler, ConsecutivePriceIncreaseHandler
from utils import date_with_last_day_of_month, file_with_extension
from validators import v... | 55.219178 | 120 | 0.767303 |
88548e2a1b32f353bf3685116e96346727b4d4da | 741 | py | Python | homeassistant/components/browser.py | hcchu/home-assistant-clone | dbc91c1d48c6570764bbaa58467aa4dc87f2186b | [
"MIT"
] | 1 | 2019-05-19T01:51:57.000Z | 2019-05-19T01:51:57.000Z | homeassistant/components/browser.py | hcchu/home-assistant-clone | dbc91c1d48c6570764bbaa58467aa4dc87f2186b | [
"MIT"
] | null | null | null | homeassistant/components/browser.py | hcchu/home-assistant-clone | dbc91c1d48c6570764bbaa58467aa4dc87f2186b | [
"MIT"
] | 1 | 2022-02-12T23:56:40.000Z | 2022-02-12T23:56:40.000Z | """
homeassistant.components.browser
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Provides functionality to launch a webbrowser on the host machine.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/browser/
"""
DOMAIN = "browser"
SERVICE_BROWSE_URL = "browse_url"
... | 26.464286 | 75 | 0.588394 |
e6ab9ed706dc3a14beb2728f6cde95abdcfa7885 | 377 | py | Python | codewars/8kyu/countSheep.py | jglez/code-solutions | 92e9f8f249e238f94e01db71663eac4c82b1a0ef | [
"MIT"
] | null | null | null | codewars/8kyu/countSheep.py | jglez/code-solutions | 92e9f8f249e238f94e01db71663eac4c82b1a0ef | [
"MIT"
] | null | null | null | codewars/8kyu/countSheep.py | jglez/code-solutions | 92e9f8f249e238f94e01db71663eac4c82b1a0ef | [
"MIT"
] | null | null | null | """
If you can't sleep, just count sheep!!
Task:
Given a non-negative integer, 3 for example, return a string with a murmur: "1 sheep...2 sheep...3 sheep...".
Input will always be valid, i.e. no negative integers.
"""
def count_sheep(n):
result = ""
for num in range(1, n + 1):
result = resul... | 20.944444 | 109 | 0.591512 |
2b34a91ff45c200666a7d4db6adf98412397b41b | 1,401 | py | Python | python_matplotlib_2/python_matplotlib_2.py | Yash0411/SDL-Assignments-TE-Comp | 95e1d4214d8cc810a244da669bf0e58646bab31d | [
"MIT"
] | null | null | null | python_matplotlib_2/python_matplotlib_2.py | Yash0411/SDL-Assignments-TE-Comp | 95e1d4214d8cc810a244da669bf0e58646bab31d | [
"MIT"
] | null | null | null | python_matplotlib_2/python_matplotlib_2.py | Yash0411/SDL-Assignments-TE-Comp | 95e1d4214d8cc810a244da669bf0e58646bab31d | [
"MIT"
] | null | null | null | # TECOB220
# Yash Morankar
import csv
import matplotlib.pyplot as plt
#============== Write data into csv =================
# for Bar Plot
heading = ["Country_Name","GOLD MEDALS","SILVER MEDALS","BRONZE MEDALS"]
entry1 = ["Aus",120,60,30]
entry2 = ["Ind",110,70,40]
entry3 = ["Eng",90,60,50]
data = [heading, entry1, ... | 28.02 | 72 | 0.630978 |
60899455bf8d612cc13a4bf1f03203e8e9261876 | 434 | py | Python | env/Lib/site-packages/plotly/validators/densitymapbox/colorbar/_tickvalssrc.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | venv/Lib/site-packages/plotly/validators/densitymapbox/colorbar/_tickvalssrc.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | venv/Lib/site-packages/plotly/validators/densitymapbox/colorbar/_tickvalssrc.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import _plotly_utils.basevalidators
class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="tickvalssrc", parent_name="densitymapbox.colorbar", **kwargs
):
super(TickvalssrcValidator, self).__init__(
plotly_name=plotly_name,
... | 31 | 87 | 0.668203 |
7c22519174c2da49bbaff229d6765cf49a141014 | 3,198 | py | Python | tests/test_builder_security_schemes.py | tabebqena/flask-open-spec | ee1fd9cd349e46e1d8295fc2799898731392af6a | [
"MIT"
] | null | null | null | tests/test_builder_security_schemes.py | tabebqena/flask-open-spec | ee1fd9cd349e46e1d8295fc2799898731392af6a | [
"MIT"
] | null | null | null | tests/test_builder_security_schemes.py | tabebqena/flask-open-spec | ee1fd9cd349e46e1d8295fc2799898731392af6a | [
"MIT"
] | null | null | null | from ..open_oas.builder.builder import OasBuilder
from unittest import TestCase
from ..open_oas.decorators import (
Deferred,
api_key_security_schema,
api_basic_security_scheme,
api_bearer_security_scheme,
)
class TestData(TestCase):
basic_auth_data = {
"components": {
"securit... | 30.75 | 80 | 0.542527 |
66c5269f8cb4c125a570477b312256bd2e2dfdf6 | 320 | py | Python | src/kbpo/params/db/local_kbpo.py | arunchaganty/kbp-online | 9f8763d8f4bfb1fb8a01f1f4f506f56625dd38d8 | [
"MIT"
] | 4 | 2017-08-09T14:05:48.000Z | 2018-12-25T01:34:23.000Z | src/kbpo/params/db/local_kbpo.py | arunchaganty/kbp-online | 9f8763d8f4bfb1fb8a01f1f4f506f56625dd38d8 | [
"MIT"
] | 12 | 2017-01-19T23:18:18.000Z | 2018-12-23T18:57:54.000Z | src/kbpo/params/db/local_kbpo.py | arunchaganty/kbp-online | 9f8763d8f4bfb1fb8a01f1f4f506f56625dd38d8 | [
"MIT"
] | 2 | 2017-08-08T09:48:20.000Z | 2018-07-09T09:12:43.000Z | # File wide connection.
"""
Database connection parameters for kbpo database
"""
from psycopg2.extras import NamedTupleCursor
_PARAMS = {
'dbname':'kbpo',
'user':'kbpo',
'password':'kbpo',
'host':'localhost',
'port': 5432,
'cursor_factory': NamedTupleCursor,
'application_name': 'kbpo'
}
| 21.333333 | 48 | 0.653125 |
b981e9f2e8d98f31743174c4121fda4baa9a1d63 | 1,951 | py | Python | tools/doc_tester_reader.py | loveululu/Serving | 3a64af45b87f5a8a75ecd20059423d320849295d | [
"Apache-2.0"
] | 789 | 2019-04-05T09:20:46.000Z | 2022-03-31T13:43:54.000Z | tools/doc_tester_reader.py | loveululu/Serving | 3a64af45b87f5a8a75ecd20059423d320849295d | [
"Apache-2.0"
] | 1,195 | 2019-04-08T10:05:28.000Z | 2022-03-31T03:43:42.000Z | tools/doc_tester_reader.py | loveululu/Serving | 3a64af45b87f5a8a75ecd20059423d320849295d | [
"Apache-2.0"
] | 229 | 2019-04-05T09:20:57.000Z | 2022-03-30T06:21:22.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 27.478873 | 82 | 0.587904 |
af7d03373810bdac974f461098682f26a9c20e62 | 11,583 | py | Python | tests/test_printer_neid.py | jimregan/pygramadan | f5ea7771a0bed8559ea35c8d5fc4f3c0786caf2e | [
"MIT"
] | null | null | null | tests/test_printer_neid.py | jimregan/pygramadan | f5ea7771a0bed8559ea35c8d5fc4f3c0786caf2e | [
"MIT"
] | 1 | 2021-08-15T12:43:07.000Z | 2021-08-15T12:43:07.000Z | tests/test_printer_neid.py | jimregan/pygramadan | f5ea7771a0bed8559ea35c8d5fc4f3c0786caf2e | [
"MIT"
] | 1 | 2021-08-19T18:20:46.000Z | 2021-08-19T18:20:46.000Z | from pygramadan.preposition import Preposition
from .test_adjective import make_beag
from .test_noun import make_ainm
from .test_noun_phrase import FEAR_POIST_XML
from .test_preposition import LE_XML, make_le
from .test_verb import AIMSIGH_XML_FULL, Verb
from pygramadan.printer_neid import PrinterNeid
from pygramadan.n... | 23.494929 | 69 | 0.648882 |
32d0713a88139b28d54ed2332f1ac55a353714e3 | 1,148 | py | Python | test_scrapy/test_scrapy/test.py | lijie28/python_demo | bb9ca737eae28ac655a4030f5f110545cf3ed815 | [
"Apache-2.0"
] | null | null | null | test_scrapy/test_scrapy/test.py | lijie28/python_demo | bb9ca737eae28ac655a4030f5f110545cf3ed815 | [
"Apache-2.0"
] | null | null | null | test_scrapy/test_scrapy/test.py | lijie28/python_demo | bb9ca737eae28ac655a4030f5f110545cf3ed815 | [
"Apache-2.0"
] | null | null | null | #coding=utf-8
import requests
from lxml import etree
url = 'http://weibo.cn/fishli28' #此处请修改为微博地址
url_login = 'https://login.weibo.cn/login/'
html = requests.get(url_login).content
selector = etree.HTML(html)
password = selector.xpath('//input[@type="password"]/@name')[0]
vk = selector.xpath('//input[@name="vk"]/@v... | 23.428571 | 68 | 0.649826 |
541d87ed5ead46299273a3810a9b1e76c3ef33c8 | 1,210 | py | Python | skyportal/services/gcn_service/gcn_service.py | bparazin/skyportal | c160610ca0cc28eef9f36c2d11cc15bd9bcbfe56 | [
"BSD-3-Clause"
] | 52 | 2018-11-02T00:53:21.000Z | 2022-03-08T16:03:52.000Z | skyportal/services/gcn_service/gcn_service.py | bparazin/skyportal | c160610ca0cc28eef9f36c2d11cc15bd9bcbfe56 | [
"BSD-3-Clause"
] | 1,944 | 2017-04-27T18:51:20.000Z | 2022-03-31T20:17:44.000Z | skyportal/services/gcn_service/gcn_service.py | bparazin/skyportal | c160610ca0cc28eef9f36c2d11cc15bd9bcbfe56 | [
"BSD-3-Clause"
] | 63 | 2017-05-13T01:40:47.000Z | 2022-03-12T11:32:11.000Z | import yaml
import gcn
from baselayer.log import make_log
from skyportal.tests import api
def get_token():
try:
token = yaml.load(open('.tokens.yaml'), Loader=yaml.Loader)['INITIAL_ADMIN']
print('Token loaded from `.tokens.yaml`')
return token
except (FileNotFoundError, TypeError, K... | 25.208333 | 87 | 0.716529 |
9be3afabc9f3eecc3feb44a51504f9e42ed84f47 | 4,464 | py | Python | homeassistant/components/worxlandroid/sensor.py | paranoidmonoid/core | c4f98a3084f2648749d3e4eeeade9696630d9abd | [
"Apache-2.0"
] | 1 | 2021-03-23T07:20:03.000Z | 2021-03-23T07:20:03.000Z | homeassistant/components/worxlandroid/sensor.py | paranoidmonoid/core | c4f98a3084f2648749d3e4eeeade9696630d9abd | [
"Apache-2.0"
] | 19 | 2021-08-18T06:16:06.000Z | 2022-03-31T06:17:46.000Z | homeassistant/components/worxlandroid/sensor.py | mkrzywie/core | 0503b14fbe5a50bc725a22bcaf40167445689dc8 | [
"Apache-2.0"
] | null | null | null | """Support for Worx Landroid mower."""
import asyncio
import logging
import aiohttp
import async_timeout
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
from homeassistant.const import CONF_HOST, CONF_PIN, CONF_TIMEOUT, PERCENTAGE
from homeassistant.helpers.aiohttp_c... | 30.367347 | 86 | 0.615815 |
7f3fe9efb27000d887c33d32379c7cbcdedbbd6e | 2,146 | py | Python | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/targets/options.py | BadDevCode/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/targets/options.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/targets/options.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | """
Target Options
"""
from __future__ import print_function, division, absolute_import
from .. import config
class TargetOptions(object):
OPTIONS = {}
def __init__(self):
self.values = {}
def from_dict(self, dic):
for k, v in dic.items():
try:
ctor = self.OPT... | 25.855422 | 68 | 0.541007 |
f33846450be5828c0cd5eb7219332b6bd8bd9d90 | 75 | py | Python | Harvard's CS50/string.py | RichelleT/Python | 87aff2392964ca5630ffa44225f9e13d040cdd91 | [
"MIT"
] | 1 | 2019-03-04T05:43:35.000Z | 2019-03-04T05:43:35.000Z | Harvard's CS50/string.py | RichelleT/Python | 87aff2392964ca5630ffa44225f9e13d040cdd91 | [
"MIT"
] | null | null | null | Harvard's CS50/string.py | RichelleT/Python | 87aff2392964ca5630ffa44225f9e13d040cdd91 | [
"MIT"
] | null | null | null | from cs50 import get_string
s = get_string("Name: ")
print(s, ", hello!") | 18.75 | 28 | 0.666667 |
8f0a33883a04d36a0c10cd16887e58bc91da90a7 | 5,380 | py | Python | src/test/tinc/tincrepo/functions/builtin/__init__.py | khuddlefish/gpdb | 2d20bae838c5ed433eecf6ecceca1b8dd5221197 | [
"PostgreSQL",
"Apache-2.0"
] | 1 | 2017-09-15T06:09:56.000Z | 2017-09-15T06:09:56.000Z | src/test/tinc/tincrepo/functions/builtin/__init__.py | guofengrichard/gpdb | 29bdd6ef38d8d9b9cb04ca31d44e279eb9f640d3 | [
"PostgreSQL",
"Apache-2.0"
] | 6 | 2018-08-04T07:51:37.000Z | 2018-11-26T07:09:44.000Z | src/test/tinc/tincrepo/functions/builtin/__init__.py | guofengrichard/gpdb | 29bdd6ef38d8d9b9cb04ca31d44e279eb9f640d3 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | import os
import sys
import datetime
import math
import tinctest
import re
from time import gmtime, strftime
import unittest2 as unittest
from fnmatch import fnmatch
from tinctest.runner import TINCTextTestResult
from tinctest.lib import run_shell_command, Gpdiff
from mpp.lib.PSQL import PSQL
from mpp.models import ... | 53.267327 | 417 | 0.610409 |
665cdbf781ecf22ec0f72ddd1e1de286ab2572ae | 10,025 | py | Python | erpbg/erpbg/pyimagesearch/__init__.py | InspireSoft/erpbg | 6da33242dc5b6a52e19cd6c17af2262dd33b6b41 | [
"MIT"
] | null | null | null | erpbg/erpbg/pyimagesearch/__init__.py | InspireSoft/erpbg | 6da33242dc5b6a52e19cd6c17af2262dd33b6b41 | [
"MIT"
] | null | null | null | erpbg/erpbg/pyimagesearch/__init__.py | InspireSoft/erpbg | 6da33242dc5b6a52e19cd6c17af2262dd33b6b41 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import frappe
import sys
# sys.path.append('/home/dev1/opencv/lib/')
sys.path.append('/usr/local/lib/python2.7/site-packages')
# sys.path.append('/home/frappe/frappe-bench-dimela/env/lib/python2.7/site-packages')
import numpy as np
import cv2
import csv
import glob
import ... | 37.406716 | 165 | 0.580948 |
15e2a82209083e979b5cdee3f1b80d24da21d6a9 | 2,509 | py | Python | PLM/api/__init__.py | vtta2008/pipelineTool | 2431d2fc987e3b31f2a6a63427fee456fa0765a0 | [
"Apache-2.0"
] | 7 | 2020-10-11T21:21:50.000Z | 2022-03-07T03:37:51.000Z | PLM/api/__init__.py | vtta2008/pipelineTool | 2431d2fc987e3b31f2a6a63427fee456fa0765a0 | [
"Apache-2.0"
] | null | null | null | PLM/api/__init__.py | vtta2008/pipelineTool | 2431d2fc987e3b31f2a6a63427fee456fa0765a0 | [
"Apache-2.0"
] | 3 | 2019-03-11T21:54:52.000Z | 2019-11-25T11:23:17.000Z | # -*- coding: utf-8 -*-
"""
Script Name: api.__init__
Author: Do Trinh/Jimmy - 3D artist.
Description:
API is the acronym for Application Programming Interface, which is a software intermediary that allows two
applications to talk to each other. Each time you use an app like Facebook, send an instant message... | 48.25 | 122 | 0.676764 |
9b6aecfe60c2293aecdb496397e6b50c7a4c4424 | 377 | py | Python | python/samples/coarse/example3.py | NVIDIA/cuQuantum | 0f00494d4639d760228ac002e83e6d2d3dd97eca | [
"BSD-3-Clause"
] | 52 | 2021-12-04T20:39:12.000Z | 2022-03-29T11:52:55.000Z | python/samples/coarse/example3.py | NVIDIA/cuQuantum | 0f00494d4639d760228ac002e83e6d2d3dd97eca | [
"BSD-3-Clause"
] | 3 | 2022-02-01T22:46:50.000Z | 2022-03-24T01:52:29.000Z | python/samples/coarse/example3.py | NVIDIA/cuQuantum | 0f00494d4639d760228ac002e83e6d2d3dd97eca | [
"BSD-3-Clause"
] | 18 | 2021-12-20T17:52:07.000Z | 2022-03-29T02:27:58.000Z | # Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES
#
# SPDX-License-Identifier: BSD-3-Clause
"""
Example using NumPy ndarrays with explicit Einstein summation (Unicode characters).
The contraction result is also a NumPy ndarray.
"""
import numpy as np
from cuquantum import contract
a = np.ones((3,2))
b = n... | 17.952381 | 83 | 0.713528 |
68b470a3a7d9adfc5ec48647d6a6e899b63d8b5d | 139,789 | py | Python | tools/buildman/kconfiglib.py | shell832/QBoot | f5b5169b7463670cb24d223e1c374da33d3d4457 | [
"Unlicense"
] | 4 | 2018-09-28T04:33:26.000Z | 2021-03-10T06:29:55.000Z | tools/buildman/kconfiglib.py | shell832/QBoot | f5b5169b7463670cb24d223e1c374da33d3d4457 | [
"Unlicense"
] | 4 | 2016-08-30T11:30:25.000Z | 2020-12-27T09:58:07.000Z | BBB-firmware/u-boot-v2018.05-rc2/tools/buildman/kconfiglib.py | guileschool/BEAGLEBONE-tutorials | eecd83e0c14941b05ad38eeb77e5a50602cc29ca | [
"MIT"
] | 2 | 2016-12-30T08:02:57.000Z | 2020-05-16T05:59:30.000Z | #
# SPDX-License-Identifier: ISC
#
# Author: Ulf Magnusson
# https://github.com/ulfalizer/Kconfiglib
# This is Kconfiglib, a Python library for scripting, debugging, and extracting
# information from Kconfig-based configuration systems. To view the
# documentation, run
#
# $ pydoc kconfiglib
#
# or, if you prefer H... | 39.421602 | 96 | 0.567548 |
9df18046c0a23da812371eee29ff9d9ea313d52b | 1,205 | py | Python | qiskit/algorithms/optimizers/nlopts/direct_l_rand.py | ajavadia/qiskit-sdk-py | a59e8e6be1793197e19998c1f7dcfc45e6f2f3af | [
"Apache-2.0"
] | 504 | 2018-12-15T16:34:03.000Z | 2022-03-26T11:24:53.000Z | qiskit/algorithms/optimizers/nlopts/direct_l_rand.py | ajavadia/qiskit-sdk-py | a59e8e6be1793197e19998c1f7dcfc45e6f2f3af | [
"Apache-2.0"
] | 746 | 2018-12-16T16:44:42.000Z | 2021-07-10T16:59:43.000Z | qiskit/algorithms/optimizers/nlopts/direct_l_rand.py | ajavadia/qiskit-sdk-py | a59e8e6be1793197e19998c1f7dcfc45e6f2f3af | [
"Apache-2.0"
] | 421 | 2018-12-22T14:49:00.000Z | 2022-03-04T09:47:07.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 36.515152 | 96 | 0.749378 |
91278701b30f90afbdb3cebbb0929460b7b3107c | 969 | py | Python | 13_email/start_13_blue_yellow_app_email/blue_yellow_app/data/dbsession.py | g2gcio/course-demo | b0d00a6ac7a6a6a17af963cee67cf13dc5941e95 | [
"MIT"
] | 276 | 2016-04-04T20:57:36.000Z | 2022-03-12T02:42:46.000Z | 13_email/start_13_blue_yellow_app_email/blue_yellow_app/data/dbsession.py | g2gcio/course-demo | b0d00a6ac7a6a6a17af963cee67cf13dc5941e95 | [
"MIT"
] | 37 | 2016-10-13T12:04:27.000Z | 2020-11-22T10:36:53.000Z | 13_email/start_13_blue_yellow_app_email/blue_yellow_app/data/dbsession.py | g2gcio/course-demo | b0d00a6ac7a6a6a17af963cee67cf13dc5941e95 | [
"MIT"
] | 163 | 2016-10-03T02:10:00.000Z | 2022-03-25T03:43:01.000Z | import sqlalchemy
import sqlalchemy.orm
from blue_yellow_app.data.modelbase import SqlAlchemyBase
# noinspection PyUnresolvedReferences
import blue_yellow_app.data.album
# noinspection PyUnresolvedReferences
import blue_yellow_app.data.track
# noinspection PyUnresolvedReferences
import blue_yellow_app.data.account
cl... | 29.363636 | 75 | 0.733746 |
6999c7ebe74967fa901c5e77ba269f218d6c8348 | 4,494 | py | Python | nova/monkey_patch.py | Nexenta/nova | ccecb507ff4bdcdd23d90e7b5b02a22c5a46ecc3 | [
"Apache-2.0"
] | 1 | 2020-08-14T02:20:59.000Z | 2020-08-14T02:20:59.000Z | nova/monkey_patch.py | Nexenta/nova | ccecb507ff4bdcdd23d90e7b5b02a22c5a46ecc3 | [
"Apache-2.0"
] | 2 | 2021-03-31T20:04:16.000Z | 2021-12-13T20:45:03.000Z | nova/monkey_patch.py | Nexenta/nova | ccecb507ff4bdcdd23d90e7b5b02a22c5a46ecc3 | [
"Apache-2.0"
] | 1 | 2020-07-24T02:31:45.000Z | 2020-07-24T02:31:45.000Z | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use th... | 45.857143 | 79 | 0.70761 |
dc2261f57c6d7e3c393dc1d171e4ff58a7ef9811 | 34,568 | py | Python | ub/modules/person.py | parv779/javes-3.0 | d510717b2756a65b39ff18d9f53d4adc46d8e23f | [
"MIT"
] | 15 | 2020-12-13T17:37:05.000Z | 2021-06-23T00:00:49.000Z | ub/modules/person.py | parv779/javes-3.0 | d510717b2756a65b39ff18d9f53d4adc46d8e23f | [
"MIT"
] | 2 | 2021-01-11T16:39:31.000Z | 2021-01-25T22:35:28.000Z | ub/modules/person.py | parv779/javes-3.0 | d510717b2756a65b39ff18d9f53d4adc46d8e23f | [
"MIT"
] | 78 | 2020-12-13T17:52:51.000Z | 2022-03-24T03:43:09.000Z | from telethon.tl.functions.contacts import BlockRequest, UnblockRequest
from telethon.tl.functions.messages import ReportSpamRequest
from telethon.tl.types import User
import datetime, asyncio, os, json, subprocess, time, math, sys, pytz, spamwatch, os, asyncio, html
from asyncio import sleep
from telethon.errors.rpcer... | 37.533116 | 163 | 0.577123 |
238d41c0c7e607687c868d294cf828491a76d905 | 7,016 | py | Python | mockaioredis/pool.py | adsko/mockaioredis | ebc5fd2f1c56402293bb5bfee50bf3c4a4e2c349 | [
"Apache-2.0"
] | 13 | 2017-06-22T16:58:51.000Z | 2022-01-23T08:07:54.000Z | mockaioredis/pool.py | adsko/mockaioredis | ebc5fd2f1c56402293bb5bfee50bf3c4a4e2c349 | [
"Apache-2.0"
] | 12 | 2018-01-11T16:24:05.000Z | 2021-08-12T07:42:29.000Z | mockaioredis/pool.py | adsko/mockaioredis | ebc5fd2f1c56402293bb5bfee50bf3c4a4e2c349 | [
"Apache-2.0"
] | 18 | 2017-06-21T12:27:54.000Z | 2021-08-16T09:24:48.000Z | 'Fake aioredis.RedisPool and related functions'
import asyncio
import collections
import sys
import warnings
from .commands import MockRedis, create_redis
from .util import _NOTSET
async def create_pool(address, *, db=0, password=None, ssl=None, encoding=None,
minsize=1, maxsize=10, commands_fa... | 30.504348 | 82 | 0.563712 |
2cfaefaae87aba2a96956f7adc0721bcee84df6d | 6,066 | py | Python | nodux_party/customer.py | tatiqm25/nodux_party | dcd27e7004dbde7cfb9cddd19f267a727ed18052 | [
"MIT"
] | null | null | null | nodux_party/customer.py | tatiqm25/nodux_party | dcd27e7004dbde7cfb9cddd19f267a727ed18052 | [
"MIT"
] | null | null | null | nodux_party/customer.py | tatiqm25/nodux_party | dcd27e7004dbde7cfb9cddd19f267a727ed18052 | [
"MIT"
] | null | null | null | def validate(doc, method):
remove_spaces(doc)
create_supplier(doc)
validate_email(doc)
if doc.tax_id:
tax_id = doc.tax_id.replace(".", "").replace(" ", "")
if doc.type_document == "":
pass
elif doc.type_document == "Pasaporte":
pass
elif doc.type_document == "RUC":
compute_check_digit(doc, tax_id)
... | 27.953917 | 92 | 0.659578 |
0e7c7d652e85a0ab0247a971dd71bc310ce6e2d2 | 16,272 | py | Python | examples/real/variants.py | charlesjsun/ReLMM | b63cd69f5b4d5fddc5988a9478632a171ceef59a | [
"MIT"
] | 3 | 2021-12-04T08:41:46.000Z | 2022-03-28T11:12:36.000Z | examples/real/variants.py | charlesjsun/ReLMM | b63cd69f5b4d5fddc5988a9478632a171ceef59a | [
"MIT"
] | null | null | null | examples/real/variants.py | charlesjsun/ReLMM | b63cd69f5b4d5fddc5988a9478632a171ceef59a | [
"MIT"
] | null | null | null |
from copy import deepcopy
from ray import tune
import numpy as np
from softlearning.utils.git import get_git_rev
from softlearning.utils.misc import get_host_name
from softlearning.utils.dict import deep_update
DEFAULT_KEY = "__DEFAULT_KEY__"
M = 512
ALGORITHM_PARAMS_BASE = {
'config': {
'train_every_... | 30.994286 | 151 | 0.525688 |
0e64314ae7c92d134e0c6cae56fe273e27bb6961 | 819 | py | Python | expfactory/views/oci.py | YanivD/expfactory | a34ba21016ef01a44998764935be20ec99fdd0a8 | [
"BSD-3-Clause"
] | null | null | null | expfactory/views/oci.py | YanivD/expfactory | a34ba21016ef01a44998764935be20ec99fdd0a8 | [
"BSD-3-Clause"
] | null | null | null | expfactory/views/oci.py | YanivD/expfactory | a34ba21016ef01a44998764935be20ec99fdd0a8 | [
"BSD-3-Clause"
] | null | null | null | from expfactory.logger import bot
from flask import (
Blueprint,
render_template,
)
from expfactory.views.utils import (
perform_checks,
clear_session
)
from expfactory.server import app, csrf
import os
oci = Blueprint('oci', __name__,
static_url_path='/experiments/oci'... | 28.241379 | 73 | 0.554335 |
08f31a312398cd89d16f181bd3ea35840c30a834 | 98 | py | Python | backend/pai_messages/apps.py | projectpai/paipass | 8b8e70b6808bf026cf957e240c7eed7bfcf4c55d | [
"MIT"
] | 3 | 2021-04-17T10:20:26.000Z | 2022-03-08T07:36:13.000Z | backend/pai_messages/apps.py | projectpai/paipass | 8b8e70b6808bf026cf957e240c7eed7bfcf4c55d | [
"MIT"
] | null | null | null | backend/pai_messages/apps.py | projectpai/paipass | 8b8e70b6808bf026cf957e240c7eed7bfcf4c55d | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class PaiMessagesConfig(AppConfig):
name = 'pai_messages'
| 16.333333 | 35 | 0.77551 |
1c641ee0ad0f7b818faedde471c34560551f7c6e | 7,961 | py | Python | electrum/plugins/cosigner_pool/proto/cosignerpool_pb2_grpc.py | exofoundation/EXOS-Electrum | 89e00bc4a1c5f5cb48f9aa5ef77dd1a9bcad9da5 | [
"MIT"
] | 5 | 2019-05-15T16:11:21.000Z | 2021-02-20T14:12:20.000Z | electrum/plugins/cosigner_pool/proto/cosignerpool_pb2_grpc.py | exofoundation/EXOS-Electrum | 89e00bc4a1c5f5cb48f9aa5ef77dd1a9bcad9da5 | [
"MIT"
] | 38 | 2019-04-29T21:15:22.000Z | 2021-12-04T18:36:28.000Z | electrum/plugins/cosigner_pool/proto/cosignerpool_pb2_grpc.py | exofoundation/EXOS-Electrum | 89e00bc4a1c5f5cb48f9aa5ef77dd1a9bcad9da5 | [
"MIT"
] | 5 | 2019-04-25T17:35:49.000Z | 2021-08-12T19:50:41.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from . import cosignerpool_pb2 as cosignerpool__pb2
class CosignerpoolStub(object):
"""The greeting service definition.
"""
def __init__(self, cha... | 39.410891 | 99 | 0.636855 |
1dbd0d35dc7480aeb05f1104b77e6764c5d7b933 | 2,632 | py | Python | pgoapi/protos/pogoprotos/settings/notification_settings_pb2.py | linherest/pgoapi | e3bdce71b06c099663e9796c8df166883059edd9 | [
"MIT"
] | 14 | 2017-03-28T16:32:24.000Z | 2021-03-13T23:03:57.000Z | pgoapi/protos/pogoprotos/settings/notification_settings_pb2.py | linherest/pgoapi | e3bdce71b06c099663e9796c8df166883059edd9 | [
"MIT"
] | 8 | 2017-03-01T07:56:09.000Z | 2017-08-15T07:37:12.000Z | pgoapi/protos/pogoprotos/settings/notification_settings_pb2.py | linherest/pgoapi | e3bdce71b06c099663e9796c8df166883059edd9 | [
"MIT"
] | 15 | 2017-02-24T01:30:23.000Z | 2021-06-27T08:46:43.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pogoprotos/settings/notification_settings.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.pr... | 34.181818 | 242 | 0.783435 |
5ae602c1cdcf5d91895a6b1d48a460908012dfc3 | 2,800 | py | Python | cirq-google/cirq_google/json_test_data/spec.py | pavoljuhas/Cirq | b6d6577be61d216ce2f29f8c64ae5879cf3087d5 | [
"Apache-2.0"
] | 1 | 2022-02-05T22:17:39.000Z | 2022-02-05T22:17:39.000Z | cirq-google/cirq_google/json_test_data/spec.py | pavoljuhas/Cirq | b6d6577be61d216ce2f29f8c64ae5879cf3087d5 | [
"Apache-2.0"
] | null | null | null | cirq-google/cirq_google/json_test_data/spec.py | pavoljuhas/Cirq | b6d6577be61d216ce2f29f8c64ae5879cf3087d5 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=wrong-or-nonexistent-copyright-notice
import pathlib
import cirq_google
from cirq.testing.json import ModuleJsonTestSpec
from cirq_google.json_resolver_cache import _class_resolver_dictionary
TestSpec = ModuleJsonTestSpec(
name="cirq_google",
packages=[cirq_google, cirq_google.experimental],... | 31.111111 | 70 | 0.628929 |
d3e08add2a7b9634b81871ab5cb3fd920434ec28 | 6,110 | py | Python | api/user.py | whexy/CS307-12306 | cd1e4fac92d10b6a7331d6746e6790c06f19ea77 | [
"MIT"
] | 1 | 2021-03-23T12:58:10.000Z | 2021-03-23T12:58:10.000Z | api/user.py | whexy/CS307-12306 | cd1e4fac92d10b6a7331d6746e6790c06f19ea77 | [
"MIT"
] | null | null | null | api/user.py | whexy/CS307-12306 | cd1e4fac92d10b6a7331d6746e6790c06f19ea77 | [
"MIT"
] | 1 | 2020-05-23T01:19:22.000Z | 2020-05-23T01:19:22.000Z | import datetime
from flask import request, jsonify
from flask_jwt_extended import create_access_token, jwt_required, get_jwt_identity
from flask_restful import Resource
from model.Database import DBSession
from model.models import User
class SignupApi(Resource):
"""
API class for user sign-up
"""
de... | 34.519774 | 101 | 0.551882 |
421afe949e2801092af06912a1104baaaf71e649 | 785 | py | Python | custom_models.py | patra/whoops | c2dcf379dd20bbb0a46a6b46b59c4ad73e626df9 | [
"MIT"
] | null | null | null | custom_models.py | patra/whoops | c2dcf379dd20bbb0a46a6b46b59c4ad73e626df9 | [
"MIT"
] | null | null | null | custom_models.py | patra/whoops | c2dcf379dd20bbb0a46a6b46b59c4ad73e626df9 | [
"MIT"
] | null | null | null | from psiturk.db import Base, db_session, init_db
from sqlalchemy import or_, Column, Integer, String, DateTime, Boolean, Float, Text, ForeignKey
from sqlalchemy.orm import relationship, backref
import shortuuid
class LegitWorker(Base):
"""
DB for tracking workers who need compensation
"""
__tablename__ = 'legit_w... | 25.322581 | 95 | 0.743949 |
6ec2861da824cecb3e346776aa4d1b1e93a92526 | 25,330 | py | Python | services/email_crm/service.py | adelaideX/optimus_ingestor | 97f46e1fa730bb9b853e17b3b34874b487ba7739 | [
"MIT"
] | null | null | null | services/email_crm/service.py | adelaideX/optimus_ingestor | 97f46e1fa730bb9b853e17b3b34874b487ba7739 | [
"MIT"
] | null | null | null | services/email_crm/service.py | adelaideX/optimus_ingestor | 97f46e1fa730bb9b853e17b3b34874b487ba7739 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
Service for importing the email extract from edx
"""
import glob
import json
import os
import time
import urllib2
import warnings
import zipfile
from datetime import datetime
import MySQLdb
import unicodecsv as csv
import base_service
import config
import utils
class EmailCRM(base_service.BaseSer... | 40.142631 | 234 | 0.535334 |
84392746199508392bef8bd22bc64e6a8c8b3a5d | 3,539 | py | Python | salt/utils/slack.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 2 | 2016-11-14T15:08:53.000Z | 2016-11-20T09:25:30.000Z | salt/utils/slack.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 3 | 2021-03-31T19:53:24.000Z | 2021-12-13T20:46:19.000Z | salt/utils/slack.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 2 | 2020-11-04T06:32:02.000Z | 2020-11-06T11:01:18.000Z | # -*- coding: utf-8 -*-
"""
Library for interacting with Slack API
.. versionadded:: 2016.3.0
:configuration: This module can be used by specifying the name of a
configuration profile in the minion config, minion pillar, or master
config.
For example:
.. code-block:: yaml
slack:
a... | 27.648438 | 84 | 0.594236 |
20bd4c54f9895d1d6f4fd5346354b9be082ad49a | 94 | py | Python | telethon/version.py | islam-200555/Telethon | 85103bcf6de8024c902ede98f0b9bf0f7f47a0aa | [
"MIT"
] | 2 | 2021-01-06T12:49:49.000Z | 2021-04-23T16:32:13.000Z | telethon/version.py | islam-200555/Telethon | 85103bcf6de8024c902ede98f0b9bf0f7f47a0aa | [
"MIT"
] | null | null | null | telethon/version.py | islam-200555/Telethon | 85103bcf6de8024c902ede98f0b9bf0f7f47a0aa | [
"MIT"
] | null | null | null | # Versions should comply with PEP440.
# This line is parsed in setup.py:
__version__ = '0.19'
| 23.5 | 37 | 0.734043 |
f42c93663a644edd8df6eea468d42bc17365f5f7 | 373 | py | Python | src/posts/migrations/0002_post_featured.py | PeterKim321/DjangoFoodBlog | 7a0a63a8fd8eaf4bb18945b655f3115fa7b4a580 | [
"Apache-2.0"
] | null | null | null | src/posts/migrations/0002_post_featured.py | PeterKim321/DjangoFoodBlog | 7a0a63a8fd8eaf4bb18945b655f3115fa7b4a580 | [
"Apache-2.0"
] | null | null | null | src/posts/migrations/0002_post_featured.py | PeterKim321/DjangoFoodBlog | 7a0a63a8fd8eaf4bb18945b655f3115fa7b4a580 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.4 on 2020-12-11 16:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('posts', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='post',
name='featured',
field... | 19.631579 | 52 | 0.58445 |
556c3f8cd87e609b32203a82e605b3ea0af31a3e | 359 | py | Python | week1/the_real_deal/zero_insert_test.py | sevgo/Programming101 | ac25c4d9695563b449a629c60ec77a739c9f5be3 | [
"BSD-3-Clause"
] | null | null | null | week1/the_real_deal/zero_insert_test.py | sevgo/Programming101 | ac25c4d9695563b449a629c60ec77a739c9f5be3 | [
"BSD-3-Clause"
] | 1 | 2021-09-16T05:44:31.000Z | 2021-09-16T05:44:31.000Z | week1/the_real_deal/zero_insert_test.py | sevgo/Programming101 | ac25c4d9695563b449a629c60ec77a739c9f5be3 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import unittest
from zero_insert import zero_insert
class Test_zero_insert(unittest.TestCase):
def test_zero_insert_type(self):
self.assertIsInstance(zero_insert(116457), int)
def test_zeroo_insert_result(self):
self.assertTrue(6040406 == zero_insert(6446))
if __nam... | 19.944444 | 55 | 0.735376 |
de2a423ba03a55eeefd6a74201b7ea2e168fce57 | 1,073 | py | Python | from_python_community/hidecard.py | ZaytsevNS/python_practice | 109e14923a2ddeacc5360fd72947275afd2159e3 | [
"MIT"
] | null | null | null | from_python_community/hidecard.py | ZaytsevNS/python_practice | 109e14923a2ddeacc5360fd72947275afd2159e3 | [
"MIT"
] | null | null | null | from_python_community/hidecard.py | ZaytsevNS/python_practice | 109e14923a2ddeacc5360fd72947275afd2159e3 | [
"MIT"
] | null | null | null | # Условие:
# На вход идёт строка с номером карты. Она может иметь внутри себя пробелы, что функция и должна предусматривать. Результат — 12 символов * и 4 последних символа от входной строки.
# Пример:
# hidecard("3459 0054 1234 6674") → ************6674
# hidecard("1234567890987654") → ************7654
import unit... | 30.657143 | 180 | 0.598322 |
c05da427fa0dcacdfbd913e6140b89cdfea6fa80 | 1,729 | py | Python | tests/directives/test_autocenum.py | speedyleion/sphinx-c-doc | 65721f7164a463742bc2d0b18a92b2d633a5eb3a | [
"MIT",
"Unlicense"
] | 7 | 2020-06-06T06:47:31.000Z | 2021-12-12T14:18:08.000Z | tests/directives/test_autocenum.py | speedyleion/sphinx-c-doc | 65721f7164a463742bc2d0b18a92b2d633a5eb3a | [
"MIT",
"Unlicense"
] | 15 | 2020-03-12T01:43:24.000Z | 2021-04-21T06:45:13.000Z | tests/directives/test_autocenum.py | speedyleion/sphinx-c-doc | 65721f7164a463742bc2d0b18a92b2d633a5eb3a | [
"MIT",
"Unlicense"
] | 1 | 2021-08-05T20:23:01.000Z | 2021-08-05T20:23:01.000Z | """
Test the parsing of c enum objects
"""
from textwrap import dedent
import pytest
from sphinx.ext.autodoc.directive import AutodocDirective
class TestAutoCEnum:
"""
Testing class for the autocenum directive for use in enums
"""
some_enum = """\
enum some_enum
If you want to docum... | 27.444444 | 150 | 0.61365 |
2522f031908317871ec2d2e4adb091aa00029acc | 596 | py | Python | apps/accounts/urls.py | pinkerltm/datacube-ui | 325d404a994d49c23922e7de10c7ab244b78500b | [
"Apache-2.0"
] | 1 | 2019-07-22T05:24:40.000Z | 2019-07-22T05:24:40.000Z | apps/accounts/urls.py | SivaramakrishnanKN/NE-GeoCloud | affcae49e0ccd7d29360a2771a9517147ed56590 | [
"Apache-2.0"
] | 1 | 2019-06-06T18:31:29.000Z | 2019-06-06T18:31:29.000Z | apps/accounts/urls.py | SivaramakrishnanKN/NE-GeoCloud | affcae49e0ccd7d29360a2771a9517147ed56590 | [
"Apache-2.0"
] | 5 | 2019-06-05T07:26:13.000Z | 2019-06-08T06:53:11.000Z | from django.conf.urls import url, include
from django.contrib import admin
from django.conf import settings
from . import views
urlpatterns = [
url(r'^registration', views.registration, name='registration'),
url(r'^(?P<uuid>[^/]+)/activate', views.activate, name='activate'),
url(r'^lost_password', views.l... | 37.25 | 76 | 0.686242 |
d5e3e96280098d98986b268717c29df85be48ac3 | 8,915 | py | Python | pychron/processing/utils/equil.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 31 | 2016-03-07T02:38:17.000Z | 2022-02-14T18:23:43.000Z | pychron/processing/utils/equil.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 1,626 | 2015-01-07T04:52:35.000Z | 2022-03-25T19:15:59.000Z | pychron/processing/utils/equil.py | UIllinoisHALPychron/pychron | f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc | [
"Apache-2.0"
] | 26 | 2015-05-23T00:10:06.000Z | 2022-03-07T16:51:57.000Z | # ===============================================================================
# Copyright 2013 Jake Ross
#
# 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/licens... | 28.482428 | 88 | 0.487493 |
deddf00bc4f4fb51cf666def2befe61970118541 | 6,642 | py | Python | davis/eval_custom_framewise.py | MSiam/segment-any-moving | 82cb782867d866d2f4eb68230edb75f613e15a02 | [
"Apache-2.0"
] | 70 | 2019-09-16T17:55:55.000Z | 2022-03-07T00:26:53.000Z | davis/eval_custom_framewise.py | MSiam/segment-any-moving | 82cb782867d866d2f4eb68230edb75f613e15a02 | [
"Apache-2.0"
] | 9 | 2019-09-30T09:15:11.000Z | 2021-07-21T11:33:13.000Z | davis/eval_custom_framewise.py | MSiam/segment-any-moving | 82cb782867d866d2f4eb68230edb75f613e15a02 | [
"Apache-2.0"
] | 5 | 2019-09-25T05:14:37.000Z | 2021-07-08T20:13:47.000Z | """Per-frame version of proposed evaluation for video instance segmentation.
See fbms/eval_custom.py for a video-level evaluation that also works with
DAVIS."""
import argparse
import collections
import logging
import pickle
from pathlib import Path
import numpy as np
import scipy.optimize
import pycocotools.mask as... | 41.773585 | 78 | 0.618338 |
f3ac5011657ad85593d60998736950d8f1568987 | 1,719 | py | Python | blog/models.py | zxperts/pyblog | 4c6e494978005bb782e35729e6f1af4f874cd467 | [
"MIT"
] | null | null | null | blog/models.py | zxperts/pyblog | 4c6e494978005bb782e35729e6f1af4f874cd467 | [
"MIT"
] | null | null | null | blog/models.py | zxperts/pyblog | 4c6e494978005bb782e35729e6f1af4f874cd467 | [
"MIT"
] | null | null | null | from django.db import models
from django.template.defaultfilters import slugify
class PostCategory(models.Model):
name = models.CharField(max_length=50)
def slug(self):
return slugify(self.name)
def __str__(self):
return self.name
class Post(models.Model):
title = models.CharField(... | 28.180328 | 89 | 0.618965 |
2c5eb62f168aba9032e336a0cdff34023f008d7f | 2,006 | py | Python | polire/custom/custom.py | patel-zeel/ALdeploy | 58212209c4b495db471ada0fd695eab38e2acfe8 | [
"BSD-3-Clause"
] | null | null | null | polire/custom/custom.py | patel-zeel/ALdeploy | 58212209c4b495db471ada0fd695eab38e2acfe8 | [
"BSD-3-Clause"
] | null | null | null | polire/custom/custom.py | patel-zeel/ALdeploy | 58212209c4b495db471ada0fd695eab38e2acfe8 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from ..interpolate.base import Base
class CustomInterpolator(Base):
"""
Class to interpolate by fitting a sklearn type Regressor to
the given data.
Parameters
----------
regressor: class definition,
This variable is used to pass in the Regressor we would like
... | 29.940299 | 86 | 0.625623 |
a34a8c8b2999f843a69bdb69eb9aedbb02d6555c | 49,279 | py | Python | python/generator.py | opencor/libxml2 | 5c009c668b5b8ae90e274d75f5cbb658d0901482 | [
"MIT"
] | null | null | null | python/generator.py | opencor/libxml2 | 5c009c668b5b8ae90e274d75f5cbb658d0901482 | [
"MIT"
] | null | null | null | python/generator.py | opencor/libxml2 | 5c009c668b5b8ae90e274d75f5cbb658d0901482 | [
"MIT"
] | null | null | null | #!/usr/bin/python -u
#
# generate python wrappers from the XML API description
#
functions = {}
enums = {} # { enumType: { enumConstant: enumValue } }
import os
import sys
import string
if __name__ == "__main__":
# launched as a script
srcPref = os.path.dirname(sys.argv[0])
else:
# imported
srcPref =... | 39.518043 | 120 | 0.499361 |
8b0f2794465cd27758fe973e58bca8883dd85bb2 | 2,162 | py | Python | tools/TF2CaffeModel/itl/files/__init__.py | chenaili6/FeatherCNN | 52cd8c8749ed584461a88b1f04749bb35a48f9a6 | [
"Apache-2.0"
] | 4 | 2018-05-14T09:00:33.000Z | 2021-05-14T08:11:54.000Z | tools/TF2CaffeModel/itl/files/__init__.py | nihui/FeatherCNN | 2805f371bd8f33ef742cc9523979f29295d926fb | [
"Apache-2.0"
] | null | null | null | tools/TF2CaffeModel/itl/files/__init__.py | nihui/FeatherCNN | 2805f371bd8f33ef742cc9523979f29295d926fb | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python
# -*- coding: utf-8 -*-
"""
itl provides rich layer implementations trailed for
various benchmarks and domain-specific problems. In addition, we also
support transparent access to native TensorFlow parameters.
For example, we provide not only layers for local response normalization, but also
layers t... | 30.450704 | 115 | 0.748844 |
11dd73f6e1584653ca6ce595317b2e702b52b099 | 90 | py | Python | djangocms_versioning/__init__.py | jonathan-s/djangocms-versioning | 2fb6e26dd2f1b39b38d525b1afe9a6a6433bb605 | [
"BSD-3-Clause"
] | null | null | null | djangocms_versioning/__init__.py | jonathan-s/djangocms-versioning | 2fb6e26dd2f1b39b38d525b1afe9a6a6433bb605 | [
"BSD-3-Clause"
] | null | null | null | djangocms_versioning/__init__.py | jonathan-s/djangocms-versioning | 2fb6e26dd2f1b39b38d525b1afe9a6a6433bb605 | [
"BSD-3-Clause"
] | null | null | null | __version__ = "0.0.26"
default_app_config = "djangocms_versioning.apps.VersioningConfig"
| 22.5 | 65 | 0.811111 |
56daa7d1ed0238d51503ee9da48d95e11b73e8a2 | 3,748 | py | Python | mongo_interface.py | hkhamm/meetme | 53beb81f47932090d95a4c29666b020912487f0b | [
"Artistic-2.0"
] | null | null | null | mongo_interface.py | hkhamm/meetme | 53beb81f47932090d95a4c29666b020912487f0b | [
"Artistic-2.0"
] | 2 | 2021-02-08T20:17:47.000Z | 2021-04-30T20:33:38.000Z | mongo_interface.py | hkhamm/meetme | 53beb81f47932090d95a4c29666b020912487f0b | [
"Artistic-2.0"
] | null | null | null | import flask
import sys
from pymongo import MongoClient
import CONFIG
try:
dbclient = MongoClient(CONFIG.MONGO_URL)
db = dbclient.meetme
collection = db.busy_times
except:
print("Failure opening database. Is Mongo running? Correct password?")
sys.exit(1)
def add_times_db(new_times):
"""
... | 26.771429 | 75 | 0.568303 |
409b3ae190e0b896349fd2f9eb31f6ba8673a29a | 891 | py | Python | app/apidocs/token.py | zsh2008/mini-shop-server | adeb8ad522034d8337166e3a199c000921580c21 | [
"MIT"
] | 2 | 2020-11-10T08:46:15.000Z | 2020-11-12T01:57:24.000Z | app/apidocs/token.py | zsh2008/mini-shop-server | adeb8ad522034d8337166e3a199c000921580c21 | [
"MIT"
] | null | null | null | app/apidocs/token.py | zsh2008/mini-shop-server | adeb8ad522034d8337166e3a199c000921580c21 | [
"MIT"
] | 1 | 2020-11-10T08:46:16.000Z | 2020-11-10T08:46:16.000Z | # _*_ coding: utf-8 _*_
"""
Created by Alimazing on 2018/12/4.
"""
__author__ = 'Alimazing'
get_token = {
"parameters": [
{
"name": "body",
"in": "body",
"require": "true",
"schema": {
"id": "Token",
"required": ["account", "secret", "type"],
"properties": {
"account": {
"type":... | 15.910714 | 46 | 0.452301 |
c03ae2ec495d04260c481f465aaaa2f89aa60c08 | 1,204 | py | Python | groundwork/util.py | amhaske/groundwork | abd63a54a34434ebdf527b1619c8bc90d8f97c28 | [
"MIT"
] | 17 | 2016-07-27T12:32:06.000Z | 2022-01-24T15:58:04.000Z | groundwork/util.py | amhaske/groundwork | abd63a54a34434ebdf527b1619c8bc90d8f97c28 | [
"MIT"
] | 31 | 2016-12-16T07:29:54.000Z | 2019-05-07T07:08:18.000Z | groundwork/util.py | amhaske/groundwork | abd63a54a34434ebdf527b1619c8bc90d8f97c28 | [
"MIT"
] | 6 | 2018-03-05T13:53:31.000Z | 2019-06-07T05:33:54.000Z | def gw_get(object_dict, name=None, plugin=None):
"""
Getter function to retrieve objects from a given object dictionary.
Used mainly to provide get() inside patterns.
:param object_dict: objects, which must have 'name' and 'plugin' as attribute
:type object_dict: dictionary
:param name: name o... | 32.540541 | 81 | 0.554817 |
6cb6aea55b92ececf6a68a81056fccd94de37239 | 6,672 | py | Python | flask_stateless_auth/__init__.py | omarryhan/flask-stateless-auth | c6acefc55050d1a53235ead20cb7d5e9eb4bbf9a | [
"MIT"
] | 3 | 2018-09-13T19:55:47.000Z | 2018-09-15T18:31:22.000Z | flask_stateless_auth/__init__.py | omarryhan/flask-stateless-auth | c6acefc55050d1a53235ead20cb7d5e9eb4bbf9a | [
"MIT"
] | null | null | null | flask_stateless_auth/__init__.py | omarryhan/flask-stateless-auth | c6acefc55050d1a53235ead20cb7d5e9eb4bbf9a | [
"MIT"
] | null | null | null | from functools import wraps
from werkzeug.local import LocalProxy
from werkzeug.security import safe_str_cmp
from flask import jsonify, request, current_app, _request_ctx_stack, has_request_context
from flask.signals import Namespace
__title__ = "Flask-Stateless-Auth"
__description__ = "Flask stateless authentication... | 32.866995 | 136 | 0.654976 |
05820dc821a2252b3730ae11200845bf96f4ed35 | 8,196 | py | Python | entity_typing_framework/EntityTypingNetwork_classes/projectors.py | NooneBug/entity_typing_framework | e4c3cf3a6d9c3a3453ce516de855fc22b49ae5c0 | [
"MIT"
] | null | null | null | entity_typing_framework/EntityTypingNetwork_classes/projectors.py | NooneBug/entity_typing_framework | e4c3cf3a6d9c3a3453ce516de855fc22b49ae5c0 | [
"MIT"
] | null | null | null | entity_typing_framework/EntityTypingNetwork_classes/projectors.py | NooneBug/entity_typing_framework | e4c3cf3a6d9c3a3453ce516de855fc22b49ae5c0 | [
"MIT"
] | null | null | null | from pytorch_lightning.core.lightning import LightningModule
from torch.nn import Sigmoid, ModuleDict, ReLU, Linear, Dropout, BatchNorm1d
from torch.nn.modules import activation
class Layer(LightningModule):
'''
Fully Connected Layer with activation function, with parametrization managed through the :code:`yam... | 49.077844 | 269 | 0.668253 |
8555c0391d3cd6cb09bde173eb535891cd14b33f | 11,071 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20160901/get_express_route_circuit.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/network/v20160901/get_express_route_circuit.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/network/v20160901/get_express_route_circuit.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.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
from ... import _utilities, _tables
from... | 40.258182 | 380 | 0.677084 |
15a50098de04d7c0408dfd27ef7fe6275ec1570f | 2,025 | py | Python | sprinkler/models.py | shanisma/plant-keeper | 3ca92ae2d55544a301e1398496a08a45cca6d15b | [
"CC0-1.0"
] | 1 | 2020-04-12T22:00:17.000Z | 2020-04-12T22:00:17.000Z | sprinkler/models.py | shanisma/plant-keeper | 3ca92ae2d55544a301e1398496a08a45cca6d15b | [
"CC0-1.0"
] | null | null | null | sprinkler/models.py | shanisma/plant-keeper | 3ca92ae2d55544a301e1398496a08a45cca6d15b | [
"CC0-1.0"
] | null | null | null | from django.db import models
from water.models import Device as WaterDevice
class Device(models.Model):
tag = models.CharField(unique=True, null=False, blank=False, max_length=200)
def __str__(self):
return f"{self.tag}"
class Sensor(models.Model):
tag = models.OneToOneField(
Device, on... | 31.153846 | 86 | 0.732346 |
71fc6f47d1423170343cabb93b8b2762e390fc16 | 1,111 | py | Python | clade/extensions/assembler.py | kateya/clade | f2c091be8055156ab3e6ce6b8f855c4b01d2b6f3 | [
"Apache-2.0"
] | 11 | 2018-10-15T08:46:00.000Z | 2022-02-14T14:03:15.000Z | clade/extensions/assembler.py | kateya/clade | f2c091be8055156ab3e6ce6b8f855c4b01d2b6f3 | [
"Apache-2.0"
] | 136 | 2018-08-07T11:11:29.000Z | 2022-03-31T19:02:21.000Z | clade/extensions/assembler.py | kateya/clade | f2c091be8055156ab3e6ce6b8f855c4b01d2b6f3 | [
"Apache-2.0"
] | 6 | 2018-11-09T12:52:39.000Z | 2022-02-19T20:34:25.000Z | # Copyright (c) 2018 ISP RAS (http://www.ispras.ru)
# Ivannikov Institute for System Programming of the Russian Academy of Sciences
#
# 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
#
# htt... | 33.666667 | 79 | 0.710171 |
edda3cb52417d494d1f20de321f85184deb04bd2 | 125 | py | Python | PySrc/8day/Re05.py | Timmy-Oh/Adorable-Lab | c21454d011e6888fd28c41d1624721ea1826be40 | [
"Apache-2.0"
] | null | null | null | PySrc/8day/Re05.py | Timmy-Oh/Adorable-Lab | c21454d011e6888fd28c41d1624721ea1826be40 | [
"Apache-2.0"
] | null | null | null | PySrc/8day/Re05.py | Timmy-Oh/Adorable-Lab | c21454d011e6888fd28c41d1624721ea1826be40 | [
"Apache-2.0"
] | null | null | null | import re
r = re.compile("ck?w")
print(r.search("cw"))
print(r.search("ckw"))
print(r.search("ckkw"))
print(r.search("kkkw")) | 20.833333 | 23 | 0.656 |
9f26d9925393c4a7300b70d6e70e45c02baf2b65 | 2,755 | py | Python | mapping/enable/http_tile_manager.py | nmichaud/enable-mapping | 421aae6c3c700406df0f2438cec190daf5074084 | [
"BSD-3-Clause"
] | 1 | 2019-04-22T16:36:06.000Z | 2019-04-22T16:36:06.000Z | mapping/enable/http_tile_manager.py | pombreda/enable-mapping | 421aae6c3c700406df0f2438cec190daf5074084 | [
"BSD-3-Clause"
] | null | null | null | mapping/enable/http_tile_manager.py | pombreda/enable-mapping | 421aae6c3c700406df0f2438cec190daf5074084 | [
"BSD-3-Clause"
] | 2 | 2015-04-14T10:06:03.000Z | 2020-10-03T03:56:47.000Z |
import logging
# Enthought library imports
from traits.api import Int, Str, implements, on_trait_change
from pyface.gui import GUI
# Local imports
from i_tile_manager import ITileManager
from tile_manager import TileManager
from cacheing_decorators import lru_cache
from asynchttp import AsyncHTTPConnection
from asyn... | 30.611111 | 94 | 0.582214 |
7432ed03e6d2fd564d879b2b7ee1e17cc59432f3 | 3,123 | py | Python | training.py | mirefek/neur-rec-seq | 6e0ff723b01e290f1da7bb3aabed65c494a875e8 | [
"MIT"
] | 1 | 2020-06-08T15:24:11.000Z | 2020-06-08T15:24:11.000Z | training.py | mirefek/neur-rec-seq | 6e0ff723b01e290f1da7bb3aabed65c494a875e8 | [
"MIT"
] | null | null | null | training.py | mirefek/neur-rec-seq | 6e0ff723b01e290f1da7bb3aabed65c494a875e8 | [
"MIT"
] | null | null | null | import os
import sys
import torch
"""
Parameters:
model:
SeqGen instance from model.py
seq:
one-dimensional tensor of symbols
steps:
the number of training steps
optimizer -- default: {'type' : "Adam"}:
dict containing a key "type",
and the other keys corresponding to keyword arguments of t... | 35.896552 | 97 | 0.638809 |
1f265113bfa666c664fe72ca12502f033860de2f | 486 | py | Python | examples/src/dbnd_examples/extensions/custom_output_location.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | 224 | 2020-01-02T10:46:37.000Z | 2022-03-02T13:54:08.000Z | examples/src/dbnd_examples/extensions/custom_output_location.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | 16 | 2020-03-11T09:37:58.000Z | 2022-01-26T10:22:08.000Z | examples/src/dbnd_examples/extensions/custom_output_location.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | 24 | 2020-03-24T13:53:50.000Z | 2022-03-22T11:55:18.000Z | import logging
from dbnd import PythonTask, output, parameter
logger = logging.getLogger()
class GenerateReportToCustomLocation(PythonTask):
_conf__base_output_path_fmt = (
"{root}/{env_label}/reports/{name}/"
"{output_name}{output_ext}/date={task_target_date}"
)
name = parameter.value(... | 23.142857 | 59 | 0.674897 |
5040fb49247ae827f97e8c2355d3e53b6d33491f | 5,287 | py | Python | ketiga.py | ichsanhizmanhardy/BelajarGIS | 9672a3fac5bb00fa3e551aa0afb432cdf8c0e6ed | [
"MIT"
] | null | null | null | ketiga.py | ichsanhizmanhardy/BelajarGIS | 9672a3fac5bb00fa3e551aa0afb432cdf8c0e6ed | [
"MIT"
] | null | null | null | ketiga.py | ichsanhizmanhardy/BelajarGIS | 9672a3fac5bb00fa3e551aa0afb432cdf8c0e6ed | [
"MIT"
] | null | null | null | import shapefile
class ketiga:
def __init__(self):
self.ketiga = shapefile.Writer('ketiga', shapeType=shapefile.POLYGON)
self.ketiga.shapeType
self.ketiga.field('nama_ruangan', 'C')
#-------------------- KODING ------------------#
# Ilham Muhammad Ariq 1174087
def tanggaD2(self,... | 32.042424 | 80 | 0.493475 |
fd34c449ba0fe5a2fc38e4a75672112fa71c82f9 | 7,104 | py | Python | results_explorer/models.py | open-risk/equinox | 0503e716b566ff7c776f04a611879f88d86e1cc6 | [
"Apache-2.0"
] | 10 | 2021-03-21T22:05:33.000Z | 2022-03-15T18:26:58.000Z | results_explorer/models.py | open-risk/equinox | 0503e716b566ff7c776f04a611879f88d86e1cc6 | [
"Apache-2.0"
] | 2 | 2021-10-30T15:15:41.000Z | 2021-11-11T12:35:02.000Z | results_explorer/models.py | open-risk/equinox | 0503e716b566ff7c776f04a611879f88d86e1cc6 | [
"Apache-2.0"
] | 1 | 2022-03-16T18:59:36.000Z | 2022-03-16T18:59:36.000Z | # Copyright (c) 2021 Open Risk (https://www.openriskmanagement.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, co... | 47.046358 | 201 | 0.698198 |
037f499114e422513889605df2adf61cde289839 | 2,479 | py | Python | bunyip/network/nn.py | danhey/Bunyip | 741d966e85d841d28867f2419e15644969439382 | [
"MIT"
] | 1 | 2021-11-20T19:02:46.000Z | 2021-11-20T19:02:46.000Z | bunyip/network/nn.py | danhey/Bunyip | 741d966e85d841d28867f2419e15644969439382 | [
"MIT"
] | null | null | null | bunyip/network/nn.py | danhey/Bunyip | 741d966e85d841d28867f2419e15644969439382 | [
"MIT"
] | null | null | null | # # def initialize_network(self, model_path=None):
# # """ Move this to a class please"""
# # try:
# # from tensorflow.keras.models import load_model
# # from tensorflow.keras.initializers import glorot_uniform
# # from tensorflow.keras.utils import CustomObjectSc... | 35.927536 | 142 | 0.510286 |
518acfbaf83b6f804c80b9db3dcea265eef6a69b | 3,183 | py | Python | src/sage/categories/algebra_modules.py | bopopescu/classic_diff_geom | 2b1d88becbc8cb30962e0995cc78e429e0f5589f | [
"BSL-1.0"
] | null | null | null | src/sage/categories/algebra_modules.py | bopopescu/classic_diff_geom | 2b1d88becbc8cb30962e0995cc78e429e0f5589f | [
"BSL-1.0"
] | null | null | null | src/sage/categories/algebra_modules.py | bopopescu/classic_diff_geom | 2b1d88becbc8cb30962e0995cc78e429e0f5589f | [
"BSL-1.0"
] | 1 | 2017-10-08T08:21:23.000Z | 2017-10-08T08:21:23.000Z | r"""
Algebra modules
"""
#*****************************************************************************
# Copyright (C) 2005 David Kohel <kohel@maths.usyd.edu>
# William Stein <wstein@math.ucsd.edu>
# 2008-2009 Nicolas M. Thiery <nthiery at users.sf.net>
#
# Distributed un... | 35.366667 | 113 | 0.591894 |
c741562cabf588d6a1002d7c5a35ae6b2064a558 | 1,766 | py | Python | src/pages/models.py | cbsBiram/xarala__ssr | 863e1362c786daa752b942b796f7a015211d2f1b | [
"FSFAP"
] | null | null | null | src/pages/models.py | cbsBiram/xarala__ssr | 863e1362c786daa752b942b796f7a015211d2f1b | [
"FSFAP"
] | null | null | null | src/pages/models.py | cbsBiram/xarala__ssr | 863e1362c786daa752b942b796f7a015211d2f1b | [
"FSFAP"
] | null | null | null | from django.db import models
from django.utils import timezone
from xarala.utils import upload_image_path
class Subscribe(models.Model):
email_id = models.EmailField(null=True, blank=True)
timestamp = models.DateTimeField(default=timezone.now)
def __str__(self):
return self.email_id
class Carou... | 34.627451 | 83 | 0.730464 |
ba8823f820b9e3ad83005058bead3a9e5dc97965 | 942 | py | Python | backendapp/common/migrations/0021_auto_20200403_1230.py | finebrush/takeatripsFB | 85a5be1a2ee68531f04f2601a3f69ddc608d4d27 | [
"BSD-3-Clause"
] | null | null | null | backendapp/common/migrations/0021_auto_20200403_1230.py | finebrush/takeatripsFB | 85a5be1a2ee68531f04f2601a3f69ddc608d4d27 | [
"BSD-3-Clause"
] | 13 | 2020-02-12T03:05:15.000Z | 2022-02-10T14:26:50.000Z | backendapp/common/migrations/0021_auto_20200403_1230.py | finebrush/takeatripsFB | 85a5be1a2ee68531f04f2601a3f69ddc608d4d27 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.2.7 on 2020-04-03 03:30
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('common', '0020_auto_20200325_1716'),
]
operations = [
migrations.AlterModelOptions(
name='pinbuy',
options={'ordering': ('id... | 31.4 | 105 | 0.573248 |
17da53b904edc8606f6d527cdc08c16e545e323a | 4,624 | py | Python | examples/goulburn-deconvolution/deconvolve-timeseries.py | agriff86/rd-deconvolve | 6d7772674886fe7391f66d6f89c03aca5e73d226 | [
"MIT"
] | null | null | null | examples/goulburn-deconvolution/deconvolve-timeseries.py | agriff86/rd-deconvolve | 6d7772674886fe7391f66d6f89c03aca5e73d226 | [
"MIT"
] | null | null | null | examples/goulburn-deconvolution/deconvolve-timeseries.py | agriff86/rd-deconvolve | 6d7772674886fe7391f66d6f89c03aca5e73d226 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
"""
Deconvolve radon observations from a Goulburn field campaign (700L detector)
"""
import sys
import os
EXAMPLE_DIR = os.path.dirname(os.path.abspath(__file__))
PROJECT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
import pandas as pd
import numpy ... | 30.622517 | 107 | 0.598832 |
03df714fd4e2d47b0c7d5d7045b4588104dc83cd | 20,926 | py | Python | localstack/services/cloudformation/models/ec2.py | matt-mercer/localstack | b69ba25e495c6ef889d33a050b216d0cd1035041 | [
"Apache-2.0"
] | null | null | null | localstack/services/cloudformation/models/ec2.py | matt-mercer/localstack | b69ba25e495c6ef889d33a050b216d0cd1035041 | [
"Apache-2.0"
] | null | null | null | localstack/services/cloudformation/models/ec2.py | matt-mercer/localstack | b69ba25e495c6ef889d33a050b216d0cd1035041 | [
"Apache-2.0"
] | null | null | null | import json
from typing import Callable
from moto.ec2.utils import generate_route_id
from localstack.services.cloudformation.deployment_utils import generate_default_name
from localstack.services.cloudformation.service_models import REF_ID_ATTRS, GenericBaseModel
from localstack.utils.aws import aws_stack
from locals... | 37.636691 | 119 | 0.565469 |
e657d4fdad62aeb0a94d824adb5e00481f3d9c85 | 679 | py | Python | bot/settings.py | mcurranseijo/Friendo_Bot | 2b05fc20002f85702e908712b364b5f41653aaae | [
"MIT"
] | 1 | 2020-11-12T02:34:19.000Z | 2020-11-12T02:34:19.000Z | bot/settings.py | mcurranseijo/Friendo_Bot | 2b05fc20002f85702e908712b364b5f41653aaae | [
"MIT"
] | null | null | null | bot/settings.py | mcurranseijo/Friendo_Bot | 2b05fc20002f85702e908712b364b5f41653aaae | [
"MIT"
] | null | null | null | """Constants for the bot."""
import os
from pathlib import Path
TOKEN = os.environ.get("FRIENDO_TOKEN")
MEME_USERNAME = os.environ.get("MEME_USERNAME")
MEME_PASSWORD = os.environ.get("MEME_PASSWORD")
# event api key
EVENT_API_KEY = os.environ.get("EVENT_API_KEY")
WEATHER_TOKEN = os.environ.get("WEATHER_TOKEN")
C... | 18.351351 | 60 | 0.709867 |
b9c04c635bab1c0cbdc4ebe260f2adc7f9a5ce28 | 24,247 | py | Python | flask1/.venv/Lib/site-packages/pip/_vendor/distlib/version.py | kerwin-yang-yang/Bigplatform | 575ebb3c494ce28e820ab5ad0a91f194451eec76 | [
"MIT"
] | 32 | 2021-05-03T09:03:57.000Z | 2022-03-17T09:18:59.000Z | flask1/.venv/Lib/site-packages/pip/_vendor/distlib/version.py | kerwin-yang-yang/Bigplatform | 575ebb3c494ce28e820ab5ad0a91f194451eec76 | [
"MIT"
] | 4 | 2021-05-29T20:42:52.000Z | 2022-03-16T03:01:12.000Z | flask1/.venv/Lib/site-packages/pip/_vendor/distlib/version.py | kerwin-yang-yang/Bigplatform | 575ebb3c494ce28e820ab5ad0a91f194451eec76 | [
"MIT"
] | 27 | 2021-11-10T08:44:10.000Z | 2022-03-30T08:19:46.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2017 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""
Implementation of a flexible versioning scheme providing support for PEP-440,
setuptools-compatible and semantic versioning.
"""
import logging
import re
from .compat import s... | 32.766216 | 79 | 0.526416 |
6be590537723bb01f208468970da40e8750b86f8 | 696 | py | Python | src/pythonmysequel/Table.py | jasonli0616/PythonMySequel | 692abc4517f060683fb34bc304e1bc3b06d2dc7f | [
"MIT"
] | null | null | null | src/pythonmysequel/Table.py | jasonli0616/PythonMySequel | 692abc4517f060683fb34bc304e1bc3b06d2dc7f | [
"MIT"
] | null | null | null | src/pythonmysequel/Table.py | jasonli0616/PythonMySequel | 692abc4517f060683fb34bc304e1bc3b06d2dc7f | [
"MIT"
] | null | null | null | '''
This class represents a table in the database
It is mostly used as a parameter for pythonmysequel.Connection methods
'''
from pythonmysequel.values import _ValueType
class Table:
def __init__(self,
table_name:str, **values:_ValueType) -> None:
self.table_name = table_name
self.... | 31.636364 | 73 | 0.635057 |
85264a0d7e9ec06536acb5da5591ce3a39b5ca9f | 1,630 | py | Python | app/models.py | Danish15/RamenBowlBlog | a8c86ea2627a9b323feae651a7565768b6666a97 | [
"MIT"
] | null | null | null | app/models.py | Danish15/RamenBowlBlog | a8c86ea2627a9b323feae651a7565768b6666a97 | [
"MIT"
] | null | null | null | app/models.py | Danish15/RamenBowlBlog | a8c86ea2627a9b323feae651a7565768b6666a97 | [
"MIT"
] | null | null | null | from werkzeug.security import generate_password_hash, check_password_hash
from . import db
from flask.ext.login import UserMixin
from . import login_manager
@login_manager.user_loader
def load_user(user_id):
return User.query.get(int(user_id))
class Role(db.Model):
__tablename__ = 'roles'
id = db.Column(d... | 30.754717 | 73 | 0.710429 |
c06e053bad901ac22724019c413dbb60356201cf | 655 | py | Python | src/realtweetornotbot/utils/urlutils.py | giulionf/realtweetornotbot | f9107fe0cb32849b8d0827c49797b9353468ebb3 | [
"MIT"
] | 84 | 2019-02-11T03:06:58.000Z | 2022-02-10T08:44:41.000Z | src/realtweetornotbot/utils/urlutils.py | giulionf/realtweetornotbot | f9107fe0cb32849b8d0827c49797b9353468ebb3 | [
"MIT"
] | 42 | 2018-12-27T12:55:08.000Z | 2022-01-25T11:40:10.000Z | src/realtweetornotbot/utils/urlutils.py | giulionf/realtweetornotbot | f9107fe0cb32849b8d0827c49797b9353468ebb3 | [
"MIT"
] | 7 | 2019-07-02T07:46:20.000Z | 2021-12-22T22:01:39.000Z | import requests
IMAGE_FORMATS = ("image/png", "image/jpeg", "image/jpg", "image/webp")
class UrlUtils:
""" Helper class for URLs """
@staticmethod
def is_imgur_url(url):
""" Returns true, if an image url is an IMGUR image or album """
return "imgur.com" in url
@staticmethod
def ... | 27.291667 | 72 | 0.598473 |
b3191b03ae5358cd34952cc197eb2784f6d620d8 | 1,921 | py | Python | pythainlp/cli/tagging.py | Subarna578/pythainlp | 9650a40396719284add17bb09f50e948dea41053 | [
"Apache-2.0"
] | null | null | null | pythainlp/cli/tagging.py | Subarna578/pythainlp | 9650a40396719284add17bb09f50e948dea41053 | [
"Apache-2.0"
] | null | null | null | pythainlp/cli/tagging.py | Subarna578/pythainlp | 9650a40396719284add17bb09f50e948dea41053 | [
"Apache-2.0"
] | null | null | null | import argparse
from pythainlp import cli
from pythainlp.tag import pos_tag
class SubAppBase:
def __init__(self, name, argv):
parser = argparse.ArgumentParser(name)
parser.add_argument(
"--text",
type=str,
help="input text",
)
parser.add_argume... | 23.144578 | 77 | 0.534097 |
45cd4f80446ea5ff6b72328032b7dc9f328f9d24 | 3,811 | py | Python | deepctr/estimator/models/wdl.py | dzzxjl/DeepCTR | ec3fa832865c14aa2cc843be2b1eab1bfa7b3e4e | [
"Apache-2.0"
] | 6,192 | 2017-12-05T03:02:35.000Z | 2022-03-31T20:59:30.000Z | deepctr/estimator/models/wdl.py | dzzxjl/DeepCTR | ec3fa832865c14aa2cc843be2b1eab1bfa7b3e4e | [
"Apache-2.0"
] | 362 | 2018-04-15T06:53:20.000Z | 2022-03-21T15:03:02.000Z | deepctr/estimator/models/wdl.py | dzzxjl/DeepCTR | ec3fa832865c14aa2cc843be2b1eab1bfa7b3e4e | [
"Apache-2.0"
] | 1,960 | 2017-12-05T03:16:04.000Z | 2022-03-31T06:37:00.000Z | # -*- coding:utf-8 -*-
"""
Author:
Weichen Shen, weichenswc@163.com
Reference:
[1] Cheng H T, Koc L, Harmsen J, et al. Wide & deep learning for recommender systems[C]//Proceedings of the 1st Workshop on Deep Learning for Recommender Systems. ACM, 2016: 7-10.(https://arxiv.org/pdf/1606.07792.pdf)
"""
import te... | 56.880597 | 221 | 0.722907 |
e9e847057f4b3a285e73e46acb6c6ef696d45ece | 356 | py | Python | website/migrations/0003_alter_contact_options.py | majeedkarimi/siteino | 03cfef5f1f5e52ea5ac0bac56820d20bac4d92e5 | [
"MIT"
] | null | null | null | website/migrations/0003_alter_contact_options.py | majeedkarimi/siteino | 03cfef5f1f5e52ea5ac0bac56820d20bac4d92e5 | [
"MIT"
] | null | null | null | website/migrations/0003_alter_contact_options.py | majeedkarimi/siteino | 03cfef5f1f5e52ea5ac0bac56820d20bac4d92e5 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.12 on 2022-03-06 16:39
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('website', '0002_auto_20220228_1125'),
]
operations = [
migrations.AlterModelOptions(
name='contact',
options={'ordering': [... | 19.777778 | 52 | 0.598315 |
80c5d7b6579c02754497b8490c0fb622c26f653a | 2,504 | py | Python | viglb/spec.py | pmdm56/vigor | 0a65733a2b7bf48fc7d6071ea89c1af36f1cba80 | [
"MIT"
] | 36 | 2019-09-06T15:33:31.000Z | 2022-02-02T21:11:36.000Z | viglb/spec.py | pmdm56/vigor | 0a65733a2b7bf48fc7d6071ea89c1af36f1cba80 | [
"MIT"
] | 3 | 2019-10-03T10:33:19.000Z | 2020-08-10T13:06:01.000Z | viglb/spec.py | pmdm56/vigor | 0a65733a2b7bf48fc7d6071ea89c1af36f1cba80 | [
"MIT"
] | 9 | 2019-09-18T15:12:29.000Z | 2021-01-20T12:45:01.000Z | from state import flow_emap, flow_id_to_backend_id, backends, backend_ip_emap, cht
EXP_TIME = 10 * 1000
BACKEND_EXP_TIME = 3600000000 * 1000
EXT_PORT = 2
if a_packet_received:
flow_emap.expire_all(now - EXP_TIME)
backend_ip_emap.expire_all(now - BACKEND_EXP_TIME)
h3 = pop_header(tcpudp, on_mismatch=([],[]))
h... | 41.733333 | 92 | 0.63738 |
3eb500d29ff979a46995e5f848e71031c10155c5 | 18,400 | py | Python | samples/pacman.py | JPTIZ/asciimatics | 4ae88c6684599e07766e8bfddce9cdb8f44f9e33 | [
"Apache-2.0"
] | 3,197 | 2015-05-08T22:08:17.000Z | 2022-03-31T04:43:27.000Z | samples/pacman.py | hakxcore/asciimatics | 613a4ddc67cb808b45dc4b90f1b93f0b78bfc9df | [
"Apache-2.0"
] | 339 | 2015-05-12T17:51:35.000Z | 2022-03-28T11:52:07.000Z | samples/pacman.py | hakxcore/asciimatics | 613a4ddc67cb808b45dc4b90f1b93f0b78bfc9df | [
"Apache-2.0"
] | 314 | 2015-10-27T23:02:28.000Z | 2022-03-28T11:43:30.000Z | #!/usr/bin/env python3
from copy import deepcopy
import sys
from asciimatics.exceptions import ResizeScreenError
from asciimatics.paths import Path
from asciimatics.renderers import StaticRenderer, ColourImageFile, FigletText
from asciimatics.scene import Scene
from asciimatics.screen import Screen
from asciimatics.ef... | 34.137291 | 100 | 0.308587 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.