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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f8bdfba3ce0bde25189979ebc289968a2512c766 | 1,400 | py | Python | util/plot_pbt.py | Linus4world/3D-MRI-style-transfer | 6747f0b235b8a6e773a941c222d594d9eedc6a35 | [
"BSD-3-Clause"
] | 1 | 2022-01-03T16:08:35.000Z | 2022-01-03T16:08:35.000Z | util/plot_PBT.py | Linus4world/mrs-gan | 64669251584a7421cce3a5173983a2275dcb438a | [
"BSD-2-Clause"
] | null | null | null | util/plot_PBT.py | Linus4world/mrs-gan | 64669251584a7421cce3a5173983a2275dcb438a | [
"BSD-2-Clause"
] | 1 | 2022-02-11T13:26:38.000Z | 2022-02-11T13:26:38.000Z | import math
import matplotlib.pyplot as plt
import json
import os
import warnings
warnings.filterwarnings("ignore")
def make_dataset(dir, file_ext=[]):
paths = []
assert os.path.exists(dir) and os.path.isdir(dir), '{} is not a valid directory'.format(dir)
for root, _, fnames in sorted(os.walk(dir)):
... | 31.111111 | 96 | 0.594286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 202 | 0.144286 |
f8bec2e6574c370927ccaaf8971ce34b58a52c44 | 497 | py | Python | Cap_9/ex9.23/ex9.23.py | gguilherme42/Livro-de-Python | 465a509d50476fd1a87239c71ed741639d58418b | [
"MIT"
] | 4 | 2020-04-07T00:38:46.000Z | 2022-03-10T03:34:42.000Z | Cap_9/ex9.23/ex9.23.py | gguilherme42/Livro-de-Python | 465a509d50476fd1a87239c71ed741639d58418b | [
"MIT"
] | null | null | null | Cap_9/ex9.23/ex9.23.py | gguilherme42/Livro-de-Python | 465a509d50476fd1a87239c71ed741639d58418b | [
"MIT"
] | 1 | 2021-04-22T02:45:38.000Z | 2021-04-22T02:45:38.000Z | import agenda23
agenda23.le('Agenda.txt')
while True:
opcao = agenda23.menu()
if opcao == 0:
break
elif opcao == 1:
agenda23.novo()
elif opcao == 2:
agenda23.altera()
elif opcao == 3:
agenda23.apaga()
elif opcao == 4:
agenda23.lista()
elif opcao == 5:... | 20.708333 | 50 | 0.539235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.1 |
f8bf2336876845664f66233eebc0fc4562e2c6e0 | 296 | py | Python | stock.py | lokesh-lraj/30-Day-LeetCoding-Challenge-april_2020 | 270e99be4a178587b2fc89113cdf3a931210e84f | [
"MIT"
] | 3 | 2020-04-18T09:03:21.000Z | 2020-04-18T09:03:25.000Z | stock.py | lokesh-lraj/30-Day-LeetCoding-Challenge-april_2020 | 270e99be4a178587b2fc89113cdf3a931210e84f | [
"MIT"
] | null | null | null | stock.py | lokesh-lraj/30-Day-LeetCoding-Challenge-april_2020 | 270e99be4a178587b2fc89113cdf3a931210e84f | [
"MIT"
] | null | null | null | def maxProfit(self, prices: List[int]) -> int:
with_stock = -2147483647
without_stock = 0
for stock in prices :
with_stock = max(with_stock, without_stock - stock)
without_stock = max(without_stock, with_stock + stock)
return without_stock
| 37 | 66 | 0.628378 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f8c2cf6aa69e132e2490580fb1e86b3b369033e8 | 192 | py | Python | src/qualtrutils/__init__.py | emanuele-albini/qualtrutils | 7f1fb08221edb220738445bf3e8a92a1a037bb76 | [
"MIT"
] | null | null | null | src/qualtrutils/__init__.py | emanuele-albini/qualtrutils | 7f1fb08221edb220738445bf3e8a92a1a037bb76 | [
"MIT"
] | null | null | null | src/qualtrutils/__init__.py | emanuele-albini/qualtrutils | 7f1fb08221edb220738445bf3e8a92a1a037bb76 | [
"MIT"
] | null | null | null | try:
import os
import pkg_resources # part of setuptools
__version__ = pkg_resources.get_distribution(os.path.dirname(__file__)).version
except:
pass
from .qualtrics import * | 24 | 83 | 0.744792 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 0.104167 |
f8c3a6ea72bf6a5606bd1c07a86991ac84f55edc | 97 | py | Python | image_web/image_app/apps.py | datasciencee/Image_web | 28d0d8a3006e64da05bb6ede03b037daaa2897b2 | [
"MIT"
] | null | null | null | image_web/image_app/apps.py | datasciencee/Image_web | 28d0d8a3006e64da05bb6ede03b037daaa2897b2 | [
"MIT"
] | null | null | null | image_web/image_app/apps.py | datasciencee/Image_web | 28d0d8a3006e64da05bb6ede03b037daaa2897b2 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class ImageAppConfig(AppConfig):
name = 'image_app'
| 16.166667 | 34 | 0.721649 | 56 | 0.57732 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.113402 |
f8c595e3b1f5711087075fef4510b16d73d51d2b | 9,650 | py | Python | pyramboia/tasks/views.py | bicofino/Pyramboia | 1c291b8fdc71f057a99e7ffbfaa8ba4e713346fd | [
"MIT"
] | 1 | 2016-03-09T13:40:06.000Z | 2016-03-09T13:40:06.000Z | pyramboia/tasks/views.py | bicofino/Pyramboia | 1c291b8fdc71f057a99e7ffbfaa8ba4e713346fd | [
"MIT"
] | null | null | null | pyramboia/tasks/views.py | bicofino/Pyramboia | 1c291b8fdc71f057a99e7ffbfaa8ba4e713346fd | [
"MIT"
] | 1 | 2018-03-24T18:03:09.000Z | 2018-03-24T18:03:09.000Z | import time
import requests
import xml.dom.minidom
from lxml import etree
from django.shortcuts import render
from django.http import HttpResponse
from django.contrib import messages
from django.core.urlresolvers import reverse_lazy
from django.views.generic import ListView, DetailView
from django.views.generic.edit im... | 31.129032 | 108 | 0.684249 | 5,411 | 0.560725 | 0 | 0 | 2,151 | 0.222902 | 0 | 0 | 1,090 | 0.112953 |
f8c5dfc6d0cdbf14f1da548855e712503b3de0e5 | 230 | py | Python | frameworks/MLNet/__init__.py | Ennosigaeon/automlbenchmark | bd3e529d641b64300a075d59408203d537311b7e | [
"MIT"
] | 282 | 2018-09-19T09:45:46.000Z | 2022-03-30T04:05:51.000Z | frameworks/MLNet/__init__.py | Ennosigaeon/automlbenchmark | bd3e529d641b64300a075d59408203d537311b7e | [
"MIT"
] | 267 | 2018-11-02T11:43:11.000Z | 2022-03-31T08:58:16.000Z | frameworks/MLNet/__init__.py | Ennosigaeon/automlbenchmark | bd3e529d641b64300a075d59408203d537311b7e | [
"MIT"
] | 104 | 2018-10-17T19:32:36.000Z | 2022-03-19T22:47:59.000Z | from amlb.utils import call_script_in_same_dir
def setup(*args, **kwargs):
call_script_in_same_dir(__file__, "setup.sh", *args, **kwargs)
def run(dataset, config):
from .exec import run
return run(dataset, config)
| 20.909091 | 66 | 0.721739 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.043478 |
f8c656a1fcea7a9ee14e5a204d4f559a5949f3d3 | 189 | py | Python | generate_pentagons.py | YessOn/ProjectEuler-Toolkits | cc196c1c6faca32f7613ae40ddb3c7f7b86e071e | [
"MIT"
] | null | null | null | generate_pentagons.py | YessOn/ProjectEuler-Toolkits | cc196c1c6faca32f7613ae40ddb3c7f7b86e071e | [
"MIT"
] | null | null | null | generate_pentagons.py | YessOn/ProjectEuler-Toolkits | cc196c1c6faca32f7613ae40ddb3c7f7b86e071e | [
"MIT"
] | null | null | null | def generate_pentagons(n_of_pentagons):
pentagons = (num * (3 * num - 1) // 2 for num in range(1, n_of_pentagons))
for _ in range(n_of_pentagons - 1):
yield next(pentagons)
| 37.8 | 78 | 0.661376 | 0 | 0 | 188 | 0.994709 | 0 | 0 | 0 | 0 | 0 | 0 |
f8c6b59947b8e1e01fbc267420d89e101ab3f722 | 932 | py | Python | util_test.py | svennickel/itunes-app-scraper | 14b857bd40a237825cb6bd93be388e6bcd083c01 | [
"MIT"
] | 10 | 2020-08-12T06:47:04.000Z | 2021-12-04T03:06:19.000Z | util_test.py | svennickel/itunes-app-scraper | 14b857bd40a237825cb6bd93be388e6bcd083c01 | [
"MIT"
] | 5 | 2020-11-19T07:53:19.000Z | 2022-03-16T15:06:37.000Z | util_test.py | iaine/itunes-app-scraper | de60c8c0b369e78d4c87a0cb11284b2ef576c090 | [
"MIT"
] | 11 | 2020-08-12T06:47:31.000Z | 2022-03-19T23:36:18.000Z | from itunes_app_scraper.util import AppStoreException, AppStoreCollections, AppStoreCategories, AppStoreUtils
import json
import pytest
import os
def test_category_exists():
category = AppStoreCategories()
assert category.BOOKS == 6018
def test_category_does_not_exist():
category = AppStoreCategories()
... | 33.285714 | 109 | 0.769313 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 0.145923 |
f8c6f95465da9e6fd5b7017053c85eda97db68b6 | 802 | py | Python | natasha/span.py | baltachev/natasha | b326631c510384b1ce3ac198bce8ed11818ec784 | [
"MIT"
] | 822 | 2017-09-05T08:38:42.000Z | 2022-03-31T16:08:48.000Z | natasha/span.py | baltachev/natasha | b326631c510384b1ce3ac198bce8ed11818ec784 | [
"MIT"
] | 81 | 2017-09-12T12:49:00.000Z | 2022-03-25T18:21:12.000Z | natasha/span.py | baltachev/natasha | b326631c510384b1ce3ac198bce8ed11818ec784 | [
"MIT"
] | 90 | 2017-09-05T08:38:49.000Z | 2022-03-29T12:09:22.000Z |
from .record import Record
class Span(Record):
__attributes__ = ['start', 'stop', 'type']
def adapt_spans(spans):
for span in spans:
yield Span(span.start, span.stop, span.type)
def offset_spans(spans, offset):
for span in spans:
yield Span(
offset + span.start,
... | 21.105263 | 52 | 0.516209 | 66 | 0.082294 | 696 | 0.86783 | 0 | 0 | 0 | 0 | 19 | 0.023691 |
f8c7ce0b20cdca0b81d121ae696bffeb609cd523 | 7,297 | py | Python | bingads/v13/bulk/entities/bulk_offline_conversion.py | pawelulita/BingAds-Python-SDK | e7b5a618e87a43d0a5e2c79d9aa4626e208797bd | [
"MIT"
] | 86 | 2016-02-29T03:24:28.000Z | 2022-03-29T09:30:21.000Z | bingads/v13/bulk/entities/bulk_offline_conversion.py | pawelulita/BingAds-Python-SDK | e7b5a618e87a43d0a5e2c79d9aa4626e208797bd | [
"MIT"
] | 135 | 2016-04-12T13:31:28.000Z | 2022-03-29T02:18:51.000Z | bingads/v13/bulk/entities/bulk_offline_conversion.py | pawelulita/BingAds-Python-SDK | e7b5a618e87a43d0a5e2c79d9aa4626e208797bd | [
"MIT"
] | 154 | 2016-04-08T04:11:27.000Z | 2022-03-29T21:21:07.000Z | from __future__ import print_function
from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13
from bingads.v13.internal.bulk.string_table import _StringTable
from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity
from bingads.v13.internal.bulk.mappings import _SimpleBul... | 34.582938 | 139 | 0.628752 | 6,919 | 0.948198 | 0 | 0 | 1,515 | 0.20762 | 0 | 0 | 943 | 0.129231 |
f8c98cbdffeb6bc1eca9320791dd78a1cefdb9cd | 4,320 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/lti_provider/tests/test_tasks.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/lti_provider/tests/test_tasks.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/lti_provider/tests/test_tasks.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | """
Tests for the LTI outcome service handlers, both in outcomes.py and in tasks.py
"""
from unittest.mock import MagicMock, patch
import ddt
from django.test import TestCase
from opaque_keys.edx.locator import BlockUsageLocator, CourseLocator
import lms.djangoapps.lti_provider.tasks as tasks
from common.djangoapps... | 31.532847 | 92 | 0.634491 | 3,836 | 0.887963 | 0 | 0 | 2,122 | 0.491204 | 0 | 0 | 743 | 0.171991 |
f8c9d560d993e370d3b1363238c43807ccc5dfd5 | 1,954 | py | Python | agents/dumbagent.py | dbelliss/Starcraft2AI | a3044f0eb3c1bb18084fa59265a430ddcdfab80b | [
"MIT"
] | 2 | 2018-04-17T00:37:40.000Z | 2018-04-30T03:04:20.000Z | agents/dumbagent.py | dbelliss/Starcraft2AI | a3044f0eb3c1bb18084fa59265a430ddcdfab80b | [
"MIT"
] | null | null | null | agents/dumbagent.py | dbelliss/Starcraft2AI | a3044f0eb3c1bb18084fa59265a430ddcdfab80b | [
"MIT"
] | null | null | null | from loser_agent import *
class DumbAgent(LoserAgent):
def __init__(self, is_logging = False, is_printing_to_console = False, isMainAgent = False, fileName = ""):
super().__init__(is_logging, is_printing_to_console, isMainAgent)
# For debugging
self.is_logging = is_logging... | 41.574468 | 129 | 0.666837 | 1,631 | 0.834698 | 0 | 0 | 0 | 0 | 1,056 | 0.54043 | 644 | 0.32958 |
f8caa3e778c29557bd6611746d149fdf5e4f18a9 | 113 | py | Python | juno/server/http/handler/api.py | DSciLab/juno | 1d572c8d3fd06a6c1fcc51b42a6539dd3ae0927e | [
"MIT"
] | null | null | null | juno/server/http/handler/api.py | DSciLab/juno | 1d572c8d3fd06a6c1fcc51b42a6539dd3ae0927e | [
"MIT"
] | null | null | null | juno/server/http/handler/api.py | DSciLab/juno | 1d572c8d3fd06a6c1fcc51b42a6539dd3ae0927e | [
"MIT"
] | null | null | null | from .base.api_handler import APIBaseHandler
class APIHandler(APIBaseHandler):
def get(self):
pass
| 16.142857 | 44 | 0.725664 | 65 | 0.575221 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f8cc12080c230a16858bbc18a05bcd5b93430fe7 | 317 | py | Python | Python/mathematics/find_missing_number.py | RCubedClub/cp_algo | ec254055ef745224b0a1c766ef16709a3eea7087 | [
"MIT"
] | null | null | null | Python/mathematics/find_missing_number.py | RCubedClub/cp_algo | ec254055ef745224b0a1c766ef16709a3eea7087 | [
"MIT"
] | null | null | null | Python/mathematics/find_missing_number.py | RCubedClub/cp_algo | ec254055ef745224b0a1c766ef16709a3eea7087 | [
"MIT"
] | null | null | null | import random
def find(array):
summation = sum(array)
n = len(array)
total = n*(n+1)//2
miss = total - summation
return miss
def main():
arr = [i for i in range(99)]
print(arr)
result = find(arr)
print("The missing number is-", result)
if __name__ == '__main__':
main()
| 14.409091 | 43 | 0.577287 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.107256 |
f8cda283a32c2452d1728b137c6f236a6921d3ec | 1,099 | py | Python | 091. Decode Ways.py | joshlyman/Josh-LeetCode | cc9e2cc406d2cbd5a90ee579efbcaeffb842c5ed | [
"MIT"
] | null | null | null | 091. Decode Ways.py | joshlyman/Josh-LeetCode | cc9e2cc406d2cbd5a90ee579efbcaeffb842c5ed | [
"MIT"
] | null | null | null | 091. Decode Ways.py | joshlyman/Josh-LeetCode | cc9e2cc406d2cbd5a90ee579efbcaeffb842c5ed | [
"MIT"
] | null | null | null | # Problem Reduction: variation of n-th staircase with n = [1, 2] steps.
# Approach: We generate a bottom up DP table.
# The tricky part is handling the corner cases (e.g. s = "30").
# Most elegant way to deal with those error/corner cases, is to allocate an extra space, dp[0].
# Let dp[ i ] = the number of ways to ... | 28.921053 | 95 | 0.497725 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 648 | 0.589627 |
f8cddb9ef6bd722c93b8a3657d1eaf9e8803d45f | 4,525 | py | Python | Scripts/Cutter.py | rhong3/CPTAC-UCEC | ec83fbee234b5ad3df6524cdd960b5f0f3da9ea9 | [
"MIT"
] | 4 | 2019-01-04T21:11:03.000Z | 2020-12-11T16:56:15.000Z | Scripts/Cutter.py | rhong3/CPTAC-UCEC | ec83fbee234b5ad3df6524cdd960b5f0f3da9ea9 | [
"MIT"
] | null | null | null | Scripts/Cutter.py | rhong3/CPTAC-UCEC | ec83fbee234b5ad3df6524cdd960b5f0f3da9ea9 | [
"MIT"
] | null | null | null | """
Tile svs/scn files
Created on 11/01/2018
@author: RH
"""
import time
import matplotlib
import os
import shutil
import pandas as pd
matplotlib.use('Agg')
import Slicer
import staintools
import re
# Get all images in the root directory
def image_ids_in(root_dir, mode, ignore=['.DS_Store', 'dict.csv']):
ids =... | 29.769737 | 106 | 0.478232 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 811 | 0.179227 |
f8cde62d3add298d347b197159cd3ef0fad71443 | 2,850 | py | Python | brake.py | tensorpro/AutonomousBraking | 9861e5c0423d8ca1a2f3f640003b3581a3074459 | [
"MIT"
] | 8 | 2017-05-04T22:04:48.000Z | 2020-03-27T13:06:39.000Z | brake.py | tensorpro/AutonomousBraking | 9861e5c0423d8ca1a2f3f640003b3581a3074459 | [
"MIT"
] | null | null | null | brake.py | tensorpro/AutonomousBraking | 9861e5c0423d8ca1a2f3f640003b3581a3074459 | [
"MIT"
] | 2 | 2019-07-22T02:19:57.000Z | 2020-09-29T21:00:00.000Z | from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
m = 4
b = -.2
bl = -.1
br = -.1
sh = .13
def show_ped(image, bb):
im = np.zeros(image.shape[:2])
[ymin, xmin, ymax, xmax] = bb
im[ymin:ymax,xmin:xmax]=1
plt.imshow(im)
plt.show()
def in_region(x,y, m=0, b=0, ab... | 26.635514 | 75 | 0.561404 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 214 | 0.075088 |
f8d06ccac9f1d3cb709d0653c37332224ffae6f4 | 20,941 | py | Python | pysnmp/DPS-MIB-V38.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/DPS-MIB-V38.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/DPS-MIB-V38.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module DPS-MIB-V38 (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DPS-MIB-V38
# Produced by pysmi-0.3.4 at Mon Apr 29 18:39:21 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 0... | 146.440559 | 2,200 | 0.719641 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,974 | 0.285278 |
f8d0c7ea7f201118a072a6fce98f54b42edb4e97 | 524 | py | Python | Lab5/load_graph.py | YuryMalyshev/CAD-with-Python | ecbb82b8efb436e7089b0895dc898cf956351046 | [
"MIT"
] | null | null | null | Lab5/load_graph.py | YuryMalyshev/CAD-with-Python | ecbb82b8efb436e7089b0895dc898cf956351046 | [
"MIT"
] | null | null | null | Lab5/load_graph.py | YuryMalyshev/CAD-with-Python | ecbb82b8efb436e7089b0895dc898cf956351046 | [
"MIT"
] | null | null | null | import numpy as np
def load_graph(path):
edges = np.array([])
with open(path, 'r', encoding='utf-8', errors='ignore') as g_file:
next(g_file) # skip the header line
for line in g_file:
try:
fields = line.split(",")
edges = np.append(edges, [int(field... | 32.75 | 101 | 0.532443 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.082061 |
f8d0d6ecca8d12cee0a53f9628644c363e8839b3 | 1,055 | py | Python | python/smqtk/utils/simple_timer.py | jbeezley/SMQTK | e6b00f94be95f39bbca52a7983ac3d6d1f86f847 | [
"BSD-3-Clause"
] | 82 | 2015-01-07T15:33:29.000Z | 2021-08-11T18:34:05.000Z | python/smqtk/utils/simple_timer.py | jbeezley/SMQTK | e6b00f94be95f39bbca52a7983ac3d6d1f86f847 | [
"BSD-3-Clause"
] | 230 | 2015-04-08T14:36:51.000Z | 2022-03-14T17:55:30.000Z | python/smqtk/utils/simple_timer.py | DigitalCompanion/SMQTK | fc9404b69150ef44f24423844bc80735c0c2b669 | [
"BSD-3-Clause"
] | 65 | 2015-01-04T15:00:16.000Z | 2021-11-19T18:09:11.000Z | import time
from smqtk.utils import SmqtkObject
class SimpleTimer (SmqtkObject):
"""
Little class to wrap the timing of things. To be use with the ``with``
statement.
"""
def __init__(self, msg, log_func=None, *args):
"""
Additional arguments are passed to the logging method
... | 27.051282 | 74 | 0.525118 | 1,003 | 0.950711 | 0 | 0 | 0 | 0 | 0 | 0 | 285 | 0.270142 |
f8d1533d26da78b1c9ff1203760b4a5ae33a69c7 | 206 | py | Python | 1546.py | ShawonBarman/URI-Online-judge-Ad-Hoc-level-problem-solution-in-python | 9a0f0ad5efd4a9e73589c357ab4b34b7c73a11da | [
"MIT"
] | 1 | 2022-01-14T08:45:32.000Z | 2022-01-14T08:45:32.000Z | 1546.py | ShawonBarman/URI-Online-judge-Ad-Hoc-level-problem-solution-in-python | 9a0f0ad5efd4a9e73589c357ab4b34b7c73a11da | [
"MIT"
] | null | null | null | 1546.py | ShawonBarman/URI-Online-judge-Ad-Hoc-level-problem-solution-in-python | 9a0f0ad5efd4a9e73589c357ab4b34b7c73a11da | [
"MIT"
] | null | null | null | arr = ['', 'Rolien', 'Naej', 'Elehcim', 'Odranoel']
n = int(input())
while n != 0:
n -= 1
k = int(input())
while k != 0:
k -= 1
num = int(input())
print(arr[num]) | 22.888889 | 52 | 0.417476 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 35 | 0.169903 |
f8d1e3f53857745560685cc9254effe945b354f9 | 3,314 | py | Python | portl.py | blackc8/portl | 8be36d67db2041071d5169204902ec9fff6aabe9 | [
"MIT"
] | null | null | null | portl.py | blackc8/portl | 8be36d67db2041071d5169204902ec9fff6aabe9 | [
"MIT"
] | 1 | 2020-10-31T15:32:31.000Z | 2020-10-31T15:33:11.000Z | portl.py | blackc8/portl | 8be36d67db2041071d5169204902ec9fff6aabe9 | [
"MIT"
] | null | null | null | import socket, time, sys
import argparse
__version__="0.1"
min_port=0
#max_port=65535
max_port=10000
parser = argparse.ArgumentParser(description="a simple python port scanner",epilog="author: blackc8")
parser.add_argument("hostname",metavar="<hostname>",help="host to scan")
parser.add_argument("-dp","--ddport",help=... | 30.971963 | 114 | 0.624925 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 654 | 0.197345 |
f8d25c456ce1d78680f761522a288c787f746b68 | 4,730 | py | Python | Python/MachineLearning_Ng/examples/ex2.py | Ritetsu/lizhe_Notes | 4c465b5e23c1e520f9508314cfda7f26517d6dd3 | [
"MIT"
] | null | null | null | Python/MachineLearning_Ng/examples/ex2.py | Ritetsu/lizhe_Notes | 4c465b5e23c1e520f9508314cfda7f26517d6dd3 | [
"MIT"
] | null | null | null | Python/MachineLearning_Ng/examples/ex2.py | Ritetsu/lizhe_Notes | 4c465b5e23c1e520f9508314cfda7f26517d6dd3 | [
"MIT"
] | 1 | 2021-07-07T12:01:42.000Z | 2021-07-07T12:01:42.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 16 20:15:55 2019
@author: Shinelon
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
path='ex2data1.txt'
data=pd.read_csv(path,header=None,names=['Exam1','Exam2','Admitted'])
data.head()
#两个分数的散点图,并用颜色编码可视化
positive=data[data['Admitted'].isin([1]... | 31.533333 | 84 | 0.679281 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,152 | 0.225882 |
6ef1130a48a6b7d1320ed14916f6226e73d226a4 | 855 | py | Python | questioning/trade/migrations/0003_auto_20190901_1710.py | PythonerKK/questioning | c30fb2d31a221398df392f4b8faab539d6921ac0 | [
"MIT"
] | 6 | 2019-12-31T05:23:27.000Z | 2021-03-12T19:23:34.000Z | questioning/trade/migrations/0003_auto_20190901_1710.py | PythonerKK/questioning | c30fb2d31a221398df392f4b8faab539d6921ac0 | [
"MIT"
] | 4 | 2020-05-12T13:39:40.000Z | 2021-02-08T20:35:18.000Z | questioning/trade/migrations/0003_auto_20190901_1710.py | PythonerKK/questioning | c30fb2d31a221398df392f4b8faab539d6921ac0 | [
"MIT"
] | 1 | 2019-09-02T07:15:16.000Z | 2019-09-02T07:15:16.000Z | # Generated by Django 2.1.9 on 2019-09-01 09:10
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('trade', '0002_accountdetail_orderinfo'),
migrations.swappable_d... | 29.482759 | 129 | 0.661988 | 704 | 0.815759 | 0 | 0 | 0 | 0 | 0 | 0 | 138 | 0.159907 |
6ef13886b158bd50cda282a2108b24f47033b23c | 3,557 | py | Python | Ch5/rbf.py | jason-168/MLCode | 429c17e004fb41ba16c371416c8f73833ab8fc1d | [
"Xnet",
"X11"
] | 146 | 2016-05-24T02:55:53.000Z | 2022-03-23T14:54:42.000Z | Ch5/rbf.py | coky/MarslandMLAlgo | 4277b24db88c4cb70d6b249921c5d21bc8f86eb4 | [
"Xnet",
"X11"
] | 1 | 2017-08-17T23:07:39.000Z | 2017-08-18T08:27:19.000Z | Ch5/rbf.py | coky/MarslandMLAlgo | 4277b24db88c4cb70d6b249921c5d21bc8f86eb4 | [
"Xnet",
"X11"
] | 94 | 2016-05-06T12:34:33.000Z | 2022-03-30T03:31:04.000Z |
# Code from Chapter 5 of Machine Learning: An Algorithmic Perspective (2nd Edition)
# by Stephen Marsland (http://stephenmonika.net)
# You are free to use, change, or redistribute the code in any way you wish for
# non-commercial purposes, but please maintain the name of the original author.
# This code comes with no... | 34.872549 | 127 | 0.576047 | 3,135 | 0.881361 | 0 | 0 | 0 | 0 | 0 | 0 | 769 | 0.216193 |
6ef1936814cf84ad0a8d2c89da28ee0ee1c74c44 | 929 | py | Python | _correlation_grad.py | jgorgenucsd/corr_tf | ad777821283f7d18d8bdd04d584e12df9a3fba69 | [
"BSD-2-Clause"
] | 22 | 2017-12-27T07:37:14.000Z | 2021-11-15T05:51:44.000Z | _correlation_grad.py | jgorgenucsd/corr_tf | ad777821283f7d18d8bdd04d584e12df9a3fba69 | [
"BSD-2-Clause"
] | 4 | 2018-04-03T17:08:43.000Z | 2019-08-07T08:55:24.000Z | _correlation_grad.py | jgorgenucsd/corr_tf | ad777821283f7d18d8bdd04d584e12df9a3fba69 | [
"BSD-2-Clause"
] | 12 | 2018-02-06T02:35:12.000Z | 2022-03-02T07:18:19.000Z | #!/usr/bin/env python3
"""
Gradients for inner product.
"""
import tensorflow as tf
from tensorflow.python.framework import ops
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import sparse_ops
correlation_grad_module = tf.load_op_library('./build/libcorrelation_grad.so')
@ops.RegisterGradien... | 38.708333 | 163 | 0.750269 | 0 | 0 | 0 | 0 | 628 | 0.675996 | 0 | 0 | 511 | 0.550054 |
6ef32ce891baec71eb1386e2c2b81b8e89a8b9a4 | 123 | py | Python | src/hcrystalball/metrics/__init__.py | betatim/hcrystalball | 693b9b406f05afa23cfc4647c43260166a7076fe | [
"MIT"
] | 1 | 2021-04-12T17:08:17.000Z | 2021-04-12T17:08:17.000Z | src/hcrystalball/metrics/__init__.py | betatim/hcrystalball | 693b9b406f05afa23cfc4647c43260166a7076fe | [
"MIT"
] | null | null | null | src/hcrystalball/metrics/__init__.py | betatim/hcrystalball | 693b9b406f05afa23cfc4647c43260166a7076fe | [
"MIT"
] | 1 | 2022-01-03T16:02:35.000Z | 2022-01-03T16:02:35.000Z | from ._scorer import make_ts_scorer
from ._scorer import get_scorer
__all__ = [
"get_scorer",
"make_ts_scorer",
]
| 15.375 | 35 | 0.723577 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.227642 |
6ef9b4082cb1779ade1e3f88552ad789562c6383 | 2,776 | py | Python | tests/selenium/auth/test_user.py | bodik/sner4-web | cb054d79c587b2f8468c73a88754b7c0d5cd5a95 | [
"MIT"
] | 9 | 2019-05-15T11:33:43.000Z | 2022-02-17T04:05:28.000Z | tests/selenium/auth/test_user.py | bodik/sner4 | cb054d79c587b2f8468c73a88754b7c0d5cd5a95 | [
"MIT"
] | 1 | 2019-03-01T11:48:13.000Z | 2019-03-01T11:48:13.000Z | tests/selenium/auth/test_user.py | bodik/sner4-web | cb054d79c587b2f8468c73a88754b7c0d5cd5a95 | [
"MIT"
] | 3 | 2020-03-03T21:06:37.000Z | 2021-01-11T14:40:56.000Z | # This file is part of sner4 project governed by MIT license, see the LICENSE.txt file.
"""
auth.views.user selenium tests
"""
from flask import url_for
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from sner.server.auth.models import User
from sner.serve... | 46.266667 | 139 | 0.747839 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,100 | 0.396254 |
6efaa56371bdc91af714b2ef343d987547b208e3 | 936 | py | Python | isobmff/media_file.py | kentoku24/isobmff | 6877505a75915caf440bbb80b6024ba6bf9f3baa | [
"MIT"
] | 6 | 2017-08-31T01:55:37.000Z | 2018-12-26T03:03:24.000Z | isobmff/media_file.py | kentoku24/isobmff | 6877505a75915caf440bbb80b6024ba6bf9f3baa | [
"MIT"
] | 4 | 2017-08-29T03:47:16.000Z | 2017-09-05T09:00:17.000Z | isobmff/media_file.py | m-hiki/isbmff | 0724b9892884ae35bdd0796a97a9506098c4cd25 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .box import indent
from .box import read_box
class MediaFile(object):
def __init__(self):
self.ftyp = None
self.mdats = []
self.meta = None
self.moov = None
def __repr__(self):
rep = self.ftyp.__repr__() + '\n'
rep +... | 26.742857 | 53 | 0.459402 | 853 | 0.911325 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0.074786 |
6efc120e05e2c5cbca1587bd26026c11c811582c | 2,257 | py | Python | python homework 2.py | pkpatricia/python34 | 5ee4f864444b8835f8ee6cf416bc9fd1d969595b | [
"bzip2-1.0.6"
] | null | null | null | python homework 2.py | pkpatricia/python34 | 5ee4f864444b8835f8ee6cf416bc9fd1d969595b | [
"bzip2-1.0.6"
] | null | null | null | python homework 2.py | pkpatricia/python34 | 5ee4f864444b8835f8ee6cf416bc9fd1d969595b | [
"bzip2-1.0.6"
] | null | null | null | Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>>
>>> ================================ RESTART ================================... | 27.52439 | 94 | 0.438635 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.030128 |
6efc25feb8365613f08bcea149b9338afcb635e2 | 3,690 | py | Python | mlw/build_database.py | imjoseangel/hacktheplanet2021 | bffc4f9a4f821fcfe2215244f5b563effe6982e5 | [
"MIT"
] | 1 | 2021-02-24T12:05:06.000Z | 2021-02-24T12:05:06.000Z | mlw/build_database.py | imjoseangel/hacktheplanet2021 | bffc4f9a4f821fcfe2215244f5b563effe6982e5 | [
"MIT"
] | null | null | null | mlw/build_database.py | imjoseangel/hacktheplanet2021 | bffc4f9a4f821fcfe2215244f5b563effe6982e5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, absolute_import, print_function,
unicode_literals)
from glob import glob
import logging
import os
from os.path import abspath, dirname, normpath
import re
from shutil import rmtree
import sqlite3
import sys
import ... | 31.810345 | 140 | 0.644986 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,666 | 0.451491 |
6efcad9f388b05b3d7f79c0c4ad5c784bb1826e5 | 3,486 | py | Python | domotica/configuration.py | jjmartinr01/gauss3 | 1c71c44430e0f15fb2f3f83d32ad66bb1b7e3e94 | [
"MIT"
] | null | null | null | domotica/configuration.py | jjmartinr01/gauss3 | 1c71c44430e0f15fb2f3f83d32ad66bb1b7e3e94 | [
"MIT"
] | null | null | null | domotica/configuration.py | jjmartinr01/gauss3 | 1c71c44430e0f15fb2f3f83d32ad66bb1b7e3e94 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
TIPO = 'selectable' # 'basic' or 'selectable'. 'basic': necesario para el funcionamiento del programa
# 'selectable': No necesario. Añade nuevas funcionalidades al programa
# Por ejemplo autenticar es 'basic', pero actas es pre... | 41.011765 | 103 | 0.592943 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,415 | 0.689212 |
6efceaaf9fe7bf6e6a3d8409b3f03d38e6342a11 | 5,944 | py | Python | eval.py | itisianlee/hawk-facedet | 55774ac5619f9a4c76a3a872ff11940a874b32d1 | [
"Apache-2.0"
] | null | null | null | eval.py | itisianlee/hawk-facedet | 55774ac5619f9a4c76a3a872ff11940a874b32d1 | [
"Apache-2.0"
] | null | null | null | eval.py | itisianlee/hawk-facedet | 55774ac5619f9a4c76a3a872ff11940a874b32d1 | [
"Apache-2.0"
] | null | null | null | import os
import cv2
import fire
import time
import numpy as np
import torch
import torch.backends.cudnn as cudnn
import torch.nn.functional as F
from configs.common import config as cfg
from hawkdet.models.build import build_detor
from hawkdet.lib.numpy_nms import np_nms
from hawkdet.lib.box_utils import decode, dec... | 33.206704 | 105 | 0.57924 | 842 | 0.141655 | 0 | 0 | 0 | 0 | 0 | 0 | 694 | 0.116756 |
6efda603db469ce3236855097b257374262f3443 | 178 | py | Python | Python/Samples/Flyweight/Flyweight_models.py | plasroom46/DesignPattern.Sample | 86c05c5ae356cb01f3d075f248c45da3e6534d07 | [
"MIT"
] | 9 | 2019-03-14T01:54:31.000Z | 2021-11-26T13:00:32.000Z | Python/Samples/Flyweight/Flyweight_models.py | plasroom46/DesignPattern.Sample | 86c05c5ae356cb01f3d075f248c45da3e6534d07 | [
"MIT"
] | null | null | null | Python/Samples/Flyweight/Flyweight_models.py | plasroom46/DesignPattern.Sample | 86c05c5ae356cb01f3d075f248c45da3e6534d07 | [
"MIT"
] | 2 | 2019-08-19T06:00:04.000Z | 2021-07-15T01:23:52.000Z | class Content:
def __init__(self, id="", value=""):
if(id == ""):
raise TypeError
else:
self.id = id
self.value = value
| 17.8 | 40 | 0.438202 | 175 | 0.983146 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.033708 |
6efe244e5a0524f99c737e6f3d3da045c5866cd7 | 101 | py | Python | hello.py | zhuiyue568/test27 | f96438c29711b62000eb363ff32c059529a0e142 | [
"MIT"
] | null | null | null | hello.py | zhuiyue568/test27 | f96438c29711b62000eb363ff32c059529a0e142 | [
"MIT"
] | null | null | null | hello.py | zhuiyue568/test27 | f96438c29711b62000eb363ff32c059529a0e142 | [
"MIT"
] | null | null | null | name="zhuiyue"
num="123456"
num=111
num3=333
str="keep going"
num4=666
num5=888
num5=777
num6=999
| 7.769231 | 16 | 0.722772 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.287129 |
3e00ea020dca2ee0cd420f43a2015391aba2eabc | 2,491 | py | Python | src/keydra/providers/contentful.py | jangroth/keydra | 9bab1b21e025ceb6ae074ea936d693e36efae5a4 | [
"MIT"
] | 12 | 2021-05-04T10:47:02.000Z | 2022-03-10T13:25:04.000Z | src/keydra/providers/contentful.py | jangroth/keydra | 9bab1b21e025ceb6ae074ea936d693e36efae5a4 | [
"MIT"
] | 17 | 2021-05-04T00:53:49.000Z | 2022-01-18T10:01:49.000Z | src/keydra/providers/contentful.py | jangroth/keydra | 9bab1b21e025ceb6ae074ea936d693e36efae5a4 | [
"MIT"
] | 9 | 2021-05-04T00:46:38.000Z | 2022-02-16T02:55:50.000Z | from keydra.clients.contentful import ContentfulClient
from keydra.providers.base import BaseProvider
from keydra.providers.base import exponential_backoff_retry
from keydra.exceptions import DistributionException
from keydra.exceptions import RotationException
from keydra.logging import get_logger
LOGGER = get_log... | 28.965116 | 79 | 0.566439 | 2,141 | 0.859494 | 0 | 0 | 292 | 0.117222 | 0 | 0 | 405 | 0.162585 |
3e017ed1492cc6fe4bfc5ac25bc91b6acc5c2bd6 | 1,266 | py | Python | numbas_lti/migrations/0063_auto_20210211_1307.py | jhoobergs/numbas-lti-provider | 9d673e0ec8dcb085bd783e949c3ee179e507be5c | [
"Apache-2.0"
] | 6 | 2016-12-12T14:41:33.000Z | 2021-04-18T01:04:23.000Z | numbas_lti/migrations/0063_auto_20210211_1307.py | jhoobergs/numbas-lti-provider | 9d673e0ec8dcb085bd783e949c3ee179e507be5c | [
"Apache-2.0"
] | 206 | 2016-08-24T13:53:07.000Z | 2022-03-31T09:14:43.000Z | numbas_lti/migrations/0063_auto_20210211_1307.py | jhoobergs/numbas-lti-provider | 9d673e0ec8dcb085bd783e949c3ee179e507be5c | [
"Apache-2.0"
] | 13 | 2016-10-23T04:53:30.000Z | 2022-02-17T09:25:00.000Z | # Generated by Django 2.2.13 on 2021-02-11 13:07
from django.db import migrations, models
import django.db.models.deletion
def set_exam_resources(apps, schema_editor):
Resource = apps.get_model('numbas_lti', 'Resource')
Attempt = apps.get_model('numbas_lti', 'Attempt')
for r in Resource.objects.exclude(e... | 33.315789 | 156 | 0.650869 | 730 | 0.576619 | 0 | 0 | 0 | 0 | 0 | 0 | 217 | 0.171406 |
3e035da887a72ca05d47f4e04f4fd021e19671d0 | 1,356 | py | Python | sahyun_bot/utils_session.py | TheGoodlike13/sahyun-bot | 8ebc3d4e58a0acf9bde3c9ea8339145abcc53fcb | [
"MIT"
] | 1 | 2022-02-21T18:55:34.000Z | 2022-02-21T18:55:34.000Z | sahyun_bot/utils_session.py | TheGoodlike13/sahyun-bot | 8ebc3d4e58a0acf9bde3c9ea8339145abcc53fcb | [
"MIT"
] | null | null | null | sahyun_bot/utils_session.py | TheGoodlike13/sahyun-bot | 8ebc3d4e58a0acf9bde3c9ea8339145abcc53fcb | [
"MIT"
] | null | null | null | from requests import Session
from requests.adapters import HTTPAdapter
from urllib3 import Retry
from sahyun_bot.utils_logging import HttpDump
DEFAULT_RETRY_COUNT = 3
RETRY_ON_METHOD = frozenset([
'HEAD', 'GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'TRACE'
])
RETRY_ON_STATUS = frozenset([
403, 429, 500, 502,... | 30.133333 | 117 | 0.668142 | 1,020 | 0.752212 | 0 | 0 | 0 | 0 | 0 | 0 | 289 | 0.213127 |
3e03fc65e12b6935503f8e6630624fed1809bd0e | 5,763 | py | Python | EzLibrarianApplication/DAO/BookCirculationDAO.py | coregameHD/SmartLib_Librarian | 31b58a4aab648ee9110ba6a78d5fcab942267380 | [
"MIT"
] | null | null | null | EzLibrarianApplication/DAO/BookCirculationDAO.py | coregameHD/SmartLib_Librarian | 31b58a4aab648ee9110ba6a78d5fcab942267380 | [
"MIT"
] | null | null | null | EzLibrarianApplication/DAO/BookCirculationDAO.py | coregameHD/SmartLib_Librarian | 31b58a4aab648ee9110ba6a78d5fcab942267380 | [
"MIT"
] | 2 | 2018-10-01T14:08:25.000Z | 2020-09-30T03:02:15.000Z | import json
import requests
from datetime import datetime, timedelta
from BookCirculation import BookCirculation
from DAO.AbstractDAO import AbstractDAO
from DAO.BookDAO import BookDAO
from DAO.UserDAO import UserDAO
from constant import *
from datetime import datetime
class BookCirculationDAO(AbstractDAO):
def __... | 39.472603 | 143 | 0.622245 | 5,322 | 0.923477 | 0 | 0 | 517 | 0.08971 | 0 | 0 | 494 | 0.085719 |
3e063c3a08ca1b49f1f08adcb5b79cf09de3aefe | 4,128 | py | Python | flask_mm/managers/__init__.py | szkkteam/flask_mm | ea96899a41a0573e51792f1554550c6d77f22a07 | [
"MIT"
] | 1 | 2021-03-21T18:46:36.000Z | 2021-03-21T18:46:36.000Z | flask_mm/managers/__init__.py | szkkteam/flask_mm | ea96899a41a0573e51792f1554550c6d77f22a07 | [
"MIT"
] | null | null | null | flask_mm/managers/__init__.py | szkkteam/flask_mm | ea96899a41a0573e51792f1554550c6d77f22a07 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Common Python library imports
import os
# Pip package imports
from six.moves.urllib.parse import urljoin
from flask import url_for, request, abort
from werkzeug import secure_filename, FileStorage, cached_property
# Internal package imports
from flask_mm.utils import... | 35.282051 | 107 | 0.66376 | 3,672 | 0.889535 | 0 | 0 | 0 | 0 | 0 | 0 | 511 | 0.123789 |
3e07225d9f986640eeceeb3fecfcd08a0bbf84a5 | 1,627 | py | Python | web/api/user/core.py | cclrobotics/ARTBot | a0bffabebbc09361bf7748741fe3d30c78af8fbd | [
"MIT"
] | 5 | 2020-12-04T19:28:42.000Z | 2021-12-07T16:14:28.000Z | web/api/user/core.py | cclrobotics/ARTBot | a0bffabebbc09361bf7748741fe3d30c78af8fbd | [
"MIT"
] | 50 | 2019-10-08T19:47:24.000Z | 2021-07-26T05:43:37.000Z | web/api/user/core.py | cclrobotics/ARTBot | a0bffabebbc09361bf7748741fe3d30c78af8fbd | [
"MIT"
] | 4 | 2019-10-23T04:14:49.000Z | 2021-08-01T01:22:37.000Z | from functools import partial
from marshmallow import ValidationError
from web.extensions import db
from .validators import validate_user_token
from .serializers import SuperUserSchema
from .exceptions import InvalidUsage
from .user import SuperUser
def validate_and_extract_user_data(json_data, skipped_fields: tuple=... | 31.288462 | 95 | 0.761524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 159 | 0.097726 |
3e07f9fff3837dd41ad8b264e8c09d1d22e6939d | 12,853 | py | Python | digsby/src/util/auxencodings.py | ifwe/digsby | f5fe00244744aa131e07f09348d10563f3d8fa99 | [
"Python-2.0"
] | 35 | 2015-08-15T14:32:38.000Z | 2021-12-09T16:21:26.000Z | digsby/src/util/auxencodings.py | niterain/digsby | 16a62c7df1018a49eaa8151c0f8b881c7e252949 | [
"Python-2.0"
] | 4 | 2015-09-12T10:42:57.000Z | 2017-02-27T04:05:51.000Z | digsby/src/util/auxencodings.py | niterain/digsby | 16a62c7df1018a49eaa8151c0f8b881c7e252949 | [
"Python-2.0"
] | 15 | 2015-07-10T23:58:07.000Z | 2022-01-23T22:16:33.000Z | '''
Registers auxillary encodings in the codecs module.
>>> 'x\x9cK\xc9L/N\xaa\x04\x00\x08\x9d\x02\x83'.decode('zip')
'digsby'
'''
from peak.util.imports import lazyModule
sys = lazyModule('sys')
warnings = lazyModule('warnings')
locale = lazyModule('locale')
collections = lazyM... | 29.821346 | 119 | 0.561503 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,634 | 0.12713 |
3e08ccba7d47176de06f3bb412445c1550a56baf | 463 | py | Python | jaxfg/core/__init__.py | AvanDavad/jaxfg | 6d1559126ba872b452eca6a13c2688349f1c5f7e | [
"MIT"
] | 120 | 2020-11-28T19:43:31.000Z | 2022-03-29T02:35:46.000Z | jaxfg/core/__init__.py | AvanDavad/jaxfg | 6d1559126ba872b452eca6a13c2688349f1c5f7e | [
"MIT"
] | 12 | 2021-05-24T09:02:12.000Z | 2022-03-30T19:51:40.000Z | jaxfg/core/__init__.py | AvanDavad/jaxfg | 6d1559126ba872b452eca6a13c2688349f1c5f7e | [
"MIT"
] | 9 | 2021-05-06T15:31:23.000Z | 2022-03-23T12:06:44.000Z | from ._factor_base import FactorBase
from ._factor_stack import FactorStack
from ._stacked_factor_graph import StackedFactorGraph
from ._storage_metadata import StorageMetadata
from ._variable_assignments import VariableAssignments
from ._variables import RealVectorVariable, VariableBase
__all__ = [
"FactorStack",... | 27.235294 | 56 | 0.792657 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.2527 |
3e09b3a92c71458b7e09905c1beec58ee515ed7a | 106 | py | Python | cython/wrap_c/test_cython_wrapper.py | tleonhardt/Python_Interface_Cpp | 398eab0c6e7f5e0358edb6644c71b5fdc6b2606a | [
"MIT"
] | 64 | 2017-03-10T09:32:22.000Z | 2022-01-25T08:44:06.000Z | cython/wrap_c/test_cython_wrapper.py | tleonhardt/Python_Interface_Cpp | 398eab0c6e7f5e0358edb6644c71b5fdc6b2606a | [
"MIT"
] | null | null | null | cython/wrap_c/test_cython_wrapper.py | tleonhardt/Python_Interface_Cpp | 398eab0c6e7f5e0358edb6644c71b5fdc6b2606a | [
"MIT"
] | 13 | 2017-03-13T23:28:56.000Z | 2021-06-07T08:37:03.000Z | # coding=utf-8
import cyfib
def test_valid():
assert (17711 == cyfib.compute_fibonacci_wrapper(20))
| 15.142857 | 57 | 0.726415 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.132075 |
3e0aba9a6fd99c2588436a872d706b50b1c4f2cd | 1,612 | py | Python | Server/server.py | mjbogusz/CCVR | 65b11d39c1412134f8a695b30955368eb43c2518 | [
"MIT"
] | null | null | null | Server/server.py | mjbogusz/CCVR | 65b11d39c1412134f8a695b30955368eb43c2518 | [
"MIT"
] | null | null | null | Server/server.py | mjbogusz/CCVR | 65b11d39c1412134f8a695b30955368eb43c2518 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from http.server import SimpleHTTPRequestHandler, HTTPServer
from urllib.parse import parse_qs
import time
class CCVRRequestHandler(SimpleHTTPRequestHandler):
def do_GET(self):
# Add 'files' prefix
self.path = '/files' + self.path
super().do_GET()
def do_HEAD(self):
# Add 'files' pre... | 25.587302 | 66 | 0.673077 | 941 | 0.583747 | 0 | 0 | 0 | 0 | 0 | 0 | 309 | 0.191687 |
3e0adca23e72763263f72a46a3ff5aad270ff8c2 | 4,907 | py | Python | dags/dag_update.py | alyildiz/btc_forecast | b1e70431c9f18bee0afda71b96805f6194072548 | [
"MIT"
] | 5 | 2021-09-06T08:42:02.000Z | 2021-11-15T15:04:57.000Z | dags/dag_update.py | alyildiz/sncf_forecast | b1e70431c9f18bee0afda71b96805f6194072548 | [
"MIT"
] | null | null | null | dags/dag_update.py | alyildiz/sncf_forecast | b1e70431c9f18bee0afda71b96805f6194072548 | [
"MIT"
] | null | null | null | import os
from datetime import datetime, timedelta
from airflow import DAG
from airflow.operators.docker_operator import DockerOperator
from docker.types import Mount
default_args = {
"owner": "airflow",
"description": "Use of the DockerOperator",
"depend_on_past": False,
"start_date": datetime(2021, ... | 41.584746 | 109 | 0.651314 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,960 | 0.399429 |
3e0b03ec64f84131a309427f748ab4fc729497d0 | 1,723 | py | Python | sustainableCityManagement/main_project/Population_API/views_population.py | Josh-repository/Dashboard-CityManager- | 6287881be9fb2c6274a755ce5d75ad355346468a | [
"RSA-MD"
] | null | null | null | sustainableCityManagement/main_project/Population_API/views_population.py | Josh-repository/Dashboard-CityManager- | 6287881be9fb2c6274a755ce5d75ad355346468a | [
"RSA-MD"
] | null | null | null | sustainableCityManagement/main_project/Population_API/views_population.py | Josh-repository/Dashboard-CityManager- | 6287881be9fb2c6274a755ce5d75ad355346468a | [
"RSA-MD"
] | 1 | 2021-05-13T16:33:18.000Z | 2021-05-13T16:33:18.000Z | from django.http import JsonResponse
from django.http import HttpResponse
from rest_framework.views import APIView
from .store_population import StorePopulation
import time as processTiming
import uuid
# API to fetch Ireland population used by frontend. The result consist of population estimate and year.
class Ireland... | 39.159091 | 103 | 0.62101 | 1,311 | 0.760882 | 0 | 0 | 1,228 | 0.71271 | 0 | 0 | 468 | 0.271619 |
3e105c7bee23ddd23731ff6b0bc65a97faa40678 | 2,536 | py | Python | examples/tutorial7.py | fangj99/gifmaze | fd0f7fbf592537a26b13359ccf87dab836d9b1b3 | [
"MIT"
] | 7 | 2018-04-28T17:25:25.000Z | 2021-08-15T17:52:11.000Z | examples/tutorial7.py | fangj99/gifmaze | fd0f7fbf592537a26b13359ccf87dab836d9b1b3 | [
"MIT"
] | null | null | null | examples/tutorial7.py | fangj99/gifmaze | fd0f7fbf592537a26b13359ccf87dab836d9b1b3 | [
"MIT"
] | 2 | 2019-10-30T03:40:50.000Z | 2022-01-02T05:44:33.000Z | # -*- coding: utf-8 -*-
"""
This script shows how to embed the animation into a
background image (it's also possible to embed the animation
into another animation, but that's too complicated to implement
in a simple program ...)
"""
from colorsys import hls_to_rgb
import gifmaze as gm
from gifmaze.algorithms import wil... | 31.308642 | 86 | 0.714117 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,276 | 0.503155 |
3e105caf515da97595cf131c9228511ab5a47c2b | 313 | py | Python | 2-mouth02/socket/communnication.py | gary-gggggg/gary | d8ba30ea4bc2b662a2d6a87d247f813e5680d63e | [
"Apache-2.0"
] | 4 | 2021-02-01T10:28:11.000Z | 2021-02-01T10:34:40.000Z | 2-mouth02/socket/communnication.py | gary-gggggg/gary | d8ba30ea4bc2b662a2d6a87d247f813e5680d63e | [
"Apache-2.0"
] | null | null | null | 2-mouth02/socket/communnication.py | gary-gggggg/gary | d8ba30ea4bc2b662a2d6a87d247f813e5680d63e | [
"Apache-2.0"
] | null | null | null | from socket import *
a=input("请输入IP地址:")
b=input("请输入端口:")
ADDR = ("176.17.12.178", 31414)
giao = socket(AF_INET, SOCK_DGRAM)
while 1:
m = input(":")
if not m:
break
else:
giao.sendto(m.encode(), ADDR)
d, a = giao.recvfrom(1024)
print("意思是", d.decode())
giao.close()
| 18.411765 | 37 | 0.5623 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.206997 |
3e11bd4f5fe50f533d78b84480d62520eb696807 | 151 | py | Python | NhMedicalSite/panel/urls.py | Dogruyer/ecommerce | aa505b401e42882a96e6ef6375bd1a1ed95c5b85 | [
"Apache-2.0"
] | null | null | null | NhMedicalSite/panel/urls.py | Dogruyer/ecommerce | aa505b401e42882a96e6ef6375bd1a1ed95c5b85 | [
"Apache-2.0"
] | null | null | null | NhMedicalSite/panel/urls.py | Dogruyer/ecommerce | aa505b401e42882a96e6ef6375bd1a1ed95c5b85 | [
"Apache-2.0"
] | 1 | 2018-11-01T11:10:58.000Z | 2018-11-01T11:10:58.000Z | from django.conf.urls import url
from django.conf import settings
from panel.views import *
urlpatterns = [
url(r'^$', index, name='index'),
]
| 13.727273 | 36 | 0.688742 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.07947 |
3e11beb96e30d1e453934e9af1acf5d6478cd742 | 244 | py | Python | nice_paintig.py | rushdi21-meet/meet2019y1lab6 | e87c2f04593c8f7e3a5c1c66260c49a3690db90c | [
"MIT"
] | null | null | null | nice_paintig.py | rushdi21-meet/meet2019y1lab6 | e87c2f04593c8f7e3a5c1c66260c49a3690db90c | [
"MIT"
] | null | null | null | nice_paintig.py | rushdi21-meet/meet2019y1lab6 | e87c2f04593c8f7e3a5c1c66260c49a3690db90c | [
"MIT"
] | null | null | null | import turtle
color=["green", "yellow",'orange','blue','pruple','red','pink']
x=10
y= 270
i=0
turtle.bgcolor("black")
while True:
turtle.color(color[0])
turtle.forward(x)
turtle.left(y)
x+=10
y-=1
i+=1
turtle.mainloop()
| 16.266667 | 63 | 0.614754 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 0.22541 |
3e1247da76756de4876b84765ac8609022ba7513 | 2,446 | py | Python | enzynet/models.py | gdarkwah/enzynet | 7367635ae73595822133577054743a4c4c327cf3 | [
"MIT"
] | 189 | 2017-07-20T22:16:22.000Z | 2022-02-21T17:57:41.000Z | enzynet/models.py | gdarkwah/enzynet | 7367635ae73595822133577054743a4c4c327cf3 | [
"MIT"
] | 16 | 2019-05-09T14:47:44.000Z | 2021-09-19T00:25:59.000Z | enzynet/models.py | gdarkwah/enzynet | 7367635ae73595822133577054743a4c4c327cf3 | [
"MIT"
] | 93 | 2017-07-20T22:55:41.000Z | 2022-03-12T19:42:14.000Z | """Model definitions."""
# Authors: Afshine Amidi <lastname@mit.edu>
# Shervine Amidi <firstname@stanford.edu>
# MIT License
import numpy as np
from enzynet import constants
from keras import initializers
from keras import layers
from keras.layers import advanced_activations
from keras import models
from k... | 28.114943 | 80 | 0.618561 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 263 | 0.107522 |
3e13f1a614fdcd99556bcda63d31e15a470031fa | 998 | py | Python | entity/address_entity.py | rpinaa/python-flask-microservice | 3e479bd1653f8e846ae0b84ffb4f20481dfc7c5d | [
"MIT"
] | 1 | 2019-09-23T20:00:52.000Z | 2019-09-23T20:00:52.000Z | entity/address_entity.py | rpinaa/python-flask-microservice | 3e479bd1653f8e846ae0b84ffb4f20481dfc7c5d | [
"MIT"
] | null | null | null | entity/address_entity.py | rpinaa/python-flask-microservice | 3e479bd1653f8e846ae0b84ffb4f20481dfc7c5d | [
"MIT"
] | null | null | null | from db import db
class AddressEntity(db.Model):
__tablename__ = "address"
id = db.Column(db.Integer, primary_key=True)
int_number = db.Column(db.String(15), nullable=False)
ext_number = db.Column(db.String(15), nullable=False)
block = db.Column(db.String(15), nullable=False)
number = db.Colu... | 39.92 | 99 | 0.700401 | 977 | 0.978958 | 0 | 0 | 95 | 0.09519 | 0 | 0 | 9 | 0.009018 |
3e140c63bd33992dd5d90e07a79edb1db5f260ce | 10,357 | py | Python | FeatureCloud/api/cli/test/commands.py | FeatureCloud/FeatureCloud | 3421bc9621201ae4a888192f09886122b0cb571a | [
"Apache-2.0"
] | null | null | null | FeatureCloud/api/cli/test/commands.py | FeatureCloud/FeatureCloud | 3421bc9621201ae4a888192f09886122b0cb571a | [
"Apache-2.0"
] | null | null | null | FeatureCloud/api/cli/test/commands.py | FeatureCloud/FeatureCloud | 3421bc9621201ae4a888192f09886122b0cb571a | [
"Apache-2.0"
] | null | null | null | import os
import click
import requests
from FeatureCloud.api.imp.exceptions import FCException
from FeatureCloud.api.imp.test import commands
from FeatureCloud.api.cli.test.workflow.commands import workflow
@click.group("test")
def test() -> None:
"""Testbed related commands"""
test.add_comma... | 51.527363 | 220 | 0.663609 | 0 | 0 | 0 | 0 | 10,008 | 0.966303 | 0 | 0 | 5,251 | 0.507 |
3e14c4fe464f76c3e655c88c87bd66bc84933f25 | 4,188 | py | Python | axi_plot/utils.py | zoso95/axi_plot | 1a8c1f601c75e149d60377ccc4a437c33b3620bb | [
"MIT"
] | null | null | null | axi_plot/utils.py | zoso95/axi_plot | 1a8c1f601c75e149d60377ccc4a437c33b3620bb | [
"MIT"
] | null | null | null | axi_plot/utils.py | zoso95/axi_plot | 1a8c1f601c75e149d60377ccc4a437c33b3620bb | [
"MIT"
] | null | null | null | import subprocess
import logging
import os, time
from pathlib import Path
from shutil import copyfile
import pandas as pd
from datetime import datetime
def estimate_time(filename, config, layer=None):
base_commands = ['axicli', filename, '--config', config]
end_command = ['-vTC']
if layer is None:
... | 36.417391 | 138 | 0.680755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 907 | 0.216571 |
3e14f76f2adf0f315a94c191c5946f1de65d9fa9 | 5,258 | py | Python | scripts/regions_optimize.py | jason-neal/Starfish | 4ffa45e0190fb6f3262511d57d1a563e5ee711de | [
"BSD-3-Clause"
] | 1 | 2017-07-10T00:06:36.000Z | 2017-07-10T00:06:36.000Z | scripts/regions_optimize.py | jason-neal/Starfish | 4ffa45e0190fb6f3262511d57d1a563e5ee711de | [
"BSD-3-Clause"
] | null | null | null | scripts/regions_optimize.py | jason-neal/Starfish | 4ffa45e0190fb6f3262511d57d1a563e5ee711de | [
"BSD-3-Clause"
] | 5 | 2016-06-11T09:48:16.000Z | 2019-08-07T19:52:41.000Z | #!/usr/bin/env python
import argparse
parser = argparse.ArgumentParser(prog="region_optimize.py", description="Find the kernel parameters for Gaussian region zones.")
parser.add_argument("spectrum", help="JSON file containing the data, model, and residual.")
parser.add_argument("--sigma0", type=float, default=2, help=... | 30.929412 | 135 | 0.659947 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,046 | 0.389121 |
3e15b565f2c5c8e4188c7106981c4468935c3719 | 2,261 | py | Python | Bases/download_bases.py | lucas26xd/Estudo-Dados-COVID19-BR | cba0278e1cbd2464b4b4c7faa866d05d9968247d | [
"MIT"
] | null | null | null | Bases/download_bases.py | lucas26xd/Estudo-Dados-COVID19-BR | cba0278e1cbd2464b4b4c7faa866d05d9968247d | [
"MIT"
] | null | null | null | Bases/download_bases.py | lucas26xd/Estudo-Dados-COVID19-BR | cba0278e1cbd2464b4b4c7faa866d05d9968247d | [
"MIT"
] | null | null | null | import requests
from urllib.request import urlopen
from bs4 import BeautifulSoup
def get_urls_and_last_updates(): # Pega a url e a ultima data de atualização das bases disponíveis no OpenDataSUS
urls = list()
last_ups = list()
try:
html = BeautifulSoup(urlopen('https://opendatasus.saude.gov.br/da... | 39.666667 | 132 | 0.587793 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 722 | 0.318483 |
3e16ddbf593ddf87a424ef3546058ed337f938d3 | 10,699 | py | Python | rax/_src/utils_test.py | google/rax | d6370d574246db9fb0566317f7cac8cd331526d7 | [
"Apache-2.0"
] | 19 | 2022-01-25T12:37:51.000Z | 2022-03-30T17:12:45.000Z | rax/_src/utils_test.py | google/rax | d6370d574246db9fb0566317f7cac8cd331526d7 | [
"Apache-2.0"
] | 1 | 2022-02-08T23:02:42.000Z | 2022-02-08T23:02:42.000Z | rax/_src/utils_test.py | google/rax | d6370d574246db9fb0566317f7cac8cd331526d7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Google LLC.
#
# 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 writing, ... | 34.291667 | 79 | 0.639873 | 9,608 | 0.898028 | 0 | 0 | 0 | 0 | 0 | 0 | 646 | 0.060379 |
3e182689577a11bad1e8f7437a3d622ced715f94 | 427 | py | Python | examples/decorators.py | FusionSid/FusionSidAPI.py | e1b50622bf4fcec8265f8fd4e9b3ac79b580d286 | [
"MIT"
] | 5 | 2022-03-05T23:29:33.000Z | 2022-03-20T07:44:20.000Z | examples/decorators.py | FusionSid/FusionSidAPI.py | e1b50622bf4fcec8265f8fd4e9b3ac79b580d286 | [
"MIT"
] | null | null | null | examples/decorators.py | FusionSid/FusionSidAPI.py | e1b50622bf4fcec8265f8fd4e9b3ac79b580d286 | [
"MIT"
] | null | null | null | import asyncio
from fusionsid import Decorators
deco = Decorators
do_roast = deco.roast
@deco.compliment() # will give you a complement before the function is run
@Decorators.fact() # you can just put the class name and use that instead of setting it to a var
@do_roast() # you can set it to a variable and use th... | 23.722222 | 97 | 0.744731 | 0 | 0 | 0 | 0 | 268 | 0.627635 | 37 | 0.086651 | 183 | 0.428571 |
3e188c93ed7a3552c4548ac6fc5970107dcdbcdb | 2,303 | py | Python | configs/raubtierv2b/centripetalnet_hourglass104_mstest_16x6_210e_coco_raubtierv2b_2gpu.py | esf-bt2020/mmdetection | abc5fe060e0fcb716f845c85441be3741b22d3cf | [
"Apache-2.0"
] | null | null | null | configs/raubtierv2b/centripetalnet_hourglass104_mstest_16x6_210e_coco_raubtierv2b_2gpu.py | esf-bt2020/mmdetection | abc5fe060e0fcb716f845c85441be3741b22d3cf | [
"Apache-2.0"
] | null | null | null | configs/raubtierv2b/centripetalnet_hourglass104_mstest_16x6_210e_coco_raubtierv2b_2gpu.py | esf-bt2020/mmdetection | abc5fe060e0fcb716f845c85441be3741b22d3cf | [
"Apache-2.0"
] | null | null | null | # Basiskonfigurationsfile
_base_ = '../centripetalnet/centripetalnet_hourglass104_mstest_16x6_210e_coco.py'
model = dict(
type='CornerNet',
backbone=dict(
type='HourglassNet',
downsample_times=5,
num_stacks=2,
stage_channels=[256, 256, 384, 384, 384, 512],
stage_blocks=... | 37.145161 | 191 | 0.691706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,065 | 0.46244 |
3e1c92be5d3fa432577c6a625de6487e656413d6 | 3,175 | py | Python | firecares/firestation/tests/test_feedback.py | FireCARES/firecares | aa708d441790263206dd3a0a480eb6ca9031439d | [
"MIT"
] | 12 | 2016-01-30T02:28:35.000Z | 2019-05-29T15:49:56.000Z | firecares/firestation/tests/test_feedback.py | FireCARES/firecares | aa708d441790263206dd3a0a480eb6ca9031439d | [
"MIT"
] | 455 | 2015-07-27T20:21:56.000Z | 2022-03-11T23:26:20.000Z | firecares/firestation/tests/test_feedback.py | FireCARES/firecares | aa708d441790263206dd3a0a480eb6ca9031439d | [
"MIT"
] | 14 | 2015-07-29T09:45:53.000Z | 2020-10-21T20:03:17.000Z | import json
import mock
import os
from django.contrib.auth import get_user_model
from django.core import mail
from django.core.urlresolvers import reverse
from django.test import Client
from firecares.firestation.models import FireDepartment, FireStation, DataFeedback
from firecares.firecares_core.tests.base import Bas... | 42.333333 | 110 | 0.627402 | 2,808 | 0.884409 | 0 | 0 | 2,760 | 0.869291 | 0 | 0 | 558 | 0.175748 |
3e1d0a3af98bd0674017ebccc343c54e9d715f7e | 325 | py | Python | reactivex/scheduler/mainloop/__init__.py | christiansandberg/RxPY | 036027d2858ea6c9d45839c863bd791e5bb50c36 | [
"MIT"
] | null | null | null | reactivex/scheduler/mainloop/__init__.py | christiansandberg/RxPY | 036027d2858ea6c9d45839c863bd791e5bb50c36 | [
"MIT"
] | null | null | null | reactivex/scheduler/mainloop/__init__.py | christiansandberg/RxPY | 036027d2858ea6c9d45839c863bd791e5bb50c36 | [
"MIT"
] | null | null | null | from .gtkscheduler import GtkScheduler
from .pygamescheduler import PyGameScheduler
from .qtscheduler import QtScheduler
from .tkinterscheduler import TkinterScheduler
from .wxscheduler import WxScheduler
__all__ = [
"GtkScheduler",
"PyGameScheduler",
"QtScheduler",
"TkinterScheduler",
"WxScheduler... | 23.214286 | 46 | 0.775385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 0.230769 |
3e1d352c7922c834041d16e3fdaa531ed2d9b63c | 75 | py | Python | map2annotation/__main__.py | aas-integration/integration-test2 | dc9a9b4593cd59841f0d8348056cbff80a9c2a21 | [
"MIT"
] | 3 | 2016-10-10T20:18:51.000Z | 2018-05-01T19:42:10.000Z | map2annotation/__main__.py | aas-integration/integration-test2 | dc9a9b4593cd59841f0d8348056cbff80a9c2a21 | [
"MIT"
] | 38 | 2016-08-22T03:20:25.000Z | 2018-06-11T19:13:05.000Z | map2annotation/__main__.py | aas-integration/integration-test2 | dc9a9b4593cd59841f0d8348056cbff80a9c2a21 | [
"MIT"
] | 7 | 2016-08-29T17:37:42.000Z | 2022-01-28T00:30:10.000Z | import map2annotation
if __name__ == '__main__':
map2annotation.main() | 18.75 | 26 | 0.746667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.133333 |
3e1f67673a3fc56ac1f18b117525630eebc9c6b7 | 207 | py | Python | convenient_ai/nlp/spacy/types/RulePattern.py | leftshiftone/convenient-nlp | 8f24ff070ffaa2117af02ae16aaf00bc4d7cf32f | [
"MIT"
] | null | null | null | convenient_ai/nlp/spacy/types/RulePattern.py | leftshiftone/convenient-nlp | 8f24ff070ffaa2117af02ae16aaf00bc4d7cf32f | [
"MIT"
] | null | null | null | convenient_ai/nlp/spacy/types/RulePattern.py | leftshiftone/convenient-nlp | 8f24ff070ffaa2117af02ae16aaf00bc4d7cf32f | [
"MIT"
] | null | null | null | import dataclasses
from dataclasses import dataclass
@dataclass
class RulePattern:
id: str
label: str
pattern: str
@property
def as_dict(self):
return dataclasses.asdict(self)
| 14.785714 | 39 | 0.695652 | 140 | 0.676329 | 0 | 0 | 151 | 0.729469 | 0 | 0 | 0 | 0 |
3e1ff4f3721e11c343d5fecb39e8c79bd6aafa15 | 1,014 | py | Python | cocos2d/tools/cocos2d-console/plugins/plugin_run.py | meiry/Cocos2d-x-EarthWarrior3D-win-desktop-version | 6611cf5bfac64e22f0b053681ef9bf563f93f06c | [
"MIT"
] | 7 | 2015-05-19T07:54:48.000Z | 2021-12-17T06:01:24.000Z | cocos2d/tools/cocos2d-console/plugins/plugin_run.py | meiry/Cocos2d-x-EarthWarrior3D-win-desktop-version | 6611cf5bfac64e22f0b053681ef9bf563f93f06c | [
"MIT"
] | null | null | null | cocos2d/tools/cocos2d-console/plugins/plugin_run.py | meiry/Cocos2d-x-EarthWarrior3D-win-desktop-version | 6611cf5bfac64e22f0b053681ef9bf563f93f06c | [
"MIT"
] | 4 | 2015-11-24T06:27:16.000Z | 2021-05-29T10:50:44.000Z | #!/usr/bin/python
# ----------------------------------------------------------------------------
# cocos2d "install" plugin
#
# Authr: Luis Parravicini
#
# License: MIT
# ----------------------------------------------------------------------------
'''
"run" plugin for cocos2d command line tool
'''
__docformat__ = 'res... | 24.142857 | 78 | 0.554241 | 640 | 0.631164 | 0 | 0 | 240 | 0.236686 | 0 | 0 | 506 | 0.499014 |
3e22427e89b56fa4293c96f943f7ce0b77c3a1a7 | 2,759 | py | Python | source/configuration.py | yux1991/PyRHEED | b39ad03651c92e3649069919ae48b1e5158cd3dd | [
"MIT"
] | 14 | 2019-01-08T14:32:31.000Z | 2021-11-17T21:07:10.000Z | source/configuration.py | yux1991/PyRHEED | b39ad03651c92e3649069919ae48b1e5158cd3dd | [
"MIT"
] | 2 | 2019-05-14T08:56:36.000Z | 2020-12-22T16:44:30.000Z | source/configuration.py | yux1991/PyRHEED | b39ad03651c92e3649069919ae48b1e5158cd3dd | [
"MIT"
] | 4 | 2019-03-12T20:03:54.000Z | 2022-03-08T14:24:46.000Z | import configparser
class Configuration():
DefaultDic = {'windowDefault':{'HS' : 0,\
'VS' : 0,\
'energy' : 20,\
'azimuth' : 0,\
'scaleBarLength' : 5,\
... | 51.092593 | 66 | 0.303733 | 2,737 | 0.992026 | 0 | 0 | 0 | 0 | 0 | 0 | 695 | 0.251903 |
3e24e04ad5a6a1e6faafb25c71a578a2c2c42a6c | 4,772 | py | Python | api/api/endpoints/sensor_info.py | andschneider/ss_api | 4ddf5cd60d5e0e87e7641e97c9fbe78965c4b522 | [
"MIT"
] | null | null | null | api/api/endpoints/sensor_info.py | andschneider/ss_api | 4ddf5cd60d5e0e87e7641e97c9fbe78965c4b522 | [
"MIT"
] | 2 | 2019-12-26T17:31:56.000Z | 2020-01-06T19:45:05.000Z | api/api/endpoints/sensor_info.py | andschneider/soil_sense | 4ddf5cd60d5e0e87e7641e97c9fbe78965c4b522 | [
"MIT"
] | null | null | null | import datetime
import json
from flask import Response, request, Blueprint
from flask_jwt_extended import jwt_required
from flask_restplus import Api, Namespace, Resource, reqparse
from sqlalchemy.exc import IntegrityError
from api.core.db_execptions import bad_db_response
from api.core.models import SensorInfoModel,... | 33.843972 | 111 | 0.573135 | 4,023 | 0.843043 | 0 | 0 | 4,066 | 0.852054 | 0 | 0 | 1,103 | 0.23114 |
3e24efcd76f37df58a59baf6375172236bdbc8f9 | 116 | py | Python | notifications/utils.py | Natgeoed/django-notifications | a73c01f167bdf796b609d44a2be5323d08180b7f | [
"BSD-3-Clause"
] | 1 | 2019-05-28T14:55:58.000Z | 2019-05-28T14:55:58.000Z | notifications/utils.py | Natgeoed/django-notifications | a73c01f167bdf796b609d44a2be5323d08180b7f | [
"BSD-3-Clause"
] | null | null | null | notifications/utils.py | Natgeoed/django-notifications | a73c01f167bdf796b609d44a2be5323d08180b7f | [
"BSD-3-Clause"
] | 1 | 2020-03-29T10:13:28.000Z | 2020-03-29T10:13:28.000Z | # -*- coding: utf-8 -*-
def slug2id(slug):
return long(slug) - 110909
def id2slug(id):
return id + 110909
| 14.5 | 30 | 0.603448 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.198276 |
3e263e2d36efcfc4b3135f0a65636317114a2c8d | 995 | py | Python | hash calculator.py | Andrea1141/hash-calculator | 182d2f9bcfa0227ad70f7fdb03dde4599717cafa | [
"MIT"
] | 1 | 2021-10-02T12:48:25.000Z | 2021-10-02T12:48:25.000Z | hash calculator.py | Andrea1141/hash-calculator | 182d2f9bcfa0227ad70f7fdb03dde4599717cafa | [
"MIT"
] | null | null | null | hash calculator.py | Andrea1141/hash-calculator | 182d2f9bcfa0227ad70f7fdb03dde4599717cafa | [
"MIT"
] | 1 | 2021-10-18T12:34:26.000Z | 2021-10-18T12:34:26.000Z | import tkinter, hashlib
root = tkinter.Tk()
root.title("Hash Calculator")
label = tkinter.Label(text="Write the string to hash")
label.pack()
option = tkinter.StringVar()
option.set("sha224")
string = tkinter.StringVar()
entry = tkinter.Entry(root, textvariable=string, width=150, justify="center")
entr... | 28.428571 | 139 | 0.684422 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.223116 |
3e28aa85ecfaa56c22716b2abd9f954c4b0ab246 | 136 | py | Python | tensorflow/__init__.py | vsilyaev/tensorflow | f41959ccb2d9d4c722fe8fc3351401d53bcf4900 | [
"Apache-2.0"
] | 4 | 2015-11-10T14:11:39.000Z | 2021-11-17T11:11:25.000Z | tensorflow/__init__.py | TheRockStarDBA/tensorflow | db0b5da485e1d1f23003ee08ed2e191451ee0319 | [
"Apache-2.0"
] | null | null | null | tensorflow/__init__.py | TheRockStarDBA/tensorflow | db0b5da485e1d1f23003ee08ed2e191451ee0319 | [
"Apache-2.0"
] | 2 | 2015-11-13T21:11:49.000Z | 2015-11-29T04:13:49.000Z | # Bring in all of the public TensorFlow interface into this
# module.
# pylint: disable=wildcard-import
from tensorflow.python import *
| 27.2 | 59 | 0.786765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.742647 |
3e28b00c8be476ae7052942943b00801e357b52e | 4,337 | py | Python | cpauto/objects/threat.py | krnnrt/cpauto | 6076ee0e3f55769aac5b2480453d82f99371a31f | [
"Apache-2.0"
] | 16 | 2016-12-07T02:45:31.000Z | 2022-01-20T11:46:24.000Z | cpauto/objects/threat.py | krnnrt/cpauto | 6076ee0e3f55769aac5b2480453d82f99371a31f | [
"Apache-2.0"
] | 2 | 2017-07-20T21:12:27.000Z | 2021-09-09T14:57:01.000Z | cpauto/objects/threat.py | krnnrt/cpauto | 6076ee0e3f55769aac5b2480453d82f99371a31f | [
"Apache-2.0"
] | 5 | 2017-07-28T14:06:25.000Z | 2021-09-06T12:01:18.000Z | # -*- coding: utf-8 -*-
# Copyright 2016 Dana James Traversie and Check Point Software Technologies, Ltd. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:/... | 44.255102 | 113 | 0.679733 | 3,491 | 0.804934 | 0 | 0 | 0 | 0 | 0 | 0 | 3,424 | 0.789486 |
3e28e0f9797870a68b28678349b8f468bf2771ae | 387 | py | Python | src/tandlr/notifications/routing.py | shrmoud/schoolapp | 7349ce18f56658d67daedf5e1abb352b5c15a029 | [
"Apache-2.0"
] | null | null | null | src/tandlr/notifications/routing.py | shrmoud/schoolapp | 7349ce18f56658d67daedf5e1abb352b5c15a029 | [
"Apache-2.0"
] | null | null | null | src/tandlr/notifications/routing.py | shrmoud/schoolapp | 7349ce18f56658d67daedf5e1abb352b5c15a029 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from channels.staticfiles import StaticFilesConsumer
from tandlr.notifications import consumers
channel_routing = {
'http.request': StaticFilesConsumer(),
# Wire up websocket channels to our consumers:
'websocket.connect': consumers.ws_connect,
'websocket.receive': consumers.... | 25.8 | 52 | 0.74677 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 143 | 0.369509 |
3e297317547f88cd2d57145599c9dcd9b0299b5a | 646 | py | Python | 2018/d03.py | m1el/advent-of-code | 0944579fd58c586ce5a72b4152c5105ec07846a1 | [
"MIT"
] | null | null | null | 2018/d03.py | m1el/advent-of-code | 0944579fd58c586ce5a72b4152c5105ec07846a1 | [
"MIT"
] | null | null | null | 2018/d03.py | m1el/advent-of-code | 0944579fd58c586ce5a72b4152c5105ec07846a1 | [
"MIT"
] | null | null | null | from collections import defaultdict, Counter
from itertools import product
import re
with open('03.txt') as fd:
inp = []
for l in fd.readlines():
groups = re.findall(r'\d+', l)
inp.append(list(map(int, groups)))
claims = defaultdict(int)
for (id, l,t, w,h) in inp:
for y in range(t,t+h):
... | 20.1875 | 45 | 0.547988 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.021672 |
3e2a44b8d417cc833a2bb62cb532d7fa7ff0e6b8 | 2,591 | py | Python | files/lambda/tagger.py | mbasri/generic-spot-cluster | cccfbee4660ae26742e1442f495dc9f523d0a2fd | [
"MIT"
] | 1 | 2019-12-24T18:53:34.000Z | 2019-12-24T18:53:34.000Z | files/lambda/tagger.py | mbasri/generic-spot-cluster | cccfbee4660ae26742e1442f495dc9f523d0a2fd | [
"MIT"
] | null | null | null | files/lambda/tagger.py | mbasri/generic-spot-cluster | cccfbee4660ae26742e1442f495dc9f523d0a2fd | [
"MIT"
] | null | null | null | import os
import sys
import logging
import boto3
def handler(event, context):
logger = setup_logging(context.aws_request_id)
logger.setLevel(logging.INFO)
logger.info('## ENVIRONMENT VARIABLES')
logger.info(os.environ)
logger.info('## EVENT')
logger.info(event)
count = '1'
CLUSTER_NAME = os.environ... | 22.530435 | 81 | 0.582015 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 655 | 0.252798 |
3e2c2255a47604390ebe0475399a05f36907ad33 | 4,478 | py | Python | Python/biopsy/data/bergman_fly_motifs.py | JohnReid/biopsy | 1eeb714ba5b53f2ecf776d865d32e2078cbc0338 | [
"MIT"
] | null | null | null | Python/biopsy/data/bergman_fly_motifs.py | JohnReid/biopsy | 1eeb714ba5b53f2ecf776d865d32e2078cbc0338 | [
"MIT"
] | null | null | null | Python/biopsy/data/bergman_fly_motifs.py | JohnReid/biopsy | 1eeb714ba5b53f2ecf776d865d32e2078cbc0338 | [
"MIT"
] | null | null | null | #
# Copyright John Reid 2010
#
"""
Code to deal with the Bergman curated set of fly motifs.
"""
import os, biopsy.data as D, numpy as N
import xml.etree.ElementTree as ET
def xms_filename():
"@return: The filename of the XMS file where the motifs are stored."
return os.path.join(D.data_dir(), "Bergman-Fly-M... | 33.41791 | 105 | 0.585306 | 0 | 0 | 1,468 | 0.327825 | 0 | 0 | 0 | 0 | 1,327 | 0.296338 |
3e2c4ce8c6ded9f25bc03ff3e20ecd6211356ad1 | 7,950 | py | Python | addressbook/views.py | webskate101/django-polymer-addressbook | bf41b6a83e7b9228b383129958488f1c8075c728 | [
"Apache-2.0"
] | null | null | null | addressbook/views.py | webskate101/django-polymer-addressbook | bf41b6a83e7b9228b383129958488f1c8075c728 | [
"Apache-2.0"
] | null | null | null | addressbook/views.py | webskate101/django-polymer-addressbook | bf41b6a83e7b9228b383129958488f1c8075c728 | [
"Apache-2.0"
] | null | null | null | """Holds the HTTP handlers for the addressbook app."""
from django import db
from django import http
from django.views import generic
import json
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from addressbook import models
JSON_XSSI_PREFIX = ")]}'\n"
... | 33.544304 | 80 | 0.684528 | 6,823 | 0.858239 | 0 | 0 | 4,024 | 0.506164 | 0 | 0 | 2,338 | 0.294088 |
3e2dc345629e84a8ce9faa979c3f69774ad29ef7 | 132 | py | Python | backend/actions.py | HiroshiFuu/django-rest-drf-yasg-boilerplate | 93221b2dbca0635eb42a18096e805b00f36ff9c1 | [
"Apache-2.0"
] | null | null | null | backend/actions.py | HiroshiFuu/django-rest-drf-yasg-boilerplate | 93221b2dbca0635eb42a18096e805b00f36ff9c1 | [
"Apache-2.0"
] | null | null | null | backend/actions.py | HiroshiFuu/django-rest-drf-yasg-boilerplate | 93221b2dbca0635eb42a18096e805b00f36ff9c1 | [
"Apache-2.0"
] | null | null | null | from django.http import HttpResponseRedirect
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
| 33 | 54 | 0.863636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3e2de9f463b88672a9f0881711bb0f7f45018e12 | 1,124 | py | Python | Housing Price/HouseRegression.py | anupriyamranjit/machinelearning | 5e1deef38d356fddcedfe0a23094571500c1c82d | [
"MIT"
] | null | null | null | Housing Price/HouseRegression.py | anupriyamranjit/machinelearning | 5e1deef38d356fddcedfe0a23094571500c1c82d | [
"MIT"
] | null | null | null | Housing Price/HouseRegression.py | anupriyamranjit/machinelearning | 5e1deef38d356fddcedfe0a23094571500c1c82d | [
"MIT"
] | null | null | null |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import tensorflow as tf
import keras
import os
print(os.listdir("../input"))
print("Success")
# Any results you write to the current directory are saved as output.
# importing models/layers
from keras.models ... | 22.039216 | 96 | 0.758897 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 370 | 0.329181 |
3e2e001920079b806a3731784374226e2f26379a | 1,194 | py | Python | migrations/versions/29e48091912e_remove_unique_constraint_from_user_table.py | GitauHarrison/somasoma_V1 | 2d74ad3b58f7e4ea5334e240d5bd30938f615e24 | [
"MIT"
] | null | null | null | migrations/versions/29e48091912e_remove_unique_constraint_from_user_table.py | GitauHarrison/somasoma_V1 | 2d74ad3b58f7e4ea5334e240d5bd30938f615e24 | [
"MIT"
] | 2 | 2021-11-11T19:04:10.000Z | 2021-11-11T19:08:42.000Z | migrations/versions/29e48091912e_remove_unique_constraint_from_user_table.py | GitauHarrison/somasoma_V1 | 2d74ad3b58f7e4ea5334e240d5bd30938f615e24 | [
"MIT"
] | 1 | 2021-09-09T13:44:26.000Z | 2021-09-09T13:44:26.000Z | """remove unique constraint from user table
Revision ID: 29e48091912e
Revises: f73df8de1f1f
Create Date: 2021-12-22 22:26:20.918461
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '29e48091912e'
down_revision = 'f73df8de1f1f'
branch_labels = None
depends_on = N... | 30.615385 | 83 | 0.69598 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 541 | 0.453099 |
3e2e6a8e43d315af581125fc3cb4dc17b915f7a7 | 6,065 | py | Python | VBx/models/resnet.py | Jamiroquai88/VBx | 35e7954ac0042ea445dcec657130e2c3c0b94ee0 | [
"Apache-2.0"
] | 145 | 2020-02-13T09:08:59.000Z | 2022-03-28T02:05:38.000Z | VBx/models/resnet.py | Jamiroquai88/VBx | 35e7954ac0042ea445dcec657130e2c3c0b94ee0 | [
"Apache-2.0"
] | 39 | 2021-01-12T02:49:37.000Z | 2022-02-17T18:49:54.000Z | VBx/models/resnet.py | Jamiroquai88/VBx | 35e7954ac0042ea445dcec657130e2c3c0b94ee0 | [
"Apache-2.0"
] | 44 | 2020-02-13T03:57:35.000Z | 2022-03-31T07:05:09.000Z | '''ResNet in PyTorch.
For Pre-activation ResNet, see 'preact_resnet.py'.
Reference:
[1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
Deep Residual Learning for Image Recognition. arXiv:1512.03385
'''
import torch
import torch.nn as nn
import torch.nn.functional as F
import math
class BasicBlock(nn.Module... | 40.433333 | 123 | 0.622754 | 5,572 | 0.918714 | 0 | 0 | 0 | 0 | 0 | 0 | 360 | 0.059357 |
3e345a0575b803502ed9bfed61051d0d9fb3fa57 | 5,159 | py | Python | bc/recruitment/utils.py | Buckinghamshire-Digital-Service/buckinghamshire-council | bbbdb52b515bcdfc79a2bd9198dfa4828405370e | [
"BSD-3-Clause"
] | 1 | 2021-02-27T07:27:17.000Z | 2021-02-27T07:27:17.000Z | bc/recruitment/utils.py | Buckinghamshire-Digital-Service/buckinghamshire-council | bbbdb52b515bcdfc79a2bd9198dfa4828405370e | [
"BSD-3-Clause"
] | null | null | null | bc/recruitment/utils.py | Buckinghamshire-Digital-Service/buckinghamshire-council | bbbdb52b515bcdfc79a2bd9198dfa4828405370e | [
"BSD-3-Clause"
] | 1 | 2021-06-09T15:56:54.000Z | 2021-06-09T15:56:54.000Z | import json
from django import forms
from django.contrib.postgres.search import SearchQuery, SearchRank, SearchVector
from django.core.exceptions import ValidationError
from django.db.models import F
from django.db.models.functions import ACos, Cos, Radians, Sin
import requests
from bc.recruitment.constants import J... | 34.393333 | 107 | 0.652064 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,203 | 0.233185 |
3e37452fb8273aa4b7fb354676b63c94081558fd | 7,264 | py | Python | classification/ClassificationModelLargeViz.py | geigerf/STAG_slim | 391e7a8031a7e128509f276113b19fd7f13897ec | [
"Apache-2.0"
] | null | null | null | classification/ClassificationModelLargeViz.py | geigerf/STAG_slim | 391e7a8031a7e128509f276113b19fd7f13897ec | [
"Apache-2.0"
] | null | null | null | classification/ClassificationModelLargeViz.py | geigerf/STAG_slim | 391e7a8031a7e128509f276113b19fd7f13897ec | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import shutil
import time, math, datetime, re
from collections import OrderedDict
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
import torch.optim
import torch.utils.data
import torchvision.transform... | 31.859649 | 135 | 0.56663 | 6,589 | 0.907076 | 0 | 0 | 76 | 0.010463 | 0 | 0 | 1,020 | 0.140419 |
3e38f387d0ad96aa627dd060a7aa1188e154c4a3 | 10,017 | py | Python | graphingVisHullTwoD.py | cm-1/2D-External-Visual-Hulls | 579e7d18d048d403b636d326840e5cb2a4e3a3e8 | [
"MIT"
] | 1 | 2022-02-10T07:07:35.000Z | 2022-02-10T07:07:35.000Z | graphingVisHullTwoD.py | cm-1/2D-External-Visual-Hulls | 579e7d18d048d403b636d326840e5cb2a4e3a3e8 | [
"MIT"
] | null | null | null | graphingVisHullTwoD.py | cm-1/2D-External-Visual-Hulls | 579e7d18d048d403b636d326840e5cb2a4e3a3e8 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
from visHullTwoD import Scene, SegmentType
#%%
def doubleFaceTest(f):
doubleFace = False
origHE = f.halfEdge
he = f.halfEdge.next
while he != origHE:
if f.index != he.leftFace.index:
doubleFace = True
break
he =... | 38.526923 | 311 | 0.605471 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,840 | 0.283518 |
3e3c50b123745c81d1f91068db3b602d8d3f128d | 5,966 | py | Python | dynamo/preprocessing/dynast.py | xing-lab-pitt/dynamo-release | 76c1f2a270dd6722b88f4700aac1a1a725a0c261 | [
"BSD-3-Clause"
] | 236 | 2019-07-09T22:06:21.000Z | 2022-03-31T17:56:07.000Z | dynamo/preprocessing/dynast.py | xing-lab-pitt/dynamo-release | 76c1f2a270dd6722b88f4700aac1a1a725a0c261 | [
"BSD-3-Clause"
] | 115 | 2019-07-12T19:06:21.000Z | 2022-03-31T17:34:18.000Z | dynamo/preprocessing/dynast.py | xing-lab-pitt/dynamo-release | 76c1f2a270dd6722b88f4700aac1a1a725a0c261 | [
"BSD-3-Clause"
] | 34 | 2019-07-10T03:34:04.000Z | 2022-03-22T12:44:22.000Z | import numpy as np
from scipy.sparse import issparse
from sklearn.utils import sparsefuncs
import anndata
from typing import Union
from ..dynamo_logger import LoggerManager, main_tqdm
from ..utils import copy_adata
def lambda_correction(
adata: anndata.AnnData,
lambda_key: str = "lambda",
inplace: bool = ... | 35.301775 | 120 | 0.578947 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,217 | 0.371606 |
3e3cee6ba011350960f8e52993ae0b2666144798 | 4,095 | py | Python | tests/fullscale/poroelasticity/cryer/TestCryer.py | cehanagan/pylith | cf5c1c34040460a82f79b6eb54df894ed1b1ee93 | [
"MIT"
] | 93 | 2015-01-08T16:41:22.000Z | 2022-02-25T13:40:02.000Z | tests/fullscale/poroelasticity/cryer/TestCryer.py | sloppyjuicy/pylith | ac2c1587f87e45c948638b19560813d4d5b6a9e3 | [
"MIT"
] | 277 | 2015-02-20T16:27:35.000Z | 2022-03-30T21:13:09.000Z | tests/fullscale/poroelasticity/cryer/TestCryer.py | sloppyjuicy/pylith | ac2c1587f87e45c948638b19560813d4d5b6a9e3 | [
"MIT"
] | 71 | 2015-03-24T12:11:08.000Z | 2022-03-03T04:26:02.000Z | #!/usr/bin/env nemesis
#
# ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University at Buffalo
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://g... | 31.022727 | 99 | 0.477656 | 2,313 | 0.564835 | 0 | 0 | 0 | 0 | 0 | 0 | 1,775 | 0.433455 |
3e3e8c87814094936e4351a80831e5bb8fce82f9 | 3,551 | py | Python | util/data.py | pinaryazgan/GDN | 469e63fa8c2dce596c6f7e99f2620ac6eec7dadf | [
"MIT"
] | 156 | 2021-03-01T12:49:25.000Z | 2022-03-28T08:27:33.000Z | util/data.py | pinaryazgan/GDN | 469e63fa8c2dce596c6f7e99f2620ac6eec7dadf | [
"MIT"
] | 24 | 2021-04-19T10:08:35.000Z | 2022-03-28T11:42:54.000Z | util/data.py | pinaryazgan/GDN | 469e63fa8c2dce596c6f7e99f2620ac6eec7dadf | [
"MIT"
] | 54 | 2021-04-16T17:26:30.000Z | 2022-03-28T06:08:43.000Z | # util functions about data
from scipy.stats import rankdata, iqr, trim_mean
from sklearn.metrics import f1_score, mean_squared_error
import numpy as np
from numpy import percentile
def get_attack_interval(attack):
heads = []
tails = []
for i in range(len(attack)):
if attack[i] == 1:
... | 28.18254 | 101 | 0.664602 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 484 | 0.1363 |
3e41a3d23f1cd5e224926d0f23ef2a864d4c94cb | 5,654 | py | Python | rrl-sysadmin/sysadmin.py | HyeokjuJang/sr-drl | 01fa8264c7b36f34f721303f455f37545dbce1fe | [
"MIT"
] | 14 | 2020-10-02T17:14:04.000Z | 2022-02-26T19:26:58.000Z | rrl-sysadmin/sysadmin.py | HyeokjuJang/sr-drl | 01fa8264c7b36f34f721303f455f37545dbce1fe | [
"MIT"
] | 1 | 2022-02-26T08:23:13.000Z | 2022-02-26T08:23:13.000Z | rrl-sysadmin/sysadmin.py | jaromiru/sr-drl | 01fa8264c7b36f34f721303f455f37545dbce1fe | [
"MIT"
] | 6 | 2021-05-04T13:24:12.000Z | 2021-12-06T12:51:30.000Z | import gym, random, copy, string, uuid
import numpy as np
rddl_template = string.Template('''
non-fluents nf_sysadmin_inst_$uid {
domain = sysadmin_mdp;
objects {
computer : {$objects};
};
non-fluents {
REBOOT-PROB = $reboot_prob;
$connections
};
}
instance sysadmin_inst_$uid {
domain = sysadmin_mdp;
non... | 25.241071 | 194 | 0.662363 | 4,342 | 0.767952 | 0 | 0 | 0 | 0 | 0 | 0 | 1,250 | 0.221082 |
3e43d8b9a039af747051e4f38665ccd61353394f | 3,974 | py | Python | core/language_modelling.py | lkwate/e-greedy-lm | 02e81fee93ee93faca0c1eb339b3c5ad55b4a639 | [
"MIT"
] | 1 | 2021-11-09T19:18:00.000Z | 2021-11-09T19:18:00.000Z | core/language_modelling.py | lkwate/e-greedy-lm | 02e81fee93ee93faca0c1eb339b3c5ad55b4a639 | [
"MIT"
] | null | null | null | core/language_modelling.py | lkwate/e-greedy-lm | 02e81fee93ee93faca0c1eb339b3c5ad55b4a639 | [
"MIT"
] | null | null | null | import torch
import torch.optim as optim
from transformers import AutoTokenizer
from .utils import epsilon_greedy_transform_label, uid_variance_fn, OPTIMIZER_DIC
import pytorch_lightning as pl
class RLLMLightningModule(pl.LightningModule):
def __init__(
self,
model,
action_table: torch.Lon... | 32.842975 | 87 | 0.638903 | 3,778 | 0.950679 | 0 | 0 | 0 | 0 | 0 | 0 | 177 | 0.04454 |
3e46f25a0298cc777cd9c283c93eaadaceb537e7 | 324 | py | Python | tests/test_client.py | yakhinvadim/enterprise-search-python | a2010e8773a6250cb81ea48f760088bb23466bb1 | [
"Apache-2.0"
] | null | null | null | tests/test_client.py | yakhinvadim/enterprise-search-python | a2010e8773a6250cb81ea48f760088bb23466bb1 | [
"Apache-2.0"
] | null | null | null | tests/test_client.py | yakhinvadim/enterprise-search-python | a2010e8773a6250cb81ea48f760088bb23466bb1 | [
"Apache-2.0"
] | null | null | null | from unittest import TestCase
from elastic_workplace_search.client import Client
class TestClient(TestCase):
dummy_authorization_token = 'authorization_token'
def setUp(self):
self.client = Client('authorization_token')
def test_constructor(self):
self.assertIsInstance(self.client, Clie... | 23.142857 | 53 | 0.756173 | 240 | 0.740741 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.12963 |
3e49611f7036088bee4b0176d2681701d3c8a29d | 4,437 | py | Python | test/hash_url.py | neotext/neotext-django-server | 7cfe98cd541ade9b26a1877f627e45a986b011e8 | [
"MIT"
] | null | null | null | test/hash_url.py | neotext/neotext-django-server | 7cfe98cd541ade9b26a1877f627e45a986b011e8 | [
"MIT"
] | 7 | 2015-11-30T02:59:23.000Z | 2016-10-06T15:52:52.000Z | test/hash_url.py | neotext/neotext-django-server | 7cfe98cd541ade9b26a1877f627e45a986b011e8 | [
"MIT"
] | null | null | null | from neotext.lib.neotext_quote_context.quote import Quote
t0 = Quote(
citing_quote="""<p>I am sick and tired of watching folks like Boris Johnson, Marine Le Pen, Donald Trump and others appeal to the worst racial instincts of our species, only to be shushed by folks telling me that it’s not <i>really</i> rac... | 90.55102 | 1,038 | 0.771918 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,979 | 0.893555 |
3e49ee4375c4fdbca12777a89f48b0e9f1e01d7a | 3,590 | py | Python | tests/imperative_vs_reactive/test_get_daily_average.py | BastiTee/bastis-python-toolbox | c313cf12607a973a1a8b8a9fbd73b2c8a47a82d8 | [
"Apache-2.0"
] | 1 | 2016-04-06T14:09:43.000Z | 2016-04-06T14:09:43.000Z | tests/imperative_vs_reactive/test_get_daily_average.py | BastiTee/bastis-python-toolbox | c313cf12607a973a1a8b8a9fbd73b2c8a47a82d8 | [
"Apache-2.0"
] | null | null | null | tests/imperative_vs_reactive/test_get_daily_average.py | BastiTee/bastis-python-toolbox | c313cf12607a973a1a8b8a9fbd73b2c8a47a82d8 | [
"Apache-2.0"
] | 1 | 2022-03-19T04:21:40.000Z | 2022-03-19T04:21:40.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Test suite for the daily average Toggl API process."""
from random import random
from tempfile import NamedTemporaryFile
from time import sleep, time
from unittest import TestCase
from recipes.imperative_vs_reactive.get_daily_average_imp import \
get_avg_daily_wor... | 39.450549 | 79 | 0.620334 | 3,078 | 0.857382 | 0 | 0 | 0 | 0 | 0 | 0 | 1,616 | 0.450139 |
3e4a37d31db8b27c20ff44c3b6b28b18b2dd20b1 | 4,077 | py | Python | pox/stats_monitor.py | nachtkatze/sdn-diagnosis | 22b187d276bf302ef5811abc946b1af125dd17bc | [
"Apache-2.0"
] | null | null | null | pox/stats_monitor.py | nachtkatze/sdn-diagnosis | 22b187d276bf302ef5811abc946b1af125dd17bc | [
"Apache-2.0"
] | null | null | null | pox/stats_monitor.py | nachtkatze/sdn-diagnosis | 22b187d276bf302ef5811abc946b1af125dd17bc | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Oscar Araque
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 36.72973 | 81 | 0.709345 | 0 | 0 | 0 | 0 | 484 | 0.118715 | 0 | 0 | 1,998 | 0.490066 |
3e4a39484ed02c469223ab4065ec6d989a83a302 | 7,623 | py | Python | tests/app_example.py | omarryhan/flask-stateless-auth | c6acefc55050d1a53235ead20cb7d5e9eb4bbf9a | [
"MIT"
] | 3 | 2018-09-13T19:55:47.000Z | 2018-09-15T18:31:22.000Z | tests/app_example.py | omarryhan/flask-stateless-auth | c6acefc55050d1a53235ead20cb7d5e9eb4bbf9a | [
"MIT"
] | null | null | null | tests/app_example.py | omarryhan/flask-stateless-auth | c6acefc55050d1a53235ead20cb7d5e9eb4bbf9a | [
"MIT"
] | null | null | null | import os
import datetime
import secrets
import json
from flask import Flask, abort, request, jsonify
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
from werkzeug.security import safe_str_cmp
from flask_stateless_auth import (
StatelessAuthError,
Sta... | 30.987805 | 88 | 0.674406 | 3,454 | 0.453102 | 0 | 0 | 4,154 | 0.54493 | 0 | 0 | 977 | 0.128165 |
3e4e3e3f65d730e416b620ade003178d96c61532 | 920 | py | Python | stereo/stereo.py | whaleygeek/microbit_python | 1fa8e0f34cfa2a92d7c5c32fc5ee5287c5d5b105 | [
"MIT"
] | 8 | 2016-11-15T23:04:25.000Z | 2021-05-17T17:42:47.000Z | stereo/stereo.py | whaleygeek/microbit_python | 1fa8e0f34cfa2a92d7c5c32fc5ee5287c5d5b105 | [
"MIT"
] | null | null | null | stereo/stereo.py | whaleygeek/microbit_python | 1fa8e0f34cfa2a92d7c5c32fc5ee5287c5d5b105 | [
"MIT"
] | null | null | null | from microbit import *
import music
A = False
B = False
PITCH = 440
# PIN2 read_analog()
ACTION_VALUE = 50
VOLUMEUP_VALUE = 150
VOLUMEDOWN_VALUE = 350
#nothing: 944
prev_l = False
prev_r = False
l = False
r = False
while True:
v = pin2.read_analog()
if v < ACTION_VALUE:
l,r = True, True
elif v <... | 18.77551 | 40 | 0.519565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.03587 |
3e50073943f2d59f2a64f9e25a36110605822852 | 1,062 | py | Python | comments/migrations/0004_auto_20170531_1011.py | salazarpardo/redinnovacion | 3f7c13af0af1887112a0492aea7782871fba0129 | [
"CC-BY-3.0"
] | null | null | null | comments/migrations/0004_auto_20170531_1011.py | salazarpardo/redinnovacion | 3f7c13af0af1887112a0492aea7782871fba0129 | [
"CC-BY-3.0"
] | null | null | null | comments/migrations/0004_auto_20170531_1011.py | salazarpardo/redinnovacion | 3f7c13af0af1887112a0492aea7782871fba0129 | [
"CC-BY-3.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('comments', '0003_comment_public'),
]
... | 34.258065 | 114 | 0.615819 | 920 | 0.86629 | 0 | 0 | 0 | 0 | 0 | 0 | 189 | 0.177966 |
3e50929d0bf53c378eb006069dd354ec7a7241ac | 1,096 | py | Python | hospital/migrations/0011_auto_20210502_1057.py | Shreyashm16/Hospital-Appointment-and-Information-System | 929b7eb22cc6a0399e6fff3c7012d1c65d7c47cb | [
"MIT"
] | 7 | 2021-07-15T08:59:58.000Z | 2021-12-29T20:21:36.000Z | hospital/migrations/0011_auto_20210502_1057.py | siddharth25pandey/Hospital-Information-Appointment-System | 1df5edd1f0dc2f0f385e7195db221027b4f64efb | [
"MIT"
] | null | null | null | hospital/migrations/0011_auto_20210502_1057.py | siddharth25pandey/Hospital-Information-Appointment-System | 1df5edd1f0dc2f0f385e7195db221027b4f64efb | [
"MIT"
] | 4 | 2021-05-11T08:36:02.000Z | 2021-08-08T11:45:11.000Z | # Generated by Django 3.1.5 on 2021-05-02 05:27
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('hospital', '0010_appointment_finished'),
]
operations = [
migrations.RemoveField(
model_name='a... | 34.25 | 148 | 0.583942 | 970 | 0.885036 | 0 | 0 | 0 | 0 | 0 | 0 | 255 | 0.232664 |
3e509827f57ba47184b958f8189726f8a1765c22 | 87 | py | Python | division.py | ReverseScale/PyDemo | 9cc6f3cbb8482f6e403bf65419537b0163798e61 | [
"MIT"
] | null | null | null | division.py | ReverseScale/PyDemo | 9cc6f3cbb8482f6e403bf65419537b0163798e61 | [
"MIT"
] | null | null | null | division.py | ReverseScale/PyDemo | 9cc6f3cbb8482f6e403bf65419537b0163798e61 | [
"MIT"
] | null | null | null | try:
print(5/0)
except ZeroDivisionError:
print('你是啥子吗!')
else:
print('算了') | 14.5 | 25 | 0.62069 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.257426 |
3e522957a432795bf32198db1cc68b1e2615e3f9 | 1,924 | py | Python | Script/calculate_RMSD.py | dhruvsangamwar/Protein-structure-prediction | 99364bfd62f8293ddbe8e2c9a86ca7850b270d44 | [
"MIT"
] | 1 | 2022-01-30T08:20:08.000Z | 2022-01-30T08:20:08.000Z | Script/calculate_RMSD.py | dhruvsangamwar/ECS_129_Protein-structure-prediction | 99364bfd62f8293ddbe8e2c9a86ca7850b270d44 | [
"MIT"
] | null | null | null | Script/calculate_RMSD.py | dhruvsangamwar/ECS_129_Protein-structure-prediction | 99364bfd62f8293ddbe8e2c9a86ca7850b270d44 | [
"MIT"
] | null | null | null | import pdbCleanup as pc
import fxndefinitions as f
import numpy as np
from numpy.linalg import eig
pc.takeInput1()
DataFrame1 = []
pc.CsvToDataframe(DataFrame1)
pc.takeInput2()
DataFrame2 = []
pc.CsvToDataframe(DataFrame2)
xtil = [0, 0, 0]
ytil = [0, 0, 0]
x = np.array(DataFrame1)
y = np.array(DataFrame2)
# This f... | 24.666667 | 67 | 0.613825 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 499 | 0.259356 |
3e52b2bc37f4905d4ab47d9e200507510863fee4 | 626 | py | Python | Python/Data Structure and Algorithm/Krish Naik/Amazon Que.py | omkarsutar1255/Python-Data | 169d0c54b23d9dd5a7f1aea41ab385121c3b3c63 | [
"CC-BY-3.0"
] | null | null | null | Python/Data Structure and Algorithm/Krish Naik/Amazon Que.py | omkarsutar1255/Python-Data | 169d0c54b23d9dd5a7f1aea41ab385121c3b3c63 | [
"CC-BY-3.0"
] | null | null | null | Python/Data Structure and Algorithm/Krish Naik/Amazon Que.py | omkarsutar1255/Python-Data | 169d0c54b23d9dd5a7f1aea41ab385121c3b3c63 | [
"CC-BY-3.0"
] | null | null | null | # l1 = [1095, 1094, 1095]
# del l1[:]
# l1.extend([1005, 1094, 1095])
# print(l1)
l1 = [8676, 4444, 3333, 2222, 1111]
for i, n in enumerate(l1):
print(i, n)
if int(n / 1000) == 1:
l1[i] = n + 8000
elif int(n / 1000) == 2:
l1[i] = n + 6000
elif int(n / 1000) == 3:
l1[i] = n + 40... | 21.586207 | 35 | 0.4377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 78 | 0.124601 |