hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
059f19fa9902c2e06c87d1308dfb3c2faf668b88 | 11,121 | py | Python | model_zoo/research/cv/FaceDetection/src/FaceDetection/yolo_loss.py | GuoSuiming/mindspore | 48afc4cfa53d970c0b20eedfb46e039db2a133d5 | [
"Apache-2.0"
] | 55 | 2020-12-17T10:26:06.000Z | 2022-03-28T07:18:26.000Z | model_zoo/research/cv/FaceDetection/src/FaceDetection/yolo_loss.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | null | null | null | model_zoo/research/cv/FaceDetection/src/FaceDetection/yolo_loss.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | 14 | 2021-01-29T02:39:47.000Z | 2022-03-23T05:00:26.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# 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... | 39.860215 | 118 | 0.61829 |
570f1ff62278f48c4d5bc9de8481d8f78bd958a9 | 17,045 | py | Python | tensor2tensor/rl/trainer_model_based.py | angelfish91/tensor2tensor | 168928d29cdd887fd6cdd5d5ad35181bef614154 | [
"Apache-2.0"
] | 1 | 2018-12-12T03:20:15.000Z | 2018-12-12T03:20:15.000Z | tensor2tensor/rl/trainer_model_based.py | angelfish91/tensor2tensor | 168928d29cdd887fd6cdd5d5ad35181bef614154 | [
"Apache-2.0"
] | null | null | null | tensor2tensor/rl/trainer_model_based.py | angelfish91/tensor2tensor | 168928d29cdd887fd6cdd5d5ad35181bef614154 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 32.343454 | 84 | 0.723673 |
4d3fb74ca65dfc00faf3136555071bc3db036c89 | 494 | py | Python | AppServer/lib/django-1.4/tests/regressiontests/urlpatterns_reverse/urlconf_inner.py | loftwah/appscale | 586fc1347ebc743d7a632de698f4dbfb09ae38d6 | [
"Apache-2.0"
] | 790 | 2015-01-03T02:13:39.000Z | 2020-05-10T19:53:57.000Z | AppServer/lib/django-1.4/tests/regressiontests/urlpatterns_reverse/urlconf_inner.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 1,361 | 2015-01-08T23:09:40.000Z | 2020-04-14T00:03:04.000Z | AppServer/lib/django-1.4/tests/regressiontests/urlpatterns_reverse/urlconf_inner.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 155 | 2015-01-08T22:59:31.000Z | 2020-04-08T08:01:53.000Z | from django.conf.urls import patterns, url
from django.template import Template, Context
from django.http import HttpResponse
def inner_view(request):
content = Template('{% load url from future %}'
'{% url "outer" as outer_url %}outer:{{ outer_url }},'
'{% url "inner"... | 38 | 95 | 0.637652 |
b80580c0abf6d05197b734bf6bb773f3f990830c | 104 | py | Python | tests/test_settings_example.py | HotMaps/building_h-c | db5a103cb9d41b88e6cdc3c9194fc1ec9fc5c31f | [
"Apache-2.0"
] | 1 | 2017-05-12T11:31:09.000Z | 2017-05-12T11:31:09.000Z | tests/test_settings_example.py | HotMaps/HotMaps-building_h-c | db5a103cb9d41b88e6cdc3c9194fc1ec9fc5c31f | [
"Apache-2.0"
] | 2 | 2017-08-22T13:53:22.000Z | 2017-09-25T07:27:28.000Z | tests/test_settings_example.py | HotMaps/Hotmaps-building_h-c | db5a103cb9d41b88e6cdc3c9194fc1ec9fc5c31f | [
"Apache-2.0"
] | null | null | null | # TODO: set up the URL of your localhost (specially the port)
base_url = "http://localhost:9006/api/v1"
| 34.666667 | 61 | 0.730769 |
2b3d7f5404628d033869ccf82766023215e7b25c | 3,760 | py | Python | scripts/crawl.py | joye1503/cocrawler | 39b543320e91477412ab8bfc8402c88c3304c553 | [
"Apache-2.0"
] | 166 | 2016-07-18T19:37:34.000Z | 2022-03-06T18:26:50.000Z | scripts/crawl.py | joye1503/cocrawler | 39b543320e91477412ab8bfc8402c88c3304c553 | [
"Apache-2.0"
] | 9 | 2016-10-22T18:20:56.000Z | 2021-04-06T05:28:04.000Z | scripts/crawl.py | joye1503/cocrawler | 39b543320e91477412ab8bfc8402c88c3304c553 | [
"Apache-2.0"
] | 25 | 2017-02-28T19:41:41.000Z | 2021-07-10T11:20:33.000Z | #!/usr/bin/env python
'''
CoCrawler web crawler, main program
'''
import sys
import os
import faulthandler
import gc
import argparse
import asyncio
import logging
import warnings
import cocrawler
import cocrawler.config as config
import cocrawler.stats as stats
import cocrawler.timer as timer
import cocrawler.webser... | 31.596639 | 117 | 0.695479 |
13433486bc8d2d952f3eb3478cf5e6b66de45dcb | 8,100 | py | Python | hc/api/models.py | Masterabram/healthchecks | 229d72eb4bc7d21bfd9540a75093abad7fbc45ca | [
"BSD-3-Clause"
] | null | null | null | hc/api/models.py | Masterabram/healthchecks | 229d72eb4bc7d21bfd9540a75093abad7fbc45ca | [
"BSD-3-Clause"
] | null | null | null | hc/api/models.py | Masterabram/healthchecks | 229d72eb4bc7d21bfd9540a75093abad7fbc45ca | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
import hashlib
import json
import uuid
from datetime import timedelta as td
from django.conf import settings
from django.contrib.auth.models import User
from django.db import models
from django.urls import reverse
from django.utils import timezone
from hc.api import transports
from hc.lib import email... | 30.451128 | 78 | 0.610494 |
9639537114eb5c830ebb458cab101c4d5d6aa895 | 1,773 | py | Python | plugins/quetz_conda_suggest/tests/conftest.py | davidbrochart/quetz | fd9b95add5b8f7a1c0863e7e08bf5a6ab5b84984 | [
"BSD-3-Clause"
] | null | null | null | plugins/quetz_conda_suggest/tests/conftest.py | davidbrochart/quetz | fd9b95add5b8f7a1c0863e7e08bf5a6ab5b84984 | [
"BSD-3-Clause"
] | null | null | null | plugins/quetz_conda_suggest/tests/conftest.py | davidbrochart/quetz | fd9b95add5b8f7a1c0863e7e08bf5a6ab5b84984 | [
"BSD-3-Clause"
] | null | null | null | import json
import uuid
from pytest import fixture
from quetz_conda_suggest import db_models
from quetz import rest_models
from quetz.dao import Dao
from quetz.db_models import User
pytest_plugins = "quetz.testing.fixtures"
@fixture
def dao(db) -> Dao:
return Dao(db)
@fixture
def user(db):
user = User(id... | 17.382353 | 64 | 0.628878 |
3aced571fc5351bb6103362ca8f15cd07bffb283 | 3,143 | py | Python | isi_sdk_8_1_0/isi_sdk_8_1_0/models/namespace_metadata_list.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_1_0/isi_sdk_8_1_0/models/namespace_metadata_list.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_1_0/isi_sdk_8_1_0/models/namespace_metadata_list.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 5
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_1_0.models.namespa... | 27.330435 | 108 | 0.576837 |
79a54b8309acaba05eae21a4586ae2929f352cfb | 3,816 | py | Python | TwScraper.py | EKOzkan/TwScraper | e5239a67edd30047ced8ff1aef489580b36104bd | [
"MIT"
] | null | null | null | TwScraper.py | EKOzkan/TwScraper | e5239a67edd30047ced8ff1aef489580b36104bd | [
"MIT"
] | null | null | null | TwScraper.py | EKOzkan/TwScraper | e5239a67edd30047ced8ff1aef489580b36104bd | [
"MIT"
] | null | null | null | import threading
import webview
import eel
import twint
from textblob import TextBlob
import datetime
import csv
print('TwScraper started.')
def Analyzer(num):
eel.init('web')
@eel.expose
def start_calculating(tw_hashtags,tw_username,tw_startdate,tw_enddate,tw_sentimental):
printer(t... | 33.182609 | 116 | 0.537998 |
96e98573f3a352b6931a5d5177faf2570501dfcc | 3,823 | py | Python | yt_dlp/extractor/videocampus_sachsen.py | jeroenj/yt-dlp | 11078c6d571673a0f09e21933f4ad1e6fcc35456 | [
"Unlicense"
] | 2 | 2022-03-14T15:34:14.000Z | 2022-03-23T17:05:42.000Z | yt_dlp/extractor/videocampus_sachsen.py | jeroenj/yt-dlp | 11078c6d571673a0f09e21933f4ad1e6fcc35456 | [
"Unlicense"
] | null | null | null | yt_dlp/extractor/videocampus_sachsen.py | jeroenj/yt-dlp | 11078c6d571673a0f09e21933f4ad1e6fcc35456 | [
"Unlicense"
] | 2 | 2022-01-05T08:23:25.000Z | 2022-03-06T21:33:37.000Z | # coding: utf-8
from .common import InfoExtractor
class VideocampusSachsenIE(InfoExtractor):
_VALID_URL = r'''(?x)https?://videocampus\.sachsen\.de/(?:
m/(?P<tmp_id>[0-9a-f]+)|
(?:category/)?video/(?P<display_id>[\w-]+)/(?P<id>[0-9a-f]{32})
)'''
_TESTS = [
{
'url': 'ht... | 39.412371 | 183 | 0.578865 |
0a4d8624688d18e95273b8e96ac3c408930313c8 | 458 | py | Python | gcode_cflow/config.py | gluap/gcode_cflow | d7acf9aca591d5f1cbe39e85719ff55fdcc40c68 | [
"MIT"
] | null | null | null | gcode_cflow/config.py | gluap/gcode_cflow | d7acf9aca591d5f1cbe39e85719ff55fdcc40c68 | [
"MIT"
] | null | null | null | gcode_cflow/config.py | gluap/gcode_cflow | d7acf9aca591d5f1cbe39e85719ff55fdcc40c68 | [
"MIT"
] | null | null | null | from pathlib import Path
from typing import List
import yaml
from pydantic import BaseModel
class Config(BaseModel):
values_speeds: List[float]
values_extruded: List[float]
def load_config(path: Path):
config = None
with path.open("r") as stream:
try:
config = yaml.safe_load(str... | 21.809524 | 66 | 0.674672 |
117d04c88f677a42e3c76548757126bf7749925f | 29,859 | py | Python | homeassistant/components/homematic/__init__.py | da-anda/home-assistant | 04de22613c57e98c75315e6323833dc361399b53 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/homematic/__init__.py | da-anda/home-assistant | 04de22613c57e98c75315e6323833dc361399b53 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/homematic/__init__.py | da-anda/home-assistant | 04de22613c57e98c75315e6323833dc361399b53 | [
"Apache-2.0"
] | null | null | null | """
Support for HomeMatic devices.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/homematic/
"""
import asyncio
from datetime import timedelta
from functools import partial
import logging
import os
import socket
import voluptuous as vol
from homeassis... | 33.474215 | 79 | 0.627851 |
8558f18ec58068de9f04bde71b1d2081307c1751 | 1,041 | py | Python | db_manager.py | netarachelhershko/crawler | 22a5b41a768fae7415ad30cc6aec97063f2d07ce | [
"MIT"
] | null | null | null | db_manager.py | netarachelhershko/crawler | 22a5b41a768fae7415ad30cc6aec97063f2d07ce | [
"MIT"
] | null | null | null | db_manager.py | netarachelhershko/crawler | 22a5b41a768fae7415ad30cc6aec97063f2d07ce | [
"MIT"
] | null | null | null | from schemas.url import Url, Base
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
class DBManager(object):
""" Managed the db session """
def __init__(self, db_file):
"""
:param db_file: Database file to open
"""
self.engine = create_engine('sqlite:... | 29.742857 | 72 | 0.608069 |
5f5d85a298e9d70ff56c323525421b27ed4cbddd | 10,141 | py | Python | pineboolib/application/acls/pnaccesscontrollists.py | juanjosepablos/pineboo | f6ce515aec6e0139821bb9c1d62536d9fb50dae4 | [
"MIT"
] | null | null | null | pineboolib/application/acls/pnaccesscontrollists.py | juanjosepablos/pineboo | f6ce515aec6e0139821bb9c1d62536d9fb50dae4 | [
"MIT"
] | 1 | 2017-10-30T22:00:48.000Z | 2017-11-11T19:34:32.000Z | pineboolib/application/acls/pnaccesscontrollists.py | juanjosepablos/pineboo | f6ce515aec6e0139821bb9c1d62536d9fb50dae4 | [
"MIT"
] | 1 | 2017-10-30T20:16:38.000Z | 2017-10-30T20:16:38.000Z | # -*- coding: utf-8 -*-
"""
PNAccessControlList Module.
Manage access lists to limit the application to users..
"""
from PyQt5 import QtCore, QtXml, QtWidgets
from pineboolib import application
from pineboolib.application.database import pnsqlquery
from . import pnaccesscontrolfactory
from pineboolib import loggin... | 35.707746 | 123 | 0.621241 |
0639333ab87b70f011e7665281e39c4a01da778c | 9,737 | py | Python | lakefs/client.py | treeverse/lakeFS-hooks | fd24373eff7085bd941543e595e1024cb398304a | [
"Apache-2.0"
] | 6 | 2021-03-02T15:13:31.000Z | 2021-04-13T10:19:12.000Z | lakefs/client.py | treeverse/lakeFS-hooks | fd24373eff7085bd941543e595e1024cb398304a | [
"Apache-2.0"
] | 1 | 2021-04-05T13:44:03.000Z | 2021-04-05T13:44:03.000Z | lakefs/client.py | treeverse/lakeFS-hooks | fd24373eff7085bd941543e595e1024cb398304a | [
"Apache-2.0"
] | 1 | 2021-12-04T20:22:37.000Z | 2021-12-04T20:22:37.000Z | import datetime
from collections import namedtuple
from typing import Iterator, Union, Tuple
import lakefs_client
from lakefs_client.client import LakeFSClient
from lakefs_client.exceptions import NotFoundException
from pyarrow import NativeFile, BufferReader
from pyarrow.fs import PyFileSystem, FileInfo, FileType, F... | 38.334646 | 117 | 0.630584 |
d21df65762eda85ca481063fa1e8b1c667c4b45a | 7,664 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_compute_management_client.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 1 | 2021-06-02T08:01:35.000Z | 2021-06-02T08:01:35.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_compute_management_client.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_compute_management_client.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 60.346457 | 146 | 0.7881 |
a726e8dca6572f1c1947d23164f0b000af527bb4 | 3,855 | py | Python | src/utils.py | asedeki/newflow | d8d749e2569babc41f27869bd368fd99f6c1cb5c | [
"Unlicense"
] | null | null | null | src/utils.py | asedeki/newflow | d8d749e2569babc41f27869bd368fd99f6c1cb5c | [
"Unlicense"
] | null | null | null | src/utils.py | asedeki/newflow | d8d749e2569babc41f27869bd368fd99f6c1cb5c | [
"Unlicense"
] | null | null | null | import difflib
from numba import jit, njit
# import future.concurrent
def best_match_dict(parameters: dict, match_param_keys) -> dict:
_best_match_dict = dict()
for param in parameters.keys():
v = difflib.get_close_matches(param, match_param_keys, n=1)
if v:
_best_match_dict[v[0]... | 35.694444 | 74 | 0.375875 |
e9c60ee8401173e511d049e9b40ce1be0bdd6ef9 | 2,355 | py | Python | feature.py | devashishp/Content-Based-Image-Retrieval | 86f08255694452d7fd2abaf5ab595f5f3f4e6a18 | [
"MIT"
] | 12 | 2017-06-30T03:23:16.000Z | 2020-10-23T13:03:01.000Z | feature.py | devashishp/Content-Based-Image-Retrieval | 86f08255694452d7fd2abaf5ab595f5f3f4e6a18 | [
"MIT"
] | null | null | null | feature.py | devashishp/Content-Based-Image-Retrieval | 86f08255694452d7fd2abaf5ab595f5f3f4e6a18 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from matplotlib import pyplot as plt
from prelib import preprocess
import pywt
def segment(img):
seg = []
for i in range(4):
for j in range(4):
start = i*128
start1 = j*128
end = start+128
end1 = start1+128
seg.a... | 32.260274 | 123 | 0.547771 |
64aa8bb3565187c84236c3a9ccf44faf0c94206b | 3,341 | py | Python | tmp/utils/utils.py | hanzhichao/runnerz | 3a42b7281972871b16c6347a2e233c5215047b08 | [
"MIT"
] | null | null | null | tmp/utils/utils.py | hanzhichao/runnerz | 3a42b7281972871b16c6347a2e233c5215047b08 | [
"MIT"
] | 2 | 2021-03-31T19:45:39.000Z | 2021-12-13T20:43:55.000Z | tmp/utils/utils.py | hanzhichao/runnerz | 3a42b7281972871b16c6347a2e233c5215047b08 | [
"MIT"
] | null | null | null | import os
import yaml
from string import Template
import operator
import importlib
from logz import log
from tmp.keywords import ACTION, SUB_STEPS, FUNCTIONS, VAIABLES
BASEDIR = os.path.dirname(os.path.dirname(__file__))
FIXTURES_FILE = 'fixtures'
def get_section(data, keywords):
if not isinstance(keywords, ... | 29.566372 | 84 | 0.611194 |
203f48aecc6df8b64abe2500c4624ec959881814 | 60,493 | py | Python | pymatgen/ext/matproj.py | oxana-a/pymatgen | 69393c5fbf88c3e9f148a91c090b4e2f02ac664d | [
"MIT"
] | 1 | 2021-07-23T05:38:15.000Z | 2021-07-23T05:38:15.000Z | pymatgen/ext/matproj.py | nicon2000/pymatgen | ca6a6110f9fa0076e2088050cd96b14d702c0801 | [
"MIT"
] | null | null | null | pymatgen/ext/matproj.py | nicon2000/pymatgen | ca6a6110f9fa0076e2088050cd96b14d702c0801 | [
"MIT"
] | null | null | null | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import sys
import itertools
import json
import platform
import re
import warnings
from time import sleep
from monty.json import MontyDecoder, MontyEncoder
from copy import deepcopy
from pymatgen import SETT... | 43.302076 | 103 | 0.577538 |
4b3650bc91e9c78f75a141e2872db660e79886e1 | 4,041 | py | Python | models/AI-Model-Zoo/VAI-1.3-Model-Zoo-Code/caffe/cf_facerec-resnet20_112_96_3.5G_1.3/code/example/api/detect_api.py | guochunhe/Vitis-AI | e86b6efae11f8703ee647e4a99004dc980b84989 | [
"Apache-2.0"
] | 1 | 2020-12-18T14:49:19.000Z | 2020-12-18T14:49:19.000Z | models/AI-Model-Zoo/VAI-1.3-Model-Zoo-Code/caffe/cf_facerec-resnet20_112_96_3.5G_1.3/code/get_aligned_face/api/detect_api.py | guochunhe/Vitis-AI | e86b6efae11f8703ee647e4a99004dc980b84989 | [
"Apache-2.0"
] | null | null | null | models/AI-Model-Zoo/VAI-1.3-Model-Zoo-Code/caffe/cf_facerec-resnet20_112_96_3.5G_1.3/code/get_aligned_face/api/detect_api.py | guochunhe/Vitis-AI | e86b6efae11f8703ee647e4a99004dc980b84989 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Xilinx Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 32.58871 | 108 | 0.640188 |
32b4fff532501c706b6557bb9fbd318c66a721b0 | 412 | py | Python | patterns/singletons/singleton_metaclass.py | wswld/notes | 02be683821792dec785d0bd9a6dfa1b7236a6321 | [
"MIT"
] | null | null | null | patterns/singletons/singleton_metaclass.py | wswld/notes | 02be683821792dec785d0bd9a6dfa1b7236a6321 | [
"MIT"
] | null | null | null | patterns/singletons/singleton_metaclass.py | wswld/notes | 02be683821792dec785d0bd9a6dfa1b7236a6321 | [
"MIT"
] | null | null | null | # Singleton through a metaclass. Requires Python 3
class Singleton(type):
_instances = {}
def __call__(cls, *args, **kwargs):
if cls not in cls._instances:
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
return cls._instances[cls]
class Logger(metaclass=Sin... | 17.913043 | 81 | 0.648058 |
f121cd71641f43cb549be04b6288bd73382a0f7b | 4,596 | py | Python | contrib/docker/harvester/count_field_unique_value.py | meertensinstituut/ckan | 91f0d441baac1e835d529dac8f037c324d8e1281 | [
"Apache-2.0"
] | null | null | null | contrib/docker/harvester/count_field_unique_value.py | meertensinstituut/ckan | 91f0d441baac1e835d529dac8f037c324d8e1281 | [
"Apache-2.0"
] | 1 | 2019-02-20T10:23:18.000Z | 2019-02-20T10:23:18.000Z | contrib/docker/harvester/count_field_unique_value.py | meertensinstituut/ckan | 91f0d441baac1e835d529dac8f037c324d8e1281 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import urllib2
import json
import xml.etree.ElementTree as et
from os import listdir
from os.path import isfile, join
import time
from pprint import pprint
from xmljson import badgerfish as bf
import re
import sys
import import_xml_to_ckan_util as importlib
story_fields = ['identifier', 'title... | 29.273885 | 103 | 0.579417 |
b5c09a263911d6800f5036e418fb1c01439ee1d4 | 4,219 | py | Python | tests/Cpl/Dm/TShell/_0test/windows/mingw_w64/mytoolchain.py | johnttaylor/foxtail | 86e4e1d19d5e8f9c1d1064cf0939f4bf62615400 | [
"BSD-3-Clause"
] | null | null | null | tests/Cpl/Dm/TShell/_0test/windows/mingw_w64/mytoolchain.py | johnttaylor/foxtail | 86e4e1d19d5e8f9c1d1064cf0939f4bf62615400 | [
"BSD-3-Clause"
] | null | null | null | tests/Cpl/Dm/TShell/_0test/windows/mingw_w64/mytoolchain.py | johnttaylor/foxtail | 86e4e1d19d5e8f9c1d1064cf0939f4bf62615400 | [
"BSD-3-Clause"
] | null | null | null | #---------------------------------------------------------------------------
# This python module is used to customize a supported toolchain for your
# project specific settings.
#
# Notes:
# - ONLY edit/add statements in the sections marked by BEGIN/END EDITS
# markers.
# - Maintain indentation level and u... | 30.352518 | 95 | 0.593269 |
5ca712db7fd82d40cc19deddd291413c2fca8c6b | 1,680 | py | Python | bin/scrape_software_versions.py | BioDragao/trigenome-analysis-nf | 76f69d9e780050a47544b77bfed30de93d357466 | [
"MIT"
] | null | null | null | bin/scrape_software_versions.py | BioDragao/trigenome-analysis-nf | 76f69d9e780050a47544b77bfed30de93d357466 | [
"MIT"
] | null | null | null | bin/scrape_software_versions.py | BioDragao/trigenome-analysis-nf | 76f69d9e780050a47544b77bfed30de93d357466 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
from collections import OrderedDict
import re
# TODO nf-core: Add additional regexes for new tools in process get_software_versions
regexes = {
'nf-core/trigenome': ['v_pipeline.txt', r"(\S+)"],
'Nextflow': ['v_nextflow.txt', r"(\S+)"],
'FastQC': ... | 31.698113 | 85 | 0.623214 |
aef4e14243052b8e5349ea9b4240a5f1147cdb59 | 56 | py | Python | __init__.py | OdooTestNet/School-Mangement | 3c613a2ecdb88965d847acd294e70a875f5af5e2 | [
"Unlicense"
] | null | null | null | __init__.py | OdooTestNet/School-Mangement | 3c613a2ecdb88965d847acd294e70a875f5af5e2 | [
"Unlicense"
] | null | null | null | __init__.py | OdooTestNet/School-Mangement | 3c613a2ecdb88965d847acd294e70a875f5af5e2 | [
"Unlicense"
] | null | null | null | from.import model
from.import wizard
from.import reports | 18.666667 | 19 | 0.857143 |
7b0abdc0ba9ef9c1fde7a0f0b003db2e5f729e7f | 2,325 | py | Python | lambdasoc/periph/timer.py | supersat/lambdasoc | c2662ef4cf485330dd137e1993394416c5497de5 | [
"BSD-2-Clause"
] | 1 | 2021-09-15T00:38:20.000Z | 2021-09-15T00:38:20.000Z | lambdasoc/periph/timer.py | supersat/lambdasoc | c2662ef4cf485330dd137e1993394416c5497de5 | [
"BSD-2-Clause"
] | null | null | null | lambdasoc/periph/timer.py | supersat/lambdasoc | c2662ef4cf485330dd137e1993394416c5497de5 | [
"BSD-2-Clause"
] | 2 | 2021-10-10T23:05:25.000Z | 2021-12-17T05:57:56.000Z | from nmigen import *
from . import Peripheral
__all__ = ["TimerPeripheral"]
class TimerPeripheral(Peripheral, Elaboratable):
"""Timer peripheral.
A general purpose down-counting timer peripheral.
CSR registers
-------------
reload : read/write
Reload value of counter. When `ctr` reach... | 28.703704 | 100 | 0.556129 |
6ab71e0f32a9d37aad12c4ed1e52efaf0815a17c | 432 | py | Python | output/models/nist_data/atomic/string/schema_instance/nistschema_sv_iv_atomic_string_length_3_xsd/nistschema_sv_iv_atomic_string_length_3.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/nist_data/atomic/string/schema_instance/nistschema_sv_iv_atomic_string_length_3_xsd/nistschema_sv_iv_atomic_string_length_3.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/nist_data/atomic/string/schema_instance/nistschema_sv_iv_atomic_string_length_3_xsd/nistschema_sv_iv_atomic_string_length_3.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
__NAMESPACE__ = "NISTSchema-SV-IV-atomic-string-length-3-NS"
@dataclass
class NistschemaSvIvAtomicStringLength3:
class Meta:
name = "NISTSchema-SV-IV-atomic-string-length-3"
namespace = "NISTSchema-SV-IV-atomic-string-length-3-NS"
value: str = field(
... | 22.736842 | 64 | 0.622685 |
70c21fc5c68aadb4b14cd80409b077ed44b800cc | 978 | py | Python | kubernetes/test/test_v1_volume_attachment.py | redjohn/python | 5e512ff564c244c50cab780d821542ed56aa965a | [
"Apache-2.0"
] | 1 | 2019-04-14T23:51:35.000Z | 2019-04-14T23:51:35.000Z | kubernetes/test/test_v1_volume_attachment.py | redjohn/python | 5e512ff564c244c50cab780d821542ed56aa965a | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_volume_attachment.py | redjohn/python | 5e512ff564c244c50cab780d821542ed56aa965a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.14.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 21.733333 | 105 | 0.713701 |
1a966ceee40551999606fa2ef4b1b09a1d8d532f | 1,374 | py | Python | tubbymemes/cli/mod.py | lalanza808/suchwowx | eea72168dbcadb13de3c309d135b0fb9137b62ad | [
"MIT"
] | 2 | 2021-12-13T16:49:53.000Z | 2022-01-16T21:22:45.000Z | tubbymemes/cli/mod.py | lalanza808/suchwowx | eea72168dbcadb13de3c309d135b0fb9137b62ad | [
"MIT"
] | null | null | null | tubbymemes/cli/mod.py | lalanza808/suchwowx | eea72168dbcadb13de3c309d135b0fb9137b62ad | [
"MIT"
] | 1 | 2022-03-12T02:40:53.000Z | 2022-03-12T02:40:53.000Z | import click
from flask import Blueprint
from tubbymemes.models import User
from tubbymemes.factory import db
bp = Blueprint('mod', 'mod')
@bp.cli.command('list')
def list():
"""
List current server moderators.
"""
for mod in User.query.filter(User.moderator == True):
click.echo(f'{mod.id} ... | 25.444444 | 76 | 0.60262 |
30a94ab7f99b995765a15eecdfe6a9efb7d446f2 | 702 | py | Python | maxArea.py | KFavour/geeksforgeeks | f920701b622ff56cf584f9c462b5afe2e2dfe6fb | [
"MIT"
] | null | null | null | maxArea.py | KFavour/geeksforgeeks | f920701b622ff56cf584f9c462b5afe2e2dfe6fb | [
"MIT"
] | null | null | null | maxArea.py | KFavour/geeksforgeeks | f920701b622ff56cf584f9c462b5afe2e2dfe6fb | [
"MIT"
] | null | null | null | def maxArea(A,le):
#code here
Area_max = 0
for i in range(le):
first = A[i]
if A[i] > Area_max/(le-i) or A[i] <= Area_max/i:
for j in range(i+1, le):
second = A[j]
if second > first:
Area = first*abs(i-j)
else:
... | 33.428571 | 167 | 0.444444 |
dec55a866ca1c06f9e673f40b2520e65f6a19c68 | 2,169 | py | Python | saml2idp/xml_signing.py | anentropic/django-saml2-idp | a2810de839b26cf740a7b1ad3e00658498ce4d22 | [
"MIT"
] | null | null | null | saml2idp/xml_signing.py | anentropic/django-saml2-idp | a2810de839b26cf740a7b1ad3e00658498ce4d22 | [
"MIT"
] | 1 | 2016-11-09T13:32:44.000Z | 2019-01-31T19:06:05.000Z | saml2idp/xml_signing.py | anentropic/django-saml2-idp | a2810de839b26cf740a7b1ad3e00658498ce4d22 | [
"MIT"
] | null | null | null | """
Signing code goes here.
"""
# python:
import hashlib
import logging
import string
# other libraries:
import M2Crypto
# this app:
import saml2idp_metadata
from codex import nice64
from xml_templates import SIGNED_INFO, SIGNATURE
def load_cert_data(certificate_file):
"""
Returns the certificate data out of t... | 32.373134 | 97 | 0.713232 |
a519f2bb9fd08b68adea481a217379196719080d | 2,285 | py | Python | python_crash_course/classes/user.py | heniu1985/Learning | e865d59df9c4b1b0d7fc0158635c2a035f20bd4f | [
"MIT"
] | null | null | null | python_crash_course/classes/user.py | heniu1985/Learning | e865d59df9c4b1b0d7fc0158635c2a035f20bd4f | [
"MIT"
] | null | null | null | python_crash_course/classes/user.py | heniu1985/Learning | e865d59df9c4b1b0d7fc0158635c2a035f20bd4f | [
"MIT"
] | null | null | null | class User():
"""Klasa opisująca użytkownika"""
def __init__(self, first_name, last_name, email, country, city):
"""Inicjalizacja atrybutów opisujących użytkownika"""
self.first_name = first_name
self.last_name = last_name
self.email = email
self.country = country
... | 37.459016 | 104 | 0.656018 |
aca81e9fa6e8b20b1bdfab388678eacef6f82b06 | 852 | py | Python | 5. WEB/app/external_sources/mi_cole/models.py | doyaguillo1997/Data2Gether | 125e3e54060b342a473480f8cb1a913fc54f55ed | [
"MIT"
] | 1 | 2021-10-03T10:19:14.000Z | 2021-10-03T10:19:14.000Z | 5. WEB/app/external_sources/mi_cole/models.py | doyaguillo1997/Data2Gether | 125e3e54060b342a473480f8cb1a913fc54f55ed | [
"MIT"
] | null | null | null | 5. WEB/app/external_sources/mi_cole/models.py | doyaguillo1997/Data2Gether | 125e3e54060b342a473480f8cb1a913fc54f55ed | [
"MIT"
] | null | null | null | from django.contrib.gis.db import models
class School(models.Model):
type = models.ForeignKey(
"SchoolType", null=True, blank=True, on_delete=models.SET_NULL
)
name = models.TextField("Nombre")
address = models.TextField("Dirección")
price = models.TextField("Precio")
review = models.T... | 26.625 | 70 | 0.684272 |
8c8e652a04e1ea09eff8385a5c99b2d63a9da290 | 3,585 | py | Python | system_manager.py | rakibulmdalam/IOT-Hardware-Abstraction-Layer | 4d344a82aa94ae561a7c2889f942c6a892e6810e | [
"MIT"
] | 1 | 2018-06-12T15:40:45.000Z | 2018-06-12T15:40:45.000Z | system_manager.py | UyumazHakan/Hardware-Abstraction-Platform | 52f13df333351516a88497e4a655ee1333abe7eb | [
"MIT"
] | null | null | null | system_manager.py | UyumazHakan/Hardware-Abstraction-Platform | 52f13df333351516a88497e4a655ee1333abe7eb | [
"MIT"
] | null | null | null | import os
import json
import logging
import time
import atexit
from device_manager import DeviceManager
from communication_manager import CommunicationManager
from security_communication.secure_communication_enum import SecurityEnum, CommunicationEnum, security_constructors, communication_constructors
dir_path = os.pa... | 33.504673 | 179 | 0.747559 |
6450d297b76851c7ea273ac03618ee6527271ba3 | 21,302 | py | Python | TXHousing/analysis/zoning_graphs.py | amspector100/TXHousing | 5579ed6372c1ca78a72ba5e47a0f1f3146181bf8 | [
"MIT"
] | 1 | 2020-04-20T04:30:58.000Z | 2020-04-20T04:30:58.000Z | TXHousing/analysis/zoning_graphs.py | amspector100/TXHousing | 5579ed6372c1ca78a72ba5e47a0f1f3146181bf8 | [
"MIT"
] | null | null | null | TXHousing/analysis/zoning_graphs.py | amspector100/TXHousing | 5579ed6372c1ca78a72ba5e47a0f1f3146181bf8 | [
"MIT"
] | null | null | null | """Graphs which mostly rely on zoning data"""
import time
import shapely
import pandas as pd
import geopandas as gpd
from .. import utilities
from ..data_processing import zoning, boundaries
from plotnine import *
import matplotlib.pyplot as plt
# Minimum lot size graph -------------------------------------
def plot_m... | 58.202186 | 126 | 0.555629 |
df853a7e93936a146fdd5929d026cca71a6c9ea3 | 6,177 | py | Python | core/loader.py | limpins/Deep-Learning-for-Time-Series | 237598881f69a0637f16c6bb488db17cd5b23aa4 | [
"MIT"
] | null | null | null | core/loader.py | limpins/Deep-Learning-for-Time-Series | 237598881f69a0637f16c6bb488db17cd5b23aa4 | [
"MIT"
] | null | null | null | core/loader.py | limpins/Deep-Learning-for-Time-Series | 237598881f69a0637f16c6bb488db17cd5b23aa4 | [
"MIT"
] | 1 | 2021-07-13T14:10:33.000Z | 2021-07-13T14:10:33.000Z | """
Email: autuanliu@163.com
Date: 2018/9/28
"""
import numpy as np
import pandas as pd
import torch
from torch.utils.data import DataLoader, Dataset
def get_json_data(file_name):
import ujson
return ujson.load(open(file_name, 'r'))
def get_yaml_data(file_name):
import yaml
return yaml.load(open(fi... | 33.209677 | 153 | 0.672171 |
953b2b889b522076a7238ccfa494232d17915ec1 | 31 | py | Python | dicelang/float_special.py | Grumblesaur/atropos | 05b7875bdb415e09fbe845429b05bc09b6763920 | [
"MIT"
] | 1 | 2020-01-22T15:09:40.000Z | 2020-01-22T15:09:40.000Z | dicelang/float_special.py | Grumblesaur/atropos | 05b7875bdb415e09fbe845429b05bc09b6763920 | [
"MIT"
] | 36 | 2020-02-04T04:02:53.000Z | 2021-06-10T19:06:14.000Z | dicelang/float_special.py | Grumblesaur/dicelark | 05b7875bdb415e09fbe845429b05bc09b6763920 | [
"MIT"
] | null | null | null | inf = 10e10000
nan = inf - inf
| 10.333333 | 15 | 0.645161 |
278f7ed87fd051a4aa8f9a34b6f1b36ef3e790fe | 1,274 | py | Python | src/first/exception.py | gurimmer/study-python | c9d4ccab48e511587a17e67b4ca203048cfc9c40 | [
"MIT"
] | null | null | null | src/first/exception.py | gurimmer/study-python | c9d4ccab48e511587a17e67b4ca203048cfc9c40 | [
"MIT"
] | null | null | null | src/first/exception.py | gurimmer/study-python | c9d4ccab48e511587a17e67b4ca203048cfc9c40 | [
"MIT"
] | null | null | null |
items = ['book1', 'book2', 'book3']
def getBook(index):
message = 0
try:
message = items[index]
except IndexError:
return 'indexが範囲外です: ' + str(index)
else:
print('tryのelse句はexceptが実行されない場合に処理される')
finally:
print('finally句は必ず実行される')
return message
numbers = ['1'... | 19.6 | 48 | 0.657771 |
9cb46042a3079c574a19e63119d8ba82bcd4a955 | 6,997 | py | Python | tests/rs_sqla_test_utils/models.py | jferg368/sqlalchemy-redshift | 5bd6e0dcefbd0a2f3cee0001efc5565ac2395cd2 | [
"MIT"
] | null | null | null | tests/rs_sqla_test_utils/models.py | jferg368/sqlalchemy-redshift | 5bd6e0dcefbd0a2f3cee0001efc5565ac2395cd2 | [
"MIT"
] | null | null | null | tests/rs_sqla_test_utils/models.py | jferg368/sqlalchemy-redshift | 5bd6e0dcefbd0a2f3cee0001efc5565ac2395cd2 | [
"MIT"
] | 1 | 2022-03-16T21:29:34.000Z | 2022-03-16T21:29:34.000Z | import sqlalchemy as sa
from sqlalchemy import event
from sqlalchemy.ext import declarative
from sqlalchemy.schema import CreateSchema
Base = declarative.declarative_base()
event.listen(Base.metadata, 'before_create', CreateSchema('other_schema'))
class Basic(Base):
__tablename__ = 'basic'
name = sa.Column... | 28.559184 | 78 | 0.649564 |
04d0974c37a6f7ae3f0b605dd4bd66cbe3e9cddf | 1,557 | py | Python | centernet/defaults.py | lbin/CenterNet-better-plus | 4c49a574520f122605b641eaab3e165a32a09915 | [
"MIT"
] | 75 | 2020-03-03T10:03:07.000Z | 2022-03-11T02:57:01.000Z | centernet/defaults.py | CPFLAME/CenterNet-better-plus | 4c49a574520f122605b641eaab3e165a32a09915 | [
"MIT"
] | 5 | 2020-08-12T08:12:53.000Z | 2021-09-01T08:47:15.000Z | centernet/defaults.py | CPFLAME/CenterNet-better-plus | 4c49a574520f122605b641eaab3e165a32a09915 | [
"MIT"
] | 15 | 2020-03-20T14:01:03.000Z | 2022-03-19T00:46:09.000Z | # -*- coding: utf-8 -*-
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
This file contains components with some default boilerplate logic user may need
in training / testing. They will not work for everyone, but many users may find them useful.
The behavior of functions/classes in this file ... | 32.4375 | 95 | 0.727681 |
a6fa798dafc0a871cdee4448495bcf02c915b31b | 5,656 | py | Python | autoencoders/autoencoders.py | mavroudo/Proximity-based_OutlierDetection_BPM | 4711d7626a24f468c9201cf3833e182d18bcbdee | [
"MIT"
] | null | null | null | autoencoders/autoencoders.py | mavroudo/Proximity-based_OutlierDetection_BPM | 4711d7626a24f468c9201cf3833e182d18bcbdee | [
"MIT"
] | null | null | null | autoencoders/autoencoders.py | mavroudo/Proximity-based_OutlierDetection_BPM | 4711d7626a24f468c9201cf3833e182d18bcbdee | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Sep 26 19:37:18 2021
@author: mavroudo
"""
from pm4py.objects.log.importer.xes import factory as xes_import_factory
from pm4py.algo.filtering.log.attributes import attributes_filter
from pm4py.objects.log.log import EventLog
from statistics import mean,... | 34.072289 | 106 | 0.652581 |
8271cbea5597ce6e305556868ab2634e6fb0296e | 21,024 | py | Python | src/custom_codes/scripts/command_vel_gazebo.py | lar-deeufba/potential_fields | 19f7a0f73e503a00999fa9e175d8cc1d432bee99 | [
"BSD-2-Clause"
] | 6 | 2020-01-14T17:56:03.000Z | 2021-08-10T18:57:04.000Z | src/custom_codes/scripts/command_vel_gazebo.py | lar-deeufba/potential_fields | 19f7a0f73e503a00999fa9e175d8cc1d432bee99 | [
"BSD-2-Clause"
] | null | null | null | src/custom_codes/scripts/command_vel_gazebo.py | lar-deeufba/potential_fields | 19f7a0f73e503a00999fa9e175d8cc1d432bee99 | [
"BSD-2-Clause"
] | 3 | 2019-12-21T02:50:39.000Z | 2022-01-04T02:53:07.000Z | #!/usr/bin/python
import rospy
import actionlib
import numpy as np
import argparse
import rosservice
from std_msgs.msg import Float64MultiArray, MultiArrayDimension
from sensor_msgs.msg import JointState
from trajectory_msgs.msg import JointTrajectory, JointTrajectoryPoint
from control_msgs.msg import FollowJointTraj... | 42.731707 | 169 | 0.659056 |
f121b7b07f426923b7f551657d88c46c78e3fdd3 | 9,417 | py | Python | tests/test.py | super-resolution/line_profiler | 472ee9433298327263ea1e1423b37fbe78d2c861 | [
"MIT"
] | 4 | 2019-10-11T11:28:46.000Z | 2021-01-29T20:19:30.000Z | tests/test.py | super-resolution/line_profiler | 472ee9433298327263ea1e1423b37fbe78d2c861 | [
"MIT"
] | null | null | null | tests/test.py | super-resolution/line_profiler | 472ee9433298327263ea1e1423b37fbe78d2c861 | [
"MIT"
] | null | null | null | from unittest import TestCase
import unittest
from matplotlib import cm
from controllers.random_GUI import MainWindow
from src.controllers.fitter import *
from src.controllers.utility import *
from src.controllers.image import ImageSIM
from src.controllers import processing_SNC, processing_microtubule, processing_cann... | 35.269663 | 128 | 0.618775 |
10c8497260068c4486e416a74f9573145559d590 | 19,594 | py | Python | src/elg_demo.py | lelechen63/GazeML | ceab8c076b7bf164f9145f12915e1e0c7f14276a | [
"MIT"
] | null | null | null | src/elg_demo.py | lelechen63/GazeML | ceab8c076b7bf164f9145f12915e1e0c7f14276a | [
"MIT"
] | null | null | null | src/elg_demo.py | lelechen63/GazeML | ceab8c076b7bf164f9145f12915e1e0c7f14276a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Main script for gaze direction inference from webcam feed."""
import argparse
import os
import queue
import threading
import time
import coloredlogs
import cv2 as cv
import numpy as np
import tensorflow as tf
from datasources import Video, Webcam
from datasources.image import Image
from mod... | 48.142506 | 100 | 0.479177 |
f1decafed3dd9912b1ab456a5f7d5b245e48033e | 521 | py | Python | picoctf-2019/got/shellcode.py | onealmond/hacking-lab | 631e615944add02db3c2afef47bf1de7171eb065 | [
"MIT"
] | 9 | 2021-04-20T15:28:36.000Z | 2022-03-08T19:53:48.000Z | picoctf-2019/got/shellcode.py | onealmond/hacking-lab | 631e615944add02db3c2afef47bf1de7171eb065 | [
"MIT"
] | null | null | null | picoctf-2019/got/shellcode.py | onealmond/hacking-lab | 631e615944add02db3c2afef47bf1de7171eb065 | [
"MIT"
] | 6 | 2021-06-24T03:25:21.000Z | 2022-02-20T21:44:52.000Z | import os;os.environ['TMPDIR'] = os.path.join(os.environ['HOME'], 'tmp')
import pwn
remote_binary = "/problems/got_5_c5119617c90aa544a639812dbc41e24e/vuln"
def segfault():
try:
pr = pwn.process(remote_binary)
elf = pwn.ELF(remote_binary, False)
print(elf.got)
pr.sendlineafter("Inpu... | 27.421053 | 72 | 0.629559 |
353e2f7ae305142dc22eaf77a8143ff784407cba | 262 | py | Python | wallme/websites/tetras.py | LucBerge/wallme | 3c76a08cb4d8ae916b2b12708a78263573f6b06a | [
"MIT"
] | 1 | 2019-08-29T17:27:36.000Z | 2019-08-29T17:27:36.000Z | wallme/websites/tetras.py | LucBerge/wallme | 3c76a08cb4d8ae916b2b12708a78263573f6b06a | [
"MIT"
] | 2 | 2020-07-08T20:54:05.000Z | 2020-10-14T20:44:28.000Z | wallme/websites/tetras.py | LucBerge/wallme | 3c76a08cb4d8ae916b2b12708a78263573f6b06a | [
"MIT"
] | 1 | 2020-10-01T05:58:11.000Z | 2020-10-01T05:58:11.000Z | # coding: utf8
KEY = 'tetras'
DESCRIPTION = 'Amateur pictures of the Alpes and the Dauphine'
URL = 'http://tetras.org/Semaine.jpg'
def pre_process(subkey):
return None
def process(date, subkey):
return URL
def post_process(image):
return None
| 14.555556 | 62 | 0.70229 |
b1a45612d48a520664360de02a5e2d958b16c505 | 900 | py | Python | yuvist/__init__.py | luuvish/yuvist | 2612278f0e0bc5ea1d49315ec611d1ac216609e3 | [
"Unlicense",
"MIT"
] | 3 | 2016-01-08T02:01:18.000Z | 2018-04-18T18:53:17.000Z | yuvist/__init__.py | luuvish/yuvist | 2612278f0e0bc5ea1d49315ec611d1ac216609e3 | [
"Unlicense",
"MIT"
] | null | null | null | yuvist/__init__.py | luuvish/yuvist | 2612278f0e0bc5ea1d49315ec611d1ac216609e3 | [
"Unlicense",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""\
Kivy YUV Image Viewer
Copyright (C) 2012 Luuvish <luuvish@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option)... | 29.032258 | 69 | 0.767778 |
5640457ed4be3a9bdad92897a8e2827a2ae64aad | 2,433 | py | Python | tests/test_settings.py | learningequality/klorimin | c569cd4048ac670bc55a83f4fdda0b818c7f626e | [
"MIT"
] | null | null | null | tests/test_settings.py | learningequality/klorimin | c569cd4048ac670bc55a83f4fdda0b818c7f626e | [
"MIT"
] | null | null | null | tests/test_settings.py | learningequality/klorimin | c569cd4048ac670bc55a83f4fdda0b818c7f626e | [
"MIT"
] | null | null | null | import sys
from mock import patch
from ricecooker import chefs
settings = {"generate-missing-thumbnails": True, "compress-videos": True}
def test_settings_unset_default():
chef = chefs.SushiChef()
for setting in settings:
assert chef.get_setting(setting) is None
assert chef.get_setting(se... | 31.597403 | 98 | 0.675709 |
4ec4597011e6627b52ee6495890d57eb2dcd63e6 | 2,079 | py | Python | sudoku/network/model.py | kevinddchen/sudoku | 135b47ffcfade88628acabacd0a2c916da98a9e4 | [
"MIT"
] | null | null | null | sudoku/network/model.py | kevinddchen/sudoku | 135b47ffcfade88628acabacd0a2c916da98a9e4 | [
"MIT"
] | null | null | null | sudoku/network/model.py | kevinddchen/sudoku | 135b47ffcfade88628acabacd0a2c916da98a9e4 | [
"MIT"
] | null | null | null | import os
import torch
import torch.nn as nn
# ------------------------------------------------------------------------------
def get_model(L: int = 8, D: int = 256) -> nn.Module:
'''
Neural network model for digit classification. Inputs are Nx1x28x28 tensors
of floats in the range [0, 1].
Args:
... | 30.573529 | 80 | 0.484367 |
d468ab1ecfa1481f83bcc18e93b0c4d46f2cf2d3 | 5,955 | py | Python | subjectExamplesFidelityGain.py | sanrou/fidelityWeighting | 3767d80ad31559264d8ff3e42407eeed863f0ebc | [
"BSD-3-Clause"
] | 1 | 2020-11-30T09:20:19.000Z | 2020-11-30T09:20:19.000Z | subjectExamplesFidelityGain.py | sanrou/fidelityWeighting | 3767d80ad31559264d8ff3e42407eeed863f0ebc | [
"BSD-3-Clause"
] | 4 | 2019-08-01T13:25:16.000Z | 2019-08-14T10:14:24.000Z | subjectExamplesFidelityGain.py | sanrou/fidelityWeighting | 3767d80ad31559264d8ff3e42407eeed863f0ebc | [
"BSD-3-Clause"
] | 3 | 2018-11-21T13:58:05.000Z | 2021-03-18T11:01:52.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon May 31 11:42:12 2021
Load and display example subjects' parcel fidelities. One median original fidelity subject.
@author: rouhinen
"""
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as mcolors
# Subject fraction list
percentileList = np.array(... | 31.342105 | 133 | 0.693535 |
f7033cd7e4893924e98add48a902ed4e0b88f83b | 99 | py | Python | mmgen/core/runners/__init__.py | HXWAndCL/mmgeneration | 9afb1d740bf56a4ecde5064d5bb2a4e2d777638b | [
"Apache-2.0"
] | 1 | 2021-05-27T13:04:41.000Z | 2021-05-27T13:04:41.000Z | mmgen/core/runners/__init__.py | HXWAndCL/mmgeneration | 9afb1d740bf56a4ecde5064d5bb2a4e2d777638b | [
"Apache-2.0"
] | null | null | null | mmgen/core/runners/__init__.py | HXWAndCL/mmgeneration | 9afb1d740bf56a4ecde5064d5bb2a4e2d777638b | [
"Apache-2.0"
] | null | null | null | from .dynamic_iterbased_runner import DynamicIterBasedRunner
__all__ = ['DynamicIterBasedRunner']
| 24.75 | 60 | 0.858586 |
dfcb2371caa768405047d50559c740757833bdfb | 175 | py | Python | exercicio 5.py | pedropenna1/Exercicios-Python | bde8967a31b2395477f346ca1f1b5cb2de666a40 | [
"MIT"
] | null | null | null | exercicio 5.py | pedropenna1/Exercicios-Python | bde8967a31b2395477f346ca1f1b5cb2de666a40 | [
"MIT"
] | null | null | null | exercicio 5.py | pedropenna1/Exercicios-Python | bde8967a31b2395477f346ca1f1b5cb2de666a40 | [
"MIT"
] | null | null | null | N = int(input('Digite um número:' ))
Sucessor = N + 1
Antecessor = N - 1
print('O valor do número é {}\nSeu sucessor é {}\nSeu antecessor é {}'.format(N,Sucessor,Antecessor))
| 35 | 101 | 0.674286 |
3b649fd5fc16d6c94fb876f9bc5cf5eab3e45bea | 757 | py | Python | cogs/configuration.py | Tempystral/Boxbot-2.0 | 41b5fbb70c20107e7b38b1550f2363e097c9bb4b | [
"BSD-3-Clause"
] | null | null | null | cogs/configuration.py | Tempystral/Boxbot-2.0 | 41b5fbb70c20107e7b38b1550f2363e097c9bb4b | [
"BSD-3-Clause"
] | 8 | 2019-12-29T06:58:42.000Z | 2020-02-13T18:34:32.000Z | cogs/configuration.py | Tempystral/Boxbot-2.0 | 41b5fbb70c20107e7b38b1550f2363e097c9bb4b | [
"BSD-3-Clause"
] | null | null | null | import asyncio
from cogs.utils import checks
from discord.ext import commands
class Config(commands.Cog):
def __init__(self, bot):
self.bot = bot
#self.manager = ConfigManager()
@commands.has_any_role(["Bot Developer"])
@commands.group(pass_context=True, aliases=["settings", "config"])
... | 26.103448 | 70 | 0.651255 |
31be4d64dbcbe9ea1cb9eed4c9f4573d211d22bd | 661 | py | Python | src/main/wsgi.py | vadimkondratovich/asd | 5f2db494f739ea663795c5d4a924ced942cb1852 | [
"MIT"
] | null | null | null | src/main/wsgi.py | vadimkondratovich/asd | 5f2db494f739ea663795c5d4a924ced942cb1852 | [
"MIT"
] | 8 | 2021-01-10T09:38:54.000Z | 2021-02-28T12:33:58.000Z | src/main/wsgi.py | vadimkondratovich/asd | 5f2db494f739ea663795c5d4a924ced942cb1852 | [
"MIT"
] | null | null | null | import sentry_sdk
from main.custom_types import RequestT
from framework.util.settings import get_setting
from main.handlers import get_handler
from main.handlers import handle_500
sentry_sdk.init(get_setting("SENTRY_DSN"), traces_sample_rate=1.0)
def application(environ, start_response):
request = RequestT(envi... | 26.44 | 66 | 0.75643 |
53241ca06a4af2d20627277be305aa7bcfb6b840 | 6,423 | py | Python | instagrapi/album.py | V-ampire/instagrapi | 758c89bf8b85fe2a91ba40530349007d2d2760e1 | [
"MIT"
] | 1 | 2021-05-05T03:44:31.000Z | 2021-05-05T03:44:31.000Z | instagrapi/album.py | V-ampire/instagrapi | 758c89bf8b85fe2a91ba40530349007d2d2760e1 | [
"MIT"
] | null | null | null | instagrapi/album.py | V-ampire/instagrapi | 758c89bf8b85fe2a91ba40530349007d2d2760e1 | [
"MIT"
] | null | null | null | import time
from urllib.parse import urlparse
from .extractors import extract_media_v1
from .exceptions import PrivateError
from .utils import dumps
class AlbumNotDownload(PrivateError):
pass
class AlbumNotUpload(PrivateError):
pass
class UnknownFormat(AlbumNotUpload):
pass
class AlbumConfigureErro... | 36.08427 | 141 | 0.530905 |
103fe6d36324659360e79cb76015948ea6b5baed | 2,160 | py | Python | ProjectApplication/grant_management/forms/milestones.py | code-review-doctor/project-application | d85b40b69572efbcda24ce9c40803f76d8ffd192 | [
"MIT"
] | 5 | 2020-07-29T10:00:11.000Z | 2022-02-19T11:00:34.000Z | ProjectApplication/grant_management/forms/milestones.py | code-review-doctor/project-application | d85b40b69572efbcda24ce9c40803f76d8ffd192 | [
"MIT"
] | 471 | 2019-09-20T14:37:28.000Z | 2022-03-25T14:16:34.000Z | ProjectApplication/grant_management/forms/milestones.py | code-review-doctor/project-application | d85b40b69572efbcda24ce9c40803f76d8ffd192 | [
"MIT"
] | 5 | 2020-03-15T12:42:47.000Z | 2022-02-15T18:06:52.000Z | from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Div, Field
from dal import autocomplete
from django import forms
from django.forms import BaseInlineFormSet, inlineformset_factory, NumberInput
from grant_management.models import Milestone
from project_core.models import Project
from p... | 33.230769 | 110 | 0.610648 |
522ba5773074140384ceadca7586712cb86da9a2 | 794 | py | Python | src/atcoder/abc218/e/sol_3.py | kagemeka/competitive-programming | c70fe481bcd518f507b885fc9234691d8ce63171 | [
"MIT"
] | 1 | 2021-07-11T03:20:10.000Z | 2021-07-11T03:20:10.000Z | src/atcoder/abc218/e/sol_3.py | kagemeka/competitive-programming | c70fe481bcd518f507b885fc9234691d8ce63171 | [
"MIT"
] | 39 | 2021-07-10T05:21:09.000Z | 2021-12-15T06:10:12.000Z | src/atcoder/abc218/e/sol_3.py | kagemeka/competitive-programming | c70fe481bcd518f507b885fc9234691d8ce63171 | [
"MIT"
] | null | null | null | import typing
class UnionFind():
def __init__(self, n: int) -> typing.NoReturn:
self.__a = [-1] * n
def find(self, u: int) -> int:
a = self.__a
if a[u] < 0: return u
a[u] = self.find(a[u])
return a[u]
def unite(self, u: int, v: int) -> typing.NoReturn:
u, v = self.find(u), sel... | 16.541667 | 53 | 0.488665 |
ec9b055d86c0f5ef380e1c432607670d8b18ebd4 | 83,305 | py | Python | aiida_fleur/tools/xml_util.py | anoopkcn/aiida-fleur | 5d4cc2092b7c3ce5402f1d4b89787eae53b2e60f | [
"MIT"
] | null | null | null | aiida_fleur/tools/xml_util.py | anoopkcn/aiida-fleur | 5d4cc2092b7c3ce5402f1d4b89787eae53b2e60f | [
"MIT"
] | null | null | null | aiida_fleur/tools/xml_util.py | anoopkcn/aiida-fleur | 5d4cc2092b7c3ce5402f1d4b89787eae53b2e60f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
###############################################################################
# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. #
# All rights reserved. #
# This file is part of the AiiDA-FLEUR package. ... | 43.320333 | 129 | 0.621055 |
b2605bb845fbd08f3639acd11ff406101be3558a | 4,800 | py | Python | tests/unit/test_outlets_geolocation_response.py | madpilot/pyptv3 | f4c6b257d84ccebc0e3a217f5f7aa99257e4a39a | [
"MIT"
] | 2 | 2019-02-24T03:40:35.000Z | 2019-09-09T00:05:27.000Z | tests/unit/test_outlets_geolocation_response.py | madpilot/pyptv3 | f4c6b257d84ccebc0e3a217f5f7aa99257e4a39a | [
"MIT"
] | 2 | 2019-06-15T11:41:24.000Z | 2021-06-01T22:30:12.000Z | tests/unit/test_outlets_geolocation_response.py | madpilot/pyptv3 | f4c6b257d84ccebc0e3a217f5f7aa99257e4a39a | [
"MIT"
] | null | null | null | import pytest
from mock import Mock
import json
from pyptv3 import OutletsGeolocationResponse, OutletGeolocationResponse, StatusResponse, ONLINE
class TestOutletsGeolocationResponse:
@pytest.fixture(scope="module")
def response(self):
return json.loads("""
{
"outlets": [
... | 44.859813 | 96 | 0.600833 |
46c8ae888669cab902175aa7635a5bca6cab8a3b | 2,025 | py | Python | 001~100/014LongestCommonPerfix.py | hyhplus/LeetCodeByPython | ebc0a59610e4c8b72660a9c96f408cc3319a7c28 | [
"MIT"
] | 2 | 2019-01-03T10:04:50.000Z | 2019-10-29T07:46:39.000Z | 001~100/014LongestCommonPerfix.py | hyhplus/LeetCodeByPython | ebc0a59610e4c8b72660a9c96f408cc3319a7c28 | [
"MIT"
] | null | null | null | 001~100/014LongestCommonPerfix.py | hyhplus/LeetCodeByPython | ebc0a59610e4c8b72660a9c96f408cc3319a7c28 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
14、最长公共前缀
"""
# class Solution:
# def longestCommonPrefix(self, sl):
# """
# :type sl: List[str]
# :rtype: str
# """
# if '' in sl:
# return ''
# n = len(sl)
# if n > 1:
# pr = ''
# ... | 23.546512 | 65 | 0.406914 |
8c85ff7d63f316c0d5d6a607dfa068bf0eaccae6 | 2,729 | py | Python | flink-python/pyflink/table/tests/test_table_completeness.py | vcd047/flink | c9b413edb31232fb740e819f77a11eb2e779be52 | [
"Apache-2.0"
] | 1 | 2022-03-12T08:27:42.000Z | 2022-03-12T08:27:42.000Z | flink-python/pyflink/table/tests/test_table_completeness.py | w156226814/flink | acab7e06c6ece03dfeb8ae90eef52721d330833f | [
"Apache-2.0"
] | 1 | 2022-02-25T03:04:41.000Z | 2022-02-25T03:04:41.000Z | flink-python/pyflink/table/tests/test_table_completeness.py | w156226814/flink | acab7e06c6ece03dfeb8ae90eef52721d330833f | [
"Apache-2.0"
] | 1 | 2022-03-09T08:50:37.000Z | 2022-03-09T08:50:37.000Z | ################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this... | 39.550725 | 94 | 0.665812 |
27f98953dbefa2aee5fc63639a73966ae19345ab | 1,225 | py | Python | problems/nand_gate.py | benallan/lovelace-problems | 3780d2bfc58fe0531d60a92ae0a6c45e9814f58f | [
"MIT"
] | 29 | 2019-07-23T16:51:36.000Z | 2022-03-08T21:42:05.000Z | problems/nand_gate.py | benallan/lovelace-problems | 3780d2bfc58fe0531d60a92ae0a6c45e9814f58f | [
"MIT"
] | 44 | 2019-03-22T00:05:32.000Z | 2021-05-04T13:25:12.000Z | problems/nand_gate.py | benallan/lovelace-problems | 3780d2bfc58fe0531d60a92ae0a6c45e9814f58f | [
"MIT"
] | 3 | 2019-08-04T13:06:21.000Z | 2021-04-20T07:41:42.000Z | import logging
from typing import Tuple
from problems.test_case import TestCase, TestCaseTypeEnum
from problems.solutions.nand_gate import NAND
logger = logging.getLogger(__name__)
FUNCTION_NAME = "NAND"
INPUT_VARS = ['p', 'q']
OUTPUT_VARS = ['nand']
STATIC_RESOURCES = []
PHYSICAL_CONSTANTS = {}
ATOL = {}
RTOL = {... | 21.491228 | 67 | 0.656327 |
fe0f6f07d75f281ca09f9058538d2c928981e3a4 | 2,725 | py | Python | src/robotino/robotino_rest_node/scripts/analoginput.py | moritzknaust/robotino_ros | 86b503c5432739c0b8f9eb8a76d4efcf2cc73fd6 | [
"MIT"
] | null | null | null | src/robotino/robotino_rest_node/scripts/analoginput.py | moritzknaust/robotino_ros | 86b503c5432739c0b8f9eb8a76d4efcf2cc73fd6 | [
"MIT"
] | null | null | null | src/robotino/robotino_rest_node/scripts/analoginput.py | moritzknaust/robotino_ros | 86b503c5432739c0b8f9eb8a76d4efcf2cc73fd6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Software License Agreement (BSD License)
#
# Copyright (c) 2019, REC Robotics Equipment Corporation GmbH, Planegg
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * R... | 37.328767 | 86 | 0.74789 |
cb92724204563d08beee9888f972e3a53a297ba3 | 1,076 | py | Python | yatube/posts/migrations/0005_comment.py | egor-fipu/yatube | 64e91662f9f0d834ca7a8187f87005c3cc729368 | [
"MIT"
] | null | null | null | yatube/posts/migrations/0005_comment.py | egor-fipu/yatube | 64e91662f9f0d834ca7a8187f87005c3cc729368 | [
"MIT"
] | null | null | null | yatube/posts/migrations/0005_comment.py | egor-fipu/yatube | 64e91662f9f0d834ca7a8187f87005c3cc729368 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2021-06-30 06:21
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('posts', '0004_auto_20210... | 39.851852 | 167 | 0.656134 |
654f8ab91ec7aa2133e77681aa68e1cfabe9f020 | 1,216 | py | Python | backend/app/alembic/versions/fe34a060f1ba_cascade_delete.py | dmitritruf/distiller-django-react | ec4c3837194306e725d8a2437ace10a899a254d2 | [
"BSD-3-Clause"
] | 2 | 2021-11-04T16:27:33.000Z | 2021-11-04T20:09:19.000Z | backend/app/alembic/versions/fe34a060f1ba_cascade_delete.py | OpenChemistry/distiller | 67da87672654555f9821590f42b108d70a55c1a6 | [
"BSD-3-Clause"
] | 70 | 2021-11-04T16:34:52.000Z | 2022-03-30T02:52:17.000Z | backend/app/alembic/versions/fe34a060f1ba_cascade_delete.py | dmitritruf/distiller-django-react | ec4c3837194306e725d8a2437ace10a899a254d2 | [
"BSD-3-Clause"
] | null | null | null | """cascade_delete
Revision ID: fe34a060f1ba
Revises: 8ec14b991bc5
Create Date: 2021-12-14 15:02:06.318653
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = 'fe34a060f1ba'
down_revision = '8ec14b991bc5'
branch_labels = Non... | 34.742857 | 94 | 0.700658 |
d315efe21b2afc6323f541d91321ef681c0e4166 | 1,895 | py | Python | setup.py | somenzz/somedecorators | 1b2f7e0c3330024c1f9871016d7d9d4b87c5bde6 | [
"MIT"
] | 2 | 2021-06-18T02:31:53.000Z | 2021-08-04T06:39:13.000Z | setup.py | Tsurol/somedecorators | 1b2f7e0c3330024c1f9871016d7d9d4b87c5bde6 | [
"MIT"
] | 1 | 2021-07-12T01:45:24.000Z | 2021-09-29T22:10:58.000Z | setup.py | Tsurol/somedecorators | 1b2f7e0c3330024c1f9871016d7d9d4b87c5bde6 | [
"MIT"
] | 1 | 2022-01-03T13:05:09.000Z | 2022-01-03T13:05:09.000Z | #!/usr/bin/env python
from pathlib import Path
try:
from setuptools import setup
from setuptools import find_packages
except ImportError:
raise ImportError("Could not import \"setuptools\"."
"Please install the setuptools package.")
readme = Path("README.md")
license = Path("LICENS... | 27.071429 | 71 | 0.651715 |
4dfdd9bfa504c1bf2f6f2906056066f521f5ee7e | 136 | py | Python | main.py | tsabelmann/cthulhu_cmd | 76d99d01a01795523400a87cf41594274ece87e4 | [
"MIT"
] | 3 | 2021-07-29T03:20:45.000Z | 2021-08-25T12:18:09.000Z | main.py | tsabelmann/cthulhu_cmd | 76d99d01a01795523400a87cf41594274ece87e4 | [
"MIT"
] | null | null | null | main.py | tsabelmann/cthulhu_cmd | 76d99d01a01795523400a87cf41594274ece87e4 | [
"MIT"
] | null | null | null | """Module provides hook-in for the CLI class.
"""
# Import C
import cthulhu_cmd.cli as cli
if __name__ == "__main__":
cli.main()
| 13.6 | 45 | 0.669118 |
a495fecf8199fa3b5415b6a3822b0f4842abc9ee | 20,550 | py | Python | flux_mito/model_734.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | flux_mito/model_734.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | flux_mito/model_734.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C8A', ['BidU', 'C3pro'])
Monomer('SmacM', ['BaxA'])
Monomer('BaxM', ['BidM', '... | 95.138889 | 798 | 0.804136 |
fb61c95935700a2be939e38a9daeba1e47c55e3c | 4,269 | py | Python | tests/attention/test_improved_clustered_transformer_gpu.py | SamuelCahyawijaya/fast-transformers | 6ae8ed4cc50bd037968db4f5062e4d328aae73fe | [
"MIT"
] | 1,171 | 2020-06-30T01:57:19.000Z | 2022-03-31T15:11:25.000Z | tests/attention/test_improved_clustered_transformer_gpu.py | SamuelCahyawijaya/fast-transformers | 6ae8ed4cc50bd037968db4f5062e4d328aae73fe | [
"MIT"
] | 105 | 2020-06-30T14:40:56.000Z | 2022-02-08T16:31:45.000Z | tests/attention/test_improved_clustered_transformer_gpu.py | SamuelCahyawijaya/fast-transformers | 6ae8ed4cc50bd037968db4f5062e4d328aae73fe | [
"MIT"
] | 127 | 2020-06-26T09:07:48.000Z | 2022-03-25T06:46:37.000Z | #
# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/
# Written by Angelos Katharopoulos <angelos.katharopoulos@idiap.ch>,
# Apoorv Vyas <avyas@idiap.ch>
#
import unittest
import torch
from fast_transformers.attention import AttentionLayer, \
ImprovedClusteredAttention, FullAttention
from fast_t... | 31.622222 | 75 | 0.54111 |
b2846f15b4ddd008f541d1dc88f04bfacdfbcba7 | 59,199 | py | Python | tools/system_libs.py | flarestart/emscripten | 2d0ffdf265fe63c7ada99dff58957c08c5608280 | [
"MIT"
] | null | null | null | tools/system_libs.py | flarestart/emscripten | 2d0ffdf265fe63c7ada99dff58957c08c5608280 | [
"MIT"
] | null | null | null | tools/system_libs.py | flarestart/emscripten | 2d0ffdf265fe63c7ada99dff58957c08c5608280 | [
"MIT"
] | null | null | null | # Copyright 2014 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
from .toolchain_profiler import ToolchainProfiler
import itertools
i... | 32.473396 | 181 | 0.673795 |
4f1c0b73f3eca838e4d79640dc558931a4eba9f9 | 24,094 | py | Python | lsdr/envs/environment_sampler.py | melfm/lsdr | 36b0a85e970fdcaae828eeff6c147432aa767c93 | [
"MIT"
] | 3 | 2019-09-20T19:10:50.000Z | 2021-12-30T02:55:21.000Z | lsdr/envs/environment_sampler.py | melfm/lsdr | 36b0a85e970fdcaae828eeff6c147432aa767c93 | [
"MIT"
] | null | null | null | lsdr/envs/environment_sampler.py | melfm/lsdr | 36b0a85e970fdcaae828eeff6c147432aa767c93 | [
"MIT"
] | 1 | 2020-08-01T21:28:12.000Z | 2020-08-01T21:28:12.000Z | import numpy as np
import torch
from functools import partial
from lsdr.envs.classic_control import cartpole, mountain_car
from lsdr.envs.box2d import lunar_lander
from lsdr.envs.mujoco import (hopper, cartpole as mj_cartpole, half_cheetah,
humanoid)
available_envs = [
'cartpole', '... | 35.907601 | 79 | 0.632938 |
bab59b99092cd7d300d8365db36c024411f3e3ed | 1,954 | py | Python | bitshares_pricefeed/sources/currencylayer.py | nbs-dex/nbs_pricefeed | 9653517531790ec79245f6982ad72fdc5c52544e | [
"MIT"
] | 16 | 2017-09-19T08:27:53.000Z | 2021-02-14T13:59:12.000Z | bitshares_pricefeed/sources/currencylayer.py | nbs-dex/nbs_pricefeed | 9653517531790ec79245f6982ad72fdc5c52544e | [
"MIT"
] | 51 | 2017-05-18T13:18:06.000Z | 2019-10-18T12:16:22.000Z | bitshares_pricefeed/sources/currencylayer.py | nbs-dex/nbs_pricefeed | 9653517531790ec79245f6982ad72fdc5c52544e | [
"MIT"
] | 28 | 2017-07-11T21:18:17.000Z | 2021-10-02T02:52:31.000Z | import requests
from . import FeedSource, _request_headers
class CurrencyLayer(FeedSource): # Hourly updated data over http with free subscription
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
if not hasattr(self, "api_key") or not hasattr(self, "free_subscription"):
... | 46.52381 | 145 | 0.504606 |
22ea140de1070b88620206b7edc17069a3504dff | 1,413 | py | Python | lesson-10/ex3.py | alirsamar/intro-ml | 36450b26b7ea09472ccdd2a0abce51b6c3889a20 | [
"MIT"
] | null | null | null | lesson-10/ex3.py | alirsamar/intro-ml | 36450b26b7ea09472ccdd2a0abce51b6c3889a20 | [
"MIT"
] | null | null | null | lesson-10/ex3.py | alirsamar/intro-ml | 36450b26b7ea09472ccdd2a0abce51b6c3889a20 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#### Boilerplate #################################################################
import os
import pickle
import re
import sys
sys.path.append( "./" )
from ex2 import parseOutText
from_sara = open("../ud120-projects/text_learning/from_sara.txt", "r")
from_chris = open("../ud120-projects/text_lea... | 26.166667 | 90 | 0.53857 |
0054b25262b5fcfc8c89922f7952c64ff6ce7705 | 4,836 | py | Python | pubsub/tests/unit/pubsub_v1/publisher/test_publisher_client.py | bomboradata/bombora-google-cloud-python | 255bbebe6c50490f40fcc3eed40bae1e77e03859 | [
"Apache-2.0"
] | 1 | 2021-01-04T11:40:17.000Z | 2021-01-04T11:40:17.000Z | pubsub/tests/unit/pubsub_v1/publisher/test_publisher_client.py | bomboradata/bombora-google-cloud-python | 255bbebe6c50490f40fcc3eed40bae1e77e03859 | [
"Apache-2.0"
] | null | null | null | pubsub/tests/unit/pubsub_v1/publisher/test_publisher_client.py | bomboradata/bombora-google-cloud-python | 255bbebe6c50490f40fcc3eed40bae1e77e03859 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017, Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 33.583333 | 78 | 0.70885 |
10b863270e2d1810686fe674c621fa28a22b3606 | 2,017 | py | Python | pmedian/functions/p_median/geojson.py | ibadkureshi/tnk-locationallocation | b06abcb7bf8675b13e4c2e4fe419afb5ee11018f | [
"MIT"
] | 1 | 2021-02-07T10:37:52.000Z | 2021-02-07T10:37:52.000Z | pmedian/functions/p_median/geojson.py | panosprotopapas/tnk-locationallocation | b06abcb7bf8675b13e4c2e4fe419afb5ee11018f | [
"MIT"
] | null | null | null | pmedian/functions/p_median/geojson.py | panosprotopapas/tnk-locationallocation | b06abcb7bf8675b13e4c2e4fe419afb5ee11018f | [
"MIT"
] | 2 | 2020-10-23T13:14:53.000Z | 2020-11-13T12:01:44.000Z | def sol_details(final_population, grid, distances, p_value, supply_coordinates=None):
sol_coordinates = []
sol_types = []
sol_demand = [0] * p_value
# Reverse supply coordinates, if any
if supply_coordinates:
supply_coordinates = [(t[1], t[0]) for t in supply_coordinates]
for c in fina... | 33.616667 | 95 | 0.497769 |
41a5d37782f372695ffd31a8d42930719e53e075 | 6,587 | py | Python | examples/mixing/example.py | domischi/SpringBox | fbd3f97cf769467d385fb60825df15087cd5658f | [
"MIT"
] | null | null | null | examples/mixing/example.py | domischi/SpringBox | fbd3f97cf769467d385fb60825df15087cd5658f | [
"MIT"
] | null | null | null | examples/mixing/example.py | domischi/SpringBox | fbd3f97cf769467d385fb60825df15087cd5658f | [
"MIT"
] | 1 | 2020-07-02T17:14:14.000Z | 2020-07-02T17:14:14.000Z | from sacred import Experiment, SETTINGS
from sacred.dependencies import PackageDependency
from sacred.observers import FileStorageObserver, MongoObserver
from sacred.utils import apply_backspaces_and_linefeeds
from functools import partial
from copy import deepcopy
from tqdm import tqdm as std_tqdm
tqdm = partial(std_t... | 41.16875 | 190 | 0.606042 |
2f1faf17e9f6d9419964b8c180b48ae3a20f320e | 3,358 | py | Python | accounts/permission.py | damondengxin/manager | cce0fc06fa1f09addf46c9cfb213b0e7d39614ac | [
"MIT"
] | null | null | null | accounts/permission.py | damondengxin/manager | cce0fc06fa1f09addf46c9cfb213b0e7d39614ac | [
"MIT"
] | null | null | null | accounts/permission.py | damondengxin/manager | cce0fc06fa1f09addf46c9cfb213b0e7d39614ac | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
from django.urls import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import render, HttpResponse
from django.contrib.auth.decorators import login_required
from .forms import PermissionListForm
from .models import UserInfo, RoleL... | 35.723404 | 82 | 0.611376 |
5d09c1eadb638cb285907db21f35f36fe6ba1880 | 3,396 | py | Python | pypureclient/flasharray/FA_2_8/models/dns_patch.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 14 | 2018-12-07T18:30:27.000Z | 2022-02-22T09:12:33.000Z | pypureclient/flasharray/FA_2_8/models/dns_patch.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 28 | 2019-09-17T21:03:52.000Z | 2022-03-29T22:07:35.000Z | pypureclient/flasharray/FA_2_8/models/dns_patch.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 15 | 2020-06-11T15:50:08.000Z | 2022-03-21T09:27:25.000Z | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.8
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from .... | 28.779661 | 105 | 0.545936 |
48f2a464a8766ba501f97481c67f0abb7ec40903 | 450 | py | Python | tests/unit/test_helpers.py | broper2/solana-py | 146390d959f017e137238335ee6fa362ad1a1ab4 | [
"MIT"
] | 477 | 2020-08-28T08:49:49.000Z | 2022-03-30T16:19:03.000Z | tests/unit/test_helpers.py | broper2/solana-py | 146390d959f017e137238335ee6fa362ad1a1ab4 | [
"MIT"
] | 195 | 2020-08-27T11:55:42.000Z | 2022-03-31T18:59:55.000Z | tests/unit/test_helpers.py | broper2/solana-py | 146390d959f017e137238335ee6fa362ad1a1ab4 | [
"MIT"
] | 143 | 2020-08-27T03:10:55.000Z | 2022-03-30T17:27:35.000Z | """Test helpers."""
from random import randint
import pytest
import solana.utils.helpers as helpers
def test_to_uint8_bytes():
"""Test int to uint8 bytes."""
assert helpers.to_uint8_bytes(255) == b"\xff"
with pytest.raises(OverflowError):
helpers.to_uint8_bytes(256)
def test_from_uint8():
... | 21.428571 | 71 | 0.697778 |
6e1689f458e20deb9498cb63a6bf112b993ff847 | 109,319 | py | Python | jax/numpy/lax_numpy.py | stephentu/jax | 7ecfa542269371833fd50b6078e86e7d624cd9e3 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | jax/numpy/lax_numpy.py | stephentu/jax | 7ecfa542269371833fd50b6078e86e7d624cd9e3 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | jax/numpy/lax_numpy.py | stephentu/jax | 7ecfa542269371833fd50b6078e86e7d624cd9e3 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 33.98166 | 101 | 0.671859 |
d144b3b32a184a5b702ada1f995b60bddf521b9c | 965 | py | Python | etl/core/tests.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 6 | 2018-06-27T00:09:55.000Z | 2019-03-07T14:06:53.000Z | etl/core/tests.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2021-03-31T18:37:46.000Z | 2021-06-01T21:49:41.000Z | etl/core/tests.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2020-01-24T16:40:49.000Z | 2021-09-30T02:28:55.000Z | from etl.core.task import Task
from etl.core.plan import Plan
from etl.core.engine import Engine
from inspect import signature
import logging
import asyncio, uvloop
import os
TEST_LOG_FMT = '%(asctime)s|%(funcName)s|%(process)s-%(thread)s|%(levelname)s|%(message)s'
logging.basicConfig(level=logging.INFO, format=TEST_LO... | 21.931818 | 90 | 0.691192 |
6b59af4ab3476e2832abe36695a85e3f7fc8281f | 31,119 | py | Python | aesara/tensor/type.py | abdalazizrashid/Theano-PyMC | 90fa750461e91fb6281d494ae86404e2153fd7eb | [
"BSD-3-Clause"
] | null | null | null | aesara/tensor/type.py | abdalazizrashid/Theano-PyMC | 90fa750461e91fb6281d494ae86404e2153fd7eb | [
"BSD-3-Clause"
] | null | null | null | aesara/tensor/type.py | abdalazizrashid/Theano-PyMC | 90fa750461e91fb6281d494ae86404e2153fd7eb | [
"BSD-3-Clause"
] | null | null | null | import logging
import warnings
import numpy as np
import aesara
from aesara import config
from aesara import scalar as scal
from aesara.gof import Type, Variable, hashtype
_logger = logging.getLogger("aesara.tensor.type")
class TensorType(Type):
"""
Symbolic `Type` representing a numpy.ndarray value.
... | 35.483466 | 96 | 0.522446 |
81bfd005be90b5f6c7c3eca102fd938eb0bbd34b | 2,796 | py | Python | fa-rename.py | alrojascr/Virus-Data-Curation | efc2584172c7524f8548693c889906e523ca91ef | [
"MIT"
] | null | null | null | fa-rename.py | alrojascr/Virus-Data-Curation | efc2584172c7524f8548693c889906e523ca91ef | [
"MIT"
] | null | null | null | fa-rename.py | alrojascr/Virus-Data-Curation | efc2584172c7524f8548693c889906e523ca91ef | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Usage
import argparse
from argparse import RawTextHelpFormatter
import csv
from Bio import SeqIO
from Bio.SeqRecord import SeqRecord
from io import StringIO
import os
import sys
import re
# Functions
# Log a message to stderr
def msg(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
... | 30.725275 | 130 | 0.700644 |
9174393bae6bdf661d43b65c5cc8384b832080ba | 3,251 | py | Python | rlcard/envs/uno.py | alanzhu39/rlcard | 77adcb919ed66868e0fd0170229856dc143c27ce | [
"MIT"
] | 2 | 2020-08-24T21:30:44.000Z | 2020-10-27T03:44:04.000Z | rlcard/envs/uno.py | daochenzha/rlcard | c92039742ce80825b08d81de1ec6c5a9f7d6a532 | [
"MIT"
] | null | null | null | rlcard/envs/uno.py | daochenzha/rlcard | c92039742ce80825b08d81de1ec6c5a9f7d6a532 | [
"MIT"
] | 2 | 2020-02-23T17:26:14.000Z | 2020-12-22T15:34:13.000Z | import numpy as np
from rlcard.envs.env import Env
from rlcard import models
from rlcard.games.uno.game import UnoGame as Game
from rlcard.games.uno.utils import encode_hand, encode_target
from rlcard.games.uno.utils import ACTION_SPACE, ACTION_LIST
from rlcard.games.uno.card import UnoCard
class UnoEnv(Env):
d... | 33.173469 | 89 | 0.57367 |
7556c18cf2c188555cabe88ef1b28f9169b4ea39 | 2,894 | py | Python | huey/contrib/djhuey/__init__.py | winkidney/huey | cda66da19e8a92d98453b53e106c3a74c20f640b | [
"MIT"
] | null | null | null | huey/contrib/djhuey/__init__.py | winkidney/huey | cda66da19e8a92d98453b53e106c3a74c20f640b | [
"MIT"
] | null | null | null | huey/contrib/djhuey/__init__.py | winkidney/huey | cda66da19e8a92d98453b53e106c3a74c20f640b | [
"MIT"
] | 1 | 2019-10-22T13:04:23.000Z | 2019-10-22T13:04:23.000Z | from functools import wraps
import sys
from django.conf import settings
from django.db import connection
from huey import crontab
from huey import RedisHuey
from huey.utils import load_class
configuration_message = """
Configuring Huey for use with Django
====================================
Huey was designed to b... | 27.301887 | 78 | 0.664824 |
5eea98d326737ea22b6d51a5befb1afb43d96094 | 796 | py | Python | venv/lib/python3.8/site-packages/troposphere/mediastore.py | ayfallen/urler | d7bb5c83018a75cb4af2bbb7178bcf364b61f68f | [
"MIT"
] | 2 | 2021-04-03T06:34:08.000Z | 2022-01-14T22:27:02.000Z | venv/lib/python3.8/site-packages/troposphere/mediastore.py | ayfallen/urler | d7bb5c83018a75cb4af2bbb7178bcf364b61f68f | [
"MIT"
] | 6 | 2020-09-05T01:40:23.000Z | 2022-03-12T00:40:58.000Z | venv/lib/python3.8/site-packages/troposphere/mediastore.py | ayfallen/urler | d7bb5c83018a75cb4af2bbb7178bcf364b61f68f | [
"MIT"
] | 1 | 2020-09-05T00:19:03.000Z | 2020-09-05T00:19:03.000Z | # Copyright (c) 2012-2019, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from . import AWSObject
from . import AWSProperty
from .validators import boolean
from .validators import integer
class CorsRule(AWSProperty):
props = {
'AllowedHeaders': ([str], False),
... | 24.121212 | 52 | 0.61809 |
a4ae99f2f800bfec6cc641a9454f31fa318dbfb4 | 679 | py | Python | upload_terms.py | vikineema/deafrica-docs | 3e82b1dee56508fe31341263cd1ddb6857532715 | [
"Apache-2.0"
] | 5 | 2020-08-20T05:31:43.000Z | 2021-05-18T13:07:21.000Z | upload_terms.py | vikineema/deafrica-docs | 3e82b1dee56508fe31341263cd1ddb6857532715 | [
"Apache-2.0"
] | 62 | 2020-07-30T06:43:24.000Z | 2021-12-19T23:22:46.000Z | upload_terms.py | vikineema/deafrica-docs | 3e82b1dee56508fe31341263cd1ddb6857532715 | [
"Apache-2.0"
] | 1 | 2020-11-23T10:18:34.000Z | 2020-11-23T10:18:34.000Z | import os
from poeditor import POEditorAPI
project_id = os.environ['POEDITOR_PROJECT_ID']
api_token = os.environ['POEDITOR_API_TOKEN']
client = POEditorAPI(api_token=api_token)
project = client.view_project_details(project_id)
print(f"Before update, {project['name']} (id: {project['id']}) has {project['terms']} terms... | 28.291667 | 94 | 0.724595 |
325b8febd802ba0023742dac23d2c3ef83c16e02 | 1,947 | py | Python | papers/DaCy-A-Unified-Framework-for-Danish-NLP/apply_fns/apply_fn_daluke.py | martbern/DaCy | 3c181d37de2c4f38886a729511ac18d728d05b0b | [
"Apache-2.0"
] | 35 | 2021-07-12T15:29:11.000Z | 2022-03-17T04:35:36.000Z | papers/DaCy-A-Unified-Framework-for-Danish-NLP/apply_fns/apply_fn_daluke.py | martbern/DaCy | 3c181d37de2c4f38886a729511ac18d728d05b0b | [
"Apache-2.0"
] | 51 | 2021-07-10T18:12:43.000Z | 2022-03-15T22:28:19.000Z | papers/DaCy-A-Unified-Framework-for-Danish-NLP/apply_fns/apply_fn_daluke.py | martbern/DaCy | 3c181d37de2c4f38886a729511ac18d728d05b0b | [
"Apache-2.0"
] | 10 | 2021-07-15T06:12:03.000Z | 2022-03-17T04:35:49.000Z | ### pip install daluke==0.0.5
from typing import Iterable, List
from spacy.tokens import Span, Doc
from spacy.training import Example
from spacy.lang.da import Danish
from daluke import AutoNERDaLUKE, predict_ner
from .apply_fn_utils import apply_on_multiple_examples, add_iob, no_misc_getter
# This also downloads d... | 29.5 | 93 | 0.691834 |
c786fa6438e645f35c14966b7e75a93d0e7b4eb0 | 1,877 | py | Python | electrum_but/plot.py | Butkoin/electrum-but | 254fd26fc09a5fd925669da0f8608a4afacd86da | [
"MIT"
] | null | null | null | electrum_but/plot.py | Butkoin/electrum-but | 254fd26fc09a5fd925669da0f8608a4afacd86da | [
"MIT"
] | null | null | null | electrum_but/plot.py | Butkoin/electrum-but | 254fd26fc09a5fd925669da0f8608a4afacd86da | [
"MIT"
] | null | null | null | import datetime
from collections import defaultdict
import matplotlib
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt
import matplotlib.dates as md
from .i18n import _
from .bitcoin import COIN
class NothingToPlotException(Exception):
def __str__(self):
return _("Nothing to plot.")
def plot_h... | 29.328125 | 76 | 0.634523 |
af4f1201e276de5f526f6c0ea4c520273a544e4c | 2,305 | py | Python | pyrai/dispatcher/methods/fleet/update_vehicle.py | routable-ai/pyrai | 2aa448886ba14d1f44b408b67040a76d5f732528 | [
"MIT"
] | null | null | null | pyrai/dispatcher/methods/fleet/update_vehicle.py | routable-ai/pyrai | 2aa448886ba14d1f44b408b67040a76d5f732528 | [
"MIT"
] | null | null | null | pyrai/dispatcher/methods/fleet/update_vehicle.py | routable-ai/pyrai | 2aa448886ba14d1f44b408b67040a76d5f732528 | [
"MIT"
] | 1 | 2020-07-13T15:37:15.000Z | 2020-07-13T15:37:15.000Z | import datetime
import json
import requests
from pyrai.dispatcher.structures.fleet_params import FleetParams
from pyrai.dispatcher.structures.defaults import Defaults
from pyrai.dispatcher.structures.endpoints import Endpoints
from pyrai.dispatcher.structures.vehicle import Vehicle
from pyrai.dispatcher.structures.sta... | 37.786885 | 115 | 0.681996 |
dcb72a027867a44375014c80a249ad2e42d106e9 | 696 | py | Python | api/migrations/0002_auto_20180412_0051.py | pokotsun/kyutechAppServer2018 | 9fe579c63e59ee585137e89d11c9cdccd58d3186 | [
"MIT"
] | 4 | 2018-08-09T15:19:06.000Z | 2021-04-03T12:24:57.000Z | api/migrations/0002_auto_20180412_0051.py | pokotsun/kyutechAppServer2018 | 9fe579c63e59ee585137e89d11c9cdccd58d3186 | [
"MIT"
] | 2 | 2018-10-19T15:32:17.000Z | 2020-06-05T19:41:14.000Z | api/migrations/0002_auto_20180412_0051.py | pokotsun/kyutechAppServer2018 | 9fe579c63e59ee585137e89d11c9cdccd58d3186 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.4 on 2018-04-11 15:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='news',
options={'verbose_name_plural': '... | 24.857143 | 63 | 0.570402 |
5ccbb337d2a1fdf45c44db2437a63da3bdb23c1f | 9,358 | py | Python | datadog_checks_base/datadog_checks/base/utils/db/utils.py | ichizero/integrations-core | 362f3d3f054a9a3fc8378a6d197906780eec3d2c | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_base/datadog_checks/base/utils/db/utils.py | ichizero/integrations-core | 362f3d3f054a9a3fc8378a6d197906780eec3d2c | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_base/datadog_checks/base/utils/db/utils.py | ichizero/integrations-core | 362f3d3f054a9a3fc8378a6d197906780eec3d2c | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import datetime
import decimal
import logging
import os
import socket
import threading
import time
from concurrent.futures.thread import ThreadPoolExecutor
from itertools import chain
from typing import An... | 34.153285 | 115 | 0.629087 |
29762791a680f039d5e84b4d4f97c424197f0be2 | 1,604 | py | Python | samples/generated_samples/dataproc_v1_generated_autoscaling_policy_service_list_autoscaling_policies_async.py | gplasky/python-dataproc | 61c7b2133450dbda49d42a179a7e5ad8f3b7de17 | [
"Apache-2.0"
] | null | null | null | samples/generated_samples/dataproc_v1_generated_autoscaling_policy_service_list_autoscaling_policies_async.py | gplasky/python-dataproc | 61c7b2133450dbda49d42a179a7e5ad8f3b7de17 | [
"Apache-2.0"
] | null | null | null | samples/generated_samples/dataproc_v1_generated_autoscaling_policy_service_list_autoscaling_policies_async.py | gplasky/python-dataproc | 61c7b2133450dbda49d42a179a7e5ad8f3b7de17 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# 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... | 34.12766 | 86 | 0.773067 |
6979c69b3e33de59b1df4127c013078597379829 | 4,428 | py | Python | tests/test_hlm.py | slavisasarafijanovic/testcloneswifthlm | dd5979b8c86971da5d0a23e5cf31320c42bcac51 | [
"Apache-2.0"
] | null | null | null | tests/test_hlm.py | slavisasarafijanovic/testcloneswifthlm | dd5979b8c86971da5d0a23e5cf31320c42bcac51 | [
"Apache-2.0"
] | null | null | null | tests/test_hlm.py | slavisasarafijanovic/testcloneswifthlm | dd5979b8c86971da5d0a23e5cf31320c42bcac51 | [
"Apache-2.0"
] | null | null | null | # 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, software
# distributed under the... | 36.9 | 79 | 0.644761 |
f55e29a3f9d1a924bef285ca13ef2c826589a14c | 148 | py | Python | server.py | Kuduxaaa/wavetech-bypass | 9560e2547b2bd8bb2b82286b6512a93188ca24d3 | [
"MIT"
] | null | null | null | server.py | Kuduxaaa/wavetech-bypass | 9560e2547b2bd8bb2b82286b6512a93188ca24d3 | [
"MIT"
] | null | null | null | server.py | Kuduxaaa/wavetech-bypass | 9560e2547b2bd8bb2b82286b6512a93188ca24d3 | [
"MIT"
] | null | null | null | #!/bin/python3
# -*- coding: utf-8 -*-
# Coded By Kuduxaaa
from app import app
if __name__ == '__main__':
app.run(debug=False, port=8083)
| 16.444444 | 35 | 0.628378 |
4d8d59f6e3e7e7c5da4bab8cd04e1522f26627b5 | 1,261 | py | Python | hardware/api/urls.py | KoenVingerhoets/bitnodes-hardware | 75707bbf8aabb0add11e8fa293d4d5848467417c | [
"MIT"
] | 45 | 2015-05-27T18:04:46.000Z | 2021-12-30T11:31:33.000Z | hardware/api/urls.py | KoenVingerhoets/bitnodes-hardware | 75707bbf8aabb0add11e8fa293d4d5848467417c | [
"MIT"
] | 6 | 2015-06-11T03:47:04.000Z | 2016-05-22T00:39:55.000Z | hardware/api/urls.py | KoenVingerhoets/bitnodes-hardware | 75707bbf8aabb0add11e8fa293d4d5848467417c | [
"MIT"
] | 15 | 2015-06-10T13:22:03.000Z | 2021-10-24T00:16:17.000Z | #
# Copyright (c) Addy Yeow Chin Heng <ayeowch@gmail.com>
#
# 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... | 43.482759 | 72 | 0.766059 |
ae5bc77434b47fc41b395773c969a215983afc56 | 246 | py | Python | Searching/BS/bisect_lib.py | kimjiwook0129/Coding-Interivew-Cheatsheet | 574e6acecdb617b9c3cef7ec3b154ab183d8b99a | [
"MIT"
] | 3 | 2022-01-09T04:33:04.000Z | 2022-02-04T17:40:43.000Z | Searching/BS/bisect_lib.py | kimjiwook0129/Coding-Interivew-Cheatsheet | 574e6acecdb617b9c3cef7ec3b154ab183d8b99a | [
"MIT"
] | null | null | null | Searching/BS/bisect_lib.py | kimjiwook0129/Coding-Interivew-Cheatsheet | 574e6acecdb617b9c3cef7ec3b154ab183d8b99a | [
"MIT"
] | null | null | null | from bisect import bisect_left, bisect_right
# Each function peforms at O(log N)
a = [1, 2, 4, 4, 4, 4, 7, 8, 8]
x = 0
print(f'First index to place x in a {bisect_left(a, x)}') # 2
print(f'Last index to place x in a {bisect_right(a, x)}') # 4
| 30.75 | 62 | 0.646341 |
909b616056cdeee8ad19f151c9b1f3459f5ab042 | 2,536 | py | Python | src/eeschema/export_bom.py | Vman45/kicad-automation-scripts | f7144ac2c6bf8cdf19f4f0a7b414acbe48ec7e41 | [
"Apache-2.0"
] | 55 | 2018-05-05T19:30:29.000Z | 2022-03-27T20:09:38.000Z | src/eeschema/export_bom.py | Vman45/kicad-automation-scripts | f7144ac2c6bf8cdf19f4f0a7b414acbe48ec7e41 | [
"Apache-2.0"
] | 9 | 2018-07-07T22:32:44.000Z | 2021-12-01T21:25:55.000Z | src/eeschema/export_bom.py | Vman45/kicad-automation-scripts | f7144ac2c6bf8cdf19f4f0a7b414acbe48ec7e41 | [
"Apache-2.0"
] | 24 | 2018-05-04T08:32:07.000Z | 2022-02-01T19:47:25.000Z | #!/usr/bin/env python
# Copyright 2015-2016 Scott Bezek and the splitflap contributors
#
# 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/LICENS... | 30.554217 | 89 | 0.70623 |
3c85254bafbe9c638064088a915fc35b32cc452f | 9,691 | py | Python | add_features.py | brt381/TCAG-WGS-CNV-workflow | b074d6047021551c510e6b1c8384ad3bf05e3cb7 | [
"MIT"
] | 39 | 2018-01-06T01:45:31.000Z | 2022-03-17T08:27:05.000Z | add_features.py | brt381/TCAG-WGS-CNV-workflow | b074d6047021551c510e6b1c8384ad3bf05e3cb7 | [
"MIT"
] | 10 | 2018-09-18T10:12:57.000Z | 2020-06-03T15:11:05.000Z | add_features.py | brt381/TCAG-WGS-CNV-workflow | b074d6047021551c510e6b1c8384ad3bf05e3cb7 | [
"MIT"
] | 16 | 2018-01-11T08:36:03.000Z | 2020-03-09T09:24:10.000Z | #program annotate a merged erds results with merged cnvnator results
import os
import sys
import re
import getopt
import functions
#file names
input_file_name = ""
output_file_name = ""
sample_id = ""
annot_file_name = ""
i_map = {}
alt_id = {}
#% overlap cutoff
overlap_cutoff = 0
overlap_type = "one... | 30.570978 | 179 | 0.579507 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.