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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
959ac1baff7cea9daabf593760b72f74cd08cb19 | 778 | py | Python | porcupine/plugins/gotoline.py | rscales02/porcupine | 91b3c90d19d2291c0a60ddb9dffac931147cde3c | [
"MIT"
] | null | null | null | porcupine/plugins/gotoline.py | rscales02/porcupine | 91b3c90d19d2291c0a60ddb9dffac931147cde3c | [
"MIT"
] | null | null | null | porcupine/plugins/gotoline.py | rscales02/porcupine | 91b3c90d19d2291c0a60ddb9dffac931147cde3c | [
"MIT"
] | null | null | null | from tkinter import simpledialog
from porcupine import actions, get_tab_manager, tabs
def gotoline():
tab = get_tab_manager().select()
# simpledialog isn't ttk yet, but it's not a huge problem imo
lineno = simpledialog.askinteger(
"Go to Line", "Type a line number and press Enter:")
if linen... | 31.12 | 79 | 0.638817 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 274 | 0.352185 |
959aea6673bc315fd2a49870629b49b87e1b393a | 4,634 | py | Python | preprocessing.py | JackAndCole/Detection-of-sleep-apnea-from-single-lead-ECG-signal-using-a-time-window-artificial-neural-network | 692bb7d969b7eb4a0ad9b221660901a863bc76e2 | [
"Apache-2.0"
] | 7 | 2020-01-22T03:23:39.000Z | 2021-12-26T05:02:10.000Z | preprocessing.py | JackAndCole/Detection-of-sleep-apnea-from-single-lead-ECG-signal-using-a-time-window-artificial-neural-network | 692bb7d969b7eb4a0ad9b221660901a863bc76e2 | [
"Apache-2.0"
] | null | null | null | preprocessing.py | JackAndCole/Detection-of-sleep-apnea-from-single-lead-ECG-signal-using-a-time-window-artificial-neural-network | 692bb7d969b7eb4a0ad9b221660901a863bc76e2 | [
"Apache-2.0"
] | 1 | 2020-05-29T06:32:24.000Z | 2020-05-29T06:32:24.000Z | import os
import pickle
import sys
import warnings
from collections import OrderedDict
import biosppy.signals.tools as st
import numpy as np
import wfdb
from biosppy.signals.ecg import correct_rpeaks, hamilton_segmenter
from hrv.classical import frequency_domain, time_domain
from scipy.signal import medfilt... | 44.990291 | 120 | 0.579197 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 817 | 0.176306 |
959b3935838082e9b39f90f0dbe7ce84722264d7 | 3,904 | py | Python | tiddlywebplugins/tiddlyspace/openid.py | FND/tiddlyspace | 7b26e5b4e0b0a817b3ea0a357613c59705d016d4 | [
"BSD-3-Clause"
] | 2 | 2015-12-15T00:40:36.000Z | 2019-04-22T16:54:41.000Z | tiddlywebplugins/tiddlyspace/openid.py | jdlrobson/tiddlyspace | 70f500687fcd26e3fa4ef144297a05203ccf0f35 | [
"BSD-3-Clause"
] | null | null | null | tiddlywebplugins/tiddlyspace/openid.py | jdlrobson/tiddlyspace | 70f500687fcd26e3fa4ef144297a05203ccf0f35 | [
"BSD-3-Clause"
] | null | null | null | """
Subclass of tiddlywebplugins.openid2 to support
tiddlyweb_secondary_user cookie.
"""
import urlparse
from tiddlyweb.web.util import server_host_url, make_cookie
from tiddlywebplugins.openid2 import Challenger as OpenID
FRAGMENT_PREFIX = 'auth:OpenID:'
class Challenger(OpenID):
def __init__(self):
... | 36.148148 | 72 | 0.615523 | 3,639 | 0.932121 | 0 | 0 | 0 | 0 | 0 | 0 | 1,647 | 0.421875 |
959b55108828b137a9e2c7ce659d11e247c56fff | 226 | py | Python | tests/__init__.py | tltx/iommi | a0ca5e261040cc0452d7452e9320a88af5222b30 | [
"BSD-3-Clause"
] | 192 | 2020-01-30T14:29:56.000Z | 2022-03-28T19:55:30.000Z | tests/__init__.py | tltx/iommi | a0ca5e261040cc0452d7452e9320a88af5222b30 | [
"BSD-3-Clause"
] | 105 | 2020-03-29T21:59:01.000Z | 2022-03-24T12:29:09.000Z | tests/__init__.py | tltx/iommi | a0ca5e261040cc0452d7452e9320a88af5222b30 | [
"BSD-3-Clause"
] | 28 | 2020-02-02T20:51:09.000Z | 2022-03-08T16:23:42.000Z | from datetime import datetime
import freezegun
# Initialize freezegun to avoid freezegun being reinitialized which is expensive
initialize_freezegun = freezegun.freeze_time(datetime(2021, 1, 1))
initialize_freezegun.start()
| 28.25 | 80 | 0.836283 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.353982 |
959bcca51833c2423f463ff10fb943bd7f71b93f | 9,047 | py | Python | pyacoustics/morph/intensity_morph.py | UNIST-Interactions/pyAcoustics | f22d19d258b4e359fec365b30f11af261dee1b5c | [
"MIT"
] | 72 | 2015-12-10T20:00:04.000Z | 2022-03-31T05:42:17.000Z | pyacoustics/morph/intensity_morph.py | alivalehi/pyAcoustics | ab446681d7a2267063afb6a386334dcaefd0d93b | [
"MIT"
] | 5 | 2017-08-08T05:13:15.000Z | 2020-11-26T00:58:04.000Z | pyacoustics/morph/intensity_morph.py | alivalehi/pyAcoustics | ab446681d7a2267063afb6a386334dcaefd0d93b | [
"MIT"
] | 16 | 2016-05-09T07:36:15.000Z | 2021-08-30T14:23:25.000Z | '''
Created on Apr 2, 2015
@author: tmahrt
'''
import os
from os.path import join
import math
import copy
from pyacoustics.morph.morph_utils import common
from pyacoustics.morph.morph_utils import plot_morphed_data
from pyacoustics.utilities import utils
from pyacoustics.utilities import sequences
from pyacoustics.... | 36.776423 | 79 | 0.606831 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,682 | 0.185918 |
959ca1652d25eeda188d0626465d82a0647c2777 | 1,886 | py | Python | algorithms/library/metricscontroller.py | heitor57/poi-rss | 12990af118f19595be01bf80e26a7ee93f9d05d8 | [
"MIT"
] | 1 | 2021-09-01T23:55:27.000Z | 2021-09-01T23:55:27.000Z | algorithms/library/metricscontroller.py | heitor57/poi-rss | 12990af118f19595be01bf80e26a7ee93f9d05d8 | [
"MIT"
] | 1 | 2021-09-09T06:21:48.000Z | 2021-09-14T02:08:33.000Z | algorithms/library/metricscontroller.py | heitor57/poi-rss | 12990af118f19595be01bf80e26a7ee93f9d05d8 | [
"MIT"
] | null | null | null | import numpy as np
class MetricsController:
def __init__(self,metrics=None,algorithm="generic",metrics_path="/home/heitor/recsys/data/metrics",k=10):
self.algorithm=algorithm
self.metrics_path=metrics_path
self.k=k
if metrics==None:
self.fload_metrics()
... | 37.72 | 158 | 0.559915 | 1,870 | 0.989418 | 0 | 0 | 0 | 0 | 0 | 0 | 573 | 0.303175 |
959cbddc7a775bd66392c574ba57d0e444a033d9 | 736 | py | Python | backend-service/users-service/app/app/models/user.py | abhishek70/python-petclinic-microservices | e15a41a668958f35f1b962487cd2360c5c150f0b | [
"MIT"
] | 2 | 2021-05-19T07:21:59.000Z | 2021-09-15T17:30:08.000Z | backend-service/users-service/app/app/models/user.py | abhishek70/python-petclinic-microservices | e15a41a668958f35f1b962487cd2360c5c150f0b | [
"MIT"
] | null | null | null | backend-service/users-service/app/app/models/user.py | abhishek70/python-petclinic-microservices | e15a41a668958f35f1b962487cd2360c5c150f0b | [
"MIT"
] | null | null | null | from typing import TYPE_CHECKING
from sqlalchemy import Boolean, Column, Integer, String
from sqlalchemy.orm import relationship
from app.db.base_class import Base
if TYPE_CHECKING:
from .pet import Pet # noqa: F401
class User(Base):
id = Column(Integer, primary_key=True, index=True, autoincrement=True, nul... | 38.736842 | 90 | 0.744565 | 511 | 0.694293 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.032609 |
959f88de24a529a6005e19e9f3a68842519cdb55 | 930 | py | Python | slackbot/admin.py | surface-security/django-slackbot | 8d22fb922cf5365284d7a4836bb095eeeb8c7e90 | [
"MIT"
] | 1 | 2022-01-24T10:29:09.000Z | 2022-01-24T10:29:09.000Z | slackbot/admin.py | surface-security/django-slack-processor | 8d22fb922cf5365284d7a4836bb095eeeb8c7e90 | [
"MIT"
] | 4 | 2022-02-21T15:59:08.000Z | 2022-03-26T00:33:13.000Z | slackbot/admin.py | surface-security/django-slack-processor | 8d22fb922cf5365284d7a4836bb095eeeb8c7e90 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.utils.html import format_html
from . import get_user_model
@admin.register(get_user_model())
class UserAdmin(admin.ModelAdmin):
list_display = ['ext_id', 'username', 'name', 'email', 'active', 'is_bot', 'is_admin', 'get_photo', 'last_seen']
list_filter = ('active'... | 34.444444 | 119 | 0.634409 | 788 | 0.847312 | 0 | 0 | 822 | 0.883871 | 0 | 0 | 311 | 0.334409 |
95a0896392ae42746732acf467a7a7dc9ad52617 | 1,476 | py | Python | touroute/tourouteapp/migrations/0001_initial.py | oscarlamasrios/toroute | 5b00c0f606f438229e7857f25a23c4d51ff34293 | [
"Apache-2.0"
] | null | null | null | touroute/tourouteapp/migrations/0001_initial.py | oscarlamasrios/toroute | 5b00c0f606f438229e7857f25a23c4d51ff34293 | [
"Apache-2.0"
] | null | null | null | touroute/tourouteapp/migrations/0001_initial.py | oscarlamasrios/toroute | 5b00c0f606f438229e7857f25a23c4d51ff34293 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2019-04-24 14:53
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Cre... | 34.325581 | 117 | 0.571816 | 1,284 | 0.869919 | 0 | 0 | 0 | 0 | 0 | 0 | 206 | 0.139566 |
95a1633d9ce1bb6f212d67d9111c6397f243ba02 | 19,691 | py | Python | catalog/application.py | gevannmullins/catalog-category-items | 850c77e17d5123511c954e3705f522228c6574ea | [
"MIT"
] | null | null | null | catalog/application.py | gevannmullins/catalog-category-items | 850c77e17d5123511c954e3705f522228c6574ea | [
"MIT"
] | null | null | null | catalog/application.py | gevannmullins/catalog-category-items | 850c77e17d5123511c954e3705f522228c6574ea | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from flask import Flask, render_template, request, redirect, jsonify, url_for, flash
from sqlalchemy import create_engine, asc
from sqlalchemy.orm import sessionmaker
from database_setup import Base, Category, Item, User
from flask import session as login_session
import random
import string
impor... | 35.867031 | 174 | 0.632218 | 0 | 0 | 0 | 0 | 17,538 | 0.890661 | 0 | 0 | 7,059 | 0.358489 |
95a163ba2b23c18ae5bb7535ab4caa4e069308b6 | 144 | py | Python | bolt/core/exceptions.py | ph7vc/CL4M-B0T | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 9 | 2019-02-17T06:33:14.000Z | 2021-10-05T02:19:00.000Z | bolt/core/exceptions.py | ns-phennessy/Bolt | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 28 | 2019-02-10T07:48:05.000Z | 2021-12-20T00:15:37.000Z | bolt/core/exceptions.py | ph7vc/CL4M-B0T | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 4 | 2015-03-13T03:58:55.000Z | 2015-05-27T08:29:46.000Z | class InvalidConfigurationError(Exception):
pass
class InvalidBotToken(Exception):
pass
class InvalidBotPlugin(Exception):
pass
| 13.090909 | 43 | 0.763889 | 137 | 0.951389 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
95a2f6f31ddcda8bf982507b3035c6d82bfe1d80 | 723 | py | Python | selfdrive/visiond/tensorflow_autodetect.py | jeroenbbb/openpilot | 4a2ff784f85ac87a4aa9ba8a345c2403102f960a | [
"MIT"
] | 4 | 2019-05-29T19:44:56.000Z | 2021-09-10T18:36:57.000Z | selfdrive/visiond/tensorflow_autodetect.py | jeroenbbb/openpilot | 4a2ff784f85ac87a4aa9ba8a345c2403102f960a | [
"MIT"
] | null | null | null | selfdrive/visiond/tensorflow_autodetect.py | jeroenbbb/openpilot | 4a2ff784f85ac87a4aa9ba8a345c2403102f960a | [
"MIT"
] | 5 | 2019-08-09T07:49:28.000Z | 2020-10-11T03:19:04.000Z | import os
from setuptools import setup
version = os.getenv('VERSION', '1.10.1')
setup(
name='tensorflow-autodetect',
version=version,
url='https://github.com/commaai/tensorflow-autodetect',
author='comma.ai',
author_email='',
license='MIT',
long_description='Auto-detect tensorflow or tenso... | 30.125 | 111 | 0.656985 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 387 | 0.53527 |
95a308d03af24087015385e9c1aa146e859dc63c | 1,639 | py | Python | intask_api/projects/permissions.py | KirovVerst/intask | 4bdec6f49fa2873cca1354d7d3967973f5bcadc3 | [
"MIT"
] | null | null | null | intask_api/projects/permissions.py | KirovVerst/intask | 4bdec6f49fa2873cca1354d7d3967973f5bcadc3 | [
"MIT"
] | 7 | 2016-08-17T23:08:31.000Z | 2022-03-02T02:23:08.000Z | intask_api/projects/permissions.py | KirovVerst/intask | 4bdec6f49fa2873cca1354d7d3967973f5bcadc3 | [
"MIT"
] | null | null | null | from rest_framework import permissions
from django.shortcuts import get_object_or_404
from django.contrib.auth.models import User
from intask_api.projects.models import Project
class IsProjectHeader(permissions.BasePermission):
def has_object_permission(self, request, view, obj):
return obj.header == requ... | 34.87234 | 74 | 0.748627 | 1,441 | 0.879195 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.024405 |
95a3853b501cce7a1c286e558ccff9a6692b3e3f | 171 | py | Python | Ekeopara_Praise/Phase 2/LIST/Day43 Tasks/Task3.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 6 | 2020-05-23T19:53:25.000Z | 2021-05-08T20:21:30.000Z | Ekeopara_Praise/Phase 2/LIST/Day43 Tasks/Task3.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 8 | 2020-05-14T18:53:12.000Z | 2020-07-03T00:06:20.000Z | Ekeopara_Praise/Phase 2/LIST/Day43 Tasks/Task3.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 39 | 2020-05-10T20:55:02.000Z | 2020-09-12T17:40:59.000Z | '''3. Write a Python program to split a list into different variables. '''
universalList = [(1, 2, 3), ('w', 'e', 's')]
lst1, lst2 = universalList
print(lst1)
print(lst2) | 28.5 | 74 | 0.654971 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.48538 |
95a3fd394b5e1d1a390370d7caef0aefa5912c98 | 576 | py | Python | Codefights/arcade/python-arcade/level-9/62.Check-Participants/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | 7 | 2017-09-20T16:40:39.000Z | 2021-08-31T18:15:08.000Z | Codefights/arcade/python-arcade/level-9/62.Check-Participants/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | Codefights/arcade/python-arcade/level-9/62.Check-Participants/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | # Python3
from solution1 import checkParticipants as f
qa = [
([0, 1, 1, 5, 4, 8],
[2]),
([0, 1, 2, 3, 4, 5],
[]),
([6],
[]),
([3, 3, 3, 3, 3, 3, 3, 3],
[4, 5, 6, 7]),
([0, 0, 1, 5, 5, 4, 5, 4, 10, 8],
[1, 2, 5, 6, 7, 9])
]
for *q, a in qa:
for i, e in enumerate(q):
... | 19.2 | 47 | 0.378472 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 85 | 0.147569 |
95a45f4832007319ba41671ba4a21dd2a62ab0fc | 202 | py | Python | models/__init__.py | mikuh/bert-tf2-keras | e361a0e7dc9fa0d64c48ac41320d302599dba025 | [
"MIT"
] | 4 | 2020-06-21T15:48:40.000Z | 2022-01-24T05:10:59.000Z | models/__init__.py | mikuh/bert-tf2-keras | e361a0e7dc9fa0d64c48ac41320d302599dba025 | [
"MIT"
] | null | null | null | models/__init__.py | mikuh/bert-tf2-keras | e361a0e7dc9fa0d64c48ac41320d302599dba025 | [
"MIT"
] | 3 | 2020-07-20T07:11:27.000Z | 2022-01-24T05:11:21.000Z | from models.base_model import BaseModel
from models.classifier import BertClassifier
from models.sequence_labeling import BertSequenceLabeling
from models.sequence_embedding import BertSequenceEmbedding | 50.5 | 59 | 0.905941 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
95a49255a761f17a3cc35cbf97bc73b1442eaf32 | 7,563 | py | Python | plex_import_watched_history.py | chazlarson/plex-watched-tools | ef3e34e733ec9555353d695ced582395bdc73480 | [
"MIT"
] | null | null | null | plex_import_watched_history.py | chazlarson/plex-watched-tools | ef3e34e733ec9555353d695ced582395bdc73480 | [
"MIT"
] | null | null | null | plex_import_watched_history.py | chazlarson/plex-watched-tools | ef3e34e733ec9555353d695ced582395bdc73480 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# python3 -m pip install --force -U --user PlexAPI
import json
import time
import logging
import plexapi
import plexapi.video
import plexapi.myplex
import plexapi.server
import plexapi.library
import plexapi.exceptions
PLEX_URL = ""
PLEX_TOKEN = ""
WATCHED_HISTORY =... | 36.713592 | 114 | 0.672352 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,463 | 0.193442 |
95a5e5403994144db82f320da6b9ae78fdfacc78 | 3,556 | py | Python | django_thermostat/pypelib/Rule.py | jpardobl/django-thermostat | 184e398134f289eb0337ec2af33c650f9ee26a13 | [
"BSD-3-Clause"
] | null | null | null | django_thermostat/pypelib/Rule.py | jpardobl/django-thermostat | 184e398134f289eb0337ec2af33c650f9ee26a13 | [
"BSD-3-Clause"
] | null | null | null | django_thermostat/pypelib/Rule.py | jpardobl/django-thermostat | 184e398134f289eb0337ec2af33c650f9ee26a13 | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
import time
import exceptions
import uuid
import logging
'''
@author: msune,lbergesio,omoya,CarolinaFernandez
@organization: i2CAT, OFELIA FP7
PolicyEngine Rule class
Encapsulates logic of a simple Rule
'''
from django_thermostat.pypelib.Condition import Condition
from django_thermo... | 27.353846 | 105 | 0.719629 | 3,105 | 0.873172 | 0 | 0 | 0 | 0 | 0 | 0 | 786 | 0.221035 |
95aa250e5dd1b191d40f33aa77ed3ab2c0ae9d74 | 64 | py | Python | tests/test_tag.py | veoco/PyTypecho | 59280c4770f0b66acccea7a5eb62495be30977b4 | [
"MIT"
] | 5 | 2019-11-25T13:39:01.000Z | 2021-11-03T07:12:33.000Z | tests/test_tag.py | veoco/PyTypecho | 59280c4770f0b66acccea7a5eb62495be30977b4 | [
"MIT"
] | 4 | 2021-01-24T14:03:02.000Z | 2021-07-19T04:43:59.000Z | tests/test_tag.py | veoco/PyTypecho | 59280c4770f0b66acccea7a5eb62495be30977b4 | [
"MIT"
] | 2 | 2020-12-03T12:47:31.000Z | 2021-07-19T02:45:36.000Z | def test_get_tags(te):
r = te.get_tags()
assert r == []
| 16 | 22 | 0.5625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
95aa9b2ab7c302c981b157247e84659b7c3d8105 | 709 | py | Python | test/test_integration.py | gaborfodor/wave-bird-recognition | 6feafdbae82746e3e7b0f6588a9158aa8336309a | [
"MIT"
] | 17 | 2021-06-02T12:26:30.000Z | 2022-03-27T18:35:02.000Z | test/test_integration.py | gaborfodor/wave-bird-recognition | 6feafdbae82746e3e7b0f6588a9158aa8336309a | [
"MIT"
] | null | null | null | test/test_integration.py | gaborfodor/wave-bird-recognition | 6feafdbae82746e3e7b0f6588a9158aa8336309a | [
"MIT"
] | 3 | 2021-06-02T12:26:51.000Z | 2021-06-06T05:56:45.000Z | from birds.display_utils import geo_plot
from birds.pann import load_pretrained_model, read_audio_fast, get_model_predictions_for_clip, BIRDS
def test_prediction_works():
test_bird = 'comrav'
model = load_pretrained_model()
y = read_audio_fast(f'./data/audio/{test_bird}.mp3')
predictions = get_mode... | 27.269231 | 100 | 0.71086 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 85 | 0.119887 |
95abecff3908d6331f655cf91a24b321277dc4f4 | 12,306 | py | Python | For_Cluster/letshpc_folder_backtracking_2/main_script_without_perf.py | yatin2410/HPC_N_QUEENS | df629ac4ebc678815953370c8ae97c6d276819ff | [
"MIT"
] | 2 | 2019-05-10T09:09:07.000Z | 2022-02-07T05:46:57.000Z | For_Cluster/letshpc_folder_bitmasking/main_script_without_perf.py | yatin2410/HPC_N_QUEENS | df629ac4ebc678815953370c8ae97c6d276819ff | [
"MIT"
] | null | null | null | For_Cluster/letshpc_folder_bitmasking/main_script_without_perf.py | yatin2410/HPC_N_QUEENS | df629ac4ebc678815953370c8ae97c6d276819ff | [
"MIT"
] | null | null | null | #!/bin/python
import subprocess
import os
import sys
import maps
import time
import logging
def line(n):
print('-'*n)
logging.basicConfig(filename = "LetsHPC_Team_CodeRunner.log", level = logging.INFO)
logger = logging.getLogger(__name__)
#####################################################################... | 34.664789 | 138 | 0.491549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,308 | 0.268812 |
95ae2e3a04b5bb9553c2d275221aaaba3d17f40e | 1,236 | py | Python | 0205.Isomorphic Strings/solution.py | zhlinh/leetcode | 6dfa0a4df9ec07b2c746a13c8257780880ea04af | [
"Apache-2.0"
] | null | null | null | 0205.Isomorphic Strings/solution.py | zhlinh/leetcode | 6dfa0a4df9ec07b2c746a13c8257780880ea04af | [
"Apache-2.0"
] | null | null | null | 0205.Isomorphic Strings/solution.py | zhlinh/leetcode | 6dfa0a4df9ec07b2c746a13c8257780880ea04af | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
*****************************************
Author: zhlinh
Email: zhlinhng@gmail.com
Version: 0.0.1
Created Time: 2016-03-24
Last_modify: 2016-03-24
******************************************
'''
'''
Given two strings s and t, determine if th... | 24.235294 | 75 | 0.536408 | 440 | 0.355987 | 0 | 0 | 0 | 0 | 0 | 0 | 867 | 0.701456 |
95b11eb96aa3d734016e0fceb804be347a3066c5 | 1,860 | py | Python | testModules/migration.py | mannamman/newsCrawl | 8779c1ee06ef51d2affbd9b8a80e688c6ed056e7 | [
"MIT"
] | null | null | null | testModules/migration.py | mannamman/newsCrawl | 8779c1ee06ef51d2affbd9b8a80e688c6ed056e7 | [
"MIT"
] | 14 | 2021-12-20T03:44:08.000Z | 2022-02-24T06:04:06.000Z | testModules/migration.py | mannamman/newsCrawl | 8779c1ee06ef51d2affbd9b8a80e688c6ed056e7 | [
"MIT"
] | null | null | null | import pymongo
## local 테스트 ##
from dotenv import load_dotenv
import os
import pytz
import datetime
import itertools
from uuid import uuid4
from collections import defaultdict
# ObjectId로 쿼리할때 필요
from bson.objectid import ObjectId
"""
RDBMS Mongo DB
Database Database
Table Collection
Row Document
Index... | 28.181818 | 111 | 0.638172 | 1,387 | 0.735419 | 0 | 0 | 0 | 0 | 0 | 0 | 404 | 0.21421 |
95b233e62bad224b765ef9f8b1c2e67cce2b24ad | 1,659 | py | Python | YOLOv2.py | scain40/OpenCVCVImageComparisson | 368d901233111606fb2f0ecbce4447dd9c149fd0 | [
"MIT"
] | null | null | null | YOLOv2.py | scain40/OpenCVCVImageComparisson | 368d901233111606fb2f0ecbce4447dd9c149fd0 | [
"MIT"
] | null | null | null | YOLOv2.py | scain40/OpenCVCVImageComparisson | 368d901233111606fb2f0ecbce4447dd9c149fd0 | [
"MIT"
] | null | null | null | import numpy as np
import cv2 as cv
import os
import sys
class ObjectDetector:
"""
Object Detector is the class model for using YOLOv2 and gathering results
"""
def __init__(self):
self.network_loading()
def network_loading(self):
# Loading in the trained darknet models labels
self.LABELS =... | 36.866667 | 112 | 0.722122 | 1,590 | 0.958409 | 0 | 0 | 0 | 0 | 0 | 0 | 503 | 0.303195 |
95b3747c398cbe76bc2e8c76655c81e2a5cd82bc | 115 | py | Python | closuredag/apps.py | farmlab/django-closuredag | 19bacabea5e922613a18d21048866dceb44d0afe | [
"MIT"
] | null | null | null | closuredag/apps.py | farmlab/django-closuredag | 19bacabea5e922613a18d21048866dceb44d0afe | [
"MIT"
] | 93 | 2017-11-16T13:58:45.000Z | 2022-03-27T22:01:19.000Z | closuredag/apps.py | farmlab/django-closuredag | 19bacabea5e922613a18d21048866dceb44d0afe | [
"MIT"
] | null | null | null | # -*- coding: utf-8
from django.apps import AppConfig
class ClosuredagConfig(AppConfig):
name = 'closuredag'
| 16.428571 | 34 | 0.721739 | 58 | 0.504348 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.269565 |
95b3dfb14ba48f34faa00abbd1780bd7ac43862d | 499 | py | Python | experiments/reversed_string_stack.py | shruti-bt/data-structure-python | 0729f486f516ce05acdd92b28b108f43b67f656f | [
"MIT"
] | 1 | 2022-01-10T17:17:35.000Z | 2022-01-10T17:17:35.000Z | experiments/reversed_string_stack.py | shruti-bt/data-structure-python | 0729f486f516ce05acdd92b28b108f43b67f656f | [
"MIT"
] | null | null | null | experiments/reversed_string_stack.py | shruti-bt/data-structure-python | 0729f486f516ce05acdd92b28b108f43b67f656f | [
"MIT"
] | null | null | null | class Stack():
def __init__(self):
self.stack = []
def push(self, value):
self.stack.append(value)
def pop(self):
return self.stack.pop()
def __len__(self):
return len(self.stack)
def print(self):
return print(self.stack)
if __name__ == '_... | 19.192308 | 35 | 0.519038 | 299 | 0.599198 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.024048 |
95b40e4094e935db9b4e39bc3de9c67b55114bbe | 484 | py | Python | app/run.py | dudikbender/geocoder | af8c0839d3d73c7825a0488763d053b5e6bc8257 | [
"Unlicense"
] | null | null | null | app/run.py | dudikbender/geocoder | af8c0839d3d73c7825a0488763d053b5e6bc8257 | [
"Unlicense"
] | null | null | null | app/run.py | dudikbender/geocoder | af8c0839d3d73c7825a0488763d053b5e6bc8257 | [
"Unlicense"
] | null | null | null | from utils.db import connection, print_version
import pandas as pd
def add_table(csv_file, table_name, engine):
df = pd.read_csv(csv_file)
df = df.drop('Unnamed: 0')
df.to_sql(name=table_name, con=engine, index=False, if_exists='replace')
table = 'data/tables/postcode_coordinates.csv'
add_table(table, 'P... | 25.473684 | 76 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.274793 |
95b525d705b0f34eba83af30d5fc61bd4affc2f0 | 48 | pyw | Python | seemee.pyw | gaming32/SeeMee | a99655efdd9e1aea218474bcdbd1370954a366d2 | [
"MIT"
] | null | null | null | seemee.pyw | gaming32/SeeMee | a99655efdd9e1aea218474bcdbd1370954a366d2 | [
"MIT"
] | null | null | null | seemee.pyw | gaming32/SeeMee | a99655efdd9e1aea218474bcdbd1370954a366d2 | [
"MIT"
] | null | null | null | import runpy
runpy._run_module_as_main('SeeMee') | 24 | 35 | 0.854167 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.166667 |
95b591115eff8da9eaed281f3f62bddae8faefca | 755 | py | Python | model/param_const.py | tototo617/Biomodel-Raia2011 | a06d531e3d9f18ddee1d85a19d8c57363be3da8e | [
"MIT"
] | null | null | null | model/param_const.py | tototo617/Biomodel-Raia2011 | a06d531e3d9f18ddee1d85a19d8c57363be3da8e | [
"MIT"
] | null | null | null | model/param_const.py | tototo617/Biomodel-Raia2011 | a06d531e3d9f18ddee1d85a19d8c57363be3da8e | [
"MIT"
] | null | null | null | from .name2idx import parameters as C
def f_params():
x = [0]*C.len_f_params
x[C.Kon_IL13Rec] = 0.00341992
x[C.Rec_phosphorylation] = 999.631
x[C.pRec_intern] = 0.15254
x[C.pRec_degradation] = 0.172928
x[C.Rec_intern] = 0.103346
x[C.Rec_recycle] = 0.00135598
x[C.JAK2_phosphorylation] =... | 31.458333 | 46 | 0.682119 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
95b6aab732ea16915f09231a8049e60f6f242ea6 | 593 | py | Python | flaskr/commands.py | aicioara-old/flask_tutorial2 | acb5c6fa2743f2f060ad6a3a26cc7eef56b6490b | [
"MIT"
] | null | null | null | flaskr/commands.py | aicioara-old/flask_tutorial2 | acb5c6fa2743f2f060ad6a3a26cc7eef56b6490b | [
"MIT"
] | null | null | null | flaskr/commands.py | aicioara-old/flask_tutorial2 | acb5c6fa2743f2f060ad6a3a26cc7eef56b6490b | [
"MIT"
] | null | null | null | import os
import datetime
import click
from flask.cli import with_appcontext
from werkzeug.security import generate_password_hash
def init_app(app):
app.cli.add_command(init_db_command)
@click.command('init-db')
@with_appcontext
def init_db_command():
"""Clear the existing data and create new tables."""
... | 20.448276 | 82 | 0.735245 | 0 | 0 | 0 | 0 | 180 | 0.303541 | 0 | 0 | 102 | 0.172007 |
95b6e78900559f4f960f26e452c446bb79f637e4 | 191 | py | Python | intel_bot_sentenca_rj_civel/test.py | slarda/Web-Scrapping-Bots-For-Crawling-Docs | aa8ce3c72bfbe2111d16655ffc3a6759a825946e | [
"Apache-2.0"
] | 1 | 2020-12-17T11:21:01.000Z | 2020-12-17T11:21:01.000Z | intel_bot_sentenca_rj_civel/test.py | soft-super/Web-Scrapping-Bots-For-Crawling-Docs | aa8ce3c72bfbe2111d16655ffc3a6759a825946e | [
"Apache-2.0"
] | 5 | 2021-03-19T01:48:07.000Z | 2021-06-09T18:26:31.000Z | intel_bot_sentenca_rj_civel/test.py | tiny-1996/Web-Scrapping-Bots-For-Crawling-Docs | aa8ce3c72bfbe2111d16655ffc3a6759a825946e | [
"Apache-2.0"
] | null | null | null | with open('./logs/test.log', 'r') as f1:
data = f1.readlines()
formatted = [x.replace('.pdf', '') for x in data]
with open('./logs/test2.log', 'r') as f1:
f1.writelines(formatted)
| 21.222222 | 49 | 0.602094 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 0.256545 |
95b771302ac3436f68366f36390ccc4ddba021fd | 2,206 | py | Python | validator_rewards/validator_rewards.py | harmony-one/monitor-ops | 0a379655ff26bff5821cd7cb6f619a15a308441b | [
"MIT"
] | 1 | 2020-04-11T16:46:56.000Z | 2020-04-11T16:46:56.000Z | validator_rewards/validator_rewards.py | harmony-one/monitor-ops | 0a379655ff26bff5821cd7cb6f619a15a308441b | [
"MIT"
] | 3 | 2020-04-13T10:42:59.000Z | 2020-07-10T06:26:23.000Z | validator_rewards/validator_rewards.py | harmony-one/monitor-ops | 0a379655ff26bff5821cd7cb6f619a15a308441b | [
"MIT"
] | 2 | 2020-04-22T10:36:25.000Z | 2020-05-20T15:58:02.000Z | import argparse
import json
from pyhmy import (
get_all_validator_addresses,
get_validator_information
)
def get_block_by_num(block_num, endpoint):
params = [
str(hex(block_num)),
False,
]
payload = {
"id": "1",
"jsonrpc": "2.0",
"method": "hmy_getBlockByNum... | 31.514286 | 96 | 0.609248 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 510 | 0.231188 |
95b980c29bfb10b077998e38727075e9d4e823a6 | 2,271 | py | Python | day4/day4.py | UncleTed/adventOfCode2020 | 382560f7aee89f6b04b2ee60882d3801425ea46c | [
"MIT"
] | null | null | null | day4/day4.py | UncleTed/adventOfCode2020 | 382560f7aee89f6b04b2ee60882d3801425ea46c | [
"MIT"
] | null | null | null | day4/day4.py | UncleTed/adventOfCode2020 | 382560f7aee89f6b04b2ee60882d3801425ea46c | [
"MIT"
] | null | null | null | import re
valid = ['hcl', 'iyr', 'pid', 'ecl', 'hgt','eyr', 'byr' ]
def check_passport_part1(buffer):
passport = map(lambda x: x.split(':')[0], buffer.split(' '))
for v in valid:
if v not in passport:
return False
return True
def split_passport(buffer):
dictionary = {}
for fiel... | 27.695122 | 66 | 0.483928 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 214 | 0.094232 |
95bb338ca37179ca6d20e80795bb6cc5417559db | 535 | py | Python | app/shared/models.py | prapeller/blackemployer_api | ae9232773e6e164b22ffccf0b39dd9a4c2a036cf | [
"MIT"
] | null | null | null | app/shared/models.py | prapeller/blackemployer_api | ae9232773e6e164b22ffccf0b39dd9a4c2a036cf | [
"MIT"
] | null | null | null | app/shared/models.py | prapeller/blackemployer_api | ae9232773e6e164b22ffccf0b39dd9a4c2a036cf | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth import get_user_model
from django.contrib.postgres.fields import ArrayField
from utils.model_utils import default_1d_array_of_strings
class SeoModel(models.Model):
seo_title = models.CharField("SEO title", max_length=100, blank=True, null=True)
seo_descri... | 35.666667 | 96 | 0.773832 | 343 | 0.641121 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.078505 |
95bbb3583a2750d5735e9244fe93a6a446fb803f | 8,314 | py | Python | dataset/data_load.py | clovaai/symmetrical-synthesis | 207953b1ae3d2e0a96fb676db3669bdc88cc18e8 | [
"MIT"
] | 76 | 2020-02-08T03:15:54.000Z | 2022-03-04T16:14:52.000Z | dataset/data_load.py | clovaai/symmetrical-synthesis | 207953b1ae3d2e0a96fb676db3669bdc88cc18e8 | [
"MIT"
] | 5 | 2020-02-07T14:00:58.000Z | 2021-05-31T01:37:55.000Z | dataset/data_load.py | clovaai/symmetrical-synthesis | 207953b1ae3d2e0a96fb676db3669bdc88cc18e8 | [
"MIT"
] | 13 | 2020-02-10T02:56:51.000Z | 2021-05-28T06:56:30.000Z | '''
symmetrical-synthesis
Copyright (c) 2020-present NAVER Corp.
MIT license
'''
import os
import time
import glob
import cv2
import random
import numpy as np
import tensorflow as tf
import random
try:
import data_util
except ImportError:
from dataset import data_util
tf.app.flags.DEFINE_boolean('random_resize... | 35.228814 | 170 | 0.615227 | 0 | 0 | 2,742 | 0.329805 | 0 | 0 | 0 | 0 | 2,097 | 0.252225 |
95bc1cbdca2faf1169e04427ea20b03a36f4f201 | 1,678 | py | Python | python_parikshith21/Day39.py | 01coders/50-Days-Of-Code | 98928cf0e186ee295bc90a4da0aa9554e2918659 | [
"MIT"
] | null | null | null | python_parikshith21/Day39.py | 01coders/50-Days-Of-Code | 98928cf0e186ee295bc90a4da0aa9554e2918659 | [
"MIT"
] | null | null | null | python_parikshith21/Day39.py | 01coders/50-Days-Of-Code | 98928cf0e186ee295bc90a4da0aa9554e2918659 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Jun 17 20:55:53 2019
@author: Parikshith.H
"""
import sqlite3
conn=sqlite3.connect('music.sqlite')
cur=conn.cursor()
cur.execute('DROP TABLE IF EXISTS Tracks')
cur.execute('CREATE TABLE Tracks(title TEXT,plays INTEGER)')
cur.execute('''INSERT INTO Tracks(title,plays) VALUES... | 28.440678 | 80 | 0.544696 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,244 | 0.741359 |
95bd0c7bd55d7d49e38f428fd858ef62fbc90459 | 269 | py | Python | tests/ansible/lib/modules/custom_python_external_pkg.py | webcoast-dk/mitogen | a5fe4a9fac5561511b676fe61ed127b732be5b12 | [
"BSD-3-Clause"
] | 1,526 | 2017-09-15T18:49:40.000Z | 2021-01-17T16:04:12.000Z | tests/ansible/lib/modules/custom_python_external_pkg.py | webcoast-dk/mitogen | a5fe4a9fac5561511b676fe61ed127b732be5b12 | [
"BSD-3-Clause"
] | 682 | 2017-09-11T17:43:12.000Z | 2021-01-17T05:26:26.000Z | tests/ansible/lib/modules/custom_python_external_pkg.py | webcoast-dk/mitogen | a5fe4a9fac5561511b676fe61ed127b732be5b12 | [
"BSD-3-Clause"
] | 111 | 2017-09-15T23:21:37.000Z | 2021-01-01T14:45:35.000Z | #!/usr/bin/python
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.externalpkg import extmod
def main():
module = AnsibleModule(argument_spec={})
module.exit_json(extmod_path=extmod.path())
if __name__ == '__main__':
main()
| 22.416667 | 52 | 0.750929 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.100372 |
95bd18d246cfb63e62a2a8d0384166889102ed92 | 1,869 | py | Python | mlangpy/metalanguages/EBNF.py | rium9/mlangpy | 75821306b15d72278220d2a1a403daa36f60cc4a | [
"MIT"
] | 1 | 2020-04-20T20:23:31.000Z | 2020-04-20T20:23:31.000Z | mlangpy/metalanguages/EBNF.py | rium9/mlangpy | 75821306b15d72278220d2a1a403daa36f60cc4a | [
"MIT"
] | null | null | null | mlangpy/metalanguages/EBNF.py | rium9/mlangpy | 75821306b15d72278220d2a1a403daa36f60cc4a | [
"MIT"
] | null | null | null | from ..grammar import *
from .Metalanguage import Metalanguage
class EBNFTerminal(Terminal):
def __init__(self, subject, left_bound='"', right_bound='"'):
super().__init__(subject, left_bound=left_bound, right_bound=right_bound)
class EBNFDefinitionList(DefinitionList):
def __init__(self, definitio... | 29.203125 | 83 | 0.652755 | 1,784 | 0.954521 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.034243 |
95bd8914d357d073cde74eb4ec195a84ebfe2b04 | 560 | py | Python | app/tests/test_db/test_jobs_crud.py | JvitorS23/jobboard_fastAPI | 5abcc69f19417ad99352c0434db96407e2d7da76 | [
"MIT"
] | 1 | 2021-10-01T16:40:33.000Z | 2021-10-01T16:40:33.000Z | app/tests/test_db/test_jobs_crud.py | JvitorS23/jobboard_fastAPI | 5abcc69f19417ad99352c0434db96407e2d7da76 | [
"MIT"
] | null | null | null | app/tests/test_db/test_jobs_crud.py | JvitorS23/jobboard_fastAPI | 5abcc69f19417ad99352c0434db96407e2d7da76 | [
"MIT"
] | null | null | null | from sqlalchemy.orm import Session
from db.crud.jobs import create_new_job, retrieve_job
from schemas.jobs import JobCreate
from tests.utils.users import create_random_owner
from tests.utils.jobs import create_sample_job
def test_retrieve_job_by_id(db_session: Session):
"""Test retrieving job from db"""
owner... | 37.333333 | 67 | 0.792857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.058929 |
95c0ec3bbf5dfcbc14218087f1c41fdd10c1b36f | 5,135 | py | Python | spacy/tests/website/test_home.py | moyogo/spacy | ddf5c5bb61864320189ebc70dac3bc10e4ecde82 | [
"MIT"
] | null | null | null | spacy/tests/website/test_home.py | moyogo/spacy | ddf5c5bb61864320189ebc70dac3bc10e4ecde82 | [
"MIT"
] | null | null | null | spacy/tests/website/test_home.py | moyogo/spacy | ddf5c5bb61864320189ebc70dac3bc10e4ecde82 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import pytest
import spacy
import os
try:
xrange
except NameError:
xrange = range
@pytest.fixture()
def token(doc):
return doc[0]
@pytest.mark.models
def test_load_resources_and_process_text():
from spacy.en import English
nlp = English()
doc = nlp(u... | 28.370166 | 78 | 0.631353 | 0 | 0 | 564 | 0.109834 | 3,127 | 0.608958 | 0 | 0 | 907 | 0.176631 |
95c1052429e03206d9d42e4ca673e5f48a3f3906 | 35,774 | py | Python | bridge_sim/internal/make/ps_question.py | jerbaroo/bridge-sim | c4ec1c18a07a78462ccf3b970a99a1bd7efcc2af | [
"MIT"
] | 2 | 2020-05-12T11:41:49.000Z | 2020-08-10T15:00:58.000Z | bridge_sim/internal/make/ps_question.py | barischrooneyj/bridge-sim | c4ec1c18a07a78462ccf3b970a99a1bd7efcc2af | [
"MIT"
] | 48 | 2020-05-11T23:58:22.000Z | 2020-09-18T20:28:52.000Z | bridge_sim/internal/make/ps_question.py | jerbaroo/bridge-sim | c4ec1c18a07a78462ccf3b970a99a1bd7efcc2af | [
"MIT"
] | 1 | 2020-05-27T12:43:37.000Z | 2020-05-27T12:43:37.000Z | import os
from copy import deepcopy
import matplotlib.pyplot as plt
import numpy as np
from bridge_sim import model, sim, temperature, traffic, plot, util
from bridge_sim.model import Config, Point, Bridge
from bridge_sim.plot.util import equal_lims
from bridge_sim.sim.responses import without
from bridge_sim.util im... | 38.138593 | 148 | 0.587494 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,240 | 0.146467 |
95c1db49e8979342f440e2ee5e1a48186d51308c | 936 | py | Python | parsers/download_data.py | bioinf-mcb/polish-microbiome-project | 0fc15b1a5afe4edf63b6be6b945ac4053e3a24f9 | [
"BSD-3-Clause"
] | null | null | null | parsers/download_data.py | bioinf-mcb/polish-microbiome-project | 0fc15b1a5afe4edf63b6be6b945ac4053e3a24f9 | [
"BSD-3-Clause"
] | null | null | null | parsers/download_data.py | bioinf-mcb/polish-microbiome-project | 0fc15b1a5afe4edf63b6be6b945ac4053e3a24f9 | [
"BSD-3-Clause"
] | null | null | null | #%%
import json
import requests
from io import StringIO
import pandas as pd
# %%
with open("../db_pass", "r") as f:
token = json.load(f)['token']
# %%
data = {
'token': token,
'content': 'record',
'format': 'csv',
'type': 'flat',
'csvDelimiter': '',
'rawOrLabel': 'raw',
'rawOrLabelHead... | 23.4 | 113 | 0.63141 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 439 | 0.469017 |
95c256321ed64a1e2f22ab370936dbb097ea26b8 | 2,622 | py | Python | preprocess/sequence_stats.py | ashish-roopan/fsgan | 1582e112d0f59cd32920ac5953baec783e088cad | [
"CC0-1.0"
] | 599 | 2020-04-14T19:28:58.000Z | 2022-03-26T11:29:37.000Z | preprocess/sequence_stats.py | ashish-roopan/fsgan | 1582e112d0f59cd32920ac5953baec783e088cad | [
"CC0-1.0"
] | 157 | 2020-04-14T21:13:43.000Z | 2022-02-07T06:30:16.000Z | preprocess/sequence_stats.py | ashish-roopan/fsgan | 1582e112d0f59cd32920ac5953baec783e088cad | [
"CC0-1.0"
] | 150 | 2020-04-14T20:40:41.000Z | 2022-03-30T10:50:21.000Z | """
Sequence statistics: Count, length, bounding boxes size.
"""
import os
from glob import glob
import pickle
from tqdm import tqdm
def extract_stats(cache_path):
# Load sequences from file
with open(cache_path, "rb") as fp: # Unpickling
seq_list = pickle.load(fp)
if len(seq_list) == 0:
... | 35.432432 | 114 | 0.622426 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 697 | 0.265828 |
95c285b58cd596c463e5846360384f8f0b80a4d5 | 352 | py | Python | app/migrations/0004_auto_20200704_0405.py | duorah/GRanDpa-Family-Tree | 613df3fb61a8dd5eba7416ad6f8fda80e350bbe1 | [
"MIT"
] | 1 | 2020-07-13T21:03:17.000Z | 2020-07-13T21:03:17.000Z | app/migrations/0004_auto_20200704_0405.py | duorah/grandpa-family-tree | 613df3fb61a8dd5eba7416ad6f8fda80e350bbe1 | [
"MIT"
] | null | null | null | app/migrations/0004_auto_20200704_0405.py | duorah/grandpa-family-tree | 613df3fb61a8dd5eba7416ad6f8fda80e350bbe1 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-07-04 04:05
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('app', '0003_auto_20200704_0400'),
]
operations = [
migrations.AlterModelOptions(
name='person',
options={'verbose_name_plura... | 19.555556 | 54 | 0.602273 | 267 | 0.758523 | 0 | 0 | 0 | 0 | 0 | 0 | 114 | 0.323864 |
95c5e262b4da5f7adb2dec6d61c74e3194680b9a | 7,735 | py | Python | tests/test_dossier.py | openkamer/tk-api-python | 907b98ccc7602ad7e3e74f1e06f9544fbe66aba3 | [
"MIT"
] | 9 | 2017-11-16T12:39:11.000Z | 2021-10-16T19:30:52.000Z | tests/test_dossier.py | openkamer/tk-api-python | 907b98ccc7602ad7e3e74f1e06f9544fbe66aba3 | [
"MIT"
] | 1 | 2017-11-16T14:20:20.000Z | 2017-11-20T18:49:14.000Z | tests/test_dossier.py | openkamer/tk-api-python | 907b98ccc7602ad7e3e74f1e06f9544fbe66aba3 | [
"MIT"
] | 3 | 2018-09-10T18:57:39.000Z | 2020-06-09T14:13:10.000Z | import datetime
from tkapi.util import queries
from tkapi.zaak import Zaak, ZaakSoort
from tkapi.dossier import Dossier, DossierWetsvoorstel
from tkapi.document import Document
from .core import TKApiTestCase
class TestDossier(TKApiTestCase):
def test_get_dossiers(self):
dossiers = self.api.get_dossier... | 39.065657 | 118 | 0.648869 | 7,509 | 0.970782 | 0 | 0 | 0 | 0 | 0 | 0 | 2,145 | 0.277311 |
95c7b536f4cc90da867d02e9f53e889cad554b21 | 27,649 | py | Python | Manuscript files/modflow_reference/auxfile_hexaplot.py | MaxRamgraber/Simple-AEM-Toolbox | 27751103f5e504dd675ba6225f2aee9f85d7c85d | [
"MIT"
] | 3 | 2021-06-16T12:27:22.000Z | 2022-01-04T11:21:35.000Z | Manuscript files/modflow_reference/auxfile_hexaplot.py | MaxRamgraber/Simple-AEM-Toolbox | 27751103f5e504dd675ba6225f2aee9f85d7c85d | [
"MIT"
] | null | null | null | Manuscript files/modflow_reference/auxfile_hexaplot.py | MaxRamgraber/Simple-AEM-Toolbox | 27751103f5e504dd675ba6225f2aee9f85d7c85d | [
"MIT"
] | 3 | 2021-06-17T11:20:20.000Z | 2022-01-12T09:56:56.000Z | """
This library contains several functions designed to help with the illustration of hexagonal grids
Functions:
plot_hexagaons : plots a specified data vector over a 2-D hexagon grid.
create_alpha_mask : creates an alpha shape (a concave hull), which is required for plotting contou... | 42.66821 | 240 | 0.537054 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11,199 | 0.404983 |
95c8f1ad4e81caf4b83710c865b7efb620f7466e | 58,889 | py | Python | tests/python/self_concepts_test.py | JulianAL-01/self-concepts | d4a5ebfdadc472535777349602c775a67aaa3823 | [
"MIT"
] | 14 | 2020-07-21T21:09:25.000Z | 2022-01-30T11:00:35.000Z | tests/python/self_concepts_test.py | JulianAL-01/self-concepts | d4a5ebfdadc472535777349602c775a67aaa3823 | [
"MIT"
] | 2 | 2020-07-28T14:46:11.000Z | 2020-07-28T14:52:23.000Z | tests/python/self_concepts_test.py | JulianAL-01/self-concepts | d4a5ebfdadc472535777349602c775a67aaa3823 | [
"MIT"
] | 5 | 2020-07-28T13:50:20.000Z | 2021-07-12T22:56:11.000Z | '''
self_concepts_test
This module serves as the unit test for self_concepts
'''
import argparse, sys
sys.path.append('../../source/python')
from self_concepts import Concept
from self_concepts import Property
from self_concepts import Relationship
from self_concepts import Ontology
from self_concepts import Blackb... | 40.252221 | 120 | 0.69558 | 3,763 | 0.0639 | 0 | 0 | 0 | 0 | 0 | 0 | 22,631 | 0.384299 |
95c9bf8a576fcba5f592caf1b205652fbf6c6df7 | 1,042 | py | Python | 100-200q/123.py | rampup01/Leetcode | 8450a95a966ef83b24ffe6450f06ce8de92b3efb | [
"MIT"
] | 990 | 2018-06-05T11:49:22.000Z | 2022-03-31T08:59:17.000Z | 100-200q/123.py | rampup01/Leetcode | 8450a95a966ef83b24ffe6450f06ce8de92b3efb | [
"MIT"
] | 1 | 2021-11-01T01:29:38.000Z | 2021-11-01T01:29:38.000Z | 100-200q/123.py | rampup01/Leetcode | 8450a95a966ef83b24ffe6450f06ce8de92b3efb | [
"MIT"
] | 482 | 2018-06-12T22:16:53.000Z | 2022-03-29T00:23:29.000Z | '''
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete at most two transactions.
Note: You may not engage in multiple transactions at the same time (i.e., you must sell the stock before you buy again).
Example 1... | 30.647059 | 121 | 0.579655 | 493 | 0.473129 | 0 | 0 | 0 | 0 | 0 | 0 | 612 | 0.587332 |
95ca4ff47bbf69d356929cfddbfe83070e5ea793 | 2,077 | py | Python | lambdas/verify_admin.py | charvi-a/320-S20-Track1 | ac97504fc1fdedb1c311773b015570eeea8a8663 | [
"BSD-3-Clause"
] | 9 | 2019-12-30T16:32:22.000Z | 2020-03-03T20:14:47.000Z | lambdas/verify_admin.py | charvi-a/320-S20-Track1 | ac97504fc1fdedb1c311773b015570eeea8a8663 | [
"BSD-3-Clause"
] | 283 | 2020-02-03T15:16:03.000Z | 2020-05-05T03:18:59.000Z | lambdas/verify_admin.py | charvi-a/320-S20-Track1 | ac97504fc1fdedb1c311773b015570eeea8a8663 | [
"BSD-3-Clause"
] | 3 | 2020-04-16T15:23:29.000Z | 2020-05-12T00:38:41.000Z | import json
from package.query_db import query
from package.dictionary_to_list import dictionary_to_list
from package.lambda_exception import LambdaException
from boto3 import client as boto3_client
def verify_admin(event, context):
user_id = int(event['user_id'])
user_id_dic = {}
if user_id == None: #Maki... | 42.387755 | 148 | 0.639384 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 777 | 0.374097 |
95cadfb3b8d6c3a18abd5334655fd77acc7c9759 | 4,821 | py | Python | run.py | Galaxy-SynBioCAD/rp2paths | f87ea0f64556be44af1ae717cd4246159253d029 | [
"MIT"
] | null | null | null | run.py | Galaxy-SynBioCAD/rp2paths | f87ea0f64556be44af1ae717cd4246159253d029 | [
"MIT"
] | null | null | null | run.py | Galaxy-SynBioCAD/rp2paths | f87ea0f64556be44af1ae717cd4246159253d029 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Created on September 21 2019
@author: Melchior du Lac
@description: Wrap rp2paths into a docker
"""
import argparse
import tempfile
import os
import logging
import shutil
import docker
import glob
def main(rp_pathways, rp2paths_pathways, rp2paths_compounds, timeout=30, max_steps=0, max_pa... | 43.827273 | 158 | 0.611077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,894 | 0.392865 |
95cae2c1de14d040a592e9ed57f23f978ae86e71 | 150 | py | Python | test_cases/conftest.py | majdukovic/pybooker | b9a373d556be0481c93a528f731407ca7a47b11f | [
"MIT"
] | null | null | null | test_cases/conftest.py | majdukovic/pybooker | b9a373d556be0481c93a528f731407ca7a47b11f | [
"MIT"
] | null | null | null | test_cases/conftest.py | majdukovic/pybooker | b9a373d556be0481c93a528f731407ca7a47b11f | [
"MIT"
] | null | null | null | import pytest
from framework.services.booker_client import BookerClient
booker_client = BookerClient()
@pytest.fixture()
def clear_env():
pass
| 15 | 57 | 0.786667 | 0 | 0 | 0 | 0 | 43 | 0.286667 | 0 | 0 | 0 | 0 |
95cb8a34cde724ada03c12bdaeb21669317ed997 | 402 | py | Python | verilator/scripts/concat_up5k.py | micro-FPGA/engine-V | 00a8f924e10fc69874d9c179f788bf037fe9c407 | [
"Apache-2.0"
] | 44 | 2018-11-19T16:49:10.000Z | 2021-12-05T10:16:24.000Z | verilator/scripts/concat_up5k.py | micro-FPGA/engine-V | 00a8f924e10fc69874d9c179f788bf037fe9c407 | [
"Apache-2.0"
] | null | null | null | verilator/scripts/concat_up5k.py | micro-FPGA/engine-V | 00a8f924e10fc69874d9c179f788bf037fe9c407 | [
"Apache-2.0"
] | 5 | 2018-12-05T23:43:21.000Z | 2020-09-03T04:36:34.000Z |
spiFile = open('spiflash.bin','wb')
# 128KB is reserved for bitstream
bitFile = open('../bitstream/mf8a18_rv32i.bin','rb')
bitData = bitFile.read(0x20000)
riscvFile = open('riscv.bin','rb')
riscvData = riscvFile.read(32768)
spiFile.write(bitData)
spiFile.seek(0x20000)
spiFile.write(riscvData)
nullData = bytearray... | 17.478261 | 52 | 0.748756 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.251244 |
95cda288d497faae566e114db4bdc1e1b83b2b52 | 753 | py | Python | pyvista_gui/options.py | akaszynski/pyvista-gui | 4ed7e3a52026dfeab4e82a300b92a92f43060dda | [
"MIT"
] | 6 | 2019-11-20T20:08:42.000Z | 2022-02-24T12:24:20.000Z | pyvista_gui/options.py | akaszynski/pyvista-gui | 4ed7e3a52026dfeab4e82a300b92a92f43060dda | [
"MIT"
] | 6 | 2020-01-27T16:15:11.000Z | 2021-04-12T11:42:11.000Z | pyvista_gui/options.py | akaszynski/pyvista-gui | 4ed7e3a52026dfeab4e82a300b92a92f43060dda | [
"MIT"
] | null | null | null | """Options for saving user prefences, etc.
"""
import json
import os
import pyvista
class RcParams(dict):
"""Internally used class to manage the rcParams"""
filename = os.path.join(pyvista.USER_DATA_PATH, 'rcParams.json')
def save(self):
with open(self.filename, 'w') as f:
json.dump... | 19.815789 | 68 | 0.629482 | 483 | 0.641434 | 0 | 0 | 0 | 0 | 0 | 0 | 198 | 0.262948 |
95cdaf4dfa1b6e4f1d482661c80dff3aa859d8b1 | 11,978 | py | Python | validatearcgisenterprisedeployment.py | pheede/ArcGIS-Server-Stuff | 9b491d2f4edebec3f613182981f4e50dcc7641a3 | [
"Apache-2.0"
] | 6 | 2017-05-31T10:44:09.000Z | 2020-12-18T18:12:15.000Z | validatearcgisenterprisedeployment.py | pheede/ArcGIS-Server-Stuff | 9b491d2f4edebec3f613182981f4e50dcc7641a3 | [
"Apache-2.0"
] | 1 | 2021-09-30T21:20:59.000Z | 2021-09-30T23:55:48.000Z | validatearcgisenterprisedeployment.py | pheede/ArcGIS-Server-Stuff | 9b491d2f4edebec3f613182981f4e50dcc7641a3 | [
"Apache-2.0"
] | 2 | 2017-12-28T19:30:23.000Z | 2019-10-04T20:34:27.000Z | """This script validates an ArcGIS Enterprise deployment to ensure it is
configured properly with all the required components such as Portal for ArcGIS,
ArcGIS Server, ArcGIS Data Store and the associated configuration.
Designed for ArcGIS Enterprise 10.5 and higher."""
# Author: Philip Heede <pheede@esri.com>
# Last... | 46.972549 | 153 | 0.655034 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,079 | 0.340541 |
95ce4cab43e2034234aed87a60cc3f00447f9524 | 4,445 | py | Python | 2020/aoc/__init__.py | amochtar/adventofcode | 292e7f00a1e19d2149d00246b0a77fedfcd3bd08 | [
"MIT"
] | 1 | 2019-12-27T22:36:30.000Z | 2019-12-27T22:36:30.000Z | 2020/aoc/__init__.py | amochtar/adventofcode | 292e7f00a1e19d2149d00246b0a77fedfcd3bd08 | [
"MIT"
] | null | null | null | 2020/aoc/__init__.py | amochtar/adventofcode | 292e7f00a1e19d2149d00246b0a77fedfcd3bd08 | [
"MIT"
] | null | null | null | import itertools
import re
import math
from typing import List, Tuple
def ints(text: str) -> Tuple[int, ...]:
"Return a tuple of all ints in a string"
return tuple(map(int, re.findall(r'-?\b\d+\b', text)))
def powerset(iterable):
"powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)"
s ... | 26.939394 | 109 | 0.526659 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,021 | 0.229696 |
95ce971f5a305cd3a19578c204fef92020757f3c | 4,431 | py | Python | pi_source_code.py | cjkuhlmann/CCHack2019 | fb6eb505ac350c2dda0c36e1f33254fbeef049bf | [
"MIT"
] | null | null | null | pi_source_code.py | cjkuhlmann/CCHack2019 | fb6eb505ac350c2dda0c36e1f33254fbeef049bf | [
"MIT"
] | null | null | null | pi_source_code.py | cjkuhlmann/CCHack2019 | fb6eb505ac350c2dda0c36e1f33254fbeef049bf | [
"MIT"
] | null | null | null | import math
import time
from max30105 import MAX30105, HeartRate
import smbus
from bme280 import BME280
import socket
#from matplotlib import pyplot as plt
class DataPoint():
def __init__(self,value,time):
self.time_stamp = time
self.value = value
class Device():
def __init__(self... | 28.403846 | 83 | 0.558565 | 4,019 | 0.907019 | 0 | 0 | 0 | 0 | 0 | 0 | 998 | 0.225231 |
95cead6bce011703374b48a18d5379f241d0c282 | 1,417 | py | Python | butter/mas/clients/client_factory.py | bennymeg/Butter.MAS.PythonAPI | 9641293436d989ae9c5324c2b8129f232822b248 | [
"Apache-2.0"
] | 2 | 2019-08-22T08:57:42.000Z | 2019-11-28T14:01:49.000Z | butter/mas/clients/client_factory.py | bennymeg/Butter.MAS.PythonAPI | 9641293436d989ae9c5324c2b8129f232822b248 | [
"Apache-2.0"
] | null | null | null | butter/mas/clients/client_factory.py | bennymeg/Butter.MAS.PythonAPI | 9641293436d989ae9c5324c2b8129f232822b248 | [
"Apache-2.0"
] | null | null | null | from .client_http import HttpClient
from .client_tcp import TcpClient
from .client_udp import UdpClient
from .client import Client
class ClientFactory:
""" Client factory for different types of protocols """
def getClient(self, ip, port=None, protocol="http") -> Client:
"""Creates new client
... | 30.148936 | 81 | 0.56669 | 1,283 | 0.905434 | 0 | 0 | 0 | 0 | 0 | 0 | 590 | 0.416373 |
95ceaebae16674be2fef2960c47326152d1eb461 | 1,569 | py | Python | scrapytest/spiders/ScrapyDemo5.py | liang1024/Scrapy | bfa7ea5b2174bf91c49f4da9dadc5471acc43092 | [
"Apache-2.0"
] | null | null | null | scrapytest/spiders/ScrapyDemo5.py | liang1024/Scrapy | bfa7ea5b2174bf91c49f4da9dadc5471acc43092 | [
"Apache-2.0"
] | null | null | null | scrapytest/spiders/ScrapyDemo5.py | liang1024/Scrapy | bfa7ea5b2174bf91c49f4da9dadc5471acc43092 | [
"Apache-2.0"
] | null | null | null | import scrapy
'''
现在您已经知道如何从页面中提取数据,我们来看看如何跟踪它们的链接。
首先是提取我们想要跟踪的页面的链接。检查我们的页面,我们可以看到有一个链接到下一个页面与以下标记:
<ul class="pager">
<li class="next">
<a href="/page/2/">Next <span aria-hidden="true">→</span></a>
</li>
</ul>
我们可以尝试在shell中提取它:
>>> response.css('li.next a').extract_first()
'<a href="/page/2/"... | 24.138462 | 116 | 0.66348 | 678 | 0.279818 | 548 | 0.226166 | 0 | 0 | 0 | 0 | 1,863 | 0.768882 |
95cf45edd5e367889b2e72c5aaae8636bfca5ddc | 909 | py | Python | tests/test_objectives.py | theislab/AutoGeneS | 22bde0d5eba013e90edb85341e0bd9c28b82e7fd | [
"MIT"
] | 46 | 2020-02-25T14:09:21.000Z | 2022-01-20T16:42:40.000Z | tests/test_objectives.py | theislab/AutoGeneS | 22bde0d5eba013e90edb85341e0bd9c28b82e7fd | [
"MIT"
] | 16 | 2020-03-18T15:08:42.000Z | 2022-01-29T20:00:10.000Z | tests/test_objectives.py | theislab/AutoGeneS | 22bde0d5eba013e90edb85341e0bd9c28b82e7fd | [
"MIT"
] | 6 | 2020-02-13T14:23:46.000Z | 2021-12-28T16:50:50.000Z | import pytest
import numpy as np
import pandas as pd
from scipy.special import binom
import os
import sys
sys.path.insert(0, "..")
from autogenes import objectives as ga_objectives
def test_distance():
arr = np.ones((3,3))
assert ga_objectives.distance(arr) == 0
arr = np.identity(3)
assert np.isclose(ga_... | 23.307692 | 84 | 0.630363 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 276 | 0.30363 |
95cf9c3a1a9e3db6fb75803b4f3891c4c503d528 | 15,563 | py | Python | digits/model/forms.py | Linda-liugongzi/DIGITS-digits-py3 | 6df5eb6972574a628b9544934518ec8dfa9c7439 | [
"BSD-3-Clause"
] | null | null | null | digits/model/forms.py | Linda-liugongzi/DIGITS-digits-py3 | 6df5eb6972574a628b9544934518ec8dfa9c7439 | [
"BSD-3-Clause"
] | null | null | null | digits/model/forms.py | Linda-liugongzi/DIGITS-digits-py3 | 6df5eb6972574a628b9544934518ec8dfa9c7439 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
import os
import flask
from flask_wtf import FlaskForm
import wtforms
from wtforms import validators
from digits.config import config_value
from digits.device_query import get_device, get_nvml_info
from digits import utils
f... | 36.791962 | 122 | 0.556512 | 15,239 | 0.96934 | 0 | 0 | 0 | 0 | 0 | 0 | 4,924 | 0.313212 |
95d02019dda244ece2c09a15f8673c55536ad4de | 1,155 | py | Python | 004 Sons/afinacao.py | yamadathamine/300ideiasparaprogramarPython | 331a063bbf8bcd117ae5a34324b8176a6014fc98 | [
"MIT"
] | null | null | null | 004 Sons/afinacao.py | yamadathamine/300ideiasparaprogramarPython | 331a063bbf8bcd117ae5a34324b8176a6014fc98 | [
"MIT"
] | 4 | 2020-06-09T19:10:04.000Z | 2020-06-17T18:23:47.000Z | 004 Sons/afinacao.py | yamadathamine/300ideiasparaprogramarPython | 331a063bbf8bcd117ae5a34324b8176a6014fc98 | [
"MIT"
] | null | null | null | # encoding: utf-8
# usando python 3
# Afinação - Alberto toca violão e é programador.
# Precisando afinar o violão e sem diapasão por perto,
# resolveu fazer um programa para ajudá-lo.
# O que ele queria era a nota Lá soando sem parar até que ele conseguisse afinar a
# respectiva corda do violão; as demais cordas ... | 35 | 88 | 0.735931 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 822 | 0.70437 |
95d0529ff78fe4e15217221008da8dabb874d847 | 138 | py | Python | python/flask-app/data.py | zkan/100DaysOfCode | 3c713ead94a9928e2d0f8d794e49ec202dc64ba3 | [
"MIT"
] | 2 | 2019-05-01T00:32:30.000Z | 2019-11-20T05:23:05.000Z | python/flask-app/data.py | zkan/100DaysOfCode | 3c713ead94a9928e2d0f8d794e49ec202dc64ba3 | [
"MIT"
] | 15 | 2020-09-05T18:35:04.000Z | 2022-03-11T23:44:47.000Z | python/flask-app/data.py | zkan/100DaysOfCode | 3c713ead94a9928e2d0f8d794e49ec202dc64ba3 | [
"MIT"
] | null | null | null | fav_beer = {'Julian': 'White Rabbit Dark Ale',
'Bob': 'Some sort of light beer I assume',
'Mike': 'Oregano Beer'}
| 34.5 | 54 | 0.550725 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.652174 |
95d185b829b29c3736cdbb9908672dc12ffef154 | 548 | py | Python | appengine/chrome_infra_packages/apps.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | 1 | 2018-01-02T05:47:07.000Z | 2018-01-02T05:47:07.000Z | appengine/chrome_infra_packages/apps.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | appengine/chrome_infra_packages/apps.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2014 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.
"""Actual WSGI app instantiations used from app.yaml.
Extracted to a separate module to avoid calling 'initialize' in unit tests
during module loading time.... | 28.842105 | 74 | 0.810219 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 320 | 0.583942 |
95d4bf219897990197feea13feb7cf1258d214c8 | 6,298 | py | Python | yadlt/core/layers.py | Perfect-SoftwareEngineer/Deep-Learning-Tensorflow | b191cd2c8ff9d8cb6e2c6dedcac4483fa7548366 | [
"MIT"
] | null | null | null | yadlt/core/layers.py | Perfect-SoftwareEngineer/Deep-Learning-Tensorflow | b191cd2c8ff9d8cb6e2c6dedcac4483fa7548366 | [
"MIT"
] | null | null | null | yadlt/core/layers.py | Perfect-SoftwareEngineer/Deep-Learning-Tensorflow | b191cd2c8ff9d8cb6e2c6dedcac4483fa7548366 | [
"MIT"
] | null | null | null | """Layer classes."""
from __future__ import absolute_import
import abc
import six
import tensorflow as tf
@six.add_metaclass(abc.ABCMeta)
class BaseLayer(object):
"""Base layer interface."""
@abc.abstractmethod
def forward(self):
"""Layer forward propagation."""
pass
@abc.abstractm... | 28.497738 | 77 | 0.563671 | 6,140 | 0.974913 | 0 | 0 | 509 | 0.080819 | 0 | 0 | 1,531 | 0.243093 |
95d7f54672f221417081565b033268249f18412b | 835 | py | Python | tests/test_modules/test_builtin/test_grouppart.py | MattTaylorDLS/pymalcolm | 995a8e4729bd745f8f617969111cc5a34ce1ac14 | [
"Apache-2.0"
] | null | null | null | tests/test_modules/test_builtin/test_grouppart.py | MattTaylorDLS/pymalcolm | 995a8e4729bd745f8f617969111cc5a34ce1ac14 | [
"Apache-2.0"
] | null | null | null | tests/test_modules/test_builtin/test_grouppart.py | MattTaylorDLS/pymalcolm | 995a8e4729bd745f8f617969111cc5a34ce1ac14 | [
"Apache-2.0"
] | null | null | null | import unittest
from malcolm.core import call_with_params
from malcolm.modules.builtin.parts import GroupPart
class TestGroupPart(unittest.TestCase):
def setUp(self):
self.o = call_with_params(
GroupPart, name="things", description="A group of things")
self.setter = list(self.o.creat... | 32.115385 | 70 | 0.653892 | 721 | 0.863473 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.159281 |
95d8eae1e421c5a5d85e31ca5953813a5295d371 | 512 | py | Python | ok2_backend/common/utils.py | Mipsters/ok2-backend | 50ddbb44262749d731f4e923add205541254223d | [
"MIT"
] | 1 | 2020-02-10T17:53:58.000Z | 2020-02-10T17:53:58.000Z | ok2_backend/common/utils.py | Mipsters/ok2-backend | 50ddbb44262749d731f4e923add205541254223d | [
"MIT"
] | 6 | 2020-01-06T19:37:12.000Z | 2021-09-22T18:03:31.000Z | ok2_backend/common/utils.py | Mipsters/ok2-backend | 50ddbb44262749d731f4e923add205541254223d | [
"MIT"
] | 5 | 2019-11-18T17:39:29.000Z | 2020-07-31T16:00:21.000Z | import os
from jose import jwt
from datetime import datetime, timedelta
JWT_SECRET = 'secret'
JWT_ALGORITHM = 'HS256'
JWT_EXP_DELTA_SECONDS = 31556952 # year
def get_token(request):
return jwt.decode(request.headers.get('Authorization'), os.environ['JWT_SECRET'])
def create_token(user_id):
payload = {
... | 23.272727 | 85 | 0.722656 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.121094 |
95da8c78112cb6f44e754d89ffd5c8e26c67e104 | 1,238 | py | Python | backend/ai4all_api/models.py | kevromster/ai4all | 39da1a95c4e06780f5712bb6e6ecb1f570e5d639 | [
"Apache-2.0"
] | null | null | null | backend/ai4all_api/models.py | kevromster/ai4all | 39da1a95c4e06780f5712bb6e6ecb1f570e5d639 | [
"Apache-2.0"
] | null | null | null | backend/ai4all_api/models.py | kevromster/ai4all | 39da1a95c4e06780f5712bb6e6ecb1f570e5d639 | [
"Apache-2.0"
] | null | null | null | import os
from django.db import models
from ai4all_api.detection_items import DETECTION_ITEMS
from ai4all_api.notification_types import NOTIFICATION_TYPES
class SubmitCameraItem(models.Model):
date_created = models.DateTimeField(auto_now_add=True)
tg_chat_id = models.BigIntegerField()
name = models.Char... | 35.371429 | 86 | 0.757674 | 1,078 | 0.870759 | 0 | 0 | 0 | 0 | 0 | 0 | 167 | 0.134895 |
95dba8c035cf85f4ef8f4bc3e7a7c14c268076f1 | 1,797 | py | Python | engine/src/valet/engine/search/filters/cpu_filter.py | onap/optf-fgps | 1494071d0329698297c5d78ee0799dbff0b57e43 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | engine/src/valet/engine/search/filters/cpu_filter.py | onap/optf-fgps | 1494071d0329698297c5d78ee0799dbff0b57e43 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | engine/src/valet/engine/search/filters/cpu_filter.py | onap/optf-fgps | 1494071d0329698297c5d78ee0799dbff0b57e43 | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2021-10-15T18:54:03.000Z | 2021-10-15T18:54:03.000Z | #
# -------------------------------------------------------------------------
# Copyright (c) 2019 AT&T Intellectual Property
#
# 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
#
# ... | 30.982759 | 76 | 0.606566 | 1,024 | 0.569839 | 0 | 0 | 0 | 0 | 0 | 0 | 987 | 0.549249 |
95e0d6973a04cf649a738acb651bea0fa6b7dfcd | 996 | py | Python | Inflearn_SungKim/3.MultiVariableLinearRegression/multi-variableLinearregression.py | shinhaha/tensorflow | 4647017a727985d64c5b0addee92f0ec516952c1 | [
"MIT"
] | null | null | null | Inflearn_SungKim/3.MultiVariableLinearRegression/multi-variableLinearregression.py | shinhaha/tensorflow | 4647017a727985d64c5b0addee92f0ec516952c1 | [
"MIT"
] | null | null | null | Inflearn_SungKim/3.MultiVariableLinearRegression/multi-variableLinearregression.py | shinhaha/tensorflow | 4647017a727985d64c5b0addee92f0ec516952c1 | [
"MIT"
] | null | null | null | import tensorflow as tf
x1_data=[73.,93.,89.,96.,73.]
x2_data=[80.,88.,91.,98.,66.]
x3_data=[75.,93.,90.,100.,70.]
y_data=[152.,185.,180.,196.,142.]
x1=tf.placeholder(tf.float32)
x2=tf.placeholder(tf.float32)
x3=tf.placeholder(tf.float32)
Y=tf.placeholder(tf.float32)
w1=tf.Variable(tf.random_normal([1]),name='weight... | 32.129032 | 85 | 0.712851 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.090361 |
95e18e6281085104769aa15c1a8ef9828b449526 | 1,759 | py | Python | train_model.py | sanjjayrj/Chatbot-NLTK | 2000a3c640d6624984ca4ad2457557e937d4ae05 | [
"MIT"
] | 3 | 2020-11-17T12:14:37.000Z | 2021-08-14T05:46:38.000Z | train_model.py | sanjjayrj/Chatbot-NLTK | 2000a3c640d6624984ca4ad2457557e937d4ae05 | [
"MIT"
] | null | null | null | train_model.py | sanjjayrj/Chatbot-NLTK | 2000a3c640d6624984ca4ad2457557e937d4ae05 | [
"MIT"
] | null | null | null | import pandas as pd
import nltk
import re
from nltk.stem import wordnet
from nltk import pos_tag
from nltk import word_tokenize
from datetime import datetime
data = pd.read_csv('traindata.csv', encoding='utf-8')
train_counter = 0
def text_normalize(text):
global train_counter
if train_counter % 10000 == 0:
... | 37.425532 | 119 | 0.557703 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 494 | 0.280841 |
95e2b38a9c011b08bb379e05752137d534a0a8a9 | 1,848 | py | Python | tensor_twister/server.py | iamorphen/tensor_twister | d7936efa50cf0f7f3950ff4cbb0dd3fbac310ca9 | [
"MIT"
] | null | null | null | tensor_twister/server.py | iamorphen/tensor_twister | d7936efa50cf0f7f3950ff4cbb0dd3fbac310ca9 | [
"MIT"
] | null | null | null | tensor_twister/server.py | iamorphen/tensor_twister | d7936efa50cf0f7f3950ff4cbb0dd3fbac310ca9 | [
"MIT"
] | null | null | null | import io
import logging
import queue
from collections import namedtuple
import torch
import zmq
from tensor_twister.status_codes import StatusCode
UnpackedMessage = namedtuple("UnpackedMessage", ["tensor", "name", "ip"])
def serve(host: str, port: int):
"""
Listen for incoming tensor data from clients. P... | 33 | 120 | 0.635281 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 766 | 0.414502 |
95e39518b618f5551cfe1c882c8f307a7a86e276 | 6,744 | py | Python | optunity/solvers/CMAES.py | xrounder/optunity | 019182ca83fe2002083cc1ac938510cb967fd2c9 | [
"BSD-3-Clause"
] | 401 | 2015-01-08T00:56:20.000Z | 2022-03-19T09:07:12.000Z | optunity/solvers/CMAES.py | xrounder/optunity | 019182ca83fe2002083cc1ac938510cb967fd2c9 | [
"BSD-3-Clause"
] | 67 | 2015-01-08T09:13:20.000Z | 2022-01-05T23:26:36.000Z | optunity/solvers/CMAES.py | xrounder/optunity | 019182ca83fe2002083cc1ac938510cb967fd2c9 | [
"BSD-3-Clause"
] | 94 | 2015-02-04T08:35:56.000Z | 2021-10-03T12:40:35.000Z | #! /usr/bin/env python
# Copyright (c) 2014 KU Leuven, ESAT-STADIUS
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notic... | 36.852459 | 144 | 0.631821 | 3,576 | 0.530249 | 0 | 0 | 2,606 | 0.386418 | 0 | 0 | 3,373 | 0.500148 |
95e555ee7266bd7c5e0f103c5c42eba12b36c67d | 622 | py | Python | DailyCoding/11.py | jason71319jason/Interview-solved | 42ca93a68475952753d185c325cb55c79e2e55e1 | [
"MIT"
] | 46 | 2019-10-14T01:21:35.000Z | 2022-01-08T23:55:15.000Z | DailyCoding/11.py | jason71319jason/Interview-solved | 42ca93a68475952753d185c325cb55c79e2e55e1 | [
"MIT"
] | 53 | 2019-10-03T17:16:43.000Z | 2020-12-08T12:48:19.000Z | DailyCoding/11.py | jason71319jason/Interview-solved | 42ca93a68475952753d185c325cb55c79e2e55e1 | [
"MIT"
] | 96 | 2019-10-03T18:12:10.000Z | 2021-03-14T19:41:06.000Z | """
This problem was asked by Twitter.
Implement an autocomplete system. That is, given a query string s and a set of all possible query strings, return all strings in the set that have s as a prefix.
For example, given the query string de and the set of strings [dog, deer, deal], return [deer, deal].
Hint: Try prep... | 28.272727 | 161 | 0.705788 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 429 | 0.689711 |
95e79ef92334e9854cdc295c02dc16e232f812ed | 4,974 | py | Python | pyblnet/blnet_parser.py | henfri/pyblnet | 0a3a59ea39ab569d4b59be5a918736dc238bcf13 | [
"MIT"
] | 3 | 2019-03-11T12:38:43.000Z | 2022-02-18T21:40:54.000Z | pyblnet/blnet_parser.py | henfri/pyblnet | 0a3a59ea39ab569d4b59be5a918736dc238bcf13 | [
"MIT"
] | 26 | 2018-10-15T10:57:21.000Z | 2021-03-23T18:35:06.000Z | pyblnet/blnet_parser.py | henfri/pyblnet | 0a3a59ea39ab569d4b59be5a918736dc238bcf13 | [
"MIT"
] | 7 | 2018-10-03T09:39:30.000Z | 2020-03-12T19:44:44.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on 09.08.2018
This is basically a python port of of a script by berwinter
https://github.com/berwinter/uvr1611/blob/master/lib/backend/blnet-connection.inc.php
author: Niels
"""
import struct
from datetime import datetime
# Parser constant
# 1 bit
DIGITAL_ON ... | 29.784431 | 85 | 0.559912 | 4,274 | 0.859268 | 0 | 0 | 0 | 0 | 0 | 0 | 1,190 | 0.239244 |
95e8a73a4c141ad9d18c2ea514ffb13b8b700b03 | 3,568 | py | Python | app/routers/nodes.py | yamatteo/vue-fastapi-boilerplate | 5fa3de29a6e7ec4a8df9b3a4073f462307f62cb6 | [
"MIT"
] | 2 | 2020-03-11T02:58:44.000Z | 2020-03-27T16:00:25.000Z | app/routers/nodes.py | yamatteo/vue-fastapi-boilerplate | 5fa3de29a6e7ec4a8df9b3a4073f462307f62cb6 | [
"MIT"
] | 7 | 2021-03-10T07:59:29.000Z | 2022-02-26T23:46:17.000Z | app/routers/nodes.py | yamatteo/vue-fastapi-boilerplate | 5fa3de29a6e7ec4a8df9b3a4073f462307f62cb6 | [
"MIT"
] | 1 | 2020-03-11T02:58:48.000Z | 2020-03-11T02:58:48.000Z | from typing import Optional
from typing import List
from fastapi import APIRouter, Depends, Body
from models import User, Content, Node, Group, ExternalContent
from routers import get_current_user, admin_only
from schemas import NodeAdd, NodeEdit, NodeFind
#
router = APIRouter()
@router.post("/push_content")
async... | 37.166667 | 121 | 0.690583 | 0 | 0 | 0 | 0 | 3,255 | 0.912276 | 2,800 | 0.784753 | 276 | 0.077354 |
95ea2d544465e77e80dcc38902724b81ddc4c5b9 | 2,427 | py | Python | Algebra/vector.py | jonasjungaker/VectorsAlgebra | 1b064b4328b7eb6a3c7a1c50b29e6df042309ca5 | [
"MIT"
] | null | null | null | Algebra/vector.py | jonasjungaker/VectorsAlgebra | 1b064b4328b7eb6a3c7a1c50b29e6df042309ca5 | [
"MIT"
] | null | null | null | Algebra/vector.py | jonasjungaker/VectorsAlgebra | 1b064b4328b7eb6a3c7a1c50b29e6df042309ca5 | [
"MIT"
] | null | null | null | class vector:
def __init__(self, *vals):
self.x = list(vals)
for val in vals:
float(val)
self.dimension = len(self.x)
def __getitem__(self, key):
return self.x[key]
def __setitem__(self, key, value):
self.x[key] = value
return self
... | 29.240964 | 87 | 0.510507 | 2,417 | 0.99588 | 0 | 0 | 0 | 0 | 0 | 0 | 176 | 0.072518 |
95eaee2ff327784e0d2a6285027d63a294194fa5 | 283 | py | Python | Programming_Maester/Phoneketmon.py | Mayner0220/Programmers | 42e4783a526506fb7d8208841a76201909ed5c5c | [
"Apache-2.0"
] | 1 | 2021-04-01T06:19:02.000Z | 2021-04-01T06:19:02.000Z | Programming_Maester/Phoneketmon.py | Mayner0220/Programmers | 42e4783a526506fb7d8208841a76201909ed5c5c | [
"Apache-2.0"
] | null | null | null | Programming_Maester/Phoneketmon.py | Mayner0220/Programmers | 42e4783a526506fb7d8208841a76201909ed5c5c | [
"Apache-2.0"
] | null | null | null | # https://programmers.co.kr/learn/courses/30/lessons/1845
def solution(nums):
if len(set(nums)) <= len(nums)/2:
return int(len(set(nums)))
else:
return int(len(nums)/2)
print(solution([3,1,2,3]))
print(solution([3,3,3,2,2,4]))
print(solution([3,3,3,2,2,2])) | 25.727273 | 57 | 0.618375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.201413 |
95ec274e03ce16625cb08ace26548a81e6d7c252 | 3,903 | py | Python | ooobuild/lo/xml/crypto/sax/xsax_event_keeper.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/xml/crypto/sax/xsax_event_keeper.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/xml/crypto/sax/xsax_event_keeper.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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... | 37.171429 | 206 | 0.688189 | 2,799 | 0.717141 | 0 | 0 | 1,952 | 0.500128 | 0 | 0 | 2,657 | 0.680758 |
95ed4a727fcf9707dcfd7fa3fc1e4e7848fbb44c | 992 | py | Python | neodroidagent/common/session_factory/vertical/procedures/training/sampling/rollout.py | gitter-badger/agent | 3f53eaa7ebdee3ab423c7b58785d584fe1a6ae11 | [
"Apache-2.0"
] | 8 | 2017-09-13T08:28:44.000Z | 2022-01-21T15:59:19.000Z | neodroidagent/common/session_factory/vertical/procedures/training/sampling/rollout.py | gitter-badger/agent | 3f53eaa7ebdee3ab423c7b58785d584fe1a6ae11 | [
"Apache-2.0"
] | 4 | 2019-03-22T13:49:16.000Z | 2019-03-25T13:49:39.000Z | neodroidagent/common/session_factory/vertical/procedures/training/sampling/rollout.py | gitter-badger/agent | 3f53eaa7ebdee3ab423c7b58785d584fe1a6ae11 | [
"Apache-2.0"
] | 3 | 2017-09-13T08:31:38.000Z | 2021-11-09T11:22:27.000Z | from itertools import count
from tqdm import tqdm
from neodroid.environments.droid_environment import VectorUnityEnvironment
def run(self, environment: VectorUnityEnvironment, render: bool = True) -> None:
state = environment.reset().observables
F = count(1)
F = tqdm(F, leave=False, disable=not render)... | 26.810811 | 82 | 0.626008 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.040323 |
95eef20a68a045c35b991c4b9eef565e70a03766 | 17,995 | py | Python | sysevr/slicer/mapping.py | Saleh-Ibtasham/VulScrape | 738d17e9dd7e5edc2341d106361651fd28f99c61 | [
"PostgreSQL",
"Unlicense",
"MIT"
] | 1 | 2021-04-12T12:59:33.000Z | 2021-04-12T12:59:33.000Z | sysevr/slicer/mapping.py | Jokers-grin/VulScrape | 738d17e9dd7e5edc2341d106361651fd28f99c61 | [
"PostgreSQL",
"Unlicense",
"MIT"
] | null | null | null | sysevr/slicer/mapping.py | Jokers-grin/VulScrape | 738d17e9dd7e5edc2341d106361651fd28f99c61 | [
"PostgreSQL",
"Unlicense",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import re
import copy
import os
import string
import xlrd
import pickle
from .get_tokens import *
keywords_0 = ('auto', 'typedf', 'const', 'extern', 'register', 'static', 'volatile', 'continue', 'break',
'default', 'return', 'goto', 'else', 'case')
keywords_1 = ('catch', 'sizeof... | 38.866091 | 160 | 0.373159 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,748 | 0.152709 |
95ef3fa428d1d310cb953139858993824869ba27 | 1,929 | py | Python | Flatipie/widgets/cards.py | zenqiwp/Flatipie | 441b1f120d78ec072b86d1c95b381e85fbe7661d | [
"MIT"
] | 11 | 2020-11-12T08:07:56.000Z | 2021-04-27T01:42:30.000Z | Flatipie/widgets/cards.py | zenqiwp/Flatipie | 441b1f120d78ec072b86d1c95b381e85fbe7661d | [
"MIT"
] | null | null | null | Flatipie/widgets/cards.py | zenqiwp/Flatipie | 441b1f120d78ec072b86d1c95b381e85fbe7661d | [
"MIT"
] | 2 | 2020-11-12T07:08:27.000Z | 2020-11-12T08:07:58.000Z |
"""
Copyright (c) 2020 Flatipie
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, modify, merge... | 37.096154 | 79 | 0.709176 | 684 | 0.354588 | 0 | 0 | 67 | 0.034733 | 0 | 0 | 1,099 | 0.569725 |
95ef71f8c3f9102a164ab9d3fc0c343aa7cbaaa5 | 7,035 | py | Python | lib/datasets/vrd/to_pascal_format.py | sx14/open-relation.pytorch | 3fe52a0c6129a80abbc84df53903d13b7dea05d6 | [
"MIT"
] | 2 | 2019-04-21T01:45:01.000Z | 2020-03-11T07:09:18.000Z | lib/datasets/vrd/to_pascal_format.py | sx14/open-relation.pytorch | 3fe52a0c6129a80abbc84df53903d13b7dea05d6 | [
"MIT"
] | null | null | null | lib/datasets/vrd/to_pascal_format.py | sx14/open-relation.pytorch | 3fe52a0c6129a80abbc84df53903d13b7dea05d6 | [
"MIT"
] | null | null | null | import os
import shutil
import xml.dom.minidom
def output_pascal_format(mid_data, output_path):
# mid_data:
# filename
# width
# height
# depth
# objects
# -- xmin
# -- ymin
# -- xmax
# -- ymax
# -- name
# -- pose
# -- truncated
# -- difficult
... | 45.980392 | 87 | 0.729495 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 972 | 0.138166 |
95f03d2ec095743360ac14d2a11b057617f86d87 | 4,880 | py | Python | stellar/cognition/planning.py | strfx/stellar | 41b190eed016d2d6ad8548490a0c9620a02d711e | [
"MIT"
] | null | null | null | stellar/cognition/planning.py | strfx/stellar | 41b190eed016d2d6ad8548490a0c9620a02d711e | [
"MIT"
] | null | null | null | stellar/cognition/planning.py | strfx/stellar | 41b190eed016d2d6ad8548490a0c9620a02d711e | [
"MIT"
] | null | null | null | """
Contains path planning logic.
"""
import math
import numpy as np
from heapq import heappush, heappop
def heuristics(a, b):
"""Heuristics function using the Euclidian Distance."""
weight = 1.0
x1, y1 = a
x2, y2 = b
distance = np.sqrt(np.square(x2-x1) + np.square(y2-y1))
# distance = math.... | 28.87574 | 92 | 0.527664 | 3,974 | 0.814344 | 0 | 0 | 0 | 0 | 0 | 0 | 1,042 | 0.213525 |
95f0995fad2f82fbbbdccca26aa5605a1c0767e1 | 84 | py | Python | libcity/model/traffic_od_prediction/__init__.py | LibCity/Bigscity-LibCity-Docs-zh_CN | 2be639c3fe7d75727ade18f473d6f625900f73f2 | [
"Apache-2.0"
] | 5 | 2021-09-28T12:32:50.000Z | 2022-02-03T09:04:35.000Z | libcity/model/traffic_od_prediction/__init__.py | aptx1231/Bigscity-TrafficDL-Docs-zh_CN | 2be639c3fe7d75727ade18f473d6f625900f73f2 | [
"Apache-2.0"
] | null | null | null | libcity/model/traffic_od_prediction/__init__.py | aptx1231/Bigscity-TrafficDL-Docs-zh_CN | 2be639c3fe7d75727ade18f473d6f625900f73f2 | [
"Apache-2.0"
] | 1 | 2021-12-16T05:10:35.000Z | 2021-12-16T05:10:35.000Z | from libcity.model.traffic_od_prediction.GEML import GEML
__all__ = [
"GEML"
]
| 14 | 57 | 0.738095 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.071429 |
95f29beeb0a5add129f6eb5d02625efa724d1d4e | 699 | py | Python | core/migrations/0008_auto_20151203_1519.py | rafaelbantu/timtec | 86c51b7440a044704ed33c3e752a6cf6b15ceae3 | [
"BSD-3-Clause"
] | 21 | 2015-09-23T14:07:16.000Z | 2022-02-18T01:35:18.000Z | core/migrations/0008_auto_20151203_1519.py | rafaelbantu/timtec | 86c51b7440a044704ed33c3e752a6cf6b15ceae3 | [
"BSD-3-Clause"
] | 178 | 2016-05-10T16:16:19.000Z | 2021-12-15T20:21:21.000Z | core/migrations/0008_auto_20151203_1519.py | rafaelbantu/timtec | 86c51b7440a044704ed33c3e752a6cf6b15ceae3 | [
"BSD-3-Clause"
] | 18 | 2015-10-23T13:28:17.000Z | 2021-09-22T13:08:28.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0007_auto_20151202_1434'),
]
operations = [
migrations.AddField(
model_name='certificationprocess',
... | 27.96 | 132 | 0.635193 | 590 | 0.844063 | 0 | 0 | 0 | 0 | 0 | 0 | 186 | 0.266094 |
95f38c9fc1b89ab08b48f547bb8603c9adde90bb | 628 | py | Python | hipshare/lib/util.py | erg0dic/hipshare | 993f0edee7e9156b7154d578ef6a4e50cfcdd632 | [
"BSD-2-Clause"
] | 1 | 2015-11-03T19:33:44.000Z | 2015-11-03T19:33:44.000Z | hipshare/lib/util.py | erg0dic/hipshare | 993f0edee7e9156b7154d578ef6a4e50cfcdd632 | [
"BSD-2-Clause"
] | 1 | 2015-11-03T19:35:19.000Z | 2015-11-03T19:35:19.000Z | hipshare/lib/util.py | erg0dic/hipshare | 993f0edee7e9156b7154d578ef6a4e50cfcdd632 | [
"BSD-2-Clause"
] | null | null | null | import json
import logging
import sys
log = logging.getLogger(__name__)
def die(s):
log.error(s)
sys.exit(-1)
def load_json(path):
try:
fp = open(path)
except OSError as err:
die("Could not open {}: {}".format(path, str(err)))
try:
value = json.load(fp)
except ValueEr... | 17.942857 | 60 | 0.598726 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 0.119427 |
95f41e13e20cbb1290f9018c568b80de61a76953 | 95 | py | Python | vistrails/tests/resources/test_upgrades_layout/__init__.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 83 | 2015-01-05T14:50:50.000Z | 2021-09-17T19:45:26.000Z | vistrails/tests/resources/test_upgrades_layout/__init__.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 254 | 2015-01-02T20:39:19.000Z | 2018-11-28T17:16:44.000Z | vistrails/tests/resources/test_upgrades_layout/__init__.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 40 | 2015-04-17T16:46:36.000Z | 2021-09-28T22:43:24.000Z | identifier = 'org.vistrails.test.upgrades_layout'
name ='test_upgrades_layout'
version = '0.3'
| 23.75 | 49 | 0.778947 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 0.663158 |
95f557240d66982761b806e370f3acd7dca5c78f | 480 | py | Python | python_tips_three.py | obetron/python_tips | 9b6299db4f9dbc51638bba310deaf0c1dec759fe | [
"MIT"
] | null | null | null | python_tips_three.py | obetron/python_tips | 9b6299db4f9dbc51638bba310deaf0c1dec759fe | [
"MIT"
] | null | null | null | python_tips_three.py | obetron/python_tips | 9b6299db4f9dbc51638bba310deaf0c1dec759fe | [
"MIT"
] | null | null | null |
#for all read file code at the end of the code file should closed.
f = open('test.txt', 'r')
file_contents = f.read()
f.close()
words = file_contents.split(' ')
word_count = len(words)
print(word_count)
"""
OUTPUT:
3
"""
#for all the time use a file closing it is became a big job.
with open('test.txt', 'r') as f:
... | 17.777778 | 66 | 0.675 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 226 | 0.470833 |
95f79173711e478161ccc6939dc1c76c706f0ae5 | 1,192 | py | Python | albert/helper.py | vvvm23/albert | 548fa03832f7e64ab79f2dfa16aa5ac42469333d | [
"MIT"
] | 1 | 2021-06-10T10:54:59.000Z | 2021-06-10T10:54:59.000Z | albert/helper.py | vvvm23/albert | 548fa03832f7e64ab79f2dfa16aa5ac42469333d | [
"MIT"
] | null | null | null | albert/helper.py | vvvm23/albert | 548fa03832f7e64ab79f2dfa16aa5ac42469333d | [
"MIT"
] | null | null | null | import torch
from einops import rearrange
"""
@openai - VD-VAE
https://github.com/openai/vdvae/blob/main/vae_helpers.py
Nice helper module as calling super.__init__() gets annoying
"""
class HelperModule(torch.nn.Module):
def __init__(self, *args, **kwargs):
super().__init__()
self.bui... | 27.090909 | 100 | 0.613255 | 213 | 0.178691 | 0 | 0 | 0 | 0 | 0 | 0 | 346 | 0.290268 |
95f8d504586e0cc5968ca2a0c621d00c07ae2c40 | 2,078 | py | Python | p2_mahjong/utils.py | yata0/Mahjong | 764cd607df715b879f3f8a54b6def55e0b7d4706 | [
"MIT"
] | null | null | null | p2_mahjong/utils.py | yata0/Mahjong | 764cd607df715b879f3f8a54b6def55e0b7d4706 | [
"MIT"
] | null | null | null | p2_mahjong/utils.py | yata0/Mahjong | 764cd607df715b879f3f8a54b6def55e0b7d4706 | [
"MIT"
] | null | null | null | # coding=utf-8
import sys
import numpy as np
from p2_mahjong.card import MahjongCard as Card
log_head = "utils.py"
CARD_USED_TYPE = ['characters', 'green', 'red', 'white', 'east', 'west', 'north', 'south',
'spring', 'summer', 'autumn', 'winter', 'mei', 'lan', 'zhu', 'ju']
card_encoding_dict = {}
card... | 29.685714 | 90 | 0.590472 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 354 | 0.170356 |
95fa5390eed432169e5e44214698604b6c85fcde | 1,062 | py | Python | Chapter 01/int_sqrt.py | bpbpublications/Python-Quick-Interview-Guide | ab4ff3e670b116a4db6b9e1f0ccba8424640704d | [
"MIT"
] | 1 | 2021-05-14T19:53:41.000Z | 2021-05-14T19:53:41.000Z | Chapter 01/int_sqrt.py | bpbpublications/Python-Quick-Interview-Guide | ab4ff3e670b116a4db6b9e1f0ccba8424640704d | [
"MIT"
] | null | null | null | Chapter 01/int_sqrt.py | bpbpublications/Python-Quick-Interview-Guide | ab4ff3e670b116a4db6b9e1f0ccba8424640704d | [
"MIT"
] | null | null | null |
class Solution:
def mySqrt(self, x: int) -> int:
# Base cases
if (x == 0 or x == 1):
return x
# Staring from 1, try all numbers until
# i*i remains less than to x.
i = 1
while (i*i < x):i += 1
return i if i*i == x else i-1
'''
cla... | 24.136364 | 62 | 0.415254 | 308 | 0.290019 | 0 | 0 | 0 | 0 | 0 | 0 | 765 | 0.720339 |
95ff75475d347ef322808cfa526e253df07b5f81 | 13,517 | py | Python | meg_runtime/ui/manager.py | MultimediaExtensibleGit/Runtime | ba2e469666163177034e44077b02378dfc6649c9 | [
"MIT"
] | null | null | null | meg_runtime/ui/manager.py | MultimediaExtensibleGit/Runtime | ba2e469666163177034e44077b02378dfc6649c9 | [
"MIT"
] | 5 | 2020-03-24T19:59:38.000Z | 2020-04-22T03:44:43.000Z | meg_runtime/ui/manager.py | MultimediaExtensibleGit/Runtime | ba2e469666163177034e44077b02378dfc6649c9 | [
"MIT"
] | 2 | 2020-03-13T18:35:46.000Z | 2020-04-11T20:19:20.000Z | """MEG UI Manager
"""
import pkg_resources
from PyQt5 import QtCore, QtWidgets, QtGui, uic
from meg_runtime.config import Config
from meg_runtime.logger import Logger
from meg_runtime.app import App
class UIManager(QtWidgets.QMainWindow):
"""Main UI manager for the MEG system."""
UI_FILE = 'mainwindow.ui'
... | 41.719136 | 134 | 0.600059 | 13,314 | 0.984982 | 0 | 0 | 0 | 0 | 0 | 0 | 3,431 | 0.253829 |
95ffe673bc040b87ba5fb46405be623006c98d02 | 1,459 | py | Python | tests/scripts/test_s_rs_raw_shapes.py | nismod/energy_demand | 247fcea074a846026710ed9b039b22f8b9835643 | [
"MIT"
] | 14 | 2018-02-23T10:03:45.000Z | 2022-03-03T13:59:30.000Z | tests/scripts/test_s_rs_raw_shapes.py | nismod/energy_demand | 247fcea074a846026710ed9b039b22f8b9835643 | [
"MIT"
] | 59 | 2017-02-22T15:03:30.000Z | 2020-12-16T12:26:17.000Z | tests/scripts/test_s_rs_raw_shapes.py | nismod/energy_demand | 247fcea074a846026710ed9b039b22f8b9835643 | [
"MIT"
] | 5 | 2017-08-22T11:31:42.000Z | 2020-06-24T18:30:12.000Z | """testing
"""
from energy_demand.scripts import s_rs_raw_shapes
import numpy as np
def test_assign_hes_data_to_year():
hes_data = {
'working_day': {
0: np.zeros((24, 2)) + 10,
1: np.zeros((24, 2)) + 20,
2: np.zeros((24, 2)) + 30,
3: np.zeros((24, 2)) + 40, ... | 31.717391 | 70 | 0.437286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 142 | 0.097327 |
2501aa9e0452052b19ad9fe91a29c5a969b9d03e | 1,935 | py | Python | release/davis16/evaluate.py | MSiam/segment-any-moving | 82cb782867d866d2f4eb68230edb75f613e15a02 | [
"Apache-2.0"
] | 70 | 2019-09-16T17:55:55.000Z | 2022-03-07T00:26:53.000Z | release/davis16/evaluate.py | MSiam/segment-any-moving | 82cb782867d866d2f4eb68230edb75f613e15a02 | [
"Apache-2.0"
] | 9 | 2019-09-30T09:15:11.000Z | 2021-07-21T11:33:13.000Z | release/davis16/evaluate.py | MSiam/segment-any-moving | 82cb782867d866d2f4eb68230edb75f613e15a02 | [
"Apache-2.0"
] | 5 | 2019-09-25T05:14:37.000Z | 2021-07-08T20:13:47.000Z | import argparse
import logging
import yaml
from pathlib import Path
from script_utils.common import common_setup
from release.davis16.compute_flow import link_splits
from release.helpers.misc import msg, subprocess_call
def check_tracks(track_output, splits):
for split in splits:
np_dir = track_output /... | 31.209677 | 74 | 0.632041 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 501 | 0.258915 |
2503cb791f9ad674e778396da993788db1fa44bb | 4,712 | py | Python | qq/mention.py | foxwhite25/qq.py | 92e744205e57b4c8922aa5843095ae900b3c1d84 | [
"MIT"
] | 40 | 2021-12-07T02:18:14.000Z | 2022-03-28T13:14:16.000Z | qq/mention.py | foxwhite25/qq.py | 92e744205e57b4c8922aa5843095ae900b3c1d84 | [
"MIT"
] | 2 | 2021-12-12T17:34:29.000Z | 2021-12-17T04:43:03.000Z | qq/mention.py | foxwhite25/qq.py | 92e744205e57b4c8922aa5843095ae900b3c1d84 | [
"MIT"
] | 5 | 2021-12-10T11:17:41.000Z | 2022-03-05T13:53:50.000Z | # The MIT License (MIT)
# Copyright (c) 2021-present foxwhite25
#
# 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, ... | 35.164179 | 102 | 0.655136 | 3,815 | 0.716836 | 0 | 0 | 473 | 0.088876 | 0 | 0 | 2,977 | 0.559376 |
2504849dd9ac056161c71352758bc395f3e09c7d | 6,395 | py | Python | cupcake/editor/autocomplete/itemkinds.py | billyeatcookies/cupcake | 2f2d1d5f8a1a454e50283547cf433cc82d1825d6 | [
"MIT"
] | 3 | 2022-03-29T12:55:24.000Z | 2022-03-30T17:06:11.000Z | cupcake/editor/autocomplete/itemkinds.py | billyeatcookies/Cupcake | 2f2d1d5f8a1a454e50283547cf433cc82d1825d6 | [
"MIT"
] | null | null | null | cupcake/editor/autocomplete/itemkinds.py | billyeatcookies/Cupcake | 2f2d1d5f8a1a454e50283547cf433cc82d1825d6 | [
"MIT"
] | null | null | null | import tkinter as tk
class Kinds:
def __init__(self, master, *args, **kwargs):
self.master = master
self.imethods = tk.PhotoImage(data="""iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAACXBIWXMAAA7DAAAOwwHHb6hk
AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAddJREFUKJGNkjFrk3EQxn/3vt... | 81.987179 | 120 | 0.854887 | 6,371 | 0.996247 | 0 | 0 | 0 | 0 | 0 | 0 | 5,885 | 0.92025 |
2505a01273ca3c6e0204f8f0d9964f3bd464761f | 1,125 | py | Python | register/migrations/0001_initial.py | duks500/Nilestone-Project | 6b45ac21f9d9e7a4839d6f616711cbe8daa6e051 | [
"bzip2-1.0.6"
] | null | null | null | register/migrations/0001_initial.py | duks500/Nilestone-Project | 6b45ac21f9d9e7a4839d6f616711cbe8daa6e051 | [
"bzip2-1.0.6"
] | null | null | null | register/migrations/0001_initial.py | duks500/Nilestone-Project | 6b45ac21f9d9e7a4839d6f616711cbe8daa6e051 | [
"bzip2-1.0.6"
] | null | null | null | # Generated by Django 3.0 on 2020-03-29 14:09
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
opera... | 37.5 | 165 | 0.623111 | 968 | 0.860444 | 0 | 0 | 0 | 0 | 0 | 0 | 186 | 0.165333 |
250a44eb50bdd484b59b76e217165e7deeb8a326 | 9,686 | py | Python | utils/iwr6843_utils/parse_tlv.py | ApocalyVec/mGesf | 21e0bf37a9d11a3cdde86a8d54e2f6c6a2211ab5 | [
"MIT"
] | 18 | 2020-06-02T11:21:47.000Z | 2022-03-25T08:16:57.000Z | utils/iwr6843_utils/parse_tlv.py | ApocalyVec/mGesf | 21e0bf37a9d11a3cdde86a8d54e2f6c6a2211ab5 | [
"MIT"
] | 4 | 2020-06-20T13:53:44.000Z | 2021-09-11T22:58:21.000Z | utils/iwr6843_utils/parse_tlv.py | ApocalyVec/mGesf | 21e0bf37a9d11a3cdde86a8d54e2f6c6a2211ab5 | [
"MIT"
] | 6 | 2020-04-23T21:30:17.000Z | 2021-08-03T19:59:12.000Z | import struct
import sys
import math
import numpy as np
#
# TODO 1: (NOW FIXED) Find the first occurrence of magic and start from there
# TODO 2: Warn if we cannot parse a specific section and try to recover
# TODO 3: Remove error at end of file if we have only fragment of TLV
#
def tlvHeaderDecode(data):
tlvT... | 39.056452 | 120 | 0.58218 | 64 | 0.006607 | 0 | 0 | 0 | 0 | 0 | 0 | 3,272 | 0.337807 |
250b9e3749e20788bc502eca2699fe190f414709 | 11,285 | py | Python | shape_generator/helpers.py | MarkusPic/SWMM_xsections_shape_generator | daf19c9508f3727e8cd12c450485f7f21f3e30ed | [
"MIT"
] | null | null | null | shape_generator/helpers.py | MarkusPic/SWMM_xsections_shape_generator | daf19c9508f3727e8cd12c450485f7f21f3e30ed | [
"MIT"
] | null | null | null | shape_generator/helpers.py | MarkusPic/SWMM_xsections_shape_generator | daf19c9508f3727e8cd12c450485f7f21f3e30ed | [
"MIT"
] | 1 | 2020-12-29T13:02:28.000Z | 2020-12-29T13:02:28.000Z | from io import StringIO
from os import path, listdir, remove
from math import radians, tan, cos, pi, atan, sin
from pandas import read_csv
import sympy as sy
import numpy as np
# these variables are used to solve symbolic mathematical equations
# x is the control variable over the height ... max(x) = H_cross_section
... | 25.823799 | 118 | 0.517767 | 6,767 | 0.599539 | 0 | 0 | 697 | 0.061752 | 0 | 0 | 4,738 | 0.419775 |
250eb809dd09ad7a9b6aa51c271e231f078546da | 1,772 | py | Python | bunq/sdk/util/util.py | mwiekens/sdk_python | 9333636083bc63dca4353e8f497588f57617efec | [
"MIT"
] | null | null | null | bunq/sdk/util/util.py | mwiekens/sdk_python | 9333636083bc63dca4353e8f497588f57617efec | [
"MIT"
] | null | null | null | bunq/sdk/util/util.py | mwiekens/sdk_python | 9333636083bc63dca4353e8f497588f57617efec | [
"MIT"
] | null | null | null | from __future__ import annotations
import json
import socket
import requests
from bunq.sdk.context.api_context import ApiContext, ApiEnvironmentType
from bunq.sdk.exception.bunq_exception import BunqException
from bunq.sdk.http.api_client import ApiClient
from bunq.sdk.model.generated import endpoint
from bunq.sdk.m... | 34.076923 | 79 | 0.744921 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 0.051919 |