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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ce027805c06db61c04f315262615e01faa30ae5a | 18,148 | py | Python | metview/param.py | ecmwf/metview-python | 641e57716ac1bb105394dd3a871ccd1e5ed60b26 | [
"Apache-2.0"
] | 88 | 2018-06-08T14:21:18.000Z | 2022-03-31T12:25:59.000Z | metview/param.py | ecmwf/metview-python | 641e57716ac1bb105394dd3a871ccd1e5ed60b26 | [
"Apache-2.0"
] | 37 | 2018-11-01T09:50:07.000Z | 2022-02-24T12:20:16.000Z | metview/param.py | ecmwf/metview-python | 641e57716ac1bb105394dd3a871ccd1e5ed60b26 | [
"Apache-2.0"
] | 26 | 2018-06-08T14:21:28.000Z | 2022-01-28T12:55:16.000Z | # (C) Copyright 2017- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernme... | 32.407143 | 113 | 0.454761 | 16,712 | 0.920873 | 0 | 0 | 11,216 | 0.61803 | 0 | 0 | 3,253 | 0.179248 |
ce03e73e55d15e74f86d8e0bd047fcc03b6a00ce | 316 | py | Python | flask_edu_1/file1.py | fulkgl/Flask_edu_1 | cccb70742949577fce5ed279a9d70e6348465643 | [
"MIT"
] | 1 | 2019-12-16T21:55:53.000Z | 2019-12-16T21:55:53.000Z | flask_edu_1/file1.py | fulkgl/Flask_edu_1 | cccb70742949577fce5ed279a9d70e6348465643 | [
"MIT"
] | null | null | null | flask_edu_1/file1.py | fulkgl/Flask_edu_1 | cccb70742949577fce5ed279a9d70e6348465643 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: UTF-8
'''!
module description
@author <A href="email:[email protected]">George L Fulk</A>
'''
__version__ = 0.01
def main():
'''!
main description
'''
print("Hello world")
return 0
if __name__ == "__main__":
# command line entry point
main()
# END #
| 13.166667 | 58 | 0.598101 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 212 | 0.670886 |
ce07948f6f31a33c9447bac9ba7da84e0cc0cfdb | 25 | py | Python | write_grok/__init__.py | namedyangfan/Python_practice | 7f7394d82bb5afc13b039eec286b9485a775ae39 | [
"MIT"
] | null | null | null | write_grok/__init__.py | namedyangfan/Python_practice | 7f7394d82bb5afc13b039eec286b9485a775ae39 | [
"MIT"
] | null | null | null | write_grok/__init__.py | namedyangfan/Python_practice | 7f7394d82bb5afc13b039eec286b9485a775ae39 | [
"MIT"
] | null | null | null | from .write_grok import * | 25 | 25 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ce079ba915fb3b960bd7c0c9b579e190a8341d22 | 1,883 | py | Python | backend/usuarios/views.py | alfmorais/pi-univesp | 45a149e9a404f7b0238b84eb335db7111cd15ebb | [
"MIT"
] | 1 | 2021-12-24T20:32:51.000Z | 2021-12-24T20:32:51.000Z | backend/usuarios/views.py | alfmorais/pi-univesp | 45a149e9a404f7b0238b84eb335db7111cd15ebb | [
"MIT"
] | null | null | null | backend/usuarios/views.py | alfmorais/pi-univesp | 45a149e9a404f7b0238b84eb335db7111cd15ebb | [
"MIT"
] | null | null | null | from hashlib import sha256
from django.http import HttpResponse
from django.shortcuts import redirect, render
from .models import Usuarios
def login(request):
if request.session.get('usuario'):
return redirect('/livro/home/')
status = request.GET.get('status')
return render(request, 'login.... | 25.445946 | 70 | 0.627722 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 347 | 0.18428 |
ce07ca9cf794023383e230a89ff64c045e2a41a9 | 2,737 | py | Python | textclf/tester/dl_tester.py | lswjkllc/textclf | e4e7504989dd5d39c9376eafda1abc580c053913 | [
"MIT"
] | 146 | 2020-02-20T02:29:55.000Z | 2022-01-21T09:49:40.000Z | textclf/tester/dl_tester.py | lswjkllc/textclf | e4e7504989dd5d39c9376eafda1abc580c053913 | [
"MIT"
] | 4 | 2020-03-08T03:24:16.000Z | 2021-03-26T05:34:09.000Z | textclf/tester/dl_tester.py | lswjkllc/textclf | e4e7504989dd5d39c9376eafda1abc580c053913 | [
"MIT"
] | 16 | 2020-02-26T04:45:40.000Z | 2021-05-08T03:52:38.000Z | import torch
from transformers import BertTokenizer
from .base_tester import Tester
from textclf.utils.raw_data import create_tokenizer
from textclf.utils.create import create_instance
from textclf.config import DLTesterConfig
from textclf.data.dictionary import Dictionary
class DLTester(Tester):
"""负责Deep Learn... | 38.549296 | 85 | 0.652905 | 2,469 | 0.898799 | 0 | 0 | 0 | 0 | 0 | 0 | 123 | 0.044776 |
ce0890d24a487d376e2478b4bdab9793e27e76ac | 3,303 | py | Python | scripts/pughpore/randomwalk/get_D_old.py | jhwnkim/nanopores | 98b3dbb5d36464fbdc03f59d224d38e4255324ce | [
"MIT"
] | 8 | 2016-09-07T01:59:31.000Z | 2021-03-06T12:14:31.000Z | scripts/pughpore/randomwalk/get_D_old.py | jhwnkim/nanopores | 98b3dbb5d36464fbdc03f59d224d38e4255324ce | [
"MIT"
] | null | null | null | scripts/pughpore/randomwalk/get_D_old.py | jhwnkim/nanopores | 98b3dbb5d36464fbdc03f59d224d38e4255324ce | [
"MIT"
] | 4 | 2017-12-06T17:43:01.000Z | 2020-05-01T05:41:14.000Z | import matplotlib
matplotlib.use("Agg")
from matplotlib import pyplot as plt
import numpy as np
import os
from nanopores.tools import fields
from scipy.interpolate import interp1d
HOME = os.path.expanduser("~")
DATADIR = os.path.join(HOME, "Dropbox", "nanopores", "fields")
fields.set_dir(DATADIR)
data = fields.get_fi... | 28.230769 | 81 | 0.599758 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 637 | 0.192855 |
ce08db747b526cc7a8cef1e5d71b70335cd56cae | 7,885 | py | Python | scripts/unseen_pairs_prepare.py | dhh1995/SCL | 6b481709c11acc10909fed2105a7b485dab0887c | [
"MIT"
] | 32 | 2020-07-10T04:50:03.000Z | 2021-11-26T16:57:01.000Z | scripts/unseen_pairs_prepare.py | dhh1995/SCL | 6b481709c11acc10909fed2105a7b485dab0887c | [
"MIT"
] | 5 | 2020-07-10T07:55:34.000Z | 2021-11-24T02:45:32.000Z | scripts/unseen_pairs_prepare.py | dhh1995/SCL | 6b481709c11acc10909fed2105a7b485dab0887c | [
"MIT"
] | 3 | 2020-08-20T15:10:35.000Z | 2022-02-20T16:31:01.000Z | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# File : unseen_pairs_prepare.py
# Author : Honghua Dong
# Email : [email protected]
# Date : 02/04/2019
#
# Distributed under terms of the MIT license.
'''
To split dataset into {train/val/test}_split_{rel}_{attr}_{args}.pkl
It will produce a set of indexes stored... | 36.50463 | 103 | 0.625491 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,689 | 0.341027 |
ce0afbb54da9c5cda767047eb0fb4add36a18205 | 1,533 | py | Python | apis/common/models/movie.py | sunil28rana/flask-imdb-sample-project | df28655327a42c0ec28e485d64ebbc5d525275e7 | [
"MIT"
] | null | null | null | apis/common/models/movie.py | sunil28rana/flask-imdb-sample-project | df28655327a42c0ec28e485d64ebbc5d525275e7 | [
"MIT"
] | null | null | null | apis/common/models/movie.py | sunil28rana/flask-imdb-sample-project | df28655327a42c0ec28e485d64ebbc5d525275e7 | [
"MIT"
] | 1 | 2020-10-22T10:31:00.000Z | 2020-10-22T10:31:00.000Z | from datetime import datetime
from sqlalchemy import UniqueConstraint
from apis.initialization import db
class Movie(db.Model):
""" Movie Model for storing movie details"""
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
ninety_nine_popularity = db.Column(db.Float, index=True, nullable... | 35.651163 | 92 | 0.703849 | 1,420 | 0.926288 | 0 | 0 | 0 | 0 | 0 | 0 | 267 | 0.174168 |
ce0ca8f2fe98f3ab332870eee82d60c59dac39aa | 719 | py | Python | setup.py | DewMaple/toolkit | a1f04d1b53420c64e15f684c83acb54276031346 | [
"BSD-3-Clause"
] | null | null | null | setup.py | DewMaple/toolkit | a1f04d1b53420c64e15f684c83acb54276031346 | [
"BSD-3-Clause"
] | null | null | null | setup.py | DewMaple/toolkit | a1f04d1b53420c64e15f684c83acb54276031346 | [
"BSD-3-Clause"
] | null | null | null | # from distutils.core import setup
from setuptools import setup, find_packages
setup(
name='py-toolkit',
version='0.0.3',
packages=find_packages(exclude=("tests",)),
url='https://github.com/DewMaple/toolkit',
description='python toolkit for common usage',
author='DewMaple',
author_email='de... | 28.76 | 68 | 0.631433 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 361 | 0.502086 |
ce0da279383850a16ffabcd3fe15ce7341142e46 | 3,934 | py | Python | ui.py | xKynn/zerox-assistant | 292525bf55cd08f930338310869dba1c25a00cf4 | [
"MIT"
] | 1 | 2021-11-07T14:49:13.000Z | 2021-11-07T14:49:13.000Z | ui.py | xKynn/pyTunes | 292525bf55cd08f930338310869dba1c25a00cf4 | [
"MIT"
] | null | null | null | ui.py | xKynn/pyTunes | 292525bf55cd08f930338310869dba1c25a00cf4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'hnc.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, Q... | 42.76087 | 87 | 0.543976 | 3,444 | 0.875445 | 0 | 0 | 0 | 0 | 0 | 0 | 987 | 0.25089 |
ce0dbcf0753017f4de48e972ead2feb9166619cc | 6,373 | py | Python | text_clf/data_load.py | kejunxiao/TextClf | aa1c195cb5908c32a3e6ed6891142603cb198d87 | [
"BSD-3-Clause"
] | 2 | 2018-05-13T13:00:10.000Z | 2018-05-13T13:00:12.000Z | text_clf/data_load.py | kejunxiao/TextClf | aa1c195cb5908c32a3e6ed6891142603cb198d87 | [
"BSD-3-Clause"
] | null | null | null | text_clf/data_load.py | kejunxiao/TextClf | aa1c195cb5908c32a3e6ed6891142603cb198d87 | [
"BSD-3-Clause"
] | null | null | null | """
data preprocessing and get batch
"""
import os
import re
import logging
import itertools
from collections import Counter
import numpy as np
import pandas as pd
class DataLoad(object):
logging.getLogger().setLevel(logging.INFO)
def __init__(self, data_path, batch_size, num_epochs, dev_sample_rate, forced_... | 35.209945 | 100 | 0.557822 | 5,540 | 0.869292 | 658 | 0.103248 | 613 | 0.096187 | 0 | 0 | 1,523 | 0.238977 |
ce0e92d74f72ee04e6c2fbb871130425f6c911e3 | 11,629 | py | Python | pydsm/audio_weightings.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | pydsm/audio_weightings.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | pydsm/audio_weightings.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2013, Sergio Callegari
# All rights reserved.
# This file is part of PyDSM.
# PyDSM 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, o... | 33.707246 | 78 | 0.600224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,058 | 0.606931 |
ce0ea9cd4625661b89c457658572716294eaef3b | 1,258 | py | Python | data_custom/data_load.py | icon-lab/provoGAN | e4abee668ca5a5733a04c0e27e379a0434b0270f | [
"BSD-3-Clause"
] | 1 | 2022-03-27T09:16:22.000Z | 2022-03-27T09:16:22.000Z | data_custom/data_load.py | icon-lab/provoGAN | e4abee668ca5a5733a04c0e27e379a0434b0270f | [
"BSD-3-Clause"
] | null | null | null | data_custom/data_load.py | icon-lab/provoGAN | e4abee668ca5a5733a04c0e27e379a0434b0270f | [
"BSD-3-Clause"
] | null | null | null | import os
import nibabel
import numpy as np
import random
from scipy import ndimage
import SimpleITK as sitk
def load_nifty_volume_as_array(filename, with_header = False):
"""
load nifty image into numpy array, and transpose it based on the [z,y,x] axis order
The output array shape is like [Depth, Height,... | 29.952381 | 92 | 0.678855 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 612 | 0.486486 |
ce0ffdd605799570a773639f27bdbc3a5cc51708 | 8,802 | py | Python | project/server/user/views.py | kangusrm/XML-parser | adb2a7049b5946fb6293f58e20c860fbb07a6806 | [
"MIT"
] | 1 | 2016-09-20T09:07:34.000Z | 2016-09-20T09:07:34.000Z | project/server/user/views.py | kangusrm/XML-parser | adb2a7049b5946fb6293f58e20c860fbb07a6806 | [
"MIT"
] | null | null | null | project/server/user/views.py | kangusrm/XML-parser | adb2a7049b5946fb6293f58e20c860fbb07a6806 | [
"MIT"
] | 1 | 2016-09-20T09:07:37.000Z | 2016-09-20T09:07:37.000Z | # project/server/user/views.py
#################
#### imports ####
#################
from flask import render_template, Blueprint, url_for, \
redirect, flash, request, session
from flask_login import login_user, logout_user, login_required
from project.server import bcrypt, db
from project.server.models import ... | 32.360294 | 123 | 0.538287 | 0 | 0 | 0 | 0 | 8,104 | 0.9207 | 0 | 0 | 1,447 | 0.164394 |
ce10a73d0706d4c9c4b471fbf0c74937c35cf813 | 5,477 | py | Python | active_feature_extractor/experiments/linear_q_learner.py | benblack769/atari_q_learner | adae53e91ec6013ffaeefc9a058c7ab933593cea | [
"MIT"
] | null | null | null | active_feature_extractor/experiments/linear_q_learner.py | benblack769/atari_q_learner | adae53e91ec6013ffaeefc9a058c7ab933593cea | [
"MIT"
] | null | null | null | active_feature_extractor/experiments/linear_q_learner.py | benblack769/atari_q_learner | adae53e91ec6013ffaeefc9a058c7ab933593cea | [
"MIT"
] | null | null | null | import torch
import numpy as np
from torch import nn
def get_avg_discounted_value(next_dones, next_mask, next_rewards, next_value_preds, gamma):
minibatch_size, td_lambda = next_dones.shape
lambda_gamma = torch.cumprod(torch.ones(td_lambda)*gamma,dim=0) * (1/gamma)
# all dones also must be masks, by def... | 40.57037 | 125 | 0.651999 | 4,475 | 0.817053 | 0 | 0 | 644 | 0.117583 | 0 | 0 | 477 | 0.087091 |
ce1252998459ede1ce9e5326a029f03393ec65ef | 660 | py | Python | Qualification/lazyLoader.py | monisjaved/Facebook-Hacker-Cup | 569052ecf1c94162cfbbef2533519b46d73d9328 | [
"MIT"
] | null | null | null | Qualification/lazyLoader.py | monisjaved/Facebook-Hacker-Cup | 569052ecf1c94162cfbbef2533519b46d73d9328 | [
"MIT"
] | null | null | null | Qualification/lazyLoader.py | monisjaved/Facebook-Hacker-Cup | 569052ecf1c94162cfbbef2533519b46d73d9328 | [
"MIT"
] | null | null | null | # https://www.facebook.com/hackercup/problem/169401886867367/
__author__ = "Moonis Javed"
__email__ = "[email protected]"
def numberOfDays(arr):
arr = sorted(arr)
n = 0
while len(arr) > 0:
k = arr[-1]
w = k
del arr[-1]
while w <= 50:
try:
del arr[0]
w += k
except:
break
if w > 50:
... | 18.333333 | 61 | 0.568182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 165 | 0.25 |
ce14a275a0957db889a40c045e5b451a0b8f836f | 331 | py | Python | examples/robot_mock.py | gmamaladze/robo-pi | f9affc63760774073a3b1de4e4ea064bde2eb074 | [
"MIT"
] | 1 | 2020-04-24T21:34:01.000Z | 2020-04-24T21:34:01.000Z | examples/robot_mock.py | gmamaladze/robo-pi | f9affc63760774073a3b1de4e4ea064bde2eb074 | [
"MIT"
] | 10 | 2019-12-16T20:55:38.000Z | 2022-02-09T23:33:51.000Z | examples/robot_mock.py | gmamaladze/tf-voice-pi | f9affc63760774073a3b1de4e4ea064bde2eb074 | [
"MIT"
] | null | null | null | class Robot:
def __init__(self, left="MOTOR4", right="MOTOR2", config=1):
print("init")
def forward(self):
print("forward")
def backward(self):
print("backward")
def left(self):
print("left")
def right(self):
print("right")
def stop(self):
pri... | 17.421053 | 64 | 0.537764 | 330 | 0.996979 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.181269 |
ce14ba7248ea553bc8bf340da9e895166445335c | 47 | py | Python | libs/messaging_service/__init__.py | wip-abramson/aries-jupyter-playground | 872f1a319f9072d7160298fcce82fb64c93d7397 | [
"Apache-2.0"
] | 6 | 2021-05-27T12:51:32.000Z | 2022-01-11T05:49:12.000Z | libs/messaging_service/__init__.py | SoftwareImpacts/SIMPAC-2021-64 | 4089946109e05516bbea70359d3bf1d02b245f4a | [
"Apache-2.0"
] | 2 | 2021-10-05T07:38:05.000Z | 2022-02-10T11:38:18.000Z | libs/messaging_service/__init__.py | SoftwareImpacts/SIMPAC-2021-64 | 4089946109e05516bbea70359d3bf1d02b245f4a | [
"Apache-2.0"
] | 7 | 2021-04-22T14:18:06.000Z | 2022-02-14T10:30:52.000Z | from .messaging_service import MessagingService | 47 | 47 | 0.914894 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ce1563691214ec353e2ec66f0c158ddd18f4c456 | 556 | py | Python | Ex087.py | andrade-lcs/ex_curso_em_video_python | f2d029efe7a20cdf0fcb5b602f9992e27d37c263 | [
"MIT"
] | null | null | null | Ex087.py | andrade-lcs/ex_curso_em_video_python | f2d029efe7a20cdf0fcb5b602f9992e27d37c263 | [
"MIT"
] | null | null | null | Ex087.py | andrade-lcs/ex_curso_em_video_python | f2d029efe7a20cdf0fcb5b602f9992e27d37c263 | [
"MIT"
] | null | null | null | from random import randint
s = t = ma = 0
m = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
for l in range(0, 3):
for c in range(0, 3):
m[l][c] = randint(0, 100)
print('-='*15)
for l in range(0, 3):
t += m[l][2]
for c in range(0, 3):
print(f'[{m[l][c]:^5}]', end='')
if m[l][c] % 2 == 0:
... | 27.8 | 53 | 0.47482 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 150 | 0.267857 |
ce1579bf8768e7cef70aebd7b3896b98ea1a0187 | 54 | py | Python | networkx-d3-v2/networkx/tests/__init__.py | suraj-testing2/Clock_Websites | 0e65331da40cfd3766f1bde17f0a9c7ff6666dea | [
"Apache-2.0"
] | null | null | null | networkx-d3-v2/networkx/tests/__init__.py | suraj-testing2/Clock_Websites | 0e65331da40cfd3766f1bde17f0a9c7ff6666dea | [
"Apache-2.0"
] | null | null | null | networkx-d3-v2/networkx/tests/__init__.py | suraj-testing2/Clock_Websites | 0e65331da40cfd3766f1bde17f0a9c7ff6666dea | [
"Apache-2.0"
] | null | null | null | from .utils_tests import *
from .views_tests import *
| 18 | 26 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ce1581e90ef98f01e93c9852612c4c137d683a10 | 7,851 | py | Python | ros/src/waypoint_updater/waypoint_updater.py | dan-fern/CarND-Capstone-P9 | 004853c7a14dfd5e99563c4082e7609885b4f6b2 | [
"MIT"
] | null | null | null | ros/src/waypoint_updater/waypoint_updater.py | dan-fern/CarND-Capstone-P9 | 004853c7a14dfd5e99563c4082e7609885b4f6b2 | [
"MIT"
] | null | null | null | ros/src/waypoint_updater/waypoint_updater.py | dan-fern/CarND-Capstone-P9 | 004853c7a14dfd5e99563c4082e7609885b4f6b2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy as rp
import numpy as np
import math as math
from geometry_msgs.msg import PoseStamped, TwistStamped
from styx_msgs.msg import Lane, Waypoint
from scipy.spatial import KDTree
from std_msgs.msg import Int32
'''
This node will publish waypoints from the car's current position to some... | 31.154762 | 98 | 0.610495 | 6,734 | 0.857725 | 0 | 0 | 0 | 0 | 0 | 0 | 1,391 | 0.177175 |
ce1627eb06d19834ba84ea0cd7b1055080fe6187 | 595 | py | Python | oandapy/exceptions.py | extreme4all/oandapy | 48dcfbe154316a83ca6e62e6b939062165cabc3e | [
"MIT"
] | null | null | null | oandapy/exceptions.py | extreme4all/oandapy | 48dcfbe154316a83ca6e62e6b939062165cabc3e | [
"MIT"
] | null | null | null | oandapy/exceptions.py | extreme4all/oandapy | 48dcfbe154316a83ca6e62e6b939062165cabc3e | [
"MIT"
] | null | null | null | """Exceptions."""
class OandaError(Exception):
""" Generic error class, catches oanda response errors
"""
def __init__(self, error_response):
self.error_response = error_response
msg = f"OANDA API returned error code {error_response['code']} ({error_response['message']}) "
super... | 29.75 | 103 | 0.67563 | 571 | 0.959664 | 0 | 0 | 0 | 0 | 0 | 0 | 267 | 0.448739 |
ce1666960c0a0228d2a06407d11294362e8b8691 | 4,444 | py | Python | synthesis/reverse_map/reverse_map_ast.py | jajajaqlt/nsg | 1873f2b5e10441110c3c69940ceb4650f9684ac0 | [
"Apache-2.0"
] | 10 | 2021-11-02T18:30:38.000Z | 2022-03-21T06:31:33.000Z | synthesis/reverse_map/reverse_map_ast.py | rohanmukh/nag | f2c4b8e60a97c58a6a1c549cc8b4753ebfe8a5e3 | [
"Apache-2.0"
] | 2 | 2021-11-05T18:40:42.000Z | 2022-03-30T04:33:08.000Z | synthesis/reverse_map/reverse_map_ast.py | rohanmukh/nag | f2c4b8e60a97c58a6a1c549cc8b4753ebfe8a5e3 | [
"Apache-2.0"
] | 2 | 2021-11-03T19:14:06.000Z | 2021-11-03T23:47:09.000Z | # Copyright 2017 Rice University
#
# 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 writin... | 36.727273 | 120 | 0.599685 | 3,679 | 0.827858 | 0 | 0 | 0 | 0 | 0 | 0 | 623 | 0.140189 |
ce17307a9a0665319fcd15ea71bb54693784de3c | 135 | py | Python | ch10/myproject_virtualenv/src/django-myproject/myproject/settings/production.py | PacktPublishing/Django-3-Web-Development-Cookbook | 6ffe6e0add93a43a9abaff62e0147dc1f4f5351a | [
"MIT"
] | 159 | 2019-11-13T14:11:39.000Z | 2022-03-24T05:47:10.000Z | ch10/myproject_virtualenv/src/django-myproject/myproject/settings/production.py | PacktPublishing/Django-3-Web-Development-Cookbook | 6ffe6e0add93a43a9abaff62e0147dc1f4f5351a | [
"MIT"
] | 34 | 2019-11-06T08:32:48.000Z | 2022-01-14T11:31:29.000Z | ch10/myproject_virtualenv/src/django-myproject/myproject/settings/production.py | PacktPublishing/Django-3-Web-Development-Cookbook | 6ffe6e0add93a43a9abaff62e0147dc1f4f5351a | [
"MIT"
] | 103 | 2019-08-15T21:35:26.000Z | 2022-03-20T05:29:11.000Z | from ._base import *
DEBUG = False
WEBSITE_URL = "https://example.com" # without trailing slash
MEDIA_URL = f"{WEBSITE_URL}/media/"
| 19.285714 | 61 | 0.718519 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.503704 |
ce1739ffa8890ca468f44112dbe677b551c2a05c | 1,657 | py | Python | v2/gui.py | appills/pyascii | 525411327ecb8835e14f8f84b3ac19f059dbd0bc | [
"MIT"
] | null | null | null | v2/gui.py | appills/pyascii | 525411327ecb8835e14f8f84b3ac19f059dbd0bc | [
"MIT"
] | null | null | null | v2/gui.py | appills/pyascii | 525411327ecb8835e14f8f84b3ac19f059dbd0bc | [
"MIT"
] | null | null | null | from tkinter import *
from tkinter import filedialog
from pyascii import main
class App:
def __init__(self, master):
#initalize myFile instance variable
self.myFile = None
self.saveFile = None
#set window height
master.minsize(height = 440, width = 680)
#create frame
frame = Frame(master)
f... | 30.127273 | 108 | 0.677127 | 1,499 | 0.904647 | 0 | 0 | 0 | 0 | 0 | 0 | 401 | 0.242004 |
ce1986e97c39f7b0d9070c20a8cf44a57d43a5a3 | 13,093 | py | Python | tests/integration_tests/test_solution/test_solution_interior.py | cwentland0/perform | e08771cb776a7e6518c43350746e2ca72f79b153 | [
"MIT"
] | 6 | 2021-03-24T21:42:06.000Z | 2022-01-28T20:00:13.000Z | tests/integration_tests/test_solution/test_solution_interior.py | cwentland0/perform | e08771cb776a7e6518c43350746e2ca72f79b153 | [
"MIT"
] | 38 | 2021-04-15T15:30:21.000Z | 2022-01-29T01:23:57.000Z | tests/integration_tests/test_solution/test_solution_interior.py | cwentland0/perform | e08771cb776a7e6518c43350746e2ca72f79b153 | [
"MIT"
] | 1 | 2021-07-03T03:13:36.000Z | 2021-07-03T03:13:36.000Z | import unittest
import os
import numpy as np
from constants import (
del_test_dir,
gen_test_dir,
get_output_mode,
solution_domain_setup,
CHEM_DICT_REACT,
SOL_PRIM_IN_REACT,
TEST_DIR,
)
from perform.constants import REAL_TYPE
from perform.system_solver import SystemSolver
from perform.input... | 39.796353 | 120 | 0.612465 | 12,535 | 0.957382 | 0 | 0 | 0 | 0 | 0 | 0 | 1,281 | 0.097839 |
ce1a18c48b194d0b3451c941f83d9e8945a1714d | 4,139 | py | Python | tests/system/post_cars_positive_test.py | ikostan/REST_API_AUTOMATION | cdb4d30fbc7457b2a403b4dad6fe1efa2e754681 | [
"Unlicense"
] | 8 | 2020-03-17T09:15:28.000Z | 2022-01-29T19:50:45.000Z | tests/system/post_cars_positive_test.py | ikostan/REST_API_AUTOMATION | cdb4d30fbc7457b2a403b4dad6fe1efa2e754681 | [
"Unlicense"
] | 1 | 2021-06-02T00:26:58.000Z | 2021-06-02T00:26:58.000Z | tests/system/post_cars_positive_test.py | ikostan/REST_API_AUTOMATION | cdb4d30fbc7457b2a403b4dad6fe1efa2e754681 | [
"Unlicense"
] | 1 | 2021-11-22T16:10:27.000Z | 2021-11-22T16:10:27.000Z | #!/path/to/interpreter
"""
Flask App REST API testing: POST
"""
# Created by Egor Kostan.
# GitHub: https://github.com/ikostan
# LinkedIn: https://www.linkedin.com/in/egor-kostan/
import allure
import requests
from tests.system.base_test import BaseTestCase
from api.cars_app import USER_LIST
@allure.epic('Simpl... | 31.59542 | 64 | 0.490457 | 3,659 | 0.88403 | 0 | 0 | 3,837 | 0.927036 | 0 | 0 | 1,196 | 0.288959 |
ce1a3fb80b6bbd849c64cd660cd72979f447cba6 | 1,165 | py | Python | bin/h5zero.py | ickc/dautil-py | 9cdd87080ec85774d7386e3cd2f55c2bc6b6aadd | [
"BSD-3-Clause"
] | null | null | null | bin/h5zero.py | ickc/dautil-py | 9cdd87080ec85774d7386e3cd2f55c2bc6b6aadd | [
"BSD-3-Clause"
] | null | null | null | bin/h5zero.py | ickc/dautil-py | 9cdd87080ec85774d7386e3cd2f55c2bc6b6aadd | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
'''Assert HDF5 input is non-zero.
Print to stderr if not.
For example,
find . -iname '*.hdf5' -exec h5zero.py {} +
'''
from __future__ import print_function
import argparse
import sys
import h5py
from dautil.IO.h5 import h5assert_nonzero
__version__ = '0.1'
def main(args):
for filenam... | 23.3 | 82 | 0.612017 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 358 | 0.307296 |
ce1a78c4b8b64234867f3d62b124351c7a4de964 | 195 | py | Python | cla_backend/apps/core/validators.py | uk-gov-mirror/ministryofjustice.cla_backend | 4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6 | [
"MIT"
] | 3 | 2019-10-02T15:31:03.000Z | 2022-01-13T10:15:53.000Z | cla_backend/apps/core/validators.py | uk-gov-mirror/ministryofjustice.cla_backend | 4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6 | [
"MIT"
] | 206 | 2015-01-02T16:50:11.000Z | 2022-02-16T20:16:05.000Z | cla_backend/apps/core/validators.py | uk-gov-mirror/ministryofjustice.cla_backend | 4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6 | [
"MIT"
] | 6 | 2015-03-23T23:08:42.000Z | 2022-02-15T17:04:44.000Z | from django.core.exceptions import ValidationError
def validate_first_of_month(value):
if value.day != 1:
raise ValidationError("%s should only be first day of the month." % value)
| 27.857143 | 82 | 0.733333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.220513 |
ce1ae0dcedfa059f4a8bffab465b0fca2f146769 | 51 | py | Python | app/_version.py | sunhailin-Leo/myMacAssistant | 30ba955a4f91a800197cbfdc2ab5d3a5cd993eef | [
"MIT"
] | 63 | 2020-11-02T00:58:49.000Z | 2022-03-20T21:39:02.000Z | fastapi_profiler/_version.py | sunhailin-Leo/fastapi_profiler | b414af6f0b2d92e7b509b6b3e54cde13ec5795e2 | [
"MIT"
] | 10 | 2021-02-23T11:00:39.000Z | 2022-02-07T02:44:05.000Z | app/_version.py | sunhailin-Leo/myMacAssistant | 30ba955a4f91a800197cbfdc2ab5d3a5cd993eef | [
"MIT"
] | 7 | 2020-11-24T08:34:46.000Z | 2022-01-10T12:58:51.000Z | __version__ = "1.0.0"
__author__ = "sunhailin-Leo"
| 17 | 28 | 0.705882 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.431373 |
ce1e707dde07e49cd3190510d21820c11fc3a580 | 1,525 | py | Python | Week6/GFG(Day8-14)/Day14/Day14 - Solution.py | ShreyaPanale/100DaysOfCode | de7832d97fca36f783812868b867676b6f77c7b3 | [
"MIT"
] | 22 | 2021-05-25T16:01:31.000Z | 2021-06-07T06:32:27.000Z | Week6/GFG(Day8-14)/Day14/Day14 - Solution.py | shreya-panale/100DaysOfCode | de7832d97fca36f783812868b867676b6f77c7b3 | [
"MIT"
] | null | null | null | Week6/GFG(Day8-14)/Day14/Day14 - Solution.py | shreya-panale/100DaysOfCode | de7832d97fca36f783812868b867676b6f77c7b3 | [
"MIT"
] | null | null | null | #User function Template for python3
class Solution:
def calculateSpan(self,a,n):
Span = [0 for i in range(n)]
stack = [0]
#span value of first day is always 1.
Span[0] = 1
for i in range(1, n):
#we pop elements from the stack till price at top of stack is less th... | 28.773585 | 117 | 0.593443 | 848 | 0.556066 | 0 | 0 | 82 | 0.05377 | 0 | 0 | 523 | 0.342951 |
ce1e9aca26ecdef56f6ff4c3c6d9a23230b8bd4f | 2,768 | py | Python | test/tests.py | jasedit/papers_base | af8aa6e9a164861ad7b44471ce543002fa7129d9 | [
"MIT"
] | 8 | 2016-08-17T14:40:49.000Z | 2020-03-05T00:08:07.000Z | test/tests.py | jasedit/scriptorium | af8aa6e9a164861ad7b44471ce543002fa7129d9 | [
"MIT"
] | 35 | 2016-08-07T19:58:02.000Z | 2021-05-09T10:08:06.000Z | test/tests.py | jasedit/scriptorium | af8aa6e9a164861ad7b44471ce543002fa7129d9 | [
"MIT"
] | 2 | 2017-09-21T17:57:46.000Z | 2019-06-30T13:06:21.000Z | #!python
# -*- coding: utf-8 -*-
"""Unit testing for scriptorium"""
import os
import tempfile
import shutil
import textwrap
import unittest
import scriptorium
class TestScriptorium(unittest.TestCase):
@classmethod
def setUpClass(cls):
"""Set up unit tests for scriptorium"""
TestScriptorium.templa... | 31.816092 | 101 | 0.688223 | 2,557 | 0.923772 | 0 | 0 | 570 | 0.205925 | 0 | 0 | 759 | 0.274205 |
ce1f98db217162180757b8a6044a17804f866924 | 4,794 | py | Python | imblearn/combine/tests/test_smote_enn.py | themrzmaster/imbalanced-learn | e1be8695b22ca58aa5443057b9ae3f2885a45d60 | [
"MIT"
] | 2 | 2019-09-14T23:23:35.000Z | 2019-09-16T18:17:19.000Z | imblearn/combine/tests/test_smote_enn.py | themrzmaster/imbalanced-learn | e1be8695b22ca58aa5443057b9ae3f2885a45d60 | [
"MIT"
] | null | null | null | imblearn/combine/tests/test_smote_enn.py | themrzmaster/imbalanced-learn | e1be8695b22ca58aa5443057b9ae3f2885a45d60 | [
"MIT"
] | 1 | 2021-04-23T04:46:10.000Z | 2021-04-23T04:46:10.000Z | """Test the module SMOTE ENN."""
# Authors: Guillaume Lemaitre <[email protected]>
# Christos Aridas
# License: MIT
import pytest
import numpy as np
from sklearn.utils.testing import assert_allclose, assert_array_equal
from imblearn.combine import SMOTEENN
from imblearn.under_sampling import EditedNear... | 38.047619 | 79 | 0.635378 | 0 | 0 | 0 | 0 | 325 | 0.067793 | 0 | 0 | 295 | 0.061535 |
ce21a48448d28f3cf598b5cbc7c2ecedcc9ebfb2 | 46,925 | py | Python | tests/unittests/test_mock_network_plugin_public_nat.py | cloudify-cosmo/tosca-vcloud-plugin | c5196abd066ba5315b66911e5390b0ed6c15988f | [
"Apache-2.0"
] | 4 | 2015-02-25T12:39:01.000Z | 2018-02-14T15:14:16.000Z | tests/unittests/test_mock_network_plugin_public_nat.py | cloudify-cosmo/tosca-vcloud-plugin | c5196abd066ba5315b66911e5390b0ed6c15988f | [
"Apache-2.0"
] | 45 | 2015-01-13T13:55:10.000Z | 2020-02-04T15:06:15.000Z | tests/unittests/test_mock_network_plugin_public_nat.py | cloudify-cosmo/tosca-vcloud-plugin | c5196abd066ba5315b66911e5390b0ed6c15988f | [
"Apache-2.0"
] | 21 | 2015-01-21T17:17:18.000Z | 2021-05-05T14:08:25.000Z | # Copyright (c) 2014-2020 Cloudify Platform Ltd. 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 b... | 36.919748 | 79 | 0.542248 | 45,979 | 0.97984 | 0 | 0 | 0 | 0 | 0 | 0 | 8,553 | 0.18227 |
ce21d57f1cc21cb2e5990bffc69d3403f42d2835 | 519 | py | Python | Taller_estruturas_de_control_secuenciales/Python_yere/Ejercicio_17.py | Matieljimenez/Algoritmos_y_programacion | cdc381478581e6842c6672d4840dd948833c4ec7 | [
"MIT"
] | null | null | null | Taller_estruturas_de_control_secuenciales/Python_yere/Ejercicio_17.py | Matieljimenez/Algoritmos_y_programacion | cdc381478581e6842c6672d4840dd948833c4ec7 | [
"MIT"
] | null | null | null | Taller_estruturas_de_control_secuenciales/Python_yere/Ejercicio_17.py | Matieljimenez/Algoritmos_y_programacion | cdc381478581e6842c6672d4840dd948833c4ec7 | [
"MIT"
] | null | null | null | """
Entradas
monto de dinero presupuestal-->float-->a
Salidas
dinero correspondiente para ginecologia-->float-->b
dinero correspondiente para traumatologia-->float-->c
dinero correspondiente para pediatria-->float-->d
"""
a=float(input("Presupuesto anual al Hospital rural "))
b=a*0.40
c=a*0.30
d=a*0.30
print("El presup... | 34.6 | 73 | 0.759152 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 433 | 0.829502 |
ce2288a47d9c672cc8785e5719f15a00192e23e2 | 5,926 | py | Python | tools/generate_things/generate_navigation.py | akalenuk/wordsandbuttons | c8ad9e8668fc49f4c39ae3b510e36a5a52ec3c91 | [
"Unlicense"
] | 367 | 2018-01-29T17:45:00.000Z | 2022-03-08T03:50:52.000Z | tools/generate_things/generate_navigation.py | akalenuk/wordsandbuttons | c8ad9e8668fc49f4c39ae3b510e36a5a52ec3c91 | [
"Unlicense"
] | 9 | 2017-12-21T16:48:08.000Z | 2021-01-23T17:20:20.000Z | tools/generate_things/generate_navigation.py | akalenuk/wordsandbuttons | c8ad9e8668fc49f4c39ae3b510e36a5a52ec3c91 | [
"Unlicense"
] | 20 | 2018-02-18T11:52:36.000Z | 2021-11-22T09:46:53.000Z | import os
import subprocess
PAGES_DIR = "../../pages"
keyword_note = {
'tutorials': '',
'demos': '',
'quizzes': '',
'mathematics': '',
'algorithms': '',
'programming': 'By the way, if you prefer books to blogs, <a href="https://wordsandbuttons.online/SYTYKC.pdf">there is a free book</a> that was originally made from ... | 35.48503 | 179 | 0.602599 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,244 | 0.378287 |
ce25004f312bc46b4d6a3d278373562bc87e4202 | 316 | py | Python | apps/listings/migrations/0002_remove_post_author.py | favours-io/favours | 6f26a207d2684e752857aa21e5fafa607a4707e6 | [
"MIT"
] | 11 | 2020-07-23T19:07:32.000Z | 2021-11-18T17:16:29.000Z | apps/listings/migrations/0002_remove_post_author.py | favours-io/favours | 6f26a207d2684e752857aa21e5fafa607a4707e6 | [
"MIT"
] | 16 | 2020-08-29T01:57:05.000Z | 2022-01-13T03:16:41.000Z | apps/listings/migrations/0002_remove_post_author.py | favours-io/favours | 6f26a207d2684e752857aa21e5fafa607a4707e6 | [
"MIT"
] | 4 | 2020-09-18T18:40:12.000Z | 2021-11-09T06:36:36.000Z | # Generated by Django 3.0.7 on 2020-09-22 05:14
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('listings', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='post',
name='author',
),
]
| 17.555556 | 47 | 0.575949 | 231 | 0.731013 | 0 | 0 | 0 | 0 | 0 | 0 | 85 | 0.268987 |
ce2713a447d11afd7d04a70a5793ef6b8c8b2009 | 303 | py | Python | venv/Lib/site-packages/bootstrap4/widgets.py | HRangelov/gallery | 3ccf712ef2e1765a6dfd6567d58e6678e0b2ff6f | [
"MIT"
] | 3 | 2021-02-02T11:13:15.000Z | 2021-02-10T07:26:10.000Z | venv/Lib/site-packages/bootstrap4/widgets.py | HRangelov/gallery | 3ccf712ef2e1765a6dfd6567d58e6678e0b2ff6f | [
"MIT"
] | 3 | 2021-03-30T14:15:20.000Z | 2021-09-22T19:31:57.000Z | cypher_venv/Lib/site-packages/bootstrap4/widgets.py | FrancisLangit/cypher | 4921e2f53ef8154ad63ff4de7f8068b27f29f485 | [
"MIT"
] | null | null | null | from django.forms import RadioSelect
class RadioSelectButtonGroup(RadioSelect):
"""
This widget renders a Bootstrap 4 set of buttons horizontally instead of typical radio buttons.
Much more mobile friendly.
"""
template_name = "bootstrap4/widgets/radio_select_button_group.html"
| 25.25 | 99 | 0.762376 | 263 | 0.867987 | 0 | 0 | 0 | 0 | 0 | 0 | 194 | 0.640264 |
ce2810e264659103f1cf2c4c793eb498a673a023 | 2,990 | py | Python | workflower/services/workflow/loader.py | dmenezesgabriel/workflower | db2358abdd2d133b85baea726e013e71171e5cf3 | [
"MIT"
] | null | null | null | workflower/services/workflow/loader.py | dmenezesgabriel/workflower | db2358abdd2d133b85baea726e013e71171e5cf3 | [
"MIT"
] | null | null | null | workflower/services/workflow/loader.py | dmenezesgabriel/workflower | db2358abdd2d133b85baea726e013e71171e5cf3 | [
"MIT"
] | null | null | null | import logging
import os
import traceback
from typing import List
from workflower.adapters.sqlalchemy.setup import Session
from workflower.adapters.sqlalchemy.unit_of_work import SqlAlchemyUnitOfWork
from workflower.application.event.commands import CreateEventCommand
from workflower.application.workflow.commands impo... | 32.5 | 79 | 0.596321 | 2,457 | 0.821739 | 0 | 0 | 83 | 0.027759 | 0 | 0 | 619 | 0.207023 |
ce281d8807b114456a5700d5486fb898099afb81 | 2,492 | py | Python | setup.py | neuroticnerd/dragoncon-bot | 44c4d96743cf11ea0e8eaa567100e42afa4de565 | [
"Apache-2.0"
] | 2 | 2015-12-18T05:28:02.000Z | 2018-05-24T04:18:26.000Z | setup.py | neuroticnerd/dragoncon-bot | 44c4d96743cf11ea0e8eaa567100e42afa4de565 | [
"Apache-2.0"
] | 11 | 2016-08-27T22:05:18.000Z | 2021-12-13T19:41:44.000Z | setup.py | neuroticnerd/dragoncon-bot | 44c4d96743cf11ea0e8eaa567100e42afa4de565 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import io
import os
import re
from setuptools import find_packages, setup
here = os.path.abspath(os.path.dirname(__file__))
PROJECT_MODULE = 'dragonite'
PROJECT = 'dragonite'
AUTHOR = 'Bryce Eggleton'
EMAIL = '... | 28 | 75 | 0.617978 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 940 | 0.377207 |
ce282a6ed0fc710a4b6a368e5d2307c23cfaf901 | 3,427 | py | Python | backend/api.py | RuiL1904/Hackathon | 94eed04b2fa3fb48b3479045a0b279b0217744fb | [
"MIT"
] | 5 | 2022-02-20T12:59:19.000Z | 2022-02-20T17:30:49.000Z | backend/api.py | RuiL1904/Hackathon | 94eed04b2fa3fb48b3479045a0b279b0217744fb | [
"MIT"
] | null | null | null | backend/api.py | RuiL1904/Hackathon | 94eed04b2fa3fb48b3479045a0b279b0217744fb | [
"MIT"
] | 1 | 2022-03-08T20:21:03.000Z | 2022-03-08T20:21:03.000Z | import random
import database
from fastapi import FastAPI, Request
from fastapi.middleware.cors import CORSMiddleware
import uvicorn
# Instantiate FastAPI
app = FastAPI()
# Whitelist origins
app.add_middleware(
CORSMiddleware,
allow_origins = ["*"],
allow_credentials = True,
allow_methods = ["*"],
... | 26.160305 | 121 | 0.569594 | 0 | 0 | 0 | 0 | 2,139 | 0.624161 | 1,862 | 0.543332 | 523 | 0.152612 |
ce282fdf98dc253cf62921347890761e924022a6 | 1,211 | py | Python | lfs/portlet/models/pages.py | zhammami/django-lfs | b921295e71fe827377a67b5e7ae1a8bf7f72a1e6 | [
"BSD-3-Clause"
] | null | null | null | lfs/portlet/models/pages.py | zhammami/django-lfs | b921295e71fe827377a67b5e7ae1a8bf7f72a1e6 | [
"BSD-3-Clause"
] | null | null | null | lfs/portlet/models/pages.py | zhammami/django-lfs | b921295e71fe827377a67b5e7ae1a8bf7f72a1e6 | [
"BSD-3-Clause"
] | null | null | null | # django imports
from django import forms
from django.conf import settings
from django.core.cache import cache
from django.template.loader import render_to_string
# portlets imports
from portlets.models import Portlet
# lfs imports
from lfs.page.models import Page
class PagesPortlet(Portlet):
"""Portlet to disp... | 24.714286 | 85 | 0.641618 | 938 | 0.774566 | 0 | 0 | 0 | 0 | 0 | 0 | 235 | 0.194055 |
ce2b25ff23e864e881234a2380df580d2b3d114d | 829 | py | Python | feed/models.py | kassupto007/photo-sharing-app | 97ed237815134fd3d53431be348a050c505db499 | [
"Apache-2.0"
] | null | null | null | feed/models.py | kassupto007/photo-sharing-app | 97ed237815134fd3d53431be348a050c505db499 | [
"Apache-2.0"
] | null | null | null | feed/models.py | kassupto007/photo-sharing-app | 97ed237815134fd3d53431be348a050c505db499 | [
"Apache-2.0"
] | null | null | null | from django.conf import settings
from django.db import models
from django.utils import timezone
from users.models import Profile
class Post(models.Model):
description = models.CharField(max_length=255)
picture = models.ImageField(upload_to='posts', blank=True)
date_posted = models.DateTimeField(auto_now_a... | 37.681818 | 106 | 0.77684 | 694 | 0.837153 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.032569 |
ce2ba9ff2aa3d5ef4daa942e79661e4a012dddf3 | 2,168 | py | Python | zampol/osoba/admin.py | VadymRud/zampolit | 80bbd5dc197041c3595831a8d0ddae130e10418c | [
"Apache-2.0"
] | null | null | null | zampol/osoba/admin.py | VadymRud/zampolit | 80bbd5dc197041c3595831a8d0ddae130e10418c | [
"Apache-2.0"
] | null | null | null | zampol/osoba/admin.py | VadymRud/zampolit | 80bbd5dc197041c3595831a8d0ddae130e10418c | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from django.db import models
from django.utils.translation import gettext as _
from .models import (MilitaryRank, Platoon, ServiseID, Unit, OfficialPosition, Company,
Education, Creed, Nationality, Command)
from osoba.widgets import CustomDatePickerInput
class Ser... | 31.882353 | 95 | 0.571494 | 1,549 | 0.708924 | 0 | 0 | 0 | 0 | 0 | 0 | 862 | 0.394508 |
ce2c3b1def15247a90a747a7d6db93245d2f364a | 725 | py | Python | python/src/problem/leetcode/easy/leetcode_189.py | yipwinghong/Algorithm | e594df043c9d965dbfbd958554e88c533c844a45 | [
"MIT"
] | 9 | 2019-10-31T16:58:31.000Z | 2022-02-08T08:42:30.000Z | python/src/problem/leetcode/easy/leetcode_189.py | yipwinghong/Algorithm | e594df043c9d965dbfbd958554e88c533c844a45 | [
"MIT"
] | null | null | null | python/src/problem/leetcode/easy/leetcode_189.py | yipwinghong/Algorithm | e594df043c9d965dbfbd958554e88c533c844a45 | [
"MIT"
] | null | null | null | # coding=utf-8
from typing import List
class Solution:
"""
旋转数组
"""
def reverse(self, nums: List[int], i: int, j: int) -> None:
"""
:param nums:
:param i:
:param j:
:return:
"""
while i < j:
nums[i], nums[j] = nums[j], nums[i]
... | 18.589744 | 63 | 0.411034 | 690 | 0.941337 | 0 | 0 | 0 | 0 | 0 | 0 | 235 | 0.3206 |
ce2e1eeb2d14e83f19c6e30702d48f326de87b43 | 931 | py | Python | brainmix_register/display/display.py | ThunderShiviah/brainmix-register | fd42445ed2649ae8bdbb3c3e653adc4465190052 | [
"MIT",
"Unlicense"
] | 4 | 2015-07-10T01:13:43.000Z | 2018-07-08T09:05:05.000Z | brainmix_register/display/display.py | ThunderShiviah/brainmix-register | fd42445ed2649ae8bdbb3c3e653adc4465190052 | [
"MIT",
"Unlicense"
] | 3 | 2015-04-08T17:51:36.000Z | 2015-06-01T04:19:33.000Z | brainmix_register/display/display.py | ThunderShiviah/brainmix_register | fd42445ed2649ae8bdbb3c3e653adc4465190052 | [
"MIT",
"Unlicense"
] | null | null | null | import sys, os, glob
from skimage import io
from skimage import viewer
import registration as reg
from skimage import data
def display():
pass
if __name__ == "__main__":
# ------------------Create input ndarray------------------------
inputDir = '../data/test/'
imageFiles = glob.glob(os.path.join(inp... | 25.861111 | 76 | 0.61869 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 225 | 0.241676 |
ce30447567aca3b3740596e2dcf70ae66968d0b3 | 1,605 | py | Python | lib/datasets/LFW2G.py | blacknwhite5/facial-anonymizer | 48878f0b704cc9203b6e13b962f0b53cecae78c6 | [
"MIT"
] | 10 | 2019-04-18T03:30:55.000Z | 2021-04-03T22:51:50.000Z | lib/datasets/LFW2G.py | blacknwhite5/facial-anonymizer | 48878f0b704cc9203b6e13b962f0b53cecae78c6 | [
"MIT"
] | 3 | 2020-05-28T15:04:05.000Z | 2020-12-16T10:31:42.000Z | lib/datasets/LFW2G.py | blacknwhite5/facial-anonymizer | 48878f0b704cc9203b6e13b962f0b53cecae78c6 | [
"MIT"
] | 6 | 2019-04-15T11:16:02.000Z | 2021-09-08T03:16:49.000Z | import numpy as np
import torch
import torch.utils.data as data
from PIL import Image, ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
import os, random, glob, cv2
class LFW2G(data.Dataset):
def __init__(self, data_dir='data', transform=None):
super(LFW2G, self).__init__()
self.indexlist = glob.gl... | 32.1 | 91 | 0.63053 | 704 | 0.438629 | 0 | 0 | 0 | 0 | 0 | 0 | 107 | 0.066667 |
ce307dac43c76b9afca0ff0e962a64169f480199 | 4,536 | py | Python | questions.py | lasyasreepada/iplaw-for-digital-teens | a1ac53f7b3438876db644450413f78ec8d612bac | [
"MIT"
] | null | null | null | questions.py | lasyasreepada/iplaw-for-digital-teens | a1ac53f7b3438876db644450413f78ec8d612bac | [
"MIT"
] | null | null | null | questions.py | lasyasreepada/iplaw-for-digital-teens | a1ac53f7b3438876db644450413f78ec8d612bac | [
"MIT"
] | null | null | null | """Set of questions for the IP Law quiz
questions.py
Lasya Sreepada
Yale College '19
May 6, 2017
"""
from random import shuffle
import time
def quiz():
questions = [
("Copyright protects both expression of an idea and the idea itself. \nTrue or False?", "f", "cp"),
("Clothing, such as Katy Perr... | 49.846154 | 334 | 0.665785 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,227 | 0.709231 |
ce313caa11cce1219bbc0ca784238958335d4a0b | 529 | py | Python | Python/leetcode/Triangle.py | darrencheng0817/AlgorithmLearning | aec1ddd0c51b619c1bae1e05f940d9ed587aa82f | [
"MIT"
] | 2 | 2015-12-02T06:44:01.000Z | 2016-05-04T21:40:54.000Z | Python/leetcode/Triangle.py | darrencheng0817/AlgorithmLearning | aec1ddd0c51b619c1bae1e05f940d9ed587aa82f | [
"MIT"
] | null | null | null | Python/leetcode/Triangle.py | darrencheng0817/AlgorithmLearning | aec1ddd0c51b619c1bae1e05f940d9ed587aa82f | [
"MIT"
] | null | null | null | '''
Created on 1.12.2016
@author: Darren
''''''
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.
For example, given the following triangle
[
[2],
[3,4],
[6,5,7],
[4,1,8,3]
]
The minimum path... | 18.892857 | 126 | 0.587902 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 527 | 0.996219 |
ce31a76d07584d9441c2b8024946e9ee56bc2a7f | 8,286 | py | Python | regulations/tests/layers_toc_applier_tests.py | contolini/regulations-site | c31a9ce3097910877657f61b4c19a4ccbd0f967f | [
"CC0-1.0"
] | 18 | 2015-01-14T15:58:45.000Z | 2019-08-17T06:15:59.000Z | regulations/tests/layers_toc_applier_tests.py | contolini/regulations-site | c31a9ce3097910877657f61b4c19a4ccbd0f967f | [
"CC0-1.0"
] | 142 | 2015-01-08T15:28:50.000Z | 2018-07-16T16:48:07.000Z | regulations/tests/layers_toc_applier_tests.py | contolini/regulations-site | c31a9ce3097910877657f61b4c19a4ccbd0f967f | [
"CC0-1.0"
] | 45 | 2015-01-26T16:24:46.000Z | 2021-02-20T10:50:59.000Z | from unittest import TestCase
from regulations.generator.layers.toc_applier import *
class TableOfContentsLayerTest(TestCase):
def test_section(self):
toc = TableOfContentsLayer(None)
el = {}
toc.section(el, {'index': ['1']})
self.assertEqual({}, el)
toc.section(el, {'in... | 40.223301 | 79 | 0.506758 | 8,197 | 0.989259 | 0 | 0 | 0 | 0 | 0 | 0 | 2,661 | 0.321144 |
ce33d42b39da049e5244eeed1b27927c33f5fb8c | 1,929 | py | Python | array_range.py | fasiha/array-range-slices-py | 940bfd1879a7e041b59349f6d9cbc2d79dacb891 | [
"Unlicense"
] | 1 | 2021-02-03T14:01:56.000Z | 2021-02-03T14:01:56.000Z | array_range.py | fasiha/array-range-slices-py | 940bfd1879a7e041b59349f6d9cbc2d79dacb891 | [
"Unlicense"
] | null | null | null | array_range.py | fasiha/array-range-slices-py | 940bfd1879a7e041b59349f6d9cbc2d79dacb891 | [
"Unlicense"
] | null | null | null | """
Numpy's `split` can split a multidimensional array into non-overlapping
sub-arrays. However, this is not a memory-efficient way of dealing with
non-overlapping partitions of an array because it effectively doubles
memory usage.
This module provides an iterable generator that produces tuples of slices,
each of whic... | 41.042553 | 87 | 0.729912 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,395 | 0.723173 |
ce34ebaf15612703873e6a27020070246ab042d8 | 7,197 | py | Python | test-framework/test-suites/integration/tests/add/test_add_host_bonded.py | knutsonchris/stacki | 33087dd5fa311984a66ccecfeee6f9c2c25f665d | [
"BSD-3-Clause"
] | 123 | 2015-05-12T23:36:45.000Z | 2017-07-05T23:26:57.000Z | test-framework/test-suites/integration/tests/add/test_add_host_bonded.py | knutsonchris/stacki | 33087dd5fa311984a66ccecfeee6f9c2c25f665d | [
"BSD-3-Clause"
] | 177 | 2015-06-05T19:17:47.000Z | 2017-07-07T17:57:24.000Z | test-framework/test-suites/integration/tests/add/test_add_host_bonded.py | knutsonchris/stacki | 33087dd5fa311984a66ccecfeee6f9c2c25f665d | [
"BSD-3-Clause"
] | 32 | 2015-06-07T02:25:03.000Z | 2017-06-23T07:35:35.000Z | import json
from textwrap import dedent
import pytest
@pytest.mark.usefixtures("add_host_with_interface")
class TestAddHostBonded:
def test_no_hosts(self, host):
result = host.run('stack add host bonded')
assert result.rc == 255
assert result.stderr == dedent('''\
error - "host" argument is required
{ho... | 28.559524 | 106 | 0.632208 | 7,087 | 0.984716 | 0 | 0 | 7,139 | 0.991941 | 0 | 0 | 4,104 | 0.570238 |
ce3501af1f45e1223934bba47fc0e9a49f9b32bd | 1,669 | py | Python | BITs/2014/Kozlov_A_D/task_8_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Kozlov_A_D/task_8_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Kozlov_A_D/task_8_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 8. Вариант 11.
#1-50. Доработайте игру "Анаграммы" (см. М.Доусон Программируем на Python. Гл.4) так, чтобы к каждому слову полагалась подсказка. Игрок должен получать право на подсказку в том случае, если у него нет никаких предположений. Разработайте систему начисления очков, по которой бы игроки, отгадавшие ... | 37.088889 | 362 | 0.656681 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,689 | 0.710261 |
ce358cccd6bb9246d24f50b9e468818c256a0701 | 1,254 | py | Python | master/teachkids-master/teachkids-master/ch09/Challenge2_ColorPaint.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/teachkids-master/teachkids-master/ch09/Challenge2_ColorPaint.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/teachkids-master/teachkids-master/ch09/Challenge2_ColorPaint.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | # ColorPaint.py
import pygame # setup
import random
pygame.init()
screen = pygame.display.set_mode([800, 600])
pygame.display.set_caption('Click and drag to draw, using up to 3 mouse buttons')
keepGoing = True
ORANGE = (255,255,0) # RGB color triplets for 3 mousebutton colors
GREEN = (0,25... | 36.882353 | 81 | 0.587719 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 251 | 0.200159 |
ce35c483fa1d1e28e070fa3ddb8145549538c79c | 14,508 | py | Python | eventmanager/events/tests.py | karinakozarova/EventManager | b09fa7a788b4aa11761fc34096cc711304c288c7 | [
"MIT"
] | 4 | 2019-01-06T16:58:20.000Z | 2019-04-08T10:20:46.000Z | eventmanager/events/tests.py | EventManagerTeam/EventManager | b09fa7a788b4aa11761fc34096cc711304c288c7 | [
"MIT"
] | 297 | 2018-11-14T13:59:19.000Z | 2022-03-11T23:33:28.000Z | eventmanager/events/tests.py | karinakozarova/EventManager | b09fa7a788b4aa11761fc34096cc711304c288c7 | [
"MIT"
] | 1 | 2019-04-22T15:17:32.000Z | 2019-04-22T15:17:32.000Z | import datetime
import unittest
from accounts.models import AccountDetails
from categories.models import Category
from django.contrib.auth.models import User
from django.test import Client
from django.test import TestCase
from django.urls import reverse
from events.models import Comment
from events.models import E... | 30.543158 | 79 | 0.565826 | 14,135 | 0.972614 | 0 | 0 | 0 | 0 | 0 | 0 | 2,615 | 0.179935 |
ce35f5d501c181ecbb1339e8615379517cb18794 | 159 | py | Python | billing/tests/views.py | hkhanna/django-stripe-billing | 75a53c183ff86b1c7edf741683ffe3330e733d87 | [
"MIT"
] | 1 | 2022-03-29T20:16:34.000Z | 2022-03-29T20:16:34.000Z | billing/tests/views.py | hkhanna/django-stripe-billing | 75a53c183ff86b1c7edf741683ffe3330e733d87 | [
"MIT"
] | 2 | 2022-02-21T17:38:22.000Z | 2022-02-22T20:56:39.000Z | billing/tests/views.py | hkhanna/django-stripe-billing | 75a53c183ff86b1c7edf741683ffe3330e733d87 | [
"MIT"
] | null | null | null | from django.views.generic import TemplateView
from .. import mixins
class ProfileView(mixins.BillingMixin, TemplateView):
template_name = "profile.html"
| 22.714286 | 53 | 0.792453 | 88 | 0.553459 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.08805 |
ce36dcd7976f6556078f7dfa2fbd33e0565d593e | 4,225 | py | Python | core/model/meta/mtl.py | Aamer98/LibFewShot_NoAffine | 1203d2a9f5cb4705038748dbda03a4b7c37bf647 | [
"MIT"
] | 1 | 2021-11-07T03:34:41.000Z | 2021-11-07T03:34:41.000Z | core/model/meta/mtl.py | taylor1355/LibFewShot | c53b4ee3772c5c8033fd54aa73586091eee2d0b0 | [
"MIT"
] | null | null | null | core/model/meta/mtl.py | taylor1355/LibFewShot | c53b4ee3772c5c8033fd54aa73586091eee2d0b0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@inproceedings{DBLP:conf/cvpr/SunLCS19,
author = {Qianru Sun and
Yaoyao Liu and
Tat{-}Seng Chua and
Bernt Schiele},
title = {Meta-Transfer Learning for Few-Shot Learning},
booktitle = {{IEEE} Conference on Computer Vision and Pattern ... | 32.751938 | 101 | 0.64568 | 3,279 | 0.776095 | 0 | 0 | 0 | 0 | 0 | 0 | 846 | 0.200237 |
ce378179f8b40837991f7c71e128ec7eb52c6132 | 1,023 | py | Python | game.py | gustavonaldoni/command-line-hangman | a740a446ce1dfad2100ab7e6ea1db817c6a57a47 | [
"MIT"
] | null | null | null | game.py | gustavonaldoni/command-line-hangman | a740a446ce1dfad2100ab7e6ea1db817c6a57a47 | [
"MIT"
] | null | null | null | game.py | gustavonaldoni/command-line-hangman | a740a446ce1dfad2100ab7e6ea1db817c6a57a47 | [
"MIT"
] | null | null | null | from capture_words import capture_words_from_file
import random
def find_letter_indexes(letter, word):
indexes = []
for index, l in enumerate(word):
if l == letter:
indexes.append(index)
return indexes
def convert_word_to_asterisks(word):
final_word = '*' * len(word)
return... | 21.765957 | 72 | 0.691105 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0.004888 |
ce37b76dcc82f7204803dfa179451058b3f38a92 | 4,895 | py | Python | src/OTLMOW/OTLModel/Classes/DwarseMarkeringVerschuind.py | davidvlaminck/OTLClassPython | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | 2 | 2022-02-01T08:58:11.000Z | 2022-02-08T13:35:17.000Z | src/OTLMOW/OTLModel/Classes/DwarseMarkeringVerschuind.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | src/OTLMOW/OTLModel/Classes/DwarseMarkeringVerschuind.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | # coding=utf-8
from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut
from OTLMOW.OTLModel.Classes.DwarseMarkeringToegang import DwarseMarkeringToegang
from OTLMOW.OTLModel.Datatypes.KlDwarseMarkeringVerschuindCode import KlDwarseMarkeringVerschuindCode
from OTLMOW.OTLModel.Datatypes.KlDwarseMarkeringVerschu... | 49.444444 | 158 | 0.608784 | 4,282 | 0.87477 | 0 | 0 | 1,293 | 0.264147 | 0 | 0 | 1,529 | 0.31236 |
ce37e19c6bb3e23ffae3d35e78de1e2b5a16ea5f | 549 | py | Python | backend/reviews/forms.py | ranwise/djangochannel | 9c719d292b5c1d0fd008a16a64509a309bdd642e | [
"BSD-3-Clause"
] | 45 | 2019-10-04T10:12:54.000Z | 2022-03-29T18:12:34.000Z | backend/reviews/forms.py | ranwise/djangochannel | 9c719d292b5c1d0fd008a16a64509a309bdd642e | [
"BSD-3-Clause"
] | 6 | 2019-10-09T07:37:14.000Z | 2022-01-27T16:41:16.000Z | backend/reviews/forms.py | ranwise/djangochannel | 9c719d292b5c1d0fd008a16a64509a309bdd642e | [
"BSD-3-Clause"
] | 35 | 2019-10-04T10:18:48.000Z | 2022-01-14T22:40:38.000Z | from django import forms
from .models import Review
class ReviewsForm(forms.ModelForm):
"""Форма добавления отзыва"""
class Meta:
model = Review
fields = ["name", "text", "social_link", "git_link"]
labels = {
"name": (""),
"text": (""),
# "social_li... | 26.142857 | 74 | 0.495446 | 532 | 0.904762 | 0 | 0 | 0 | 0 | 0 | 0 | 221 | 0.37585 |
ce3a314613ced74eaa69ae3cdf828f6c6582b325 | 6,875 | py | Python | scripts/jenkins_console_log_search.py | hrajput89/kv_engine | 33fb1ab2c9787f55555e5f7edea38807b3dbc371 | [
"BSD-3-Clause"
] | 1 | 2019-06-13T07:33:09.000Z | 2019-06-13T07:33:09.000Z | scripts/jenkins_console_log_search.py | paolococchi/kv_engine | 40256dca6bf77fb4bcc18e8ef7d9b8f991bf4e45 | [
"BSD-3-Clause"
] | null | null | null | scripts/jenkins_console_log_search.py | paolococchi/kv_engine | 40256dca6bf77fb4bcc18e8ef7d9b8f991bf4e45 | [
"BSD-3-Clause"
] | 1 | 2020-01-15T16:52:37.000Z | 2020-01-15T16:52:37.000Z | #!/usr/bin/env python3
"""
Copyright 2018 Couchbase, 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 ... | 37.162162 | 86 | 0.6336 | 59 | 0.008582 | 0 | 0 | 0 | 0 | 0 | 0 | 3,284 | 0.477673 |
ce3ac2a462ca934025f075aabb0be44931935eba | 542 | py | Python | geokey/projects/migrations/0004_auto_20150123_1507.py | universityofsussex/geokey | 25e161dbc81841c57c148053dbe99facc81e84b8 | [
"Apache-2.0"
] | null | null | null | geokey/projects/migrations/0004_auto_20150123_1507.py | universityofsussex/geokey | 25e161dbc81841c57c148053dbe99facc81e84b8 | [
"Apache-2.0"
] | null | null | null | geokey/projects/migrations/0004_auto_20150123_1507.py | universityofsussex/geokey | 25e161dbc81841c57c148053dbe99facc81e84b8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('projects', '0003_auto_20150123_1148'),
]
operations = [
migrations.AlterField(
model_name='project',
... | 25.809524 | 139 | 0.608856 | 433 | 0.798893 | 0 | 0 | 0 | 0 | 0 | 0 | 140 | 0.258303 |
ce3b5d59730c0d6fb21fce8076ca9f2a4f217a30 | 2,506 | py | Python | hr_attendance_ex/models/sql_ser_config.py | alexhong121/odoo_model | 4eff41c672bd03084eaa6eae81c8f3d359c2fb8d | [
"MIT"
] | null | null | null | hr_attendance_ex/models/sql_ser_config.py | alexhong121/odoo_model | 4eff41c672bd03084eaa6eae81c8f3d359c2fb8d | [
"MIT"
] | null | null | null | hr_attendance_ex/models/sql_ser_config.py | alexhong121/odoo_model | 4eff41c672bd03084eaa6eae81c8f3d359c2fb8d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
# import pyodbc
from odoo import models, fields, api, _
from odoo.exceptions import UserError, AccessError, MissingError
_logger = logging.getLogger(__name__)
class SQLConfig(models.Model):
_name = 'sql.config'
_description='sql_config'
_sql_constraints = [('check_... | 32.973684 | 111 | 0.602554 | 2,392 | 0.920708 | 0 | 0 | 989 | 0.380677 | 0 | 0 | 796 | 0.30639 |
ce3bab3735a9a905747cfb1ff78c996de02c146a | 223 | py | Python | core/templatetags/my_custom_tags.py | SubhanRzayev/E-commerce-Tmart | 239218397f4ee55ab6ae4ef1798fbc83bc7d1159 | [
"MIT"
] | 2 | 2021-08-13T14:23:34.000Z | 2021-09-18T08:48:29.000Z | core/templatetags/my_custom_tags.py | SubhanRzayev/E-commerce-Tmart | 239218397f4ee55ab6ae4ef1798fbc83bc7d1159 | [
"MIT"
] | null | null | null | core/templatetags/my_custom_tags.py | SubhanRzayev/E-commerce-Tmart | 239218397f4ee55ab6ae4ef1798fbc83bc7d1159 | [
"MIT"
] | null | null | null | from blog.models import Category
from django.template import Library
from core.models import *
register = Library()
@register.filter
def main_catagory(self):
if self.category == None:
return self.category
| 14.866667 | 35 | 0.735426 | 0 | 0 | 0 | 0 | 100 | 0.44843 | 0 | 0 | 0 | 0 |
ce3c2d8194ace948fc686ddfcb1f37ff3e1e1403 | 4,476 | py | Python | Object.py | LeenJooken/RFMCollaborationMiner | 5e8b2933bc9977dcc1707474f8163964dc29ea9d | [
"MIT"
] | null | null | null | Object.py | LeenJooken/RFMCollaborationMiner | 5e8b2933bc9977dcc1707474f8163964dc29ea9d | [
"MIT"
] | null | null | null | Object.py | LeenJooken/RFMCollaborationMiner | 5e8b2933bc9977dcc1707474f8163964dc29ea9d | [
"MIT"
] | null | null | null | #Represents an object
class Object:
def __init__(self,ID,name):
self.name = name
self.ID = ID
self.importance = 1
#keep track of the events in which this file was the object
self.modifiedIn = []
self.addedIn = []
self.deletedIn = []
def getName(self)... | 33.402985 | 107 | 0.629133 | 4,452 | 0.994638 | 0 | 0 | 0 | 0 | 0 | 0 | 843 | 0.188338 |
ce3e44815e1657902dc5c20dbf4073f8b104c4db | 4,336 | py | Python | centraloffice/src/ngconfiginterface/nginterface.py | dmazzer/CogRIoT | a2d71916b0f1bd79d0f5b444865279530eb6b836 | [
"MIT"
] | null | null | null | centraloffice/src/ngconfiginterface/nginterface.py | dmazzer/CogRIoT | a2d71916b0f1bd79d0f5b444865279530eb6b836 | [
"MIT"
] | null | null | null | centraloffice/src/ngconfiginterface/nginterface.py | dmazzer/CogRIoT | a2d71916b0f1bd79d0f5b444865279530eb6b836 | [
"MIT"
] | null | null | null | """
nginterface.py: NovaGenesis Interface
"""
__author__ = "Daniel Mazzer"
__copyright__ = "Copyright 2016, CogRIoT Project"
__credits__ = "Antonio Marcos Alberti"
__license__ = "MIT"
__maintainer__ = "Daniel Mazzer"
__email__ = "[email protected]"
import sys
import zmq
import threading
from bzrlib.plugins.launchpad... | 34.688 | 99 | 0.592943 | 3,924 | 0.904982 | 0 | 0 | 0 | 0 | 0 | 0 | 1,504 | 0.346863 |
ce3f6405d41b2f32d5fb0b9dca8c2d47c32a7949 | 2,625 | py | Python | tests/test_connect.py | mkniewallner/edgedb-python | 2086b866d3c87c215eecf644b2393ddd857457e0 | [
"Apache-2.0"
] | 214 | 2019-01-19T03:56:10.000Z | 2022-03-31T01:37:33.000Z | tests/test_connect.py | mkniewallner/edgedb-python | 2086b866d3c87c215eecf644b2393ddd857457e0 | [
"Apache-2.0"
] | 120 | 2019-03-19T23:01:52.000Z | 2022-03-14T08:41:27.000Z | tests/test_connect.py | mkniewallner/edgedb-python | 2086b866d3c87c215eecf644b2393ddd857457e0 | [
"Apache-2.0"
] | 24 | 2019-04-29T22:41:10.000Z | 2021-11-15T00:28:01.000Z | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2016-present MagicStack Inc. and the EdgeDB authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http... | 32.8125 | 74 | 0.632 | 1,876 | 0.714667 | 0 | 0 | 398 | 0.151619 | 722 | 0.275048 | 987 | 0.376 |
ce3f92dd86129583471cf90aca5f82b89a2e5147 | 19,947 | py | Python | .venv/Lib/site-packages/pdoc/cli.py | JohanK91/MethodDice | 73a8962c762ff48da331c9212f10676f066ed940 | [
"MIT"
] | null | null | null | .venv/Lib/site-packages/pdoc/cli.py | JohanK91/MethodDice | 73a8962c762ff48da331c9212f10676f066ed940 | [
"MIT"
] | null | null | null | .venv/Lib/site-packages/pdoc/cli.py | JohanK91/MethodDice | 73a8962c762ff48da331c9212f10676f066ed940 | [
"MIT"
] | 1 | 2021-02-22T13:55:32.000Z | 2021-02-22T13:55:32.000Z | #!/usr/bin/env python3
"""pdoc's CLI interface and helper functions."""
import argparse
import ast
import importlib
import inspect
import os
import os.path as path
import json
import re
import sys
import warnings
from contextlib import contextmanager
from functools import lru_cache
from http.server import BaseHTTPRequ... | 33.41206 | 99 | 0.587657 | 5,821 | 0.291823 | 513 | 0.025718 | 911 | 0.045671 | 0 | 0 | 6,676 | 0.334687 |
ce40a683df91507328100c3fd2d4f4e66c206aad | 4,981 | py | Python | application/helper/connection_check.py | HarshadKavathiya/acciom | 10e4d813c897bcf0078ab350d9432117cb708d1a | [
"MIT"
] | null | null | null | application/helper/connection_check.py | HarshadKavathiya/acciom | 10e4d813c897bcf0078ab350d9432117cb708d1a | [
"MIT"
] | 9 | 2019-07-23T09:55:15.000Z | 2022-02-19T01:45:12.000Z | application/helper/connection_check.py | accionlabs/acciom | 889958c0f8ec1d74db1958d0a6473c4678eaab3f | [
"MIT"
] | 21 | 2019-07-20T04:47:23.000Z | 2020-01-07T06:55:42.000Z | import cx_Oracle
import psycopg2
import pymysql
import pyodbc
from application.common.constants import APIMessages, SupportedDBType, \
GenericStrings
def connection_check(db_type_id, db_hostname, db_username, db_password,
db_name):
"""
Helper method to check the database connectivity... | 43.313043 | 79 | 0.609717 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 701 | 0.140735 |
ce40f79ba52230bce534975d34f03a0b62be130e | 701 | py | Python | src/db/alembic/tests/add_problems.py | furea2/ProofGame | 787f9be7f616c53eb9ce5a677660aee7cc824a14 | [
"MIT"
] | null | null | null | src/db/alembic/tests/add_problems.py | furea2/ProofGame | 787f9be7f616c53eb9ce5a677660aee7cc824a14 | [
"MIT"
] | null | null | null | src/db/alembic/tests/add_problems.py | furea2/ProofGame | 787f9be7f616c53eb9ce5a677660aee7cc824a14 | [
"MIT"
] | null | null | null | from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
engine = create_engine('sqlite:///db.sqlite3')
Session = sessionmaker(engine)
import sys
sys.path.append("D:\\Users\\furea2\\NodejsProjects\\login_sample\\src\\db\\alembic\\app\\models")
from problem import Problem
userList=[
Problem(ti... | 33.380952 | 97 | 0.713267 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 263 | 0.375178 |
ce41c01cf6e704d26212115f3eeca7c18fc41d33 | 2,871 | py | Python | aes/rkeys.py | raviolliii/AES-Encryption | 48434bd2cb19fc447065872cf1a1ede55ed024de | [
"MIT"
] | null | null | null | aes/rkeys.py | raviolliii/AES-Encryption | 48434bd2cb19fc447065872cf1a1ede55ed024de | [
"MIT"
] | null | null | null | aes/rkeys.py | raviolliii/AES-Encryption | 48434bd2cb19fc447065872cf1a1ede55ed024de | [
"MIT"
] | null | null | null | def uint(x):
# casts x to unsigned int (1 byte)
return x & 0xff
def chunkify(string, size):
# breaks up string into chunks of size
chunks = []
for i in range(0, len(string), size):
chunks.append(string[i:i + size])
return chunks
def gen_rcons(rounds):
# generates and returns round constants
# the round cons... | 33.383721 | 78 | 0.617207 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,057 | 0.368164 |
cbe97f3cb389489740f1e42249ec7c347020db47 | 30 | py | Python | otscrape/core/extractor/nested/__init__.py | SSripilaipong/otscrape | 73ad2ea3d20841cf5d81b37180a1f21c48e87480 | [
"MIT"
] | null | null | null | otscrape/core/extractor/nested/__init__.py | SSripilaipong/otscrape | 73ad2ea3d20841cf5d81b37180a1f21c48e87480 | [
"MIT"
] | null | null | null | otscrape/core/extractor/nested/__init__.py | SSripilaipong/otscrape | 73ad2ea3d20841cf5d81b37180a1f21c48e87480 | [
"MIT"
] | null | null | null | from .zip_dict import ZipDict
| 15 | 29 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cbea98388f135a070422bda42a79198d77ccf817 | 546 | py | Python | 10_Exceptions_and_Errors/internal.py | MANOJPATRA1991/Python-Beyond-the-Basics | aed7bfd35e33c2b1759b48e1c89314aa149c56d0 | [
"MIT"
] | null | null | null | 10_Exceptions_and_Errors/internal.py | MANOJPATRA1991/Python-Beyond-the-Basics | aed7bfd35e33c2b1759b48e1c89314aa149c56d0 | [
"MIT"
] | null | null | null | 10_Exceptions_and_Errors/internal.py | MANOJPATRA1991/Python-Beyond-the-Basics | aed7bfd35e33c2b1759b48e1c89314aa149c56d0 | [
"MIT"
] | null | null | null | def modulus_three(n):
r = n % 3
if r == 0:
print("Multiple of 3")
elif r == 1:
print("Remainder 1")
else:
assert r == 2, "Remainder is not 2"
print("Remainder 2")
def modulus_four(n):
r = n % 4
if r == 0:
print("Multiple of 4")
elif r == 1:
p... | 20.222222 | 48 | 0.507326 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 151 | 0.276557 |
cbeae155ad896dc6fd2c6c3e36347da77b95da7e | 17,038 | py | Python | ml_studio/visualate/dashboards/data_explorer.py | john-james-ai/ml-studio | 2230fcd6579d2291c761e559ec93b18ddd7a96e6 | [
"BSD-3-Clause"
] | 1 | 2020-01-30T09:37:00.000Z | 2020-01-30T09:37:00.000Z | ml_studio/visualate/dashboards/data_explorer.py | john-james-ai/ml-studio | 2230fcd6579d2291c761e559ec93b18ddd7a96e6 | [
"BSD-3-Clause"
] | 3 | 2019-12-05T19:37:59.000Z | 2020-03-31T05:49:53.000Z | ml_studio/visualate/dashboards/data_explorer.py | john-james-ai/ml-studio | 2230fcd6579d2291c761e559ec93b18ddd7a96e6 | [
"BSD-3-Clause"
] | null | null | null | # =========================================================================== #
# DATA EXPLORER #
# =========================================================================== #
# =========================================================================== #
... | 37.862222 | 145 | 0.435204 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9,226 | 0.541495 |
cbeb6bdd865a57de9bfabcbd439111e0ae5d40b5 | 1,080 | py | Python | bot.py | m2Link/YouTube-Video-Search | 0512ea220af271dc1853925026f31c32990fa4ff | [
"MIT"
] | 9 | 2021-09-30T06:25:03.000Z | 2022-02-10T05:45:23.000Z | bot.py | m2Link/YouTube-Video-Search | 0512ea220af271dc1853925026f31c32990fa4ff | [
"MIT"
] | null | null | null | bot.py | m2Link/YouTube-Video-Search | 0512ea220af271dc1853925026f31c32990fa4ff | [
"MIT"
] | 7 | 2021-09-30T06:24:56.000Z | 2022-02-10T04:52:10.000Z | from pyrogram import Client ,filters
import os
from py_youtube import Data, Search
from pyrogram.types import *
TOKEN = os.environ.get("TOKEN", "")
APP_ID = int(os.environ.get("APP_ID", ""))
API_HASH = os.environ.get("API_HASH", "")
app = Client( "yt-search",
bot_token = TOKEN, api_id =API_ID , api_hash =... | 22.5 | 78 | 0.609259 | 0 | 0 | 0 | 0 | 726 | 0.672222 | 638 | 0.590741 | 150 | 0.138889 |
cbebd1e68288c77af1b90def0eca795dc3029718 | 7,582 | py | Python | steam_review_sentiments/cnn_model.py | joshuamegnauth54/aapor_scholars_2021 | 1848083203714d2c0a205e538e91990983b3320e | [
"MIT"
] | null | null | null | steam_review_sentiments/cnn_model.py | joshuamegnauth54/aapor_scholars_2021 | 1848083203714d2c0a205e538e91990983b3320e | [
"MIT"
] | 1 | 2021-11-03T15:33:31.000Z | 2021-11-03T15:33:31.000Z | steam_review_sentiments/cnn_model.py | joshuamegnauth54/steam_user_reviews | 1848083203714d2c0a205e538e91990983b3320e | [
"MIT"
] | null | null | null | import numpy as np
import keras
import spacy
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.exceptions import NotFittedError
from keras.models import Sequential
from keras.layers import BatchNormalization, Conv1D, Dense, Embedding
from keras.layers.pooling import GlobalMaxPooling1D
from keras.... | 33.254386 | 78 | 0.587048 | 5,565 | 0.733975 | 0 | 0 | 0 | 0 | 0 | 0 | 3,636 | 0.479557 |
cbec06c90522fab416454e28ed3f8f1ea15d10d0 | 96 | py | Python | startup.py | andreagia/WEBNMR | 512a8cc04cf69300796585feae722614501389a9 | [
"Apache-2.0"
] | null | null | null | startup.py | andreagia/WEBNMR | 512a8cc04cf69300796585feae722614501389a9 | [
"Apache-2.0"
] | null | null | null | startup.py | andreagia/WEBNMR | 512a8cc04cf69300796585feae722614501389a9 | [
"Apache-2.0"
] | null | null | null | from paste.deploy import loadapp
app = loadapp("config:/home/webenmr/WebENMR/development.ini")
| 24 | 61 | 0.791667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 0.479167 |
cbef0e085fbba4e6b5fa308476e408eed61f8acc | 2,548 | py | Python | dataset/components.py | mikhailkin/dataset | 7417483fdbe2e3743af4d614cb9036fd5b1375c0 | [
"Apache-2.0"
] | null | null | null | dataset/components.py | mikhailkin/dataset | 7417483fdbe2e3743af4d614cb9036fd5b1375c0 | [
"Apache-2.0"
] | null | null | null | dataset/components.py | mikhailkin/dataset | 7417483fdbe2e3743af4d614cb9036fd5b1375c0 | [
"Apache-2.0"
] | null | null | null | """ Contains classes to handle batch data components """
class ComponentDescriptor:
""" Class for handling one component item """
def __init__(self, component, default=None):
self._component = component
self._default = default
def __get__(self, instance, cls):
try:
if ... | 34.432432 | 105 | 0.594192 | 2,482 | 0.974097 | 0 | 0 | 0 | 0 | 0 | 0 | 235 | 0.092229 |
cbefd7cba52260caad3d20e4693a2870bae5c60c | 708 | py | Python | app/models.py | owen-rpx/RainGod | ba20023c1191519edec7f12fb488c942a2e05627 | [
"MIT"
] | 7 | 2019-04-11T09:45:37.000Z | 2019-04-19T01:40:03.000Z | app/models.py | Owenzh/RainGod | ba20023c1191519edec7f12fb488c942a2e05627 | [
"MIT"
] | 5 | 2021-03-18T23:43:45.000Z | 2022-03-11T23:44:29.000Z | app/models.py | owen-rpx/RainGod | ba20023c1191519edec7f12fb488c942a2e05627 | [
"MIT"
] | 2 | 2019-04-11T09:45:39.000Z | 2019-04-19T01:39:02.000Z | #-*- coding:utf-8 -*-
from .apps import db
class User(db.Model):
__tablename__ = 'user'
user_id = db.Column(db.Integer, primary_key=True)
user_count = db.Column(db.String(100), unique=True)
user_name = db.Column(db.String(100), unique=True)
user_sex = db.Column(db.String(100))
user_pwd = db.C... | 29.5 | 57 | 0.686441 | 660 | 0.932203 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.038136 |
cbf1db6303b75bf9bb5a1fdfc15b60807174510e | 834 | py | Python | fingerExercises/fingerExercises-03/03.6-finger.how-many.py | sodaPhix/MITx-6.00.1x | 8629e227d250cf6c2d5ca56944668b5796ce78cf | [
"MIT"
] | 1 | 2019-10-06T22:58:39.000Z | 2019-10-06T22:58:39.000Z | fingerExercises/fingerExercises-03/03.6-finger.how-many.py | sodaPhix/MITx-6.00.1x | 8629e227d250cf6c2d5ca56944668b5796ce78cf | [
"MIT"
] | null | null | null | fingerExercises/fingerExercises-03/03.6-finger.how-many.py | sodaPhix/MITx-6.00.1x | 8629e227d250cf6c2d5ca56944668b5796ce78cf | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 7 03:26:16 2019
@author: sodatab
MITx: 6.00.1x
"""
"""
03.6-Finger How Many
---------------------
Consider the following sequence of expressions:
animals = { 'a': ['aardvark'], 'b': ['baboon'], 'c': ['coati']}
animals['d'] = ['donkey']
animals... | 22.540541 | 118 | 0.631894 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 723 | 0.866906 |
cbf29fc594fa3d410506fc9b2b10ddf99a2f2899 | 1,569 | py | Python | test/const.py | DaniFdezAlvarez/shexerp3 | 80c3bdaac856a88d53359f5996477994774d34e2 | [
"Apache-2.0"
] | 3 | 2019-06-24T18:13:06.000Z | 2020-08-06T03:08:23.000Z | test/const.py | DaniFdezAlvarez/shexerp3 | 80c3bdaac856a88d53359f5996477994774d34e2 | [
"Apache-2.0"
] | 109 | 2019-05-22T11:53:05.000Z | 2021-03-15T11:09:18.000Z | test/const.py | DaniFdezAlvarez/shexerp3 | 80c3bdaac856a88d53359f5996477994774d34e2 | [
"Apache-2.0"
] | 2 | 2019-10-23T13:06:31.000Z | 2020-07-31T09:59:15.000Z | BASE_FILES = "C:\\Users\\Dani\\repos-git\\shexerp3\\test\\t_files\\"
BASE_FILES_GENERAL = BASE_FILES + "general\\"
G1 = BASE_FILES + "t_graph_1.ttl"
G1_NT = BASE_FILES + "t_graph_1.nt"
G1_TSVO_SPO = BASE_FILES + "t_graph_1.tsv"
G1_JSON_LD = BASE_FILES + "t_graph_1.json"
G1_XML = BASE_FILES + "t_graph_1.xml"
G1_N3 = B... | 42.405405 | 86 | 0.560867 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,174 | 0.748247 |
cbf2a3881275e0a82374f52818602abe974fb113 | 23,265 | py | Python | src/lookoutequipment/evaluation.py | dast1/amazon-lookout-for-equipment-python-sdk | 37213819c46b2dd3bcd4844235bececeabca8f12 | [
"Apache-2.0"
] | 3 | 2021-09-28T19:53:53.000Z | 2022-02-14T17:50:59.000Z | src/lookoutequipment/evaluation.py | dast1/amazon-lookout-for-equipment-python-sdk | 37213819c46b2dd3bcd4844235bececeabca8f12 | [
"Apache-2.0"
] | null | null | null | src/lookoutequipment/evaluation.py | dast1/amazon-lookout-for-equipment-python-sdk | 37213819c46b2dd3bcd4844235bececeabca8f12 | [
"Apache-2.0"
] | 1 | 2021-11-11T18:15:14.000Z | 2021-11-11T18:15:14.000Z | # Copyright Amazon.com, Inc. or its affiliates. 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
# Unle... | 40.744308 | 105 | 0.571545 | 22,441 | 0.964582 | 0 | 0 | 0 | 0 | 0 | 0 | 9,818 | 0.422007 |
cbf2dc049f1ccb6bed778490aa18d0ea3f007439 | 793 | py | Python | src/opserver/plugins/alarm_process_connectivity/setup.py | biswajit-mandal/contrail-controller | 80c4a7e8515f7296b18ba4c21a439bd3daefcc4a | [
"Apache-2.0"
] | 3 | 2019-01-11T06:16:40.000Z | 2021-02-24T23:48:21.000Z | src/opserver/plugins/alarm_process_connectivity/setup.py | biswajit-mandal/contrail-controller | 80c4a7e8515f7296b18ba4c21a439bd3daefcc4a | [
"Apache-2.0"
] | null | null | null | src/opserver/plugins/alarm_process_connectivity/setup.py | biswajit-mandal/contrail-controller | 80c4a7e8515f7296b18ba4c21a439bd3daefcc4a | [
"Apache-2.0"
] | 18 | 2017-01-12T09:28:44.000Z | 2019-04-18T20:47:42.000Z | #
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
from setuptools import setup, find_packages
setup(
name='alarm_process_connectivity',
version='0.1dev',
packages=find_packages(),
entry_points = {
'contrail.analytics.alarms': [
'ObjectCollectorInfo = alarm_proces... | 34.478261 | 88 | 0.717528 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 517 | 0.651955 |
cbf3c9c5fb96524cab1cc99ebc8311885fc1db2a | 813 | py | Python | app/tools/dbg_queue_graph.py | samelamin/kylinmonitorbot | 00a38ca9513dceadf23bfdb19b6daab77a368e76 | [
"MIT"
] | null | null | null | app/tools/dbg_queue_graph.py | samelamin/kylinmonitorbot | 00a38ca9513dceadf23bfdb19b6daab77a368e76 | [
"MIT"
] | null | null | null | app/tools/dbg_queue_graph.py | samelamin/kylinmonitorbot | 00a38ca9513dceadf23bfdb19b6daab77a368e76 | [
"MIT"
] | null | null | null | import asyncio
import os
from localization import LocalizationManager
from services.dialog.queue_picture import queue_graph
from services.lib.config import Config
from services.lib.db import DB
from services.lib.depcont import DepContainer
async def q_points(d: DepContainer):
image = await queue_graph(d, d.loc_m... | 22.583333 | 64 | 0.693727 | 0 | 0 | 0 | 0 | 0 | 0 | 346 | 0.425584 | 67 | 0.082411 |
cbf41ad432dd52c7fa96aae20328389d8a8a2749 | 8,482 | py | Python | fenpei/job.py | mverleg/fenpei | 2142e4fe4a1e2897d8d8185ef4b86adc7323e1eb | [
"BSD-3-Clause"
] | null | null | null | fenpei/job.py | mverleg/fenpei | 2142e4fe4a1e2897d8d8185ef4b86adc7323e1eb | [
"BSD-3-Clause"
] | 2 | 2016-11-17T12:10:36.000Z | 2017-02-08T09:06:37.000Z | fenpei/job.py | mverleg/fenpei | 2142e4fe4a1e2897d8d8185ef4b86adc7323e1eb | [
"BSD-3-Clause"
] | null | null | null |
"""
Base class for fenpei job; this should be considered abstract.
Your custom job(s) should inherit from this job and extend the relevant methods, such as::
* is_prepared
* is_complete
* prepare
* start
* result
* summary
"""
from re import match
from sys import stdout
from bardeen.system import mkdirp
from time i... | 29.451389 | 157 | 0.67543 | 8,038 | 0.947654 | 0 | 0 | 0 | 0 | 0 | 0 | 3,401 | 0.400967 |
cbf53d52cd9777aefd5d176bd11a75c4a1b54abc | 303 | py | Python | Aula 07/ex6.py | diegorafaelvieira/Programacao-1 | 657a974f1215cec4aed68603e738d9a135131545 | [
"MIT"
] | null | null | null | Aula 07/ex6.py | diegorafaelvieira/Programacao-1 | 657a974f1215cec4aed68603e738d9a135131545 | [
"MIT"
] | null | null | null | Aula 07/ex6.py | diegorafaelvieira/Programacao-1 | 657a974f1215cec4aed68603e738d9a135131545 | [
"MIT"
] | null | null | null | val = int(input("Valor:"))
soma = val
maior = val
menor = val
for i in range(0,9):
val = int(input("Valor:"))
if val>maior:
maior = val
if val<menor:
menor=val
soma+=val
print("O maior valor é:",maior)
print("O menor valor é:",menor)
print("A média é:",(soma/10))
| 16.833333 | 31 | 0.570957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.221498 |
cbf5f6dcb21e20b6bc3a2e8d76fc27d3087ec7c4 | 746 | py | Python | waterbutler/providers/github/exceptions.py | KakeruMizuno/RDM-waterbutler | 58ecd801385a7572d1ed56568a31f701291c4e3e | [
"Apache-2.0"
] | 1 | 2019-05-08T02:32:17.000Z | 2019-05-08T02:32:17.000Z | waterbutler/providers/github/exceptions.py | KakeruMizuno/RDM-waterbutler | 58ecd801385a7572d1ed56568a31f701291c4e3e | [
"Apache-2.0"
] | null | null | null | waterbutler/providers/github/exceptions.py | KakeruMizuno/RDM-waterbutler | 58ecd801385a7572d1ed56568a31f701291c4e3e | [
"Apache-2.0"
] | null | null | null | from http import HTTPStatus
from waterbutler.core.exceptions import ProviderError
class GitHubUnsupportedRepoError(ProviderError):
def __init__(self, dummy):
"""``dummy`` argument is because children of ``WaterButlerError`` must be instantiable with
a single integer argument. See :class:`waterbu... | 46.625 | 99 | 0.672922 | 660 | 0.884718 | 0 | 0 | 0 | 0 | 0 | 0 | 435 | 0.58311 |
cbf60a5f54499551d07c8764354e2a5053355b82 | 899 | py | Python | buildencyclopedia.py | ZhenyuZ/gdc-docs | f024d5d4cd86dfa2c9e7d63850eee94d975b7948 | [
"Apache-2.0"
] | 67 | 2016-06-09T14:11:51.000Z | 2022-03-16T07:54:44.000Z | buildencyclopedia.py | ZhenyuZ/gdc-docs | f024d5d4cd86dfa2c9e7d63850eee94d975b7948 | [
"Apache-2.0"
] | 19 | 2016-06-21T15:51:11.000Z | 2021-06-07T09:22:20.000Z | buildencyclopedia.py | ZhenyuZ/gdc-docs | f024d5d4cd86dfa2c9e7d63850eee94d975b7948 | [
"Apache-2.0"
] | 32 | 2016-07-15T01:24:19.000Z | 2019-03-25T10:42:28.000Z | """updates the encyclopedia section in the mkdocs.yml
should be run whenever a file is removed or added into the directory"""
import os
import yaml
ABSFILEPATH = os.path.dirname(os.path.realpath(__file__))
FILEARRAY = os.listdir(ABSFILEPATH + '/docs/Encyclopedia/pages')
FILEARRAY = sorted(FILEARRAY, key=str.lower)
... | 32.107143 | 114 | 0.670745 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 273 | 0.303671 |
cbf64e56908db17c3f6f03defc1efa0087875a63 | 3,056 | py | Python | nucypher/tests/config/test_firstula_circumstances.py | kanzeparov/NuCypher | 0d7e349872909d0cacfd66583d018d722587b2e7 | [
"FTL",
"CNRI-Python"
] | null | null | null | nucypher/tests/config/test_firstula_circumstances.py | kanzeparov/NuCypher | 0d7e349872909d0cacfd66583d018d722587b2e7 | [
"FTL",
"CNRI-Python"
] | null | null | null | nucypher/tests/config/test_firstula_circumstances.py | kanzeparov/NuCypher | 0d7e349872909d0cacfd66583d018d722587b2e7 | [
"FTL",
"CNRI-Python"
] | null | null | null | """
This file is part of nucypher.
nucypher 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.
nucypher is distributed in the hope that it wil... | 39.688312 | 87 | 0.729058 | 0 | 0 | 1,469 | 0.480694 | 1,501 | 0.491165 | 0 | 0 | 668 | 0.218586 |
cbf6bbc96905dc1f309f486dc863edc389cd8386 | 1,550 | py | Python | anchore/anchore-modules/queries/show-familytree.py | berez23/anchore | 594cce23f1d87d666397653054c22c2613247734 | [
"Apache-2.0"
] | 401 | 2016-06-16T15:29:48.000Z | 2022-03-24T10:05:16.000Z | anchore/anchore-modules/queries/show-familytree.py | berez23/anchore | 594cce23f1d87d666397653054c22c2613247734 | [
"Apache-2.0"
] | 63 | 2016-06-16T21:10:27.000Z | 2020-07-01T06:57:27.000Z | anchore/anchore-modules/queries/show-familytree.py | berez23/anchore | 594cce23f1d87d666397653054c22c2613247734 | [
"Apache-2.0"
] | 64 | 2016-06-16T13:05:57.000Z | 2021-07-16T10:03:45.000Z | #!/usr/bin/env python
import sys
import os
import re
import json
import traceback
import anchore.anchore_utils
# main routine
try:
config = anchore.anchore_utils.init_query_cmdline(sys.argv, "params: all\nhelp: shows dockerfile lines.")
except Exception as err:
print str(err)
sys.exit(1)
if not config:... | 22.794118 | 132 | 0.645806 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 422 | 0.272258 |
cbf70c92043ad32d0c5d7dec87ffaf9a8bdb7e8f | 2,258 | py | Python | spikeforest/spikeforestwidgets/templatewidget/templatewidget.py | mhhennig/spikeforest | 5b4507ead724af3de0be5d48a3b23aaedb0be170 | [
"Apache-2.0"
] | 1 | 2021-09-23T01:07:19.000Z | 2021-09-23T01:07:19.000Z | spikeforest/spikeforestwidgets/templatewidget/templatewidget.py | mhhennig/spikeforest | 5b4507ead724af3de0be5d48a3b23aaedb0be170 | [
"Apache-2.0"
] | null | null | null | spikeforest/spikeforestwidgets/templatewidget/templatewidget.py | mhhennig/spikeforest | 5b4507ead724af3de0be5d48a3b23aaedb0be170 | [
"Apache-2.0"
] | 1 | 2021-09-23T01:07:21.000Z | 2021-09-23T01:07:21.000Z | import uuid
from spikeforest import mdaio
import io
import base64
import vdomr as vd
import os
import numpy as np
import mtlogging
import time
import traceback
source_path = os.path.dirname(os.path.realpath(__file__))
def _mda32_to_base64(X):
f = io.BytesIO()
mdaio.writemda32(X, f)
return base64.b64encod... | 30.513514 | 110 | 0.623561 | 1,903 | 0.842781 | 0 | 0 | 0 | 0 | 0 | 0 | 635 | 0.281222 |
cbf7539dbf5f7fc02064b79ad7c95855899a2086 | 5,968 | py | Python | delsmm/smm.py | sisl/delsmm | 6baae49e6f7b31c817af5668972ba6c196b66e9c | [
"MIT"
] | 1 | 2021-09-21T08:08:44.000Z | 2021-09-21T08:08:44.000Z | delsmm/smm.py | albernsrya/delsmm | 11f2750356a7c7d8b196a67af747a9bc5f39b479 | [
"MIT"
] | null | null | null | delsmm/smm.py | albernsrya/delsmm | 11f2750356a7c7d8b196a67af747a9bc5f39b479 | [
"MIT"
] | 1 | 2021-07-02T13:23:32.000Z | 2021-07-02T13:23:32.000Z | import torch
from torch import nn
from torch.autograd import grad
from torch.autograd.functional import jacobian
from scipy.optimize import root
from ceem.dynamics import *
from ceem.nn import LNMLP
from ceem.utils import temp_require_grad
from tqdm import tqdm
from delsmm.lagsys import AbstractLagrangianSystem
import ... | 34.298851 | 88 | 0.630697 | 5,607 | 0.939511 | 0 | 0 | 0 | 0 | 0 | 0 | 698 | 0.116957 |
cbf7a1ce96364e36588a482e13d4799ada06f5db | 16,642 | py | Python | src/speech/deep_model.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 6 | 2020-08-03T03:13:25.000Z | 2022-02-11T08:32:10.000Z | src/speech/deep_model.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 1 | 2020-09-08T16:10:38.000Z | 2020-09-08T16:10:38.000Z | src/speech/deep_model.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 2 | 2020-08-03T21:37:21.000Z | 2021-03-26T02:19:17.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils.rnn import pad_packed_sequence
import pdb
import math
torch.manual_seed(1)
class GRUAudio(nn.Module):
def __init__(self, num_features, hidden_dim, num_layers, dropout_rate, num_labels, batch_size, bidirectional=False):
... | 42.671795 | 175 | 0.651785 | 16,450 | 0.988463 | 0 | 0 | 0 | 0 | 0 | 0 | 1,313 | 0.078897 |
cbf8a1ef0f33878d804eb957ddcbefc421928a1b | 40 | py | Python | problem/01000~09999/09498/9498.py3.py | njw1204/BOJ-AC | 1de41685725ae4657a7ff94e413febd97a888567 | [
"MIT"
] | 1 | 2019-04-19T16:37:44.000Z | 2019-04-19T16:37:44.000Z | problem/01000~09999/09498/9498.py3.py | njw1204/BOJ-AC | 1de41685725ae4657a7ff94e413febd97a888567 | [
"MIT"
] | 1 | 2019-04-20T11:42:44.000Z | 2019-04-20T11:42:44.000Z | problem/01000~09999/09498/9498.py3.py | njw1204/BOJ-AC | 1de41685725ae4657a7ff94e413febd97a888567 | [
"MIT"
] | 3 | 2019-04-19T16:37:47.000Z | 2021-10-25T00:45:00.000Z | print(("F"*6+"DCBAA")[int(input())//10]) | 40 | 40 | 0.55 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.25 |
cbf9013b2e9891516c04252ba24b05ce5ea2d134 | 2,596 | py | Python | tests/netcdf_engine/test_utils.py | TileDB-Inc/TileDB-CF-Py | 9aab0fe9ba7346a1846c7458a5d08b123dcf90a8 | [
"MIT"
] | 12 | 2021-06-07T16:51:32.000Z | 2022-03-10T12:48:00.000Z | tests/netcdf_engine/test_utils.py | TileDB-Inc/TileDB-CF-Py | 9aab0fe9ba7346a1846c7458a5d08b123dcf90a8 | [
"MIT"
] | 72 | 2021-04-28T21:49:41.000Z | 2022-02-24T13:58:11.000Z | tests/netcdf_engine/test_utils.py | TileDB-Inc/TileDB-CF-Py | 9aab0fe9ba7346a1846c7458a5d08b123dcf90a8 | [
"MIT"
] | 3 | 2021-08-11T16:33:37.000Z | 2021-12-01T20:31:12.000Z | # Copyright 2021 TileDB Inc.
# Licensed under the MIT License.
import numpy as np
import pytest
from tiledb.cf.netcdf_engine._utils import get_netcdf_metadata, get_unpacked_dtype
netCDF4 = pytest.importorskip("netCDF4")
@pytest.mark.parametrize(
"input_dtype,scale_factor,add_offset,output_dtype",
(
... | 38.176471 | 87 | 0.678737 | 0 | 0 | 0 | 0 | 1,960 | 0.755008 | 0 | 0 | 564 | 0.217257 |
cbf916118eb5c3081ccd1fe9c5e35846ce4dd6b9 | 9,091 | py | Python | bib2mp3.py | ewquon/bib2mp3 | 6917f5223de7d2ae1ed9857c445015a05e64936c | [
"MIT"
] | null | null | null | bib2mp3.py | ewquon/bib2mp3 | 6917f5223de7d2ae1ed9857c445015a05e64936c | [
"MIT"
] | null | null | null | bib2mp3.py | ewquon/bib2mp3 | 6917f5223de7d2ae1ed9857c445015a05e64936c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import numpy as np
import html
from bs4 import BeautifulSoup
import bibtexparser
from bibtexparser.bparser import BibTexParser
from bibtexparser.customization import convert_to_unicode
import eyed3
from tokenizer import MyTokenizer
# acronyms to spell out
acronyms = [
'LES',
... | 36.657258 | 84 | 0.527995 | 8,403 | 0.924321 | 0 | 0 | 0 | 0 | 0 | 0 | 1,295 | 0.142449 |
cbf92713179f71318935e2ab443c7a93e35ceec1 | 529 | py | Python | build/create_tag_body.py | Nexusforge/Nexus.Extensions.RpcDataSource | e379243a1aca38c03e882759964d8bc008a7c8bd | [
"MIT"
] | null | null | null | build/create_tag_body.py | Nexusforge/Nexus.Extensions.RpcDataSource | e379243a1aca38c03e882759964d8bc008a7c8bd | [
"MIT"
] | null | null | null | build/create_tag_body.py | Nexusforge/Nexus.Extensions.RpcDataSource | e379243a1aca38c03e882759964d8bc008a7c8bd | [
"MIT"
] | null | null | null | import os
import re
import subprocess
tag = os.getenv('GITHUB_REF_NAME')
if tag is None:
raise Exception("GITHUB_REF_NAME is not defined")
with open("tag_body.txt", "w") as file:
output = subprocess.check_output(["git", "tag", "-l", "--format='%(contents)'", tag], stdin=None, stderr=None, shell=False)
m... | 24.045455 | 127 | 0.655955 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 150 | 0.283554 |
cbf954558d8ce8ef179a3032c8e9bbe1051befb6 | 3,456 | py | Python | amos/django_orchestrator/api/views.py | amosproj/2020ws02-computer-vision-for-sights | 66641de397af77f16ee36aa9e860ca7249982cb1 | [
"MIT"
] | 2 | 2021-02-03T23:25:14.000Z | 2021-03-18T15:03:12.000Z | amos/django_orchestrator/api/views.py | amosproj/2020ws02-computer-vision-for-sights | 66641de397af77f16ee36aa9e860ca7249982cb1 | [
"MIT"
] | 2 | 2021-02-03T22:35:12.000Z | 2021-02-12T14:09:31.000Z | amos/django_orchestrator/api/views.py | amosproj/2020ws02-computer-vision-for-sights | 66641de397af77f16ee36aa9e860ca7249982cb1 | [
"MIT"
] | 1 | 2021-03-18T15:03:14.000Z | 2021-03-18T15:03:14.000Z | """This module contains the views exposed to the user."""
from django.http import HttpResponse
from rest_framework.decorators import api_view
from rest_framework.request import Request
from api.view_handlers import (
handle_get_trained_city_model,
handle_persist_sight_image,
handle_add_new_city,
handle_... | 25.984962 | 79 | 0.664063 | 0 | 0 | 0 | 0 | 3,030 | 0.876736 | 0 | 0 | 1,896 | 0.548611 |
cbf9db657ca3437e042cc26606350dba666d7720 | 1,154 | py | Python | samples/verify.py | ssmbct-netops/CyberSaucier | 58e965e7b37ad74563319cd6b2b5c68da2dbd6c3 | [
"MIT"
] | 17 | 2019-02-01T06:46:52.000Z | 2021-12-28T06:33:07.000Z | samples/verify.py | Melon-Tropics/CyberSaucier | 780fb3df8518a41ed2d14b9a4b33f5ae520c15d4 | [
"MIT"
] | 9 | 2020-05-01T00:36:24.000Z | 2022-03-29T17:04:21.000Z | samples/verify.py | Melon-Tropics/CyberSaucier | 780fb3df8518a41ed2d14b9a4b33f5ae520c15d4 | [
"MIT"
] | 4 | 2019-10-20T03:22:34.000Z | 2022-02-07T18:27:04.000Z | import requests, json, argparse, os
from termcolor import colored
parser = argparse.ArgumentParser(description="Verify the recipes by running them through CyberSaucier")
parser.add_argument('--rulefolder', help='Folder containing the json recipes')
parser.add_argument("--url", help="URL to CyberSaucier", default="http... | 42.740741 | 120 | 0.57279 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 307 | 0.266031 |
cbfa1107b8b7c29048f818cde663861f0e4ac256 | 761 | py | Python | tests/test_binary_tree.py | avere001/dsplot | 89948c2f1b16e00bb3a240f73d0cb100b3eac847 | [
"MIT"
] | 8 | 2021-08-08T06:06:39.000Z | 2022-02-04T18:30:38.000Z | tests/test_binary_tree.py | avere001/dsplot | 89948c2f1b16e00bb3a240f73d0cb100b3eac847 | [
"MIT"
] | 1 | 2022-01-04T02:01:36.000Z | 2022-01-04T02:01:36.000Z | tests/test_binary_tree.py | avere001/dsplot | 89948c2f1b16e00bb3a240f73d0cb100b3eac847 | [
"MIT"
] | 2 | 2021-08-18T12:28:40.000Z | 2022-01-03T23:56:41.000Z | import os
import pytest
from dsplot.errors import InputException
from dsplot.tree import BinaryTree
def test_binary_tree():
tree = BinaryTree(nodes=[5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1])
assert tree.root.val == 5
assert tree.root.right.left.val == 13
assert tree.root.right.right.left.v... | 29.269231 | 79 | 0.628121 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 95 | 0.124836 |