hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6266929bceaa00edbf464b5a4d2470f14089186d | 16,271 | py | Python | test/test_info_api.py | fattureincloud/fattureincloud-python-sdk | f3a40fac345751014ea389680efdaef90f03bac1 | [
"MIT"
] | 2 | 2022-02-17T08:33:17.000Z | 2022-03-22T09:27:00.000Z | test/test_info_api.py | fattureincloud/fattureincloud-python-sdk | f3a40fac345751014ea389680efdaef90f03bac1 | [
"MIT"
] | null | null | null | test/test_info_api.py | fattureincloud/fattureincloud-python-sdk | f3a40fac345751014ea389680efdaef90f03bac1 | [
"MIT"
] | null | null | null | """
Fatture in Cloud API v2 - API Reference
Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 400.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. # noq... | 49.606707 | 587 | 0.685698 | 13,160 | 0.808801 | 0 | 0 | 0 | 0 | 0 | 0 | 3,207 | 0.197099 |
62691bca9ef85cd31b36e1e397faed73d833bd04 | 2,992 | py | Python | tests/test_year_2018.py | l0pht511/jpholiday | 083145737b61fad3420c066968c4329d17dc3baf | [
"MIT"
] | 179 | 2017-10-05T12:41:10.000Z | 2022-03-24T22:18:25.000Z | tests/test_year_2018.py | l0pht511/jpholiday | 083145737b61fad3420c066968c4329d17dc3baf | [
"MIT"
] | 17 | 2018-10-23T00:51:13.000Z | 2021-11-22T11:40:06.000Z | tests/test_year_2018.py | l0pht511/jpholiday | 083145737b61fad3420c066968c4329d17dc3baf | [
"MIT"
] | 17 | 2018-10-19T11:13:07.000Z | 2022-01-29T08:05:56.000Z | # coding: utf-8
import datetime
import unittest
import jpholiday
class TestYear2018(unittest.TestCase):
def test_holiday(self):
"""
2018年祝日
"""
self.assertEqual(jpholiday.is_holiday_name(datetime.date(2018, 1, 1)), '元日')
self.assertEqual(jpholiday.is_holiday_name(datetime.... | 53.428571 | 94 | 0.684492 | 3,153 | 0.978585 | 0 | 0 | 0 | 0 | 0 | 0 | 488 | 0.151459 |
6269876471cdc3a3de7a8b8ea2665c1065be9cdf | 222 | py | Python | src/server_3D/API/Rice/miscellaneous/tools.py | robertpardillo/Funnel | f45e419f55e085bbb95e17c47b4c94a7c625ba9b | [
"MIT"
] | 1 | 2021-05-18T16:10:49.000Z | 2021-05-18T16:10:49.000Z | src/server_3D/API/Rice/miscellaneous/tools.py | robertpardillo/Funnel | f45e419f55e085bbb95e17c47b4c94a7c625ba9b | [
"MIT"
] | null | null | null | src/server_3D/API/Rice/miscellaneous/tools.py | robertpardillo/Funnel | f45e419f55e085bbb95e17c47b4c94a7c625ba9b | [
"MIT"
] | null | null | null |
import numpy
__author__ = 'roberto'
def rad_degrees(type_to, value):
if type_to == 'rad':
value = value*numpy.pi/180
if type_to == 'deg':
value = value*180/numpy.pi
return value | 17.076923 | 35 | 0.581081 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 0.085586 |
6269ffcac7da3b6435494d0d70dbe0aa69f6f55f | 324 | py | Python | conjur_api/__init__.py | cyberark/conjur-api-python | 7dd1819bf68042620a06f38e395c3eb2989202a9 | [
"Apache-2.0"
] | 1 | 2022-03-09T18:25:29.000Z | 2022-03-09T18:25:29.000Z | conjur_api/__init__.py | cyberark/conjur-api-python | 7dd1819bf68042620a06f38e395c3eb2989202a9 | [
"Apache-2.0"
] | null | null | null | conjur_api/__init__.py | cyberark/conjur-api-python | 7dd1819bf68042620a06f38e395c3eb2989202a9 | [
"Apache-2.0"
] | null | null | null | """
conjur_api
Package containing classes that are responsible for communicating with the Conjur server
"""
__version__ = "0.0.5"
from conjur_api.client import Client
from conjur_api.interface import CredentialsProviderInterface
from conjur_api import models
from conjur_api import errors
from conjur_api import provid... | 24.923077 | 88 | 0.83642 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 0.354938 |
626aa70e6e3d3a3eb14c59bc2e95240dc23ccc35 | 9,346 | py | Python | examples/test_BoxCutter.py | pompiduskus/pybox2d | 4393bc93df4828267d2143327abd76de6f146750 | [
"Zlib"
] | null | null | null | examples/test_BoxCutter.py | pompiduskus/pybox2d | 4393bc93df4828267d2143327abd76de6f146750 | [
"Zlib"
] | null | null | null | examples/test_BoxCutter.py | pompiduskus/pybox2d | 4393bc93df4828267d2143327abd76de6f146750 | [
"Zlib"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# C++ version Copyright (c) 2006-2007 Erin Catto http://www.box2d.org
# Python version by Ken Lauer / sirkne at gmail dot com
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any dam... | 35.267925 | 105 | 0.591162 | 2,022 | 0.216349 | 0 | 0 | 0 | 0 | 0 | 0 | 1,796 | 0.192168 |
626b51aefb27ae8f4702b720697fa00e55d0360c | 1,309 | py | Python | robot_simulator/grid/positioning.py | darshikaf/toy-robot-simulator | 408d160033728d65e9bac376d3af7fc84c520f31 | [
"MIT"
] | null | null | null | robot_simulator/grid/positioning.py | darshikaf/toy-robot-simulator | 408d160033728d65e9bac376d3af7fc84c520f31 | [
"MIT"
] | null | null | null | robot_simulator/grid/positioning.py | darshikaf/toy-robot-simulator | 408d160033728d65e9bac376d3af7fc84c520f31 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import annotations
import math
class Point:
def __init__(self, x: int = 0, y: int = 0):
self.x = x
self.y = y
def __eq__(self, other: object) -> bool:
if isinstance(other, Point):
return (self.x == other.x) an... | 27.270833 | 71 | 0.578304 | 1,205 | 0.92055 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.033613 |
626ba702d88f0299279f562b39bddc29df5ddcaa | 6,128 | py | Python | src/utils/zarr_to_netcdf.py | jhkennedy/itslive | 68b89b337548fe4e86a3d066c3fb2e4c2aaeed70 | [
"MIT"
] | 8 | 2021-02-19T02:29:29.000Z | 2021-11-10T05:26:30.000Z | src/utils/zarr_to_netcdf.py | jhkennedy/itslive | 68b89b337548fe4e86a3d066c3fb2e4c2aaeed70 | [
"MIT"
] | 11 | 2021-03-29T02:15:38.000Z | 2021-11-18T23:29:33.000Z | src/utils/zarr_to_netcdf.py | jhkennedy/itslive | 68b89b337548fe4e86a3d066c3fb2e4c2aaeed70 | [
"MIT"
] | 3 | 2021-12-06T06:05:34.000Z | 2022-03-13T16:44:44.000Z | """
Script to convert Zarr store to the NetCDF format file.
Usage:
python zarr_to_netcdf.py -i ZarrStoreName -o NetCDFFileName
Convert Zarr data stored in ZarrStoreName to the NetCDF file NetCDFFileName.
"""
import argparse
import timeit
import warnings
import xarray as xr
from itscube_types import Coords, DataVars... | 39.535484 | 90 | 0.557115 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,774 | 0.452676 |
626c09d5e7442d6e48e408bb35182589e7d6f723 | 87 | py | Python | tests/periodicities/Business_Day/Cycle_Business_Day_200_B_24.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/periodicities/Business_Day/Cycle_Business_Day_200_B_24.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/periodicities/Business_Day/Cycle_Business_Day_200_B_24.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.tests.periodicities.period_test as per
per.buildModel((24 , 'B' , 200));
| 17.4 | 50 | 0.724138 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0.034483 |
626c365969d9ff73eed75430ed790344b66ecdd6 | 932 | py | Python | conanfile.py | maurodelazeri/conan-cpp-httplib | 1a6ce1f1a79eb43071e8dc1bb6f84fba010aabd3 | [
"MIT"
] | null | null | null | conanfile.py | maurodelazeri/conan-cpp-httplib | 1a6ce1f1a79eb43071e8dc1bb6f84fba010aabd3 | [
"MIT"
] | null | null | null | conanfile.py | maurodelazeri/conan-cpp-httplib | 1a6ce1f1a79eb43071e8dc1bb6f84fba010aabd3 | [
"MIT"
] | 1 | 2019-12-03T19:35:48.000Z | 2019-12-03T19:35:48.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile, CMake, tools
import os
class CppHttpLibConan(ConanFile):
name = "cpp-httplib"
version = "0.2.1"
url = "https://github.com/zinnion/conan-cpp-httplib"
description = "A single file C++11 header-only HTTP/HTTPS server and client l... | 32.137931 | 88 | 0.651288 | 830 | 0.890558 | 0 | 0 | 0 | 0 | 0 | 0 | 358 | 0.38412 |
626ca157c2ac9db263365279311bac86dc999674 | 328 | py | Python | backmarker/api/viewsets/driver_viewset.py | jmp/backmarker | e12a094d92dec798ad10aa8890fabe84f946c303 | [
"MIT"
] | null | null | null | backmarker/api/viewsets/driver_viewset.py | jmp/backmarker | e12a094d92dec798ad10aa8890fabe84f946c303 | [
"MIT"
] | null | null | null | backmarker/api/viewsets/driver_viewset.py | jmp/backmarker | e12a094d92dec798ad10aa8890fabe84f946c303 | [
"MIT"
] | null | null | null | from rest_framework.viewsets import ReadOnlyModelViewSet
from backmarker.api.serializers.driver_serializer import DriverSerializer
from backmarker.models.driver import Driver
class DriverViewSet(ReadOnlyModelViewSet):
queryset = Driver.objects.all()
serializer_class = DriverSerializer
lookup_field = "ref... | 29.818182 | 73 | 0.829268 | 149 | 0.454268 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.033537 |
626cc4db6e624b921fb50a7db02432aa617a9dbd | 215 | py | Python | shell/response.py | YorkSu/deepgo | 2f22ad50d2958a4f1c7dfc0af6fcd448f5e7e18d | [
"Apache-2.0"
] | null | null | null | shell/response.py | YorkSu/deepgo | 2f22ad50d2958a4f1c7dfc0af6fcd448f5e7e18d | [
"Apache-2.0"
] | null | null | null | shell/response.py | YorkSu/deepgo | 2f22ad50d2958a4f1c7dfc0af6fcd448f5e7e18d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Response
======
Response Class
"""
from deepgo.core.kernel.popo import VO
class Response(VO):
def __init__(self):
self.code = 0
def json(self):
return self.__dict__
| 11.315789 | 38 | 0.609302 | 103 | 0.47907 | 0 | 0 | 0 | 0 | 0 | 0 | 65 | 0.302326 |
626d65ee956ce1cac3af4218ef107258e83fd84e | 4,793 | py | Python | src/python/pants/option/options_fingerprinter_test.py | bastianwegge/pants | 43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2 | [
"Apache-2.0"
] | 1,806 | 2015-01-05T07:31:00.000Z | 2022-03-31T11:35:41.000Z | src/python/pants/option/options_fingerprinter_test.py | bastianwegge/pants | 43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2 | [
"Apache-2.0"
] | 9,565 | 2015-01-02T19:01:59.000Z | 2022-03-31T23:25:16.000Z | src/python/pants/option/options_fingerprinter_test.py | ryanking/pants | e45b00d2eb467b599966bca262405a5d74d27bdd | [
"Apache-2.0"
] | 443 | 2015-01-06T20:17:57.000Z | 2022-03-31T05:28:17.000Z | # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pathlib import Path
import pytest
from pants.option.custom_types import (
DictValueComponent,
ListValueComponent,
UnsetBool,
dict_with_files_option,
dir_option,
... | 31.741722 | 99 | 0.636345 | 0 | 0 | 0 | 0 | 72 | 0.015022 | 0 | 0 | 820 | 0.171083 |
626e4c17d238ffdd4b719fcf03cef903734ecb10 | 201 | py | Python | secondstring.py | Kokouvi/reversorder | 157e39eaf424d816715080dbce0850670836e8fd | [
"MIT"
] | null | null | null | secondstring.py | Kokouvi/reversorder | 157e39eaf424d816715080dbce0850670836e8fd | [
"MIT"
] | null | null | null | secondstring.py | Kokouvi/reversorder | 157e39eaf424d816715080dbce0850670836e8fd | [
"MIT"
] | null | null | null | str = "The quick brown fox jumps over the lazy dog." # initial string
reversed = "".join(reversed(str)) #.join() method merges all of the charactera
print(reversed[0:43:2]) # print the reversed string
| 50.25 | 78 | 0.731343 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 0.671642 |
626e9153453be95674085a5a9f6b92944cbfbd68 | 1,660 | py | Python | image_extractor.py | IstoVisio/script_image_extractor | dda8c8bb96a16d1ffe5d52af198b66bd619edc4f | [
"MIT"
] | null | null | null | image_extractor.py | IstoVisio/script_image_extractor | dda8c8bb96a16d1ffe5d52af198b66bd619edc4f | [
"MIT"
] | null | null | null | image_extractor.py | IstoVisio/script_image_extractor | dda8c8bb96a16d1ffe5d52af198b66bd619edc4f | [
"MIT"
] | null | null | null | import os
import sys
import syglass as sy
from syglass import pyglass
import numpy as np
import tifffile
import subprocess
def extract(projectPath):
project = sy.get_project(projectPath)
head, tail = os.path.split(projectPath)
# Get a dictionary showing the number of blocks in each level
#codebreak()
resolution_... | 29.642857 | 79 | 0.704217 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 561 | 0.337952 |
627004517552f92e1e2ec8fa749130e02a42b77f | 7,531 | py | Python | scaffoldgraph/analysis/enrichment.py | trumanw/ScaffoldGraph | a594e5c5effe6c5e45c0061a235ccbeb64e416f9 | [
"MIT"
] | 121 | 2019-12-12T15:30:16.000Z | 2022-02-28T02:00:54.000Z | scaffoldgraph/analysis/enrichment.py | trumanw/ScaffoldGraph | a594e5c5effe6c5e45c0061a235ccbeb64e416f9 | [
"MIT"
] | 8 | 2020-04-04T15:37:26.000Z | 2021-11-17T07:30:31.000Z | scaffoldgraph/analysis/enrichment.py | trumanw/ScaffoldGraph | a594e5c5effe6c5e45c0061a235ccbeb64e416f9 | [
"MIT"
] | 28 | 2019-12-16T11:58:53.000Z | 2021-11-19T09:57:46.000Z | """
scaffoldgraph.analysis.enrichment
Module contains an implementation of Compound Set Enrichment from the papers:
- Compound Set Enrichment: A Novel Approach to Analysis of Primary HTS Data.
- Mining for bioactive scaffolds with scaffold networks: Improved compound set enrichment from primary screening data.
"""
fr... | 41.379121 | 118 | 0.659673 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,314 | 0.705242 |
62711db72244e06a03957f6f565656dd9ee94885 | 803 | py | Python | ejercicio_fichero/ejercicio_fichero1/fichero.py | Ironwilly/python | f6d42c685b4026b018089edb4ae8cc0ca9614e86 | [
"CC0-1.0"
] | null | null | null | ejercicio_fichero/ejercicio_fichero1/fichero.py | Ironwilly/python | f6d42c685b4026b018089edb4ae8cc0ca9614e86 | [
"CC0-1.0"
] | null | null | null | ejercicio_fichero/ejercicio_fichero1/fichero.py | Ironwilly/python | f6d42c685b4026b018089edb4ae8cc0ca9614e86 | [
"CC0-1.0"
] | null | null | null | # Lee el fichero y procésalo de tal manera que sea capaz de mostrar
# la temperatura máxima para una ciudad dada. Esa ciudad la debe poder
# recibir como un argumento de entrada. Si la ciudad no existe, se deberá
# manejar a través de una excepción.
import csv
provincia = input('Diga el nombre de la ciudad: ')
with... | 29.740741 | 97 | 0.655044 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 412 | 0.509901 |
62728052af8201aa2645d7c22783e76db3275ed8 | 4,059 | py | Python | python/brunel/magics.py | Ross1503/Brunel | c6b6323fa6525c2e1b5f83dc6f97bdeb237e3b06 | [
"Apache-2.0"
] | 306 | 2015-09-03T18:04:21.000Z | 2022-02-12T15:15:39.000Z | python/brunel/magics.py | Ross1503/Brunel | c6b6323fa6525c2e1b5f83dc6f97bdeb237e3b06 | [
"Apache-2.0"
] | 313 | 2015-09-09T14:20:14.000Z | 2020-09-14T02:00:05.000Z | python/brunel/magics.py | Ross1503/Brunel | c6b6323fa6525c2e1b5f83dc6f97bdeb237e3b06 | [
"Apache-2.0"
] | 88 | 2015-09-11T16:45:22.000Z | 2021-11-28T12:35:48.000Z | # Copyright (c) 2015 IBM Corporation and others.
#
# 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... | 34.692308 | 105 | 0.584134 | 3,219 | 0.793052 | 0 | 0 | 3,233 | 0.796502 | 0 | 0 | 1,078 | 0.265583 |
62735fa3cb9b4a375ffe477b83e79ab29f0e085c | 537 | py | Python | plugs_newsletter/emails.py | solocompt/plugs-newsletter | 57b9aa2caf9ed5bd5adf25839dbf52b85c0afa53 | [
"MIT"
] | 1 | 2017-01-10T23:24:55.000Z | 2017-01-10T23:24:55.000Z | plugs_newsletter/emails.py | solocompt/plugs-newsletter | 57b9aa2caf9ed5bd5adf25839dbf52b85c0afa53 | [
"MIT"
] | 1 | 2017-01-08T00:01:21.000Z | 2017-01-08T00:01:21.000Z | plugs_newsletter/emails.py | solocompt/plugs-newsletter | 57b9aa2caf9ed5bd5adf25839dbf52b85c0afa53 | [
"MIT"
] | null | null | null | """
Plugs Newsletter Emails
"""
from plugs_mail.mail import PlugsMail
class NewsletterSubscribed(PlugsMail):
"""
Email sent to subscriber after newsletter subscription
"""
template = 'NEWSLETTER_SUBSCRIBED'
description = 'Email sent to subscriber after newsletter subscription'
class NewsletterUns... | 26.85 | 76 | 0.748603 | 462 | 0.860335 | 0 | 0 | 0 | 0 | 0 | 0 | 335 | 0.623836 |
6273ea53c245381a5adf539a8b0c5e691d335b8c | 4,526 | py | Python | modules/smsapi/proxy.py | kamilpp/iwm-project | d3d816b5a30047e4ec7c7e17d1f71e189858190a | [
"MIT"
] | null | null | null | modules/smsapi/proxy.py | kamilpp/iwm-project | d3d816b5a30047e4ec7c7e17d1f71e189858190a | [
"MIT"
] | null | null | null | modules/smsapi/proxy.py | kamilpp/iwm-project | d3d816b5a30047e4ec7c7e17d1f71e189858190a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
import mimetypes
from io import BytesIO
try:
from urllib2 import Request, urlopen, URLError
from urllib import urlencode
except ImportError:
from urllib.request import Request, urlopen
from urllib.parse import urlencode
from urllib.error import URLError... | 26.623529 | 117 | 0.532037 | 3,955 | 0.87384 | 0 | 0 | 0 | 0 | 0 | 0 | 482 | 0.106496 |
62753c5006150ce17ceda04507da80a31675516b | 775 | py | Python | maverick_api/modules/base/mission/util/srtm/make_dict.py | deodates-dev/UAV-maverick-api | 15cf9e0bac6faf4b9361f060395f656575304097 | [
"MIT"
] | 4 | 2018-02-10T01:00:35.000Z | 2019-07-03T04:21:28.000Z | maverick_api/modules/base/mission/util/srtm/make_dict.py | deodates-dev/UAV-maverick-api | 15cf9e0bac6faf4b9361f060395f656575304097 | [
"MIT"
] | 244 | 2018-02-01T22:39:51.000Z | 2021-07-29T05:58:48.000Z | maverick_api/modules/base/mission/util/srtm/make_dict.py | deodates-dev/UAV-maverick-api | 15cf9e0bac6faf4b9361f060395f656575304097 | [
"MIT"
] | 6 | 2018-02-12T10:58:05.000Z | 2020-09-09T13:41:04.000Z | #!/usr/bin/python
import fileinput
import json
url_base = "https://dds.cr.usgs.gov/srtm/version2_1/SRTM3"
regions = [
"Africa",
"Australia",
"Eurasia",
"Islands",
"North_America",
"South_America",
]
srtm_dict = {}
srtm_directory = "srtm.json"
for region in regions:
print("Processing", ... | 20.945946 | 78 | 0.606452 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 223 | 0.287742 |
62758b3a2a4619c1b6d03498fcd2b870db5024e4 | 495 | py | Python | gail/crowd_sim/configs/icra_benchmark/sarl.py | ben-milanko/PyTorch-RL | 4d7be8a7f26f21b490c93191dca1844046a092df | [
"MIT"
] | null | null | null | gail/crowd_sim/configs/icra_benchmark/sarl.py | ben-milanko/PyTorch-RL | 4d7be8a7f26f21b490c93191dca1844046a092df | [
"MIT"
] | null | null | null | gail/crowd_sim/configs/icra_benchmark/sarl.py | ben-milanko/PyTorch-RL | 4d7be8a7f26f21b490c93191dca1844046a092df | [
"MIT"
] | null | null | null | from configs.icra_benchmark.config import BaseEnvConfig, BasePolicyConfig, BaseTrainConfig, Config
class EnvConfig(BaseEnvConfig):
def __init__(self, debug=False):
super(EnvConfig, self).__init__(debug)
class PolicyConfig(BasePolicyConfig):
def __init__(self, debug=False):
super(PolicyConfig... | 27.5 | 98 | 0.733333 | 387 | 0.781818 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.012121 |
62781a4622485a3c3996f4345f375edf051908c6 | 83 | py | Python | backend/bios/apps.py | juanrmv/torre-test | 39c4f8928f6f51e462975ef5f89c7a9b5bb05733 | [
"Apache-2.0"
] | null | null | null | backend/bios/apps.py | juanrmv/torre-test | 39c4f8928f6f51e462975ef5f89c7a9b5bb05733 | [
"Apache-2.0"
] | null | null | null | backend/bios/apps.py | juanrmv/torre-test | 39c4f8928f6f51e462975ef5f89c7a9b5bb05733 | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class BiosConfig(AppConfig):
name = 'bios'
| 13.833333 | 33 | 0.73494 | 46 | 0.554217 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.072289 |
62785d99c24915bf064dcffd95ccc1f5a52eab27 | 3,982 | py | Python | tests/snuba/eventstream/test_eventstream.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | tests/snuba/eventstream/test_eventstream.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | tests/snuba/eventstream/test_eventstream.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from datetime import datetime, timedelta
import six
import time
import logging
from sentry.utils.compat.mock import patch, Mock
from sentry.event_manager import EventManager
from sentry.eventstream.kafka import KafkaEventStream
from sentry.eventstream.snuba import SnubaEventStre... | 35.238938 | 94 | 0.619789 | 3,566 | 0.89553 | 0 | 0 | 2,082 | 0.522853 | 0 | 0 | 770 | 0.19337 |
627cfb04842724bdfb5432c95eabf0e23e11ea54 | 470 | py | Python | modulo.py | Alex9808/py101 | 18c585c1433e8ec6f5e4962e556a781e0c3c3cd5 | [
"MIT"
] | 25 | 2018-08-14T22:13:13.000Z | 2021-07-23T04:14:06.000Z | modulo.py | Alex9808/py101 | 18c585c1433e8ec6f5e4962e556a781e0c3c3cd5 | [
"MIT"
] | 1 | 2021-05-21T23:46:42.000Z | 2021-05-21T23:46:42.000Z | modulo.py | Alex9808/py101 | 18c585c1433e8ec6f5e4962e556a781e0c3c3cd5 | [
"MIT"
] | 34 | 2018-07-30T20:48:17.000Z | 2022-02-04T19:01:27.000Z | #! /bin/bash/python3
'''Ejemplo de un script que puede ser importado como módulo.'''
titulo = "Espacio muestral"
datos = (76, 81, 75, 77, 80, 75, 76, 79, 75)
def promedio(encabezado, muestra):
'''Despliega el contenido de encabezado,así como el cálculo del promedio de muestra, ingresado en una lista o tu... | 39.166667 | 126 | 0.678723 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 267 | 0.564482 |
627d2e10dedbd895286404f157c63ff39dd0589c | 368 | py | Python | experiments/duet_dataloader/input_file_generator.py | 18praveenb/ss-vq-vae | 89e76d69d6127b27ae4cc066a1a1f9c4147fb020 | [
"Apache-2.0"
] | null | null | null | experiments/duet_dataloader/input_file_generator.py | 18praveenb/ss-vq-vae | 89e76d69d6127b27ae4cc066a1a1f9c4147fb020 | [
"Apache-2.0"
] | null | null | null | experiments/duet_dataloader/input_file_generator.py | 18praveenb/ss-vq-vae | 89e76d69d6127b27ae4cc066a1a1f9c4147fb020 | [
"Apache-2.0"
] | null | null | null | genres = ['blues', 'classical', 'country', 'disco', 'hiphop', 'jazz', 'metal', 'pop', 'reggae', 'rock']
num_files = 100
with open(f'INPUT_FULL', 'w') as f:
for genre in genres:
for i in range(num_files):
for j in range(6):
f.write(f'/datasets/duet/genres/{genre}.{i:05d}.{j}.wav /... | 52.571429 | 121 | 0.578804 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 186 | 0.505435 |
627df994c37f89a314b88935ba858af233d102af | 549 | py | Python | generate_nginx_config.py | AppScale/appscake | 615597765e835015c1e8d8bc70921a655f8aa86a | [
"BSD-3-Clause"
] | null | null | null | generate_nginx_config.py | AppScale/appscake | 615597765e835015c1e8d8bc70921a655f8aa86a | [
"BSD-3-Clause"
] | 1 | 2021-06-08T09:51:49.000Z | 2021-06-08T09:51:49.000Z | generate_nginx_config.py | isabella232/appscake | 615597765e835015c1e8d8bc70921a655f8aa86a | [
"BSD-3-Clause"
] | 1 | 2021-06-08T09:48:33.000Z | 2021-06-08T09:48:33.000Z | import jinja2
import os
import socket
my_public_ip = os.popen("curl -L http://metadata/computeMetadata/v1beta1/instance/network-interfaces/0/access-configs/0/external-ip").read()
my_private_ip = socket.gethostbyname(socket.gethostname())
template_contents = open('/root/appscake/nginx_config').read()
template = jinja2... | 42.230769 | 140 | 0.812386 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 176 | 0.320583 |
627e2692036a975d4c6bc119811af70c6ad6b162 | 909 | py | Python | VisualizedSorting/Controller.py | lachieggg/Misc | 066149309e3e4634cded168687c7dfc3a3a4d6f3 | [
"MIT"
] | null | null | null | VisualizedSorting/Controller.py | lachieggg/Misc | 066149309e3e4634cded168687c7dfc3a3a4d6f3 | [
"MIT"
] | null | null | null | VisualizedSorting/Controller.py | lachieggg/Misc | 066149309e3e4634cded168687c7dfc3a3a4d6f3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
from Window import Window
from Constants import *
from Algorithms.MergeSort import MergeSort
from Algorithms.QuickSort import QuickSort
from Algorithms.BubbleSort import BubbleSort
from Algorithms.InsertionSort import InsertionSort
from Algorithms.SelectionSort import SelectionSor... | 22.725 | 50 | 0.664466 | 403 | 0.443344 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.091309 |
627e4b8f24eb8ffa6dd2d71640b1a2b1b78cf92a | 3,688 | py | Python | openslides_backend/presenter/get_forwarding_meetings.py | MJJojo97/openslides-backend | af0d1edb0070e352d46f285a1ba0bbe3702d49ae | [
"MIT"
] | 5 | 2020-01-20T13:57:15.000Z | 2021-03-27T14:14:44.000Z | openslides_backend/presenter/get_forwarding_meetings.py | MJJojo97/openslides-backend | af0d1edb0070e352d46f285a1ba0bbe3702d49ae | [
"MIT"
] | 859 | 2020-01-11T22:58:37.000Z | 2022-03-30T14:54:06.000Z | openslides_backend/presenter/get_forwarding_meetings.py | MJJojo97/openslides-backend | af0d1edb0070e352d46f285a1ba0bbe3702d49ae | [
"MIT"
] | 16 | 2020-01-04T20:28:57.000Z | 2022-02-10T12:06:54.000Z | from typing import Any
import fastjsonschema
from ..permissions.permission_helper import has_perm
from ..permissions.permissions import Permissions
from ..shared.exceptions import PermissionDenied, PresenterException
from ..shared.patterns import Collection, FullQualifiedId
from ..shared.schema import required_id_sch... | 36.88 | 119 | 0.574837 | 2,916 | 0.790672 | 0 | 0 | 2,963 | 0.803416 | 0 | 0 | 927 | 0.251356 |
627e648e181ccec154beb32ed33085244d73a0fd | 638 | py | Python | settings.py | gyyang/olfaction_evolution | 434baa85b91f450e1ab63c6b9eafb8d370f1df96 | [
"MIT"
] | 9 | 2021-10-11T01:16:23.000Z | 2022-01-13T14:07:08.000Z | settings.py | gyyang/olfaction_evolution | 434baa85b91f450e1ab63c6b9eafb8d370f1df96 | [
"MIT"
] | 1 | 2021-10-30T09:49:08.000Z | 2021-10-30T09:49:08.000Z | settings.py | gyyang/olfaction_evolution | 434baa85b91f450e1ab63c6b9eafb8d370f1df96 | [
"MIT"
] | null | null | null | """User specific settings."""
import matplotlib as mpl
import matplotlib.pyplot as plt
mpl.rcParams['font.size'] = 7
mpl.rcParams['pdf.fonttype'] = 42
mpl.rcParams['ps.fonttype'] = 42
mpl.rcParams['font.family'] = 'arial'
mpl.rcParams['mathtext.fontset'] = 'stix'
seqcmap = mpl.cm.cool_r
try:
import seaborn as sn... | 29 | 81 | 0.731975 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 292 | 0.45768 |
627f3994b2ade29fca362ec30f86cac34a2baa81 | 152 | py | Python | resolver/mindeps/__init__.py | Shivansh-007/python-resolver | c44e93e0715d6d7a736db17122e6a606267329b2 | [
"MIT"
] | null | null | null | resolver/mindeps/__init__.py | Shivansh-007/python-resolver | c44e93e0715d6d7a736db17122e6a606267329b2 | [
"MIT"
] | null | null | null | resolver/mindeps/__init__.py | Shivansh-007/python-resolver | c44e93e0715d6d7a736db17122e6a606267329b2 | [
"MIT"
] | null | null | null | # SPDX-License-Identifier: MIT
from resolver.mindeps.__main__ import entrypoint, get_min_deps # noqa: F401
__all__ = ('entrypoint', 'get_min_deps')
| 21.714286 | 76 | 0.763158 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.447368 |
6280695be38110adda77e21a75a8350fbff3df45 | 9,433 | py | Python | fabfile/data.py | nprapps/linklater | 9ba8fbefcbe9148253e5d5c47572e8b887ce9485 | [
"FSFAP"
] | null | null | null | fabfile/data.py | nprapps/linklater | 9ba8fbefcbe9148253e5d5c47572e8b887ce9485 | [
"FSFAP"
] | 47 | 2015-01-22T16:12:16.000Z | 2015-01-28T18:51:58.000Z | fabfile/data.py | nprapps/linklater | 9ba8fbefcbe9148253e5d5c47572e8b887ce9485 | [
"FSFAP"
] | 1 | 2021-02-18T11:26:35.000Z | 2021-02-18T11:26:35.000Z | #!/usr/bin/env python
"""
Commands that update or process the application data.
"""
from datetime import datetime
import json
from bs4 import BeautifulSoup
from flask import render_template
from fabric.api import task
from fabric.state import env
from facebook import GraphAPI
from twitter import Twitter, OAuth
from j... | 31.029605 | 271 | 0.56578 | 0 | 0 | 0 | 0 | 6,823 | 0.723312 | 0 | 0 | 3,106 | 0.32927 |
62809e7157f3314444431a1ce7fbb43f9a5fe55b | 4,277 | py | Python | glow/nn/_trainer.py | arquolo/ort | 6f2d32d739ed6a0dab81bb91018c005e47ef7e77 | [
"MIT"
] | null | null | null | glow/nn/_trainer.py | arquolo/ort | 6f2d32d739ed6a0dab81bb91018c005e47ef7e77 | [
"MIT"
] | null | null | null | glow/nn/_trainer.py | arquolo/ort | 6f2d32d739ed6a0dab81bb91018c005e47ef7e77 | [
"MIT"
] | null | null | null | from __future__ import annotations
__all__ = ['Trainer']
from collections.abc import Callable, Collection, Iterator
from dataclasses import dataclass
import torch
import torch.nn as nn
import torch.optim
from tqdm.auto import tqdm
from .. import ichunked
from .. import metrics as m
from ._loader import _Loader
from... | 32.9 | 78 | 0.575871 | 3,843 | 0.898527 | 786 | 0.183774 | 1,719 | 0.401917 | 0 | 0 | 153 | 0.035773 |
6280a1beb33550565dc8c6430459ab48faab2173 | 14,450 | py | Python | trapeza-import.py | davidmreed/trapeza-import | e745ff43f6901df47aba1ae820ca522492fa988b | [
"MIT"
] | null | null | null | trapeza-import.py | davidmreed/trapeza-import | e745ff43f6901df47aba1ae820ca522492fa988b | [
"MIT"
] | 2 | 2015-04-10T17:12:39.000Z | 2015-04-10T17:13:53.000Z | trapeza-import.py | davidmreed/trapeza-import | e745ff43f6901df47aba1ae820ca522492fa988b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# trapeza-import.py
#
# Copyright 2013-2014 David Reed <[email protected]>
# This file is available under the terms of the MIT License.
#
from itertools import groupby
from operator import itemgetter, attrgetter
import hashlib
import io
import os
import sys
import pi... | 41.884058 | 118 | 0.612872 | 0 | 0 | 0 | 0 | 11,708 | 0.810242 | 0 | 0 | 4,318 | 0.298824 |
628148650e81ef63a14a0e7b6f3e244ba44786ee | 1,200 | py | Python | tests/test_yaml.py | janhybs/ci-hpi | 293740c7af62ecada5744ff663266de2e3d37445 | [
"MIT"
] | 1 | 2020-01-09T13:00:18.000Z | 2020-01-09T13:00:18.000Z | tests/test_yaml.py | janhybs/ci-hpi | 293740c7af62ecada5744ff663266de2e3d37445 | [
"MIT"
] | null | null | null | tests/test_yaml.py | janhybs/ci-hpi | 293740c7af62ecada5744ff663266de2e3d37445 | [
"MIT"
] | 2 | 2018-08-12T01:13:28.000Z | 2018-08-13T14:37:28.000Z | #!/bin/python3
# author: Jan Hybs
import tests
tests.fix_paths()
import yaml
from unittest import TestCase
from cihpc.cfg.config import global_configuration
from cihpc.common.utils import extend_yaml
repeat_yaml = '''
foo: !repeat a 5
'''
range_yaml = '''
foo: !range 1 5
bar: !range 1 2 6
'''
sh_yaml = '''
foo:... | 22.641509 | 78 | 0.6725 | 848 | 0.706667 | 0 | 0 | 0 | 0 | 0 | 0 | 206 | 0.171667 |
62825aac43334a0c4d771dfbfbed86c8e81907ef | 991 | py | Python | Greedy.py | victor3r/search-algorithms | 0256349b20b314c3337264c4c2b1ef4b1992a914 | [
"MIT"
] | null | null | null | Greedy.py | victor3r/search-algorithms | 0256349b20b314c3337264c4c2b1ef4b1992a914 | [
"MIT"
] | null | null | null | Greedy.py | victor3r/search-algorithms | 0256349b20b314c3337264c4c2b1ef4b1992a914 | [
"MIT"
] | null | null | null | from OrderedVector import OrderedVector
class Greedy:
def __init__(self, goal):
self.goal = goal
self.found = False
self.travelled_distance = 0
self.previous = None
self.visited_cities = []
def search(self, current):
current.visited = True
self.visited_... | 31.967742 | 62 | 0.573158 | 948 | 0.956609 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6283560a4c1df948a92e15782756a76d970412a4 | 3,262 | py | Python | mlf_core/create/templates/package/package_prediction/{{ cookiecutter.project_slug_no_hyphen }}/{{cookiecutter.project_slug_no_hyphen}}/cli_xgboost.py | mlf-core/mlf-core | 016f6186b5b62622c3a2b3ca884331fe0165b97c | [
"Apache-2.0"
] | 31 | 2020-10-04T14:54:54.000Z | 2021-11-22T09:33:17.000Z | mlf_core/create/templates/package/package_prediction/{{ cookiecutter.project_slug_no_hyphen }}/{{cookiecutter.project_slug_no_hyphen}}/cli_xgboost.py | mlf-core/mlf_core | cea155595df95d1d22473605d29813f5d698d635 | [
"Apache-2.0"
] | 200 | 2020-08-05T13:51:14.000Z | 2022-03-28T00:25:54.000Z | mlf_core/create/templates/package/package_prediction/{{ cookiecutter.project_slug_no_hyphen }}/{{cookiecutter.project_slug_no_hyphen}}/cli_xgboost.py | mlf-core/mlf_core | cea155595df95d1d22473605d29813f5d698d635 | [
"Apache-2.0"
] | 3 | 2020-11-29T17:03:52.000Z | 2021-06-03T13:12:03.000Z | import os
import sys
from dataclasses import dataclass
import click
import numpy as np
import xgboost as xgb
from rich import print, traceback
WD = os.path.dirname(__file__)
@click.command()
@click.option('-i', '--input', required=True, type=str, help='Path to data file to predict.')
@click.option('-m', '--model', ... | 31.980392 | 136 | 0.66401 | 108 | 0.033109 | 0 | 0 | 1,427 | 0.437462 | 0 | 0 | 1,204 | 0.369099 |
62835966d4b0e4b0387185306e4dd38f6d24f970 | 1,597 | py | Python | onnxruntime/python/tools/quantization/operators/direct_q8.py | kimjungwow/onnxruntime-riscv | 3c21abef03190648fe68a6633ac026725e6dfc58 | [
"MIT"
] | 18 | 2020-05-19T12:48:07.000Z | 2021-04-28T06:41:57.000Z | onnxruntime/python/tools/quantization/operators/direct_q8.py | kimjungwow/onnxruntime-riscv | 3c21abef03190648fe68a6633ac026725e6dfc58 | [
"MIT"
] | 61 | 2021-05-31T05:15:41.000Z | 2022-03-29T22:34:33.000Z | onnxruntime/python/tools/quantization/operators/direct_q8.py | ekmixon/onnxruntime | 1ab8a95eb6675afb6d0ad9d93600ef0022e2ddb5 | [
"MIT"
] | 9 | 2021-05-14T20:17:26.000Z | 2022-03-20T11:44:29.000Z | from .base_operator import QuantOperatorBase
from .qdq_base_operator import QDQOperatorBase
from ..quant_utils import QuantizedValue
# For operators that support 8bits operations directly, and output could
# reuse input[0]'s type, zeropoint, scale; For example,Transpose, Reshape, etc.
class Direct8BitOp(QuantOperatorB... | 42.026316 | 112 | 0.689418 | 1,306 | 0.817783 | 0 | 0 | 0 | 0 | 0 | 0 | 272 | 0.170319 |
628478917870596f07ee4037c6b0a49ad4980015 | 3,659 | py | Python | b01lers-ctf-2022/extreme_64_part_2/src/levels.py | novafacing/challenges | cfdfb34973880cfda03b4797d3b369344cfa4b9a | [
"MIT"
] | null | null | null | b01lers-ctf-2022/extreme_64_part_2/src/levels.py | novafacing/challenges | cfdfb34973880cfda03b4797d3b369344cfa4b9a | [
"MIT"
] | null | null | null | b01lers-ctf-2022/extreme_64_part_2/src/levels.py | novafacing/challenges | cfdfb34973880cfda03b4797d3b369344cfa4b9a | [
"MIT"
] | null | null | null | from platform import architecture
from qiling import Qiling
from typing import Union
from asm_practice.coding.challenge import ArchSpec, Challenge, TestCase
challenges = []
amd64 = ArchSpec(
pwntools_arch="amd64",
pwntools_os="linux",
qiling_rootfs="qiling/examples/rootfs/x86_linux/",
qiling_ostype="... | 27.103704 | 156 | 0.544138 | 222 | 0.060672 | 0 | 0 | 0 | 0 | 0 | 0 | 1,403 | 0.383438 |
62858c1b3ffcd01a46345c2c6590f7749e7c007a | 2,331 | py | Python | lte/gateway/python/magma/enodebd/tr069/tests/models_tests.py | Aitend/magma | 74fe7b437335728219dfbe54733955bdd652eb60 | [
"BSD-3-Clause"
] | 849 | 2020-07-17T09:15:03.000Z | 2022-03-31T17:11:52.000Z | lte/gateway/python/magma/enodebd/tr069/tests/models_tests.py | Aitend/magma | 74fe7b437335728219dfbe54733955bdd652eb60 | [
"BSD-3-Clause"
] | 8,386 | 2020-06-23T23:35:30.000Z | 2022-03-31T23:31:28.000Z | lte/gateway/python/magma/enodebd/tr069/tests/models_tests.py | Aitend/magma | 74fe7b437335728219dfbe54733955bdd652eb60 | [
"BSD-3-Clause"
] | 406 | 2020-06-28T17:02:35.000Z | 2022-03-31T22:03:55.000Z | """
Copyright 2020 The Magma Authors.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES O... | 31.08 | 75 | 0.56671 | 1,746 | 0.749035 | 0 | 0 | 0 | 0 | 0 | 0 | 994 | 0.426426 |
6285f9b80fd1befd47cc7c79a141c672da8b15b7 | 732 | py | Python | saleor/graphql/order/bulk_mutations/draft_orders.py | acabezasg/urpi-master | 7c9cd0fbe6d89dad70652482712ca38b21ba6f84 | [
"BSD-3-Clause"
] | 1 | 2019-04-15T09:37:26.000Z | 2019-04-15T09:37:26.000Z | saleor/graphql/order/bulk_mutations/draft_orders.py | acabezasg/urpi-master | 7c9cd0fbe6d89dad70652482712ca38b21ba6f84 | [
"BSD-3-Clause"
] | 5 | 2021-03-09T16:22:37.000Z | 2022-02-10T19:10:03.000Z | saleor/graphql/order/bulk_mutations/draft_orders.py | acabezasg/urpi-master | 7c9cd0fbe6d89dad70652482712ca38b21ba6f84 | [
"BSD-3-Clause"
] | 1 | 2020-12-26T10:25:37.000Z | 2020-12-26T10:25:37.000Z | import graphene
from ....order import OrderStatus, models
from ...core.mutations import ModelBulkDeleteMutation
class DraftOrderBulkDelete(ModelBulkDeleteMutation):
class Arguments:
ids = graphene.List(
graphene.ID,
required=True,
description='List of draft order IDs t... | 28.153846 | 74 | 0.665301 | 616 | 0.84153 | 0 | 0 | 296 | 0.404372 | 0 | 0 | 117 | 0.159836 |
62891dc073d6683815ffdf4fdf46da450a83ebad | 1,978 | py | Python | thread_extensions/callback_thread.py | Sunchasing/python-common | bc9f11fe4585ef9abca7006c0bf64b11062742fd | [
"Apache-2.0"
] | 5 | 2021-08-15T23:04:25.000Z | 2021-09-06T18:32:53.000Z | thread_extensions/callback_thread.py | Sunchasing/python-common | bc9f11fe4585ef9abca7006c0bf64b11062742fd | [
"Apache-2.0"
] | null | null | null | thread_extensions/callback_thread.py | Sunchasing/python-common | bc9f11fe4585ef9abca7006c0bf64b11062742fd | [
"Apache-2.0"
] | 1 | 2022-01-28T13:12:23.000Z | 2022-01-28T13:12:23.000Z | from threading import Thread
from typing import Any, Iterable, Mapping
from types_extensions import Function, void, safe_type
class CallbackThread(Thread):
"""
An extension to python's threading API allowing for a callback to be executed upon completion of the given
function. The callback is executed wit... | 39.56 | 116 | 0.63549 | 1,848 | 0.934277 | 0 | 0 | 0 | 0 | 0 | 0 | 666 | 0.336704 |
62898b405054c48d9122f893fe9282577a49a61e | 55 | py | Python | enthought/traits/ui/wx/button_editor.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/traits/ui/wx/button_editor.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | enthought/traits/ui/wx/button_editor.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | null | null | null | # proxy module
from traitsui.wx.button_editor import *
| 18.333333 | 39 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.254545 |
6289a72aad33159f7d054947864a1fb1eeedfac8 | 2,756 | py | Python | ROSITA/ARMCycleCounterImpl.py | 0xADE1A1DE/Rosita | 13a669c1877b2eb5a36be6b41a6f840d83ffd46a | [
"Apache-2.0"
] | 10 | 2020-11-22T08:17:08.000Z | 2021-12-17T04:06:01.000Z | ROSITA/ARMCycleCounterImpl.py | 0xADE1A1DE/Rosita | 13a669c1877b2eb5a36be6b41a6f840d83ffd46a | [
"Apache-2.0"
] | null | null | null | ROSITA/ARMCycleCounterImpl.py | 0xADE1A1DE/Rosita | 13a669c1877b2eb5a36be6b41a6f840d83ffd46a | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 University of Adelaide
#
# 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 ... | 29.010526 | 74 | 0.697388 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 870 | 0.315675 |
6289d050b39c8fee926a510fc4214e7ee940d801 | 4,723 | py | Python | dust/admin.py | MerlinEmris/eBazar | f159314183a8a95afd97d36b0d3d8cf22015a512 | [
"MIT"
] | null | null | null | dust/admin.py | MerlinEmris/eBazar | f159314183a8a95afd97d36b0d3d8cf22015a512 | [
"MIT"
] | null | null | null | dust/admin.py | MerlinEmris/eBazar | f159314183a8a95afd97d36b0d3d8cf22015a512 | [
"MIT"
] | null | null | null | from django.utils.html import format_html
def full_address(self):
return format_html('%s - <b>%s,%s</b>' % (self.address, self.city, self.state))
# null derek yazylmaly hat
admin.site.empty_value_display = '???'
admin.site.register(Item)
# str funksivany ady bilen gorkezyar
class ItemAdmin(admin.ModelAdmin):
... | 27.782353 | 94 | 0.724328 | 2,405 | 0.50921 | 0 | 0 | 0 | 0 | 0 | 0 | 1,290 | 0.273131 |
628a26e801e2d3e6057da42ddf0d511ab519f04e | 465 | py | Python | main.py | Lasx/gb688_downloader | 7e9711e7784c15bcd15a6129ab1fef99c8d44f23 | [
"Apache-2.0"
] | 119 | 2020-02-27T04:27:15.000Z | 2022-03-01T07:02:34.000Z | main.py | Lasx/gb688_downloader | 7e9711e7784c15bcd15a6129ab1fef99c8d44f23 | [
"Apache-2.0"
] | 12 | 2020-03-26T04:50:13.000Z | 2021-11-24T04:00:08.000Z | main.py | Lasx/gb688_downloader | 7e9711e7784c15bcd15a6129ab1fef99c8d44f23 | [
"Apache-2.0"
] | 24 | 2020-03-11T22:50:24.000Z | 2022-03-25T08:13:56.000Z | from standard import HDB, NatureStd
if __name__ == "__main__":
hb = HDB('hbba')
db = HDB('dbba')
data = db.search('政务云工程评价指标体系及方法')
print(data)
# first_record = data["records"][0]
# name = f'{first_record["code"]}({first_record["chName"]}'
# db.download(pk=first_record['pk'], name=name)
... | 27.352941 | 99 | 0.617204 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 373 | 0.705104 |
628a35fc680aa3e71939daea214021b0a93a8fef | 6,478 | py | Python | tests/test_centering.py | chto/redmapper | 1dc66b601889ef9913f0f9b2e05980b982834485 | [
"Apache-2.0"
] | null | null | null | tests/test_centering.py | chto/redmapper | 1dc66b601889ef9913f0f9b2e05980b982834485 | [
"Apache-2.0"
] | null | null | null | tests/test_centering.py | chto/redmapper | 1dc66b601889ef9913f0f9b2e05980b982834485 | [
"Apache-2.0"
] | null | null | null | from __future__ import division, absolute_import, print_function
from past.builtins import xrange
import unittest
import numpy.testing as testing
import numpy as np
import fitsio
import os
from numpy import random
from redmapper import Cluster
from redmapper import Configuration
from redmapper import CenteringWcenZre... | 37.662791 | 123 | 0.589379 | 5,858 | 0.904291 | 0 | 0 | 0 | 0 | 0 | 0 | 1,192 | 0.184007 |
628a9b46dc2e473cabe5460e321c03369c91a690 | 6,581 | py | Python | converted_docs/run_pandoc.py | AndrewLoeppky/eoas_tlef | 9119023ff21b8db0faf95b4e5f62a7c06eeb6b50 | [
"BSD-3-Clause"
] | 3 | 2020-04-30T19:50:11.000Z | 2020-10-17T02:07:00.000Z | converted_docs/run_pandoc.py | AndrewLoeppky/eoas_tlef | 9119023ff21b8db0faf95b4e5f62a7c06eeb6b50 | [
"BSD-3-Clause"
] | 35 | 2020-04-21T04:25:31.000Z | 2021-11-06T22:49:44.000Z | converted_docs/run_pandoc.py | AndrewLoeppky/eoas_tlef | 9119023ff21b8db0faf95b4e5f62a7c06eeb6b50 | [
"BSD-3-Clause"
] | 11 | 2020-04-21T04:33:48.000Z | 2020-10-23T21:12:12.000Z | """
usage:
turn all docx files into markdown files
python run_pandoc.py transform-docs
turn all tex files nto markdown files
python run_pandoc.py transform-docs --doctype=tex
move all csv, md, pptx, docx, png, jpeg, jpg etc.
into Book/subdir folders, where subdir is the suffix filename
and write a file ... | 29.511211 | 89 | 0.619511 | 0 | 0 | 306 | 0.046497 | 5,781 | 0.878438 | 0 | 0 | 2,577 | 0.391582 |
628ac7ff61e9eb7e83c84034316330a71c01848e | 979 | py | Python | swim/PIL2/WebPImagePlugin.py | alexsigaras/SWIM | 1a35df8acb26bdcb307a1b8f60e9feba68ed1715 | [
"MIT"
] | 3 | 2015-06-05T00:32:44.000Z | 2017-01-06T15:44:32.000Z | swim/PIL2/WebPImagePlugin.py | alexsigaras/SWIM | 1a35df8acb26bdcb307a1b8f60e9feba68ed1715 | [
"MIT"
] | null | null | null | swim/PIL2/WebPImagePlugin.py | alexsigaras/SWIM | 1a35df8acb26bdcb307a1b8f60e9feba68ed1715 | [
"MIT"
] | null | null | null | from PIL import Image
from PIL import ImageFile
from io import BytesIO
import _webp
def _accept(prefix):
return prefix[:4] == b"RIFF" and prefix[8:16] == b"WEBPVP8 "
class WebPImageFile(ImageFile.ImageFile):
format = "WEBP"
format_description = "WebP image"
def _open(self):
self.mode = "RGB"... | 28.794118 | 101 | 0.648621 | 340 | 0.347293 | 0 | 0 | 0 | 0 | 0 | 0 | 138 | 0.14096 |
628bbd970ba25dae836c86e32114954de704abe3 | 4,149 | py | Python | AI Class/Agents/vacuum_v2.py | e-olang/Drafts | a26c958b50826c8762ba12046d1ef6aedefe7e5b | [
"MIT"
] | null | null | null | AI Class/Agents/vacuum_v2.py | e-olang/Drafts | a26c958b50826c8762ba12046d1ef6aedefe7e5b | [
"MIT"
] | null | null | null | AI Class/Agents/vacuum_v2.py | e-olang/Drafts | a26c958b50826c8762ba12046d1ef6aedefe7e5b | [
"MIT"
] | null | null | null | from turtle import Turtle, Screen
from random import choice
from time import sleep
from queue import SimpleQueue
w: int
w, h = (853, 480)
wn = Screen()
wn.screensize(w, h)
wn.bgcolor("#d3d3d3")
Room_state = {"Clean": "#FFFFFF",
"Dirty": "#b5651d"}
cleaned = 0
def filler(t, color, delay=0, vacclean = ... | 23.440678 | 102 | 0.557002 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 802 | 0.1933 |
628f60f6980f2fba69cda100a9a49fdeb649e134 | 1,226 | py | Python | notebook/dict_keys_values_items.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 174 | 2018-05-30T21:14:50.000Z | 2022-03-25T07:59:37.000Z | notebook/dict_keys_values_items.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 5 | 2019-08-10T03:22:02.000Z | 2021-07-12T20:31:17.000Z | notebook/dict_keys_values_items.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 53 | 2018-04-27T05:26:35.000Z | 2022-03-25T07:59:37.000Z | d = {'key1': 1, 'key2': 2, 'key3': 3}
for k in d:
print(k)
# key1
# key2
# key3
for k in d.keys():
print(k)
# key1
# key2
# key3
keys = d.keys()
print(keys)
print(type(keys))
# dict_keys(['key1', 'key2', 'key3'])
# <class 'dict_keys'>
k_list = list(d.keys())
print(k_list)
print(type(k_list))
# ['key1', 'key... | 13.775281 | 53 | 0.546493 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 560 | 0.45677 |
629117006004b2eb7fb514daab59fc4ecf18244d | 560 | py | Python | flows/tests/settings.py | sergioisidoro/django-flows | 326baa3e216a15bd7a8d13b2a09ba9752e250dbb | [
"BSD-2-Clause"
] | 104 | 2015-01-05T14:29:16.000Z | 2021-11-08T11:20:24.000Z | flows/tests/settings.py | sergioisidoro/django-flows | 326baa3e216a15bd7a8d13b2a09ba9752e250dbb | [
"BSD-2-Clause"
] | 4 | 2015-09-23T11:14:50.000Z | 2020-03-21T06:08:34.000Z | flows/tests/settings.py | sergioisidoro/django-flows | 326baa3e216a15bd7a8d13b2a09ba9752e250dbb | [
"BSD-2-Clause"
] | 16 | 2015-01-05T10:13:44.000Z | 2022-02-14T05:21:23.000Z | import django
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
INSTALLED_APPS = ['flows', 'flows.statestore.tests', 'django_nose']
SECRET_KEY = 'flow_tests'
if django.VERSION < (1, 6):
TEST_RUNNER = 'django.test.simple.DjangoTestSuiteRunner'
TES... | 19.310345 | 67 | 0.639286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 208 | 0.371429 |
6291397ad5ddff8c105b169b9ffba9daa398c30c | 4,154 | py | Python | apps/site/api/serializers/video_serializer.py | LocalGround/localground | aa5a956afe7a84a7763a3b23d62a9fd925831cd7 | [
"Apache-2.0"
] | 9 | 2015-05-29T22:22:20.000Z | 2022-02-01T20:39:00.000Z | apps/site/api/serializers/video_serializer.py | LocalGround/localground | aa5a956afe7a84a7763a3b23d62a9fd925831cd7 | [
"Apache-2.0"
] | 143 | 2015-01-22T15:03:40.000Z | 2020-06-27T01:55:29.000Z | apps/site/api/serializers/video_serializer.py | LocalGround/localground | aa5a956afe7a84a7763a3b23d62a9fd925831cd7 | [
"Apache-2.0"
] | 5 | 2015-03-16T20:51:49.000Z | 2017-02-07T20:48:49.000Z | from rest_framework import serializers
from localground.apps.site.api.serializers.base_serializer import \
BaseSerializer, NamedSerializerMixin, ProjectSerializerMixin, \
GeometrySerializerMixin
from localground.apps.site import models, widgets
from localground.apps.site.api import fields
import re
class Vide... | 37.089286 | 78 | 0.586904 | 3,840 | 0.92441 | 0 | 0 | 0 | 0 | 0 | 0 | 616 | 0.148291 |
6291f51816dba816b4da164bad84c6226c1b1dd7 | 957 | py | Python | learning/async/test_async.py | Nephrin/Tut | 9454be28fd37c155d0b4e97876196f8d33ccf8e5 | [
"Apache-2.0"
] | 2 | 2019-06-23T07:17:30.000Z | 2019-07-06T15:15:42.000Z | learning/async/test_async.py | Nephrin/Tut | 9454be28fd37c155d0b4e97876196f8d33ccf8e5 | [
"Apache-2.0"
] | null | null | null | learning/async/test_async.py | Nephrin/Tut | 9454be28fd37c155d0b4e97876196f8d33ccf8e5 | [
"Apache-2.0"
] | 1 | 2019-06-23T07:17:43.000Z | 2019-06-23T07:17:43.000Z | # Testing out some stuff with async and await
async def hello(name):
print ("hello" + name)
return "hello" + name
# We can use the await statement in coroutines to call
# coroutines as normal functions; i.e. what it implies is that
# if we runt return await func(*args) in a courtoune
# is like running r... | 30.870968 | 70 | 0.695925 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.138976 | 653 | 0.682341 |
654e2a43d7785c171e931fd74c28957f5d42803a | 465 | py | Python | hmm_data.py | vvhitedog/pystan-hmm | 48bcb3d94eff09b4002ffa4b1fa70740b4ee35e3 | [
"BSD-2-Clause"
] | null | null | null | hmm_data.py | vvhitedog/pystan-hmm | 48bcb3d94eff09b4002ffa4b1fa70740b4ee35e3 | [
"BSD-2-Clause"
] | null | null | null | hmm_data.py | vvhitedog/pystan-hmm | 48bcb3d94eff09b4002ffa4b1fa70740b4ee35e3 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
import numpy as np
from matplotlib import pyplot as plt
theta = np.asarray([[.8,.2],[.1,.9]])
psi = np.asarray([3.,9.])
N = 100
K = 2
# sample z
z = np.empty(N,dtype='int')
z[0] = 1
for i in range(1,N):
z[i] = np.random.choice(np.arange(K),size=1,replace=True,p=theta[z[i-1]])
y = np.random.r... | 16.034483 | 77 | 0.630108 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.090323 |
654e6ec194bd32832a9d3c23d9b1b14efdd455a2 | 19,721 | py | Python | s2e_env/commands/image_build.py | michaelbrownuc/s2e-env | 4bd6a45bf1ec9456ed5acf5047b6aac3fcd19683 | [
"BSD-3-Clause"
] | null | null | null | s2e_env/commands/image_build.py | michaelbrownuc/s2e-env | 4bd6a45bf1ec9456ed5acf5047b6aac3fcd19683 | [
"BSD-3-Clause"
] | null | null | null | s2e_env/commands/image_build.py | michaelbrownuc/s2e-env | 4bd6a45bf1ec9456ed5acf5047b6aac3fcd19683 | [
"BSD-3-Clause"
] | null | null | null | """
Copyright (c) 2017 Cyberhaven
Copyright (c) 2017 Dependable Systems Laboratory, EPFL
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 right... | 36.3186 | 120 | 0.617565 | 8,841 | 0.448304 | 0 | 0 | 0 | 0 | 0 | 0 | 7,675 | 0.389179 |
654f10479c322ddf45d78b5c826a8ece925a9fa9 | 11,758 | py | Python | chart_analysis.py | DeltaEpsilon7787/SimfileLibrary | af9f0949c21ad69465c8444161e069148bec574d | [
"MIT"
] | null | null | null | chart_analysis.py | DeltaEpsilon7787/SimfileLibrary | af9f0949c21ad69465c8444161e069148bec574d | [
"MIT"
] | null | null | null | chart_analysis.py | DeltaEpsilon7787/SimfileLibrary | af9f0949c21ad69465c8444161e069148bec574d | [
"MIT"
] | null | null | null | import collections
from functools import lru_cache
from itertools import groupby, permutations
from operator import attrgetter
from typing import Counter, FrozenSet, Generic, List, Tuple, TypeVar, Union, cast
from attr import attrs, evolve
from .basic_types import Beat, CheaperFraction, NoteObject, Time, make_ordered... | 32.213699 | 118 | 0.608352 | 10,484 | 0.891648 | 0 | 0 | 7,266 | 0.617962 | 0 | 0 | 966 | 0.082157 |
654fb2a6de595344cf7603c4bae18a08ffdc2465 | 2,271 | py | Python | websocket_chat_server.py | ringolol/ru-gpts | 991ef3fb4dbe46f7512ec958704c6fa9998049ab | [
"Apache-2.0"
] | null | null | null | websocket_chat_server.py | ringolol/ru-gpts | 991ef3fb4dbe46f7512ec958704c6fa9998049ab | [
"Apache-2.0"
] | null | null | null | websocket_chat_server.py | ringolol/ru-gpts | 991ef3fb4dbe46f7512ec958704c6fa9998049ab | [
"Apache-2.0"
] | null | null | null | # WS server chat
import asyncio
import websockets
import torch
from transformers import AutoTokenizer, AutoModel, AutoModelWithLMHead
model_name = "sberbank-ai/rugpt2large" # "sberbank-ai/rugpt3large_based_on_gpt2"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelWithLMHead.from_pretrained(mode... | 30.689189 | 110 | 0.632321 | 0 | 0 | 0 | 0 | 0 | 0 | 1,592 | 0.690373 | 393 | 0.170425 |
6551a8bf653eda6b0c4ad77b9367ce0b7593d0e5 | 1,595 | py | Python | mocket/utils.py | hectorcanto/python-mocket | 76b6e26f51366a8f3494f3a767fb681af4e39ad8 | [
"BSD-3-Clause"
] | null | null | null | mocket/utils.py | hectorcanto/python-mocket | 76b6e26f51366a8f3494f3a767fb681af4e39ad8 | [
"BSD-3-Clause"
] | null | null | null | mocket/utils.py | hectorcanto/python-mocket | 76b6e26f51366a8f3494f3a767fb681af4e39ad8 | [
"BSD-3-Clause"
] | null | null | null | import binascii
import io
import os
import ssl
from .compat import decode_from_bytes, encode_to_bytes
SSL_PROTOCOL = ssl.PROTOCOL_SSLv23
class MocketSocketCore(io.BytesIO):
def write(self, content):
super(MocketSocketCore, self).write(content)
from mocket import Mocket
if Mocket.r_fd a... | 24.166667 | 117 | 0.664577 | 237 | 0.148589 | 0 | 0 | 0 | 0 | 0 | 0 | 263 | 0.16489 |
6551e1e19c5f8e4bf2d8b7c5b7b2115585ea7098 | 121 | py | Python | exercicios_fixacao/lista04/repet_lim_ex6.py | PauloVictorSS/unicamp-mc102 | 077ca3ea6d3df40ebe205c2e874d20a934ea5541 | [
"MIT"
] | null | null | null | exercicios_fixacao/lista04/repet_lim_ex6.py | PauloVictorSS/unicamp-mc102 | 077ca3ea6d3df40ebe205c2e874d20a934ea5541 | [
"MIT"
] | null | null | null | exercicios_fixacao/lista04/repet_lim_ex6.py | PauloVictorSS/unicamp-mc102 | 077ca3ea6d3df40ebe205c2e874d20a934ea5541 | [
"MIT"
] | null | null | null | number = int(input())
raiz = number/2
for i in range(1,20):
raiz = ((raiz ** 2) + number) / (2 * raiz)
print(raiz) | 15.125 | 46 | 0.561983 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
65532dd4c64895eea8a26b3bd064fbb56add0988 | 1,726 | py | Python | load.py | leonjovanovic/drl-ppo-bipedal-walker | 5005bb396b409079fbb2065a2ecd5c956ba86630 | [
"MIT"
] | 1 | 2022-01-21T23:19:20.000Z | 2022-01-21T23:19:20.000Z | load.py | leonjovanovic/drl-ppo-bipedal-walker | 5005bb396b409079fbb2065a2ecd5c956ba86630 | [
"MIT"
] | null | null | null | load.py | leonjovanovic/drl-ppo-bipedal-walker | 5005bb396b409079fbb2065a2ecd5c956ba86630 | [
"MIT"
] | null | null | null | import gym
import numpy as np
import torch
import Config
import NN
import json
PATH_DATA = 'models/data23.15.9.40.json'
PATH_MODEL = 'models/model23.15.9.40.p'
with open(PATH_DATA, 'r') as f:
json_load = json.loads(f.read())
obs_rms_mean = np.asarray(json_load["obs_rms_mean"])
obs_rms_var = np.asarra... | 35.958333 | 103 | 0.669757 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 193 | 0.111819 |
6558e8275ddb990e4df9e50898094d28930069c7 | 1,111 | py | Python | generate_sl4_1.8.py | qiantianpei/anonymizer | 5a1cd276b6c9766b54db187dd4750a04f7559665 | [
"Apache-2.0"
] | null | null | null | generate_sl4_1.8.py | qiantianpei/anonymizer | 5a1cd276b6c9766b54db187dd4750a04f7559665 | [
"Apache-2.0"
] | null | null | null | generate_sl4_1.8.py | qiantianpei/anonymizer | 5a1cd276b6c9766b54db187dd4750a04f7559665 | [
"Apache-2.0"
] | 2 | 2020-10-28T18:35:44.000Z | 2020-11-10T07:37:49.000Z | import json
from PIL import Image
with open('/home/tianpei.qian/workspace/data_local/sl4_front_1.0/sl4_side_val_1.7.json') as f:
val_1_7 = json.load(f)
with open('sl4_side_val_1.7/results.json') as f:
new_1_8 = json.load(f)
ROOT = '/home/tianpei.qian/workspace/data_local/sl4_front_1.0/'
for old, new in zip(... | 39.678571 | 130 | 0.633663 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 377 | 0.339334 |
65599b2db0af8388cda22867211e56c2902c85cb | 3,815 | py | Python | experiments/vitchyr/icml2017/watermaze_memory/generate_bellman_ablation_figure_data.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/vitchyr/icml2017/watermaze_memory/generate_bellman_ablation_figure_data.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/vitchyr/icml2017/watermaze_memory/generate_bellman_ablation_figure_data.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | """
Generate data for ablation analysis for ICML 2017 workshop paper.
"""
import random
from torch.nn import functional as F
from railrl.envs.pygame.water_maze import (
WaterMazeMemory,
)
from railrl.exploration_strategies.ou_strategy import OUStrategy
from railrl.launchers.launcher_util import (
run_experime... | 30.03937 | 69 | 0.5827 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 364 | 0.095413 |
6559e635e127e3a20be2565ece18e60b7e2271a6 | 1,053 | py | Python | setup.py | briancappello/py-meta-utils | 342a1ba804bd240044b96ae7ceb636c27fa5c95c | [
"MIT"
] | 1 | 2020-11-25T14:37:09.000Z | 2020-11-25T14:37:09.000Z | setup.py | briancappello/py-meta-utils | 342a1ba804bd240044b96ae7ceb636c27fa5c95c | [
"MIT"
] | null | null | null | setup.py | briancappello/py-meta-utils | 342a1ba804bd240044b96ae7ceb636c27fa5c95c | [
"MIT"
] | null | null | null | from setuptools import setup
with open('README.md', encoding='utf-8') as f:
long_description = f.read()
setup(
name='Py-Meta-Utils',
version='0.7.8',
description='Metaclass utilities for Python',
long_description=long_description,
long_description_content_type='text/markdown',
url='https... | 25.682927 | 61 | 0.603989 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 493 | 0.468186 |
6559f6467029322c3a83d9fc2e0fd805cb80dd9c | 363 | py | Python | wflow/doc/pcraster-for-doc-only/pcraster/pcrstat.py | quanpands/wflow | b454a55e4a63556eaac3fbabd97f8a0b80901e5a | [
"MIT"
] | null | null | null | wflow/doc/pcraster-for-doc-only/pcraster/pcrstat.py | quanpands/wflow | b454a55e4a63556eaac3fbabd97f8a0b80901e5a | [
"MIT"
] | 2 | 2018-07-05T14:36:18.000Z | 2020-03-19T21:16:37.000Z | build/bin/pcraster/framework/pcrstat.py | openearth/hydro-model-generator-wflow | 6f689859d0a9a307324db3dbe3f03c51884a42a8 | [
"MIT"
] | null | null | null | import math
# Returns a percentile of an array. It is assumed that the array is already
# sorted.
#
# The array must not be empty.
#
# Percentile must have a value between [0, 1.0].
def percentile(array, percentile):
assert len(array)
assert percentile >= 0.0 and percentile <= 1.0
index = int(math.ceil(percentil... | 25.928571 | 75 | 0.707989 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 164 | 0.451791 |
655a5cff4fee32ccc4f815a5371fc224869e3257 | 9,512 | py | Python | asetk/format/yambo.py | ltalirz/asetk | bdb31934a5eb49d601e492fc98078d27f5dd2ebd | [
"MIT"
] | 18 | 2017-02-07T21:35:21.000Z | 2021-09-02T13:44:36.000Z | asetk/format/yambo.py | ltalirz/asetk | bdb31934a5eb49d601e492fc98078d27f5dd2ebd | [
"MIT"
] | 4 | 2016-10-20T21:23:23.000Z | 2020-05-07T07:35:31.000Z | asetk/format/yambo.py | ltalirz/asetk | bdb31934a5eb49d601e492fc98078d27f5dd2ebd | [
"MIT"
] | 11 | 2016-10-20T21:17:20.000Z | 2021-04-13T15:23:47.000Z | """Classes for use with Yambo
Representation of a spectrum.
Main functionality is to read from Yambo output, o.qp files
and also netcdf databases.
"""
import re
import copy as cp
import numpy as np
import asetk.atomistic.fundamental as fu
import asetk.atomistic.constants as atc
from . import cube
class Dispersion:
... | 30.983713 | 96 | 0.54815 | 9,205 | 0.967725 | 0 | 0 | 2,067 | 0.217304 | 0 | 0 | 1,867 | 0.196278 |
655a775ff795ff440709723d33d45d1b64c46416 | 733 | py | Python | Chapter02/unittests/testExercise2_07.py | nijinjose/The-Supervised-Learning-Workshop | 33a2fec1e202dc1394116ed7a194bd8cabb61d49 | [
"MIT"
] | 19 | 2020-03-24T20:35:22.000Z | 2022-01-03T19:19:48.000Z | Chapter02/unittests/testExercise2_07.py | thisabhijit/The-Supervised-Learning-Workshop | 33a2fec1e202dc1394116ed7a194bd8cabb61d49 | [
"MIT"
] | null | null | null | Chapter02/unittests/testExercise2_07.py | thisabhijit/The-Supervised-Learning-Workshop | 33a2fec1e202dc1394116ed7a194bd8cabb61d49 | [
"MIT"
] | 50 | 2020-01-03T10:22:30.000Z | 2022-01-15T07:54:26.000Z | import unittest
import os
import json
import pandas as pd
import numpy as np
class TestingExercise2_07(unittest.TestCase):
def setUp(self) -> None:
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(ROOT_DIR, '..', 'dtypes.json'), 'r') as jsonfile:
self.dtyp =... | 34.904762 | 102 | 0.649386 | 607 | 0.828104 | 0 | 0 | 0 | 0 | 0 | 0 | 65 | 0.088677 |
655b3273748ed0aac050a9902d9955141b494618 | 6,684 | py | Python | models/cfnet.py | Cousin-Zan/Semantic-Segmentation-for-Steel-Strip-Surface-Defect-Detection | ae135743cc190cdf5a04b5d3ca04dde44f6dd58a | [
"Apache-2.0"
] | null | null | null | models/cfnet.py | Cousin-Zan/Semantic-Segmentation-for-Steel-Strip-Surface-Defect-Detection | ae135743cc190cdf5a04b5d3ca04dde44f6dd58a | [
"Apache-2.0"
] | null | null | null | models/cfnet.py | Cousin-Zan/Semantic-Segmentation-for-Steel-Strip-Surface-Defect-Detection | ae135743cc190cdf5a04b5d3ca04dde44f6dd58a | [
"Apache-2.0"
] | 1 | 2022-01-20T06:06:21.000Z | 2022-01-20T06:06:21.000Z | """
The implementation of PAN (Pyramid Attention Networks) based on Tensorflow.
@Author: Yang Lu
@Author: Zan Peng
@Github: https://github.com/luyanger1799
@Github: https://github.com/Cousin-Zan
@Project: https://github.com/luyanger1799/amazing-semantic-segmentation
"""
from utils import layers as custom_layers
from ... | 36.52459 | 113 | 0.623429 | 6,199 | 0.927439 | 0 | 0 | 0 | 0 | 0 | 0 | 951 | 0.14228 |
655c497fe83653b39f7896791196ee547dcad9d2 | 2,340 | py | Python | api/test/test_cli/test_bra_record_helper/test_persist.py | RemiDesgrange/nivo | e13dcd7c00d1fbc41c23d51c9004901d7704b498 | [
"MIT"
] | 2 | 2019-05-07T20:23:59.000Z | 2020-04-26T11:18:38.000Z | api/test/test_cli/test_bra_record_helper/test_persist.py | RemiDesgrange/nivo | e13dcd7c00d1fbc41c23d51c9004901d7704b498 | [
"MIT"
] | 89 | 2019-08-06T12:47:50.000Z | 2022-03-28T04:03:25.000Z | api/test/test_cli/test_bra_record_helper/test_persist.py | RemiDesgrange/nivo | e13dcd7c00d1fbc41c23d51c9004901d7704b498 | [
"MIT"
] | 1 | 2020-06-23T10:07:38.000Z | 2020-06-23T10:07:38.000Z | from uuid import UUID
from sqlalchemy import select, bindparam
from nivo_api.cli.bra_record_helper.persist import persist_zone, persist_massif
from nivo_api.core.db.connection import connection_scope
from nivo_api.core.db.models.sql.bra import ZoneTable, DepartmentTable, MassifTable
from test.pytest_fixtures import... | 33.428571 | 83 | 0.571368 | 2,001 | 0.855128 | 0 | 0 | 0 | 0 | 0 | 0 | 213 | 0.091026 |
655d1df65aed622243c78b66ce8d27bd0eb7b948 | 780 | py | Python | FractionalKnapsack.py | shatheesh171/greedy-algos | 2826f57be7b7c6223e266cf2283cc79e040e094a | [
"MIT"
] | null | null | null | FractionalKnapsack.py | shatheesh171/greedy-algos | 2826f57be7b7c6223e266cf2283cc79e040e094a | [
"MIT"
] | null | null | null | FractionalKnapsack.py | shatheesh171/greedy-algos | 2826f57be7b7c6223e266cf2283cc79e040e094a | [
"MIT"
] | null | null | null | class Item:
def __init__(self,weight,value) -> None:
self.weight=weight
self.value=value
self.ratio=value/weight
def knapsackMethod(items,capacity):
items.sort(key=lambda x: x.ratio,reverse=True)
usedCapacity=0
totalValue=0
for i in items:
if usedCapacity+i.weight<=c... | 25.16129 | 51 | 0.637179 | 140 | 0.179487 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.030769 |
655e6832b1d17e6f32fa6e6e3a8b08c294e9b6de | 4,146 | py | Python | jspp_imageutils/image/chunking.py | jspaezp/jspp_imageutils | 6376e274a1b0675622a7979c181b9effc125aa09 | [
"Apache-2.0"
] | null | null | null | jspp_imageutils/image/chunking.py | jspaezp/jspp_imageutils | 6376e274a1b0675622a7979c181b9effc125aa09 | [
"Apache-2.0"
] | null | null | null | jspp_imageutils/image/chunking.py | jspaezp/jspp_imageutils | 6376e274a1b0675622a7979c181b9effc125aa09 | [
"Apache-2.0"
] | null | null | null | import itertools
import numpy as np
from jspp_imageutils.image.types import GenImgArray, GenImgBatch
from typing import Tuple, Iterable, Iterator
# TODO: fix everywhere the x and y axis nomenclature
"""
chunk_image_on_position -> returns images
chunk_image_generator -> returns images
chunk_data_image_generator -> re... | 33.168 | 74 | 0.605885 | 0 | 0 | 3,791 | 0.914375 | 0 | 0 | 0 | 0 | 1,305 | 0.314761 |
655f05c48f34f6d4f2b19130434604b15e5c99a3 | 1,598 | py | Python | python/craftassist/ttad/generation_dialogues/build_scene_flat_script.py | satyamedh/craftassist | d97cbc14bc25149d3ef41737231ab9f3cb7e392a | [
"MIT"
] | 626 | 2019-07-18T18:40:44.000Z | 2022-03-29T17:34:43.000Z | python/craftassist/ttad/generation_dialogues/build_scene_flat_script.py | satyamedh/craftassist | d97cbc14bc25149d3ef41737231ab9f3cb7e392a | [
"MIT"
] | 42 | 2019-07-27T11:04:15.000Z | 2021-02-23T03:15:14.000Z | python/craftassist/ttad/generation_dialogues/build_scene_flat_script.py | satyamedh/craftassist | d97cbc14bc25149d3ef41737231ab9f3cb7e392a | [
"MIT"
] | 89 | 2019-07-19T15:07:39.000Z | 2022-02-15T18:44:24.000Z | if __name__ == "__main__":
import argparse
import pickle
import os
from tqdm import tqdm
from build_scene import *
from block_data import COLOR_BID_MAP
BLOCK_DATA = pickle.load(
open("/private/home/aszlam/minecraft_specs/block_images/block_data", "rb")
)
allowed_blocktypes ... | 32.612245 | 99 | 0.621402 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 443 | 0.277222 |
655fb86e683d32b0ac543bc333e3c26a2dfbef4d | 1,256 | py | Python | modules/transfer/scripts/info.py | sishuiliunian/falcon-plus | eb6e2a5c29b26812601535cec602b33ee42b0632 | [
"Apache-2.0"
] | 7,208 | 2017-01-15T08:32:54.000Z | 2022-03-31T14:09:04.000Z | modules/transfer/scripts/info.py | sishuiliunian/falcon-plus | eb6e2a5c29b26812601535cec602b33ee42b0632 | [
"Apache-2.0"
] | 745 | 2017-01-17T06:55:21.000Z | 2022-03-28T03:33:45.000Z | modules/transfer/scripts/info.py | sishuiliunian/falcon-plus | eb6e2a5c29b26812601535cec602b33ee42b0632 | [
"Apache-2.0"
] | 1,699 | 2017-01-11T09:16:44.000Z | 2022-03-29T10:40:31.000Z | import requests
# Copyright 2017 Xiaomi, 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 agree... | 32.205128 | 96 | 0.630573 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 931 | 0.741242 |
655fe9ed2aae210f7f4352487b731196a667f5ea | 18,904 | py | Python | pyhpecw7/features/interface.py | zhangshilinh3c/pyhpecw7 | 93bc0d323be89b3672413bbddd25c66f75640fb5 | [
"Apache-2.0"
] | null | null | null | pyhpecw7/features/interface.py | zhangshilinh3c/pyhpecw7 | 93bc0d323be89b3672413bbddd25c66f75640fb5 | [
"Apache-2.0"
] | null | null | null | pyhpecw7/features/interface.py | zhangshilinh3c/pyhpecw7 | 93bc0d323be89b3672413bbddd25c66f75640fb5 | [
"Apache-2.0"
] | 1 | 2022-01-27T12:17:20.000Z | 2022-01-27T12:17:20.000Z | """Manage interfaces on HPCOM7 devices.
"""
from pyhpecw7.utils.xml.lib import reverse_value_map
from pyhpecw7.features.errors import InterfaceCreateError, InterfaceTypeError,\
InterfaceAbsentError, InterfaceParamsError, InterfaceVlanMustExist
from pyhpecw7.features.vlan import Vlan
from pyhpecw7.utils.xml.lib im... | 34.75 | 98 | 0.541473 | 18,574 | 0.982543 | 0 | 0 | 0 | 0 | 0 | 0 | 9,881 | 0.522694 |
6561c740148f4e9dc7f6313a8907266fbf944537 | 233 | py | Python | backend/src/urls.py | Ornstein89/LeadersOfDigital2021_FoxhoundTeam | a376525b07b900bd69dbc274daef66ddad7f1800 | [
"MIT"
] | null | null | null | backend/src/urls.py | Ornstein89/LeadersOfDigital2021_FoxhoundTeam | a376525b07b900bd69dbc274daef66ddad7f1800 | [
"MIT"
] | null | null | null | backend/src/urls.py | Ornstein89/LeadersOfDigital2021_FoxhoundTeam | a376525b07b900bd69dbc274daef66ddad7f1800 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
from src.base import urls as base_api
urlpatterns = [
path('admin/', admin.site.urls),
path('rest_api/', include(
base_api.urlpatterns
)),
] | 21.181818 | 37 | 0.690987 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 0.081545 |
65630efee031ba20e8ef330189053978c1325cc3 | 1,610 | py | Python | mobilib/voronoi.py | simberaj/mobilib | ae350d095a34f53704bd4aaaf7f45e573bda779a | [
"MIT"
] | null | null | null | mobilib/voronoi.py | simberaj/mobilib | ae350d095a34f53704bd4aaaf7f45e573bda779a | [
"MIT"
] | null | null | null | mobilib/voronoi.py | simberaj/mobilib | ae350d095a34f53704bd4aaaf7f45e573bda779a | [
"MIT"
] | null | null | null | """Compute ordinary Voronoi diagrams in Shapely geometries."""
import operator
import numpy
import scipy.spatial
import shapely.geometry
import shapely.geometry.base
import shapely.prepared
def pointset_bounds(coords):
return (
min(coords, key=operator.itemgetter(0))[0],
min(coords, key=operator... | 30.377358 | 77 | 0.657143 | 0 | 0 | 768 | 0.477019 | 0 | 0 | 0 | 0 | 62 | 0.038509 |
65632cf97d92397090002645e3a65de42c6a7e8a | 12,147 | py | Python | ml4tc/scripts/plot_composite_saliency_map.py | thunderhoser/ml4tc | dd97972675c462634cf43fa9ad486049429095e9 | [
"MIT"
] | 2 | 2021-08-24T04:24:22.000Z | 2021-09-29T07:52:21.000Z | ml4tc/scripts/plot_composite_saliency_map.py | thunderhoser/ml4tc | dd97972675c462634cf43fa9ad486049429095e9 | [
"MIT"
] | null | null | null | ml4tc/scripts/plot_composite_saliency_map.py | thunderhoser/ml4tc | dd97972675c462634cf43fa9ad486049429095e9 | [
"MIT"
] | null | null | null | """Plots composite saliency map."""
import argparse
import numpy
import matplotlib
matplotlib.use('agg')
from matplotlib import pyplot
from gewittergefahr.gg_utils import general_utils as gg_general_utils
from gewittergefahr.gg_utils import file_system_utils
from gewittergefahr.plotting import imagemagick_utils
from m... | 36.697885 | 80 | 0.724788 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,190 | 0.180291 |
6563e55d840f23f4832429e81437245ecfd8105f | 16,089 | py | Python | Autocoders/Python/src/fprime_ac/models/CompFactory.py | LeStarch/lgtm-fprime | 904b0311fe647745b29075d44259d1dc1f4284ae | [
"Apache-2.0"
] | 1 | 2021-01-30T15:53:01.000Z | 2021-01-30T15:53:01.000Z | Autocoders/Python/src/fprime_ac/models/CompFactory.py | LeStarch/lgtm-fprime | 904b0311fe647745b29075d44259d1dc1f4284ae | [
"Apache-2.0"
] | 1 | 2020-12-03T14:14:51.000Z | 2020-12-03T14:14:51.000Z | Autocoders/Python/src/fprime_ac/models/CompFactory.py | LeStarch/lgtm-fprime | 904b0311fe647745b29075d44259d1dc1f4284ae | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# ===============================================================================
# NAME: CompFactory.py
#
# DESCRIPTION: This is a factory class for instancing the Component
# and building up the Port and Arg configuration required.
#
# AUTHOR: reder
# EMAIL: [email protected]
# D... | 37.503497 | 144 | 0.514948 | 15,218 | 0.945864 | 0 | 0 | 0 | 0 | 0 | 0 | 3,199 | 0.198831 |
65644397de88c237a6908c085913149171a8b5ff | 7,896 | py | Python | Algo_Ds_Notes-master/Algo_Ds_Notes-master/A_Star_Search_Algorithm/A_Star_Search_Algorithm.py | rajatenzyme/Coding-Journey- | 65a0570153b7e3393d78352e78fb2111223049f3 | [
"MIT"
] | null | null | null | Algo_Ds_Notes-master/Algo_Ds_Notes-master/A_Star_Search_Algorithm/A_Star_Search_Algorithm.py | rajatenzyme/Coding-Journey- | 65a0570153b7e3393d78352e78fb2111223049f3 | [
"MIT"
] | null | null | null | Algo_Ds_Notes-master/Algo_Ds_Notes-master/A_Star_Search_Algorithm/A_Star_Search_Algorithm.py | rajatenzyme/Coding-Journey- | 65a0570153b7e3393d78352e78fb2111223049f3 | [
"MIT"
] | null | null | null | class Node:
"""
A node class used in A* Pathfinding.
parent: it is parent of current node
position: it is current position of node in the maze.
g: cost from start to current Node
h: heuristic based estimated cost for current Node to end Node
f: total cost of present n... | 37.6 | 172 | 0.517477 | 6,343 | 0.803318 | 0 | 0 | 0 | 0 | 0 | 0 | 2,567 | 0.325101 |
6564bbdf498ee27811e27e457eaf27523a8129cd | 1,765 | py | Python | setup.py | ikonst/dql | e9d3aa22873076dae5ebd02e35318aa996b1e56a | [
"MIT"
] | null | null | null | setup.py | ikonst/dql | e9d3aa22873076dae5ebd02e35318aa996b1e56a | [
"MIT"
] | null | null | null | setup.py | ikonst/dql | e9d3aa22873076dae5ebd02e35318aa996b1e56a | [
"MIT"
] | null | null | null | """ Setup file """
import os
from setuptools import setup, find_packages
HERE = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(HERE, "README.rst")).read()
CHANGES = open(os.path.join(HERE, "CHANGES.rst")).read()
REQUIREMENTS = [
"dynamo3>=0.4.7",
"future>=0.15.0",
"pyparsing==2.1.... | 31.517857 | 61 | 0.571671 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 814 | 0.46119 |
65682d4917d1f98a115d05b121741cbfe858fff9 | 3,368 | py | Python | runner.py | leodenault/mhw_optimizer | 3478ea07361291c6fa0bbd9fc0b9906914321772 | [
"MIT"
] | null | null | null | runner.py | leodenault/mhw_optimizer | 3478ea07361291c6fa0bbd9fc0b9906914321772 | [
"MIT"
] | null | null | null | runner.py | leodenault/mhw_optimizer | 3478ea07361291c6fa0bbd9fc0b9906914321772 | [
"MIT"
] | 1 | 2020-03-31T01:51:56.000Z | 2020-03-31T01:51:56.000Z | import multiprocessing
import csv_exporter
from combination.brute_force_combination_algorithm import \
BruteForceCombinationAlgorithm
from combination.combiner import Combiner
from combination.constrained_combination_algorithm import \
ConstrainedCombinationAlgorithm
from config.config_importer import ConfigIm... | 33.68 | 80 | 0.68171 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 208 | 0.061758 |
65689df9a53af776eb5d8ed7fadb2de295eee509 | 1,959 | py | Python | setup.py | AurelienLourot/lsankidb | 74479dd26e3a1ba7e40aca7740668998ff3ab944 | [
"Unlicense"
] | 26 | 2018-04-21T15:49:19.000Z | 2022-03-01T00:42:37.000Z | setup.py | AurelienLourot/lsankidb | 74479dd26e3a1ba7e40aca7740668998ff3ab944 | [
"Unlicense"
] | 2 | 2019-02-02T04:20:04.000Z | 2020-05-08T09:03:28.000Z | setup.py | AurelienLourot/lsankidb | 74479dd26e3a1ba7e40aca7740668998ff3ab944 | [
"Unlicense"
] | 1 | 2020-08-19T20:59:18.000Z | 2020-08-19T20:59:18.000Z | from setuptools import setup
import src
setup(name='lsankidb',
version=src.__version__,
install_requires=['AnkiTools'],
description='"ls" for your local Anki database.',
#FIXME this duplicates README.md
long_description="""
.. image:: https://cdn.jsdelivr.net/gh/AurelienLourot/lsankidb@c... | 30.609375 | 123 | 0.566616 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,330 | 0.678571 |
656a26c896dba737b3e9298b257c0fdd56db182e | 274 | py | Python | output/models/ibm_data/valid/s3_12/s3_12v06_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ibm_data/valid/s3_12/s3_12v06_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ibm_data/valid/s3_12/s3_12v06_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.ibm_data.valid.s3_12.s3_12v06_xsd.s3_12v06 import (
ChildTypeBase,
ChildTypeDerived,
CtAlt1,
CtAlt2,
CtBase,
Root,
)
__all__ = [
"ChildTypeBase",
"ChildTypeDerived",
"CtAlt1",
"CtAlt2",
"CtBase",
"Root",
]
| 15.222222 | 70 | 0.616788 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 0.229927 |
656a2c3eae1d6b7509dea9e1654cbf2d7ca142de | 936 | py | Python | main/component/database.py | nguyentranhoan/uit-mobile | 8546312b01373d94cf00c64f7eacb769e0f4ccce | [
"BSD-3-Clause"
] | null | null | null | main/component/database.py | nguyentranhoan/uit-mobile | 8546312b01373d94cf00c64f7eacb769e0f4ccce | [
"BSD-3-Clause"
] | null | null | null | main/component/database.py | nguyentranhoan/uit-mobile | 8546312b01373d94cf00c64f7eacb769e0f4ccce | [
"BSD-3-Clause"
] | null | null | null | import logging
from injector import inject, singleton
from starlette.config import Config
from common.database import BaseDatabase
LOGGER = logging.getLogger(__name__)
@singleton
@inject
class MasterDatabase(BaseDatabase):
def __init__(self, config: Config) -> None:
super().__init__(config)
se... | 22.829268 | 70 | 0.702991 | 721 | 0.770299 | 0 | 0 | 759 | 0.810897 | 0 | 0 | 112 | 0.119658 |
656a96b402f3415f23db4722e5168fd52c75cff5 | 832 | py | Python | preml/showtime/showie.py | 5amron/pre-ml | 3dff146d89468f4db0b7a9d92f3b0a26854efaf8 | [
"MIT"
] | 3 | 2017-09-03T17:55:54.000Z | 2018-11-24T13:11:19.000Z | preml/showtime/showie.py | 5amron/pre-ml | 3dff146d89468f4db0b7a9d92f3b0a26854efaf8 | [
"MIT"
] | 2 | 2021-12-08T14:51:24.000Z | 2021-12-09T15:42:09.000Z | preml/showtime/showie.py | 5amron/pre-ml | 3dff146d89468f4db0b7a9d92f3b0a26854efaf8 | [
"MIT"
] | 2 | 2019-07-16T01:28:48.000Z | 2020-04-12T21:23:08.000Z | from . import baco_show
# solution === (new_dataset, best_ant_road, acc_before_run, best_fit_so_far, total_feature_num, best_selected_features_num, best_fitnesses_each_iter, average_fitnesses_each_iter ,num_of_features_selected_by_best_ant_each_iter, time_temp, sample_num)
def draw_baco(solution):
if(len(solu... | 48.941176 | 249 | 0.824519 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 306 | 0.367788 |
656d941b23f4bcfcea63953ee33a50e5ae179565 | 2,035 | py | Python | PyFlow/UI/EncodeResources.py | QuentinTournier40/AnimationFreeCAD | 8eaff8356ec68b948a721b83a6888b652278db8a | [
"Apache-2.0"
] | null | null | null | PyFlow/UI/EncodeResources.py | QuentinTournier40/AnimationFreeCAD | 8eaff8356ec68b948a721b83a6888b652278db8a | [
"Apache-2.0"
] | null | null | null | PyFlow/UI/EncodeResources.py | QuentinTournier40/AnimationFreeCAD | 8eaff8356ec68b948a721b83a6888b652278db8a | [
"Apache-2.0"
] | 1 | 2022-02-03T08:03:30.000Z | 2022-02-03T08:03:30.000Z | # Copyright 2015-2019 Ilgar Lunin, Pedro Cabrera
# 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... | 31.796875 | 83 | 0.634889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 914 | 0.44914 |
656dd6e36b81c8ae6c5f6face7c1c54668fb5ff1 | 307 | py | Python | stix_shifter_modules/secretserver/stix_transmission/delete_connector.py | grimmjow8/stix-shifter | 7d252fc241a606f0141ed50d64368d8a5e7e5c5a | [
"Apache-2.0"
] | 129 | 2019-10-09T17:13:03.000Z | 2022-03-03T08:25:46.000Z | stix_shifter_modules/secretserver/stix_transmission/delete_connector.py | grimmjow8/stix-shifter | 7d252fc241a606f0141ed50d64368d8a5e7e5c5a | [
"Apache-2.0"
] | 415 | 2019-10-03T14:29:20.000Z | 2022-03-31T18:23:41.000Z | stix_shifter_modules/secretserver/stix_transmission/delete_connector.py | grimmjow8/stix-shifter | 7d252fc241a606f0141ed50d64368d8a5e7e5c5a | [
"Apache-2.0"
] | 178 | 2019-10-08T22:18:48.000Z | 2022-03-21T11:04:05.000Z | from stix_shifter_utils.modules.base.stix_transmission.base_delete_connector import BaseDeleteConnector
class DeleteConnector(BaseDeleteConnector):
def __init__(self, api_client):
self.api_client = api_client
def delete_query_connection(self, search_id):
return {"success": True}
| 30.7 | 103 | 0.781759 | 200 | 0.651466 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.029316 |
65710b598ac66d11ae7f738f8a51d26c406a0a31 | 6,525 | py | Python | cron/sync_cs_schedule.py | vovagalchenko/onsite-inflight | 7acd4bc6a12b89ab09b465a81ae495bef35bab0a | [
"MIT"
] | null | null | null | cron/sync_cs_schedule.py | vovagalchenko/onsite-inflight | 7acd4bc6a12b89ab09b465a81ae495bef35bab0a | [
"MIT"
] | 1 | 2016-05-24T00:00:10.000Z | 2016-05-24T00:00:10.000Z | cron/sync_cs_schedule.py | vovagalchenko/onsite-inflight | 7acd4bc6a12b89ab09b465a81ae495bef35bab0a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import pprint
from model.cs_rep import CS_Rep
from pytz import timezone, utc
from datetime import datetime, timedelta
from lib.calendar import Google_Calendar, google_ts_to_datetime, DEFAULT_DATE, LOS_ANGELES_TZ
from lib.conf import CFG
from model.db_session import DB_Session_Factory
f... | 50.976563 | 255 | 0.630192 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 585 | 0.089655 |
6572eb6865b171103c8335e5748af8c03fb39e11 | 5,500 | py | Python | hardware/opentrons_hardware/drivers/can_bus/can_messenger.py | anuwrag/opentrons | 28c8d76a19e367c6bd38f5290faaa32abf378715 | [
"Apache-2.0"
] | null | null | null | hardware/opentrons_hardware/drivers/can_bus/can_messenger.py | anuwrag/opentrons | 28c8d76a19e367c6bd38f5290faaa32abf378715 | [
"Apache-2.0"
] | null | null | null | hardware/opentrons_hardware/drivers/can_bus/can_messenger.py | anuwrag/opentrons | 28c8d76a19e367c6bd38f5290faaa32abf378715 | [
"Apache-2.0"
] | null | null | null | """Can messenger class."""
from __future__ import annotations
import asyncio
from inspect import Traceback
from typing import List, Optional, Callable, Tuple
import logging
from opentrons_hardware.drivers.can_bus.abstract_driver import AbstractCanDriver
from opentrons_hardware.firmware_bindings.arbitration_id import (... | 33.333333 | 131 | 0.623818 | 4,638 | 0.843273 | 0 | 0 | 0 | 0 | 2,506 | 0.455636 | 1,212 | 0.220364 |
65745bf4fb319f381c713d4d3577e3e4308c9cad | 3,390 | py | Python | document.py | miguelps/web-document-scanner | e1d61a6cf37a2f79805098bfa22173f4c7aab8d8 | [
"MIT"
] | 23 | 2017-09-28T12:56:38.000Z | 2022-01-06T04:14:55.000Z | document.py | miguelps/web-document-scanner | e1d61a6cf37a2f79805098bfa22173f4c7aab8d8 | [
"MIT"
] | null | null | null | document.py | miguelps/web-document-scanner | e1d61a6cf37a2f79805098bfa22173f4c7aab8d8 | [
"MIT"
] | 17 | 2018-01-12T07:10:37.000Z | 2020-11-14T10:00:59.000Z | import cv2
import rect
import numpy as np
class Scanner(object):
def __init__(self):
pass
def __del__(self):
pass
def auto_canny(self, image, sigma=0.33):
v = np.median(image)
lower = int(max(0, (1.0 - sigma) * v))
upper = int(min(255, (1.0 + sigma) * v))
... | 37.666667 | 94 | 0.562832 | 3,336 | 0.984071 | 0 | 0 | 0 | 0 | 0 | 0 | 1,066 | 0.314454 |
657481068e2f17e43b44ef100d1a13a239c78046 | 797 | py | Python | 54.py | geethakamath18/Leetcode | 8e55e0a47ee35ed100b30dda6682c7ce1033d4b2 | [
"MIT"
] | null | null | null | 54.py | geethakamath18/Leetcode | 8e55e0a47ee35ed100b30dda6682c7ce1033d4b2 | [
"MIT"
] | null | null | null | 54.py | geethakamath18/Leetcode | 8e55e0a47ee35ed100b30dda6682c7ce1033d4b2 | [
"MIT"
] | null | null | null | #LeetCode problem 54: Spiral Matrix
class Solution:
def spiralOrder(self, matrix: List[List[int]]) -> List[int]:
if(len(matrix)==0 or len(matrix[0])==0):
return []
res=[]
rb=0
re=len(matrix)
cb=0
ce=len(matrix[0])
while(re>rb and ce>cb):
... | 30.653846 | 64 | 0.425345 | 761 | 0.954831 | 0 | 0 | 0 | 0 | 0 | 0 | 35 | 0.043915 |
657754f3c56c1f682c95288c291fac1e80bdecd4 | 717 | py | Python | pytype/pyi/parse_pyi.py | CyberFlameGO/pytype | c8cbeea997634455b5abcb27c76c58aa0dfc25ae | [
"Apache-2.0"
] | null | null | null | pytype/pyi/parse_pyi.py | CyberFlameGO/pytype | c8cbeea997634455b5abcb27c76c58aa0dfc25ae | [
"Apache-2.0"
] | null | null | null | pytype/pyi/parse_pyi.py | CyberFlameGO/pytype | c8cbeea997634455b5abcb27c76c58aa0dfc25ae | [
"Apache-2.0"
] | null | null | null | # python3
"""Testing code to run the typed_ast based pyi parser."""
import sys
from pytype import module_utils
from pytype.pyi import parser
from pytype.pyi.types import ParseError # pylint: disable=g-importing-member
from pytype.pytd import pytd_utils
if __name__ == '__main__':
filename = sys.argv[1]
with op... | 21.727273 | 77 | 0.659693 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 173 | 0.241283 |
6577dab5ac11bbb023397905f08425826f206066 | 176 | py | Python | backend/university/admin.py | andriyandrushko0/univowl | da613316021f7b41b133b5b6e360cc6b9db60504 | [
"MIT"
] | null | null | null | backend/university/admin.py | andriyandrushko0/univowl | da613316021f7b41b133b5b6e360cc6b9db60504 | [
"MIT"
] | null | null | null | backend/university/admin.py | andriyandrushko0/univowl | da613316021f7b41b133b5b6e360cc6b9db60504 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import *
admin.site.register(University)
admin.site.register(Faculty)
admin.site.register(Subject)
admin.site.register(Teacher)
| 19.555556 | 32 | 0.8125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
65780384622ed08f0a6ec4a97dc9199a0a7d8975 | 1,333 | py | Python | src/train.py | shuvoxcd01/neural_tic_tac_toe | a988230ff3dd0d882ebc0fb19630c9ff22fef629 | [
"Apache-2.0"
] | null | null | null | src/train.py | shuvoxcd01/neural_tic_tac_toe | a988230ff3dd0d882ebc0fb19630c9ff22fef629 | [
"Apache-2.0"
] | null | null | null | src/train.py | shuvoxcd01/neural_tic_tac_toe | a988230ff3dd0d882ebc0fb19630c9ff22fef629 | [
"Apache-2.0"
] | null | null | null | from pettingzoo.classic import tictactoe_v3
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
import tensorflow as tf
if tf.test.gpu_device_name():
print('GPU found')
else:
print("No GPU found")
from src.q_learning.agent.agent import Agent
from src.q_learning.network.dqn import DQN
from src.q_learning.polici... | 32.512195 | 108 | 0.795199 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.03826 |
657895d9e23f4c721777cf7c3eb7603b0f1ecfd7 | 199 | py | Python | app/gunicorn_settings.py | jsonbinit/jsonbinit-api | babbf16f1fafe913d9fdb2646cb7a9542ec19355 | [
"MIT"
] | 3 | 2020-06-24T14:55:51.000Z | 2020-06-25T23:12:13.000Z | app/gunicorn_settings.py | jsonbinit/jsonbinit-api | babbf16f1fafe913d9fdb2646cb7a9542ec19355 | [
"MIT"
] | 3 | 2020-04-23T10:39:25.000Z | 2020-06-24T15:22:25.000Z | app/gunicorn_settings.py | jsonbinit/jsonbinit-api | babbf16f1fafe913d9fdb2646cb7a9542ec19355 | [
"MIT"
] | null | null | null | import multiprocessing
import os
bind = "{0}:{1}".format(os.environ.get('HOST', '0.0.0.0'), os.environ.get('PORT', '8080'))
workers = os.environ.get('WORKERS', multiprocessing.cpu_count() * 2 + 1)
| 28.428571 | 90 | 0.668342 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.226131 |
65795b0076fedc356eabb71c92883de2bfec241d | 261 | py | Python | tests/test_crud/conftest.py | amisadmin/fastapi_amis_admin | 07967a31c46cb6e8e0b4ca703d6d815c2091624a | [
"Apache-2.0"
] | 166 | 2022-02-05T15:52:51.000Z | 2022-03-31T10:57:35.000Z | tests/test_crud/conftest.py | amisadmin/fastapi_amis_admin | 07967a31c46cb6e8e0b4ca703d6d815c2091624a | [
"Apache-2.0"
] | 9 | 2022-02-17T07:32:58.000Z | 2022-03-31T13:46:24.000Z | tests/test_crud/conftest.py | amisadmin/fastapi_amis_admin | 07967a31c46cb6e8e0b4ca703d6d815c2091624a | [
"Apache-2.0"
] | 15 | 2022-02-10T07:24:17.000Z | 2022-03-24T04:08:10.000Z | import pytest
from tests.test_crud.main import app
@pytest.fixture(scope='session', autouse=True)
def startup():
import asyncio
# asyncio.run(app.router.startup())
loop = asyncio.get_event_loop()
loop.run_until_complete(app.router.startup())
| 21.75 | 49 | 0.731801 | 0 | 0 | 0 | 0 | 206 | 0.789272 | 0 | 0 | 44 | 0.168582 |
657a75ed6a167a9a6dc1817f3c5d4306180485f8 | 794 | py | Python | Ehemalige/models.py | wmles/olymp | 97b1a256982c2a75c39ba3a855b63a147d4409c5 | [
"MIT"
] | null | null | null | Ehemalige/models.py | wmles/olymp | 97b1a256982c2a75c39ba3a855b63a147d4409c5 | [
"MIT"
] | null | null | null | Ehemalige/models.py | wmles/olymp | 97b1a256982c2a75c39ba3a855b63a147d4409c5 | [
"MIT"
] | null | null | null | from django.db import models
""" Konzept:
Man soll sich als Ehemaliger in die DB eintragen können (Nutzeraccount
dafür nötig?)
Es gibt ein Textfeld für den Lebenslauf und die Auswahl des aktuellen Ortes
und der Tätigkeit.
ehem, das kommt mir ziemlich eng vor, so wie die alte Version der olymp-db
"""
from Grundge... | 33.083333 | 76 | 0.760705 | 385 | 0.480649 | 0 | 0 | 0 | 0 | 0 | 0 | 373 | 0.465668 |
657b2220279cfe93a6ac57a28426feba8dfe7ccf | 15,921 | py | Python | market_maker/market_maker.py | Quant-Network/sample-market-maker | 4c47b60be66b1aead901400ba5fe96abf5e73c1b | [
"Apache-2.0"
] | null | null | null | market_maker/market_maker.py | Quant-Network/sample-market-maker | 4c47b60be66b1aead901400ba5fe96abf5e73c1b | [
"Apache-2.0"
] | null | null | null | market_maker/market_maker.py | Quant-Network/sample-market-maker | 4c47b60be66b1aead901400ba5fe96abf5e73c1b | [
"Apache-2.0"
] | 1 | 2021-04-27T12:02:41.000Z | 2021-04-27T12:02:41.000Z | from __future__ import absolute_import
from time import sleep
import sys
from datetime import datetime
from os.path import getmtime
import random
import requests
import atexit
import signal
import logging
from market_maker.bitmex import BitMEX
from market_maker.settings import settings
from market_maker.utils import l... | 39.408416 | 139 | 0.606746 | 15,062 | 0.946046 | 0 | 0 | 0 | 0 | 0 | 0 | 4,481 | 0.281452 |
657cf1129b53d3a0b63a22aabb558fd5bc616640 | 179 | py | Python | pythonfiles/scoring.py | amrut-prabhu/loan-default-prediction | 2e0a91529a71c69e93d7b30decefc59f2627406f | [
"MIT"
] | 2 | 2020-05-06T15:11:56.000Z | 2020-05-24T13:51:55.000Z | pythonfiles/scoring.py | amrut-prabhu/loan-default-prediction | 2e0a91529a71c69e93d7b30decefc59f2627406f | [
"MIT"
] | null | null | null | pythonfiles/scoring.py | amrut-prabhu/loan-default-prediction | 2e0a91529a71c69e93d7b30decefc59f2627406f | [
"MIT"
] | 2 | 2018-09-23T07:09:51.000Z | 2021-12-16T17:58:14.000Z | import numpy as np
def import_accuracy(y_test, predictions):
errors = abs(predictions - y_test)
mape = 100 * (errors / y_test)
accuracy = 100 - np.mean(mape)
return accuracy
| 22.375 | 41 | 0.726257 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
657d1df2ec7237f7821e8629ba8c0b4d674b5456 | 2,406 | py | Python | app/core/tests/test_admin.py | ido777/newish | 298a3d5babf411ba1eb777101eb6e8f70b9e495f | [
"MIT"
] | null | null | null | app/core/tests/test_admin.py | ido777/newish | 298a3d5babf411ba1eb777101eb6e8f70b9e495f | [
"MIT"
] | null | null | null | app/core/tests/test_admin.py | ido777/newish | 298a3d5babf411ba1eb777101eb6e8f70b9e495f | [
"MIT"
] | null | null | null | import pytest
from django.urls import reverse
@pytest.mark.skip(reason="WIP moving to pytest tests")
def test_with_authenticated_client(client, django_user_model):
email = '[email protected]'
password = 'password123'
admin_user = django_user_model.objects.create_superuser(
email, password)
c... | 31.246753 | 102 | 0.676226 | 0 | 0 | 0 | 0 | 611 | 0.253948 | 0 | 0 | 1,158 | 0.481297 |
657f66cb6267b45323c6fdaa161920c2b665fce3 | 24,375 | py | Python | XOconv/pycgtypes/mat4.py | jsburg/xdsme | 3fc9ed185ab78e1a42306edf24e681981eacd221 | [
"BSD-3-Clause"
] | 16 | 2016-05-20T11:19:40.000Z | 2021-01-01T19:44:23.000Z | XOconv/pycgtypes/mat4.py | jsburg/xdsme | 3fc9ed185ab78e1a42306edf24e681981eacd221 | [
"BSD-3-Clause"
] | 11 | 2016-09-09T15:00:15.000Z | 2021-05-07T15:02:10.000Z | XOconv/pycgtypes/mat4.py | jsburg/xdsme | 3fc9ed185ab78e1a42306edf24e681981eacd221 | [
"BSD-3-Clause"
] | 9 | 2016-12-15T16:00:06.000Z | 2021-09-10T08:34:14.000Z | ######################################################################
# mat4 - Matrix class (4x4 matrix)
#
# Copyright (C) 2002, Matthias Baas ([email protected])
#
# You may distribute under the terms of the BSD license, as
# specified in the file license.txt.
####################################################... | 36.057692 | 109 | 0.454974 | 23,549 | 0.966113 | 0 | 0 | 0 | 0 | 0 | 0 | 7,645 | 0.313641 |