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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0bc3737f6d7feadb52b4789ffa0325c0fcb19d3c | 1,766 | py | Python | nmtpytorch/datasets/text.py | toshohirasawa/mmt-with-monolingual-data | 3f80f3a1807e1a837ef82d75917c1cf581270b84 | [
"MIT"
] | 4 | 2019-05-22T00:17:28.000Z | 2020-08-26T02:03:33.000Z | nmtpytorch/datasets/text.py | toshohirasawa/mmt-with-monolingual-data | 3f80f3a1807e1a837ef82d75917c1cf581270b84 | [
"MIT"
] | 3 | 2019-07-14T09:17:11.000Z | 2022-01-13T01:15:10.000Z | nmtpytorch/datasets/text.py | toshohirasawa/mmt-with-monolingual-data | 3f80f3a1807e1a837ef82d75917c1cf581270b84 | [
"MIT"
] | 1 | 2020-07-22T19:25:53.000Z | 2020-07-22T19:25:53.000Z | # -*- coding: utf-8 -*-
import logging
from pathlib import Path
import torch
from torch.utils.data import Dataset
from torch.nn.utils.rnn import pad_sequence
from ..utils.data import read_sentences
logger = logging.getLogger('nmtpytorch')
class TextDataset(Dataset):
r"""A PyTorch dataset for sentences.
A... | 28.95082 | 87 | 0.620045 | 1,520 | 0.860702 | 0 | 0 | 150 | 0.084938 | 0 | 0 | 569 | 0.322197 |
0bc4245d09646c8c52b1a3d0b366dc4f5a5be7e6 | 9,194 | py | Python | ChorusNGSfilter.py | zhangtaolab/Chorus2 | faf6250901eefc9390bf6cd7ea185454c1c2712e | [
"MIT"
] | 11 | 2019-05-23T13:28:39.000Z | 2022-02-10T00:24:54.000Z | ChorusNGSfilter.py | zhangtaolab/Chorus2 | faf6250901eefc9390bf6cd7ea185454c1c2712e | [
"MIT"
] | 3 | 2019-03-15T01:47:53.000Z | 2021-12-16T07:41:08.000Z | ChorusNGSfilter.py | zhangtaolab/Chorus2 | faf6250901eefc9390bf6cd7ea185454c1c2712e | [
"MIT"
] | 11 | 2019-02-28T08:17:02.000Z | 2021-12-13T11:44:02.000Z | import argparse
import sys
from Choruslib import jellyfish
import os
from multiprocessing import Pool, Process
from pyfasta import Fasta
import pyBigWig
import math
def main():
args = check_options(get_options())
# jfgeneratorscount(jfpath, mer, output, generators,threads=1, size='100M'):
# make genera... | 26.045326 | 170 | 0.570698 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,210 | 0.240374 |
0bc43b9539ad1613a8c75e0fca099de18da296b5 | 224 | py | Python | nnunet/utilities/nii2niigz.py | kvpratama/nnunet | f4868fc96a7c3e5faca064e3b78b283d004da40b | [
"Apache-2.0"
] | null | null | null | nnunet/utilities/nii2niigz.py | kvpratama/nnunet | f4868fc96a7c3e5faca064e3b78b283d004da40b | [
"Apache-2.0"
] | null | null | null | nnunet/utilities/nii2niigz.py | kvpratama/nnunet | f4868fc96a7c3e5faca064e3b78b283d004da40b | [
"Apache-2.0"
] | null | null | null | import glob
import nibabel as nib
import pdb
nii_files = glob.glob('./train3d/*.nii')
for nii_file in nii_files:
nii = nib.load(nii_file)
nib.save(nii, nii_file[:-4] + '_0000.nii.gz')
print(nii_file[:-4] + '.nii.gz')
| 17.230769 | 46 | 0.678571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.178571 |
0bc45b8494e9a9362ddc0e4af12b5d4c8995da50 | 5,259 | py | Python | docs/source/conf.py | NASA-PDS/naif-pds4-bundler | bd7207d157ec9cae60f42cb9ea387ac194b1671c | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | NASA-PDS/naif-pds4-bundler | bd7207d157ec9cae60f42cb9ea387ac194b1671c | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | NASA-PDS/naif-pds4-bundler | bd7207d157ec9cae60f42cb9ea387ac194b1671c | [
"Apache-2.0"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 29.880682 | 79 | 0.659441 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,291 | 0.815935 |
0bc7213c09c10b1bc55de9468af8657cffd677c7 | 1,020 | py | Python | Tests/testApi.py | garnachod/ConcursoPolicia | f123595afc697ddfa862114a228d7351e2f8fd73 | [
"Apache-2.0"
] | null | null | null | Tests/testApi.py | garnachod/ConcursoPolicia | f123595afc697ddfa862114a228d7351e2f8fd73 | [
"Apache-2.0"
] | null | null | null | Tests/testApi.py | garnachod/ConcursoPolicia | f123595afc697ddfa862114a228d7351e2f8fd73 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
lib_path = os.path.abspath('../')
sys.path.append(lib_path)
from API.APITextos import APITextos
if __name__ == '__main__':
"""
users = APITextos.getUsersSimilar_user_all_topic("Taxigate", "ar", 100, 1)
for user in users:
print user.screen_name + "\t"+ use... | 29.142857 | 83 | 0.67549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 720 | 0.705882 |
0bc74e8bc8d0d296ee7ed7304833b2fbef90e20a | 1,333 | py | Python | src/visualize.py | skvis/Multi_Class_Image_Classification | 3d0a85a9cf4de66522653389c3672982084e6533 | [
"MIT"
] | null | null | null | src/visualize.py | skvis/Multi_Class_Image_Classification | 3d0a85a9cf4de66522653389c3672982084e6533 | [
"MIT"
] | null | null | null | src/visualize.py | skvis/Multi_Class_Image_Classification | 3d0a85a9cf4de66522653389c3672982084e6533 | [
"MIT"
] | null | null | null | import os
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import config
def view_data():
nrows, ncols = 3, 3
pic_index = 0
fig = plt.gcf()
fig.set_size_inches(nrows * 4, ncols * 4)
pic_index = 2
next_rock = [os.path.join(config.TRAIN_DIR, 'rock', fname) for fname in os.listd... | 31.738095 | 162 | 0.67817 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 228 | 0.171043 |
0bc7dbc7a380ff68f44a21a984691d373a93d819 | 454 | py | Python | tests/__init__.py | coras-io/lint-review | 0df19429a265a79edecb53b4371bf63db7e61617 | [
"MIT"
] | 2 | 2017-11-24T13:27:36.000Z | 2019-08-23T15:02:36.000Z | tests/__init__.py | coras-io/lint-review | 0df19429a265a79edecb53b4371bf63db7e61617 | [
"MIT"
] | null | null | null | tests/__init__.py | coras-io/lint-review | 0df19429a265a79edecb53b4371bf63db7e61617 | [
"MIT"
] | 2 | 2016-09-15T11:56:56.000Z | 2016-10-11T21:27:24.000Z | import os
import json
from github3.pulls import PullFile
from github3.repos.commit import RepoCommit
def load_fixture(filename):
path = os.path.dirname(os.path.abspath(__file__))
filename = os.path.join(path, 'fixtures', filename)
fh = open(filename, 'r')
return fh.read()
def create_pull_files(data)... | 22.7 | 55 | 0.720264 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.028634 |
0bca0000f68d1403d736225607fef98baa9c210f | 1,206 | py | Python | pypy/lib/cPickle.py | camillobruni/pygirl | ddbd442d53061d6ff4af831c1eab153bcc771b5a | [
"MIT"
] | 12 | 2016-01-06T07:10:28.000Z | 2021-05-13T23:02:02.000Z | pypy/lib/cPickle.py | camillobruni/pygirl | ddbd442d53061d6ff4af831c1eab153bcc771b5a | [
"MIT"
] | null | null | null | pypy/lib/cPickle.py | camillobruni/pygirl | ddbd442d53061d6ff4af831c1eab153bcc771b5a | [
"MIT"
] | 2 | 2016-07-29T07:09:50.000Z | 2016-10-16T08:50:26.000Z | #
# One-liner implementation of cPickle
#
from pickle import *
from pickle import __doc__, __version__, format_version, compatible_formats
BadPickleGet = KeyError
UnpickleableError = PicklingError
# ____________________________________________________________
# XXX some temporary dark magic to produce pickled dumps ... | 29.414634 | 75 | 0.685738 | 542 | 0.44942 | 0 | 0 | 0 | 0 | 0 | 0 | 253 | 0.209784 |
0bcce6782aa31e7dd2aa944b38edc0071b4e58f7 | 847 | py | Python | boardgame/connectfour/connectfourviewer.py | suryaambrose/boardgame | 459f9ae26ce571d34da88c295eb577b835f3ad13 | [
"MIT"
] | null | null | null | boardgame/connectfour/connectfourviewer.py | suryaambrose/boardgame | 459f9ae26ce571d34da88c295eb577b835f3ad13 | [
"MIT"
] | null | null | null | boardgame/connectfour/connectfourviewer.py | suryaambrose/boardgame | 459f9ae26ce571d34da88c295eb577b835f3ad13 | [
"MIT"
] | null | null | null | import os
import sys
from ..gameviewer import GameViewer
class ConnectFourViewer(GameViewer):
def __init__(self):
super(ConnectFourViewer, self).__init__([6,7])
def showState(self, state):
os.system("clear")
sys.stdout.write("x\y|")
for k in range(0, self.map_width):
sys.stdout.write("%d "%(k))
sys.std... | 25.666667 | 83 | 0.654073 | 789 | 0.931523 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0.107438 |
0bcd3adf32fd21aaedcee456a99e43a34a9cfc38 | 5,806 | py | Python | contrib/kodi/script.service.launchcontrol/launchcontrol.py | funjack/launchcontrol | 1d99f15d3cb56b987c922053c2e7a3369f0b24ac | [
"BSD-3-Clause"
] | 20 | 2017-04-09T20:49:05.000Z | 2020-12-28T21:51:55.000Z | contrib/kodi/script.service.launchcontrol/launchcontrol.py | funjack/launchcontrol | 1d99f15d3cb56b987c922053c2e7a3369f0b24ac | [
"BSD-3-Clause"
] | 16 | 2017-04-26T19:28:18.000Z | 2020-05-25T15:11:50.000Z | contrib/kodi/script.service.launchcontrol/launchcontrol.py | funjack/launchcontrol | 1d99f15d3cb56b987c922053c2e7a3369f0b24ac | [
"BSD-3-Clause"
] | 5 | 2018-11-09T15:46:49.000Z | 2021-04-08T10:38:11.000Z | """Launchcontrol client
The module exposes the Launchcontrol API as a Client object.
Data:
scripttypes -- list of a dictionaries containing supported script formats.
"""
import urllib2
scripttypes = [
{
"name" : "funscript",
"extensions": ["funscript"],
"mediaType" ... | 31.726776 | 77 | 0.514468 | 4,302 | 0.740958 | 0 | 0 | 0 | 0 | 0 | 0 | 2,818 | 0.48536 |
0bcd6aee9769157bc7389908284096f10fb88a81 | 7,614 | py | Python | python/fleetx/applications/trainer.py | ForFishes/FleetX | ffb01eb3513eabce77f389c0a0b10b7a5d5afede | [
"Apache-2.0"
] | 1 | 2021-03-02T09:24:40.000Z | 2021-03-02T09:24:40.000Z | python/fleetx/applications/trainer.py | ForFishes/FleetX | ffb01eb3513eabce77f389c0a0b10b7a5d5afede | [
"Apache-2.0"
] | null | null | null | python/fleetx/applications/trainer.py | ForFishes/FleetX | ffb01eb3513eabce77f389c0a0b10b7a5d5afede | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 37.141463 | 120 | 0.503809 | 6,870 | 0.902285 | 0 | 0 | 0 | 0 | 0 | 0 | 968 | 0.127134 |
0bcd749609107612c02325ec0ccb67862b6e1914 | 2,858 | py | Python | bin/kraken_bin_file.py | CSB5/OPERA-MS | ae46e005322774efc896d7c21ec265ad35748bc0 | [
"MIT"
] | 81 | 2018-03-22T15:01:08.000Z | 2022-01-17T17:52:31.000Z | bin/kraken_bin_file.py | CSB5/OPERA-MS | ae46e005322774efc896d7c21ec265ad35748bc0 | [
"MIT"
] | 68 | 2017-09-14T08:17:53.000Z | 2022-03-09T18:56:12.000Z | bin/kraken_bin_file.py | CSB5/OPERA-MS | ae46e005322774efc896d7c21ec265ad35748bc0 | [
"MIT"
] | 21 | 2017-09-14T06:15:18.000Z | 2021-09-30T03:19:22.000Z | #! /mnt/software/unstowable/anaconda/bin/python
import sys
import os
import argparse
import subprocess
def generating_mapping(kraken_report):
kraken_dict = {}
with open (kraken_report, "r") as fp:
for line in fp:
line = line.split("\t")
if line[3] != 'S' and line[3] != '-':
... | 31.755556 | 160 | 0.53219 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 703 | 0.245976 |
0bcdead7e276e3e5c2f148291206586512252d42 | 19,394 | py | Python | preprocessing/reid_preprocessing.py | Mithilesh1609/assembled-cnn | e0227eecbf3a7fd4fe99a954068c85ffbed94c53 | [
"Apache-2.0"
] | 363 | 2020-01-20T01:58:28.000Z | 2022-03-29T04:17:58.000Z | preprocessing/reid_preprocessing.py | Mithilesh1609/assembled-cnn | e0227eecbf3a7fd4fe99a954068c85ffbed94c53 | [
"Apache-2.0"
] | 9 | 2020-02-01T14:51:22.000Z | 2021-05-27T11:29:29.000Z | preprocessing/reid_preprocessing.py | Mithilesh1609/assembled-cnn | e0227eecbf3a7fd4fe99a954068c85ffbed94c53 | [
"Apache-2.0"
] | 46 | 2020-01-20T04:53:45.000Z | 2021-12-06T09:37:24.000Z | # This code is adapted from the https://github.com/tensorflow/models/tree/master/official/r1/resnet.
# ==========================================================================================
# NAVER’s modifications are Copyright 2020 NAVER corp. All rights reserved.
# ================================================... | 35.848429 | 100 | 0.699856 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9,103 | 0.469324 |
0bcf39723db18d75741e6691c7334c3160163a28 | 16,442 | py | Python | dumbcpm/__main__.py | handicraftsman/dumbcpm | 6fab04f822c6c8de05a8fb20b699b6f4c45ae907 | [
"MIT"
] | null | null | null | dumbcpm/__main__.py | handicraftsman/dumbcpm | 6fab04f822c6c8de05a8fb20b699b6f4c45ae907 | [
"MIT"
] | 2 | 2019-01-04T10:12:02.000Z | 2019-01-04T18:55:37.000Z | dumbcpm/__main__.py | handicraftsman/dumbcpm | 6fab04f822c6c8de05a8fb20b699b6f4c45ae907 | [
"MIT"
] | null | null | null | import argparse
import os
import os.path
import glob
import re
import sys
import subprocess
import shlex
from pathlib import Path
from functools import cmp_to_key
from structlog import get_logger, wrap_logger
from structlog.dev import ConsoleRenderer
import yaml
import semver
import pkgconfig
glog = wrap_logger(get_l... | 34.182952 | 192 | 0.61501 | 12,878 | 0.783238 | 0 | 0 | 0 | 0 | 0 | 0 | 2,794 | 0.169931 |
0bcf6189d3d5a0a37bc27a9c69ab2228205c0630 | 5,103 | py | Python | test/simple_imputation/test_logistic_regression.py | macarro/imputena | 3a94ae1419a2af0d9707b20546ee078929ce99e8 | [
"MIT"
] | 6 | 2020-04-27T21:21:47.000Z | 2022-03-30T03:02:54.000Z | test/simple_imputation/test_logistic_regression.py | macarro/imputena | 3a94ae1419a2af0d9707b20546ee078929ce99e8 | [
"MIT"
] | 1 | 2021-07-01T18:49:27.000Z | 2021-07-01T18:49:27.000Z | test/simple_imputation/test_logistic_regression.py | macarro/imputena | 3a94ae1419a2af0d9707b20546ee078929ce99e8 | [
"MIT"
] | null | null | null | import unittest
from imputena import logistic_regression
from test.example_data import *
class TestLogisticRegression(unittest.TestCase):
# Positive tests ----------------------------------------------------------
def test_logistic_regression_returning(self):
"""
Positive test
dat... | 31.89375 | 79 | 0.600039 | 5,009 | 0.981579 | 0 | 0 | 0 | 0 | 0 | 0 | 2,975 | 0.58299 |
0bcf8429b193b3275e3163004c7c46be310b26a2 | 3,349 | py | Python | src/robot/libdocpkg/jsonbuilder.py | rdagum/robotframework | b7069d505374e9f09a140ed5a9727d2a40716446 | [
"ECL-2.0",
"Apache-2.0"
] | 7,073 | 2015-01-01T17:19:16.000Z | 2022-03-31T22:01:29.000Z | src/robot/libdocpkg/jsonbuilder.py | rdagum/robotframework | b7069d505374e9f09a140ed5a9727d2a40716446 | [
"ECL-2.0",
"Apache-2.0"
] | 2,412 | 2015-01-02T09:29:05.000Z | 2022-03-31T13:10:46.000Z | src/robot/libdocpkg/jsonbuilder.py | rdagum/robotframework | b7069d505374e9f09a140ed5a9727d2a40716446 | [
"ECL-2.0",
"Apache-2.0"
] | 2,298 | 2015-01-03T02:47:15.000Z | 2022-03-31T02:00:16.000Z | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# 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
... | 39.869048 | 89 | 0.589131 | 2,548 | 0.760824 | 0 | 0 | 0 | 0 | 0 | 0 | 888 | 0.265154 |
0bcf92384a83dc5131845482a249092051ba39f4 | 24,131 | py | Python | webapp/tests/test_storage.py | TimWhalen/graphite-web | e150af45e01d01141a8767ec0597e218105b9914 | [
"Apache-2.0"
] | 1 | 2021-01-16T20:10:45.000Z | 2021-01-16T20:10:45.000Z | webapp/tests/test_storage.py | TimWhalen/graphite-web | e150af45e01d01141a8767ec0597e218105b9914 | [
"Apache-2.0"
] | null | null | null | webapp/tests/test_storage.py | TimWhalen/graphite-web | e150af45e01d01141a8767ec0597e218105b9914 | [
"Apache-2.0"
] | null | null | null | import os
import random
import shutil
import time
import whisper
from django.conf import settings
from django.test import override_settings
from mock import patch, Mock
from .base import TestCase
from graphite.finders.utils import BaseFinder
from graphite.intervals import Interval, IntervalSet
from graphite.node imp... | 36.451662 | 165 | 0.668062 | 23,376 | 0.968712 | 332 | 0.013758 | 4,972 | 0.206042 | 0 | 0 | 5,844 | 0.242178 |
0bd0f2dad56c9dc7b13a05354bfcba835f52effa | 804 | py | Python | sfzgen_test.py | tavasti/sfzscripts | c8b68343fd8eb62cdd7eed04c4d449672b4ed55f | [
"MIT"
] | null | null | null | sfzgen_test.py | tavasti/sfzscripts | c8b68343fd8eb62cdd7eed04c4d449672b4ed55f | [
"MIT"
] | null | null | null | sfzgen_test.py | tavasti/sfzscripts | c8b68343fd8eb62cdd7eed04c4d449672b4ed55f | [
"MIT"
] | 1 | 2020-02-07T01:04:13.000Z | 2020-02-07T01:04:13.000Z | import sys
from sfzgen import GetNote
# Verify that GetNote gives us back the notes that we expect.
midi_val = 24 # Starting midi value.
for scale in range(1, 8):
for note in 'cdefgab':
for sharp in ('', 's', '#'):
name = note + sharp + str(scale)
if name[:2] in ('es', 'e#', 'bs', 'b#'):
co... | 24.363636 | 75 | 0.633085 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 320 | 0.39801 |
0bd12a0dfa02e72aa6f565510969aa9408cd87e2 | 338 | py | Python | hardhat/recipes/python/py.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null | hardhat/recipes/python/py.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null | hardhat/recipes/python/py.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null |
from .base import PipBaseRecipe
class PyRecipe(PipBaseRecipe):
def __init__(self, *args, **kwargs):
super(PyRecipe, self).__init__(*args, **kwargs)
self.sha256 = '1f9a981438f2acc20470b301a07a4963' \
'75641f902320f70e31916fe3377385a9'
self.name = 'py'
self.ver... | 24.142857 | 58 | 0.627219 | 300 | 0.887574 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.236686 |
0bd3fe284b31a90b04c8a385e5ac021eadf08bd7 | 577 | py | Python | tests/test_article.py | JohnKarima/news-hub | 261969fe949bf7efbdc6dabb502b7b9b9eecabac | [
"MIT"
] | null | null | null | tests/test_article.py | JohnKarima/news-hub | 261969fe949bf7efbdc6dabb502b7b9b9eecabac | [
"MIT"
] | null | null | null | tests/test_article.py | JohnKarima/news-hub | 261969fe949bf7efbdc6dabb502b7b9b9eecabac | [
"MIT"
] | null | null | null | import unittest
from app.models import Article
class ArticleTest(unittest.TestCase):
'''
Test Class to test the behaviour of the Article class
'''
def setUp(self):
'''
Set up method that will run before every Test
'''
self.new_article = Article('NewsDaily', 'NewsDailyTr... | 33.941176 | 224 | 0.679376 | 528 | 0.915078 | 0 | 0 | 0 | 0 | 0 | 0 | 314 | 0.544194 |
0bd443d5f3e142040b4314347094c6eb56ae8072 | 4,979 | py | Python | flatten.py | FauxFaux/jdk9-repotools | b578c1465ca63946f1240fe3281d2fd1eec34513 | [
"MIT"
] | null | null | null | flatten.py | FauxFaux/jdk9-repotools | b578c1465ca63946f1240fe3281d2fd1eec34513 | [
"MIT"
] | null | null | null | flatten.py | FauxFaux/jdk9-repotools | b578c1465ca63946f1240fe3281d2fd1eec34513 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import collections
import datetime
import subprocess
import dateutil.parser
import os
from typing import Dict, Iterator, List, TypeVar, Tuple, Optional
T = TypeVar('T')
RawLog = collections.namedtuple('RawLog', ['commit', 'tree', 'date'])
TreeInfo = collections.namedtuple('TreeInfo', ['mode', ... | 31.713376 | 113 | 0.55011 | 3,283 | 0.659369 | 561 | 0.112673 | 0 | 0 | 0 | 0 | 860 | 0.172725 |
0bd4eab1a0789e3a62397b13129e735e19c46a8a | 8,651 | py | Python | src/ros/rosmake/test/test_parallel_build.py | jungleni/ros_code_reading | 499e98c0b0d309da78060b19b55c420c22110d65 | [
"Apache-2.0"
] | 742 | 2017-07-05T02:49:36.000Z | 2022-03-30T12:55:43.000Z | src/ros/rosmake/test/test_parallel_build.py | jungleni/ros_code_reading | 499e98c0b0d309da78060b19b55c420c22110d65 | [
"Apache-2.0"
] | 73 | 2017-07-06T12:50:51.000Z | 2022-03-07T08:07:07.000Z | src/ros/rosmake/test/test_parallel_build.py | jungleni/ros_code_reading | 499e98c0b0d309da78060b19b55c420c22110d65 | [
"Apache-2.0"
] | 425 | 2017-07-04T22:03:29.000Z | 2022-03-29T06:59:06.000Z | #!/usr/bin/env python
# Copyright (c) 2009, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# n... | 35.747934 | 93 | 0.596116 | 6,971 | 0.805803 | 0 | 0 | 0 | 0 | 0 | 0 | 2,146 | 0.248064 |
0bd5c6b04b7d3a4ccf8589e0b2129df29191d0f5 | 737 | py | Python | miqa/core/models/image.py | davidshq/miqa-1 | aeb5fbf40a65a6fdb82b6e3d3aff8fe47474792f | [
"Apache-2.0"
] | null | null | null | miqa/core/models/image.py | davidshq/miqa-1 | aeb5fbf40a65a6fdb82b6e3d3aff8fe47474792f | [
"Apache-2.0"
] | null | null | null | miqa/core/models/image.py | davidshq/miqa-1 | aeb5fbf40a65a6fdb82b6e3d3aff8fe47474792f | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
from uuid import uuid4
from django.db import models
from django_extensions.db.models import TimeStampedModel
class Image(TimeStampedModel, models.Model):
class Meta:
indexes = [models.Index(fields=['scan', 'name'])]
ordering = ['name']
id = models.UUIDField(primary_k... | 29.48 | 85 | 0.700136 | 599 | 0.812754 | 0 | 0 | 148 | 0.200814 | 0 | 0 | 32 | 0.043419 |
0bd684f449fb29bb6b0b014c1fddbe47cd12fbe1 | 302 | py | Python | src/utils/libraries/index.py | Shellyda/Algorithms-Sorting-Project | 205f76b5127a53829056889e46cf240e0d75cbb5 | [
"MIT"
] | null | null | null | src/utils/libraries/index.py | Shellyda/Algorithms-Sorting-Project | 205f76b5127a53829056889e46cf240e0d75cbb5 | [
"MIT"
] | null | null | null | src/utils/libraries/index.py | Shellyda/Algorithms-Sorting-Project | 205f76b5127a53829056889e46cf240e0d75cbb5 | [
"MIT"
] | null | null | null | from utils.libraries.Get_duration_execution_time import Get_duration_execution_time
from utils.libraries.Bubble_sort import Bubble_sort
from utils.libraries.Insertion_sort import Insertion_sort
from utils.libraries.Merge_sort import Merge_sort
from utils.libraries.Selection_sort import Selection_sort
| 50.333333 | 83 | 0.900662 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0bd90dcd08f531dd13aaeed5fdef14dcf683d7de | 2,897 | py | Python | Python_practice.py | ftercero/Election_Analysis | 52ae67ffa1e4e552653d96b42fd388bacfcd2227 | [
"Apache-2.0"
] | null | null | null | Python_practice.py | ftercero/Election_Analysis | 52ae67ffa1e4e552653d96b42fd388bacfcd2227 | [
"Apache-2.0"
] | null | null | null | Python_practice.py | ftercero/Election_Analysis | 52ae67ffa1e4e552653d96b42fd388bacfcd2227 | [
"Apache-2.0"
] | null | null | null | #print ("Hello World")
#counties=["Arapahoes","Denver","Jefferson"]
#if counties[1]=='Denver':
# print(counties[1])
#counties = ["Arapahoe","Denver","Jefferson"]
#if "El Paso" in counties:
# print("El Paso is in the list of counties.")
#else:
# print("El Paso is not the list of counties.")
#if "Arapahoe" in ... | 34.082353 | 87 | 0.70038 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,618 | 0.903693 |
0bdc5b9ff9f1b0f990c0c865e7cf1275a25cef14 | 1,600 | py | Python | compss/programming_model/bindings/python/src/pycompss/matlib/algebra/mean.py | TANGO-Project/compss-tango | d9e007b6fe4f8337d4f267f95f383d8962602ab8 | [
"Apache-2.0"
] | 3 | 2018-03-05T14:52:22.000Z | 2019-02-08T09:58:24.000Z | compss/programming_model/bindings/python/src/pycompss/matlib/algebra/mean.py | TANGO-Project/compss-tango | d9e007b6fe4f8337d4f267f95f383d8962602ab8 | [
"Apache-2.0"
] | null | null | null | compss/programming_model/bindings/python/src/pycompss/matlib/algebra/mean.py | TANGO-Project/compss-tango | d9e007b6fe4f8337d4f267f95f383d8962602ab8 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2002.2.rc1710017 Barcelona Supercomputing Center (www.bsc.es)
#
# 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... | 26.229508 | 75 | 0.660625 | 0 | 0 | 0 | 0 | 64 | 0.04 | 0 | 0 | 977 | 0.610625 |
0be08126819855add6dce623e8e5ab3393911667 | 1,407 | py | Python | account/models/addon.py | avwx-rest/account-backend | 4d2a8e47736cfe3421b3e55b47e6770490564149 | [
"MIT"
] | null | null | null | account/models/addon.py | avwx-rest/account-backend | 4d2a8e47736cfe3421b3e55b47e6770490564149 | [
"MIT"
] | null | null | null | account/models/addon.py | avwx-rest/account-backend | 4d2a8e47736cfe3421b3e55b47e6770490564149 | [
"MIT"
] | null | null | null | """
Plan add-on models
"""
# pylint: disable=too-few-public-methods
from typing import Optional
from beanie import Document
from pydantic import BaseModel
class AddonOut(BaseModel):
"""Addon fields returned to the user"""
key: str
name: str
description: str
class UserAddon(AddonOut):
"""Addo... | 23.065574 | 67 | 0.608387 | 1,240 | 0.881308 | 0 | 0 | 327 | 0.232409 | 293 | 0.208244 | 370 | 0.262971 |
0be2db2efc5096fbb77f69461080e7c7bd259e7d | 4,434 | py | Python | src/tools/cc-frame-viewer/ccfv.py | jxjnjjn/chromium | 435c1d02fd1b99001dc9e1e831632c894523580d | [
"Apache-2.0"
] | 9 | 2018-09-21T05:36:12.000Z | 2021-11-15T15:14:36.000Z | tools/cc-frame-viewer/ccfv.py | devasia1000/chromium | 919a8a666862fb866a6bb7aa7f3ae8c0442b4828 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/cc-frame-viewer/ccfv.py | devasia1000/chromium | 919a8a666862fb866a6bb7aa7f3ae8c0442b4828 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 3 | 2018-11-28T14:54:13.000Z | 2020-07-02T07:36:07.000Z | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import optparse
import os
import sys
def Init():
chromeapp_path = os.path.abspath(
os.path.join(os.path.dirname(__file__),
'third_... | 31.671429 | 73 | 0.675011 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,434 | 0.32341 |
0be480abda6ccdd7fb50e59653bf3b03a118a7b9 | 3,247 | py | Python | main.py | MarkPopovK/nhl-graph | 9cd19f70d30193bd5aa509ca421c90f9484d8c34 | [
"MIT"
] | null | null | null | main.py | MarkPopovK/nhl-graph | 9cd19f70d30193bd5aa509ca421c90f9484d8c34 | [
"MIT"
] | null | null | null | main.py | MarkPopovK/nhl-graph | 9cd19f70d30193bd5aa509ca421c90f9484d8c34 | [
"MIT"
] | null | null | null | import json
import requests
import dash
import dash_core_components as dcc
import dash_html_components as html
def server_setup(results):
app = dash.Dash(__name__)
app.layout = html.Div(children=[
html.H1(children='NHL 2018/2019 cumulative points stats'),
html.Div(children='''
... | 29.788991 | 113 | 0.513397 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 905 | 0.278719 |
0be53f53aa8ef004a05d693483b9d9e80f01a479 | 4,584 | py | Python | python_libs/train_lib.py | rubenIzquierdo/lda_wsd | b4ef1c2276b0eba48efda411ee67dcda25b481b1 | [
"Apache-2.0"
] | 1 | 2020-09-20T09:38:05.000Z | 2020-09-20T09:38:05.000Z | python_libs/train_lib.py | rubenIzquierdo/lda_wsd | b4ef1c2276b0eba48efda411ee67dcda25b481b1 | [
"Apache-2.0"
] | null | null | null | python_libs/train_lib.py | rubenIzquierdo/lda_wsd | b4ef1c2276b0eba48efda411ee67dcda25b481b1 | [
"Apache-2.0"
] | null | null | null | ##############################################
# Author: Ruben Izquierdo Bevia #
# VU University of Amsterdam #
# Mail: [email protected] #
# [email protected] #
# Webpage: http://rubenizquierdobevia.com #
# Version: 1.0 ... | 39.86087 | 160 | 0.603839 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,633 | 0.356239 |
0be8b81ee3c1560dffccec8e0d9a6d2ccd6cd6c8 | 1,620 | py | Python | pincer/utils/snowflake.py | MithicSpirit/Pincer | 3e5aee5bc228a77caac59e07299d54e558b7f39d | [
"MIT"
] | 1 | 2021-11-16T05:19:26.000Z | 2021-11-16T05:19:26.000Z | pincer/utils/snowflake.py | Seanpm2001-Discord/Pincer | a2c045f85f44712f3257e5cc50b3acacbd1302f9 | [
"MIT"
] | null | null | null | pincer/utils/snowflake.py | Seanpm2001-Discord/Pincer | a2c045f85f44712f3257e5cc50b3acacbd1302f9 | [
"MIT"
] | null | null | null | # Copyright Pincer 2021-Present
# Full MIT License can be found in `LICENSE` at the project root.
from __future__ import annotations
class Snowflake(int):
"""Discord utilizes Twitter's snowflake format for uniquely
identifiable descriptors (IDs).
These IDs are guaranteed to be unique across all of Disco... | 27.931034 | 72 | 0.621605 | 1,483 | 0.915432 | 0 | 0 | 986 | 0.608642 | 0 | 0 | 996 | 0.614815 |
0bea5b3c06ed6536b18d4ffc6060eb3851bdfaff | 784 | py | Python | examples/squeeze.py | coherentgraphics/python-libcpdf | 4e47a45936443c863b0e34ce2b21d1623a244694 | [
"BSD-3-Clause"
] | 1 | 2021-08-19T06:55:59.000Z | 2021-08-19T06:55:59.000Z | examples/squeeze.py | coherentgraphics/python-libcpdf | 4e47a45936443c863b0e34ce2b21d1623a244694 | [
"BSD-3-Clause"
] | 1 | 2022-03-29T12:53:12.000Z | 2022-03-30T08:34:20.000Z | examples/squeeze.py | coherentgraphics/python-libcpdf | 4e47a45936443c863b0e34ce2b21d1623a244694 | [
"BSD-3-Clause"
] | null | null | null | #Squeeze example
import sys
sys.path.insert(0,'..')
import pycpdflib
#DLL loading depends on your own platform. These are the author's settings.
if sys.platform.startswith('darwin'):
pycpdflib.loadDLL("/Users/john/repos/python-libcpdf/libpycpdf.so")
elif sys.platform.startswith('linux'):
pycpdflib.loadDLL("../... | 34.086957 | 77 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 386 | 0.492347 |
0bebb327020997966bf6dfa476e0cae9c0df6a36 | 858 | py | Python | src/watcher.py | RHEAGROUP/OCRE-Importing | c1aaf6b0be9beaad171b49b4c8ef1c056476f940 | [
"Apache-2.0"
] | null | null | null | src/watcher.py | RHEAGROUP/OCRE-Importing | c1aaf6b0be9beaad171b49b4c8ef1c056476f940 | [
"Apache-2.0"
] | null | null | null | src/watcher.py | RHEAGROUP/OCRE-Importing | c1aaf6b0be9beaad171b49b4c8ef1c056476f940 | [
"Apache-2.0"
] | null | null | null | import imaplib
import email
from create_orders_from_email import get_email_contents
import time
import sys
with imaplib.IMAP4_SSL(host="imap.gmail.com", port=imaplib.IMAP4_SSL_PORT) as imap_ssl:
resp_code, response = imap_ssl.login(sys.argv[1], sys.argv[2])
while True:
resp_code, mail_count = imap_ssl.... | 47.666667 | 109 | 0.671329 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0.081585 |
0beceb8a8dc74b4005985e4a4eb8fb3eac336b2d | 4,314 | py | Python | pytlite/__init__.py | panakuma/pytlite | cbac045fdde0ef1a15d4dabfc12281c1f5be529c | [
"MIT"
] | null | null | null | pytlite/__init__.py | panakuma/pytlite | cbac045fdde0ef1a15d4dabfc12281c1f5be529c | [
"MIT"
] | null | null | null | pytlite/__init__.py | panakuma/pytlite | cbac045fdde0ef1a15d4dabfc12281c1f5be529c | [
"MIT"
] | null | null | null | import socket
import struct
class Patlite(object):
auto_update = True
OFF = 0
BLINK = 0x20
ON = 0x01
SHORT = 0x08
LONG = 0x10
STATUS_STRING = {
OFF:"Off",BLINK:"Blink",ON:"On",
SHORT:"Short",LONG:"Long"
}
RED = 0
... | 25.526627 | 81 | 0.534539 | 3,784 | 0.877144 | 0 | 0 | 0 | 0 | 0 | 0 | 689 | 0.159713 |
0bee95548e6fcafe6a5b00d7403872593616c0ae | 11,892 | py | Python | src/app/todos/routes.py | alexzanderr/metro.digital | 71a58b417f6498808224a6de96578bde76f89c60 | [
"MIT"
] | null | null | null | src/app/todos/routes.py | alexzanderr/metro.digital | 71a58b417f6498808224a6de96578bde76f89c60 | [
"MIT"
] | 1 | 2021-12-16T22:11:25.000Z | 2021-12-16T22:11:25.000Z | src/app/todos/routes.py | alexzanderr/flask_web_app | 71a58b417f6498808224a6de96578bde76f89c60 | [
"MIT"
] | null | null | null | """
# type: ignore
type ignore is to tell LSP-pyright to ignore the line
because something it thinks that there are errors, but actually at runtime there are not
"""
from .validation import validate_password_check
from .validation import validate_email
from .validation import validate_password
from .valida... | 30.414322 | 93 | 0.670114 | 0 | 0 | 0 | 0 | 7,197 | 0.605197 | 0 | 0 | 4,485 | 0.377144 |
0bf068e6001d65484a727f0f24e8ba43b05c99ef | 4,075 | py | Python | src/arcam/fmj/server.py | evanugarte/arcam_fmj | bde06a15f9bb3e612d406198ccc87ca0aa1fff93 | [
"MIT"
] | 5 | 2020-10-26T06:43:02.000Z | 2021-10-01T20:52:25.000Z | src/arcam/fmj/server.py | evanugarte/arcam_fmj | bde06a15f9bb3e612d406198ccc87ca0aa1fff93 | [
"MIT"
] | 5 | 2020-08-28T09:23:17.000Z | 2021-08-21T19:41:50.000Z | src/arcam/fmj/server.py | evanugarte/arcam_fmj | bde06a15f9bb3e612d406198ccc87ca0aa1fff93 | [
"MIT"
] | 3 | 2020-10-05T05:54:05.000Z | 2021-08-18T22:10:15.000Z | """Fake server"""
import asyncio
import logging
from typing import Callable, Dict, List, Optional, Tuple, Union
from . import (
AmxDuetRequest,
AmxDuetResponse,
AnswerCodes,
CommandNotRecognised,
CommandPacket,
ResponseException,
ResponsePacket,
read_command,
write_packet
)
_LOGGER... | 30.639098 | 95 | 0.543804 | 3,719 | 0.912638 | 0 | 0 | 0 | 0 | 2,864 | 0.702822 | 244 | 0.059877 |
0bf08ab02b380ff1463f83075b0e9055842f3b57 | 13,810 | py | Python | qiskit_optimization/converters/linear_inequality_to_penalty.py | X-Libor/qiskit-optimization | f2a92538d883ebc0f78c156ab6f31710e9b1d14f | [
"Apache-2.0"
] | 109 | 2021-01-20T09:37:26.000Z | 2022-03-30T08:13:53.000Z | qiskit_optimization/converters/linear_inequality_to_penalty.py | X-Libor/qiskit-optimization | f2a92538d883ebc0f78c156ab6f31710e9b1d14f | [
"Apache-2.0"
] | 216 | 2021-01-20T10:31:37.000Z | 2022-03-31T15:16:13.000Z | qiskit_optimization/converters/linear_inequality_to_penalty.py | X-Libor/qiskit-optimization | f2a92538d883ebc0f78c156ab6f31710e9b1d14f | [
"Apache-2.0"
] | 69 | 2021-01-19T21:43:18.000Z | 2022-03-24T22:13:01.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 38.683473 | 105 | 0.590949 | 12,753 | 0.923461 | 0 | 0 | 5,605 | 0.405865 | 0 | 0 | 6,123 | 0.443374 |
0bf0a581d088ce393c1930059e7c765bc7897ac7 | 581 | py | Python | PHASE_2/Application_SourceCode/backend/prediction_page.py | vicinx3/disease-outbreak | 035e78875c374e2cdbd4720a4f2ed1370f63a88c | [
"MIT"
] | null | null | null | PHASE_2/Application_SourceCode/backend/prediction_page.py | vicinx3/disease-outbreak | 035e78875c374e2cdbd4720a4f2ed1370f63a88c | [
"MIT"
] | null | null | null | PHASE_2/Application_SourceCode/backend/prediction_page.py | vicinx3/disease-outbreak | 035e78875c374e2cdbd4720a4f2ed1370f63a88c | [
"MIT"
] | null | null | null | from flask import Blueprint, abort, request, jsonify
from prediction_utils import *
prediction_page = Blueprint('prediction_page', __name__)
@prediction_page.route('/map', methods=['GET'])
def get_map_data():
offset = int(request.args['offset'])
country = request.args['country'] if 'country' in request.args e... | 38.733333 | 74 | 0.73494 | 0 | 0 | 0 | 0 | 436 | 0.75043 | 0 | 0 | 89 | 0.153184 |
0bf1df4821a7ee776dde7f0d63b87186e9b1ce95 | 209 | py | Python | djangox/lib/python3.8/site-packages/allauth/socialaccount/providers/draugiem/urls.py | DemarcusL/django_wiki_lab | 3b7cf18af7e0f89c94d10eb953ca018a150a2f55 | [
"MIT"
] | 6,342 | 2015-01-01T07:40:30.000Z | 2022-03-31T04:18:30.000Z | djangox/lib/python3.8/site-packages/allauth/socialaccount/providers/draugiem/urls.py | DemarcusL/django_wiki_lab | 3b7cf18af7e0f89c94d10eb953ca018a150a2f55 | [
"MIT"
] | 2,198 | 2015-01-02T15:17:45.000Z | 2022-03-28T10:20:43.000Z | djangox/lib/python3.8/site-packages/allauth/socialaccount/providers/draugiem/urls.py | DemarcusL/django_wiki_lab | 3b7cf18af7e0f89c94d10eb953ca018a150a2f55 | [
"MIT"
] | 2,928 | 2015-01-01T10:44:13.000Z | 2022-03-31T03:20:16.000Z | from django.urls import path
from . import views
urlpatterns = [
path("draugiem/login/", views.login, name="draugiem_login"),
path("draugiem/callback/", views.callback, name="draugiem_callback"),
]
| 20.9 | 73 | 0.712919 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.344498 |
0bf22a138d39df7cd40996f49fda96cf2eac2037 | 26,174 | py | Python | Python/venv/lib/python3.7/site-packages/IPython/core/inputtransformer2.py | HenriqueBuzin/TCC | 5fb9db42e97e28131bff97da3252a9ee33b3684e | [
"Unlicense"
] | 445 | 2019-01-26T13:50:26.000Z | 2022-03-18T05:17:38.000Z | Python/venv/lib/python3.7/site-packages/IPython/core/inputtransformer2.py | HenriqueBuzin/TCC | 5fb9db42e97e28131bff97da3252a9ee33b3684e | [
"Unlicense"
] | 242 | 2019-01-29T15:48:27.000Z | 2022-03-31T22:09:21.000Z | Python/venv/lib/python3.7/site-packages/IPython/core/inputtransformer2.py | HenriqueBuzin/TCC | 5fb9db42e97e28131bff97da3252a9ee33b3684e | [
"Unlicense"
] | 31 | 2019-03-10T09:51:27.000Z | 2022-02-14T23:11:12.000Z | """Input transformer machinery to support IPython special syntax.
This includes the machinery to recognise and transform ``%magic`` commands,
``!system`` commands, ``help?`` querying, prompt stripping, and so forth.
Added: IPython 7.0. Replaces inputsplitter and inputtransformer which were
deprecated in 7.0.
"""
# C... | 36.968927 | 181 | 0.604302 | 16,676 | 0.637121 | 0 | 0 | 2,806 | 0.107206 | 0 | 0 | 10,963 | 0.418851 |
0bf2a45e6eafd2d17de3e49288033fffcc462838 | 6,806 | py | Python | run_metrics.py | bradyneal/realcause | 7411cc26f10d750aa011b25f2a46cb572d8b8540 | [
"MIT"
] | 35 | 2021-03-30T12:30:53.000Z | 2022-03-05T10:07:24.000Z | run_metrics.py | bradyneal/realcause | 7411cc26f10d750aa011b25f2a46cb572d8b8540 | [
"MIT"
] | null | null | null | run_metrics.py | bradyneal/realcause | 7411cc26f10d750aa011b25f2a46cb572d8b8540 | [
"MIT"
] | 1 | 2021-04-01T06:31:14.000Z | 2021-04-01T06:31:14.000Z | from pathlib import Path
import os
import zipfile
import json
from addict import Dict
from train_generator import get_data
from loading import load_gen
import numpy as np
from collections import OrderedDict
from tqdm import tqdm
def get_univariate_results(model, num_tests=100, verbose=False, n=None):
all_runs = l... | 35.821053 | 96 | 0.603438 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 933 | 0.137085 |
0bf32d2a4cd637f3e9b811ce4815b37e0ae0c3d5 | 619 | py | Python | Getting-Started-with-Python/pay_calculator.py | michellevrp/Python_Course | ac2a353fa828290d9923665fbdb1e742bea9931e | [
"CC0-1.0"
] | null | null | null | Getting-Started-with-Python/pay_calculator.py | michellevrp/Python_Course | ac2a353fa828290d9923665fbdb1e742bea9931e | [
"CC0-1.0"
] | null | null | null | Getting-Started-with-Python/pay_calculator.py | michellevrp/Python_Course | ac2a353fa828290d9923665fbdb1e742bea9931e | [
"CC0-1.0"
] | null | null | null | #first exercise
#This code asks the user for hours and rate for hour, calculate total pay and print it.
hrs = input("Enter Hours:")
rate = input("Enter Rate:")
pay = float(hrs) * float(rate)
print("Pay:", pay)
#second exercise
#This code asks the user for hours and rate for hour, calculate total pay and print... | 25.791667 | 89 | 0.628433 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 345 | 0.557351 |
0bf3c2faad0821a872957b34e95b418c7cf6cb30 | 5,419 | py | Python | vcx/wrappers/python3/vcx/api/disclosed_proof.py | esplinr/evernym-sdk | f7d99da59fb436860c8469f0685e0d4e27139855 | [
"Apache-2.0"
] | null | null | null | vcx/wrappers/python3/vcx/api/disclosed_proof.py | esplinr/evernym-sdk | f7d99da59fb436860c8469f0685e0d4e27139855 | [
"Apache-2.0"
] | null | null | null | vcx/wrappers/python3/vcx/api/disclosed_proof.py | esplinr/evernym-sdk | f7d99da59fb436860c8469f0685e0d4e27139855 | [
"Apache-2.0"
] | null | null | null | from typing import Optional
from ctypes import *
from vcx.common import do_call, create_cb
from vcx.api.connection import Connection
from vcx.api.vcx_stateful import VcxStateful
import json
class DisclosedProof(VcxStateful):
def __init__(self, source_id: str):
VcxStateful.__init__(self, source_id)
... | 40.744361 | 116 | 0.644768 | 5,225 | 0.9642 | 0 | 0 | 2,416 | 0.445839 | 4,516 | 0.833364 | 642 | 0.118472 |
0bf431d2785411629685e804d55562f39393e330 | 3,442 | py | Python | pingdom/pingdom.py | srinivas-kandula/integrations | 7c9857fadacc845b3261ba5c1244faccd6511c80 | [
"Apache-2.0"
] | 10 | 2016-09-23T21:09:55.000Z | 2022-02-05T08:12:43.000Z | pingdom/pingdom.py | srinivas-kandula/integrations | 7c9857fadacc845b3261ba5c1244faccd6511c80 | [
"Apache-2.0"
] | 20 | 2017-06-29T00:20:56.000Z | 2022-03-24T07:32:15.000Z | pingdom/pingdom.py | srinivas-kandula/integrations | 7c9857fadacc845b3261ba5c1244faccd6511c80 | [
"Apache-2.0"
] | 39 | 2016-11-22T17:19:44.000Z | 2022-03-24T07:09:42.000Z | import sys
import requests
import json
import argparse
import time
parser = argparse.ArgumentParser(description='Collects monitoring data from Pingdom.')
parser.add_argument('-u', '--pingdom-user-name', help='The Pingdom User Name', required=True)
parser.add_argument('-p', '--pingdom-password', help='The Pingdom Passw... | 35.484536 | 129 | 0.597908 | 2,637 | 0.766124 | 0 | 0 | 0 | 0 | 0 | 0 | 619 | 0.179837 |
0bf55cef9243ecacb2a401a9c42afa57b35ecfc2 | 10,224 | py | Python | OpenData/Upsilon/Upsilon.py | tylern4/tylern4.github.io | 77d8b5fecd91d2b884ae54e2fb3d59c521e02b8b | [
"MIT"
] | null | null | null | OpenData/Upsilon/Upsilon.py | tylern4/tylern4.github.io | 77d8b5fecd91d2b884ae54e2fb3d59c521e02b8b | [
"MIT"
] | null | null | null | OpenData/Upsilon/Upsilon.py | tylern4/tylern4.github.io | 77d8b5fecd91d2b884ae54e2fb3d59c521e02b8b | [
"MIT"
] | 1 | 2018-07-29T15:46:03.000Z | 2018-07-29T15:46:03.000Z | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
from scipy import stats
from pandas.tools.plotting import scatter_matrix
from scipy.optimize import curve_fit
from matplotlib.colors import LogNorm
df = pd.read_csv('/Users/tylern/Homework/PHYS723/project/LHC/CM... | 34.894198 | 83 | 0.601624 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,643 | 0.356318 |
0bf5dadbd56e25b757cc7da476655a19d6ca5294 | 4,187 | py | Python | lib/JumpScale/lib/perftesttools/NodeBase.py | rudecs/jumpscale_core7 | 30c03f26f1cdad3edbb9d79d50fbada8acc974f5 | [
"Apache-2.0"
] | null | null | null | lib/JumpScale/lib/perftesttools/NodeBase.py | rudecs/jumpscale_core7 | 30c03f26f1cdad3edbb9d79d50fbada8acc974f5 | [
"Apache-2.0"
] | 4 | 2016-08-25T12:08:39.000Z | 2018-04-12T12:36:01.000Z | lib/JumpScale/lib/perftesttools/NodeBase.py | rudecs/jumpscale_core7 | 30c03f26f1cdad3edbb9d79d50fbada8acc974f5 | [
"Apache-2.0"
] | 3 | 2016-03-08T07:49:34.000Z | 2018-10-19T13:56:43.000Z | from JumpScale import j
# import sys
# import time
# import json
# import os
# import psutil
from MonitorTools import *
# from pssh import ParallelSSHClient
from gevent import monkey
monkey.patch_socket()
class NodeBase(MonitorTools):
def __init__(self,ipaddr,sshport=22,role=None,name=""):
"""
e... | 32.968504 | 152 | 0.602579 | 3,977 | 0.949845 | 0 | 0 | 0 | 0 | 0 | 0 | 1,433 | 0.34225 |
0bf660edadd12f37c5d93c674b3c544660d4a84c | 2,467 | py | Python | test/test_ABVD.py | SimonGreenhill/ABVDGet | 4d101577af00476c113394f014a6c74ba4351e0a | [
"BSD-3-Clause"
] | 2 | 2018-01-20T13:35:54.000Z | 2021-11-24T16:11:20.000Z | test/test_ABVD.py | SimonGreenhill/ABVDGet | 4d101577af00476c113394f014a6c74ba4351e0a | [
"BSD-3-Clause"
] | 10 | 2017-05-09T22:26:31.000Z | 2018-06-15T00:05:07.000Z | test/test_ABVD.py | SimonGreenhill/ABVDGet | 4d101577af00476c113394f014a6c74ba4351e0a | [
"BSD-3-Clause"
] | 1 | 2018-01-20T13:40:40.000Z | 2018-01-20T13:40:40.000Z | import os
import unittest
import tempfile
from abvdget import ABVDatabase, Record
TESTDATA = os.path.join(os.path.dirname(__file__), 'nengone.json')
EXPECTED = {
99: {
"LID": 99,
"Annotation": "arm and hand",
"Cognacy": '1',
"Item": "nin",
"Loan": None,
"Word": "ha... | 26.244681 | 79 | 0.544386 | 1,550 | 0.626516 | 0 | 0 | 86 | 0.034762 | 0 | 0 | 513 | 0.207357 |
0bf672dcc2a270e726f2eccda64b6330ea2402ec | 662 | py | Python | PythonAPI/scripts/analyze.py | ZhuLingfeng1993/coco | da9a7245581b1ac91a925eef64b1beb9a1cd7df5 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | PythonAPI/scripts/analyze.py | ZhuLingfeng1993/coco | da9a7245581b1ac91a925eef64b1beb9a1cd7df5 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | PythonAPI/scripts/analyze.py | ZhuLingfeng1993/coco | da9a7245581b1ac91a925eef64b1beb9a1cd7df5 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | #!/usr/bin/env python
# -----------------------------------------------------
# Written by Zhu Lingfeng on 2021/3/28.
# -----------------------------------------------------
import sys
from pycocotools.coco_analyze import COCOAnalyze, my_plot
annFile = sys.argv[1]
coco = COCOAnalyze(annFile)
# get all cats
catNms =... | 25.461538 | 63 | 0.634441 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 302 | 0.456193 |
0bf78cd69208917995cc6b701d1673bbdd16907c | 1,821 | py | Python | custom_components/ge_home/entities/ac/fan_mode_options.py | olds/ha_gehome | 5cb24deab64bcade45861da0497a84631845922c | [
"MIT"
] | 41 | 2021-08-02T02:15:54.000Z | 2022-03-30T11:11:42.000Z | custom_components/ge_home/entities/ac/fan_mode_options.py | olds/ha_gehome | 5cb24deab64bcade45861da0497a84631845922c | [
"MIT"
] | 46 | 2021-08-03T02:20:59.000Z | 2022-03-30T11:17:15.000Z | custom_components/ge_home/entities/ac/fan_mode_options.py | olds/ha_gehome | 5cb24deab64bcade45861da0497a84631845922c | [
"MIT"
] | 15 | 2021-08-31T00:21:33.000Z | 2022-03-30T12:53:21.000Z | import logging
from typing import Any, List, Optional
from homeassistant.components.climate.const import (
HVAC_MODE_AUTO,
HVAC_MODE_COOL,
HVAC_MODE_FAN_ONLY,
)
from gehomesdk import ErdAcFanSetting
from ..common import OptionsConverter
_LOGGER = logging.getLogger(__name__)
class AcFanModeOptionsConverte... | 35.705882 | 126 | 0.672707 | 1,528 | 0.839099 | 0 | 0 | 322 | 0.176826 | 0 | 0 | 42 | 0.023064 |
0bf9cab5ada34a8d93c85264fbdb2e3064f7cf91 | 13,975 | py | Python | tests/test_basic.py | WSULib/combine | 8e01ac83ca742ab792ba00e7e5c08bcfe8b48ef5 | [
"MIT"
] | 24 | 2017-10-18T17:24:43.000Z | 2019-04-26T17:40:41.000Z | tests/test_basic.py | WSULib/combine | 8e01ac83ca742ab792ba00e7e5c08bcfe8b48ef5 | [
"MIT"
] | 355 | 2017-08-31T20:27:30.000Z | 2019-05-30T18:06:27.000Z | tests/test_basic.py | tulibraries/combine | eb100ea17193d65485aa6c4a7f05a41b4cab7515 | [
"MIT"
] | 4 | 2018-02-28T18:36:54.000Z | 2019-04-22T18:33:43.000Z | import django
import os
import pytest
import shutil
import sys
import time
import uuid
# logging
import logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
# init django settings file to retrieve settings
os.environ['DJANGO_SETTINGS_MODULE'] = 'combine.settings'
sys.path.append('/opt/combine'... | 31.906393 | 712 | 0.63127 | 0 | 0 | 0 | 0 | 11,903 | 0.851735 | 0 | 0 | 6,828 | 0.488587 |
0bfa78dfdaf19508cfab604315689fd88cd82b24 | 5,188 | py | Python | tree.py | rainer85ah/SupervisedLearning | 7d25d139434c852a6d14b98c4f089bd42814612d | [
"MIT"
] | null | null | null | tree.py | rainer85ah/SupervisedLearning | 7d25d139434c852a6d14b98c4f089bd42814612d | [
"MIT"
] | null | null | null | tree.py | rainer85ah/SupervisedLearning | 7d25d139434c852a6d14b98c4f089bd42814612d | [
"MIT"
] | null | null | null | """ Decision Trees - Supervised learning: 1-Classification*, 2-Regression.
D.T.s are a non-parametric supervised learning method used for classification and regression. The goal is to create a
model that predicts the value of a target variable by learning simple decision rules inferred from the data features.
Some adv... | 67.376623 | 121 | 0.792791 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,131 | 0.796261 |
0bfbd279db6c90816fbfdf80c181a91b1e674dce | 8,984 | py | Python | src/main.py | ckbjimmy/clneg | 7d74a31394ee946a8683a2361c7580071e65562b | [
"MIT"
] | 22 | 2018-10-24T02:19:13.000Z | 2022-01-04T23:13:16.000Z | src/main.py | ckbjimmy/clneg | 7d74a31394ee946a8683a2361c7580071e65562b | [
"MIT"
] | 2 | 2020-04-01T11:20:51.000Z | 2021-05-21T02:15:49.000Z | src/main.py | ckbjimmy/clneg | 7d74a31394ee946a8683a2361c7580071e65562b | [
"MIT"
] | 8 | 2019-12-04T13:25:46.000Z | 2021-02-23T04:30:17.000Z | import os
import sys
import re
import numpy as np
#from create_neglist import *
import pandas as pd
pd.set_option('display.max_rows', None)
from create_tokenization import *
from pycorenlp import StanfordCoreNLP
from concept_extraction import *
from syntactic_parsing import *
from tree_rules import *
from nltk.corpus i... | 45.145729 | 182 | 0.547863 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,346 | 0.261131 |
0bfc78ffcaa52c031df7862987e09dbeaa8057b9 | 61,939 | py | Python | sdk/python/pulumi_azure_native/edgeorder/v20201201preview/outputs.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_native/edgeorder/v20201201preview/outputs.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_native/edgeorder/v20201201preview/outputs.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 35.679147 | 141 | 0.651883 | 59,942 | 0.967759 | 0 | 0 | 60,522 | 0.977123 | 0 | 0 | 29,555 | 0.477163 |
0bfd287e39c3f7db093ee81af20b674fef10f6e4 | 754 | py | Python | open-hackathon/src/hackathon/__init__.py | SpAiNiOr/LABOSS | 32ad341821e9f30fecfa338b5669f574d32dd0fa | [
"Apache-2.0"
] | null | null | null | open-hackathon/src/hackathon/__init__.py | SpAiNiOr/LABOSS | 32ad341821e9f30fecfa338b5669f574d32dd0fa | [
"Apache-2.0"
] | null | null | null | open-hackathon/src/hackathon/__init__.py | SpAiNiOr/LABOSS | 32ad341821e9f30fecfa338b5669f574d32dd0fa | [
"Apache-2.0"
] | null | null | null | __author__ = 'Junbo Wang'
__version__ = '2.0'
from flask import Flask
from hackathon.functions import safe_get_config
from flask_restful import Api
from flask_cors import CORS
# flask
app = Flask(__name__)
app.config['SECRET_KEY'] = '*K&ep_me^se(ret_!@#$'
# flask restful
api = Api(app)
# CORS
app.config['CORS_HEADE... | 21.542857 | 78 | 0.696286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 467 | 0.619363 |
0bff94692e4bbe3d3e04ebd669ece2fd2be0847b | 489 | py | Python | nrm_django/nrm_site/settings/test.py | 18F/NRM-Grants-Agreements | 7b9016e034b75a2237f7c70ba539b542108c335e | [
"CC0-1.0"
] | 5 | 2020-11-18T20:00:02.000Z | 2021-04-16T23:50:07.000Z | nrm_django/nrm_site/settings/test.py | USDAForestService/NRM-Grants-Agreements | 7b9016e034b75a2237f7c70ba539b542108c335e | [
"CC0-1.0"
] | 210 | 2021-04-28T16:26:34.000Z | 2022-03-14T16:31:21.000Z | nrm_django/nrm_site/settings/test.py | USDAForestService/NRM-Grants-Agreements | 7b9016e034b75a2237f7c70ba539b542108c335e | [
"CC0-1.0"
] | 2 | 2021-07-06T20:57:27.000Z | 2021-07-07T13:06:46.000Z | import os
from .base import * # noqa
import dj_database_url
SECRET_KEY = "test mode"
database_url = os.getenv("DATABASE_URL")
if database_url:
DATABASES = {"default": dj_database_url.parse(database_url)}
else:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
... | 21.26087 | 64 | 0.554192 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 168 | 0.343558 |
0bfffd029eb8a857f5995b9732496cb660d8fb9b | 1,213 | py | Python | exampleTree_simpleS3.py | evilrovot/attackTrees | e228037e7a4705bf405f48b582f8d0fda4c981d8 | [
"Apache-2.0"
] | null | null | null | exampleTree_simpleS3.py | evilrovot/attackTrees | e228037e7a4705bf405f48b582f8d0fda4c981d8 | [
"Apache-2.0"
] | null | null | null | exampleTree_simpleS3.py | evilrovot/attackTrees | e228037e7a4705bf405f48b582f8d0fda4c981d8 | [
"Apache-2.0"
] | null | null | null | from models import Action, Block, Detect, Discovery, Edge, Node
import renderer
if __name__ == "__main__":
root = Node(label="Reality")
goal = Node(label="Attacker gets data from bucket")
apiCache = Action(
label="Search API Caches",
chain="recon",
cost=0,
time=3,
o... | 26.955556 | 65 | 0.610058 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 331 | 0.272877 |
0400e97086bae64fd628eddd3e280d7f1e6fb57b | 14,853 | py | Python | python_scripts/geometry_factory.py | rwilliams01/isogeometric_application | e505061603b56b4f426220946da5ec551dc6c142 | [
"MIT"
] | null | null | null | python_scripts/geometry_factory.py | rwilliams01/isogeometric_application | e505061603b56b4f426220946da5ec551dc6c142 | [
"MIT"
] | null | null | null | python_scripts/geometry_factory.py | rwilliams01/isogeometric_application | e505061603b56b4f426220946da5ec551dc6c142 | [
"MIT"
] | null | null | null | import math
from KratosMultiphysics import *
from KratosMultiphysics.BRepApplication import *
from KratosMultiphysics.IsogeometricApplication import *
###
### This module is a factory to generate typical geometries for isogeometric analysis, e.g. circle, l-shape, ...
###
nurbs_fespace_library = BSplinesFESpaceLibrary... | 38.280928 | 158 | 0.642698 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,809 | 0.256447 |
04013197d6bb7d88a6cd252419bfeecd25b47689 | 6,945 | py | Python | tutorials/tutorial_imc.py | softbear/squidpy_notebooks | 28a5989105e705f06070fbe52b3dfb4d5741e3bd | [
"MIT"
] | null | null | null | tutorials/tutorial_imc.py | softbear/squidpy_notebooks | 28a5989105e705f06070fbe52b3dfb4d5741e3bd | [
"MIT"
] | null | null | null | tutorials/tutorial_imc.py | softbear/squidpy_notebooks | 28a5989105e705f06070fbe52b3dfb4d5741e3bd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Analyze Imaging Mass Cytometry data
===================================
This tutorial shows how to apply Squidpy to Imaging Mass Cytometry data.
The data used here comes from a recent paper from :cite:`jackson2020single`.
We provide a pre-processed subset of the data, in :class:`anndata.AnnD... | 42.87037 | 103 | 0.667819 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,212 | 0.894456 |
0403256dd8688242a04b96465856edb3da68c15d | 604 | py | Python | music_site/mongoServices/services.py | UVG-Teams/music-space | 8f464b6b1cbe59afea3be3ab1b9ed4e25ab0b424 | [
"MIT"
] | null | null | null | music_site/mongoServices/services.py | UVG-Teams/music-space | 8f464b6b1cbe59afea3be3ab1b9ed4e25ab0b424 | [
"MIT"
] | null | null | null | music_site/mongoServices/services.py | UVG-Teams/music-space | 8f464b6b1cbe59afea3be3ab1b9ed4e25ab0b424 | [
"MIT"
] | null | null | null | from pymongo import MongoClient
client = MongoClient()
db = client.music_space
def print_collection(collection):
print("/" * 75)
for x in db[collection].find():
print(x)
print("/" * 75)
def save_sales_on_mongo(collection, data):
for i in range(len(data['sales'])):
data['sales'][i]['to... | 27.454545 | 69 | 0.634106 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 0.190397 |
0403e4d350613ff44a670bf3891877f93092864d | 324 | py | Python | cryptodoge/cmds/units.py | grayfallstown-cryptodoge/cryptodoge | ffeb5218ce184a56073a5dc0ac5acddba3728bd4 | [
"Apache-2.0"
] | 10 | 2021-08-21T17:41:51.000Z | 2022-02-09T04:28:12.000Z | cryptodoge/cmds/units.py | grayfallstown-cryptodoge/cryptodoge | ffeb5218ce184a56073a5dc0ac5acddba3728bd4 | [
"Apache-2.0"
] | 1 | 2021-12-15T21:23:38.000Z | 2021-12-15T21:23:38.000Z | cryptodoge/cmds/units.py | grayfallstown-cryptodoge/cryptodoge | ffeb5218ce184a56073a5dc0ac5acddba3728bd4 | [
"Apache-2.0"
] | 2 | 2021-08-21T18:22:59.000Z | 2021-12-10T07:12:18.000Z | from typing import Dict
# The rest of the codebase uses mojos everywhere.
# Only use these units for user facing interfaces.
units: Dict[str, int] = {
"cryptodoge": 10 ** 6, # 1 cryptodoge (XCD) is 1,000,000 mojo (1 million)
"mojo:": 1,
"colouredcoin": 10 ** 3, # 1 coloured coin is 1000 colouredcoin mojo... | 32.4 | 78 | 0.67284 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 226 | 0.697531 |
04054ea3903ecb397e1a8c9f3bd80ebf9b23b358 | 3,203 | py | Python | scripts/build/submit_metrics.py | cypherdotXd/o3de | bb90c4ddfe2d495e9c00ebf1e2650c6d603a5676 | [
"Apache-2.0",
"MIT"
] | 11 | 2021-07-08T09:58:26.000Z | 2022-03-17T17:59:26.000Z | scripts/build/submit_metrics.py | RoddieKieley/o3de | e804fd2a4241b039a42d9fa54eaae17dc94a7a92 | [
"Apache-2.0",
"MIT"
] | 29 | 2021-07-06T19:33:52.000Z | 2022-03-22T10:27:49.000Z | scripts/build/submit_metrics.py | RoddieKieley/o3de | e804fd2a4241b039a42d9fa54eaae17dc94a7a92 | [
"Apache-2.0",
"MIT"
] | 4 | 2021-07-06T19:24:43.000Z | 2022-03-31T12:42:27.000Z | #
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
import argparse
import logging
import json
import socket
from datetime import datetime
SOCKET_TIMEOUT = 6... | 35.588889 | 131 | 0.650952 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,006 | 0.314081 |
040553ee254257bcd7d020b647af86d296e5b39b | 4,167 | py | Python | pylearn2/models/local_coordinate_coding.py | Menerve/pylearn2 | ad7bcfda3294404aebd71f5a5c4a8623d401a98e | [
"BSD-3-Clause"
] | 3 | 2016-01-23T10:18:39.000Z | 2019-02-28T06:22:45.000Z | pylearn2/models/local_coordinate_coding.py | Menerve/pylearn2 | ad7bcfda3294404aebd71f5a5c4a8623d401a98e | [
"BSD-3-Clause"
] | null | null | null | pylearn2/models/local_coordinate_coding.py | Menerve/pylearn2 | ad7bcfda3294404aebd71f5a5c4a8623d401a98e | [
"BSD-3-Clause"
] | null | null | null | """
.. todo::
WRITEME
"""
import logging
from theano import function, shared
from pylearn2.optimization import linear_cg as cg
from pylearn2.optimization.feature_sign import feature_sign_search
import numpy as N
import theano.tensor as T
from pylearn2.utils.rng import make_np_rng
logger = logging.getLogger(__nam... | 25.564417 | 75 | 0.556036 | 3,839 | 0.921286 | 0 | 0 | 0 | 0 | 0 | 0 | 1,116 | 0.267819 |
0405d2a62685ff4d6a8f6ab13f719af2aff5fa9b | 7,239 | py | Python | components/mpas-source/testing_and_setup/compass/landice/hydro-radial/plot_hydro-radial_profile.py | meng630/GMD_E3SM_SCM | 990f84598b79f9b4763c3a825a7d25f4e0f5a565 | [
"FTL",
"zlib-acknowledgement",
"RSA-MD"
] | null | null | null | components/mpas-source/testing_and_setup/compass/landice/hydro-radial/plot_hydro-radial_profile.py | meng630/GMD_E3SM_SCM | 990f84598b79f9b4763c3a825a7d25f4e0f5a565 | [
"FTL",
"zlib-acknowledgement",
"RSA-MD"
] | null | null | null | components/mpas-source/testing_and_setup/compass/landice/hydro-radial/plot_hydro-radial_profile.py | meng630/GMD_E3SM_SCM | 990f84598b79f9b4763c3a825a7d25f4e0f5a565 | [
"FTL",
"zlib-acknowledgement",
"RSA-MD"
] | null | null | null | #!/usr/bin/env python
'''
Plots profiles for hydro-margin test case
'''
from __future__ import absolute_import, division, print_function, unicode_literals
import numpy as np
import netCDF4
from optparse import OptionParser
import matplotlib.pyplot as plt
from matplotlib import cm
secInYr = 3600.0 * 24.0 * 365.0 # N... | 29.426829 | 154 | 0.683105 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,739 | 0.378367 |
0405f2b3fc38c8bd5678c1eebbbb0e7b2bd3a132 | 3,301 | py | Python | abovl/app.py | romanchyla/arxiv_biboverlay | 2847a564b55fd96d461798c535377c679bc829e8 | [
"MIT"
] | 2 | 2019-03-17T01:50:46.000Z | 2020-10-02T07:57:21.000Z | abovl/app.py | mattbierbaum/arxiv_biboverlay | 2847a564b55fd96d461798c535377c679bc829e8 | [
"MIT"
] | 1 | 2019-10-24T12:16:30.000Z | 2019-10-24T12:19:13.000Z | abovl/app.py | arXiv/arxiv-biboverlay-ads-tokens | 2847a564b55fd96d461798c535377c679bc829e8 | [
"MIT"
] | 2 | 2020-12-06T16:29:19.000Z | 2021-11-05T12:30:41.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
from adsmutils import ADSFlask, get_date
from views import bp
from abovl.models import OAuthClient
from flask.ext.session import Session
def create_app(**config):
"""
Create the application and return it to the user
:return: flask.Flask application
"""
ap... | 38.383721 | 120 | 0.580127 | 2,776 | 0.840957 | 0 | 0 | 0 | 0 | 0 | 0 | 980 | 0.29688 |
0405fb654ca1caa004613619d41e36289a568124 | 853 | bzl | Python | integration/bazel_workspace_tests/bazel_ngtsc_plugin/packages.bzl | John-Cassidy/angular | 6375fa79875c0fe7b815efc45940a6e6f5c9c9eb | [
"MIT"
] | 95,154 | 2015-01-01T04:52:07.000Z | 2022-03-31T21:33:49.000Z | integration/bazel_workspace_tests/bazel_ngtsc_plugin/packages.bzl | John-Cassidy/angular | 6375fa79875c0fe7b815efc45940a6e6f5c9c9eb | [
"MIT"
] | 45,008 | 2015-01-03T23:36:09.000Z | 2022-03-31T23:57:28.000Z | integration/bazel_workspace_tests/bazel_ngtsc_plugin/packages.bzl | John-Cassidy/angular | 6375fa79875c0fe7b815efc45940a6e6f5c9c9eb | [
"MIT"
] | 30,083 | 2015-01-02T20:55:07.000Z | 2022-03-31T21:03:16.000Z | ANGULAR_PACKAGES_CONFIG = [
("@angular/animations", struct(entry_points = ["browser"])),
("@angular/common", struct(entry_points = ["http/testing", "http", "testing"])),
("@angular/compiler", struct(entry_points = ["testing"])),
("@angular/core", struct(entry_points = ["testing"])),
("@angular/forms... | 40.619048 | 84 | 0.638921 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 283 | 0.33177 |
0406964288c8043fef5666ff547d7e3e0ba8ec71 | 792 | py | Python | 2017-05-13-concurrent-and-parallel-programming-in-python-part-1/threading_no_inheritance.py | funweb/blog | 3544121ba70522d5ffced1a0d7f8ff3fa0afdeca | [
"BSD-3-Clause"
] | 4 | 2016-07-23T14:15:56.000Z | 2019-05-22T10:05:27.000Z | 2017-05-13-concurrent-and-parallel-programming-in-python-part-1/threading_no_inheritance.py | funweb/blog | 3544121ba70522d5ffced1a0d7f8ff3fa0afdeca | [
"BSD-3-Clause"
] | null | null | null | 2017-05-13-concurrent-and-parallel-programming-in-python-part-1/threading_no_inheritance.py | funweb/blog | 3544121ba70522d5ffced1a0d7f8ff3fa0afdeca | [
"BSD-3-Clause"
] | 3 | 2016-08-30T15:42:32.000Z | 2019-11-24T09:58:21.000Z | #!/usr/bin/env python
#
# Author: Daniela Duricekova <[email protected]>
#
import requests
import threading
import queue
URLS = [
'https://xkcd.com/138/',
'https://xkcd.com/149/',
'https://xkcd.com/285/',
'https://xkcd.com/303/',
'https://xkcd.com/327/',
'https://xkcd.com/387/',
... | 19.317073 | 73 | 0.592172 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 278 | 0.35101 |
040a17322fbf5848fa187c564957601556a8278d | 593 | py | Python | frontend/felask/__init__.py | pdonorio/restangulask | 8b2f59223f04e4857d131042a1b0d2666232ed8a | [
"MIT"
] | 4 | 2016-05-14T09:23:21.000Z | 2017-05-18T11:37:47.000Z | frontend/felask/__init__.py | pdonorio/restangulask | 8b2f59223f04e4857d131042a1b0d2666232ed8a | [
"MIT"
] | 28 | 2015-12-18T10:34:39.000Z | 2021-07-13T17:23:09.000Z | frontend/felask/__init__.py | pdonorio/restangulask | 8b2f59223f04e4857d131042a1b0d2666232ed8a | [
"MIT"
] | 2 | 2016-05-14T11:55:54.000Z | 2016-07-28T06:17:39.000Z | # -*- coding: utf-8 -*-
""" Factory and blueprints patterns """
import os
from commons.logs import get_logger
from commons.meta import Meta as m
logger = get_logger(__name__)
################
config = {
"default": "config.devel",
"development": "config.devel",
"production": "config.prod",
# "testing... | 25.782609 | 73 | 0.698145 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 257 | 0.43339 |
040a73dce7da16a79d50d9fa98ac26dd027253c4 | 3,235 | py | Python | pickups/irc.py | mtomwing/pickups | b25967eab1ec6316995b1420b2e9d9b862094bf8 | [
"MIT"
] | 75 | 2015-01-07T15:32:23.000Z | 2022-02-09T23:09:24.000Z | pickups/irc.py | okurz/pickups | b25967eab1ec6316995b1420b2e9d9b862094bf8 | [
"MIT"
] | 18 | 2015-02-17T17:31:46.000Z | 2017-04-22T05:36:46.000Z | pickups/irc.py | okurz/pickups | b25967eab1ec6316995b1420b2e9d9b862094bf8 | [
"MIT"
] | 28 | 2015-01-21T16:23:30.000Z | 2022-02-09T23:09:36.000Z | import logging
RPL_WELCOME = 1
RPL_WHOISUSER = 311
RPL_ENDOFWHO = 315
RPL_LISTSTART = 321
RPL_LIST = 322
RPL_LISTEND = 323
RPL_TOPIC = 332
RPL_WHOREPLY = 352
RPL_NAMREPLY = 353
RPL_ENDOFNAMES = 366
RPL_MOTD = 372
RPL_MOTDSTART = 375
RPL_ENDOFMOTD = 376
ERR_NOSUCHCHANNEL = 403
logger = logging.getLogger(__name__)
... | 31.715686 | 78 | 0.605873 | 2,914 | 0.900773 | 0 | 0 | 0 | 0 | 0 | 0 | 843 | 0.260587 |
040f11281f6c105b03b8346650ea2ba027a765e1 | 14,733 | py | Python | ForumMediaAnalyzer/MediaAnalyzer.py | jesseVDwolf/ForumMediaAnalyzer | 63d98920380073ab72528ac7f58a53f5f1adc9a3 | [
"MIT"
] | null | null | null | ForumMediaAnalyzer/MediaAnalyzer.py | jesseVDwolf/ForumMediaAnalyzer | 63d98920380073ab72528ac7f58a53f5f1adc9a3 | [
"MIT"
] | null | null | null | ForumMediaAnalyzer/MediaAnalyzer.py | jesseVDwolf/ForumMediaAnalyzer | 63d98920380073ab72528ac7f58a53f5f1adc9a3 | [
"MIT"
] | null | null | null | import re
import cv2
import json
import base64
import logging
import requests
import numpy as np
from datetime import datetime
import pytz
import gridfs
import pymongo
from pymongo import MongoClient
from pymongo.errors import ServerSelectionTimeoutError as MongoServerSelectionTimeoutError
import image... | 49.439597 | 146 | 0.527591 | 14,321 | 0.972036 | 0 | 0 | 2,526 | 0.171452 | 0 | 0 | 4,450 | 0.302043 |
041064c5ce5d6e640b83bd91055137139e3baf14 | 11,801 | py | Python | fluid/image_classification/train.py | bingyanghuang/models | 092914524cdfced300cbd5d5dcf1db998f99c7dc | [
"Apache-2.0"
] | null | null | null | fluid/image_classification/train.py | bingyanghuang/models | 092914524cdfced300cbd5d5dcf1db998f99c7dc | [
"Apache-2.0"
] | null | null | null | fluid/image_classification/train.py | bingyanghuang/models | 092914524cdfced300cbd5d5dcf1db998f99c7dc | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import numpy as np
import time
import sys
import functools
import math
import paddle
import paddle.fluid as fluid
import paddle.dataset.flowers as flowers
import models
import reader
import argparse
fr... | 39.734007 | 106 | 0.585289 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,141 | 0.181425 |
041169eb352349150706a4d189fa7c6c01de6c21 | 1,889 | py | Python | Room.py | jberkow713/Adventure_Game | 4208be1d2a1fd71a46ff1ab6e6713a2cbaf1c8f7 | [
"MIT"
] | null | null | null | Room.py | jberkow713/Adventure_Game | 4208be1d2a1fd71a46ff1ab6e6713a2cbaf1c8f7 | [
"MIT"
] | null | null | null | Room.py | jberkow713/Adventure_Game | 4208be1d2a1fd71a46ff1ab6e6713a2cbaf1c8f7 | [
"MIT"
] | null | null | null | # Implement a class to hold room information. This should have name and
# description attributes.
class Room:
def __init__(self, number, world, name, description, enemies, enemyHP, enemy_diff, companion=[], item=[] ,enemy_description=[] ):
self.number = number
self.name = name
self.worl... | 33.732143 | 136 | 0.558497 | 1,361 | 0.720487 | 0 | 0 | 0 | 0 | 0 | 0 | 104 | 0.055056 |
0411c865d2a24b1680ac0780bd1e42a63973bbe8 | 4,844 | py | Python | server.py | fdp0525/seam-erasure | fa3aece97b4a4ab0a2bdaf0ea96911253d8a38fc | [
"MIT"
] | 1 | 2022-03-05T13:33:51.000Z | 2022-03-05T13:33:51.000Z | server.py | fdp0525/seam-erasure | fa3aece97b4a4ab0a2bdaf0ea96911253d8a38fc | [
"MIT"
] | null | null | null | server.py | fdp0525/seam-erasure | fa3aece97b4a4ab0a2bdaf0ea96911253d8a38fc | [
"MIT"
] | null | null | null | from __future__ import print_function
import os
import base64
import cStringIO
import time
import numpy
from PIL import Image
from flask import (Flask, request, render_template, url_for, flash, redirect,
send_file)
from SeamErasure import seam_erasure, obj_reader, util
from SeamErasure.lib import weight_data
... | 35.357664 | 79 | 0.570809 | 0 | 0 | 0 | 0 | 3,653 | 0.754129 | 0 | 0 | 503 | 0.10384 |
041275e33d9dfd21ee2a3f3c2fcabed44c088a34 | 1,203 | py | Python | summarizer/server.py | mhsong95/ai-moderator | df971f609b6b211aeee39009a3fb289bf8596475 | [
"Apache-2.0"
] | 4 | 2022-01-01T11:27:49.000Z | 2022-01-11T07:32:25.000Z | summarizer/server.py | mhsong95/ai-moderator | df971f609b6b211aeee39009a3fb289bf8596475 | [
"Apache-2.0"
] | null | null | null | summarizer/server.py | mhsong95/ai-moderator | df971f609b6b211aeee39009a3fb289bf8596475 | [
"Apache-2.0"
] | null | null | null | from http.server import HTTPServer, BaseHTTPRequestHandler
from urllib.parse import parse_qs
from IPython.display import display
from summarizer import Summarizer
bert_model = Summarizer()
from transformers import pipeline
bart_summarizer = pipeline("summarization")
def bert_summarizing_model(input_txt, sent, ratio):
... | 29.341463 | 64 | 0.680798 | 501 | 0.416459 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.093932 |
0412bd04f86d75afe26c0f4fb4bf3b33f3366b14 | 3,481 | py | Python | otter/html.py | transientlunatic/otter | e6be6ab454474a04c3d2c6abf8f7848079642f38 | [
"0BSD"
] | null | null | null | otter/html.py | transientlunatic/otter | e6be6ab454474a04c3d2c6abf8f7848079642f38 | [
"0BSD"
] | null | null | null | otter/html.py | transientlunatic/otter | e6be6ab454474a04c3d2c6abf8f7848079642f38 | [
"0BSD"
] | null | null | null |
import matplotlib, numpy
from . import plot
import markdown
import tabulate
md_extensions = [
'markdown.extensions.tables',
'markdown.extensions.extra'
]
class HTMLElement(object):
tag = None
childtag = None
def __init__(self, content=None, **kwargs):
self.content = []
self.m... | 30.008621 | 95 | 0.568228 | 1,836 | 0.527435 | 0 | 0 | 0 | 0 | 0 | 0 | 530 | 0.152255 |
04134b9c96f43ad672f3c3d788080e76c5ac0aed | 20,472 | py | Python | pymodaq_plugins/hardware/PI/PIPython/pipython/datarectools.py | SofyMeu/pymodaq_plugins | 42aff578063de9f0e15467eda6d4fb4225524e76 | [
"CECILL-B"
] | 1 | 2019-08-08T01:46:00.000Z | 2019-08-08T01:46:00.000Z | pymodaq_plugins/hardware/PI/PIPython/pipython/datarectools.py | SofyMeu/pymodaq_plugins | 42aff578063de9f0e15467eda6d4fb4225524e76 | [
"CECILL-B"
] | 2 | 2020-11-18T04:03:51.000Z | 2021-02-09T18:03:35.000Z | pymodaq_plugins/hardware/PI/PIPython/pipython/datarectools.py | SofyMeu/pymodaq_plugins | 42aff578063de9f0e15467eda6d4fb4225524e76 | [
"CECILL-B"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tools for setting up and using the data recorder of a PI device."""
from logging import debug, warning
from time import sleep, time
from pipython.pitools import FrozenClass
# seconds
SERVOTIMES = {
'C-413K011': 0.00003333333,
'C-663.11': 50E-6,
'C-702.00': 100... | 37.221818 | 118 | 0.621434 | 14,715 | 0.718787 | 0 | 0 | 8,301 | 0.405481 | 0 | 0 | 8,013 | 0.391413 |
0413c12c2eb58e98cad7f0b71a3fe624a6287c07 | 4,181 | py | Python | stemel/stemel_foxdot.py | reneghosh/stemel | 3a3d2635f57418f78c0b317a6125727668382469 | [
"MIT"
] | null | null | null | stemel/stemel_foxdot.py | reneghosh/stemel | 3a3d2635f57418f78c0b317a6125727668382469 | [
"MIT"
] | 1 | 2019-01-25T11:40:50.000Z | 2019-01-25T11:40:50.000Z | stemel/stemel_foxdot.py | satelliteray/stemel | 3a3d2635f57418f78c0b317a6125727668382469 | [
"MIT"
] | null | null | null | from FoxDot import *
from stemel.stemel import *
def foxdotidy(pitches, durations, sustains):
"""
transform a stemel note matrix
into a foxdot-compatible one.
"""
# clean up values that have rests but other notes too
# replace mixed durations with the first non-rest
counter = 0
for line in durations:
... | 31.201493 | 104 | 0.666826 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,113 | 0.266204 |
0413d003a791010c53460cd58a2f4cb6b4826cdf | 503 | py | Python | msgpack_stream/_io.py | gesslerpd/msgpack-stream | 4c5a189f1359ef788a9f5c5ae75eb2b0ddddb9f9 | [
"MIT"
] | null | null | null | msgpack_stream/_io.py | gesslerpd/msgpack-stream | 4c5a189f1359ef788a9f5c5ae75eb2b0ddddb9f9 | [
"MIT"
] | null | null | null | msgpack_stream/_io.py | gesslerpd/msgpack-stream | 4c5a189f1359ef788a9f5c5ae75eb2b0ddddb9f9 | [
"MIT"
] | null | null | null | import io
class container(dict):
__getattr__ = dict.__getitem__
__setattr__ = dict.__setitem__
__delattr__ = dict.__delitem__
def pack(typ, obj):
stream = io.BytesIO()
typ.pack(stream, obj)
data = stream.getvalue()
stream.close()
return data
def unpack(typ, data):
stream = io.... | 18.62963 | 55 | 0.656064 | 128 | 0.254473 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.029821 |
041460ce850652eb21366eb704e9c3078b556bb6 | 12,448 | py | Python | code/segmentation.py | alejandropages/KernelPheno | 5a8d1fc8892b5cbc1309d42261596d12402c545c | [
"MIT"
] | null | null | null | code/segmentation.py | alejandropages/KernelPheno | 5a8d1fc8892b5cbc1309d42261596d12402c545c | [
"MIT"
] | 1 | 2020-12-04T02:34:43.000Z | 2020-12-04T02:34:43.000Z | code/segmentation.py | alejandropages/KernelPheno | 5a8d1fc8892b5cbc1309d42261596d12402c545c | [
"MIT"
] | null | null | null | from skimage.segmentation import slic
from skimage.io import imread, imsave
from skimage.color import rgb2gray
from skimage.measure import label, regionprops
from skimage.filters import threshold_otsu, gaussian
from skimage.color import label2rgb
from skimage.morphology import binary_closing, binary_opening, square
fro... | 32.671916 | 147 | 0.566436 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,376 | 0.271208 |
04152059b68354f1293334f8c6d0586fb6c11889 | 5,271 | py | Python | examples/logan.py | codepr/drain | e2d9f1d3dfcc78ec8504eb2e8eef70b13247d174 | [
"WTFPL"
] | null | null | null | examples/logan.py | codepr/drain | e2d9f1d3dfcc78ec8504eb2e8eef70b13247d174 | [
"WTFPL"
] | 1 | 2020-08-18T21:22:15.000Z | 2021-02-01T22:39:16.000Z | examples/logan.py | codepr/drain | e2d9f1d3dfcc78ec8504eb2e8eef70b13247d174 | [
"WTFPL"
] | null | null | null | #!/usr/bin/env python
#
# Drain usage example, a simple HTTP log aggregation stats monitor.
#
# Monitor an ever-growing HTTP log in Common Log Format by tailing it (let's a
# tail subprocess handle all the hassles like rename, re-creation during
# log-rotation etc.) and aggregating some stats on a time-basis.
#
# LogSt... | 28.646739 | 83 | 0.611649 | 3,287 | 0.623601 | 538 | 0.102068 | 809 | 0.153481 | 698 | 0.132423 | 1,685 | 0.319674 |
0416d53aab351e719d74b901b85b83af2eaaf30a | 3,854 | py | Python | Instructions/app.py | RHARO-DATA/sqlalchemy_Challenge | f1be50e3a26f3de71f89cc9d0d21be80bdaec968 | [
"ADSL"
] | null | null | null | Instructions/app.py | RHARO-DATA/sqlalchemy_Challenge | f1be50e3a26f3de71f89cc9d0d21be80bdaec968 | [
"ADSL"
] | null | null | null | Instructions/app.py | RHARO-DATA/sqlalchemy_Challenge | f1be50e3a26f3de71f89cc9d0d21be80bdaec968 | [
"ADSL"
] | null | null | null | from flask import Flask, jsonify
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine, func, desc
import pandas as pd
import numpy as np
import datetime as dt
import sqlalchemy
engine = create_engine("sqlite:///Resources/hawaii.sqlite")
... | 27.927536 | 182 | 0.707836 | 0 | 0 | 0 | 0 | 3,143 | 0.815516 | 0 | 0 | 556 | 0.144266 |
041736fd2e4a9549c96880f461f2c706cb2ed8e3 | 1,189 | py | Python | cogdl/layers/gin_layer.py | cenyk1230/cogdl | fa1f74d5c3a15b5a52abfc7cd3f04dce4b7dbcce | [
"MIT"
] | 1,072 | 2019-08-02T05:46:21.000Z | 2022-03-31T07:51:53.000Z | cogdl/layers/gin_layer.py | cenyk1230/cogdl | fa1f74d5c3a15b5a52abfc7cd3f04dce4b7dbcce | [
"MIT"
] | 96 | 2019-08-05T17:27:22.000Z | 2022-03-03T08:36:57.000Z | cogdl/layers/gin_layer.py | cenyk1230/cogdl | fa1f74d5c3a15b5a52abfc7cd3f04dce4b7dbcce | [
"MIT"
] | 299 | 2019-08-08T07:33:10.000Z | 2022-03-31T09:30:07.000Z | import torch
import torch.nn as nn
from cogdl.utils import spmm
class GINLayer(nn.Module):
r"""Graph Isomorphism Network layer from paper `"How Powerful are Graph
Neural Networks?" <https://arxiv.org/pdf/1810.00826.pdf>`__.
.. math::
h_i^{(l+1)} = f_\Theta \left((1 + \epsilon) h_i^{l} +
... | 30.487179 | 75 | 0.606392 | 1,121 | 0.942809 | 0 | 0 | 0 | 0 | 0 | 0 | 600 | 0.504626 |
04173ab291a28dec9be5ec4dc8e4e4e26a03aeda | 20 | py | Python | purviewcli/model/__init__.py | pblocz/purviewcli | 4f3ac4f746fac80a2db1e8c6910b88b2a70cb21b | [
"MIT"
] | null | null | null | purviewcli/model/__init__.py | pblocz/purviewcli | 4f3ac4f746fac80a2db1e8c6910b88b2a70cb21b | [
"MIT"
] | null | null | null | purviewcli/model/__init__.py | pblocz/purviewcli | 4f3ac4f746fac80a2db1e8c6910b88b2a70cb21b | [
"MIT"
] | null | null | null | from .atlas import * | 20 | 20 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
04188d5b55bb17b85704edde7d4e46723975338c | 67 | py | Python | src/backend/database/__init__.py | aimanow/sft | dce87ffe395ae4bd08b47f28e07594e1889da819 | [
"Apache-2.0"
] | null | null | null | src/backend/database/__init__.py | aimanow/sft | dce87ffe395ae4bd08b47f28e07594e1889da819 | [
"Apache-2.0"
] | null | null | null | src/backend/database/__init__.py | aimanow/sft | dce87ffe395ae4bd08b47f28e07594e1889da819 | [
"Apache-2.0"
] | null | null | null | from app.extensions import db, bcrypt
__all__ = ['db', 'bcrypt']
| 13.4 | 37 | 0.686567 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.179104 |
0418998a91da3e3d7abd865cd4fdccc83d2e5270 | 325 | py | Python | arboreto/utils.py | redst4r/arboreto | 3ff7b6f987b32e5774771751dea646fa6feaaa52 | [
"BSD-3-Clause"
] | 20 | 2018-06-28T07:00:47.000Z | 2020-10-08T08:58:22.000Z | arboreto/utils.py | redst4r/arboreto | 3ff7b6f987b32e5774771751dea646fa6feaaa52 | [
"BSD-3-Clause"
] | 23 | 2018-06-06T13:11:20.000Z | 2021-01-08T03:37:43.000Z | arboreto/utils.py | redst4r/arboreto | 3ff7b6f987b32e5774771751dea646fa6feaaa52 | [
"BSD-3-Clause"
] | 15 | 2018-11-21T08:21:46.000Z | 2020-11-25T06:28:32.000Z | """
Utility functions.
"""
def load_tf_names(path):
"""
:param path: the path of the transcription factor list file.
:return: a list of transcription factor names read from the file.
"""
with open(path) as file:
tfs_in_file = [line.strip() for line in file.readlines()]
return tfs_in_... | 20.3125 | 69 | 0.655385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 172 | 0.529231 |
0419d09c8576ea0ee5a5a7dda0668b4eb489ea24 | 315 | py | Python | twitter_auth.py | lagolucas/twitter-mimic | 1d2a26f56f0796d8dcbfb2d2175dddd706235606 | [
"MIT"
] | 1 | 2020-01-16T18:45:51.000Z | 2020-01-16T18:45:51.000Z | twitter_auth.py | lagolucas/twitter-mimic | 1d2a26f56f0796d8dcbfb2d2175dddd706235606 | [
"MIT"
] | null | null | null | twitter_auth.py | lagolucas/twitter-mimic | 1d2a26f56f0796d8dcbfb2d2175dddd706235606 | [
"MIT"
] | null | null | null | import tweepy
def autentica():
auth = tweepy.OAuthHandler(consumer_token, consumer_secret)
auth.set_access_token(key, secret)
api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True, retry_count=3, retry_delay=60,
retry_errors=set([503]))
return api
| 24.230769 | 114 | 0.707937 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
041b02a9d732f392f197e950c0af95abe44f914e | 678 | py | Python | user.py | kevin3708/PythonIP1 | e0909ec45ae653a3b81eaa44ce2679d401c5480a | [
"Unlicense"
] | null | null | null | user.py | kevin3708/PythonIP1 | e0909ec45ae653a3b81eaa44ce2679d401c5480a | [
"Unlicense"
] | null | null | null | user.py | kevin3708/PythonIP1 | e0909ec45ae653a3b81eaa44ce2679d401c5480a | [
"Unlicense"
] | null | null | null | class User:
"""
Class that generates new instances of users.
"""
user_list = []
def __init__(self,tUsername,iUsername,email,sUsername):
self.tUsername=tUsername
self.iUsername=iUsername
self.email=email
self.sUsername=sUsername
def save_user(self):
Us... | 23.37931 | 59 | 0.584071 | 649 | 0.957227 | 0 | 0 | 231 | 0.340708 | 0 | 0 | 140 | 0.20649 |
041d25b3caf16615ffe44105dc3916c9eb43a246 | 10,048 | py | Python | tf_DDPG.py | laket/DDPG_Eager | e0b6f960acc193838189b714e67cd1f7da60f440 | [
"Apache-2.0"
] | 2 | 2019-05-13T18:43:17.000Z | 2019-08-22T08:08:03.000Z | tf_DDPG.py | DeanLeeFumu/DDPG_Eager | e0b6f960acc193838189b714e67cd1f7da60f440 | [
"Apache-2.0"
] | null | null | null | tf_DDPG.py | DeanLeeFumu/DDPG_Eager | e0b6f960acc193838189b714e67cd1f7da60f440 | [
"Apache-2.0"
] | 1 | 2019-08-23T02:45:16.000Z | 2019-08-23T02:45:16.000Z | # Copyright 2018 Oiki Tomoaki. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 40.192 | 116 | 0.624104 | 9,164 | 0.908766 | 0 | 0 | 1,780 | 0.176517 | 0 | 0 | 1,320 | 0.1309 |
041d51bd7b7973f10ca83696af8bf2fcc94f43e1 | 2,776 | py | Python | apps/restaccount/resources.py | solatis/microservices | ee80292fe94cca93e3e2be6c5bbe5c46f34a9969 | [
"MIT"
] | 38 | 2017-09-08T20:04:31.000Z | 2022-01-20T12:53:44.000Z | apps/restaccount/resources.py | solatis/microservices | ee80292fe94cca93e3e2be6c5bbe5c46f34a9969 | [
"MIT"
] | 6 | 2020-02-11T23:09:25.000Z | 2022-03-02T14:53:40.000Z | apps/restaccount/resources.py | solatis/microservices | ee80292fe94cca93e3e2be6c5bbe5c46f34a9969 | [
"MIT"
] | 8 | 2018-04-26T03:42:56.000Z | 2021-07-30T19:54:04.000Z | import json
import falcon
import time
import uuid
import requests
from apps.database import init_db, db_session
from apps.models import Account
from apps.restaccount.logging import logging
logger = logging.getLogger(__name__)
from decouple import config
ES_HOST = config('EVENTSTORE_HOST', default='eventstore')
ES_PO... | 31.908046 | 147 | 0.627522 | 2,126 | 0.76585 | 0 | 0 | 0 | 0 | 0 | 0 | 728 | 0.262248 |
0420a40477dce2cde3d6888f93745bcc9d79ef0d | 4,123 | py | Python | mmselfsup/models/algorithms/cae.py | mitming/mmselfsup | 5b5cb474776291cfcb9a1140afd11b696e11fcab | [
"Apache-2.0"
] | 355 | 2021-12-16T04:32:49.000Z | 2022-03-31T22:15:23.000Z | mmselfsup/models/algorithms/cae.py | mitming/mmselfsup | 5b5cb474776291cfcb9a1140afd11b696e11fcab | [
"Apache-2.0"
] | 89 | 2021-12-16T05:15:42.000Z | 2022-03-31T10:57:39.000Z | mmselfsup/models/algorithms/cae.py | mitming/mmselfsup | 5b5cb474776291cfcb9a1140afd11b696e11fcab | [
"Apache-2.0"
] | 74 | 2021-12-16T04:40:02.000Z | 2022-03-31T08:40:32.000Z | # Copyright (c) OpenMMLab. All rights reserved.
from typing import Sequence
import torch
from torchvision.transforms import Normalize
from ..builder import ALGORITHMS, build_backbone, build_head, build_neck
from .base import BaseModel
@ALGORITHMS.register_module()
class CAE(BaseModel):
"""CAE.
Implementati... | 37.481818 | 77 | 0.589619 | 3,853 | 0.934514 | 0 | 0 | 3,883 | 0.94179 | 0 | 0 | 955 | 0.231627 |
0420d2d243d0288c4e945481bf301146269df94c | 3,776 | py | Python | plncpro/predstoseq.py | nicolasDelhomme/PLncPRO | af11592e779170ff351f841b4b2754577e068999 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 5 | 2019-03-30T02:33:36.000Z | 2021-06-23T02:50:27.000Z | plncpro/predstoseq.py | nicolasDelhomme/PLncPRO | af11592e779170ff351f841b4b2754577e068999 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 2 | 2021-12-25T04:30:19.000Z | 2022-02-27T00:18:12.000Z | plncpro/predstoseq.py | nicolasDelhomme/PLncPRO | af11592e779170ff351f841b4b2754577e068999 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 4 | 2019-03-30T02:33:43.000Z | 2022-01-11T10:07:55.000Z | '''
PLNCPRO
This file takes as input
and it extracts dasta seq by label after reading prediction file
Author : Urminder Singh
email: [email protected]
UrMi 3/5/16
'''
import sys
import getopt
#import math
#import re
from Bio import SeqIO
from Bio.Seq import Seq
def main(args = sys.argv,home=None):
#set defaults... | 28.390977 | 210 | 0.662606 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,742 | 0.461335 |
0421fc55c0cd9357dc4b4cf552bac0572d28cf55 | 1,609 | py | Python | KnowledgeQuizTool/SummitMeeting/TitleBaidu.py | JianmingXia/StudyTest | 66d688ad41bbce619f44359ea126ff07a923f97b | [
"MIT"
] | null | null | null | KnowledgeQuizTool/SummitMeeting/TitleBaidu.py | JianmingXia/StudyTest | 66d688ad41bbce619f44359ea126ff07a923f97b | [
"MIT"
] | 68 | 2020-09-05T04:22:49.000Z | 2022-03-25T18:47:08.000Z | KnowledgeQuizTool/SummitMeeting/TitleBaidu.py | JianmingXia/StudyTest | 66d688ad41bbce619f44359ea126ff07a923f97b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Author : Skye
# @Time : 2018/1/8 20:38
# @desc : python 3 , 答题闯关辅助,截屏 ,OCR 识别,百度搜索
import io
import urllib.parse
import webbrowser
import requests
import base64
import matplotlib.pyplot as plt
import numpy as np
from PIL import Image
import os
def pull_screenshot():
os.system('a... | 26.377049 | 128 | 0.709758 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 905 | 0.532666 |
04236a7fa8c2bd2c2904277f4b28429731483ed2 | 1,084 | py | Python | tools/tianchi_xray/mixup_test.py | vivym/maskrcnn-benchmark | 4e1763ae09dab1ceebafad54412df657790ec9dc | [
"MIT"
] | null | null | null | tools/tianchi_xray/mixup_test.py | vivym/maskrcnn-benchmark | 4e1763ae09dab1ceebafad54412df657790ec9dc | [
"MIT"
] | null | null | null | tools/tianchi_xray/mixup_test.py | vivym/maskrcnn-benchmark | 4e1763ae09dab1ceebafad54412df657790ec9dc | [
"MIT"
] | null | null | null | import os
import random
import numpy as np
import matplotlib.pyplot as plt
from PIL import Image
def main():
names = list(os.listdir('datasets/tianchi_xray/restricted/'))
img1 = Image.open(os.path.join('datasets/tianchi_xray/restricted', names[random.randint(0, len(names))]))
img2 = Image.open(os.path.joi... | 28.526316 | 109 | 0.653137 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 0.135609 |
0423b04563faed43dcb0948218e34b03759c29d8 | 650 | py | Python | mockito_util/write_readme.py | edgeware/mockito-python | 7cd7bfb75dfbc94414cca770d9676d798058788a | [
"MIT"
] | 4 | 2015-05-17T08:01:25.000Z | 2016-08-14T15:23:10.000Z | mockito_util/write_readme.py | edgeware/mockito-python | 7cd7bfb75dfbc94414cca770d9676d798058788a | [
"MIT"
] | 1 | 2015-08-03T09:14:27.000Z | 2015-08-03T09:34:09.000Z | mockito_util/write_readme.py | edgeware/mockito-python | 7cd7bfb75dfbc94414cca770d9676d798058788a | [
"MIT"
] | 2 | 2015-04-23T20:16:46.000Z | 2021-04-07T11:03:22.000Z | from __future__ import print_function
import os
import re
def openFile(f, m='r'):
if (os.path.exists(f)):
return open(f, m)
else:
return open('../' + f, m)
demo_test = ' '.join(openFile('mockito_test/demo_test.py').readlines())
demo_test = demo_test.split('#DELIMINATOR')[1]
readme_before = ''.join(... | 26 | 90 | 0.678462 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 140 | 0.215385 |
0423ce64c5f4c6cd0750ca2bcda5bdd83017475b | 5,887 | py | Python | pyperformance/run.py | brandtbucher/pyperformance | f81d9f41f43418f1914c9a791c13c4591e23f399 | [
"MIT"
] | 255 | 2016-08-27T05:38:56.000Z | 2019-05-27T16:15:38.000Z | pyperformance/run.py | brandtbucher/pyperformance | f81d9f41f43418f1914c9a791c13c4591e23f399 | [
"MIT"
] | 43 | 2016-08-30T15:22:01.000Z | 2019-05-24T10:59:54.000Z | pyperformance/run.py | brandtbucher/pyperformance | f81d9f41f43418f1914c9a791c13c4591e23f399 | [
"MIT"
] | 55 | 2016-08-30T15:19:45.000Z | 2019-05-20T12:41:02.000Z | from collections import namedtuple
import hashlib
import sys
import time
import traceback
import pyperformance
from . import _utils, _python, _pythoninfo
from .venv import VenvForBenchmarks, REQUIREMENTS_FILE
from . import _venv
class BenchmarkException(Exception):
pass
class RunID(namedtuple('RunID', 'python ... | 28.302885 | 86 | 0.584678 | 803 | 0.136402 | 0 | 0 | 301 | 0.05113 | 0 | 0 | 828 | 0.140649 |
0423e7262923e363b55991428757fd12dccb993b | 2,147 | py | Python | src/mqc/qc_filters.py | stephenkraemer/bistro | c9f63e948d20f8f1e59163f6267ad83cb70caa9d | [
"BSD-3-Clause"
] | 1 | 2020-11-09T13:41:46.000Z | 2020-11-09T13:41:46.000Z | src/mqc/qc_filters.py | stephenkraemer/bistro | c9f63e948d20f8f1e59163f6267ad83cb70caa9d | [
"BSD-3-Clause"
] | null | null | null | src/mqc/qc_filters.py | stephenkraemer/bistro | c9f63e948d20f8f1e59163f6267ad83cb70caa9d | [
"BSD-3-Clause"
] | null | null | null | """MotifPileupProcessors for QC filtering"""
# TODO: combine PhredFilter and MapqFilter to avoid cost for double
# iteration
from mqc.visitors import Visitor
from mqc.pileup.pileup import MotifPileup
import mqc.flag_and_index_values as mfl
qflag = mfl.qc_fail_flags
mflag = mfl.methylation_status_flags
from typing ... | 37.666667 | 83 | 0.72054 | 1,777 | 0.827667 | 0 | 0 | 0 | 0 | 0 | 0 | 1,206 | 0.561714 |
04252521ad95d6d680ccffe8c6e5cf43ba96bcec | 1,110 | py | Python | akilib/raspberrypi/AKI_I2C_LPS25H.py | nonNoise/akilib | f111514f544ef765205faebd925d19c810121dad | [
"MIT"
] | 29 | 2015-05-28T11:20:36.000Z | 2018-09-07T07:35:08.000Z | examples/raspberrypi/akilib/raspberrypi/AKI_I2C_LPS25H.py | nonNoise/akilib | f111514f544ef765205faebd925d19c810121dad | [
"MIT"
] | null | null | null | examples/raspberrypi/akilib/raspberrypi/AKI_I2C_LPS25H.py | nonNoise/akilib | f111514f544ef765205faebd925d19c810121dad | [
"MIT"
] | 4 | 2015-07-03T08:41:19.000Z | 2018-09-07T07:35:51.000Z | #import mraa
import smbus
import time
I2C_ADDR = 0x5C
class AKI_I2C_LPS25H:
def __init__(self):
print "AKI_I2C_LPS25H"
self.i2c = smbus.SMBus(1)
def i2cReg(self,wr,addr=0x00,data=0x00):
try:
if(wr == "w"):
return self.i2c.write_byte_data(I2C_ADDR,addr,data)... | 25.227273 | 67 | 0.496396 | 1,053 | 0.948649 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 0.068468 |
0427d648c870d7a9d365daf12a45f9e8f97edf96 | 7,326 | py | Python | figure/Figure2C_general_size_effect.py | YuanxiaoGao/Evolution_of_reproductive_strategies_in_incipient_multicellularity | 13eb51639fcee630a76e197b50ef321e3a94ce0f | [
"MIT"
] | null | null | null | figure/Figure2C_general_size_effect.py | YuanxiaoGao/Evolution_of_reproductive_strategies_in_incipient_multicellularity | 13eb51639fcee630a76e197b50ef321e3a94ce0f | [
"MIT"
] | null | null | null | figure/Figure2C_general_size_effect.py | YuanxiaoGao/Evolution_of_reproductive_strategies_in_incipient_multicellularity | 13eb51639fcee630a76e197b50ef321e3a94ce0f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 27 09:58:57 2020
@author: gao
"""
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import colors
from mpl_toolkits.axes_grid1 import AxesGrid
import matplotlib as mpl
import os
from matplotlib.colors import LinearSegmentedColormap... | 34.556604 | 194 | 0.616025 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,316 | 0.725635 |
042994e79327daa22dad9686c292c61076c1cb9d | 4,029 | py | Python | lib/jnpr/eznc/facts/swver.py | cro/py-junos-eznc | 4c111476cc8eb7599462379ddf55743ae30bbf5c | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | lib/jnpr/eznc/facts/swver.py | cro/py-junos-eznc | 4c111476cc8eb7599462379ddf55743ae30bbf5c | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | lib/jnpr/eznc/facts/swver.py | cro/py-junos-eznc | 4c111476cc8eb7599462379ddf55743ae30bbf5c | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | import re
class version_info(object):
def __init__(self, verstr ):
"""verstr - version string"""
m1 = re.match('(.*)([RBIXS])(.*)', verstr)
self.type = m1.group(2)
self.major = tuple(map(int,m1.group(1).split('.'))) # creates tuyple
after_type = m1.group(3).split('.')
self.minor = after_typ... | 39.116505 | 114 | 0.561181 | 1,789 | 0.444031 | 0 | 0 | 0 | 0 | 0 | 0 | 1,651 | 0.409779 |
042a1dff477ec006dda477d8738dfe23bcc7b467 | 9,358 | py | Python | modules.py | callistachang/CycleGAN-Music-Transfer | 928e87b4bebc4da1dcf7c43936d2c10fe76170f1 | [
"MIT"
] | null | null | null | modules.py | callistachang/CycleGAN-Music-Transfer | 928e87b4bebc4da1dcf7c43936d2c10fe76170f1 | [
"MIT"
] | 1 | 2021-07-07T13:36:18.000Z | 2021-07-07T13:36:18.000Z | modules.py | callistachang/CycleGAN-Music-Transfer | 928e87b4bebc4da1dcf7c43936d2c10fe76170f1 | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
from tensorflow.keras import Model, layers, Input
from collections import namedtuple
def abs_criterion(pred, target):
return tf.reduce_mean(tf.abs(pred - target))
def mae_criterion(pred, target):
return tf.reduce_mean((pred - target) ** 2)
def sce_criterion(logit... | 25.498638 | 85 | 0.556315 | 2,093 | 0.223659 | 0 | 0 | 0 | 0 | 0 | 0 | 1,762 | 0.188288 |
042bf56fcdd938bcd7ece04e0e049f1f49f9d9ac | 4,910 | py | Python | app.py | chaipi-chaya/Boston-Crime-Analysis | ffb5065d594f372c73eb830117bbff78ffd91c06 | [
"MIT"
] | 2 | 2020-01-02T15:28:17.000Z | 2020-02-04T23:35:58.000Z | app.py | chaipi-chaya/Boston-Crime-Analysis | ffb5065d594f372c73eb830117bbff78ffd91c06 | [
"MIT"
] | null | null | null | app.py | chaipi-chaya/Boston-Crime-Analysis | ffb5065d594f372c73eb830117bbff78ffd91c06 | [
"MIT"
] | null | null | null | from flask import Flask
from flask import render_template
from flask import request,session, redirect, url_for, escape,send_from_directory
import requests
import json
app = Flask(__name__, static_url_path='')
def predictor(tavg, model, degree):
if degree == 3:
y = model['coef'][0][3]*(tavg**3) + \
... | 35.323741 | 151 | 0.563951 | 0 | 0 | 0 | 0 | 3,997 | 0.814053 | 0 | 0 | 1,354 | 0.275764 |