hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2a353b8353b6d8c3a4d205a391dce022568d9247 | 576 | py | Python | Medium/Container With Most Water.py | lukemshannonhill/LeetCode_Daily_Problem_Solutions | ead0f38316761c2533c879289b8128a14feaf020 | [
"MIT"
] | null | null | null | Medium/Container With Most Water.py | lukemshannonhill/LeetCode_Daily_Problem_Solutions | ead0f38316761c2533c879289b8128a14feaf020 | [
"MIT"
] | null | null | null | Medium/Container With Most Water.py | lukemshannonhill/LeetCode_Daily_Problem_Solutions | ead0f38316761c2533c879289b8128a14feaf020 | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/container-with-most-water/
class Solution:
def maxArea(self, height: List[int]) -> int:
area = 0
size = len(height)
max_width = size - 1
l = 0
r = size - 1
for width in range(max_width, 0, -... | 23.04 | 58 | 0.407986 |
c7036fe2e71deecc28c439ca567e164e0f938896 | 268 | py | Python | pineboolib/interfaces/__init__.py | juanjosepablos/pineboo | f6ce515aec6e0139821bb9c1d62536d9fb50dae4 | [
"MIT"
] | 2 | 2017-12-10T23:06:16.000Z | 2017-12-10T23:06:23.000Z | pineboolib/interfaces/__init__.py | Aulla/pineboo | 3ad6412d365a6ad65c3bb2bdc03f5798d7c37004 | [
"MIT"
] | 36 | 2017-11-05T21:13:47.000Z | 2020-08-26T15:56:15.000Z | pineboolib/interfaces/__init__.py | deavid/pineboo | acc96ab6d5b8bb182990af6dea4bf0986af15549 | [
"MIT"
] | 9 | 2015-01-15T18:15:42.000Z | 2019-05-05T18:53:00.000Z | """
Interfaces module.
This module contains some common class interfaces, so they can be interchanged.
"""
from .ifieldmetadata import IFieldMetaData # noqa: F401
from .itablemetadata import ITableMetaData # noqa: F401
from .imanager import IManager # noqa: F401
| 26.8 | 79 | 0.776119 |
675a8e5b588a44734b130d6a3b989106cc9e111f | 2,694 | py | Python | Examples/Modules/space_charge_initialization/analysis.py | mrowan137/amrex | cafcb6bd5902fc72a4d6fa51b99fe837f5eb5381 | [
"BSD-3-Clause-LBNL"
] | 1 | 2020-09-16T04:01:09.000Z | 2020-09-16T04:01:09.000Z | Examples/Modules/space_charge_initialization/analysis.py | mrowan137/amrex | cafcb6bd5902fc72a4d6fa51b99fe837f5eb5381 | [
"BSD-3-Clause-LBNL"
] | null | null | null | Examples/Modules/space_charge_initialization/analysis.py | mrowan137/amrex | cafcb6bd5902fc72a4d6fa51b99fe837f5eb5381 | [
"BSD-3-Clause-LBNL"
] | 1 | 2019-09-16T18:20:16.000Z | 2019-09-16T18:20:16.000Z | #!/usr/bin/env python
# Copyright 2019-2020 Axel Huebl, Remi Lehe
#
# This file is part of WarpX.
#
# License: BSD-3-Clause-LBNL
"""
This script checks the space-charge initialization routine, by
verifying that the space-charge field of a Gaussian beam corresponds to
the expected theoretical field.
"""
import sys
imp... | 27.212121 | 89 | 0.67706 |
391be150d454a5192621ad3b9d32f75eeda6e4e0 | 1,976 | py | Python | dthm4kaiako/resources/migrations/0010_auto_20220406_1005.py | uccser/cs4teachers | e2dc6278a8ca75093cbab987b4c54d80799dd35b | [
"MIT"
] | 2 | 2018-04-25T09:04:09.000Z | 2018-07-06T08:51:33.000Z | dthm4kaiako/resources/migrations/0010_auto_20220406_1005.py | uccser/cs4teachers | e2dc6278a8ca75093cbab987b4c54d80799dd35b | [
"MIT"
] | 137 | 2017-06-13T10:28:18.000Z | 2018-09-11T11:14:59.000Z | dthm4kaiako/resources/migrations/0010_auto_20220406_1005.py | uccser/cs4teachers | e2dc6278a8ca75093cbab987b4c54d80799dd35b | [
"MIT"
] | 1 | 2018-04-08T08:53:11.000Z | 2018-04-08T08:53:11.000Z | # Generated by Django 3.2.12 on 2022-04-05 22:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('resources', '0009_auto_20200309_2200'),
]
operations = [
migrations.AlterField(
model_name='curriculumlearningarea',
... | 36.592593 | 111 | 0.611336 |
e882e682e9a2b404fb695eea79d709fc7d7ab497 | 103 | py | Python | wsgi.py | KMoszczyc/Sentiment-Predictor-Deep-L | 86535a66d03197f61ce128b8cd10645efbc74b70 | [
"MIT"
] | 1 | 2021-07-23T02:26:16.000Z | 2021-07-23T02:26:16.000Z | wsgi.py | KMoszczyc/Sentiment-Predictor-Deep-L | 86535a66d03197f61ce128b8cd10645efbc74b70 | [
"MIT"
] | null | null | null | wsgi.py | KMoszczyc/Sentiment-Predictor-Deep-L | 86535a66d03197f61ce128b8cd10645efbc74b70 | [
"MIT"
] | null | null | null | from api import app
from content import train
if __name__ == "__main__":
app.run()
# train()
| 12.875 | 26 | 0.650485 |
4156828de0955fb8c8d24058f9963802aec969f0 | 107 | py | Python | test.py | sagorbrur/itranslit | 2ec27b86e334e982e43909042dc3f22597ee4f2a | [
"MIT"
] | null | null | null | test.py | sagorbrur/itranslit | 2ec27b86e334e982e43909042dc3f22597ee4f2a | [
"MIT"
] | null | null | null | test.py | sagorbrur/itranslit | 2ec27b86e334e982e43909042dc3f22597ee4f2a | [
"MIT"
] | null | null | null | from itranslit.transliterate import Translit
trans = Translit('ta')
res = trans.predict('ami')
print(res) | 17.833333 | 44 | 0.757009 |
c0d58244b9cd98c5e0f76b2d322ca89a17801749 | 3,628 | py | Python | .history/Missions_to_Mars/scrape_mars_20200809103224.py | ermiasgelaye/web-scraping-challenge | f99c3436dfb0169595c46dae7733d90e21385cc6 | [
"ADSL"
] | null | null | null | .history/Missions_to_Mars/scrape_mars_20200809103224.py | ermiasgelaye/web-scraping-challenge | f99c3436dfb0169595c46dae7733d90e21385cc6 | [
"ADSL"
] | null | null | null | .history/Missions_to_Mars/scrape_mars_20200809103224.py | ermiasgelaye/web-scraping-challenge | f99c3436dfb0169595c46dae7733d90e21385cc6 | [
"ADSL"
] | 2 | 2020-11-02T08:12:16.000Z | 2021-05-17T21:45:42.000Z | from splinter import Browser
from bs4 import BeautifulSoup as bs
import pandas as pd
import time
import re
# This is for debugging
def savetofile(contents):
file = open('_temporary.txt',"w",encoding="utf-8")
file.write(contents)
file.close()
def scrape():
executable_path = {"executable_path": "chrom... | 27.484848 | 101 | 0.62817 |
4dd53a6467ee4228228d98a517efb5052ce64bd1 | 3,620 | py | Python | camera_stream_recording/Utils.py | Dontoronto/TrafficMonitoring | 3da106694a78400453d4728959e545a62632f0fc | [
"Apache-2.0"
] | 5 | 2022-01-11T22:59:50.000Z | 2022-02-18T21:11:12.000Z | camera_stream_recording/Utils.py | Dontoronto/TrafficMonitoring | 3da106694a78400453d4728959e545a62632f0fc | [
"Apache-2.0"
] | 1 | 2022-02-16T12:32:23.000Z | 2022-02-16T12:32:23.000Z | camera_stream_recording/Utils.py | Dontoronto/TrafficMonitoring | 3da106694a78400453d4728959e545a62632f0fc | [
"Apache-2.0"
] | 1 | 2021-10-25T00:15:37.000Z | 2021-10-25T00:15:37.000Z | # ****************************************************************************
# @Utils.py
#
#
#
#
# @copyright (c) 2021 Elektronische Fahrwerksysteme GmbH. All rights reserved.
# Dr.-Ludwig-Kraus-Straße 6, 85080 Gaimersheim, DE, https://www.efs-auto.com
# **********************************************************... | 33.518519 | 113 | 0.65 |
100ee3a2ea11c9573c859cc362bbf01b5c2489e9 | 7,119 | py | Python | compiler/modules/write_driver_array.py | ajaymr12/openram | b46fb724b603c79445bd5601db230468684ad233 | [
"BSD-3-Clause"
] | 43 | 2016-11-06T20:53:46.000Z | 2021-09-03T18:57:39.000Z | compiler/modules/write_driver_array.py | ajaymr12/openram | b46fb724b603c79445bd5601db230468684ad233 | [
"BSD-3-Clause"
] | 27 | 2016-11-15T19:28:25.000Z | 2018-02-20T19:23:52.000Z | compiler/modules/write_driver_array.py | ajaymr12/openram | b46fb724b603c79445bd5601db230468684ad233 | [
"BSD-3-Clause"
] | 30 | 2016-11-09T16:02:45.000Z | 2018-02-23T17:07:59.000Z | # See LICENSE for licensing information.
#
# Copyright (c) 2016-2019 Regents of the University of California and The Board
# of Regents for the Oklahoma Agricultural and Mechanical College
# (acting for and on behalf of Oklahoma State University)
# All rights reserved.
#
from math import log
import design
from tech imp... | 39.77095 | 115 | 0.511167 |
4f278aeb8e8c576c496f082f75a850d65989f983 | 249 | py | Python | __init__.py | AgapovDP/ghost_images | 44ea500d9f6f51628571b6f5f704dfbcfd3d51b8 | [
"MIT"
] | 5 | 2021-11-02T12:13:05.000Z | 2022-01-14T07:20:56.000Z | __init__.py | AgapovDP/ghost_images | 44ea500d9f6f51628571b6f5f704dfbcfd3d51b8 | [
"MIT"
] | 1 | 2021-12-24T12:32:34.000Z | 2021-12-24T12:32:34.000Z | __init__.py | AgapovDP/ghost_images | 44ea500d9f6f51628571b6f5f704dfbcfd3d51b8 | [
"MIT"
] | 1 | 2021-09-23T10:39:27.000Z | 2021-09-23T10:39:27.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 7 17:49:32 2021
@author: vonGostev
"""
import os
import sys
sys.path.append(os.path.abspath('../lightprop2d'))
sys.path.append(os.path.abspath('../pyMMF'))
sys.path.append(os.path.abspath('../..'))
| 17.785714 | 50 | 0.650602 |
3347c9bd383b3d666f124684d422a01a7b463e08 | 3,378 | py | Python | quspin/basis/basis_general/_basis_general_core/setup.py | marcotav/QuSpin | ba3dbb9c8b4440ad7deba6412444489d45cb7349 | [
"BSD-3-Clause"
] | 1 | 2020-05-10T08:32:34.000Z | 2020-05-10T08:32:34.000Z | quspin/basis/basis_general/_basis_general_core/setup.py | marcotav/QuSpin | ba3dbb9c8b4440ad7deba6412444489d45cb7349 | [
"BSD-3-Clause"
] | null | null | null | quspin/basis/basis_general/_basis_general_core/setup.py | marcotav/QuSpin | ba3dbb9c8b4440ad7deba6412444489d45cb7349 | [
"BSD-3-Clause"
] | null | null | null |
def cython_files():
import os,glob
try:
from Cython.Build import cythonize
USE_CYTHON = True
except ImportError:
USE_CYTHON = False
package_dir = os.path.dirname(os.path.realpath(__file__))
cython_src = glob.glob(os.path.join(package_dir,"*.pyx"))
include_dirs = os.pat... | 41.703704 | 132 | 0.593546 |
d043323768ef9e3ddab29946d57bcf2ee3f2f0de | 2,375 | py | Python | openpype/hosts/photoshop/plugins/load/load_image.py | yosuperdope/OpenPype | 0c90df97ddb8cda291a4f66d35da58b3deb94a71 | [
"MIT"
] | 1 | 2020-09-21T14:55:33.000Z | 2020-09-21T14:55:33.000Z | openpype/hosts/photoshop/plugins/load/load_image.py | jrsndl/pype | f9d80ef2c0663921291c5f47d24bea51fc43bac7 | [
"MIT"
] | null | null | null | openpype/hosts/photoshop/plugins/load/load_image.py | jrsndl/pype | f9d80ef2c0663921291c5f47d24bea51fc43bac7 | [
"MIT"
] | null | null | null | import re
from avalon import api, photoshop
from openpype.hosts.photoshop.plugins.lib import get_unique_layer_name
stub = photoshop.stub()
class ImageLoader(api.Loader):
"""Load images
Stores the imported asset in a container named after the asset.
"""
families = ["image", "render"]
represent... | 31.666667 | 77 | 0.568842 |
11c05d1b7d7194159ededad5c6e28d0139732997 | 3,538 | py | Python | pokemongo_bot/tests/navigation/fort_navigator_test.py | trongtan/pokemonGo | 670df159c5c5facd14dd9e79ea0db5d7e8dcc2e1 | [
"MIT"
] | null | null | null | pokemongo_bot/tests/navigation/fort_navigator_test.py | trongtan/pokemonGo | 670df159c5c5facd14dd9e79ea0db5d7e8dcc2e1 | [
"MIT"
] | null | null | null | pokemongo_bot/tests/navigation/fort_navigator_test.py | trongtan/pokemonGo | 670df159c5c5facd14dd9e79ea0db5d7e8dcc2e1 | [
"MIT"
] | null | null | null | import unittest
from mock import MagicMock
from api.worldmap import Cell
from pokemongo_bot import FortNavigator
from pokemongo_bot.navigation.destination import Destination
from pokemongo_bot.tests import create_mock_bot
class FortNavigatorTest(unittest.TestCase):
def test_navigate_pokestops_known(self):
... | 34.019231 | 104 | 0.572357 |
3b390e0f290512df65d2cc688ee6a87e1f8e49be | 4,838 | py | Python | wallpaper/tools/file_cache.py | gabbpuy/wallpaper | ec5fdeeb92d1a6285e1ac2ec3b0164929b7ea305 | [
"BSD-2-Clause"
] | 1 | 2021-06-01T21:24:42.000Z | 2021-06-01T21:24:42.000Z | wallpaper/tools/file_cache.py | gabbpuy/wallpaper | ec5fdeeb92d1a6285e1ac2ec3b0164929b7ea305 | [
"BSD-2-Clause"
] | null | null | null | wallpaper/tools/file_cache.py | gabbpuy/wallpaper | ec5fdeeb92d1a6285e1ac2ec3b0164929b7ea305 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from abc import ABCMeta, abstractmethod
import logging
import os
import queue
import sqlite3
import threading
from pickle import load, dump
from wallpaper.tools.dir_entry import DirEntry
from wallpaper.tools.image_history import ImageHistory
from wallpaper.tools.decorators import locked
osPath... | 27.645714 | 103 | 0.574204 |
53a35b9eecd1b30f83fd635182d60e3fdf686fb4 | 12,779 | py | Python | nova/tests/functional/api_sample_tests/test_hypervisors.py | daespinel/nova | 67c2eaf83bcd613c8b56e470899c4562b900b867 | [
"Apache-2.0"
] | 2 | 2021-10-11T04:56:25.000Z | 2022-02-16T08:49:29.000Z | nova/tests/functional/api_sample_tests/test_hypervisors.py | sapcc/nova | ad71af7307365d6aabd122e140f56df4db1e6182 | [
"Apache-2.0"
] | 132 | 2017-03-27T11:31:52.000Z | 2022-03-30T08:45:02.000Z | nova/tests/functional/api_sample_tests/test_hypervisors.py | sapcc/nova | ad71af7307365d6aabd122e140f56df4db1e6182 | [
"Apache-2.0"
] | 8 | 2017-03-27T07:50:38.000Z | 2020-02-14T16:55:56.000Z | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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... | 40.185535 | 79 | 0.627983 |
8274e430252ec3ed9a134801f1d5c04f7261033e | 89 | py | Python | dictonaryloop.py | bjoffficial/Python | 73e6fdc19a1bec18488405c4a60c30ba68581ce5 | [
"Apache-2.0"
] | null | null | null | dictonaryloop.py | bjoffficial/Python | 73e6fdc19a1bec18488405c4a60c30ba68581ce5 | [
"Apache-2.0"
] | null | null | null | dictonaryloop.py | bjoffficial/Python | 73e6fdc19a1bec18488405c4a60c30ba68581ce5 | [
"Apache-2.0"
] | null | null | null | n={"name":"balaji","no":2345,"address":"345/vbnjh"}
for i in n.values():
print(i)
| 22.25 | 52 | 0.573034 |
e3df392d50ff8fef6c8dc6f04ce633cbe2b1a636 | 2,543 | py | Python | flaskr/products.py | MatheusXCH/Python-Server | 08f9dcfdba659fa8eba2ebb33b2dc60a375f54f6 | [
"MIT"
] | null | null | null | flaskr/products.py | MatheusXCH/Python-Server | 08f9dcfdba659fa8eba2ebb33b2dc60a375f54f6 | [
"MIT"
] | null | null | null | flaskr/products.py | MatheusXCH/Python-Server | 08f9dcfdba659fa8eba2ebb33b2dc60a375f54f6 | [
"MIT"
] | null | null | null | from flask import make_response, abort
from config import db
from models import Product, ProductSchema
# # "./api/products", GET
def read_all():
products = Product.query.order_by(Product.name).all()
product_schema = ProductSchema(many=True)
data = product_schema.dump(products)
return data
# # "./ap... | 26.216495 | 89 | 0.648447 |
13719efa4aa08fdd1b53fd041a15cd4248dd1e05 | 180 | py | Python | Models/QueueObject.py | Jack-Dane/clipboard-copy | 2853ce2540298a26a51bc0f627d9e965562dd86d | [
"MIT"
] | null | null | null | Models/QueueObject.py | Jack-Dane/clipboard-copy | 2853ce2540298a26a51bc0f627d9e965562dd86d | [
"MIT"
] | 1 | 2021-10-04T20:54:46.000Z | 2021-10-05T21:34:18.000Z | Models/QueueObject.py | Jack-Dane/clipboard-copy | 2853ce2540298a26a51bc0f627d9e965562dd86d | [
"MIT"
] | null | null | null |
from queue import Queue
class QueueObject(Queue):
def clear(self):
"""
Additional function to easily clear the queue object
"""
with self.mutex:
self.queue.clear()
| 13.846154 | 54 | 0.694444 |
e9b046a024b41171e22509453cdf8dc0d9ed10a4 | 310 | py | Python | commands/quit_cmd.py | GhostHitThose/DexioBot | 7b7c31576f8946f38d0f5838ea393db20f015115 | [
"MIT"
] | null | null | null | commands/quit_cmd.py | GhostHitThose/DexioBot | 7b7c31576f8946f38d0f5838ea393db20f015115 | [
"MIT"
] | null | null | null | commands/quit_cmd.py | GhostHitThose/DexioBot | 7b7c31576f8946f38d0f5838ea393db20f015115 | [
"MIT"
] | null | null | null | def run(chat_id, update, context):
message = "Stopping Bot for Development"
user_status = context.bot.get_chat_member(chat_id, update.message.from_user.id)['status']
if user_status == "administrator" or user_status == "creator":
updater.stop()
context.bot.send_message(chat_id=chat_id, text=message)
| 38.75 | 90 | 0.758065 |
48458cd64c1f4a409c36ef244fcc077a5bcd07a1 | 2,338 | py | Python | CURRENT BUILD/plugins/wii.py | Wamy-Dev/DiscordRomScraperBot | d7b7e524baa423adb0f5fae9c8293cc3c83f83e1 | [
"MIT"
] | 12 | 2021-02-01T00:20:29.000Z | 2022-03-28T17:42:39.000Z | CURRENT BUILD/plugins/wii.py | Wamy-Dev/DiscordRomScraperBot | d7b7e524baa423adb0f5fae9c8293cc3c83f83e1 | [
"MIT"
] | 4 | 2021-02-06T18:58:43.000Z | 2022-03-31T04:36:01.000Z | CURRENT BUILD/plugins/wii.py | Wamy-Dev/DiscordRomScraperBot | d7b7e524baa423adb0f5fae9c8293cc3c83f83e1 | [
"MIT"
] | 2 | 2021-02-06T18:44:41.000Z | 2021-03-19T23:29:01.000Z | from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
import asyncio
import time
from bs4 import BeautifulSoup
import pyshorteners
modules=["wii"]
color=0xFFFFFA
async def get(driver,searchTerm,moduleName):
#start multiuser
... | 49.744681 | 96 | 0.461933 |
3356818af0d5695969b3ddf29ee0b853e5daef10 | 1,560 | py | Python | tools/anchors_calc_yolo_format_annotation/kmeans_anchors.py | chenyuqing/darknet_yolov3_hardcore | f976b90f63cff1291aee341914a75dfabec53004 | [
"MIT"
] | null | null | null | tools/anchors_calc_yolo_format_annotation/kmeans_anchors.py | chenyuqing/darknet_yolov3_hardcore | f976b90f63cff1291aee341914a75dfabec53004 | [
"MIT"
] | null | null | null | tools/anchors_calc_yolo_format_annotation/kmeans_anchors.py | chenyuqing/darknet_yolov3_hardcore | f976b90f63cff1291aee341914a75dfabec53004 | [
"MIT"
] | null | null | null | # -*- coding=utf-8 -*-
import glob
import os
import sys
import xml.etree.ElementTree as ET
import numpy as np
from kmeans import kmeans, avg_iou
# label path
labels_txt = "./labels/"
# 聚类的数目
CLUSTERS = 6
# 模型中图像的输入尺寸,默认是一样的, from cfg file
SIZE = 608
# 加载YOLO格式的标注数据
def load_dataset(labels_txt):
if not os.path.exi... | 26.896552 | 66 | 0.605128 |
d253d79511c1a8095ab9e30a52f63e8ceb4a152d | 2,897 | py | Python | dusty/systems/nfs/client.py | gamechanger/dusty | dd9778e3a4f0c623209e53e98aa9dc1fe76fc309 | [
"MIT"
] | 421 | 2015-06-02T16:29:59.000Z | 2021-06-03T18:44:42.000Z | dusty/systems/nfs/client.py | gamechanger/dusty | dd9778e3a4f0c623209e53e98aa9dc1fe76fc309 | [
"MIT"
] | 404 | 2015-06-02T20:23:42.000Z | 2019-08-21T16:59:41.000Z | dusty/systems/nfs/client.py | gamechanger/dusty | dd9778e3a4f0c623209e53e98aa9dc1fe76fc309 | [
"MIT"
] | 16 | 2015-06-16T17:21:02.000Z | 2020-03-27T02:27:09.000Z | from __future__ import absolute_import
import logging
from subprocess import CalledProcessError
import time
from ... import constants
from ..virtualbox import get_host_ip, check_output_on_vm, check_call_on_vm, call_on_vm
from ...log import log_to_client
from ...subprocess import call_demoted, check_call_demoted, chec... | 36.670886 | 105 | 0.689334 |
972a284dc1acb4af1f35a9aa3ee2fb22ceb0b4cf | 882 | py | Python | web/__init__.py | marcelb98/pycroft | 34cc59d9ab7fdc0c20b09b4851111048a9f64d90 | [
"Apache-2.0"
] | null | null | null | web/__init__.py | marcelb98/pycroft | 34cc59d9ab7fdc0c20b09b4851111048a9f64d90 | [
"Apache-2.0"
] | null | null | null | web/__init__.py | marcelb98/pycroft | 34cc59d9ab7fdc0c20b09b4851111048a9f64d90 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
"""
web
~~~~~~~~~~~~~~
This package contains the web interface based on fla... | 35.28 | 88 | 0.763039 |
1b3b9a72169a034125b39f238d5aa4e3c95d1e9b | 1,332 | py | Python | tests/integration/test_containers/src/test3_kafka_util.py | rexengineering/metaflow | fcba7cd6aaccd3806ce7d6a4a8aaeef350bbeaf8 | [
"Apache-2.0"
] | null | null | null | tests/integration/test_containers/src/test3_kafka_util.py | rexengineering/metaflow | fcba7cd6aaccd3806ce7d6a4a8aaeef350bbeaf8 | [
"Apache-2.0"
] | null | null | null | tests/integration/test_containers/src/test3_kafka_util.py | rexengineering/metaflow | fcba7cd6aaccd3806ce7d6a4a8aaeef350bbeaf8 | [
"Apache-2.0"
] | null | null | null | '''Test script to simulate someone from outside the REXFlow swimlane doing the following:
1. Reading an Event from Kafka
2. Doing some tasks in that agent's swim lane
3. Pushing another Event back into the REXFlow SwimLane using Kafka.
'''
import json
from confluent_kafka import Consumer, Producer
KAFKA_HOST = "my-cl... | 28.340426 | 90 | 0.734234 |
33b29d85771ddc84f143142424dcf1b4577411e9 | 2,906 | py | Python | test/functional/wallet_zapwallettxes.py | ckti-ion-v4/ion | 9eb70a07464c8f07d3206372485437e6ce16f278 | [
"MIT"
] | 1 | 2021-05-04T09:18:39.000Z | 2021-05-04T09:18:39.000Z | test/functional/wallet_zapwallettxes.py | ckti-ion-v4/ion | 9eb70a07464c8f07d3206372485437e6ce16f278 | [
"MIT"
] | 22 | 2019-06-14T17:34:02.000Z | 2019-06-14T20:57:00.000Z | test/functional/wallet_zapwallettxes.py | ckti-ion-v4/ion | 9eb70a07464c8f07d3206372485437e6ce16f278 | [
"MIT"
] | 2 | 2020-07-12T10:24:08.000Z | 2021-07-24T20:21:31.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the zapwallettxes functionality.
- start two bitcoind nodes
- create two transactions on node 0 -... | 40.361111 | 112 | 0.708534 |
bf9dcb9b8d08c1e7e1caceb35702f2a90d858d95 | 3,016 | py | Python | Machine Learing/Sequential_Bayesian_Learning/Sequential_Bayesian_Learning.py | roger8587/-Portfolio | 752824c50514d5a5f3e4a561be18b7dce7741d91 | [
"MIT"
] | null | null | null | Machine Learing/Sequential_Bayesian_Learning/Sequential_Bayesian_Learning.py | roger8587/-Portfolio | 752824c50514d5a5f3e4a561be18b7dce7741d91 | [
"MIT"
] | null | null | null | Machine Learing/Sequential_Bayesian_Learning/Sequential_Bayesian_Learning.py | roger8587/-Portfolio | 752824c50514d5a5f3e4a561be18b7dce7741d91 | [
"MIT"
] | null | null | null | import scipy.io as sio
import matplotlib.pyplot as plt
import numpy as np
from numpy.random import multivariate_normal as normal
import scipy.stats as stats
# =============================================================================
# 1.Sequential Bayesian Learning
# =============================================... | 28.186916 | 136 | 0.524536 |
019e3035ebfcf526e2f17cb6d194475ad48eee47 | 992 | py | Python | 09WebFramework/day02/basic03.py | HaoZhang95/PythonAndMachineLearning | b897224b8a0e6a5734f408df8c24846a98c553bf | [
"MIT"
] | 937 | 2019-05-08T08:46:25.000Z | 2022-03-31T12:56:07.000Z | 09WebFramework/day02/basic03.py | Sakura-gh/Python24 | b97e18867264a0647d5645c7d757a0040e755577 | [
"MIT"
] | 47 | 2019-09-17T10:06:02.000Z | 2022-03-11T23:46:52.000Z | 09WebFramework/day02/basic03.py | Sakura-gh/Python24 | b97e18867264a0647d5645c7d757a0040e755577 | [
"MIT"
] | 354 | 2019-05-10T02:15:26.000Z | 2022-03-30T05:52:57.000Z | """
静态url:一般html结尾的都是静态的url,每个网页有真实的物理路径,存在服务器中
优点:对seo有加分影响,因为打开速度快
缺点:太多的静态网页,占用硬盘空间
动态url:类似php,asp,py等结尾的,或者带有?id=5类似的url,动态生成的url,每个url只是逻辑地址,并不是真正存在服务器中的
优点:修改网页方便,因为是逻辑地址,所以占用硬盘空间少
缺点:因为需要运算,所以打开速度稍慢
伪静态url:xxx/coure/95.html看起来是一个静态的url,但是并不存在真实的物理地址在服务器中
优点和... | 35.428571 | 109 | 0.777218 |
f0a235ba1410c60a75a5ff98ea433c6882c8f7fa | 2,877 | py | Python | botoy/parser/group.py | First-frost/botoy | 20a6f32c61beb045a9dbea11f0b1744fc6a40a60 | [
"MIT"
] | 1 | 2021-06-17T10:20:45.000Z | 2021-06-17T10:20:45.000Z | botoy/parser/group.py | First-frost/botoy | 20a6f32c61beb045a9dbea11f0b1744fc6a40a60 | [
"MIT"
] | null | null | null | botoy/parser/group.py | First-frost/botoy | 20a6f32c61beb045a9dbea11f0b1744fc6a40a60 | [
"MIT"
] | null | null | null | import json
import re
from typing import List, Optional
from pydantic import BaseModel
from ..collection import MsgTypes
from ..model import GroupMsg
# at
class UserExtItem(BaseModel):
QQNick: str
QQUid: int
class AT(BaseModel):
Content: str
UserExt: List[UserExtItem]
UserID: List[int]
def a... | 18.927632 | 66 | 0.58846 |
0af454b329b141135a52f88511837cde180cf082 | 22,964 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_network_interface_tap_configurations_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_network_interface_tap_configurations_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_network_interface_tap_configurations_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 52.190909 | 244 | 0.68198 |
276d7bc8c80d7688ecadb70836aa07eb3e405fa2 | 299 | py | Python | website/maintenance/admin/__init__.py | JobDoesburg/landolfio | 4cbf31c2e6f93745f5aa0d20893bf20f3acecc6e | [
"MIT"
] | 1 | 2021-02-24T14:33:09.000Z | 2021-02-24T14:33:09.000Z | website/maintenance/admin/__init__.py | JobDoesburg/landolfio | 4cbf31c2e6f93745f5aa0d20893bf20f3acecc6e | [
"MIT"
] | 2 | 2022-01-13T04:03:38.000Z | 2022-03-12T01:03:10.000Z | website/maintenance/admin/__init__.py | JobDoesburg/landolfio | 4cbf31c2e6f93745f5aa0d20893bf20f3acecc6e | [
"MIT"
] | null | null | null | from maintenance.admin.asset_amortizations import *
from maintenance.admin.maintenance_assets import *
from maintenance.admin.maintenance_ticket import *
from maintenance.admin.reviews import *
from maintenance.admin.under_review_assets import *
from maintenance.admin.maintenance_provider import *
| 42.714286 | 52 | 0.859532 |
9c6d86d1f08db9656bb20e6504c7f79e68e3a228 | 1,598 | py | Python | hailo_model_zoo/core/preprocessing/pose_preprocessing.py | markgrobman/hailo_model_zoo | 2ea72272ed2debd7f6bee7c4a65bd41de57ec9cf | [
"MIT"
] | 2 | 2021-07-20T15:09:51.000Z | 2021-11-17T11:05:02.000Z | hailo_model_zoo/core/preprocessing/pose_preprocessing.py | markgrobman/hailo_model_zoo | 2ea72272ed2debd7f6bee7c4a65bd41de57ec9cf | [
"MIT"
] | null | null | null | hailo_model_zoo/core/preprocessing/pose_preprocessing.py | markgrobman/hailo_model_zoo | 2ea72272ed2debd7f6bee7c4a65bd41de57ec9cf | [
"MIT"
] | null | null | null | import tensorflow as tf
import cv2
import numpy as np
import math
def _openpose_padding(img, desired_dims, pad_value=0):
h, w, _ = img.shape
assert h <= desired_dims[0] and w <= desired_dims[1]
pad = []
pad.append(int(math.floor((desired_dims[0] - h) / 2.0)))
pad.append(int(math.floor((desired_di... | 37.162791 | 92 | 0.661452 |
af53be5e463c9b102ff19647284aba3c047bdf37 | 23,340 | py | Python | music.py | Doominicprog/bot-discord-music | 4dd6d573dd2cad414ec6d69cb666e7cde3d58530 | [
"CC0-1.0"
] | 1 | 2020-08-31T01:52:23.000Z | 2020-08-31T01:52:23.000Z | music.py | Doominicprog/bot-discord-music | 4dd6d573dd2cad414ec6d69cb666e7cde3d58530 | [
"CC0-1.0"
] | null | null | null | music.py | Doominicprog/bot-discord-music | 4dd6d573dd2cad414ec6d69cb666e7cde3d58530 | [
"CC0-1.0"
] | 1 | 2020-08-31T01:52:41.000Z | 2020-08-31T01:52:41.000Z | import discord,asyncio,random,youtube_dl,string,os
from discord.ext import commands
from googleapiclient.discovery import build
from discord.ext.commands import command
# import pymongo
#NOTE: Import pymongo if you are using the database function commands
#NOTE: Also add `pymongo` and `dnspython` inside the requireme... | 36.074189 | 136 | 0.605013 |
ac5911487cf39817e433760dd1bf09204a97409b | 769 | py | Python | EmeraldAI/Logic/Memory/STT.py | MaxMorgenstern/EmeraldAI | 4bbb50f94b656904c428fc28cdbb61e7353e61aa | [
"Apache-2.0"
] | null | null | null | EmeraldAI/Logic/Memory/STT.py | MaxMorgenstern/EmeraldAI | 4bbb50f94b656904c428fc28cdbb61e7353e61aa | [
"Apache-2.0"
] | null | null | null | EmeraldAI/Logic/Memory/STT.py | MaxMorgenstern/EmeraldAI | 4bbb50f94b656904c428fc28cdbb61e7353e61aa | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
from EmeraldAI.Logic.Singleton import Singleton
from EmeraldAI.Config.Config import Config
if(Config().Get("Database", "ConversationDatabaseType").lower() == "sqlite"):
from EmeraldAI.Logic.Database.SQlite3 import SQlite3 as db
elif(Config().Get("Database", "ConversationDat... | 34.954545 | 80 | 0.677503 |
0c25bb030855d9f766c75949230b1e19bb8ff41c | 2,022 | py | Python | code/python3/index_facets.py | jaylett/xapian-docsprint | 2e8fdffecf71f7042c0abe49924ba48c11818b7e | [
"MIT"
] | 47 | 2015-01-20T15:38:41.000Z | 2022-02-15T21:03:50.000Z | code/python3/index_facets.py | jaylett/xapian-docsprint | 2e8fdffecf71f7042c0abe49924ba48c11818b7e | [
"MIT"
] | 16 | 2015-06-09T16:12:50.000Z | 2020-02-05T06:40:18.000Z | code/python3/index_facets.py | jaylett/xapian-docsprint | 2e8fdffecf71f7042c0abe49924ba48c11818b7e | [
"MIT"
] | 56 | 2015-01-20T15:38:44.000Z | 2022-03-03T18:13:39.000Z | #!/usr/bin/env python
import json
import sys
import xapian
from support import parse_csv_file
### Start of example code.
def index(datapath, dbpath):
# Create or open the database we're going to be writing to.
db = xapian.WritableDatabase(dbpath, xapian.DB_CREATE_OR_OPEN)
# Set up a TermGenerator that we... | 33.147541 | 69 | 0.653808 |
6407f293cf7c3b2865c84d3841937998f6e29564 | 3,869 | py | Python | util/mosflm.py | toastisme/dials | 6bc8ababc33bfe334513677f8adb65c0e90003f3 | [
"BSD-3-Clause"
] | 58 | 2015-10-15T09:28:20.000Z | 2022-03-28T20:09:38.000Z | util/mosflm.py | toastisme/dials | 6bc8ababc33bfe334513677f8adb65c0e90003f3 | [
"BSD-3-Clause"
] | 1,741 | 2015-11-24T08:17:02.000Z | 2022-03-31T15:46:42.000Z | util/mosflm.py | toastisme/dials | 6bc8ababc33bfe334513677f8adb65c0e90003f3 | [
"BSD-3-Clause"
] | 45 | 2015-10-14T13:44:16.000Z | 2022-03-22T14:45:56.000Z | import os
from dxtbx.model import Crystal
from rstbx.cftbx.coordinate_frame_helpers import align_reference_frame
from scitbx import matrix
def dump(experiments, directory):
"""
Dump the experiments in mosflm format
:param experiments: The experiments to dump
:param directory: The directory to write ... | 32.241667 | 85 | 0.59266 |
8fafc6e9b982566da2315e7246278aface4a1729 | 2,491 | py | Python | equivalence/equivalence_node/equalization_Urals_EES.py | Shurik412/equivalence_rastr_win3 | c37119f9cc59dcf96d236cd8f3ec090dc65a5db6 | [
"MIT"
] | null | null | null | equivalence/equivalence_node/equalization_Urals_EES.py | Shurik412/equivalence_rastr_win3 | c37119f9cc59dcf96d236cd8f3ec090dc65a5db6 | [
"MIT"
] | null | null | null | equivalence/equivalence_node/equalization_Urals_EES.py | Shurik412/equivalence_rastr_win3 | c37119f9cc59dcf96d236cd8f3ec090dc65a5db6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from equivalence.tables.Tables import Vetv, Node, Generator
def equalization_of_the_Urals_energy_system(
selection_of_the_area: str,
rastr_win: object) -> None:
"""
# ************************************************************
# Назначение: Эквиваленитрование ОЭС У... | 44.482143 | 90 | 0.542754 |
c417bad994193562a30b1d652e379659434bc6aa | 838 | py | Python | acispy/utils.py | sjtuzyk/chandra-acis-analysis | 8d194c8107ba2e91b35eba95c044ac238ce03229 | [
"MIT"
] | 3 | 2016-05-28T00:32:55.000Z | 2022-02-28T13:36:04.000Z | acispy/utils.py | sjtuzyk/chandra-acis-analysis | 8d194c8107ba2e91b35eba95c044ac238ce03229 | [
"MIT"
] | null | null | null | acispy/utils.py | sjtuzyk/chandra-acis-analysis | 8d194c8107ba2e91b35eba95c044ac238ce03229 | [
"MIT"
] | 1 | 2018-10-09T16:42:18.000Z | 2018-10-09T16:42:18.000Z | # Copyright (c) 2017-2018 Weitian LI <wt@liwt.net>
# MIT license
import re
# The base directory has the format: <name>_oi<obsid>
RE_BASEDIR = re.compile(r"^.*/(?P<name>[^/_]+)_oi(?P<obsid>\d+).*$")
def get_name_from_path(path):
"""
Extract the object name from the directory path.
Parameters
------... | 19.488372 | 68 | 0.596659 |
9271bc94dcca99afe3d1561028807348ee3c0bfc | 323 | py | Python | books/techno/python/programming_python_4_ed_m_lutz/code/chapter_3/04_fetching_shell_variables/main.py | ordinary-developer/lin_education | 13d65b20cdbc3e5467b2383e5c09c73bbcdcb227 | [
"MIT"
] | 1 | 2017-05-04T08:23:46.000Z | 2017-05-04T08:23:46.000Z | books/techno/python/programming_python_4_ed_m_lutz/code/chapter_3/04_fetching_shell_variables/main.py | ordinary-developer/lin_education | 13d65b20cdbc3e5467b2383e5c09c73bbcdcb227 | [
"MIT"
] | null | null | null | books/techno/python/programming_python_4_ed_m_lutz/code/chapter_3/04_fetching_shell_variables/main.py | ordinary-developer/lin_education | 13d65b20cdbc3e5467b2383e5c09c73bbcdcb227 | [
"MIT"
] | null | null | null | if __name__ == '__main__':
import os
print(os.environ.keys())
print(list(os.environ.keys()))
print(os.environ['PATH'])
print(os.environ['PATH'])
for src_dir in os.environ['PATH'].split(os.pathsep):
print(src_dir)
import sys
print(sys.path[:3])
print(sys.path)
... | 20.1875 | 57 | 0.578947 |
e32a78f382bf17f2d1ed4086a7291885e317d2e9 | 1,946 | py | Python | wiki/views.py | JericHunter/makewiki | fa5a45f25a47c2f404414bc8e81685e2f1be9206 | [
"MIT"
] | null | null | null | wiki/views.py | JericHunter/makewiki | fa5a45f25a47c2f404414bc8e81685e2f1be9206 | [
"MIT"
] | 5 | 2020-06-06T00:37:31.000Z | 2022-02-10T09:43:39.000Z | wiki/views.py | JericHunter/makewiki | fa5a45f25a47c2f404414bc8e81685e2f1be9206 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from wiki.models import Page
from django.views.generic import DetailView, ListView
from django.http import Http404, HttpResponse
# Create your views here.
class PageList(ListView):
"""
CHALLENGES:
1. On GET, display a homepage that shows all Pages in your wiki.
... | 38.92 | 103 | 0.675231 |
64960f3c881c83577643cc5a00fc16eec2a9e13c | 602 | py | Python | src/syckIO.py | davix3f/SyCk | 71a51876488b6f493502e1cefe352af758cf8d63 | [
"Apache-2.0"
] | null | null | null | src/syckIO.py | davix3f/SyCk | 71a51876488b6f493502e1cefe352af758cf8d63 | [
"Apache-2.0"
] | null | null | null | src/syckIO.py | davix3f/SyCk | 71a51876488b6f493502e1cefe352af758cf8d63 | [
"Apache-2.0"
] | null | null | null | import re
import linecache
lines={}
filename=""
def file_length(filename):
length=0
f=open(filename, "r")
for line in f:
length+=1
f.close()
return(length)
if filename!="":
file_length(filename)
class Basic:
def openfile():
Basic.f=open(filename,"r")
return(Basic.f)
def close... | 15.842105 | 78 | 0.666113 |
70878e149ae7a876335e76b7c02f5ea1ec79c01b | 20,334 | py | Python | custom_components/tuya_v2/sensor.py | MorrisTheHorris/tuya-home-assistant | cc9665ead3975288d66781f9bd95f271eb568725 | [
"MIT"
] | null | null | null | custom_components/tuya_v2/sensor.py | MorrisTheHorris/tuya-home-assistant | cc9665ead3975288d66781f9bd95f271eb568725 | [
"MIT"
] | null | null | null | custom_components/tuya_v2/sensor.py | MorrisTheHorris/tuya-home-assistant | cc9665ead3975288d66781f9bd95f271eb568725 | [
"MIT"
] | null | null | null | """Support for Tuya sensors."""
import json
import logging
from homeassistant.components.sensor import (
DOMAIN as DEVICE_DOMAIN,
SensorEntity,
STATE_CLASS_MEASUREMENT,
STATE_CLASS_TOTAL_INCREASING,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
CONCENTRAT... | 35.548951 | 87 | 0.470985 |
b273190765107f0f6dab81bce060a661b80e1143 | 3,484 | py | Python | src/basic_crawler.py | yuju13488/homework | d6ff579d0fd0d03d51b780b0c062b3a8495a10a4 | [
"CC-BY-4.0"
] | 332 | 2015-09-07T01:45:59.000Z | 2022-03-01T02:39:57.000Z | src/basic_crawler.py | yuju13488/homework | d6ff579d0fd0d03d51b780b0c062b3a8495a10a4 | [
"CC-BY-4.0"
] | 1 | 2019-12-17T22:49:05.000Z | 2019-12-17T22:49:05.000Z | src/basic_crawler.py | yuju13488/homework | d6ff579d0fd0d03d51b780b0c062b3a8495a10a4 | [
"CC-BY-4.0"
] | 90 | 2016-06-30T12:42:10.000Z | 2022-03-25T02:37:37.000Z | import re
import time
import urllib
from multiprocessing import Pool
import requests
from requests_html import HTML
from utils import pretty_print # noqa
def fetch(url):
''' Step-1: send a request and fetch the web page.
'''
response = requests.get(url)
return response
def parse_article_entries(d... | 26.8 | 79 | 0.610218 |
db5a28f24b8631a024f3f90c4c0d18ac8a563201 | 2,089 | py | Python | src/python/bot/untrusted_runner/build_setup.py | ABHIsHEk122811/clusterfuzz | 7cac0ee869787e6f547a4b3dac18196c60f03383 | [
"Apache-2.0"
] | 4 | 2019-11-26T01:50:51.000Z | 2021-08-14T20:32:43.000Z | src/python/bot/untrusted_runner/build_setup.py | ABHIsHEk122811/clusterfuzz | 7cac0ee869787e6f547a4b3dac18196c60f03383 | [
"Apache-2.0"
] | 22 | 2019-12-26T17:02:34.000Z | 2022-03-21T22:16:52.000Z | src/python/bot/untrusted_runner/build_setup.py | ABHIsHEk122811/clusterfuzz | 7cac0ee869787e6f547a4b3dac18196c60f03383 | [
"Apache-2.0"
] | 2 | 2019-02-09T09:09:20.000Z | 2019-02-15T05:25:13.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.303571 | 80 | 0.731929 |
0a550c1dc1665545da5c3b4d9ab32fd0394996b2 | 200 | py | Python | app/routes/__init__.py | DzhonPetrus/Treatment-Management | 6b08c59d2d4e79181bbae4e951b7a5fd2e3162f1 | [
"MIT"
] | null | null | null | app/routes/__init__.py | DzhonPetrus/Treatment-Management | 6b08c59d2d4e79181bbae4e951b7a5fd2e3162f1 | [
"MIT"
] | null | null | null | app/routes/__init__.py | DzhonPetrus/Treatment-Management | 6b08c59d2d4e79181bbae4e951b7a5fd2e3162f1 | [
"MIT"
] | null | null | null | from . import surgery, surgery_type, lab_result, lab_request, profile, lab_test, treatment, treatment_type, patient, user, authentication, index, me, sysadmin
from .public import landing, find_doctor
| 66.666667 | 158 | 0.81 |
55368289275a78cb0c0beed6ab2fae9c78ffd6a3 | 8,426 | py | Python | mmdet/core/evaluation/coco_utils.py | atoaiari/Pedestron | 635f291ad919a8ffe62e6a0530662500961e6d46 | [
"Apache-2.0"
] | null | null | null | mmdet/core/evaluation/coco_utils.py | atoaiari/Pedestron | 635f291ad919a8ffe62e6a0530662500961e6d46 | [
"Apache-2.0"
] | null | null | null | mmdet/core/evaluation/coco_utils.py | atoaiari/Pedestron | 635f291ad919a8ffe62e6a0530662500961e6d46 | [
"Apache-2.0"
] | null | null | null | import mmcv
import numpy as np
from pycocotools.coco import COCO
from pycocotools.cocoeval import COCOeval
from .recall import eval_recalls
def coco_eval(result_files, result_types, coco, max_dets=(100, 300, 1000)):
for res_type in result_types:
assert res_type in [
'proposal', 'proposal_fast... | 35.855319 | 80 | 0.558509 |
f66d569de307b2d35e66cb4f18b239cb2ce20f53 | 1,554 | py | Python | util/levelGenerators.py | neuhier/inception2 | b04b2d1499ad3510baed38b7349ae4399d3bc4a0 | [
"CC-BY-4.0"
] | null | null | null | util/levelGenerators.py | neuhier/inception2 | b04b2d1499ad3510baed38b7349ae4399d3bc4a0 | [
"CC-BY-4.0"
] | null | null | null | util/levelGenerators.py | neuhier/inception2 | b04b2d1499ad3510baed38b7349ae4399d3bc4a0 | [
"CC-BY-4.0"
] | null | null | null | # Contains functions to generate a random level, objects, etc.
import random
from gameObjects.level import Level
from gameObjects.villian import Villian
from itemGenerators import generateTree, generateSpeedBoostPanel, generateGoal
# -----------------------------------------------------------------------------------... | 37.902439 | 113 | 0.494852 |
7952876c1c0dd5c3b60b0b613ba4ac4f86bc93d9 | 5,137 | py | Python | lib/focaltouch.py | szczys/st7789_mpy | bc854ec453d7644ce1773f7ed4d41504f37d376b | [
"MIT"
] | 153 | 2020-02-02T11:03:14.000Z | 2022-03-30T05:47:07.000Z | lib/focaltouch.py | skylin008/st7789_mpy | f304991fc5558be653df5f0de928494b85cbc60d | [
"MIT"
] | 58 | 2020-04-11T23:23:02.000Z | 2022-03-26T20:45:23.000Z | lib/focaltouch.py | skylin008/st7789_mpy | f304991fc5558be653df5f0de928494b85cbc60d | [
"MIT"
] | 50 | 2020-02-02T11:05:23.000Z | 2022-03-22T15:24:42.000Z | # The MIT License (MIT)
#
# Copyright (c) 2017 ladyada for adafruit industries
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
#... | 32.929487 | 79 | 0.648628 |
20f77809485c74730bd60edd7bd1cbba8e1ac3c1 | 2,521 | py | Python | grr/server/grr_response_server/gui/api_plugins/report_plugins/report_plugins_test_mocks.py | Onager/grr | 646196bbfb332e4cb546b6d0fe1c09b57c675f7d | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/gui/api_plugins/report_plugins/report_plugins_test_mocks.py | Onager/grr | 646196bbfb332e4cb546b6d0fe1c09b57c675f7d | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/gui/api_plugins/report_plugins/report_plugins_test_mocks.py | Onager/grr | 646196bbfb332e4cb546b6d0fe1c09b57c675f7d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""This module contains report plugin mocks used for testing."""
from grr.lib import rdfvalue
from grr.lib import utils
from grr.server.grr_response_server.gui.api_plugins.report_plugins import rdf_report_plugins
from grr.server.grr_response_server.gui.api_plugins.report_plugins import report_plu... | 34.534247 | 92 | 0.704879 |
df5c50db78a143151997f87faa709ba93cb0f990 | 808 | py | Python | python/translate-text/main.py | stnguyen90/demos-for-functions | 2b6161c21c6bc8a7f38df4c518cedbbf8824ff03 | [
"MIT"
] | null | null | null | python/translate-text/main.py | stnguyen90/demos-for-functions | 2b6161c21c6bc8a7f38df4c518cedbbf8824ff03 | [
"MIT"
] | 2 | 2022-03-11T08:32:38.000Z | 2022-03-11T14:42:33.000Z | python/translate-text/main.py | stnguyen90/demos-for-functions | 2b6161c21c6bc8a7f38df4c518cedbbf8824ff03 | [
"MIT"
] | null | null | null | import os
import sys
import json
from translate import Translator
if os.environ.get("APPWRITE_FUNCTION_DATA", None) is None:
sys.exit("Search query not provided")
query = os.environ["APPWRITE_FUNCTION_DATA"]
try:
query = json.loads(query)
except Exception as e:
sys.exit(e)
if query.get('text', None) is... | 21.263158 | 75 | 0.700495 |
e0d55f609651bdcecc4588fb05d14b61c0b036f1 | 13,807 | py | Python | codes/traingradient.py | AlphaAtlas/BasicSR | e8fec2f11702e4928d3ce488caf4b897c8023efd | [
"Apache-2.0"
] | null | null | null | codes/traingradient.py | AlphaAtlas/BasicSR | e8fec2f11702e4928d3ce488caf4b897c8023efd | [
"Apache-2.0"
] | null | null | null | codes/traingradient.py | AlphaAtlas/BasicSR | e8fec2f11702e4928d3ce488caf4b897c8023efd | [
"Apache-2.0"
] | null | null | null | import os.path
import sys
import math
import argparse
import time
import random
import numpy as np
from collections import OrderedDict
import logging
import glob
import shutil
import torch
import options.options as option
from utils import util
from data import create_dataloader, create_dataset
from models import cre... | 44.827922 | 156 | 0.567393 |
4700cd19f8d7d97309b3451a965a3725b2519d1c | 1,303 | py | Python | tests/unit_tests/conftest.py | asdf2014/superset | 8e69b2db34bc45e14cf6a58153dabb66b7198e9c | [
"Apache-2.0"
] | 2 | 2020-03-24T08:44:10.000Z | 2020-06-22T16:33:58.000Z | tests/unit_tests/conftest.py | asdf2014/superset | 8e69b2db34bc45e14cf6a58153dabb66b7198e9c | [
"Apache-2.0"
] | 42 | 2021-04-14T08:17:46.000Z | 2022-03-14T20:47:19.000Z | tests/unit_tests/conftest.py | asdf2014/superset | 8e69b2db34bc45e14cf6a58153dabb66b7198e9c | [
"Apache-2.0"
] | null | null | null | # 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 u... | 33.410256 | 84 | 0.753645 |
df955af2395e422d9a65b434bb0516c345bced4b | 241 | py | Python | 8/tests.py | remihuguet/aoc2020 | c313c5b425dda92d949fd9ca4f18ff66f452794f | [
"MIT"
] | null | null | null | 8/tests.py | remihuguet/aoc2020 | c313c5b425dda92d949fd9ca4f18ff66f452794f | [
"MIT"
] | null | null | null | 8/tests.py | remihuguet/aoc2020 | c313c5b425dda92d949fd9ca4f18ff66f452794f | [
"MIT"
] | null | null | null | import handeld
def test_accumulator_value_before_second_instruction():
5 == handeld.compute_accumulator_value('8/test_input.txt')
def test_compute_final_value():
8 == handeld.compute_final_value_debugged_code('8/test_input.txt')
| 24.1 | 70 | 0.80083 |
a43b2101923d390246a725c366f87a5d5d44e15e | 2,361 | py | Python | train4.py | Alvinhech/resnet-autoencoder | cdcaab6c6c9792f76f46190c2b6407a28702f7af | [
"MIT"
] | 18 | 2019-01-18T20:18:33.000Z | 2022-03-25T16:02:16.000Z | train4.py | Alvinhech/resnet-autoencoder | cdcaab6c6c9792f76f46190c2b6407a28702f7af | [
"MIT"
] | null | null | null | train4.py | Alvinhech/resnet-autoencoder | cdcaab6c6c9792f76f46190c2b6407a28702f7af | [
"MIT"
] | 3 | 2018-12-12T23:44:42.000Z | 2020-06-12T03:47:46.000Z | import torch
from torch import nn
from autoencoder4 import ResNet_autoencoder, Bottleneck, DeconvBottleneck
from coco import load_dataset
import matplotlib.pyplot as plt
from torch.autograd import Variable
EPOCH = 10
if __name__ == "__main__":
model = ResNet_autoencoder(Bottleneck, DeconvBottleneck, [
3, ... | 29.148148 | 107 | 0.604828 |
c6d840d1d13354689350fc5c962e64ad137d5fe2 | 58 | py | Python | template/license.py | ptomulik/numbo | 571f6eff37f97147afa21577354028f99c141ec8 | [
"Unlicense"
] | null | null | null | template/license.py | ptomulik/numbo | 571f6eff37f97147afa21577354028f99c141ec8 | [
"Unlicense"
] | null | null | null | template/license.py | ptomulik/numbo | 571f6eff37f97147afa21577354028f99c141ec8 | [
"Unlicense"
] | null | null | null | # @COPYRIGHT@
# Licensed under MIT license (LICENSE.txt).
| 19.333333 | 43 | 0.724138 |
0262c126789326b9a47d1e3a807ec81798055bbd | 7,727 | py | Python | main.py | HashimMufti/conwayGOL | 2358ace415fdbded99fd1d51a2d222d57a90b0d1 | [
"MIT"
] | 1 | 2022-03-13T15:14:13.000Z | 2022-03-13T15:14:13.000Z | main.py | HashimMufti/conwayGOL | 2358ace415fdbded99fd1d51a2d222d57a90b0d1 | [
"MIT"
] | null | null | null | main.py | HashimMufti/conwayGOL | 2358ace415fdbded99fd1d51a2d222d57a90b0d1 | [
"MIT"
] | null | null | null | import random as rand
import copy
import os
import sys
import getopt
def game_of_life(some_board):
"""Play a single iteration of Conway's Game of Life on a board.
Args:
some_board (List of lists of strings): List of lists containing the ALIVE/DEAD variable.
Returns:
[List o... | 28.512915 | 122 | 0.579009 |
5a2f3cbfd0aa3dca3120cbe5e4077582e4d56b25 | 3,059 | py | Python | temperature_image.py | SeanCline/UnicornHatWeather | 76f555fededfe72537e8b94e7fad5bfcb4441ce9 | [
"MIT"
] | 3 | 2020-12-12T19:14:08.000Z | 2022-03-08T21:48:21.000Z | temperature_image.py | SeanCline/UnicornHatWeather | 76f555fededfe72537e8b94e7fad5bfcb4441ce9 | [
"MIT"
] | null | null | null | temperature_image.py | SeanCline/UnicornHatWeather | 76f555fededfe72537e8b94e7fad5bfcb4441ce9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import config
from PIL import Image, ImageChops
import colorsys
# Returns an image representing a given character.
def open_char_image(character : str):
if len(character) != 1:
raise RuntimeError('Not a character.')
return Image.open(f'characters/{ord(character)}.gif').convert('R... | 37.765432 | 119 | 0.708728 |
6bcdb8688cf6a8012ddbffee38b54dc19f234299 | 1,606 | py | Python | packages/python/plotly/plotly/validators/isosurface/colorbar/title/font/__init__.py | sgn/plotly.py | 587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6 | [
"MIT"
] | 3 | 2020-02-04T21:39:20.000Z | 2020-11-17T19:07:07.000Z | packages/python/plotly/plotly/validators/isosurface/colorbar/title/font/__init__.py | sgn/plotly.py | 587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6 | [
"MIT"
] | 12 | 2020-06-06T01:22:26.000Z | 2022-03-12T00:13:42.000Z | packages/python/plotly/plotly/validators/isosurface/colorbar/title/font/__init__.py | sgn/plotly.py | 587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6 | [
"MIT"
] | 17 | 2019-11-21T14:11:29.000Z | 2019-11-21T15:26:23.000Z | import _plotly_utils.basevalidators
class SizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="size", parent_name="isosurface.colorbar.title.font", **kwargs
):
super(SizeValidator, self).__init__(
plotly_name=plotly_name,
parent_... | 28.678571 | 88 | 0.608966 |
5123fc417b32288f94de14279cb6f7e8966b00d0 | 35,537 | py | Python | tensorflow/python/debug/lib/stepper.py | imdone/tensorflow | bb4d1ef3861c83627ee9586b85ac3070a7d38335 | [
"Apache-2.0"
] | 1 | 2021-04-16T14:53:22.000Z | 2021-04-16T14:53:22.000Z | tensorflow/python/debug/lib/stepper.py | imdone/tensorflow | bb4d1ef3861c83627ee9586b85ac3070a7d38335 | [
"Apache-2.0"
] | 10 | 2018-02-04T18:41:52.000Z | 2018-05-02T09:00:46.000Z | tensorflow/python/debug/lib/stepper.py | imdone/tensorflow | bb4d1ef3861c83627ee9586b85ac3070a7d38335 | [
"Apache-2.0"
] | 4 | 2018-01-17T14:22:49.000Z | 2018-02-27T15:06:41.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.673891 | 109 | 0.688494 |
f2f2dcd3839b86f3ae6a64a0c4319dee7cf1d8e6 | 706 | py | Python | scripts/bcf2itol.py | jodyphelan/pathogenseq | 2e04190f25063d722ef653e819b94eb66407ea8d | [
"MIT"
] | null | null | null | scripts/bcf2itol.py | jodyphelan/pathogenseq | 2e04190f25063d722ef653e819b94eb66407ea8d | [
"MIT"
] | null | null | null | scripts/bcf2itol.py | jodyphelan/pathogenseq | 2e04190f25063d722ef653e819b94eb66407ea8d | [
"MIT"
] | 1 | 2018-05-11T14:54:51.000Z | 2018-05-11T14:54:51.000Z | #! /usr/bin/env python
import sys
import pathogenseq as ps
import argparse
def main(args):
bcf = ps.bcf(args.bcf_file)
bcf.itol_from_bcf(args.mutation_file,args.amino_acid,args.no_ref,args.no_missing)
parser = argparse.ArgumentParser(description='bcf2matrix.py',formatter_class=argparse.ArgumentDefaultsHelpFor... | 35.3 | 116 | 0.791785 |
2ba7f0cf6206c943ed4baa897e06fd67bddcd6ea | 4,085 | py | Python | library/page_data/martindale_app/banner_module_data.py | tate138/Martindale_Automation | 082169df9f88ddc96fa81365f9c5e8aa460f7d14 | [
"Apache-2.0"
] | null | null | null | library/page_data/martindale_app/banner_module_data.py | tate138/Martindale_Automation | 082169df9f88ddc96fa81365f9c5e8aa460f7d14 | [
"Apache-2.0"
] | null | null | null | library/page_data/martindale_app/banner_module_data.py | tate138/Martindale_Automation | 082169df9f88ddc96fa81365f9c5e8aa460f7d14 | [
"Apache-2.0"
] | null | null | null | class BannerModuleData:
####
# BANNER MODULE
####
BANNER_MODULE_HEADER = \
"//*[@id=\"ple_column-0\"]/div[2]"
CREATE_BANNER_RADIO_BUTTON = \
"//*[@id=\"ple_column-0-modal-gallery\"]/div/form/div[2]/div[2]/fieldset/div[1]/label"
CREATE_BANNER_MODULE_NAME_TEXT = \
"//*[@... | 50.432099 | 148 | 0.668543 |
f9b3a70e0f698d272dca0e50e9dbd77756e8f50d | 487 | py | Python | tests/mock_logger.py | fossabot/mosec | b803cffbbdb92212a2810597f8ce59fe14c1f728 | [
"Apache-2.0"
] | null | null | null | tests/mock_logger.py | fossabot/mosec | b803cffbbdb92212a2810597f8ce59fe14c1f728 | [
"Apache-2.0"
] | null | null | null | tests/mock_logger.py | fossabot/mosec | b803cffbbdb92212a2810597f8ce59fe14c1f728 | [
"Apache-2.0"
] | null | null | null | class MockLogger:
@staticmethod
def info(content):
print(f"\nMockLogger: info - {content}")
@staticmethod
def debug(content):
print(f"\nMockLogger: debug - {content}")
def warn(self, content):
self.warning(content)
@staticmethod
def warning(content):
print(... | 23.190476 | 51 | 0.61807 |
0593d78b4bc4ff04edbae26b1143e7fe0bc84369 | 1,749 | py | Python | cvpods/modeling/backbone/backbone.py | hanqiu-hq/cvpods | 597fa669151fdad87c250fa118a9e3a555f4fb5e | [
"Apache-2.0"
] | null | null | null | cvpods/modeling/backbone/backbone.py | hanqiu-hq/cvpods | 597fa669151fdad87c250fa118a9e3a555f4fb5e | [
"Apache-2.0"
] | null | null | null | cvpods/modeling/backbone/backbone.py | hanqiu-hq/cvpods | 597fa669151fdad87c250fa118a9e3a555f4fb5e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
# This file has been modified by Megvii ("Megvii Modifications").
# All Megvii Modifications are Copyright (C) 2019-2021 Megvii Inc. All rights reserved.
from abc import ABCMeta, abstractmethod
import to... | 30.155172 | 87 | 0.6255 |
3efaebc1bfd6238655adda37641b4f717a1fd28c | 13,935 | py | Python | test/basetest/utils.py | taiyu-len/taskwarrior | bd221a5adc43e5c70e05eb4f7a48d1db3d18555d | [
"MIT"
] | null | null | null | test/basetest/utils.py | taiyu-len/taskwarrior | bd221a5adc43e5c70e05eb4f7a48d1db3d18555d | [
"MIT"
] | 1 | 2022-03-29T02:41:58.000Z | 2022-03-31T17:57:20.000Z | test/basetest/utils.py | taiyu-len/taskwarrior | bd221a5adc43e5c70e05eb4f7a48d1db3d18555d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import division
import errno
import os
import sys
import socket
import signal
import functools
import atexit
import tempfile
from subprocess import Popen, PIPE, STDOUT
from threading import Thread
try:
from Queue import Queue, Empty
except ImportError:
from queue import Q... | 28.731959 | 79 | 0.610621 |
ecccdea0245ef4f362281e5eac26714853deb3ef | 840 | py | Python | students/k3342/laboratory_works/Kataeva_Veronika/laboratory_work_1/scoreboard/board/migrations/0005_race.py | KataevaVeronika/ITMO_ICT_WebProgramming_2020 | d8cf1d0479519bbafd34d4678e9eda2eabaeb0cf | [
"MIT"
] | null | null | null | students/k3342/laboratory_works/Kataeva_Veronika/laboratory_work_1/scoreboard/board/migrations/0005_race.py | KataevaVeronika/ITMO_ICT_WebProgramming_2020 | d8cf1d0479519bbafd34d4678e9eda2eabaeb0cf | [
"MIT"
] | null | null | null | students/k3342/laboratory_works/Kataeva_Veronika/laboratory_work_1/scoreboard/board/migrations/0005_race.py | KataevaVeronika/ITMO_ICT_WebProgramming_2020 | d8cf1d0479519bbafd34d4678e9eda2eabaeb0cf | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-04-17 18:11
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('board', '0004_auto_20200417_2050'),
]
operations = [
migrations.CreateModel(
name='Race',
... | 30 | 114 | 0.561905 |
ff8f673eef62ea35b2c0e443ea94157f9cf7ce6b | 31,378 | py | Python | xsd-fu/python/genshi/output.py | manics/ome-model | 835e6f2c6e3da3cb7f94f228458f707a83fd0b98 | [
"BSD-2-Clause"
] | null | null | null | xsd-fu/python/genshi/output.py | manics/ome-model | 835e6f2c6e3da3cb7f94f228458f707a83fd0b98 | [
"BSD-2-Clause"
] | null | null | null | xsd-fu/python/genshi/output.py | manics/ome-model | 835e6f2c6e3da3cb7f94f228458f707a83fd0b98 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | 37.177725 | 82 | 0.520683 |
f4a8ef704641041e5999edab8e9e05ef74b7033c | 2,379 | py | Python | elephant.py | danielvarga/Elephant | 6c0ff018b1fe1b2acc246a142b5fe34a605e41b0 | [
"Unlicense"
] | null | null | null | elephant.py | danielvarga/Elephant | 6c0ff018b1fe1b2acc246a142b5fe34a605e41b0 | [
"Unlicense"
] | null | null | null | elephant.py | danielvarga/Elephant | 6c0ff018b1fe1b2acc246a142b5fe34a605e41b0 | [
"Unlicense"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
if 0:
path = "points_elephant.npy"
# superfluous parameters will turn out to be zero
n_parameters = 10*4
else:
path = "points_fancy_elephant.npy"
# must be multiple of 4
n_parameters = 100*4
assert(n_parameters % 4 =... | 25.580645 | 90 | 0.67045 |
62022d14889d867127e13cb8bb9a7d6d4cc3e971 | 12,477 | py | Python | timeSeriesVisualisation.py | karhunenloeve/Twirlflake | a5a71279cf6f1001f6c8c45e05b7f75d2830dec6 | [
"MIT"
] | null | null | null | timeSeriesVisualisation.py | karhunenloeve/Twirlflake | a5a71279cf6f1001f6c8c45e05b7f75d2830dec6 | [
"MIT"
] | null | null | null | timeSeriesVisualisation.py | karhunenloeve/Twirlflake | a5a71279cf6f1001f6c8c45e05b7f75d2830dec6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Nov 24 10:42:29 2020
@author: Luciano Melodia
"""
import os
import numpy as np
import random
import timeSeriesConfig as cfg
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import matplotlib.cm as cm
import matplotlib
import chart_studio.plotly as py
import... | 32.577023 | 113 | 0.588282 |
cc7dae20a71817480a5112fcd8fc75e6b87a72f8 | 28,753 | py | Python | photutils/psf/epsf_stars.py | prajwel/photutils | f59bae804393be70131cb716d53207d3d56a83c7 | [
"BSD-3-Clause"
] | 167 | 2015-05-17T15:03:58.000Z | 2022-03-23T13:31:33.000Z | photutils/psf/epsf_stars.py | prajwel/photutils | f59bae804393be70131cb716d53207d3d56a83c7 | [
"BSD-3-Clause"
] | 701 | 2015-01-05T11:47:12.000Z | 2022-03-29T14:37:03.000Z | photutils/psf/epsf_stars.py | prajwel/photutils | f59bae804393be70131cb716d53207d3d56a83c7 | [
"BSD-3-Clause"
] | 119 | 2015-02-04T21:43:02.000Z | 2022-02-15T10:55:13.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides tools to extract cutouts of stars and data
structures to hold the cutouts for fitting and building ePSFs.
"""
import warnings
from astropy.nddata import NDData
from astropy.nddata.utils import (overlap_slices, NoOverlapError,
... | 36.258512 | 78 | 0.586095 |
6a499f76c82b055790f0c809f2a664890889ddf1 | 33,775 | py | Python | tracjsgantt/tracjsgantt.py | trac-hacks/trac-jsGantt | bea7edee90cf0769fba0a4b9b645c88b72f7e5fc | [
"BSD-3-Clause"
] | null | null | null | tracjsgantt/tracjsgantt.py | trac-hacks/trac-jsGantt | bea7edee90cf0769fba0a4b9b645c88b72f7e5fc | [
"BSD-3-Clause"
] | null | null | null | tracjsgantt/tracjsgantt.py | trac-hacks/trac-jsGantt | bea7edee90cf0769fba0a4b9b645c88b72f7e5fc | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2010-2014 Chris Nelson <Chris.Nelson@SIXNET.com>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import re
import time
from datetime import timedelta, datetime
from operator i... | 45.093458 | 513 | 0.564352 |
a0d7dee0382f1011c6ac2dcd68a2950c47317be8 | 1,036 | py | Python | src/dataset_reader/sequence_tagging.py | bupt-nlp/few-shot-learning-for-slu | 7ec3c9d245e8ce60d227c5414b7e1010174f5a62 | [
"Apache-2.0"
] | null | null | null | src/dataset_reader/sequence_tagging.py | bupt-nlp/few-shot-learning-for-slu | 7ec3c9d245e8ce60d227c5414b7e1010174f5a62 | [
"Apache-2.0"
] | 1 | 2022-02-18T16:45:39.000Z | 2022-02-18T16:45:39.000Z | src/dataset_reader/sequence_tagging.py | bupt-nlp/few-shot-learning-for-slu | 7ec3c9d245e8ce60d227c5414b7e1010174f5a62 | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from typing import List
from collections import defaultdict
import pandas as pd
from src.config import (
Config
)
from src.schema import SequenceTaggingInputExample
from src.dataset_reader.base import DataSetReader
class SnipsDataSetReader(DataSetReader):
def __init__(sel... | 26.564103 | 67 | 0.676641 |
3789b7b4fd0342c64a3028db0d9c5a55baaf8636 | 10,106 | py | Python | tests/ci/rally_verify.py | ewhseo/rally | 37e5475b7785e987173e118e89dbab357cd64b66 | [
"Apache-2.0"
] | null | null | null | tests/ci/rally_verify.py | ewhseo/rally | 37e5475b7785e987173e118e89dbab357cd64b66 | [
"Apache-2.0"
] | null | null | null | tests/ci/rally_verify.py | ewhseo/rally | 37e5475b7785e987173e118e89dbab357cd64b66 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# 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 ... | 35.459649 | 79 | 0.628933 |
3007c947ae0802e153061d3cf043925faa1d813a | 283 | py | Python | 6.py | ElandGroup/py-first | 221d87cf1b868d57925913314081349a45fb3859 | [
"Apache-2.0"
] | null | null | null | 6.py | ElandGroup/py-first | 221d87cf1b868d57925913314081349a45fb3859 | [
"Apache-2.0"
] | null | null | null | 6.py | ElandGroup/py-first | 221d87cf1b868d57925913314081349a45fb3859 | [
"Apache-2.0"
] | null | null | null | fruits = ["apple","orange","pear"]
for fruit in fruits:
print(fruit)
print(fruits[0])
print(fruits[1])
print(fruits[2])
for v in range(10):
print(v)
for v in range(5,10):
print(v)
for v in range(len(fruits)):
print(v)
print(fruits[v])
print(len(fruits)) | 11.791667 | 34 | 0.614841 |
7481c9e298370f034602faff6c045cb1fecf504b | 744 | py | Python | venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_vendor/packaging/__about__.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/_vendor/packaging/__about__.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/_vendor/packaging/__about__.py | eyern/instagram_clone | c18da15b35d28d91c3f63904af9d5da4e8e3e8ae | [
"MIT"
] | 2,803 | 2019-04-06T13:15:33.000Z | 2022-03-31T07:42:01.000Z | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
__all__ = [
"__title__",
"__summary__",
"__uri__",
"__vers... | 26.571429 | 79 | 0.724462 |
3b74b38bd2e449b2d7e28977991ad91426958327 | 2,336 | py | Python | src/rubrix/server/tasks/commons/task_factory.py | davidkartchner/rubrix | 33faa006d7498a806a9fd594036d4a42c7d70da2 | [
"Apache-2.0"
] | 1 | 2022-01-06T09:05:06.000Z | 2022-01-06T09:05:06.000Z | src/rubrix/server/tasks/commons/task_factory.py | davidkartchner/rubrix | 33faa006d7498a806a9fd594036d4a42c7d70da2 | [
"Apache-2.0"
] | null | null | null | src/rubrix/server/tasks/commons/task_factory.py | davidkartchner/rubrix | 33faa006d7498a806a9fd594036d4a42c7d70da2 | [
"Apache-2.0"
] | null | null | null | from typing import Any, Dict, List, Optional, Type
from pydantic import BaseModel
from rubrix.server.commons.errors import WrongTaskError
from rubrix.server.datasets.model import DatasetDB
from rubrix.server.tasks.commons import BaseRecord, TaskType
from rubrix.server.tasks.commons.metrics.model.base import BaseTaskM... | 29.948718 | 81 | 0.677654 |
a60b5be87f97cef216ce91314a29ab1e0378b810 | 30 | py | Python | tests/conftest.py | azmeuk/pytest-parallel | 5610f2fd6f90fdb17b63df2f9a329fe9f2b1a39c | [
"MIT"
] | 219 | 2018-05-30T00:34:22.000Z | 2022-03-28T07:42:44.000Z | tests/conftest.py | azmeuk/pytest-parallel | 5610f2fd6f90fdb17b63df2f9a329fe9f2b1a39c | [
"MIT"
] | 153 | 2019-05-02T19:06:45.000Z | 2020-12-15T10:39:03.000Z | tests/conftest.py | azmeuk/pytest-parallel | 5610f2fd6f90fdb17b63df2f9a329fe9f2b1a39c | [
"MIT"
] | 59 | 2018-08-27T07:12:18.000Z | 2022-03-18T03:21:39.000Z | pytest_plugins = ['pytester']
| 15 | 29 | 0.733333 |
8809b5dd3d564bc524209316bee5382f5565a9fd | 842 | py | Python | examples/quickstart.py | killionadmin/ILOscripts | 951f53df9bf58bc7b186a501e2d123645f0e55a3 | [
"Apache-2.0"
] | 27 | 2015-04-07T13:44:20.000Z | 2016-03-26T01:23:58.000Z | examples/quickstart.py | killionadmin/ILOscripts | 951f53df9bf58bc7b186a501e2d123645f0e55a3 | [
"Apache-2.0"
] | 5 | 2017-05-11T23:36:34.000Z | 2018-05-27T09:11:17.000Z | examples/quickstart.py | killionadmin/ILOscripts | 951f53df9bf58bc7b186a501e2d123645f0e55a3 | [
"Apache-2.0"
] | 13 | 2015-03-25T19:03:36.000Z | 2016-03-11T13:21:18.000Z | import sys
import redfish
# When running on the server locally use the following commented values
# iLO_host = "blobstore://."
# iLO_account = "None"
# iLO_password = "None"
# When running remotely connect using the iLO address, iLO account name,
# and password to send https requests
iLO_host = "https://10... | 29.034483 | 75 | 0.706651 |
023b36221ba83d14318b8cb009d6d2dd5ddbc11f | 4,134 | py | Python | facebook-echobot/lib/python2.7/site-packages/txaio/_common.py | mauriciofh/FacebookBot | c629922e1d90cf970c52c9649530a1f77f8f83d2 | [
"MIT"
] | null | null | null | facebook-echobot/lib/python2.7/site-packages/txaio/_common.py | mauriciofh/FacebookBot | c629922e1d90cf970c52c9649530a1f77f8f83d2 | [
"MIT"
] | null | null | null | facebook-echobot/lib/python2.7/site-packages/txaio/_common.py | mauriciofh/FacebookBot | c629922e1d90cf970c52c9649530a1f77f8f83d2 | [
"MIT"
] | 1 | 2018-11-07T12:52:07.000Z | 2018-11-07T12:52:07.000Z |
import math
from txaio.interfaces import IBatchedTimer
class _BatchedCall(object):
"""
Wraps IDelayedCall-implementing objects, implementing only the API
which txaio promised in the first place: .cancel
Do not create these yourself; use _BatchedTimer.call_later()
"""
def __init__(self, time... | 35.033898 | 94 | 0.597242 |
8666fdeef06c230df84c39fd441f5024eea1e8ed | 28,391 | py | Python | tests/unit/schema/test_schemas.py | niteoweb/openapi-core | ed39ee8fcf6a9e5c43411f891ec028a5f84bc0d8 | [
"BSD-3-Clause"
] | null | null | null | tests/unit/schema/test_schemas.py | niteoweb/openapi-core | ed39ee8fcf6a9e5c43411f891ec028a5f84bc0d8 | [
"BSD-3-Clause"
] | null | null | null | tests/unit/schema/test_schemas.py | niteoweb/openapi-core | ed39ee8fcf6a9e5c43411f891ec028a5f84bc0d8 | [
"BSD-3-Clause"
] | null | null | null | import datetime
import uuid
import mock
import pytest
from openapi_core.extensions.models.models import Model
from openapi_core.schema.schemas.enums import SchemaFormat, SchemaType
from openapi_core.schema.schemas.exceptions import (
InvalidSchemaValue, MultipleOneOfSchema, NoOneOfSchema, OpenAPISchemaError,
... | 28.970408 | 79 | 0.586489 |
3fbc3e36fee79c7be10893b225fd26ff84bdc509 | 3,619 | py | Python | examples/example.py | kyeongsoo/runlmc | abd369d2b72a9146cf4a21d5cc144e272c637e29 | [
"BSD-3-Clause"
] | null | null | null | examples/example.py | kyeongsoo/runlmc | abd369d2b72a9146cf4a21d5cc144e272c637e29 | [
"BSD-3-Clause"
] | null | null | null | examples/example.py | kyeongsoo/runlmc | abd369d2b72a9146cf4a21d5cc144e272c637e29 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
# get_ipython().run_line_magic('env', 'OMP_NUM_THREADS=1')
import os, sys
if os.path.basename(os.getcwd()) != 'runlmc':
os.chdir('..')
sys.path.append('benchmarks/benchlib')
from runlmc.models.interpolated_llgp import InterpolatedLLGP
from runlmc.lmc.functional_ke... | 21.801205 | 94 | 0.68693 |
08167550b2f6308d4bbc9386c64109468abc53a6 | 26,791 | py | Python | electra_pyt/configuration_utils.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | null | null | null | electra_pyt/configuration_utils.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | null | null | null | electra_pyt/configuration_utils.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 51.030476 | 193 | 0.661491 |
59cc51e70042824b02ceb3fe6e9169287cea1a5f | 2,619 | py | Python | site-packages/cinderclient/contrib/noauth.py | hariza17/freezer_libraries | e0bd890eba5e7438976fb3b4d66c41c128bab790 | [
"PSF-2.0"
] | 74 | 2015-01-29T20:10:47.000Z | 2022-03-03T05:09:00.000Z | site-packages/cinderclient/contrib/noauth.py | hariza17/freezer_libraries | e0bd890eba5e7438976fb3b4d66c41c128bab790 | [
"PSF-2.0"
] | 6 | 2015-08-10T10:23:42.000Z | 2022-02-16T02:28:22.000Z | site-packages/cinderclient/contrib/noauth.py | hariza17/freezer_libraries | e0bd890eba5e7438976fb3b4d66c41c128bab790 | [
"PSF-2.0"
] | 125 | 2015-02-24T11:04:51.000Z | 2021-12-23T01:28:05.000Z | # 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 agreed to in... | 33.576923 | 78 | 0.624284 |
c3536440e1add8767187c5961271975ec787e28b | 959 | py | Python | third_party/webrtc/src/chromium/src/third_party/webdriver/pylib/test/selenium/selenium_test_suite_headless.py | bopopescu/webrtc-streaming-node | 727a441204344ff596401b0253caac372b714d91 | [
"MIT"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | third_party/webrtc/src/chromium/src/third_party/webdriver/pylib/test/selenium/selenium_test_suite_headless.py | bopopescu/webrtc-streaming-node | 727a441204344ff596401b0253caac372b714d91 | [
"MIT"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | third_party/webrtc/src/chromium/src/third_party/webdriver/pylib/test/selenium/selenium_test_suite_headless.py | bopopescu/webrtc-streaming-node | 727a441204344ff596401b0253caac372b714d91 | [
"MIT"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | """
Copyright 2011 Software Freedom Conservancy.
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... | 29.96875 | 73 | 0.74244 |
86aadf93e7fc24127c6c5e4a25aab57d6f03fea1 | 17,433 | py | Python | tf_quant_finance/models/ito_process.py | nethask/tf-quant-finance | 59aea04121405302a1b7804fb72e57e65cae0b47 | [
"Apache-2.0"
] | 1 | 2021-07-05T14:32:11.000Z | 2021-07-05T14:32:11.000Z | tf_quant_finance/models/ito_process.py | FranklinMa810/tf-quant-finance | 59aea04121405302a1b7804fb72e57e65cae0b47 | [
"Apache-2.0"
] | null | null | null | tf_quant_finance/models/ito_process.py | FranklinMa810/tf-quant-finance | 59aea04121405302a1b7804fb72e57e65cae0b47 | [
"Apache-2.0"
] | 1 | 2020-04-24T22:20:18.000Z | 2020-04-24T22:20:18.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 40.26097 | 111 | 0.660242 |
b6719bf3f4c15a1446a5673db54090dc9ea2971a | 5,452 | py | Python | functions/source/CreateEnvironment/index.py | DuckDao/quickstart-codepipeline-bluegreen-deployment | cd8b9b2de7a42c108be5bf24255bbb3bd5305bd5 | [
"Apache-2.0"
] | 52 | 2018-07-26T19:01:53.000Z | 2021-10-30T16:46:56.000Z | functions/source/CreateEnvironment/index.py | nicolaskenner/quickstart-codepipeline-bluegreen-deployment | 5586d64a6e482a916f81a2732aaaebc2b3677fc3 | [
"Apache-2.0"
] | 4 | 2018-05-24T18:53:35.000Z | 2021-07-06T05:16:54.000Z | functions/source/CreateEnvironment/index.py | nicolaskenner/quickstart-codepipeline-bluegreen-deployment | 5586d64a6e482a916f81a2732aaaebc2b3677fc3 | [
"Apache-2.0"
] | 43 | 2018-05-10T00:41:46.000Z | 2022-02-18T22:06:23.000Z | import boto3
import json
import traceback
import sys
import logging
import threading
import time
beanstalkclient = boto3.client('elasticbeanstalk')
codepipelineclient = boto3.client('codepipeline')
def handler(event, context):
timer = threading.Timer((context.get_remaining_time_in_millis() / 1000.00) - 0.5, timeo... | 43.269841 | 216 | 0.680851 |
469a7b8450904f46053b374129fae9720186b5e1 | 752 | py | Python | leetcode/30DayChallenge/week2/4_diameter_bst.py | Gaurav-Pande/DataStructures | 0e4af391274e33a9bb9f999a9032b74d06fc878e | [
"MIT"
] | 5 | 2018-09-14T13:14:34.000Z | 2021-12-29T11:07:35.000Z | leetcode/30DayChallenge/week2/4_diameter_bst.py | Gaurav-Pande/DataStructures | 0e4af391274e33a9bb9f999a9032b74d06fc878e | [
"MIT"
] | null | null | null | leetcode/30DayChallenge/week2/4_diameter_bst.py | Gaurav-Pande/DataStructures | 0e4af391274e33a9bb9f999a9032b74d06fc878e | [
"MIT"
] | null | null | null | # link: https://leetcode.com/explore/challenge/card/30-day-leetcoding-challenge/529/week-2/3293/
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def diameterOfBinaryTree(s... | 19.789474 | 96 | 0.606383 |
4f94b70caca4d2b6cd6848a0359e23754f9cacd2 | 14,589 | py | Python | tests/unit/modules/test_win_groupadd.py | hvbarker/salt | 0b1e299b8983854bd55163439e4ac20d81a9dab7 | [
"Apache-2.0"
] | 1 | 2020-05-17T18:00:38.000Z | 2020-05-17T18:00:38.000Z | tests/unit/modules/test_win_groupadd.py | hvbarker/salt | 0b1e299b8983854bd55163439e4ac20d81a9dab7 | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/test_win_groupadd.py | hvbarker/salt | 0b1e299b8983854bd55163439e4ac20d81a9dab7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
:codeauthor: Jayesh Kariya <jayeshk@saltstack.com>
"""
# Import Python Libs
from __future__ import absolute_import, print_function, unicode_literals
# Import Salt Libs
import salt.modules.win_groupadd as win_groupadd
import salt.utils.win_functions
# Import Salt Testing Libs
from test... | 34.901914 | 119 | 0.587703 |
1abfbe9c65a87f718ec052856a123254c1f8ac71 | 501 | py | Python | number_parser/data/ak.py | hellc/number-parser | 1e62fe5562f334f1fbac7eeb3b208e98b255db5f | [
"BSD-3-Clause"
] | null | null | null | number_parser/data/ak.py | hellc/number-parser | 1e62fe5562f334f1fbac7eeb3b208e98b255db5f | [
"BSD-3-Clause"
] | null | null | null | number_parser/data/ak.py | hellc/number-parser | 1e62fe5562f334f1fbac7eeb3b208e98b255db5f | [
"BSD-3-Clause"
] | null | null | null | info = {
"UNIT_NUMBERS": {
"a-ɛ-tɔ-so-hwee": 0,
"hwee": 0,
"a-ɛ-di-kane": 1,
"biako": 1,
"koro": 1,
"abien": 2,
"abiasa": 3,
"anan": 4,
"anum": 5,
"asia": 6,
"asuon": 7,
"awɔtwe": 8,
"akron": 9
},
"DIRECT... | 18.555556 | 28 | 0.37525 |
f57b7aec7b4f6f5f2cbb54c1372ba4e16e1f4ae7 | 3,425 | py | Python | nPYc/plotting/_plotDiscreteLoadings.py | ghaggart/nPYc-Toolbox | d0160b476581fbd695f3f5f0303048466ed95864 | [
"MIT"
] | 14 | 2018-01-23T23:10:40.000Z | 2022-02-03T15:15:52.000Z | nPYc/plotting/_plotDiscreteLoadings.py | ghaggart/nPYc-Toolbox | d0160b476581fbd695f3f5f0303048466ed95864 | [
"MIT"
] | 76 | 2018-01-24T17:37:25.000Z | 2022-03-23T14:12:54.000Z | nPYc/plotting/_plotDiscreteLoadings.py | ghaggart/nPYc-Toolbox | d0160b476581fbd695f3f5f0303048466ed95864 | [
"MIT"
] | 11 | 2018-01-25T11:35:47.000Z | 2022-03-07T15:04:02.000Z | import numpy
import seaborn as sns
import matplotlib.pyplot as plt
from pyChemometrics.ChemometricsPCA import ChemometricsPCA
from nPYc.objects import Dataset
def plotDiscreteLoadings(npycDataset, pcaModel, nbComponentPerRow=3, firstComponent=1, metadataColumn='Feature Name', sort=True, savePath=None, figureFormat='pn... | 36.052632 | 192 | 0.741606 |
0719590f4673ff11b6e57d81a9c722c86180f5b6 | 1,667 | py | Python | src/action/PawnMove.py | jniestroy/quoridor_bot | afe5acba84a60b3ed03c447b2426794cf1000531 | [
"MIT"
] | null | null | null | src/action/PawnMove.py | jniestroy/quoridor_bot | afe5acba84a60b3ed03c447b2426794cf1000531 | [
"MIT"
] | null | null | null | src/action/PawnMove.py | jniestroy/quoridor_bot | afe5acba84a60b3ed03c447b2426794cf1000531 | [
"MIT"
] | null | null | null | #
# PawnMove.py
#
# @author Alain Rinder
# @date 2017.06.02
# @version 0.1
#
from src.action.IAction import *
class PawnMove(IAction):
def __init__(self, fromCoord, toCoord, throughCoord = None):
self.fromCoord = fromCoord
self.toCoord = toCoord
self.throughCoord = thr... | 36.23913 | 139 | 0.678464 |
3db4d546d1c05f36687b755f020edcdbb855382b | 3,740 | py | Python | src/figures/model_comp.py | rodluger/Z-dependent-DWDs | d61cf2b883ed5ef204cd65aae42c2cb690189251 | [
"MIT"
] | null | null | null | src/figures/model_comp.py | rodluger/Z-dependent-DWDs | d61cf2b883ed5ef204cd65aae42c2cb690189251 | [
"MIT"
] | null | null | null | src/figures/model_comp.py | rodluger/Z-dependent-DWDs | d61cf2b883ed5ef204cd65aae42c2cb690189251 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import astropy.units as u
models = ["log_uniform", "qcflag_4", "alpha_0.25", "alpha_5"]
model_names = ["fiducial", r"q3", r"$\alpha25$", r"$\alpha5$"]
colors = sns.color_palette("mako", n_colors=len(models))
Tobs = 4 * u.yr
... | 26.153846 | 88 | 0.573529 |
80fda888c355ffe93c1fce36666c28d58d065d90 | 5,813 | py | Python | client/verta/verta/registry/_docker_image.py | vishalbelsare/modeldb | 0c135828dae668c769a4c4a5e933d38a934a9d10 | [
"Apache-2.0"
] | 835 | 2017-02-08T20:14:24.000Z | 2020-03-12T17:37:49.000Z | client/verta/verta/registry/_docker_image.py | vishalbelsare/modeldb | 0c135828dae668c769a4c4a5e933d38a934a9d10 | [
"Apache-2.0"
] | 651 | 2019-04-18T12:55:07.000Z | 2022-03-31T23:45:09.000Z | client/verta/verta/registry/_docker_image.py | vishalbelsare/modeldb | 0c135828dae668c769a4c4a5e933d38a934a9d10 | [
"Apache-2.0"
] | 170 | 2017-02-13T14:49:22.000Z | 2020-02-19T17:59:12.000Z | # -*- coding: utf-8 -*-
from verta.external import six
from verta._protos.public.registry import RegistryService_pb2
from verta import environment
from verta._internal_utils import arg_handler
class DockerImage(object):
"""Docker image information.
For use around :meth:`RegisteredModelVersion.log_docker()... | 28.495098 | 123 | 0.599002 |
7184f30c003f21d72a9fb04be779995a0bab3f7d | 330 | py | Python | ao2j/lt1300/017/A.py | neshdev/competitive-prog | f406a85d62e83c3dbd3ad41f42ae121ebefd0fda | [
"MIT"
] | null | null | null | ao2j/lt1300/017/A.py | neshdev/competitive-prog | f406a85d62e83c3dbd3ad41f42ae121ebefd0fda | [
"MIT"
] | null | null | null | ao2j/lt1300/017/A.py | neshdev/competitive-prog | f406a85d62e83c3dbd3ad41f42ae121ebefd0fda | [
"MIT"
] | null | null | null | n = int(input())
lefts = 0
rights = 0
for _ in range(n):
l,r = [int(x) for x in input().split()]
lefts += l
rights += r
def counts(doors, n):
closed = n - doors
opened = doors
if opened > closed:
return closed
else:
return opened
ans = counts(lefts, n) + counts(rights, n)
... | 17.368421 | 43 | 0.560606 |
cd39a19e299fcd33b6add9c9f737f3ee0d0e974a | 3,754 | py | Python | services/app/src/tests/test_profile.py | chimailo/livia | 82447871a2ad0dc5e964b6298140409b27b12a7b | [
"MIT"
] | null | null | null | services/app/src/tests/test_profile.py | chimailo/livia | 82447871a2ad0dc5e964b6298140409b27b12a7b | [
"MIT"
] | null | null | null | services/app/src/tests/test_profile.py | chimailo/livia | 82447871a2ad0dc5e964b6298140409b27b12a7b | [
"MIT"
] | null | null | null | import json
import unittest
from src.tests.base import BaseTestCase
from src.tests.utils import create_token, add_user
class TestProfileBlueprint(BaseTestCase):
def test_check_username_does_not_exist(self):
token = create_token()
response = self.client.post(
'/api/profile/check-userna... | 36.096154 | 66 | 0.574054 |
3fcd9c717539e67e128f2b028eb390582231b755 | 5,453 | py | Python | mcculw-master/examples/ui/ULTI01.py | Tridentflayer/structure_tester_project | 0c67e450f3c1cd29dd9385ce407cc1407d9b9251 | [
"MIT"
] | null | null | null | mcculw-master/examples/ui/ULTI01.py | Tridentflayer/structure_tester_project | 0c67e450f3c1cd29dd9385ce407cc1407d9b9251 | [
"MIT"
] | null | null | null | mcculw-master/examples/ui/ULTI01.py | Tridentflayer/structure_tester_project | 0c67e450f3c1cd29dd9385ce407cc1407d9b9251 | [
"MIT"
] | null | null | null | """
File: ULTI01.py
Library Call Demonstrated: mcculw.ul.t_in()
Purpose: Reads a temperature input channel.
Demonstration: Displays the temperature input.
Special Requirements: Unless the board at BoardNum(=0) does not use
EXP ... | 33.869565 | 79 | 0.597286 |
56cf8b2ff9a6bf7dcda033c97ae2c3a444a91cf5 | 43,568 | py | Python | nnunet/network_architecture/custom_modules/error.py | PingjiaZhang/nnUNet | f07bd13556f59ef3689fc53f5294de78764d3ae9 | [
"Apache-2.0"
] | null | null | null | nnunet/network_architecture/custom_modules/error.py | PingjiaZhang/nnUNet | f07bd13556f59ef3689fc53f5294de78764d3ae9 | [
"Apache-2.0"
] | null | null | null | nnunet/network_architecture/custom_modules/error.py | PingjiaZhang/nnUNet | f07bd13556f59ef3689fc53f5294de78764d3ae9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany
#
# 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://w... | 52.681983 | 137 | 0.606959 |
32f3a24a5216cc73af31b49dd39f24450f7e9bd4 | 978 | py | Python | packages/kdpart/package.py | hirschsn/spack-hirschsn | fbcb4ca03a3e3bca4006de4dcb6462edfef7bce3 | [
"MIT"
] | null | null | null | packages/kdpart/package.py | hirschsn/spack-hirschsn | fbcb4ca03a3e3bca4006de4dcb6462edfef7bce3 | [
"MIT"
] | null | null | null | packages/kdpart/package.py | hirschsn/spack-hirschsn | fbcb4ca03a3e3bca4006de4dcb6462edfef7bce3 | [
"MIT"
] | null | null | null | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Kdpart(MakefilePackage):
"""Simple struct-of-arrays implementation of a k-d tree over a di... | 30.5625 | 95 | 0.687117 |
04b746fec8b36475dc42da2437346164e10c9421 | 420 | py | Python | 2014/12/fc_2014_12_25.py | mfwarren/FreeCoding | 58ac87f35ad2004a3514782556762ee0ed72c39a | [
"MIT"
] | null | null | null | 2014/12/fc_2014_12_25.py | mfwarren/FreeCoding | 58ac87f35ad2004a3514782556762ee0ed72c39a | [
"MIT"
] | 1 | 2015-04-27T01:43:45.000Z | 2015-04-27T01:43:45.000Z | 2014/12/fc_2014_12_25.py | mfwarren/FreeCoding | 58ac87f35ad2004a3514782556762ee0ed72c39a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# imports go here
from flask import Flask, render_template
from flask.ext.script import Manager
from flask.ext.bootstrap import Bootstrap
#
# Free Coding session for 2014-12-25
# Written by Matt Warren
#
app = Flask(__name__)
manager = Manager(app)
bootstrap = Bootstrap(app)
@app.route('/')
... | 17.5 | 41 | 0.728571 |
76cec6f05bc17b958cfbc73e7480e6cc1b87e9e1 | 14,306 | py | Python | src/azure-cli/azure/cli/command_modules/keyvault/_validators.py | changlong-liu/azure-cli | c4e796bbe7db0cef4ac34df8413067c2c0c98324 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/keyvault/_validators.py | changlong-liu/azure-cli | c4e796bbe7db0cef4ac34df8413067c2c0c98324 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/keyvault/_validators.py | changlong-liu/azure-cli | c4e796bbe7db0cef4ac34df8413067c2c0c98324 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 37.158442 | 110 | 0.66217 |
804c764fd2a0e3b39fe2317106a18bfaff40abc2 | 6,663 | py | Python | bot.py | le-sanglier/reddit_bots | 6e45914b7156348383dc585915b3f0b9d6f029c9 | [
"MIT"
] | null | null | null | bot.py | le-sanglier/reddit_bots | 6e45914b7156348383dc585915b3f0b9d6f029c9 | [
"MIT"
] | null | null | null | bot.py | le-sanglier/reddit_bots | 6e45914b7156348383dc585915b3f0b9d6f029c9 | [
"MIT"
] | null | null | null | import praw
import re
import random
import os
import threading
#TODO find blacklisted sites, test, change 'crypto_cust_service' to submission.author and comment.author.name, test
def comment_loop():
for comment in subreddit.stream.comments():
for blink in blacklist:
normalized_comment = commen... | 61.12844 | 300 | 0.590575 |
629c19c16462684c16e91d4000973405610399c3 | 2,939 | py | Python | torchvision/ops/_register_onnx_ops.py | yassineAlouini/vision-1 | ee26e9c260a255e2afb5e691e713349529170c8b | [
"BSD-3-Clause"
] | 1 | 2022-02-14T09:16:02.000Z | 2022-02-14T09:16:02.000Z | torchvision/ops/_register_onnx_ops.py | yassineAlouini/vision-1 | ee26e9c260a255e2afb5e691e713349529170c8b | [
"BSD-3-Clause"
] | null | null | null | torchvision/ops/_register_onnx_ops.py | yassineAlouini/vision-1 | ee26e9c260a255e2afb5e691e713349529170c8b | [
"BSD-3-Clause"
] | null | null | null | import sys
import warnings
import torch
_onnx_opset_version = 11
def _register_custom_op():
from torch.onnx.symbolic_helper import parse_args
from torch.onnx.symbolic_opset11 import select, squeeze, unsqueeze
from torch.onnx.symbolic_opset9 import _cast_Long
@parse_args("v", "v", "f")
def symbo... | 43.865672 | 118 | 0.650902 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.