hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | 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 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
acfbc87c00bf2a37ff48fcd479715aa6d88ac62f | 1,827 | py | Python | doc/source/conf.py | franckalbinet/spectrai | 3458bc64672077ebeee98fa53c6716a23231ba7e | [
"BSD-3-Clause"
] | 1 | 2020-09-13T10:05:41.000Z | 2020-09-13T10:05:41.000Z | doc/source/conf.py | franckalbinet/spectrai | 3458bc64672077ebeee98fa53c6716a23231ba7e | [
"BSD-3-Clause"
] | 4 | 2020-11-13T18:56:11.000Z | 2022-02-10T01:52:45.000Z | doc/source/conf.py | franckalbinet/spectrai | 3458bc64672077ebeee98fa53c6716a23231ba7e | [
"BSD-3-Clause"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 35.134615 | 79 | 0.662288 |
acfbc93e4951a56e6705f442bf8ca9d6e9c8ac06 | 5,694 | py | Python | test/unit/infra/media/test_downloader.py | Tastyep/Pi-OpenCast | 1ed07130c26e6dd70184446af3c9143094d0c9a0 | [
"MIT"
] | 31 | 2019-10-05T14:23:10.000Z | 2022-02-27T19:38:55.000Z | test/unit/infra/media/test_downloader.py | Tastyep/Pi-OpenCast | 1ed07130c26e6dd70184446af3c9143094d0c9a0 | [
"MIT"
] | 199 | 2020-08-30T16:33:03.000Z | 2022-03-28T04:10:06.000Z | test/unit/infra/media/test_downloader.py | Tastyep/Pi-OpenCast | 1ed07130c26e6dd70184446af3c9143094d0c9a0 | [
"MIT"
] | 1 | 2019-10-05T16:00:49.000Z | 2019-10-05T16:00:49.000Z | from test.util import TestCase
from unittest.mock import Mock, patch
from OpenCast.domain.service.identity import IdentityService
from OpenCast.infra.media.downloader import (
Downloader,
DownloadError,
DownloadSuccess,
Logger,
)
class LoggerTest(TestCase):
def setUp(self):
self.impl = Mo... | 30.449198 | 88 | 0.60713 |
acfbc9e4b933275d55bc6f64d77133e1aaebf622 | 569 | py | Python | build/lib/boids/code/command_line.py | jscott6/boids | 0d02ba6ecfbc10ce56811c5fe45a55114faf5a33 | [
"MIT"
] | null | null | null | build/lib/boids/code/command_line.py | jscott6/boids | 0d02ba6ecfbc10ce56811c5fe45a55114faf5a33 | [
"MIT"
] | null | null | null | build/lib/boids/code/command_line.py | jscott6/boids | 0d02ba6ecfbc10ce56811c5fe45a55114faf5a33 | [
"MIT"
] | null | null | null |
from .controller import Controller
from argparse import ArgumentParser
from matplotlib import pyplot as plt
import yaml
from os.path import dirname, join
def main():
config = yaml.load(open(dirname(__file__) + '/config.yaml'))
parser = ArgumentParser()
parser.add_argument('--size', '-s', type = int, defa... | 27.095238 | 77 | 0.639719 |
acfbca86a6e8e4c225ed115ee01bafef8fffe7b5 | 3,541 | py | Python | app/api/api_v1/endpoints/auth.py | oscarine/oscarine-api | ed4760724e42ac13aeaa3a566d19bf31113c9b8f | [
"MIT"
] | 7 | 2019-09-18T19:45:46.000Z | 2020-05-18T20:07:07.000Z | app/api/api_v1/endpoints/auth.py | oscarine/oscarine-api | ed4760724e42ac13aeaa3a566d19bf31113c9b8f | [
"MIT"
] | 252 | 2019-09-18T20:25:03.000Z | 2022-03-25T11:23:50.000Z | app/api/api_v1/endpoints/auth.py | oscarine/oscarine-api | ed4760724e42ac13aeaa3a566d19bf31113c9b8f | [
"MIT"
] | 8 | 2019-09-18T11:02:45.000Z | 2021-05-18T17:08:51.000Z | from datetime import datetime, timedelta
from fastapi import APIRouter, Depends, HTTPException, status
from sqlalchemy.orm import Session
from app.api.utils.db import get_db
from app.core import config
from app.core.jwt import create_access_token
from app.crud.auth import (
get_owner_by_email,
get_user_by_ema... | 37.273684 | 88 | 0.684552 |
acfbcb0dfd6f44ad05c4ae2e784336d87d4dd814 | 5,268 | py | Python | NLU/RPI/RPI3/TF2/Classes/Engine.py | AIIAL/HIAS-GeniSysAI-NLU-Agent | 07379e00707ecc77da69e74fc481d7088216fdfd | [
"MIT"
] | 2 | 2020-08-25T01:20:21.000Z | 2020-09-04T01:36:25.000Z | NLU/RPI/RPI3/TF2/Classes/Engine.py | AdamMiltonBarker/GeniSysAI-1 | 5771c88522b430dad2d946245cfe1ce1fcdf087d | [
"MIT"
] | 3 | 2021-08-05T12:59:46.000Z | 2021-08-05T13:33:23.000Z | NLU/RPI/RPI3/TF2/Classes/Engine.py | AdamMiltonBarker/GeniSysAI-1 | 5771c88522b430dad2d946245cfe1ce1fcdf087d | [
"MIT"
] | 2 | 2020-08-24T00:32:26.000Z | 2020-09-02T02:57:29.000Z | ######################################################################################################
#
# Organization: Asociacion De Investigacion En Inteligencia Artificial Para La Leucemia Peter Moss
# Repository: GeniSysAI
# Project: Natural Language Understanding Engine
#
# Author: Adam Milton-Ba... | 28.171123 | 102 | 0.685649 |
acfbcb2adb8836d7bf5ad1a020c9cd67d75c60ce | 23,827 | py | Python | preprocess_for_lambdamart_no_flags.py | loganlebanoff/correct_summarization | cec0d5401ddb5f7c33aca14f31da68b2f8092c53 | [
"BSD-3-Clause"
] | 2 | 2019-07-20T14:57:39.000Z | 2020-06-01T11:14:40.000Z | preprocess_for_lambdamart_no_flags.py | loganlebanoff/correct_summarization | cec0d5401ddb5f7c33aca14f31da68b2f8092c53 | [
"BSD-3-Clause"
] | null | null | null | preprocess_for_lambdamart_no_flags.py | loganlebanoff/correct_summarization | cec0d5401ddb5f7c33aca14f31da68b2f8092c53 | [
"BSD-3-Clause"
] | null | null | null | import scipy
import time
import itertools
import convert_data
import numpy as np
import data
from tqdm import tqdm
import util
from absl import flags
from absl import app
import sys
import os
import hashlib
import struct
import subprocess
import collections
import glob
from tensorflow.core.example impo... | 44.453358 | 194 | 0.669073 |
acfbcb6a29c85c7b7ab2fdc4778e6e59b90cfaa0 | 13,138 | py | Python | DQMOffline/Trigger/python/MuonMonitor_cff.py | snessis/cmssw | f84137335f59a16d4cf9979547f0d77180f4e7e1 | [
"Apache-2.0"
] | null | null | null | DQMOffline/Trigger/python/MuonMonitor_cff.py | snessis/cmssw | f84137335f59a16d4cf9979547f0d77180f4e7e1 | [
"Apache-2.0"
] | null | null | null | DQMOffline/Trigger/python/MuonMonitor_cff.py | snessis/cmssw | f84137335f59a16d4cf9979547f0d77180f4e7e1 | [
"Apache-2.0"
] | 1 | 2021-11-23T09:25:45.000Z | 2021-11-23T09:25:45.000Z | import FWCore.ParameterSet.Config as cms
from DQMOffline.Trigger.MuonMonitor_cfi import hltMuonmonitoring
TrkMu12_DoubleTrkMu5NoFiltersNoVtx_monitoring = hltMuonmonitoring.clone(
FolderName = 'HLT/EXO/TrkMu12_DoubleTrkMu5NoFiltersNoVtx/'
)
TrkMu12_DoubleTrkMu5NoFiltersNoVtx_monitoring.numGenericTriggerEventPSet.... | 63.468599 | 252 | 0.863602 |
acfbcbf2cae50ae7e2f13aee4acbe16bd973c4f7 | 39,236 | py | Python | tensorflow/python/distribute/parameter_server_strategy_v2.py | TOT0RoKR/tensorflow | 12c2babf7dccc00c13d6e297c0f792f89f7408aa | [
"Apache-2.0"
] | 2 | 2021-07-03T07:55:19.000Z | 2021-07-03T08:05:15.000Z | tensorflow/python/distribute/parameter_server_strategy_v2.py | TOT0RoKR/tensorflow | 12c2babf7dccc00c13d6e297c0f792f89f7408aa | [
"Apache-2.0"
] | 2 | 2021-12-16T09:59:49.000Z | 2022-02-10T06:41:28.000Z | tensorflow/python/distribute/parameter_server_strategy_v2.py | TOT0RoKR/tensorflow | 12c2babf7dccc00c13d6e297c0f792f89f7408aa | [
"Apache-2.0"
] | 1 | 2020-06-18T07:58:29.000Z | 2020-06-18T07:58:29.000Z | # Lint as: python3
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 43.888143 | 92 | 0.726068 |
acfbcc1fe54db1df26014b4a11b3d13eaf6932cf | 873 | py | Python | Project_2-Data_Visualization/exercises/rw_visual.py | Vandeilsonln/Python-Crash-Course | 39b4f421504618f947672304a8e97edf7bc7f13d | [
"MIT"
] | null | null | null | Project_2-Data_Visualization/exercises/rw_visual.py | Vandeilsonln/Python-Crash-Course | 39b4f421504618f947672304a8e97edf7bc7f13d | [
"MIT"
] | null | null | null | Project_2-Data_Visualization/exercises/rw_visual.py | Vandeilsonln/Python-Crash-Course | 39b4f421504618f947672304a8e97edf7bc7f13d | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
from random_walk import RandomWalk
# Keep making new walks, as long as the progrm is active.
while True:
# Make a random walk, and plot the points.
rw = RandomWalk(10000)
rw.fill_walk()
# Set the size of the plotting window
plt.figure(figsize=(10, 6))
point_num... | 30.103448 | 101 | 0.666667 |
acfbcc9a50bc063ea3fb031a4e8b35d40a12f944 | 675 | py | Python | fiasco/util/decorators.py | eblur/fiasco | 4ab14756f285e3551bd52cf47a1c9b49eda8b798 | [
"BSD-3-Clause"
] | 1 | 2018-06-02T09:50:25.000Z | 2018-06-02T09:50:25.000Z | fiasco/util/decorators.py | eblur/fiasco | 4ab14756f285e3551bd52cf47a1c9b49eda8b798 | [
"BSD-3-Clause"
] | null | null | null | fiasco/util/decorators.py | eblur/fiasco | 4ab14756f285e3551bd52cf47a1c9b49eda8b798 | [
"BSD-3-Clause"
] | null | null | null | """
Useful function/method decorators
"""
from functools import wraps
__all__ = ['needs_dataset']
def needs_dataset(*names, default=None):
"""
Decorator for skipping methods when the needed atomic data is not available
"""
non_ion_datasets = ['abundance', 'ip', 'ioneq']
names = [f'_{n}' if n not ... | 27 | 79 | 0.614815 |
acfbccca1176885d8d2beebda27ce5939049b23d | 7,832 | py | Python | site/search-index/build.py | vishalbelsare/neupy | 684313cdaddcad326f2169384fb15ec3aa29d991 | [
"MIT"
] | null | null | null | site/search-index/build.py | vishalbelsare/neupy | 684313cdaddcad326f2169384fb15ec3aa29d991 | [
"MIT"
] | null | null | null | site/search-index/build.py | vishalbelsare/neupy | 684313cdaddcad326f2169384fb15ec3aa29d991 | [
"MIT"
] | null | null | null | import os
import re
import json
import pickle
import logging
import argparse
from textwrap import dedent
from collections import defaultdict, namedtuple
import nltk
import numpy as np
import scipy.sparse as sp
import ujson as json
from six.moves.urllib.parse import urljoin, urlparse
from pagerank import pagerank
from... | 27.871886 | 79 | 0.595123 |
acfbcd83e820dfd1ff1e6eb9be8af961d5ae0084 | 16,799 | py | Python | algortimoGA/virtualenv/lib/python3.8/site-packages/tornado/concurrent.py | lsbloo/GeradorHorariosUfpb | 599db5ca382424dfc05fad039880b4717612ac44 | [
"MIT"
] | 6 | 2020-08-04T13:12:42.000Z | 2020-08-16T13:26:19.000Z | algortimoGA/virtualenv/lib/python3.8/site-packages/tornado/concurrent.py | lsbloo/GeradorHorariosUfpb | 599db5ca382424dfc05fad039880b4717612ac44 | [
"MIT"
] | null | null | null | algortimoGA/virtualenv/lib/python3.8/site-packages/tornado/concurrent.py | lsbloo/GeradorHorariosUfpb | 599db5ca382424dfc05fad039880b4717612ac44 | [
"MIT"
] | 3 | 2017-04-07T12:02:22.000Z | 2020-03-23T12:11:55.000Z | #!/usr/bin/env python
#
# Copyright 2012 Facebook
#
# 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 a... | 36.440347 | 80 | 0.650396 |
acfbcde4c70a7dff48e8203e679d8f7ec0e7948b | 297 | py | Python | Course_3/Week_1/rearrange2.py | internetworksio/Google-ITAutomation-Python | 6027750a33e8df883d762223bb0c4a5a95395bc0 | [
"MIT"
] | 2 | 2021-03-23T16:02:32.000Z | 2022-03-13T09:32:56.000Z | Course_3/Week_1/rearrange2.py | internetworksio/Google-ITAutomation-Python | 6027750a33e8df883d762223bb0c4a5a95395bc0 | [
"MIT"
] | null | null | null | Course_3/Week_1/rearrange2.py | internetworksio/Google-ITAutomation-Python | 6027750a33e8df883d762223bb0c4a5a95395bc0 | [
"MIT"
] | 7 | 2021-01-14T05:39:54.000Z | 2022-03-13T09:33:01.000Z | #!/usr/bin/env python3
"""
This script is used for course notes.
Author: Erick Marin
Date: 01/06/2021
"""
import re
def rearrange_name(name):
result = re.search(r"^([\w .-]*), ([\w .-]*)$", name)
if result is None:
return result
return "{} {}".format(result[2], result[2])
| 17.470588 | 57 | 0.592593 |
acfbcf0140124e8674e73f987840a9745804fd83 | 1,082 | py | Python | Pizza Ordering Program/main.py | vanshdamania/Python-Projects | 981bff33b1a828cca430f4ebae22c55f9e6edde7 | [
"Apache-2.0"
] | null | null | null | Pizza Ordering Program/main.py | vanshdamania/Python-Projects | 981bff33b1a828cca430f4ebae22c55f9e6edde7 | [
"Apache-2.0"
] | null | null | null | Pizza Ordering Program/main.py | vanshdamania/Python-Projects | 981bff33b1a828cca430f4ebae22c55f9e6edde7 | [
"Apache-2.0"
] | null | null | null | print("-" * 50)
print("\t Welcome to Damania's Pizza")
print("-" * 50)
SmallPizza = 15
MediumPizza = 20
LargePizza = 25
PepperoniSmallPizza = 2
PepperoniMLPizza = 3
ExtraCheese = 1
Bill = 0
print("Small size pizza: $15")
print("Medium size pizza: $20")
print("Large size pizza: $25\n")
print("Pepperoni for Small Piz... | 25.162791 | 75 | 0.639556 |
acfbcfaed3619cd06fd2d962f0da400d9573d199 | 1,536 | py | Python | flowctl/actions/update_action.py | rexengineering/metaflow | fcba7cd6aaccd3806ce7d6a4a8aaeef350bbeaf8 | [
"Apache-2.0"
] | null | null | null | flowctl/actions/update_action.py | rexengineering/metaflow | fcba7cd6aaccd3806ce7d6a4a8aaeef350bbeaf8 | [
"Apache-2.0"
] | null | null | null | flowctl/actions/update_action.py | rexengineering/metaflow | fcba7cd6aaccd3806ce7d6a4a8aaeef350bbeaf8 | [
"Apache-2.0"
] | null | null | null | import argparse
import logging
import yaml
from flowlib import flow_pb2
from flowlib.flowd_utils import get_flowd_connection
__help__ = 'Update a workflow deployment. Currently supports setting ingress for start events.'
def __refine_args__(parser: argparse.ArgumentParser):
parser.add_argument(
'-o',
... | 28.981132 | 95 | 0.589193 |
acfbd02e1580cb4404682189966b6c3667c0027d | 5,969 | py | Python | curvetime/bc/blockchain.py | Dasudian/curvetime | 9d3211aa1d2c7a24a3379152a95033586573c4d8 | [
"Apache-2.0"
] | 5 | 2021-05-16T12:52:57.000Z | 2022-02-25T10:12:31.000Z | curvetime/bc/blockchain.py | Dasudian/curvetime | 1fb388c14bfddbe0c473da8f4dc0caea35ab154e | [
"Apache-2.0"
] | null | null | null | curvetime/bc/blockchain.py | Dasudian/curvetime | 1fb388c14bfddbe0c473da8f4dc0caea35ab154e | [
"Apache-2.0"
] | 1 | 2022-03-30T16:31:50.000Z | 2022-03-30T16:31:50.000Z | from hashlib import sha256
from uuid import getnode
import json
import time
from curvetime.db import couch
class Block:
def __init__(self, index, timestamp, previous_hash, transactions=[], action=None, state=None, reward=None):
"""
The init function for a block
index: the index of the block... | 30.299492 | 111 | 0.61032 |
acfbd079de7fe2b788ba22fa647b56923742fb50 | 1,423 | py | Python | courses/api/serializers.py | antonnifo/E-Soma | 93d49b27dedbff58d19f8245a79693762fc819d5 | [
"MIT"
] | 1 | 2022-02-09T06:28:04.000Z | 2022-02-09T06:28:04.000Z | courses/api/serializers.py | antonnifo/E-Soma | 93d49b27dedbff58d19f8245a79693762fc819d5 | [
"MIT"
] | null | null | null | courses/api/serializers.py | antonnifo/E-Soma | 93d49b27dedbff58d19f8245a79693762fc819d5 | [
"MIT"
] | 1 | 2022-02-09T06:29:11.000Z | 2022-02-09T06:29:11.000Z | from rest_framework import serializers
from ..models import Subject, Course, Module, Content
class SubjectSerializer(serializers.ModelSerializer):
class Meta:
model = Subject
fields = ['id', 'title', 'slug']
class ModuleSerializer(serializers.ModelSerializer):
class Meta:
model = Mod... | 30.934783 | 64 | 0.664793 |
acfbd0a9f23e73d2d41a82805a092927960f6d41 | 14,816 | py | Python | src/lib/lis3dh.py | galileorobotics/croissant-node | 5c0384787db389f912b825ce9c74147790297aab | [
"MIT"
] | 2 | 2020-05-20T16:30:32.000Z | 2020-08-13T16:38:36.000Z | src/lib/lis3dh.py | galileorobotics/croissant-node | 5c0384787db389f912b825ce9c74147790297aab | [
"MIT"
] | 1 | 2020-06-17T16:12:56.000Z | 2020-06-17T16:12:56.000Z | src/lib/lis3dh.py | galileorobotics/croissant-node | 5c0384787db389f912b825ce9c74147790297aab | [
"MIT"
] | 1 | 2020-05-20T18:00:16.000Z | 2020-05-20T18:00:16.000Z | # Adafruit LIS3DH Accelerometer Micropython Driver
# Based on the Arduino LIS3DH driver from:
# https://github.com/adafruit/Adafruit_LIS3DH/
# and the Circuitpython Port by Tony DiCola
#Port by Julian Finn
# License: MIT License (https://en.wikipedia.org/wiki/MIT_License)
"""
`adafruit_lis3dh`
=======================... | 38.78534 | 126 | 0.628375 |
acfbd233853c5fef7c39ecc9061dfb2c533684dd | 1,445 | py | Python | app.py | sathishmtech01/rasa_chatbot | 7bacb1a2fc941a80929249d920be4b003ea7438b | [
"Apache-2.0"
] | 1 | 2020-09-01T10:21:04.000Z | 2020-09-01T10:21:04.000Z | app.py | sathishmtech01/rasa_chatbot | 7bacb1a2fc941a80929249d920be4b003ea7438b | [
"Apache-2.0"
] | 6 | 2020-06-18T15:01:51.000Z | 2022-02-12T10:18:54.000Z | app.py | sathishmtech01/rasa_chatbot | 7bacb1a2fc941a80929249d920be4b003ea7438b | [
"Apache-2.0"
] | null | null | null | from flask import Flask,request
from flask_restful import Resource, Api
from flask_cors import CORS
import random
app = Flask(__name__)
# api = Api(app)
app = Flask(__name__)
cors = CORS(app, resources={r"*": {"origins": "*"}})
api = Api(app)
class HelloWorld(Resource):
def get(self):
return [{"recipient... | 41.285714 | 212 | 0.675433 |
acfbd2daef8eda9a6f4946da20a53c32ea9f106a | 34,718 | py | Python | tests/pytests/test_json.py | simonprickett/RediSearch | 6f720f2d81d8c29133b9215badadb246c214141f | [
"MIT",
"Ruby",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/pytests/test_json.py | simonprickett/RediSearch | 6f720f2d81d8c29133b9215badadb246c214141f | [
"MIT",
"Ruby",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/pytests/test_json.py | simonprickett/RediSearch | 6f720f2d81d8c29133b9215badadb246c214141f | [
"MIT",
"Ruby",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import bz2
from common import getConnectionByEnv, waitForIndex, toSortedFlatList, slice_at, index_info
from includes import *
UNSTABLE_TESTS = os.getenv('UNSTABLE_TESTS', '0') == '1'
GAMES_JSON = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'games.json.bz2')
doc1_con... | 48.152566 | 140 | 0.542888 |
acfbd300e29dc0d2bdf028098373c43cb3dc8d34 | 2,490 | py | Python | code-for-fetching-data/PUBLIC_TRADINGIS_DATA-monir.py | mzkhan2000/AEMO-data-Analytics | 94c2906d8af699b55e95744656841c79fd019f77 | [
"MIT"
] | 1 | 2021-07-15T00:28:23.000Z | 2021-07-15T00:28:23.000Z | code-for-fetching-data/PUBLIC_TRADINGIS_DATA-monir.py | mzkhan2000/AEMO-data-Analytics | 94c2906d8af699b55e95744656841c79fd019f77 | [
"MIT"
] | null | null | null | code-for-fetching-data/PUBLIC_TRADINGIS_DATA-monir.py | mzkhan2000/AEMO-data-Analytics | 94c2906d8af699b55e95744656841c79fd019f77 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[36]:
# import necessary libraries - Monir
import pandas as pd
import os
import glob
import numpy as np
from csv import reader
# In[37]:
# assign dataset names - Monir
PUBLIC_TRADINGIS_list_of_files = []
#read all dataset names with starting PUBLIC_DISPATCHSCADA - Monir... | 14.647059 | 81 | 0.690763 |
acfbd375cda8f6e6faee36700a8e0554722befd1 | 1,073 | py | Python | backend/core/cdn.py | GLY0826/flask-bigger4edu | 663a4dedb39e2abb12e9fe98ed8eb5d1314fe413 | [
"MIT"
] | 29 | 2018-11-13T09:03:29.000Z | 2021-11-07T20:20:38.000Z | backend/core/cdn.py | GLY0826/flask-bigger4edu | 663a4dedb39e2abb12e9fe98ed8eb5d1314fe413 | [
"MIT"
] | null | null | null | backend/core/cdn.py | GLY0826/flask-bigger4edu | 663a4dedb39e2abb12e9fe98ed8eb5d1314fe413 | [
"MIT"
] | 21 | 2018-11-14T01:11:24.000Z | 2021-12-08T09:20:30.000Z | # -*- coding: utf-8 -*-
'''后端主要业务文件'''
import os
from flask import url_for
from ..utils import (
set_query_parameter,
random_uuid
)
def with_cdn_setting(app):
'''cdn设置'''
@app.template_global('static_url')
def static_url(filename):
use_cdn = app.config['USE_CDN']
url = ''
... | 26.170732 | 67 | 0.556384 |
acfbd44c6321f0669f5b32d84ea6bbddbfb3db17 | 8,668 | py | Python | pl_bolts/datamodules/sklearn_datamodule.py | norabelrose/lightning-bolts | cb83c2e93fc7860474b9e8d216fac450772fb847 | [
"Apache-2.0"
] | 2 | 2021-06-25T18:10:22.000Z | 2021-12-29T23:17:31.000Z | pl_bolts/datamodules/sklearn_datamodule.py | norabelrose/lightning-bolts | cb83c2e93fc7860474b9e8d216fac450772fb847 | [
"Apache-2.0"
] | null | null | null | pl_bolts/datamodules/sklearn_datamodule.py | norabelrose/lightning-bolts | cb83c2e93fc7860474b9e8d216fac450772fb847 | [
"Apache-2.0"
] | null | null | null | import math
from typing import Any, Tuple
import numpy as np
import torch
from pytorch_lightning import LightningDataModule
from torch.utils.data import DataLoader, Dataset
from pl_bolts.utils import _SKLEARN_AVAILABLE
from pl_bolts.utils.warnings import warn_missing_pkg
if _SKLEARN_AVAILABLE:
from sklearn.utils... | 31.0681 | 120 | 0.590909 |
acfbd51ad81a9b310e22faece2eb02294a09ed39 | 3,044 | py | Python | src/abaqus/Material/Plastic/DruckerPrager/ModifiedCap/CapCreepCohesion.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | 7 | 2022-01-21T09:15:45.000Z | 2022-02-15T09:31:58.000Z | src/abaqus/Material/Plastic/DruckerPrager/ModifiedCap/CapCreepCohesion.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | src/abaqus/Material/Plastic/DruckerPrager/ModifiedCap/CapCreepCohesion.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | from abaqusConstants import *
class CapCreepCohesion:
"""The CapCreepCohesion object specifies a cap creep model and material properties.
Notes
-----
This object can be accessed by:
.. code-block:: python
import material
mdb.models[name].materials[name].capPlasticity... | 33.450549 | 106 | 0.607096 |
acfbd53464e85569f42a7091f879517d887cf080 | 12,315 | py | Python | pffit/vsf_fit.py | Tristanovsk/pffit | 6a9eeb3849c8670b2aa3c622d5d360d43e27ea8b | [
"MIT"
] | null | null | null | pffit/vsf_fit.py | Tristanovsk/pffit | 6a9eeb3849c8670b2aa3c622d5d360d43e27ea8b | [
"MIT"
] | null | null | null | pffit/vsf_fit.py | Tristanovsk/pffit | 6a9eeb3849c8670b2aa3c622d5d360d43e27ea8b | [
"MIT"
] | null | null | null | import os
opj = os.path.join
import numpy as np
import pandas as pd
import glob
import matplotlib as mpl
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
color_cycle = ['dimgrey', 'firebrick', 'darkorange', 'olivedrab',
'dodgerblue', 'magenta']
plt.ioff()
plt.rcP... | 42.760417 | 151 | 0.575477 |
acfbd567addd287c47662c641aa17c02ec80528c | 1,520 | py | Python | setup.py | PlanetHunters/tkmatrix | 7c112e2cbcd1e75753828a334720ddf7972c8551 | [
"MIT"
] | 1 | 2021-03-09T18:50:23.000Z | 2021-03-09T18:50:23.000Z | setup.py | PlanetHunters/tkmatrix | 7c112e2cbcd1e75753828a334720ddf7972c8551 | [
"MIT"
] | 15 | 2021-03-24T14:13:02.000Z | 2021-10-16T06:37:45.000Z | setup.py | martindevora/tkmatrix | 7c112e2cbcd1e75753828a334720ddf7972c8551 | [
"MIT"
] | 1 | 2021-03-09T18:50:26.000Z | 2021-03-09T18:50:26.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
version = "0.3.12"
setuptools.setup(
name="tkmatrix",
version=version,
author="M. Dévora-Pajares & F.J. Pozuelos",
author_email="mdevorapajares@protonmail.com",
description="ToolKit for Multi-phAse Transits Recove... | 36.190476 | 85 | 0.490789 |
acfbd5f9e0085f66022586637ba3140637cee62a | 497 | py | Python | ics/structures/j2534_adapter_information.py | intrepidcs/python_ics | 7bfa8c2f893763608f9255f9536a2019cfae0c23 | [
"Unlicense"
] | 45 | 2017-10-17T08:42:08.000Z | 2022-02-21T16:26:48.000Z | ics/structures/j2534_adapter_information.py | intrepidcs/python_ics | 7bfa8c2f893763608f9255f9536a2019cfae0c23 | [
"Unlicense"
] | 106 | 2017-03-07T21:10:39.000Z | 2022-03-29T15:32:46.000Z | ics/structures/j2534_adapter_information.py | intrepidcs/python_ics | 7bfa8c2f893763608f9255f9536a2019cfae0c23 | [
"Unlicense"
] | 17 | 2017-04-04T12:30:22.000Z | 2022-01-28T05:30:25.000Z | # This file was auto generated; Do not modify, if you value your sanity!
import ctypes
import enum
class j2534_adapter_information(ctypes.Structure):
_fields_ = [
('szName', ctypes.c_char * 128),
('szDeviceName', ctypes.c_char * 64),
('Status', ctypes.c_ulong),
('bMAC_Address', ct... | 24.85 | 72 | 0.657948 |
acfbd634b16c3f769a0981b319472a1776b7cbb6 | 26,911 | py | Python | dependencies/jedi/api/completion.py | zjzh/SublimeJEDI | 8a5054f0a053c8a8170c06c56216245240551d54 | [
"MIT"
] | 641 | 2015-01-01T11:27:21.000Z | 2022-03-22T12:46:01.000Z | dependencies/jedi/api/completion.py | zjzh/SublimeJEDI | 8a5054f0a053c8a8170c06c56216245240551d54 | [
"MIT"
] | 177 | 2015-01-01T13:00:21.000Z | 2022-03-15T08:23:28.000Z | dependencies/jedi/api/completion.py | zjzh/SublimeJEDI | 8a5054f0a053c8a8170c06c56216245240551d54 | [
"MIT"
] | 118 | 2015-01-14T03:03:08.000Z | 2022-03-10T03:37:40.000Z | import re
from textwrap import dedent
from parso.python.token import PythonTokenTypes
from parso.python import tree
from parso.tree import search_ancestor, Leaf
from parso import split_lines
from jedi._compatibility import Parameter
from jedi import debug
from jedi import settings
from jedi.api import classes
from je... | 40.651057 | 98 | 0.593958 |
acfbd6631525724d6ff9694729373b907c475c9b | 42 | py | Python | budgetmap/_node_python_test/konlpy_node/python/article.py | BudgetWiser/budgetmap | 29414c28b7b77d3b6b138f293a4999e4446e5f20 | [
"Apache-2.0"
] | null | null | null | budgetmap/_node_python_test/konlpy_node/python/article.py | BudgetWiser/budgetmap | 29414c28b7b77d3b6b138f293a4999e4446e5f20 | [
"Apache-2.0"
] | null | null | null | budgetmap/_node_python_test/konlpy_node/python/article.py | BudgetWiser/budgetmap | 29414c28b7b77d3b6b138f293a4999e4446e5f20 | [
"Apache-2.0"
] | null | null | null | import sys, json
a = raw_input()
print a
| 8.4 | 16 | 0.690476 |
acfbd668f29aba3ec150e5d19318dc6c4fc3210d | 15,079 | py | Python | tests/query/data_storage/test_service_buffer_file_stream_reader.py | DaeunYim/pgtoolsservice | b7e548718d797883027b2caee2d4722810b33c0f | [
"MIT"
] | 33 | 2019-05-27T13:04:35.000Z | 2022-03-17T13:33:05.000Z | tests/query/data_storage/test_service_buffer_file_stream_reader.py | DaeunYim/pgtoolsservice | b7e548718d797883027b2caee2d4722810b33c0f | [
"MIT"
] | 31 | 2019-06-10T01:55:47.000Z | 2022-03-09T07:27:49.000Z | tests/query/data_storage/test_service_buffer_file_stream_reader.py | DaeunYim/pgtoolsservice | b7e548718d797883027b2caee2d4722810b33c0f | [
"MIT"
] | 25 | 2019-05-13T18:39:24.000Z | 2021-11-16T03:07:33.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------------------... | 44.35 | 113 | 0.684594 |
acfbd721f71f52dd5575106433b0c76b9719dfe2 | 19,601 | py | Python | code/vl-bert/apex/apex/amp/frontend.py | e-bug/mpre-unmasked | cd12250b58152a558e15a33113bf98d90b88e776 | [
"MIT"
] | 5 | 2020-12-08T12:38:48.000Z | 2021-11-25T13:19:16.000Z | code/vl-bert/apex/apex/amp/frontend.py | e-bug/mpre-unmasked | cd12250b58152a558e15a33113bf98d90b88e776 | [
"MIT"
] | null | null | null | code/vl-bert/apex/apex/amp/frontend.py | e-bug/mpre-unmasked | cd12250b58152a558e15a33113bf98d90b88e776 | [
"MIT"
] | null | null | null | import torch
from ._initialize import _initialize
from ._amp_state import _amp_state, warn_or_err, maybe_print
class Properties(object):
"""
This class has two purposes: to establish a set of default properties,
and to route setting of these attributes through __setattr__ so that (in theory)
they can ... | 49.0025 | 115 | 0.63461 |
acfbd7f85c67fee814d765fc478e7b965c0ee5e1 | 2,834 | py | Python | encrypt/utils.py | alexjaniak/encrypt | 36f789551483cc88b78d1cb3ba60918530cef0b6 | [
"MIT"
] | null | null | null | encrypt/utils.py | alexjaniak/encrypt | 36f789551483cc88b78d1cb3ba60918530cef0b6 | [
"MIT"
] | null | null | null | encrypt/utils.py | alexjaniak/encrypt | 36f789551483cc88b78d1cb3ba60918530cef0b6 | [
"MIT"
] | null | null | null | # PROJECT: encrypt - encrypts text files
# AUTHOR: alexjaniak
# FILE: helper functions
# IMPORTS
from Crypto.Cipher import AES
from Crypto.Protocol import KDF
from Crypto.Util.Padding import pad, unpad
from Crypto.Random import get_random_bytes
import os
# MAIN-FUNCTIONS
def encrypt_file(read_file: str, password: st... | 28.918367 | 78 | 0.667255 |
acfbd8599fdeec72201a14d3db49a6e4a2b4d85d | 15,493 | py | Python | genienlp/ned/bootleg.py | saligrama/genienlp | 35659911883c43fdbe38c4391e75ca106763eb40 | [
"BSD-3-Clause"
] | null | null | null | genienlp/ned/bootleg.py | saligrama/genienlp | 35659911883c43fdbe38c4391e75ca106763eb40 | [
"BSD-3-Clause"
] | null | null | null | genienlp/ned/bootleg.py | saligrama/genienlp | 35659911883c43fdbe38c4391e75ca106763eb40 | [
"BSD-3-Clause"
] | null | null | null | #
# Copyright (c) 2020-2021 The Board of Trustees of the Leland Stanford Junior University
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the abov... | 46.110119 | 131 | 0.628284 |
acfbd97cf5ef7411f39efbde98abe08a463157fc | 3,281 | py | Python | db.py | elviva404/Valorina | 9920aaa3156d63e33b7568cbc10078db39953356 | [
"MIT"
] | null | null | null | db.py | elviva404/Valorina | 9920aaa3156d63e33b7568cbc10078db39953356 | [
"MIT"
] | null | null | null | db.py | elviva404/Valorina | 9920aaa3156d63e33b7568cbc10078db39953356 | [
"MIT"
] | null | null | null | from bson.objectid import ObjectId
from pymongo import MongoClient
import os
from dotenv import load_dotenv
from cryptography.fernet import Fernet
load_dotenv()
MONGO = os.getenv('MONGO')
KEY = (os.getenv('KEY')).encode('utf-8')
ID = (os.getenv('ID'))
cluster = MongoClient(MONGO)
db = cluster["discord"]
def addUserDb... | 28.284483 | 120 | 0.639134 |
acfbd9e0f22834ade8f27b7238bb0690e61e3e7d | 254 | py | Python | day01/part1.py | ElliotFriend/aoc-2017 | 86f5d0438458c83b2af7ee09d427ac0572799ce6 | [
"MIT"
] | null | null | null | day01/part1.py | ElliotFriend/aoc-2017 | 86f5d0438458c83b2af7ee09d427ac0572799ce6 | [
"MIT"
] | null | null | null | day01/part1.py | ElliotFriend/aoc-2017 | 86f5d0438458c83b2af7ee09d427ac0572799ce6 | [
"MIT"
] | null | null | null | my_input = 1122
my_input_list = [int(d) for d in str(my_input)]
my_adding_list = []
for x in range(-1, len(my_input_list) - 1):
if my_input_list[x] == my_input_list[x + 1]:
my_adding_list.append(my_input_list[x])
print(sum(my_adding_list))
| 25.4 | 48 | 0.692913 |
acfbdb03601b4f4292f0ed536ab831d4b203c69f | 1,088 | py | Python | scripts/slack-dump.py | keotl/IM-poetry | 2a9281a6d3033057a7b8ed405ff7a7e3cede1870 | [
"MIT"
] | 2 | 2019-09-16T12:58:12.000Z | 2019-09-18T12:39:22.000Z | scripts/slack-dump.py | keotl/IM-poetry | 2a9281a6d3033057a7b8ed405ff7a7e3cede1870 | [
"MIT"
] | 3 | 2019-09-15T23:16:10.000Z | 2019-09-16T22:08:30.000Z | scripts/slack-dump.py | keotl/IM-poetry | 2a9281a6d3033057a7b8ed405ff7a7e3cede1870 | [
"MIT"
] | null | null | null | import json
import requests
# REPLACE THESE CONSTANTS WITH YOUR OWN
TOKEN = "<slack_personal_token>"
CHANNEL = "<channel_id>"
def get_messages(channel: str):
has_more = True
raw_messages = []
while has_more:
if (len(raw_messages) > 0):
res = requests.get(
f"https://sl... | 27.2 | 133 | 0.628676 |
acfbdb0a12d72a7ce20cf903064b39b1528d2ecc | 795 | py | Python | hciparse/android/phone.py | fotonick/hciparse | cafe64c57c74bbafe8a7c411f1d6f9d4d9c5c7e1 | [
"MIT"
] | null | null | null | hciparse/android/phone.py | fotonick/hciparse | cafe64c57c74bbafe8a7c411f1d6f9d4d9c5c7e1 | [
"MIT"
] | null | null | null | hciparse/android/phone.py | fotonick/hciparse | cafe64c57c74bbafe8a7c411f1d6f9d4d9c5c7e1 | [
"MIT"
] | null | null | null |
from .executor import Executor
class Phone(object):
def __init__(self, serial=None):
self.serial = serial
def shell(self, cmd):
cmd = "adb shell " + cmd
ret, out = Executor(cmd).execute()
if ret != 0:
raise ValueError("Could not execute adb shell " + cmd)
... | 26.5 | 80 | 0.554717 |
acfbdbdcdb03514276ffa0012104020d600a98c4 | 1,088 | py | Python | libp2p/protocol_muxer/multiselect_muxer_interface.py | swedneck/py-libp2p | 85457fa308100ed0e5802849bf3918ffae486239 | [
"Apache-2.0",
"MIT"
] | null | null | null | libp2p/protocol_muxer/multiselect_muxer_interface.py | swedneck/py-libp2p | 85457fa308100ed0e5802849bf3918ffae486239 | [
"Apache-2.0",
"MIT"
] | 1 | 2019-10-15T15:28:00.000Z | 2019-10-15T15:28:00.000Z | libp2p/protocol_muxer/multiselect_muxer_interface.py | swedneck/py-libp2p | 85457fa308100ed0e5802849bf3918ffae486239 | [
"Apache-2.0",
"MIT"
] | 2 | 2019-10-15T13:08:19.000Z | 2019-10-15T13:41:49.000Z | from abc import ABC, abstractmethod
from typing import Dict, Tuple
from libp2p.typing import StreamHandlerFn, TProtocol
from .multiselect_communicator_interface import IMultiselectCommunicator
class IMultiselectMuxer(ABC):
"""
Multiselect module that is responsible for responding to
a multiselect client... | 30.222222 | 81 | 0.706801 |
acfbdccd7d29f0fc2585af4dbd6c5549aa68a7ed | 3,070 | py | Python | main_coin.py | songaal/rltrader | 4aac8085dda1a58fbf30a313f2a4608398c971a3 | [
"MIT"
] | 2 | 2020-06-13T07:18:10.000Z | 2020-11-03T03:46:40.000Z | main_coin.py | songaal/rltrader | 4aac8085dda1a58fbf30a313f2a4608398c971a3 | [
"MIT"
] | null | null | null | main_coin.py | songaal/rltrader | 4aac8085dda1a58fbf30a313f2a4608398c971a3 | [
"MIT"
] | 1 | 2020-05-16T08:41:29.000Z | 2020-05-16T08:41:29.000Z | import logging
import os
import settings
import data_manager_coin
import pandas
from policy_learner_coin import PolicyLearner
import datetime
# SELECT first("open") AS "first_open", max("high") AS "max_high", min("low") AS "min_low", last("close") AS "last_close", sum("volume") AS "sum_volume" FROM "coin_v2"."autogen"... | 42.054795 | 225 | 0.681107 |
acfbdcf42723abe3fbf42aa671617046c1d39f46 | 766 | py | Python | exercises/exc_05_02.py | rklymentiev/py-for-neuro | 6bb163347483642c79eac429e5a9289edff7ce09 | [
"MIT"
] | 7 | 2021-04-28T13:12:16.000Z | 2022-01-15T00:21:11.000Z | exercises/exc_05_02.py | rklymentiev/py-for-neuro | 6bb163347483642c79eac429e5a9289edff7ce09 | [
"MIT"
] | 2 | 2021-04-02T18:42:55.000Z | 2021-05-20T08:43:06.000Z | exercises/exc_05_02.py | rklymentiev/py-for-neuro | 6bb163347483642c79eac429e5a9289edff7ce09 | [
"MIT"
] | 2 | 2021-07-04T22:57:29.000Z | 2021-07-29T19:28:43.000Z | # string with outcomes
outcomes = ['malignant', 'malignant', 'benign', 'malignant',
'malignant', 'benign', 'benign', 'benign']
# saving the string to txt file
with open('outcome.txt', mode='w') as file:
for val in outcomes: # write each value from the list at a new line
file.write(val +... | 28.37037 | 77 | 0.669713 |
acfbde3e8618a48eee03f842129765851b306709 | 86 | py | Python | awsprocesscreds/compat.py | jcooter/awsprocesscreds | 24f32fad336e376dc259b29edaaba9f9637fa7cc | [
"Apache-2.0"
] | 136 | 2017-11-29T19:46:40.000Z | 2022-02-13T08:03:00.000Z | awsprocesscreds/compat.py | jcooter/awsprocesscreds | 24f32fad336e376dc259b29edaaba9f9637fa7cc | [
"Apache-2.0"
] | 39 | 2017-11-29T17:32:09.000Z | 2021-11-24T05:41:56.000Z | awsprocesscreds/compat.py | jcooter/awsprocesscreds | 24f32fad336e376dc259b29edaaba9f9637fa7cc | [
"Apache-2.0"
] | 57 | 2017-11-29T16:43:54.000Z | 2022-03-25T15:41:02.000Z | import six
if six.PY3:
from html import escape
else:
from cgi import escape
| 10.75 | 27 | 0.697674 |
acfbde719048e9155b444ef39086441fe376872d | 2,877 | py | Python | zerver/webhooks/opsgenie/view.py | bensteinberg/zulip | 4911bc3c4d6220e15f8c82cf95d4780797b4de8d | [
"Apache-2.0"
] | 2 | 2021-02-02T01:29:32.000Z | 2021-02-02T01:30:51.000Z | zerver/webhooks/opsgenie/view.py | bensteinberg/zulip | 4911bc3c4d6220e15f8c82cf95d4780797b4de8d | [
"Apache-2.0"
] | 1 | 2016-07-16T16:54:33.000Z | 2016-07-16T16:54:33.000Z | zerver/webhooks/opsgenie/view.py | bensteinberg/zulip | 4911bc3c4d6220e15f8c82cf95d4780797b4de8d | [
"Apache-2.0"
] | 1 | 2020-12-03T17:08:44.000Z | 2020-12-03T17:08:44.000Z | from typing import Any, Dict
from django.http import HttpRequest, HttpResponse
from zerver.decorator import webhook_view
from zerver.lib.request import REQ, has_request_variables
from zerver.lib.response import json_success
from zerver.lib.webhooks.common import check_send_webhook_message
from zerver.models import Us... | 33.847059 | 92 | 0.605492 |
acfbde78dd199f5f2e999e50aa5a954d774356cf | 1,018 | py | Python | 33/portscanner_mp_queue.py | tonybaloney/cpython-book-samples | d61d252d63461b114c3c02329a88a74dc8c51956 | [
"CC0-1.0"
] | 160 | 2020-03-16T06:34:09.000Z | 2022-03-20T19:33:14.000Z | 33/portscanner_mp_queue.py | tonybaloney/cpython-book-samples | d61d252d63461b114c3c02329a88a74dc8c51956 | [
"CC0-1.0"
] | 5 | 2020-11-26T12:02:14.000Z | 2021-06-01T06:24:15.000Z | 33/portscanner_mp_queue.py | tonybaloney/cpython-book-samples | d61d252d63461b114c3c02329a88a74dc8c51956 | [
"CC0-1.0"
] | 43 | 2020-05-31T04:48:28.000Z | 2022-03-08T17:22:45.000Z | import multiprocessing as mp
import time
import socket
timeout = 1
def check_port(host: str, port: int, results: mp.Queue):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(timeout)
result = sock.connect_ex((host, port))
if result == 0:
results.put(port)
sock.close... | 30.848485 | 74 | 0.608055 |
acfbdeb86296cf2828dad9f1c3adac81bc9cfb34 | 538 | py | Python | tests/components/conftest.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 6 | 2016-11-25T06:36:27.000Z | 2021-11-16T11:20:23.000Z | tests/components/conftest.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 56 | 2020-08-03T07:30:54.000Z | 2022-03-31T06:02:04.000Z | tests/components/conftest.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 2 | 2019-08-04T13:39:43.000Z | 2020-02-07T23:01:23.000Z | """Fixtures for component testing."""
import pytest
from homeassistant.components import zeroconf
from tests.async_mock import patch
zeroconf.orig_install_multiple_zeroconf_catcher = (
zeroconf.install_multiple_zeroconf_catcher
)
zeroconf.install_multiple_zeroconf_catcher = lambda zc: None
@pytest.fixture(auto... | 24.454545 | 70 | 0.754647 |
acfbe0b8fde8219a63f23d93b5b1571a297dc7df | 3,288 | py | Python | grzegorz_clients/api.py | Programvareverkstedet/grzegroz_clients | 70a707aa97b8b544185c51d34d62dc3351641020 | [
"BSD-3-Clause"
] | 1 | 2019-11-25T21:14:00.000Z | 2019-11-25T21:14:00.000Z | grzegorz_clients/api.py | Programvareverkstedet/grzegorz_clients | 70a707aa97b8b544185c51d34d62dc3351641020 | [
"BSD-3-Clause"
] | null | null | null | grzegorz_clients/api.py | Programvareverkstedet/grzegorz_clients | 70a707aa97b8b544185c51d34d62dc3351641020 | [
"BSD-3-Clause"
] | null | null | null | import requests, json
from urllib.parse import urlencode
from functools import wraps
# This must be set to be able to use it on remote hosts
BASE_URL = "http://localhost:8080/api"
def set_endpoint(base_url:str):
global BASE_URL
BASE_URL = base_url
# Exceptions:
class APIError(Exception): pass
# decorator:
# ... | 24.721805 | 74 | 0.66028 |
acfbe0f4e7c9f061537a4eabae51997f8c407fc3 | 9,850 | py | Python | testhub/testlib/nni_job/mnist-tfv1/mnist_npu.py | banrieen/PerfBoard | 855c7249de9075a8bc33149938782245d580d558 | [
"MIT"
] | 146 | 2021-04-15T03:32:12.000Z | 2021-09-10T06:06:42.000Z | testhub/testlib/nni_job/mnist-tfv1/mnist_npu.py | banrieen/PerfBoard | 855c7249de9075a8bc33149938782245d580d558 | [
"MIT"
] | 3 | 2021-05-26T05:20:26.000Z | 2021-08-05T02:07:14.000Z | testhub/testlib/nni_job/mnist-tfv1/mnist_npu.py | banrieen/MachineDevil | b9d8d70bc7e8d0113a9176aa16ec0e7fbda523ca | [
"MIT"
] | 29 | 2021-04-03T06:46:43.000Z | 2021-07-11T08:35:19.000Z | """A deep MNIST classifier using convolutional layers."""
import argparse
import logging
import math
import tempfile
import time
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
from npu_bridge.estimator import npu_ops
from tensorflow.core.protobuf.rewriter_config_pb2 import Rewriter... | 39.717742 | 104 | 0.620914 |
acfbe2f61a8d19e29de16fc24324d77c1e4301aa | 6,834 | py | Python | espnet2/enh/layers/complex_utils.py | YoshikiMas/espnet | 793b999a50af484a5eaf6227ef7556b48514ef15 | [
"Apache-2.0"
] | 1 | 2022-03-25T14:41:05.000Z | 2022-03-25T14:41:05.000Z | espnet2/enh/layers/complex_utils.py | YoshikiMas/espnet | 793b999a50af484a5eaf6227ef7556b48514ef15 | [
"Apache-2.0"
] | 2 | 2019-04-23T04:43:33.000Z | 2019-05-13T13:06:52.000Z | espnet2/enh/layers/complex_utils.py | YoshikiMas/espnet | 793b999a50af484a5eaf6227ef7556b48514ef15 | [
"Apache-2.0"
] | null | null | null | """Beamformer module."""
from distutils.version import LooseVersion
from typing import Sequence
from typing import Tuple
from typing import Union
import torch
from torch_complex import functional as FC
from torch_complex.tensor import ComplexTensor
EPS = torch.finfo(torch.double).eps
is_torch_1_8_plus = LooseVersion... | 35.046154 | 88 | 0.643254 |
acfbe31403a256cbcf7bb0e868e7c10cefef6cc7 | 1,395 | py | Python | Array/Contains Duplicate III.py | shua2018ti/Google | 3a9847e0c60d887d15eb4b0d4d8ebf51e464df1b | [
"MIT"
] | 87 | 2015-07-15T20:41:09.000Z | 2022-03-08T13:55:38.000Z | Array/Contains Duplicate III.py | shua2018ti/Google | 3a9847e0c60d887d15eb4b0d4d8ebf51e464df1b | [
"MIT"
] | 59 | 2015-03-19T22:26:41.000Z | 2015-07-25T17:58:08.000Z | Array/Contains Duplicate III.py | shua2018ti/Google | 3a9847e0c60d887d15eb4b0d4d8ebf51e464df1b | [
"MIT"
] | 45 | 2015-07-15T20:41:12.000Z | 2022-02-01T20:18:07.000Z | '''
Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between
nums[i] and nums[j] is at most t and the difference between i and j is at most k.
'''
class Solution:
# @param {integer[]} nums
# @param {integer} k
# @param {integer} t
... | 38.75 | 130 | 0.58638 |
acfbe425a0b9e68f85284f59e4ff8616d889ebdf | 1,501 | py | Python | rubix_admin/command_line.py | qubole/rubix-admin | 0419d0cd80c72debf7d1c113cc6c377f4f4739dd | [
"Apache-2.0"
] | 5 | 2017-12-04T08:48:41.000Z | 2020-06-02T06:57:43.000Z | rubix_admin/command_line.py | qubole/rubix-admin | 0419d0cd80c72debf7d1c113cc6c377f4f4739dd | [
"Apache-2.0"
] | 13 | 2017-08-28T12:15:54.000Z | 2020-08-18T22:58:29.000Z | rubix_admin/command_line.py | qubole/rubix-admin | 0419d0cd80c72debf7d1c113cc6c377f4f4739dd | [
"Apache-2.0"
] | 4 | 2017-10-04T22:43:46.000Z | 2019-01-09T23:44:20.000Z | #!/bin/env python
import os
import sys
import traceback
import logging
from parsers import setup_parsers
from rubix_admin.admin_config import AdminConfig
def main():
root = logging.getLogger()
root.setLevel(logging.INFO)
ch = logging.StreamHandler(sys.stderr)
ch.setLevel(logging.INFO)
formatter ... | 26.333333 | 91 | 0.681546 |
acfbe435ad5d09f692c2371c5bbe07936864f4e5 | 6,666 | py | Python | activeClassifier/visualisation/visualise_ActCl.py | dHonerkamp/ActiveClassifier | 052675277153594db64261cd56699a057e633de2 | [
"Apache-2.0"
] | null | null | null | activeClassifier/visualisation/visualise_ActCl.py | dHonerkamp/ActiveClassifier | 052675277153594db64261cd56699a057e633de2 | [
"Apache-2.0"
] | null | null | null | activeClassifier/visualisation/visualise_ActCl.py | dHonerkamp/ActiveClassifier | 052675277153594db64261cd56699a057e633de2 | [
"Apache-2.0"
] | null | null | null | import os
import numpy as np
import matplotlib
matplotlib.use('Agg')
from matplotlib import pyplot as plt
from matplotlib.patches import Rectangle
from activeClassifier.visualisation.base import Visualiser
def softmax(x):
"""Compute softmax values for each sets of scores in x."""
e_x = np.exp(x - np.max(x))
... | 51.276923 | 199 | 0.512751 |
acfbe611a8b7a542be0531c537e455a861071c58 | 8,208 | py | Python | dagmm/dagmm.py | gentaman/DAGMM | a9159cf253005119a1f1c5f17c53c2fbfcf9bd4d | [
"MIT"
] | null | null | null | dagmm/dagmm.py | gentaman/DAGMM | a9159cf253005119a1f1c5f17c53c2fbfcf9bd4d | [
"MIT"
] | null | null | null | dagmm/dagmm.py | gentaman/DAGMM | a9159cf253005119a1f1c5f17c53c2fbfcf9bd4d | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
from sklearn.preprocessing import StandardScaler
from sklearn.externals import joblib
from dagmm.compression_net import CompressionNet
from dagmm.estimation_net import EstimationNet
from dagmm.gmm import GMM
from os import makedirs
from os.path import exists, join
class DAG... | 34.2 | 88 | 0.588816 |
acfbe701601bd2b15edaa92de2c78c0a24498a5b | 3,128 | py | Python | learning_log/settings.py | albertomendess/django-learning-log | 53edc1932406da6585361f49e0662080eac7fdd8 | [
"MIT"
] | null | null | null | learning_log/settings.py | albertomendess/django-learning-log | 53edc1932406da6585361f49e0662080eac7fdd8 | [
"MIT"
] | null | null | null | learning_log/settings.py | albertomendess/django-learning-log | 53edc1932406da6585361f49e0662080eac7fdd8 | [
"MIT"
] | null | null | null | """
Django settings for learning_log project.
Generated by 'django-admin startproject' using Django 3.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pa... | 25.024 | 91 | 0.694373 |
acfbe721397195d5826ccec5e0e748fa6af2fee8 | 1,804 | py | Python | google-cloud-vision-v1p3beta1/synth.py | trambui09/google-cloud-ruby | 9c5f5fc27cbfbb4c4fc55d1171f450d1af3226aa | [
"Apache-2.0"
] | 8 | 2021-04-24T02:35:09.000Z | 2022-01-29T03:05:45.000Z | google-cloud-vision-v1p3beta1/synth.py | trambui09/google-cloud-ruby | 9c5f5fc27cbfbb4c4fc55d1171f450d1af3226aa | [
"Apache-2.0"
] | 1 | 2021-02-24T07:42:47.000Z | 2021-02-24T07:42:47.000Z | google-cloud-vision-v1p3beta1/synth.py | trambui09/google-cloud-ruby | 9c5f5fc27cbfbb4c4fc55d1171f450d1af3226aa | [
"Apache-2.0"
] | 2 | 2021-06-02T18:47:14.000Z | 2021-09-18T07:08:17.000Z | # 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, s... | 40.088889 | 263 | 0.742239 |
acfbe7b2db89055a10f369832dc177e88793364e | 54,671 | py | Python | tests/unit/test_tuner.py | AhmadShayeq/sagemaker-python-sdk | def1416ee3d5bdba3007dcebf9c1b58e10330c39 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_tuner.py | AhmadShayeq/sagemaker-python-sdk | def1416ee3d5bdba3007dcebf9c1b58e10330c39 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_tuner.py | AhmadShayeq/sagemaker-python-sdk | def1416ee3d5bdba3007dcebf9c1b58e10330c39 | [
"Apache-2.0"
] | null | null | null | # Copyright Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompan... | 35.944116 | 117 | 0.714126 |
acfbe88d5f80eca5919e0cef66813205d3741535 | 469 | py | Python | tests/test_mysql_cli.py | icy1900/MySQL-AutoXtraBackup | dfdf86ba4d1fe15a35cececa4934cb7f247e448f | [
"MIT"
] | 134 | 2015-04-17T15:05:13.000Z | 2022-01-06T20:51:37.000Z | tests/test_mysql_cli.py | icy1900/MySQL-AutoXtraBackup | dfdf86ba4d1fe15a35cececa4934cb7f247e448f | [
"MIT"
] | 316 | 2015-04-22T07:40:46.000Z | 2021-11-08T12:09:02.000Z | tests/test_mysql_cli.py | icy1900/MySQL-AutoXtraBackup | dfdf86ba4d1fe15a35cececa4934cb7f247e448f | [
"MIT"
] | 80 | 2015-04-30T19:25:24.000Z | 2021-11-09T10:32:54.000Z | class TestMySQLCLi:
def test_create_mysql_client_command(self, return_bck_obj):
result = '/usr/bin/mysql --defaults-file= -uroot --password=12345 --socket=/var/run/mysqld/mysqld.sock -e "select 1"'
sql = "select 1"
assert return_bck_obj.mysql_cli.create_mysql_client_command(sql) == result
... | 46.9 | 125 | 0.716418 |
acfbe8f0258fcf5103918eb85f861c5a1bf1b02c | 360 | py | Python | query-system-prototype/backend/initDB.py | jortner0210/ORNL-SULI-AI4HDR | e544e4ce242d362a2d3151855fefbb7253eca99e | [
"Unlicense"
] | null | null | null | query-system-prototype/backend/initDB.py | jortner0210/ORNL-SULI-AI4HDR | e544e4ce242d362a2d3151855fefbb7253eca99e | [
"Unlicense"
] | null | null | null | query-system-prototype/backend/initDB.py | jortner0210/ORNL-SULI-AI4HDR | e544e4ce242d362a2d3151855fefbb7253eca99e | [
"Unlicense"
] | null | null | null | import argparse
from Database import initDB
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('--db_loc', default="./", help="Desired location for database.")
parser.add_argument('--db_name', default="newDatabase", help="Name of database.")
args = parser.parse_args()
... | 24 | 88 | 0.702778 |
acfbe96103694ae6dc2ebf64f26064c855952da9 | 5,715 | py | Python | gamifiededucation/settings.py | wallysalami/gamified-education | 720a96c40f2cbd061979f86b8541b2f0b4b7cddd | [
"MIT"
] | 10 | 2018-07-04T18:21:00.000Z | 2021-12-25T07:41:12.000Z | gamifiededucation/settings.py | wallysalami/gamified-education | 720a96c40f2cbd061979f86b8541b2f0b4b7cddd | [
"MIT"
] | null | null | null | gamifiededucation/settings.py | wallysalami/gamified-education | 720a96c40f2cbd061979f86b8541b2f0b4b7cddd | [
"MIT"
] | 1 | 2021-09-06T17:57:53.000Z | 2021-09-06T17:57:53.000Z | """
Django settings for gamifiededucation project.
Generated by 'django-admin startproject' using Django 1.11.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
... | 32.288136 | 108 | 0.714086 |
acfbea74e67420975b7f4dce10862ebdc3684e17 | 3,353 | py | Python | siliconcompiler/tools/ghdl/ghdl.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | null | null | null | siliconcompiler/tools/ghdl/ghdl.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | null | null | null | siliconcompiler/tools/ghdl/ghdl.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | null | null | null | import os
import shutil
import siliconcompiler
#####################################################################
# Make Docs
#####################################################################
def make_docs():
'''
GHDL is an open-source analyzer, compiler, simulator and
(experimental) synthesizer fo... | 26.611111 | 79 | 0.560692 |
acfbea924a512dd49450278b437542a2f92cf0e4 | 1,225 | py | Python | lib/db/__init__.py | dmuth/twitter-sentiment-analysis | e8d5960f6cacfb2db0e4b30956e7cae422da8ffd | [
"Apache-2.0"
] | 2 | 2018-08-08T00:29:31.000Z | 2020-03-02T13:50:13.000Z | lib/db/__init__.py | dmuth/twitter-sentiment-analysis | e8d5960f6cacfb2db0e4b30956e7cae422da8ffd | [
"Apache-2.0"
] | 1 | 2021-06-01T22:23:37.000Z | 2021-06-01T22:23:37.000Z | lib/db/__init__.py | dmuth/twitter-sentiment-analysis | e8d5960f6cacfb2db0e4b30956e7cae422da8ffd | [
"Apache-2.0"
] | 1 | 2021-08-01T19:24:28.000Z | 2021-08-01T19:24:28.000Z | #
# This class is used as our database wrapper.
#
import sqlite3
class db():
conn = ""
def __init__(self):
#self.conn = sqlite3.connect("tweets.db")
self.conn = sqlite3.connect("tweets.db", 10)
# Autocommit
self.conn.isolation_level = None
def execute(self, query, args = None):
#
# Doing some ty... | 20.081967 | 84 | 0.656327 |
acfbeb183e8792ee7c057d2f7200e273f0a15bda | 348 | py | Python | symspellpy/__init__.py | clinia/symspellpy | 892f821a0f16220a21ca7adb695fe7b61db6e240 | [
"MIT"
] | 562 | 2018-08-14T06:41:00.000Z | 2022-03-31T08:20:37.000Z | symspellpy/__init__.py | clinia/symspellpy | 892f821a0f16220a21ca7adb695fe7b61db6e240 | [
"MIT"
] | 107 | 2018-08-17T03:16:20.000Z | 2022-03-09T16:17:56.000Z | symspellpy/__init__.py | clinia/symspellpy | 892f821a0f16220a21ca7adb695fe7b61db6e240 | [
"MIT"
] | 111 | 2018-08-15T07:48:33.000Z | 2022-01-31T17:42:01.000Z | """symspellpy
.. moduleauthor:: mmb L <mammothb@hotmail.com>
.. moduleauthor:: Wolf Garbe <wolf.garbe@faroo.com>
"""
from .__version__ import (__title__, __description__, __version__,
__author__, __author_email__, __license__)
from . import editdistance
from . import helpers
from .symspellpy... | 29 | 68 | 0.721264 |
acfbec73f26a2e82cc148183cf9db60d40afa3f1 | 34,264 | py | Python | reagent/types.py | wall-ed-coder/ReAgent | 14d9906d74f943e74c6a6f95d129e18741168f9c | [
"BSD-3-Clause"
] | null | null | null | reagent/types.py | wall-ed-coder/ReAgent | 14d9906d74f943e74c6a6f95d129e18741168f9c | [
"BSD-3-Clause"
] | null | null | null | reagent/types.py | wall-ed-coder/ReAgent | 14d9906d74f943e74c6a6f95d129e18741168f9c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import dataclasses
import logging
# The dataclasses in this file should be vanilla dataclass to have minimal overhead
from dataclasses import dataclass, field
from typing import Dict, List, NamedTuple, Optional, Tuple, Unio... | 35.654527 | 91 | 0.648377 |
acfbec8fe78fa3fc2c9a168211d935ec003c2328 | 2,227 | py | Python | util/loader/pre_process.py | wm-bupt/STSN-for-oracle-recognition | f220aec0ba93d48231a228001f2c380c72304d06 | [
"Apache-2.0"
] | null | null | null | util/loader/pre_process.py | wm-bupt/STSN-for-oracle-recognition | f220aec0ba93d48231a228001f2c380c72304d06 | [
"Apache-2.0"
] | null | null | null | util/loader/pre_process.py | wm-bupt/STSN-for-oracle-recognition | f220aec0ba93d48231a228001f2c380c72304d06 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from torchvision import transforms
import os
from PIL import Image, ImageOps
import numbers
import torch, random, math
class ResizeImage():
def __init__(self, size):
if isinstance(size, int):
self.size = (int(size), int(size))
else:
self.size = size
d... | 30.094595 | 92 | 0.570274 |
acfbecd1c918694f02dfc0740d073178fbf31db9 | 17,074 | py | Python | portal/migrations/0022_auto__add_mediafile__add_field_mediaitem_media_files.py | dragetd/LambdaCast | a8227d8d19a2fdb1ff1d5e8ad7366d60a1e253f7 | [
"BSD-2-Clause"
] | 6 | 2015-04-05T01:28:23.000Z | 2022-02-06T17:29:47.000Z | portal/migrations/0022_auto__add_mediafile__add_field_mediaitem_media_files.py | dragetd/LambdaCast | a8227d8d19a2fdb1ff1d5e8ad7366d60a1e253f7 | [
"BSD-2-Clause"
] | 2 | 2022-01-05T23:07:10.000Z | 2022-03-30T17:52:45.000Z | portal/migrations/0022_auto__add_mediafile__add_field_mediaitem_media_files.py | dragetd/LambdaCast | a8227d8d19a2fdb1ff1d5e8ad7366d60a1e253f7 | [
"BSD-2-Clause"
] | 2 | 2022-02-06T17:29:53.000Z | 2022-02-26T17:23:09.000Z | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'MediaFile'
db.create_table('portal_mediafile', (
('id', self.gf('django.db.models... | 79.046296 | 242 | 0.565597 |
acfbed6b3d6c128a74f3aace6bcb71206adb40df | 2,623 | py | Python | pyhermes/publisher.py | romcheg/pyhermes | c4d3af0b0fd02353ecc0937a409ef860d5c5c4d2 | [
"Apache-2.0"
] | 5 | 2016-04-14T15:32:16.000Z | 2016-04-21T05:51:32.000Z | pyhermes/publisher.py | romcheg/pyhermes | c4d3af0b0fd02353ecc0937a409ef860d5c5c4d2 | [
"Apache-2.0"
] | 1 | 2016-06-06T08:54:30.000Z | 2016-06-06T09:41:15.000Z | pyhermes/publisher.py | romcheg/pyhermes | c4d3af0b0fd02353ecc0937a409ef860d5c5c4d2 | [
"Apache-2.0"
] | 1 | 2016-04-20T05:47:01.000Z | 2016-04-20T05:47:01.000Z | import json
import logging
import requests
from requests.exceptions import ConnectionError, HTTPError, Timeout
from pyhermes.exceptions import HermesPublishException
from pyhermes.settings import HERMES_SETTINGS
logger = logging.getLogger(__name__)
HERMES_VALID_RESPONSE_CODES = {201, 202}
def _strip_topic_group(t... | 27.904255 | 91 | 0.6565 |
acfbed85d03023bd9875d6e09c8fb1a3784cb3fa | 4,948 | py | Python | app.py | brunodoamaral/clip-search | cf03b739fe4fc1c71466571a67244f23799709b3 | [
"MIT"
] | 8 | 2021-12-30T02:18:53.000Z | 2022-02-13T18:57:59.000Z | app.py | brunodoamaral/clip-search | cf03b739fe4fc1c71466571a67244f23799709b3 | [
"MIT"
] | 1 | 2021-09-23T02:12:41.000Z | 2021-09-23T02:12:41.000Z | app.py | brunodoamaral/clip-search | cf03b739fe4fc1c71466571a67244f23799709b3 | [
"MIT"
] | null | null | null | # coding: utf-8
import argparse
from pathlib import Path, PurePosixPath
import numpy as np
from flask import Flask, Response, jsonify, request, send_from_directory
from PIL import Image
from indexer import ImagesIndexer
import requests
IMAGES_PREFIX_URL = PurePosixPath('/images')
THUMBS_PREFIX_URL = PurePosixPath('/... | 32.552632 | 141 | 0.625909 |
acfbedc48edc2d837984db6481d752e16d339dd9 | 430 | py | Python | invenio_rdm_records/version.py | Pineirin/invenio-rdm-records | 629f05186645679f3ee347e418af9fe417fbfa8a | [
"MIT"
] | null | null | null | invenio_rdm_records/version.py | Pineirin/invenio-rdm-records | 629f05186645679f3ee347e418af9fe417fbfa8a | [
"MIT"
] | null | null | null | invenio_rdm_records/version.py | Pineirin/invenio-rdm-records | 629f05186645679f3ee347e418af9fe417fbfa8a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019-2021 CERN.
# Copyright (C) 2019-2021 Northwestern University.
#
# Invenio-RDM-Records is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
"""Version information for Invenio-RDM-Records.
This ... | 26.875 | 77 | 0.72093 |
acfbee1a044650fd78591094253dd3ffd4bba7a7 | 13,967 | py | Python | market_maker/ws/ws_thread.py | hh2010/sample-market-maker | 7c5404c531ae51bbffff6f2b90f1e2704e89bb22 | [
"Apache-2.0"
] | null | null | null | market_maker/ws/ws_thread.py | hh2010/sample-market-maker | 7c5404c531ae51bbffff6f2b90f1e2704e89bb22 | [
"Apache-2.0"
] | null | null | null | market_maker/ws/ws_thread.py | hh2010/sample-market-maker | 7c5404c531ae51bbffff6f2b90f1e2704e89bb22 | [
"Apache-2.0"
] | null | null | null | import sys
import websocket
import threading
import traceback
import ssl
from time import sleep
import time
import json
import decimal
import datetime as dt
import logging
from market_maker.settings import settings
from market_maker.auth.APIKeyAuth import generate_expires, generate_signature
from market_maker.utils.log... | 39.678977 | 119 | 0.567337 |
acfbee2d1238888c99502d14b79be9a64f8eb00b | 1,114 | py | Python | setup.py | Otartist/disrank2 | ff556f2c7496cae7cae303576da14c5242ef748f | [
"MIT"
] | null | null | null | setup.py | Otartist/disrank2 | ff556f2c7496cae7cae303576da14c5242ef748f | [
"MIT"
] | 1 | 2022-01-02T11:37:17.000Z | 2022-01-02T11:37:17.000Z | setup.py | Otartist/disrank2 | ff556f2c7496cae7cae303576da14c5242ef748f | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
# See note below for more information about classifiers
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Education",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Operating System ::... | 35.935484 | 149 | 0.695691 |
acfbeeab409a45670d980aa68730fc8940baa44b | 3,729 | py | Python | tutorials/Tutorial4_FAQ_style_QA.py | dertilo/haystack | b674325d28ddc0c4d0f976ed746f45c5bd51d687 | [
"Apache-2.0"
] | 3 | 2021-06-16T15:49:57.000Z | 2021-09-01T16:52:15.000Z | tutorials/Tutorial4_FAQ_style_QA.py | dertilo/haystack | b674325d28ddc0c4d0f976ed746f45c5bd51d687 | [
"Apache-2.0"
] | null | null | null | tutorials/Tutorial4_FAQ_style_QA.py | dertilo/haystack | b674325d28ddc0c4d0f976ed746f45c5bd51d687 | [
"Apache-2.0"
] | null | null | null | from haystack import Finder
from haystack.database.elasticsearch import ElasticsearchDocumentStore
from haystack.retriever.dense import EmbeddingRetriever
from haystack.utils import print_answers
import pandas as pd
import requests
import logging
import subprocess
import time
## "FAQ-Style QA": Utilizing existing FAQs... | 46.037037 | 194 | 0.727809 |
acfbef7a437d4ccfb05dfd5d204b2f8c8c4df8d0 | 3,547 | py | Python | bootstrap/bootstrap.py | annefou/the-littlest-jupyterhub | 25cfdc5fa5d8c5a567282f32372d22fa4dedb5d2 | [
"BSD-3-Clause"
] | null | null | null | bootstrap/bootstrap.py | annefou/the-littlest-jupyterhub | 25cfdc5fa5d8c5a567282f32372d22fa4dedb5d2 | [
"BSD-3-Clause"
] | null | null | null | bootstrap/bootstrap.py | annefou/the-littlest-jupyterhub | 25cfdc5fa5d8c5a567282f32372d22fa4dedb5d2 | [
"BSD-3-Clause"
] | null | null | null | """
Bootstrap an installation of TLJH.
Sets up just enough TLJH environments to invoke tljh.installer.
This script is run as:
curl <script-url> | sudo python3 -
Constraints:
- Entire script should be compatible with Python 3.6 (We run on Ubuntu 18.04+)
- Script should parse in Python 3.4 (since we exit with... | 32.842593 | 117 | 0.657175 |
acfbf089dd6d2819bf01bc3a4e99377029184c6c | 3,985 | py | Python | ambari-server/src/main/resources/common-services/REGISTRY/0.3.0/package/scripts/service_check.py | zyclove/ambari | 1032f0f54cb7b312b9a3b37570cd840f4e1e89d4 | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/common-services/REGISTRY/0.3.0/package/scripts/service_check.py | zyclove/ambari | 1032f0f54cb7b312b9a3b37570cd840f4e1e89d4 | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/common-services/REGISTRY/0.3.0/package/scripts/service_check.py | zyclove/ambari | 1032f0f54cb7b312b9a3b37570cd840f4e1e89d4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python2
"""
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"); yo... | 44.277778 | 150 | 0.693099 |
acfbf189d841f322a497c7dcb48a93420948f031 | 169 | py | Python | imageArgu.py | openhack-Doggy/machine-learning | 75fd78b04e4d67d9fa297e8d75e532d9c96f74a0 | [
"MIT"
] | null | null | null | imageArgu.py | openhack-Doggy/machine-learning | 75fd78b04e4d67d9fa297e8d75e532d9c96f74a0 | [
"MIT"
] | null | null | null | imageArgu.py | openhack-Doggy/machine-learning | 75fd78b04e4d67d9fa297e8d75e532d9c96f74a0 | [
"MIT"
] | null | null | null | from PIL import Image
image = Image.open("/Users/hangeulbae/Desktop/test.jpeg")
newImage = image.resize((300, 300))
newImage.save("/Users/hangeulbae/Desktop/test2.png")
| 33.8 | 57 | 0.763314 |
acfbf1dd6a9363a304d204ce3680b9b3637d5df1 | 7,697 | py | Python | custom_components/uhomeuponor/climate.py | dave-code-ruiz/uhomeuponor | 610b6ff094e4d1f180a01aa4f4b9279a4ebe25e4 | [
"MIT"
] | 8 | 2020-02-10T18:57:50.000Z | 2022-01-19T11:48:14.000Z | custom_components/uhomeuponor/climate.py | dave-code-ruiz/uhomeuponor | 610b6ff094e4d1f180a01aa4f4b9279a4ebe25e4 | [
"MIT"
] | 16 | 2020-01-31T17:40:34.000Z | 2021-04-15T07:28:38.000Z | custom_components/uhomeuponor/climate.py | dave-code-ruiz/uhomeuponor | 610b6ff094e4d1f180a01aa4f4b9279a4ebe25e4 | [
"MIT"
] | 4 | 2020-06-03T14:26:51.000Z | 2021-04-26T21:45:47.000Z | """Uponor U@Home integration
Exposes Climate control entities for Uponor thermostats
- UponorThermostat
"""
import voluptuous as vol
from requests.exceptions import RequestException
from homeassistant.exceptions import PlatformNotReady
from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateEntity
from... | 32.476793 | 141 | 0.692737 |
acfbf2f18f94b9d809dbc94527e683dc655f0966 | 1,447 | py | Python | pydispix/log.py | ItsDrike/pydispix | a1696295e6860c2240730405c1b93b05a7bf2564 | [
"MIT"
] | 3 | 2021-05-27T19:23:46.000Z | 2021-06-10T01:55:14.000Z | pydispix/log.py | ItsDrike/pydispix | a1696295e6860c2240730405c1b93b05a7bf2564 | [
"MIT"
] | null | null | null | pydispix/log.py | ItsDrike/pydispix | a1696295e6860c2240730405c1b93b05a7bf2564 | [
"MIT"
] | 1 | 2021-05-27T19:24:43.000Z | 2021-05-27T19:24:43.000Z | import logging
import os
import sys
import colorama
class ColoredFormatter(logging.Formatter):
COLORS = {
"WARNING": colorama.Fore.YELLOW,
"INFO": colorama.Fore.WHITE,
"DEBUG": colorama.Fore.BLUE,
"CRITICAL": f"{colorama.Style.BRIGHT}{colorama.Fore.RED}",
"ERROR": f"{color... | 33.651163 | 82 | 0.666206 |
acfbf41147fca21a391f75ad1af1ffbc6f420da7 | 8,689 | py | Python | src/mem/XBar.py | mzwang25/gem5-copy | e122d15e57b8fcc153d6942bcd6518f75fe191a1 | [
"BSD-3-Clause"
] | null | null | null | src/mem/XBar.py | mzwang25/gem5-copy | e122d15e57b8fcc153d6942bcd6518f75fe191a1 | [
"BSD-3-Clause"
] | null | null | null | src/mem/XBar.py | mzwang25/gem5-copy | e122d15e57b8fcc153d6942bcd6518f75fe191a1 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2012, 2015, 2017, 2019 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of ... | 42.385366 | 78 | 0.737714 |
acfbf41dbc1527dd427b5c6406b885ca923d64a9 | 4,734 | py | Python | src/Relation_batch.py | weiyi1991/UA_Concurrent | 11238c778c60095abf326800d6e6a13a643bf071 | [
"MIT"
] | null | null | null | src/Relation_batch.py | weiyi1991/UA_Concurrent | 11238c778c60095abf326800d6e6a13a643bf071 | [
"MIT"
] | 1 | 2020-09-02T12:24:59.000Z | 2020-09-02T12:24:59.000Z | src/Relation_batch.py | weiyi1991/UA_Concurrent | 11238c778c60095abf326800d6e6a13a643bf071 | [
"MIT"
] | null | null | null | '''
Relation modules:
Spatial Relation Module - Relation Module
Relation Unit of Spatial Relation Module for atom/class level features - RelationUnit
Temporal Relation Module - TemporalRelation
'''
import torch
import torch.nn as nn
from torch.autograd import Variable
import numpy as np
from tor... | 40.810345 | 138 | 0.592945 |
acfbf58ab0e0b23d0983edc8e14f398dadbd51a8 | 5,527 | py | Python | 11B-124/pipeline5.0.0/EVLA_pipe_priorcals.py | Astroua/LocalGroup-VLA | 4920341c9e25343d724fb4a2e37cdcd234201047 | [
"MIT"
] | 1 | 2019-04-11T00:37:56.000Z | 2019-04-11T00:37:56.000Z | 12A-304/pipeline5.0.0/EVLA_pipe_priorcals.py | Astroua/LocalGroup-VLA | 4920341c9e25343d724fb4a2e37cdcd234201047 | [
"MIT"
] | null | null | null | 12A-304/pipeline5.0.0/EVLA_pipe_priorcals.py | Astroua/LocalGroup-VLA | 4920341c9e25343d724fb4a2e37cdcd234201047 | [
"MIT"
] | null | null | null | ######################################################################
#
# Copyright (C) 2013
# Associated Universities, Inc. Washington DC, USA,
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Library General Public License as published by
# the Free Software Fo... | 27.226601 | 98 | 0.643749 |
acfbf6440baccae75c6e36288683473b1573dc65 | 917 | py | Python | examples/progress.py | timgates42/pyvips | 346e60ff3ab34ae9a36c980a6a3a139346f757ba | [
"MIT"
] | 142 | 2017-08-01T12:33:20.000Z | 2018-09-15T16:50:32.000Z | examples/progress.py | timgates42/pyvips | 346e60ff3ab34ae9a36c980a6a3a139346f757ba | [
"MIT"
] | 62 | 2017-08-01T16:22:09.000Z | 2018-09-20T08:00:40.000Z | examples/progress.py | timgates42/pyvips | 346e60ff3ab34ae9a36c980a6a3a139346f757ba | [
"MIT"
] | 15 | 2017-08-04T09:51:29.000Z | 2018-08-25T18:42:49.000Z | #!/usr/bin/env python
from __future__ import print_function
import pyvips
def progress_print(name, progress):
print('{}:'.format(name))
print(' run = {}'.format(progress.run))
print(' eta = {}'.format(progress.eta))
print(' tpels = {}'.format(progress.tpels))
print(' npels = {}'.format(p... | 23.512821 | 53 | 0.690294 |
acfbf6cd34be566d5c03af3e954e04a694f90b46 | 2,046 | py | Python | processing/reconbench/ply2npz.py | raphaelsulzer/dgnn | 08ef076e80ea38daf000ac2be6771363d6d4ea9a | [
"MIT"
] | 18 | 2021-11-22T19:22:04.000Z | 2022-03-22T03:41:04.000Z | processing/reconbench/ply2npz.py | raphaelsulzer/dgnn | 08ef076e80ea38daf000ac2be6771363d6d4ea9a | [
"MIT"
] | 4 | 2022-01-14T14:35:20.000Z | 2022-03-28T16:38:59.000Z | processing/reconbench/ply2npz.py | raphaelsulzer/dgnn | 08ef076e80ea38daf000ac2be6771363d6d4ea9a | [
"MIT"
] | 2 | 2021-12-20T05:59:37.000Z | 2022-02-16T04:50:03.000Z | import argparse
import trimesh
import os
import numpy as np
def main(args):
sfile = os.path.join(args.user_dir,args.data_dir,"scans","with_sensor",args.model+"_"+args.scan_conf+".ply")
nfile = os.path.join(args.user_dir,args.data_dir,"scans","with_normals",args.model+"_"+args.scan_conf+".ply")
pc = tri... | 33.540984 | 113 | 0.645161 |
acfbf84e980c486e9a7f3fd7767108af479dfaa7 | 6,102 | py | Python | ogbot/config.py | winiciuscota/ogame-bot | ec788c81e8512e7f017fea033cc2567a3d04563d | [
"MIT"
] | 14 | 2016-01-26T19:19:11.000Z | 2020-04-05T19:42:39.000Z | ogbot/config.py | winiciuscota/ogame-bot | ec788c81e8512e7f017fea033cc2567a3d04563d | [
"MIT"
] | 23 | 2016-01-26T21:57:06.000Z | 2021-06-25T15:16:23.000Z | ogbot/config.py | winiciuscota/ogame-bot | ec788c81e8512e7f017fea033cc2567a3d04563d | [
"MIT"
] | 17 | 2016-01-26T19:26:36.000Z | 2021-06-16T11:10:15.000Z | import ConfigParser
import logging
import os
import re
class Config(object):
def __init__(self, args):
config = ConfigParser.ConfigParser()
current_file = os.path.abspath(os.path.dirname(__file__))
path = os.path.join(current_file, '../')
os.chdir(path)
cfg = config.read('... | 50.429752 | 134 | 0.610456 |
acfbf851205d78dbd2a98d86331d92441b458904 | 4,726 | py | Python | framework/utils.py | saan5/chromium-dashboard | a9650cd3a2d58bee819ae218051eeb0f3e657190 | [
"Apache-2.0"
] | 2 | 2021-06-19T14:59:53.000Z | 2021-09-18T14:45:59.000Z | framework/utils.py | saan5/chromium-dashboard | a9650cd3a2d58bee819ae218051eeb0f3e657190 | [
"Apache-2.0"
] | null | null | null | framework/utils.py | saan5/chromium-dashboard | a9650cd3a2d58bee819ae218051eeb0f3e657190 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2021 Google Inc.
#
# 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... | 30.490323 | 74 | 0.634998 |
acfbf8f177a06075fceb484ac2a77f33d344d811 | 2,385 | py | Python | tf2onnx/tflite/VarHandleOptions.py | LoicDagnas/tensorflow-onnx | 6691850e79047d05d85017573170fd8240393b57 | [
"Apache-2.0"
] | 1,473 | 2018-03-16T02:47:33.000Z | 2022-03-31T03:43:52.000Z | tf2onnx/tflite/VarHandleOptions.py | LoicDagnas/tensorflow-onnx | 6691850e79047d05d85017573170fd8240393b57 | [
"Apache-2.0"
] | 1,208 | 2018-03-14T09:58:49.000Z | 2022-03-31T17:56:20.000Z | tf2onnx/tflite/VarHandleOptions.py | LoicDagnas/tensorflow-onnx | 6691850e79047d05d85017573170fd8240393b57 | [
"Apache-2.0"
] | 350 | 2018-04-03T03:48:40.000Z | 2022-03-30T11:23:55.000Z | # SPDX-License-Identifier: Apache-2.0
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: tflite
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class VarHandleOptions(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, off... | 38.467742 | 141 | 0.721593 |
acfbf91315ae8fa759e47178ec90f3b7a692cd5c | 7,881 | py | Python | warp/utils/config_parsing.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | warp/utils/config_parsing.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | warp/utils/config_parsing.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | # std
import datetime
from copy import deepcopy
from collections import deque
import yaml
# from .lazy_loader import LazyLoader as LL
# yaml = LL('yaml', globals(), 'yaml')
# json = LL('json', globals(), 'json')
# types
from typing import Dict, Any, Union, Tuple
__all__ = [
'load_config_file',
'save_config... | 31.398406 | 112 | 0.597005 |
acfbf96e3737bbd3f7b9e06148aad76db16bbd19 | 11,880 | py | Python | bot/utils/teams.py | fossabot/atlantisbot | 4acda63be226079c740595d4b9c20f2a64cb9e2a | [
"MIT"
] | null | null | null | bot/utils/teams.py | fossabot/atlantisbot | 4acda63be226079c740595d4b9c20f2a64cb9e2a | [
"MIT"
] | null | null | null | bot/utils/teams.py | fossabot/atlantisbot | 4acda63be226079c740595d4b9c20f2a64cb9e2a | [
"MIT"
] | null | null | null | from typing import Union, Tuple
import traceback
import discord
from bot.orm.models import Team, Player, BotMessage, User
from bot.utils.tools import has_any_role, separator
class TeamNotFoundError(Exception):
pass
class WrongChannelError(Exception):
pass
def secondary_full(team: Team, session) -> Tuple... | 44.661654 | 119 | 0.597559 |
acfbf9fb4536bb1080f9ac954a35233f2410af53 | 6,171 | py | Python | bin/anthology/volumes.py | tdopierre/acl-anthology | 8eed8a3fb0afa68ff2b6580626ee7c66de29694e | [
"Apache-2.0"
] | 221 | 2017-06-05T04:44:41.000Z | 2022-02-11T20:23:31.000Z | bin/anthology/volumes.py | tdopierre/acl-anthology | 8eed8a3fb0afa68ff2b6580626ee7c66de29694e | [
"Apache-2.0"
] | 1,498 | 2017-08-09T13:41:49.000Z | 2022-03-31T02:56:58.000Z | bin/anthology/volumes.py | tdopierre/acl-anthology | 8eed8a3fb0afa68ff2b6580626ee7c66de29694e | [
"Apache-2.0"
] | 183 | 2017-10-28T00:56:49.000Z | 2022-03-14T14:55:00.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2019 Marcel Bollmann <marcel@bollmann.me>
#
# 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 r... | 32.650794 | 103 | 0.627127 |
acfbfa2616435e31d3127058b16f20c017d6cc8d | 1,335 | py | Python | csrmesh-hue-bridge.py | gorgiea/csrmesh-hue-bridge | 173492a7135dd1bd2e255c7db6880e9fda8bed7e | [
"MIT"
] | 3 | 2017-04-19T02:42:18.000Z | 2019-01-10T05:44:22.000Z | csrmesh-hue-bridge.py | gorgiea/csrmesh-hue-bridge | 173492a7135dd1bd2e255c7db6880e9fda8bed7e | [
"MIT"
] | 2 | 2017-03-26T15:08:55.000Z | 2017-03-26T15:10:01.000Z | csrmesh-hue-bridge.py | gorgiea/csrmesh-hue-bridge | 173492a7135dd1bd2e255c7db6880e9fda8bed7e | [
"MIT"
] | 1 | 2018-02-23T04:27:48.000Z | 2018-02-23T04:27:48.000Z | from __future__ import absolute_import, division, print_function
import argparse
import csrmesh as cm
from time import sleep
from phue import Bridge
from settings import *
import traceback
def read_bulb_state():
state = None
try:
b = Bridge(HUE_BRIGE_IP)
# If the app is not registered and the... | 29.021739 | 147 | 0.606742 |
acfbfbd6159fc2307e3afb5736ecebbdf6892884 | 5,623 | py | Python | draw/draw_graph.py | kochigami/statistical_data_analysis | 86ddcca3d48bcc70de6d3bd1e133b3619084e032 | [
"MIT"
] | 1 | 2018-05-19T23:07:54.000Z | 2018-05-19T23:07:54.000Z | draw/draw_graph.py | kochigami/statistical_data_analysis | 86ddcca3d48bcc70de6d3bd1e133b3619084e032 | [
"MIT"
] | 18 | 2018-03-19T02:35:15.000Z | 2022-03-22T06:08:43.000Z | draw/draw_graph.py | kochigami/statistical_data_analysis | 86ddcca3d48bcc70de6d3bd1e133b3619084e032 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import math
import numpy as np
class DrawGraph:
"""
displaying bar graph which contains average data per sample group
if test_mode is paired, data is like this.
data = {'Crispy': [65, 85, 75, 85, 75, 80, 90, 75, 85, 65,... | 36.993421 | 128 | 0.524809 |
acfbfc88f5b354836d0ed4a6139df765e32672f2 | 16,391 | py | Python | monai/networks/nets/resnet.py | IntroAI-termproject/MONAI | b9e0cca17241318e570021b258b181a15d567603 | [
"Apache-2.0"
] | null | null | null | monai/networks/nets/resnet.py | IntroAI-termproject/MONAI | b9e0cca17241318e570021b258b181a15d567603 | [
"Apache-2.0"
] | null | null | null | monai/networks/nets/resnet.py | IntroAI-termproject/MONAI | b9e0cca17241318e570021b258b181a15d567603 | [
"Apache-2.0"
] | 1 | 2021-11-14T06:54:44.000Z | 2021-11-14T06:54:44.000Z | # Copyright 2020 - 2021 MONAI Consortium
# 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 wri... | 39.783981 | 122 | 0.643158 |
acfbfdc0cdf24859f045e8f176faf51fdf88448d | 655 | py | Python | plugins/keepkey/cmdline.py | schancel/electrum | ee125e0723a9345757b741aed93be906af80d327 | [
"MIT"
] | 1 | 2020-05-24T08:50:13.000Z | 2020-05-24T08:50:13.000Z | plugins/keepkey/cmdline.py | Santobak/electrum | ee125e0723a9345757b741aed93be906af80d327 | [
"MIT"
] | null | null | null | plugins/keepkey/cmdline.py | Santobak/electrum | ee125e0723a9345757b741aed93be906af80d327 | [
"MIT"
] | 1 | 2017-12-22T03:57:04.000Z | 2017-12-22T03:57:04.000Z | from keepkey import KeepKeyPlugin
from electroncash.util import print_msg
class KeepKeyCmdLineHandler:
def get_passphrase(self, msg, confirm):
import getpass
print_msg(msg)
return getpass.getpass('')
def get_pin(self, msg):
t = { 'a':'7', 'b':'8', 'c':'9', 'd':'4', 'e':'5', 'f... | 25.192308 | 94 | 0.564885 |
acfbfe73455d7ec9f5a8e78a7b8ec8722804b936 | 472 | py | Python | pycon/finaid/migrations/0009_auto_20150917_1629.py | azkarmoulana/pycon | 931388e6f640c35b892bb4b2d12581ba7ec8cf4e | [
"BSD-3-Clause"
] | 154 | 2015-01-17T02:29:24.000Z | 2022-03-20T20:37:24.000Z | pycon/finaid/migrations/0009_auto_20150917_1629.py | azkarmoulana/pycon | 931388e6f640c35b892bb4b2d12581ba7ec8cf4e | [
"BSD-3-Clause"
] | 316 | 2015-01-10T04:01:50.000Z | 2020-09-30T20:18:08.000Z | pycon/finaid/migrations/0009_auto_20150917_1629.py | azkarmoulana/pycon | 931388e6f640c35b892bb4b2d12581ba7ec8cf4e | [
"BSD-3-Clause"
] | 89 | 2015-01-10T05:25:21.000Z | 2022-02-27T03:28:59.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import pycon.finaid.models
class Migration(migrations.Migration):
dependencies = [
('finaid', '0008_auto_20150916_0848'),
]
operations = [
migrations.AlterField(
model_na... | 22.47619 | 86 | 0.648305 |
acfbfea1721edc59b3c95c63c524fd4e4f6176ae | 4,344 | py | Python | oneflow/python/ops/__init__.py | xxg1413/oneflow | f2e3c85a25b8aecfb6c0c0af1737833b1a77e135 | [
"Apache-2.0"
] | 1 | 2020-12-04T03:06:16.000Z | 2020-12-04T03:06:16.000Z | oneflow/python/ops/__init__.py | xxg1413/oneflow | f2e3c85a25b8aecfb6c0c0af1737833b1a77e135 | [
"Apache-2.0"
] | null | null | null | oneflow/python/ops/__init__.py | xxg1413/oneflow | f2e3c85a25b8aecfb6c0c0af1737833b1a77e135 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 38.105263 | 81 | 0.78407 |
acfbfebc2881b0405fbd8b6108decd989674e692 | 11,207 | py | Python | lib/pavilion/legacy/schedulers/moabjobcontroller.py | not-pflarr/Pavilion | 9ae90eed6993af5d16d475ee8934df1488fb6103 | [
"BSD-3-Clause"
] | null | null | null | lib/pavilion/legacy/schedulers/moabjobcontroller.py | not-pflarr/Pavilion | 9ae90eed6993af5d16d475ee8934df1488fb6103 | [
"BSD-3-Clause"
] | null | null | null | lib/pavilion/legacy/schedulers/moabjobcontroller.py | not-pflarr/Pavilion | 9ae90eed6993af5d16d475ee8934df1488fb6103 | [
"BSD-3-Clause"
] | null | null | null | #!python
# ###################################################################
#
# Disclaimer and Notice of Copyright
# ==================================
#
# Copyright (c) 2015, Los Alamos National Security, LLC
# All rights reserved.
#
# Copyright 2015. Los Alamos National Security, LLC.
# This software wa... | 40.31295 | 100 | 0.590256 |
acfbff7386efd25e8da4b6e7f576164b8f7c658a | 395 | py | Python | exp/type_check/metadata/typing_types_extractor.py | mir-am/typilus | d2c126f178c02cfcef9b0ce652c4b019c2462e09 | [
"MIT"
] | 39 | 2020-04-16T05:14:53.000Z | 2022-01-12T12:50:07.000Z | exp/type_check/metadata/typing_types_extractor.py | fwangdo/typilus | 69c377b4cd286fd3657708accf3b2f56a5da1e8d | [
"MIT"
] | 6 | 2020-11-26T18:21:03.000Z | 2021-05-25T09:04:14.000Z | exp/type_check/metadata/typing_types_extractor.py | fwangdo/typilus | 69c377b4cd286fd3657708accf3b2f56a5da1e8d | [
"MIT"
] | 12 | 2020-04-25T19:12:46.000Z | 2022-02-17T08:49:24.000Z | #!/usr/bin/env python3
from bs4 import BeautifulSoup
import requests
def main():
url = "https://docs.python.org/3/library/typing.html"
response = requests.get(url)
soup = BeautifulSoup(response.text, "html.parser")
for dt in soup.find_all("dt"):
mem = dt["id"].split(".")[1]
if mem[0]... | 19.75 | 57 | 0.607595 |
acfbff76fbf01eca5ae4d08ea9208d19e264a554 | 22,584 | py | Python | objectModel/Python/tests/cdm/projection/test_projection_add_type.py | CBA-Consult/CDM | 892bceac7a15167c85342cc1c61d7ecdf5f1b78d | [
"CC-BY-4.0",
"MIT"
] | null | null | null | objectModel/Python/tests/cdm/projection/test_projection_add_type.py | CBA-Consult/CDM | 892bceac7a15167c85342cc1c61d7ecdf5f1b78d | [
"CC-BY-4.0",
"MIT"
] | null | null | null | objectModel/Python/tests/cdm/projection/test_projection_add_type.py | CBA-Consult/CDM | 892bceac7a15167c85342cc1c61d7ecdf5f1b78d | [
"CC-BY-4.0",
"MIT"
] | 1 | 2021-09-24T16:51:04.000Z | 2021-09-24T16:51:04.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
import os
import unittest
from cdm.enums import CdmObjectType
from cdm.storage import LocalAdapter
from cdm.utilities import ResolveOptions, AttributeResolutionDir... | 60.546917 | 162 | 0.735299 |
acfc011d5de0d242ca920b7a270d372ab3f75e89 | 405 | py | Python | echo/__init__.py | AshleyLab/lvh-fusion | 5a7c22d2236345ba67c8ed5f9c4dc720b49936fb | [
"MIT"
] | null | null | null | echo/__init__.py | AshleyLab/lvh-fusion | 5a7c22d2236345ba67c8ed5f9c4dc720b49936fb | [
"MIT"
] | null | null | null | echo/__init__.py | AshleyLab/lvh-fusion | 5a7c22d2236345ba67c8ed5f9c4dc720b49936fb | [
"MIT"
] | null | null | null | """
The lvh-fusion package contains code for loading echocardiogram videos, and
functions for training and testing for hcm, htn, and athletes for
prediction models.
"""
from hha.__version__ import __version__
from hha.config import CONFIG as config
import hha.datasets as datasets
import hha.utils as utils
import hha.... | 27 | 75 | 0.777778 |
acfc01fc0e0695d4775ee8f589c95f7494a39c23 | 4,470 | py | Python | contrib/seeds/generate-seeds.py | dgarage/bc3 | b38c9fd8cb96ad8ecfe3ffb734d0d71764967638 | [
"MIT"
] | 11 | 2017-01-10T02:48:57.000Z | 2017-07-31T03:29:21.000Z | contrib/seeds/generate-seeds.py | dgarage/bc3 | b38c9fd8cb96ad8ecfe3ffb734d0d71764967638 | [
"MIT"
] | null | null | null | contrib/seeds/generate-seeds.py | dgarage/bc3 | b38c9fd8cb96ad8ecfe3ffb734d0d71764967638 | [
"MIT"
] | 8 | 2017-02-02T09:28:15.000Z | 2017-08-03T00:28:03.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2017 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the dir... | 31.478873 | 98 | 0.580089 |
acfc02d83c11d92b6f3a700217895ed60a301e3b | 4,074 | py | Python | easy/Problem3.py | Pawan459/infytq-dsa-day7 | 8625c37b863e2594e9e200a464a08e9ab38a67ef | [
"MIT"
] | null | null | null | easy/Problem3.py | Pawan459/infytq-dsa-day7 | 8625c37b863e2594e9e200a464a08e9ab38a67ef | [
"MIT"
] | null | null | null | easy/Problem3.py | Pawan459/infytq-dsa-day7 | 8625c37b863e2594e9e200a464a08e9ab38a67ef | [
"MIT"
] | null | null | null | # A bank wants to maintain the list of its customers.
# Write a python program to implement the class diagram given below:
# Customer
# - name
# - account_balance
# __init__(name, account_balance)
# + get_name()
# + get_account_balance()
# __str__()
# --------<>
# Bank
# - bank_name
# - customer_list
# __init__(bank_... | 27.90411 | 91 | 0.571183 |
acfc0300375be32892ba16e2f5284217d47e24a1 | 8,998 | py | Python | 04_recognize/configs/biglm/gen_configs.py | phsmit/iwclul2016-scripts | 20ead4c7492241ec19dec88fe86065a273c66af6 | [
"BSD-3-Clause"
] | null | null | null | 04_recognize/configs/biglm/gen_configs.py | phsmit/iwclul2016-scripts | 20ead4c7492241ec19dec88fe86065a273c66af6 | [
"BSD-3-Clause"
] | null | null | null | 04_recognize/configs/biglm/gen_configs.py | phsmit/iwclul2016-scripts | 20ead4c7492241ec19dec88fe86065a273c66af6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import os
import glob
for lang in ("sme", "est", "fin"):
for gender in ("M", "F"):
for order in [4,10,20]:
with open("{}{}_b_v_{}g_m.sh".format(lang,gender,order), 'w') as f:
print("export TEST_NAME='{}{}_b_v_{}g_m'".format(lang,gender,order), file=f)
... | 50.836158 | 132 | 0.582352 |
acfc033e0271d00f279c06ab7f2f34e84ed2203c | 3,943 | py | Python | qa/rpc-tests/wallet.py | escortcrypto/EscortCoin | c85acd0480ae0d6105d0faf2c22e6eae7d3e383c | [
"MIT"
] | 1 | 2020-04-07T08:04:04.000Z | 2020-04-07T08:04:04.000Z | qa/rpc-tests/wallet.py | escortcrypto/EscortCoin | c85acd0480ae0d6105d0faf2c22e6eae7d3e383c | [
"MIT"
] | null | null | null | qa/rpc-tests/wallet.py | escortcrypto/EscortCoin | c85acd0480ae0d6105d0faf2c22e6eae7d3e383c | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Exercise the wallet. Ported from wallet.sh.
# Does the following:
# a) creates 3 nodes, with an emp... | 39.039604 | 98 | 0.662693 |
acfc03a47f881cd5bf480c6f19108d9d185bbf35 | 4,923 | py | Python | Main Code.py | DonaldHobson/Large-Text | 06241afce667de339aff829afba12e4dd788a715 | [
"CC0-1.0"
] | null | null | null | Main Code.py | DonaldHobson/Large-Text | 06241afce667de339aff829afba12e4dd788a715 | [
"CC0-1.0"
] | null | null | null | Main Code.py | DonaldHobson/Large-Text | 06241afce667de339aff829afba12e4dd788a715 | [
"CC0-1.0"
] | null | null | null | #Donald Hobson
#A program to make big letters out of small ones
#storeage of pattern to make large letters.
largeLetter=[[" A ",
" A A ",
" AAA ",
"A A",
"A A",],
["BBBB ",
"B B",
"BBBBB",
"B B",
"BBB... | 23.004673 | 85 | 0.239082 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.