hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
177b2b2fc328442186cfa83ce8437c5a552fcc24 | 1,651 | py | Python | models/conv_lstm.py | i1idan/schizophrenia-diagnosis-eeg-signals | 50e51c16c6df0a61b5e62223c404039d659c9d48 | [
"MIT"
] | 5 | 2021-12-24T18:20:16.000Z | 2022-01-27T19:45:28.000Z | models/conv_lstm.py | i1idan/schizophrenia-diagnosis-eeg-signals | 50e51c16c6df0a61b5e62223c404039d659c9d48 | [
"MIT"
] | null | null | null | models/conv_lstm.py | i1idan/schizophrenia-diagnosis-eeg-signals | 50e51c16c6df0a61b5e62223c404039d659c9d48 | [
"MIT"
] | 1 | 2021-12-24T18:19:23.000Z | 2021-12-24T18:19:23.000Z | from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
from tensorflow.keras.layers import Flatten
from tensorflow.keras.layers import Dropout
from tensorflow.keras.layers import LSTM, Conv1D, GRU
from tensorflow.keras.layers import TimeDistributed
from tensorflow.keras.layers import M... | 39.309524 | 89 | 0.643852 |
177c08e0f1aa8faf34025ae8c1b40c9f8d1f633f | 2,112 | py | Python | ST_DM/KDD2021-MSTPAC/code/MST-PAC/frame/core/gpu_predictor.py | zhangyimi/Research | 866f91d9774a38d205d6e9a3b1ee6293748261b3 | [
"Apache-2.0"
] | 1,319 | 2020-02-14T10:42:07.000Z | 2022-03-31T15:42:18.000Z | ST_DM/KDD2021-MSTPAC/code/MST-PAC/frame/core/gpu_predictor.py | green9989/Research | 94519a72e7936c77f62a31709634b72c09aabf74 | [
"Apache-2.0"
] | 192 | 2020-02-14T02:53:34.000Z | 2022-03-31T02:25:48.000Z | ST_DM/KDD2021-MSTPAC/code/MST-PAC/frame/core/gpu_predictor.py | green9989/Research | 94519a72e7936c77f62a31709634b72c09aabf74 | [
"Apache-2.0"
] | 720 | 2020-02-14T02:12:38.000Z | 2022-03-31T12:21:15.000Z | #############################################################################
#
# Copyright (c) 2019 Baidu.com, Inc. All Rights Reserved
#
############################################################################
"""
Specify the brief gpu_predictor.py
Author: map(wushilei@baidu.com)
Date: 2019/07/21 20:09:58... | 32 | 85 | 0.650095 |
177e76b8a5ad62be0cc716aa96929143804c2c31 | 77 | py | Python | src/fdk_organization_bff/sparql/__init__.py | Informasjonsforvaltning/organization-page-bffe | 473dc9606649f864618f4f8bfc4a6a2a035f06d7 | [
"Apache-2.0"
] | null | null | null | src/fdk_organization_bff/sparql/__init__.py | Informasjonsforvaltning/organization-page-bffe | 473dc9606649f864618f4f8bfc4a6a2a035f06d7 | [
"Apache-2.0"
] | 47 | 2020-05-14T07:54:48.000Z | 2022-03-29T22:17:08.000Z | src/fdk_organization_bff/sparql/__init__.py | Informasjonsforvaltning/organization-page-bffe | 473dc9606649f864618f4f8bfc4a6a2a035f06d7 | [
"Apache-2.0"
] | null | null | null | """SPARQL package.
Modules:
dataset_queries
dataservice_queries
"""
| 11 | 23 | 0.701299 |
177e8c1d5af7739ef2b33bcff39f04682a94721f | 2,368 | py | Python | Python/CoviDetect/covid_detect/sub_app/views.py | Idhant-6/HAcktoberfest-2021-With-Python | ae6f8b5aadeca5a7329fe8e8d7de3f5069e687a1 | [
"MIT"
] | 14 | 2021-10-01T16:53:27.000Z | 2021-10-17T13:15:44.000Z | Python/CoviDetect/covid_detect/sub_app/views.py | Idhant-6/HAcktoberfest-2021-With-Python | ae6f8b5aadeca5a7329fe8e8d7de3f5069e687a1 | [
"MIT"
] | 37 | 2021-10-01T17:14:52.000Z | 2021-10-21T17:26:14.000Z | Python/CoviDetect/covid_detect/sub_app/views.py | Idhant-6/Hacktoberfest-2021 | ae6f8b5aadeca5a7329fe8e8d7de3f5069e687a1 | [
"MIT"
] | 38 | 2021-10-01T16:59:16.000Z | 2021-10-30T16:05:31.000Z | from django.http import request
from django.shortcuts import render,HttpResponse
import cv2
import numpy as np
import base64
import joblib
from numpy.core.defchararray import join
import sklearn
import pywt
# Create your views here.
# def test_(request):
# return render(request,'test.html')
| 27.858824 | 101 | 0.669341 |
17801b23c209f52e4859df74018bcf887604f24c | 5,060 | py | Python | tube_dl/formats.py | hahv/tube_dl | 4641c48d74c1881ddd6785784a3884bdea2ca674 | [
"MIT"
] | 17 | 2020-12-04T16:37:22.000Z | 2022-02-26T10:19:02.000Z | tube_dl/formats.py | hahv/tube_dl | 4641c48d74c1881ddd6785784a3884bdea2ca674 | [
"MIT"
] | 11 | 2020-12-13T01:41:33.000Z | 2022-02-19T12:58:50.000Z | tube_dl/formats.py | hahv/tube_dl | 4641c48d74c1881ddd6785784a3884bdea2ca674 | [
"MIT"
] | 10 | 2020-12-26T04:47:18.000Z | 2022-02-10T09:49:19.000Z | import string
import os
import requests
from tube_dl.extras import Output
headers = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', 'referer': 'https: //youtube.com'}
| 37.481481 | 254 | 0.562055 |
17810377c3837f4b8580799808c6d976e9b3f30b | 619 | py | Python | hopperpw/hopperpw/urls.py | teddywest32/hopper.pw | ff80ded3d34a5f33a5770d5e69405a66ff649a62 | [
"BSD-3-Clause"
] | 81 | 2015-01-03T20:35:52.000Z | 2021-01-05T22:33:15.000Z | hopperpw/hopperpw/urls.py | teddywest32/hopper.pw | ff80ded3d34a5f33a5770d5e69405a66ff649a62 | [
"BSD-3-Clause"
] | 9 | 2015-02-04T15:14:12.000Z | 2021-09-19T22:49:27.000Z | hopperpw/hopperpw/urls.py | teddywest32/hopper.pw | ff80ded3d34a5f33a5770d5e69405a66ff649a62 | [
"BSD-3-Clause"
] | 34 | 2015-01-01T06:19:23.000Z | 2021-11-23T11:35:26.000Z | # coding=utf-8
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^allauth/', include('allauth.urls')),
url(r'^accounts/', include('accounts.... | 28.136364 | 67 | 0.701131 |
1781e7376d613c7a6c0f2a03c05f305b2a11aef7 | 372 | py | Python | Utilidades/Constantes.py | SergioCMDev/Busines-Inteligence-applied-to-tourism | 61834a46fce22453e94b7bbdf8d4ecdcf128285a | [
"Apache-2.0"
] | null | null | null | Utilidades/Constantes.py | SergioCMDev/Busines-Inteligence-applied-to-tourism | 61834a46fce22453e94b7bbdf8d4ecdcf128285a | [
"Apache-2.0"
] | null | null | null | Utilidades/Constantes.py | SergioCMDev/Busines-Inteligence-applied-to-tourism | 61834a46fce22453e94b7bbdf8d4ecdcf128285a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 27 19:10:03 2017
@author: Sergio Cristauro Manzano
""" | 28.615385 | 131 | 0.642473 |
17829f70617771fbf2d26fae550ff76307f210c4 | 1,520 | py | Python | tests/test_jwt_vc.py | BasileiosKal/py-verifier | 6614bdc515f823245762c0250de429a27c39e203 | [
"MIT"
] | null | null | null | tests/test_jwt_vc.py | BasileiosKal/py-verifier | 6614bdc515f823245762c0250de429a27c39e203 | [
"MIT"
] | null | null | null | tests/test_jwt_vc.py | BasileiosKal/py-verifier | 6614bdc515f823245762c0250de429a27c39e203 | [
"MIT"
] | 2 | 2022-01-17T11:08:27.000Z | 2022-01-28T09:50:10.000Z |
import pytest
import requests
import json
from issuer import Issuer
| 40 | 119 | 0.657237 |
1782c1e0fd348b9a66a92236ad156329c06af117 | 695 | py | Python | exercicios/ex041.py | LucasLima337/CEV_Python_Exercicios | 7959fd2977a26ffca6a9adb13067d4727dc433fe | [
"MIT"
] | null | null | null | exercicios/ex041.py | LucasLima337/CEV_Python_Exercicios | 7959fd2977a26ffca6a9adb13067d4727dc433fe | [
"MIT"
] | null | null | null | exercicios/ex041.py | LucasLima337/CEV_Python_Exercicios | 7959fd2977a26ffca6a9adb13067d4727dc433fe | [
"MIT"
] | null | null | null | # Classificando Atletas
from datetime import date
from time import sleep
n = str(input('\033[1;30mDigite o seu nome completo: ')).strip().title()
a = int(input('Digite o seu ano de nascimento: '))
anoatual = date.today().year
i = anoatual - a
print('')
sleep(1.75)
print('ANALISANDO...')
sleep(2)
print('')
print('=-=' *... | 25.740741 | 72 | 0.638849 |
178374b80192e344de3181d10c48f542eee0cc58 | 1,828 | py | Python | export_name_list.py | brandyn-gilbert/DAT-281-CAPSTONE | d86dd62eab164e6845dee63954cacc0324a449bc | [
"MIT"
] | null | null | null | export_name_list.py | brandyn-gilbert/DAT-281-CAPSTONE | d86dd62eab164e6845dee63954cacc0324a449bc | [
"MIT"
] | null | null | null | export_name_list.py | brandyn-gilbert/DAT-281-CAPSTONE | d86dd62eab164e6845dee63954cacc0324a449bc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 12, 2021
Developed for UIF to more easily handle the growing number of alumni they have,
and to track interactions with said alumni.
Final Project for CCAC DAT-281
@author: BKG
"""
import os
import sqlite3
from sqlite3 import Error
import pandas as pd
def main(locat... | 24.702703 | 83 | 0.609409 |
1786459a46918397c8fdf54d4d007c6b15470cab | 2,537 | py | Python | base_app/treasurehunt/models.py | aadityajo/ecell-oth-django | 8006cb0793bfdf084b78df5514852665adba5588 | [
"MIT"
] | 1 | 2021-07-07T19:44:49.000Z | 2021-07-07T19:44:49.000Z | base_app/treasurehunt/models.py | aadityajo/ecell-oth-django | 8006cb0793bfdf084b78df5514852665adba5588 | [
"MIT"
] | null | null | null | base_app/treasurehunt/models.py | aadityajo/ecell-oth-django | 8006cb0793bfdf084b78df5514852665adba5588 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
from django.contrib.auth.models import BaseUserManager
from django import forms
from django.core import validators
from datetime import date
# Create your models here.
# Crea... | 28.505618 | 71 | 0.698069 |
178891f94229c492f6f9626a23fde3974ba0c8f5 | 2,071 | py | Python | old/Graph.py | csdevto/tradingbot | b024236f0d2801380e7f86aa1660c44060728eb1 | [
"MIT"
] | null | null | null | old/Graph.py | csdevto/tradingbot | b024236f0d2801380e7f86aa1660c44060728eb1 | [
"MIT"
] | null | null | null | old/Graph.py | csdevto/tradingbot | b024236f0d2801380e7f86aa1660c44060728eb1 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
#Data Source
import yfinance as yf
import time, datetime, math
from datetime import datetime
import sqlite3
#Interval required 5 minutes
con = sqlite3.connect("DB/stocks.db")
#con.row_factory = sqlite3.Row
stock = 'UBER'
data = pd.read_sql_query("... | 31.861538 | 172 | 0.652342 |
1788e3eb4a66dc8651ec9cedf05fde603a74872c | 107 | py | Python | enthought/block_canvas/class_tools/search_package.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/block_canvas/class_tools/search_package.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | enthought/block_canvas/class_tools/search_package.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | null | null | null | # proxy module
from __future__ import absolute_import
from blockcanvas.class_tools.search_package import *
| 26.75 | 52 | 0.859813 |
178b7dd958ef0de71b66b15ae19e8ed148d5bb53 | 216 | py | Python | meridian/acupoints/yuji24.py | sinotradition/meridian | 8c6c1762b204b72346be4bbfb74dedd792ae3024 | [
"Apache-2.0"
] | 5 | 2015-12-14T15:14:23.000Z | 2022-02-09T10:15:33.000Z | meridian/acupoints/yuji24.py | sinotradition/meridian | 8c6c1762b204b72346be4bbfb74dedd792ae3024 | [
"Apache-2.0"
] | null | null | null | meridian/acupoints/yuji24.py | sinotradition/meridian | 8c6c1762b204b72346be4bbfb74dedd792ae3024 | [
"Apache-2.0"
] | 3 | 2015-11-27T05:23:49.000Z | 2020-11-28T09:01:56.000Z | #!/usr/bin/python
#coding=utf-8
'''
@author: sheng
@license:
'''
SPELL=u'yj'
CN=u''
NAME=u'yuji24'
CHANNEL='lung'
CHANNEL_FULLNAME='LungChannelofHand-Taiyin'
SEQ='LU10'
if __name__ == '__main__':
pass
| 10.285714 | 43 | 0.671296 |
178b8f7b8817c326e1125ab56cb91128e6dfcebb | 6,044 | py | Python | stable_baselines_model_based_rl/sampler/gym_sampler.py | micheltokic/stable_baselines_model_based_rl | 75bac906aeba69072878ceb15d9be459b1f436c3 | [
"Apache-2.0"
] | 1 | 2022-01-08T17:08:13.000Z | 2022-01-08T17:08:13.000Z | stable_baselines_model_based_rl/sampler/gym_sampler.py | micheltokic/stable_baselines_model_based_rl | 75bac906aeba69072878ceb15d9be459b1f436c3 | [
"Apache-2.0"
] | 5 | 2021-09-15T18:14:48.000Z | 2021-09-19T16:17:51.000Z | stable_baselines_model_based_rl/sampler/gym_sampler.py | micheltokic/stable_baselines_model_based_rl | 75bac906aeba69072878ceb15d9be459b1f436c3 | [
"Apache-2.0"
] | null | null | null | import csv
import datetime
import os
import gym
from gym.spaces import space
from gym.spaces.box import Box
from gym.spaces.discrete import Discrete
from gym.spaces.multi_discrete import MultiDiscrete
from definitions import ROOT_DIR
from stable_baselines_model_based_rl.utils.configuration import Configuration
from s... | 43.797101 | 99 | 0.695069 |
178e643cf3d9baf1cd9e7a3ac1ac162854128b03 | 3,590 | py | Python | sktime/transformations/panel/tests/test_shapelet_transform.py | Rubiel1/sktime | 2fd2290fb438224f11ddf202148917eaf9b73a87 | [
"BSD-3-Clause"
] | 1 | 2021-12-22T02:45:39.000Z | 2021-12-22T02:45:39.000Z | sktime/transformations/panel/tests/test_shapelet_transform.py | Rubiel1/sktime | 2fd2290fb438224f11ddf202148917eaf9b73a87 | [
"BSD-3-Clause"
] | null | null | null | sktime/transformations/panel/tests/test_shapelet_transform.py | Rubiel1/sktime | 2fd2290fb438224f11ddf202148917eaf9b73a87 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""ShapeletTransform test code."""
import numpy as np
from numpy import testing
from sktime.datasets import load_basic_motions, load_unit_test
from sktime.transformations.panel.shapelet_transform import RandomShapeletTransform
def test_st_on_unit_test():
"""Test of ShapeletTransform on un... | 28.267717 | 83 | 0.593593 |
178f229ede5ac1bd538446aa4396921d04e3540f | 2,830 | py | Python | geom.py | suke-blog/ogr2osm | 294a9f3205ad976f7884eeb0abc7bcb4ef5412df | [
"MIT"
] | null | null | null | geom.py | suke-blog/ogr2osm | 294a9f3205ad976f7884eeb0abc7bcb4ef5412df | [
"MIT"
] | null | null | null | geom.py | suke-blog/ogr2osm | 294a9f3205ad976f7884eeb0abc7bcb4ef5412df | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (c) 2012-2013 Paul Norman
# <penorman@mac.com>
# Released under the MIT license: http://opensource.org/licenses/mit-license.php
# Classes
## Helper function to get a new ID
#def getNewID():
# Geometry.elementIdCounter += Geometry.elementIdCounterIncr
# return Geometry.eleme... | 30.106383 | 80 | 0.613428 |
178f58c78858a2df3826b89f9dc2650177ddffc7 | 10,302 | py | Python | appCore/apps/replica/api/views/pulse.py | jadedgamer/alifewellplayed.com | b7b3dee8d3b9526c7cfe77078570a29394ef7e76 | [
"MIT"
] | 4 | 2017-04-22T11:03:01.000Z | 2018-01-16T22:28:15.000Z | appCore/apps/replica/api/views/pulse.py | alifewellplayed/alifewellplayed.com | b7b3dee8d3b9526c7cfe77078570a29394ef7e76 | [
"MIT"
] | 10 | 2017-04-06T19:54:42.000Z | 2017-11-07T06:53:10.000Z | appCore/apps/replica/api/views/pulse.py | alifewellplayed/alifewellplayed.com | b7b3dee8d3b9526c7cfe77078570a29394ef7e76 | [
"MIT"
] | 1 | 2017-12-14T12:49:40.000Z | 2017-12-14T12:49:40.000Z | import hashlib
from rest_framework import generics, permissions, mixins, status
from rest_framework.permissions import IsAuthenticated
from rest_framework.authentication import *
from rest_framework.views import APIView
from rest_framework.response import Response
from django.shortcuts import render_to_response, rend... | 35.770833 | 96 | 0.66259 |
179047197bf91d3e14c6131b31ca97cf1748cbbb | 1,238 | py | Python | palaverapi/decorators.py | cocodelabs/api.palaverapp.com | cb517a2cd1dea12fadf4f72147fecf0105cbd717 | [
"BSD-3-Clause"
] | 3 | 2016-07-03T21:19:18.000Z | 2021-07-10T18:32:16.000Z | palaverapi/decorators.py | cocodelabs/api.palaverapp.com | cb517a2cd1dea12fadf4f72147fecf0105cbd717 | [
"BSD-3-Clause"
] | 66 | 2015-03-27T21:52:11.000Z | 2021-09-06T17:56:59.000Z | palaverapi/decorators.py | cocodelabs/api.palaverapp.com | cb517a2cd1dea12fadf4f72147fecf0105cbd717 | [
"BSD-3-Clause"
] | 1 | 2021-07-28T19:45:31.000Z | 2021-07-28T19:45:31.000Z | import json
from functools import wraps
from typing import Callable
from urllib.parse import parse_qsl
from rivr.http import Request, Response
from palaverapi.responses import ProblemResponse
| 34.388889 | 73 | 0.588853 |
1790c8c518d20fe2e7697039e44e0d23b4a62c91 | 9,489 | py | Python | cli/medperf/utils.py | johnugeorge/medperf | 5bc3f643064df14e9476bd4d4c1a4c0cce5337d5 | [
"Apache-2.0"
] | 1 | 2021-09-24T18:09:53.000Z | 2021-09-24T18:09:53.000Z | cli/medperf/utils.py | johnugeorge/medperf | 5bc3f643064df14e9476bd4d4c1a4c0cce5337d5 | [
"Apache-2.0"
] | 2 | 2021-09-27T16:14:04.000Z | 2021-11-03T14:24:54.000Z | cli/medperf/utils.py | johnugeorge/medperf | 5bc3f643064df14e9476bd4d4c1a4c0cce5337d5 | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from pexpect import spawn
import logging
from typing import List, Tuple
from datetime import datetime
import hashlib
import os
from shutil import rmtree
import tarfile
import yaml
from pathlib import Path
from colorama import Fore, Style
import re
import medperf.config as config
from... | 30.316294 | 89 | 0.644957 |
1791323b17a576d78ae9d6ff260342ba69a97bc9 | 919 | py | Python | tests/test_half_wildcard.py | oqwa/gwh | 9399a9b0fd5815e81d68a4d52215c273f9c0d49b | [
"MIT"
] | null | null | null | tests/test_half_wildcard.py | oqwa/gwh | 9399a9b0fd5815e81d68a4d52215c273f9c0d49b | [
"MIT"
] | null | null | null | tests/test_half_wildcard.py | oqwa/gwh | 9399a9b0fd5815e81d68a4d52215c273f9c0d49b | [
"MIT"
] | null | null | null | from gwh import *
from tests.utils import *
app = GitWebhook()
app.add_handler(lambda: None, repository=KNOWN_REPO)
app.add_handler(lambda: None, type=KNOWN_TYPE)
| 43.761905 | 90 | 0.771491 |
17935aaebc6842fbcfb1d8f850ae573d75c68bf6 | 1,873 | py | Python | analytics_pipeline-master/log_generator.py | danielvdao/etl_ideas | 18062c92e6441eae5b316e9cc8f0f2d085636a42 | [
"MIT"
] | null | null | null | analytics_pipeline-master/log_generator.py | danielvdao/etl_ideas | 18062c92e6441eae5b316e9cc8f0f2d085636a42 | [
"MIT"
] | 1 | 2017-10-17T02:58:33.000Z | 2017-10-17T02:58:33.000Z | analytics_pipeline-master/log_generator.py | danielvdao/etl_ideas | 18062c92e6441eae5b316e9cc8f0f2d085636a42 | [
"MIT"
] | null | null | null | from faker import Faker
from datetime import datetime
import random
import time
LINE = """\
{remote_addr} - - [{time_local} +0000] "{request_type} {request_path} HTTP/1.1" {status} {body_bytes_sent} "{http_referer}" "{http_user_agent}"\
"""
LOG_FILE_A = "log_a.txt"
LOG_FILE_B = "log_b.txt"
LOG_MAX = 100
if __name__ ... | 24.973333 | 144 | 0.639616 |
17952b6df72029d76f72e43b7c53730bd3ee7420 | 150 | py | Python | vetores_matrizes/exemplo_bb.py | andersonmarques/programacao_2_ufra | 94a22559eed817a429309d8da338431416608c0c | [
"MIT"
] | null | null | null | vetores_matrizes/exemplo_bb.py | andersonmarques/programacao_2_ufra | 94a22559eed817a429309d8da338431416608c0c | [
"MIT"
] | null | null | null | vetores_matrizes/exemplo_bb.py | andersonmarques/programacao_2_ufra | 94a22559eed817a429309d8da338431416608c0c | [
"MIT"
] | null | null | null | import numpy as np
valor_aplicado = np.array([5000, 6000, 7000, 8000])
juros = np.array([1, 2, 3, 4])
saida = valor_aplicado * juros
print(saida)
| 15 | 51 | 0.68 |
17952da6143d5a1227f4338f74ceef2025244a03 | 260 | py | Python | pyamg/classical/__init__.py | rsmedleystevenson/pyamg | 72c3b43e0d14223e3849cb7e5f0bc8817b342373 | [
"MIT"
] | null | null | null | pyamg/classical/__init__.py | rsmedleystevenson/pyamg | 72c3b43e0d14223e3849cb7e5f0bc8817b342373 | [
"MIT"
] | null | null | null | pyamg/classical/__init__.py | rsmedleystevenson/pyamg | 72c3b43e0d14223e3849cb7e5f0bc8817b342373 | [
"MIT"
] | null | null | null | """Classical AMG"""
from __future__ import absolute_import
from .classical import *
from .split import *
from .interpolate import *
from .cr import *
__all__ = [s for s in dir() if not s.startswith('_')]
from numpy.testing import Tester
test = Tester().test
| 21.666667 | 53 | 0.730769 |
17957d92994d6b6b24057eeb1c8fb73bd1d0a786 | 2,027 | py | Python | scripts/visualization/style.py | bo1929/basty | 3ef84578e0154509346fdc2c0c56261448d78276 | [
"MIT"
] | 5 | 2021-12-10T17:43:52.000Z | 2022-03-01T22:19:36.000Z | scripts/visualization/style.py | bo1929/basty | 3ef84578e0154509346fdc2c0c56261448d78276 | [
"MIT"
] | null | null | null | scripts/visualization/style.py | bo1929/basty | 3ef84578e0154509346fdc2c0c56261448d78276 | [
"MIT"
] | null | null | null | MAX_LIMIT = 9999
| 29.808824 | 78 | 0.391712 |
179a63e2713ef678248c5a0480244a33d8023a8f | 1,955 | py | Python | scripts/parse_aggregated_responses.py | cagnolone/openmic-2018 | 154dc425a4fac7ba45fb143ef75fa21189fc4d1c | [
"MIT"
] | 56 | 2018-08-27T15:48:37.000Z | 2021-12-25T11:01:23.000Z | scripts/parse_aggregated_responses.py | cagnolone/openmic-2018 | 154dc425a4fac7ba45fb143ef75fa21189fc4d1c | [
"MIT"
] | 37 | 2018-08-16T17:00:21.000Z | 2022-02-09T23:55:36.000Z | scripts/parse_aggregated_responses.py | cagnolone/openmic-2018 | 154dc425a4fac7ba45fb143ef75fa21189fc4d1c | [
"MIT"
] | 7 | 2018-10-09T14:48:01.000Z | 2020-06-06T12:03:15.000Z | #!/usr/bin/env python
# coding: utf8
'''Script to parse aggregated annotation responses into a CSV file of labels.
Example
-------
$ ./scripts/parse_aggregated_responses.py \
"path/to/dir/*.csv" \
openmic-2018-aggregated-labels.csv
'''
from __future__ import print_function
import argparse
import glob
import ... | 29.621212 | 88 | 0.703325 |
179adee8737327e1461212148f441c448d335da8 | 5,303 | py | Python | tests/test_looseserver/client/test_abstract_client.py | KillAChicken/loose-server | 082402f1fec94faea20343142b0c306dc5f86026 | [
"MIT"
] | 3 | 2019-04-21T13:10:34.000Z | 2019-10-08T05:20:04.000Z | tests/test_looseserver/client/test_abstract_client.py | KillAChicken/loose-server | 082402f1fec94faea20343142b0c306dc5f86026 | [
"MIT"
] | null | null | null | tests/test_looseserver/client/test_abstract_client.py | KillAChicken/loose-server | 082402f1fec94faea20343142b0c306dc5f86026 | [
"MIT"
] | null | null | null | """Test cases for abstract looseserver client."""
import uuid
from urllib.parse import urljoin
from looseserver.client.abstract import AbstractClient
def test_create_rule(client_rule_factory, client_response_factory, registered_rule):
"""Check request data that client uses to create a rule.
1. Create a sub... | 36.321918 | 100 | 0.686027 |
179ae6f54ba09f051bfa483edda5d5eea6d22097 | 5,683 | py | Python | mlops-template-gitlab/lambda_functions/lambda-seedcode-checkin-gitlab/tests/functional/api/test_merge_requests.py | giuseppe-zappia/sagemaker-custom-project-templates | a160cf250dcabf8a9a14682e28d0a39df18e3a5c | [
"MIT-0"
] | 22 | 2021-08-24T13:43:55.000Z | 2022-03-25T06:18:19.000Z | mlops-template-gitlab/lambda_functions/lambda-seedcode-checkin-gitlab/tests/functional/api/test_merge_requests.py | giuseppe-zappia/sagemaker-custom-project-templates | a160cf250dcabf8a9a14682e28d0a39df18e3a5c | [
"MIT-0"
] | 3 | 2021-09-09T00:40:56.000Z | 2022-01-26T10:53:30.000Z | mlops-template-gitlab/lambda_functions/lambda-seedcode-checkin-gitlab/tests/functional/api/test_merge_requests.py | giuseppe-zappia/sagemaker-custom-project-templates | a160cf250dcabf8a9a14682e28d0a39df18e3a5c | [
"MIT-0"
] | 15 | 2021-08-19T23:53:24.000Z | 2022-03-28T22:26:04.000Z | import time
import pytest
import gitlab
import gitlab.v4.objects
def test_merge_request_should_remove_source_branch(
project, merge_request, wait_for_sidekiq
) -> None:
"""Test to ensure
https://github.com/python-gitlab/python-gitlab/issues/1120 is fixed.
Bug reported that they could not use ... | 28.70202 | 86 | 0.682562 |
179d043db725bce8f3b6948c83cd4e08552dd537 | 687 | py | Python | Python_OCR_JE/venv/Lib/site-packages/numpy/typing/tests/data/pass/ndarray_shape_manipulation.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | 1 | 2022-01-08T12:30:44.000Z | 2022-01-08T12:30:44.000Z | Python_OCR_JE/venv/Lib/site-packages/numpy/typing/tests/data/pass/ndarray_shape_manipulation.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | Python_OCR_JE/venv/Lib/site-packages/numpy/typing/tests/data/pass/ndarray_shape_manipulation.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | 1 | 2021-04-26T22:41:56.000Z | 2021-04-26T22:41:56.000Z | import numpy as np
nd1 = np.array([[1, 2], [3, 4]])
# reshape
nd1.reshape(4)
nd1.reshape(2, 2)
nd1.reshape((2, 2))
nd1.reshape((2, 2), order="C")
nd1.reshape(4, order="C")
# resize
nd1.resize()
nd1.resize(4)
nd1.resize(2, 2)
nd1.resize((2, 2))
nd1.resize((2, 2), refcheck=True)
nd1.resize(4, refc... | 14.3125 | 34 | 0.576419 |
179d9ebc77da5b1737344a934257dda6f2f13fc3 | 3,128 | py | Python | survae/nn/layers/autoregressive/utils.py | alisiahkoohi/survae_flows | e1747b05524c7ab540a211ed360ab3e67bc3e96d | [
"MIT"
] | 262 | 2020-07-05T20:57:44.000Z | 2022-03-28T02:24:43.000Z | survae/nn/layers/autoregressive/utils.py | alisiahkoohi/survae_flows | e1747b05524c7ab540a211ed360ab3e67bc3e96d | [
"MIT"
] | 17 | 2020-08-15T05:43:34.000Z | 2022-01-31T12:24:21.000Z | survae/nn/layers/autoregressive/utils.py | alisiahkoohi/survae_flows | e1747b05524c7ab540a211ed360ab3e67bc3e96d | [
"MIT"
] | 35 | 2020-08-24T06:55:37.000Z | 2022-02-11T05:17:58.000Z | import torch
def mask_conv2d_spatial(mask_type, height, width):
"""
Creates a mask for Conv2d such that it becomes autoregressive in
the spatial dimensions.
Input:
mask_type: str
Either 'A' or 'B'. 'A' for first layer of network, 'B' for all others.
height: int
... | 34 | 108 | 0.611573 |
17a08dd6f2f3775ec7b362537d3a435fcbde0fb3 | 2,130 | py | Python | powerberry-app/src/services/config.py | Steckdoose4711/powerberry | 15c722ff66f0db5c00ddfb71ccc2c75d69b78d39 | [
"MIT"
] | null | null | null | powerberry-app/src/services/config.py | Steckdoose4711/powerberry | 15c722ff66f0db5c00ddfb71ccc2c75d69b78d39 | [
"MIT"
] | 20 | 2022-03-11T19:44:31.000Z | 2022-03-21T19:13:46.000Z | powerberry-app/src/services/config.py | Steckdoose4711/powerberry | 15c722ff66f0db5c00ddfb71ccc2c75d69b78d39 | [
"MIT"
] | null | null | null | import json
import os
import pathlib
import sys
from loguru import logger as log
| 33.28125 | 93 | 0.622066 |
17a28a397f9005910dd939fda6263ae0e3d223e7 | 1,256 | py | Python | tests/unit/operator/test_operator_utils.py | jjmachan/bentoctl | 54ca1968a7197f658a7e9dc7ab0b46db1fc7439d | [
"Apache-2.0"
] | 19 | 2021-12-12T13:27:54.000Z | 2022-03-26T13:21:08.000Z | tests/unit/operator/test_operator_utils.py | jjmachan/bentoctl | 54ca1968a7197f658a7e9dc7ab0b46db1fc7439d | [
"Apache-2.0"
] | 22 | 2021-12-09T17:37:15.000Z | 2022-03-15T20:47:43.000Z | tests/unit/operator/test_operator_utils.py | jjmachan/bentoctl | 54ca1968a7197f658a7e9dc7ab0b46db1fc7439d | [
"Apache-2.0"
] | 7 | 2021-12-13T06:48:04.000Z | 2022-03-01T17:21:13.000Z | import os
from pathlib import Path
from types import SimpleNamespace
import pytest
import bentoctl.operator.utils as operator_utils
# import bentoctl.operator.utils.git
# from bentoctl.operator import utils as operator_utils
| 27.911111 | 81 | 0.735669 |
17a2dcce962acf6079243f734b05c4cedd810650 | 3,445 | py | Python | test/parser/test_tail_parser.py | BigDataBoutique/bogi | cc247df8d18ef00ebba7986a57fefbb2ad82a1e6 | [
"Apache-2.0"
] | null | null | null | test/parser/test_tail_parser.py | BigDataBoutique/bogi | cc247df8d18ef00ebba7986a57fefbb2ad82a1e6 | [
"Apache-2.0"
] | null | null | null | test/parser/test_tail_parser.py | BigDataBoutique/bogi | cc247df8d18ef00ebba7986a57fefbb2ad82a1e6 | [
"Apache-2.0"
] | null | null | null | import unittest
from test.utils import dedent
from bogi.parser.tail import TailParser
from bogi.parser.tail_transformer import MessageBody, ContentLine, InputFileRef, MultipartField, Header, ResponseHandler, ResponseReference
| 31.898148 | 139 | 0.576488 |
17a30d472fcfbe0abfef5d81ffe2790797697496 | 3,830 | py | Python | openbox-tmux-pipe-menu.py | pawel-slowik/openbox-tmux-pipe-menu | cda64994a893c76ba1af1eb1de9fe72d1ec79c04 | [
"MIT"
] | null | null | null | openbox-tmux-pipe-menu.py | pawel-slowik/openbox-tmux-pipe-menu | cda64994a893c76ba1af1eb1de9fe72d1ec79c04 | [
"MIT"
] | null | null | null | openbox-tmux-pipe-menu.py | pawel-slowik/openbox-tmux-pipe-menu | cda64994a893c76ba1af1eb1de9fe72d1ec79c04 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import subprocess
import re
import xml.etree.ElementTree as et
import datetime as dt
import pipes
import os
import configparser
import sys
from typing import Iterable, Optional, Dict
def list_sessions_cmd() -> str:
command = [
'tmux',
'list-sessions',
'-F',
... | 27.956204 | 81 | 0.637859 |
17a347bd5164cd6a7614cc6077d50a8c68cb0c7e | 1,109 | py | Python | test_lib.py | DrakenWan/deeplearninglibrary | 0fb7d76f9220d1479c6ddadc2e6165590ab000eb | [
"Apache-2.0"
] | null | null | null | test_lib.py | DrakenWan/deeplearninglibrary | 0fb7d76f9220d1479c6ddadc2e6165590ab000eb | [
"Apache-2.0"
] | null | null | null | test_lib.py | DrakenWan/deeplearninglibrary | 0fb7d76f9220d1479c6ddadc2e6165590ab000eb | [
"Apache-2.0"
] | null | null | null | """
Tutorial reference: https://www.kdnuggets.com/2020/09/implementing-deep-learning-library-scratch-python.html
Original Library: https://github.com/parmeet/dll_numpy
Author: DrakenWan 2020
"""
import core as DL
import utilities
import numpy as np
if __name__ == "__main__":
batch_size ... | 39.607143 | 113 | 0.67899 |
17a5d125164fb471bd39e2c070263178e5c5d91d | 13,454 | py | Python | spyne/decorator.py | DXist/spyne | f185e44c0cf3c71c99471133a44c17f4a47ab46e | [
"BSD-3-Clause"
] | 1 | 2021-06-07T16:19:41.000Z | 2021-06-07T16:19:41.000Z | spyne/decorator.py | lemanyk/spyne | 12bea0be357ceebec1cf877270ce240424357c7b | [
"BSD-3-Clause"
] | null | null | null | spyne/decorator.py | lemanyk/spyne | 12bea0be357ceebec1cf877270ce240424357c7b | [
"BSD-3-Clause"
] | null | null | null |
#
# spyne - Copyright (C) Spyne contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This libra... | 41.143731 | 99 | 0.634235 |
bd587bc3d2baa172c3072e8e32527093a3a9f149 | 2,547 | py | Python | src/routes/dataNetwork.py | spaezsuarez/view-data-app | 6482b73eb39048e5dbdf133d4ccf29cc357dcb6f | [
"MIT"
] | 1 | 2021-05-28T17:01:17.000Z | 2021-05-28T17:01:17.000Z | src/routes/dataNetwork.py | spaezsuarez/view-data-app | 6482b73eb39048e5dbdf133d4ccf29cc357dcb6f | [
"MIT"
] | null | null | null | src/routes/dataNetwork.py | spaezsuarez/view-data-app | 6482b73eb39048e5dbdf133d4ccf29cc357dcb6f | [
"MIT"
] | null | null | null | from . import dataRoute
from flask import render_template, request
from utils import dataManagment
import dateutil
import datetime
| 39.796875 | 82 | 0.725167 |
bd594ed7d37726ea78538d30996e4d5ae12daca1 | 144 | py | Python | blackjack/cmake/storage/file/__init__.py | grbd/GBD.Build.BlackJack | 3e8d027625b7528af3674a373fd9931e3feaaab4 | [
"Apache-2.0"
] | 1 | 2017-05-26T00:18:26.000Z | 2017-05-26T00:18:26.000Z | blackjack/cmake/storage/file/__init__.py | grbd/GBD.Build.BlackJack | 3e8d027625b7528af3674a373fd9931e3feaaab4 | [
"Apache-2.0"
] | null | null | null | blackjack/cmake/storage/file/__init__.py | grbd/GBD.Build.BlackJack | 3e8d027625b7528af3674a373fd9931e3feaaab4 | [
"Apache-2.0"
] | null | null | null | # File Storage related class's
from .CacheFile import CacheFile
from .ScriptBlock import ScriptBlock
from .ToolchainFile import ToolchainFile
| 24 | 40 | 0.833333 |
bd59fe6a6c4d96a34287a8a86a0f7f63819a3a16 | 1,177 | py | Python | python/phonenumbers/shortdata/region_MY.py | rodgar-nvkz/python-phonenumbers | 4c7c4892211dbc9bc328bc3356b03853eaf993dc | [
"Apache-2.0"
] | 2,424 | 2015-01-05T05:34:45.000Z | 2022-03-28T22:37:53.000Z | python/phonenumbers/shortdata/region_MY.py | rodgar-nvkz/python-phonenumbers | 4c7c4892211dbc9bc328bc3356b03853eaf993dc | [
"Apache-2.0"
] | 166 | 2015-01-30T23:59:18.000Z | 2022-03-14T21:08:42.000Z | python/phonenumbers/shortdata/region_MY.py | rodgar-nvkz/python-phonenumbers | 4c7c4892211dbc9bc328bc3356b03853eaf993dc | [
"Apache-2.0"
] | 345 | 2015-01-02T00:33:27.000Z | 2022-03-26T13:06:57.000Z | """Auto-generated file, do not edit by hand. MY metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_MY = PhoneMetadata(id='MY', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='[1369]\\d{2,4}', possible_length=(3, 4,... | 98.083333 | 358 | 0.705183 |
bd5a208ee269d3bfedf85a940f895d881be68074 | 1,151 | py | Python | Chapter 4/05 - Real-life example - lazily evaluated attributes/lazy_class_attribute.py | moseskim/Expert-Python-Programming-Fourth-Edition | 5160f974deb2365597b7be9cc032f24bfa13471a | [
"MIT"
] | null | null | null | Chapter 4/05 - Real-life example - lazily evaluated attributes/lazy_class_attribute.py | moseskim/Expert-Python-Programming-Fourth-Edition | 5160f974deb2365597b7be9cc032f24bfa13471a | [
"MIT"
] | null | null | null | Chapter 4/05 - Real-life example - lazily evaluated attributes/lazy_class_attribute.py | moseskim/Expert-Python-Programming-Fourth-Edition | 5160f974deb2365597b7be9cc032f24bfa13471a | [
"MIT"
] | null | null | null | import OpenGL.GL as gl
from OpenGL.GL import shaders
| 26.767442 | 77 | 0.592528 |
bd5a5f01afeebbef48ab0545bb48413999a63520 | 6,134 | py | Python | main.py | Lulzx/gittools | b4a1a4d7169a10af10079a3903b9108843e97385 | [
"MIT"
] | 4 | 2020-10-22T03:58:56.000Z | 2021-10-29T20:45:49.000Z | main.py | Lulzx/gittools | b4a1a4d7169a10af10079a3903b9108843e97385 | [
"MIT"
] | null | null | null | main.py | Lulzx/gittools | b4a1a4d7169a10af10079a3903b9108843e97385 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import logging
import os
import sys
import time
from itertools import islice
from uuid import uuid4
import emojis
from github import Github
from telegram import InlineKeyboardButton, InlineKeyboardMarkup
from telegram import InlineQueryResultArticle, ParseMode
from teleg... | 31.45641 | 104 | 0.630747 |
bd5a9dc0a73172358dd3bd333a0ffa43e3db9416 | 440 | py | Python | app/app.py | tsmit58/flask-celery-microservice | b961b9b8fdffc11b7b8f7eb8883ec635aabdfb44 | [
"MIT"
] | 41 | 2021-03-10T15:35:19.000Z | 2022-03-03T20:04:52.000Z | app/app.py | tsmit58/flask-celery-microservice | b961b9b8fdffc11b7b8f7eb8883ec635aabdfb44 | [
"MIT"
] | 1 | 2021-08-09T13:22:21.000Z | 2021-08-10T08:36:39.000Z | app/app.py | tsmit58/flask-celery-microservice | b961b9b8fdffc11b7b8f7eb8883ec635aabdfb44 | [
"MIT"
] | 16 | 2021-03-28T23:36:22.000Z | 2022-03-31T01:55:00.000Z | from flask import Flask
from celery import Celery
import os
app = Flask(__name__)
app.config['CELERY_BROKER_URL'] = os.getenv("CELERY_BROKER_URL")
app.config['RESULT_BACKEND'] = os.getenv("CELERY_RESULT_BACKEND")
app.config['SECRET_KEY'] = os.getenv("SECRET_KEY")
celery = Celery(app.import_name,
backe... | 31.428571 | 65 | 0.725 |
bd5b5440ec10bb3d894d2f6fb7dcd6426ce92c37 | 4,132 | py | Python | SnakeGame.py | captainpolar/snakegame | 018638875309f0b17a6dbbd5c3ff4f536058b844 | [
"MIT"
] | 1 | 2021-03-29T17:15:09.000Z | 2021-03-29T17:15:09.000Z | SnakeGame.py | captainpolar/snakegame | 018638875309f0b17a6dbbd5c3ff4f536058b844 | [
"MIT"
] | null | null | null | SnakeGame.py | captainpolar/snakegame | 018638875309f0b17a6dbbd5c3ff4f536058b844 | [
"MIT"
] | null | null | null | import pygame
import random
pygame.init()
white = (255, 255, 255)
black = (0, 0, 0)
yellow = (255, 255, 102)
red = (250, 0, 0) # Other nice red color: 213, 50, 80
green = (152, 251, 152)
blue = (30, 144, 255) # other nice combo: 50, 151, 213
dis_width = 800
dis_height = 600
dis = pygame.display.set... | 29.304965 | 104 | 0.526864 |
bd5c8afbbd833cee9c288bc0007055dc079f69d8 | 3,335 | py | Python | MpSA-TRIP/BarcodeGenomeLibMain.py | wiw/pyMPFA | a72aa196859031b2194fb51f204a1ab938193aaa | [
"Unlicense"
] | null | null | null | MpSA-TRIP/BarcodeGenomeLibMain.py | wiw/pyMPFA | a72aa196859031b2194fb51f204a1ab938193aaa | [
"Unlicense"
] | null | null | null | MpSA-TRIP/BarcodeGenomeLibMain.py | wiw/pyMPFA | a72aa196859031b2194fb51f204a1ab938193aaa | [
"Unlicense"
] | null | null | null | #C:\Python27\python.exe
#!/usr/bin/env python
# encoding: utf-8
import os
# import subprocess
import SupportFunc as supp
import ReadIndexesFunc as rind
import CollectBcMutFunc as colb
import WriteFunc as wrt
import param
import picks
from TripMain_0_2 import Pdump
if __name__ == "__main__":
main() | 60.636364 | 261 | 0.661469 |
bd5d9ea17d4a9ae541c6e6916ed6741c75882ac1 | 12,036 | py | Python | polyart/_input.py | IsaacTFM/pygrr-polyart | 7a8219cd93b5691ddca89b4fb46a4af7bc1e3456 | [
"Apache-2.0"
] | 4 | 2021-11-21T18:35:54.000Z | 2021-12-14T02:02:37.000Z | polyart/_input.py | IsaacTFM/pygrr-polyart | 7a8219cd93b5691ddca89b4fb46a4af7bc1e3456 | [
"Apache-2.0"
] | 3 | 2021-11-21T18:37:56.000Z | 2021-11-21T19:15:21.000Z | polyart/_input.py | IsaacTFM/pygrr-polyart | 7a8219cd93b5691ddca89b4fb46a4af7bc1e3456 | [
"Apache-2.0"
] | 1 | 2021-11-21T18:39:52.000Z | 2021-11-21T18:39:52.000Z | """
This file handles the input of PolyArt.
"""
# if this is the origin file (not imported)
if __name__ == "__main__":
# print the documentation
print(__doc__)
# add sysmessages module location to path
from sys import path
path.append('..')
# run sysmessages
import common.sysmessages
# im... | 27.990698 | 149 | 0.534064 |
bd5f550b799363cf152de68256f97f876bf2f1f2 | 1,486 | py | Python | biodada/alphabets.py | simomarsili/biodada | 642fb440d8a66a0413deb69c8623ea3b61d41678 | [
"BSD-3-Clause"
] | null | null | null | biodada/alphabets.py | simomarsili/biodada | 642fb440d8a66a0413deb69c8623ea3b61d41678 | [
"BSD-3-Clause"
] | null | null | null | biodada/alphabets.py | simomarsili/biodada | 642fb440d8a66a0413deb69c8623ea3b61d41678 | [
"BSD-3-Clause"
] | null | null | null | """Alphabet-related methods."""
import logging
import numpy
ALPHABETS = {
'protein': '-ACDEFGHIKLMNPQRSTVWY',
'dna': '-ACGT',
'rna': '-ACGU',
'protein_u': '-ACDEFGHIKLMNPQRSTVWYBZX',
'dna_u': '-ACGTRYMKWSBDHVN',
'rna_u': '-ACGURYMKWSBDHVN',
}
logger = logging.getLogger(__name__)
def check_a... | 28.576923 | 78 | 0.647376 |
bd62a6bcee335bdbb5aaa3e5bf955b75d241b748 | 1,813 | py | Python | server/app.py | osteele/tidal-memories | afcd3c8900814577374bfd847ba05c12ca88f397 | [
"MIT"
] | 1 | 2018-07-24T20:19:52.000Z | 2018-07-24T20:19:52.000Z | server/app.py | osteele/tidal-memories | afcd3c8900814577374bfd847ba05c12ca88f397 | [
"MIT"
] | 2 | 2021-03-09T09:59:44.000Z | 2021-05-09T17:29:22.000Z | server/app.py | osteele/tidal-memories | afcd3c8900814577374bfd847ba05c12ca88f397 | [
"MIT"
] | null | null | null | import os
import gevent
import redis
from flask import Flask, render_template, send_from_directory
from flask_cors import CORS
from flask_restplus import Api
from flask_sockets import Sockets
from geventwebsocket.exceptions import WebSocketError
from .image_resource import api as images_api
from .thumbnails import SM... | 26.661765 | 77 | 0.629344 |
bd63313f347912b5d918aa4c501b628907905f8a | 3,045 | py | Python | batch_rl/multi_head/atari_helpers.py | alhamzah/batch_rl | 7f8d9ea0ba330cc0642515dcc44c2ad687c3a927 | [
"Apache-2.0"
] | null | null | null | batch_rl/multi_head/atari_helpers.py | alhamzah/batch_rl | 7f8d9ea0ba330cc0642515dcc44c2ad687c3a927 | [
"Apache-2.0"
] | null | null | null | batch_rl/multi_head/atari_helpers.py | alhamzah/batch_rl | 7f8d9ea0ba330cc0642515dcc44c2ad687c3a927 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 40.6 | 80 | 0.674877 |
bd63927a981ce679de4270308c480c8f49ea21fc | 2,358 | py | Python | data/gary/heart.py | isabellewei/deephealth | a226788561996e698b5f52b4b83683dcb3563ea5 | [
"MIT"
] | null | null | null | data/gary/heart.py | isabellewei/deephealth | a226788561996e698b5f52b4b83683dcb3563ea5 | [
"MIT"
] | null | null | null | data/gary/heart.py | isabellewei/deephealth | a226788561996e698b5f52b4b83683dcb3563ea5 | [
"MIT"
] | null | null | null | from time import time
from sklearn.preprocessing import StandardScaler
from sklearn import model_selection
from sklearn.model_selection import train_test_split, KFold, cross_val_score
from sklearn.metrics import classification_report,confusion_matrix,accuracy_score
from sklearn.tree import DecisionTreeClassifier
... | 34.173913 | 109 | 0.787956 |
bd65948e949b532e6c9472a99e61a788ccedd640 | 870 | py | Python | third_party/infra_libs/ts_mon/common/test/stubs.py | sglass68/chromite | fa56d880e5970e63b8372895c5d43fe6edd8324a | [
"BSD-3-Clause"
] | null | null | null | third_party/infra_libs/ts_mon/common/test/stubs.py | sglass68/chromite | fa56d880e5970e63b8372895c5d43fe6edd8324a | [
"BSD-3-Clause"
] | null | null | null | third_party/infra_libs/ts_mon/common/test/stubs.py | sglass68/chromite | fa56d880e5970e63b8372895c5d43fe6edd8324a | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2015 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 mock
from infra_libs.ts_mon.common import interface
from infra_libs.ts_mon.common import metric_store
from infra_libs.ts_mon.common import monitors
f... | 26.363636 | 72 | 0.754023 |
bd664ca13e3a2c2338580dff837587436ec24e4f | 3,925 | py | Python | fitsmap/utils.py | ryanhausen/fitsmap | 07c1fcd44e2d2efed24607f3e866611a1be395d8 | [
"MIT"
] | 19 | 2021-06-24T13:57:59.000Z | 2022-02-02T04:45:23.000Z | fitsmap/utils.py | ryanhausen/fitsmap | 07c1fcd44e2d2efed24607f3e866611a1be395d8 | [
"MIT"
] | 38 | 2019-12-17T18:21:43.000Z | 2022-03-12T00:16:38.000Z | fitsmap/utils.py | ryanhausen/fitsmap | 07c1fcd44e2d2efed24607f3e866611a1be395d8 | [
"MIT"
] | 1 | 2021-06-24T10:53:15.000Z | 2021-06-24T10:53:15.000Z | # MIT License
# Copyright 2021 Ryan Hausen and contributers
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modif... | 28.035714 | 87 | 0.654777 |
bd66ac3284bd0acf65bf00b9b9956f03b31e1d35 | 5,819 | py | Python | bibterm2dict/tresemo.py | madskinner/bibterm2dict | 93039125fb4eaf5640bf4c91d676607dd98bb974 | [
"MIT"
] | null | null | null | bibterm2dict/tresemo.py | madskinner/bibterm2dict | 93039125fb4eaf5640bf4c91d676607dd98bb974 | [
"MIT"
] | null | null | null | bibterm2dict/tresemo.py | madskinner/bibterm2dict | 93039125fb4eaf5640bf4c91d676607dd98bb974 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Dec 29 10:49:22 2017
@author: marks
"""
# File: tree.py
# References:
# http://hg.python.org/cpython/file/4e32c450f438/Lib/tkinter/ttk.py
# http://www.tcl.tk/man/tcl8.5/TkCmd/ttk_treeview.htm#M79
# http://svn.python.org/projects/python/branches/pep-0384/Demo/tkinter... | 39.053691 | 98 | 0.554906 |
bd68af29a64b3d9ad5ee5bf60f1893c99d3b0c76 | 5,803 | py | Python | test/cnnl/op_test/test_multiline_views_graph.py | Cambricon/catch | 2625da389f25a67066d20fb6b0c38250ef98f8ab | [
"BSD-2-Clause"
] | 20 | 2022-03-01T11:40:51.000Z | 2022-03-30T08:17:47.000Z | test/cnnl/op_test/test_multiline_views_graph.py | Cambricon/catch | 2625da389f25a67066d20fb6b0c38250ef98f8ab | [
"BSD-2-Clause"
] | null | null | null | test/cnnl/op_test/test_multiline_views_graph.py | Cambricon/catch | 2625da389f25a67066d20fb6b0c38250ef98f8ab | [
"BSD-2-Clause"
] | null | null | null | from __future__ import print_function
import sys
import os
import copy
import unittest
import logging
import random
# from unittest.main import main
import torch
from torch import nn
import torch_mlu.core.mlu_model as ct
cur_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(cur_dir + "/../../")
from ... | 33.350575 | 75 | 0.507496 |
bd6b7673d05c7f722ed130c0970699fe0e657a21 | 180 | py | Python | src/polls/polls/project/admin.py | Valeriu92/Shopping_list | 3614dfc6691c28cf88db8af77ba246a9c4943794 | [
"MIT"
] | null | null | null | src/polls/polls/project/admin.py | Valeriu92/Shopping_list | 3614dfc6691c28cf88db8af77ba246a9c4943794 | [
"MIT"
] | 6 | 2021-03-19T08:45:06.000Z | 2021-09-22T19:19:21.000Z | src/polls/polls/project/admin.py | Valeriu92/Shopping_list | 3614dfc6691c28cf88db8af77ba246a9c4943794 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import *
# Register your models here.
admin.site.register(Users)
admin.site.register(ShoppingList)
admin.site.register(ShoppingItem)
| 22.5 | 33 | 0.811111 |
bd6c528a553f5578be66448336398952d4309fa6 | 645 | py | Python | easy/53.Maximum_Subarray.py | Leesoar/leetcode | e566513fc0e7055155157798f06089299bd44fd2 | [
"Apache-2.0"
] | 2 | 2018-03-04T23:29:49.000Z | 2019-04-23T01:13:12.000Z | easy/53.Maximum_Subarray.py | Leesoar/leetcode | e566513fc0e7055155157798f06089299bd44fd2 | [
"Apache-2.0"
] | null | null | null | easy/53.Maximum_Subarray.py | Leesoar/leetcode | e566513fc0e7055155157798f06089299bd44fd2 | [
"Apache-2.0"
] | 1 | 2018-03-05T09:58:59.000Z | 2018-03-05T09:58:59.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Question:
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
Example:
given the array [-2,1,-3,4,-1,2,1,-5,4],
the contiguous subarray [4,-1,2,1] has the largest sum = 6.
''' | 23.035714 | 105 | 0.56124 |
bd6d10559ed324300c492ea76a3b5dca3a2078f7 | 3,153 | py | Python | tests/test_docstring.py | cbillingham/docconvert | 2843f7446546ae90ba3f38e1246e69d208e0f053 | [
"BSD-3-Clause"
] | 8 | 2019-10-07T22:49:20.000Z | 2021-12-30T22:31:28.000Z | tests/test_docstring.py | cbillingham/docconvert | 2843f7446546ae90ba3f38e1246e69d208e0f053 | [
"BSD-3-Clause"
] | 5 | 2019-09-17T21:03:38.000Z | 2020-07-23T04:47:21.000Z | tests/test_docstring.py | cbillingham/docconvert | 2843f7446546ae90ba3f38e1246e69d208e0f053 | [
"BSD-3-Clause"
] | null | null | null | """Unit tests for Docstring."""
import docconvert
| 43.791667 | 75 | 0.631779 |
bd6de39ebf958030d5c9ef03e542a73527be7547 | 4,890 | py | Python | preprocess.py | EMBEDDIA/morphological-comment-filtering | 450ecbdaf2672ea09a39476db91c210657ff9c6f | [
"MIT"
] | 1 | 2020-12-01T17:56:11.000Z | 2020-12-01T17:56:11.000Z | preprocess.py | matejklemen/morphological-comment-filtering | 450ecbdaf2672ea09a39476db91c210657ff9c6f | [
"MIT"
] | null | null | null | preprocess.py | matejklemen/morphological-comment-filtering | 450ecbdaf2672ea09a39476db91c210657ff9c6f | [
"MIT"
] | null | null | null | """ The following script is used to preprocess text once and cache it to a csv file. Currently, this means obtaining
the UPOS tags and universal features + renaming columns to a common format.
This is done because it's quite a long process and we do not want to do it every time we make a change. """
import pa... | 41.092437 | 160 | 0.660941 |
bd6ded5eb81a42427f646f06cfec5c9cfc641f63 | 4,685 | py | Python | util/callbacks.py | TobiasKoopmann/cobert | 279fc6ce938a81afa2b8f14e4cb20b13f842ff48 | [
"Apache-2.0"
] | null | null | null | util/callbacks.py | TobiasKoopmann/cobert | 279fc6ce938a81afa2b8f14e4cb20b13f842ff48 | [
"Apache-2.0"
] | null | null | null | util/callbacks.py | TobiasKoopmann/cobert | 279fc6ce938a81afa2b8f14e4cb20b13f842ff48 | [
"Apache-2.0"
] | null | null | null | import os
import abc
import json
import numpy as np
| 40.387931 | 144 | 0.526147 |
bd6e02dadbfb92bc2040067fe4f4629a0b88329a | 4,436 | py | Python | titanic.py | techwizAJ/Titanic-comepetition-kaggle | 39a3d8d97a4401b0e12eefd7fbb07dde92147328 | [
"Apache-2.0"
] | null | null | null | titanic.py | techwizAJ/Titanic-comepetition-kaggle | 39a3d8d97a4401b0e12eefd7fbb07dde92147328 | [
"Apache-2.0"
] | null | null | null | titanic.py | techwizAJ/Titanic-comepetition-kaggle | 39a3d8d97a4401b0e12eefd7fbb07dde92147328 | [
"Apache-2.0"
] | null | null | null | """
# -*- coding: utf-8 -*-
@author: techwiz
Created on Sun May 27 14:47:20 2018
"""
import pandas as pd
train_set = pd.read_csv("train.csv")
test_set = pd.read_csv("test.csv")
""" Exploratory Data Analysis """
train_set['Sex'].value_counts()
train_set['Age'].value_counts()
train_set['Embarked'].value_counts()
trai... | 31.685714 | 119 | 0.772543 |
bd70054eb143582225de2963fca43fb0a5b2f887 | 1,301 | py | Python | scripts/sort-files/sort_files.py | toddnguyen47/saved-games | ca30e369c72f819b2bd87f2ade450bd6aa058f41 | [
"MIT"
] | null | null | null | scripts/sort-files/sort_files.py | toddnguyen47/saved-games | ca30e369c72f819b2bd87f2ade450bd6aa058f41 | [
"MIT"
] | null | null | null | scripts/sort-files/sort_files.py | toddnguyen47/saved-games | ca30e369c72f819b2bd87f2ade450bd6aa058f41 | [
"MIT"
] | null | null | null | import os
import heapq
import json
if __name__ == "__main__":
sort_files = SortFiles()
sort_files.execute()
| 27.680851 | 79 | 0.487317 |
bd73565d0ceeda144968932421c907e81fac964f | 914 | py | Python | durak/migrations/0014_gamerequest_squashed_0015_auto_20200920_0353.py | maximpertsov/durak-server | 0b3b2edd94f4b180bcc242e2a9b5e1b0c2766b54 | [
"MIT"
] | null | null | null | durak/migrations/0014_gamerequest_squashed_0015_auto_20200920_0353.py | maximpertsov/durak-server | 0b3b2edd94f4b180bcc242e2a9b5e1b0c2766b54 | [
"MIT"
] | 4 | 2021-03-30T14:34:20.000Z | 2021-09-22T19:41:16.000Z | durak/migrations/0014_gamerequest_squashed_0015_auto_20200920_0353.py | maximpertsov/durak-server | 0b3b2edd94f4b180bcc242e2a9b5e1b0c2766b54 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.8 on 2020-09-20 20:04
from django.conf import settings
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
| 35.153846 | 116 | 0.655361 |
bd7412e497e9ca995fe87668255ac1e986b4ec36 | 4,585 | py | Python | rlo/src/ray_main.py | tomjaguarpaw/knossos-ksc | 8fa75e67c0db8f632b135379740051cd10ff31f2 | [
"MIT"
] | 31 | 2021-09-09T16:09:55.000Z | 2022-02-20T02:15:19.000Z | rlo/src/ray_main.py | tomjaguarpaw/knossos-ksc | 8fa75e67c0db8f632b135379740051cd10ff31f2 | [
"MIT"
] | 40 | 2021-08-06T14:30:08.000Z | 2022-01-19T08:49:52.000Z | rlo/src/ray_main.py | tomjaguarpaw/knossos-ksc | 8fa75e67c0db8f632b135379740051cd10ff31f2 | [
"MIT"
] | 5 | 2021-08-06T11:20:31.000Z | 2022-01-07T19:39:40.000Z | # fmt: off
import cProfile
import os
import ray
from rlo import analytics
from rlo.config_utils import config_for_repetition, kwargs_from_config
from rlo.factory import seed_from_config, simul_search_curriculum_from_config, get_train_and_eval_exprs
from rlo.flags import make_config_for_scenario, make_parser, check_sav... | 59.545455 | 143 | 0.721047 |
bd776a6674d87758862d2b05706f184ab21ca00d | 3,490 | py | Python | monero/wordlists/wordlist.py | massanchik/monero-python | 5699c26f6ba0a64f50ac065ebe0419daf01fd993 | [
"BSD-3-Clause"
] | 130 | 2019-03-22T01:50:38.000Z | 2022-03-30T11:34:12.000Z | monero/wordlists/wordlist.py | massanchik/monero-python | 5699c26f6ba0a64f50ac065ebe0419daf01fd993 | [
"BSD-3-Clause"
] | 64 | 2019-03-12T10:32:36.000Z | 2022-03-31T12:38:20.000Z | monero/wordlists/wordlist.py | massanchik/monero-python | 5699c26f6ba0a64f50ac065ebe0419daf01fd993 | [
"BSD-3-Clause"
] | 55 | 2019-03-22T01:50:50.000Z | 2022-03-28T02:38:04.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
from binascii import crc32
from six import with_metaclass
WORDLISTS = {}
_log = logging.getLogger(__name__)
def get_wordlist(name):
try:
return WORDLISTS[name]
except KeyError:
raise ValueError("No such word list")
def list_w... | 31.160714 | 103 | 0.565616 |
bd77eafe9931dd68ca30b83439707d22832787c1 | 11,174 | py | Python | aliexp.py | winsonluk/Alizon | 02ef84d0dbfb0e444257f57865de9a3c42af8229 | [
"MIT"
] | 24 | 2017-01-14T12:42:23.000Z | 2021-11-15T15:29:48.000Z | aliexp.py | winsonluk/Alizon | 02ef84d0dbfb0e444257f57865de9a3c42af8229 | [
"MIT"
] | null | null | null | aliexp.py | winsonluk/Alizon | 02ef84d0dbfb0e444257f57865de9a3c42af8229 | [
"MIT"
] | 7 | 2017-04-01T14:23:44.000Z | 2020-04-24T18:46:36.000Z | from aliexpress_api_client import AliExpress
import PIL
from PIL import Image, ImageChops
import urllib2 as urllib
import io
from itertools import izip
from libImgComp import comp_imgs
import math, operator
def rmsdiff(im1, im2):
"Calculate the root-mean-square difference between two images"
diff = ImageCh... | 27.387255 | 168 | 0.561929 |
bd785257d7f6edb7876cb221a65ea0464f85372a | 224 | py | Python | entreprise/views.py | Kgermando/es | d3175832604552c79eef96fabd8e1675d04cf4a1 | [
"Apache-2.0"
] | null | null | null | entreprise/views.py | Kgermando/es | d3175832604552c79eef96fabd8e1675d04cf4a1 | [
"Apache-2.0"
] | null | null | null | entreprise/views.py | Kgermando/es | d3175832604552c79eef96fabd8e1675d04cf4a1 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
# Create your views here.
| 24.888889 | 59 | 0.767857 |
bd786333da1270439f5a0534168a3541f4ceff6c | 111 | py | Python | virtual/Lib/site-packages/pylint/test/input/func_noerror_yield_return_mix.py | JamesKimari/pitch-one | aac9007716bf2e3b6446588a06508fac068f3d20 | [
"MIT"
] | 35 | 2016-09-22T22:53:14.000Z | 2020-02-13T15:12:21.000Z | virtual/lib/python3.6/site-packages/pylint/test/input/func_noerror_yield_return_mix.py | evantoh/patient-management-system | 6637eb1344775633759165260ed99843581c0e72 | [
"Unlicense"
] | 32 | 2018-05-01T05:24:43.000Z | 2022-03-11T23:20:39.000Z | virtual/lib/python3.6/site-packages/pylint/test/input/func_noerror_yield_return_mix.py | evantoh/patient-management-system | 6637eb1344775633759165260ed99843581c0e72 | [
"Unlicense"
] | 88 | 2016-11-27T02:16:11.000Z | 2020-02-28T05:10:26.000Z | """ module doc """
__revision__ = None
| 13.875 | 32 | 0.576577 |
bd78a71bbe18cc4f93cb82249b13ad78a464f21f | 3,165 | py | Python | BlenderScripts/process_mesh.py | razluta-unity/BlenderProcessUnity | d1d20f8b1910132c63cd73570c783a55c05fafe2 | [
"MIT"
] | 2 | 2020-11-24T06:10:44.000Z | 2021-09-13T11:57:22.000Z | BlenderScripts/process_mesh.py | razluta-unity/BlenderProcessUnity | d1d20f8b1910132c63cd73570c783a55c05fafe2 | [
"MIT"
] | null | null | null | BlenderScripts/process_mesh.py | razluta-unity/BlenderProcessUnity | d1d20f8b1910132c63cd73570c783a55c05fafe2 | [
"MIT"
] | 2 | 2020-12-03T07:48:48.000Z | 2021-06-09T20:18:26.000Z | import os
import argparse
import bpy
# Constants
FBX_EXTENSION = ".fbx"
BLENDER_ACTION_SELECT = "SELECT"
BLENDER_TYPE_MESH = "MESH"
BLENDER_MODIFIER_BEVEL = "BEVEL"
def get_args():
"""
A method to obtain the arguments that came with the triggered Python file - from the .bat file.
:rtype: object
:return: An objec... | 29.579439 | 101 | 0.766193 |
bd7b119eee1a2e5fb5a816c1b163b600e074a836 | 55 | py | Python | django_inlinecss/tests/__init__.py | briefmnews/django-inlinecss | 2d4d3cfb543147debea502598bc1fadce5ec11b1 | [
"MIT"
] | null | null | null | django_inlinecss/tests/__init__.py | briefmnews/django-inlinecss | 2d4d3cfb543147debea502598bc1fadce5ec11b1 | [
"MIT"
] | null | null | null | django_inlinecss/tests/__init__.py | briefmnews/django-inlinecss | 2d4d3cfb543147debea502598bc1fadce5ec11b1 | [
"MIT"
] | null | null | null | from django_inlinecss.tests.test_templatetags import *
| 27.5 | 54 | 0.872727 |
bd7ba5bd647118022f742f767d54083d1e57c29a | 12,562 | py | Python | experiment_launcher.py | alekdimi/arms | f83a32caa8283789c61b59f53832149410be765b | [
"MIT"
] | 2 | 2021-06-15T09:41:45.000Z | 2021-09-08T18:30:44.000Z | experiment_launcher.py | alekdimi/arms | f83a32caa8283789c61b59f53832149410be765b | [
"MIT"
] | null | null | null | experiment_launcher.py | alekdimi/arms | f83a32caa8283789c61b59f53832149410be765b | [
"MIT"
] | null | null | null | import os
from absl import app, flags
import dataset
import networks
import tensorflow as tf
import tensorflow_probability as tfp
tfd = tfp.distributions
layers = tf.keras.layers
flags.DEFINE_enum('dataset', 'static_mnist', ['static_mnist', 'dynamic_mnist', 'fashion_mnist', 'omniglot'], 'Dataset to use.')
flags.DEF... | 38.891641 | 134 | 0.729979 |
bd7bd354d1693ae42a8a899d55fa9d11d8bad927 | 1,916 | py | Python | tests/test_wikipron/test_languagecodes.py | Alireza-Sampour/wikipron | ac821c5d0a7d70e7e700f45f9d01b2dfb4ecae9d | [
"Apache-2.0"
] | null | null | null | tests/test_wikipron/test_languagecodes.py | Alireza-Sampour/wikipron | ac821c5d0a7d70e7e700f45f9d01b2dfb4ecae9d | [
"Apache-2.0"
] | null | null | null | tests/test_wikipron/test_languagecodes.py | Alireza-Sampour/wikipron | ac821c5d0a7d70e7e700f45f9d01b2dfb4ecae9d | [
"Apache-2.0"
] | null | null | null | import warnings
import iso639
import pytest
import wikipron
from data.src.codes import _get_language_categories, _get_language_sizes
from wikipron.languagecodes import LANGUAGE_CODES
from . import can_connect_to_wiktionary
# We handle languages with at least this number of pronunciation entries.
_MIN_LANGUAGE_SIZE ... | 35.481481 | 76 | 0.674322 |
bd7c730835fa8f5d468d87e8c955c89982fc78f9 | 59 | py | Python | python/test.py | mkanenobu/trashbox | c691dbf9a07991fd42304020c8aac58e1e4b9644 | [
"WTFPL"
] | 2 | 2020-05-11T13:43:27.000Z | 2020-07-31T11:57:19.000Z | python/test.py | mkanenobu/trashbox | c691dbf9a07991fd42304020c8aac58e1e4b9644 | [
"WTFPL"
] | 2 | 2020-09-27T02:35:38.000Z | 2021-03-08T08:33:02.000Z | python/test.py | mkanenobu/trashbox | c691dbf9a07991fd42304020c8aac58e1e4b9644 | [
"WTFPL"
] | 1 | 2020-05-11T13:44:04.000Z | 2020-05-11T13:44:04.000Z | import sys
plen()
| 6.555556 | 24 | 0.59322 |
bd7ca3778c63b42f6055e223a59905b275b8c2fc | 1,281 | py | Python | ethosu/vela/test/test_model_reader.py | DemonGiggle/vela | 298e383d2dbab465ddd4995a6ebc6f8bc07c8719 | [
"Apache-2.0"
] | 1 | 2021-12-01T17:16:14.000Z | 2021-12-01T17:16:14.000Z | ethosu/vela/test/test_model_reader.py | DemonGiggle/vela | 298e383d2dbab465ddd4995a6ebc6f8bc07c8719 | [
"Apache-2.0"
] | null | null | null | ethosu/vela/test/test_model_reader.py | DemonGiggle/vela | 298e383d2dbab465ddd4995a6ebc6f8bc07c8719 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# 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
#
# www.apache.org/licenses/LICE... | 37.676471 | 89 | 0.779859 |
bd7e89a9c152d6c5a11c4d9af7357acb6500801c | 2,947 | py | Python | libs/DegradationModels.py | prasunroy/cnn-on-degraded-images | 85bb4c62a024e3766da3c4d2556e01c6e12e416a | [
"MIT"
] | 15 | 2018-10-01T20:54:13.000Z | 2021-10-09T10:40:21.000Z | libs/DegradationModels.py | prasunroy/cnn-on-degraded-images | 85bb4c62a024e3766da3c4d2556e01c6e12e416a | [
"MIT"
] | 1 | 2020-04-13T23:58:23.000Z | 2020-05-15T11:54:16.000Z | libs/DegradationModels.py | prasunroy/cnn-on-degraded-images | 85bb4c62a024e3766da3c4d2556e01c6e12e416a | [
"MIT"
] | 4 | 2018-11-22T09:44:29.000Z | 2019-09-17T23:37:40.000Z | # -*- coding: utf-8 -*-
"""
Degradation models.
Created on Thu May 24 11:00:00 2018
Author: Prasun Roy | CVPRU-ISICAL (http://www.isical.ac.in/~cvpr)
GitHub: https://github.com/prasunroy/cnn-on-degraded-images
"""
# imports
import cv2
import numpy
import random
# apply a degradation model on an image
| 30.697917 | 74 | 0.554462 |
bd7f5d02897acbff32966f7928ccfc825cfa419a | 3,548 | py | Python | apartmentbot/services/listing_service.py | sgarfield/ApartmentBot | 327a47e879998fbb40bd26f84510467f4757d330 | [
"MIT"
] | null | null | null | apartmentbot/services/listing_service.py | sgarfield/ApartmentBot | 327a47e879998fbb40bd26f84510467f4757d330 | [
"MIT"
] | null | null | null | apartmentbot/services/listing_service.py | sgarfield/ApartmentBot | 327a47e879998fbb40bd26f84510467f4757d330 | [
"MIT"
] | null | null | null | """
apartmentbot.services.listing_service
"""
import logging
from dataclasses import dataclass
from typing import List
from dataclasses_json import dataclass_json
from apartmentbot.geolocation.geolocation import distance_finder, neighborhood_locator, place_locator
from apartmentbot.models import Listing, Place, Prefe... | 45.487179 | 101 | 0.698985 |
bd7f8e09909844b7662e6b08100c7c6fbbff9197 | 6,016 | py | Python | stocky.py | Naphtha/stocky | 04e51b4270b28a1aa23597c07d67a2a99e4710cf | [
"MIT"
] | null | null | null | stocky.py | Naphtha/stocky | 04e51b4270b28a1aa23597c07d67a2a99e4710cf | [
"MIT"
] | null | null | null | stocky.py | Naphtha/stocky | 04e51b4270b28a1aa23597c07d67a2a99e4710cf | [
"MIT"
] | null | null | null | import requests
import json
BASE_URL = "https://api.stockfighter.io/ob/api/"
if __name__ == '__main__':
import sys
# run some simple regression tests
TEST_VENUE = "TESTEX"
TEST_STOCK = "FOOBAR"
TEST_ACCOUNT = "EXB123456"
# pick up api key from local untracked file
... | 30.231156 | 126 | 0.617686 |
bd8031a5c133b457ce688112eb2e76fc2cc5af7d | 54 | py | Python | test.py | periclescy/research-qre | 7fafbc7120235fe6cb75a2f5477922d813c31066 | [
"OLDAP-2.3"
] | null | null | null | test.py | periclescy/research-qre | 7fafbc7120235fe6cb75a2f5477922d813c31066 | [
"OLDAP-2.3"
] | null | null | null | test.py | periclescy/research-qre | 7fafbc7120235fe6cb75a2f5477922d813c31066 | [
"OLDAP-2.3"
] | null | null | null | for i in range(4):
print(i)
print("Hello world")
| 10.8 | 20 | 0.611111 |
bd80d005cadf2946180d02a5ee8eb0ce0d0f3e91 | 6,481 | py | Python | crawlers/ucsc_old/ucsc/spiders/registrar_courses.py | coursegraph/CourseGraph | 9f05cd912b393ba14721411fe77f3856812c000f | [
"MIT"
] | 5 | 2018-07-01T15:48:11.000Z | 2020-07-31T17:06:10.000Z | crawlers/ucsc_old/ucsc/spiders/registrar_courses.py | coursegraph/CourseGraph | 9f05cd912b393ba14721411fe77f3856812c000f | [
"MIT"
] | 7 | 2018-07-09T21:17:19.000Z | 2018-07-25T17:05:33.000Z | crawlers/ucsc_old/ucsc/spiders/registrar_courses.py | coursegraph/CourseGraph | 9f05cd912b393ba14721411fe77f3856812c000f | [
"MIT"
] | 4 | 2018-07-01T19:45:23.000Z | 2019-03-17T21:12:03.000Z | # -*- coding: utf-8 -*-
import scrapy
import os
from ucsc.items import FacultyItem, ProgramStatementItem, CourseDescriptionItem
assert(path_components('') == [])
assert(path_components('/') == [])
assert(path_components('foo/') == ['foo'])
assert(path_components('/bar') == ['bar'])
assert(path_components('foo/bar') =... | 39.760736 | 117 | 0.583552 |
bd82bc5f657a9986b7a9b6aa8522cff06f897b1e | 9,528 | py | Python | yui/migrations/versions/0e7bdd5c7473_refactor_datetime_fields.py | item4/yui | 8628d0d54b94ada3cbe7d1b0f624063258bad10a | [
"MIT"
] | 36 | 2017-06-12T01:09:46.000Z | 2021-01-31T17:57:41.000Z | yui/migrations/versions/0e7bdd5c7473_refactor_datetime_fields.py | item4/yui | 8628d0d54b94ada3cbe7d1b0f624063258bad10a | [
"MIT"
] | 145 | 2017-06-21T13:31:29.000Z | 2021-06-20T01:01:30.000Z | yui/migrations/versions/0e7bdd5c7473_refactor_datetime_fields.py | item4/yui | 8628d0d54b94ada3cbe7d1b0f624063258bad10a | [
"MIT"
] | 21 | 2017-07-24T15:53:19.000Z | 2021-12-23T04:18:31.000Z | """Refactor datetime fields
Revision ID: 0e7bdd5c7473
Revises:
Create Date: 2020-05-10 17:28:07.620112
"""
import enum
from alembic import op
import sqlalchemy as sa
from sqlalchemy_utils import ChoiceType
from sqlalchemy_utils import URLType
from yui.apps.info.toranoana.models import Stock
from yui.apps.info.to... | 33.787234 | 75 | 0.592149 |
bd82c29e5bee15a3671a883151076960c6a72038 | 1,937 | py | Python | gradient_free_optimizers/optimizers/exp_opt/local_bayes_opt.py | Wollala/Gradient-Free-Optimizers | 8fb1608c264431b87f66fd2d233b76a0fa75316c | [
"MIT"
] | 1 | 2022-02-25T03:14:48.000Z | 2022-02-25T03:14:48.000Z | gradient_free_optimizers/optimizers/exp_opt/local_bayes_opt.py | Wollala/Gradient-Free-Optimizers | 8fb1608c264431b87f66fd2d233b76a0fa75316c | [
"MIT"
] | null | null | null | gradient_free_optimizers/optimizers/exp_opt/local_bayes_opt.py | Wollala/Gradient-Free-Optimizers | 8fb1608c264431b87f66fd2d233b76a0fa75316c | [
"MIT"
] | null | null | null | # Author: Simon Blanke
# Email: simon.blanke@yahoo.com
# License: MIT License
import time
import random
import numpy as np
from ..base_optimizer import BaseOptimizer
from ...search import Search
from ._sub_search_spaces import SubSearchSpaces
from ..smb_opt import BayesianOptimizer
| 27.671429 | 82 | 0.665978 |
bd83ed580ee241d7bccf7170f916c7c26cd0e7da | 2,235 | py | Python | storage.py | computer-micro-mangangement/cmm_hub | 1ec4ed8c86edcbbd5624396a4be1d6aa7e6132fb | [
"MIT"
] | null | null | null | storage.py | computer-micro-mangangement/cmm_hub | 1ec4ed8c86edcbbd5624396a4be1d6aa7e6132fb | [
"MIT"
] | null | null | null | storage.py | computer-micro-mangangement/cmm_hub | 1ec4ed8c86edcbbd5624396a4be1d6aa7e6132fb | [
"MIT"
] | null | null | null | import psutil
from appJar import gui
import config
import requests as req
import json
import platform
import sysInfo
app = gui(title="CMM Hub", showIcon=False)
navBarElements = []
navBarElementsCallName = []
currentContainer = ""
def get_size(bytes, suffix="B"):
"""
Scale bytes to its proper format
e.g:
... | 28.653846 | 88 | 0.630425 |
bd85a5016f4253e00cc44d9424523f4276b499b6 | 128 | py | Python | python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_1/_pkg0_1_0/_pkg0_1_0_1/_pkg0_1_0_1_0/_mod0_1_0_1_0_4.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_1/_pkg0_1_0/_pkg0_1_0_1/_pkg0_1_0_1_0/_mod0_1_0_1_0_4.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_1/_pkg0_1_0/_pkg0_1_0_1/_pkg0_1_0_1_0/_mod0_1_0_1_0_4.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | name0_1_0_1_0_4_0 = None
name0_1_0_1_0_4_1 = None
name0_1_0_1_0_4_2 = None
name0_1_0_1_0_4_3 = None
name0_1_0_1_0_4_4 = None | 14.222222 | 24 | 0.820313 |
bd86643159f81b1a7609b03844ed56a6c9324674 | 1,988 | py | Python | teste.py | yagopessoa/extrator-caracteristicas | 8fb54359836f2a7063fb34849bfdb1b4c88188b1 | [
"MIT"
] | null | null | null | teste.py | yagopessoa/extrator-caracteristicas | 8fb54359836f2a7063fb34849bfdb1b4c88188b1 | [
"MIT"
] | 4 | 2021-03-19T01:36:12.000Z | 2022-01-13T01:21:07.000Z | teste.py | yagopessoa/extrator-caracteristicas | 8fb54359836f2a7063fb34849bfdb1b4c88188b1 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import cv2
import numpy as np
import sys
import os
import pickle
import datetime
import base64
import io
from matplotlib import pyplot as plt
from PIL import Image
import extract_feature
# x = np.random.randint(25,100,25)
# y = np.random.randint(175,255,25)
# z = np.hstack((x,y))
# z = z.reshape((... | 30.121212 | 145 | 0.71328 |
bd87f0189f7348f8a469b192ca7c10a825cc2fa1 | 95 | py | Python | lampions/__init__.py | Lampions/lampions | dac00e739b6361820f400a3a439dadd5d265c0d7 | [
"BSD-3-Clause"
] | null | null | null | lampions/__init__.py | Lampions/lampions | dac00e739b6361820f400a3a439dadd5d265c0d7 | [
"BSD-3-Clause"
] | null | null | null | lampions/__init__.py | Lampions/lampions | dac00e739b6361820f400a3a439dadd5d265c0d7 | [
"BSD-3-Clause"
] | null | null | null | from . import console
from .version import __version__ # noqa
| 13.571429 | 40 | 0.694737 |
bd884de362569f988f5fe329cd6525259b1ae410 | 1,840 | py | Python | lawliet/mono/resample.py | Ryuk17/lawliet | ba4734557260b255896707210fca3e2fff311e87 | [
"Apache-2.0"
] | 2 | 2021-04-20T03:51:32.000Z | 2021-06-16T11:48:06.000Z | lawliet/mono/resample.py | Ryuk17/lawliet | ba4734557260b255896707210fca3e2fff311e87 | [
"Apache-2.0"
] | null | null | null | lawliet/mono/resample.py | Ryuk17/lawliet | ba4734557260b255896707210fca3e2fff311e87 | [
"Apache-2.0"
] | null | null | null | """
@FileName: resample.py
@Description: Implement resample
@Author: Ryuk
@CreateDate: 2021/06/27
@LastEditTime: 2021/06/27
@LastEditors: Please set LastEditors
@Version: v0.1
"""
import numpy as np
import math
__all__ = [
"direct_interpolation",
"lagrange_interpolation",
"sine_interpolation",
]
def dir... | 23.589744 | 54 | 0.490761 |
bd89d14addd7fd9824eb02e80c4487068be6700a | 1,432 | py | Python | data/get_stats.py | joamatab/angler | d54d3718bfc8564f0a97faf89a8de747709be6b9 | [
"MIT"
] | 102 | 2018-11-06T16:11:58.000Z | 2022-03-29T03:10:08.000Z | data/get_stats.py | bencbartlett/angler | db9eca35adc4708425de8e2e2ad7a06516966814 | [
"MIT"
] | 17 | 2018-11-06T15:53:15.000Z | 2020-07-21T20:20:30.000Z | data/get_stats.py | bencbartlett/angler | db9eca35adc4708425de8e2e2ad7a06516966814 | [
"MIT"
] | 41 | 2018-11-21T08:43:03.000Z | 2022-03-22T21:21:42.000Z | import numpy as np
from device_saver import load_device
""" Opens a device and prints its stored stats for the paper"""
if __name__ == '__main__':
fname2 = 'data/figs/devices/2_port.p'
get_stats(fname2)
fnameT = 'data/figs/devices/T_port.p'
get_stats(fnameT) | 36.717949 | 95 | 0.569134 |
bd8b0ea4d67316a57577ad9cd394adb4172f74c1 | 2,130 | py | Python | src/demo.py | lhcezx/Graph-FPN | 55eb9283a7df83e003c84eede65a2700bb9fa45c | [
"MIT"
] | 19 | 2021-11-16T05:32:45.000Z | 2022-01-27T09:29:50.000Z | src/demo.py | lhcezx/Graph-FPN | 55eb9283a7df83e003c84eede65a2700bb9fa45c | [
"MIT"
] | 1 | 2021-11-15T15:44:45.000Z | 2021-12-13T04:26:26.000Z | src/demo.py | lhcezx/Graph-FPN | 55eb9283a7df83e003c84eede65a2700bb9fa45c | [
"MIT"
] | 1 | 2022-01-04T14:10:58.000Z | 2022-01-04T14:10:58.000Z | import os
import zipfile
import tensorflow as tf
import tensorflow_datasets as tfds
import init_path
from configs.configs import parse_configs
from detection.utils.Label import *
from detection.utils.preprocess import *
from model.network import DecodePredictions
from model.get_model import backbone, models
config = p... | 39.444444 | 99 | 0.656338 |
bd8b4af603fe82e4afc80393a64f4cdf97c3311e | 337 | py | Python | dfmbot/fb_dfmbot/models.py | acjh/dfm-bot | 34a7d53861acea6a7287c9b4816806db864adb31 | [
"MIT"
] | null | null | null | dfmbot/fb_dfmbot/models.py | acjh/dfm-bot | 34a7d53861acea6a7287c9b4816806db864adb31 | [
"MIT"
] | null | null | null | dfmbot/fb_dfmbot/models.py | acjh/dfm-bot | 34a7d53861acea6a7287c9b4816806db864adb31 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
# Create your models here.
| 28.083333 | 60 | 0.774481 |
bd8bd77a5f4099e04b2c3dc2363a8eb44444ab90 | 16,569 | py | Python | routelift_api/stops/tests.py | BitMask-Technologies/route-lift-api | 7ac78c6cce523fc5a3852dca7b289fe3a5f3afa8 | [
"MIT"
] | null | null | null | routelift_api/stops/tests.py | BitMask-Technologies/route-lift-api | 7ac78c6cce523fc5a3852dca7b289fe3a5f3afa8 | [
"MIT"
] | 7 | 2021-06-24T16:12:09.000Z | 2021-08-05T16:09:22.000Z | routelift_api/stops/tests.py | BitMask-Technologies/route-lift-api | 7ac78c6cce523fc5a3852dca7b289fe3a5f3afa8 | [
"MIT"
] | null | null | null | from datetime import datetime
from django.contrib.auth.hashers import make_password
from Logistics.models import LogisticCompanies
from roles_and_permissions.operations import Operations
from roles_and_permissions.resource_categories import ResourceCategories
from roles_and_permissions.utils import createStaffRole
fr... | 41.735516 | 124 | 0.5153 |
bd8ea1d2de449075397b869d74b1b5b0f41e34e1 | 550 | py | Python | exercicios-python/ex042.py | DaviStalleiken/codigos-de-desafios | e9ec388022b5f4bb2a5ab170c17969154ceaece3 | [
"MIT"
] | null | null | null | exercicios-python/ex042.py | DaviStalleiken/codigos-de-desafios | e9ec388022b5f4bb2a5ab170c17969154ceaece3 | [
"MIT"
] | null | null | null | exercicios-python/ex042.py | DaviStalleiken/codigos-de-desafios | e9ec388022b5f4bb2a5ab170c17969154ceaece3 | [
"MIT"
] | null | null | null | r1 = float(input('Primeiro segmento: '))
r2 = float(input('Segundo segmento: '))
r3 = float(input('Terceiro segmento: '))
if r1 < r2 + r3 and r2 < r1 + r3 and r3 < r2 + r3:
print('Voc \033[32mpode\033[m formar um tringulo. ', end='')
if r1 == r2 == r3:
print(f'Seu tringulo \033[36mequiltero\033[m.')
... | 36.666667 | 66 | 0.612727 |
bd8fec37c8f22bdce7067ff7cbd8f9c6cdace31b | 1,158 | py | Python | mimic/GUI/MainWindow.py | link00000000/mimic | 9452f4311e70deb23286504d9b02c64b9a76e14c | [
"MIT"
] | 2 | 2021-07-29T04:30:34.000Z | 2021-08-06T04:58:39.000Z | mimic/GUI/MainWindow.py | link00000000/mimic | 9452f4311e70deb23286504d9b02c64b9a76e14c | [
"MIT"
] | 20 | 2021-04-02T17:03:53.000Z | 2021-08-07T11:04:09.000Z | mimic/GUI/MainWindow.py | link00000000/mimic | 9452f4311e70deb23286504d9b02c64b9a76e14c | [
"MIT"
] | null | null | null | """Mimic main window."""
import tkinter as tk
from mimic.EventEmitter import EventEmitter
from mimic.GUI.AbstractTkinterWindow import AbstractTkinterWindow
from mimic.GUI.Widgets.QRCode import QRCodeImage
from mimic.Utils.Host import resolve_host
| 27.571429 | 70 | 0.644214 |
bd910c797a7c02460f8f88af118cb92f19b632c2 | 1,857 | py | Python | generate_30000.py | mikamai/uwsgi.it | d2f11ae850efda43532454ab70aa50540df0011b | [
"MIT"
] | null | null | null | generate_30000.py | mikamai/uwsgi.it | d2f11ae850efda43532454ab70aa50540df0011b | [
"MIT"
] | null | null | null | generate_30000.py | mikamai/uwsgi.it | d2f11ae850efda43532454ab70aa50540df0011b | [
"MIT"
] | null | null | null | from django.conf import settings
from django.template.loader import render_to_string
import ConfigParser
from collections import OrderedDict
import sys
from Crypto.PublicKey import RSA
c = ConfigParser.ConfigParser(dict_type=AllowsSameKeys)
c.readfp(open(sys.argv[1]))
# django snippet 646, raise an Exception missing ... | 32.578947 | 111 | 0.653204 |
bd91ba13b85667cd92a61109fae15aca6df3f93b | 3,561 | py | Python | LoveDA/uda/baseline_train.py | edornd/ProDA | ffb092afbbde95e4ca29cb1ec199f9685f6601fb | [
"MIT"
] | null | null | null | LoveDA/uda/baseline_train.py | edornd/ProDA | ffb092afbbde95e4ca29cb1ec199f9685f6601fb | [
"MIT"
] | null | null | null | LoveDA/uda/baseline_train.py | edornd/ProDA | ffb092afbbde95e4ca29cb1ec199f9685f6601fb | [
"MIT"
] | null | null | null | import argparse
import os
import os.path as osp
import torch
import torch.nn as nn
import torch.optim as optim
from eval import evaluate
from ever.core.iterator import Iterator
from module.deeplabv2 import Deeplab
from torch.nn import functional as fn
from tqdm import tqdm
from data.loveda import LoveDALoader
from uti... | 33.914286 | 114 | 0.627352 |
bd964ac6777bf26c9cd2e0c8102f286788f8ac58 | 201 | py | Python | lab/db/utils.py | ParanoiaSYT/Qulab-backup | 09ec5457145b3789d4c1ac02c43dd3e6dfafc96f | [
"MIT"
] | null | null | null | lab/db/utils.py | ParanoiaSYT/Qulab-backup | 09ec5457145b3789d4c1ac02c43dd3e6dfafc96f | [
"MIT"
] | null | null | null | lab/db/utils.py | ParanoiaSYT/Qulab-backup | 09ec5457145b3789d4c1ac02c43dd3e6dfafc96f | [
"MIT"
] | null | null | null | import os
def beforeSaveFile(fname):
'''makesure the path exists before save file'''
dirname = os.path.dirname(fname)
if not os.path.exists(dirname):
os.makedirs(dirname)
| 22.333333 | 52 | 0.651741 |
bd979067fb3d0b6a4ab0071970a4c14f2b400d8d | 1,478 | py | Python | terra/estimators/migrations/0001_initial.py | dymaxionlabs/platform | 98fe893d4632d62fea3e2357f16d970014037cdf | [
"BSD-3-Clause"
] | null | null | null | terra/estimators/migrations/0001_initial.py | dymaxionlabs/platform | 98fe893d4632d62fea3e2357f16d970014037cdf | [
"BSD-3-Clause"
] | null | null | null | terra/estimators/migrations/0001_initial.py | dymaxionlabs/platform | 98fe893d4632d62fea3e2357f16d970014037cdf | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.2 on 2019-04-22 13:45
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import uuid
| 42.228571 | 150 | 0.631258 |
bd97ac57a2038b6973c0d833aeb1a199dd43dec5 | 1,607 | py | Python | d16/p1.py | Jamie-Chang/advent2019 | 130ccdc2a320d0a8d926a781a41fd74389e403a9 | [
"Apache-2.0"
] | null | null | null | d16/p1.py | Jamie-Chang/advent2019 | 130ccdc2a320d0a8d926a781a41fd74389e403a9 | [
"Apache-2.0"
] | null | null | null | d16/p1.py | Jamie-Chang/advent2019 | 130ccdc2a320d0a8d926a781a41fd74389e403a9 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
from typing import Callable, Iterable, Iterator, List
from itertools import chain, cycle, islice, repeat
import numpy as np
BASE_PATTERN = [0, 1, 0, -1]
def repeat_each(pattern, repeats: int):
return chain(*map(lambda i: repeat(i, repeats), pattern))
def generate_pattern(base: Iter... | 26.344262 | 86 | 0.657747 |
bd98c615b517218be23b4c4fa061f1bb81f35762 | 925 | py | Python | 1_extract_story.py | varsh6/weekcode | 4e5eb0ff0bd8af5b2fed24faeed50733c4a00551 | [
"MIT"
] | 2 | 2015-03-25T18:05:50.000Z | 2016-05-05T09:49:45.000Z | 1_extract_story.py | varsh6/weekcode | 4e5eb0ff0bd8af5b2fed24faeed50733c4a00551 | [
"MIT"
] | null | null | null | 1_extract_story.py | varsh6/weekcode | 4e5eb0ff0bd8af5b2fed24faeed50733c4a00551 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import urllib2
start_url="https://www.fictionpress.com/s/2780124/1/Rise-From-The-Ashes-OLD" #start url
end =False
split_url=start_url.split("/")
new_url=""
for i in range(5):
new_url=new_url+split_url[i]+"/"
i=1
while not (end):
url=new_url+"/"+str(i)+"/"
i=i+1
response... | 21.511628 | 87 | 0.566486 |
bd9906411d0902be3e6498e5a1a56da473448736 | 2,161 | py | Python | tests/tensorflow/pruning/test_flops_pruning.py | sarthakpati/nncf | 29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac | [
"Apache-2.0"
] | 1 | 2021-12-30T05:49:10.000Z | 2021-12-30T05:49:10.000Z | tests/tensorflow/pruning/test_flops_pruning.py | sarthakpati/nncf | 29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac | [
"Apache-2.0"
] | 1 | 2021-07-23T07:46:52.000Z | 2021-07-23T07:46:52.000Z | tests/tensorflow/pruning/test_flops_pruning.py | sarthakpati/nncf | 29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2021 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writin... | 44.102041 | 96 | 0.745951 |
bd99509849b2119597bc329227a6d9a8957453fc | 61 | py | Python | text/_geometry/boxing/_line/__init__.py | jedhsu/text | 8525b602d304ac571a629104c48703443244545c | [
"Apache-2.0"
] | null | null | null | text/_geometry/boxing/_line/__init__.py | jedhsu/text | 8525b602d304ac571a629104c48703443244545c | [
"Apache-2.0"
] | null | null | null | text/_geometry/boxing/_line/__init__.py | jedhsu/text | 8525b602d304ac571a629104c48703443244545c | [
"Apache-2.0"
] | null | null | null | from .style import LineStyle
__all__ = [
"LineStyle",
]
| 10.166667 | 28 | 0.655738 |
bd99e09ac29cee3774d16f59b6db9c324075e704 | 9,812 | py | Python | HCI/emotions.py | shinkansan/2019-UGRP-DPoom | eedee93b47e068f22bf420140d869a43f7551876 | [
"Apache-2.0"
] | 33 | 2020-07-16T06:31:38.000Z | 2022-03-23T18:34:58.000Z | HCI/emotions.py | shinkansan/2019-UGRP-DPoom | eedee93b47e068f22bf420140d869a43f7551876 | [
"Apache-2.0"
] | 5 | 2020-08-27T08:06:21.000Z | 2022-02-23T12:34:09.000Z | HCI/emotions.py | shinkansan/2019-UGRP-DPoom | eedee93b47e068f22bf420140d869a43f7551876 | [
"Apache-2.0"
] | 10 | 2020-08-05T15:05:58.000Z | 2021-11-19T10:20:44.000Z | """
Dpoom Face Expression Windows 2019
"""
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtWebEngineWidgets import *
from PyQt5.QtPrintSupport import *
import fall_body_1013 as fall_body
import os
import sys
import numpy as np
import argparse
import imutils
import time
i... | 30.190769 | 112 | 0.614248 |
bd9a1dd2de3b7a992cf45cfd0f9ad879ed786bb2 | 16,444 | py | Python | src/sentry/plugins/base/manager.py | commonlims/commonlims | 36a02ed244c7b59ee1f2523e64e4749e404ab0f7 | [
"BSD-3-Clause"
] | 4 | 2019-05-27T13:55:07.000Z | 2021-03-30T07:05:09.000Z | src/sentry/plugins/base/manager.py | commonlims/commonlims | 36a02ed244c7b59ee1f2523e64e4749e404ab0f7 | [
"BSD-3-Clause"
] | 99 | 2019-05-20T14:16:33.000Z | 2021-01-19T09:25:15.000Z | src/sentry/plugins/base/manager.py | commonlims/commonlims | 36a02ed244c7b59ee1f2523e64e4749e404ab0f7 | [
"BSD-3-Clause"
] | 1 | 2020-08-10T07:55:40.000Z | 2020-08-10T07:55:40.000Z | """
sentry.plugins.base.manager
~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function
__all__ = ('PluginManager', )
import sys
import os
import six
import logging
... | 39.245823 | 114 | 0.633666 |