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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e1380953e45198fa9e2e06574415a9672cb1b40a | 99,305 | py | Python | myvenv/lib/python3.6/site-packages/pandas/plotting/_core.py | catb0y/twitter_feeling | 9092a26f2554bbf6b14b33d797abaffa48cda99c | [
"MIT"
] | 4 | 2018-06-03T14:08:15.000Z | 2020-09-09T01:56:29.000Z | myvenv/lib/python3.6/site-packages/pandas/plotting/_core.py | catb0y/twitter_feeling | 9092a26f2554bbf6b14b33d797abaffa48cda99c | [
"MIT"
] | 2 | 2018-01-22T23:21:36.000Z | 2018-01-22T23:31:27.000Z | myvenv/lib/python3.6/site-packages/pandas/plotting/_core.py | catb0y/twitter_feeling | 9092a26f2554bbf6b14b33d797abaffa48cda99c | [
"MIT"
] | 5 | 2018-05-19T05:08:51.000Z | 2021-04-29T16:03:45.000Z | # being a bit too dynamic
# pylint: disable=E1101
from __future__ import division
import warnings
import re
from collections import namedtuple
from distutils.version import LooseVersion
import numpy as np
from pandas.util._decorators import cache_readonly
from pandas.core.base import PandasObject
from pandas.core.co... | 34.397298 | 84 | 0.558562 |
6849a6481c1e9b24fa7a16daf6743df3e2cb1d4e | 1,485 | py | Python | nciauth_girder3/__init__.py | knowledgevis/NCIAuth-girder3 | cb4b7a71ae0aeec068dc3e1a5f321cd700c79ad5 | [
"Apache-2.0"
] | null | null | null | nciauth_girder3/__init__.py | knowledgevis/NCIAuth-girder3 | cb4b7a71ae0aeec068dc3e1a5f321cd700c79ad5 | [
"Apache-2.0"
] | null | null | null | nciauth_girder3/__init__.py | knowledgevis/NCIAuth-girder3 | cb4b7a71ae0aeec068dc3e1a5f321cd700c79ad5 | [
"Apache-2.0"
] | null | null | null |
#from girder.constants import SettingKey, SettingDefault
#from girder.constants import SettingDefault
from girder.utility import config, setting_utilities
from . import rest, constants
# added for Girder V3
from girder import plugin
@setting_utilities.validator(constants.PluginSettings.PROVIDERS_ENABLED)
def valid... | 37.125 | 97 | 0.791919 |
0d5e7f90e99e1ae85937a5c263ecf441b03172e3 | 5,567 | py | Python | src/maestral_cocoa/activity.py | samschott/maestral-cocoa | 270574545267dcd32f643f12daf4b5e31edd29bf | [
"MIT"
] | 2 | 2022-01-08T11:18:20.000Z | 2022-01-26T13:41:34.000Z | src/maestral_cocoa/activity.py | samschott/maestral-cocoa | 270574545267dcd32f643f12daf4b5e31edd29bf | [
"MIT"
] | 4 | 2022-01-05T09:16:30.000Z | 2022-03-29T09:32:44.000Z | src/maestral_cocoa/activity.py | samschott/maestral-cocoa | 270574545267dcd32f643f12daf4b5e31edd29bf | [
"MIT"
] | 1 | 2022-01-05T08:56:59.000Z | 2022-01-05T08:56:59.000Z | # -*- coding: utf-8 -*-
from __future__ import annotations
# system imports
import os.path as osp
import asyncio
from datetime import datetime
from typing import Iterable, Any
# external imports
import click
import toga
from toga.sources import Source
from toga.style.pack import Pack
from maestral.models import Sync... | 30.756906 | 84 | 0.625831 |
a705adff06687c26b9e5ff81bcf33b14b64aaebf | 2,111 | py | Python | src/pipelining/pipes/pipe_evaluate_final_anwendungsfeld_sm.py | acdh-oeaw/mara_nlp_suite | 223850ffde46bb9fedce9981d1f7a94f865a6a5a | [
"MIT"
] | null | null | null | src/pipelining/pipes/pipe_evaluate_final_anwendungsfeld_sm.py | acdh-oeaw/mara_nlp_suite | 223850ffde46bb9fedce9981d1f7a94f865a6a5a | [
"MIT"
] | null | null | null | src/pipelining/pipes/pipe_evaluate_final_anwendungsfeld_sm.py | acdh-oeaw/mara_nlp_suite | 223850ffde46bb9fedce9981d1f7a94f865a6a5a | [
"MIT"
] | null | null | null | from etl.gold_data_manager import GoldDataContainer, GoldDataItem
from pipelining.pipe_root import ConfigRoot
from etl import maxqdata_manager, gold_data_transform_rules, gold_data_manager
from pipelining import data_flow_registry
from IPython import embed
from pipelining.pipes import pipe_train_AF
from evaluators impo... | 34.606557 | 81 | 0.755566 |
13ceb7802f436344bd1a2181f29c27abdf4343d3 | 10,771 | py | Python | view/gui/flags_box.py | galizia-lab/pyview | 07bef637b0c60fae8830c1b3947e4a7bcd14bb2c | [
"BSD-3-Clause"
] | 2 | 2021-11-07T10:17:16.000Z | 2021-11-07T10:17:19.000Z | view/gui/flags_box.py | galizia-lab/pyview | 07bef637b0c60fae8830c1b3947e4a7bcd14bb2c | [
"BSD-3-Clause"
] | 5 | 2021-11-03T12:43:03.000Z | 2021-12-16T10:34:52.000Z | view/gui/flags_box.py | galizia-lab/pyview | 07bef637b0c60fae8830c1b3947e4a7bcd14bb2c | [
"BSD-3-Clause"
] | 1 | 2021-09-23T15:46:26.000Z | 2021-09-23T15:46:26.000Z | from PyQt5.QtWidgets import QTableWidget, QTabWidget, QLineEdit, QMessageBox, QPushButton, QVBoxLayout, QWidget, \
QSizePolicy, QHeaderView, QMenu, QComboBox, QHBoxLayout, QLabel, QWidget
from PyQt5.QtGui import QGuiApplication, QCursor
from PyQt5.QtCore import pyqtSignal, pyqtSlot, QObject
from .flags_search impor... | 40.190299 | 114 | 0.68963 |
2adc86cf7198998e26a7c43dc49885820f9d8806 | 1,143 | py | Python | main.py | Neira1991/opendata | 950697707ac9f0abf438634101812c4803195885 | [
"MIT"
] | null | null | null | main.py | Neira1991/opendata | 950697707ac9f0abf438634101812c4803195885 | [
"MIT"
] | null | null | null | main.py | Neira1991/opendata | 950697707ac9f0abf438634101812c4803195885 | [
"MIT"
] | null | null | null | import json
import matplotlib.pyplot as plt
from makegraph.generate_graph import GenerateGraph
import networkx as nx
def run():
# Opening JSON file
f = open('data/matches/2068/structured_data.json', 'r')
p = open('data/matches/2068/match_data.json', 'r')
data = json.load(f)
data_players = json.loa... | 31.75 | 108 | 0.67804 |
d92f9f6589f0568a1ea6d3701bf5d8cab246d462 | 5,020 | py | Python | venv/lib/python3.8/site-packages/ansible_test/_internal/payload.py | saeedya/docker-ansible | 6fb0cfc6bc4a5925b21380952a5a4502ec02119a | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.8/site-packages/ansible_test/_internal/payload.py | saeedya/docker-ansible | 6fb0cfc6bc4a5925b21380952a5a4502ec02119a | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.8/site-packages/ansible_test/_internal/payload.py | saeedya/docker-ansible | 6fb0cfc6bc4a5925b21380952a5a4502ec02119a | [
"Apache-2.0"
] | null | null | null | """Payload management for sending Ansible files and test content to other systems (VMs, containers)."""
from __future__ import annotations
import atexit
import os
import stat
import tarfile
import tempfile
import time
import typing as t
from .constants import (
ANSIBLE_BIN_SYMLINK_MAP,
)
from .config import (
... | 37.744361 | 153 | 0.6749 |
f2bb97f77659dbc5094d9d784a3a609d312cc868 | 299 | py | Python | kaybee/plugins/resources/container.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | 2 | 2017-11-08T19:55:57.000Z | 2018-12-21T12:41:41.000Z | kaybee/plugins/resources/container.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | null | null | null | kaybee/plugins/resources/container.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | 1 | 2018-10-13T08:59:29.000Z | 2018-10-13T08:59:29.000Z | """
A UserDict container for resources.
This allows us to validate schemas on add plus provide some query-like
methods on the app.resources instance
"""
from collections import UserDict
class ResourcesContainer(UserDict):
def __setitem__(self, name, value):
self.data[name] = value
| 19.933333 | 70 | 0.749164 |
40fc786cbdac618c3d699ce1f9c3e970040d58dd | 31,068 | py | Python | thermo/gpumd/data.py | hityingph/thermo | 08faef51ad4333e816cadf838a224773152421fc | [
"MIT"
] | 3 | 2022-01-03T06:30:36.000Z | 2022-01-06T00:36:57.000Z | thermo/gpumd/data.py | hityingph/thermo | 08faef51ad4333e816cadf838a224773152421fc | [
"MIT"
] | null | null | null | thermo/gpumd/data.py | hityingph/thermo | 08faef51ad4333e816cadf838a224773152421fc | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import os
import copy
import multiprocessing as mp
from functools import partial
from collections import deque
from .common import __get_path, __get_direction, __check_list, __check_range
__author__ = "Alexander Gabourie"
__email__ = "gabourie@stanford.edu"
####################... | 32.028866 | 120 | 0.601262 |
f1170f1f784e4369b6867e5901bb595c35bcb6a7 | 4,950 | py | Python | schema.py | ines/spacy-graphql | a71b51c668fa434a645fdbed90bf538e59f3cb4a | [
"MIT"
] | 87 | 2018-08-01T15:24:47.000Z | 2022-02-01T18:10:35.000Z | schema.py | ines/spacy-graphql | a71b51c668fa434a645fdbed90bf538e59f3cb4a | [
"MIT"
] | null | null | null | schema.py | ines/spacy-graphql | a71b51c668fa434a645fdbed90bf538e59f3cb4a | [
"MIT"
] | 10 | 2018-08-01T23:33:27.000Z | 2020-01-07T23:15:15.000Z | from graphene import ObjectType, Field, List, String, Boolean, Int, Float
class Token(ObjectType):
"""An individual token — a word, punctuation symbol, whitespace, etc."""
text = String(description="Verbatim text")
text_with_ws = String(description="Text with trailing space, if present")
orth = Int(d... | 49.5 | 89 | 0.724242 |
6be0d720a8cb7e0f129f6c27a1253c2ba04603a8 | 914 | py | Python | DJCore.py | ammasyaa/bot-presence | 1111f2159973d0abd3eec1862728a6a898ab0a1b | [
"MIT"
] | null | null | null | DJCore.py | ammasyaa/bot-presence | 1111f2159973d0abd3eec1862728a6a898ab0a1b | [
"MIT"
] | null | null | null | DJCore.py | ammasyaa/bot-presence | 1111f2159973d0abd3eec1862728a6a898ab0a1b | [
"MIT"
] | null | null | null | import discord
import os
from discord.ext import commands
bot = commands.AutoShardedBot(case_insensitive=True, command_prefix=commands.when_mentioned_or(os.getenv('PREFIX')))
bot.remove_command('help')
bot.initials = ('modules.misc', 'modules.music', 'modules.handler', 'modules.owner')
bot.owner = int(os.getenv('OWNER... | 32.642857 | 146 | 0.71663 |
932eeb4269b05020b8251453bfc5a400c85cd3e1 | 33,612 | py | Python | reviewboard/diffviewer/parser.py | b1pb1p/reviewboard | b13aca3b88bc16d3c4258adce5df79cd1da577d3 | [
"MIT"
] | null | null | null | reviewboard/diffviewer/parser.py | b1pb1p/reviewboard | b13aca3b88bc16d3c4258adce5df79cd1da577d3 | [
"MIT"
] | null | null | null | reviewboard/diffviewer/parser.py | b1pb1p/reviewboard | b13aca3b88bc16d3c4258adce5df79cd1da577d3 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import io
import logging
import re
from django.utils import six
from django.utils.encoding import force_bytes
from django.utils.translation import ugettext as _
from djblets.util.properties import AliasProperty, TypedProperty
from reviewboard.deprecation import RemovedInReview... | 34.50924 | 79 | 0.587885 |
3767af49cd6a236c8ca1b59cc3456bfaebe6a1f5 | 1,624 | py | Python | mycloud/drive/filesystem/metadata_manager.py | ThomasGassmann/swisscom-my-cloud-backup | 97e222c45a54197c82c8f3a5d59aa20bf3382ed8 | [
"MIT"
] | 4 | 2019-11-28T22:10:43.000Z | 2022-01-23T15:18:26.000Z | mycloud/drive/filesystem/metadata_manager.py | ThomasGassmann/swisscom-my-cloud-backup | 97e222c45a54197c82c8f3a5d59aa20bf3382ed8 | [
"MIT"
] | 18 | 2019-01-20T22:30:48.000Z | 2020-06-09T21:16:07.000Z | mycloud/drive/filesystem/metadata_manager.py | thomasgassmann/mycloud-cli | 97e222c45a54197c82c8f3a5d59aa20bf3382ed8 | [
"MIT"
] | null | null | null | from mycloud.common import get_string_generator
from mycloud.constants import METADATA_FILE_NAME
from mycloud.drive.filesystem.file_metadata import FileMetadata
from mycloud.drive.filesystem.translatable_path import TranslatablePath
from mycloud.mycloudapi import MyCloudRequestExecutor, ObjectResourceBuilder
from myclo... | 46.4 | 86 | 0.759236 |
37d5f9daa8e6b4d0194745f765c55b0f973da231 | 2,940 | py | Python | tests/test_compositions/test_composition.py | rddaz2013/pysketcher | 9d4079baf0aa04f8fa80dc6edcf03bf1c14f70a4 | [
"MIT"
] | 27 | 2020-09-03T16:59:32.000Z | 2022-03-11T08:21:25.000Z | tests/test_compositions/test_composition.py | ReblochonMasque/pysketcher-1 | 9e804f4855edc6962b68e92091f35c2e960df813 | [
"MIT"
] | 395 | 2020-09-05T06:32:54.000Z | 2022-03-31T12:06:55.000Z | tests/test_compositions/test_composition.py | ReblochonMasque/pysketcher-1 | 9e804f4855edc6962b68e92091f35c2e960df813 | [
"MIT"
] | 4 | 2021-04-19T09:23:06.000Z | 2021-11-12T20:21:30.000Z | from hypothesis import given
from hypothesis.strategies import floats, sampled_from
import pytest
from pysketcher import Line, Point, Shape, Style, Text
from pysketcher.composition import Composition
class TestCompositionStyle:
@pytest.fixture(scope="module")
def composition(self):
shape1 = Line(Poin... | 41.408451 | 85 | 0.690816 |
2e469afc59ca855e8c6bc6a237f7491b3038e42d | 1,878 | py | Python | a1fbox/calllist.py | mvo5/a1fbox | 7d1d648717d58538a2f14d711cff9e584e901d09 | [
"MIT"
] | null | null | null | a1fbox/calllist.py | mvo5/a1fbox | 7d1d648717d58538a2f14d711cff9e584e901d09 | [
"MIT"
] | null | null | null | a1fbox/calllist.py | mvo5/a1fbox | 7d1d648717d58538a2f14d711cff9e584e901d09 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from collections import Counter
from time import sleep
from callinfo import CallInfo
from callprefix import CallPrefix
from fritzconn import FritzConn
from fritzconnection.lib.fritzcall import FritzCall
from phonebook import Phonebook
if __name__ == "__main__":
# Quick example how to use only
... | 30.786885 | 102 | 0.657082 |
fca0e7dcdc96233c4aba182b784b4ddcf64c734c | 507 | py | Python | plotly/validators/scatter3d/marker/colorbar/_tickvalssrc.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/scatter3d/marker/colorbar/_tickvalssrc.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/scatter3d/marker/colorbar/_tickvalssrc.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name='tickvalssrc',
parent_name='scatter3d.marker.colorbar',
**kwargs
):
super(TickvalssrcValidator, self).__init__(
plotly... | 26.684211 | 70 | 0.617357 |
70f8134cc8f4a42b7d9133d5a22461fe393337c1 | 3,097 | py | Python | python/dllib/examples/autograd/custom.py | DirkFi/BigDL | 7493209165c046116470b9a1e1c8f527915d6f1e | [
"Apache-2.0"
] | 3 | 2021-07-14T01:28:47.000Z | 2022-03-02T01:16:32.000Z | python/dllib/examples/autograd/custom.py | DirkFi/BigDL | 7493209165c046116470b9a1e1c8f527915d6f1e | [
"Apache-2.0"
] | null | null | null | python/dllib/examples/autograd/custom.py | DirkFi/BigDL | 7493209165c046116470b9a1e1c8f527915d6f1e | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2016 The BigDL 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 law or agreed to in ... | 34.411111 | 101 | 0.661608 |
43d410ed1629317c0ed17df2fcac9119300bb4df | 4,614 | py | Python | code_v1.2/prepare_peakCalling.py | Xinfeng-Yao/APEC | 0596e2c8947fd9eb3b4cb5acee8d298ebbe8408a | [
"BSD-2-Clause"
] | 24 | 2019-03-08T03:06:14.000Z | 2021-12-13T06:38:59.000Z | code_v1.2/prepare_peakCalling.py | Xinfeng-Yao/APEC | 0596e2c8947fd9eb3b4cb5acee8d298ebbe8408a | [
"BSD-2-Clause"
] | 1 | 2020-06-30T04:53:34.000Z | 2020-07-14T01:25:32.000Z | code_v1.2/prepare_peakCalling.py | Xinfeng-Yao/APEC | 0596e2c8947fd9eb3b4cb5acee8d298ebbe8408a | [
"BSD-2-Clause"
] | 6 | 2019-06-14T03:17:00.000Z | 2021-12-18T05:49:48.000Z | #!/usr/bin/python
#
import warnings
warnings.filterwarnings("ignore")
#
import os,numpy,sys,subprocess
from optparse import OptionParser
import subroutines
#
#
opts = OptionParser()
usage = "Call peaks\nusage: %prog -s project --blist blacklist.bed --fa genome_chr.fa --tss tssFile --logq 3"
opts = OptionParser(usage=us... | 44.365385 | 133 | 0.657997 |
0cef925bd8246224363aee57d548faff6bfc591e | 547 | py | Python | pyscripts/knn.py | mathewjhan/ivyhacks | e966754170e2638f5ac6714df33692e6ce294e88 | [
"MIT"
] | null | null | null | pyscripts/knn.py | mathewjhan/ivyhacks | e966754170e2638f5ac6714df33692e6ce294e88 | [
"MIT"
] | null | null | null | pyscripts/knn.py | mathewjhan/ivyhacks | e966754170e2638f5ac6714df33692e6ce294e88 | [
"MIT"
] | 2 | 2020-11-02T07:33:52.000Z | 2021-01-02T07:11:02.000Z | from sklearn.neighbors import NearestNeighbors
import numpy as np
import pandas as pd
def knn():
userdata = pd.read_csv('userdata.csv')
ids = userdata['user_id'].to_numpy()
X = userdata.iloc[:, 4:].to_numpy()
nbrs = NearestNeighbors(n_neighbors=len(X), algorithm='auto').fit(X)
_, indices = nbrs.kne... | 30.388889 | 72 | 0.64351 |
5f7a6ac5169917c134354511aaff0b1c903ffdd9 | 2,547 | py | Python | analysis/api/utils/custom.py | truemrwalker/mads-app | 79481293af2c0ce5533ab9ebd24868965c3c0031 | [
"MIT"
] | null | null | null | analysis/api/utils/custom.py | truemrwalker/mads-app | 79481293af2c0ce5533ab9ebd24868965c3c0031 | [
"MIT"
] | 2 | 2021-04-22T06:57:27.000Z | 2021-08-06T03:19:42.000Z | analysis/api/utils/custom.py | truemrwalker/mads-app | 79481293af2c0ce5533ab9ebd24868965c3c0031 | [
"MIT"
] | 2 | 2021-02-12T01:19:44.000Z | 2021-05-14T06:54:34.000Z | import logging
import numpy as np
logger = logging.getLogger(__name__)
def get_custom(data):
# includeNoneVals = False
# if "undefinedIsIncluded" in data['view']['settings']:
# includeNoneVals = data['view']['settings']['undefinedIsIncluded']
# bins = data['view']['settings']['bins']
result = ... | 41.754098 | 171 | 0.498233 |
020f833081f1bda0738d4a20fc85b27d4295e932 | 3,694 | py | Python | apps/category/tests/test_mappers.py | tuanquanghpvn/rest_exam | 134f5e7bf44f8e5b0c601e04410693067aef6c4e | [
"MIT"
] | null | null | null | apps/category/tests/test_mappers.py | tuanquanghpvn/rest_exam | 134f5e7bf44f8e5b0c601e04410693067aef6c4e | [
"MIT"
] | null | null | null | apps/category/tests/test_mappers.py | tuanquanghpvn/rest_exam | 134f5e7bf44f8e5b0c601e04410693067aef6c4e | [
"MIT"
] | null | null | null | from apps.base.mappers import (PagingRequestSchema, PagingResponseSchema)
from apps.category.mappers import (CategorySchema, GetCategoryRequestSchema, PostCategoryRequestSchema,
PutCategoryRequestSchema, DeleteCategoryRequestSchema)
from contracts.base import (LIMIT_NAME, OFFSET_NAME,... | 31.042017 | 117 | 0.699783 |
12bc67d0dd1b92c28735f9f657acb1701550c160 | 2,567 | py | Python | test_kitti_depth.py | xuyufan936831611/vo_imu | 8a5753384b4a5c08dc83edf718d76a2ac308a298 | [
"MIT"
] | null | null | null | test_kitti_depth.py | xuyufan936831611/vo_imu | 8a5753384b4a5c08dc83edf718d76a2ac308a298 | [
"MIT"
] | null | null | null | test_kitti_depth.py | xuyufan936831611/vo_imu | 8a5753384b4a5c08dc83edf718d76a2ac308a298 | [
"MIT"
] | null | null | null | from __future__ import division
import tensorflow as tf
import numpy as np
import os
# import scipy.misc
import PIL.Image as pil
from SfMLearner import SfMLearner
flags = tf.app.flags
flags.DEFINE_integer("batch_size", 4, "The size of of a sample batch")
flags.DEFINE_integer("img_height", 128, "Image height")
flags.DE... | 41.403226 | 93 | 0.600312 |
7d5cd0c1cd9c42c9060933211ff9482c58989605 | 21,585 | py | Python | chia/util/keychain.py | Water-Networks/chia-blockchain | 58d2c427397dd45f36aa9e964fd6a11422b4eda4 | [
"Apache-2.0"
] | null | null | null | chia/util/keychain.py | Water-Networks/chia-blockchain | 58d2c427397dd45f36aa9e964fd6a11422b4eda4 | [
"Apache-2.0"
] | null | null | null | chia/util/keychain.py | Water-Networks/chia-blockchain | 58d2c427397dd45f36aa9e964fd6a11422b4eda4 | [
"Apache-2.0"
] | null | null | null | import colorama
import os
import pkg_resources
import sys
import unicodedata
from bitstring import BitArray # pyright: reportMissingImports=false
from blspy import AugSchemeMPL, G1Element, PrivateKey # pyright: reportMissingImports=false
from chia.util.hash import std_hash
from chia.util.keyring_wrapper import Keyri... | 37.151463 | 117 | 0.649571 |
83ef2dbc3031bc08f0ac190551b9d5d9eb51289d | 40,694 | py | Python | examples/flax/language-modeling/run_t5_mlm_flax.py | bhavika/transformers | 65cf33e7e53cd46313f3655f274b3f6ca0fd679d | [
"Apache-2.0"
] | 1 | 2022-03-16T13:02:15.000Z | 2022-03-16T13:02:15.000Z | examples/flax/language-modeling/run_t5_mlm_flax.py | bhavika/transformers | 65cf33e7e53cd46313f3655f274b3f6ca0fd679d | [
"Apache-2.0"
] | 2 | 2022-03-14T10:13:16.000Z | 2022-03-14T11:50:27.000Z | examples/flax/language-modeling/run_t5_mlm_flax.py | bhavika/transformers | 65cf33e7e53cd46313f3655f274b3f6ca0fd679d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
# Copyright 2021 The HuggingFace Team 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-... | 44.916115 | 209 | 0.675063 |
427c9369ab053d0e3043bf36625be835def10bff | 965 | py | Python | Task2F.py | otss2/1CW-Computing-Project | 6e19d04ec0ca1f8bcaf047424b74a9bcde96f85b | [
"MIT"
] | null | null | null | Task2F.py | otss2/1CW-Computing-Project | 6e19d04ec0ca1f8bcaf047424b74a9bcde96f85b | [
"MIT"
] | null | null | null | Task2F.py | otss2/1CW-Computing-Project | 6e19d04ec0ca1f8bcaf047424b74a9bcde96f85b | [
"MIT"
] | null | null | null | from floodsystem import plot
from floodsystem.plot import plot_water_level_with_fit, plot_water_levels
from floodsystem.stationdata import build_station_list, update_water_levels
from floodsystem.flood import stations_highest_rel_level
from floodsystem.datafetcher import fetch_measure_levels
import matplotlib.pyplot as... | 27.571429 | 75 | 0.752332 |
f7dcd4b15929f7e4d59cb222f357b0b502573463 | 717 | py | Python | setup.py | ryneches/Shand | ec7f8c914d7099b96e755c75b5313cbae1cab3c5 | [
"BSD-3-Clause"
] | null | null | null | setup.py | ryneches/Shand | ec7f8c914d7099b96e755c75b5313cbae1cab3c5 | [
"BSD-3-Clause"
] | 2 | 2016-02-17T03:16:00.000Z | 2016-02-17T03:16:42.000Z | setup.py | ryneches/Shand | ec7f8c914d7099b96e755c75b5313cbae1cab3c5 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, Extension
from Cython.Distutils import build_ext
from Cython.Build import cythonize
setup(
name='shand',
version='0.1',
description='A pipeline for investigating cospeciation in microbiomes',
scripts=['scripts/shand'],
url='http://github.com/rynec... | 24.724138 | 75 | 0.633194 |
5f9287402641495d5edad30daa2d68e821d8f7c7 | 21,472 | py | Python | pymatgen/analysis/tests/test_reaction_calculator.py | naik-aakash/pymatgen | 394e0d71bf1d1025fcf75498cbb16aa3f41ce78c | [
"MIT"
] | 1 | 2022-03-24T04:12:16.000Z | 2022-03-24T04:12:16.000Z | pymatgen/analysis/tests/test_reaction_calculator.py | naik-aakash/pymatgen | 394e0d71bf1d1025fcf75498cbb16aa3f41ce78c | [
"MIT"
] | null | null | null | pymatgen/analysis/tests/test_reaction_calculator.py | naik-aakash/pymatgen | 394e0d71bf1d1025fcf75498cbb16aa3f41ce78c | [
"MIT"
] | null | null | null | # Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import unittest
import warnings
from collections import defaultdict
from math import isnan
import numpy as np
from pymatgen.analysis.reaction_calculator import (
BalancedReaction,
ComputedReaction,
Reaction,
... | 38.138544 | 105 | 0.529061 |
7f8e69b8777a4596adc1e66b704b0aaaef484160 | 6,995 | py | Python | api_server/switch_api/utilities/DataInterfaces/SqlInterface.py | cliftbar/switch_suncode2019 | cad8fcca50a4848ba946f39aeaa624a230af679d | [
"MIT"
] | null | null | null | api_server/switch_api/utilities/DataInterfaces/SqlInterface.py | cliftbar/switch_suncode2019 | cad8fcca50a4848ba946f39aeaa624a230af679d | [
"MIT"
] | null | null | null | api_server/switch_api/utilities/DataInterfaces/SqlInterface.py | cliftbar/switch_suncode2019 | cad8fcca50a4848ba946f39aeaa624a230af679d | [
"MIT"
] | 1 | 2019-08-31T01:10:10.000Z | 2019-08-31T01:10:10.000Z | import logging
import time
from abc import abstractmethod
from enum import Enum
from typing import Dict, Callable, Any, List
from schema import Schema
import sqlalchemy
from sqlalchemy.engine import ResultProxy
from sqlalchemy.orm import Query
from sqlalchemy.schema import Table
from sqlalchemy.engine.base import Eng... | 37.607527 | 128 | 0.666333 |
dd8769ff19e5369ac070df72ddf16afb206c3494 | 68,788 | py | Python | lingvo/core/base_input_generator.py | Saiprasad16/lingvo | 1862d61748f03f950c14144acc9cf21f1e7ed358 | [
"Apache-2.0"
] | 1 | 2021-05-10T10:47:28.000Z | 2021-05-10T10:47:28.000Z | lingvo/core/base_input_generator.py | Saiprasad16/lingvo | 1862d61748f03f950c14144acc9cf21f1e7ed358 | [
"Apache-2.0"
] | null | null | null | lingvo/core/base_input_generator.py | Saiprasad16/lingvo | 1862d61748f03f950c14144acc9cf21f1e7ed358 | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 40.558962 | 95 | 0.679435 |
5524375de699146ef8dc3d1b462ae6233a316bd8 | 9,822 | py | Python | redash/query_runner/pg.py | rrgaya-zz/redash | 8ad08a566adf1ce6fd461bf7cf11b51f12b3a48f | [
"BSD-2-Clause"
] | 8 | 2019-05-05T10:33:43.000Z | 2021-07-14T11:21:52.000Z | redash/query_runner/pg.py | rrgaya-zz/redash | 8ad08a566adf1ce6fd461bf7cf11b51f12b3a48f | [
"BSD-2-Clause"
] | 3 | 2020-06-18T15:21:00.000Z | 2021-02-08T20:35:37.000Z | redash/query_runner/pg.py | rrgaya-zz/redash | 8ad08a566adf1ce6fd461bf7cf11b51f12b3a48f | [
"BSD-2-Clause"
] | 15 | 2019-06-29T13:58:00.000Z | 2022-02-27T14:57:03.000Z | import os
import logging
import select
import psycopg2
from psycopg2.extras import Range
from redash.query_runner import *
from redash.utils import JSONEncoder, json_dumps, json_loads
logger = logging.getLogger(__name__)
types_map = {
20: TYPE_INTEGER,
21: TYPE_INTEGER,
23: TYPE_INTEGER,
700: TYPE_F... | 31.581994 | 109 | 0.503869 |
f3a0ee3aa8206e35a384d717ca5d6c038a9c25f2 | 9,884 | py | Python | Tiles/tilesdemo.py | davidoj/RL_Aggregation | d1f7fa01016660963e87dd4bcdb475a7b4aed466 | [
"MIT"
] | null | null | null | Tiles/tilesdemo.py | davidoj/RL_Aggregation | d1f7fa01016660963e87dd4bcdb475a7b4aed466 | [
"MIT"
] | null | null | null | Tiles/tilesdemo.py | davidoj/RL_Aggregation | d1f7fa01016660963e87dd4bcdb475a7b4aed466 | [
"MIT"
] | 1 | 2020-06-22T22:49:11.000Z | 2020-06-22T22:49:11.000Z | """ Tiles demo
This demo is good for illustrating or testing the tile routines.
The demo displays a graph where instead of lines, there is a dot for
each x,y pair in the graph. The x,y pairs are points whose tiles match the
point we are doing tiles for. There is a separate graph entry for each
of the following tile typ... | 53.139785 | 150 | 0.624949 |
885979730fea0f869d48d9171e2c13de8c4c2e60 | 112 | py | Python | CodeSignal/test.py | JeffreyAsuncion/CodingProblems_Python | db71cb46b2579c1c65767a644a0ea989da4fa559 | [
"MIT"
] | null | null | null | CodeSignal/test.py | JeffreyAsuncion/CodingProblems_Python | db71cb46b2579c1c65767a644a0ea989da4fa559 | [
"MIT"
] | null | null | null | CodeSignal/test.py | JeffreyAsuncion/CodingProblems_Python | db71cb46b2579c1c65767a644a0ea989da4fa559 | [
"MIT"
] | null | null | null |
sequence = [1,2,3,4,5]
preNum = -99999999999
for num in sequence:
if not num > preNum:
print(False) | 18.666667 | 24 | 0.625 |
9911b5533d8332c99a0309b889c58ebb42e79b25 | 12,362 | py | Python | models/soft_refinedet.py | gdjmck/multitrident | 437a6d46d49cec8552a4cb465b23ce387bf284d9 | [
"Apache-2.0"
] | 106 | 2019-06-13T07:23:46.000Z | 2021-05-20T02:52:37.000Z | models/soft_refinedet.py | yangheng111/multitrident | b11808af66ade1637822de53840ad4a16719a9f2 | [
"Apache-2.0"
] | 7 | 2019-07-11T05:40:48.000Z | 2021-02-06T15:17:07.000Z | models/soft_refinedet.py | yangheng111/multitrident | b11808af66ade1637822de53840ad4a16719a9f2 | [
"Apache-2.0"
] | 26 | 2019-06-17T01:42:35.000Z | 2021-11-02T12:13:58.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from layers import *
from data import voc_refinedet, coco_refinedet
import os
class SoftRefineDet(nn.Module):
"""Single Shot Multibox Architecture
The network is composed of a base VGG network followed by the
added multibox conv layers. ... | 39.369427 | 98 | 0.555088 |
3b442195b4bdbb38822a959ea54d0586b627e270 | 5,771 | py | Python | utils/load_corpus.py | ssbeicdm/ssbe | 5ae671962c3e50ea912eba02779e9a1c3ae37534 | [
"BSD-3-Clause-Clear"
] | null | null | null | utils/load_corpus.py | ssbeicdm/ssbe | 5ae671962c3e50ea912eba02779e9a1c3ae37534 | [
"BSD-3-Clause-Clear"
] | null | null | null | utils/load_corpus.py | ssbeicdm/ssbe | 5ae671962c3e50ea912eba02779e9a1c3ae37534 | [
"BSD-3-Clause-Clear"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import json
from gensim.models.doc2vec import LabeledSentence
import string as st
import spacy.en
parser = spacy.load('en')
class Lemmatizer(object):
def __init__(self):
self.parser = parser
def __call__(self, line):
line = self.parser(line)
return [t.lemma_ for t in li... | 33.358382 | 113 | 0.668515 |
1dd321f38aee3be197c73d1209782cd484b66fae | 2,958 | py | Python | scripts/build/devtools_file_hashes.py | gonnavis/devtools-frontend | 93f79d6e7b973f0b7aadde4547733ec0ce1cf11a | [
"BSD-3-Clause"
] | 2,389 | 2015-06-05T05:06:05.000Z | 2022-03-31T07:08:56.000Z | scripts/build/devtools_file_hashes.py | gonnavis/devtools-frontend | 93f79d6e7b973f0b7aadde4547733ec0ce1cf11a | [
"BSD-3-Clause"
] | 157 | 2016-02-03T06:03:25.000Z | 2022-02-03T13:55:47.000Z | scripts/build/devtools_file_hashes.py | gonnavis/devtools-frontend | 93f79d6e7b973f0b7aadde4547733ec0ce1cf11a | [
"BSD-3-Clause"
] | 388 | 2015-10-10T12:45:24.000Z | 2022-03-22T18:11:08.000Z | # Copyright (c) 2014 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | 35.638554 | 72 | 0.709263 |
7af55702ad763d64b19e020a6774eff221ecbdef | 863 | py | Python | setup.py | gwtaylor/pyautodiff | 7973e26f1c233570ed4bb10d08634ec7378e2152 | [
"BSD-3-Clause"
] | 59 | 2015-02-03T20:50:59.000Z | 2020-05-26T05:38:54.000Z | setup.py | gwtaylor/pyautodiff | 7973e26f1c233570ed4bb10d08634ec7378e2152 | [
"BSD-3-Clause"
] | 3 | 2015-05-10T06:22:45.000Z | 2016-12-06T02:20:58.000Z | setup.py | gwtaylor/pyautodiff | 7973e26f1c233570ed4bb10d08634ec7378e2152 | [
"BSD-3-Clause"
] | 11 | 2015-04-15T16:52:09.000Z | 2017-06-28T12:10:39.000Z | import sys
from setuptools import setup
if sys.version < '3':
raise ImportError(
'This version of autodiff only support Python 3+. Please check out an '
'earlier branch for use with Python 2.')
setup(
name='autodiff',
version='0.5',
maintainer='Lowin Data Company',
maintainer_email... | 30.821429 | 79 | 0.641947 |
0291cb546b48ab1f479537d9a794310ee283e76c | 2,930 | py | Python | src/simmer/schemas/read_yml.py | holdengill/SImMER | 7608a9cb044f2827f43f2d0c177e17faf8ff7720 | [
"MIT"
] | null | null | null | src/simmer/schemas/read_yml.py | holdengill/SImMER | 7608a9cb044f2827f43f2d0c177e17faf8ff7720 | [
"MIT"
] | 25 | 2021-01-21T06:51:58.000Z | 2022-03-28T21:07:30.000Z | src/simmer/schemas/read_yml.py | holdengill/SImMER | 7608a9cb044f2827f43f2d0c177e17faf8ff7720 | [
"MIT"
] | null | null | null | import os
import cerberus
import yaml
from .custom_validator import SimmerValidator
def normalize(yml_dict, validator, schema, plot_types):
"""
Inputs:
:yml_dict: (dictionary) the dictionary to be normalized against a schema
:validator: (SimmerValidator) the validator object used.
:s... | 29.009901 | 86 | 0.666894 |
865cb3d6e8455051d40eefdd8cc790be9c8b3bbd | 1,926 | py | Python | pages/source/conf.py | hep-statistics-standard/hep-statistics-standard.github.io | da74fbeab30c5bc0a503aa8a1a2d5a34e8c4530d | [
"BSD-3-Clause"
] | null | null | null | pages/source/conf.py | hep-statistics-standard/hep-statistics-standard.github.io | da74fbeab30c5bc0a503aa8a1a2d5a34e8c4530d | [
"BSD-3-Clause"
] | null | null | null | pages/source/conf.py | hep-statistics-standard/hep-statistics-standard.github.io | da74fbeab30c5bc0a503aa8a1a2d5a34e8c4530d | [
"BSD-3-Clause"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 35.018182 | 79 | 0.665109 |
2ec9813707d9708d72322d079f84f1cfb724a817 | 3,820 | py | Python | examples/quickstart_pytorch/client.py | zliel/flower | c5a4b2718bed5ec73a3838cc997c38b5ba4862e7 | [
"Apache-2.0"
] | null | null | null | examples/quickstart_pytorch/client.py | zliel/flower | c5a4b2718bed5ec73a3838cc997c38b5ba4862e7 | [
"Apache-2.0"
] | null | null | null | examples/quickstart_pytorch/client.py | zliel/flower | c5a4b2718bed5ec73a3838cc997c38b5ba4862e7 | [
"Apache-2.0"
] | null | null | null | from collections import OrderedDict
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision.transforms as transforms
from torch.utils.data import DataLoader
from torchvision.datasets import CIFAR10
import flwr as fl
DEVICE = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")... | 34.727273 | 87 | 0.613613 |
693d73bd5b3b1a4496d7a1badcff7f8abf98059f | 33,588 | py | Python | scripts/pymo/preprocessing.py | TomKingsfordUoA/Co-Speech_Gesture_Generation | a9f7a66a254e724cb10fc630c140fb71a91ce594 | [
"MIT"
] | 19 | 2020-06-29T14:42:02.000Z | 2022-02-15T14:35:11.000Z | scripts/pymo/preprocessing.py | TomKingsfordUoA/Co-Speech_Gesture_Generation | a9f7a66a254e724cb10fc630c140fb71a91ce594 | [
"MIT"
] | 7 | 2020-08-05T04:14:49.000Z | 2022-02-21T09:43:31.000Z | scripts/pymo/preprocessing.py | TomKingsfordUoA/Co-Speech_Gesture_Generation | a9f7a66a254e724cb10fc630c140fb71a91ce594 | [
"MIT"
] | 6 | 2020-07-27T08:17:33.000Z | 2022-02-15T13:28:11.000Z | '''
Preprocessing Tranformers Based on sci-kit's API
By Omid Alemi
Created on June 12, 2017
Modified by Simon Alexanderson, 2020-06-24
'''
import copy
import pandas as pd
import numpy as np
import transforms3d as t3d
import scipy.ndimage.filters as filters
from scipy.spatial.transform import Rotation as R
from sklea... | 36.508696 | 171 | 0.550881 |
3dea639187ef62778602bdd192cf5f2e2f49db82 | 8,421 | py | Python | tests/queries/query_test.py | Taschenbergerm/ClickHouse | d15bac31ff462a7c5fde36d5e58a3683e7b45135 | [
"Apache-2.0"
] | 3 | 2021-02-16T13:50:34.000Z | 2021-03-19T12:22:52.000Z | tests/queries/query_test.py | Taschenbergerm/ClickHouse | d15bac31ff462a7c5fde36d5e58a3683e7b45135 | [
"Apache-2.0"
] | null | null | null | tests/queries/query_test.py | Taschenbergerm/ClickHouse | d15bac31ff462a7c5fde36d5e58a3683e7b45135 | [
"Apache-2.0"
] | 1 | 2021-02-16T21:24:34.000Z | 2021-02-16T21:24:34.000Z | import pytest
import difflib
import os
import random
import string
import subprocess
import sys
SKIP_LIST = [
# these couple of tests hangs everything
"00600_replace_running_query",
"00987_distributed_stack_overflow",
# just fail
"00505_secure",
"00505_shard_secure",
"00646_url_engine",
... | 41.279412 | 129 | 0.710248 |
96ff8aa15c0c3219a7708ff43d19a23314413270 | 3,494 | py | Python | hplip-3.20.3/ui4/pqdiagdialog.py | Deril-Pana/wikiBlackcoinNL | 9633307f0b485c27feae5da242944adf450e8963 | [
"MIT"
] | null | null | null | hplip-3.20.3/ui4/pqdiagdialog.py | Deril-Pana/wikiBlackcoinNL | 9633307f0b485c27feae5da242944adf450e8963 | [
"MIT"
] | 1 | 2021-11-20T16:33:39.000Z | 2021-11-20T16:33:39.000Z | hplip-3.20.3/ui4/pqdiagdialog.py | Deril-Pana/wikiBlackcoinNL | 9633307f0b485c27feae5da242944adf450e8963 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# (c) Copyright 2001-2015 HP Development Company, L.P.
#
# 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 2 of the License, or
# (at your option) any late... | 27.952 | 132 | 0.638523 |
a3833ff5244ac9c3a4d108da7319e6ecac8e7707 | 8,009 | gyp | Python | build/apk_tests.gyp | bofeng-song/webrtc | cd06ce5490635ef5ef953b17eabb6e833eed5b76 | [
"DOC",
"BSD-3-Clause"
] | null | null | null | build/apk_tests.gyp | bofeng-song/webrtc | cd06ce5490635ef5ef953b17eabb6e833eed5b76 | [
"DOC",
"BSD-3-Clause"
] | null | null | null | build/apk_tests.gyp | bofeng-song/webrtc | cd06ce5490635ef5ef953b17eabb6e833eed5b76 | [
"DOC",
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project au... | 32.294355 | 116 | 0.601324 |
9a9cf757420aecdf825267cef948df7a3819ecd4 | 5,069 | py | Python | torch_glow/tests/nodes/quantized_batchnorm2d_test.py | YaronBenAtar/glow | a13706a4239fa7eaf059c670dc573e3eb0768f86 | [
"Apache-2.0"
] | 2,838 | 2018-05-02T16:57:22.000Z | 2022-03-31T14:35:26.000Z | torch_glow/tests/nodes/quantized_batchnorm2d_test.py | YaronBenAtar/glow | a13706a4239fa7eaf059c670dc573e3eb0768f86 | [
"Apache-2.0"
] | 4,149 | 2018-05-02T17:50:14.000Z | 2022-03-31T23:56:43.000Z | torch_glow/tests/nodes/quantized_batchnorm2d_test.py | LaudateCorpus1/glow-1 | cda5383b1609ebad1a3631ca77b41b8a863443d4 | [
"Apache-2.0"
] | 685 | 2018-05-02T16:54:09.000Z | 2022-03-24T01:12:24.000Z | # Copyright (c) Glow Contributors. See CONTRIBUTORS file.
#
# 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 ... | 31.68125 | 87 | 0.548234 |
7302bc79ef228952ee8276138a669408f569f2c8 | 2,321 | py | Python | scraper.py | di37/selenium-youtube-scraper | 0a79af0ed89c857475d99e261dc2277f3373a95d | [
"MIT"
] | null | null | null | scraper.py | di37/selenium-youtube-scraper | 0a79af0ed89c857475d99e261dc2277f3373a95d | [
"MIT"
] | null | null | null | scraper.py | di37/selenium-youtube-scraper | 0a79af0ed89c857475d99e261dc2277f3373a95d | [
"MIT"
] | null | null | null | import smtplib
import json
import os
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
YOUTUBE_TRENDING_URL = 'https://www.youtube.com/feed/trending'
def get_driver():
chrome_options = Options()
chrome_options.add_argument('--no-sandbo... | 25.788889 | 88 | 0.71047 |
fd95695000963e8dd1a726b80e15ca45c9a896b5 | 488 | py | Python | test_projects/test_module_a/test_feat_1.py | martinsmid/pytest-ui | 15fcbe04a6467cc6f7a373ef6156acc44f0ba5ec | [
"MIT"
] | 27 | 2017-03-10T08:54:06.000Z | 2021-09-28T13:51:10.000Z | test_projects/test_module_a/test_feat_1.py | martinsmid/pytest-ui | 15fcbe04a6467cc6f7a373ef6156acc44f0ba5ec | [
"MIT"
] | 1 | 2021-06-22T19:29:31.000Z | 2021-06-22T19:29:31.000Z | test_projects/test_module_a/test_feat_1.py | martinsmid/pytest-ui | 15fcbe04a6467cc6f7a373ef6156acc44f0ba5ec | [
"MIT"
] | 1 | 2020-04-19T07:25:27.000Z | 2020-04-19T07:25:27.000Z | from __future__ import print_function
import unittest
import logging
logging.basicConfig()
logger = logging.getLogger(__name__)
class TestOutputCapturing(unittest.TestCase):
def test_feat_1_case_1(self):
print('hello')
logger.debug('hello at the debug level')
def test_feat_1_case_2(self):
... | 22.181818 | 48 | 0.715164 |
a0fd3a71ef5e3e45dcbc389e74c3f103b099c11b | 1,678 | py | Python | helpers.py | gabrielaraujof/Babelegram | 8ea28b68d24ef66a6b95e5b71e648b2b04a3bad0 | [
"MIT"
] | 1 | 2016-03-29T16:54:49.000Z | 2016-03-29T16:54:49.000Z | helpers.py | gabrielaraujof/Babelegram | 8ea28b68d24ef66a6b95e5b71e648b2b04a3bad0 | [
"MIT"
] | 2 | 2016-03-25T14:47:13.000Z | 2016-03-30T04:48:26.000Z | helpers.py | gabrielaraujof/Babelegram | 8ea28b68d24ef66a6b95e5b71e648b2b04a3bad0 | [
"MIT"
] | 1 | 2016-03-29T16:54:50.000Z | 2016-03-29T16:54:50.000Z | """
A set of helpers functions and constants for supporting the bot engine.
"""
_LANG_SET = {
'ar': ' Arabic',
'bg': 'Bulgarian',
'ca': 'Catalan',
'zh-CHS': 'Chinese (Simplified)',
'zh-CHT': 'Chinese (Traditional)',
'cs': 'Czech',
'da': 'Danish',
'nl': 'Dutch',
'en': 'Inglês',
'... | 23.971429 | 72 | 0.567342 |
4ae700203d43181c7662b8a568b439e4f77b8b04 | 1,170 | py | Python | chapter2/data-preprocessing.py | kevingo/ml-az | 02f998d8c7f5476461b5cf59267c9532308e4ea4 | [
"MIT"
] | null | null | null | chapter2/data-preprocessing.py | kevingo/ml-az | 02f998d8c7f5476461b5cf59267c9532308e4ea4 | [
"MIT"
] | null | null | null | chapter2/data-preprocessing.py | kevingo/ml-az | 02f998d8c7f5476461b5cf59267c9532308e4ea4 | [
"MIT"
] | null | null | null | # Import Library
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import os
# import data
dataset = pd.read_csv('Data.csv')
X = dataset.iloc[:, :-1].values
Y = dataset.iloc[:, 3].values
# deal with missing data
from sklearn.preprocessing import Imputer
imputer = Imputer(missing_values = 'NaN', s... | 25.434783 | 92 | 0.759829 |
431623c0f1d70d0ccd2c36fa82c47496a7633c47 | 22,418 | py | Python | tests/conftest.py | ArunkumarRamanan/computervision-recipes | 861ebf32484f9a58ff3570cf73e7b86a254d33e1 | [
"MIT"
] | null | null | null | tests/conftest.py | ArunkumarRamanan/computervision-recipes | 861ebf32484f9a58ff3570cf73e7b86a254d33e1 | [
"MIT"
] | null | null | null | tests/conftest.py | ArunkumarRamanan/computervision-recipes | 861ebf32484f9a58ff3570cf73e7b86a254d33e1 | [
"MIT"
] | 1 | 2020-09-07T03:19:02.000Z | 2020-09-07T03:19:02.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# NOTE: This file is used by pytest to inject fixtures automatically. As it is explained in the documentation
# https://docs.pytest.org/en/latest/fixture.html:
# "If during implementing your tests you realize that you want to... | 30.667579 | 113 | 0.642073 |
8db1cb3abf1e9af230362a216411d9a31040ec2c | 1,240 | py | Python | enviroment_config/main.py | kringsman/exercises_python | 054581a2ee1710984b04f5f6d288d6dc79e09240 | [
"MIT"
] | null | null | null | enviroment_config/main.py | kringsman/exercises_python | 054581a2ee1710984b04f5f6d288d6dc79e09240 | [
"MIT"
] | 7 | 2020-05-01T09:03:04.000Z | 2022-03-12T00:31:28.000Z | enviroment_config/main.py | kringsman/exercises_python | 054581a2ee1710984b04f5f6d288d6dc79e09240 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from flask import Flask, render_template, request, flash, redirect
from contact_model import Contact
app = Flask(__name__)
app.secret_key = 'some_secret'
app.debug = True
@app.route(r'/', methods=['GET'])
def contact_book():
contacts = Contact.query().fetch()
return render... | 25.306122 | 67 | 0.637097 |
c8aabb962cce3ed34d57ca149e07d95967c7c5e3 | 3,264 | py | Python | surgame/src/caveGenerate.py | anokata/pythonPetProjects | 245c3ff11ae560b17830970061d8d60013948fd7 | [
"MIT"
] | 3 | 2017-04-30T17:44:53.000Z | 2018-02-03T06:02:11.000Z | surgame/src/caveGenerate.py | anokata/pythonPetProjects | 245c3ff11ae560b17830970061d8d60013948fd7 | [
"MIT"
] | 10 | 2021-03-18T20:17:19.000Z | 2022-03-11T23:14:19.000Z | surgame/src/caveGenerate.py | anokata/pythonPetProjects | 245c3ff11ae560b17830970061d8d60013948fd7 | [
"MIT"
] | null | null | null | import random
WALL = 0
FLOOR = 1
SPACE = 2
PLAYER = 8
TELEPORT = 3
INIT = 4
lastId = 9
DrawChars = {
WALL: 'x',
FLOOR: 'f',
SPACE: ' ',
PLAYER: '~',
TELEPORT: 'T',
INIT: 'o',
}
def addRectBorder(m, w, val=WALL):
for x in (0, w-1):
for y in range(len... | 21.615894 | 51 | 0.460478 |
f6f3fe06e05f3a14f4acfd6893e88abc7d3a9284 | 1,574 | py | Python | script.py | apsknight/crawlresult | d314990dcc919a6535503fcc019a0bfe4cca6ff6 | [
"MIT"
] | 2 | 2020-11-02T22:18:25.000Z | 2020-11-28T14:51:53.000Z | script.py | apsknight/crawlresult | d314990dcc919a6535503fcc019a0bfe4cca6ff6 | [
"MIT"
] | null | null | null | script.py | apsknight/crawlresult | d314990dcc919a6535503fcc019a0bfe4cca6ff6 | [
"MIT"
] | null | null | null | from generator import generate
import json
year = int(raw_input('Enter first two digit of Roll No. : '))
# assert (year >= 14 and year <= 17), 'Entered Year is not correct'
branch = str(raw_input('Enter branch abbreviation : ')).upper()
branches = ['CE', 'CS', 'ME', 'MM', 'EE', 'EC']
assert branch in branches, 'Enter... | 39.35 | 238 | 0.627065 |
fad296641260275970ef95a3895efa75e7f1eb16 | 19,850 | py | Python | methods/PPO_Hierarchy.py | vanstrn/RL_public | 0e971e40e063b17918460e19728f95d7924af8db | [
"MIT"
] | 1 | 2021-03-19T17:57:51.000Z | 2021-03-19T17:57:51.000Z | methods/PPO_Hierarchy.py | vanstrn/RL_public | 0e971e40e063b17918460e19728f95d7924af8db | [
"MIT"
] | null | null | null | methods/PPO_Hierarchy.py | vanstrn/RL_public | 0e971e40e063b17918460e19728f95d7924af8db | [
"MIT"
] | null | null | null |
"""
To Do:
-Add an optional input for the networks so they can be defined in a main run script.
-Test
-Combine Training Operation
"""
from .method import Method
from .buffer import Trajectory,BatchDivider,MultiBatchDivider
from .AdvantageEstimator import gae
import tensorflow as tf
import numpy as np
from utils.utils ... | 48.179612 | 254 | 0.595567 |
d006b5b8728c6ce8462144067807d4cb217f47ab | 2,516 | py | Python | 2016-2021 Miami University/CSE 564 Algorithms/Coding Assignments/src/hashing.py | 0x326/academic-code-portfolio | 8e76628608622b26608de52c56367e75942d4eb5 | [
"MIT"
] | null | null | null | 2016-2021 Miami University/CSE 564 Algorithms/Coding Assignments/src/hashing.py | 0x326/academic-code-portfolio | 8e76628608622b26608de52c56367e75942d4eb5 | [
"MIT"
] | null | null | null | 2016-2021 Miami University/CSE 564 Algorithms/Coding Assignments/src/hashing.py | 0x326/academic-code-portfolio | 8e76628608622b26608de52c56367e75942d4eb5 | [
"MIT"
] | 1 | 2020-12-11T23:43:09.000Z | 2020-12-11T23:43:09.000Z | #!/usr/bin/env python3
"""
2019-03-01 Hashing Assignment
"""
import logging
from itertools import chain
from typing import NamedTuple, List, Iterator
class Entry(NamedTuple):
present_as_positive_value: bool
present_as_negative_value: bool
class TrivialSet:
def __init__(self, max_range: int):
se... | 33.546667 | 110 | 0.67806 |
bc11a5764c56d981d53a8b390ec16dda73590284 | 3,305 | py | Python | data/external/repositories/120243/tradeshift-text-classification-master/src/xgb_meta_part2_predict.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories/120243/tradeshift-text-classification-master/src/xgb_meta_part2_predict.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories/120243/tradeshift-text-classification-master/src/xgb_meta_part2_predict.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | 1 | 2019-12-04T08:23:33.000Z | 2019-12-04T08:23:33.000Z | from tool import *
from xgb_classifier import xgb_classifier
import numpy as np
import pickle
def xgb_meta_predict(data_base_dir,data_meta_part2_dir,submission_dir):
test_id=pickle.load(open(data_base_dir+"test_id.p","rb"))
y_all=pickle.load(open(data_base_dir+"y.p","rb"))
y_part2=y_all[y_all.shape[0]/2:,:]... | 47.898551 | 224 | 0.751589 |
cc30e164aa6a637649c95da8f0d93a8abcecfd01 | 1,513 | py | Python | django/privat_gos_sait/about_company/views.py | Netromnik/python | 630a9df63b1cade9af38de07bb9cd0c3b8694c93 | [
"Apache-2.0"
] | null | null | null | django/privat_gos_sait/about_company/views.py | Netromnik/python | 630a9df63b1cade9af38de07bb9cd0c3b8694c93 | [
"Apache-2.0"
] | null | null | null | django/privat_gos_sait/about_company/views.py | Netromnik/python | 630a9df63b1cade9af38de07bb9cd0c3b8694c93 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.shortcuts import get_object_or_404 ,redirect
from markdown import markdown
from .models import about_company,item_block,list_menu
from django.http import HttpResponse
from django.views.generic import ListView
from django.views.generic.detail import SingleObjectMixin... | 39.815789 | 135 | 0.733642 |
b1c3b6ca95a9e404e7ae46ace7a1c737c87e383d | 2,703 | py | Python | disposable_email_checker/validators.py | jheld/DisposableEmailChecker | eca98a377865164ec2eef4d348916764fb7d7326 | [
"BSD-3-Clause"
] | 2 | 2020-05-16T14:37:33.000Z | 2022-03-18T11:38:29.000Z | disposable_email_checker/validators.py | jheld/DisposableEmailChecker | eca98a377865164ec2eef4d348916764fb7d7326 | [
"BSD-3-Clause"
] | null | null | null | disposable_email_checker/validators.py | jheld/DisposableEmailChecker | eca98a377865164ec2eef4d348916764fb7d7326 | [
"BSD-3-Clause"
] | 2 | 2020-05-15T10:21:37.000Z | 2021-12-13T15:44:45.000Z | # -*- coding: utf-8 -*-
import re
from django.conf import settings
from django.utils.encoding import force_text
from django.core import validators
from django.core.exceptions import ValidationError
from django.utils.translation import gettext_lazy as _
from bdea.client import BDEAClient
from django.urls import get_c... | 32.963415 | 78 | 0.617832 |
8d050b77929daf8f663de4b769a02d447ddf518f | 19,116 | py | Python | venv/lib/python2.7/site-packages/cffi/model.py | deathping1994/gmail-sendmail-api | 5f6cadf2a5a6a9d30581726647ca638661a040f5 | [
"Apache-2.0"
] | 5 | 2015-10-11T04:36:12.000Z | 2018-12-02T17:42:28.000Z | venv/lib/python2.7/site-packages/cffi/model.py | deathping1994/gmail-sendmail-api | 5f6cadf2a5a6a9d30581726647ca638661a040f5 | [
"Apache-2.0"
] | 2 | 2015-10-15T07:18:12.000Z | 2015-10-15T07:23:48.000Z | venv/lib/python2.7/site-packages/cffi/model.py | deathping1994/gmail-sendmail-api | 5f6cadf2a5a6a9d30581726647ca638661a040f5 | [
"Apache-2.0"
] | 1 | 2020-11-01T20:40:01.000Z | 2020-11-01T20:40:01.000Z | import types
import weakref
from .lock import allocate_lock
class BaseTypeByIdentity(object):
is_array_type = False
is_raw_function = False
def get_c_name(self, replace_with='', context='a C file'):
result = self.c_name_with_marker
assert result.count('&') == 1
# some logic dupli... | 34.443243 | 79 | 0.565129 |
01e960254b27f019287800280a88057de6a758c2 | 1,660 | py | Python | dog-breed-identification/utils.py | rishabhiitbhu/kaggle | bdcfd406737b82bb7ba6e993bc481cb3a6975296 | [
"MIT"
] | 1 | 2017-11-12T18:22:51.000Z | 2017-11-12T18:22:51.000Z | dog-breed-identification/utils.py | rishabhiitbhu/kaggle | bdcfd406737b82bb7ba6e993bc481cb3a6975296 | [
"MIT"
] | null | null | null | dog-breed-identification/utils.py | rishabhiitbhu/kaggle | bdcfd406737b82bb7ba6e993bc481cb3a6975296 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
label_data = pd.read_csv('labels.csv')
train_label, dev_label = train_test_split(label_data, test_size=0.30, random_state=0)
unique_labels = pd.unique(label_data... | 30.181818 | 85 | 0.640964 |
3a1f06baef78856de2d3fbebbcc9f5d9b069368f | 4,256 | py | Python | src/gretel_client/transformers/data_transform_pipeline.py | franccesco/gretel-python-client | fd20dee07eba9657262edc902779142bf32c5b7c | [
"Apache-2.0"
] | null | null | null | src/gretel_client/transformers/data_transform_pipeline.py | franccesco/gretel-python-client | fd20dee07eba9657262edc902779142bf32c5b7c | [
"Apache-2.0"
] | null | null | null | src/gretel_client/transformers/data_transform_pipeline.py | franccesco/gretel-python-client | fd20dee07eba9657262edc902779142bf32c5b7c | [
"Apache-2.0"
] | null | null | null | """This module exposes the primary class that contains all ``DataPath`` objects and is responsible for
running all transformations.
"""
import collections
from typing import TYPE_CHECKING
try:
import pandas as pd
except ImportError:
pd = None
from gretel_client.transformers.data_pipeline import DataPipeline
f... | 37.008696 | 102 | 0.570254 |
c40cd53cc57a699ae79d8b764f58105e6f5d7930 | 18,852 | py | Python | isi_sdk_8_2_0/isi_sdk_8_2_0/models/sync_job_service_report_item.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_0/isi_sdk_8_2_0/models/sync_job_service_report_item.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_0/isi_sdk_8_2_0/models/sync_job_service_report_item.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: 7
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class SyncJobServiceReportItem(o... | 38.084848 | 284 | 0.644918 |
742cb308b3cb02c117f8ae7ec3d096b4e82449c2 | 17,954 | bzl | Python | tensorflow/compiler/aot/tfcompile.bzl | so5462/tensorflow | 0f9acc15ba56ecf01a79889d29295310559c681a | [
"Apache-2.0"
] | 10 | 2021-04-29T16:31:02.000Z | 2021-08-10T13:17:55.000Z | tensorflow/compiler/aot/tfcompile.bzl | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 88 | 2020-11-24T08:18:10.000Z | 2022-03-25T20:28:30.000Z | tensorflow/compiler/aot/tfcompile.bzl | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 9 | 2020-11-06T22:50:15.000Z | 2021-12-30T01:45:55.000Z | """Build macro that compiles a TensorFlow graph into a cc_library.
To use from your BUILD file, add the following line to load the macro:
load("//tensorflow/compiler/aot:tfcompile.bzl", "tf_library")
Then call the macro like this:
tf_library(
name = "test_graph_tfmatmul",
config = "test_graph_tfmatmul.confi... | 40.804545 | 85 | 0.58104 |
10b6cb3d2da7857a2b193c7e1c4a88244ac992e8 | 18,609 | py | Python | model.py | 18wh1a0590/NLP-Text-Generation | 1a4115875d6898d7491953cffded6153cb9ff221 | [
"MIT"
] | 25 | 2021-06-12T11:38:07.000Z | 2022-03-17T13:32:02.000Z | model.py | 18wh1a0590/NLP-Text-Generation | 1a4115875d6898d7491953cffded6153cb9ff221 | [
"MIT"
] | 3 | 2021-07-18T19:20:41.000Z | 2022-03-09T09:35:37.000Z | model.py | 18wh1a0590/NLP-Text-Generation | 1a4115875d6898d7491953cffded6153cb9ff221 | [
"MIT"
] | 6 | 2021-07-27T15:08:32.000Z | 2022-02-18T19:01:35.000Z | import torch
from torch.functional import norm
import torch.nn as nn
import torch.nn.functional as F
from collections import OrderedDict
import math
from itertools import combinations
from torch.nn.init import xavier_normal_
from torch.nn.modules.activation import MultiheadAttention
from torch.autograd import Variab... | 40.542484 | 195 | 0.653501 |
441b2a22730130d816811a6f411973bc2e8a43aa | 43 | py | Python | Python_Codes_for_BJ/stage03 for문 사용하기/N 찍기.py | ch96an/BaekJoonSolution | 25594fda5ba1c0c4d26ff0828ec8dcf2f6572d33 | [
"MIT"
] | null | null | null | Python_Codes_for_BJ/stage03 for문 사용하기/N 찍기.py | ch96an/BaekJoonSolution | 25594fda5ba1c0c4d26ff0828ec8dcf2f6572d33 | [
"MIT"
] | null | null | null | Python_Codes_for_BJ/stage03 for문 사용하기/N 찍기.py | ch96an/BaekJoonSolution | 25594fda5ba1c0c4d26ff0828ec8dcf2f6572d33 | [
"MIT"
] | null | null | null | for i in range(1,int(input())+1):
print(i) | 21.5 | 33 | 0.627907 |
238ee3a7c703fe6e5d3d7c31bfbfbc24bdafbc5d | 13,505 | py | Python | tests/flow/test_function_calls.py | TatianaJin/RedisGraph | a03a79f95f12d1376d848b3963d4a729019b6b0b | [
"MIT",
"Ruby",
"ISC",
"BSD-3-Clause"
] | 1 | 2021-01-26T21:02:32.000Z | 2021-01-26T21:02:32.000Z | tests/flow/test_function_calls.py | danitseitlin/RedisGraph | 6e7c5cc2c06574292b88f905d271e83c95b7ee3b | [
"MIT",
"Ruby",
"ISC",
"BSD-3-Clause"
] | null | null | null | tests/flow/test_function_calls.py | danitseitlin/RedisGraph | 6e7c5cc2c06574292b88f905d271e83c95b7ee3b | [
"MIT",
"Ruby",
"ISC",
"BSD-3-Clause"
] | null | null | null | import redis
import os
import sys
from RLTest import Env
from base import FlowTestsBase
from redisgraph import Graph, Node, Edge
graph = None
redis_con = None
people = ["Roi", "Alon", "Ailon", "Boaz"]
class testFunctionCallsFlow(FlowTestsBase):
def __init__(self):
self.env = Env()
global graph
... | 39.955621 | 109 | 0.606886 |
a620a35ba2096f9ff489fd28d358ca7a4712e612 | 305 | py | Python | data/multilingual/Latn.NDS/Serif_12/pdf_to_json_test_Latn.NDS_Serif_12.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | 1 | 2021-09-19T19:47:35.000Z | 2021-09-19T19:47:35.000Z | data/multilingual/Latn.NDS/Serif_12/pdf_to_json_test_Latn.NDS_Serif_12.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | data/multilingual/Latn.NDS/Serif_12/pdf_to_json_test_Latn.NDS_Serif_12.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | import pdf_to_json as p2j
import json
url = "file:data/multilingual/Latn.NDS/Serif_12/udhr_Latn.NDS_Serif_12.pdf"
lConverter = p2j.pdf_to_json.pdf_to_json_converter()
lConverter.mImageHashOnly = True
lDict = lConverter.convert(url)
print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
| 30.5 | 75 | 0.813115 |
190fc37d153e9a196b62ac804907ed1e180bd8a6 | 72,149 | py | Python | show/muxcable.py | Yakiv-Huryk/sonic-utilities | a8a7edbb4a0bc1c743dc9f963767520188b593a9 | [
"Apache-2.0"
] | null | null | null | show/muxcable.py | Yakiv-Huryk/sonic-utilities | a8a7edbb4a0bc1c743dc9f963767520188b593a9 | [
"Apache-2.0"
] | null | null | null | show/muxcable.py | Yakiv-Huryk/sonic-utilities | a8a7edbb4a0bc1c743dc9f963767520188b593a9 | [
"Apache-2.0"
] | null | null | null | import json
import sys
import time
import click
import re
import utilities_common.cli as clicommon
from natsort import natsorted
from collections import OrderedDict
from operator import itemgetter
from sonic_py_common import multi_asic
from swsscommon.swsscommon import SonicV2Connector, ConfigDBConnector
from swsscomm... | 42.192398 | 174 | 0.673648 |
0d744718f04029fb305ecf660b16088f097f8355 | 1,531 | py | Python | problem_solving/warmup/diagonal_difference/aut_tests.py | hugolribeiro/hackerrank_exercises | d2757b24479c26ec39e01091e3a15e8980e97864 | [
"MIT"
] | null | null | null | problem_solving/warmup/diagonal_difference/aut_tests.py | hugolribeiro/hackerrank_exercises | d2757b24479c26ec39e01091e3a15e8980e97864 | [
"MIT"
] | null | null | null | problem_solving/warmup/diagonal_difference/aut_tests.py | hugolribeiro/hackerrank_exercises | d2757b24479c26ec39e01091e3a15e8980e97864 | [
"MIT"
] | null | null | null | from main import diagonalDifference
arr1 = [[11, 2, 4],
[4, 5, 6],
[10, 8, -12]]
result1 = diagonalDifference(arr1)
answer1 = 15
if result1 == answer1:
print(f'Test number 1 \nExpected Output: {answer1}\nThe output: {result1} \n\033[0;32;1mTest OK\033[m')
else:
print(f'Test number 1 \nExpected ... | 30.019608 | 107 | 0.629001 |
8f0de34e577655e7cbab08143fb27ed8741f34cf | 845 | py | Python | yaya/cmdlineparser.py | libyoung/yaya | 4df4b360ce90bab0e3a62a4ef482c38739b25695 | [
"MIT"
] | 1 | 2017-09-25T06:34:02.000Z | 2017-09-25T06:34:02.000Z | yaya/cmdlineparser.py | libyoung/yaya | 4df4b360ce90bab0e3a62a4ef482c38739b25695 | [
"MIT"
] | null | null | null | yaya/cmdlineparser.py | libyoung/yaya | 4df4b360ce90bab0e3a62a4ef482c38739b25695 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
##############################
# Create Time: 20170427
# Author: liuyang
# Email: czyang.liu@jrdcom.com
# Content: Flow Object
##############################
import argparse
from argparse import ArgumentDefaultsHelpFormatter
class CmdLineParser(objec... | 38.409091 | 93 | 0.615385 |
f8547657492a4e26961c0de783a01fcc6b24ff30 | 11,206 | py | Python | sdk/python/pulumi_azure_nextgen/databoxedge/latest/share.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/databoxedge/latest/share.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/databoxedge/latest/share.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 47.084034 | 512 | 0.663127 |
dd505f44b116ba0e69cb475c389a18c0b9a2ee9e | 56 | py | Python | cartpy/__init__.py | lucascr91/cartpy | b7e6302d8b4b5406b5f4304f4d05f17e7d2ac552 | [
"MIT"
] | 1 | 2020-11-21T03:46:21.000Z | 2020-11-21T03:46:21.000Z | cartpy/__init__.py | lucascr91/cartpy | b7e6302d8b4b5406b5f4304f4d05f17e7d2ac552 | [
"MIT"
] | null | null | null | cartpy/__init__.py | lucascr91/cartpy | b7e6302d8b4b5406b5f4304f4d05f17e7d2ac552 | [
"MIT"
] | null | null | null | from cartpy.cartpy import Municipio, Year, name_to_code
| 28 | 55 | 0.839286 |
14b8b663f07d6ef1a102a6e0338661b3a89f0152 | 7,694 | py | Python | seahub/dingtalk/views.py | Jonatino/seahub | 0bff0c1104dd52bb0d09daa6bc241e63dffe2b23 | [
"Apache-2.0"
] | 101 | 2021-05-16T06:00:03.000Z | 2021-12-01T02:02:29.000Z | seahub/dingtalk/views.py | Jonatino/seahub | 0bff0c1104dd52bb0d09daa6bc241e63dffe2b23 | [
"Apache-2.0"
] | null | null | null | seahub/dingtalk/views.py | Jonatino/seahub | 0bff0c1104dd52bb0d09daa6bc241e63dffe2b23 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import uuid
import json
import time
import hmac
import base64
import urllib
import logging
import requests
from hashlib import sha256
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.utils.translation import ugettext as _
from seahub.api2.utils import g... | 35.62037 | 101 | 0.713803 |
af5d0b37c4a9894442cc30435fe3cd880970d2f1 | 1,471 | py | Python | .history/run_update_20220325112242.py | miguel-fresh/geoip-translation | ccf9dbc0330e597704e57d8b2967fc9be16017ed | [
"Info-ZIP"
] | null | null | null | .history/run_update_20220325112242.py | miguel-fresh/geoip-translation | ccf9dbc0330e597704e57d8b2967fc9be16017ed | [
"Info-ZIP"
] | null | null | null | .history/run_update_20220325112242.py | miguel-fresh/geoip-translation | ccf9dbc0330e597704e57d8b2967fc9be16017ed | [
"Info-ZIP"
] | null | null | null | import subprocess
from sys import stderr, stdout
from pathlib import Path
from os import rename, getcwd, path
START_DOWNLOAD = False
START_CONVERT = True
CURRENT_DIR = Path(getcwd())
ZIP_NAME = 'GeoLite2-City-CSV.zip'
DAT_NAME = 'GeoLiteCity.dat'
DOWNLOAD_DIRNAME = './data'
OUTPUT_DIRNAME = '../output'
DOWNLOAD... | 28.288462 | 94 | 0.626105 |
12255ec753630cb2efaffc1b52d2cdd4f4c59fd3 | 5,430 | py | Python | pyiron_base/project/store.py | pmrv/pyiron_base | af1729708a8226575ca2c84f574e7cb046b7f7cd | [
"BSD-3-Clause"
] | null | null | null | pyiron_base/project/store.py | pmrv/pyiron_base | af1729708a8226575ca2c84f574e7cb046b7f7cd | [
"BSD-3-Clause"
] | null | null | null | pyiron_base/project/store.py | pmrv/pyiron_base | af1729708a8226575ca2c84f574e7cb046b7f7cd | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department
# Distributed under the terms of "New BSD License", see the LICENSE file.
from __future__ import print_function
from datetime import datetime
from pyiron_base.job.generic import GenericJob
"""
... | 29.193548 | 111 | 0.628545 |
e0f463df9b204df35b819405cd3a9398947c9a40 | 2,847 | py | Python | syn/python/get_kge.py | mundaym/ibex | 71a8763553a25b90394de92f3f97e56b1009030b | [
"Apache-2.0"
] | 1,375 | 2019-11-05T15:11:00.000Z | 2022-03-28T17:50:43.000Z | syn/python/get_kge.py | mundaym/ibex | 71a8763553a25b90394de92f3f97e56b1009030b | [
"Apache-2.0"
] | 7,045 | 2019-11-05T16:05:45.000Z | 2022-03-31T23:08:08.000Z | syn/python/get_kge.py | mundaym/ibex | 71a8763553a25b90394de92f3f97e56b1009030b | [
"Apache-2.0"
] | 428 | 2019-11-05T15:00:20.000Z | 2022-03-28T15:34:57.000Z | #!/usr/bin/python3
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
# Parse a yosys area report and give a kGE equivalient
import argparse
def read_lib(lib_file_path, ref_cell):
with open(lib_file_path, 'r') as f:... | 35.148148 | 79 | 0.588339 |
dbdb41fe69ab9694fe573269ef0becb89599cac8 | 447 | py | Python | env/lib/python3.8/site-packages/plotly/validators/contour/_uirevision.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | env/lib/python3.8/site-packages/plotly/validators/contour/_uirevision.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | env/lib/python3.8/site-packages/plotly/validators/contour/_uirevision.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import _plotly_utils.basevalidators
class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="uirevision", parent_name="contour", **kwargs):
super(UirevisionValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 34.384615 | 82 | 0.657718 |
cf46f93f64f6e2585f2243569bd8db792ef764c9 | 552 | py | Python | utils/builders/grpc_builders.py | bpuderer/python-test-env | ed5d1f1b977560cc9bc52952500b93060fc11e6a | [
"MIT"
] | null | null | null | utils/builders/grpc_builders.py | bpuderer/python-test-env | ed5d1f1b977560cc9bc52952500b93060fc11e6a | [
"MIT"
] | 1 | 2021-03-31T18:50:05.000Z | 2021-03-31T18:50:05.000Z | utils/builders/grpc_builders.py | bpuderer/python-test-env | ed5d1f1b977560cc9bc52952500b93060fc11e6a | [
"MIT"
] | null | null | null | import json
from google.protobuf import json_format
from services.doubler.doubler_pb2 import Number
def build_request_from_dict(d, request):
json_str = json.dumps(d)
return json_format.Parse(json_str, request)
def build_request_from_file(filename, request):
with open(filename) as f:
json_str = ... | 24 | 54 | 0.768116 |
81c202fb46304ee3e9ced64dbcc189af26ac908f | 1,354 | py | Python | ooobuild/dyn/view/x_control_access.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/view/x_control_access.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/view/x_control_access.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http: // www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 36.594595 | 82 | 0.767356 |
0473dbd355cf30969018b1156a37f9bcc5b61775 | 1,374 | py | Python | dapr/actor/runtime/_method_context.py | mukundansundararajan/python-sdk | 2ee94e31292a650135b97bc3c70e3eca885c9b47 | [
"MIT"
] | null | null | null | dapr/actor/runtime/_method_context.py | mukundansundararajan/python-sdk | 2ee94e31292a650135b97bc3c70e3eca885c9b47 | [
"MIT"
] | null | null | null | dapr/actor/runtime/_method_context.py | mukundansundararajan/python-sdk | 2ee94e31292a650135b97bc3c70e3eca885c9b47 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Copyright (c) Microsoft Corporation.
Licensed under the MIT License.
"""
from dapr.actor.runtime._call_type import ActorCallType
class ActorMethodContext:
"""A Actor method context that contains method information invoked
by :class:`ActorRuntime`.
"""
def __init__(self, ... | 31.227273 | 84 | 0.700873 |
26b37c181e6812d0b4d916774768c68fe25e8e99 | 11,739 | py | Python | src/plugin.py | urwrstkn8mare/galaxy-minecraft-integration | cc4448019b6a8713ae474b45b554172b17d4776b | [
"MIT"
] | 17 | 2019-09-19T15:02:05.000Z | 2022-01-14T16:33:02.000Z | src/plugin.py | urwrstkn8mare/galaxy-minecraft-integration | cc4448019b6a8713ae474b45b554172b17d4776b | [
"MIT"
] | 19 | 2019-09-05T12:27:18.000Z | 2021-12-05T20:55:45.000Z | src/plugin.py | urwrstkn8mare/galaxy-minecraft-integration | cc4448019b6a8713ae474b45b554172b17d4776b | [
"MIT"
] | 8 | 2019-08-30T12:55:08.000Z | 2021-12-18T10:10:07.000Z | import sys, asyncio, logging, urllib, os, json, pickle, webbrowser
from galaxy.api.plugin import (
Plugin,
LocalGame,
Authentication,
Game,
create_and_run_plugin,
GameTime,
)
from galaxy.api.consts import LocalGameState, LicenseType, OSCompatibility, Platform
from galaxy.api.types impo... | 42.532609 | 99 | 0.593066 |
cd3c7a3a77c6712ce77ca59b7d2f340ce9405979 | 8,851 | py | Python | tests/contrib/sensors/test_hdfs_sensor.py | RyanMagnusson/incubator-airflow | ad81412fba2e8510442db73d9c905cac5eed8ebd | [
"Apache-2.0"
] | 1 | 2021-05-07T17:12:35.000Z | 2021-05-07T17:12:35.000Z | tests/contrib/sensors/test_hdfs_sensor.py | RyanMagnusson/incubator-airflow | ad81412fba2e8510442db73d9c905cac5eed8ebd | [
"Apache-2.0"
] | null | null | null | tests/contrib/sensors/test_hdfs_sensor.py | RyanMagnusson/incubator-airflow | ad81412fba2e8510442db73d9c905cac5eed8ebd | [
"Apache-2.0"
] | 1 | 2021-05-07T17:12:37.000Z | 2021-05-07T17:12:37.000Z | # -*- coding: utf-8 -*-
#
# 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
... | 35.546185 | 81 | 0.516552 |
c427c62662daa151124b09abf6b4db8ba9afaf3a | 3,347 | py | Python | image_proc/launch/image_proc.launch.py | allenh1/image_pipeline | ab7f8ec264c5c8e7240d599fbacc44b6a7af0450 | [
"Apache-2.0"
] | 1 | 2021-03-22T15:35:15.000Z | 2021-03-22T15:35:15.000Z | image_proc/launch/image_proc.launch.py | allenh1/image_pipeline | ab7f8ec264c5c8e7240d599fbacc44b6a7af0450 | [
"Apache-2.0"
] | null | null | null | image_proc/launch/image_proc.launch.py | allenh1/image_pipeline | ab7f8ec264c5c8e7240d599fbacc44b6a7af0450 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020, Open Source Robotics Foundation, Inc.
# All rights reserved.
#
# Software License Agreement (BSD License 2.0)
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code... | 39.376471 | 70 | 0.653421 |
3242b2d491a50281dba26151f677fc40922722f1 | 12,907 | py | Python | oldversion/test/experiment.py | ne1199/RobustAutoencoder | 2d32750fa08a88fe19ecb3ede6d76e50ecceb91d | [
"MIT"
] | 3 | 2021-07-08T03:30:33.000Z | 2022-02-10T14:12:22.000Z | oldversion/test/experiment.py | yli96/RobustAutoencoder | 01de32f5d670280ca8f8f9a6f6d704930fc266b4 | [
"MIT"
] | null | null | null | oldversion/test/experiment.py | yli96/RobustAutoencoder | 01de32f5d670280ca8f8f9a6f6d704930fc266b4 | [
"MIT"
] | 1 | 2021-07-09T07:54:03.000Z | 2021-07-09T07:54:03.000Z | import PIL.Image as Image
import ImShow as I
import numpy as np
import tensorflow as tf
import DAE_tensorflow as DAE
import RDAE_tensorflow as RDAE
import l21RobustAutoencoder as l21RDAE
import os
def tune_RDAE(x, lam_list = [50], learn_rates = [0.1], inner = 50, outter = 5):
sess = tf.Session()
sparsities =... | 58.402715 | 182 | 0.64802 |
c5423e2bb2bd5c9fea16e6ed08fe47b20e867597 | 773 | py | Python | test/test.py | ytyaru/Python.Mastodon.Api.Toot.20210813105938 | 18b46d9143f6d2a934e2fe7cd69b847e62399e67 | [
"CC0-1.0"
] | null | null | null | test/test.py | ytyaru/Python.Mastodon.Api.Toot.20210813105938 | 18b46d9143f6d2a934e2fe7cd69b847e62399e67 | [
"CC0-1.0"
] | null | null | null | test/test.py | ytyaru/Python.Mastodon.Api.Toot.20210813105938 | 18b46d9143f6d2a934e2fe7cd69b847e62399e67 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
# coding: utf8
#import requests
#import os, sys, argparse, json, urllib.parse, datetime
#from string import Template
#from abc import ABCMeta, abstractmethod
#import mimetypes
import os, sys
# 親ディレクトリをパスに追加する
#sys.path.append(os.path.join(os.path.dirname(__file__), '../src'))
#from lib import exe... | 30.92 | 91 | 0.78784 |
834b6ded71b3a92fa44e70ad8e85a01e4d353c2d | 4,590 | py | Python | libpermian/webui/server.py | velezd/permian | b52189f44c3112ad933a6b1e303a6b30c272651a | [
"MIT"
] | null | null | null | libpermian/webui/server.py | velezd/permian | b52189f44c3112ad933a6b1e303a6b30c272651a | [
"MIT"
] | 9 | 2022-02-07T14:14:10.000Z | 2022-03-22T09:17:16.000Z | libpermian/webui/server.py | velezd/permian | b52189f44c3112ad933a6b1e303a6b30c272651a | [
"MIT"
] | 3 | 2022-01-20T09:17:39.000Z | 2022-03-08T00:35:58.000Z | import uuid
from flask import Flask
import threading
import socket
import logging
import socket
from . import hooks
LOGGER = logging.getLogger(__name__)
class WebUI(threading.Thread):
"""
Web UI for the pipeline. This class is designed as container for the flask
app running in thread providing interface ... | 32.097902 | 146 | 0.661656 |
89a5a5c29549fabd6cbab7e450b3368c029a29a2 | 5,385 | py | Python | sydent/http/servlets/__init__.py | eyetime-international-ltd/sydent | 48501fbe473555163214c37b90b342a706bd53d7 | [
"Apache-2.0"
] | null | null | null | sydent/http/servlets/__init__.py | eyetime-international-ltd/sydent | 48501fbe473555163214c37b90b342a706bd53d7 | [
"Apache-2.0"
] | null | null | null | sydent/http/servlets/__init__.py | eyetime-international-ltd/sydent | 48501fbe473555163214c37b90b342a706bd53d7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2014 OpenMarket 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 l... | 36.14094 | 103 | 0.640483 |
a3be9afaae88f08bc9ca5765b7def6293f31cabe | 20,394 | py | Python | admin/polytope-admin/polytope_admin/api/Config.py | ecmwf-projects/polytope-server | 135017717cf161d68875a55aa364ce311a1d2ea6 | [
"Apache-2.0"
] | null | null | null | admin/polytope-admin/polytope_admin/api/Config.py | ecmwf-projects/polytope-server | 135017717cf161d68875a55aa364ce311a1d2ea6 | [
"Apache-2.0"
] | 1 | 2022-01-28T11:39:25.000Z | 2022-01-28T11:39:25.000Z | admin/polytope-admin/polytope_admin/api/Config.py | ecmwf-projects/polytope-server | 135017717cf161d68875a55aa364ce311a1d2ea6 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2022 European Centre for Medium-Range Weather Forecasts (ECMWF)
#
# 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 req... | 38.119626 | 117 | 0.608365 |
9a2207d48f38f0bf97739ba91fe67dc626cf58cf | 1,589 | py | Python | BlinkSupport/KNNModel.py | isibord/EyeBlinkModels | d80659189234a66c10bec501f9e25062f243d2b3 | [
"MIT"
] | null | null | null | BlinkSupport/KNNModel.py | isibord/EyeBlinkModels | d80659189234a66c10bec501f9e25062f243d2b3 | [
"MIT"
] | null | null | null | BlinkSupport/KNNModel.py | isibord/EyeBlinkModels | d80659189234a66c10bec501f9e25062f243d2b3 | [
"MIT"
] | null | null | null | import numpy as np
class KNNModel(object):
"""A KNN Model"""
def __init__(self):
pass
def fit(self, x, y, k):
self.trainx = x
self.trainy = y
self.kval = k
def predictThres(self, x, batchThres=True, threshold=0.5):
# for every sample in training s... | 27.877193 | 74 | 0.507237 |
38028d5069637cb55233b6c7410c866cfe122132 | 1,611 | py | Python | Loan-Approval-Analysis/code.py | Muskan-Agrawal07/greyatom-python-for-data-science | 761afdeb4886a7db9fa74ca46df45ab1b0c5d630 | [
"MIT"
] | null | null | null | Loan-Approval-Analysis/code.py | Muskan-Agrawal07/greyatom-python-for-data-science | 761afdeb4886a7db9fa74ca46df45ab1b0c5d630 | [
"MIT"
] | null | null | null | Loan-Approval-Analysis/code.py | Muskan-Agrawal07/greyatom-python-for-data-science | 761afdeb4886a7db9fa74ca46df45ab1b0c5d630 | [
"MIT"
] | null | null | null | # --------------
# Importing header files
import numpy as np
import pandas as pd
from scipy.stats import mode
import warnings
warnings.filterwarnings('ignore')
#Reading file
bank_data = pd.read_csv(path)
#Checking all categorical values
categorical_var = bank_data.select_dtypes(include = 'object')
pri... | 30.980769 | 117 | 0.721912 |
5f6dde442962e2fdce021352fe0cd483e0c1179a | 3,493 | py | Python | src/trellotask/settings.py | true7/oleg_diatlenko_test_pj | 4249c75010f92e94f3a6dd0b2b672fc14061c9e5 | [
"MIT"
] | null | null | null | src/trellotask/settings.py | true7/oleg_diatlenko_test_pj | 4249c75010f92e94f3a6dd0b2b672fc14061c9e5 | [
"MIT"
] | null | null | null | src/trellotask/settings.py | true7/oleg_diatlenko_test_pj | 4249c75010f92e94f3a6dd0b2b672fc14061c9e5 | [
"MIT"
] | null | null | null | """
Django settings for trellotask project.
Generated by 'django-admin startproject' using Django 1.10.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import... | 25.49635 | 91 | 0.692814 |
4c33bd0bc0d77116e61e99049716af678fb44591 | 105,674 | py | Python | reviewboard/diffviewer/tests/test_diffx_parser.py | pombredanne/reviewboard | 15f1d7236ec7a5cb4778ebfeb8b45d13a46ac71d | [
"MIT"
] | null | null | null | reviewboard/diffviewer/tests/test_diffx_parser.py | pombredanne/reviewboard | 15f1d7236ec7a5cb4778ebfeb8b45d13a46ac71d | [
"MIT"
] | null | null | null | reviewboard/diffviewer/tests/test_diffx_parser.py | pombredanne/reviewboard | 15f1d7236ec7a5cb4778ebfeb8b45d13a46ac71d | [
"MIT"
] | null | null | null | """Unit tests for reviewboard.diffviewer.parser.DiffXParser."""
from djblets.testing.decorators import add_fixtures
from reviewboard.diffviewer.errors import DiffParserError
from reviewboard.diffviewer.parser import DiffXParser
from reviewboard.scmtools.core import HEAD, PRE_CREATION, UNKNOWN
from reviewboard.testing... | 40.958915 | 78 | 0.475349 |
fe87bf30f22f34861a589c4cc5a74427af647ce4 | 9,045 | py | Python | models/bilinear.py | roeiherz/AG2Video | a4eb439d7147c91237ddd50ec305add8e1537360 | [
"MIT"
] | 22 | 2020-07-01T07:11:15.000Z | 2022-02-17T13:26:16.000Z | models/bilinear.py | roeiherz/AG2Video | a4eb439d7147c91237ddd50ec305add8e1537360 | [
"MIT"
] | 5 | 2021-06-16T02:35:14.000Z | 2022-03-12T01:00:27.000Z | models/bilinear.py | roeiherz/AG2Video | a4eb439d7147c91237ddd50ec305add8e1537360 | [
"MIT"
] | 2 | 2021-08-04T05:22:58.000Z | 2021-12-11T02:15:57.000Z | #!/usr/bin/python
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 36.471774 | 85 | 0.612272 |
3fce59e242e38ad28ee6df35a892f4fd78bf3f49 | 1,392 | py | Python | example/blueprints/testdash.py | MaayanLab/jupyter-template | dd05bfcb95c9eafb1a9df845b5d8fecae1d6b9d5 | [
"Apache-2.0"
] | null | null | null | example/blueprints/testdash.py | MaayanLab/jupyter-template | dd05bfcb95c9eafb1a9df845b5d8fecae1d6b9d5 | [
"Apache-2.0"
] | 24 | 2020-04-07T17:04:47.000Z | 2020-05-27T00:51:25.000Z | example/blueprints/testdash.py | MaayanLab/jupyter-template | dd05bfcb95c9eafb1a9df845b5d8fecae1d6b9d5 | [
"Apache-2.0"
] | null | null | null | def testdash(app, url_prefix='/testdash', DATA_DIR=''):
import pandas as pd
import dash
from dash.dependencies import Input, Output
from dash import dcc
from dash import html
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/dash-stock-ticker-demo.csv')
testdash = dash.Dash(
... | 26.769231 | 105 | 0.469828 |
09a645c2b36031352bf29c72ee41e0fce0728493 | 2,921 | py | Python | migrations/versions/eb6f1d267a24_.py | Amin1014/pitch | 38862a080a1ea183d9820b2499fab98776223799 | [
"MIT"
] | null | null | null | migrations/versions/eb6f1d267a24_.py | Amin1014/pitch | 38862a080a1ea183d9820b2499fab98776223799 | [
"MIT"
] | null | null | null | migrations/versions/eb6f1d267a24_.py | Amin1014/pitch | 38862a080a1ea183d9820b2499fab98776223799 | [
"MIT"
] | null | null | null | """empty message
Revision ID: eb6f1d267a24
Revises:
Create Date: 2021-08-18 16:25:41.411119
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'eb6f1d267a24'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | 36.5125 | 76 | 0.657994 |
ccd54f0d919152280191464aea819835e47ec852 | 15,614 | py | Python | legacy/huobi_eth_client.py | szhu3210/Arbitrage-trader | d2af5670f7285084f70e36a48c95e796d1fd2d37 | [
"Apache-2.0"
] | 6 | 2019-04-03T22:33:39.000Z | 2021-05-07T12:00:00.000Z | legacy/huobi_eth_client.py | szhu3210/Arbitrage-trader | d2af5670f7285084f70e36a48c95e796d1fd2d37 | [
"Apache-2.0"
] | 2 | 2019-04-03T22:57:41.000Z | 2019-04-26T07:13:12.000Z | legacy/huobi_eth_client.py | szhu3210/Arbitrage-trader | d2af5670f7285084f70e36a48c95e796d1fd2d37 | [
"Apache-2.0"
] | 1 | 2019-04-28T07:23:32.000Z | 2019-04-28T07:23:32.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import logging
import base64
import hmac
import hashlib
import json
from urllib import parse
from urllib import request
from datetime import datetime
# timeout in 5 seconds:
TIMEOUT = 5
API_HOST = 'be.huobi.com'
SCHEME = 'https'
# language setting: 'zh-CN', 'en':
LAN... | 36.227378 | 204 | 0.618612 |
3b7d4b6c172ee5fe12716066c26e54f0e01a292a | 298 | py | Python | tools/__init__.py | NickolausDS/gladier_kanzus | 79c66eaba88956ab44ff5e6e38ed3b6e6b3e1fdd | [
"MIT"
] | null | null | null | tools/__init__.py | NickolausDS/gladier_kanzus | 79c66eaba88956ab44ff5e6e38ed3b6e6b3e1fdd | [
"MIT"
] | null | null | null | tools/__init__.py | NickolausDS/gladier_kanzus | 79c66eaba88956ab44ff5e6e38ed3b6e6b3e1fdd | [
"MIT"
] | null | null | null | from gladier import GladierBaseTool
#__[all]__ = [CreatePhil,DialsStills,DialsVersion,Pilot,Prime,Primalisys]
CreatePhil = GladierBaseTool()
DialsStills = GladierBaseTool()
DialsVersion = GladierBaseTool()
Pilot = GladierBaseTool()
Prime = GladierBaseTool()
Primalisys = GladierBaseTool()
| 16.555556 | 73 | 0.788591 |
85c630753e80879e4489ceb359e25a3287be3ff0 | 3,958 | py | Python | navigation.py | Johnkhk/140A-lab-5 | 6ff1a441675b5e0052a4e1ef3ca5206b4fb044bb | [
"MIT"
] | null | null | null | navigation.py | Johnkhk/140A-lab-5 | 6ff1a441675b5e0052a4e1ef3ca5206b4fb044bb | [
"MIT"
] | null | null | null | navigation.py | Johnkhk/140A-lab-5 | 6ff1a441675b5e0052a4e1ef3ca5206b4fb044bb | [
"MIT"
] | null | null | null | import torchvision
import torch
import torchvision.transforms as transforms
import torch.nn.functional as F
import cv2
import PIL.Image
import numpy as np
import traitlets
from jetbot import Camera, bgr8_to_jpeg
from jetbot import Robot
import time
import math
# Hint : Look at Road Following and Collision Avoidance La... | 40.804124 | 97 | 0.656645 |
3d364a7c8805e503632e7a208047a6419fb0ce53 | 40 | py | Python | core/database/SqlException.py | Korbier/PyWsServer | 95510a935c3019ead04d2de71e4344d94b3ac560 | [
"MIT"
] | null | null | null | core/database/SqlException.py | Korbier/PyWsServer | 95510a935c3019ead04d2de71e4344d94b3ac560 | [
"MIT"
] | null | null | null | core/database/SqlException.py | Korbier/PyWsServer | 95510a935c3019ead04d2de71e4344d94b3ac560 | [
"MIT"
] | null | null | null | class SqlException(Exception):
pass
| 13.333333 | 30 | 0.75 |
baefc05a4393db9f3ebbf03b3ffb07012f642692 | 400 | py | Python | multinet/api/views/__init__.py | multinet-app/multinet-api | a658d787f0fb9ba415ed85a1e37c29953486287f | [
"Apache-2.0"
] | null | null | null | multinet/api/views/__init__.py | multinet-app/multinet-api | a658d787f0fb9ba415ed85a1e37c29953486287f | [
"Apache-2.0"
] | 91 | 2021-03-15T19:00:15.000Z | 2022-03-11T00:04:05.000Z | multinet/api/views/__init__.py | multinet-app/multinet-api | a658d787f0fb9ba415ed85a1e37c29953486287f | [
"Apache-2.0"
] | 1 | 2022-02-05T15:53:04.000Z | 2022-02-05T15:53:04.000Z | from .network import NetworkViewSet
from .query import AqlQueryViewSet
from .table import TableViewSet
from .upload import UploadViewSet
from .users import users_me_view, users_search_view
from .workspace import WorkspaceViewSet
__all__ = [
'users_me_view',
'users_search_view',
'NetworkViewSet',
'Table... | 23.529412 | 51 | 0.76 |
27cc7a8cb424d68ce06905d92c8df4faf2590958 | 1,846 | py | Python | main.py | mtrazzi/baba-is-gym | 5bbc1a9f7eda86073fa399378cb6b39c0ac16db0 | [
"BSD-3-Clause"
] | 5 | 2019-04-14T22:12:26.000Z | 2021-12-28T09:27:26.000Z | main.py | mtrazzi/baba-is-gym | 5bbc1a9f7eda86073fa399378cb6b39c0ac16db0 | [
"BSD-3-Clause"
] | 1 | 2019-04-14T21:34:58.000Z | 2019-04-14T21:34:58.000Z | main.py | mtrazzi/baba-is-gym | 5bbc1a9f7eda86073fa399378cb6b39c0ac16db0 | [
"BSD-3-Clause"
] | null | null | null | # adapted from: https://medium.com/emergent-future/simple-reinforcement-learning-with-tensorflow-part-0-q-learning-with-tables-and-neural-networks-d195264329d0
import numpy as np
import os
import random
import sys
def gridworld():
import gym
import baba_is_gym
return gym.make('BabaIsGymEnv-v0')
def main()... | 32.964286 | 159 | 0.557421 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.