hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e87e61caeabea7a4911a24a31a3d383ae4ecb968 | 126 | py | Python | Server/myLibrary/admin.py | sepehrNorouzi/SemUniLib | dffeeb769ce5da4fb45a83d1792ec24adbb866e9 | [
"MIT"
] | null | null | null | Server/myLibrary/admin.py | sepehrNorouzi/SemUniLib | dffeeb769ce5da4fb45a83d1792ec24adbb866e9 | [
"MIT"
] | null | null | null | Server/myLibrary/admin.py | sepehrNorouzi/SemUniLib | dffeeb769ce5da4fb45a83d1792ec24adbb866e9 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Book, Favorite
admin.site.register(Book)
admin.site.register(Favorite) | 18 | 34 | 0.809524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e88065d21621edc95c47aa6a03e2fdbde75bbf30 | 329 | py | Python | kwickstart/templates/flask/app.py | TxConvergentAdmin/convergent-kwickstart | 42374a1705c019ceb34e6ece718df3c17695b852 | [
"MIT"
] | 1 | 2020-02-07T17:52:48.000Z | 2020-02-07T17:52:48.000Z | kwickstart/templates/flask/app.py | TxConvergentAdmin/convergent-kwickstart | 42374a1705c019ceb34e6ece718df3c17695b852 | [
"MIT"
] | null | null | null | kwickstart/templates/flask/app.py | TxConvergentAdmin/convergent-kwickstart | 42374a1705c019ceb34e6ece718df3c17695b852 | [
"MIT"
] | null | null | null | from flask import Flask, jsonify, request
PORT = 5000
app = Flask(__name__)
@app.route('/')
def index():
return 'Hello World'
@app.route('/data')
def data():
return jsonify({'error': False, 'data': 123})
if __name__ == "__main__":
print('Running on http://127.0.0.1:' + str(PORT))
app.run('0.0.0.0... | 16.45 | 53 | 0.613982 | 0 | 0 | 0 | 0 | 134 | 0.407295 | 0 | 0 | 85 | 0.258359 |
e880fa35b7e36d07b02deb13e8b1c032e539faee | 7,407 | py | Python | backend/kesaseteli/applications/api/v1/views.py | jannetasa/yjdh | 5d86a56c722dfbcee03110f66c7e7ddbea966db9 | [
"MIT"
] | null | null | null | backend/kesaseteli/applications/api/v1/views.py | jannetasa/yjdh | 5d86a56c722dfbcee03110f66c7e7ddbea966db9 | [
"MIT"
] | null | null | null | backend/kesaseteli/applications/api/v1/views.py | jannetasa/yjdh | 5d86a56c722dfbcee03110f66c7e7ddbea966db9 | [
"MIT"
] | null | null | null | from django.core import exceptions
from django.http import FileResponse
from django.utils.text import format_lazy
from django.utils.translation import gettext_lazy as _
from rest_framework import status
from rest_framework.decorators import action
from rest_framework.exceptions import ValidationError
from rest_framewor... | 35.104265 | 88 | 0.63413 | 6,309 | 0.851762 | 0 | 0 | 2,925 | 0.394897 | 0 | 0 | 1,234 | 0.166599 |
e8817a9d7c1201faed352ef258a2c751aff02a0a | 88 | py | Python | run.py | tildecross/tildex-txdb | bc32e1875c55cedfbf4ce7d00174b4b7bf68525f | [
"BSD-3-Clause"
] | null | null | null | run.py | tildecross/tildex-txdb | bc32e1875c55cedfbf4ce7d00174b4b7bf68525f | [
"BSD-3-Clause"
] | 1 | 2017-10-15T01:11:11.000Z | 2019-10-18T20:02:32.000Z | run.py | tildecross/tildex-txdb | bc32e1875c55cedfbf4ce7d00174b4b7bf68525f | [
"BSD-3-Clause"
] | null | null | null | #!env/bin/python3
from app import app
app.run(debug=True, host="localhost", port=8202)
| 17.6 | 48 | 0.738636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.318182 |
e88349bf365f46b6777bfd58c649dbe067a90780 | 8,647 | py | Python | yiff_image_scraper.py | viktor02/Yiff.party-Image-Scraper | 44018a23ff2ddb4d38a44200aab56e1c01457821 | [
"MIT"
] | null | null | null | yiff_image_scraper.py | viktor02/Yiff.party-Image-Scraper | 44018a23ff2ddb4d38a44200aab56e1c01457821 | [
"MIT"
] | null | null | null | yiff_image_scraper.py | viktor02/Yiff.party-Image-Scraper | 44018a23ff2ddb4d38a44200aab56e1c01457821 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup as bs
import requests
import sys
import os
import platform
amountOfLinks = len(sys.argv)-1
urlCounter = 0
urlList = []
missingFiles = []
userAgent = "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2225.0 Safari/537.36"
dirSep = ""
system... | 35.293878 | 165 | 0.566902 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,600 | 0.300682 |
e8842b920ecc15088becbb1b9e81fd1fd0244038 | 3,031 | py | Python | api.py | klapp101/GOAT | f948bf8d6566f27e6b55ed49a34dc470df854249 | [
"MIT"
] | 1 | 2020-06-13T04:24:23.000Z | 2020-06-13T04:24:23.000Z | api.py | klapp101/GOAT | f948bf8d6566f27e6b55ed49a34dc470df854249 | [
"MIT"
] | null | null | null | api.py | klapp101/GOAT | f948bf8d6566f27e6b55ed49a34dc470df854249 | [
"MIT"
] | null | null | null | import json
import requests
import time
from discord_webhook import DiscordWebhook, DiscordEmbed
webhook_url = 'https://discordapp.com/api/webhooks/672159508675690497/4UtaClAc7rKMJsEvbR4iYf-Razv4M3ZWtkYDOxBzLfiDzJhI7RSFpoLn6iijBiRcaNOR'
webhook = DiscordWebhook(webhook_url)
pid = '508214-660'
headers = {
'Connecti... | 40.413333 | 238 | 0.670406 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,395 | 0.460244 |
e8846d4d1a26fec464850cfbf7a7e60056a6debf | 3,898 | py | Python | pytai/tests/test_application.py | angea/pytai | 2db2518be9c4324aed182f36208c0e0ccf53a96c | [
"Apache-2.0"
] | 30 | 2021-08-12T12:50:18.000Z | 2022-02-18T03:49:20.000Z | pytai/tests/test_application.py | angea/pytai | 2db2518be9c4324aed182f36208c0e0ccf53a96c | [
"Apache-2.0"
] | 3 | 2021-10-31T17:28:39.000Z | 2021-11-12T13:19:14.000Z | pytai/tests/test_application.py | angea/pytai | 2db2518be9c4324aed182f36208c0e0ccf53a96c | [
"Apache-2.0"
] | 5 | 2021-10-31T15:55:19.000Z | 2022-02-24T06:31:18.000Z | """Unit tests for the pytai application.
License:
MIT License
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
... | 35.436364 | 96 | 0.641355 | 2,107 | 0.540534 | 0 | 0 | 290 | 0.074397 | 0 | 0 | 1,612 | 0.413545 |
e885d4d5a1bfe3061457ca2b736ac1a2e85b233e | 6,898 | py | Python | project-posenet/pose_opencv.py | vanduc103/coral_examples | a514d003a3948cb0888d2dabc0bdd93939f8ddd0 | [
"Apache-2.0"
] | null | null | null | project-posenet/pose_opencv.py | vanduc103/coral_examples | a514d003a3948cb0888d2dabc0bdd93939f8ddd0 | [
"Apache-2.0"
] | null | null | null | project-posenet/pose_opencv.py | vanduc103/coral_examples | a514d003a3948cb0888d2dabc0bdd93939f8ddd0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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, ... | 37.901099 | 127 | 0.615251 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,035 | 0.295013 |
e8868197bd242c39ce7b91dd052bac2dfdb7f10c | 4,989 | py | Python | src/fparser/two/tests/fortran2003/test_include_statement.py | sturmianseq/fparser | bf3cba3f31a72671d4d4a93b6ef4f9832006219f | [
"BSD-3-Clause"
] | 33 | 2017-08-18T16:31:27.000Z | 2022-03-28T09:43:50.000Z | src/fparser/two/tests/fortran2003/test_include_statement.py | sturmianseq/fparser | bf3cba3f31a72671d4d4a93b6ef4f9832006219f | [
"BSD-3-Clause"
] | 319 | 2017-01-12T14:22:07.000Z | 2022-03-23T20:53:25.000Z | src/fparser/two/tests/fortran2003/test_include_statement.py | sturmianseq/fparser | bf3cba3f31a72671d4d4a93b6ef4f9832006219f | [
"BSD-3-Clause"
] | 17 | 2017-10-13T07:12:28.000Z | 2022-02-11T14:42:18.000Z | # Copyright (c) 2019 Science and Technology Facilities Council
# All rights reserved.
# Modifications made as part of the fparser project are distributed
# under the following license:
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following condi... | 38.976563 | 78 | 0.713971 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,501 | 0.701744 |
e8876c2cd4fe9d62ba323bed4e9d4016649f22e9 | 4,992 | py | Python | src/common.py | OdatNurd/HyperHelpAuthor | 8082a8eb35d54b53299e421c6005ae5c1fb49b13 | [
"MIT"
] | 1 | 2020-08-18T16:12:06.000Z | 2020-08-18T16:12:06.000Z | src/common.py | OdatNurd/HyperHelpAuthor | 8082a8eb35d54b53299e421c6005ae5c1fb49b13 | [
"MIT"
] | 2 | 2020-02-21T22:48:56.000Z | 2020-02-21T23:15:51.000Z | src/common.py | OdatNurd/HyperHelpAuthor | 8082a8eb35d54b53299e421c6005ae5c1fb49b13 | [
"MIT"
] | null | null | null | import sublime
import os
import textwrap
import hyperhelpcore
from hyperhelpcore.common import log, hh_syntax
from hyperhelpcore.core import help_index_list
###----------------------------------------------------------------------------
def loaded():
"""
Do package setup at package load time.
"""
... | 29.892216 | 79 | 0.634215 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,451 | 0.490986 |
e8887bd9a2e073f305e0565db697d9a93e02600d | 318 | py | Python | player/migrations/0002_remove_music_thumbnail.py | Amoki/Amoki-Music | 77b0e426fe9cc6c9cd12346a5e5e81a62362bb83 | [
"MIT"
] | 3 | 2015-06-16T11:12:29.000Z | 2019-05-03T09:09:21.000Z | player/migrations/0002_remove_music_thumbnail.py | Amoki/Amoki-Music | 77b0e426fe9cc6c9cd12346a5e5e81a62362bb83 | [
"MIT"
] | 16 | 2015-08-18T14:35:55.000Z | 2021-06-10T17:31:04.000Z | player/migrations/0002_remove_music_thumbnail.py | Amoki/Amoki-Music | 77b0e426fe9cc6c9cd12346a5e5e81a62362bb83 | [
"MIT"
] | 1 | 2016-10-19T14:48:52.000Z | 2016-10-19T14:48:52.000Z | from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('player', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='music',
name='thumbnail',
),
]
| 17.666667 | 40 | 0.603774 | 233 | 0.732704 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.125786 |
e888f8bf6414e902932d3653ddddb568bc3aa26b | 5,717 | py | Python | build_card_bank.py | lawrencesim/portuguese-verb-cards | 3d754981bc5195057cf88a27741bc2eea1722f13 | [
"MIT"
] | null | null | null | build_card_bank.py | lawrencesim/portuguese-verb-cards | 3d754981bc5195057cf88a27741bc2eea1722f13 | [
"MIT"
] | null | null | null | build_card_bank.py | lawrencesim/portuguese-verb-cards | 3d754981bc5195057cf88a27741bc2eea1722f13 | [
"MIT"
] | null | null | null | import os, csv, time, shutil
from bin import cardbank
from bin import builder
def add_build(add_cards):
'''Build card bank by specifically adding new cards.'''
# process new cards to add
if not add_cards:
return
add_card_map = {}
for card in add_cards:
add_card_map[card["inf"]] = ... | 35.955975 | 99 | 0.62078 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,826 | 0.319398 |
e889b7bfe344006d80c5021c1a5f4296e429ca4d | 1,749 | py | Python | flaskapp/models.py | guillermosainz/instareplic | a4fb26269d54be1a140b1802a4d8013a6aa0ec70 | [
"MIT"
] | 53 | 2015-02-15T19:00:33.000Z | 2022-02-08T09:58:54.000Z | flaskapp/models.py | guillermosainz/instareplic | a4fb26269d54be1a140b1802a4d8013a6aa0ec70 | [
"MIT"
] | 5 | 2016-06-03T13:12:50.000Z | 2018-05-29T08:31:44.000Z | flaskapp/models.py | guillermosainz/instareplic | a4fb26269d54be1a140b1802a4d8013a6aa0ec70 | [
"MIT"
] | 15 | 2016-05-18T20:09:53.000Z | 2020-06-01T04:06:00.000Z | from mongoengine import StringField, EmailField, BooleanField
from flask.ext.login import UserMixin
import requests
import json
from mongoengine import Document
from social.apps.flask_app.me.models import FlaskStorage
class User(Document, UserMixin):
username = StringField(max_length=200)
password = StringFi... | 30.155172 | 108 | 0.644368 | 1,527 | 0.87307 | 0 | 0 | 0 | 0 | 0 | 0 | 241 | 0.137793 |
e88a42379408c1158246f618ad6b8e62971bdb21 | 1,924 | py | Python | src/compas_blender/geometry/__init__.py | adacko/compas | 47c443ad3825897ec7ed932ec20734c2f08ef120 | [
"MIT"
] | null | null | null | src/compas_blender/geometry/__init__.py | adacko/compas | 47c443ad3825897ec7ed932ec20734c2f08ef120 | [
"MIT"
] | null | null | null | src/compas_blender/geometry/__init__.py | adacko/compas | 47c443ad3825897ec7ed932ec20734c2f08ef120 | [
"MIT"
] | 1 | 2022-01-16T02:32:43.000Z | 2022-01-16T02:32:43.000Z | """
********************************************************************************
compas_blender.geometry
********************************************************************************
.. currentmodule:: compas_blender.geometry
Object-oriented convenience wrappers for native Blender geometry.
.. autosummary::
... | 16.168067 | 80 | 0.596674 | 1,201 | 0.62422 | 0 | 0 | 423 | 0.219854 | 0 | 0 | 507 | 0.263514 |
e88a581db548ce41d35b785b7240edca51e28965 | 1,136 | py | Python | notes/reference/tutorials/an-introduction-to-asynch-programming-and-twisted/exercises/part3/ex2.py | aav789/study-notes | 34eca00cd48869ba7a79c0ea7d8948ee9bde72b9 | [
"MIT"
] | 43 | 2015-06-10T14:48:00.000Z | 2020-11-29T16:22:28.000Z | notes/reference/tutorials/an-introduction-to-asynch-programming-and-twisted/exercises/part3/ex2.py | aav789/study-notes | 34eca00cd48869ba7a79c0ea7d8948ee9bde72b9 | [
"MIT"
] | 1 | 2021-11-01T12:01:44.000Z | 2021-11-01T12:01:44.000Z | notes/reference/tutorials/an-introduction-to-asynch-programming-and-twisted/exercises/part3/ex2.py | lextoumbourou/notes | 5f94c59a467eb3eb387542bdce398abc0365e6a7 | [
"MIT"
] | 40 | 2015-03-02T10:33:59.000Z | 2020-05-24T12:17:05.000Z | from twisted.internet import reactor, task
class CounterManager(object):
counters = []
@classmethod
def add_counter(cls, counter):
cls.counters.append(counter)
@classmethod
def has_active_counters(cls):
return all([not c.is_active for c in cls.counters])
class Counter(object):
... | 24.170213 | 59 | 0.612676 | 980 | 0.862676 | 0 | 0 | 190 | 0.167254 | 0 | 0 | 50 | 0.044014 |
e88a6019801aa572d384a6160bf098fc3d5f5bab | 6,889 | py | Python | tests/unit/test_validation_builder.py | shashank-google/professional-services-data-validator | db9c63add4a3ab40b09113ca7ed1c03b7c12e6f2 | [
"Apache-2.0"
] | 1 | 2021-12-24T10:01:31.000Z | 2021-12-24T10:01:31.000Z | tests/unit/test_validation_builder.py | shashank-google/professional-services-data-validator | db9c63add4a3ab40b09113ca7ed1c03b7c12e6f2 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_validation_builder.py | shashank-google/professional-services-data-validator | db9c63add4a3ab40b09113ca7ed1c03b7c12e6f2 | [
"Apache-2.0"
] | null | null | null | # 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 agreed to in writing, ... | 32.649289 | 83 | 0.724488 | 38 | 0.005516 | 0 | 0 | 133 | 0.019306 | 0 | 0 | 1,713 | 0.248657 |
e88aaaf26e2de6b48dfc79634b91841480741eb1 | 2,163 | py | Python | venv/lib/python3.8/site-packages/azureml/_restclient/models/private_endpoint_connection.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/azureml/_restclient/models/private_endpoint_connection.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/azureml/_restclient/models/private_endpoint_connection.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.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 2.3.3... | 47.021739 | 151 | 0.691632 | 1,624 | 0.750809 | 0 | 0 | 0 | 0 | 0 | 0 | 1,544 | 0.713823 |
e88e2ada84f6797bbe06ad18554f171bfb1b346a | 3,100 | py | Python | src/chainalytic_icon/provider/api_bundle.py | yudus-lab/chainalytic-icon | 2c4ef9dde9e94a98a2efabccfb84f853e3a85b0d | [
"Apache-2.0"
] | 1 | 2021-02-24T18:15:10.000Z | 2021-02-24T18:15:10.000Z | src/chainalytic_icon/provider/api_bundle.py | yudus-lab/chainalytic-icon | 2c4ef9dde9e94a98a2efabccfb84f853e3a85b0d | [
"Apache-2.0"
] | null | null | null | src/chainalytic_icon/provider/api_bundle.py | yudus-lab/chainalytic-icon | 2c4ef9dde9e94a98a2efabccfb84f853e3a85b0d | [
"Apache-2.0"
] | null | null | null | import traceback
from typing import Any, Callable, Dict, List, Optional, Set, Tuple
from chainalytic_icon.common import config, util
class ApiBundle(object):
"""
The interface to external consumers/applications
"""
def __init__(self, working_dir: str):
super(ApiBundle, self).__init__()
... | 36.904762 | 98 | 0.624839 | 2,963 | 0.955806 | 0 | 0 | 0 | 0 | 2,309 | 0.744839 | 608 | 0.196129 |
e8910b54a876264e2bd19a91436e6a9f6f4eca70 | 447 | py | Python | __scraping__/just-eat.fr - robobrowser/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 140 | 2017-02-21T22:49:04.000Z | 2022-03-22T17:51:58.000Z | __scraping__/just-eat.fr - robobrowser/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 5 | 2017-12-02T19:55:00.000Z | 2021-09-22T23:18:39.000Z | __scraping__/just-eat.fr - robobrowser/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 79 | 2017-01-25T10:53:33.000Z | 2022-03-11T16:13:57.000Z |
# date: 2019.05.05
# author: Bartłomiej 'furas' Burek
import robobrowser
br = robobrowser.RoboBrowser(user_agent='Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/31.0')
br.parser = 'lxml'
br.open("https://www.just-eat.fr")
print(br.get_forms())
iframe_src = br.select('iframe')[0]['src']
print(iframe_... | 21.285714 | 109 | 0.709172 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 215 | 0.479911 |
e89153be340928f8158c97cd385e8881185901f0 | 2,880 | py | Python | winning_ticket/src/model_utils.py | zankner/WinningTickets | fe40a6e74454e6ea96949f2c16263ed1a1aea6fa | [
"MIT"
] | null | null | null | winning_ticket/src/model_utils.py | zankner/WinningTickets | fe40a6e74454e6ea96949f2c16263ed1a1aea6fa | [
"MIT"
] | null | null | null | winning_ticket/src/model_utils.py | zankner/WinningTickets | fe40a6e74454e6ea96949f2c16263ed1a1aea6fa | [
"MIT"
] | null | null | null | import copy
import torch
from utils import helpers
from utils.layers import conv, linear, batch_norm
def ticketfy(model, split_rate, split_mode="kels"):
conv_layers, linear_layers, bn_layers = helpers.get_layers(model)
for n, _ in conv_layers:
cur_conv = helpers.rgetattr(model, n)
helpers.rs... | 38.918919 | 93 | 0.542014 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 219 | 0.076042 |
e892309adfae5627e160795d9ed6e92ccebca92c | 145 | py | Python | tests/test_get_term_list.py | vineetjohn/invest-o-scrape | 696a06538e0e2f1f4c2180bf43657861966a2685 | [
"MIT"
] | 5 | 2019-12-19T05:25:00.000Z | 2022-01-31T19:09:31.000Z | tests/test_get_term_list.py | vineetjohn/invest-o-scrape | 696a06538e0e2f1f4c2180bf43657861966a2685 | [
"MIT"
] | null | null | null | tests/test_get_term_list.py | vineetjohn/invest-o-scrape | 696a06538e0e2f1f4c2180bf43657861966a2685 | [
"MIT"
] | 3 | 2020-03-04T02:24:36.000Z | 2022-01-31T19:09:38.000Z | from utils import scrape_helper
url = "http://www.investopedia.com/terms/1/"
links = scrape_helper.get_term_links_from_page(url)
print(links)
| 18.125 | 51 | 0.786207 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.262069 |
e8927003c1e8983886adadf1d66dd6660f512ad2 | 1,626 | py | Python | nototools/drop_hints.py | RoelN/nototools | 76b29f8f8f9beaff47b6922b3b664ab2c4c680f6 | [
"Apache-2.0"
] | 156 | 2015-06-11T00:03:49.000Z | 2019-03-12T10:05:14.000Z | nototools/drop_hints.py | RoelN/nototools | 76b29f8f8f9beaff47b6922b3b664ab2c4c680f6 | [
"Apache-2.0"
] | 323 | 2015-06-09T21:26:40.000Z | 2019-04-09T11:09:52.000Z | nototools/drop_hints.py | RoelN/nototools | 76b29f8f8f9beaff47b6922b3b664ab2c4c680f6 | [
"Apache-2.0"
] | 63 | 2015-06-09T19:21:58.000Z | 2019-03-27T21:52:30.000Z | #!/usr/bin/env python
#
# Copyright 2014 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 require... | 28.526316 | 74 | 0.688807 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 884 | 0.543665 |
e8928c1b30720641401724d98a6992e27f9c6712 | 5,438 | py | Python | imapclient/response_lexer.py | maxiimou/imapclient | 755936fb2ac4a3da9f898e504cd1a8f4b5da9b84 | [
"BSD-3-Clause"
] | null | null | null | imapclient/response_lexer.py | maxiimou/imapclient | 755936fb2ac4a3da9f898e504cd1a8f4b5da9b84 | [
"BSD-3-Clause"
] | 2 | 2019-05-01T08:41:02.000Z | 2020-01-03T21:54:51.000Z | imapclient/response_lexer.py | maxiimou/imapclient | 755936fb2ac4a3da9f898e504cd1a8f4b5da9b84 | [
"BSD-3-Clause"
] | 5 | 2015-12-03T03:17:52.000Z | 2021-01-31T13:10:25.000Z | # Copyright (c) 2014, Menno Smits
# Released subject to the New BSD License
# Please see http://en.wikipedia.org/wiki/BSD_licenses
"""
A lexical analyzer class for IMAP responses.
Although Lexer does all the work, TokenSource is the class to use for
external callers.
"""
from __future__ import unicode_literals
from... | 31.433526 | 82 | 0.582383 | 4,042 | 0.743288 | 1,635 | 0.300662 | 87 | 0.015999 | 0 | 0 | 1,466 | 0.269584 |
e89384cd4e1e1e1278f38d2fac8d56157408b3f2 | 149 | py | Python | src/bert_summarizer/data/__init__.py | k-tahiro/bert-summarizer | 03a09676130e4706b42ba6ab53c545fd10b84bce | [
"MIT"
] | 8 | 2020-10-05T02:34:40.000Z | 2021-11-29T01:38:41.000Z | src/bert_summarizer/data/__init__.py | k-tahiro/bert-summarizer | 03a09676130e4706b42ba6ab53c545fd10b84bce | [
"MIT"
] | 5 | 2021-04-01T07:15:26.000Z | 2022-03-15T02:48:18.000Z | src/bert_summarizer/data/__init__.py | k-tahiro/bert-summarizer | 03a09676130e4706b42ba6ab53c545fd10b84bce | [
"MIT"
] | 2 | 2021-09-30T09:10:55.000Z | 2022-01-29T03:05:46.000Z | from .data_collator import (
DataCollatorWithPaddingWithAdditionalFeatures,
EncoderDecoderDataCollatorWithPadding,
)
from .datasets import *
| 24.833333 | 50 | 0.825503 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e894d63a61f84c8bd811e9165930421a819cf713 | 274 | py | Python | app/api_docs/__init__.py | linrong/flask-server | 5f0896c6ccedb6b172b9af7e1018600e38a2df43 | [
"MIT"
] | null | null | null | app/api_docs/__init__.py | linrong/flask-server | 5f0896c6ccedb6b172b9af7e1018600e38a2df43 | [
"MIT"
] | 1 | 2019-09-06T10:06:47.000Z | 2019-09-10T07:18:47.000Z | app/api_docs/__init__.py | linrong/flask-server | 5f0896c6ccedb6b172b9af7e1018600e38a2df43 | [
"MIT"
] | null | null | null | # _*_ coding: utf-8 _*_
"""
Created by lr on 2019/08/29.
此模块用来编写flasgger中api列表下的详细操作信息
"""
from app.api_docs.v1 import user, client, token, \
banner, theme, product, category, \
address, order, pay
from app.api_docs.cms import cms_user, file
__author__ = 'lr' | 24.909091 | 50 | 0.69708 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.422581 |
e8965b0b4a9f953e4d371e88df279eb8809cdfa7 | 5,512 | py | Python | floss/decoding_manager.py | fireeye/flare-floss | dccba79912b22c1f24267da276d9bb8653f40d05 | [
"Apache-2.0"
] | 2,067 | 2016-03-02T20:20:40.000Z | 2021-09-21T11:07:00.000Z | floss/decoding_manager.py | fireeye/flare-floss | dccba79912b22c1f24267da276d9bb8653f40d05 | [
"Apache-2.0"
] | 355 | 2016-03-05T02:28:59.000Z | 2021-09-10T19:27:48.000Z | floss/decoding_manager.py | fireeye/flare-floss | dccba79912b22c1f24267da276d9bb8653f40d05 | [
"Apache-2.0"
] | 371 | 2016-03-05T02:17:22.000Z | 2021-09-17T17:22:51.000Z | # Copyright (C) 2017 Mandiant, Inc. All Rights Reserved.
import logging
from typing import List, Tuple
from dataclasses import dataclass
import viv_utils
import envi.memory
import viv_utils.emulator_drivers
from envi import Emulator
from . import api_hooks
logger = logging.getLogger("floss")
MAX_MAPS_SIZE = 1024 * ... | 28.708333 | 113 | 0.690312 | 1,177 | 0.213534 | 0 | 0 | 457 | 0.08291 | 0 | 0 | 2,377 | 0.431241 |
e896f1a87a2c3adcfa47ef323b2471d56dc8264e | 4,575 | py | Python | data_provider/lanenet_hnet_data_processor.py | aj96/lanenet-lane-detection | d83250844d07aecae9515fe0acc7e6dde291177a | [
"Apache-2.0"
] | 10 | 2018-09-26T03:06:23.000Z | 2021-12-01T05:21:11.000Z | data_provider/lanenet_hnet_data_processor.py | aj96/lanenet-lane-detection | d83250844d07aecae9515fe0acc7e6dde291177a | [
"Apache-2.0"
] | null | null | null | data_provider/lanenet_hnet_data_processor.py | aj96/lanenet-lane-detection | d83250844d07aecae9515fe0acc7e6dde291177a | [
"Apache-2.0"
] | 8 | 2018-09-26T03:19:25.000Z | 2021-12-01T05:21:13.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 18-5-21 下午3:33
# @Author : Luo Yao
# @Site : http://icode.baidu.com/repos/baidu/personal-code/Luoyao
# @File : lanenet_hnet_data_processor.py
# @IDE: PyCharm Community Edition
"""
实现LaneNet中的HNet训练数据流
"""
import os.path as ops
import json
import cv2
imp... | 31.770833 | 97 | 0.555847 | 3,511 | 0.755867 | 0 | 0 | 0 | 0 | 0 | 0 | 801 | 0.172443 |
e898f497f22d8500e90feb973845a09707c2e56c | 994 | py | Python | schedule.py | kw90/drlnd_continuous-control | a28cc6071b7c36706c07dc01f343d941a7691f4e | [
"BSD-3-Clause"
] | 1 | 2021-01-06T02:15:49.000Z | 2021-01-06T02:15:49.000Z | schedule.py | kw90/drlnd_continuous-control | a28cc6071b7c36706c07dc01f343d941a7691f4e | [
"BSD-3-Clause"
] | 5 | 2020-06-04T05:06:51.000Z | 2022-03-12T00:33:08.000Z | baby_rl/utils/schedule.py | Sohojoe/UdacityDeepRL-Project2 | 7137eea0b606ea32d00424d23130ff213f03ecf1 | [
"MIT"
] | null | null | null | #######################################################################
# Copyright (C) 2017 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
################################... | 32.064516 | 76 | 0.469819 | 630 | 0.633803 | 0 | 0 | 0 | 0 | 0 | 0 | 355 | 0.357143 |
e89ab840c3de2e69c803f5aef5da15d296e1afb7 | 327 | py | Python | web scrapy/scrapy/criptoprice.py | douguedh/Project | 3a3569939d96eb7b36301fd84688fc72caf17e9a | [
"MIT"
] | null | null | null | web scrapy/scrapy/criptoprice.py | douguedh/Project | 3a3569939d96eb7b36301fd84688fc72caf17e9a | [
"MIT"
] | null | null | null | web scrapy/scrapy/criptoprice.py | douguedh/Project | 3a3569939d96eb7b36301fd84688fc72caf17e9a | [
"MIT"
] | null | null | null |
import requests
import bs4
dateList = []
higlist = []
lowlist= []
r = requests.get(
'https://coinmarketcap.com/currencies/bitcoin/historical-data/')
soup = bs4.BeautifulSoup(r.text, "lxml")
tr = soup.find_all('tr',{'class':'text-right'})
for item in tr:
dateList.append(item.find('td', {'class':'text-left'}... | 20.4375 | 68 | 0.672783 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 114 | 0.348624 |
e89ad32707174026597cf08571266501ed12a036 | 1,517 | py | Python | pyQuARC/code/constants.py | NASA-IMPACT/pyQuARC | 9c174624a9d3e340cf91c7925aaae2203515e13f | [
"Apache-2.0"
] | 9 | 2021-03-12T18:04:25.000Z | 2022-03-22T01:30:56.000Z | pyQuARC/code/constants.py | NASA-IMPACT/pyQuARC | 9c174624a9d3e340cf91c7925aaae2203515e13f | [
"Apache-2.0"
] | 129 | 2021-04-19T15:42:12.000Z | 2022-03-28T16:50:39.000Z | pyQuARC/code/constants.py | NASA-IMPACT/pyQuARC | 9c174624a9d3e340cf91c7925aaae2203515e13f | [
"Apache-2.0"
] | 1 | 2022-03-30T20:33:30.000Z | 2022-03-30T20:33:30.000Z | import os
from colorama import Fore, Style
from pathlib import Path
DIF = "dif10"
ECHO10 = "echo10"
UMM_JSON = "umm-json"
ROOT_DIR = (
# go up one directory
Path(__file__).resolve().parents[1]
)
SCHEMAS_BASE_PATH = f"{ROOT_DIR}/schemas"
SCHEMAS = {
"json": [
"checks",
"check_messages",
... | 19.960526 | 82 | 0.603164 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 690 | 0.454845 |
e89be0e46a4e4f06c678ed62e880b446af83ee7d | 4,294 | py | Python | src/thresholding/Utilities.py | dsp-uga/Team-kieffer | f71ebcea3928d00496fb32156ebe990083795d29 | [
"MIT"
] | null | null | null | src/thresholding/Utilities.py | dsp-uga/Team-kieffer | f71ebcea3928d00496fb32156ebe990083795d29 | [
"MIT"
] | null | null | null | src/thresholding/Utilities.py | dsp-uga/Team-kieffer | f71ebcea3928d00496fb32156ebe990083795d29 | [
"MIT"
] | null | null | null | """
Author: Narinder Singh Project: Cilia Segmentation Date: 27 Feb 2019
Course: CSCI 8360 @ UGA Semester: Spring 2019 Module: Utilities.py
Description: This module contains methods and classes that make life easier.
"""
import os
import sys
import numpy as np
import matplotlib.pyplot as matplot
from... | 24.678161 | 199 | 0.698882 | 790 | 0.183978 | 0 | 0 | 0 | 0 | 0 | 0 | 1,951 | 0.454355 |
e89cf0f4f8fc704184437ad6bef375fef0886990 | 3,467 | py | Python | main.py | Jemeni11/Fic-Retriever | 9f0d94e5b266a9c2469512bbb46c7099f61796f5 | [
"MIT"
] | null | null | null | main.py | Jemeni11/Fic-Retriever | 9f0d94e5b266a9c2469512bbb46c7099f61796f5 | [
"MIT"
] | null | null | null | main.py | Jemeni11/Fic-Retriever | 9f0d94e5b266a9c2469512bbb46c7099f61796f5 | [
"MIT"
] | null | null | null | # This example requires the 'members' and 'message_content' privileged intents
import re
import os
import discord
from discord.ext import commands
from embed_messages.SH_Embed import ScribbleHubEmbed
from embed_messages.AO3_Embed import ArchiveOfOurOwnEmbed
from embed_messages.FF_Embed import FanFictionDotNetEmbed
f... | 37.27957 | 110 | 0.627632 | 0 | 0 | 0 | 0 | 2,090 | 0.602827 | 2,068 | 0.596481 | 2,266 | 0.653591 |
e89d13c3f0f4c6c26ca619df2f3d4497d8221a2b | 76 | py | Python | utils/__init__.py | MaLiN2223/py_proj_transport | 4e0ee156ef4b42ddb5e0971ca0603b39b0796785 | [
"MIT"
] | null | null | null | utils/__init__.py | MaLiN2223/py_proj_transport | 4e0ee156ef4b42ddb5e0971ca0603b39b0796785 | [
"MIT"
] | null | null | null | utils/__init__.py | MaLiN2223/py_proj_transport | 4e0ee156ef4b42ddb5e0971ca0603b39b0796785 | [
"MIT"
] | null | null | null | """
This module contains utility classes and methods to be used in tests
""" | 25.333333 | 68 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 1 |
e89e57eee1002924427fb9529bc74acb259d5736 | 5,895 | py | Python | zm-jython/jylibs/ldap.py | hernad/zimbra9 | cf61ffa40d9600ab255ef4516ca25029fff6603b | [
"Apache-2.0"
] | null | null | null | zm-jython/jylibs/ldap.py | hernad/zimbra9 | cf61ffa40d9600ab255ef4516ca25029fff6603b | [
"Apache-2.0"
] | null | null | null | zm-jython/jylibs/ldap.py | hernad/zimbra9 | cf61ffa40d9600ab255ef4516ca25029fff6603b | [
"Apache-2.0"
] | null | null | null | #
# ***** BEGIN LICENSE BLOCK *****
# Zimbra Collaboration Suite Server
# Copyright (C) 2010, 2012, 2013, 2014, 2015, 2016 Synacor, Inc.
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software Foundation,
# version... | 40.9375 | 130 | 0.709754 | 2,988 | 0.50687 | 0 | 0 | 2,931 | 0.497201 | 0 | 0 | 2,242 | 0.380322 |
e89f014ab74d401770b75b90a5239b085769b212 | 1,768 | py | Python | graphite/publishers/generic_publisher.py | bjwhite-fnal/decisionengine_modules | 1a2c3e4f57e60925dc374f386d8bca3ba9fa3e7e | [
"BSD-3-Clause"
] | null | null | null | graphite/publishers/generic_publisher.py | bjwhite-fnal/decisionengine_modules | 1a2c3e4f57e60925dc374f386d8bca3ba9fa3e7e | [
"BSD-3-Clause"
] | null | null | null | graphite/publishers/generic_publisher.py | bjwhite-fnal/decisionengine_modules | 1a2c3e4f57e60925dc374f386d8bca3ba9fa3e7e | [
"BSD-3-Clause"
] | null | null | null | """
Generic publisher for graphana
"""
import abc
import six
from decisionengine.framework.modules import Publisher
import decisionengine_modules.graphite_client as graphite
DEFAULT_GRAPHITE_HOST = 'fermicloud399.fnal.gov'
DEFAULT_GRAPHITE_PORT = 2004
DEFAULT_GRAPHITE_CONTEXT = ""
@six.add_metaclass(abc.ABCMeta)
c... | 32.145455 | 86 | 0.690611 | 1,448 | 0.819005 | 0 | 0 | 1,480 | 0.837104 | 0 | 0 | 373 | 0.210973 |
e89f72335f42dd9c716112d702d16644f08e3501 | 2,864 | py | Python | datadog_checks_base/tests/openmetrics/test_interface.py | vbarbaresi/integrations-core | ab26ab1cd6c28a97c1ad1177093a93659658c7aa | [
"BSD-3-Clause"
] | 663 | 2016-08-23T05:23:45.000Z | 2022-03-29T00:37:23.000Z | datadog_checks_base/tests/openmetrics/test_interface.py | vbarbaresi/integrations-core | ab26ab1cd6c28a97c1ad1177093a93659658c7aa | [
"BSD-3-Clause"
] | 6,642 | 2016-06-09T16:29:20.000Z | 2022-03-31T22:24:09.000Z | datadog_checks_base/tests/openmetrics/test_interface.py | vbarbaresi/integrations-core | ab26ab1cd6c28a97c1ad1177093a93659658c7aa | [
"BSD-3-Clause"
] | 1,222 | 2017-01-27T15:51:38.000Z | 2022-03-31T18:17:51.000Z | # (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import pytest
from datadog_checks.base import OpenMetricsBaseCheckV2
from datadog_checks.base.constants import ServiceCheck
from datadog_checks.dev.testing import requires_py3
from .utils import get_chec... | 34.926829 | 114 | 0.687151 | 178 | 0.062151 | 0 | 0 | 0 | 0 | 0 | 0 | 1,117 | 0.390014 |
e8a059c82f837ee40d8d6e38defcf69fc241cbd4 | 566 | py | Python | db_core/env.py | dayvagrant/db_core | 01552110ce6b31228e59b45279642a39716e55e7 | [
"MIT"
] | null | null | null | db_core/env.py | dayvagrant/db_core | 01552110ce6b31228e59b45279642a39716e55e7 | [
"MIT"
] | null | null | null | db_core/env.py | dayvagrant/db_core | 01552110ce6b31228e59b45279642a39716e55e7 | [
"MIT"
] | null | null | null | """Set of configrations."""
_CONFIGS = {
"postgres": {
"host": "0.0.0.0",
"port": "5432",
"user": <USER>,
"pwd": <USER>,
"db": "postgres",
},
"mongodb": {
"host": "0.0.0.0",
"port": "27017",
"user": <USER>,
"pwd": <PASS>,
},
"c... | 18.258065 | 27 | 0.34629 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 230 | 0.40636 |
e8a28d2c1e6b10e80aa524825e02d01157d1875e | 3,256 | py | Python | natasha/grammars/name.py | MaksMolodtsov/natasha | 08e9f1809111c1300db3ca45cc621ff5279a1bef | [
"MIT"
] | 1 | 2019-05-02T18:16:39.000Z | 2019-05-02T18:16:39.000Z | natasha/grammars/name.py | cheryomukhin/natasha | 08e9f1809111c1300db3ca45cc621ff5279a1bef | [
"MIT"
] | null | null | null | natasha/grammars/name.py | cheryomukhin/natasha | 08e9f1809111c1300db3ca45cc621ff5279a1bef | [
"MIT"
] | 1 | 2021-04-02T06:16:42.000Z | 2021-04-02T06:16:42.000Z | # coding: utf-8
from __future__ import unicode_literals
from yargy import (
rule,
and_, or_, not_,
)
from yargy.interpretation import fact
from yargy.predicates import (
eq, length_eq,
gram, tag,
is_single, is_capitalized
)
from yargy.predicates.bank import DictionaryPredicate as dictionary
from ya... | 12.523077 | 70 | 0.596437 | 348 | 0.10688 | 0 | 0 | 0 | 0 | 0 | 0 | 420 | 0.128993 |
e8a30f812bcb19a63a69a2b83b8fc56667a700bf | 31,144 | py | Python | script/json2yaml.py | lunzhiPenxil/json2yaml-for-dice | 62bd66d3350b8a751f0dc8deff916f46fb4dda55 | [
"MIT"
] | 4 | 2020-01-14T13:47:28.000Z | 2022-01-22T12:11:03.000Z | script/json2yaml.py | lunzhiPenxil/json2yaml-for-dice | 62bd66d3350b8a751f0dc8deff916f46fb4dda55 | [
"MIT"
] | null | null | null | script/json2yaml.py | lunzhiPenxil/json2yaml-for-dice | 62bd66d3350b8a751f0dc8deff916f46fb4dda55 | [
"MIT"
] | null | null | null | #!/usr/bin/env python37
# -*- encoding: utf-8 -*-
'''
@File : json2yaml.py
@Time : 2020/01/12 16:44:48
@Author : BenzenPenxil
@Version : 1.0
@Contact : lunzhipenxil@gmail.com
@License : (C)Copyright 2017-2020, Penx.Studio
@Desc : None
'''
# here put the import lib
import json
import yaml
import... | 37.842041 | 178 | 0.58252 | 385 | 0.011803 | 0 | 0 | 0 | 0 | 0 | 0 | 5,692 | 0.174505 |
e8a3a3c194d9038995fdc352d8384c0dc7a408e0 | 1,058 | py | Python | metagen/utils.py | huaili-cid/metagen_cli | 8d80714bb839e8cd30a4ec241dcd57a22632f2b9 | [
"MIT"
] | null | null | null | metagen/utils.py | huaili-cid/metagen_cli | 8d80714bb839e8cd30a4ec241dcd57a22632f2b9 | [
"MIT"
] | null | null | null | metagen/utils.py | huaili-cid/metagen_cli | 8d80714bb839e8cd30a4ec241dcd57a22632f2b9 | [
"MIT"
] | null | null | null |
import logging
import os
import math
from metagen.helpers.exceptions import ValidationError
logger = logging.getLogger(__name__)
cli_log = logging.getLogger("metagen.cli")
def key_len(value, type_="ApiKey"):
"""Ensure an API Key or ID has valid length."""
if value is not None and len(value) < 36:
l ... | 25.190476 | 100 | 0.621928 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 208 | 0.196597 |
e8a44e30435268e66fe7dcfc673cc83f8a07c67f | 5,387 | py | Python | features/steps/common.py | PolySync/kevlar-laces | a5f36d1e4955963b3f1be3fd0ad8d3839a0bee3b | [
"MIT"
] | 3 | 2017-10-05T23:25:40.000Z | 2018-06-06T10:03:56.000Z | features/steps/common.py | PolySync/kevlar-laces | a5f36d1e4955963b3f1be3fd0ad8d3839a0bee3b | [
"MIT"
] | 11 | 2017-10-05T23:22:30.000Z | 2018-07-10T21:13:40.000Z | features/steps/common.py | PolySync/kevlar-laces | a5f36d1e4955963b3f1be3fd0ad8d3839a0bee3b | [
"MIT"
] | 3 | 2018-06-22T21:43:07.000Z | 2021-02-01T12:02:43.000Z | from behave import *
from hamcrest import *
import subprocess
import shlex
import os
import tempfile
import utils
@given('a local copy of the repo on the {branch} branch')
def step_impl(context, branch):
context.mock_developer_dir = tempfile.mkdtemp(prefix='kevlar')
utils.shell_command('git -C {0} clone -q f... | 46.439655 | 160 | 0.733247 | 0 | 0 | 0 | 0 | 5,224 | 0.969742 | 0 | 0 | 1,767 | 0.328012 |
e8a6d1ef969a737bdcd7f9ccf6c5ef2da1f6db6f | 268 | py | Python | src/utils/utils.py | chokyzhou/gym-flappy-bird | ffe1089501f3e2e113a8868cd27480653dbe0ef7 | [
"MIT"
] | null | null | null | src/utils/utils.py | chokyzhou/gym-flappy-bird | ffe1089501f3e2e113a8868cd27480653dbe0ef7 | [
"MIT"
] | null | null | null | src/utils/utils.py | chokyzhou/gym-flappy-bird | ffe1089501f3e2e113a8868cd27480653dbe0ef7 | [
"MIT"
] | null | null | null | import math
def obs2state(obs, multiplier=1000):
x_pos = int(math.floor(obs[0]*multiplier))
y_pos = int(math.floor(obs[1]*multiplier))
y_vel = y_vel = int(obs[2])
state_string = str(x_pos) + '_' + str(y_pos) + '_' + str(y_vel)
return state_string | 29.777778 | 67 | 0.649254 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.022388 |
e8a71fdcaa8a95b7ce8a94c0bbae859056c52963 | 494 | py | Python | python_marketman/__version__.py | LukasKlement/python-marketman | c851b10765f87182949925230ab614620bbfd15b | [
"Apache-2.0"
] | null | null | null | python_marketman/__version__.py | LukasKlement/python-marketman | c851b10765f87182949925230ab614620bbfd15b | [
"Apache-2.0"
] | null | null | null | python_marketman/__version__.py | LukasKlement/python-marketman | c851b10765f87182949925230ab614620bbfd15b | [
"Apache-2.0"
] | null | null | null | """Version details for python-marketman
This file shamelessly taken from the requests library"""
__title__ = 'python-marketman'
__description__ = 'A basic Marketman.com REST API client.'
__url__ = 'https://github.com/LukasKlement/python-marketman'
__version__ = '0.1'
__author__ = 'Lukas Klement'
__author_email__ = 'lu... | 35.285714 | 60 | 0.779352 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 327 | 0.661943 |
e8a9619f356f6c17c215a983117012929ea7b3f0 | 2,191 | py | Python | discharge_plot.py | amforte/Caucasus_Erosion | c839c90282f87256220abe390993b362b88b8b74 | [
"MIT"
] | 2 | 2021-05-15T05:04:57.000Z | 2021-12-10T02:25:29.000Z | discharge_plot.py | amforte/Caucasus_Erosion | c839c90282f87256220abe390993b362b88b8b74 | [
"MIT"
] | null | null | null | discharge_plot.py | amforte/Caucasus_Erosion | c839c90282f87256220abe390993b362b88b8b74 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Plots exceedance frequency and the relationships between discharge and drainage
area for gauged basins
Written by Adam M. Forte for
"Low variability runoff inhibits coupling of climate, tectonics, and
topography in the Greater Caucasus"
If you use this code or der... | 27.734177 | 89 | 0.720219 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 685 | 0.312643 |
e8a9c1a7e5fb15f5604bf50940522a213e5cd010 | 131 | py | Python | app/api/__init__.py | gladuo/VideoShow | 544c6ccd98ee4da5950d914289f30b5e918aa1a6 | [
"MIT"
] | null | null | null | app/api/__init__.py | gladuo/VideoShow | 544c6ccd98ee4da5950d914289f30b5e918aa1a6 | [
"MIT"
] | null | null | null | app/api/__init__.py | gladuo/VideoShow | 544c6ccd98ee4da5950d914289f30b5e918aa1a6 | [
"MIT"
] | null | null | null | from flask import Blueprint
api = Blueprint('api', __name__)
from . import authentication, videos, shows, users, comments, errors | 26.2 | 68 | 0.770992 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0.038168 |
e8a9f52b1807abbd9ad1f04b35b11beb966b81b5 | 706 | py | Python | openatom/principal_quantum_number.py | 2556-AD/Open-Atom | 656e8167f156491143544eb6ed0d153e2073ff7a | [
"MIT"
] | 1 | 2022-02-04T20:18:21.000Z | 2022-02-04T20:18:21.000Z | openatom/principal_quantum_number.py | 2556-AD/OpenAtom | 656e8167f156491143544eb6ed0d153e2073ff7a | [
"MIT"
] | null | null | null | openatom/principal_quantum_number.py | 2556-AD/OpenAtom | 656e8167f156491143544eb6ed0d153e2073ff7a | [
"MIT"
] | null | null | null | from openatom.UNIVERSAL_CONSTANTS import *
from openatom.azimuthal_quantum_number import AzimuthalQNum
class PrincipalQNum():
def __init__(self, shellIdx):
self.label = self.assignShellLabel(shellIdx)
self.principalQuantumNumVal = shellIdx + 1
self.azimuthalArray = []
self.azimuthal... | 33.619048 | 115 | 0.604816 | 602 | 0.852691 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.097734 |
e8aaccc9d7657be30449c0f2c759dfb4f94b6bc3 | 5,853 | py | Python | hissw/environment.py | binchensun/hissw | c03599b1d6c75dc7117318ecde20a49b8f14a97d | [
"MIT"
] | null | null | null | hissw/environment.py | binchensun/hissw | c03599b1d6c75dc7117318ecde20a49b8f14a97d | [
"MIT"
] | null | null | null | hissw/environment.py | binchensun/hissw | c03599b1d6c75dc7117318ecde20a49b8f14a97d | [
"MIT"
] | null | null | null | """
Build SSW scripts from Jinja 2 templates
"""
import os
import datetime
import subprocess
import tempfile
from jinja2 import (Environment as Env,
FileSystemLoader,
PackageLoader)
from scipy.io import readsav
from .read_config import defaults
from .util import SSWIDLError, ID... | 39.02 | 97 | 0.612677 | 5,516 | 0.942423 | 0 | 0 | 0 | 0 | 0 | 0 | 2,006 | 0.34273 |
e8aaf8435a809b03ac25ed685b774a912883267c | 4,129 | py | Python | tools/erd.py | multi-coop/catalogage-donnees | 1d70401ff6c7b01ec051460a253cb105adf65911 | [
"MIT"
] | null | null | null | tools/erd.py | multi-coop/catalogage-donnees | 1d70401ff6c7b01ec051460a253cb105adf65911 | [
"MIT"
] | 14 | 2022-01-25T17:56:52.000Z | 2022-01-28T17:47:59.000Z | tools/erd.py | multi-coop/catalogage-donnees | 1d70401ff6c7b01ec051460a253cb105adf65911 | [
"MIT"
] | null | null | null | """
Entity-relation diagram (ERD) GraphViz dot-file generator.
Usage:
python -m erd db.json -o db.dot
Then pass the result to the GraphViz `dot` tool:
dot db.dot -T png -o db.png
Inspired by: https://github.com/ehne/ERDot
"""
import argparse
import json
import re
from pathlib import Path
from typing import D... | 25.487654 | 167 | 0.57302 | 141 | 0.034149 | 0 | 0 | 0 | 0 | 0 | 0 | 1,914 | 0.46355 |
e8ab8f69dbeef8fba3bea64a32742c5139ef4502 | 1,862 | py | Python | tests/test_hyponym_detector.py | phlobo/scispacy | e40e702770236ac35c41cbb3f1f7d1ac72f76a51 | [
"Apache-2.0"
] | 15 | 2018-09-24T23:35:18.000Z | 2019-02-01T02:33:47.000Z | tests/test_hyponym_detector.py | phlobo/scispacy | e40e702770236ac35c41cbb3f1f7d1ac72f76a51 | [
"Apache-2.0"
] | 23 | 2018-09-25T16:40:39.000Z | 2019-02-05T00:50:59.000Z | tests/test_hyponym_detector.py | phlobo/scispacy | e40e702770236ac35c41cbb3f1f7d1ac72f76a51 | [
"Apache-2.0"
] | 3 | 2018-09-24T22:11:33.000Z | 2019-01-29T18:17:50.000Z | # pylint: disable=no-self-use,invalid-name
import unittest
import spacy
from scispacy.hyponym_detector import HyponymDetector
class TestHyponymDetector(unittest.TestCase):
def setUp(self):
super().setUp()
self.nlp = spacy.load("en_core_sci_sm")
self.detector = HyponymDetector(self.nlp, ex... | 36.509804 | 83 | 0.627282 | 1,732 | 0.930183 | 0 | 0 | 0 | 0 | 0 | 0 | 544 | 0.292159 |
e8ae561a8349a5665464d5b45bc60cb2a5fdf194 | 1,787 | py | Python | conftest.py | goalkeeer/boilerplate-django | f8866314fd8511a9cfe563b52259602ced6aa93c | [
"MIT"
] | null | null | null | conftest.py | goalkeeer/boilerplate-django | f8866314fd8511a9cfe563b52259602ced6aa93c | [
"MIT"
] | null | null | null | conftest.py | goalkeeer/boilerplate-django | f8866314fd8511a9cfe563b52259602ced6aa93c | [
"MIT"
] | null | null | null | import os
from contextlib import contextmanager
import pytest
from django import setup as django_setup
from django.core.cache import caches
from django.test import TransactionTestCase
# Transaction rollback emulation
# http://docs.djangoproject.com/en/2.0/topics/testing/overview/#rollback-emulation
TransactionTestCa... | 27.921875 | 82 | 0.665921 | 0 | 0 | 809 | 0.452714 | 1,295 | 0.724678 | 0 | 0 | 378 | 0.211528 |
e8b03a2e2c4731bb8314e6a0c733af40e7fcd845 | 4,063 | py | Python | htdocs/plotting/auto/scripts100/p103.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | htdocs/plotting/auto/scripts100/p103.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | htdocs/plotting/auto/scripts100/p103.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | """Steps up and down"""
import calendar
import numpy as np
from pandas.io.sql import read_sql
from pyiem import network
from pyiem.plot.use_agg import plt
from pyiem.util import get_autoplot_context, get_dbconn
PDICT = {'spring': '1 January - 30 June',
'fall': '1 July - 31 December'}
def get_description():... | 37.275229 | 77 | 0.575683 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,986 | 0.488801 |
e8b070cce38d20c7a2e6fd86cc0080c388e9443f | 310 | py | Python | Module8/inheritance/02_task_IterInt.py | xm4dn355x/specialist_python3_2nd_lvl | 4ea8c82eb0f32aa92c82914f6599c2c47a2f7032 | [
"MIT"
] | null | null | null | Module8/inheritance/02_task_IterInt.py | xm4dn355x/specialist_python3_2nd_lvl | 4ea8c82eb0f32aa92c82914f6599c2c47a2f7032 | [
"MIT"
] | null | null | null | Module8/inheritance/02_task_IterInt.py | xm4dn355x/specialist_python3_2nd_lvl | 4ea8c82eb0f32aa92c82914f6599c2c47a2f7032 | [
"MIT"
] | null | null | null | # Разработать класс IterInt, который наследует функциональность стандартного типа int, но добавляет
# возможность итерировать по цифрам числа
class IterInt(int):
pass
n = IterInt(12346)
for digit in n:
print("digit = ", digit)
# Выведет:
# digit = 1
# digit = 2
# digit = 3
# digit = 4
# digit = 6 | 17.222222 | 99 | 0.693548 | 28 | 0.065574 | 0 | 0 | 0 | 0 | 0 | 0 | 332 | 0.777518 |
e8b2ef11a1743e630591f449491e6c4cb3e345c2 | 1,100 | py | Python | base/backprop_perceptron.py | tardatio/granary_ai | 1af8efe0f2f971d25763b9b457e9025a73bdfb0d | [
"MIT"
] | null | null | null | base/backprop_perceptron.py | tardatio/granary_ai | 1af8efe0f2f971d25763b9b457e9025a73bdfb0d | [
"MIT"
] | null | null | null | base/backprop_perceptron.py | tardatio/granary_ai | 1af8efe0f2f971d25763b9b457e9025a73bdfb0d | [
"MIT"
] | null | null | null |
def forward(w,s,b,y):
Yhat= w * s + b
output = (Yhat-y)**2
return output, Yhat
def derivative_W(x, output, Yhat, y):
return ((2 * output) * (Yhat - y)) * x # w
def derivative_B(b, output, Yhat, y):
return ((2 * output) * (Yhat - y)) * b #bias
def main():
w = 1.0 #weight
x = 2.0 #samp... | 25 | 94 | 0.408182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 271 | 0.246364 |
e8b3cbd2eb084e2d31ca72bd36ee823a6ed4df75 | 4,273 | py | Python | os/pe.py | clayne/gef-extras | 1900ae30ab56da61cbb7821c7e1ef54d31480c55 | [
"MIT"
] | 76 | 2018-03-12T09:58:23.000Z | 2022-03-28T06:58:10.000Z | os/pe.py | clayne/gef-extras | 1900ae30ab56da61cbb7821c7e1ef54d31480c55 | [
"MIT"
] | 30 | 2018-04-14T05:47:21.000Z | 2022-03-23T12:37:14.000Z | os/pe.py | clayne/gef-extras | 1900ae30ab56da61cbb7821c7e1ef54d31480c55 | [
"MIT"
] | 38 | 2018-03-13T11:48:34.000Z | 2022-03-31T04:37:03.000Z | import struct
import os
current_pe = None
class PE:
"""Basic PE parsing.
Ref:
- https://hshrzd.wordpress.com/pe-bear/
- https://blog.kowalczyk.info/articles/pefileformat.html
"""
X86_64 = 0x8664
X86_32 = 0x14c
ARM = 0x1c0
ARM64 ... | 29.468966 | 91 | 0.495202 | 3,501 | 0.819331 | 0 | 0 | 716 | 0.167564 | 0 | 0 | 840 | 0.196583 |
e8b5f3144bc1d3413522f60d4e6476ad9be6026a | 2,230 | py | Python | ecommerce/discounts_test.py | mitodl/mitxonline | adf6084b1f4addd57473153ed6bd08ea09bc4685 | [
"BSD-3-Clause"
] | null | null | null | ecommerce/discounts_test.py | mitodl/mitxonline | adf6084b1f4addd57473153ed6bd08ea09bc4685 | [
"BSD-3-Clause"
] | 420 | 2021-07-13T14:58:52.000Z | 2022-03-31T20:50:10.000Z | ecommerce/discounts_test.py | mitodl/mitx-online | adf6084b1f4addd57473153ed6bd08ea09bc4685 | [
"BSD-3-Clause"
] | 1 | 2021-07-25T21:28:32.000Z | 2021-07-25T21:28:32.000Z | import pytest
from decimal import Decimal, getcontext
from ecommerce.factories import ProductFactory, DiscountFactory
from ecommerce.discounts import (
DiscountType,
PercentDiscount,
FixedPriceDiscount,
DollarsOffDiscount,
)
pytestmark = [pytest.mark.django_db]
@pytest.fixture()
def products():
... | 30.972222 | 81 | 0.663677 | 0 | 0 | 0 | 0 | 153 | 0.06861 | 0 | 0 | 496 | 0.222422 |
e8b7f72135ff17d1528a58a4b339193557a313ca | 3,952 | py | Python | web-cloudformation/lambda_function.py | ClarkAtAmazon/aws-media-services-application-mapper | ab074a0313cb87cefaf807794763c07553be7c04 | [
"Apache-2.0"
] | null | null | null | web-cloudformation/lambda_function.py | ClarkAtAmazon/aws-media-services-application-mapper | ab074a0313cb87cefaf807794763c07553be7c04 | [
"Apache-2.0"
] | null | null | null | web-cloudformation/lambda_function.py | ClarkAtAmazon/aws-media-services-application-mapper | ab074a0313cb87cefaf807794763c07553be7c04 | [
"Apache-2.0"
] | null | null | null | """
This module is the custom resource used by the MSAM's CloudFormation
templates to populate the web bucket with contents of the MSAM web archive.
"""
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import json
import os
from subprocess import call
imp... | 39.52 | 184 | 0.652328 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,606 | 0.406377 |
e8b95468398dfbf5ccf8ee057f5e1a97d91c23c9 | 304 | py | Python | tailow/operators/size.py | sourcepirate/tailow | 5398e619ad9508ba89153e9cc505a80cdb65d5fd | [
"MIT"
] | 2 | 2018-06-13T06:01:09.000Z | 2018-10-19T12:00:50.000Z | tailow/operators/size.py | sourcepirate/tailow | 5398e619ad9508ba89153e9cc505a80cdb65d5fd | [
"MIT"
] | null | null | null | tailow/operators/size.py | sourcepirate/tailow | 5398e619ad9508ba89153e9cc505a80cdb65d5fd | [
"MIT"
] | 2 | 2018-08-01T06:13:47.000Z | 2018-10-20T07:15:11.000Z | from tailow.operators.base import Operator
class SizeOperator(Operator):
"""
operator to query for arrays by number of elements
"""
def to_query(self, field_name, value):
return {"$size": value}
def get_value(self, field, value):
return field.to_son(value)
| 20.266667 | 59 | 0.648026 | 258 | 0.848684 | 0 | 0 | 0 | 0 | 0 | 0 | 79 | 0.259868 |
e8bd7184378822445ccc65b6e322ca8a912026c5 | 385 | py | Python | src/cart/migrations/0005_orderitem_quantity.py | Bakhtiyar-Habib/CSE327-Project | 4126b40eb398e4cf13b49136e552775c5f3b0635 | [
"bzip2-1.0.6"
] | null | null | null | src/cart/migrations/0005_orderitem_quantity.py | Bakhtiyar-Habib/CSE327-Project | 4126b40eb398e4cf13b49136e552775c5f3b0635 | [
"bzip2-1.0.6"
] | null | null | null | src/cart/migrations/0005_orderitem_quantity.py | Bakhtiyar-Habib/CSE327-Project | 4126b40eb398e4cf13b49136e552775c5f3b0635 | [
"bzip2-1.0.6"
] | null | null | null | # Generated by Django 2.0.7 on 2020-05-18 05:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cart', '0004_auto_20200518_1139'),
]
operations = [
migrations.AddField(
model_name='orderitem',
name='quantity',
... | 20.263158 | 49 | 0.597403 | 292 | 0.758442 | 0 | 0 | 0 | 0 | 0 | 0 | 99 | 0.257143 |
e8bd93991acde3b39cff9f04ff4419e3c6c936b3 | 2,097 | py | Python | odoo-13.0/odoo/addons/base/wizard/base_language_install.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | 12 | 2021-03-26T08:39:40.000Z | 2022-03-16T02:20:10.000Z | odoo-13.0/odoo/addons/base/wizard/base_language_install.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | 13 | 2020-12-20T16:00:21.000Z | 2022-03-14T14:55:30.000Z | odoo-13.0/odoo/addons/base/wizard/base_language_install.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | 17 | 2020-08-31T11:18:49.000Z | 2022-02-09T05:57:31.000Z | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
class BaseLanguageInstall(models.TransientModel):
_name = "base.language.install"
_description = "Install Language"
@api.model
def _default_language(self):
... | 36.789474 | 145 | 0.57463 | 1,954 | 0.931807 | 0 | 0 | 491 | 0.234144 | 0 | 0 | 752 | 0.358608 |
e8be64b0dcdd575acf275b088a14909677a52a3e | 1,627 | py | Python | DataAnalysis/test.py | yuxiang-zhou/MarketAnalysor | 4d19d2589d07409cd699f394921d1a95f3097e94 | [
"MIT"
] | null | null | null | DataAnalysis/test.py | yuxiang-zhou/MarketAnalysor | 4d19d2589d07409cd699f394921d1a95f3097e94 | [
"MIT"
] | null | null | null | DataAnalysis/test.py | yuxiang-zhou/MarketAnalysor | 4d19d2589d07409cd699f394921d1a95f3097e94 | [
"MIT"
] | null | null | null | import urllib2
import threading
from bs4 import BeautifulSoup
import re
import json
import sys
import os
import django
from stock_list import getlist, getLSEList
from extract_stock_info import get_info, getLSEInfo
from extract_stock_history import get_historical_info
from extract_sector_history import get_sector_histo... | 29.053571 | 122 | 0.728949 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 227 | 0.139521 |
e8bfced731c80842e64d71e3b64a2ac8f77ae7b9 | 566 | py | Python | icpc/2019-10-4/F-gen.py | Riteme/test | b511d6616a25f4ae8c3861e2029789b8ee4dcb8d | [
"BSD-Source-Code"
] | 3 | 2018-08-30T09:43:20.000Z | 2019-12-03T04:53:43.000Z | icpc/2019-10-4/F-gen.py | Riteme/test | b511d6616a25f4ae8c3861e2029789b8ee4dcb8d | [
"BSD-Source-Code"
] | null | null | null | icpc/2019-10-4/F-gen.py | Riteme/test | b511d6616a25f4ae8c3861e2029789b8ee4dcb8d | [
"BSD-Source-Code"
] | null | null | null | #!/usr/bin/pypy
from sys import *
from random import *
n, m, CMAX, d1, d2 = map(int, argv[1:])
#print randint(0, n)
print 1
x0, y0 = randint(-20, -10), randint(-20, -10)
dx, dy = randint(-d1, -1), randint(1, d1)
x1, y1 = x0 + dx, y0 + dy
dx, dy = -dy, dx
print x0, y0
print x1, y1
print x1 + dx, y1 + dy
print x0 + dx,... | 20.214286 | 45 | 0.533569 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 35 | 0.061837 |
e8c0f817f68a5fd4dd066ca677c3c04387639adf | 3,787 | py | Python | aea/cli/run.py | lrahmani/agents-aea | 9bd1d51530fc21bf41b5adea031cda19a94b048b | [
"Apache-2.0"
] | null | null | null | aea/cli/run.py | lrahmani/agents-aea | 9bd1d51530fc21bf41b5adea031cda19a94b048b | [
"Apache-2.0"
] | null | null | null | aea/cli/run.py | lrahmani/agents-aea | 9bd1d51530fc21bf41b5adea031cda19a94b048b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI Limited
#
# 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 ... | 30.055556 | 114 | 0.660681 | 0 | 0 | 0 | 0 | 997 | 0.263269 | 0 | 0 | 1,626 | 0.429364 |
e8c11fe4576975f7077b66d5affd1b1ac602cf2e | 4,817 | py | Python | analyze.py | irenicaa/hh-analytics | 03917a4e7616d048e16bab737202b64af12132ee | [
"MIT"
] | 4 | 2018-07-26T15:34:58.000Z | 2020-10-30T07:13:25.000Z | analyze.py | irenicaa/hh-analytics | 03917a4e7616d048e16bab737202b64af12132ee | [
"MIT"
] | null | null | null | analyze.py | irenicaa/hh-analytics | 03917a4e7616d048e16bab737202b64af12132ee | [
"MIT"
] | 2 | 2018-08-02T17:25:15.000Z | 2022-01-21T14:14:39.000Z | #!/usr/bin/env python3
import logging
import functools
import argparse
import collections
import fileinput
import json
import csv
import re
import requests
import box
TAX = 0.13
SPECIALIZATION_COLUMNS_INDEXES = {
'salary.average': 1,
'salary.minimum': 2,
'salary.maximum': 3,
'number': 4,
}
def save_... | 34.407143 | 97 | 0.645215 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 727 | 0.150924 |
e8c18148af4760bc98e8ab17fabe8787994adb73 | 1,895 | py | Python | src/environment/wrappers/max_frameskip_env.py | Kautenja/playing-mario-with-deep-reinforcement-learning | bf61b8babfd06b6e6c26eb3694b84e8c7ff4c076 | [
"MIT"
] | 57 | 2018-04-24T07:07:29.000Z | 2022-01-19T17:07:13.000Z | src/environment/wrappers/max_frameskip_env.py | Kautenja/playing-mario-with-deep-reinforcement-learning | bf61b8babfd06b6e6c26eb3694b84e8c7ff4c076 | [
"MIT"
] | 10 | 2018-06-07T14:29:19.000Z | 2019-07-29T13:48:03.000Z | src/environment/wrappers/max_frameskip_env.py | Kautenja/playing-mario-with-deep-reinforcement-learning | bf61b8babfd06b6e6c26eb3694b84e8c7ff4c076 | [
"MIT"
] | 11 | 2018-09-11T23:14:37.000Z | 2021-06-30T03:56:55.000Z | """An environment to skip k frames and return a max between the last two."""
import gym
import numpy as np
class MaxFrameskipEnv(gym.Wrapper):
"""An environment to skip k frames and return a max between the last two."""
def __init__(self, env, skip: int=4) -> None:
"""
Initialize a new max fr... | 34.454545 | 86 | 0.606332 | 1,688 | 0.890765 | 0 | 0 | 0 | 0 | 0 | 0 | 909 | 0.479683 |
e8c2719a32612a325b383c39169bc8d4bf73f6f4 | 125 | py | Python | mercury/plugin/smart_grid/__init__.py | greenlsi/mercury_mso_framework | 8b9639e5cb4b2c526a65861c93a9fe9db2460ea4 | [
"Apache-2.0"
] | 1 | 2020-07-21T11:22:39.000Z | 2020-07-21T11:22:39.000Z | mercury/plugin/smart_grid/__init__.py | greenlsi/mercury_mso_framework | 8b9639e5cb4b2c526a65861c93a9fe9db2460ea4 | [
"Apache-2.0"
] | 2 | 2021-08-25T16:09:58.000Z | 2022-02-10T02:21:03.000Z | mercury/plugin/smart_grid/__init__.py | greenlsi/mercury_mso_framework | 8b9639e5cb4b2c526a65861c93a9fe9db2460ea4 | [
"Apache-2.0"
] | 1 | 2021-02-24T15:54:09.000Z | 2021-02-24T15:54:09.000Z | from .provider import EnergyProvider
from .pwr_source import PowerSource
from .consumption_manager import ConsumptionManager
| 31.25 | 51 | 0.88 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e8c30d54b333286bca5dd921414bc3d23b187ec5 | 4,236 | py | Python | hbaselines/envs/deeploco/envs.py | reufko/h-baselines | 5c5522b096ddcf3124ff2fcbfb6eb7fa4fc0fb57 | [
"MIT"
] | 186 | 2019-01-21T10:37:11.000Z | 2022-03-22T19:04:07.000Z | hbaselines/envs/deeploco/envs.py | ahlane/h-baselines | 767eb9a105deb0898248dcd7dbf2f118116cdbfa | [
"MIT"
] | 214 | 2018-10-17T06:53:22.000Z | 2022-02-09T23:59:03.000Z | hbaselines/envs/deeploco/envs.py | ahlane/h-baselines | 767eb9a105deb0898248dcd7dbf2f118116cdbfa | [
"MIT"
] | 37 | 2019-07-12T01:44:08.000Z | 2022-03-29T06:00:15.000Z | """Script containing the DeepLoco environments."""
import gym
import numpy as np
import os
import sys
import cv2
try:
sys.path.append(os.path.join(os.environ["TERRAINRL_PATH"], "simAdapter"))
import terrainRLSim # noqa: F401
except (KeyError, ImportError, ModuleNotFoundError):
pass
class BipedalSoccer(g... | 29.213793 | 79 | 0.611426 | 3,933 | 0.92847 | 0 | 0 | 1,016 | 0.239849 | 0 | 0 | 1,711 | 0.403919 |
e8c3672245371fce722c62fe43be41b167aa31e3 | 156 | py | Python | test/__init__.py | LanaMaidenbaum41/test | d9ffd610dc4b1dc940f444b2adf676b3c610d0bd | [
"MIT"
] | null | null | null | test/__init__.py | LanaMaidenbaum41/test | d9ffd610dc4b1dc940f444b2adf676b3c610d0bd | [
"MIT"
] | 183 | 2019-05-16T18:18:04.000Z | 2022-03-31T19:50:02.000Z | test/__init__.py | LanaMaidenbaum41/test | d9ffd610dc4b1dc940f444b2adf676b3c610d0bd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for Test."""
__author__ = """Lana Maidenbaum"""
__email__ = 'lana.maidenbaum@zeel.com'
__version__ = '0.1.1'
| 19.5 | 38 | 0.641026 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.705128 |
e8c391255b56e4ff6feefeae210b186373cc9c99 | 372 | py | Python | pyml/crawler/minispider/mini_spider.py | onehao/opensource | e34784fcc294094a4ce0decd0e6809c11a96bbf7 | [
"Apache-2.0"
] | null | null | null | pyml/crawler/minispider/mini_spider.py | onehao/opensource | e34784fcc294094a4ce0decd0e6809c11a96bbf7 | [
"Apache-2.0"
] | 1 | 2015-07-15T02:11:41.000Z | 2015-07-15T02:30:34.000Z | pyml/crawler/minispider/mini_spider.py | onehao/opensource | e34784fcc294094a4ce0decd0e6809c11a96bbf7 | [
"Apache-2.0"
] | 1 | 2018-09-11T12:52:30.000Z | 2018-09-11T12:52:30.000Z | # -*- coding:utf-8 -*-
'''
Created on 2015年3月2日
@author: wanhao01
'''
import sys
from crawler.minispider import logerror
import main
reload(sys)
sys.setdefaultencoding('utf-8')
if __name__ == '__main__':
try:
main.main()
except Exception as exception:
logerror("error du... | 16.909091 | 69 | 0.629032 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 130 | 0.343915 |
e8c3e59f88d6793f930cb42c427e75383f6c77bd | 1,001 | py | Python | tensorflow/examples/functions/distributed/distr_fibonacci.py | acharal/tensorflow | c5d99169bea3f5d1e3cef973690d2ec7fdbac80f | [
"Apache-2.0"
] | null | null | null | tensorflow/examples/functions/distributed/distr_fibonacci.py | acharal/tensorflow | c5d99169bea3f5d1e3cef973690d2ec7fdbac80f | [
"Apache-2.0"
] | null | null | null | tensorflow/examples/functions/distributed/distr_fibonacci.py | acharal/tensorflow | c5d99169bea3f5d1e3cef973690d2ec7fdbac80f | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
from tensorflow.python.framework import function
cluster = tf.train.ClusterSpec({"local": ["localhost:2222", "localhost:2223"]})
fib = function.Declare("Fib", [("n", tf.int32)], [("ret", tf.int32)])
@function.Defun(tf.int32, func_name="Fib", out_names=["ret"])
def FibImpl(n):
def f1():
w... | 25.025 | 79 | 0.675325 | 0 | 0 | 0 | 0 | 434 | 0.433566 | 0 | 0 | 266 | 0.265734 |
e8c4971da7588ca0cd08099ba33608771a9b94d2 | 17,777 | py | Python | river/tree/hoeffding_tree.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 1,105 | 2019-01-24T15:15:30.000Z | 2020-11-10T18:27:00.000Z | river/tree/hoeffding_tree.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 328 | 2019-01-25T13:48:43.000Z | 2020-11-11T11:41:44.000Z | river/tree/hoeffding_tree.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 150 | 2019-01-29T19:05:21.000Z | 2020-11-11T11:50:14.000Z | import collections
import functools
import io
import math
import typing
from abc import ABC, abstractmethod
from river import base
from river.utils.skmultiflow_utils import (
calculate_object_size,
normalize_values_in_dict,
)
from .nodes.branch import (
DTBranch,
NominalBinaryBranch,
NominalMultiw... | 32.558608 | 97 | 0.582607 | 15,675 | 0.881757 | 3,868 | 0.217585 | 3,517 | 0.19784 | 0 | 0 | 6,835 | 0.384486 |
e8c50788ce4892af43a9be0933cf50a03caaf69d | 2,376 | py | Python | app/app.py | CLARIAH/wp6-missieven | 67e7d0123d37cce36be5353801b90010d4ad4be0 | [
"MIT"
] | null | null | null | app/app.py | CLARIAH/wp6-missieven | 67e7d0123d37cce36be5353801b90010d4ad4be0 | [
"MIT"
] | null | null | null | app/app.py | CLARIAH/wp6-missieven | 67e7d0123d37cce36be5353801b90010d4ad4be0 | [
"MIT"
] | null | null | null | import types
from tf.advanced.app import App
MODIFIERS = """
remark folio note ref emph und super special q num den
""".strip().split()
def fmt_layoutFull(app, n, **kwargs):
return app._wrapHtml(n, ("",))
def fmt_layoutRemarks(app, n, **kwargs):
return app._wrapHtml(n, ("r",))
def fmt_layoutNotes(ap... | 28.285714 | 76 | 0.570286 | 1,645 | 0.691758 | 0 | 0 | 0 | 0 | 0 | 0 | 270 | 0.113541 |
e8c55b0d0b7ee2952a20ba1c0326c0dd310acbe0 | 5,693 | py | Python | services/docker/webrecorder/local.py | rachelaus/perma | 36c05080520ea3ffce465dbc383795c060fa4112 | [
"MIT",
"Unlicense"
] | 317 | 2015-02-12T16:53:34.000Z | 2022-03-14T23:38:04.000Z | services/docker/webrecorder/local.py | rachelaus/perma | 36c05080520ea3ffce465dbc383795c060fa4112 | [
"MIT",
"Unlicense"
] | 2,069 | 2015-01-06T20:09:24.000Z | 2022-03-31T15:44:36.000Z | services/docker/webrecorder/local.py | rachelaus/perma | 36c05080520ea3ffce465dbc383795c060fa4112 | [
"MIT",
"Unlicense"
] | 69 | 2015-01-12T18:56:07.000Z | 2022-02-22T19:57:10.000Z | import hashlib
import logging
import os
import shutil
import traceback
from contextlib import closing
from pywb.utils.loaders import BlockLoader
from webrecorder.rec.storage.base import BaseStorage
from webrecorder.rec.storage.storagepaths import add_local_store_prefix, strip_prefix
logger = logging.getLogger('wr.io... | 30.607527 | 113 | 0.59055 | 5,205 | 0.914281 | 0 | 0 | 0 | 0 | 0 | 0 | 2,551 | 0.448094 |
e8c5b2acc01726c22676df5fc3f9d17efb91642c | 1,424 | py | Python | password-cracking/leatspeak.py | cyberprogrammer/ctf-stuff | 6814ff819c51bb1cddae76ff611bede3909aa129 | [
"MIT"
] | null | null | null | password-cracking/leatspeak.py | cyberprogrammer/ctf-stuff | 6814ff819c51bb1cddae76ff611bede3909aa129 | [
"MIT"
] | null | null | null | password-cracking/leatspeak.py | cyberprogrammer/ctf-stuff | 6814ff819c51bb1cddae76ff611bede3909aa129 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
from string import ascii_letters
import itertools
def includeDefault(charSet):
for i in range(0,256):
charSet[i] = set([i])
def includeInvertedCases(charSet):
for c in ascii_letters:
charSet[ord(c)] |= set([ord(c.lower()) if c.isupper() else ord(c.upper())])
... | 25.428571 | 83 | 0.587079 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 220 | 0.154494 |
e8c6ae4b647e06cb7b69a59f506ee2ec7083e0ae | 1,621 | py | Python | tests/unit_tests/community/errors_upload/__init__.py | Trading-Bot/CryptoBot | b39401f093eadfe461d6f441ba31d3b8cdb3f877 | [
"Apache-2.0"
] | 9 | 2018-04-14T18:42:16.000Z | 2018-05-22T03:45:31.000Z | tests/unit_tests/community/errors_upload/__init__.py | Trading-Bot/CryptoBot | b39401f093eadfe461d6f441ba31d3b8cdb3f877 | [
"Apache-2.0"
] | 151 | 2018-04-03T14:37:17.000Z | 2018-05-29T14:15:31.000Z | tests/unit_tests/community/errors_upload/__init__.py | Trading-Bot/CryptoBot | b39401f093eadfe461d6f441ba31d3b8cdb3f877 | [
"Apache-2.0"
] | 3 | 2018-04-22T10:53:28.000Z | 2018-05-23T08:10:18.000Z | # This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2021 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either
... | 24.19403 | 77 | 0.69525 | 0 | 0 | 0 | 0 | 440 | 0.271437 | 0 | 0 | 840 | 0.518199 |
e8c6d39ffcb80d752f8e489ba1c7a392d1ea7ce9 | 794 | py | Python | SCCSearch.py | FER-NASP/AdvancedAlgorithms | ce09c50b9d02fac53a09f6f0d0d099fe87aa7354 | [
"MIT"
] | 1 | 2021-12-24T19:30:13.000Z | 2021-12-24T19:30:13.000Z | SCCSearch.py | FER-NASP/AdvancedAlgorithms | ce09c50b9d02fac53a09f6f0d0d099fe87aa7354 | [
"MIT"
] | null | null | null | SCCSearch.py | FER-NASP/AdvancedAlgorithms | ce09c50b9d02fac53a09f6f0d0d099fe87aa7354 | [
"MIT"
] | null | null | null | import collections
def SCCSearch(G):
for v in G:
G[v]['n']=G[v]['p']=0
step=0
S=collections.deque()
res=[]
for u in G:
if (G[u]['n']==0):
SCCSearch_r(G,u,step,S,res)
return res
def SCCSearch_r(G,u,step,S,res):
G[u]['p']=G[u]['n']=step
step=step+1
S.appen... | 22.055556 | 39 | 0.377834 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 53 | 0.066751 |
e8c780f21a3bf8a3de70d1cac8fa793d1b5d7adc | 973 | py | Python | tests/unit/test_transformers_token_classification.py | dreasysnail/nlp-recipes | fcd62f0d8a1495e9157a058ca90bab3dd2276dff | [
"MIT"
] | 1 | 2020-02-14T11:39:17.000Z | 2020-02-14T11:39:17.000Z | tests/unit/test_transformers_token_classification.py | KingDEV95/nlp-recipes | fcd62f0d8a1495e9157a058ca90bab3dd2276dff | [
"MIT"
] | null | null | null | tests/unit/test_transformers_token_classification.py | KingDEV95/nlp-recipes | fcd62f0d8a1495e9157a058ca90bab3dd2276dff | [
"MIT"
] | 1 | 2021-06-17T04:15:02.000Z | 2021-06-17T04:15:02.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import pytest
from utils_nlp.common.pytorch_utils import dataloader_from_dataset
from utils_nlp.models.transformers.named_entity_recognition import TokenClassificationProcessor, TokenClassifier
@pytest.mark.cpu
def test_to... | 40.541667 | 117 | 0.801644 | 0 | 0 | 0 | 0 | 680 | 0.698869 | 0 | 0 | 213 | 0.218911 |
e8c78661e1152f331d7f1edce69005199e0275a9 | 1,575 | py | Python | doc/examples/plot_peak_local_max.py | Teva/scikits.image | 12669d62e699313ca0f73de1b211bf438f4efb0c | [
"BSD-3-Clause"
] | 3 | 2015-11-12T06:34:49.000Z | 2017-09-22T07:47:50.000Z | doc/examples/plot_peak_local_max.py | amueller/scikit-image | a8bfc5c5814a3c7fe363cfcad0c68b935706cd3c | [
"BSD-3-Clause"
] | 1 | 2020-03-30T12:31:55.000Z | 2020-03-30T12:31:55.000Z | doc/examples/plot_peak_local_max.py | emmanuelle/scikit-image | eccc41907135cf81b99c4be18a480a9bc705485d | [
"BSD-3-Clause"
] | 8 | 2015-03-02T20:36:55.000Z | 2021-02-18T10:37:00.000Z | """
===============================================================================
Finding local maxima
===============================================================================
The ``peak_local_max`` function returns the coordinates of local peaks (maxima)
in an image. A maximum filter is used for finding loca... | 30.882353 | 79 | 0.676825 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 819 | 0.52 |
e8c8708a26737af95fceb49444dae7c2904ee43c | 2,662 | py | Python | TimingPoint/notes_random.py | Fairy-Phy/Relium | 70ea037cea176f02e4768bde44dd5ee23af699b3 | [
"MIT"
] | null | null | null | TimingPoint/notes_random.py | Fairy-Phy/Relium | 70ea037cea176f02e4768bde44dd5ee23af699b3 | [
"MIT"
] | null | null | null | TimingPoint/notes_random.py | Fairy-Phy/Relium | 70ea037cea176f02e4768bde44dd5ee23af699b3 | [
"MIT"
] | null | null | null | import random
from Relium import calcurate, classes, parser, constant
"""
1ラインづつランダムな位置に表示していきます
"""
source_file = r""
target_start_offset = 31999
target_end_offset = 34666
avgbpm = 180
# ノーツの高さの最大値(上げすぎると見えなくなります)
max_laneheight = 370
beat = 4
sample_set = 1
sample_index = 0
volume = 64
effects = 1
## Main ##
... | 44.366667 | 204 | 0.804282 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 238 | 0.085244 |
e8c8a148dcb36dc45bfc001222c52fac5f7202b2 | 5,527 | py | Python | tests/graph_test.py | lwi19/graphe-simple | cf5ad96e13140d6357c2a9b12de71f1a0b53c86c | [
"MIT"
] | null | null | null | tests/graph_test.py | lwi19/graphe-simple | cf5ad96e13140d6357c2a9b12de71f1a0b53c86c | [
"MIT"
] | null | null | null | tests/graph_test.py | lwi19/graphe-simple | cf5ad96e13140d6357c2a9b12de71f1a0b53c86c | [
"MIT"
] | null | null | null | import unittest
"""
graphe_test.py
Created by lwi19
Copyright © 2020 Louis Plouffe. All rights reserved.
"""
"""
Test module for graph_theory
Call method: python3 -m unittest discover -p "*test.py" -s ./tests -v
Graphs are imported in this file,
"""
# import util.graph_lib as glb
from data.some_of_t... | 39.76259 | 123 | 0.631988 | 5,109 | 0.924204 | 0 | 0 | 0 | 0 | 0 | 0 | 2,592 | 0.468886 |
e8c9149709f8faee9ce978ba8f02bea4f6d7bb11 | 375 | py | Python | fbscraper.py | Woahisme/final_project | f94fe272f32bc7c1cac3c6939054c0aee6edb71a | [
"MIT"
] | null | null | null | fbscraper.py | Woahisme/final_project | f94fe272f32bc7c1cac3c6939054c0aee6edb71a | [
"MIT"
] | null | null | null | fbscraper.py | Woahisme/final_project | f94fe272f32bc7c1cac3c6939054c0aee6edb71a | [
"MIT"
] | null | null | null |
import json
from facebook_scraper import get_profile
#pass through name from webpage once issue is fixed
json_data = get_profile("passparam", cookies="./fbcookies.json")
# json_object = json.loads(json_data)
json_formatted = json.dumps(json_data, indent = 2)
print(json_formatted)
with open("fb_info.json", "w") as... | 25 | 64 | 0.76 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 134 | 0.357333 |
e8c93152e18c071a0506078a1cc5a0656d4c674d | 1,106 | py | Python | ga4ghtest/controllers/plugins_controller.py | ga4gh/workflow-interop | e2b3422f6867ce632c65e017d7b558f3cce9fcf1 | [
"Apache-2.0"
] | 5 | 2019-04-15T17:37:33.000Z | 2020-04-24T15:18:06.000Z | ga4ghtest/controllers/plugins_controller.py | Sage-Bionetworks/synevalharness | e2b3422f6867ce632c65e017d7b558f3cce9fcf1 | [
"Apache-2.0"
] | 58 | 2018-12-07T15:55:35.000Z | 2022-02-18T15:42:27.000Z | ga4ghtest/controllers/plugins_controller.py | Sage-Bionetworks/synapse-orchestrator | e2b3422f6867ce632c65e017d7b558f3cce9fcf1 | [
"Apache-2.0"
] | 4 | 2018-07-18T23:00:09.000Z | 2018-07-31T20:01:21.000Z | import connexion
import six
from ga4ghtest.models import Plugin # noqa: E501
from ga4ghtest import util
from ga4ghtest.core.controllers import plugins_controller as controller
def create_plugin(
body
): # noqa: E501
"""Create a test plugin
Add a plugin for testing functionality of an API. # noqa: E501... | 21.686275 | 75 | 0.659132 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 567 | 0.512658 |
e8cc90a1cdc2870db809982b1ae984cc1175ebc5 | 597 | py | Python | web/settings/__init__.py | EasySport/easysport | fa32ad6cdbf1f3e861d7eecf4d4f881deee43910 | [
"MIT"
] | 1 | 2018-05-23T15:58:40.000Z | 2018-05-23T15:58:40.000Z | web/settings/__init__.py | EasySport/easysport | fa32ad6cdbf1f3e861d7eecf4d4f881deee43910 | [
"MIT"
] | 1 | 2018-05-24T11:30:35.000Z | 2018-05-24T11:30:35.000Z | web/settings/__init__.py | EasySport/easysport | fa32ad6cdbf1f3e861d7eecf4d4f881deee43910 | [
"MIT"
] | null | null | null | import os
from split_settings.tools import include, optional
ENVIRONMENT = os.getenv('DJANGO_ENV') or 'development'
include(
# Load environment settings
'base/env.py',
optional('local/env.py'), # We can "patch" any settings from local folder env.py file.
# Here we should have the order because of de... | 25.956522 | 91 | 0.673367 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 384 | 0.643216 |
e8ccfb7cc77d87449e215a705b8af7a4549c6e04 | 15,854 | py | Python | selfdrive/car/hyundai/values.py | agegold/OPKR080 | 3a12e00f4f0b95be9cd19d10f34eab1823b72252 | [
"MIT"
] | null | null | null | selfdrive/car/hyundai/values.py | agegold/OPKR080 | 3a12e00f4f0b95be9cd19d10f34eab1823b72252 | [
"MIT"
] | null | null | null | selfdrive/car/hyundai/values.py | agegold/OPKR080 | 3a12e00f4f0b95be9cd19d10f34eab1823b72252 | [
"MIT"
] | 2 | 2021-01-19T15:45:57.000Z | 2021-01-19T15:54:18.000Z | # flake8: noqa
from cereal import car
from selfdrive.car import dbc_dict
from common.params import Params
Ecu = car.CarParams.Ecu
# Steer torque limits
class SteerLimitParams:
params = Params()
STEER_MAX = int(params.get('SteerMaxAdj')) # 409 is the max, 255 is stock
STEER_DELTA_UP = int(params.get('SteerDelt... | 70.150442 | 656 | 0.595055 | 1,672 | 0.101481 | 0 | 0 | 0 | 0 | 0 | 0 | 3,313 | 0.20108 |
e8cd034e5a44f69d6d5a77a8bdd96d2912409673 | 1,104 | py | Python | builder/utils/util_dict.py | My-Novel-Management/storybuilderunite | c003d3451e237f574c54a87ea7d4fd8da8e833be | [
"MIT"
] | 1 | 2020-06-18T01:38:55.000Z | 2020-06-18T01:38:55.000Z | builder/utils/util_dict.py | My-Novel-Management/storybuilder | 1f36e56a74dbb55a25d60fce3ce81f3c650f521a | [
"MIT"
] | 143 | 2019-11-13T00:21:11.000Z | 2020-08-15T05:47:41.000Z | builder/utils/util_dict.py | My-Novel-Management/storybuilderunite | c003d3451e237f574c54a87ea7d4fd8da8e833be | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Utility methods for dictionary
==============================
'''
__all__ = (
'calling_dict_from',
'combine_dict',
'dict_sorted')
from itertools import chain
from typing import Tuple
from builder.utils import assertion
def calling_dict_from(calling: (str, dict), n... | 26.285714 | 70 | 0.615942 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 305 | 0.275769 |
e8cdc8529cb089c6cb182638ad49d2d99e04381f | 924 | py | Python | scripts/hdfs_store.py | coastrock/CEBD1261-2019-fall-group-project | ef3c9dd841c9d57cb580cbd6650bb62d50dfc585 | [
"MIT"
] | 1 | 2020-05-03T04:57:48.000Z | 2020-05-03T04:57:48.000Z | scripts/hdfs_store.py | coastrock/CEBD1261-2019-fall-group-project | ef3c9dd841c9d57cb580cbd6650bb62d50dfc585 | [
"MIT"
] | null | null | null | scripts/hdfs_store.py | coastrock/CEBD1261-2019-fall-group-project | ef3c9dd841c9d57cb580cbd6650bb62d50dfc585 | [
"MIT"
] | null | null | null | try:
from zipfile import ZipFile
from pyspark import SparkContext, SparkConf
from pyspark.sql import SparkSession
import pyspark.sql.functions as f
import os
except Exception as e:
print(e)
## http://www.hongyusu.com/imt/technology/spark-via-python-basic-setup-count-lines-and-word-counts.html
d... | 27.176471 | 103 | 0.664502 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 403 | 0.436147 |
e8ce7812ba16550644fb17607334947234116bcd | 966 | py | Python | examples/simple_bot.py | GeoffreyWesthoff/imgen-client.py | d57c00b8eeaf561962ffbb6c1f3ae9d6a4a6cde7 | [
"MIT"
] | 1 | 2020-06-25T19:38:19.000Z | 2020-06-25T19:38:19.000Z | examples/simple_bot.py | GeoffreyWesthoff/imgen-client.py | d57c00b8eeaf561962ffbb6c1f3ae9d6a4a6cde7 | [
"MIT"
] | null | null | null | examples/simple_bot.py | GeoffreyWesthoff/imgen-client.py | d57c00b8eeaf561962ffbb6c1f3ae9d6a4a6cde7 | [
"MIT"
] | null | null | null | """
DANK MEMER IMGEN API CLIENT
---------------------------
Copyright: Copyright 2019 Melms Media LLC
License: MIT
"""
from discord import Client
from imgen import AsyncClient
bot = Client()
memegen = AsyncClient(token='tokengoeshere')
@bot.event
async def on_ready():
print('Logged in as %s' % bot.user)
@bo... | 26.833333 | 105 | 0.653209 | 0 | 0 | 0 | 0 | 691 | 0.715321 | 669 | 0.692547 | 266 | 0.275362 |
e8cf1815da91e995a850a952f368039cd746e5df | 89 | py | Python | src/UQpy/surrogates/kriging/correlation_models/baseclass/__init__.py | SURGroup/UncertaintyQuantification | a94c8db47d07134ea2b3b0a3ca53ca818532c3e6 | [
"MIT"
] | null | null | null | src/UQpy/surrogates/kriging/correlation_models/baseclass/__init__.py | SURGroup/UncertaintyQuantification | a94c8db47d07134ea2b3b0a3ca53ca818532c3e6 | [
"MIT"
] | null | null | null | src/UQpy/surrogates/kriging/correlation_models/baseclass/__init__.py | SURGroup/UncertaintyQuantification | a94c8db47d07134ea2b3b0a3ca53ca818532c3e6 | [
"MIT"
] | null | null | null | from UQpy.surrogates.kriging.correlation_models.baseclass.Correlation import Correlation
| 44.5 | 88 | 0.898876 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e8cf41221caeb2929a1bb122b724d01fc3c85985 | 7,552 | py | Python | discrete_ppo/ppo_goalgrid.py | sen-pai/pygame2gym | 1c8bc1422c1f3fb80054e77c03362e7eca2ef461 | [
"MIT"
] | 1 | 2020-11-04T18:02:13.000Z | 2020-11-04T18:02:13.000Z | discrete_ppo/ppo_goalgrid.py | sen-pai/pygame2gym | 1c8bc1422c1f3fb80054e77c03362e7eca2ef461 | [
"MIT"
] | null | null | null | discrete_ppo/ppo_goalgrid.py | sen-pai/pygame2gym | 1c8bc1422c1f3fb80054e77c03362e7eca2ef461 | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as F
from torch.utils import tensorboard
import argparse
import numpy as np
import os
from statistics import mean, stdev
from tqdm import tqdm
import json
import gym
import simple_discrete_game
from models.cnn_agent import cnn_value_net, cnn_policy_net
from utils.memory import... | 34.327273 | 134 | 0.651218 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,024 | 0.135593 |
e8cf436b3f7cff830940245da46ee0d3379aa73a | 435 | py | Python | tinder/__init__.py | mzdravkov/elsys-ci-flask-example | 6543e1cc7e40db0535df6c4fe78120fd529d5cbb | [
"Apache-2.0"
] | 2 | 2019-12-30T13:26:55.000Z | 2020-01-18T14:03:25.000Z | tinder/__init__.py | mzdravkov/elsys-ci-flask-example | 6543e1cc7e40db0535df6c4fe78120fd529d5cbb | [
"Apache-2.0"
] | 3 | 2019-11-05T16:47:54.000Z | 2020-10-31T18:50:31.000Z | tinder/__init__.py | mzdravkov/elsys-ci-flask-example | 6543e1cc7e40db0535df6c4fe78120fd529d5cbb | [
"Apache-2.0"
] | 24 | 2019-10-10T19:17:40.000Z | 2020-10-25T10:42:00.000Z | from flask import Flask
from flask_socketio import SocketIO
from flask_sqlalchemy import SQLAlchemy
UPLOAD_FOLDER = 'uploads'
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif'}
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/dev.db'
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
app.secret_... | 25.588235 | 63 | 0.770115 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 125 | 0.287356 |
e8cfdb21fb6c07f6632ba57c031ad7697503326a | 1,910 | py | Python | pose/excerciseClass.py | San-B-09/BeFit | 7bd9cad51d6135fc5fab7221336f8969653b6af5 | [
"Apache-2.0"
] | null | null | null | pose/excerciseClass.py | San-B-09/BeFit | 7bd9cad51d6135fc5fab7221336f8969653b6af5 | [
"Apache-2.0"
] | null | null | null | pose/excerciseClass.py | San-B-09/BeFit | 7bd9cad51d6135fc5fab7221336f8969653b6af5 | [
"Apache-2.0"
] | null | null | null | from pose.poseClass import pose
from pose import helpers
class dumbbell_lateral_raises(pose):
angles={
('left_hip','left_shoulder','left_elbow'):None,
('right_hip','right_shoulder','right_elbow'):None,
('left_shoulder','left_elbow','left_wrist'):None,
('right_shoulder','right_elbow'... | 30.31746 | 62 | 0.610471 | 1,842 | 0.964398 | 0 | 0 | 0 | 0 | 0 | 0 | 592 | 0.309948 |
e8d0887b58745afaab21c99b854c58a1db279ba6 | 3,850 | py | Python | pyMIDICapSense.py | midilab/pyMIDICapSense | 1993381a6fc8b2906ca1e4b1bb822df827952bea | [
"MIT"
] | 2 | 2020-05-08T18:15:28.000Z | 2020-07-19T00:42:47.000Z | pyMIDICapSense.py | midilab/pyMIDICapSense | 1993381a6fc8b2906ca1e4b1bb822df827952bea | [
"MIT"
] | null | null | null | pyMIDICapSense.py | midilab/pyMIDICapSense | 1993381a6fc8b2906ca1e4b1bb822df827952bea | [
"MIT"
] | null | null | null | import wiringpi2
import rtmidi
from defines import *
from config import *
#import config
# config.TIMEOUT
def Setup(outPin, inPin, ledPin):
# set Send Pin Register
wiringpi2.pinMode(outPin, OUTPUT)
# set receivePin Register low to make sure pullups are off
wiringpi2.pinMode(inPin, OUTPUT)
wiringpi2.digitalWri... | 24.522293 | 111 | 0.651948 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,578 | 0.40987 |
e8d1a1267a50a6e4e81cbb82affa3e724bd9c390 | 841 | py | Python | src/losses.py | saman-codes/dldojo | 9fd828f1902ba3d46e9bb5f554ef37d07335b29e | [
"MIT"
] | null | null | null | src/losses.py | saman-codes/dldojo | 9fd828f1902ba3d46e9bb5f554ef37d07335b29e | [
"MIT"
] | null | null | null | src/losses.py | saman-codes/dldojo | 9fd828f1902ba3d46e9bb5f554ef37d07335b29e | [
"MIT"
] | null | null | null | import numpy as np
class Loss():
def output_gradient(self):
return
class MSE(Loss):
def __call__(self, predicted, labels):
return 0.5 * np.square(predicted - labels)
def output_gradient(self, predicted, labels):
return predicted - labels
class BinaryCrossEntropy(Loss):
def _... | 30.035714 | 91 | 0.688466 | 813 | 0.966706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e8d389d59d2e598814e8742d6ed48d600f563413 | 436 | py | Python | cape_privacy/pandas/transformations/test_utils.py | vismaya-Kalaiselvan/cape-python | 2b93696cec43c4bab9098c35eccf6f2f66d9e5c0 | [
"Apache-2.0"
] | 144 | 2020-06-23T21:31:49.000Z | 2022-02-25T15:51:00.000Z | cape_privacy/pandas/transformations/test_utils.py | vismaya-Kalaiselvan/cape-python | 2b93696cec43c4bab9098c35eccf6f2f66d9e5c0 | [
"Apache-2.0"
] | 44 | 2020-06-24T14:42:23.000Z | 2022-02-21T03:30:58.000Z | cape_privacy/pandas/transformations/test_utils.py | vismaya-Kalaiselvan/cape-python | 2b93696cec43c4bab9098c35eccf6f2f66d9e5c0 | [
"Apache-2.0"
] | 16 | 2020-06-26T20:05:51.000Z | 2022-01-12T05:23:58.000Z | import pandas as pd
class PlusN:
"""A sample transform that adds n to a specific field.
Attributes:
field: The field that this transform will be applied to.
n: The value to add to the field.
"""
identifier = "plusN"
type_signature = "col->col"
def __init__(self, n: int = 1) ... | 21.8 | 64 | 0.607798 | 413 | 0.947248 | 0 | 0 | 0 | 0 | 0 | 0 | 203 | 0.465596 |
e8d415fab5a4afde95fd5d9bc52286a0958b5e14 | 5,003 | py | Python | Redmash/redmash.py | zatherz/reddit | bd4378ff62e893d28fa824df5678c6de4021b123 | [
"MIT"
] | 4 | 2016-05-04T10:46:58.000Z | 2021-03-22T06:05:40.000Z | Redmash/redmash.py | zatherz/reddit | bd4378ff62e893d28fa824df5678c6de4021b123 | [
"MIT"
] | null | null | null | Redmash/redmash.py | zatherz/reddit | bd4378ff62e893d28fa824df5678c6de4021b123 | [
"MIT"
] | null | null | null | #/u/GoldenSights
import praw # simple interface to the reddit API, also handles rate limiting of requests
import time
import datetime
import traceback
import pickle
'''USER CONFIGURATION'''
APP_ID = ""
APP_SECRET = ""
APP_URI = ""
APP_REFRESH = ""
# https://www.reddit.com/comments/3cm1p8/how_to_make_your_bot_use_oaut... | 26.611702 | 148 | 0.695783 | 27 | 0.005397 | 0 | 0 | 0 | 0 | 0 | 0 | 1,739 | 0.347591 |
e8d5737be4a024a7d11423b09416200eaeadcd17 | 8,222 | py | Python | src/pynadc/scia/db.py | rmvanhees/pynadc | c34d722dea8bfdf357271da18df0fb08d612a1ba | [
"BSD-3-Clause"
] | 1 | 2019-02-17T06:52:17.000Z | 2019-02-17T06:52:17.000Z | src/pynadc/scia/db.py | rmvanhees/pynadc | c34d722dea8bfdf357271da18df0fb08d612a1ba | [
"BSD-3-Clause"
] | null | null | null | src/pynadc/scia/db.py | rmvanhees/pynadc | c34d722dea8bfdf357271da18df0fb08d612a1ba | [
"BSD-3-Clause"
] | 1 | 2021-03-26T10:50:44.000Z | 2021-03-26T10:50:44.000Z | """
This file is part of pynadc
https://github.com/rmvanhees/pynadc
Methods to query the NADC Sciamachy SQLite database
Copyright (c) 2012-2021 SRON - Netherlands Institute for Space Research
All Rights Reserved
License: BSD-3-Clause
"""
from pathlib import Path
import sqlite3
# ------------------------------... | 29.57554 | 79 | 0.518973 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,036 | 0.369253 |
e8d781ec22ac065bc93f930e69187121d239b5c5 | 22,889 | py | Python | project_1_2017/program/flatland.py | pveierland/permve-ntnu-it3708 | 1066d5c1af5c953dbaf129d7e05ce32f2d4292aa | [
"CC0-1.0"
] | null | null | null | project_1_2017/program/flatland.py | pveierland/permve-ntnu-it3708 | 1066d5c1af5c953dbaf129d7e05ce32f2d4292aa | [
"CC0-1.0"
] | null | null | null | project_1_2017/program/flatland.py | pveierland/permve-ntnu-it3708 | 1066d5c1af5c953dbaf129d7e05ce32f2d4292aa | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
import argparse
import collections
import enum
import itertools
import numpy as np
import pickle
import random
import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtSvg import *
from PyQt5.QtWidgets import *
from PyQt5.QtPrintSupport import *
class Action(enum.IntEnum):
... | 41.315884 | 123 | 0.590065 | 7,750 | 0.338591 | 0 | 0 | 0 | 0 | 0 | 0 | 1,607 | 0.070208 |
e8d83d7f2cf5e884bff990da5f5c7bb6b671dc63 | 745 | py | Python | cogs/Data.py | AmashiSenpai/AmashiDiscordBot | c5314572441ed820a26d987ba43e67624df7a97a | [
"MIT"
] | null | null | null | cogs/Data.py | AmashiSenpai/AmashiDiscordBot | c5314572441ed820a26d987ba43e67624df7a97a | [
"MIT"
] | null | null | null | cogs/Data.py | AmashiSenpai/AmashiDiscordBot | c5314572441ed820a26d987ba43e67624df7a97a | [
"MIT"
] | null | null | null | from pycord.discord.ext import commands
import pycord.discord as discord
from pycord.discord import Embed
import requests
import json
from discord import Embed
class Data(commands.Cog):
def __init__(self, bot) -> None:
self.bot: commands.Bot = bot
@commands.command()
async def ping(self, ctx):
await ctx... | 24.032258 | 89 | 0.699329 | 540 | 0.724832 | 0 | 0 | 439 | 0.589262 | 395 | 0.530201 | 147 | 0.197315 |
e8d86181d638617f52c86437ff758dca3b1df2e4 | 17,743 | py | Python | scripts/Run.py | ekg/shasta | e2fd3c3d79fb4cafe77c62f6af2fef46f7a04b01 | [
"BSD-3-Clause"
] | null | null | null | scripts/Run.py | ekg/shasta | e2fd3c3d79fb4cafe77c62f6af2fef46f7a04b01 | [
"BSD-3-Clause"
] | null | null | null | scripts/Run.py | ekg/shasta | e2fd3c3d79fb4cafe77c62f6af2fef46f7a04b01 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python3
from SetupRunDirectory import verifyDirectoryFiles, setupRunDirectory
from CleanupRunDirectory import cleanUpRunDirectory
from RunAssembly import verifyConfigFiles, verifyFastaFiles, runAssembly, initializeAssembler
from SaveRun import saveRun
import configparser
from datetime import datetime
from ... | 35.344622 | 137 | 0.650961 | 1,236 | 0.069661 | 0 | 0 | 0 | 0 | 0 | 0 | 7,706 | 0.434312 |
e8d9603c4f23969490a26fe940e3be9b6eaabe3e | 6,651 | py | Python | prestring/output.py | podhmo/prestring | 8a3499377d1b1b2b180809b31bd7536de5c3ec4d | [
"MIT"
] | 8 | 2015-03-05T07:32:52.000Z | 2022-03-11T09:28:21.000Z | prestring/output.py | podhmo/prestring | 8a3499377d1b1b2b180809b31bd7536de5c3ec4d | [
"MIT"
] | 19 | 2016-12-01T03:09:03.000Z | 2021-03-28T05:27:35.000Z | prestring/output.py | podhmo/prestring | 8a3499377d1b1b2b180809b31bd7536de5c3ec4d | [
"MIT"
] | 1 | 2017-07-19T12:39:43.000Z | 2017-07-19T12:39:43.000Z | import typing as t
import typing_extensions as tx
import sys
import logging
import os.path
import dataclasses
import filecmp
from io import StringIO
from .minifs import MiniFS, File, T, DefaultT
from .utils import reify
logger = logging.getLogger(__name__)
ActionType = tx.Literal["update", "create"]
class Writer(tx.... | 29.959459 | 87 | 0.568787 | 5,721 | 0.860171 | 0 | 0 | 1,846 | 0.277552 | 0 | 0 | 498 | 0.074876 |
2cd13739878101d7497f2cd47bc8682631e79c60 | 4,158 | py | Python | demo.py | Yijun-Mao/CGenerator | 74bf8952b759ad6b2cadcab1c4b92e192c82abeb | [
"MIT"
] | 9 | 2020-11-11T13:21:56.000Z | 2021-12-15T14:13:47.000Z | translate.py | superduduguan/CGenerator | 3d9159ad1dbece9e040d08b89775c7b4c19f7e5f | [
"MIT"
] | null | null | null | translate.py | superduduguan/CGenerator | 3d9159ad1dbece9e040d08b89775c7b4c19f7e5f | [
"MIT"
] | 2 | 2020-11-11T13:22:03.000Z | 2020-11-11T13:38:52.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from itertools import repeat
import os
import numpy as np
import json
from flask import Flask,render_template,url_for,request
import joblib
import traceback
import requests
from bs4 import BeautifulSoup
import re
from onmt.utils.log... | 28.675862 | 117 | 0.642136 | 0 | 0 | 0 | 0 | 1,683 | 0.389223 | 0 | 0 | 824 | 0.190564 |