hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5fa2d9487341f6a898bd24ee4e0ba51f392068ca | 491 | py | Python | Data Science With Python/08-pandas-foundations/04-case-study-sunlight-in-austin/01-what-method-should-we-use-to-read-the-data.py | aimanahmedmoin1997/DataCamp | c6a6c4d59b83f14854bd76ed5c0c7f2dddd6de1d | [
"MIT"
] | 3 | 2019-05-12T04:49:24.000Z | 2020-05-06T00:40:28.000Z | Data Science With Python/08-pandas-foundations/04-case-study-sunlight-in-austin/01-what-method-should-we-use-to-read-the-data.py | aimanahmedmoin1997/DataCamp | c6a6c4d59b83f14854bd76ed5c0c7f2dddd6de1d | [
"MIT"
] | null | null | null | Data Science With Python/08-pandas-foundations/04-case-study-sunlight-in-austin/01-what-method-should-we-use-to-read-the-data.py | aimanahmedmoin1997/DataCamp | c6a6c4d59b83f14854bd76ed5c0c7f2dddd6de1d | [
"MIT"
] | 7 | 2018-11-06T17:43:31.000Z | 2020-11-07T21:08:16.000Z | '''
What method should we use to read the data?
The first step in our analysis is to read in the data. Upon inspection with a certain system tool, we find that the data appears to be ASCII encoded with comma delimited columns, but has no header and no column labels. Which of the following is the best method to start w... | 25.842105 | 298 | 0.763747 |
d9ec07a3e34c4b17b4ae481d07fed39971674f39 | 101,731 | py | Python | tests/admin_scripts/tests.py | SerenityIK/django | c36b5d048b4bf042d19e3703f96cc5e22758ce69 | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 1 | 2021-01-15T11:55:09.000Z | 2021-01-15T11:55:09.000Z | tests/admin_scripts/tests.py | SerenityIK/django | c36b5d048b4bf042d19e3703f96cc5e22758ce69 | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | null | null | null | tests/admin_scripts/tests.py | SerenityIK/django | c36b5d048b4bf042d19e3703f96cc5e22758ce69 | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | null | null | null | """
A series of tests to establish that the command-line management tools work as
advertised - especially with regards to the handling of the
DJANGO_SETTINGS_MODULE and default settings.py files.
"""
import os
import re
import shutil
import socket
import subprocess
import sys
import tempfile
import unittest
from io imp... | 43.755269 | 118 | 0.64703 |
7c8b261dc952d7e9084261a97cb3541212c8f2bd | 837 | py | Python | doc/make.py | jhunkeler/pyregion | 7ee5fb3f4949445c484bac4d579d0d49d6fdc5e0 | [
"MIT",
"BSD-3-Clause"
] | 9 | 2015-08-14T04:19:20.000Z | 2020-06-28T15:44:25.000Z | doc/make.py | jhunkeler/pyregion | 7ee5fb3f4949445c484bac4d579d0d49d6fdc5e0 | [
"MIT",
"BSD-3-Clause"
] | 4 | 2015-12-29T00:45:41.000Z | 2019-08-16T02:51:38.000Z | doc/make.py | jhunkeler/pyregion | 7ee5fb3f4949445c484bac4d579d0d49d6fdc5e0 | [
"MIT",
"BSD-3-Clause"
] | 5 | 2015-03-15T22:15:30.000Z | 2021-03-07T10:40:22.000Z | #!/usr/bin/env python
import fileinput
import glob
import os
import shutil
import sys
def check_build():
build_dirs = ['build', 'build/doctrees', 'build/html',
'_static', '_templates']
for d in build_dirs:
try:
os.mkdir(d)
except OSError:
pass
def html... | 18.6 | 83 | 0.540024 |
8dd588ae8cf6a9eda972dfb1a7c5df9911bcab49 | 5,912 | py | Python | estimator/views.py | abahernest/buildforsdg-estimator-api | 7f9f8b0de64a927da99a76e37a98037d40eefa8f | [
"Apache-2.0"
] | 1 | 2020-04-23T15:43:58.000Z | 2020-04-23T15:43:58.000Z | estimator/views.py | abahernest/buildforsdg-estimator-api | 7f9f8b0de64a927da99a76e37a98037d40eefa8f | [
"Apache-2.0"
] | 5 | 2020-06-06T01:45:08.000Z | 2022-02-10T10:23:31.000Z | estimator/views.py | abahernest/buildforsdg-estimator-api | 7f9f8b0de64a927da99a76e37a98037d40eefa8f | [
"Apache-2.0"
] | null | null | null | from django.utils.decorators import method_decorator #for caching
from django.views.decorators.cache import cache_page #for caching
from rest_framework.response import Response
from django.http import JsonResponse,HttpResponse
from rest_framework.views import APIView
from .serializers import EstimatorSerializer,OutputS... | 39.152318 | 179 | 0.653078 |
4fc7ffaa8963338a1b7208f6d0636f72910dbd29 | 4,286 | py | Python | revot/populate/views.py | iskracat/revot | a195751998d631f9892b709a69b3760a323dc8cb | [
"Apache-2.0"
] | null | null | null | revot/populate/views.py | iskracat/revot | a195751998d631f9892b709a69b3760a323dc8cb | [
"Apache-2.0"
] | null | null | null | revot/populate/views.py | iskracat/revot | a195751998d631f9892b709a69b3760a323dc8cb | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from datetime import datetime as dt, timedelta as delta
from revot import db
from revot.models import Voting, Voter, Ballot, Vote, User
from revot.populate import populate
import crypt
@populate.route('/resetdb')
def reset_database():
db.drop_all()
db.create_all()
u = User(id='adm... | 36.322034 | 97 | 0.54993 |
1d4484604c3d8f820ee6940819e492fc50fda6c8 | 1,968 | py | Python | src/pyscripts/xsbs/plugins.py | paddybu/xsbs | 3810eab4cd91d9a927ac724a4892763a5ff562a5 | [
"BSD-3-Clause"
] | 2 | 2020-07-02T21:50:43.000Z | 2021-01-12T09:26:25.000Z | src/pyscripts/xsbs/plugins.py | greghaynes/xsbs | a14bd4c96733a8cf01a8a01200d22868b3335c4f | [
"BSD-3-Clause"
] | null | null | null | src/pyscripts/xsbs/plugins.py | greghaynes/xsbs | a14bd4c96733a8cf01a8a01200d22868b3335c4f | [
"BSD-3-Clause"
] | null | null | null | from ConfigParser import ConfigParser, NoOptionError
import os, sys, __builtin__
import sbserver, xsbs.events
# Initialize these before loading plugins
import xsbs.log
import xsbs.ban
import xsbs.users
import xsbs.server
import xsbs.game
import xsbs.teamcontrol
import xsbs.persistteam
import xsbs.demo
import xsbs.http... | 24.911392 | 80 | 0.711382 |
2d16c8043c8b1634e3247204e68528e82babfe04 | 11,981 | py | Python | pysubgroup/utils.py | rebelosa/pysubgroup | 589da8c2134d3e5b3ee131094c4c0e59e3f5b254 | [
"Apache-2.0"
] | 1 | 2021-02-23T16:38:14.000Z | 2021-02-23T16:38:14.000Z | pysubgroup/utils.py | rebelosa/pysubgroup | 589da8c2134d3e5b3ee131094c4c0e59e3f5b254 | [
"Apache-2.0"
] | null | null | null | pysubgroup/utils.py | rebelosa/pysubgroup | 589da8c2134d3e5b3ee131094c4c0e59e3f5b254 | [
"Apache-2.0"
] | null | null | null | '''
Created on 02.05.2016
@author: lemmerfn
'''
import itertools
from functools import partial
from heapq import heappush, heappop
from collections.abc import Iterable
import numpy as np
import pandas as pd
import pysubgroup as ps
import matplotlib.pyplot as plt
all_statistics = ('size_sg', 'size_dataset', 'positive... | 35.238235 | 123 | 0.647943 |
fac5385648652a98041867070bb932f8b492d0dd | 3,638 | py | Python | python/mleap/sklearn/tree/tests.py | neilsummers/mleap | 80fc0ea25e617e26316320478c8a75e79e20f8a6 | [
"Apache-2.0"
] | 2 | 2019-07-21T15:06:12.000Z | 2019-07-21T15:06:18.000Z | python/mleap/sklearn/tree/tests.py | neilsummers/mleap | 80fc0ea25e617e26316320478c8a75e79e20f8a6 | [
"Apache-2.0"
] | 1 | 2020-01-30T21:12:13.000Z | 2020-01-30T21:12:13.000Z | python/tests/sklearn/tree/tree_test.py | juhoautio/mleap | 54bc171265e02936d09238ecd0a25fa34efc9c65 | [
"Apache-2.0"
] | 2 | 2019-10-12T15:07:52.000Z | 2020-10-10T23:10:45.000Z | import unittest
import os
import shutil
import json
import uuid
from mleap.sklearn.tree.tree import DecisionTreeClassifier, DecisionTreeRegressor
from sklearn.datasets import load_iris
class TransformerTests(unittest.TestCase):
def setUp(self):
self.tmp_dir = "/tmp/mleap.python.tests/{}".format(uuid.uuid1... | 39.11828 | 124 | 0.616548 |
af5c571b7516dfa22d0239ca3a291564c5bd66e9 | 6,198 | py | Python | execWRF/exc_download.py | mlabru/execWRF | e0f7620487003a33eafd4f6279c7107badd70f46 | [
"MIT"
] | null | null | null | execWRF/exc_download.py | mlabru/execWRF | e0f7620487003a33eafd4f6279c7107badd70f46 | [
"MIT"
] | null | null | null | execWRF/exc_download.py | mlabru/execWRF | e0f7620487003a33eafd4f6279c7107badd70f46 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
exc_download
2022/apr 1.1 mlabru graylog log management
2021/nov 1.0 eliana initial version (Linux/Python)
"""
# < imports >----------------------------------------------------------------------------------
# python library
import datetime
import logging
import os
import sys
# requ... | 28.045249 | 95 | 0.532914 |
b21b51e40968ab6437b6006608b782750df7f346 | 5,873 | py | Python | var/spack/repos/builtin/packages/pism/package.py | nkianggiss/spack | 3477d3375142a30f5714bb5966a6d8bb22c33c06 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2016-01-12T20:14:40.000Z | 2017-06-16T07:03:46.000Z | var/spack/repos/builtin/packages/pism/package.py | nkianggiss/spack | 3477d3375142a30f5714bb5966a6d8bb22c33c06 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 75 | 2016-07-27T11:43:00.000Z | 2020-12-08T15:56:53.000Z | var/spack/repos/builtin/packages/pism/package.py | nkianggiss/spack | 3477d3375142a30f5714bb5966a6d8bb22c33c06 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 8 | 2015-10-16T13:51:49.000Z | 2021-10-18T13:58:03.000Z | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Pism(CMakePackage):
"""Parallel Ice Sheet Model"""
homepage = "http://pism-docs.org/w... | 39.682432 | 77 | 0.607185 |
cf265620d3edcf2be7d712b3777a5bf574b9a135 | 4,969 | py | Python | Vereniging/urls.py | RamonvdW/nhb-apps | 5a9f840bfe066cd964174515c06b806a7b170c69 | [
"BSD-3-Clause-Clear"
] | 1 | 2021-12-22T13:11:12.000Z | 2021-12-22T13:11:12.000Z | Vereniging/urls.py | RamonvdW/nhb-apps | 5a9f840bfe066cd964174515c06b806a7b170c69 | [
"BSD-3-Clause-Clear"
] | 9 | 2020-10-28T07:07:05.000Z | 2021-06-28T20:05:37.000Z | Vereniging/urls.py | RamonvdW/nhb-apps | 5a9f840bfe066cd964174515c06b806a7b170c69 | [
"BSD-3-Clause-Clear"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020-2021 Ramon van der Winkel.
# All rights reserved.
# Licensed under BSD-3-Clause-Clear. See LICENSE file for details.
from django.urls import path
from . import (view_accommodatie, view_clusters, view_externe_locaties, view_overzicht, view_ledenlijst,
view... | 34.034247 | 104 | 0.683639 |
834e81a8c0464fecde416cfb8e9be8d82524cb68 | 3,258 | py | Python | brick/exceptions.py | madron/brick-iot | 47b52a2f5fa9cf46e048fab773a58876fd984062 | [
"MIT"
] | null | null | null | brick/exceptions.py | madron/brick-iot | 47b52a2f5fa9cf46e048fab773a58876fd984062 | [
"MIT"
] | null | null | null | brick/exceptions.py | madron/brick-iot | 47b52a2f5fa9cf46e048fab773a58876fd984062 | [
"MIT"
] | null | null | null | class ValidationError(Exception):
"""An error while validating data."""
def __init__(self, message, code=None, params=None):
"""
The `message` argument can be a single error, a list of errors, or a
dictionary that maps field names to lists of errors. What we define as
an "error" ... | 37.883721 | 85 | 0.585021 |
0c6d71d28208ce9051512589d97202aec4b506f1 | 4,940 | py | Python | solnml/blocks/joint_block.py | zhengjian2322/soln-ml | ceff6c432921df9809f9552aaa1b0bd5a1b7e8d2 | [
"MIT"
] | null | null | null | solnml/blocks/joint_block.py | zhengjian2322/soln-ml | ceff6c432921df9809f9552aaa1b0bd5a1b7e8d2 | [
"MIT"
] | null | null | null | solnml/blocks/joint_block.py | zhengjian2322/soln-ml | ceff6c432921df9809f9552aaa1b0bd5a1b7e8d2 | [
"MIT"
] | null | null | null | import time
from ConfigSpace import ConfigurationSpace
from solnml.components.feature_engineering.transformation_graph import DataNode
from solnml.components.utils.constants import CLS_TASKS
from solnml.components.optimizers import build_hpo_optimizer
from solnml.blocks.abstract_block import AbstractBlock
class Join... | 48.431373 | 91 | 0.563563 |
ac7526c7c063e91692ba3798051a94ed7a2cadee | 1,312 | py | Python | queries.py | hopetambala/networksViz-python-transferMarkt | 592f832fb29a0077b7f68b58f365aa7efe9e0b3a | [
"MIT"
] | 2 | 2019-01-25T20:54:06.000Z | 2021-07-05T23:01:02.000Z | queries.py | hopetambala/networksViz-python-transferMarkt | 592f832fb29a0077b7f68b58f365aa7efe9e0b3a | [
"MIT"
] | 1 | 2021-06-01T23:04:10.000Z | 2021-06-01T23:04:10.000Z | queries.py | hopetambala/networksViz-python-transferMarkt | 592f832fb29a0077b7f68b58f365aa7efe9e0b3a | [
"MIT"
] | null | null | null | import sqlite3 as sqlite
import pandas as pd
#from sqlite3 import Error
#Teams (All Attributes) In Descending Order Based on Market Value
def get_teams():
statement = '''
SELECT * from Teams
ORDER BY Teams.TotalMarketValue DESC;
'''
conn = sqlite.connect('soccerDB.sqlite')
cur = c... | 22.62069 | 67 | 0.630335 |
1dbe5429447358647a144e8683e444f6342febcc | 50,830 | py | Python | test/augmenters/test_pillike.py | fmder/imgaug | 4c81c7a7503b64f54d76144385ea4330fd7c8a84 | [
"MIT"
] | null | null | null | test/augmenters/test_pillike.py | fmder/imgaug | 4c81c7a7503b64f54d76144385ea4330fd7c8a84 | [
"MIT"
] | null | null | null | test/augmenters/test_pillike.py | fmder/imgaug | 4c81c7a7503b64f54d76144385ea4330fd7c8a84 | [
"MIT"
] | null | null | null | from __future__ import print_function, division, absolute_import
import functools
import sys
# unittest only added in 3.4 self.subTest()
if sys.version_info[0] < 3 or sys.version_info[1] < 4:
import unittest2 as unittest
else:
import unittest
# unittest.mock is not available in 2.7 (though unittest2 might cont... | 34.182919 | 79 | 0.559237 |
fc65cc79fdf756d4587737a1a1d65f9d64650942 | 9,975 | py | Python | ax/models/torch/rembo.py | bletham/Ax | e802ff1a285c9a0091aeaf5663640b219bdc0d3f | [
"MIT"
] | 1 | 2022-01-04T12:20:51.000Z | 2022-01-04T12:20:51.000Z | ax/models/torch/rembo.py | bletham/Ax | e802ff1a285c9a0091aeaf5663640b219bdc0d3f | [
"MIT"
] | null | null | null | ax/models/torch/rembo.py | bletham/Ax | e802ff1a285c9a0091aeaf5663640b219bdc0d3f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from typing import Any, Callable, Dict, List, Optional, Tuple
import torch
from ax.core.types import TCandidateMetadat... | 35.881295 | 83 | 0.597594 |
786b746dc2fb11e1ea6443c388c3469dd0eaa123 | 6,544 | py | Python | never_give_up2/fig_events.py | JaneHQ1/Predicting-Stroke-Severity-from-Computed-Tomography-Images | 6988ec693d44da52c1d09946bda0246205de3703 | [
"MIT"
] | null | null | null | never_give_up2/fig_events.py | JaneHQ1/Predicting-Stroke-Severity-from-Computed-Tomography-Images | 6988ec693d44da52c1d09946bda0246205de3703 | [
"MIT"
] | null | null | null | never_give_up2/fig_events.py | JaneHQ1/Predicting-Stroke-Severity-from-Computed-Tomography-Images | 6988ec693d44da52c1d09946bda0246205de3703 | [
"MIT"
] | null | null | null | '''
update image
'''
import numpy as np
import matplotlib.pyplot as plt
'''
class ImUpdate(object):
def __init__(self, vol_tran, vol_fron, vol_sagi):
self.vol_tran = vol_tran
self.vol_fron = vol_fron
self.vol_sagi = vol_sagi
def check_axes(self, event):
fig = ev... | 33.050505 | 96 | 0.600703 |
848c81408a204d06ffc54780e3dceb657ef5cd21 | 15,244 | py | Python | autorest/codegen/models/operation.py | Azure/autorest.azure-functions-python | b0896d8aec6b0fd6f0bcb12ea8e0489652dc2783 | [
"MIT"
] | 4 | 2020-10-22T20:35:38.000Z | 2021-12-21T07:29:01.000Z | autorest/codegen/models/operation.py | Azure/autorest.azure-functions-python | b0896d8aec6b0fd6f0bcb12ea8e0489652dc2783 | [
"MIT"
] | 3 | 2020-09-09T15:16:15.000Z | 2021-12-20T15:25:18.000Z | autorest/codegen/models/operation.py | Azure/autorest.azure-functions-python | b0896d8aec6b0fd6f0bcb12ea8e0489652dc2783 | [
"MIT"
] | 2 | 2020-11-10T07:16:23.000Z | 2020-12-30T11:03:14.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import log... | 42.581006 | 120 | 0.660916 |
b52d1d25f2cba319344f60bb7a01205f62277cea | 7,787 | py | Python | misc.py | zhu4ce4/lianjia | 6e97707efe55bda39cbb319e4094f7b7ee1cf495 | [
"BSD-3-Clause"
] | null | null | null | misc.py | zhu4ce4/lianjia | 6e97707efe55bda39cbb319e4094f7b7ee1cf495 | [
"BSD-3-Clause"
] | null | null | null | misc.py | zhu4ce4/lianjia | 6e97707efe55bda39cbb319e4094f7b7ee1cf495 | [
"BSD-3-Clause"
] | null | null | null | import requests
import random
from datetime import datetime
from bs4 import BeautifulSoup
import threading
from six.moves import urllib
import socket
hds = [{'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6'},
{'User-Agent': 'Mozilla/5.0 (Windows NT 6.2) Ap... | 43.99435 | 1,172 | 0.649801 |
e688b96423ac1758ef83e35213396729e9537b08 | 7,748 | py | Python | models/reshape-dataset.py | MissMeriel/Defects4DL | 2ad53df7b4c10c2b792af90a0dc06183475f10f6 | [
"MIT"
] | null | null | null | models/reshape-dataset.py | MissMeriel/Defects4DL | 2ad53df7b4c10c2b792af90a0dc06183475f10f6 | [
"MIT"
] | null | null | null | models/reshape-dataset.py | MissMeriel/Defects4DL | 2ad53df7b4c10c2b792af90a0dc06183475f10f6 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import cv2
import matplotlib.image as mpimg
import json
from keras.models import Sequential
from keras.layers import Conv2D, MaxPooling2D, Dense, Dropout
from keras.layers import Activation, Flatten, Lambda, Input, ELU
from keras.optimizers import Adam
from keras.utils import np_... | 40.778947 | 176 | 0.657718 |
bf32cd0b4323ab53d3ec48f7c28339bfe53089e9 | 2,353 | py | Python | app/recipe/tests/test_tags_api.py | JoniAguero/api-recipes | 7f3b180528248710301e05f43025d877c5214ead | [
"MIT"
] | null | null | null | app/recipe/tests/test_tags_api.py | JoniAguero/api-recipes | 7f3b180528248710301e05f43025d877c5214ead | [
"MIT"
] | null | null | null | app/recipe/tests/test_tags_api.py | JoniAguero/api-recipes | 7f3b180528248710301e05f43025d877c5214ead | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Tag
from recipe.serializers import TagSerializer
TAGS_URL = reverse('recipe:tag-list')
class PublicTags... | 29.4125 | 68 | 0.705057 |
d651fb368562aa0106118d8d02dc45b69c1ab3d7 | 315 | py | Python | test_directory/readUart.py | alligladfelder/mercury2020 | 37445a09528a873f828374b77ef50e9cd10d7be4 | [
"Apache-2.0"
] | 1 | 2019-10-08T00:05:14.000Z | 2019-10-08T00:05:14.000Z | test_directory/readUart.py | alligladfelder/mercury2020 | 37445a09528a873f828374b77ef50e9cd10d7be4 | [
"Apache-2.0"
] | 10 | 2021-02-03T00:49:56.000Z | 2021-04-16T20:57:58.000Z | test_directory/readUart.py | alligladfelder/mercury2020 | 37445a09528a873f828374b77ef50e9cd10d7be4 | [
"Apache-2.0"
] | 2 | 2019-09-26T23:54:58.000Z | 2020-10-30T00:35:00.000Z | #!/usr/bin/env python
import time
import serial
ser = serial.Serial(
port='/dev/serial0',
baudrate = 9600,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout=1
)
counter=0
while 1:
print("This is working")
x=ser.readline()
print (x)
| 14.318182 | 32 | 0.660317 |
29dd77f2cf8af6ea5f0bd0cbbb997f0649dca623 | 51,695 | py | Python | google/cloud/speech_v1p1beta1/services/adaptation/client.py | ufft47/python-speech | 3c908e213411593b5a53a6dd024b5610848b02d7 | [
"Apache-2.0"
] | null | null | null | google/cloud/speech_v1p1beta1/services/adaptation/client.py | ufft47/python-speech | 3c908e213411593b5a53a6dd024b5610848b02d7 | [
"Apache-2.0"
] | null | null | null | google/cloud/speech_v1p1beta1/services/adaptation/client.py | ufft47/python-speech | 3c908e213411593b5a53a6dd024b5610848b02d7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 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... | 43.624473 | 107 | 0.624161 |
50df0ef77152f74f401eb9be28cb95c1d16b7179 | 88 | py | Python | rateapp/apps.py | Tracymbone/My_Awwards | 1b27d5904eadc26f706ad8399737ee56e799df25 | [
"MIT"
] | null | null | null | rateapp/apps.py | Tracymbone/My_Awwards | 1b27d5904eadc26f706ad8399737ee56e799df25 | [
"MIT"
] | null | null | null | rateapp/apps.py | Tracymbone/My_Awwards | 1b27d5904eadc26f706ad8399737ee56e799df25 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class RateappConfig(AppConfig):
name = 'rateapp' | 17.6 | 33 | 0.761364 |
19f4a33d7e73b061e208059cf968ef39bdbf5df0 | 409 | py | Python | example.dinosaurs.py | charlesreid1/asmodeus | ea3b9c9fb9346e90a6aae820d194db2136e3bcc6 | [
"MIT"
] | 2 | 2016-11-23T04:57:45.000Z | 2020-07-17T23:27:51.000Z | example.dinosaurs.py | charlesreid1/asmodeus | ea3b9c9fb9346e90a6aae820d194db2136e3bcc6 | [
"MIT"
] | null | null | null | example.dinosaurs.py | charlesreid1/asmodeus | ea3b9c9fb9346e90a6aae820d194db2136e3bcc6 | [
"MIT"
] | null | null | null | import json
from olipy.queneau import WordAssembler
from olipy.data import load_json
import textwrap
assembler = WordAssembler(load_json("dinosaurs.json"))
dinos = []
for i in range(2):
dino = assembler.assemble_word()
if dino[0] in 'AEIO':
dino = "an " + dino
else:
dino = "a " + dino
... | 22.722222 | 68 | 0.665037 |
3019b61980e68a75e379d6f84dc8be166146691b | 141 | py | Python | 1. Dive into Python/1.21. Exercise Grading in CENG314.py | ahmetutkuozkan/my_ceng240_exercises_solutions | 167bb9938515870ec1f01853933edc3b55937bff | [
"MIT"
] | null | null | null | 1. Dive into Python/1.21. Exercise Grading in CENG314.py | ahmetutkuozkan/my_ceng240_exercises_solutions | 167bb9938515870ec1f01853933edc3b55937bff | [
"MIT"
] | null | null | null | 1. Dive into Python/1.21. Exercise Grading in CENG314.py | ahmetutkuozkan/my_ceng240_exercises_solutions | 167bb9938515870ec1f01853933edc3b55937bff | [
"MIT"
] | null | null | null | g1 = int(input()); g2 = int(input()); g3 = int(input()); g4 = int(input()); g5 = int(input());
print((g1+g2+g3+g4+g5-min(g1,g2,g3,g4,g5))/8) | 70.5 | 95 | 0.560284 |
85806edabdebb70cd4d21ef20475319155589bf8 | 2,145 | py | Python | examples/ad_manager/v202011/report_service/run_ad_exchange_report.py | siilats/googleads-python-lib | d82a9cb75a4b2d602d02039536443f5b30157a43 | [
"Apache-2.0"
] | null | null | null | examples/ad_manager/v202011/report_service/run_ad_exchange_report.py | siilats/googleads-python-lib | d82a9cb75a4b2d602d02039536443f5b30157a43 | [
"Apache-2.0"
] | null | null | null | examples/ad_manager/v202011/report_service/run_ad_exchange_report.py | siilats/googleads-python-lib | d82a9cb75a4b2d602d02039536443f5b30157a43 | [
"Apache-2.0"
] | 1 | 2021-06-23T09:15:34.000Z | 2021-06-23T09:15:34.000Z | #!/usr/bin/env python
#
# Copyright 2018 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 requir... | 32.014925 | 75 | 0.719814 |
35cbcfe94726addd9f03d1b190104f50255f7076 | 3,420 | py | Python | ip_rep/ip_rep/settings.py | logicbomb-1/ARTIF | 8f5cc38ab2e986ee39cbc0328aac0d825c1915b4 | [
"MIT"
] | 205 | 2021-06-21T13:49:14.000Z | 2022-02-17T05:10:50.000Z | ip_rep/ip_rep/settings.py | 0xDivyanshu/ARTIF | 946ea8ea7b60e2d81b35ae820a07241ecf25e9b0 | [
"MIT"
] | 3 | 2021-07-11T08:08:01.000Z | 2021-09-22T20:01:03.000Z | ip_rep/ip_rep/settings.py | 0xDivyanshu/ARTIF | 946ea8ea7b60e2d81b35ae820a07241ecf25e9b0 | [
"MIT"
] | 35 | 2021-06-21T10:35:07.000Z | 2021-10-11T07:39:12.000Z | """
Django settings for ip_rep project.
Generated by 'django-admin startproject' using Django 3.1.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathlib ... | 26.10687 | 91 | 0.697076 |
b00c24599629a9863fa92e37408f5c3752d20f2a | 7,063 | py | Python | resources/bvh.py | kbrizov/Motion-Matching | 3eec99facd0b5da2841b333cc1767a6673fe259c | [
"MIT"
] | 188 | 2021-10-19T17:05:39.000Z | 2022-03-31T05:53:34.000Z | resources/bvh.py | kbrizov/Motion-Matching | 3eec99facd0b5da2841b333cc1767a6673fe259c | [
"MIT"
] | 7 | 2021-10-21T12:42:55.000Z | 2022-03-30T15:49:52.000Z | resources/bvh.py | kbrizov/Motion-Matching | 3eec99facd0b5da2841b333cc1767a6673fe259c | [
"MIT"
] | 31 | 2021-10-19T21:33:21.000Z | 2022-03-26T16:18:15.000Z | import re, os, ntpath
import numpy as np
channelmap = {
'Xrotation': 'x',
'Yrotation': 'y',
'Zrotation': 'z'
}
channelmap_inv = {
'x': 'Xrotation',
'y': 'Yrotation',
'z': 'Zrotation',
}
ordermap = {
'x': 0,
'y': 1,
'z': 2,
}
def load(filename, order=None):
... | 31.672646 | 115 | 0.458729 |
a784c7f7729fce28a1b3daf45c4ad739ec41d9f3 | 4,264 | py | Python | sneaky sneak 3.py | QuarticSushi/Sneaky-Sneak-3 | daf53ca0698f62f46868e6fe2f8c8f9dd0e48589 | [
"MIT"
] | null | null | null | sneaky sneak 3.py | QuarticSushi/Sneaky-Sneak-3 | daf53ca0698f62f46868e6fe2f8c8f9dd0e48589 | [
"MIT"
] | null | null | null | sneaky sneak 3.py | QuarticSushi/Sneaky-Sneak-3 | daf53ca0698f62f46868e6fe2f8c8f9dd0e48589 | [
"MIT"
] | null | null | null | # sneaky sneak 3
# v1.0
from tkinter import *
from tkinter.filedialog import *
from tkinter.simpledialog import *
from ciphers import *
filepath = ''
def new_file():
global filepath
filepath = ''
textedit.delete(1.0, END)
root.title('Sneaky Sneak 3 - New File')
def open_file():
... | 31.585185 | 116 | 0.671201 |
837aeebe43c5eae46712da57ff37f11e0d9be7d4 | 26,068 | py | Python | var/spack/repos/builtin/packages/petsc/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2020-10-20T08:57:12.000Z | 2020-10-20T08:57:12.000Z | var/spack/repos/builtin/packages/petsc/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/petsc/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2020-11-08T10:26:48.000Z | 2020-11-08T10:26:48.000Z | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
class Petsc(Package):
"""PETSc is a suite of data structures and routines for the scalable
(parallel) s... | 51.928287 | 128 | 0.62617 |
12068b93b12e9e2d8e01f98cb293f8f45a256c74 | 3,454 | py | Python | meillionen-mt-python/meillionen/interface/_Resource.py | cpritcha/meillionen | e6fd6047a3c387fabd8b4f790cb9ad233b76d0e9 | [
"MIT-0"
] | 1 | 2020-09-18T11:57:31.000Z | 2020-09-18T11:57:31.000Z | meillionen-mt-python/meillionen/interface/_Resource.py | cpritcha/meillionen | e6fd6047a3c387fabd8b4f790cb9ad233b76d0e9 | [
"MIT-0"
] | 67 | 2020-07-23T05:39:54.000Z | 2022-03-18T20:23:39.000Z | meillionen-mt-python/meillionen/interface/_Resource.py | cpritcha/meillionen | e6fd6047a3c387fabd8b4f790cb9ad233b76d0e9 | [
"MIT-0"
] | 1 | 2021-05-26T05:20:53.000Z | 2021-05-26T05:20:53.000Z | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: interface
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class _Resource(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(... | 37.956044 | 135 | 0.696005 |
9689f1e5a4448320b71fe12a713f7bc2b7be24a9 | 2,652 | py | Python | test/schema/properties/test_properties.py | ooxoo-bv/weaviate-python-client | f646a5c16b1c0cc7940b3ffa17a71efb6e96063a | [
"BSD-3-Clause"
] | 14 | 2019-11-04T14:18:21.000Z | 2022-03-31T09:11:51.000Z | test/schema/properties/test_properties.py | ooxoo-bv/weaviate-python-client | f646a5c16b1c0cc7940b3ffa17a71efb6e96063a | [
"BSD-3-Clause"
] | 91 | 2019-11-04T11:26:42.000Z | 2022-03-22T10:22:44.000Z | test/schema/properties/test_properties.py | ooxoo-bv/weaviate-python-client | f646a5c16b1c0cc7940b3ffa17a71efb6e96063a | [
"BSD-3-Clause"
] | 7 | 2021-05-14T14:53:42.000Z | 2022-03-31T15:09:55.000Z | import unittest
from unittest.mock import Mock
from weaviate.schema.properties import Property
from weaviate.exceptions import RequestsConnectionError, UnexpectedStatusCodeException, SchemaValidationException
from test.util import mock_connection_method, check_error_message, check_startswith_error_message
class TestC... | 35.837838 | 113 | 0.642157 |
74a0919ab6e54d8f7f008625e5cdfeb9cdaa3251 | 1,025 | py | Python | teste.py | Future-Aperture/automations | ed6ba7b6a2b80a5197a176dc06d67977ff26c0bc | [
"Apache-2.0"
] | null | null | null | teste.py | Future-Aperture/automations | ed6ba7b6a2b80a5197a176dc06d67977ff26c0bc | [
"Apache-2.0"
] | 4 | 2020-07-17T01:56:20.000Z | 2020-07-24T21:59:49.000Z | teste.py | Future-Aperture/automations | ed6ba7b6a2b80a5197a176dc06d67977ff26c0bc | [
"Apache-2.0"
] | null | null | null | from lxml import html
import requests
k = r'https://www.mercadolivre.com.br/placa-de-video-nvidia-pcyes-geforce-700-series-gtx-750-ti-ppv750ti12802d5-2gb/p/MLB13876104?source=search#searchVariation=MLB13876104&position=1&type=product&tracking_id=fe9e7cfd-af42-4386-8275-9a41928fe015'
newList = [] # LISTA COM OS LINKS... | 30.147059 | 245 | 0.68878 |
9534833b8384f0bf3b5e11458c96df4720c7f065 | 26,315 | py | Python | music_assistant/controllers/music/providers/spotify.py | music-assistant/music-assistant | 7b4fd73b1281f74d61e29c23093d048a9acf541f | [
"Apache-2.0"
] | null | null | null | music_assistant/controllers/music/providers/spotify.py | music-assistant/music-assistant | 7b4fd73b1281f74d61e29c23093d048a9acf541f | [
"Apache-2.0"
] | null | null | null | music_assistant/controllers/music/providers/spotify.py | music-assistant/music-assistant | 7b4fd73b1281f74d61e29c23093d048a9acf541f | [
"Apache-2.0"
] | null | null | null | """Spotify musicprovider support for MusicAssistant."""
from __future__ import annotations
import asyncio
import json
import os
import platform
import time
from json.decoder import JSONDecodeError
from tempfile import gettempdir
from typing import AsyncGenerator, List, Optional
import aiohttp
from asyncio_throttle im... | 39.393713 | 131 | 0.571955 |
dcd3caad179a67ff38550792558451567108523a | 440 | py | Python | stubs/micropython-esp32-1_13-103/ds18x20.py | RonaldHiemstra/micropython-stubs | d97f879b01f6687baaebef1c7e26a80909c3cff3 | [
"MIT"
] | 38 | 2020-10-18T21:59:44.000Z | 2022-03-17T03:03:28.000Z | stubs/micropython-esp32-1_13-103/ds18x20.py | RonaldHiemstra/micropython-stubs | d97f879b01f6687baaebef1c7e26a80909c3cff3 | [
"MIT"
] | 176 | 2020-10-18T14:31:03.000Z | 2022-03-30T23:22:39.000Z | stubs/micropython-esp32-1_13-103/ds18x20.py | RonaldHiemstra/micropython-stubs | d97f879b01f6687baaebef1c7e26a80909c3cff3 | [
"MIT"
] | 6 | 2020-12-28T21:11:12.000Z | 2022-02-06T04:07:50.000Z | """
Module: 'ds18x20' on esp32 1.13.0-103
"""
# MCU: (sysname='esp32', nodename='esp32', release='1.13.0', version='v1.13-103-gb137d064e on 2020-10-09', machine='ESP32 module (spiram) with ESP32')
# Stubber: 1.3.4
class DS18X20:
''
def convert_temp():
pass
def read_scratch():
pass
def... | 16.296296 | 150 | 0.572727 |
d5edd866cff7b88ad565e020811b4dec682e81d4 | 545 | py | Python | rthl_site/migrations/0049_auto_20210225_0158.py | Mauzzz0/Django_demo | b58f088beb98aa4103797e7ff330151dee431ff6 | [
"MIT"
] | null | null | null | rthl_site/migrations/0049_auto_20210225_0158.py | Mauzzz0/Django_demo | b58f088beb98aa4103797e7ff330151dee431ff6 | [
"MIT"
] | null | null | null | rthl_site/migrations/0049_auto_20210225_0158.py | Mauzzz0/Django_demo | b58f088beb98aa4103797e7ff330151dee431ff6 | [
"MIT"
] | 1 | 2021-02-22T17:29:33.000Z | 2021-02-22T17:29:33.000Z | # Generated by Django 3.1.4 on 2021-02-24 22:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rthl_site', '0048_auto_20210225_0152'),
]
operations = [
migrations.AlterField(
model_name='team',
name='division',
... | 28.684211 | 207 | 0.620183 |
0e6d297c8adcaae180313f7c02070d2b55d9af10 | 1,664 | py | Python | metaworld/benchmarks/mt50.py | bhairavmehta95/metaworld | fc3264eed4397e63f90d32767ddc9514c8566fc3 | [
"MIT"
] | 1 | 2021-01-19T14:32:57.000Z | 2021-01-19T14:32:57.000Z | metaworld/benchmarks/mt50.py | bhairavmehta95/metaworld | fc3264eed4397e63f90d32767ddc9514c8566fc3 | [
"MIT"
] | null | null | null | metaworld/benchmarks/mt50.py | bhairavmehta95/metaworld | fc3264eed4397e63f90d32767ddc9514c8566fc3 | [
"MIT"
] | null | null | null |
from metaworld.benchmarks.base import Benchmark
from metaworld.envs.mujoco.multitask_env import MultiClassMultiTaskEnv
from metaworld.envs.mujoco.env_dict import HARD_MODE_ARGS_KWARGS, HARD_MODE_CLS_DICT
class MT50(MultiClassMultiTaskEnv, Benchmark):
def __init__(self, env_type="train", sample_all=False, task_n... | 36.173913 | 84 | 0.636418 |
b21cc67f28f59a343cdb526ad0cbc57cf4f4737f | 506 | py | Python | basics/06_modificacion_cadenas.py | fcafedericoguerra/Python | 130381d51ddc9192859d2512715a86db8aa5869d | [
"MIT"
] | 1 | 2019-10-14T18:30:05.000Z | 2019-10-14T18:30:05.000Z | basics/06_modificacion_cadenas.py | fcafedericoguerra/Python | 130381d51ddc9192859d2512715a86db8aa5869d | [
"MIT"
] | 3 | 2019-05-03T21:22:36.000Z | 2019-05-03T21:24:50.000Z | basics/06_modificacion_cadenas.py | fcafedericoguerra/Python | 130381d51ddc9192859d2512715a86db8aa5869d | [
"MIT"
] | 50 | 2019-04-24T22:52:19.000Z | 2021-11-04T01:57:33.000Z | # -*- coding: utf-8 -*-
#Cadena para buscar
cadena = "Amor y deseo son dos cosas diferentes, "
cadena = cadena + "que no todo lo que se ama se desea, "
cadena = cadena + "ni todo lo que se desea se ama. (Don Quijote)"
#Cambia todos los caracteres de la cadena a mayúsculas
cadena = cadena.upper()
print (cadena)
#Camb... | 26.631579 | 65 | 0.717391 |
a5319275753f9aba892fffcc0a88757b6a29fd01 | 2,813 | py | Python | runtests.py | aoqfonseca/model_mommy | c9a5e888da8b3ab46561f49420dcdfd755c65a2c | [
"Apache-2.0"
] | null | null | null | runtests.py | aoqfonseca/model_mommy | c9a5e888da8b3ab46561f49420dcdfd755c65a2c | [
"Apache-2.0"
] | 1 | 2016-09-08T17:07:28.000Z | 2016-09-08T17:07:28.000Z | runtests.py | aoqfonseca/model_mommy | c9a5e888da8b3ab46561f49420dcdfd755c65a2c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from os.path import dirname, join
import sys
from optparse import OptionParser
import warnings
import django
def parse_args():
parser = OptionParser()
parser.add_option('--use-tz', dest='USE_TZ', action='store_true')
return parser.parse_args()
def configure_settings(options):
... | 30.912088 | 88 | 0.597583 |
59416ab4d3e56ef1d03c3b286f9f4b74c0bd28f1 | 1,237 | py | Python | sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/__init__.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/__init__.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/__init__.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # 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 ... | 39.903226 | 83 | 0.725141 |
2cc051d6a20444d8ab7e8593200bec423a2eb96a | 336 | py | Python | bot/orders/views.py | psemdel/py-trading-bot | 69da4164b3f6a3ed3e6dc81d5aefc0273b4cb019 | [
"MIT"
] | null | null | null | bot/orders/views.py | psemdel/py-trading-bot | 69da4164b3f6a3ed3e6dc81d5aefc0273b4cb019 | [
"MIT"
] | 1 | 2022-02-07T21:13:55.000Z | 2022-02-07T21:13:55.000Z | bot/orders/views.py | psemdel/py-trading-bot | 69da4164b3f6a3ed3e6dc81d5aefc0273b4cb019 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from orders.models import PF, Action
# Create your views here.
def pfView(request):
pf= PF.objects.filter(short=False)
pf_short= PF.objects.filter(short=True)
context={'actions':pf[0].actions, 'actions_short':pf_short[0].actions}
return render(request, 'orders/pf... | 33.6 | 74 | 0.732143 |
910783bb6d5932e9b2b43234d37b061286faa613 | 5,228 | py | Python | src/dragino/SX127x/constants.py | resba/pedestrian-counter | 2621c8a088283c1aee5b37d9f0d28545de4025ac | [
"MIT"
] | 17 | 2018-08-20T20:21:59.000Z | 2022-02-12T02:40:30.000Z | src/dragino/SX127x/constants.py | resba/pedestrian-counter | 2621c8a088283c1aee5b37d9f0d28545de4025ac | [
"MIT"
] | 31 | 2018-08-23T17:32:43.000Z | 2021-03-18T20:40:44.000Z | src/dragino/SX127x/constants.py | resba/pedestrian-counter | 2621c8a088283c1aee5b37d9f0d28545de4025ac | [
"MIT"
] | 10 | 2018-09-07T16:00:51.000Z | 2022-02-05T00:55:59.000Z | """ Defines constants (modes, bandwidths, registers, etc.) needed by SX127x. """
# Copyright 2015 Mayer Analytics Ltd.
#
# This file is part of pySX127x.
#
# pySX127x is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public
# License as published by the Free Software... | 27.371728 | 118 | 0.545524 |
db0bc4af0810b889e3d12151117bb14f6c8dd629 | 2,559 | py | Python | python/script/add_score.py | usc-isi-i2/dsbox-ta2 | 85e0e8f5bbda052fa77cb98f4eef1f4b50909fd2 | [
"MIT"
] | 7 | 2018-05-10T22:19:44.000Z | 2020-07-21T07:28:39.000Z | python/script/add_score.py | usc-isi-i2/dsbox-ta2 | 85e0e8f5bbda052fa77cb98f4eef1f4b50909fd2 | [
"MIT"
] | 187 | 2018-04-13T17:19:24.000Z | 2020-04-21T00:41:15.000Z | python/script/add_score.py | usc-isi-i2/dsbox-ta2 | 85e0e8f5bbda052fa77cb98f4eef1f4b50909fd2 | [
"MIT"
] | 7 | 2018-07-10T00:14:07.000Z | 2019-07-25T17:59:44.000Z | import argparse
import json
import pprint
import sys
import numpy
import pandas as pd
from pathlib import Path
class MyEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, numpy.integer):
return int(obj)
elif isinstance(obj, numpy.floating):
return float(o... | 30.464286 | 83 | 0.641657 |
9cd106716f00084cdf345c7c3baccb0df7746de0 | 1,878 | py | Python | billing/migrations/0004_stripesubscription_and_more.py | hkhanna/django-stripe-billing | 75a53c183ff86b1c7edf741683ffe3330e733d87 | [
"MIT"
] | 1 | 2022-03-29T20:16:34.000Z | 2022-03-29T20:16:34.000Z | billing/migrations/0004_stripesubscription_and_more.py | hkhanna/django-stripe-billing | 75a53c183ff86b1c7edf741683ffe3330e733d87 | [
"MIT"
] | 2 | 2022-02-21T17:38:22.000Z | 2022-02-22T20:56:39.000Z | billing/migrations/0004_stripesubscription_and_more.py | hkhanna/django-stripe-billing | 75a53c183ff86b1c7edf741683ffe3330e733d87 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.2 on 2022-04-07 17:02
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('billing', '0003_stripeevent_primary'),
]
operations = [
migrations.CreateModel(
name='StripeSub... | 34.145455 | 221 | 0.571353 |
522b586f29c12054150662168f74beadb65bf6a2 | 2,192 | py | Python | app/models/user_answer.py | igor-calic/poll | 2777c7828252206d6c2cbe2e02a9dc08e64129a4 | [
"MIT"
] | null | null | null | app/models/user_answer.py | igor-calic/poll | 2777c7828252206d6c2cbe2e02a9dc08e64129a4 | [
"MIT"
] | null | null | null | app/models/user_answer.py | igor-calic/poll | 2777c7828252206d6c2cbe2e02a9dc08e64129a4 | [
"MIT"
] | null | null | null | import logging
from google.appengine.ext import ndb
from ferris import BasicModel
from ferris.core import messages
class UserAnswer(BasicModel):
answers = ndb.KeyProperty(repeated=True)
def answers_only(self):
return ndb.get_multi(self.answers)
@classmethod
def create_or_update(cls, user_k... | 32.235294 | 87 | 0.671077 |
3435013022a2cdb980533409ed077997022316a2 | 25,009 | py | Python | userbot/plugins/_inlinebot.py | aksr-aashish/FIREXUSERBOT | dff0b7bf028cb27779626ce523402346cc990402 | [
"MIT"
] | null | null | null | userbot/plugins/_inlinebot.py | aksr-aashish/FIREXUSERBOT | dff0b7bf028cb27779626ce523402346cc990402 | [
"MIT"
] | 1 | 2022-01-09T11:35:06.000Z | 2022-01-09T11:35:06.000Z | userbot/plugins/_inlinebot.py | aksr-aashish/FIREXUSERBOT | dff0b7bf028cb27779626ce523402346cc990402 | [
"MIT"
] | null | null | null | import asyncio
import html
import os
import re
from math import ceil
from re import compile
from telethon import Button, custom, events, functions
from telethon.errors.rpcerrorlist import UserNotParticipantError
from telethon.events import InlineQuery, callbackquery
from telethon.sync import custom
from telethon.tl.fu... | 39.508689 | 175 | 0.515814 |
e848cee1860c79756d34d6f7e107d7187f54365c | 12,293 | py | Python | imu.py | dobra-dobra/micropython-mpu9250 | de036ee7d511adb859967edce21d81fa427c8399 | [
"MIT"
] | 1 | 2021-03-21T11:56:53.000Z | 2021-03-21T11:56:53.000Z | imu.py | dobra-dobra/micropython-mpu9250 | de036ee7d511adb859967edce21d81fa427c8399 | [
"MIT"
] | null | null | null | imu.py | dobra-dobra/micropython-mpu9250 | de036ee7d511adb859967edce21d81fa427c8399 | [
"MIT"
] | null | null | null | # imu.py MicroPython driver for the InvenSense inertial measurement units
# This is the base class
# Adapted from Sebastian Plamauer's MPU9150 driver:
# https://github.com/micropython-IMU/micropython-mpu9150.git
# Authors Peter Hinch, Sebastian Plamauer
# V0.1 13th June 2015 Experimental: this code is not yet fully tes... | 35.83965 | 124 | 0.603107 |
fd9d6f8d183c29238bdfaefbd162dae164295bf4 | 966 | py | Python | python/ccxt/async/quoinex.py | hippylover/ccxt | db304e95b699c1971ad37b9053ae71fcb5dc3b03 | [
"MIT"
] | 2 | 2018-02-28T02:51:59.000Z | 2018-02-28T03:25:51.000Z | python/ccxt/async/quoinex.py | August-Ghost/ccxt | 886c596ffde611b5a92cb5b6e3788ff010324c74 | [
"MIT"
] | null | null | null | python/ccxt/async/quoinex.py | August-Ghost/ccxt | 886c596ffde611b5a92cb5b6e3788ff010324c74 | [
"MIT"
] | 9 | 2018-02-20T18:24:00.000Z | 2019-06-18T14:23:11.000Z | # -*- coding: utf-8 -*-
from ccxt.async.qryptos import qryptos
class quoinex (qryptos):
def describe(self):
return self.deep_extend(super(quoinex, self).describe(), {
'id': 'quoinex',
'name': 'QUOINEX',
'countries': ['JP', 'SG', 'VN'],
'version': '2',
... | 32.2 | 126 | 0.460663 |
48ac05909f720161e46f816d2ffd95308e664337 | 452 | py | Python | secret.py | DylanAlcock/cmput404_cgi-lab | a7e02535ddae2a8c8d7632c8abeda0806102156d | [
"Apache-2.0"
] | null | null | null | secret.py | DylanAlcock/cmput404_cgi-lab | a7e02535ddae2a8c8d7632c8abeda0806102156d | [
"Apache-2.0"
] | null | null | null | secret.py | DylanAlcock/cmput404_cgi-lab | a7e02535ddae2a8c8d7632c8abeda0806102156d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import cgi
import cgitb
cgitb.enable()
class FollowingTheTAsInstructionsError(Exception):
def __init__(self):
Exception.__init__(self, (
"You must edit secret.py to change the username, password, "
"and to delete this error!"
))... | 22.6 | 72 | 0.674779 |
d5db533757efd090876a5c26cbd7a30ca91ab9f5 | 11,631 | py | Python | aql/aql/options/aql_option_value.py | menify/sandbox | 32166c71044f0d5b414335b2b6559adc571f568c | [
"MIT"
] | null | null | null | aql/aql/options/aql_option_value.py | menify/sandbox | 32166c71044f0d5b414335b2b6559adc571f568c | [
"MIT"
] | null | null | null | aql/aql/options/aql_option_value.py | menify/sandbox | 32166c71044f0d5b414335b2b6559adc571f568c | [
"MIT"
] | null | null | null | #
# Copyright (c) 2011-2014 The developers of Aqualid project - http://aqualid.googlecode.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 limitati... | 30.769841 | 127 | 0.557304 |
73fd90339ee1a304621ccf3de7c05a9ac90b2aa2 | 3,503 | py | Python | napari/utils/events/containers/_selection.py | HarshCasper/napari | 3ed7d2db678f4012753f53b2d40cff9d34a8011f | [
"BSD-3-Clause"
] | null | null | null | napari/utils/events/containers/_selection.py | HarshCasper/napari | 3ed7d2db678f4012753f53b2d40cff9d34a8011f | [
"BSD-3-Clause"
] | null | null | null | napari/utils/events/containers/_selection.py | HarshCasper/napari | 3ed7d2db678f4012753f53b2d40cff9d34a8011f | [
"BSD-3-Clause"
] | null | null | null | from typing import TYPE_CHECKING, Iterable, Optional, TypeVar
from ._set import EventedSet
if TYPE_CHECKING:
from pydantic.fields import ModelField
_T = TypeVar("_T")
class Selection(EventedSet[_T]):
"""An unordered collection of selected elements, with a `current` item.
There can only be one 'current... | 32.137615 | 86 | 0.619754 |
a145d42cbc6228ba864623b6e43ccb025d7d2d1c | 102,234 | py | Python | native/tools/bindings-generator/generator.py | SteveLau-GameDeveloper/engine | 159e5acd0f5115a878d59ed59f924ce7627a5466 | [
"Apache-2.0",
"MIT"
] | null | null | null | native/tools/bindings-generator/generator.py | SteveLau-GameDeveloper/engine | 159e5acd0f5115a878d59ed59f924ce7627a5466 | [
"Apache-2.0",
"MIT"
] | null | null | null | native/tools/bindings-generator/generator.py | SteveLau-GameDeveloper/engine | 159e5acd0f5115a878d59ed59f924ce7627a5466 | [
"Apache-2.0",
"MIT"
] | null | null | null | #!/usr/bin/env python
# generator.py
# simple C++ generator, originally targetted for Spidermonkey bindings
#
# Copyright (c) 2011 - Zynga Inc.
import sys
import yaml
import re
import os
import io
import inspect
import traceback
import logging
import json
from Cheetah.Template import Template
from clang import cindex... | 43.209637 | 241 | 0.576501 |
05ba8b8c52826e1742d24e65e68af649bd167153 | 666 | py | Python | happ/management/commands/create_users.py | Mafioso/happ-backend | 3a3a57add4ec55985cc37db79c71430ed78b1ee3 | [
"MIT"
] | 1 | 2017-10-22T06:12:33.000Z | 2017-10-22T06:12:33.000Z | happ/management/commands/create_users.py | Mafioso/happ-backend | 3a3a57add4ec55985cc37db79c71430ed78b1ee3 | [
"MIT"
] | null | null | null | happ/management/commands/create_users.py | Mafioso/happ-backend | 3a3a57add4ec55985cc37db79c71430ed78b1ee3 | [
"MIT"
] | null | null | null | import os
import json
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from happ.factories import UserFactory
from happ.models import User
class Command(BaseCommand):
help = 'Creates random users using UserFactory'
def add_arguments(self, parser):
p... | 26.64 | 72 | 0.645646 |
04bfa7c410bfb1dffb8509c86890409a964873f2 | 292 | py | Python | cumin/__init__.py | cympfh/cumin-py | 15c022ee5739aa23eaed3151d3533959bc5c7887 | [
"MIT"
] | 1 | 2021-02-14T23:04:07.000Z | 2021-02-14T23:04:07.000Z | cumin/__init__.py | cympfh/cumin-py | 15c022ee5739aa23eaed3151d3533959bc5c7887 | [
"MIT"
] | null | null | null | cumin/__init__.py | cympfh/cumin-py | 15c022ee5739aa23eaed3151d3533959bc5c7887 | [
"MIT"
] | null | null | null | from .cumin_py import load as cumin_load
import json
def loads(source: str):
"""Load cumin from String"""
return json.loads(cumin_load(source))
def load(filepath: str):
"""Load cumin from File"""
return loads(open(filepath).read())
__all__ = [
"load",
"loads",
]
| 16.222222 | 41 | 0.64726 |
a63f28b64a5bf326b051b1719bc0e23bd1a53b21 | 1,235 | py | Python | python/jink/config.py | tvald/Jink | 20e9474b2bbd50fa9d36f2c2e288c54b7c374357 | [
"MIT"
] | null | null | null | python/jink/config.py | tvald/Jink | 20e9474b2bbd50fa9d36f2c2e288c54b7c374357 | [
"MIT"
] | null | null | null | python/jink/config.py | tvald/Jink | 20e9474b2bbd50fa9d36f2c2e288c54b7c374357 | [
"MIT"
] | null | null | null |
class Config(object):
def __init__(self, config=None):
self.settings = dict(config)
def set(self, key_or_dict, value_or_none=None):
if value_or_none == None:
self.settings.update(key_or_dict)
else:
self.settings[key_or_dict] = value_or_none
def append(self, key, *values):
old = ... | 28.068182 | 82 | 0.645344 |
6c4b9a1f824c4a7286a57e14562efc7ddb697d26 | 148 | py | Python | grp_modules/optimizer/adam/__init__.py | JGU-VC/activation-pattern-analysis | 14da42ad541ee4faf35d360a6e871fd44decd33d | [
"MIT"
] | null | null | null | grp_modules/optimizer/adam/__init__.py | JGU-VC/activation-pattern-analysis | 14da42ad541ee4faf35d360a6e871fd44decd33d | [
"MIT"
] | null | null | null | grp_modules/optimizer/adam/__init__.py | JGU-VC/activation-pattern-analysis | 14da42ad541ee4faf35d360a6e871fd44decd33d | [
"MIT"
] | null | null | null | from torch.optim import Adam as Optimizer
def register(mf):
mf.load("optimizer")
mf.event.register_optimizer_with_defaults(mf, Optimizer)
| 21.142857 | 60 | 0.763514 |
d7d64ae542451a413de39c481725ec480d90013d | 589 | py | Python | 480.py | RafaelHuang87/Leet-Code-Practice | 7754dcee38ffda18a5759113ef06d7becf4fe728 | [
"MIT"
] | null | null | null | 480.py | RafaelHuang87/Leet-Code-Practice | 7754dcee38ffda18a5759113ef06d7becf4fe728 | [
"MIT"
] | null | null | null | 480.py | RafaelHuang87/Leet-Code-Practice | 7754dcee38ffda18a5759113ef06d7becf4fe728 | [
"MIT"
] | null | null | null | class Solution:
def medianSlidingWindow(self, nums: List[int], k: int) -> List[float]:
if k == 0: return []
win = sorted(nums[:k])
ans = []
for i in range(k, len(nums) + 1):
median = (win[k // 2] + win[(k - 1) // 2]) / 2.0
ans.append(median)
if i =... | 34.647059 | 84 | 0.487267 |
e0000ff6b5c5cd34655aba6ad5acd7df4fdf7d11 | 186,214 | py | Python | tests/admin_views/tests.py | cool-RR/django | a506b6981bc48caec30bca3de94d2ac3e6fc1660 | [
"BSD-3-Clause"
] | 1 | 2020-04-09T07:05:17.000Z | 2020-04-09T07:05:17.000Z | tests/admin_views/tests.py | liuliang2015/django | 86d3079d5797811c1e118cfd600a913685212165 | [
"BSD-3-Clause"
] | null | null | null | tests/admin_views/tests.py | liuliang2015/django | 86d3079d5797811c1e118cfd600a913685212165 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import, unicode_literals
import os
import re
import datetime
try:
from urllib.parse import urljoin
except ImportError: # Python 2
from urlparse import urljoin
from django.conf import settings, global_settings
from django.core import mail
from django.core.except... | 45.91075 | 251 | 0.64464 |
1acd325e5879c3850fe0ac81468ff0dcfe19bc18 | 2,776 | py | Python | volttron/utils/prompt.py | gnmerritt/volttron | ebfbf62bab77d46fd3e8d6aaca1fc4f33932ccf3 | [
"Apache-2.0"
] | 1 | 2021-04-06T21:28:38.000Z | 2021-04-06T21:28:38.000Z | volttron/utils/prompt.py | gnmerritt/volttron | ebfbf62bab77d46fd3e8d6aaca1fc4f33932ccf3 | [
"Apache-2.0"
] | null | null | null | volttron/utils/prompt.py | gnmerritt/volttron | ebfbf62bab77d46fd3e8d6aaca1fc4f33932ccf3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- {{{
# vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et:
#
# Copyright 2019, Battelle Memorial Institute.
#
# 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... | 39.657143 | 79 | 0.697046 |
6178a474d7732a8cd75b13b50576e24b3a82b060 | 17,722 | py | Python | sdk/python/pulumi_azure_native/compute/v20201201/_enums.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_native/compute/v20201201/_enums.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_native/compute/v20201201/_enums.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"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! ***
from enum import Enum
__all__ = [
'CachingTypes',
'ComponentNames',
'DedicatedHostLicenseTypes',
'DiffDiskOptions',
'DiffDiskPlace... | 40.369021 | 876 | 0.719332 |
f7b05705db661b596f4783ccc42c4f4d6060d7c8 | 66,050 | py | Python | Lib/test/test_tokenize.py | devnexen/RustPython | 345a4f912c83ce723fc859ab934c17ffe3f2b57a | [
"CC-BY-4.0",
"MIT"
] | 2 | 2021-09-03T16:15:06.000Z | 2021-09-03T16:19:28.000Z | Lib/test/test_tokenize.py | devnexen/RustPython | 345a4f912c83ce723fc859ab934c17ffe3f2b57a | [
"CC-BY-4.0",
"MIT"
] | 6 | 2021-10-01T13:51:43.000Z | 2021-11-17T13:27:14.000Z | Lib/test/test_tokenize.py | devnexen/RustPython | 345a4f912c83ce723fc859ab934c17ffe3f2b57a | [
"CC-BY-4.0",
"MIT"
] | 1 | 2020-08-04T12:13:42.000Z | 2020-08-04T12:13:42.000Z | from test import support
from test.support import os_helper
from tokenize import (tokenize, _tokenize, untokenize, NUMBER, NAME, OP,
STRING, ENDMARKER, ENCODING, tok_name, detect_encoding,
open as tokenize_open, Untokenizer, generate_tokens,
NEWLINE)
from i... | 38.921626 | 90 | 0.435988 |
5c7cc31eac691934eb65a152e102fcc41abefcba | 12,532 | py | Python | Scrapy/my_movie_crawlspider/my_movie_crawlspider/settings.py | pengchenyu111/SpiderLearning | d1fca1c7f46bfb22ad23f9396d0f2e2301ec4534 | [
"Apache-2.0"
] | 3 | 2020-11-21T13:13:46.000Z | 2020-12-03T05:43:32.000Z | Scrapy/my_movie_crawlspider/my_movie_crawlspider/settings.py | pengchenyu111/SpiderLearning | d1fca1c7f46bfb22ad23f9396d0f2e2301ec4534 | [
"Apache-2.0"
] | null | null | null | Scrapy/my_movie_crawlspider/my_movie_crawlspider/settings.py | pengchenyu111/SpiderLearning | d1fca1c7f46bfb22ad23f9396d0f2e2301ec4534 | [
"Apache-2.0"
] | 1 | 2020-12-03T05:43:53.000Z | 2020-12-03T05:43:53.000Z | # Scrapy settings for my_movie_crawlspider project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://docs.scrapy.org/en/latest/topics/settings.html
# https://docs.scrapy.org/en/latest/topics/download... | 72.022989 | 164 | 0.715448 |
c9b2ff3151c19f51f81e5343969b770784b60d0a | 2,933 | py | Python | csvkit/utilities/in2csv.py | thejefflarson/csvkit | 628ffbe03f6a99997290701a262685a36e4dd532 | [
"MIT"
] | 1 | 2016-06-22T02:19:16.000Z | 2016-06-22T02:19:16.000Z | csvkit/utilities/in2csv.py | thejefflarson/csvkit | 628ffbe03f6a99997290701a262685a36e4dd532 | [
"MIT"
] | null | null | null | csvkit/utilities/in2csv.py | thejefflarson/csvkit | 628ffbe03f6a99997290701a262685a36e4dd532 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
from csvkit import convert
from csvkit.cli import CSVFileType, CSVKitUtility
class In2CSV(CSVKitUtility):
description = 'Convert common, but less awesome, tabular data formats to CSV.'
epilog='Some command line flags only pertain to specific input formats.'
override_flags... | 40.178082 | 189 | 0.607228 |
aa70fce27b7ad24f37d4fe66c38ac9fdc667b427 | 1,631 | py | Python | protrade/models.py | 4322vipul/django_Myhealth | 434998ab61d0ea6fd12fc5e4aa60d74b3607ee73 | [
"MIT"
] | null | null | null | protrade/models.py | 4322vipul/django_Myhealth | 434998ab61d0ea6fd12fc5e4aa60d74b3607ee73 | [
"MIT"
] | null | null | null | protrade/models.py | 4322vipul/django_Myhealth | 434998ab61d0ea6fd12fc5e4aa60d74b3607ee73 | [
"MIT"
] | null | null | null | from django.db import models
from django.urls import reverse
from django.http import HttpResponse,Http404,HttpResponseRedirect
# Create your models here.
class Items(models.Model):
item_name=models.CharField(max_length=32)
item_price=models.CharField(max_length=8)
item_image=models.ImageField()
item_de... | 25.484375 | 67 | 0.707541 |
6abf71445bd5f7ae9241e9d9162b2ec5655e950c | 1,449 | py | Python | cakechat/utils/text_processing/dialog.py | sketscripter/emotional-chatbot-cakechat | 470df58a2206a0ea38b6bed53b20cbc63bd3de24 | [
"Apache-2.0"
] | 1,608 | 2018-01-31T15:22:29.000Z | 2022-03-30T19:59:16.000Z | cakechat/utils/text_processing/dialog.py | GaelicThunder/cakechat | 844507281b30d81b3fe3674895fe27826dba8438 | [
"Apache-2.0"
] | 60 | 2018-02-01T11:45:51.000Z | 2019-11-13T10:35:59.000Z | cakechat/utils/text_processing/dialog.py | GaelicThunder/cakechat | 844507281b30d81b3fe3674895fe27826dba8438 | [
"Apache-2.0"
] | 690 | 2018-01-31T17:57:19.000Z | 2022-03-30T07:07:41.000Z | from operator import itemgetter
from cakechat.utils.tee_file import file_buffered_tee
from cakechat.utils.text_processing.config import DIALOG_CONDITION_FIELD, DIALOG_TEXT_FIELD
from cakechat.utils.text_processing.corpus_iterator import JsonTextLinesIterator
def get_flatten_dialogs(dialogs):
for dialog in dialog... | 38.131579 | 103 | 0.765355 |
20287c6c445946b970fa96fa141527acb08cb63e | 13,011 | py | Python | cinder/volume/drivers/coprhd/scaleio.py | aarunsai81/netapp | 8f0f7bf9be7f4d9fb9c3846bfc639c90a05f86ba | [
"Apache-2.0"
] | 11 | 2015-08-25T13:11:18.000Z | 2020-10-15T11:29:20.000Z | cinder/volume/drivers/coprhd/scaleio.py | aarunsai81/netapp | 8f0f7bf9be7f4d9fb9c3846bfc639c90a05f86ba | [
"Apache-2.0"
] | 5 | 2018-01-25T11:31:56.000Z | 2019-05-06T23:13:35.000Z | cinder/volume/drivers/coprhd/scaleio.py | aarunsai81/netapp | 8f0f7bf9be7f4d9fb9c3846bfc639c90a05f86ba | [
"Apache-2.0"
] | 11 | 2015-02-20T18:48:24.000Z | 2021-01-30T20:26:18.000Z | # Copyright (c) 2016 EMC Corporation
# 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 requir... | 39.308157 | 79 | 0.607102 |
afaf20300c32fc48ae671702eadbf4fa62ac7ede | 11,539 | py | Python | dygraph/paddlex/ppdet/modeling/architectures/keypoint_hrhrnet.py | follower/PaddleX | 466e985f16cb82a634e3ffcf72a5784fb33a6897 | [
"Apache-2.0"
] | 1 | 2021-07-10T09:54:19.000Z | 2021-07-10T09:54:19.000Z | dygraph/paddlex/ppdet/modeling/architectures/keypoint_hrhrnet.py | liyhc/PaddleX | bad2fd2b97cdf2ffa783650ccee0458a53dfbe6e | [
"Apache-2.0"
] | null | null | null | dygraph/paddlex/ppdet/modeling/architectures/keypoint_hrhrnet.py | liyhc/PaddleX | bad2fd2b97cdf2ffa783650ccee0458a53dfbe6e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle 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
#
# Un... | 40.205575 | 125 | 0.562874 |
20a0e41216fc965c814c29d3525e161ea17c6442 | 2,956 | py | Python | tutorials/image/cifar10_estimator/cifar10.py | SquantoInc/papernot-models | cf78a38a983370d934831d55bccac89792c74824 | [
"Apache-2.0"
] | 1 | 2017-12-05T15:35:47.000Z | 2017-12-05T15:35:47.000Z | tutorials/image/cifar10_estimator/cifar10.py | SquantoInc/papernot-models | cf78a38a983370d934831d55bccac89792c74824 | [
"Apache-2.0"
] | 10 | 2017-07-13T00:24:03.000Z | 2017-07-17T07:39:03.000Z | tutorials/image/cifar10_estimator/cifar10.py | SquantoInc/papernot-models | cf78a38a983370d934831d55bccac89792c74824 | [
"Apache-2.0"
] | 7 | 2017-08-01T04:02:07.000Z | 2018-10-06T21:07:20.000Z | # Copyright 2017 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 required by applica... | 33.213483 | 80 | 0.65866 |
30954b24dc7a6d4e01895c6ed6c9bb830156184d | 9,666 | py | Python | zun/compute/claims.py | wkite/zun | 7eb8984e8b0ea102f4a1c1137fe78ea149fcc6ef | [
"Apache-2.0"
] | null | null | null | zun/compute/claims.py | wkite/zun | 7eb8984e8b0ea102f4a1c1137fe78ea149fcc6ef | [
"Apache-2.0"
] | null | null | null | zun/compute/claims.py | wkite/zun | 7eb8984e8b0ea102f4a1c1137fe78ea149fcc6ef | [
"Apache-2.0"
] | 1 | 2018-12-28T02:35:39.000Z | 2018-12-28T02:35:39.000Z | # Copyright (c) 2017 OpenStack Foundation
# 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 ... | 35.021739 | 79 | 0.629733 |
f23bb59de9158b0481320cc409879b3b72cbd43e | 4,406 | py | Python | benchmark/fluid/models/stacked_dynamic_lstm.py | ysh329/Paddle | 50ad9046c9a440564d104eaa354eb9df83a35678 | [
"Apache-2.0"
] | 2 | 2019-04-03T05:36:17.000Z | 2020-04-29T03:38:54.000Z | benchmark/fluid/models/stacked_dynamic_lstm.py | ysh329/Paddle | 50ad9046c9a440564d104eaa354eb9df83a35678 | [
"Apache-2.0"
] | 1 | 2019-05-26T14:23:24.000Z | 2019-05-26T14:23:51.000Z | benchmark/fluid/models/stacked_dynamic_lstm.py | ysh329/Paddle | 50ad9046c9a440564d104eaa354eb9df83a35678 | [
"Apache-2.0"
] | 3 | 2019-01-07T06:50:29.000Z | 2019-03-13T08:48:23.000Z | # Copyright (c) 2018 PaddlePaddle 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 required by app... | 33.633588 | 98 | 0.639128 |
caace27d2ff03df9161479bb29ffd87fa77d57f5 | 118 | py | Python | mayan/apps/dashboard/__init__.py | CMU-313/fall-2021-hw2-shrimp-gang | fa29cb4907a67b14b9a300f41cb2988b3759cab2 | [
"Apache-2.0"
] | 1 | 2021-09-14T23:19:27.000Z | 2021-09-14T23:19:27.000Z | mayan/apps/dashboard/__init__.py | CMU-313/fall-2021-hw2-shrimp-gang | fa29cb4907a67b14b9a300f41cb2988b3759cab2 | [
"Apache-2.0"
] | 20 | 2021-09-21T19:04:35.000Z | 2021-09-30T22:35:35.000Z | mayan/apps/dashboard/__init__.py | CMU-313/fall-2021-hw2-shrimp-gang | fa29cb4907a67b14b9a300f41cb2988b3759cab2 | [
"Apache-2.0"
] | 1 | 2021-09-15T00:06:49.000Z | 2021-09-15T00:06:49.000Z | # Marks dashboard directory as python package directory
default_app_config = 'mayan.apps.dashboard.apps.DashboardApp'
| 39.333333 | 61 | 0.838983 |
4b3ca0bc2a837080b1b442c684fe907796ccf466 | 3,709 | py | Python | Unsupported/VCL/Demo10/Example5.py | imiara/python4delphi | 2c84d57987f15522f151c4d717911d7f138156b1 | [
"MIT"
] | 685 | 2015-08-28T02:12:06.000Z | 2022-03-28T19:44:07.000Z | Unsupported/VCL/Demo10/Example5.py | imiara/python4delphi | 2c84d57987f15522f151c4d717911d7f138156b1 | [
"MIT"
] | 248 | 2015-11-17T16:39:48.000Z | 2022-03-29T18:44:53.000Z | Unsupported/VCL/Demo10/Example5.py | imiara/python4delphi | 2c84d57987f15522f151c4d717911d7f138156b1 | [
"MIT"
] | 259 | 2015-10-03T04:53:26.000Z | 2022-03-31T18:23:06.000Z | import DBTables
import pyio
True = 1
False = 0
# Misc
def DisplayTypesStats(*args):
for i in apply(pyio.GetTypesStats, args): # Requested types
#for i in pyio.GetTypesStats('TTable', 'TField'): # Only the types TTable and TField
print "----------------------------------------------------------------... | 32.823009 | 93 | 0.623349 |
d4d655bdd2f9062fdf99f13a6a410ca9a996a950 | 25,634 | py | Python | Actor.py | lsmanoel/MachineRevolution | 3c91415406db78b56fc20e5d9671bceac62b5b9d | [
"MIT"
] | null | null | null | Actor.py | lsmanoel/MachineRevolution | 3c91415406db78b56fc20e5d9671bceac62b5b9d | [
"MIT"
] | null | null | null | Actor.py | lsmanoel/MachineRevolution | 3c91415406db78b56fc20e5d9671bceac62b5b9d | [
"MIT"
] | 1 | 2019-06-19T21:34:05.000Z | 2019-06-19T21:34:05.000Z | import os
import random
from random import gauss
import pygame
from DynamicBehaviorPredictor import DynamicBehaviorPredictor
class Actor:
def __init__(self,
surface,
surface_size,
surface_resistance,
id_number,
main_state='start_... | 38.547368 | 118 | 0.499844 |
4be096245c11edbeab5806e9e47ca5d4fe0de9d5 | 1,000 | py | Python | recipes/admin.py | AlexxSandbox/foodgram-project | 6317678e95c630fee497f549e7806eb8ce18b861 | [
"BSD-3-Clause"
] | null | null | null | recipes/admin.py | AlexxSandbox/foodgram-project | 6317678e95c630fee497f549e7806eb8ce18b861 | [
"BSD-3-Clause"
] | 8 | 2021-04-08T20:56:22.000Z | 2022-03-12T00:53:35.000Z | recipes/admin.py | AlexxSandbox/foodgram-project | 6317678e95c630fee497f549e7806eb8ce18b861 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from recipes.models import Ingredient, Recipe, RecipeIngredients
admin.site.site_header = 'FOODgram Admin'
admin.site.site_title = 'FOODgram Admin Portal'
admin.site.index_title = 'Welcome to most delicious portal - FOODgram'
class RecipeIngredientsInstanceInLine(admin.TabularInlin... | 25 | 70 | 0.684 |
de1af3a9fee6dda7c8615f0c76d2f8ce30899306 | 14,634 | py | Python | sdks/python/client/argo_workflows/model/io_argoproj_events_v1alpha1_trigger_parameter_source.py | roofurmston/argo-workflows | 79a95f223396ecab408d831781ab2d38d1fa6de0 | [
"Apache-2.0"
] | 7,643 | 2017-08-22T22:10:45.000Z | 2021-02-09T17:13:12.000Z | sdks/python/client/argo_workflows/model/io_argoproj_events_v1alpha1_trigger_parameter_source.py | roofurmston/argo-workflows | 79a95f223396ecab408d831781ab2d38d1fa6de0 | [
"Apache-2.0"
] | 4,183 | 2017-08-22T22:45:29.000Z | 2021-02-09T17:41:29.000Z | sdks/python/client/argo_workflows/model/io_argoproj_events_v1alpha1_trigger_parameter_source.py | isubasinghe/argo-workflows | 1a6e94f1d490e2265c977514d698a1ca70e14fe3 | [
"Apache-2.0"
] | 1,524 | 2017-08-22T22:10:53.000Z | 2021-02-09T16:26:16.000Z | """
Argo Server API
You can get examples of requests and responses by using the CLI with `--gloglevel=9`, e.g. `argo list --gloglevel=9` # noqa: E501
The version of the OpenAPI document: VERSION
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from ... | 53.021739 | 428 | 0.603526 |
3755e40b82fb0681e01a401b8a55130e766e0325 | 797 | py | Python | src/api.py | miguel-osuna/Quotes-Twitter-Bot | 10ee32d73f93e77f442d79f0e849012ab62de0b6 | [
"MIT"
] | null | null | null | src/api.py | miguel-osuna/Quotes-Twitter-Bot | 10ee32d73f93e77f442d79f0e849012ab62de0b6 | [
"MIT"
] | null | null | null | src/api.py | miguel-osuna/Quotes-Twitter-Bot | 10ee32d73f93e77f442d79f0e849012ab62de0b6 | [
"MIT"
] | null | null | null | import os
import tweepy
import logging
logger = logging.getLogger(__name__)
def create_api():
consumer_key = os.getenv("CONSUMER_KEY")
consumer_secret = os.getenv("CONSUMER_SECRET")
access_token = os.getenv("ACCESS_TOKEN")
access_token_secret = os.getenv("ACCESS_TOKEN_SECRET")
# Authenticate to ... | 26.566667 | 83 | 0.718946 |
5f7491d638913fcc7f93da4a0705ed00588e5923 | 32 | py | Python | ml/k_means/__init__.py | LaureDas/ml | ed08ef8e2cd517e25447557e00efc0b690f12cfb | [
"MIT"
] | 21 | 2018-09-03T18:34:32.000Z | 2022-01-23T02:18:21.000Z | ml/k_means/__init__.py | LaureDas/ml | ed08ef8e2cd517e25447557e00efc0b690f12cfb | [
"MIT"
] | 6 | 2020-01-06T07:25:24.000Z | 2022-02-09T23:51:19.000Z | ml/k_means/__init__.py | LaureDas/ml | ed08ef8e2cd517e25447557e00efc0b690f12cfb | [
"MIT"
] | 7 | 2018-11-01T21:47:39.000Z | 2021-12-18T16:36:53.000Z | from ml.k_means.kmeans import *
| 16 | 31 | 0.78125 |
35ee88052def38daf79249eea95bbfa9c14ea30d | 60 | py | Python | memorizeit/__init__.py | ethru/memorizeIT | cd1747c15f87a15654508587e9d005aaca6fb4d3 | [
"MIT"
] | 1 | 2021-05-15T17:28:43.000Z | 2021-05-15T17:28:43.000Z | memorizeit/__init__.py | ethru/memorizeit | cd1747c15f87a15654508587e9d005aaca6fb4d3 | [
"MIT"
] | 4 | 2021-06-08T22:38:33.000Z | 2022-03-12T00:50:43.000Z | memorizeit/__init__.py | ethru/memorizeIT | cd1747c15f87a15654508587e9d005aaca6fb4d3 | [
"MIT"
] | 1 | 2021-05-17T00:46:34.000Z | 2021-05-17T00:46:34.000Z | """.. include:: ../README.md"""
__version__ = '2020.10.30'
| 15 | 31 | 0.566667 |
1f5aee142faa3eabb72b851e7ea7c17a8026b11d | 737 | py | Python | openapi-graded-exercise/cpu.py | cybertraining-dsc/fa19-516-157 | 91e3f20282189027181e8b0b3fd8c5eca92c66f6 | [
"Apache-2.0"
] | 2 | 2019-09-03T19:58:46.000Z | 2019-09-25T17:07:05.000Z | openapi-graded-exercise/cpu.py | cybertraining-dsc/fa19-516-157 | 91e3f20282189027181e8b0b3fd8c5eca92c66f6 | [
"Apache-2.0"
] | 3 | 2019-09-25T00:44:30.000Z | 2019-12-21T19:10:49.000Z | openapi-graded-exercise/cpu.py | cybertraining-dsc/fa19-516-157 | 91e3f20282189027181e8b0b3fd8c5eca92c66f6 | [
"Apache-2.0"
] | 1 | 2019-09-10T22:55:58.000Z | 2019-09-10T22:55:58.000Z | import platform
import cpuinfo
import re
import subprocess
from flask import jsonify
def get_processor_name():
p = cpuinfo.get_cpu_info()['brand']
p_info = {"model": p}
return jsonify(p_info)
def get_processor_cache(level):
if level == "l2":
cache = cpuinfo.get_cpu_info()['l2_cache_size'... | 23.774194 | 68 | 0.626866 |
9bbc2edde8c1691f862dc289a1c08276b5022f8c | 16,266 | py | Python | mdimechanic/utils/node_analysis.py | jchen0506/MDI_Mechanic | 4738cec09170bb41f8cfa65a58dcadda9ed58c9d | [
"BSD-3-Clause"
] | null | null | null | mdimechanic/utils/node_analysis.py | jchen0506/MDI_Mechanic | 4738cec09170bb41f8cfa65a58dcadda9ed58c9d | [
"BSD-3-Clause"
] | null | null | null | mdimechanic/utils/node_analysis.py | jchen0506/MDI_Mechanic | 4738cec09170bb41f8cfa65a58dcadda9ed58c9d | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
import subprocess
import pickle
from .utils import format_return, insert_list, docker_error, get_mdi_standard, get_compose_path, get_package_path, get_mdimechanic_yaml
# Paths to enter each identified node
node_paths = { "@DEFAULT": "" }
# Paths associated with the edges for the node graph
node_e... | 38.004673 | 179 | 0.590311 |
4688b0c61e442432467897bb96459404e719257a | 2,429 | py | Python | site_list.py | cyber-academy/sherlock1 | 7d6c09ef8a8fd09937a3388b5e007451c17faa88 | [
"MIT"
] | null | null | null | site_list.py | cyber-academy/sherlock1 | 7d6c09ef8a8fd09937a3388b5e007451c17faa88 | [
"MIT"
] | null | null | null | site_list.py | cyber-academy/sherlock1 | 7d6c09ef8a8fd09937a3388b5e007451c17faa88 | [
"MIT"
] | null | null | null | """Sherlock: Supported Site Listing
This module generates the listing of supported sites.
"""
import json
import sys
import requests
import threading
import xml.etree.ElementTree as ET
from datetime import datetime
from argparse import ArgumentParser, RawDescriptionHelpFormatter
pool = list()
def get_rank(domain_to_q... | 32.386667 | 93 | 0.642651 |
c23fb085ec54d0799fbe17ae911c079304dff3d3 | 1,843 | py | Python | tests/test_argument_validation.py | getslash/gossip | 05a06289bd82cda57bf0c9a29a33819a522afe17 | [
"BSD-3-Clause"
] | 23 | 2016-03-07T09:28:23.000Z | 2021-06-16T12:47:22.000Z | tests/test_argument_validation.py | getslash/gossip | 05a06289bd82cda57bf0c9a29a33819a522afe17 | [
"BSD-3-Clause"
] | 31 | 2016-04-06T08:45:19.000Z | 2020-01-27T12:00:45.000Z | tests/test_argument_validation.py | getslash/gossip | 05a06289bd82cda57bf0c9a29a33819a522afe17 | [
"BSD-3-Clause"
] | 5 | 2016-05-22T15:24:29.000Z | 2019-08-18T10:58:15.000Z | import gossip
import pytest
def test_non_strict_hook_doesnt_validate(request):
hook = gossip.define('somegroup.somehook', arg_names={'x': None, 'y': int})
request.addfinalizer(hook.undefine)
hook.trigger(kwargs={})
def test_strict_hook_without_argument_defs_doesnt_validate(request):
group = gossip.... | 27.102941 | 107 | 0.660336 |
e43904aa5f1501f7fefaef20bfcf99afcbdd91f5 | 6,492 | py | Python | programs/rheed_oszi/rheed_oszi.py | LukeSkywalker92/heuslertools | 58108511eec4a027f7d42888e66b50b2dc8d7612 | [
"MIT"
] | null | null | null | programs/rheed_oszi/rheed_oszi.py | LukeSkywalker92/heuslertools | 58108511eec4a027f7d42888e66b50b2dc8d7612 | [
"MIT"
] | null | null | null | programs/rheed_oszi/rheed_oszi.py | LukeSkywalker92/heuslertools | 58108511eec4a027f7d42888e66b50b2dc8d7612 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from matplotlib.widgets import RectangleSelector, Button
from matplotlib.backend_tools import ToolBase, ToolToggleBase
from heuslertools.mbe.rheed_oszillation import get_folder_intensities, show_image_with_r... | 40.575 | 126 | 0.623845 |
6df7cddda7e1ad172c1fcca9cb2140760d411df0 | 181 | py | Python | aku/swig/add_undefs.py | phsmit/AaltoASR | 33cb58b288cc01bcdff0d6709a296d0dfcc7f74a | [
"BSD-3-Clause"
] | 78 | 2015-01-07T14:33:47.000Z | 2022-03-15T09:01:30.000Z | aku/swig/add_undefs.py | phsmit/AaltoASR | 33cb58b288cc01bcdff0d6709a296d0dfcc7f74a | [
"BSD-3-Clause"
] | 4 | 2015-05-19T13:00:34.000Z | 2016-07-26T12:29:32.000Z | aku/swig/add_undefs.py | phsmit/AaltoASR | 33cb58b288cc01bcdff0d6709a296d0dfcc7f74a | [
"BSD-3-Clause"
] | 32 | 2015-01-16T08:16:24.000Z | 2021-04-02T21:26:22.000Z | #!python
import sys
for l in sys.stdin:
sys.stdout.write(l)
if l=="#include <Python.h>\n":
sys.stdout.write("#undef c_abs\n")
#sys.stdout.write("#undef _c_Py_abs\n")
| 16.454545 | 43 | 0.640884 |
ad2594f065bcc5f23aa70446b47e91c24197b8f1 | 3,488 | py | Python | streaming/python/operator.py | sunho/ray | 0ac8138b26cc66978df150c89ef291263f23c9a1 | [
"Apache-2.0"
] | 2 | 2019-06-17T12:38:24.000Z | 2020-11-11T07:52:26.000Z | streaming/python/operator.py | sunho/ray | 0ac8138b26cc66978df150c89ef291263f23c9a1 | [
"Apache-2.0"
] | 3 | 2018-08-15T19:19:25.000Z | 2021-06-30T01:54:46.000Z | streaming/python/operator.py | sunho/ray | 0ac8138b26cc66978df150c89ef291263f23c9a1 | [
"Apache-2.0"
] | 2 | 2017-10-31T23:20:07.000Z | 2019-11-13T20:16:03.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import enum
import logging
import cloudpickle
logger = logging.getLogger(__name__)
logger.setLevel("DEBUG")
# Stream partitioning schemes
class PScheme:
def __init__(self, strategy, partition_fn=None):
... | 30.596491 | 78 | 0.616399 |
87ca321fe834174279b0a40683b7d13b5a1a3dc5 | 3,014 | py | Python | labcontrol/db/tests/test_user.py | gwarmstrong/LabControl | 1427ad163682ff11b1086e0e3b1010ba1a2166ee | [
"BSD-3-Clause"
] | null | null | null | labcontrol/db/tests/test_user.py | gwarmstrong/LabControl | 1427ad163682ff11b1086e0e3b1010ba1a2166ee | [
"BSD-3-Clause"
] | null | null | null | labcontrol/db/tests/test_user.py | gwarmstrong/LabControl | 1427ad163682ff11b1086e0e3b1010ba1a2166ee | [
"BSD-3-Clause"
] | 1 | 2019-08-30T18:20:37.000Z | 2019-08-30T18:20:37.000Z | # ----------------------------------------------------------------------------
# Copyright (c) 2017-, LabControl development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# -------------------------------------------------... | 36.756098 | 81 | 0.595554 |
8dea5d5cbfc96b3a97966b539618840a2e7bda60 | 1,436 | py | Python | eval/check_leaderboard.py | ArvinZhuang/MSMARCO-Document-Ranking-Submissions | 5b8e5b560934fb0871aabfcbbd019a3bd897e511 | [
"CC-BY-4.0",
"MIT"
] | 24 | 2020-11-15T08:08:48.000Z | 2022-02-16T18:42:38.000Z | eval/check_leaderboard.py | ArvinZhuang/MSMARCO-Document-Ranking-Submissions | 5b8e5b560934fb0871aabfcbbd019a3bd897e511 | [
"CC-BY-4.0",
"MIT"
] | 107 | 2020-11-11T14:40:10.000Z | 2022-02-15T18:27:13.000Z | eval/check_leaderboard.py | ArvinZhuang/MSMARCO-Document-Ranking-Submissions | 5b8e5b560934fb0871aabfcbbd019a3bd897e511 | [
"CC-BY-4.0",
"MIT"
] | 83 | 2020-11-14T14:22:19.000Z | 2022-02-09T05:34:21.000Z | import argparse
import csv
import json
def main(args):
id = args.id
leaderboard = {}
with open('leaderboard/leaderboard.csv') as csv_file:
reader = csv.DictReader(csv_file, delimiter=',', quotechar='"')
for row in reader:
leaderboard[row['id']] = row
metadata_file = f'su... | 34.190476 | 99 | 0.660167 |
52ab9c99499b3defec8167f779b3cf02be9d51ed | 202,421 | py | Python | numpy/core/_add_newdocs.py | fruchart/numpy | bf20e3034085716c4559ec4bf31b23b6016f266c | [
"BSD-3-Clause"
] | null | null | null | numpy/core/_add_newdocs.py | fruchart/numpy | bf20e3034085716c4559ec4bf31b23b6016f266c | [
"BSD-3-Clause"
] | null | null | null | numpy/core/_add_newdocs.py | fruchart/numpy | bf20e3034085716c4559ec4bf31b23b6016f266c | [
"BSD-3-Clause"
] | null | null | null | """
This is only meant to add docs to objects defined in C-extension modules.
The purpose is to allow easier editing of the docstrings without
requiring a re-compile.
NOTE: Many of the methods of ndarray have corresponding functions.
If you update these docstrings, please keep also the ones in
core/fromnum... | 29.680499 | 109 | 0.59973 |
eaa41e4f75e3d2f44c948aa52d9bf57cf2b1c8e5 | 6,193 | py | Python | huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/charge_info.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-04-16T07:59:28.000Z | 2021-04-16T07:59:28.000Z | huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/charge_info.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/charge_info.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2022-01-17T02:24:18.000Z | 2022-01-17T02:24:18.000Z | # coding: utf-8
import pprint
import re
import six
class ChargeInfo:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json... | 28.408257 | 120 | 0.585661 |
7dc65d8a408256e0cdb71abfc4f54756686760fa | 7,183 | py | Python | sym_api_client_python/templates/expense_approval_form/freemarker_templates/generate_expense_approval_table.py | symphony-thibault/symphony-api-client-python | 628cbf3aa857d3bc66a98a3ec009ce1c82295d05 | [
"MIT"
] | null | null | null | sym_api_client_python/templates/expense_approval_form/freemarker_templates/generate_expense_approval_table.py | symphony-thibault/symphony-api-client-python | 628cbf3aa857d3bc66a98a3ec009ce1c82295d05 | [
"MIT"
] | null | null | null | sym_api_client_python/templates/expense_approval_form/freemarker_templates/generate_expense_approval_table.py | symphony-thibault/symphony-api-client-python | 628cbf3aa857d3bc66a98a3ec009ce1c82295d05 | [
"MIT"
] | null | null | null | import json
from .format_json import convert_to_dict
from .expense_approval_class import ExpenseApprovalForm
reeds_expense_form = ExpenseApprovalForm('food report', 'summary of lunch expenses', 'Reed Feldman')
reeds_expense_form.upload_expenses([('conde', 'august 22', 12.00), ('fooda', 'august 21', 10.00), ('bento', '... | 57.464 | 143 | 0.309063 |
a7dcc63ce9d7978dea2bd6f7c353427c9f8278a8 | 21,681 | py | Python | tests/unit/modules/test_zfs.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/test_zfs.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/test_zfs.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
:codeauthor: Nitin Madhok <nmadhok@clemson.edu>`
tests.unit.modules.zfs_test
~~~~~~~~~~~~~~~~~~~~~~~~~~~
'''
# Import Python libs
from __future__ import absolute_import, unicode_literals, print_function
# Import Salt Testing libs
from tests.support.mixins import LoaderModuleMo... | 44.337423 | 309 | 0.599696 |
feb02663b37774724d6bc2b05800a55eedb65572 | 68,010 | py | Python | atom/nucleus/python/nucleus_api/api/decision_tree_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/api/decision_tree_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/api/decision_tree_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.5
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and pyt... | 41.393792 | 152 | 0.616733 |
0a008089973dbb04baf3c0072b8f0cf67f8cf750 | 3,481 | py | Python | kubernetes/client/models/v1_scale_spec.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_scale_spec.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_scale_spec.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.20.7
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
fr... | 28.300813 | 124 | 0.581442 |
efed4266816b4c8b4f5401d94a7eb081d2589c31 | 1,152 | py | Python | src/Project Euler #19: Counting Sundays.py | BhanukaUOM/Project-Euler-Solutions | acb0e0d193c03973b170bd7099d3a6f523a1ab49 | [
"MIT"
] | 3 | 2018-04-08T05:01:35.000Z | 2019-11-12T05:28:53.000Z | src/Project Euler #19: Counting Sundays.py | BhanukaUOM/Project-Euler-Solutions | acb0e0d193c03973b170bd7099d3a6f523a1ab49 | [
"MIT"
] | null | null | null | src/Project Euler #19: Counting Sundays.py | BhanukaUOM/Project-Euler-Solutions | acb0e0d193c03973b170bd7099d3a6f523a1ab49 | [
"MIT"
] | null | null | null | def leap(year):
if year%400 == 0:
return True;
elif year%100 == 0:
return False
elif year%4 == 0:
return True
else:
return False
ms = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
def days(y, m):
if m == 2 and leap(y):
return 29;
else:
retur... | 19.525424 | 56 | 0.432292 |
fb531fff138d950c7f050ac1737db31c2b2fbf81 | 45,953 | py | Python | lte/gateway/c/oai/tasks/s1ap/messages/asn1/asn1tostruct.py | remo5000/magma | 1d1dd9a23800a8e07b1ce016776d93e12430ec15 | [
"BSD-3-Clause"
] | 3 | 2019-08-16T17:03:09.000Z | 2019-08-23T21:57:48.000Z | lte/gateway/c/oai/tasks/s1ap/messages/asn1/asn1tostruct.py | remo5000/magma | 1d1dd9a23800a8e07b1ce016776d93e12430ec15 | [
"BSD-3-Clause"
] | 14 | 2019-11-15T12:01:18.000Z | 2019-12-12T14:37:42.000Z | lte/gateway/c/oai/tasks/s1ap/messages/asn1/asn1tostruct.py | remo5000/magma | 1d1dd9a23800a8e07b1ce016776d93e12430ec15 | [
"BSD-3-Clause"
] | 3 | 2019-11-15T15:56:25.000Z | 2019-11-21T10:34:59.000Z | #
# Copyright (c) 2015, EURECOM (www.eurecom.fr)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of con... | 51.632584 | 278 | 0.55263 |
213ac11813ff46961955ba5c5759cfe43dc2c8ff | 511 | py | Python | prefix.py | Kavi16-02/PythonK | d365d7a24966e782e910347374dfd61d003da30f | [
"MIT"
] | null | null | null | prefix.py | Kavi16-02/PythonK | d365d7a24966e782e910347374dfd61d003da30f | [
"MIT"
] | null | null | null | prefix.py | Kavi16-02/PythonK | d365d7a24966e782e910347374dfd61d003da30f | [
"MIT"
] | null | null | null | '''You are given a binary array nums (0-indexed).
We define xi as the number whose binary representation is the subarray nums[0..i] (from most-significant-bit to least-significant-bit).
For example, if nums = [1,0,1], then x0 = 1, x1 = 2, and x2 = 5.
Return an array of booleans answer where answer[i] is true if xi is... | 25.55 | 135 | 0.643836 |
5ebfde10759d3859ede8d38d6e503014570f0756 | 4,050 | py | Python | google/ads/google_ads/v5/proto/resources/topic_view_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | 1 | 2021-04-09T04:28:47.000Z | 2021-04-09T04:28:47.000Z | google/ads/google_ads/v5/proto/resources/topic_view_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v5/proto/resources/topic_view_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads_v5/proto/resources/topic_view.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.p... | 46.551724 | 756 | 0.789877 |
07f93ffa832b306bdf2c9aa180d245b790a41793 | 536 | py | Python | manage.py | tlubenov/zesi | 894e346c9b5e62a98ae70fd50c7fa787e927ecff | [
"MIT"
] | null | null | null | manage.py | tlubenov/zesi | 894e346c9b5e62a98ae70fd50c7fa787e927ecff | [
"MIT"
] | null | null | null | manage.py | tlubenov/zesi | 894e346c9b5e62a98ae70fd50c7fa787e927ecff | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'zesi.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you... | 33.5 | 73 | 0.684701 |
ccc8862d06b861c32e6ff87401c2ccc7822fd52e | 8,879 | py | Python | src/BrowserMobProxyLibrary/__init__.py | s4int/BrowserMobProxyLibrary | 203fb10935ba134268a53367c7d3abb3bf6a87ce | [
"Apache-2.0"
] | 14 | 2016-09-28T17:14:18.000Z | 2020-06-12T22:44:28.000Z | src/BrowserMobProxyLibrary/__init__.py | s4int/BrowserMobProxyLibrary | 203fb10935ba134268a53367c7d3abb3bf6a87ce | [
"Apache-2.0"
] | 5 | 2016-09-28T17:15:53.000Z | 2021-03-01T02:32:03.000Z | src/BrowserMobProxyLibrary/__init__.py | s4int/BrowserMobProxyLibrary | 203fb10935ba134268a53367c7d3abb3bf6a87ce | [
"Apache-2.0"
] | 12 | 2016-05-04T11:30:09.000Z | 2021-02-26T03:48:33.000Z | from browsermobproxy import Server
from browsermobproxy import RemoteServer
import json
from .version import VERSION
__version__ = VERSION
LIMITS = {
'upstream_kbps': 'upstreamKbps',
'downstream_kbps': 'downstreamKbps',
'latency': 'latency'
}
TIMEOUTS = {
'request': 'requestTimeout',
'read': 'rea... | 32.405109 | 103 | 0.65165 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.