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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0063b4363feb2d53a710577134e6f03f99ea9957 | 34,024 | py | Python | asaplib/data/xyz.py | BingqingCheng/ASAP | a92dd34eaa092dcbe46163e000ebd2ccee22f8ae | [
"MIT"
] | 74 | 2020-01-09T10:38:39.000Z | 2022-03-04T15:09:05.000Z | asaplib/data/xyz.py | FelixWodaczek/ASAP | d34a064cd7e409ad8b5ae0dec4f1c0a621717773 | [
"MIT"
] | 31 | 2020-01-30T13:15:42.000Z | 2022-03-03T05:42:51.000Z | asaplib/data/xyz.py | FelixWodaczek/ASAP | d34a064cd7e409ad8b5ae0dec4f1c0a621717773 | [
"MIT"
] | 14 | 2020-02-23T15:03:31.000Z | 2022-03-04T15:04:04.000Z | """
ASAPXYZ class for handing atomic coordinate input and compute/output
"""
import os
import glob
import json
from yaml import dump as ydump
from yaml import Dumper
import numpy as np
from ase import Atoms
from ase.io import read, write
from ase.build import niggli_reduce
from tqdm.auto import tqdm
from joblib import ... | 40.698565 | 123 | 0.567629 |
a1a3735c5c6ea78cb7440023d45cc68af984fa66 | 1,663 | py | Python | openpnm/network/_voronoi.py | xu-kai-xu/OpenPNM | 61d5fc4729a0a29291cf6c53c07c4246e7a13714 | [
"MIT"
] | 2 | 2019-08-24T09:17:40.000Z | 2020-07-05T07:21:21.000Z | openpnm/network/_voronoi.py | xu-kai-xu/OpenPNM | 61d5fc4729a0a29291cf6c53c07c4246e7a13714 | [
"MIT"
] | null | null | null | openpnm/network/_voronoi.py | xu-kai-xu/OpenPNM | 61d5fc4729a0a29291cf6c53c07c4246e7a13714 | [
"MIT"
] | null | null | null | import logging
from openpnm import topotools
from openpnm.network import DelaunayVoronoiDual
logger = logging.getLogger(__name__)
__all__ = ['Voronoi']
class Voronoi(DelaunayVoronoiDual):
r"""
Random network formed by Voronoi tessellation of arbitrary base points
Parameters
----------
points : ... | 33.26 | 77 | 0.65003 |
d530fc38aaca03a3ef6ec801f7a34eaa7d41ebb6 | 11,395 | py | Python | openstack_dashboard/dashboards/admin/volume_types/tables.py | msarmie/horizon | 84be2acf8e6263c3273e18a51c5aff948bb693c7 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/admin/volume_types/tables.py | msarmie/horizon | 84be2acf8e6263c3273e18a51c5aff948bb693c7 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/admin/volume_types/tables.py | msarmie/horizon | 84be2acf8e6263c3273e18a51c5aff948bb693c7 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 33.221574 | 78 | 0.635893 |
e7df1786e26cfb0277fbc11026264fd21813f75b | 3,148 | py | Python | workflow/notebooks/analysis/scripts/df_styles.py | CambridgeSemiticsLab/BH_time_collocations | 2d1864b6e9cd26624c769ee1e970d69d19da7fbf | [
"CC-BY-4.0"
] | 5 | 2019-06-19T19:42:21.000Z | 2021-04-20T22:43:45.000Z | workflow/notebooks/analysis/scripts/df_styles.py | CambridgeSemiticsLab/BHTenseAndAspect | 2d1864b6e9cd26624c769ee1e970d69d19da7fbf | [
"CC-BY-4.0"
] | 2 | 2020-02-25T10:19:40.000Z | 2020-03-13T15:29:01.000Z | workflow/notebooks/analysis/scripts/df_styles.py | CambridgeSemiticsLab/BHTenseAndAspect | 2d1864b6e9cd26624c769ee1e970d69d19da7fbf | [
"CC-BY-4.0"
] | null | null | null | """
This module contains functions for stylizing dataframes.
On showing text:
Dataframes in this project contain columns of text.
When analyzing various categories, we often want to
access these text columns and browse particular
samples without looking at all of the columns.
We also want the Hebrew text to show up... | 32.453608 | 94 | 0.650572 |
088d3ed7a50b8e07cfa7c3aaf478804507e209fc | 2,475 | py | Python | utils/sms_auth.py | andresvillatorres/tinder_light_scraper | b950bf240c291acfb1909a07d98d60458adf032d | [
"MIT"
] | null | null | null | utils/sms_auth.py | andresvillatorres/tinder_light_scraper | b950bf240c291acfb1909a07d98d60458adf032d | [
"MIT"
] | null | null | null | utils/sms_auth.py | andresvillatorres/tinder_light_scraper | b950bf240c291acfb1909a07d98d60458adf032d | [
"MIT"
] | null | null | null | #cite source for this code
#github fbessez
import json
import requests
REQ_URL = "https://graph.accountkit.com/v1.2/start_login?access_token=AA%7C464891386855067%7Cd1891abb4b0bcdfa0580d9b839f4a522&credentials_type=phone_number&fb_app_events_enabled=1&fields=privacy_policy%2Cterms_of_service&locale=fr_FR&phone_number... | 51.5625 | 366 | 0.753131 |
7062dcb350b935a373de5ffc65a2e55e1c8888fb | 3,225 | py | Python | src/models/peakfinder.py | charlesxjyang/DeepGeyser | 59f54c67667800f091d7af1805c04bbc36c7624b | [
"Apache-2.0"
] | null | null | null | src/models/peakfinder.py | charlesxjyang/DeepGeyser | 59f54c67667800f091d7af1805c04bbc36c7624b | [
"Apache-2.0"
] | null | null | null | src/models/peakfinder.py | charlesxjyang/DeepGeyser | 59f54c67667800f091d7af1805c04bbc36c7624b | [
"Apache-2.0"
] | null | null | null | #misc
import sys
#data processing
import pandas as pd
import numpy as np
from scipy.signal import find_peaks,find_peaks_cwt
import matplotlib.pyplot as plt
# homemade
sys.path.append('../../utils')
from preprocessing import temp_forecasting_shape_processing,test_train_split
from error_reporting import error_reporting_r... | 35.833333 | 114 | 0.715659 |
9bf24cf7656bb001021c40b0ade93ec7cf0a04bc | 13,299 | py | Python | test/xpath/test_boolean_expr.py | zepheira/amara | d3ffe07d6e2266b34d72b012a82d572c8edbf1e7 | [
"Apache-2.0"
] | 6 | 2015-01-30T03:50:36.000Z | 2022-03-20T16:09:58.000Z | test/xpath/test_boolean_expr.py | zepheira/amara | d3ffe07d6e2266b34d72b012a82d572c8edbf1e7 | [
"Apache-2.0"
] | 2 | 2015-02-04T17:18:47.000Z | 2019-09-27T23:39:52.000Z | test/xpath/test_boolean_expr.py | zepheira/amara | d3ffe07d6e2266b34d72b012a82d572c8edbf1e7 | [
"Apache-2.0"
] | 6 | 2015-02-04T16:16:18.000Z | 2019-10-30T20:07:48.000Z | #!/usr/bin/env python
from amara import tree
from amara.xpath import datatypes
from amara.xpath.expressions.basics import string_literal, number_literal
from amara.xpath.expressions.booleans import and_expr, or_expr, equality_expr, relational_expr
from test_expressions import (
base_expression,
# boolean liter... | 57.821739 | 94 | 0.620197 |
a9eec2116b361367244b42432842d91585c0250f | 60 | py | Python | premade_modules/2.80/e5e885d0ecb9430a73e0a904cdb6035a2ef77e98/bpy_extras/node_utils.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.80/e5e885d0ecb9430a73e0a904cdb6035a2ef77e98/bpy_extras/node_utils.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.80/e5e885d0ecb9430a73e0a904cdb6035a2ef77e98/bpy_extras/node_utils.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | def find_node_input(node, name):
'''
'''
pass
| 8.571429 | 32 | 0.5 |
4dc58d4749aebcf2147ec0bbb07e175c3f0aa2ce | 1,358 | py | Python | References/Geovana Neves/TCC_Geovana_Neves_GitHub/SUAVE_modifications/SUAVE-feature-constant_throttle_EAS/trunk/SUAVE/Attributes/Propellants/Jet_A1.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | References/Geovana Neves/TCC_Geovana_Neves_GitHub/SUAVE_modifications/SUAVE-feature-constant_throttle_EAS/trunk/SUAVE/Attributes/Propellants/Jet_A1.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | References/Geovana Neves/TCC_Geovana_Neves_GitHub/SUAVE_modifications/SUAVE-feature-constant_throttle_EAS/trunk/SUAVE/Attributes/Propellants/Jet_A1.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | #Jet A1
#
# Created: Unk 2013, SUAVE TEAM
# Modified: Apr 2015, SUAVE TEAM
# Feb 2016, M.Vegh
# ----------------------------------------------------------------------
# Imports
# ----------------------------------------------------------------------
from Propellant import Propellant
# --------------------... | 43.806452 | 103 | 0.352725 |
10227e2bd2d8dc71bdf3ea0047b2f43580e96cd8 | 5,831 | py | Python | core/src/apps/tezos/sign_tx.py | Kayuii/trezor-crypto | 6556616681a4e2d7e18817e8692d4f6e041dee01 | [
"MIT"
] | null | null | null | core/src/apps/tezos/sign_tx.py | Kayuii/trezor-crypto | 6556616681a4e2d7e18817e8692d4f6e041dee01 | [
"MIT"
] | 1 | 2019-02-08T00:22:42.000Z | 2019-02-13T09:41:54.000Z | core/src/apps/tezos/sign_tx.py | Kayuii/trezor-crypto | 6556616681a4e2d7e18817e8692d4f6e041dee01 | [
"MIT"
] | 2 | 2019-02-07T23:57:09.000Z | 2020-10-21T07:07:27.000Z | from trezor import wire
from trezor.crypto import hashlib
from trezor.crypto.curve import ed25519
from trezor.messages import TezosContractType
from trezor.messages.TezosSignedTx import TezosSignedTx
from apps.common import paths
from apps.common.writers import write_bytes, write_uint8
from apps.tezos import CURVE, he... | 33.511494 | 88 | 0.703653 |
2c81ad554c8316e587106b9a0b3b490d3fd119fb | 5,339 | py | Python | venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_internal/utils/temp_dir.py | xiegudong45/typeidea | db6504a232d120d6ffa185730bd35b9b9ecffa6c | [
"Apache-2.0"
] | 9,953 | 2019-04-03T23:41:04.000Z | 2022-03-31T11:54:44.000Z | venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_internal/utils/temp_dir.py | xiegudong45/typeidea | db6504a232d120d6ffa185730bd35b9b9ecffa6c | [
"Apache-2.0"
] | 242 | 2019-01-29T15:48:27.000Z | 2022-03-31T22:09:21.000Z | virtual/lib/python3.6/site-packages/pip/_internal/utils/temp_dir.py | eyern/instagram_clone | c18da15b35d28d91c3f63904af9d5da4e8e3e8ae | [
"MIT"
] | 2,803 | 2019-04-06T13:15:33.000Z | 2022-03-31T07:42:01.000Z | from __future__ import absolute_import
import errno
import itertools
import logging
import os.path
import tempfile
from pip._internal.utils.misc import rmtree
logger = logging.getLogger(__name__)
class TempDirectory(object):
"""Helper class that owns and cleans up a temporary directory.
This class can be ... | 34.224359 | 79 | 0.609852 |
c465fd166e7256db49ba5ab583f67519cbe18baf | 1,713 | py | Python | test/pybind_test/criteo_2node_4gpu.py | xjqbest/HugeCTR | 0b1c92d5e65891dfdd90d917bc6d520d0ca5d1e1 | [
"Apache-2.0"
] | 130 | 2021-10-11T11:55:28.000Z | 2022-03-31T21:53:07.000Z | test/pybind_test/criteo_2node_4gpu.py | xjqbest/HugeCTR | 0b1c92d5e65891dfdd90d917bc6d520d0ca5d1e1 | [
"Apache-2.0"
] | 72 | 2021-10-09T04:59:09.000Z | 2022-03-31T11:27:54.000Z | test/pybind_test/criteo_2node_4gpu.py | xjqbest/HugeCTR | 0b1c92d5e65891dfdd90d917bc6d520d0ca5d1e1 | [
"Apache-2.0"
] | 29 | 2021-11-03T22:35:01.000Z | 2022-03-30T13:11:59.000Z | import hugectr
from mpi4py import MPI
import threading
import sys
def model_test(json_file):
solver = hugectr.CreateSolver(max_eval_batches = 100,
batchsize_eval = 16384,
batchsize = 16384,
vvgpu = [[0,1,2,3],[4,5,6,7]],
... | 42.825 | 113 | 0.599533 |
c4cf45cf8f0d598e2fd88ea93f10812b874de737 | 336 | py | Python | examples/adc.py | kflmiami420/enviroplus-python | 0d1894fbf26465c13503c79b8d4a87044be2f90a | [
"MIT"
] | 2 | 2020-02-29T09:17:49.000Z | 2020-04-08T16:44:21.000Z | examples/adc.py | kflmiami420/enviroplus-python | 0d1894fbf26465c13503c79b8d4a87044be2f90a | [
"MIT"
] | null | null | null | examples/adc.py | kflmiami420/enviroplus-python | 0d1894fbf26465c13503c79b8d4a87044be2f90a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import time
from enviroplus import gas
print("""adc.py - Print readings from the MICS6814 Gas sensor.
Press Ctrl+C to exit!
""")
gas.enable_adc()
gas.set_adc_gain(4.096)
try:
while True:
readings = gas.read_all()
print(readings)
time.sleep(1.0)
except KeyboardInte... | 15.272727 | 62 | 0.669643 |
c7794ab6ad3520952507f50ba64704bbc7b9a7b7 | 1,064 | py | Python | forecaster/security/preserver.py | federico123579/Forecaster | 047e2c65f99966bbf31b2919039487e174517427 | [
"MIT"
] | 6 | 2020-05-14T10:54:29.000Z | 2021-12-19T02:48:55.000Z | forecaster/security/preserver.py | federico123579/Forecaster | 047e2c65f99966bbf31b2919039487e174517427 | [
"MIT"
] | null | null | null | forecaster/security/preserver.py | federico123579/Forecaster | 047e2c65f99966bbf31b2919039487e174517427 | [
"MIT"
] | 1 | 2020-11-17T07:40:56.000Z | 2020-11-17T07:40:56.000Z | #!/usr/bin/env python
"""
forecaster.security.preserver
~~~~~~~~~~~~~~
Facade class to preserve profits.
"""
import logging
from forecaster.handler import Client
LOGGER = logging.getLogger('forecaster.predict')
class Preserver(object):
"""module that preserve funds"""
def __init__(self, strat):
... | 25.333333 | 67 | 0.630639 |
b70de697c14d3dc339c865e03912f81eb9aacd01 | 3,580 | py | Python | Simulation/Test/Scalability/VerifyGrowth.py | informatik-mannheim/Moduro-CC3D | 7e67ebbb92f8d18f1774501557db0cfae6f746f1 | [
"Apache-2.0"
] | null | null | null | Simulation/Test/Scalability/VerifyGrowth.py | informatik-mannheim/Moduro-CC3D | 7e67ebbb92f8d18f1774501557db0cfae6f746f1 | [
"Apache-2.0"
] | 29 | 2016-02-02T12:20:43.000Z | 2017-12-28T14:41:53.000Z | Simulation/Test/Scalability/VerifyGrowth.py | informatik-mannheim/Moduro-CC3D | 7e67ebbb92f8d18f1774501557db0cfae6f746f1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 39.340659 | 93 | 0.660056 |
e654df6bc7cd039cc9b4a8377650db5c98682244 | 3,259 | py | Python | flaskApp/blog/__init__.py | kc446/kc446_flaskapp | 41747879d2d3523ee1684076f9835f4166fefed4 | [
"BSD-3-Clause"
] | null | null | null | flaskApp/blog/__init__.py | kc446/kc446_flaskapp | 41747879d2d3523ee1684076f9835f4166fefed4 | [
"BSD-3-Clause"
] | null | null | null | flaskApp/blog/__init__.py | kc446/kc446_flaskapp | 41747879d2d3523ee1684076f9835f4166fefed4 | [
"BSD-3-Clause"
] | null | null | null | from flask import Blueprint, flash, g, redirect, render_template, request, url_for
from werkzeug.exceptions import abort
from app.auth import login_required
from app.db import init_db
bp = Blueprint("blog", __name__, template_folder='templates')
@bp.route("/")
def index():
"""Show all the posts, most recent fir... | 27.158333 | 87 | 0.577478 |
07151d4012b563cca114eb4f30c34ad73a84c651 | 10,207 | py | Python | packages/syft/src/syft/core/node/common/action/get_object_action.py | jackbandy/PySyft | 0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b | [
"Apache-2.0"
] | null | null | null | packages/syft/src/syft/core/node/common/action/get_object_action.py | jackbandy/PySyft | 0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b | [
"Apache-2.0"
] | null | null | null | packages/syft/src/syft/core/node/common/action/get_object_action.py | jackbandy/PySyft | 0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b | [
"Apache-2.0"
] | null | null | null | # stdlib
from typing import Optional
# third party
from google.protobuf.reflection import GeneratedProtocolMessageType
from nacl.signing import VerifyKey
# syft absolute
import syft as sy
# relative
from .....logger import debug
from .....logger import traceback_and_raise
from .....logger import warning
from .....pr... | 37.664207 | 118 | 0.661115 |
347cb9617b7acaa94caf46587a71568b992dff2a | 43,239 | py | Python | src/prefect/client/client.py | romaintha/prefect | 303221f2cae01f6535603648f53b1bfdab337740 | [
"Apache-2.0"
] | null | null | null | src/prefect/client/client.py | romaintha/prefect | 303221f2cae01f6535603648f53b1bfdab337740 | [
"Apache-2.0"
] | null | null | null | src/prefect/client/client.py | romaintha/prefect | 303221f2cae01f6535603648f53b1bfdab337740 | [
"Apache-2.0"
] | null | null | null | import datetime
import json
import os
import uuid
import warnings
from pathlib import Path
from typing import TYPE_CHECKING, Any, Dict, List, NamedTuple, Optional, Union
from urllib.parse import urljoin
import pendulum
import toml
from slugify import slugify
import prefect
from prefect.utilities.exceptions import Aut... | 36.002498 | 160 | 0.549943 |
062fe10fc496821043dae0c5788578871b60a272 | 1,643 | py | Python | hubspot3/settings.py | guysoft/hubspot3 | fd8aec3f216dee5aeee517e2feddebd52ec53c4b | [
"Apache-2.0"
] | 1 | 2020-01-18T10:52:43.000Z | 2020-01-18T10:52:43.000Z | hubspot3/settings.py | guysoft/hubspot3 | fd8aec3f216dee5aeee517e2feddebd52ec53c4b | [
"Apache-2.0"
] | null | null | null | hubspot3/settings.py | guysoft/hubspot3 | fd8aec3f216dee5aeee517e2feddebd52ec53c4b | [
"Apache-2.0"
] | null | null | null | """
hubspot settings api
"""
from hubspot3.base import (
BaseClient
)
from hubspot3.error import (
HubspotError
)
SETTINGS_API_VERSION = 'v1'
class SettingsClient(BaseClient):
"""
Basic Python client for the HubSpot Settings API.
Use this to read settings for a given API key, as well as update ... | 29.872727 | 89 | 0.623859 |
057f75c98b60443ea9f8668ec048be6a3f033b87 | 1,051 | py | Python | modulos/finalizacao_devedores.py | kallif003/Sistema-Delivery | b9c68e3a02ff0d60c7513dd09c08d722e76b138b | [
"MIT"
] | null | null | null | modulos/finalizacao_devedores.py | kallif003/Sistema-Delivery | b9c68e3a02ff0d60c7513dd09c08d722e76b138b | [
"MIT"
] | null | null | null | modulos/finalizacao_devedores.py | kallif003/Sistema-Delivery | b9c68e3a02ff0d60c7513dd09c08d722e76b138b | [
"MIT"
] | null | null | null | def finalizar(*args):
try:
telaFinalizarDeve = args[0]
telaDevedores2 = args[1]
telaErro = args[2]
cursor = args[3]
banco10 = args[4]
QtWidgets = args[5]
id = telaFinalizarDeve.codigo.text()
sql = ("select id from gerenciarPedido where id = %s" % id)
... | 35.033333 | 104 | 0.605138 |
e8e4d87a6a2251eba90e30a1858820aed853db27 | 15,573 | py | Python | lib/python2.7/site-packages/feedgenerator/django/utils/feedgenerator.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | lib/python2.7/site-packages/feedgenerator/django/utils/feedgenerator.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | lib/python2.7/site-packages/feedgenerator/django/utils/feedgenerator.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | """
Syndication feed generation library -- used for generating RSS, etc.
Sample usage:
>>> from django.utils import feedgenerator
>>> feed = feedgenerator.Rss201rev2Feed(
... title="Poynter E-Media Tidbits",
... link="http://www.poynter.org/column.asp?id=31",
... description="A group Weblog by the sharpes... | 39.930769 | 120 | 0.611058 |
08af882308afa8a64aa5e8a826b7f71ee6a9e421 | 593 | py | Python | tests/test_skeleton.py | dymaxionlabs/satproc | 002c945eb378619659e85dddb73477b253899630 | [
"Apache-2.0"
] | 22 | 2021-05-19T13:45:55.000Z | 2022-02-17T22:40:28.000Z | tests/test_skeleton.py | dymaxionlabs/satproc | 002c945eb378619659e85dddb73477b253899630 | [
"Apache-2.0"
] | 35 | 2021-06-28T17:36:21.000Z | 2022-03-08T19:54:35.000Z | tests/test_skeleton.py | dymaxionlabs/satproc | 002c945eb378619659e85dddb73477b253899630 | [
"Apache-2.0"
] | 6 | 2021-05-20T22:49:37.000Z | 2022-03-31T14:30:32.000Z | import pytest
from satproc.skeleton import fib, main
__author__ = "Damián Silvani"
__copyright__ = "Dymaxion Labs"
__license__ = "Apache-2.0"
def test_fib():
"""API Tests"""
assert fib(1) == 1
assert fib(2) == 1
assert fib(7) == 13
with pytest.raises(AssertionError):
fib(-10)
def test_... | 22.807692 | 73 | 0.661046 |
70dbe2d694a9184f3ef804ce8027ab28f03f48c7 | 348 | py | Python | noor/sixth.py | tf153/Connect-Bud | 99489f0494c7a7eb7a4586a8d33f9e261f93419e | [
"MIT"
] | null | null | null | noor/sixth.py | tf153/Connect-Bud | 99489f0494c7a7eb7a4586a8d33f9e261f93419e | [
"MIT"
] | null | null | null | noor/sixth.py | tf153/Connect-Bud | 99489f0494c7a7eb7a4586a8d33f9e261f93419e | [
"MIT"
] | null | null | null | """
a = 10
b = 10
if a > b:
print("big")
elif a==b:
print("equal")
else:
print("small")
a = 1
# print all the numberws that are less than 100 and divisible by 5
# while and if
while a <= 100:
if a % 5 == 0:
print(a)
a += 1
"""
# print all the numbers that are divisible by 5 and 3 and are a... | 16.571429 | 90 | 0.583333 |
052e9ca6d31eac4b289f92689bcc7bb5e0d093f0 | 7,202 | py | Python | src/main.py | MitMaro/svndumpeditor | e87f4011f0813586603a43ecf01f938513f72c14 | [
"BSD-3-Clause"
] | null | null | null | src/main.py | MitMaro/svndumpeditor | e87f4011f0813586603a43ecf01f938513f72c14 | [
"BSD-3-Clause"
] | null | null | null | src/main.py | MitMaro/svndumpeditor | e87f4011f0813586603a43ecf01f938513f72c14 | [
"BSD-3-Clause"
] | null | null | null | """
File: /src/main.py
Project: Subversion Dump Editor
By: Tim Oram [t.oram@mitmaro.ca]
Website: http://www.mitmaro.ca/projects/svneditor/
http://code.google.com/p/svndumpeditor/
Email: svndump@mitmaro.ca
Created: June 26, 2009; Updated October 13, 2009
Purpose: The GUI that wraps the... | 37.316062 | 80 | 0.638434 |
d090121095c37912e2d84cecbcd5098d1ebfc355 | 315 | py | Python | catkin_ws/build/catkin_generated/order_packages.py | jose-montes1/Controls_Sandbox | 3c56d1af60292f956082eb5fd12c29863f4c46a1 | [
"MIT"
] | null | null | null | catkin_ws/build/catkin_generated/order_packages.py | jose-montes1/Controls_Sandbox | 3c56d1af60292f956082eb5fd12c29863f4c46a1 | [
"MIT"
] | null | null | null | catkin_ws/build/catkin_generated/order_packages.py | jose-montes1/Controls_Sandbox | 3c56d1af60292f956082eb5fd12c29863f4c46a1 | [
"MIT"
] | null | null | null | # generated from catkin/cmake/template/order_packages.context.py.in
source_root_dir = "/home/jose/catkin_ws/src"
whitelisted_packages = "".split(';') if "" != "" else []
blacklisted_packages = "".split(';') if "" != "" else []
underlay_workspaces = "/opt/ros/melodic".split(';') if "/opt/ros/melodic" != "" else []
| 52.5 | 87 | 0.666667 |
b9d550cb30f7d2dc314db963e74655aa9dfc6f16 | 1,069 | py | Python | island_backup/island_switcher.py | mishrasanskriti802/island-backup | 6dd0b45ac9cb87418e05ccfeb1150657d8a8964b | [
"MIT"
] | 17 | 2016-01-28T06:09:26.000Z | 2020-01-19T08:37:01.000Z | island_backup/island_switcher.py | mishrasanskriti802/island-backup | 6dd0b45ac9cb87418e05ccfeb1150657d8a8964b | [
"MIT"
] | 28 | 2015-12-15T05:08:28.000Z | 2017-04-20T02:34:27.000Z | island_backup/island_switcher.py | mishrasanskriti802/island-backup | 6dd0b45ac9cb87418e05ccfeb1150657d8a8964b | [
"MIT"
] | 7 | 2016-06-09T14:02:21.000Z | 2020-10-01T13:55:29.000Z | from .islands.adnmb import AdnmbPage
from .islands.nimingban import NiMingBanPage
from .islands.kukuku import KukukuPage
from .islands.the4chan import The4ChanPage
from .islands.the2chan import The2ChanPage
island_class_map = {
'adnmb': AdnmbPage,
'nimingban': NiMingBanPage,
'kukuku': KukukuPage,
'4ch... | 26.725 | 81 | 0.689429 |
9ecb915d6d5289653efceba7b187630fcc2b382a | 225 | py | Python | sphinx/source/docs/user_guide/examples/interaction_radio_group.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 12 | 2020-07-20T14:58:31.000Z | 2021-09-04T22:15:14.000Z | sphinx/source/docs/user_guide/examples/interaction_radio_group.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 1 | 2020-09-05T02:46:20.000Z | 2020-09-05T02:46:20.000Z | sphinx/source/docs/user_guide/examples/interaction_radio_group.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 3 | 2019-03-27T23:27:05.000Z | 2020-08-05T19:03:19.000Z | from bokeh.io import output_file, show
from bokeh.models.widgets import RadioGroup
output_file("radio_group.html")
radio_group = RadioGroup(
labels=["Option 1", "Option 2", "Option 3"], active=0)
show(radio_group)
| 22.5 | 62 | 0.737778 |
b8b603e78eb8f8932bfb6e55e36767706393f32d | 2,977 | py | Python | docs/samples/explanation/income/train.py | quanjielin/kfserving | b3e99d1131d12b8da151954340df2aea3ab161cb | [
"Apache-2.0"
] | null | null | null | docs/samples/explanation/income/train.py | quanjielin/kfserving | b3e99d1131d12b8da151954340df2aea3ab161cb | [
"Apache-2.0"
] | null | null | null | docs/samples/explanation/income/train.py | quanjielin/kfserving | b3e99d1131d12b8da151954340df2aea3ab161cb | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 kubeflow.org.
#
# 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,... | 38.166667 | 103 | 0.714142 |
74d5ce93d6eaad4900633dc04cf172c72fa9cda9 | 23,667 | py | Python | utils/lib/rr_graph/graph2.py | acomodi/symbiflow-arch-defs | a8df9683e9741c005f4356d67ed929d35dd4b6e4 | [
"ISC"
] | null | null | null | utils/lib/rr_graph/graph2.py | acomodi/symbiflow-arch-defs | a8df9683e9741c005f4356d67ed929d35dd4b6e4 | [
"ISC"
] | null | null | null | utils/lib/rr_graph/graph2.py | acomodi/symbiflow-arch-defs | a8df9683e9741c005f4356d67ed929d35dd4b6e4 | [
"ISC"
] | null | null | null | """ rr graph library that is not tied to the underlying serialization format
and provides simple fast lookup required to build real FPGA rr graph fabrics.
"""
from __future__ import print_function
from collections import namedtuple
from enum import Enum
from .tracks import Track
from lib.rr_graph import channel2
from ... | 32.689227 | 108 | 0.562851 |
951f06f48f054eb4cacbe1d46acaabf530e6148b | 1,935 | py | Python | python/pySimE/space/exp/pykep/analyze_Asteroids2.py | ProkopHapala/SimpleSimulationEngine | 240f9b7e85b3a6eda7a27dc15fe3f7b8c08774c5 | [
"MIT"
] | 26 | 2016-12-04T04:45:12.000Z | 2022-03-24T09:39:28.000Z | python/pySimE/space/exp/pykep/analyze_Asteroids2.py | Aki78/FlightAI | 9c5480f2392c9c89b9fee4902db0c4cde5323a6c | [
"MIT"
] | null | null | null | python/pySimE/space/exp/pykep/analyze_Asteroids2.py | Aki78/FlightAI | 9c5480f2392c9c89b9fee4902db0c4cde5323a6c | [
"MIT"
] | 2 | 2019-02-09T12:31:06.000Z | 2019-04-28T02:24:50.000Z |
from PyKEP import *
from pylab import *
maxlines=1000000
iline = 0
#infile = open('/home/prokop/Desktop/MPCORB.DAT')
infile = open('D:\\know\\Technika\\SpaceTech\\Asteroids\\Datafiles\\MPCORB.DAT')
for i in range(41):
line = infile.readline()
#print "---",i,"---",line
def toScale( x, xmin, xmax, nsteps ):
if... | 26.875 | 119 | 0.675452 |
2d2120706c137e204f46749a04b788fa4d2e8839 | 17,175 | py | Python | vnpy/gateway/bitmex/bitmex_gateway.py | bixia/MyVnpy | c0b464dce2ca65b0d040472b53a581d933c8b742 | [
"MIT"
] | null | null | null | vnpy/gateway/bitmex/bitmex_gateway.py | bixia/MyVnpy | c0b464dce2ca65b0d040472b53a581d933c8b742 | [
"MIT"
] | null | null | null | vnpy/gateway/bitmex/bitmex_gateway.py | bixia/MyVnpy | c0b464dce2ca65b0d040472b53a581d933c8b742 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
'''
@File : bitmex_gateway.py
@License : (C)Copyright 2017-2018, Liugroup-NLPR-CASIA
@Modify Time @Author @Version @Desciption
------------ ------- -------- -----------
2021/4/3 10:08 Li Qiwen 1.0 None
'''
# encoding: UTF-8
from copy import copy... | 27.175633 | 86 | 0.539913 |
20adf1c13279835fd15967100b627a0418ce8c06 | 60 | py | Python | main.py | jsonfly/git-workshop-202109 | d016b69a85d70c0602fd2f2bc691b540a9aa8944 | [
"Apache-2.0"
] | null | null | null | main.py | jsonfly/git-workshop-202109 | d016b69a85d70c0602fd2f2bc691b540a9aa8944 | [
"Apache-2.0"
] | null | null | null | main.py | jsonfly/git-workshop-202109 | d016b69a85d70c0602fd2f2bc691b540a9aa8944 | [
"Apache-2.0"
] | null | null | null | print('valami_ipxum...')
print('Hello, World!') # ASDQWERTY
| 20 | 34 | 0.683333 |
dce91d5a9ca9c0f9071dedc01a77bd344703b8c3 | 6,928 | py | Python | pandas/tests/extension/base/methods.py | blueenvelope31/pandas | 6e1f41b45a0d08f662b794ed98695b8595f39023 | [
"BSD-3-Clause"
] | 1 | 2021-05-04T15:41:33.000Z | 2021-05-04T15:41:33.000Z | pandas/tests/extension/base/methods.py | blueenvelope31/pandas | 6e1f41b45a0d08f662b794ed98695b8595f39023 | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/extension/base/methods.py | blueenvelope31/pandas | 6e1f41b45a0d08f662b794ed98695b8595f39023 | [
"BSD-3-Clause"
] | 1 | 2021-05-04T15:41:25.000Z | 2021-05-04T15:41:25.000Z | import pytest
import numpy as np
import pandas as pd
import pandas.util.testing as tm
from .base import BaseExtensionTests
class BaseMethodsTests(BaseExtensionTests):
"""Various Series and DataFrame methods."""
@pytest.mark.parametrize('dropna', [True, False])
def test_value_counts(self, all_data, drop... | 39.141243 | 77 | 0.602627 |
9526822d8ec5d15a031c50427d9385436e444f69 | 723 | py | Python | palindrome.py | Nnaji/pyal | d406b6dfcb37c6518e59e429ae9a23e0633fe24c | [
"MIT"
] | null | null | null | palindrome.py | Nnaji/pyal | d406b6dfcb37c6518e59e429ae9a23e0633fe24c | [
"MIT"
] | null | null | null | palindrome.py | Nnaji/pyal | d406b6dfcb37c6518e59e429ae9a23e0633fe24c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# @AUTHUR: Kingsley Nnaji <kingsley.nnaji@gmail.com>
# @LICENCE: MIT
# Creation Date: 02.09.2019
def is_palindrome(s):
""" (str) -> boolean
Returns true if the argument is a palindrome else false
>>> is_palindrome("noon")
True
>>> is_palindrome("later")
False
>>> ... | 27.807692 | 71 | 0.634855 |
34baaa7df1a8df6b68836bc54117542f95646b3d | 4,369 | py | Python | human-feedback-api/human_feedback_api/migrations/0002_auto_20170907_1124.py | Shikhargupta/rl-teacher-atari | fe758e87c5c153283c3144554b3728f866940aef | [
"MIT"
] | 24 | 2017-08-08T18:54:50.000Z | 2021-11-16T01:02:50.000Z | human-feedback-api/human_feedback_api/migrations/0002_auto_20170907_1124.py | Shikhargupta/rl-teacher-atari | fe758e87c5c153283c3144554b3728f866940aef | [
"MIT"
] | 5 | 2018-10-15T11:52:05.000Z | 2018-10-30T12:58:53.000Z | human-feedback-api/human_feedback_api/migrations/0002_auto_20170907_1124.py | oguzserbetci/rl-teacher-atari | fd6c399921d347333d7c5b4b12c63f1a955cea5c | [
"MIT"
] | 7 | 2017-12-05T19:41:20.000Z | 2022-03-04T08:56:11.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-09-07 18:24
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import human_feedback_api.models
class Migration(migrations.Migration):
dependencies = [
('human_feedback_api', '0001... | 63.318841 | 188 | 0.652552 |
3177ebd1454e6d5bee11719d4aca9fcb67d5b45a | 358 | py | Python | tests/library_test.py | efargas/PyBBIO | b0b15fc52befd56e817dbc5876f738e70ef05541 | [
"MIT"
] | null | null | null | tests/library_test.py | efargas/PyBBIO | b0b15fc52befd56e817dbc5876f738e70ef05541 | [
"MIT"
] | null | null | null | tests/library_test.py | efargas/PyBBIO | b0b15fc52befd56e817dbc5876f738e70ef05541 | [
"MIT"
] | null | null | null | # A quick test to demonstrate the libraries directory scheme.
#
# imports and tests PyBBIO/libraries/example.py
try:
import example
except:
print "\nWe can't import the PyBBIO library until we've imported bbio"
print "Importing bbio"
from bbio import *
print "now we can import example"
import example
print "te... | 19.888889 | 72 | 0.76257 |
69c56b2ecdd771b4fc6b38508cf7dfc62f78c5e0 | 1,331 | py | Python | visualization/grill/door_baselines.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | visualization/grill/door_baselines.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | visualization/grill/door_baselines.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | import matplotlib
from visualization.grill.config import (
output_dir,
ashvin_base_dir,
format_func,
configure_matplotlib,
)
import matplotlib.pyplot as plt
from railrl.visualization import plot_util as plot
configure_matplotlib(matplotlib)
dirs = [
ashvin_base_dir + 's3doodad/share/camera_ready_d... | 27.163265 | 87 | 0.614576 |
8feb4d8e828f0132e5ee51a896384823b9c44f86 | 11,755 | py | Python | tests/utils_tests/test_html.py | adilwaheed21/django | d924f10b84a66b5007d7ac2641313ab9d30b02ff | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/utils_tests/test_html.py | adilwaheed21/django | d924f10b84a66b5007d7ac2641313ab9d30b02ff | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/utils_tests/test_html.py | adilwaheed21/django | d924f10b84a66b5007d7ac2641313ab9d30b02ff | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | import os
from datetime import datetime
from django.test import SimpleTestCase
from django.utils.functional import lazystr
from django.utils.html import (
conditional_escape, escape, escapejs, format_html, html_safe, json_script,
linebreaks, smart_urlquote, strip_spaces_between_tags, strip_tags, urlize,
)
from... | 43.058608 | 117 | 0.525138 |
83d2145cd245cc0443275be7a78173a6aac2ade2 | 12,566 | py | Python | fairseq/models/onemodel.py | dual-view-molecule-pretraining/dmp | bc3a2f1075c1bdaa66eb9677ad4952d9721c88b5 | [
"MIT"
] | 5 | 2021-08-09T14:52:54.000Z | 2022-03-26T05:23:29.000Z | fairseq/models/onemodel.py | dual-view-molecule-pretraining/dmp | bc3a2f1075c1bdaa66eb9677ad4952d9721c88b5 | [
"MIT"
] | 1 | 2021-07-03T12:30:33.000Z | 2021-07-03T12:30:33.000Z | fairseq/models/onemodel.py | dual-view-molecule-pretraining/dmp | bc3a2f1075c1bdaa66eb9677ad4952d9721c88b5 | [
"MIT"
] | 1 | 2021-07-03T12:15:27.000Z | 2021-07-03T12:15:27.000Z | from fairseq.models.fairseq_model import FairseqLanguageModel
import logging
from dataclasses import dataclass, field
from typing import Optional
from numpy.lib.arraysetops import isin
from fairseq import options, utils
from fairseq.dataclass import ChoiceEnum, FairseqDataclass
from fairseq.models import (BaseFairseqM... | 42.026756 | 109 | 0.617062 |
bd88b171c9d77793f2cc77f0da3615eb6cd90d0c | 841 | py | Python | tests/java/shim/cprotontypes.py | michaelandrepearce/qpid-proton-j | 6e8d2b8e6a2bf4fa0e7391033694cbc17519b2da | [
"Apache-2.0"
] | 32 | 2017-05-10T14:06:13.000Z | 2022-03-08T17:49:04.000Z | tests/java/shim/cprotontypes.py | michaelandrepearce/qpid-proton-j | 6e8d2b8e6a2bf4fa0e7391033694cbc17519b2da | [
"Apache-2.0"
] | 28 | 2017-01-25T15:59:58.000Z | 2022-01-28T00:29:24.000Z | tests/java/shim/cprotontypes.py | michaelandrepearce/qpid-proton-j | 6e8d2b8e6a2bf4fa0e7391033694cbc17519b2da | [
"Apache-2.0"
] | 59 | 2016-12-18T22:50:42.000Z | 2022-01-28T00:25:57.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 38.227273 | 62 | 0.768133 |
05fe7f237a5ea603ce53b9add99ab10005e95e58 | 7,362 | py | Python | Scripts/run_nmer_count.py | colinwalshbrown/CWB_utils | 86675812f9398845d1994b57500830e2c3dc6cc0 | [
"MIT"
] | null | null | null | Scripts/run_nmer_count.py | colinwalshbrown/CWB_utils | 86675812f9398845d1994b57500830e2c3dc6cc0 | [
"MIT"
] | null | null | null | Scripts/run_nmer_count.py | colinwalshbrown/CWB_utils | 86675812f9398845d1994b57500830e2c3dc6cc0 | [
"MIT"
] | null | null | null | import fasta_subseq_2 as fa
import cPickle as pck
import seq_plotmethods as sp
import itertools as it
import tables as tb
import numpy as np
from scipy import stats
import patser_tools as pat
import annotation_track
import matplotlib.pyplot as plt
import random as rnd
import os
import re
from __future__ import division... | 50.081633 | 140 | 0.681201 |
37ce2dd531d954afffa3d4dcaa2218cf6c1612a5 | 5,352 | py | Python | loss/frame_role_loss.py | utahnlp/structured_tuning_for_srl | 9d315575ddf929c1bc31252fd78dc85ba7319251 | [
"Apache-2.0"
] | 13 | 2020-05-02T06:46:23.000Z | 2022-02-02T16:48:45.000Z | loss/frame_role_loss.py | utahnlp/structured_tuning_for_srl | 9d315575ddf929c1bc31252fd78dc85ba7319251 | [
"Apache-2.0"
] | 3 | 2020-06-23T22:06:51.000Z | 2022-02-23T18:59:20.000Z | loss/frame_role_loss.py | utahnlp/structured_tuning_for_srl | 9d315575ddf929c1bc31252fd78dc85ba7319251 | [
"Apache-2.0"
] | 1 | 2021-02-17T21:34:02.000Z | 2021-02-17T21:34:02.000Z | import sys
import numpy as np
import torch
from torch import nn
from torch.autograd import Variable
from util.holder import *
from util.util import *
# loss on frame and role prediction
# Note that this loss only cares about the interaction of frame and role
class FrameRoleLoss(torch.nn.Module):
def __init__(self, op... | 34.307692 | 131 | 0.694694 |
8296032d395cf8e0402177d4c4cfa28bf430485f | 7,903 | py | Python | server/app/app.py | chanzuckerberg/single-cell-explorer | 51402e8befeca61311e6bd7a4127fa24b9f6e7be | [
"MIT"
] | 2 | 2021-08-30T16:32:16.000Z | 2022-03-25T22:36:23.000Z | server/app/app.py | chanzuckerberg/single-cell-explorer | 51402e8befeca61311e6bd7a4127fa24b9f6e7be | [
"MIT"
] | 194 | 2021-08-18T23:52:44.000Z | 2022-03-30T19:40:41.000Z | server/app/app.py | chanzuckerberg/single-cell-explorer | 51402e8befeca61311e6bd7a4127fa24b9f6e7be | [
"MIT"
] | 1 | 2022-01-21T09:20:15.000Z | 2022-01-21T09:20:15.000Z | import datetime
import hashlib
import logging
import os
from http import HTTPStatus
from urllib.parse import urlparse
from flask import Flask, redirect, current_app, make_response, abort, render_template, Blueprint
from flask_restful import Api, Resource
from server_timing import Timing as ServerTiming
import server.... | 39.123762 | 120 | 0.711249 |
381dce8fc486c5a486dd43d837fd34d19f39f9ab | 6,612 | py | Python | src/mlp_source/train_mlp.py | mariolys07/WildfireCauses | e4c22186538680ad2edeb67a84deb1824f5d4589 | [
"MIT"
] | null | null | null | src/mlp_source/train_mlp.py | mariolys07/WildfireCauses | e4c22186538680ad2edeb67a84deb1824f5d4589 | [
"MIT"
] | null | null | null | src/mlp_source/train_mlp.py | mariolys07/WildfireCauses | e4c22186538680ad2edeb67a84deb1824f5d4589 | [
"MIT"
] | 1 | 2021-02-14T00:43:10.000Z | 2021-02-14T00:43:10.000Z | from __future__ import print_function
import argparse
import os
import pandas as pd
from collections import Counter
import joblib
import numpy as np
from sklearn.neural_network import MLPClassifier
def model_fn(model_dir):
"""
Load model from the model_dir. This is the same model that is saved
in the main... | 37.146067 | 215 | 0.705989 |
6e84b6a93541e13c3fc22bddd907d8e66e2f0aca | 9,459 | py | Python | quay/models/user_view.py | angeiv/python-quay | 16072f87956d8f581ac9ebccc67f6563e977cf52 | [
"MIT"
] | null | null | null | quay/models/user_view.py | angeiv/python-quay | 16072f87956d8f581ac9ebccc67f6563e977cf52 | [
"MIT"
] | null | null | null | quay/models/user_view.py | angeiv/python-quay | 16072f87956d8f581ac9ebccc67f6563e977cf52 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Quay Frontend
This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. You can find out more at <a href=\"https://quay.io\">Quay</a>. # noqa: E501
OpenAPI spec version: v1
Contact: support@quay.io
Generated by: h... | 30.317308 | 201 | 0.597632 |
d48d076e3a19473e112794b7b719cee0d49df4a5 | 2,005 | py | Python | mayan/apps/documents/forms/document_file_forms.py | nattangwiwat/Mayan-EDMS-recitation | fcf16afb56eae812fb99144d65ae1ae6749de0b7 | [
"Apache-2.0"
] | 4 | 2021-09-02T00:16:30.000Z | 2021-09-09T22:25:15.000Z | mayan/apps/documents/forms/document_file_forms.py | nattangwiwat/Mayan-EDMS-recitation | fcf16afb56eae812fb99144d65ae1ae6749de0b7 | [
"Apache-2.0"
] | 86 | 2021-09-01T23:53:02.000Z | 2021-09-20T02:25:10.000Z | mayan/apps/documents/forms/document_file_forms.py | nattangwiwat/Mayan-EDMS-recitation | fcf16afb56eae812fb99144d65ae1ae6749de0b7 | [
"Apache-2.0"
] | 70 | 2021-09-01T12:54:51.000Z | 2022-02-16T00:53:18.000Z | from django import forms
from django.template.defaultfilters import filesizeformat
from django.utils.translation import ugettext_lazy as _
from mayan.apps.views.forms import DetailForm
from ..fields import DocumentFileField
from ..models.document_file_models import DocumentFile
__all__ = (
'DocumentFileForm', 'D... | 29.057971 | 74 | 0.539152 |
7f81de2d452ebbecd4ddb9d0af371441c49c2541 | 11,606 | py | Python | sdk/python/pulumi_azure_native/purview/v20210701/get_account.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/purview/v20210701/get_account.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/purview/v20210701/get_account.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 38.430464 | 393 | 0.661554 |
dc0b66fec51d6855a2048fe3fff6df2100033c56 | 3,357 | py | Python | Code_Hybrid3.py | SamanFekri/BookRecommendation | 07dfa875154af39546cb263d4407339ce26d47e8 | [
"MIT"
] | null | null | null | Code_Hybrid3.py | SamanFekri/BookRecommendation | 07dfa875154af39546cb263d4407339ce26d47e8 | [
"MIT"
] | null | null | null | Code_Hybrid3.py | SamanFekri/BookRecommendation | 07dfa875154af39546cb263d4407339ce26d47e8 | [
"MIT"
] | null | null | null | # This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g... | 31.083333 | 122 | 0.7605 |
d62b0f27c8f46b69ca25ff62da50127271b433ea | 2,944 | py | Python | sourceservers/api.py | danielunderwood/sourceservers | bcdcbf7f6fe1e0fee092ff0da97abd121b5f4713 | [
"Apache-2.0"
] | 1 | 2017-06-28T18:10:35.000Z | 2017-06-28T18:10:35.000Z | sourceservers/api.py | danielunderwood/sourceservers | bcdcbf7f6fe1e0fee092ff0da97abd121b5f4713 | [
"Apache-2.0"
] | null | null | null | sourceservers/api.py | danielunderwood/sourceservers | bcdcbf7f6fe1e0fee092ff0da97abd121b5f4713 | [
"Apache-2.0"
] | null | null | null | """
API for performing A2S queries
"""
import json
import time
import flask
import valve.source.a2s
import werkzeug.contrib.cache
import sourceservers
# Minimum number of seconds between polls
MIN_POLL_SECONDS = 120
api = flask.Blueprint('api', __name__)
cache = werkzeug.contrib.cache.SimpleCache()
def try_abort... | 26.053097 | 80 | 0.660326 |
f6b643551a36409b017085e99e2c3e1c003704c7 | 1,921 | py | Python | fund_info/fund_list.py | thedestiny/fund_python | 20f55a6b40e70cf9217c9406375653d8aea093d1 | [
"Apache-2.0"
] | 1 | 2022-02-14T02:58:02.000Z | 2022-02-14T02:58:02.000Z | fund_info/fund_list.py | thedestiny/fund_python | 20f55a6b40e70cf9217c9406375653d8aea093d1 | [
"Apache-2.0"
] | null | null | null | fund_info/fund_list.py | thedestiny/fund_python | 20f55a6b40e70cf9217c9406375653d8aea093d1 | [
"Apache-2.0"
] | null | null | null | import requests
import json
import demjson
from prettytable import PrettyTable
import db_executor as executor
# 数据表格的列表表头字段
title_list = ["code", "name", "value"]
# 查询基金列表信息
def query_fund_list(page=1, lx="1"):
req_url = "http://fund.eastmoney.com/Data/Fund_JJJZ_Data.aspx?lx={}&sort=zdf,desc&page={},200&onlySale... | 29.106061 | 116 | 0.595003 |
5b1e25db161eedb61eaf370d9188a2bc7dabcc28 | 11,730 | py | Python | docs/conf.py | igor-solomatov/python-compute | 16e7294cd536af9a8bf8e4e99219a883339aa955 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | igor-solomatov/python-compute | 16e7294cd536af9a8bf8e4e99219a883339aa955 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | igor-solomatov/python-compute | 16e7294cd536af9a8bf8e4e99219a883339aa955 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# google-cloud-compute documentation build configuration file
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values t... | 31.961853 | 88 | 0.702899 |
9aba6ace7cf0b0ca3d6890bd6d149a6c02cadc74 | 6,232 | py | Python | ligastorrinha/modules/create.py | pedropacheco95/ligastorrinha | e3334db08b21b54214a1f38a7dadc01385d96bfe | [
"MIT"
] | null | null | null | ligastorrinha/modules/create.py | pedropacheco95/ligastorrinha | e3334db08b21b54214a1f38a7dadc01385d96bfe | [
"MIT"
] | null | null | null | ligastorrinha/modules/create.py | pedropacheco95/ligastorrinha | e3334db08b21b54214a1f38a7dadc01385d96bfe | [
"MIT"
] | null | null | null | import functools
import datetime
from flask import Blueprint, flash, g, redirect, render_template, request, session, url_for
from werkzeug.security import check_password_hash, generate_password_hash
from ligastorrinha.tools import admin_required
from ligastorrinha.models import Player , Edition , League , Associatio... | 45.15942 | 140 | 0.656772 |
ce44484432a21c3460834c22a1cee93cf4ab2fe2 | 4,314 | py | Python | tests/01-bundle.py | juju-solutions/bundle-apache-ingest-kafka | 044ed8386601496aa0b164cd7b26049e89529574 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tests/01-bundle.py | juju-solutions/bundle-apache-ingest-kafka | 044ed8386601496aa0b164cd7b26049e89529574 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tests/01-bundle.py | juju-solutions/bundle-apache-ingest-kafka | 044ed8386601496aa0b164cd7b26049e89529574 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import amulet
import os
import unittest
import yaml
class TestBundle(unittest.TestCase):
bundle_file = os.path.join(os.path.dirname(__file__), '..', 'bundle.yaml')
@classmethod
def setUpClass(cls):
cls.d = amulet.Deployment(series='trusty')
with open(cls.bundle_fil... | 44.9375 | 99 | 0.656004 |
f74ef29f50dd6d72a4dacfb8ac9c0939de4ab774 | 10,422 | py | Python | Ops/test_ops.py | VTXNN/E2E | b877d1bf7fdb94f885804ac42f41cc9ecc3102f5 | [
"Apache-2.0"
] | null | null | null | Ops/test_ops.py | VTXNN/E2E | b877d1bf7fdb94f885804ac42f41cc9ecc3102f5 | [
"Apache-2.0"
] | null | null | null | Ops/test_ops.py | VTXNN/E2E | b877d1bf7fdb94f885804ac42f41cc9ecc3102f5 | [
"Apache-2.0"
] | 1 | 2020-05-18T10:54:13.000Z | 2020-05-18T10:54:13.000Z | import tensorflow as tf
import os
import math
import time
import numpy
import unittest
tf.compat.v1.disable_eager_execution()
from sklearn.neighbors import KernelDensity
from kde_histogram import KDEHistogram
from histogram_max import *
session = None
def get_session():
global session
if not session:
... | 41.031496 | 102 | 0.414604 |
c4595409506a62ae8f260999409d2cea0e0be3e6 | 1,497 | py | Python | sqlalchemy_mixins/serialize.py | sleeksky-llc/sqlalchemy-mixins | 9db0588be77da20cc7a66e25af056b7397527dc6 | [
"MIT"
] | null | null | null | sqlalchemy_mixins/serialize.py | sleeksky-llc/sqlalchemy-mixins | 9db0588be77da20cc7a66e25af056b7397527dc6 | [
"MIT"
] | null | null | null | sqlalchemy_mixins/serialize.py | sleeksky-llc/sqlalchemy-mixins | 9db0588be77da20cc7a66e25af056b7397527dc6 | [
"MIT"
] | null | null | null | from collections.abc import Iterable
from .inspection import InspectionMixin
class SerializeMixin(InspectionMixin):
"""Mixin to make model serializable."""
__abstract__ = True
def to_dict(self, nested=True, hybrid_attributes=False):
"""Return dict object with model's data.
:param neste... | 33.266667 | 98 | 0.58851 |
92c20dcd30e8717a980152d412474ce980d01058 | 902 | py | Python | pyconcz_2018/proposals/apps.py | pyvec/cz.pycon.org-2018 | 3ff3d3221de037a548a9fc4a572ceeb6cc065560 | [
"MIT"
] | 3 | 2017-12-13T20:48:34.000Z | 2018-02-26T15:22:35.000Z | pyconcz_2018/proposals/apps.py | pyvec/cz.pycon.org-2018 | 3ff3d3221de037a548a9fc4a572ceeb6cc065560 | [
"MIT"
] | 20 | 2017-11-16T09:06:58.000Z | 2018-09-05T18:07:40.000Z | pyconcz_2018/proposals/apps.py | pyvec/cz.pycon.org-2018 | 3ff3d3221de037a548a9fc4a572ceeb6cc065560 | [
"MIT"
] | 3 | 2018-01-17T09:07:49.000Z | 2018-01-26T15:30:11.000Z | from django.apps import AppConfig
class ProposalsConfig(AppConfig):
name = "pyconcz_2018.proposals"
verbose_name = "Conference Proposals"
def ready(self):
# Register proposal forms
from pyconcz_2018.proposals.config import proposals
from pyconcz_2018.proposals.conf import (
... | 37.583333 | 78 | 0.728381 |
96c95700759be7dc4b021d1685e2f44b19196f3e | 760 | py | Python | tests/test_main.py | FlexionCodeReview/asciize | 4b592cdc79fb1b36dc4c79f1a0fc38b421553627 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-07-18T20:25:23.000Z | 2021-07-18T20:25:23.000Z | tests/test_main.py | FlexionCodeReview/asciize | 4b592cdc79fb1b36dc4c79f1a0fc38b421553627 | [
"ECL-2.0",
"Apache-2.0"
] | 25 | 2021-08-11T22:15:31.000Z | 2022-03-31T13:52:02.000Z | tests/test_main.py | FlexionCodeReview/asciize | 4b592cdc79fb1b36dc4c79f1a0fc38b421553627 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-12-10T16:10:20.000Z | 2021-12-10T16:10:20.000Z | """Test cases for the __main__ module."""
import pytest
from asciize import __main__
from click.testing import CliRunner
@pytest.fixture
def runner() -> CliRunner:
"""Fixture for invoking command-line interfaces."""
return CliRunner()
def test_main_succeeds_no_arg(runner: CliRunner) -> None:
"""It exits... | 29.230769 | 63 | 0.718421 |
8676d5ead8c46e2dda4fc5ef4f9d42fe07fc9ea2 | 6,683 | py | Python | src/message.py | abhisheksp/byzantine-chain-replication | 0150d915c8647e31a182751ee5e5b64ae11d24b5 | [
"MIT"
] | null | null | null | src/message.py | abhisheksp/byzantine-chain-replication | 0150d915c8647e31a182751ee5e5b64ae11d24b5 | [
"MIT"
] | null | null | null | src/message.py | abhisheksp/byzantine-chain-replication | 0150d915c8647e31a182751ee5e5b64ae11d24b5 | [
"MIT"
] | null | null | null | import uuid
import nacl
import nacl.hash
import nacl.encoding
from collections import namedtuple
class Message:
olympus_configuration_response_tag = 'configuration_response'
client_request_tag = 'request'
client_retransmission_tag = 'retransmission'
client_configuration_request_tag = 'configuration_re... | 42.031447 | 113 | 0.711956 |
efeb1eb3558b95b44d164863976c1a1a46f3b126 | 8,272 | py | Python | docs/user_guide/device_iterations.py | NunoEdgarGFlowHub/poptorch | 2e69b81c7c94b522d9f57cc53d31be562f5e3749 | [
"MIT"
] | null | null | null | docs/user_guide/device_iterations.py | NunoEdgarGFlowHub/poptorch | 2e69b81c7c94b522d9f57cc53d31be562f5e3749 | [
"MIT"
] | null | null | null | docs/user_guide/device_iterations.py | NunoEdgarGFlowHub/poptorch | 2e69b81c7c94b522d9f57cc53d31be562f5e3749 | [
"MIT"
] | null | null | null | # Copyright (c) 2020 Graphcore Ltd. All rights reserved.
# iterations_start
from functools import reduce
from operator import mul
import sys
import torch
import poptorch
if not poptorch.ipuHardwareIsAvailable():
print("Replicated top level graphs are not supported on the IPU model")
sys.exit(0)
class Exampl... | 37.944954 | 104 | 0.619076 |
80a00669113794fe011d9a8b655522dc8e8a28fc | 3,588 | py | Python | saleor/urls.py | Chaoslecion123/Diver | 8c5c493701422eada49cbf95b0b0add08f1ea561 | [
"BSD-3-Clause"
] | null | null | null | saleor/urls.py | Chaoslecion123/Diver | 8c5c493701422eada49cbf95b0b0add08f1ea561 | [
"BSD-3-Clause"
] | null | null | null | saleor/urls.py | Chaoslecion123/Diver | 8c5c493701422eada49cbf95b0b0add08f1ea561 | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.sitemaps.views import sitemap
from django.views.decorators.csrf import csrf_exempt
from django.views.... | 32.917431 | 85 | 0.65942 |
aae9cc8cb1015c33395e14ccc422b91752c64638 | 5,918 | py | Python | lldb/test/API/tools/lldb-vscode/breakpoint-events/TestVSCode_breakpointEvents.py | rarutyun/llvm | 76fa6b3bcade074bdedef740001c4528e1aa08a8 | [
"Apache-2.0"
] | 305 | 2019-09-14T17:16:05.000Z | 2022-03-31T15:05:20.000Z | lldb/test/API/tools/lldb-vscode/breakpoint-events/TestVSCode_breakpointEvents.py | rarutyun/llvm | 76fa6b3bcade074bdedef740001c4528e1aa08a8 | [
"Apache-2.0"
] | 410 | 2019-06-06T20:52:32.000Z | 2022-01-18T14:21:48.000Z | lldb/test/API/tools/lldb-vscode/breakpoint-events/TestVSCode_breakpointEvents.py | rarutyun/llvm | 76fa6b3bcade074bdedef740001c4528e1aa08a8 | [
"Apache-2.0"
] | 50 | 2019-05-10T21:12:24.000Z | 2022-01-21T06:39:47.000Z | """
Test lldb-vscode setBreakpoints request
"""
import unittest2
import vscode
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
import lldbvscode_testcase
import os
class TestVSCode_breakpointEvents(lldbvscode_testcase.VSCodeTestCaseBase):
mydir ... | 49.731092 | 80 | 0.638391 |
851746f3257c55f3c34c984035474fb0a1e05f58 | 485 | gyp | Python | cloud_print/virtual_driver/win/virtual_driver.gyp | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 231 | 2015-01-08T09:04:44.000Z | 2021-12-30T03:03:10.000Z | cloud_print/virtual_driver/win/virtual_driver.gyp | j4ckfrost/android_external_chromium_org | a1a3dad8b08d1fcf6b6b36c267158ed63217c780 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2018-02-10T21:00:08.000Z | 2018-03-20T05:09:50.000Z | cloud_print/virtual_driver/win/virtual_driver.gyp | j4ckfrost/android_external_chromium_org | a1a3dad8b08d1fcf6b6b36c267158ed63217c780 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 268 | 2015-01-21T05:53:28.000Z | 2022-03-25T22:09:01.000Z | # 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.
{
'variables': {
'virtual_driver_suffix': '',
},
'target_defaults': {
'dependencies': [
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH... | 23.095238 | 72 | 0.641237 |
d963c83a3f1eb9e54dfb74d5a865d9b4cc9e12c4 | 875 | py | Python | source/interprocedural_analyses/taint/test/integration/always_in_none.py | ekmixon/pyre-check | bd2475cc0cf4bef941f0aea6df10d674e6c907ab | [
"MIT"
] | 5,975 | 2018-05-11T15:54:32.000Z | 2022-03-31T14:38:00.000Z | source/interprocedural_analyses/taint/test/integration/always_in_none.py | ekmixon/pyre-check | bd2475cc0cf4bef941f0aea6df10d674e6c907ab | [
"MIT"
] | 524 | 2018-05-11T16:47:20.000Z | 2022-03-22T17:43:06.000Z | source/interprocedural_analyses/taint/test/integration/always_in_none.py | ekmixon/pyre-check | bd2475cc0cf4bef941f0aea6df10d674e6c907ab | [
"MIT"
] | 501 | 2018-05-11T16:46:29.000Z | 2022-03-19T04:41:57.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# flake8: noqa
from builtins import _test_sink, _test_source
from django.http import HttpRequest, HttpResponse
class ComplicatedService:
... | 21.875 | 65 | 0.693714 |
5423ed7fa3f56fec3df0a1c8ab0d85fe640c253b | 1,252 | py | Python | legacy/backends/orchestrator/kubeflow/orchestrator_kubeflow_backend.py | ParikhKadam/zenml | 867e4d4c982a50447bd182b30af37f2141dac5a4 | [
"Apache-2.0"
] | 1,275 | 2020-11-19T14:18:25.000Z | 2021-08-13T07:31:39.000Z | legacy/backends/orchestrator/kubeflow/orchestrator_kubeflow_backend.py | ParikhKadam/zenml | 867e4d4c982a50447bd182b30af37f2141dac5a4 | [
"Apache-2.0"
] | 62 | 2020-11-30T16:06:14.000Z | 2021-08-10T08:34:52.000Z | legacy/backends/orchestrator/kubeflow/orchestrator_kubeflow_backend.py | ParikhKadam/zenml | 867e4d4c982a50447bd182b30af37f2141dac5a4 | [
"Apache-2.0"
] | 75 | 2020-12-22T19:15:08.000Z | 2021-08-13T03:07:50.000Z | # Copyright (c) ZenML GmbH 2020. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 33.837838 | 70 | 0.732428 |
3badd9b11941edb2ed7f2602a9e5c491d6877ec0 | 25,190 | py | Python | tests/test_models/test_heads.py | bbidong/mmdetection | cd37b1fbb9f2f2c664add20c1bcaae5a0eba4263 | [
"Apache-2.0"
] | 38 | 2020-11-03T14:45:49.000Z | 2022-03-19T01:14:49.000Z | tests/test_models/test_heads.py | 13952522076/mmdet0 | 7c914eceda1e61bd7aea78d9db924ead1c582daa | [
"Apache-2.0"
] | 8 | 2021-02-05T07:30:39.000Z | 2022-03-16T06:45:46.000Z | tests/test_models/test_heads.py | 13952522076/mmdet0 | 7c914eceda1e61bd7aea78d9db924ead1c582daa | [
"Apache-2.0"
] | 9 | 2020-11-10T16:29:15.000Z | 2021-06-07T08:00:38.000Z | import mmcv
import torch
from mmdet.core import bbox2roi, build_assigner, build_sampler
from mmdet.models.dense_heads import (AnchorHead, CornerHead, FCOSHead,
FSAFHead, GuidedAnchorHead)
from mmdet.models.roi_heads.bbox_heads import BBoxHead
from mmdet.models.roi_heads.mask_heads... | 36.454414 | 79 | 0.585669 |
719908ff79dcd6bc98b5ea667f26d5f0fc0cfe62 | 266 | py | Python | peptidemapper/src/pepmapperdb/settings/store_password.py | uvic-proteincentre/MRMAssayDB | 12b19a2064fe9b8006f6457500c9cb79b1b829ed | [
"Apache-2.0"
] | null | null | null | peptidemapper/src/pepmapperdb/settings/store_password.py | uvic-proteincentre/MRMAssayDB | 12b19a2064fe9b8006f6457500c9cb79b1b829ed | [
"Apache-2.0"
] | null | null | null | peptidemapper/src/pepmapperdb/settings/store_password.py | uvic-proteincentre/MRMAssayDB | 12b19a2064fe9b8006f6457500c9cb79b1b829ed | [
"Apache-2.0"
] | null | null | null | SECRET_KEY = 'XXXXX'
DEFAULT_FROM_EMAIL = 'XXXXXb@gmail.com'
EMAIL_HOST="smtp.gmail.com"
EMAIL_HOST_USER="XXXXX@gmail.com"
EMAIL_HOST_PASSWORD="XXXXX"
DJANGO_ADMIN_USERNAME="XXXXX"
DJANGO_ADMIN_PASSWORD="XXXXX"
DJANGO_OUT_USERNAME="XXXXX"
DJANGO_OUT_PASSWORD="XXXXX" | 29.555556 | 39 | 0.830827 |
bebfa7956b8d96a085ef00db2c88d7904b47a034 | 8,201 | py | Python | blue_st_sdk/features/standard_characteristics/feature_heart_rate.py | cchangeur/BlueSTSDK_Python | e5c6e4bc5a58680bad0d867633dd9d92012b9baf | [
"BSD-3-Clause"
] | 43 | 2019-03-08T08:03:19.000Z | 2022-01-20T11:51:11.000Z | blue_st_sdk/features/standard_characteristics/feature_heart_rate.py | cchangeur/BlueSTSDK_Python | e5c6e4bc5a58680bad0d867633dd9d92012b9baf | [
"BSD-3-Clause"
] | 24 | 2019-04-01T20:50:40.000Z | 2022-03-16T17:00:54.000Z | blue_st_sdk/features/standard_characteristics/feature_heart_rate.py | cchangeur/BlueSTSDK_Python | e5c6e4bc5a58680bad0d867633dd9d92012b9baf | [
"BSD-3-Clause"
] | 19 | 2019-02-20T08:41:20.000Z | 2021-11-21T11:39:50.000Z | ################################################################################
# COPYRIGHT(c) 2018 STMicroelectronics #
# #
# Redistribution and use in source and binary forms, with or without ... | 37.967593 | 181 | 0.57176 |
36fecb36e672c7338826c441f6ae8bd4a41fd573 | 1,143 | py | Python | migrations/versions/2941bf6b5661_entries_table.py | poten-jay/tested2 | 57fc296c4063a90ae06fe8b41435095adc675d93 | [
"MIT"
] | null | null | null | migrations/versions/2941bf6b5661_entries_table.py | poten-jay/tested2 | 57fc296c4063a90ae06fe8b41435095adc675d93 | [
"MIT"
] | null | null | null | migrations/versions/2941bf6b5661_entries_table.py | poten-jay/tested2 | 57fc296c4063a90ae06fe8b41435095adc675d93 | [
"MIT"
] | null | null | null | """entries table
Revision ID: 2941bf6b5661
Revises:
Create Date: 2021-12-07 12:30:34.256676
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '2941bf6b5661'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | 29.307692 | 89 | 0.682415 |
f858e0a1430ec4ffa80d016eda70038fffe539d4 | 37,942 | py | Python | orix/crystal_map/crystal_map.py | bm424/texpy | 8d78b568209a6da36fc831c6bc9e2b0cb4c740c8 | [
"MIT"
] | 6 | 2018-02-05T18:37:10.000Z | 2018-10-07T22:07:26.000Z | orix/crystal_map/crystal_map.py | bm424/texpy | 8d78b568209a6da36fc831c6bc9e2b0cb4c740c8 | [
"MIT"
] | 5 | 2018-11-04T18:06:28.000Z | 2019-09-13T11:22:43.000Z | orix/crystal_map/crystal_map.py | bm424/texpy | 8d78b568209a6da36fc831c6bc9e2b0cb4c740c8 | [
"MIT"
] | 3 | 2019-04-27T09:24:28.000Z | 2019-09-13T10:24:57.000Z | # -*- coding: utf-8 -*-
# Copyright 2018-2022 the orix developers
#
# This file is part of orix.
#
# orix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) ... | 37.97998 | 96 | 0.568684 |
6ddcfb5539ba6cfb8fcb0bd13a4f74dc1d95fa20 | 42,318 | py | Python | pydocspec/astbuilder.py | tristanlatr/pydocspec | 25965310c7f576d2f2e877f8a1b2984bb77725b9 | [
"MIT"
] | null | null | null | pydocspec/astbuilder.py | tristanlatr/pydocspec | 25965310c7f576d2f2e877f8a1b2984bb77725b9 | [
"MIT"
] | 5 | 2021-08-28T14:33:13.000Z | 2022-02-27T23:51:48.000Z | pydocspec/astbuilder.py | tristanlatr/pydocspec | 25965310c7f576d2f2e877f8a1b2984bb77725b9 | [
"MIT"
] | 1 | 2022-02-10T01:55:14.000Z | 2022-02-10T01:55:14.000Z |
"""
Traverse module/packages directories, build and transform `astroid` AST into `ApiObject` instances.
:note: Implementation is largely adapted from pydoctor's AST builder, adapted to work with `astroid`.
:note: The builder is responsible to asseble the tree of objects, but do set all attributes.
It only sets... | 43.807453 | 152 | 0.600383 |
c396b8b139288f4b816682578b71fc8b3ca4ca33 | 43,082 | py | Python | virtual/lib/python3.9/site-packages/flask/helpers.py | asandelarvine/News_App | 393d8314586053024a0924b91d2e1912d12df2f4 | [
"MIT"
] | 1 | 2021-09-22T13:14:37.000Z | 2021-09-22T13:14:37.000Z | virtual/lib/python3.9/site-packages/flask/helpers.py | asandelarvine/News_App | 393d8314586053024a0924b91d2e1912d12df2f4 | [
"MIT"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | virtual/lib/python3.9/site-packages/flask/helpers.py | asandelarvine/News_App | 393d8314586053024a0924b91d2e1912d12df2f4 | [
"MIT"
] | 1 | 2021-08-17T08:46:28.000Z | 2021-08-17T08:46:28.000Z | # -*- coding: utf-8 -*-
"""
flask.helpers
~~~~~~~~~~~~~
Implements various helpers.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import io
import mimetypes
import os
import pkgutil
import posixpath
import socket
import sys
import unicodedata
from functools import update_wrapper
from threadi... | 37.268166 | 88 | 0.64354 |
9e741cfa0667839c52e394482d7a9fe8b1d72dd4 | 23,117 | py | Python | src/the_tale/the_tale/game/heroes/objects.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | null | null | null | src/the_tale/the_tale/game/heroes/objects.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | null | null | null | src/the_tale/the_tale/game/heroes/objects.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | null | null | null |
import smart_imports
smart_imports.all()
class Hero(logic_accessors.LogicAccessorsMixin,
equipment_methods.EquipmentMethodsMixin,
jobs_methods.JobsMethodsMixin,
game_names.ManageNameMixin2):
__slots__ = ('id',
'account_id',
'created_at_turn',
... | 37.165595 | 145 | 0.584072 |
79ef31312fb263895a2d2d3df61105cddedf894e | 30,075 | py | Python | h5py/_hl/dataset.py | feedstock/h5py | 596748d52c351258c851bb56c8df1c25d3673110 | [
"BSD-3-Clause"
] | null | null | null | h5py/_hl/dataset.py | feedstock/h5py | 596748d52c351258c851bb56c8df1c25d3673110 | [
"BSD-3-Clause"
] | null | null | null | h5py/_hl/dataset.py | feedstock/h5py | 596748d52c351258c851bb56c8df1c25d3673110 | [
"BSD-3-Clause"
] | 1 | 2021-04-08T11:11:04.000Z | 2021-04-08T11:11:04.000Z | # This file is part of h5py, a Python interface to the HDF5 library.
#
# http://www.h5py.org
#
# Copyright 2008-2013 Andrew Collette and contributors
#
# License: Standard 3-clause BSD; see "license.txt" for full license terms
# and contributor agreement.
"""
Implements support for high-level dataset ac... | 35.676157 | 139 | 0.591455 |
f52ea27071ea88ed2cd8b69e7cfdd1264dafd601 | 2,153 | py | Python | GAD_SOCIAL_ACCEPTANCE.py | kabir12345/DASM | 86f777c47a83f400c2f99e9f71dcc3a40b9d3143 | [
"Apache-2.0"
] | 1 | 2021-06-07T02:55:01.000Z | 2021-06-07T02:55:01.000Z | GAD_SOCIAL_ACCEPTANCE.py | kabir12345/DASM | 86f777c47a83f400c2f99e9f71dcc3a40b9d3143 | [
"Apache-2.0"
] | null | null | null | GAD_SOCIAL_ACCEPTANCE.py | kabir12345/DASM | 86f777c47a83f400c2f99e9f71dcc3a40b9d3143 | [
"Apache-2.0"
] | 1 | 2021-03-22T05:49:30.000Z | 2021-03-22T05:49:30.000Z | #!/usr/bin/env python
# coding: utf-8
# In[52]:
import nltk
import numpy as np
import random
import string # to process standard python strings
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
# In[70]:
f=open(r'/home/aakash/Documents/DASM/solutio... | 24.191011 | 235 | 0.732931 |
6975f17f5a9e6d62fd981ca794a0703df342651c | 1,812 | py | Python | pcdsdevices/tests/test_gauge.py | vespos/pcdsdevices | 7c4728df62ea58b6491d1cb36bb39d27d6dd9fca | [
"BSD-3-Clause-LBNL"
] | 3 | 2019-06-17T20:08:54.000Z | 2022-01-11T17:55:21.000Z | pcdsdevices/tests/test_gauge.py | vespos/pcdsdevices | 7c4728df62ea58b6491d1cb36bb39d27d6dd9fca | [
"BSD-3-Clause-LBNL"
] | 757 | 2017-12-21T23:16:41.000Z | 2022-03-31T22:56:06.000Z | pcdsdevices/tests/test_gauge.py | vespos/pcdsdevices | 7c4728df62ea58b6491d1cb36bb39d27d6dd9fca | [
"BSD-3-Clause-LBNL"
] | 38 | 2018-01-26T00:01:35.000Z | 2022-02-17T00:48:55.000Z | import inspect
import logging
import pytest
from ophyd.sim import make_fake_device
from ..gauge import (GaugeSet, GaugeSetBase, GaugeSetMks, GaugeSetPirani,
GaugeSetPiraniMks)
logger = logging.getLogger(__name__)
@pytest.fixture(scope='function')
def fake_gauge_set():
FakeGaugeSet = make_f... | 30.2 | 75 | 0.660044 |
b5e100718951dbf0d3f6478f0afe3f9e4257eee5 | 2,838 | py | Python | APIRead.py | andrewvh4/Sociolinguistics_TwitterAPI-and-Parser | cd7b00e3002498bc2ed96f720588bf0a1a63dd89 | [
"MIT"
] | null | null | null | APIRead.py | andrewvh4/Sociolinguistics_TwitterAPI-and-Parser | cd7b00e3002498bc2ed96f720588bf0a1a63dd89 | [
"MIT"
] | null | null | null | APIRead.py | andrewvh4/Sociolinguistics_TwitterAPI-and-Parser | cd7b00e3002498bc2ed96f720588bf0a1a63dd89 | [
"MIT"
] | null | null | null | import tweepy
from Keys import *
import datetime
def clearFiles():
for hashtag in hashtags:
f = open(hashtag + ".txt", 'w')
f.write("Timestamp,Text,ID\n")
f.close()
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API... | 29.257732 | 274 | 0.639183 |
2edd65ff15e43f3314c6876e08f9227e4c6888db | 1,260 | py | Python | tests/test_helper_thread.py | GeekMasher/GMUtils | 06a2c7ec2a50cd0fdb71cbd618870a9b4aa5dba9 | [
"MIT"
] | null | null | null | tests/test_helper_thread.py | GeekMasher/GMUtils | 06a2c7ec2a50cd0fdb71cbd618870a9b4aa5dba9 | [
"MIT"
] | 15 | 2018-03-06T15:47:47.000Z | 2018-04-09T11:55:38.000Z | tests/test_helper_thread.py | GeekMasher/GMUtils | 06a2c7ec2a50cd0fdb71cbd618870a9b4aa5dba9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import unittest
import threading
import time
from gmutils import Config
from gmutils.helpers.helpme_thread import createThreads
class ThreadTest(unittest.TestCase):
def tearDown(self):
Config.haltThreads()
def pauseAndStopCurrentTests(self):
time.sleep(2)
Con... | 23.333333 | 75 | 0.648413 |
aef97ad669809d8f7bd81330b5e24479116bd2ea | 1,557 | py | Python | src/timelapse.py | vicktech/Face-Recognition | 5122cd73f664000ec6611b4d72aca1f4c57939cd | [
"Apache-2.0"
] | null | null | null | src/timelapse.py | vicktech/Face-Recognition | 5122cd73f664000ec6611b4d72aca1f4c57939cd | [
"Apache-2.0"
] | null | null | null | src/timelapse.py | vicktech/Face-Recognition | 5122cd73f664000ec6611b4d72aca1f4c57939cd | [
"Apache-2.0"
] | 1 | 2020-06-11T21:55:59.000Z | 2020-06-11T21:55:59.000Z | import os
import numpy as np
import cv2
import time
import datetime
from utils import CFEVideoConf, image_resize
import glob
cap = cv2.VideoCapture(0)
frames_per_seconds = 20
save_path='saved-media/timelapse.mp4'
config = CFEVideoConf(cap, filepath=save_path, res='720p')
out = cv2.VideoWriter(save_path, config.vide... | 26.844828 | 84 | 0.699422 |
59a4ce3c143a3c003551641c5f247e00b1596e05 | 10,645 | py | Python | turtle_bot_controller/scripts/dosquarepath.py | Jasikainen/AUT700-MePo | cad9416612e9fa2bd8f300a8aaf5f9c4f586175f | [
"BSD-2-Clause"
] | null | null | null | turtle_bot_controller/scripts/dosquarepath.py | Jasikainen/AUT700-MePo | cad9416612e9fa2bd8f300a8aaf5f9c4f586175f | [
"BSD-2-Clause"
] | null | null | null | turtle_bot_controller/scripts/dosquarepath.py | Jasikainen/AUT700-MePo | cad9416612e9fa2bd8f300a8aaf5f9c4f586175f | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
import rospy
import sys
from geometry_msgs.msg import Twist, Point
from nav_msgs.msg import Odometry
from tf.transformations import * # import all just in case
from math import pow, atan2, sqrt
HALF_TURN = math.pi # As a constant
# Pairs of coordinates to travel through
square... | 36.207483 | 125 | 0.673556 |
6454a4dfff0bd1aa7a28e93b323f321c7c535a10 | 1,242 | py | Python | forsta_auth/tests/social_backends.py | forsta-iam/forsta-auth | 9bc8c7c1033d95404c46fa351c7b689cc546a4d4 | [
"MIT"
] | null | null | null | forsta_auth/tests/social_backends.py | forsta-iam/forsta-auth | 9bc8c7c1033d95404c46fa351c7b689cc546a4d4 | [
"MIT"
] | 16 | 2019-07-10T13:40:12.000Z | 2022-02-10T07:32:53.000Z | forsta_auth/tests/social_backends.py | forsta-iam/forsta-auth | 9bc8c7c1033d95404c46fa351c7b689cc546a4d4 | [
"MIT"
] | null | null | null | import urllib.parse
from rest_framework.reverse import reverse
from social_core.backends.base import BaseAuth
from social_core.strategy import BaseStrategy
from forsta_auth.backend_meta import BackendMeta
class DummyBackend(BaseAuth):
name = 'dummy'
ID_KEY = 'id'
REQUIRES_EMAIL_VALIDATION = False
EX... | 30.292683 | 117 | 0.688406 |
a7c3d31a5da9b9a8deacbf30798f7ccbbea4a223 | 1,936 | py | Python | Geometry/MTDGeometryBuilder/test/mtd_cfg.py | BParkHNLs/cmssw | f43c0b00fb2c5c4471223d909e9dade6a6d039b2 | [
"Apache-2.0"
] | null | null | null | Geometry/MTDGeometryBuilder/test/mtd_cfg.py | BParkHNLs/cmssw | f43c0b00fb2c5c4471223d909e9dade6a6d039b2 | [
"Apache-2.0"
] | null | null | null | Geometry/MTDGeometryBuilder/test/mtd_cfg.py | BParkHNLs/cmssw | f43c0b00fb2c5c4471223d909e9dade6a6d039b2 | [
"Apache-2.0"
] | null | null | null | import FWCore.ParameterSet.Config as cms
process = cms.Process("GeometryTest")
process.source = cms.Source("EmptyIOVSource",
lastValue = cms.uint64(1),
timetype = cms.string('runnumber'),
firstValue = cms.uint64(1),
... | 31.225806 | 72 | 0.677169 |
4d15724e16573daa8e645c71b0e48f4a3ef8e999 | 736 | py | Python | apps/meetings/urls.py | froi/horas | 39980eb90738f4c9a578bdcfbc56bc1ce373dcab | [
"MIT"
] | null | null | null | apps/meetings/urls.py | froi/horas | 39980eb90738f4c9a578bdcfbc56bc1ce373dcab | [
"MIT"
] | 14 | 2019-10-09T19:33:25.000Z | 2021-07-14T10:42:31.000Z | apps/meetings/urls.py | froi/horas | 39980eb90738f4c9a578bdcfbc56bc1ce373dcab | [
"MIT"
] | null | null | null | from django.conf.urls import patterns, url
from .views import (MeetingUpdateView, MeetingConfirmView,
MeetingDetailView, MeetingCancelView,
MeetingCommentView)
urlpatterns = patterns(
'', # Empty string as prefix
url('^(?P<pk>\d+)/$', MeetingDetailView.as_view(),
... | 30.666667 | 63 | 0.612772 |
0524087a470c222292474bbe1c91f86f5fea7c20 | 13,107 | py | Python | djarg/views.py | jyveapp/django-args | 5676db546cf3da6450a17b9a62e7f231eee3cf9e | [
"BSD-3-Clause"
] | 8 | 2020-06-25T02:23:31.000Z | 2022-02-07T16:27:50.000Z | djarg/views.py | jyveapp/django-args | 5676db546cf3da6450a17b9a62e7f231eee3cf9e | [
"BSD-3-Clause"
] | 2 | 2020-08-01T22:42:26.000Z | 2020-08-14T07:30:48.000Z | djarg/views.py | jyveapp/django-args | 5676db546cf3da6450a17b9a62e7f231eee3cf9e | [
"BSD-3-Clause"
] | 1 | 2020-06-29T01:54:52.000Z | 2020-06-29T01:54:52.000Z | import collections
import arg
from django import http
from django import shortcuts
from django.contrib import messages
from django.core import exceptions
import django.views.generic.edit as edit_views
import formtools.wizard.views as wizard_views
import djarg.forms
class SuccessMessageMixin:
"""
Similar to ... | 32.932161 | 80 | 0.624094 |
45ba7f1b0b05856abcf4bedfe13516b7e3ef28ba | 223 | py | Python | dc_plc/dc_documents/doctype/dc_doc_document_subtype/test_dc_doc_document_subtype.py | igrekus/dc_plc | 76fbb6b1c98ff9d0de46f7979b76cd775834be79 | [
"MIT"
] | 3 | 2020-09-06T11:34:42.000Z | 2022-03-12T04:52:58.000Z | dc_plc/dc_documents/doctype/dc_doc_document_subtype/test_dc_doc_document_subtype.py | igrekus/dc_plc | 76fbb6b1c98ff9d0de46f7979b76cd775834be79 | [
"MIT"
] | null | null | null | dc_plc/dc_documents/doctype/dc_doc_document_subtype/test_dc_doc_document_subtype.py | igrekus/dc_plc | 76fbb6b1c98ff9d0de46f7979b76cd775834be79 | [
"MIT"
] | 5 | 2020-06-18T07:47:14.000Z | 2022-01-13T06:33:46.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2019, igrekus and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestDC_Doc_Document_Subtype(unittest.TestCase):
pass
| 20.272727 | 53 | 0.775785 |
c671669038bcfb9c24f53299fb9a5e1372e0bc59 | 7,251 | py | Python | rtlive/sources/data_it.py | josebsalazar/RTlive | 0717f66da67446aec53b20b447349e820c314368 | [
"Apache-2.0"
] | 27 | 2020-10-29T22:16:12.000Z | 2021-07-22T21:50:36.000Z | rtlive/sources/data_it.py | josebsalazar/RTlive | 0717f66da67446aec53b20b447349e820c314368 | [
"Apache-2.0"
] | 15 | 2020-11-09T09:00:36.000Z | 2021-04-22T14:48:27.000Z | rtlive/sources/data_it.py | josebsalazar/RTlive | 0717f66da67446aec53b20b447349e820c314368 | [
"Apache-2.0"
] | 12 | 2020-11-02T21:31:41.000Z | 2021-11-25T18:07:23.000Z | import datetime
import io
import logging
import pandas
import requests
from .. import preprocessing
_log = logging.getLogger(__file__)
IT_DATA_BASE_PATH = "https://raw.githubusercontent.com/pcm-dpc/COVID-19/master"
IT_DATA_NATION_FILENAME = "/dati-andamento-nazionale/dpc-covid19-ita-andamento-nazionale.csv"
IT_DATA_... | 28.435294 | 98 | 0.599779 |
db984ee2c43eaabec97131bfb0ddb89a9a37080c | 9,042 | py | Python | html_writer.py | eladnoor/flux-html-report | 2a0e3fdf73911f437b6d2f8dcc507ccad52f092b | [
"MIT"
] | null | null | null | html_writer.py | eladnoor/flux-html-report | 2a0e3fdf73911f437b6d2f8dcc507ccad52f092b | [
"MIT"
] | null | null | null | html_writer.py | eladnoor/flux-html-report | 2a0e3fdf73911f437b6d2f8dcc507ccad52f092b | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""
html_writer.py - Construct HTML pages
"""
import datetime
import os
import types
import numpy as np
import xml.dom.minidom
class BaseHtmlWriter:
def __init__(self):
self.div_counter = 0
pass
def relative_to_full_path(self, relpath):
raise Exception("class not i... | 34.776923 | 157 | 0.547335 |
29daa7080009246f434ae14f4400cd8899312961 | 776 | py | Python | project-euler/problems/problem18.py | pietrodll/coding-challenges | 45201c0786c6156c116a7b2659876cf82c3e84ac | [
"MIT"
] | null | null | null | project-euler/problems/problem18.py | pietrodll/coding-challenges | 45201c0786c6156c116a7b2659876cf82c3e84ac | [
"MIT"
] | null | null | null | project-euler/problems/problem18.py | pietrodll/coding-challenges | 45201c0786c6156c116a7b2659876cf82c3e84ac | [
"MIT"
] | null | null | null | """
Problem 18
==========
"""
from utils.triangle import max_paths, max_path_to_bottom
tri = """75
95 64
17 47 82
18 35 87 10
20 04 82 47 65
19 01 23 75 03 34
88 02 77 73 07 63 67
99 65 04 28 06 16 70 92
41 41 26 56 83 40 80 70 33
41 48 72 33 47 32 37 16 94 29
53 71 44 65 25 43 91 52 97 51 14
70 11 33 28 77 73 17 78... | 17.244444 | 56 | 0.618557 |
a38001210b554828dd9ab6c28fdf352f0cdb05a4 | 18,132 | py | Python | _resource/core/framework/step_stats_pb2.py | amlyj/tensorflowStudy | 1e3a4b15a57d53e746fd730af540da4be471c70b | [
"MIT"
] | 1 | 2017-12-05T15:35:47.000Z | 2017-12-05T15:35:47.000Z | _resource/core/framework/step_stats_pb2.py | amlyj/tensorflowStudy | 1e3a4b15a57d53e746fd730af540da4be471c70b | [
"MIT"
] | 10 | 2017-07-13T00:24:03.000Z | 2017-07-17T07:39:03.000Z | _resource/core/framework/step_stats_pb2.py | amlyj/tensorflowStudy | 1e3a4b15a57d53e746fd730af540da4be471c70b | [
"MIT"
] | 7 | 2017-08-01T04:02:07.000Z | 2018-10-06T21:07:20.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: tensorflow/core/framework/step_stats.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.protobu... | 42.764151 | 1,924 | 0.757556 |
5cdc043d01c3c512707b3fc6c61f2ac2bcc08b09 | 4,632 | py | Python | leetcode/042_trapping_rain_water.py | aiden0z/snippets | c3534ad718599a64f3c7ccdbfe51058e01244c60 | [
"MIT"
] | null | null | null | leetcode/042_trapping_rain_water.py | aiden0z/snippets | c3534ad718599a64f3c7ccdbfe51058e01244c60 | [
"MIT"
] | null | null | null | leetcode/042_trapping_rain_water.py | aiden0z/snippets | c3534ad718599a64f3c7ccdbfe51058e01244c60 | [
"MIT"
] | null | null | null | """Trapping Rain Water
Given n non-negative integers representing an elevation map where the width of each bar is 1,
compute how much water it is able to trap after rainning.

The above elevation map is represented by array [0, 1, 0, 2, 1, 0, 1, 3,... | 29.316456 | 98 | 0.479059 |
f7b71d13372603ecb5e8c536755e1ae0d18a53f5 | 2,373 | py | Python | app/__init__.py | singhta/journear-server | ad793719792aa485823bdcbfe4e7b079ed454295 | [
"MIT"
] | null | null | null | app/__init__.py | singhta/journear-server | ad793719792aa485823bdcbfe4e7b079ed454295 | [
"MIT"
] | null | null | null | app/__init__.py | singhta/journear-server | ad793719792aa485823bdcbfe4e7b079ed454295 | [
"MIT"
] | null | null | null | import os
from flask import Flask
from flask_assets import Environment
from flask_compress import Compress
from flask_login import LoginManager
from flask_mail import Mail
from flask_rq import RQ
from flask_sqlalchemy import SQLAlchemy
from flask_wtf import CSRFProtect
from app.assets import app_css, app_js, vendor_c... | 28.590361 | 102 | 0.737885 |
52fe9c87e206bcd9fe89ed02409dcc81dac37e35 | 681 | py | Python | jjhecon/randomizer/models.py | wuhuaguo/randomizer_horton | 7820921d457677de2f2ade49f7557a8e6feb255f | [
"Unlicense"
] | null | null | null | jjhecon/randomizer/models.py | wuhuaguo/randomizer_horton | 7820921d457677de2f2ade49f7557a8e6feb255f | [
"Unlicense"
] | null | null | null | jjhecon/randomizer/models.py | wuhuaguo/randomizer_horton | 7820921d457677de2f2ade49f7557a8e6feb255f | [
"Unlicense"
] | null | null | null | from google.appengine.ext import db
from google.appengine.ext.db import polymodel
class Redirection(polymodel.PolyModel):
experiment_name = db.StringProperty(required = False)
landing_hash = db.StringProperty()
admin_hash = db.StringProperty()
class StratifiedRedirection(Redirection):
... | 34.05 | 58 | 0.713656 |
823e9eb04577cf1143b182cfb83045cd3f303a02 | 787 | py | Python | build/lib/zle_pkg/numbers.py | zachescalante/zle_pkg | de1ae92df8ad14343699bf0a3d70eb9d34ea1a81 | [
"MIT"
] | 2 | 2018-12-26T22:44:59.000Z | 2018-12-27T15:04:29.000Z | zle_pkg/numbers.py | zachescalante/zle_pkg | de1ae92df8ad14343699bf0a3d70eb9d34ea1a81 | [
"MIT"
] | null | null | null | zle_pkg/numbers.py | zachescalante/zle_pkg | de1ae92df8ad14343699bf0a3d70eb9d34ea1a81 | [
"MIT"
] | null | null | null | import os
import re
class NumberToken():
'''
def __init__(self):
print('NumberToken() package has been installed')
'''
@classmethod
def number(cls, string):
'''
This function takes a string input and replaces all instances
of numeric data and trailing numeric values to the '<numeric>'
tag
param ... | 20.710526 | 67 | 0.702668 |
e5fd24c53cdfbfa4f49fa620f309a885a4ea4086 | 131 | py | Python | pages/admin.py | abdulwahed-mansour/demo | 0a28080f88e47fd71160aec27f55f765ea40ac6d | [
"MIT"
] | 1 | 2022-03-31T21:32:35.000Z | 2022-03-31T21:32:35.000Z | pages/admin.py | abdulwahed-mansour/demo | 0a28080f88e47fd71160aec27f55f765ea40ac6d | [
"MIT"
] | null | null | null | pages/admin.py | abdulwahed-mansour/demo | 0a28080f88e47fd71160aec27f55f765ea40ac6d | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Category, Product
admin.site.register(Product)
admin.site.register(Category) | 21.833333 | 37 | 0.824427 |
2534338fc0d7a6cb36e9eb0c7d06adc00caeaad1 | 4,292 | py | Python | libs/configs_old/DOTA2.0/gwd/cfgs_res50_dota2.0_v11.py | Artcs1/RotationDetection | 095be17345ee9984d8de8f24eb6b5a0b2d764a06 | [
"Apache-2.0"
] | 850 | 2020-10-27T08:51:54.000Z | 2022-03-30T15:12:06.000Z | libs/configs_old/DOTA2.0/gwd/cfgs_res50_dota2.0_v11.py | Artcs1/RotationDetection | 095be17345ee9984d8de8f24eb6b5a0b2d764a06 | [
"Apache-2.0"
] | 94 | 2020-12-01T02:18:47.000Z | 2022-03-30T08:14:27.000Z | libs/configs_old/DOTA2.0/gwd/cfgs_res50_dota2.0_v11.py | Artcs1/RotationDetection | 095be17345ee9984d8de8f24eb6b5a0b2d764a06 | [
"Apache-2.0"
] | 149 | 2020-10-29T03:30:32.000Z | 2022-03-29T09:53:23.000Z | # -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
import os
import tensorflow as tf
import math
from dataloader.pretrained_weights.pretrain_zoo import PretrainModelZoo
"""
RetinaNet-H + gwd fix bug + sqrt + tau=2
FLOPs: 865678525; Trainable params: 33148131
This is your evalu... | 34.336 | 599 | 0.69082 |
a3bd73399af8754586dfb2b7307bb5087733da2c | 2,054 | py | Python | bom.py | JamesDearlove/JimmyBot | 1151e22641794c17f3a806d5a0b0ced36830cbd5 | [
"MIT"
] | 16 | 2019-06-09T06:14:43.000Z | 2019-08-28T17:01:21.000Z | bom.py | JamesDearlove/JimmyBot | 1151e22641794c17f3a806d5a0b0ced36830cbd5 | [
"MIT"
] | 2 | 2019-02-05T07:53:11.000Z | 2019-02-05T07:56:41.000Z | bom.py | JamesDearlove/JimmyBot | 1151e22641794c17f3a806d5a0b0ced36830cbd5 | [
"MIT"
] | 1 | 2019-02-13T08:27:15.000Z | 2019-02-13T08:27:15.000Z | import urllib.request
import xml.etree.ElementTree as ET
icon_map = {
1: "☀",
2: "🌙",
3: "⛅",
4: "☁",
6: "☀",
8: "🌧",
9: "🌬",
10: "🌫️",
11: "🌦",
12: "🌧",
13: "🌬",
14: "❄",
15: "❄",
16: "⛈",
17: "🌦",
18: "🌧",
19: "🌀"
}
# QLD Precis XML - htt... | 26.675325 | 106 | 0.61295 |
d92f2c214752fc7649152963080b20eef3cc8af3 | 5,802 | py | Python | modules/PotHeadMain.py | Slober3/PotHead | 0779ad3d71fcc570b13dc09ce6363c11e6533480 | [
"MIT"
] | 3 | 2017-08-25T19:21:17.000Z | 2022-01-01T21:06:26.000Z | modules/PotHeadMain.py | Slober3/PotHead | 0779ad3d71fcc570b13dc09ce6363c11e6533480 | [
"MIT"
] | 1 | 2017-07-05T14:12:20.000Z | 2017-07-05T14:12:20.000Z | modules/PotHeadMain.py | QuintenD/PotHead | 0779ad3d71fcc570b13dc09ce6363c11e6533480 | [
"MIT"
] | 2 | 2017-07-05T14:11:05.000Z | 2019-11-27T03:39:42.000Z | '''
PotHead main module
Contains the main modules
'''
import os
import socket
import _thread
import select
import urllib.parse,urllib.request
from datetime import datetime
#Check if log directory exists
def ChcklogDir(logDirName):
if not os.path.isdir(logDirName):
return 0
else:
return 1
#Crea... | 41.741007 | 157 | 0.533437 |
d7c8efd8c35c8257855e8c8559d58ecb4732aead | 44,351 | py | Python | bin/ADFRsuite/CCSBpckgs/PmvApp/extruder.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | null | null | null | bin/ADFRsuite/CCSBpckgs/PmvApp/extruder.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | null | null | null | bin/ADFRsuite/CCSBpckgs/PmvApp/extruder.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | 1 | 2021-11-04T21:48:14.000Z | 2021-11-04T21:48:14.000Z | ################################################################################
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your op... | 40.838858 | 94 | 0.500462 |
7efd2fdb7fdeb56f0826614464d702432f6855e2 | 9,141 | py | Python | Algorithm.Python/PL_Stat8_eq/taB1.py | pasztorlacos/Lean | ca204c07d9bb390f853eb2f3da0ebc08150fef36 | [
"Apache-2.0"
] | null | null | null | Algorithm.Python/PL_Stat8_eq/taB1.py | pasztorlacos/Lean | ca204c07d9bb390f853eb2f3da0ebc08150fef36 | [
"Apache-2.0"
] | null | null | null | Algorithm.Python/PL_Stat8_eq/taB1.py | pasztorlacos/Lean | ca204c07d9bb390f853eb2f3da0ebc08150fef36 | [
"Apache-2.0"
] | null | null | null | ### <summary>
### Technical Analysis (part B.)
###
### </summary>
from QuantConnect.Data.Market import TradeBar
#import math
#import random
import numpy as np
from datetime import datetime, timedelta
from collections import deque
from math import log
class MyBarStrength():
'''
Price Action: Bar Strength ov... | 43.947115 | 195 | 0.634832 |
ad4be6567a02a101d43618982c39cdfce7d271c7 | 3,977 | py | Python | src/task_knowledge_graph.py | harshit158/paper-dots | cbb2fb36e0d0a55998d80c228d3f35b4df21e808 | [
"MIT"
] | 3 | 2021-03-31T12:46:45.000Z | 2022-02-25T18:37:50.000Z | src/task_knowledge_graph.py | harshit158/paper-dots | cbb2fb36e0d0a55998d80c228d3f35b4df21e808 | [
"MIT"
] | null | null | null | src/task_knowledge_graph.py | harshit158/paper-dots | cbb2fb36e0d0a55998d80c228d3f35b4df21e808 | [
"MIT"
] | 1 | 2021-07-12T08:19:41.000Z | 2021-07-12T08:19:41.000Z | import re
import argparse
from collections import defaultdict
import fitz
from tqdm import tqdm
from PIL import Image
import pandas as pd
from pyvis.network import Network
import pprint
pp = pprint.PrettyPrinter(indent=4)
import config
from model_loader import Model
from utils import search_and_annotate, read_file, g... | 38.990196 | 620 | 0.66256 |
676fc9ffeae4729bf3a4e5be276c4c7e0115b73b | 847 | py | Python | tests/test_decimal_conformance.py | uk-gov-mirror/moj-analytical-services.mojap-arrow-pd-parser | 3edb47fa581d7e05af10c7aeda4d825b1710ed51 | [
"MIT"
] | null | null | null | tests/test_decimal_conformance.py | uk-gov-mirror/moj-analytical-services.mojap-arrow-pd-parser | 3edb47fa581d7e05af10c7aeda4d825b1710ed51 | [
"MIT"
] | null | null | null | tests/test_decimal_conformance.py | uk-gov-mirror/moj-analytical-services.mojap-arrow-pd-parser | 3edb47fa581d7e05af10c7aeda4d825b1710ed51 | [
"MIT"
] | null | null | null | import pytest
import pyarrow as pa
from pandas.testing import assert_frame_equal
from arrow_pd_parser.parse import pa_read_csv_to_pandas, pa_read_json_to_pandas
@pytest.mark.parametrize(
"arrow_type,pd_type",
[("float32", "float32"), ("float64", "float64"), ("decimal", "object")],
)
def test_decimal_float(arr... | 30.25 | 79 | 0.698937 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.