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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cf2b43e4119b5faf0b35e627d5747fd5a050d4dc | 4,031 | py | Python | gallery/ui/app.py | proper-gramar/py-recov | 41efe646cd0671f82b25b4adc587797034e38f68 | [
"MIT"
] | null | null | null | gallery/ui/app.py | proper-gramar/py-recov | 41efe646cd0671f82b25b4adc587797034e38f68 | [
"MIT"
] | null | null | null | gallery/ui/app.py | proper-gramar/py-recov | 41efe646cd0671f82b25b4adc587797034e38f68 | [
"MIT"
] | null | null | null | from flask import Flask
from flask import request
from flask import render_template
import json
import psycopg2
import db as f
import re
app = Flask(__name__)
#################################
###db.py contents running here###
#################################
### establishes connection to postgreSQL database
db_hos... | 22.027322 | 102 | 0.624163 |
1c5766e976e463ba4e0391cbd655fc032f6cda05 | 12,810 | py | Python | unit_tests.py | DillonEnge/keylib-py | 50e9b656e27f6dda92f7aa7daa8e52e53ea93b82 | [
"MIT"
] | 10 | 2016-03-20T10:41:27.000Z | 2020-11-12T11:10:15.000Z | unit_tests.py | DillonEnge/keylib-py | 50e9b656e27f6dda92f7aa7daa8e52e53ea93b82 | [
"MIT"
] | 4 | 2016-12-21T00:53:22.000Z | 2020-03-08T06:22:24.000Z | unit_tests.py | blockstack/keylib-py | 7bbd1697a144eb50293f5d50797c4a747c2c906a | [
"MIT"
] | 16 | 2016-06-01T19:42:35.000Z | 2021-11-24T07:35:25.000Z | import json
import unittest
import traceback
from test import test_support
from keylib import (
b58check_encode, b58check_decode, b58check_unpack,
ECPrivateKey, ECPublicKey, public_key_to_address
)
_uncompressed_info = {
'bin_private_key': '\xc4\xbb\xcb\x1f\xbe\xc9\x9de\xbfY\xd8\\\x8c\xb6.\xe2\xdb\x96?\x0... | 44.947368 | 262 | 0.760812 |
f63d4f3f2e759e3d8b244e7a7b507c41f1423d24 | 170 | py | Python | pycdek/__init__.py | onrik/pycdek | 3d7b7ceaf0013376051c79e561f6742034f97f86 | [
"MIT"
] | 4 | 2016-03-04T20:04:24.000Z | 2020-12-17T06:49:45.000Z | pycdek/__init__.py | onrik/pycdek | 3d7b7ceaf0013376051c79e561f6742034f97f86 | [
"MIT"
] | 2 | 2015-08-07T08:41:42.000Z | 2018-11-23T06:56:41.000Z | pycdek/__init__.py | onrik/pycdek | 3d7b7ceaf0013376051c79e561f6742034f97f86 | [
"MIT"
] | 11 | 2015-06-16T10:24:19.000Z | 2021-12-16T07:16:05.000Z | from client import AbstractOrder, AbstractOrderLine, Client
VERSION = (0, 3, 1)
def get_version():
return '.'.join(map(str, VERSION))
__version__ = get_version()
| 17 | 59 | 0.711765 |
635921e10936a4d244c33d49cf44e94d6b3931f1 | 1,685 | py | Python | pyNastran/op2/tables/opg_appliedLoads/opnl_force_vector.py | ACea15/pyNastran | 5ffc37d784b52c882ea207f832bceb6b5eb0e6d4 | [
"BSD-3-Clause"
] | 293 | 2015-03-22T20:22:01.000Z | 2022-03-14T20:28:24.000Z | pyNastran/op2/tables/opg_appliedLoads/opnl_force_vector.py | ACea15/pyNastran | 5ffc37d784b52c882ea207f832bceb6b5eb0e6d4 | [
"BSD-3-Clause"
] | 512 | 2015-03-14T18:39:27.000Z | 2022-03-31T16:15:43.000Z | pyNastran/op2/tables/opg_appliedLoads/opnl_force_vector.py | ACea15/pyNastran | 5ffc37d784b52c882ea207f832bceb6b5eb0e6d4 | [
"BSD-3-Clause"
] | 136 | 2015-03-19T03:26:06.000Z | 2022-03-25T22:14:54.000Z | import numpy as np
from pyNastran.op2.result_objects.table_object import RealTableArray, ComplexTableArray
class RealForceVectorArray(RealTableArray): # table_code=2, sort_code=0, thermal=0
def __init__(self, data_code, is_sort1, isubcase, dt):
RealTableArray.__init__(self, data_code, is_sort1, isubcase... | 52.65625 | 138 | 0.634421 |
7de010a08ed33208bd4916808db7eed500542048 | 10,749 | py | Python | src/collective/solr/tests/test_facets.py | IMIO/collective.solr | 844219eb3968b34d2b83a7bd5f59340d676d149e | [
"ZPL-1.1"
] | 15 | 2015-04-13T14:54:47.000Z | 2022-01-17T09:18:00.000Z | src/collective/solr/tests/test_facets.py | IMIO/collective.solr | 844219eb3968b34d2b83a7bd5f59340d676d149e | [
"ZPL-1.1"
] | 198 | 2015-01-30T15:29:32.000Z | 2022-03-22T10:39:31.000Z | src/collective/solr/tests/test_facets.py | adrianschulz/collective.solr | 2d76fe01a02174d383fdc335d38ee52afa8bfa27 | [
"ZPL-1.1"
] | 34 | 2015-02-24T09:23:31.000Z | 2022-03-01T02:31:39.000Z | # -*- coding: utf-8 -*-
from collective.solr.browser.facets import SearchBox
from collective.solr.browser.facets import SearchFacetsView
from collective.solr.browser.interfaces import IThemeSpecific
from collective.solr.dispatcher import solrSearchResults
from collective.solr.exceptions import SolrConnectionException
f... | 43.518219 | 88 | 0.636896 |
d16aa63837522e9ba3ee089fd02b3c0bd491ace7 | 3,301 | py | Python | selfdrive/controls/lib/latcontrol_lqr.py | togo01/ArnePilot | e5616b8932b687c06aca8a167e94e7287628220b | [
"MIT"
] | 1 | 2020-12-03T13:52:27.000Z | 2020-12-03T13:52:27.000Z | selfdrive/controls/lib/latcontrol_lqr.py | togo01/ArnePilot | e5616b8932b687c06aca8a167e94e7287628220b | [
"MIT"
] | null | null | null | selfdrive/controls/lib/latcontrol_lqr.py | togo01/ArnePilot | e5616b8932b687c06aca8a167e94e7287628220b | [
"MIT"
] | null | null | null | import numpy as np
from selfdrive.controls.lib.drive_helpers import get_steer_max
from common.numpy_fast import clip
from common.realtime import DT_CTRL
from cereal import log
class LatControlLQR():
def __init__(self, CP):
self.scale = CP.lateralTuning.lqr.scale
self.ki = CP.lateralTuning.lqr.ki
self.A... | 34.030928 | 124 | 0.68555 |
83573936ecaffb3241ecb91653f97f899ea4aea5 | 6,256 | py | Python | .ycm_extra_conf.py | CantTouchDis/GenericFactory | ea8e025b839be1d3dcc3cd671ea606f4fb21a9d3 | [
"MIT"
] | 2 | 2016-07-03T22:26:50.000Z | 2018-06-01T16:17:57.000Z | .ycm_extra_conf.py | CantTouchDis/GenericFactory | ea8e025b839be1d3dcc3cd671ea606f4fb21a9d3 | [
"MIT"
] | null | null | null | .ycm_extra_conf.py | CantTouchDis/GenericFactory | ea8e025b839be1d3dcc3cd671ea606f4fb21a9d3 | [
"MIT"
] | null | null | null | # This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either... | 34.755556 | 103 | 0.720588 |
1a9e740b581d1c4a4b17f3920ac7f9bed6bac4ad | 466 | py | Python | html_gen.py | notmyhash/virustotal-api-hashcheck | cbf236a1a071a03b0b6092af1badf93980a0f990 | [
"MIT"
] | 9 | 2019-08-21T07:31:55.000Z | 2022-03-30T04:04:24.000Z | html_gen.py | notmyhash/virustotal-api-hashcheck | cbf236a1a071a03b0b6092af1badf93980a0f990 | [
"MIT"
] | 2 | 2021-10-05T18:18:18.000Z | 2021-12-18T20:56:19.000Z | html_gen.py | notmyhash/virustotal-api-hashcheck | cbf236a1a071a03b0b6092af1badf93980a0f990 | [
"MIT"
] | 6 | 2019-12-19T04:10:52.000Z | 2021-11-03T21:08:33.000Z | #!/usr/bin/env python
def str_to_file(text, filename):
# Write a file with the given name and the given text
output = open(filename, "w")
output.write(text)
output.close()
def browse_local(webpage, filename):
# Start your webbrowser on a local file containing the text
# with given filename
... | 25.888889 | 70 | 0.688841 |
5fc4f8d58a22254cfb184ad32cafd099c760ef03 | 2,576 | py | Python | app/core/models.py | balazsjuhasz/recipe-app-api | d1a5774348531f500894f808b74683134becbf9d | [
"MIT"
] | null | null | null | app/core/models.py | balazsjuhasz/recipe-app-api | d1a5774348531f500894f808b74683134becbf9d | [
"MIT"
] | null | null | null | app/core/models.py | balazsjuhasz/recipe-app-api | d1a5774348531f500894f808b74683134becbf9d | [
"MIT"
] | null | null | null | import uuid
import os
from django.db import models
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \
PermissionsMixin
from django.conf import settings
def recipe_image_file_path(instance, filename):
"""Generate file path for new recipe image"""
ext = filename.split('.')[-1]
f... | 28.307692 | 76 | 0.682453 |
bcf316f9ca83440854d986b21a72745912b71d9f | 656 | py | Python | materials/migrations/0072_auto_20190422_1708.py | mgovoni-devel/MatD3 | 5b68d147f886bce427f92bb560159e62cec2d4e7 | [
"BSD-2-Clause-FreeBSD"
] | 7 | 2019-09-14T07:24:09.000Z | 2021-06-15T16:15:05.000Z | materials/migrations/0072_auto_20190422_1708.py | mgovoni-devel/MatD3 | 5b68d147f886bce427f92bb560159e62cec2d4e7 | [
"BSD-2-Clause-FreeBSD"
] | 14 | 2019-12-05T01:49:19.000Z | 2021-06-23T18:34:51.000Z | materials/migrations/0072_auto_20190422_1708.py | mgovoni-devel/MatD3 | 5b68d147f886bce427f92bb560159e62cec2d4e7 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2019-11-06T21:16:57.000Z | 2019-11-30T10:51:44.000Z | # Generated by Django 2.1.7 on 2019-04-22 21:08
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('materials', '0071_auto_20190416_1557'),
]
operations = [
migrations.RemoveField(
model_name='atomicpositions',
name='idinfo_... | 22.62069 | 49 | 0.565549 |
69389a43825a0850f596b719fcfcceda42074d2f | 1,786 | py | Python | phonopy/__init__.py | flokno/phonopy | 02e31d5998de0a9b664b67968bb511e21c400574 | [
"BSD-3-Clause"
] | 1 | 2021-07-10T20:15:31.000Z | 2021-07-10T20:15:31.000Z | phonopy/__init__.py | flokno/phonopy | 02e31d5998de0a9b664b67968bb511e21c400574 | [
"BSD-3-Clause"
] | 4 | 2018-09-18T08:12:43.000Z | 2020-10-20T23:37:28.000Z | phonopy/__init__.py | flokno/phonopy | 02e31d5998de0a9b664b67968bb511e21c400574 | [
"BSD-3-Clause"
] | 1 | 2018-09-13T09:32:01.000Z | 2018-09-13T09:32:01.000Z | # Copyright (C) 2015 Atsushi Togo
# All rights reserved.
#
# This file is part of phonopy.
#
# 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
# notic... | 44.65 | 70 | 0.788914 |
eee6069119d05e157c81c15d7ac25ccdba6d8109 | 1,880 | py | Python | nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairach.py | moloney/nipype | a7a9c85c79cb1412ba03406074f83200447ef50b | [
"Apache-2.0"
] | 7 | 2017-02-17T08:54:26.000Z | 2022-03-10T20:57:23.000Z | nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairach.py | moloney/nipype | a7a9c85c79cb1412ba03406074f83200447ef50b | [
"Apache-2.0"
] | 1 | 2016-04-25T15:07:09.000Z | 2016-04-25T15:07:09.000Z | nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairach.py | moloney/nipype | a7a9c85c79cb1412ba03406074f83200447ef50b | [
"Apache-2.0"
] | 2 | 2017-09-23T16:22:00.000Z | 2019-08-01T14:18:52.000Z | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..segmentation import BRAINSTalairach
def test_BRAINSTalairach_inputs():
input_map = dict(
AC=dict(
argstr='--AC %s',
sep=',',
),
ACisIndex=dict(argstr='--ACisIndex ',... | 28.059701 | 67 | 0.518617 |
1ae9eccd4aaef9b7bb722b34572c6ded9c7a8d49 | 563 | py | Python | server/api/articles/migrations/0005_article_tags.py | JimmyMVP/newsalyser | 4f94396f686aa7a1350868a0876888e9f259595c | [
"Apache-2.0"
] | null | null | null | server/api/articles/migrations/0005_article_tags.py | JimmyMVP/newsalyser | 4f94396f686aa7a1350868a0876888e9f259595c | [
"Apache-2.0"
] | null | null | null | server/api/articles/migrations/0005_article_tags.py | JimmyMVP/newsalyser | 4f94396f686aa7a1350868a0876888e9f259595c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-09-17 17:32
from __future__ import unicode_literals
import django.contrib.postgres.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('articles', '0004_article_top_taxonomy'),
]
oper... | 25.590909 | 126 | 0.662522 |
51f352286666950723be132f0f63628c413a0754 | 580 | py | Python | py/codeforces/883F.py | shhuan/algorithms | 2830c7e2ada8dfd3dcdda7c06846116d4f944a27 | [
"MIT"
] | null | null | null | py/codeforces/883F.py | shhuan/algorithms | 2830c7e2ada8dfd3dcdda7c06846116d4f944a27 | [
"MIT"
] | null | null | null | py/codeforces/883F.py | shhuan/algorithms | 2830c7e2ada8dfd3dcdda7c06846116d4f944a27 | [
"MIT"
] | 1 | 2022-03-09T04:52:55.000Z | 2022-03-09T04:52:55.000Z | # -*- coding: utf-8 -*-
import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
"""
created by shhuan at 2017/10/22 12:26
"""
N = int(input())
A = []
for i in range(N):
A.append(input())
def transform(s):
t = []
for c in s:
if c == 'u':
... | 13.809524 | 37 | 0.5 |
dc2973cacd171db83535707ac915f977d3611d88 | 10,318 | py | Python | tests/test_cursor.py | elastic-coders/aiopg | 1e1a06eb63d093b14125d51e3444c135aaf15679 | [
"BSD-2-Clause"
] | null | null | null | tests/test_cursor.py | elastic-coders/aiopg | 1e1a06eb63d093b14125d51e3444c135aaf15679 | [
"BSD-2-Clause"
] | null | null | null | tests/test_cursor.py | elastic-coders/aiopg | 1e1a06eb63d093b14125d51e3444c135aaf15679 | [
"BSD-2-Clause"
] | 1 | 2021-02-09T10:08:33.000Z | 2021-02-09T10:08:33.000Z | import asyncio
import psycopg2
import psycopg2.tz
import pytest
import time
from aiopg.connection import TIMEOUT
@pytest.fixture
def connect(make_connection):
@asyncio.coroutine
def go(**kwargs):
conn = yield from make_connection(**kwargs)
cur = yield from conn.cursor()
yield from cu... | 26.592784 | 78 | 0.646249 |
3f092f2e5d97299e83898b16e0511660f4153b32 | 6,235 | py | Python | python/build.py | imdouyu/taichi | 17a0a119bad15e5caeaf242548a72476f643fd7e | [
"MIT"
] | null | null | null | python/build.py | imdouyu/taichi | 17a0a119bad15e5caeaf242548a72476f643fd7e | [
"MIT"
] | null | null | null | python/build.py | imdouyu/taichi | 17a0a119bad15e5caeaf242548a72476f643fd7e | [
"MIT"
] | null | null | null | import argparse
import os
import platform
import re
import shutil
import sys
import requests
def get_os_name():
name = platform.platform()
# in python 3.8, platform.platform() uses mac_ver() on macOS
# it will return 'macOS-XXXX' instead of 'Darwin-XXXX'
if name.lower().startswith('darwin') or name.l... | 33.521505 | 103 | 0.572414 |
5dfc74836e1b589b114f2658c74799810ea19ed0 | 621 | py | Python | no_concurrency.py | ledatascientist/multi-threading-python | 140b0b5cf154d2c7d241d10fe13f5866772ab07a | [
"Apache-2.0"
] | null | null | null | no_concurrency.py | ledatascientist/multi-threading-python | 140b0b5cf154d2c7d241d10fe13f5866772ab07a | [
"Apache-2.0"
] | null | null | null | no_concurrency.py | ledatascientist/multi-threading-python | 140b0b5cf154d2c7d241d10fe13f5866772ab07a | [
"Apache-2.0"
] | null | null | null | import threading
import time
import requests as r
BASE_URL='https://archive.ics.uci.edu/ml/datasets'
URLS = [ f'{BASE_URL}/Energy+efficiency',f'{BASE_URL}/Planning+Relax',f'{BASE_URL}/Cloud',
f'{BASE_URL}/Protein+Data',f'{BASE_URL}/Spambase'] *3
def get_dataset (urls:list):
for url in urls :
response = ... | 28.227273 | 90 | 0.677939 |
cb0217aa7856d5d7310381f74d5b123cc6f1755a | 26,107 | py | Python | tensorflow_model_analysis/writers/metrics_and_plots_serialization_test.py | HubBucket-Team/model-analysis | 6cc334e525d474d8380412f5fa770cb2e32098b2 | [
"Apache-2.0"
] | 1 | 2019-10-10T06:20:25.000Z | 2019-10-10T06:20:25.000Z | tensorflow_model_analysis/writers/metrics_and_plots_serialization_test.py | VonRosenchild/model-analysis | 6cc334e525d474d8380412f5fa770cb2e32098b2 | [
"Apache-2.0"
] | null | null | null | tensorflow_model_analysis/writers/metrics_and_plots_serialization_test.py | VonRosenchild/model-analysis | 6cc334e525d474d8380412f5fa770cb2e32098b2 | [
"Apache-2.0"
] | 1 | 2019-10-10T06:20:25.000Z | 2019-10-10T06:20:25.000Z | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 31.079762 | 79 | 0.508982 |
ff5bff2f83cf1fc1b7ed69a6c6d8d0c7af38555c | 2,663 | py | Python | docs/conf.py | J-Wall/camfi | feec4d5df5cdc0c4e1144ce8f85bbf6190c68be1 | [
"MIT"
] | null | null | null | docs/conf.py | J-Wall/camfi | feec4d5df5cdc0c4e1144ce8f85bbf6190c68be1 | [
"MIT"
] | 3 | 2021-07-01T05:41:57.000Z | 2021-11-03T01:58:15.000Z | docs/conf.py | J-Wall/camfi | feec4d5df5cdc0c4e1144ce8f85bbf6190c68be1 | [
"MIT"
] | 1 | 2021-09-22T13:54:54.000Z | 2021-09-22T13:54:54.000Z | # 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... | 30.609195 | 79 | 0.664664 |
110cb0afa763b66089f8b7e9ccaf960f4f81835e | 93 | py | Python | toucan/alert_api/apps.py | toucan-project/TOUCAN | d562e1191b5ef10480be819ba8c584034c25259b | [
"MIT"
] | 4 | 2019-08-28T14:36:23.000Z | 2019-08-30T09:49:12.000Z | toucan/alert_api/apps.py | toucan-project/TOUCAN | d562e1191b5ef10480be819ba8c584034c25259b | [
"MIT"
] | 2 | 2021-04-20T17:09:30.000Z | 2021-09-23T23:26:22.000Z | toucan/alert_api/apps.py | toucan-project/TOUCAN | d562e1191b5ef10480be819ba8c584034c25259b | [
"MIT"
] | 1 | 2020-01-22T20:01:58.000Z | 2020-01-22T20:01:58.000Z | from django.apps import AppConfig
class SysmonapiConfig(AppConfig):
name = 'sysmonAPI'
| 15.5 | 33 | 0.763441 |
7a1b78383ad4673e889e2bc809f7bd6e60082dbe | 73 | py | Python | bbio/libraries/BMP183/__init__.py | timgates42/PyBBIO | 0d46115059ed7ec0c17afb6dd7ed2f507b4f2b8a | [
"MIT"
] | 102 | 2015-01-29T04:28:49.000Z | 2022-01-03T18:27:50.000Z | bbio/libraries/BMP183/__init__.py | timgates42/PyBBIO | 0d46115059ed7ec0c17afb6dd7ed2f507b4f2b8a | [
"MIT"
] | 62 | 2015-01-29T11:05:13.000Z | 2019-12-03T04:30:34.000Z | bbio/libraries/BMP183/__init__.py | timgates42/PyBBIO | 0d46115059ed7ec0c17afb6dd7ed2f507b4f2b8a | [
"MIT"
] | 58 | 2015-02-10T14:31:18.000Z | 2022-03-29T13:24:03.000Z | # __init__.py file for PyBBIO's BMP183 library
from BMP183 import BMP183 | 36.5 | 47 | 0.808219 |
6b519936c965c1f41dece20e0a79603db1dbfa5b | 18,243 | py | Python | maml_nonexclusive/maml_classification/main.py | kiss2u/google-research | 2cd66234656f9e2f4218ed90a2d8aa9cf3139093 | [
"Apache-2.0"
] | 7 | 2020-03-15T12:14:07.000Z | 2021-12-01T07:01:09.000Z | maml_nonexclusive/maml_classification/main.py | JustinDurham/google-research | 9049acf9246c1b75170f0c6757e62a8f619a9db6 | [
"Apache-2.0"
] | 22 | 2020-07-08T13:10:46.000Z | 2022-03-12T00:40:10.000Z | maml_nonexclusive/maml_classification/main.py | JustinDurham/google-research | 9049acf9246c1b75170f0c6757e62a8f619a9db6 | [
"Apache-2.0"
] | 4 | 2020-06-15T03:06:53.000Z | 2021-08-06T16:38:33.000Z | # coding=utf-8
# Copyright 2020 The Google Research 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 applicab... | 49.708447 | 234 | 0.671052 |
26582e632838ce5da2363592d574137dee65ecac | 88,623 | py | Python | sympy/testing/runtests.py | Chanakya-Ekbote/sympy | 69a8a4b05ceaec11ee63729b98fc9d1ec7e3583c | [
"BSD-3-Clause"
] | null | null | null | sympy/testing/runtests.py | Chanakya-Ekbote/sympy | 69a8a4b05ceaec11ee63729b98fc9d1ec7e3583c | [
"BSD-3-Clause"
] | null | null | null | sympy/testing/runtests.py | Chanakya-Ekbote/sympy | 69a8a4b05ceaec11ee63729b98fc9d1ec7e3583c | [
"BSD-3-Clause"
] | null | null | null | """
This is our testing framework.
Goals:
* it should be compatible with py.test and operate very similarly
(or identically)
* doesn't require any external dependencies
* preferably all the functionality should be in this file only
* no magic, just import the test file and execute the test functions, that's it
* po... | 37.393671 | 338 | 0.57933 |
47b26ba574def3ba92a9191f77a17c61c241ef00 | 3,721 | py | Python | content/test/gpu/gpu_tests/webgl_conformance_test.py | devasia1000/chromium | 919a8a666862fb866a6bb7aa7f3ae8c0442b4828 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-02-03T05:19:48.000Z | 2021-11-15T15:07:21.000Z | content/test/gpu/gpu_tests/webgl_conformance_test.py | devasia1000/chromium | 919a8a666862fb866a6bb7aa7f3ae8c0442b4828 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | content/test/gpu/gpu_tests/webgl_conformance_test.py | devasia1000/chromium | 919a8a666862fb866a6bb7aa7f3ae8c0442b4828 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import sys
import json
from telemetry.page import page_set
from telemetry.page import page_test
from telemetry.core import util
src_path = os.... | 29.070313 | 79 | 0.658694 |
519de74d15830d667cec06943de62d99ae04b6b0 | 10,293 | py | Python | Lib/idlelib/HyperParser.py | arvindm95/unladen-swallow | 8175e37eaea7ca66ed03283b46bc1d2db0d3f9c3 | [
"PSF-2.0"
] | 2,293 | 2015-01-02T12:46:10.000Z | 2022-03-29T09:45:43.000Z | python/src/Lib/idlelib/HyperParser.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 315 | 2015-05-31T11:55:46.000Z | 2022-01-12T08:36:37.000Z | python/src/Lib/idlelib/HyperParser.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 1,033 | 2015-01-04T07:48:40.000Z | 2022-03-24T09:34:37.000Z | """
HyperParser
===========
This module defines the HyperParser class, which provides advanced parsing
abilities for the ParenMatch and other extensions.
The HyperParser uses PyParser. PyParser is intended mostly to give information
on the proper indentation of code. HyperParser gives some information on the
structure ... | 42.533058 | 80 | 0.568639 |
95eb6cdfa4f306d190c6da4b4e9d44b9fcbcd40b | 21,621 | py | Python | qa/rpc-tests/test_framework/util.py | coinmenace/adz | 9eac9b5f06b75da08d2f02461880b6f1ca07b5f6 | [
"MIT"
] | 1 | 2018-10-21T16:14:42.000Z | 2018-10-21T16:14:42.000Z | qa/rpc-tests/test_framework/util.py | coinmenace/adz | 9eac9b5f06b75da08d2f02461880b6f1ca07b5f6 | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/util.py | coinmenace/adz | 9eac9b5f06b75da08d2f02461880b6f1ca07b5f6 | [
"MIT"
] | null | null | null | # Copyright (c) 2014-2015 The Bitcoin Core developers
# Copyright (c) 2014-2018 The Proton Core developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Helpful routines for regression testing
#
# Add python-bitcoinrpc... | 35.328431 | 153 | 0.652236 |
92fe2513ea223401c1bda4e691a3770214cd68bf | 9,229 | py | Python | lib/python2.7/site-packages/pyowm/webapi25/cityidregistry.py | briansok/derpi | 0e111a84b17ce8caeb60d2899957a0a24cab47b3 | [
"MIT"
] | 2 | 2017-03-23T13:40:11.000Z | 2018-09-17T18:14:59.000Z | env/lib/python3.5/site-packages/pyowm/webapi25/cityidregistry.py | mpvoss/RickAndMortyWeatherTweets | 0ce804dccd0cdee9dfaba015e596f69e08513cdb | [
"MIT"
] | null | null | null | env/lib/python3.5/site-packages/pyowm/webapi25/cityidregistry.py | mpvoss/RickAndMortyWeatherTweets | 0ce804dccd0cdee9dfaba015e596f69e08513cdb | [
"MIT"
] | 1 | 2019-03-07T04:30:36.000Z | 2019-03-07T04:30:36.000Z | from pyowm.webapi25.location import Location
from pyowm.abstractions.decorators import deprecated
from pkg_resources import resource_stream
"""
Module containing a registry with lookup methods for OWM-provided city IDs
"""
class CityIDRegistry:
MATCHINGS = {
'exact': lambda city_name, toponym: city_name... | 41.200893 | 84 | 0.615235 |
345f833c989826a7afd3e9b6125e78bf21967a9e | 14,520 | py | Python | google/cloud/firestore_v1/client.py | anna-hope/python-firestore | aa7594c93b2d7480ac4283a1d1abafe76aa7a353 | [
"Apache-2.0"
] | 140 | 2020-02-16T19:35:47.000Z | 2022-03-27T23:58:03.000Z | google/cloud/firestore_v1/client.py | anna-hope/python-firestore | aa7594c93b2d7480ac4283a1d1abafe76aa7a353 | [
"Apache-2.0"
] | 311 | 2020-01-31T23:45:43.000Z | 2022-03-22T14:41:34.000Z | google/cloud/firestore_v1/client.py | anna-hope/python-firestore | aa7594c93b2d7480ac4283a1d1abafe76aa7a353 | [
"Apache-2.0"
] | 52 | 2020-01-31T21:40:11.000Z | 2022-02-25T18:32:51.000Z | # Copyright 2017 Google LLC All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 36.666667 | 96 | 0.638774 |
7c497973546da5c2742b6a8725e8234b1203536c | 12,978 | py | Python | skcosmo/sample_selection/_base.py | cosmo-epfl/sklearn-cosmo | 1bf9bcfbc38e7881e06496cf780085b3575aaec4 | [
"BSD-3-Clause"
] | 3 | 2020-10-12T20:51:21.000Z | 2020-10-12T21:28:05.000Z | skcosmo/sample_selection/_base.py | cosmo-epfl/sklearn-cosmo | 1bf9bcfbc38e7881e06496cf780085b3575aaec4 | [
"BSD-3-Clause"
] | 20 | 2020-10-21T05:46:03.000Z | 2020-11-26T20:52:52.000Z | skcosmo/sample_selection/_base.py | cosmo-epfl/sklearn-cosmo | 1bf9bcfbc38e7881e06496cf780085b3575aaec4 | [
"BSD-3-Clause"
] | 4 | 2020-10-15T15:01:00.000Z | 2020-11-06T16:21:53.000Z | """
Sequential sample selection
"""
from .._selection import (
_CUR,
_FPS,
_PCovCUR,
_PCovFPS,
)
class FPS(_FPS):
"""
Transformer that performs Greedy Sample Selection using Farthest Point Sampling.
Parameters
----------
initialize: int, list of int, or 'random', default=0
... | 37.186246 | 102 | 0.647943 |
03a34b8c88b59bd8cedebc2037f71d12daa3ee4c | 6,124 | py | Python | preprocess/webnlg_tree.py | EagleW/Stage-wise-Fine-tuning | 0286726e28f517793216a6c113b4a6a8d21fd906 | [
"MIT"
] | 16 | 2021-05-16T13:41:21.000Z | 2022-01-27T09:23:48.000Z | preprocess/webnlg_tree.py | xc15071347094/Stage-wise-Fine-tuning | 6054152aa0f64cab9c6eea47bd3570e6d79eaf26 | [
"MIT"
] | 4 | 2021-09-27T08:30:18.000Z | 2021-11-07T19:47:58.000Z | preprocess/webnlg_tree.py | xc15071347094/Stage-wise-Fine-tuning | 6054152aa0f64cab9c6eea47bd3570e6d79eaf26 | [
"MIT"
] | 4 | 2021-08-18T02:28:32.000Z | 2021-11-14T15:14:36.000Z | from benchmark_reader import Benchmark, select_files
import os, json, re, unidecode
from collections import Counter
from tqdm import tqdm
from operator import itemgetter
import networkx as nx
from transformers import BartTokenizer
def camel_case_split(identifier):
matches = re.finditer('.+?(?:(?<=[a-z])(?=[A-Z])|... | 27.96347 | 109 | 0.538374 |
b521d547bbe67e7883213a9556e9e2dd1bd414dc | 9,881 | py | Python | cifar/network-slimming/main_B.py | pikerbright/rethinking-network-pruning | bae10a33dab4a1b96a1c9d75894b8ca9778d2989 | [
"MIT"
] | null | null | null | cifar/network-slimming/main_B.py | pikerbright/rethinking-network-pruning | bae10a33dab4a1b96a1c9d75894b8ca9778d2989 | [
"MIT"
] | null | null | null | cifar/network-slimming/main_B.py | pikerbright/rethinking-network-pruning | bae10a33dab4a1b96a1c9d75894b8ca9778d2989 | [
"MIT"
] | null | null | null | from __future__ import print_function
import os
import argparse
import shutil
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms
from torch.autograd import Variable
import models
from compute_flops import print_... | 45.95814 | 115 | 0.62686 |
704dc855132df9c9b305e292da0f54671b66a236 | 1,427 | py | Python | src/main/opencastapi/__init__.py | metzenseifner/py_opencastapi | 3f6787437ff2eccc96f8b1e6bad155725cbaa6f2 | [
"MIT"
] | null | null | null | src/main/opencastapi/__init__.py | metzenseifner/py_opencastapi | 3f6787437ff2eccc96f8b1e6bad155725cbaa6f2 | [
"MIT"
] | null | null | null | src/main/opencastapi/__init__.py | metzenseifner/py_opencastapi | 3f6787437ff2eccc96f8b1e6bad155725cbaa6f2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright 2021 Jonathan Lee Komar
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, mo... | 46.032258 | 81 | 0.686055 |
5cb1f8fcbd2267fcf139486abe2f2ed469bb352f | 4,081 | py | Python | homeassistant/components/device_tracker/tado.py | sbidoul/home-assistant | 75adb7ff46e64e510c206d2b1f141253bbc4997a | [
"MIT"
] | 1 | 2017-01-25T15:31:20.000Z | 2017-01-25T15:31:20.000Z | homeassistant/components/device_tracker/tado.py | bytebility/home-assistant | 6015274ee2486f797fd6ee8f5f2074a601953e03 | [
"MIT"
] | null | null | null | homeassistant/components/device_tracker/tado.py | bytebility/home-assistant | 6015274ee2486f797fd6ee8f5f2074a601953e03 | [
"MIT"
] | 2 | 2018-10-22T17:05:47.000Z | 2021-09-22T10:52:31.000Z | """
Support for Tado Smart Thermostat.
Device tracker platform that supports presence detection.
The detection is based on geofencing enabled devices used with Tado.
"""
import logging
from datetime import timedelta
from collections import namedtuple
import asyncio
import aiohttp
import async_timeout
import voluptuo... | 31.152672 | 78 | 0.640284 |
7751ba3ff338d1664a18ef0685f01065d57113ce | 10,669 | py | Python | deploy/virenv/lib/python2.7/site-packages/haystack/target.py | wangvictor2012/liuwei | 0a06f8fd56d78162f81f1e7e7def7bfdeb4472e1 | [
"BSD-3-Clause"
] | null | null | null | deploy/virenv/lib/python2.7/site-packages/haystack/target.py | wangvictor2012/liuwei | 0a06f8fd56d78162f81f1e7e7def7bfdeb4472e1 | [
"BSD-3-Clause"
] | null | null | null | deploy/virenv/lib/python2.7/site-packages/haystack/target.py | wangvictor2012/liuwei | 0a06f8fd56d78162f81f1e7e7def7bfdeb4472e1 | [
"BSD-3-Clause"
] | null | null | null | import logging
import platform
import struct
import sys
from haystack import types
from haystack import utils
from haystack.abc import interfaces
log = logging.getLogger("target")
# triplet = getattr(sys, 'implementation', sys)._multiarch
# arch vendor os
# FIXME use it
TARGET_TRIPLETS = [
('i386-linux-gnu', (4... | 36.66323 | 117 | 0.585809 |
d20dd1f95f2fec37cf7d6926c6b7e3a7ddfff6b5 | 1,339 | py | Python | lib/datasets/SearchDatasetWrap.py | shashank3959/NAS-Projects | 2c0577231a52375de5ebd7a588750899a8c7bf1c | [
"MIT"
] | null | null | null | lib/datasets/SearchDatasetWrap.py | shashank3959/NAS-Projects | 2c0577231a52375de5ebd7a588750899a8c7bf1c | [
"MIT"
] | null | null | null | lib/datasets/SearchDatasetWrap.py | shashank3959/NAS-Projects | 2c0577231a52375de5ebd7a588750899a8c7bf1c | [
"MIT"
] | null | null | null | ##################################################
# Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2019 #
##################################################
import torch, copy, random
import torch.utils.data as data
class SearchDataset(data.Dataset):
def __init__(self, name, data, train_split, valid_split, check=True)... | 40.575758 | 194 | 0.663181 |
01477280c5ed09d7c51315ff9c80d7613a2b5b7c | 339 | py | Python | setup.py | Tishka17/domino17 | f27a70dd0de3485918549cd0606599b8fa598bff | [
"Apache-2.0"
] | 9 | 2021-09-22T20:22:50.000Z | 2022-01-24T09:36:34.000Z | setup.py | Tishka17/domino17 | f27a70dd0de3485918549cd0606599b8fa598bff | [
"Apache-2.0"
] | null | null | null | setup.py | Tishka17/domino17 | f27a70dd0de3485918549cd0606599b8fa598bff | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
from setuptools import setup
setup(
name='domino17',
description='Proper python bindings for the Domino API.',
version='0.1',
packages=['domino17', 'domino17.models'],
install_requires=[
'requests',
'dataclass_factory==2.*',
'dataclasses;python_versio... | 21.1875 | 61 | 0.625369 |
04c14ae2931f300053d4f39464ecf78ae7ce04ad | 16,189 | py | Python | protos/agent_pb2.py | Pennsieve/pennsieve-agent | 3b08239b591f651e7664e232243fbc6316afda3a | [
"Apache-2.0"
] | null | null | null | protos/agent_pb2.py | Pennsieve/pennsieve-agent | 3b08239b591f651e7664e232243fbc6316afda3a | [
"Apache-2.0"
] | null | null | null | protos/agent_pb2.py | Pennsieve/pennsieve-agent | 3b08239b591f651e7664e232243fbc6316afda3a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: protos/agent.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import message as _message
from... | 65.016064 | 4,718 | 0.824696 |
fe80e1b2884546c93d5943400ae0bf9033908fb5 | 7,508 | py | Python | dev/services/wms/ows_refactored/inland_water/tcw/ows_tcw_cfg.py | nf-s/dea-config | e0fe5fde8a99ad29472c5d14531ecc9208578040 | [
"Apache-2.0"
] | 14 | 2018-08-20T00:31:50.000Z | 2022-02-04T08:13:06.000Z | dev/services/wms/ows_refactored/inland_water/tcw/ows_tcw_cfg.py | nf-s/dea-config | e0fe5fde8a99ad29472c5d14531ecc9208578040 | [
"Apache-2.0"
] | 145 | 2018-06-04T05:06:14.000Z | 2022-02-22T23:02:00.000Z | dev/services/wms/ows_refactored/inland_water/tcw/ows_tcw_cfg.py | nf-s/dea-config | e0fe5fde8a99ad29472c5d14531ecc9208578040 | [
"Apache-2.0"
] | 35 | 2018-06-04T05:04:15.000Z | 2022-01-25T07:48:07.000Z | from ows_refactored.ows_reslim_cfg import reslim_wms_min_zoom_15_cache_rules
bands_tcw_percentile = {
"TCW_PC_10": [],
"TCW_PC_50": [],
"TCW_PC_90": [],
}
style_tcw_10 = {
"name": "tcw_10_percentile",
"title": "Tasseled Cap Wetness 10th Percentile",
"abstract": "The 10th Percentile of Tasseled... | 61.04065 | 693 | 0.726292 |
919deb2fe4e595a65a9264d6dde542d0a5a20f28 | 110 | py | Python | Python/Mundo01/teste/teste5.py | eStev4m/CursoPython | 8b52a618e67c80d66518ef91c1d4596a2bfddc22 | [
"MIT"
] | null | null | null | Python/Mundo01/teste/teste5.py | eStev4m/CursoPython | 8b52a618e67c80d66518ef91c1d4596a2bfddc22 | [
"MIT"
] | null | null | null | Python/Mundo01/teste/teste5.py | eStev4m/CursoPython | 8b52a618e67c80d66518ef91c1d4596a2bfddc22 | [
"MIT"
] | null | null | null | frase = 'Curso em Vídeo Python'
print(frase[1:15:3])
frase = 'Curso em Vídeo Python'
print(frase.count('o'))
| 18.333333 | 31 | 0.690909 |
6797934e141b31d04b12207ad1c4a50985676e65 | 2,872 | py | Python | app.py | BeerTalk/ElleHacks | c0cb84d22fa7c19c6128d59e2bd77e5bb6c39150 | [
"MIT"
] | null | null | null | app.py | BeerTalk/ElleHacks | c0cb84d22fa7c19c6128d59e2bd77e5bb6c39150 | [
"MIT"
] | null | null | null | app.py | BeerTalk/ElleHacks | c0cb84d22fa7c19c6128d59e2bd77e5bb6c39150 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, url_for
import re
import sys
#from google.cloud import vision
#from google.cloud.vision import types
import os, io
from google.cloud import language
import argparse
from google.cloud.language import enums
from google.cloud.language import types
#sys.path.ap... | 29.010101 | 107 | 0.707869 |
9923cc5fe62955dee67f9586b7219235184877a4 | 2,693 | py | Python | tools/manifest/update.py | Ms2ger/web-platform-tests | 645c0e8a5c028a613e7ad1732834100dbe946fc7 | [
"BSD-3-Clause"
] | 1 | 2022-03-19T09:43:35.000Z | 2022-03-19T09:43:35.000Z | tools/manifest/update.py | Ms2ger/web-platform-tests | 645c0e8a5c028a613e7ad1732834100dbe946fc7 | [
"BSD-3-Clause"
] | 1 | 2021-12-13T19:49:45.000Z | 2021-12-13T19:49:45.000Z | tools/manifest/update.py | Ms2ger/web-platform-tests | 645c0e8a5c028a613e7ad1732834100dbe946fc7 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import argparse
import os
import manifest
from . import vcs
from .log import get_logger
from .download import download_from_github
here = os.path.dirname(__file__)
wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir))
logger = get_logger()
def update(tests_root, manifest, worki... | 26.663366 | 87 | 0.639064 |
85165830eb848c41b677f6160d5f709d70737511 | 6,877 | py | Python | Graph/warnsdorffs_knight_algo.py | suyash248/data_structures | 41a732cebf791ed63edbce10329251f03b763ccf | [
"Apache-2.0"
] | 7 | 2017-12-13T05:54:29.000Z | 2022-03-25T09:10:59.000Z | Graph/warnsdorffs_knight_algo.py | suyash248/data_structures | 41a732cebf791ed63edbce10329251f03b763ccf | [
"Apache-2.0"
] | null | null | null | Graph/warnsdorffs_knight_algo.py | suyash248/data_structures | 41a732cebf791ed63edbce10329251f03b763ccf | [
"Apache-2.0"
] | 4 | 2019-05-22T02:51:56.000Z | 2021-05-23T10:49:57.000Z | from __future__ import annotations
__author__ = "Suyash Soni"
__email__ = "suyash.soni248@gmail.com"
import sys, copy, time
from collections import defaultdict
from Array import empty_2d_array
from typing import TypeVar, Generic, List, Set, Tuple, Dict, Tuple
from Graph.graph import Graph, Vertex, Edge
T = TypeVar('... | 39.297143 | 115 | 0.631671 |
adbd00c365a1fd5df181c6201795a770b4117b6a | 463 | py | Python | plotly/validators/contourcarpet/colorbar/_len.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 2 | 2020-03-24T11:41:14.000Z | 2021-01-14T07:59:43.000Z | plotly/validators/contourcarpet/colorbar/_len.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | plotly/validators/contourcarpet/colorbar/_len.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 4 | 2019-06-03T14:49:12.000Z | 2022-01-06T01:05:12.000Z | import _plotly_utils.basevalidators
class LenValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self,
plotly_name='len',
parent_name='contourcarpet.colorbar',
**kwargs
):
super(LenValidator, self).__init__(
plotly_name=plotly_name,
... | 23.15 | 65 | 0.580994 |
5eb618e70d0bc27df59081d5cf7b7060e1a732db | 21,291 | py | Python | speakerbox/preprocess.py | CouncilDataProject/speakerbox | ca272f2b98db39af4367e583b62816bb0cf2ef40 | [
"MIT"
] | 3 | 2022-02-04T05:03:10.000Z | 2022-02-13T00:18:04.000Z | speakerbox/preprocess.py | CouncilDataProject/speakerbox | ca272f2b98db39af4367e583b62816bb0cf2ef40 | [
"MIT"
] | 7 | 2020-03-09T01:56:03.000Z | 2022-03-11T02:09:58.000Z | speakerbox/preprocess.py | CouncilDataProject/speakerbox | ca272f2b98db39af4367e583b62816bb0cf2ef40 | [
"MIT"
] | 1 | 2022-02-13T03:15:23.000Z | 2022-02-13T03:15:23.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import logging
from pathlib import Path
from typing import List, Optional, Tuple, Union
import numpy as np
import pandas as pd
from datasets import Dataset, DatasetDict
from pyannote.audio import Pipeline
from pydub import AudioSegment
from sklearn.model_selec... | 36.645439 | 87 | 0.640599 |
5502a0fb5fecb60dce54365023574a437f5edf7c | 2,918 | py | Python | grblas/semiring/numpy.py | metagraph-dev/grblas | 2ef42284507194b3ea8532ae2807fa073abc5a96 | [
"Apache-2.0"
] | 16 | 2020-07-28T22:14:56.000Z | 2022-03-26T14:45:41.000Z | grblas/semiring/numpy.py | metagraph-dev/grblas | 2ef42284507194b3ea8532ae2807fa073abc5a96 | [
"Apache-2.0"
] | 75 | 2020-07-27T04:06:16.000Z | 2022-03-30T19:23:08.000Z | grblas/semiring/numpy.py | metagraph-dev/grblas | 2ef42284507194b3ea8532ae2807fa073abc5a96 | [
"Apache-2.0"
] | 4 | 2020-07-23T19:04:13.000Z | 2022-03-18T00:34:14.000Z | """ Create UDFs of numpy functions supported by numba.
See list of numpy ufuncs supported by numpy here:
https://numba.pydata.org/numba-doc/dev/reference/numpysupported.html#math-operations
"""
import itertools as _itertools
from .. import binary as _binary
from .. import monoid as _monoid
from .. import operator a... | 26.770642 | 89 | 0.596984 |
68a1ae4bbf066459b123cbcba4a3a92855276c13 | 21,459 | py | Python | src/lib/utils/debugger.py | Yuki-TU/CenterNet | ad5fa717c31e221fe7458e280fa379f98abab546 | [
"MIT"
] | null | null | null | src/lib/utils/debugger.py | Yuki-TU/CenterNet | ad5fa717c31e221fe7458e280fa379f98abab546 | [
"MIT"
] | null | null | null | src/lib/utils/debugger.py | Yuki-TU/CenterNet | ad5fa717c31e221fe7458e280fa379f98abab546 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import cv2
from .ddd_utils import compute_box_3d, project_to_image, draw_box_3d
class Debugger(object):
def __init__(self, ipynb=False, theme='black',
num_classes=-1, datas... | 38.734657 | 80 | 0.519549 |
305d2f077ffe72572c37a99fd954b534cd3af841 | 362 | py | Python | neuronit/neuronit/migrations/0004_delete_carousel.py | neuronit/pfa | 6483f23de3ac43ae1121760ab44a2cae1f2cc901 | [
"MIT"
] | null | null | null | neuronit/neuronit/migrations/0004_delete_carousel.py | neuronit/pfa | 6483f23de3ac43ae1121760ab44a2cae1f2cc901 | [
"MIT"
] | null | null | null | neuronit/neuronit/migrations/0004_delete_carousel.py | neuronit/pfa | 6483f23de3ac43ae1121760ab44a2cae1f2cc901 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2017-03-10 12:49
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('neuronit', '0003_auto_20170310_1344'),
]
operations = [
migrations.DeleteModel(
... | 19.052632 | 48 | 0.627072 |
406667a5389c928a908e57828baa0541a73a5c0d | 3,927 | py | Python | version.py | Lucaszw/flatland_helpers | 2fafc00b31dfacae30ad0bbd9157d9866e9797de | [
"BSD-3-Clause"
] | null | null | null | version.py | Lucaszw/flatland_helpers | 2fafc00b31dfacae30ad0bbd9157d9866e9797de | [
"BSD-3-Clause"
] | null | null | null | version.py | Lucaszw/flatland_helpers | 2fafc00b31dfacae30ad0bbd9157d9866e9797de | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Calculates the current version number.
If possible, uses output of “git describe” modified to conform to the
visioning scheme that setuptools uses (see PEP 386). Releases must be
labelled with annotated tags (signed tags are annotated) of the following
format:
v<num>(.<num>)+ [ {a|b|c|... | 29.088889 | 79 | 0.616501 |
10475934b86f1ecce0db83af4740920b953f3a08 | 2,761 | py | Python | setup.py | CharlesRngrd/toucan-connectors | 906481c6f4bbead406efcd0879d1ac21a3071b6e | [
"BSD-3-Clause"
] | null | null | null | setup.py | CharlesRngrd/toucan-connectors | 906481c6f4bbead406efcd0879d1ac21a3071b6e | [
"BSD-3-Clause"
] | null | null | null | setup.py | CharlesRngrd/toucan-connectors | 906481c6f4bbead406efcd0879d1ac21a3071b6e | [
"BSD-3-Clause"
] | null | null | null | from pathlib import Path
from setuptools import find_packages, setup
auth_deps = ['oauthlib==3.1.0', 'requests-oauthlib==1.3.0']
bearer_deps = ['bearer==3.1.0']
extras_require = {
'adobe': ['adobe_analytics'],
'aircall': bearer_deps,
'azure_mssql': ['pyodbc>=3'],
'clickhouse': ['clickhouse_driver'],
... | 31.022472 | 81 | 0.63745 |
53d08cd13fc4a70d4db28240f10e789b0d27a0f2 | 2,664 | py | Python | seq2seq/models/attention.py | AnTuo1998/seq2seq-dialogue | 61af5099332b749f4026a20d4ea3380f42deb006 | [
"Apache-2.0"
] | 4 | 2020-01-03T09:14:10.000Z | 2021-07-04T14:39:45.000Z | seq2seq/models/attention.py | AnTuo1998/seq2seq-dialogue | 61af5099332b749f4026a20d4ea3380f42deb006 | [
"Apache-2.0"
] | null | null | null | seq2seq/models/attention.py | AnTuo1998/seq2seq-dialogue | 61af5099332b749f4026a20d4ea3380f42deb006 | [
"Apache-2.0"
] | 2 | 2020-01-09T10:08:30.000Z | 2020-01-10T01:54:01.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
class Attention(nn.Module):
r"""
Applies an attention mechanism on the output features from the decoder.
.. math::
\begin{array}{ll}
x = context*output \\
attn = exp(x_i) / sum_j exp(x_j) \\
... | 36.493151 | 118 | 0.607357 |
6d1d5dccaf707c038023b04f7a7c690ea1159e70 | 19,378 | py | Python | pygorithm/geometry/rect2.py | bharadwaj-9/pygorithm | da9105384ffc87bdd9d20f6e8fecda9f0fe011b0 | [
"MIT"
] | 4,736 | 2017-08-06T03:36:33.000Z | 2022-03-31T07:32:55.000Z | pygorithm/geometry/rect2.py | realChainLife/pygorithm | f72e666ee913836b95f09cced47bcc03ad68a05d | [
"MIT"
] | 56 | 2017-08-06T16:34:49.000Z | 2022-02-09T19:41:02.000Z | pygorithm/geometry/rect2.py | realChainLife/pygorithm | f72e666ee913836b95f09cced47bcc03ad68a05d | [
"MIT"
] | 658 | 2017-08-06T08:52:02.000Z | 2022-03-15T12:09:08.000Z | """
Author: Timothy Moore
Created On: 31th August 2017
Defines a 2-dimensional axis-aligned rectangle.
This rectangle does not act as a polygon, but
there are similar collision methods that accept
polygons.
Unlike Polygon2s, Rect2s are very fast to construct.
"""
import math
from pygorithm.geometry import (vector2... | 39.872428 | 146 | 0.585716 |
873d0ad27199f4da2f360d5bb5b6bbf5e0aef4da | 738 | py | Python | Apps/aulas/migrations/0014_alter_planejamento_data_envio_alter_resposta_data.py | arthur-asilva/rc_plataforma | 7e6f7eb7f9a3b9089c02db98518b60d8e481ce4c | [
"BSD-2-Clause"
] | null | null | null | Apps/aulas/migrations/0014_alter_planejamento_data_envio_alter_resposta_data.py | arthur-asilva/rc_plataforma | 7e6f7eb7f9a3b9089c02db98518b60d8e481ce4c | [
"BSD-2-Clause"
] | null | null | null | Apps/aulas/migrations/0014_alter_planejamento_data_envio_alter_resposta_data.py | arthur-asilva/rc_plataforma | 7e6f7eb7f9a3b9089c02db98518b60d8e481ce4c | [
"BSD-2-Clause"
] | null | null | null | # Generated by Django 4.0 on 2021-12-31 17:17
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('aulas', '0013_alter_planejamento_data_envio_alter_resposta_data'),
]
operations = [
migrations.AlterField(
model_n... | 29.52 | 123 | 0.630081 |
3f2d740ef440c6ee9ee7a6b58ed91745ec904395 | 1,105 | py | Python | crawler/core/page_parser.py | EasonAndLily/SimpleCrawler | 3680ce958697c788ee5349451b8d9f277aa19807 | [
"MIT"
] | 1 | 2020-10-30T04:59:07.000Z | 2020-10-30T04:59:07.000Z | crawler/core/page_parser.py | EasonAndLily/SimpleCrawler | 3680ce958697c788ee5349451b8d9f277aa19807 | [
"MIT"
] | null | null | null | crawler/core/page_parser.py | EasonAndLily/SimpleCrawler | 3680ce958697c788ee5349451b8d9f277aa19807 | [
"MIT"
] | null | null | null | import re
import urlparse
from bs4 import BeautifulSoup
class PageParser(object):
@classmethod
def parser(cls, url, content):
if url is None or content is None:
return
soup = BeautifulSoup(content, 'html.parser', from_encoding='utf-8')
urls = cls.__get_new_urls(url, soup)
... | 29.864865 | 83 | 0.60362 |
31dd40f51455842a23dd780aa664d5799b5bc537 | 877 | py | Python | test/test_imports.py | theendsofinvention/emiz | 98b210dd36053ce8062d54e8c501ca4715cd78b5 | [
"MIT"
] | null | null | null | test/test_imports.py | theendsofinvention/emiz | 98b210dd36053ce8062d54e8c501ca4715cd78b5 | [
"MIT"
] | 5 | 2020-03-24T16:34:15.000Z | 2020-06-26T08:31:46.000Z | test/test_imports.py | theendsofinvention/emiz | 98b210dd36053ce8062d54e8c501ca4715cd78b5 | [
"MIT"
] | 1 | 2018-04-01T16:02:13.000Z | 2018-04-01T16:02:13.000Z | # coding=utf-8
"""
This is a temporary test to cover the import of modules that have 0% coverage so far
Yes, this is shameful...
"""
import glob
import pytest
import emiz
@pytest.fixture(autouse=True)
def patch_version(monkeypatch):
monkeypatch.setattr(emiz, '__version__', '0.0.0')
# noinspection PyUnresolv... | 24.361111 | 84 | 0.719498 |
0d51a494d2a116a537e3e0116e038254527f2f94 | 233 | py | Python | CodeForces/CONTESTS/Round 710/A. Strange Table.py | IshanManchanda/competitive-python | e9ee5fc48eaea0497ec13e8af5f89da6ac050526 | [
"MIT"
] | 6 | 2019-06-06T15:16:05.000Z | 2020-07-30T01:56:53.000Z | CodeForces/CONTESTS/Round 710/A. Strange Table.py | IshanManchanda/competitive-python | e9ee5fc48eaea0497ec13e8af5f89da6ac050526 | [
"MIT"
] | null | null | null | CodeForces/CONTESTS/Round 710/A. Strange Table.py | IshanManchanda/competitive-python | e9ee5fc48eaea0497ec13e8af5f89da6ac050526 | [
"MIT"
] | 1 | 2020-03-22T21:41:53.000Z | 2020-03-22T21:41:53.000Z | def main():
from sys import stdin, stdout
rl = stdin.readline
wl = stdout.write
for _ in range(int(rl())):
n, m, x = map(int, rl().split())
a = (x - 1) % n
b = (x - 1) // n
r = 1 + m * a + b
wl(str(r) + '\n')
main()
| 15.533333 | 34 | 0.493562 |
04d465c457b1a9d2198823ea8c28763aa47f11e0 | 2,946 | py | Python | restApi/migrations/0001_initial.py | agusalex/laboRest | e21b28b95ce3d7468d507a40fae34bdf1a3f9516 | [
"MIT"
] | null | null | null | restApi/migrations/0001_initial.py | agusalex/laboRest | e21b28b95ce3d7468d507a40fae34bdf1a3f9516 | [
"MIT"
] | 1 | 2019-03-14T16:39:31.000Z | 2019-03-14T16:39:31.000Z | restApi/migrations/0001_initial.py | agusalex/laboRest | e21b28b95ce3d7468d507a40fae34bdf1a3f9516 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.7 on 2019-03-04 00:54
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0009_alter_user_last_name_ma... | 64.043478 | 329 | 0.661575 |
468f6b5184f800ee73a8c78f048dc7409064eb6b | 3,861 | py | Python | bcs-ui/backend/container_service/clusters/views/metric_handler/namespace.py | laodiu/bk-bcs | 2a956a42101ff6487ff521fb3ef429805bfa7e26 | [
"Apache-2.0"
] | 599 | 2019-06-25T03:20:46.000Z | 2022-03-31T12:14:33.000Z | bcs-ui/backend/container_service/clusters/views/metric_handler/namespace.py | laodiu/bk-bcs | 2a956a42101ff6487ff521fb3ef429805bfa7e26 | [
"Apache-2.0"
] | 537 | 2019-06-27T06:03:44.000Z | 2022-03-31T12:10:01.000Z | bcs-ui/backend/container_service/clusters/views/metric_handler/namespace.py | laodiu/bk-bcs | 2a956a42101ff6487ff521fb3ef429805bfa7e26 | [
"Apache-2.0"
] | 214 | 2019-06-25T03:26:05.000Z | 2022-03-31T07:52:03.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 41.967391 | 115 | 0.745662 |
72eab06de9dc4f0f198d8f38b2ce97475f6d2c73 | 126,886 | py | Python | release/stubs/Autodesk/Revit/Creation.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs/Autodesk/Revit/Creation.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs/Autodesk/Revit/Creation.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | # encoding: utf-8
# module Autodesk.Revit.Creation calls itself Creation
# from RevitAPI, Version=17.0.0.0, Culture=neutral, PublicKeyToken=null
# by generator 1.145
# no doc
# no imports
# no functions
# classes
class Application(APIObject, IDisposable):
""" The Application Creation object is used t... | 28.047303 | 533 | 0.601453 |
acf0549d410b9f69c8b24ab91b2e7cedeae0fa7e | 1,481 | py | Python | ice/persistence/config_file_backing_store.py | reavessm/Ice | e78d046abfd6006b1a81d1cbdb516b7c3e141ac9 | [
"MIT"
] | 578 | 2015-01-02T12:43:52.000Z | 2022-03-27T23:45:32.000Z | ice/persistence/config_file_backing_store.py | raphaelcastaneda/Ice | b380de7fc7830251b883fb55c46fea894058afa3 | [
"MIT"
] | 271 | 2015-01-05T01:56:38.000Z | 2021-08-14T02:51:24.000Z | ice/persistence/config_file_backing_store.py | raphaelcastaneda/Ice | b380de7fc7830251b883fb55c46fea894058afa3 | [
"MIT"
] | 156 | 2015-01-07T15:43:20.000Z | 2021-12-11T19:10:44.000Z | # encoding: utf-8
"""
config_file_backing_store.py
Created by Scott on 2014-08-12.
Copyright (c) 2014 Scott Rice. All rights reserved.
"""
import ConfigParser
import backing_store
class ConfigFileBackingStore(backing_store.BackingStore):
def __init__(self, path):
super(ConfigFileBackingStore, self).__init__... | 26.927273 | 73 | 0.713707 |
3eb3affe7aa2811c75eda047bcd8e8552ccd5c6f | 1,006 | py | Python | services/jobs/tests/api/test_sync_process.py | Open-EO/openeo-openshift-driver | 822dbd3ccee25180cc48efd2f891504b6b5edc14 | [
"Apache-2.0"
] | 6 | 2018-10-02T15:04:11.000Z | 2019-12-13T11:36:49.000Z | services/jobs/tests/api/test_sync_process.py | Open-EO/openeo-openshift-driver | 822dbd3ccee25180cc48efd2f891504b6b5edc14 | [
"Apache-2.0"
] | 54 | 2019-01-09T17:14:29.000Z | 2020-10-02T11:39:38.000Z | services/jobs/tests/api/test_sync_process.py | Open-EO/openeo-openshift-driver | 822dbd3ccee25180cc48efd2f891504b6b5edc14 | [
"Apache-2.0"
] | 6 | 2018-07-03T15:58:05.000Z | 2019-07-03T07:20:46.000Z | """Test sync processing."""
import pytest
from nameko_sqlalchemy.database_session import Session
from tests.utils import get_configured_job_service, get_random_user, load_json
@pytest.mark.usefixtures("sync_result", "dag_folder")
class TestSyncJob:
"""Test the process_sync job method."""
def test_start_proc... | 34.689655 | 86 | 0.641153 |
7be0e69ace6bbe545e3542961270b528d45f0bf2 | 14,633 | py | Python | venv/lib/python3.8/site-packages/thinc/util.py | dushesms/Writing-Aid | 45abc68760546d5f1db7f08b47d2f6795a381607 | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/thinc/util.py | dushesms/Writing-Aid | 45abc68760546d5f1db7f08b47d2f6795a381607 | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/thinc/util.py | dushesms/Writing-Aid | 45abc68760546d5f1db7f08b47d2f6795a381607 | [
"MIT"
] | null | null | null | from typing import Any, Union, Sequence, cast, Dict, Optional, Callable, TypeVar
from typing import List
import numpy
import random
import functools
from wasabi import table
from pydantic import create_model, ValidationError
import inspect
import os
import tempfile
import threading
import contextlib
from contextvars im... | 30.741597 | 103 | 0.653796 |
bd2ef7f19f23d5a807161b306879ae95ab82cb73 | 575 | py | Python | customapp/hooks.py | kaviii/custom-app | 0ce604fe9875a439d4bfe08c4f34b4fb0c1902c1 | [
"MIT"
] | null | null | null | customapp/hooks.py | kaviii/custom-app | 0ce604fe9875a439d4bfe08c4f34b4fb0c1902c1 | [
"MIT"
] | null | null | null | customapp/hooks.py | kaviii/custom-app | 0ce604fe9875a439d4bfe08c4f34b4fb0c1902c1 | [
"MIT"
] | 1 | 2022-03-23T00:51:41.000Z | 2022-03-23T00:51:41.000Z | from . import __version__ as app_version
app_name = "customapp"
app_title = "Custom App"
app_publisher = "Kavitha Balakrishnan"
app_description = "Demonstrate basic customization in erpnext/frappe"
app_icon = "octicon octicon-file-directory"
app_color = "grey"
app_email = "kavitha1995@gmail.com"
app_license = "MIT"
#... | 33.823529 | 69 | 0.773913 |
7dcbeed5d871f41aa698202bcea476b0dc4bae36 | 25,164 | py | Python | python/ray/tune/ray_trial_executor.py | inventormc/ray | 5078755987756019ee39ca2fdc0bcc8dcb99da56 | [
"Apache-2.0"
] | null | null | null | python/ray/tune/ray_trial_executor.py | inventormc/ray | 5078755987756019ee39ca2fdc0bcc8dcb99da56 | [
"Apache-2.0"
] | null | null | null | python/ray/tune/ray_trial_executor.py | inventormc/ray | 5078755987756019ee39ca2fdc0bcc8dcb99da56 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
import math
import os
import random
import time
import traceback
import ray
from ray import ray_constants
from ray.resource_spec import ResourceSpec
from ray.tune.error import Ab... | 40.133971 | 79 | 0.597043 |
b13e54f77d009dfa5b6a7251cf61eb621177ebb3 | 2,183 | py | Python | tools/nntool/graph/manipulations/adjusts/global_pool.py | bot-motion/gap_sdk | bd117a8a4b5384b2b889f72effbfed4f7f938a88 | [
"Apache-2.0"
] | null | null | null | tools/nntool/graph/manipulations/adjusts/global_pool.py | bot-motion/gap_sdk | bd117a8a4b5384b2b889f72effbfed4f7f938a88 | [
"Apache-2.0"
] | null | null | null | tools/nntool/graph/manipulations/adjusts/global_pool.py | bot-motion/gap_sdk | bd117a8a4b5384b2b889f72effbfed4f7f938a88 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2020 GreenWaves Technologies, SAS
# This program 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 Foundation, either version 3 of the
# License, or (at your option) any later version.
# This progr... | 45.479167 | 90 | 0.707284 |
24d32fbb52778ab31d3f1c42a4e3a23e6fec1afe | 6,274 | py | Python | cogs/general.py | Rainb0wCodes/Rainb0t | 80dc24e7e365a3a2237a3f713c278c571d77a1cd | [
"Apache-2.0"
] | 2 | 2021-03-21T20:34:56.000Z | 2021-05-12T16:57:37.000Z | cogs/general.py | Rainb0wCodes/Rainb0t | 80dc24e7e365a3a2237a3f713c278c571d77a1cd | [
"Apache-2.0"
] | null | null | null | cogs/general.py | Rainb0wCodes/Rainb0t | 80dc24e7e365a3a2237a3f713c278c571d77a1cd | [
"Apache-2.0"
] | null | null | null | import os, sys, discord, platform, random, aiohttp, json
from discord.ext import commands
if not os.path.isfile("config.py"):
sys.exit("'config.py' not found! Please add it and try again.")
else:
import config
class general(commands.Cog, name="general"):
def __init__(self, bot):
self.bot = bot
... | 33.021053 | 164 | 0.550048 |
c8efa5d9d9032f659b60cf09d9f043e9fa355c6d | 169 | py | Python | src/EC_MS/utils/__init__.py | ScottSoren/EC_MS | f7c12f9f2180950ca929d6da9ca2767479a2e106 | [
"MIT"
] | 8 | 2018-06-15T06:01:18.000Z | 2022-01-27T11:46:38.000Z | src/EC_MS/utils/__init__.py | ScottSoren/EC_MS | f7c12f9f2180950ca929d6da9ca2767479a2e106 | [
"MIT"
] | 4 | 2020-02-25T18:32:21.000Z | 2020-05-20T15:16:54.000Z | src/EC_MS/utils/__init__.py | ScottSoren/EC_MS | f7c12f9f2180950ca929d6da9ca2767479a2e106 | [
"MIT"
] | 4 | 2019-07-02T12:57:41.000Z | 2022-01-13T09:30:27.000Z | """
EC_MS.utils is a stash for project-specific tools
"""
from .extraction_class import Extraction
from .kinetic_models import solve_carbonic_burst
from .icpms import *
| 24.142857 | 49 | 0.804734 |
f11cc61ae97196694c3c5d6b4248a13e3462b7aa | 12,421 | py | Python | plugins/filters.py | harleyquinn099/unlimited-filter-bot | 32787a35ef469592cfbb49f4a4d994b103d5b0b9 | [
"MIT"
] | null | null | null | plugins/filters.py | harleyquinn099/unlimited-filter-bot | 32787a35ef469592cfbb49f4a4d994b103d5b0b9 | [
"MIT"
] | null | null | null | plugins/filters.py | harleyquinn099/unlimited-filter-bot | 32787a35ef469592cfbb49f4a4d994b103d5b0b9 | [
"MIT"
] | null | null | null | import os
import re
import io
import pyrogram
from pyrogram import filters, Client
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
if bool(os.environ.get("WEBHOOK", False)):
from sample_config import Config
else:
from config import Config
from database.filters_mdb import(
add_filter,... | 33.21123 | 112 | 0.559375 |
5f750e931d1082c0f8c8cf5f999c0d4bc966e4ed | 4,301 | bzl | Python | tools/osx/xcode_version_flag.bzl | jobechoi/bazel | c03e9ac2588a590881350f4f9dd859de480240de | [
"Apache-2.0"
] | 4 | 2019-06-25T08:16:52.000Z | 2022-01-12T11:35:49.000Z | tools/osx/xcode_version_flag.bzl | jobechoi/bazel | c03e9ac2588a590881350f4f9dd859de480240de | [
"Apache-2.0"
] | 25 | 2019-05-27T17:56:38.000Z | 2020-08-21T01:45:40.000Z | tools/osx/xcode_version_flag.bzl | jobechoi/bazel | c03e9ac2588a590881350f4f9dd859de480240de | [
"Apache-2.0"
] | 4 | 2019-11-22T23:23:41.000Z | 2022-03-01T01:51:48.000Z | # Copyright 2017 The Bazel 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 applicable la... | 31.625 | 81 | 0.679842 |
a3342e318ed3fbdf2d2ebcc654c4ecd565284294 | 2,552 | py | Python | fluent_contents/admin/placeholderfield.py | vinnyrose/django-fluent-contents | 7fa1a58a97099d8e2898a2016bf8abe2ea651b02 | [
"Apache-2.0"
] | null | null | null | fluent_contents/admin/placeholderfield.py | vinnyrose/django-fluent-contents | 7fa1a58a97099d8e2898a2016bf8abe2ea651b02 | [
"Apache-2.0"
] | null | null | null | fluent_contents/admin/placeholderfield.py | vinnyrose/django-fluent-contents | 7fa1a58a97099d8e2898a2016bf8abe2ea651b02 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from fluent_contents import extensions
from fluent_contents.admin.placeholdereditor import PlaceholderEditorInline, PlaceholderEditorAdmin
from fluent_contents.models import PlaceholderData
from fluent_contents.models.fields import PlaceholderField
class PlaceholderFieldInline(Placeho... | 36.457143 | 111 | 0.6779 |
141d2c5239d3ab2c363719aea4efb3600c408ac9 | 1,005 | py | Python | server/src/gmcsecserver/__init__.py | ralf1307/genericmc | 0c83da0e4a30d9285f1db35538d7bccceb7f2c99 | [
"Apache-2.0"
] | null | null | null | server/src/gmcsecserver/__init__.py | ralf1307/genericmc | 0c83da0e4a30d9285f1db35538d7bccceb7f2c99 | [
"Apache-2.0"
] | null | null | null | server/src/gmcsecserver/__init__.py | ralf1307/genericmc | 0c83da0e4a30d9285f1db35538d7bccceb7f2c99 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""
Copyright (C) 2021 Ralf Rachinger
Copyright (C) 2021 GenericMC Contributors
This program 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 Foundation, either version 3 of t... | 35.892857 | 79 | 0.732338 |
5544dcf69c453ef3fe10b64e480a0db77c4f94e0 | 1,235 | py | Python | config.py | yujheli/ARN | 32a1c4ca6d55ce1015dbe9c4c1b8327f3c512079 | [
"MIT"
] | 26 | 2019-02-14T09:25:27.000Z | 2020-11-21T10:58:13.000Z | config.py | yujheli/ARN | 32a1c4ca6d55ce1015dbe9c4c1b8327f3c512079 | [
"MIT"
] | 4 | 2019-03-06T01:28:18.000Z | 2020-11-22T09:33:23.000Z | config.py | yujheli/ARN | 32a1c4ca6d55ce1015dbe9c4c1b8327f3c512079 | [
"MIT"
] | 17 | 2019-03-05T13:25:05.000Z | 2021-01-21T04:23:29.000Z | import os
IMAGE_HEIGHT = 256
IMAGE_WIDTH = 128
# MEAN = [0.485, 0.456, 0.406] # ImageNet Pre-trained Mean
# STD = [0.229, 0.224, 0.225] # ImageNet Pre-trained STDDEV
MEAN = [0.5, 0.5, 0.5]
STD = [0.5, 0.5, 0.5]
MODE = 'all'
if MODE == 'train':
# Train class number
DUKE_CLASS_NUM = 702
MARKET_CLASS_NUM ... | 24.7 | 59 | 0.690688 |
599ccd1ea1fbad0e4e9d28c4523a1a0bb7cb761a | 1,286 | py | Python | ScrapingLecture/scrape_wiki_countries.py | ArtezGDA/Assignments | d39179aac4427dbf9671021a035ce53c47ea7cf5 | [
"RSA-MD"
] | null | null | null | ScrapingLecture/scrape_wiki_countries.py | ArtezGDA/Assignments | d39179aac4427dbf9671021a035ce53c47ea7cf5 | [
"RSA-MD"
] | null | null | null | ScrapingLecture/scrape_wiki_countries.py | ArtezGDA/Assignments | d39179aac4427dbf9671021a035ce53c47ea7cf5 | [
"RSA-MD"
] | null | null | null | #!/usr/bin/python
# scrape_wiki_countries.py
import wikipedia
from bs4 import BeautifulSoup
import urllib
import json
from tqdm import tqdm
def main():
"""Scrapes countries from wikipedia"""
#
# First scrape all the countries
r = urllib.urlopen("https://en.wikipedia.org/wiki/Lists_of_cities_by_country").read()
... | 29.906977 | 86 | 0.7014 |
4c31c8ef9ed3acef23e8e800b3a2a5be1954974e | 17,362 | py | Python | tensorflow/python/keras/distribute/multi_worker_test.py | hanton/tensorflow | 34fd2a5e9bcdb40957ece90fec46a37e6e9248b2 | [
"Apache-2.0"
] | 2 | 2019-06-26T14:51:16.000Z | 2021-08-07T08:40:01.000Z | tensorflow/python/keras/distribute/multi_worker_test.py | jensfreudenau/tensorflow | 3fe3f2b1984aab6f159b89aa3ab0069988925689 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/keras/distribute/multi_worker_test.py | jensfreudenau/tensorflow | 3fe3f2b1984aab6f159b89aa3ab0069988925689 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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... | 38.158242 | 94 | 0.685175 |
2480a5267c9706f15da8a2b3fd227090ac28d122 | 5,472 | py | Python | contacthub/models/like.py | psantori/contacthub-sdk-python | 03b6dba72ac0a5c34775b409f28b501894cae080 | [
"Apache-2.0"
] | null | null | null | contacthub/models/like.py | psantori/contacthub-sdk-python | 03b6dba72ac0a5c34775b409f28b501894cae080 | [
"Apache-2.0"
] | null | null | null | contacthub/models/like.py | psantori/contacthub-sdk-python | 03b6dba72ac0a5c34775b409f28b501894cae080 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from copy import deepcopy
from contacthub._api_manager._api_customer import _CustomerAPIManager
class Like(object):
"""
Like entiti definition
"""
__attributes__ = ('attributes', 'customer', 'customer_api_manager', 'entity_name', 'parent_attr', 'properties_class')
def __in... | 44.129032 | 121 | 0.627376 |
616173e306d7674a52223efb27ba67d1952de291 | 844 | py | Python | src/db.py | smpdarnell/mul-tutorial-finder | 27f997beb3c290311a67f30b3e2273ab3fc0ddaa | [
"MIT"
] | 1 | 2019-02-27T10:39:25.000Z | 2019-02-27T10:39:25.000Z | src/db.py | smpdarnell/mul-tutorial-finder | 27f997beb3c290311a67f30b3e2273ab3fc0ddaa | [
"MIT"
] | null | null | null | src/db.py | smpdarnell/mul-tutorial-finder | 27f997beb3c290311a67f30b3e2273ab3fc0ddaa | [
"MIT"
] | null | null | null | import sqlite3
import click
from flask import current_app, g
from flask.cli import with_appcontext
def init_app(app):
app.teardown_appcontext(close_db)
app.cli.add_command(init_db_command)
def init_db():
db = get_db()
with current_app.open_resource('schema.sql') as f:
db.executescript(f.read... | 20.585366 | 56 | 0.652844 |
60a4203fceeb6963f9b89c60afee07592526cd1a | 1,537 | py | Python | python/dgl/__init__.py | srinivamd/dgl | 3bd5a9b6d11a74df6035ecdbdf5f71088eb2e901 | [
"Apache-2.0"
] | null | null | null | python/dgl/__init__.py | srinivamd/dgl | 3bd5a9b6d11a74df6035ecdbdf5f71088eb2e901 | [
"Apache-2.0"
] | null | null | null | python/dgl/__init__.py | srinivamd/dgl | 3bd5a9b6d11a74df6035ecdbdf5f71088eb2e901 | [
"Apache-2.0"
] | null | null | null | """
The ``dgl`` package contains data structure for storing structural and feature data
(i.e., the :class:`DGLGraph` class) and also utilities for generating, manipulating
and transforming graphs.
"""
# Windows compatibility
# This initializes Winsock and performs cleanup at termination as required
import socket
# s... | 29.557692 | 100 | 0.79961 |
32fcb6f7f4e3a390a5e19fc245a398fe5e2005dd | 7,934 | py | Python | grl/algos/p2sro/eval_dispatcher/protobuf/eval_dispatcher_pb2.py | indylab/xdo | 1ddd92aa56ba10fa468396de8f8824c83ba9d0ba | [
"MIT"
] | 12 | 2021-03-12T07:18:52.000Z | 2022-03-15T22:30:44.000Z | grl/algos/p2sro/eval_dispatcher/protobuf/eval_dispatcher_pb2.py | indylab/xdo | 1ddd92aa56ba10fa468396de8f8824c83ba9d0ba | [
"MIT"
] | 1 | 2021-11-22T16:39:46.000Z | 2022-02-02T22:13:03.000Z | grl/algos/p2sro/eval_dispatcher/protobuf/eval_dispatcher_pb2.py | indylab/xdo | 1ddd92aa56ba10fa468396de8f8824c83ba9d0ba | [
"MIT"
] | 4 | 2021-06-21T03:54:45.000Z | 2022-01-13T10:28:26.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: eval_dispatcher.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google... | 39.083744 | 664 | 0.71452 |
9c590ad32424611c91fddad08efee6bca3a32b99 | 18,468 | py | Python | spikeinterface/core/core_tools.py | skeltoh/spikeinterface | de3089aa25ae3b31829962f70cbbabd2f2ca4108 | [
"MIT"
] | null | null | null | spikeinterface/core/core_tools.py | skeltoh/spikeinterface | de3089aa25ae3b31829962f70cbbabd2f2ca4108 | [
"MIT"
] | null | null | null | spikeinterface/core/core_tools.py | skeltoh/spikeinterface | de3089aa25ae3b31829962f70cbbabd2f2ca4108 | [
"MIT"
] | null | null | null | from pathlib import Path
import os
import datetime
import numpy as np
from tqdm import tqdm
from .job_tools import ensure_chunk_size, ensure_n_jobs, divide_segment_into_chunks, ChunkRecordingExecutor, \
_shared_job_kwargs_doc
def read_python(path):
"""Parses python scripts in a dictionary
Parameters
... | 35.65251 | 119 | 0.612952 |
f00213eb88dce8e7bf73264a54780a704b4c4b18 | 15,108 | py | Python | tensorflow/python/ops/state_ops.py | qinchangping/tensorflow | f7f7036d1cdc5716aff976fae0ea4d1b9a931b56 | [
"Apache-2.0"
] | 5 | 2019-05-23T02:59:21.000Z | 2020-02-05T08:20:23.000Z | tensorflow/python/ops/state_ops.py | qinchangping/tensorflow | f7f7036d1cdc5716aff976fae0ea4d1b9a931b56 | [
"Apache-2.0"
] | 2 | 2017-08-01T21:11:06.000Z | 2017-08-01T23:07:02.000Z | tensorflow/python/ops/state_ops.py | qinchangping/tensorflow | f7f7036d1cdc5716aff976fae0ea4d1b9a931b56 | [
"Apache-2.0"
] | 2 | 2019-09-05T06:43:24.000Z | 2019-09-07T07:58:34.000Z | # Copyright 2015 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... | 35.548235 | 88 | 0.69215 |
84bbc0683ef1f51420de2815079066e06ebf70f2 | 98,993 | py | Python | myenv/Scripts/markdown2.py | arshpsingh/Blog-Api | 4f6c1f404050b8acaaa97c8f599de38c0554af08 | [
"MIT"
] | null | null | null | myenv/Scripts/markdown2.py | arshpsingh/Blog-Api | 4f6c1f404050b8acaaa97c8f599de38c0554af08 | [
"MIT"
] | 5 | 2020-06-05T21:19:44.000Z | 2022-01-13T01:19:09.000Z | myenv/Scripts/markdown2.py | arshpsingh/Blog-Api | 4f6c1f404050b8acaaa97c8f599de38c0554af08 | [
"MIT"
] | null | null | null | #!c:\users\hp\desktop\blog-api\myenv\scripts\python.exe
# Copyright (c) 2012 Trent Mick.
# Copyright (c) 2007-2008 ActiveState Corp.
# License: MIT (http://www.opensource.org/licenses/mit-license.php)
from __future__ import generators
r"""A fast and complete Python implementation of Markdown.
[from http://daringfire... | 40.257422 | 121 | 0.521663 |
0b40094c51bb2a0cf61e03de483ec948288f8075 | 59,891 | py | Python | src/oemof/solph/custom.py | escalacjo/oemof-solph | 84a2c6fa5b92d484542eef8a54c817c1d15a41fb | [
"MIT"
] | null | null | null | src/oemof/solph/custom.py | escalacjo/oemof-solph | 84a2c6fa5b92d484542eef8a54c817c1d15a41fb | [
"MIT"
] | null | null | null | src/oemof/solph/custom.py | escalacjo/oemof-solph | 84a2c6fa5b92d484542eef8a54c817c1d15a41fb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""This module is designed to hold custom components with their classes and
associated individual constraints (blocks) and groupings. Therefore this
module holds the class definition and the block directly located by each other.
This file is part of project oemof (github.com/oemof/oemof). It's... | 38.689276 | 80 | 0.529378 |
bdf865d3bc19ed74e8c68e295f16cca48c3f6257 | 968 | py | Python | threathunter_common_python/threathunter_common/bankcard_info/bankcard_bin.py | threathunterX/python_lib | e2d4052de04c82cb7bccd08042f28db824cab442 | [
"Apache-2.0"
] | 2 | 2019-03-17T04:03:08.000Z | 2019-05-01T09:42:23.000Z | threathunter_common_python/threathunter_common/bankcard_info/bankcard_bin.py | threathunterX/python_lib | e2d4052de04c82cb7bccd08042f28db824cab442 | [
"Apache-2.0"
] | null | null | null | threathunter_common_python/threathunter_common/bankcard_info/bankcard_bin.py | threathunterX/python_lib | e2d4052de04c82cb7bccd08042f28db824cab442 | [
"Apache-2.0"
] | 4 | 2019-06-24T05:47:24.000Z | 2020-09-29T05:00:31.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import sys
import os
reload( sys )
sys.setdefaultencoding( "utf8" )
bank_bin_info = {}
def get_source_data():
fp = open( os.path.join( os.path.dirname( __file__), "data/bank_bin_info.csv" ), "r" )
lines = fp.readlines()
fp.close()
for line in lines:
... | 23.047619 | 90 | 0.592975 |
8953fcec2c005fafa2e7f6e1d30fc62b506a7691 | 4,034 | py | Python | lib/rucio/web/rest/account_limit.py | balrampariyarath/rucio | 8a68017af6b44485a9620566f1afc013838413c1 | [
"Apache-2.0"
] | null | null | null | lib/rucio/web/rest/account_limit.py | balrampariyarath/rucio | 8a68017af6b44485a9620566f1afc013838413c1 | [
"Apache-2.0"
] | null | null | null | lib/rucio/web/rest/account_limit.py | balrampariyarath/rucio | 8a68017af6b44485a9620566f1afc013838413c1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
'''
Copyright European Organization for Nuclear Research (CERN)
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
Authors:
... | 34.478632 | 99 | 0.633862 |
4e1e34d6398c85626f2410284c0844b567d03682 | 954 | py | Python | kubernetes/test/test_v1_endpoints_list.py | jashandeep-sohi/kubernetes-python | e057f273069de445a2d5a250ac5fe37d79671f3b | [
"Apache-2.0"
] | 1 | 2020-05-08T12:41:04.000Z | 2020-05-08T12:41:04.000Z | kubernetes/test/test_v1_endpoints_list.py | jashandeep-sohi/kubernetes-python | e057f273069de445a2d5a250ac5fe37d79671f3b | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_endpoints_list.py | jashandeep-sohi/kubernetes-python | e057f273069de445a2d5a250ac5fe37d79671f3b | [
"Apache-2.0"
] | 2 | 2021-07-09T08:49:05.000Z | 2021-08-03T18:08:36.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.10.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 21.2 | 105 | 0.706499 |
483ac44d1c83608761454efaad045765be2146ab | 8,790 | py | Python | tensorpack/dataflow/image.py | SunskyF/tensorpack | ffe1398a146312cc74189e529475e67ca0b0cd5c | [
"Apache-2.0"
] | 1 | 2018-12-20T07:09:03.000Z | 2018-12-20T07:09:03.000Z | tensorpack/dataflow/image.py | 13266828291/tensorpack | c7fd1d9fb18862318b133c9474d37c5085850070 | [
"Apache-2.0"
] | null | null | null | tensorpack/dataflow/image.py | 13266828291/tensorpack | c7fd1d9fb18862318b133c9474d37c5085850070 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# File: image.py
import numpy as np
import copy as copy_mod
from contextlib import contextmanager
from .base import RNGDataFlow
from .common import MapDataComponent, MapData
from ..utils import logger
from ..utils.argtools import shape2d
__all__ = ['ImageFromFile', 'AugmentImageComponent', 'A... | 37.245763 | 113 | 0.614221 |
ea34efdf9905384e0998fdcce698390c6919da22 | 396 | py | Python | ics/structures/s_cm_probe_settings.py | hollinsky-intrepid/python_ics | b6ec5486ec3cc2548e33845c265faccf293b88f5 | [
"Unlicense"
] | null | null | null | ics/structures/s_cm_probe_settings.py | hollinsky-intrepid/python_ics | b6ec5486ec3cc2548e33845c265faccf293b88f5 | [
"Unlicense"
] | null | null | null | ics/structures/s_cm_probe_settings.py | hollinsky-intrepid/python_ics | b6ec5486ec3cc2548e33845c265faccf293b88f5 | [
"Unlicense"
] | null | null | null | # This file was auto generated; Do not modify, if you value your sanity!
import ctypes
class s_cm_probe_settings(ctypes.Structure):
_pack_ = 2
_fields_ = [
('network_enables', ctypes.c_uint16),
('network_enabled_on_boot', ctypes.c_uint16),
]
# Extra names go here:
CmProbeSettings = s_cm_... | 24.75 | 72 | 0.724747 |
fdf1fe94fe00dc4bdca3a0f3d1ef5cf850e5f01e | 562 | py | Python | API/alembic/versions/fe37bd3c13d3_date_modified_to_users.py | sourcery-ai-bot/PageMail | 69f5a32be519e0480f35d5e10006b7228c1bc46f | [
"MIT"
] | 1 | 2021-04-02T11:05:01.000Z | 2021-04-02T11:05:01.000Z | API/alembic/versions/fe37bd3c13d3_date_modified_to_users.py | sourcery-ai-bot/PageMail | 69f5a32be519e0480f35d5e10006b7228c1bc46f | [
"MIT"
] | null | null | null | API/alembic/versions/fe37bd3c13d3_date_modified_to_users.py | sourcery-ai-bot/PageMail | 69f5a32be519e0480f35d5e10006b7228c1bc46f | [
"MIT"
] | 1 | 2021-04-02T11:05:03.000Z | 2021-04-02T11:05:03.000Z | """date_modified_to_users
Revision ID: fe37bd3c13d3
Revises: 20ffc7ac29d4
Create Date: 2021-01-24 21:01:22.300915
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'fe37bd3c13d3'
down_revision = '20ffc7ac29d4'
branch_labels = None
depends_on = None
def upgrade(... | 19.37931 | 65 | 0.69395 |
c8fb259996c2064c30154e83499749fb7402b3cf | 608 | py | Python | app/hook/hooks.py | xieningtao/maxleap_server | 6be5be1b4fccef72df85fd230a8a5c9210fb6d27 | [
"CC0-1.0"
] | 1 | 2020-02-29T08:32:54.000Z | 2020-02-29T08:32:54.000Z | app/hook/hooks.py | MaxLeap/Demo-CloudCode-Python | 561ce8d2a36c611eaea68d37e17138cdb89caab4 | [
"CC0-1.0"
] | null | null | null | app/hook/hooks.py | MaxLeap/Demo-CloudCode-Python | 561ce8d2a36c611eaea68d37e17138cdb89caab4 | [
"CC0-1.0"
] | null | null | null | #coding:utf-8
from ML import Object
from ML import Server
from ML import Log
from ML import Query
from ML import Response
@Server.before_save('Ninja')
def test1(obj):
Log.info("before_save:{}".format(obj.dump()))
@Server.after_save('Ninja')
def test2(obj):
Log.info("after_save:{}".format(obj.dump()))
@Server... | 22.518519 | 51 | 0.697368 |
2edffc6b8f5370ba162d7efea70b6286572fbf5f | 1,861 | py | Python | src/python/pants/testutil/process_test_util.py | revl/pants | 8ad83e4ca80c095d44efceafd8b41e575da39c65 | [
"Apache-2.0"
] | 1 | 2021-05-05T18:58:28.000Z | 2021-05-05T18:58:28.000Z | src/python/pants/testutil/process_test_util.py | revl/pants | 8ad83e4ca80c095d44efceafd8b41e575da39c65 | [
"Apache-2.0"
] | null | null | null | src/python/pants/testutil/process_test_util.py | revl/pants | 8ad83e4ca80c095d44efceafd8b41e575da39c65 | [
"Apache-2.0"
] | 3 | 2020-06-30T08:28:13.000Z | 2021-07-28T09:35:57.000Z | # Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from contextlib import contextmanager
from dataclasses import dataclass
from typing import Any
import psutil
class ProcessStillRunning(AssertionError):
"""Raised when a process shou... | 32.649123 | 98 | 0.693176 |
a7f4104d4b30baae0767a237b12ba86e0e09702e | 2,341 | py | Python | IIFLapis/IIFLapis/const.py | IIFLMOBILEADMIN/MarketOpenApi | d0c40584b46f30635af6bef0e87f24c345cf76fa | [
"MIT"
] | 30 | 2020-11-03T09:25:22.000Z | 2022-03-31T18:24:29.000Z | IIFLapis/IIFLapis/const.py | IIFLMOBILEADMIN/MarketOpenApi | d0c40584b46f30635af6bef0e87f24c345cf76fa | [
"MIT"
] | 25 | 2020-12-21T14:19:07.000Z | 2022-03-01T19:07:26.000Z | IIFLapis/IIFLapis/const.py | IIFLMOBILEADMIN/MarketOpenApi | d0c40584b46f30635af6bef0e87f24c345cf76fa | [
"MIT"
] | 43 | 2020-08-28T10:09:39.000Z | 2022-03-26T05:52:39.000Z | """
Contains reusable payloads across requests
"""
from .conf import APP_NAME, USER_ID, PASSWORD, USER_KEY, OCP_KEY, APP_SOURCE
from .auth import EncryptionClient
import datetime
HEADERS = {
'Content-Type': 'application/json',
'Ocp-Apim-Subscription-Key': OCP_KEY
}
HISTORICAL_CANDLE_HEADERS = {
'Content-T... | 21.878505 | 76 | 0.55959 |
fb80e972038ee42b03dcf0d12c924b486cfcb522 | 1,445 | py | Python | NeuralNet.py | ashumallik/Data-Distribution-on-a-Blockchain | 60fac9219fd5fc2f5dacd6e4faf609f7fb0f4154 | [
"MIT"
] | null | null | null | NeuralNet.py | ashumallik/Data-Distribution-on-a-Blockchain | 60fac9219fd5fc2f5dacd6e4faf609f7fb0f4154 | [
"MIT"
] | null | null | null | NeuralNet.py | ashumallik/Data-Distribution-on-a-Blockchain | 60fac9219fd5fc2f5dacd6e4faf609f7fb0f4154 | [
"MIT"
] | null | null | null | from numpy import exp, array, random, dot
@Aashutosh Mallik
class NeuralNetwork():
def __init__(self):
random.seed(1)
self.synaptic_weights = 2 * random.random((3, 1)) - 1
def __sigmoid(self, x):
return 1 / (1 + exp(-x))
def __sigmoid_derivative(self, x):
... | 26.759259 | 94 | 0.642215 |
0a309bae6bca134d06103ec0c3b617afda08a2db | 6,512 | py | Python | python_frame_bot.py | marcelOlecram/python_frame_bot | 32d3fff163e744e0c99bb823e8425afa27fb4f51 | [
"Apache-2.0"
] | null | null | null | python_frame_bot.py | marcelOlecram/python_frame_bot | 32d3fff163e744e0c99bb823e8425afa27fb4f51 | [
"Apache-2.0"
] | null | null | null | python_frame_bot.py | marcelOlecram/python_frame_bot | 32d3fff163e744e0c99bb823e8425afa27fb4f51 | [
"Apache-2.0"
] | null | null | null | import logging
import json
import time
import os
from datetime import datetime
import requests
import schedule
import functools
from frame_exceptions import FrameException
logger = logging.getLogger('frame-bot')
logger.setLevel(logging.INFO)
start_time = datetime.now().strftime("%Y-%m-%d_%H-%M-%S.log")
fileHandler = l... | 32.723618 | 106 | 0.640203 |
84874c3b470a24ddb75909462bca0c45e8b0f350 | 4,743 | py | Python | tests/test_metadata.py | linw1995/pdm-pep517 | 6b8030225ec374acf04ee70c685e55a495f24482 | [
"MIT"
] | null | null | null | tests/test_metadata.py | linw1995/pdm-pep517 | 6b8030225ec374acf04ee70c685e55a495f24482 | [
"MIT"
] | null | null | null | tests/test_metadata.py | linw1995/pdm-pep517 | 6b8030225ec374acf04ee70c685e55a495f24482 | [
"MIT"
] | null | null | null | import subprocess
from datetime import datetime
import pytest
from pdm.pep517.metadata import Metadata
from tests import FIXTURES
def test_parse_module():
metadata = Metadata(FIXTURES / "projects/demo-module/pyproject.toml")
assert metadata.name == "demo-module"
assert metadata.version == "0.1.0"
as... | 36.767442 | 88 | 0.677419 |
c49a5fc42c8f6666a65a50a5cc6b426f2caa4929 | 10,158 | py | Python | Platform/TigerlakeBoardPkg/Script/StitchIfwi.py | aimanrosli23/slimbootloader | bce49fbc5ac125cccf4f647e786409f49a026769 | [
"BSD-2-Clause-NetBSD",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"MIT",
"BSD-2-Clause-Patent"
] | 1 | 2022-03-04T18:23:35.000Z | 2022-03-04T18:23:35.000Z | Platform/TigerlakeBoardPkg/Script/StitchIfwi.py | aimanrosli23/slimbootloader | bce49fbc5ac125cccf4f647e786409f49a026769 | [
"BSD-2-Clause-NetBSD",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"MIT",
"BSD-2-Clause-Patent"
] | null | null | null | Platform/TigerlakeBoardPkg/Script/StitchIfwi.py | aimanrosli23/slimbootloader | bce49fbc5ac125cccf4f647e786409f49a026769 | [
"BSD-2-Clause-NetBSD",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"MIT",
"BSD-2-Clause-Patent"
] | null | null | null | ## @ StitchIfwi.py
# This is a python stitching script for Slim Bootloader TGL build
#
# Copyright (c) 2019 - 2022, Intel Corporation. All rights reserved. <BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
import sys
import os
import re
import imp
import struct
import argparse
import zipfile
import shutil
impo... | 43.974026 | 211 | 0.671884 |
7190582f9bead3993266767b1262613162ce055e | 56,116 | py | Python | pywinauto/application.py | badari412/pywinauto | 9380de8ded10956573fb496af4722ccf526fe743 | [
"BSD-3-Clause"
] | 1 | 2021-12-14T15:22:58.000Z | 2021-12-14T15:22:58.000Z | pywinauto/application.py | badari412/pywinauto | 9380de8ded10956573fb496af4722ccf526fe743 | [
"BSD-3-Clause"
] | null | null | null | pywinauto/application.py | badari412/pywinauto | 9380de8ded10956573fb496af4722ccf526fe743 | [
"BSD-3-Clause"
] | null | null | null | # GUI Application automation and testing library
# Copyright (C) 2006-2018 Mark Mc Mahon and Contributors
# https://github.com/pywinauto/pywinauto/graphs/contributors
# http://pywinauto.readthedocs.io/en/latest/credits.html
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or with... | 39.911807 | 115 | 0.594055 |
3ab2c1bea07899feee7379681d256940c56339fb | 351 | py | Python | test/linkage-agent/manual/time_test_manual_test_30k-x-2.py | greshje/linkage-agent-tools | bc3a041c74cfe96950a0e3c011dd6a0185ad912d | [
"Apache-2.0"
] | 1 | 2020-06-25T19:57:56.000Z | 2020-06-25T19:57:56.000Z | test/linkage-agent/manual/time_test_manual_test_30k-x-2.py | greshje/linkage-agent-tools | bc3a041c74cfe96950a0e3c011dd6a0185ad912d | [
"Apache-2.0"
] | 1 | 2021-10-01T15:13:15.000Z | 2021-10-01T15:13:15.000Z | test/linkage-agent/manual/time_test_manual_test_30k-x-2.py | greshje/linkage-agent-tools | bc3a041c74cfe96950a0e3c011dd6a0185ad912d | [
"Apache-2.0"
] | null | null | null | # ------
#
# This test is not part of the automated test suite. It is intended to be
# run manually after the data folder has been copied to C:\test.
#
# This module exists primarily to enable debugging of the process called by the cmd line
#
# ------
import time_test as tt
if __name__ == "__main__":
tt.run_test... | 25.071429 | 88 | 0.68661 |
bc7f5a64a2e62285ae4035a7481bf41fa8493c0f | 4,114 | py | Python | generator/protobuf/psa_sign_hash_pb2.py | hug-dev/parsec-mock | a7fc83701256264b60871b4e704aaffb20d3428c | [
"Apache-2.0"
] | null | null | null | generator/protobuf/psa_sign_hash_pb2.py | hug-dev/parsec-mock | a7fc83701256264b60871b4e704aaffb20d3428c | [
"Apache-2.0"
] | null | null | null | generator/protobuf/psa_sign_hash_pb2.py | hug-dev/parsec-mock | a7fc83701256264b60871b4e704aaffb20d3428c | [
"Apache-2.0"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: psa_sign_hash.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as ... | 32.650794 | 341 | 0.752309 |
50f740c9df4c5cab49769885a5b5ab2f155ea96b | 86 | py | Python | aws_lambda_builders/__init__.py | verdimrc/aws-lambda-builders | 67f42dd936fd4f0c517c38acb8b6a170156549ec | [
"Apache-2.0"
] | null | null | null | aws_lambda_builders/__init__.py | verdimrc/aws-lambda-builders | 67f42dd936fd4f0c517c38acb8b6a170156549ec | [
"Apache-2.0"
] | null | null | null | aws_lambda_builders/__init__.py | verdimrc/aws-lambda-builders | 67f42dd936fd4f0c517c38acb8b6a170156549ec | [
"Apache-2.0"
] | null | null | null | """
AWS Lambda Builder Library
"""
__version__ = "1.1.0"
RPC_PROTOCOL_VERSION = "0.3"
| 14.333333 | 28 | 0.686047 |
dc304fc73c172d561b3b473fa0aebf2b106ee287 | 140 | py | Python | lioght/blueprints/ui/views.py | Ketouem/lioght | ae016a314653cf547b992b06e5d77e13d8f62afc | [
"MIT"
] | null | null | null | lioght/blueprints/ui/views.py | Ketouem/lioght | ae016a314653cf547b992b06e5d77e13d8f62afc | [
"MIT"
] | null | null | null | lioght/blueprints/ui/views.py | Ketouem/lioght | ae016a314653cf547b992b06e5d77e13d8f62afc | [
"MIT"
] | null | null | null | from flask import render_template
from . import ui
@ui.route("/", methods=["GET"])
def index():
return render_template("index.html")
| 15.555556 | 40 | 0.692857 |
f793d8d9f737b7f8bfcf94ed38c9771da6351344 | 566 | py | Python | ai_economist/foundation/scenarios/__init__.py | tljstewart/ai-economist | 4f57accbed95522a1ad90c50f7810282fde6e52c | [
"BSD-3-Clause"
] | 795 | 2020-08-06T04:58:00.000Z | 2022-03-30T05:14:59.000Z | ai_economist/foundation/scenarios/__init__.py | SocioProphet/ai-economist | 4ae6a7ddb7481eb22cde8f42267024fc9a6dbc01 | [
"BSD-3-Clause"
] | 30 | 2020-08-06T20:24:05.000Z | 2022-03-04T00:59:30.000Z | ai_economist/foundation/scenarios/__init__.py | SocioProphet/ai-economist | 4ae6a7ddb7481eb22cde8f42267024fc9a6dbc01 | [
"BSD-3-Clause"
] | 150 | 2020-08-06T20:34:25.000Z | 2022-03-30T13:28:20.000Z | # Copyright (c) 2020, salesforce.com, inc.
# All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause
# For full license text, see the LICENSE file in the repo root
# or https://opensource.org/licenses/BSD-3-Clause
from ai_economist.foundation.base.base_env import scenario_registry
from .covid19 import covid19_en... | 37.733333 | 67 | 0.720848 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.