hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
35111898dcd4fe4049cb8c64c9d5c33193e6cb76 | 24,003 | py | Python | src/infra/Zoning.py | TUM-VT/FleetPy | 596bcec9fbd2fe52206079641d549bf028d2879d | [
"MIT"
] | 19 | 2021-12-11T17:17:00.000Z | 2022-03-24T07:27:06.000Z | src/infra/Zoning.py | TUM-VT/FleetPy | 596bcec9fbd2fe52206079641d549bf028d2879d | [
"MIT"
] | null | null | null | src/infra/Zoning.py | TUM-VT/FleetPy | 596bcec9fbd2fe52206079641d549bf028d2879d | [
"MIT"
] | 1 | 2021-12-21T11:20:39.000Z | 2021-12-21T11:20:39.000Z | # -------------------------------------------------------------------------------------------------------------------- #
# standard distribution imports
# -----------------------------
import os
import logging
# additional module imports (> requirements)
# ------------------------------------------
import pandas as pd... | 47.25 | 213 | 0.619839 |
95fbca25fa0457198ed6712ec4385ebc9f0f3a35 | 3,105 | py | Python | tools/funlines.py | fengjixuchui/src | 0c5a6cd8057717f73b1373f8d85eb9b19e1934e1 | [
"BSD-3-Clause"
] | 1,160 | 2015-05-02T15:13:20.000Z | 2022-03-31T20:04:28.000Z | tools/funlines.py | fengjixuchui/src | 0c5a6cd8057717f73b1373f8d85eb9b19e1934e1 | [
"BSD-3-Clause"
] | 19 | 2015-04-20T13:47:00.000Z | 2021-07-07T13:00:42.000Z | tools/funlines.py | fengjixuchui/src | 0c5a6cd8057717f73b1373f8d85eb9b19e1934e1 | [
"BSD-3-Clause"
] | 257 | 2015-04-01T21:42:33.000Z | 2022-03-10T11:57:51.000Z | from __future__ import print_function
import os, sys, pickle, subprocess
try:
from argparse import ArgumentParser
except:
print("Failed to import module 'argparse'. Upgrade to Python 2.7, copy argparse.py to this directory or try 'apt-get install python-argparse'")
raise
parser = ArgumentParser()
parser.add_ar... | 35.689655 | 145 | 0.631884 |
ea227b603c873f5b64f00618d284137e86f09d6d | 987 | py | Python | libs/bugreport/test_bugreport.py | hpagseddy/ZPUI | b82819e523987639c2dfab417f9895d7cd7ce049 | [
"Apache-2.0",
"MIT"
] | null | null | null | libs/bugreport/test_bugreport.py | hpagseddy/ZPUI | b82819e523987639c2dfab417f9895d7cd7ce049 | [
"Apache-2.0",
"MIT"
] | 2 | 2020-01-17T00:44:53.000Z | 2020-01-19T21:10:48.000Z | libs/bugreport/test_bugreport.py | hpagseddy/ZPUI | b82819e523987639c2dfab417f9895d7cd7ce049 | [
"Apache-2.0",
"MIT"
] | 1 | 2020-01-14T22:44:27.000Z | 2020-01-14T22:44:27.000Z | import os
import zipfile
import unittest
from mock import Mock
from bugreport import BugReport
class TestBugReport(unittest.TestCase):
def test_workflow_without_send(self):
br = BugReport("test.zip")
br.add_dir_or_file("__init__.py")
br.add_dir_or_file("resources/")
br.add_text("... | 29.029412 | 94 | 0.647416 |
08d9c9f87563dff46b853a4e0fcb3d1aeeabc28b | 24,354 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_capacity_reservation_groups_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_capacity_reservation_groups_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_capacity_reservation_groups_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.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 ... | 53.174672 | 210 | 0.686499 |
5360ef209c77ca9b6906d3ea772c188fb46825df | 7,229 | py | Python | cs-config/cs_config/constants.py | grantseiter/Tax-Brain | 180063a193ff8cb0b56349878110066b012dde6d | [
"MIT"
] | 10 | 2019-05-07T12:04:58.000Z | 2021-05-18T13:14:45.000Z | cs-config/cs_config/constants.py | grantseiter/Tax-Brain | 180063a193ff8cb0b56349878110066b012dde6d | [
"MIT"
] | 113 | 2019-03-05T16:13:32.000Z | 2021-11-10T13:53:32.000Z | cs-config/cs_config/constants.py | grantseiter/Tax-Brain | 180063a193ff8cb0b56349878110066b012dde6d | [
"MIT"
] | 14 | 2019-01-24T18:39:11.000Z | 2021-03-17T17:00:51.000Z | # constants used by the new compconfig
import paramtools
from marshmallow import fields, Schema
from datetime import datetime
from taxbrain import TaxBrain
POLICY_SCHEMA = {
"labels": {
"year": {
"type": "int",
"validators": {
"choice": {
"choice... | 39.71978 | 92 | 0.511551 |
f6ba300c1f4a115e3d2973f12bb1b89014e2a68e | 4,805 | py | Python | src/main_detection.py | go-toh/MixBerryPi | 62a148534077871bea105cf22579adc240770ef5 | [
"Apache-2.0"
] | 4 | 2019-07-10T12:52:42.000Z | 2019-08-08T14:34:40.000Z | src/main_detection.py | go-toh/MixBerryPi | 62a148534077871bea105cf22579adc240770ef5 | [
"Apache-2.0"
] | null | null | null | src/main_detection.py | go-toh/MixBerryPi | 62a148534077871bea105cf22579adc240770ef5 | [
"Apache-2.0"
] | 1 | 2019-08-08T14:35:08.000Z | 2019-08-08T14:35:08.000Z | from tflite_runtime.interpreter import Interpreter
from slacker import Slacker
import picamera
import numpy as np
import cv2
import io
import time
import datetime
import threading
def wait_input():
global key_flag
input()
key_flag = False
def set_interpreter(interpreter):
interpreter.set_num_threads(4... | 31.611842 | 108 | 0.627055 |
6a275942a4026d7e2c119f4344ebee829a2820cf | 2,878 | py | Python | setup.py | BOBO1997/qiskit-ignis | 824372e18a42a735bbef37cd8ee61bc5d5821f9f | [
"Apache-2.0"
] | null | null | null | setup.py | BOBO1997/qiskit-ignis | 824372e18a42a735bbef37cd8ee61bc5d5821f9f | [
"Apache-2.0"
] | null | null | null | setup.py | BOBO1997/qiskit-ignis | 824372e18a42a735bbef37cd8ee61bc5d5821f9f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | 31.626374 | 77 | 0.63968 |
c8a46c2f76f3bafac3c9a46acbe610d313df6bab | 7,758 | py | Python | fboss/system_tests/system_tests.py | flarnie/fboss | a747c7b778d5259d336dd30e01067291926e267b | [
"BSD-3-Clause"
] | null | null | null | fboss/system_tests/system_tests.py | flarnie/fboss | a747c7b778d5259d336dd30e01067291926e267b | [
"BSD-3-Clause"
] | null | null | null | fboss/system_tests/system_tests.py | flarnie/fboss | a747c7b778d5259d336dd30e01067291926e267b | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import importlib
import logging
import os
import sys
import unittest
user_requested_tags = []
Defaults = {
"test_dirs": None,
"config": 'test_to... | 36.942857 | 85 | 0.644625 |
2865f0619154fc0a3b07a31ad519bde81890fc94 | 981 | py | Python | api/api/urls.py | HARSHIT-GUPTA-coder/OCDE | d1b4cc6ed0dde78149725be8e2809218f9c53bc5 | [
"MIT"
] | null | null | null | api/api/urls.py | HARSHIT-GUPTA-coder/OCDE | d1b4cc6ed0dde78149725be8e2809218f9c53bc5 | [
"MIT"
] | null | null | null | api/api/urls.py | HARSHIT-GUPTA-coder/OCDE | d1b4cc6ed0dde78149725be8e2809218f9c53bc5 | [
"MIT"
] | null | null | null | """api URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vie... | 35.035714 | 77 | 0.698267 |
8e9f947553a42edc760b4071a19a43f2f0440f88 | 773 | py | Python | transkg/dataset/FB15K237/trainer.py | MobTgZhang/TransKG | 615d8addaa670c97c421bc00263edfcaad59d443 | [
"MIT"
] | 1 | 2022-03-12T13:56:24.000Z | 2022-03-12T13:56:24.000Z | transkg/dataset/FB15K237/trainer.py | MobTgZhang/TransKG | 615d8addaa670c97c421bc00263edfcaad59d443 | [
"MIT"
] | 1 | 2022-03-14T04:12:53.000Z | 2022-03-14T05:04:34.000Z | transkg/dataset/FB15K237/trainer.py | MobtgZhang/TransKG | 615d8addaa670c97c421bc00263edfcaad59d443 | [
"MIT"
] | null | null | null | import logging
import json
logger = logging.getLogger()
from ..trainer import Trainer
from .data import prepareDataloader
class FB15K237Trainer(Trainer):
def __init__(self,args):
super(FB15K237Trainer, self).__init__(args)
def prepareData(self):
logger.info("INFO : Prepare dataloader.")
... | 42.944444 | 97 | 0.645537 |
5fbc59935fdbf61bb09c2d6f3302b5ac1f0f89ca | 11,435 | py | Python | src/python/pants/pantsd/service/scheduler_service.py | rahuliyer95/pants | 50ee5cc8bd9ab40ad13c3c28ccbc4e7f189292ec | [
"Apache-2.0"
] | null | null | null | src/python/pants/pantsd/service/scheduler_service.py | rahuliyer95/pants | 50ee5cc8bd9ab40ad13c3c28ccbc4e7f189292ec | [
"Apache-2.0"
] | null | null | null | src/python/pants/pantsd/service/scheduler_service.py | rahuliyer95/pants | 50ee5cc8bd9ab40ad13c3c28ccbc4e7f189292ec | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import logging
import os
import queue
import threading
from typing import List, Optional, Set
from pants.base.exiter import PANTS_SUCCEEDED_EXIT_CODE
from pants.base.specs import Specs
fr... | 37.369281 | 111 | 0.648535 |
5633f8fa5411caa74b460ff19c104209b60ef032 | 2,174 | py | Python | linux-distro/package/nuxleus/Source/Vendor/Microsoft/IronPython-2.0.1/Lib/Axon/background.py | mdavid/nuxleus | 653f1310d8bf08eaa5a7e3326c2349e56a6abdc2 | [
"BSD-3-Clause"
] | 1 | 2017-03-28T06:41:51.000Z | 2017-03-28T06:41:51.000Z | linux-distro/package/nuxleus/Source/Vendor/Microsoft/IronPython-2.0.1/Lib/Axon/background.py | mdavid/nuxleus | 653f1310d8bf08eaa5a7e3326c2349e56a6abdc2 | [
"BSD-3-Clause"
] | null | null | null | linux-distro/package/nuxleus/Source/Vendor/Microsoft/IronPython-2.0.1/Lib/Axon/background.py | mdavid/nuxleus | 653f1310d8bf08eaa5a7e3326c2349e56a6abdc2 | [
"BSD-3-Clause"
] | 1 | 2016-12-13T21:08:58.000Z | 2016-12-13T21:08:58.000Z | #!/usr/bin/env python
#
# Copyright (C) 2007 British Broadcasting Corporation and Kamaelia Contributors(1)
# All Rights Reserved.
#
# You may only modify and redistribute this under the terms of any of the
# following licenses(2): Mozilla Public License, V1.1, GNU General
# Public License, V2.0, GNU Lesser General ... | 33.446154 | 125 | 0.675253 |
bd26b5dfd2070459ec4d9bd9525be259224b003e | 12,207 | py | Python | nlp2/voice/views.py | tjas/postgrad-ai-nlp2-voice-ui | 489888bdb2613530aa105698f1f999f56c6d60b6 | [
"MIT"
] | null | null | null | nlp2/voice/views.py | tjas/postgrad-ai-nlp2-voice-ui | 489888bdb2613530aa105698f1f999f56c6d60b6 | [
"MIT"
] | null | null | null | nlp2/voice/views.py | tjas/postgrad-ai-nlp2-voice-ui | 489888bdb2613530aa105698f1f999f56c6d60b6 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
from .models import Credentials
from nlp2.settings import BASE_DIR, PATH_TO_CREDENTIALS, PATH_TO_AUDIO, SPEECH_TO_TEXT_KEY, TEXT_TO_SPEECH_KEY
import json
def index(request):
return render(request, 'index.html', {})
def tts(request):
if... | 34.097765 | 134 | 0.594659 |
e29fb641f9c84b0ca62e6310e5606f73de21df41 | 3,968 | py | Python | resolwe_bio/tests/unit/test_views.py | JenkoB/resolwe-bio | a958cf3fc82ebc37f527e1b156753f2324a33803 | [
"Apache-2.0"
] | null | null | null | resolwe_bio/tests/unit/test_views.py | JenkoB/resolwe-bio | a958cf3fc82ebc37f527e1b156753f2324a33803 | [
"Apache-2.0"
] | null | null | null | resolwe_bio/tests/unit/test_views.py | JenkoB/resolwe-bio | a958cf3fc82ebc37f527e1b156753f2324a33803 | [
"Apache-2.0"
] | 1 | 2021-09-03T08:50:54.000Z | 2021-09-03T08:50:54.000Z | # pylint: disable=missing-docstring
from __future__ import absolute_import, division, print_function, unicode_literals
from mock import MagicMock
from django.contrib.auth import get_user_model
from django.test import TestCase
from guardian.shortcuts import assign_perm, remove_perm
from rest_framework import exceptio... | 40.907216 | 101 | 0.721018 |
efa2e0cf3f445f137e2cc97c036607ea70664491 | 328 | py | Python | catalog/bindings/csw/surface_array_property.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | catalog/bindings/csw/surface_array_property.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | catalog/bindings/csw/surface_array_property.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
from bindings.csw.surface_array_property_type import SurfaceArrayPropertyType
__NAMESPACE__ = "http://www.opengis.net/gml"
@dataclass
class SurfaceArrayProperty(SurfaceArrayPropertyType):
class Meta:
name = "surfaceArrayProperty"
namespace = "http://www.opengis.n... | 27.333333 | 77 | 0.777439 |
b704764bd97bd3fb92cb054d1b9932c6516beb4c | 1,515 | py | Python | api/users/urls.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | null | null | null | api/users/urls.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | null | null | null | api/users/urls.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.UserList.as_view(), name=views.UserList.view_name),
url(r'^(?P<user_id>\w+)/$', views.UserDetail.as_view(), name=views.UserDetail.view_name),
url(r'^(?P<user_id>\w+)/addons/$', views.UserAddonList.as_view(), name=views.U... | 79.736842 | 171 | 0.716832 |
6fcf73dd3590477bd87c5961cb8f8d3bfebd3094 | 3,542 | py | Python | src/pymap3d/eci.py | scienceopen/python-mapping | fb6147542fc0cab9e2f3b07713605f074a30e086 | [
"BSD-2-Clause"
] | null | null | null | src/pymap3d/eci.py | scienceopen/python-mapping | fb6147542fc0cab9e2f3b07713605f074a30e086 | [
"BSD-2-Clause"
] | null | null | null | src/pymap3d/eci.py | scienceopen/python-mapping | fb6147542fc0cab9e2f3b07713605f074a30e086 | [
"BSD-2-Clause"
] | null | null | null | """ transforms involving ECI earth-centered inertial """
from __future__ import annotations
from datetime import datetime
from numpy import array, sin, cos, column_stack, empty, atleast_1d
try:
from astropy.coordinates import GCRS, ITRS, EarthLocation, CartesianRepresentation
from astropy.time import Time
... | 25.854015 | 86 | 0.574252 |
3490a1a8529cb1e29c0c4f3582eca2846fc62f46 | 250 | py | Python | demoapp/demon/doctype/district/district.py | poojamehta3/Demon-Project | e471355ffd2c391807a6c1c2ee578b3827db988a | [
"MIT"
] | null | null | null | demoapp/demon/doctype/district/district.py | poojamehta3/Demon-Project | e471355ffd2c391807a6c1c2ee578b3827db988a | [
"MIT"
] | null | null | null | demoapp/demon/doctype/district/district.py | poojamehta3/Demon-Project | e471355ffd2c391807a6c1c2ee578b3827db988a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Pooja and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class District(Document):
pass
| 22.727273 | 49 | 0.776 |
74b5c5cf77c41c81e9971530901e8b72a1a649a4 | 10,434 | py | Python | src/dal_select2/views.py | robertispas/django-autocomplete-light | 3eb84a09c5828e4a9409f0aec14c2874bcbe17df | [
"MIT"
] | 1,368 | 2015-01-03T09:52:33.000Z | 2022-03-27T09:06:00.000Z | src/dal_select2/views.py | robertispas/django-autocomplete-light | 3eb84a09c5828e4a9409f0aec14c2874bcbe17df | [
"MIT"
] | 919 | 2015-01-01T05:17:48.000Z | 2022-03-25T22:41:14.000Z | src/dal_select2/views.py | robertispas/django-autocomplete-light | 3eb84a09c5828e4a9409f0aec14c2874bcbe17df | [
"MIT"
] | 469 | 2015-01-19T21:40:30.000Z | 2022-03-26T17:27:40.000Z | """Select2 view implementation."""
import collections
# import json
from dal.views import BaseQuerySetView, ViewMixin
from django import http
from django.core.exceptions import ImproperlyConfigured
from django.db.models import F
from django.utils.translation import gettext as _
from django.views.generic.list import ... | 35.732877 | 103 | 0.520222 |
b2b55109b28fb125b1d6c5ec71ed757afd26d1ee | 2,824 | py | Python | mealie/services/settings_services.py | zackbcom/mealie | f5ab2dcde8bd87d5a9a54f3ebe3615e3f52ba118 | [
"MIT"
] | null | null | null | mealie/services/settings_services.py | zackbcom/mealie | f5ab2dcde8bd87d5a9a54f3ebe3615e3f52ba118 | [
"MIT"
] | null | null | null | mealie/services/settings_services.py | zackbcom/mealie | f5ab2dcde8bd87d5a9a54f3ebe3615e3f52ba118 | [
"MIT"
] | null | null | null | import json
from typing import List, Optional
from db.settings_models import (
SiteSettingsDocument,
SiteThemeDocument,
ThemeColorsDocument,
WebhooksDocument,
)
from pydantic import BaseModel
class Webhooks(BaseModel):
webhookTime: str
webhookURLs: Optional[List[str]]
enabled: bool
@... | 24.556522 | 75 | 0.648017 |
f4fd38812e9584fdeee7c54d827361334efb2063 | 2,430 | py | Python | host-software/keyplus/keycodes/lang_map/Macedonian0.py | ai03-2725/keyplus | 6fb857dff7aa88284d6f6f08532f8da3aae981e1 | [
"MIT"
] | 226 | 2017-08-14T16:11:36.000Z | 2022-03-13T00:58:13.000Z | host-software/keyplus/keycodes/lang_map/Macedonian0.py | ai03-2725/keyplus | 6fb857dff7aa88284d6f6f08532f8da3aae981e1 | [
"MIT"
] | 90 | 2017-09-12T02:07:39.000Z | 2022-01-27T20:58:19.000Z | host-software/keyplus/keycodes/lang_map/Macedonian0.py | ai03-2725/keyplus | 6fb857dff7aa88284d6f6f08532f8da3aae981e1 | [
"MIT"
] | 44 | 2017-09-17T17:31:25.000Z | 2022-02-27T08:19:46.000Z | # Copyright 2018 jem@seethis.link
# Licensed under the MIT license (http://opensource.org/licenses/MIT)
from hid_keycodes import *
lang = 'Macedonian'
country = 'Macedonia FYR'
scancode_map = {
KC_0: ('0', '=', '', '0', '=', ''),
KC_1: ('1', '!', '~', '1', '!', '~'),
KC_2: ('2', '"', '', '2', '"', ''),
... | 41.186441 | 69 | 0.257202 |
b9bfc5da1e6d9ac592f1c8b2d7e5206845ca6ff7 | 44,717 | py | Python | google/ads/googleads/v8/googleads-py/tests/unit/gapic/googleads.v8/services/test_recommendation_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/ads/googleads/v8/googleads-py/tests/unit/gapic/googleads.v8/services/test_recommendation_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/ads/googleads/v8/googleads-py/tests/unit/gapic/googleads.v8/services/test_recommendation_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 43.079961 | 216 | 0.720576 |
c60b9ef382c5f50d543ebc730c8852ecc34bd72d | 17 | py | Python | epytope/Data/pssms/calisimm/mat/A0301.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 7 | 2021-02-01T18:11:28.000Z | 2022-01-31T19:14:07.000Z | epytope/Data/pssms/calisimm/mat/A0301.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 22 | 2021-01-02T15:25:23.000Z | 2022-03-14T11:32:53.000Z | epytope/Data/pssms/calisimm/mat/A0301.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 4 | 2021-05-28T08:50:38.000Z | 2022-03-14T11:45:32.000Z | A0301 = [1, 2, 9] | 17 | 17 | 0.470588 |
12bd4e3081119939fe53eb8b544f26b59c299f58 | 6,559 | py | Python | carim/configuration/server/types.py | schana/dayz-server-carim | 007c2f3d1861b736c4a59aeb4ef6275c56f76869 | [
"Apache-2.0"
] | 3 | 2020-04-06T17:57:24.000Z | 2020-06-02T04:21:41.000Z | carim/configuration/server/types.py | schana/dayz-server-carim | 007c2f3d1861b736c4a59aeb4ef6275c56f76869 | [
"Apache-2.0"
] | 16 | 2020-03-18T09:07:51.000Z | 2020-05-11T14:58:55.000Z | carim/configuration/server/types.py | schana/dayz-server-carim | 007c2f3d1861b736c4a59aeb4ef6275c56f76869 | [
"Apache-2.0"
] | null | null | null | import json
import logging
import pathlib
from xml.etree import ElementTree
from carim.configuration import decorators
from carim.global_resources import types, item_type, matching_model, resourcesdir, mission, deploydir, locations
from carim.util import file_writing
log = logging.getLogger(__name__)
_MAX_TIME = 3888... | 37.056497 | 112 | 0.610611 |
16208ca3f040be4a5534244d930ef13861189034 | 41,380 | py | Python | python/ccxt/async_support/hollaex.py | zhenjie/ccxt | 37808d0f23c9bd2a60da10a3ebd2abdcd3c3b313 | [
"MIT"
] | 3 | 2017-12-14T04:56:10.000Z | 2021-09-02T02:25:26.000Z | python/ccxt/async_support/hollaex.py | zhenjie/ccxt | 37808d0f23c9bd2a60da10a3ebd2abdcd3c3b313 | [
"MIT"
] | 1 | 2017-10-28T14:35:08.000Z | 2017-10-28T14:35:08.000Z | python/ccxt/async_support/hollaex.py | zhenjie/ccxt | 37808d0f23c9bd2a60da10a3ebd2abdcd3c3b313 | [
"MIT"
] | 3 | 2018-10-17T09:29:29.000Z | 2019-03-12T09:18:42.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
from ccxt.base.errors import AuthenticationError
from ccxt.base.errors import Argumen... | 37.481884 | 144 | 0.435621 |
afc1a284c7d67feed6ce2c06bf670d38495445ff | 12,474 | py | Python | games/reexposition.py | Dynamic-Games-in-Recommender-Systems/siren | 57159e77b6bc5bbc23a50623da07e6494d08f060 | [
"MIT"
] | null | null | null | games/reexposition.py | Dynamic-Games-in-Recommender-Systems/siren | 57159e77b6bc5bbc23a50623da07e6494d08f060 | [
"MIT"
] | null | null | null | games/reexposition.py | Dynamic-Games-in-Recommender-Systems/siren | 57159e77b6bc5bbc23a50623da07e6494d08f060 | [
"MIT"
] | 1 | 2021-06-10T12:08:49.000Z | 2021-06-10T12:08:49.000Z | import numpy as np
import random
import metrics
import copy
import math
class Reexposition_game:
def __init__(self, number_of_recommendations):
self.number_of_recommendations = number_of_recommendations
self.np_rng = np.random.default_rng()
pass
def play(self, recommendatio... | 46.894737 | 195 | 0.579926 |
ceea6070d8746f724f5765c8bc23c6baf63e3bc9 | 3,375 | py | Python | cutlet/test/test_basic.py | kinow/cutlet | 7c50a8d2c29e743fb9f95aa2de72ba630860a1de | [
"MIT"
] | null | null | null | cutlet/test/test_basic.py | kinow/cutlet | 7c50a8d2c29e743fb9f95aa2de72ba630860a1de | [
"MIT"
] | null | null | null | cutlet/test/test_basic.py | kinow/cutlet | 7c50a8d2c29e743fb9f95aa2de72ba630860a1de | [
"MIT"
] | null | null | null | import pytest
from cutlet import Cutlet
import fugashi
# Note that if there are multiple words, only the first is used
WORDS = [
('新橋', 'shinbashi'),
('学校', 'gakkou'),
('パンダ', 'panda'),
# without curry, カツ is registered as 人名 (?)
('カツカレー', 'cutlet'),
('カレー', 'curry'),
... | 31.839623 | 147 | 0.575407 |
c6be2154de49ac975a6431b486191d1db82124b7 | 2,137 | py | Python | gym_modular/rewards/part/current_part_marker_reward.py | TimSchneider42/mbpo | 736ba90bbdaddb2a40a6233bc0b78da72235100a | [
"MIT"
] | null | null | null | gym_modular/rewards/part/current_part_marker_reward.py | TimSchneider42/mbpo | 736ba90bbdaddb2a40a6233bc0b78da72235100a | [
"MIT"
] | null | null | null | gym_modular/rewards/part/current_part_marker_reward.py | TimSchneider42/mbpo | 736ba90bbdaddb2a40a6233bc0b78da72235100a | [
"MIT"
] | null | null | null | from typing import Sequence, Optional
from .part_marker_reward import PartMarkerReward
from scene.part import Part
class CurrentPartMarkerReward(PartMarkerReward):
"""
A concrete implementation of PartMarkerReward that takes only the part that is currently placed by the robot into
account.
"""
d... | 59.361111 | 120 | 0.608329 |
f25eeaab30c8f9327905a9829882a90c4c61c1cb | 68,141 | py | Python | src/olympia/lib/settings_base.py | aki21j/addons-server | fbabd4f2933de12507f1df9c9b3f5dd4183c3ae6 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/lib/settings_base.py | aki21j/addons-server | fbabd4f2933de12507f1df9c9b3f5dd4183c3ae6 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/lib/settings_base.py | aki21j/addons-server | fbabd4f2933de12507f1df9c9b3f5dd4183c3ae6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Django settings for addons-server project.
import environ
import json
import logging
import os
import socket
from datetime import datetime
import sentry_sdk
from corsheaders.defaults import default_headers
from kombu import Queue
from sentry_sdk.integrations.celery import CeleryIntegration
... | 37.543251 | 117 | 0.661775 |
a6c34823deb95971761d99f84345bf30de4b4ab0 | 1,111 | py | Python | test/python/test_log1p.py | slyalin/openvino_tensorflow | 37a2e5b6ff1e60217d31340ad3975b41faa39da0 | [
"Apache-2.0"
] | null | null | null | test/python/test_log1p.py | slyalin/openvino_tensorflow | 37a2e5b6ff1e60217d31340ad3975b41faa39da0 | [
"Apache-2.0"
] | null | null | null | test/python/test_log1p.py | slyalin/openvino_tensorflow | 37a2e5b6ff1e60217d31340ad3975b41faa39da0 | [
"Apache-2.0"
] | 1 | 2021-05-12T07:35:34.000Z | 2021-05-12T07:35:34.000Z | # ==============================================================================
# Copyright (C) 2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
# ==============================================================================
"""Openvino Tensorflow abs operation test
"""
from __future__ import absolute_i... | 27.775 | 80 | 0.579658 |
187edea80da2e545f5238e5e330d06543930f535 | 10,922 | py | Python | script.module.nanscrapers/lib/nanscrapers/scraperplugins/carthd.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2019-03-05T09:37:15.000Z | 2019-03-05T09:37:15.000Z | script.module.nanscrapers/lib/nanscrapers/scraperplugins/carthd.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | null | null | null | script.module.nanscrapers/lib/nanscrapers/scraperplugins/carthd.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:16:08.000Z | 2021-11-05T22:16:08.000Z | import re,time,base64
import requests
import xbmc
import urllib
from ..scraper import Scraper
from ..common import clean_title,clean_search
requests.packages.urllib3.disable_warnings()
s = requests.session()
User_Agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 S... | 60.342541 | 163 | 0.478484 |
d0b4cb28839cfdc8c4a734546cbda35b877f0297 | 1,966 | py | Python | examples/http_proxy/py3_websocket.py | kuaidaili/python-sdk | b694d767e2516c6a43336e0f929a0f5a4abddccb | [
"BSD-2-Clause"
] | 50 | 2019-01-25T01:43:55.000Z | 2022-03-21T08:43:41.000Z | examples/http_proxy/py3_websocket.py | kuaidaili/python-sdk | b694d767e2516c6a43336e0f929a0f5a4abddccb | [
"BSD-2-Clause"
] | null | null | null | examples/http_proxy/py3_websocket.py | kuaidaili/python-sdk | b694d767e2516c6a43336e0f929a0f5a4abddccb | [
"BSD-2-Clause"
] | 24 | 2019-06-06T09:49:13.000Z | 2022-03-28T08:34:44.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
使用HTTP代理发送websocket请求
"""
import gzip
import zlib
import websocket
OPCODE_DATA = (websocket.ABNF.OPCODE_TEXT, websocket.ABNF.OPCODE_BINARY)
url = "ws://echo.websocket.org/"
proxies = {
"http_proxy_host": "59.38.241.25",
"http_proxy_port": 23916,
"http_... | 24.575 | 92 | 0.610885 |
24bf0c9e1e67ce91c7b8883f0c59a0f50ab2c6d7 | 1,338 | py | Python | examples/example_classification.py | kartik4949/TensorPipe | 9bf893016a735c68afb7be8a9fa420cfb6781cd5 | [
"Apache-2.0"
] | 89 | 2020-10-09T20:31:03.000Z | 2022-03-30T12:23:08.000Z | examples/example_classification.py | kartik4949/TensorPipe | 9bf893016a735c68afb7be8a9fa420cfb6781cd5 | [
"Apache-2.0"
] | 3 | 2020-12-15T06:18:07.000Z | 2020-12-15T06:33:14.000Z | examples/example_classification.py | kartik4949/TensorPipe | 9bf893016a735c68afb7be8a9fa420cfb6781cd5 | [
"Apache-2.0"
] | 21 | 2020-10-11T12:49:55.000Z | 2022-01-27T11:17:57.000Z | """
Copyright 2020 Kartik Sharma
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 ... | 25.730769 | 76 | 0.710015 |
dd91cfd03ecdc609dcb3f30daedfabd8fa324807 | 5,799 | py | Python | youtube_transcript_api/_api.py | danielcliu/youtube-transcript-api | dc9fc2ee9342649e09e311b3b87dfc70dace4833 | [
"MIT"
] | null | null | null | youtube_transcript_api/_api.py | danielcliu/youtube-transcript-api | dc9fc2ee9342649e09e311b3b87dfc70dace4833 | [
"MIT"
] | null | null | null | youtube_transcript_api/_api.py | danielcliu/youtube-transcript-api | dc9fc2ee9342649e09e311b3b87dfc70dace4833 | [
"MIT"
] | null | null | null | import requests
try:
import http.cookiejar as cookiejar
except ImportError:
import cookielib as cookiejar
from ._transcripts import TranscriptListFetcher
class YouTubeTranscriptApi():
@classmethod
def list_transcripts(cls, video_id, proxies=None, cookies=None):
"""
Retrieves the list ... | 48.325 | 120 | 0.649077 |
fd89ea0bd71ccd73ed4a17a726b40b551831ef75 | 46 | py | Python | visualvocab/deps/__init__.py | schwettmann/visualvocab | d6ba80dc648576baf13efcb7c778e7e4384dcacb | [
"MIT"
] | 8 | 2021-10-15T19:45:41.000Z | 2022-02-20T20:52:11.000Z | visualvocab/deps/__init__.py | schwettmann/visualvocab | d6ba80dc648576baf13efcb7c778e7e4384dcacb | [
"MIT"
] | null | null | null | visualvocab/deps/__init__.py | schwettmann/visualvocab | d6ba80dc648576baf13efcb7c778e7e4384dcacb | [
"MIT"
] | 1 | 2021-12-31T01:46:54.000Z | 2021-12-31T01:46:54.000Z | """Code dependencies not available on pip."""
| 23 | 45 | 0.717391 |
83ced50aef9e29c3fc00a3a5a62420a9588ab320 | 2,283 | py | Python | Miscellaneous/TOPOLOGIE_FUNZIONANTI/esperimenti/e3/start.py | Balzu/network-inference-with-Blockchain | 0ce67d44662771b3e575fdb1b3cebd5a233e6c6e | [
"MIT"
] | 1 | 2019-04-01T13:21:52.000Z | 2019-04-01T13:21:52.000Z | Miscellaneous/TOPOLOGIE_FUNZIONANTI/esperimenti/e3/start.py | Balzu/network-inference-with-Blockchain | 0ce67d44662771b3e575fdb1b3cebd5a233e6c6e | [
"MIT"
] | null | null | null | Miscellaneous/TOPOLOGIE_FUNZIONANTI/esperimenti/e3/start.py | Balzu/network-inference-with-Blockchain | 0ce67d44662771b3e575fdb1b3cebd5a233e6c6e | [
"MIT"
] | 1 | 2020-06-17T23:29:53.000Z | 2020-06-17T23:29:53.000Z | #!/us5/bin/python
import time
import sys
from create_merge_topo import *
from threading import Thread, Lock
lock = Lock()
def run(i, nh, hosts, lock):
if len(hosts) == 0:
hosts = get_hosts(int(nh))
alias = create_alias()
lock.acquire()
compute_distances(net, hosts)
lock.release()
lo... | 27.178571 | 78 | 0.583443 |
faa07209ad0a64fb08f38e2d441e4ce61f99eeb4 | 807 | py | Python | makeraster.py | phargogh/prototype-gdal-raster-attribute-table-cpp | dd14d2512fef27197a800d6e433a680f7fb24b3f | [
"MIT"
] | null | null | null | makeraster.py | phargogh/prototype-gdal-raster-attribute-table-cpp | dd14d2512fef27197a800d6e433a680f7fb24b3f | [
"MIT"
] | null | null | null | makeraster.py | phargogh/prototype-gdal-raster-attribute-table-cpp | dd14d2512fef27197a800d6e433a680f7fb24b3f | [
"MIT"
] | null | null | null | from osgeo import gdal
import numpy
import numpy.random
# Make a raster with a RAT on import.
driver = gdal.GetDriverByName('GTiff')
raster = driver.Create(
'raster.tif', 5, 5, 1, gdal.GDT_Byte)
band = raster.GetRasterBand(1)
array = numpy.repeat(
numpy.linspace(0, 4, 5), 5).reshape((5,5)).astype(numpy.int8)
... | 28.821429 | 65 | 0.741016 |
d3cc0271bb0d934fe7034974b1385e41735a694e | 447 | py | Python | strings/#387/strings.py | sharmarkei/DSA-Practice | c98e9f5ae1824d86f02d1002d908dc24c8be8812 | [
"MIT"
] | null | null | null | strings/#387/strings.py | sharmarkei/DSA-Practice | c98e9f5ae1824d86f02d1002d908dc24c8be8812 | [
"MIT"
] | null | null | null | strings/#387/strings.py | sharmarkei/DSA-Practice | c98e9f5ae1824d86f02d1002d908dc24c8be8812 | [
"MIT"
] | null | null | null | class Solution(object):
def firstUniqChar(self, s):
"""
:type s: str
:rtype: int
"""
dict_1 = {}
for i in s:
if i not in dict_1:
dict_1[i] = 1
else:
dict_1[i] += 1
print(dict_1)
... | 20.318182 | 37 | 0.364653 |
c4e2846a7c2400ce7d9d8ad32d5ba254fcd092dd | 4,456 | py | Python | app/views.py | mrcl/govhack-nz | 9d49edcaa7b5fe000606c35d543b84258f602aa6 | [
"MIT"
] | null | null | null | app/views.py | mrcl/govhack-nz | 9d49edcaa7b5fe000606c35d543b84258f602aa6 | [
"MIT"
] | null | null | null | app/views.py | mrcl/govhack-nz | 9d49edcaa7b5fe000606c35d543b84258f602aa6 | [
"MIT"
] | null | null | null | import os
import re
from glob import glob
from app import app
from flask import render_template, request, flash, redirect, url_for
from .pages import pages
from .value_ink_vars import FACTS
from .forms import GrantForm, ValueInkForm
import app.grant_hunter_vars as ghv
@app.route('/')
def index():
return render_tem... | 29.706667 | 87 | 0.5193 |
73431d1139b7155df93786d7268a8ff3e2fdcff7 | 1,903 | py | Python | espnet/nets/chainer_backend/transformer/encoder_layer.py | roshansh-cmu/espnet | 5fa6dcc4e649dc66397c629d0030d09ecef36b80 | [
"Apache-2.0"
] | null | null | null | espnet/nets/chainer_backend/transformer/encoder_layer.py | roshansh-cmu/espnet | 5fa6dcc4e649dc66397c629d0030d09ecef36b80 | [
"Apache-2.0"
] | null | null | null | espnet/nets/chainer_backend/transformer/encoder_layer.py | roshansh-cmu/espnet | 5fa6dcc4e649dc66397c629d0030d09ecef36b80 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
"""Class Declaration of Transformer's Encoder Block."""
import chainer
import chainer.functions as F
from espnet.nets.chainer_backend.transformer.attention import MultiHeadAttention
from espnet.nets.chainer_backend.transformer.layer_norm import LayerNorm
from espnet.nets.chainer_backend.transformer.... | 31.716667 | 84 | 0.613768 |
af92db4f41f04923990da6f378c41563c241873a | 913 | py | Python | flask_app/__init__.py | Parikshit-njit/Project4 | 5ff23b692827bc95074f59e29b04a87c6ad109e9 | [
"MIT"
] | null | null | null | flask_app/__init__.py | Parikshit-njit/Project4 | 5ff23b692827bc95074f59e29b04a87c6ad109e9 | [
"MIT"
] | null | null | null | flask_app/__init__.py | Parikshit-njit/Project4 | 5ff23b692827bc95074f59e29b04a87c6ad109e9 | [
"MIT"
] | 2 | 2021-08-03T02:07:40.000Z | 2021-12-03T11:43:12.000Z | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
import redis
from flask_app.routes import routes_api
db = SQLAlchemy()
def create_app():
"""Construct the core application."""
app = Flask(__name__,
instance_relative_config=False,
template_folder="templates",
... | 26.085714 | 76 | 0.664841 |
59c4392574348331efd8326a61765c22483c004d | 812 | py | Python | pics/urls.py | BrilliantGrant/Personal-Gallery | d51f8521d45a001a37120360fb9ac65d4ef375a2 | [
"MIT",
"Unlicense"
] | 2 | 2018-01-28T14:35:32.000Z | 2018-02-27T04:36:16.000Z | galleria/urls.py | NewtonBii/galleria | 06429d8f03e7629e18a1ad995d6a9fb11440f2ab | [
"MIT"
] | null | null | null | galleria/urls.py | NewtonBii/galleria | 06429d8f03e7629e18a1ad995d6a9fb11440f2ab | [
"MIT"
] | null | null | null | """galleria URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-b... | 35.304348 | 79 | 0.699507 |
adc381b17750a4c6e78f30f8d063fc687f69e11f | 170 | py | Python | BootCRUDApp/urls.py | cs-fullstack-2019-spring/django-bootstrapcrud-cw-PorcheWooten | ee7c94ac30b1bb4d7f64cc37aee813fd4fd3d112 | [
"Apache-2.0"
] | null | null | null | BootCRUDApp/urls.py | cs-fullstack-2019-spring/django-bootstrapcrud-cw-PorcheWooten | ee7c94ac30b1bb4d7f64cc37aee813fd4fd3d112 | [
"Apache-2.0"
] | null | null | null | BootCRUDApp/urls.py | cs-fullstack-2019-spring/django-bootstrapcrud-cw-PorcheWooten | ee7c94ac30b1bb4d7f64cc37aee813fd4fd3d112 | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name=''),
path('edititem/<int:id>/', views.edititem, name='edititem'),
] | 18.888889 | 64 | 0.647059 |
925c118cae09367f07b60c03c5602c13585f94ee | 987 | py | Python | main.py | bwhitman/paper-display | 1a6405861bd66a8c86197a6afdef8712939e67a8 | [
"BSD-3-Clause"
] | 23 | 2017-02-10T17:51:57.000Z | 2019-10-14T18:16:28.000Z | main.py | bwhitman/paper-display | 1a6405861bd66a8c86197a6afdef8712939e67a8 | [
"BSD-3-Clause"
] | null | null | null | main.py | bwhitman/paper-display | 1a6405861bd66a8c86197a6afdef8712939e67a8 | [
"BSD-3-Clause"
] | null | null | null | from flask import Flask
from flask import request
app = Flask(__name__)
app.config['DEBUG'] = True
from random import shuffle
from unidecode import unidecode
import tweepy
import textwrap
import re
# All your twitter API stuff goes here
consumer_key = ""
consumer_secret = ""
access_token = ""
access_token_secret = ""
... | 27.416667 | 107 | 0.708207 |
4a6fa04f6b5a345e1d3fcc085d453dc2febbc540 | 4,828 | py | Python | neutron_taas/tests/unit/taas_client/test_cli20_tapflow.py | openstack/tap-as-a-service | c9d046843565b3af514169c26e5893dbe86a9b98 | [
"Apache-2.0"
] | 68 | 2015-10-18T02:57:10.000Z | 2022-02-22T11:33:25.000Z | neutron_taas/tests/unit/taas_client/test_cli20_tapflow.py | openstack/tap-as-a-service | c9d046843565b3af514169c26e5893dbe86a9b98 | [
"Apache-2.0"
] | null | null | null | neutron_taas/tests/unit/taas_client/test_cli20_tapflow.py | openstack/tap-as-a-service | c9d046843565b3af514169c26e5893dbe86a9b98 | [
"Apache-2.0"
] | 27 | 2015-11-11T02:00:35.000Z | 2020-03-07T03:36:33.000Z | # Copyright 2015 NEC 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 copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 41.982609 | 78 | 0.60232 |
986485bba6501ef00e215d919b7081b50ca30850 | 14,803 | py | Python | src/gpcsd/gpcsd1d.py | natalieklein/gpcsd | 5f05a86a4f4ba9c1a40c3403d49c15d1f8626b75 | [
"MIT"
] | 1 | 2021-10-02T03:47:10.000Z | 2021-10-02T03:47:10.000Z | src/gpcsd/gpcsd1d.py | natalieklein/gpcsd | 5f05a86a4f4ba9c1a40c3403d49c15d1f8626b75 | [
"MIT"
] | 1 | 2021-10-12T23:16:46.000Z | 2021-10-12T23:16:46.000Z | src/gpcsd/gpcsd1d.py | natalieklein/gpcsd | 5f05a86a4f4ba9c1a40c3403d49c15d1f8626b75 | [
"MIT"
] | null | null | null | """
Class for 1D GPCSD model, fitting, and prediction.
"""
import autograd.numpy as np
np.seterr(all='ignore')
from autograd import grad
import scipy
from tqdm import tqdm
from gpcsd.priors import *
from gpcsd.covariances import *
from gpcsd.forward_models import *
from gpcsd.utility_functions import *
JITTER = 1e-... | 47.751613 | 151 | 0.575424 |
5240253b60ff967dae2da1531a3c23292c6ed236 | 2,688 | py | Python | tools/test-installed-numpy.py | IntelLabs/numpy | 1b4a877449313761d3de75c1ad725fdf396b170e | [
"BSD-3-Clause"
] | 7 | 2019-02-27T20:26:01.000Z | 2020-09-27T04:37:44.000Z | tools/test-installed-numpy.py | IntelLabs/numpy | 1b4a877449313761d3de75c1ad725fdf396b170e | [
"BSD-3-Clause"
] | 3 | 2019-12-23T09:26:27.000Z | 2021-10-31T13:34:17.000Z | tools/test-installed-numpy.py | IntelLabs/numpy | 1b4a877449313761d3de75c1ad725fdf396b170e | [
"BSD-3-Clause"
] | 3 | 2019-07-20T02:16:07.000Z | 2020-08-17T20:02:30.000Z | #!/usr/bin/env python
from __future__ import division, absolute_import, print_function
# A simple script to test the installed version of numpy by calling
# 'numpy.test()'. Key features:
# -- convenient command-line syntax
# -- sets exit status appropriately, useful for automated test environments
# It would be b... | 40.119403 | 85 | 0.643601 |
280aae7ae067aef00d2d900a7a3f6acf68f1697f | 9,742 | py | Python | models/model.py | Koko-zep/Efficient_CapsuleNet | 1cdf8ffd7d95b27dbad1a320ccea8957995fffed | [
"Apache-2.0"
] | null | null | null | models/model.py | Koko-zep/Efficient_CapsuleNet | 1cdf8ffd7d95b27dbad1a320ccea8957995fffed | [
"Apache-2.0"
] | null | null | null | models/model.py | Koko-zep/Efficient_CapsuleNet | 1cdf8ffd7d95b27dbad1a320ccea8957995fffed | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Vittorio Mazzia & Francesco Salvetti. 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 ... | 38.65873 | 169 | 0.645247 |
1085bf19a3648e73e6712d83eec6a30fe8acbe5d | 1,431 | py | Python | parse/test.py | sw32-seo/GTA | 86b102a14b78f6c8b50d742a56445c748e59b51e | [
"MIT"
] | 5 | 2021-09-30T16:28:48.000Z | 2022-03-30T05:20:27.000Z | parse/test.py | sw32-seo/GTA | 86b102a14b78f6c8b50d742a56445c748e59b51e | [
"MIT"
] | null | null | null | parse/test.py | sw32-seo/GTA | 86b102a14b78f6c8b50d742a56445c748e59b51e | [
"MIT"
] | null | null | null | import torch
import pdb
def main():
# vocab = torch.load('data/stanford_no_rxn_mask/stanford_no_rxn_mask.vocab.pt')
vocab_dict = {'<unk>': 0, '<blank>': 1, '<s>': 2, '</s>': 3, 'c': 4, 'C': 5, '(': 6, ')': 7, '1': 8, 'O': 9, '2': 10, '=': 11, 'N': 12, 'n': 13, '3': 14, 'F': 15, 'Cl': 16, '.': 17, '-': 18, '4... | 65.045455 | 1,007 | 0.387841 |
cc08cb3e9193e975201aecef3e939c0d4f3d2eb2 | 777 | py | Python | elvanto_subgroups/utils.py | monty5811/elvanto_subgroups | ef7a819787bbb5bf2a8bf6160e8476a613f67fa3 | [
"MIT"
] | null | null | null | elvanto_subgroups/utils.py | monty5811/elvanto_subgroups | ef7a819787bbb5bf2a8bf6160e8476a613f67fa3 | [
"MIT"
] | null | null | null | elvanto_subgroups/utils.py | monty5811/elvanto_subgroups | ef7a819787bbb5bf2a8bf6160e8476a613f67fa3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from collections import namedtuple
import requests
def clean_emails(elvanto_emails=(), google_emails=()):
# exlude elvanto people with no email
elvanto_emails = [x for x in elvanto_emails if len(x) > 0]
emails = namedtuple('emails', ['elvanto', 'google'])
emails.elvanto = elv... | 25.9 | 67 | 0.635779 |
01d2cf70768d27c64532900d19238906a85c79cd | 12,061 | py | Python | swift_metadata_sync/metadata_sync.py | fusionfoto/swift-metadata-sync | 5a88e262e6f3ee9f060ff643cc050b0b4ead2e30 | [
"Apache-2.0"
] | null | null | null | swift_metadata_sync/metadata_sync.py | fusionfoto/swift-metadata-sync | 5a88e262e6f3ee9f060ff643cc050b0b4ead2e30 | [
"Apache-2.0"
] | null | null | null | swift_metadata_sync/metadata_sync.py | fusionfoto/swift-metadata-sync | 5a88e262e6f3ee9f060ff643cc050b0b4ead2e30 | [
"Apache-2.0"
] | 1 | 2021-07-22T01:54:49.000Z | 2021-07-22T01:54:49.000Z | from distutils.version import StrictVersion
import elasticsearch
import elasticsearch.helpers
import email.utils
import hashlib
import json
import logging
import os
import os.path
from swift.common.utils import decode_timestamps
from container_crawler.base_sync import BaseSync
class MetadataSync(BaseSync):
DOC_T... | 38.657051 | 79 | 0.537103 |
168eaf8661ac83d56a18f697fa35a0e0d5d41e24 | 554 | py | Python | tests/system/test_base.py | breml/netsamplebeat | f9881edf49b771fc537048284a8417d3d2e7a196 | [
"Apache-2.0"
] | null | null | null | tests/system/test_base.py | breml/netsamplebeat | f9881edf49b771fc537048284a8417d3d2e7a196 | [
"Apache-2.0"
] | null | null | null | tests/system/test_base.py | breml/netsamplebeat | f9881edf49b771fc537048284a8417d3d2e7a196 | [
"Apache-2.0"
] | null | null | null | from netsamplebeat import BaseTest
import os
class Test(BaseTest):
def test_base(self):
"""
Basic test with exiting Netsamplebeat normally
"""
self.render_config_template(
path=os.path.abspath(self.working_dir) + "/log/*"
)
netsamplebeat_proc = se... | 27.7 | 99 | 0.640794 |
27bfdef46cd2c54e25434a5c3024ee4e43c2d227 | 258 | py | Python | manage.py | andreif/heroku_django | 824b88fbde8628f221f2af4c47a17f45d055aff3 | [
"MIT"
] | null | null | null | manage.py | andreif/heroku_django | 824b88fbde8628f221f2af4c47a17f45d055aff3 | [
"MIT"
] | null | null | null | manage.py | andreif/heroku_django | 824b88fbde8628f221f2af4c47a17f45d055aff3 | [
"MIT"
] | null | null | null | import os
import sys
if __name__ == '__main__':
assert os.environ.get('DJANGO_SETTINGS_MODULE') or \
'--settings=' in ''.join(sys.argv)
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 25.8 | 64 | 0.717054 |
9eca82a02fb6c862e108fb9250223096c51ab274 | 3,967 | py | Python | venv/lib/python3.8/site-packages/pygments/lexers/devicetree.py | felipesch92/projeto_kivy | 382827b9a632c5c3989a3129a2d3ee29b0defcf3 | [
"MIT"
] | 603 | 2020-12-23T13:49:32.000Z | 2022-03-31T23:38:03.000Z | venv/lib/python3.8/site-packages/pygments/lexers/devicetree.py | felipesch92/projeto_kivy | 382827b9a632c5c3989a3129a2d3ee29b0defcf3 | [
"MIT"
] | 387 | 2020-12-15T14:54:04.000Z | 2022-03-31T07:00:21.000Z | venv/lib/python3.8/site-packages/pygments/lexers/devicetree.py | felipesch92/projeto_kivy | 382827b9a632c5c3989a3129a2d3ee29b0defcf3 | [
"MIT"
] | 63 | 2015-01-04T07:11:06.000Z | 2020-11-28T21:24:42.000Z | """
pygments.lexers.devicetree
~~~~~~~~~~~~~~~~~~~~~~~~~~
Lexers for Devicetree language.
:copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, bygroups, include, default, words
from pygments.token imp... | 36.394495 | 89 | 0.453743 |
cb8b6cb3b12d132f5e886edc7812db298ceed75f | 18,284 | py | Python | swat/tests/cas/test_builtins.py | arharvey918/python-swat | 0db2db2d7c049b23391de419950954c8d505b325 | [
"Apache-2.0"
] | null | null | null | swat/tests/cas/test_builtins.py | arharvey918/python-swat | 0db2db2d7c049b23391de419950954c8d505b325 | [
"Apache-2.0"
] | null | null | null | swat/tests/cas/test_builtins.py | arharvey918/python-swat | 0db2db2d7c049b23391de419950954c8d505b325 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
#
# Copyright SAS Institute
#
# 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 b... | 46.882051 | 203 | 0.613597 |
f86668c4ee0c15fab11ae35bde6ce652909e64c6 | 888 | py | Python | google/appengine/_internal/django/core/management/commands/runfcgi.py | vladushakov987/appengine_python3 | 0dd481c73e2537a50ee10f1b79cd65938087e555 | [
"Apache-2.0"
] | null | null | null | google/appengine/_internal/django/core/management/commands/runfcgi.py | vladushakov987/appengine_python3 | 0dd481c73e2537a50ee10f1b79cd65938087e555 | [
"Apache-2.0"
] | null | null | null | google/appengine/_internal/django/core/management/commands/runfcgi.py | vladushakov987/appengine_python3 | 0dd481c73e2537a50ee10f1b79cd65938087e555 | [
"Apache-2.0"
] | null | null | null |
from google.appengine._internal.django.core.management.base import BaseCommand
class Command(BaseCommand):
help = "Runs this project as a FastCGI application. Requires flup."
args = '[various KEY=val options, use `runfcgi help` for help]'
def handle(self, *args, **options):
from google.appengine.... | 40.363636 | 87 | 0.716216 |
57fec792a226161ce9cebf3e4e65267bcc8cf1fa | 1,268 | py | Python | src/modules/deq.py | murata7oki/deq-jax | bfd88c694758769da1656b16c2e6ba8ff05e267c | [
"Apache-2.0"
] | 27 | 2020-10-07T07:36:29.000Z | 2022-01-01T20:57:15.000Z | src/modules/deq.py | murata7oki/deq-jax | bfd88c694758769da1656b16c2e6ba8ff05e267c | [
"Apache-2.0"
] | 1 | 2020-12-10T17:42:40.000Z | 2020-12-12T14:46:39.000Z | src/modules/deq.py | murata7oki/deq-jax | bfd88c694758769da1656b16c2e6ba8ff05e267c | [
"Apache-2.0"
] | 1 | 2021-06-11T07:08:04.000Z | 2021-06-11T07:08:04.000Z | from typing import Callable
import jax.numpy as jnp
from src.modules.rootfind import rootfind, rootfind_grad
def deq(params: dict, rng, z: jnp.ndarray, fun: Callable, max_iter: int, *args) -> jnp.ndarray:
"""
Apply Deep Equilibrium Network to haiku function.
:param params: params for haiku function
:... | 42.266667 | 95 | 0.701104 |
cdcc249cb26866ff2c3fd41a7a1f045fc7305eec | 5,445 | py | Python | Classes/MachineSCIM.py | magnetron/pyleecan | 2a3338f4ab080ad6488b5ab8746c3fea1f36f177 | [
"Apache-2.0"
] | 1 | 2021-02-26T12:28:45.000Z | 2021-02-26T12:28:45.000Z | Classes/MachineSCIM.py | magnetron/pyleecan | 2a3338f4ab080ad6488b5ab8746c3fea1f36f177 | [
"Apache-2.0"
] | null | null | null | Classes/MachineSCIM.py | magnetron/pyleecan | 2a3338f4ab080ad6488b5ab8746c3fea1f36f177 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""File generated according to pyleecan/Generator/ClassesRef/Machine/MachineSCIM.csv
WARNING! All changes made in this file will be lost!
"""
from os import linesep
from logging import getLogger
from ._check import check_var, raise_
from ..Functions.get_logger import get_logger
from ..Functions... | 33.404908 | 88 | 0.613039 |
5d4dd3d640392cdded4aebc9a1979ff27277aba8 | 1,501 | py | Python | tests/interactive/image/depth_save.py | bitcraft/pyglet | 144257c365ca85528c6a4c5bed8141e683d7a9b6 | [
"BSD-3-Clause"
] | 15 | 2015-01-21T12:29:01.000Z | 2018-12-09T09:17:33.000Z | tests/interactive/image/depth_save.py | bitcraft/pyglet | 144257c365ca85528c6a4c5bed8141e683d7a9b6 | [
"BSD-3-Clause"
] | null | null | null | tests/interactive/image/depth_save.py | bitcraft/pyglet | 144257c365ca85528c6a4c5bed8141e683d7a9b6 | [
"BSD-3-Clause"
] | 9 | 2015-12-12T09:12:46.000Z | 2021-12-26T13:29:14.000Z | """Test depth buffer save.
A scene consisting of a single coloured triangle will be rendered. The
depth buffer will then be saved to a stream and loaded as a texture.
You will see the original scene first for up to several seconds before the
depth buffer image appears (because retrieving and saving the image is
a sl... | 26.333333 | 74 | 0.650899 |
f9aea89dd848d9354806e9240c8d37f46b9de498 | 4,917 | py | Python | backend/assertion_to_z3.py | uwplse/stng | ce12c2c079516df873382a5aa3c18c407833d130 | [
"MIT"
] | 14 | 2017-03-07T00:14:33.000Z | 2022-02-09T00:59:22.000Z | backend/assertion_to_z3.py | uwplse/stng | ce12c2c079516df873382a5aa3c18c407833d130 | [
"MIT"
] | 11 | 2016-11-22T13:14:55.000Z | 2021-12-14T00:56:51.000Z | backend/assertion_to_z3.py | uwplse/stng | ce12c2c079516df873382a5aa3c18c407833d130 | [
"MIT"
] | 6 | 2016-11-07T13:38:45.000Z | 2021-04-04T12:13:31.000Z | from stencil_ir import *
import asp.codegen.ast_tools as ast_tools
import os, binascii
import logging
from backend_halide import IndexResugar
class ToZ3(ast_tools.NodeVisitor):
"""
Converts a set of assertions into Z3 syntax.
"""
def __init__(self, tree, loopvars=None, additional_conds=None, convert_fl... | 39.653226 | 136 | 0.560911 |
74b530d5fe5b7a669f58ed5d54839ac3735b2ea6 | 1,017 | py | Python | pipeline/scripts/concat_all_nb_of_records_removed_with_mapq_sam_records_filter_files.py | iqbal-lab-org/pandora_paper_roc | bb21c76faefa8021c86c3be9d77b8b5999fe2ef5 | [
"MIT"
] | null | null | null | pipeline/scripts/concat_all_nb_of_records_removed_with_mapq_sam_records_filter_files.py | iqbal-lab-org/pandora_paper_roc | bb21c76faefa8021c86c3be9d77b8b5999fe2ef5 | [
"MIT"
] | null | null | null | pipeline/scripts/concat_all_nb_of_records_removed_with_mapq_sam_records_filter_files.py | iqbal-lab-org/pandora_paper_roc | bb21c76faefa8021c86c3be9d77b8b5999fe2ef5 | [
"MIT"
] | 2 | 2020-11-04T18:15:43.000Z | 2020-11-06T01:38:08.000Z | from utils import get_concatenated_df
# setup
all_nb_of_records_removed_with_mapq_sam_records_filter_files_for_precision = snakemake.input.all_nb_of_records_removed_with_mapq_sam_records_filter_files_for_precision
nb_of_records_removed_with_mapq_sam_records_filter_for_precision_filepath = snakemake.output.nb_of_record... | 63.5625 | 167 | 0.769912 |
76a6e9de0283f4c0ed8c7fe1458c93cfcadbc28c | 10,760 | py | Python | src/dependenpy/structures.py | gitter-badger/dependenpy | db411b7bbd466b79064cbb419049f17cd3bff4c1 | [
"ISC"
] | null | null | null | src/dependenpy/structures.py | gitter-badger/dependenpy | db411b7bbd466b79064cbb419049f17cd3bff4c1 | [
"ISC"
] | null | null | null | src/dependenpy/structures.py | gitter-badger/dependenpy | db411b7bbd466b79064cbb419049f17cd3bff4c1 | [
"ISC"
] | null | null | null | # -*- coding: utf-8 -*-
"""dependenpy structures module."""
import json
from .helpers import PrintMixin
class Matrix(PrintMixin):
"""
Matrix class.
A class to build a matrix given a list of nodes. After instantiation,
it has two attributes: data, a 2-dimensions array, and keys, the names
of th... | 31.647059 | 101 | 0.522119 |
4e5e7f4732bbf28587d97ccccc0fe93ad000c197 | 1,860 | py | Python | bismite/config.py | Libera-Chat/bismite | 8d725cdbbf3c847c3a2fcc764f96e4db0e78801e | [
"MIT"
] | 9 | 2021-06-15T18:24:21.000Z | 2022-02-01T15:25:18.000Z | bismite/config.py | Libera-Chat/maskwatch-bot | 8d725cdbbf3c847c3a2fcc764f96e4db0e78801e | [
"MIT"
] | 28 | 2021-06-03T21:20:54.000Z | 2021-06-14T23:05:09.000Z | bismite/config.py | Libera-Chat/bismite | 8d725cdbbf3c847c3a2fcc764f96e4db0e78801e | [
"MIT"
] | 1 | 2021-10-29T20:39:10.000Z | 2021-10-29T20:39:10.000Z | from dataclasses import dataclass
from os.path import expanduser
from re import compile as re_compile
from typing import Dict, List, Optional, Pattern, Tuple
import yaml
@dataclass
class Config(object):
server: Tuple[str, int, bool]
nickname: str
username: str
realname: str
pas... | 26.571429 | 75 | 0.622581 |
1066d9870aa0d3c715848098ba489fee05e4a886 | 1,956 | py | Python | time_tracker.py | KJoke70/i3-tools | bb4bb817e8e1c1d58aa2ef43d67dc6c32eb5753d | [
"BSD-3-Clause"
] | 26 | 2018-04-28T18:15:11.000Z | 2022-02-19T12:23:07.000Z | time_tracker.py | KJoke70/i3-tools | bb4bb817e8e1c1d58aa2ef43d67dc6c32eb5753d | [
"BSD-3-Clause"
] | 2 | 2018-12-05T17:35:50.000Z | 2020-02-16T13:50:29.000Z | time_tracker.py | KJoke70/i3-tools | bb4bb817e8e1c1d58aa2ef43d67dc6c32eb5753d | [
"BSD-3-Clause"
] | 1 | 2019-11-06T06:35:45.000Z | 2019-11-06T06:35:45.000Z | #!/usr/bin/env python3
#import sys
import os
import time
#import argparse
import configparser
import i3ipc
#import csv
import json
import socket #ipc
import threading
import subprocess
total_time = 0
current_time = 0
## Needs to track
## window::focus
## window::new
## window::close
## window::title
# TODO ch... | 18.45283 | 80 | 0.625256 |
8ff1639ed0870530e39aaede4d5b8a19c5820406 | 523 | py | Python | agtool/utils/path_utils.py | swyo/agtool | 136d09b20785196ff90e97cfb3c7717df47e7ff5 | [
"MIT"
] | null | null | null | agtool/utils/path_utils.py | swyo/agtool | 136d09b20785196ff90e97cfb3c7717df47e7ff5 | [
"MIT"
] | 2 | 2021-12-18T09:26:01.000Z | 2021-12-21T13:56:24.000Z | agtool/utils/path_utils.py | swyo/agtool | 136d09b20785196ff90e97cfb3c7717df47e7ff5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Description
===========
Helper functions are defined in this module.
"""
import os.path as osp
def module_path(module_name=''):
"""Get path of module.
Args:
module_name: Name of a module
Example:
>>> from mipack.utils import module_path
>>> # get the roo... | 20.92 | 61 | 0.617591 |
1876c5ad386c07738253f7c427df6565b618fb2e | 6,010 | py | Python | pyscf/solvent/ddpcm.py | fdmalone/pyscf | 021b17ac721e292b277d2b740e2ff8ab38bb6a4a | [
"Apache-2.0"
] | null | null | null | pyscf/solvent/ddpcm.py | fdmalone/pyscf | 021b17ac721e292b277d2b740e2ff8ab38bb6a4a | [
"Apache-2.0"
] | null | null | null | pyscf/solvent/ddpcm.py | fdmalone/pyscf | 021b17ac721e292b277d2b740e2ff8ab38bb6a4a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. 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
#
# U... | 33.021978 | 83 | 0.614642 |
39eaeb907f2c19f8fa5c2f62af662e1ba13290e6 | 657 | py | Python | setup.py | Dascienz/streamingbandit | 219a0e7b3cf73c14579529b9d94db34b5214ef40 | [
"MIT"
] | null | null | null | setup.py | Dascienz/streamingbandit | 219a0e7b3cf73c14579529b9d94db34b5214ef40 | [
"MIT"
] | null | null | null | setup.py | Dascienz/streamingbandit | 219a0e7b3cf73c14579529b9d94db34b5214ef40 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Author: Maurits Kaptein, Jules Kruijswijk.
# contributor: Robin van Emden, Vincent Gijsen
from setuptools import setup
setup(name='StreamingBandit',
version='1.0.4',
description='Python application to setup and run streaming (contextual) bandit experiments.',
author='Nth-iteratio... | 24.333333 | 97 | 0.649924 |
9436821420957305e99cc4d701b0aed0d7f86501 | 217 | py | Python | command_center/generate.py | NTUEELightDance/2019-LightDance | 2e2689f868364e16972465abc22801aaeaf3d8ba | [
"MIT"
] | 2 | 2019-07-16T10:40:52.000Z | 2022-03-14T00:26:42.000Z | command_center/generate.py | NTUEELightDance/2019-LightDance | 2e2689f868364e16972465abc22801aaeaf3d8ba | [
"MIT"
] | null | null | null | command_center/generate.py | NTUEELightDance/2019-LightDance | 2e2689f868364e16972465abc22801aaeaf3d8ba | [
"MIT"
] | 2 | 2019-12-01T07:40:04.000Z | 2020-02-15T09:58:50.000Z | import sys
sys.path.append('../editor')
import translate_new
import json
Data = translate_new.translate('../editor/tron.in')
with open('data.json', 'w') as outfile:
json.dump(Data, outfile)
print('Generate OK') | 19.727273 | 51 | 0.714286 |
d447cfc9e2e7dcd4fb90efd9b1db0c9a93ea4125 | 395 | py | Python | blog/sitemaps.py | mohsenbjp/mysite1 | 8a8b8b4009bf16fe391fc64c8bf9d41f7f2e32a4 | [
"MIT"
] | null | null | null | blog/sitemaps.py | mohsenbjp/mysite1 | 8a8b8b4009bf16fe391fc64c8bf9d41f7f2e32a4 | [
"MIT"
] | null | null | null | blog/sitemaps.py | mohsenbjp/mysite1 | 8a8b8b4009bf16fe391fc64c8bf9d41f7f2e32a4 | [
"MIT"
] | null | null | null | from django.contrib.sitemaps import Sitemap
from django.urls import reverse
from blog.models import Post
class BlogSitemap(Sitemap):
changefreq='weekly'
priority=0.5
def items(self):
return Post.objects.filter(status=True)
def location(self,item):
return reverse('blog:single',kwargs={'p... | 28.214286 | 60 | 0.708861 |
f45319a2c8a994290435596b6d557e6a21b8afc0 | 8,983 | py | Python | tests/integration/widgets/test_dateslider.py | ArchaeotheriumSapienter/bokeh | 08bfae97a91db5bdc989c6ab33ec6a5125ed0d01 | [
"BSD-3-Clause"
] | null | null | null | tests/integration/widgets/test_dateslider.py | ArchaeotheriumSapienter/bokeh | 08bfae97a91db5bdc989c6ab33ec6a5125ed0d01 | [
"BSD-3-Clause"
] | null | null | null | tests/integration/widgets/test_dateslider.py | ArchaeotheriumSapienter/bokeh | 08bfae97a91db5bdc989c6ab33ec6a5125ed0d01 | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#---------------------------------------------------... | 35.788845 | 122 | 0.61082 |
a2a99c283044432f581dec2372c7662d06f55e1c | 1,189 | py | Python | _includes/code/02_parallel_jobs/count_pylibs_annotated.py | tkphd/hpc-parallel-novice | dd5870450c4f889694bf58ed2f53b5535684d399 | [
"CC-BY-4.0"
] | 32 | 2017-03-08T14:40:34.000Z | 2022-02-08T12:46:31.000Z | _includes/code/02_parallel_jobs/count_pylibs_annotated.py | tkphd/hpc-parallel-novice | dd5870450c4f889694bf58ed2f53b5535684d399 | [
"CC-BY-4.0"
] | 25 | 2017-03-08T20:32:00.000Z | 2021-11-25T16:07:10.000Z | _includes/code/02_parallel_jobs/count_pylibs_annotated.py | tkphd/hpc-parallel-novice | dd5870450c4f889694bf58ed2f53b5535684d399 | [
"CC-BY-4.0"
] | 21 | 2017-03-08T14:16:27.000Z | 2021-11-26T06:35:48.000Z | import os
import sys
import glob
import re
def load_text():
""" searchs for the path seen by python (aka sys.path) which contains os.py and reads all .py files in this directory into a large string """
path_of_ospy = ""
text = []
for d in sys.path:
if os.path.isdir(d) and os.path.exists(d+"/o... | 22.433962 | 145 | 0.603869 |
62e4e7e91056a53b37476db54f46c8e659ba6a6c | 435 | py | Python | setup.py | nickdelgrosso/genomics_workshop_demo | 9890017a4348d9a97eda8f5977a8a02ed24610c3 | [
"MIT"
] | 1 | 2019-04-12T02:40:54.000Z | 2019-04-12T02:40:54.000Z | setup.py | nickdelgrosso/genomics_workshop_demo | 9890017a4348d9a97eda8f5977a8a02ed24610c3 | [
"MIT"
] | 1 | 2018-10-01T13:11:51.000Z | 2018-10-01T13:14:17.000Z | setup.py | nickdelgrosso/genomics_workshop_demo | 9890017a4348d9a97eda8f5977a8a02ed24610c3 | [
"MIT"
] | 12 | 2018-10-01T09:35:35.000Z | 2018-10-01T09:49:27.000Z | from setuptools import setup
setup(
name='genomics_demo',
version='v0.0.1',
packages=['genomics_demo'],
url='',
license='MIT',
author='Nicholas A. Del Grosso',
author_email='delgrosso.nick@gmail.com',
description='The best genomics package ever. Just kidding--do NOT use this!',
ent... | 25.588235 | 82 | 0.662069 |
70102dcdbf221a8e9423cfe6e93ebbead95ef331 | 272 | py | Python | util/convert_to_dict.py | jkh911208/gluster_manager_api | ecc59c8d87d06eb0cb7981263e8b09851bbf0fea | [
"Apache-2.0"
] | null | null | null | util/convert_to_dict.py | jkh911208/gluster_manager_api | ecc59c8d87d06eb0cb7981263e8b09851bbf0fea | [
"Apache-2.0"
] | null | null | null | util/convert_to_dict.py | jkh911208/gluster_manager_api | ecc59c8d87d06eb0cb7981263e8b09851bbf0fea | [
"Apache-2.0"
] | null | null | null | def config_to_dict(data):
temp = {}
for line in data:
if "=" in line:
key_val = line.split("=")
if len(key_val) == 2:
temp[key_val[0].strip().replace("\"", "")] = key_val[1].strip().replace("\"", "")
return temp
| 30.222222 | 97 | 0.474265 |
c3dddc05a9cf970c2c6c7107f8329daa90aecc51 | 2,646 | py | Python | run-tests.py | sergev/pyjson5 | 589576553919dca0cff2fb4f7506b19370429a77 | [
"Apache-2.0"
] | 67 | 2018-05-03T16:50:10.000Z | 2022-03-16T14:43:47.000Z | run-tests.py | sergev/pyjson5 | 589576553919dca0cff2fb4f7506b19370429a77 | [
"Apache-2.0"
] | 21 | 2018-10-17T12:43:35.000Z | 2022-02-14T12:05:51.000Z | run-tests.py | sergev/pyjson5 | 589576553919dca0cff2fb4f7506b19370429a77 | [
"Apache-2.0"
] | 4 | 2020-09-16T08:48:33.000Z | 2021-08-07T08:45:10.000Z | #!/usr/bin/env python
from argparse import ArgumentParser
from logging import basicConfig, INFO, getLogger
from os import name
from pathlib import Path
from subprocess import Popen
from sys import executable
from colorama import init, Fore
from pyjson5 import decode_io
argparser = ArgumentParser(description='Run JS... | 27.5625 | 94 | 0.557823 |
7565c9a38af4e9b816034d65c188a5da94533b85 | 3,186 | py | Python | lib/galaxy/webapps/galaxy/api/extended_metadata.py | beatrizserrano/galaxy | e149d9d32e1bca6c07c38b1a9cdabfee60323610 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/webapps/galaxy/api/extended_metadata.py | beatrizserrano/galaxy | e149d9d32e1bca6c07c38b1a9cdabfee60323610 | [
"CC-BY-3.0"
] | 6 | 2021-11-11T20:57:49.000Z | 2021-12-10T15:30:33.000Z | lib/galaxy/webapps/galaxy/api/extended_metadata.py | beatrizserrano/galaxy | e149d9d32e1bca6c07c38b1a9cdabfee60323610 | [
"CC-BY-3.0"
] | null | null | null | """
API operations on annotations.
"""
import logging
from typing import (
Generic,
Optional,
TypeVar,
)
from galaxy import (
managers,
model,
web,
)
from galaxy.webapps.base.controller import (
UsesExtendedMetadataMixin,
UsesLibraryMixinItems,
UsesStoredWorkflowMixin,
)
from . impo... | 35.797753 | 119 | 0.713748 |
7492c471b5169af6a1ba580cda130c0e5fb67470 | 1,946 | py | Python | tests/testapp/utils.py | harvardinformatics/django-mysql | c560cd9ccbc44828efea997624a7fb2548bda0b9 | [
"BSD-3-Clause"
] | null | null | null | tests/testapp/utils.py | harvardinformatics/django-mysql | c560cd9ccbc44828efea997624a7fb2548bda0b9 | [
"BSD-3-Clause"
] | null | null | null | tests/testapp/utils.py | harvardinformatics/django-mysql | c560cd9ccbc44828efea997624a7fb2548bda0b9 | [
"BSD-3-Clause"
] | null | null | null | from django.db import DEFAULT_DB_ALIAS, connection, connections
from django.test.utils import CaptureQueriesContext
def column_type(table_name, column_name):
with connection.cursor() as cursor:
cursor.execute(
"""SELECT DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEM... | 27.408451 | 87 | 0.620761 |
5cf5e10934cde7d5a434e2c0a07189cfcf2d868c | 1,967 | py | Python | whiteboard/migrations/0001_initial.py | vchrisb/emc_phoenix3 | 4ee59cc3ff3dfdc62a460308e157d702371df69c | [
"MIT"
] | null | null | null | whiteboard/migrations/0001_initial.py | vchrisb/emc_phoenix3 | 4ee59cc3ff3dfdc62a460308e157d702371df69c | [
"MIT"
] | null | null | null | whiteboard/migrations/0001_initial.py | vchrisb/emc_phoenix3 | 4ee59cc3ff3dfdc62a460308e157d702371df69c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-02-11 16:54
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import django_resized.forms
import phoenix.custom_storages
import uuid
... | 47.97561 | 168 | 0.697001 |
2825cfe1d0303aa4db76d49c4be6e572d623a365 | 3,680 | py | Python | mac/google-cloud-sdk/lib/third_party/kubernetes/client/apis/networking_api.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | mac/google-cloud-sdk/lib/third_party/kubernetes/client/apis/networking_api.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 11 | 2020-02-29T02:51:12.000Z | 2022-03-30T23:20:08.000Z | mac/google-cloud-sdk/lib/third_party/kubernetes/client/apis/networking_api.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 1 | 2020-07-24T18:47:35.000Z | 2020-07-24T18:47:35.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen
https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.14.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
imp... | 29.677419 | 115 | 0.661957 |
220c5d2aebf166fdb2bd92469c41cfda06a6689e | 326 | py | Python | B站/【pandas高级应用】Python自动化办公/0801/代码/011/011.py | zhaofeng092/python_auto_office | 3ef8420d5695aa3ab1184e9a76dc5e3dd6ab244d | [
"MIT"
] | 46 | 2020-12-29T06:19:15.000Z | 2022-03-26T00:17:23.000Z | B站/【pandas高级应用】Python自动化办公/0801/代码/011/011.py | zhaofeng092/python_auto_office | 3ef8420d5695aa3ab1184e9a76dc5e3dd6ab244d | [
"MIT"
] | 3 | 2021-03-20T05:38:58.000Z | 2021-12-13T20:50:24.000Z | B站/【pandas高级应用】Python自动化办公/0801/代码/011/011.py | zhaofeng092/python_auto_office | 3ef8420d5695aa3ab1184e9a76dc5e3dd6ab244d | [
"MIT"
] | 44 | 2020-12-27T12:58:30.000Z | 2022-03-27T14:18:54.000Z | import pandas as pd
import matplotlib.pyplot as plt
users = pd.read_excel('C:/Temp/Users.xlsx')
users['Total'] = users['Oct'] + users['Nov'] + users['Dec']
users.sort_values(by='Total', inplace=True, ascending=False)
print(users)
users.plot.bar(x='Name', y=['Oct', 'Nov', 'Dec'], stacked=True)
plt.tight_layout()
plt.s... | 27.166667 | 63 | 0.693252 |
995e778bf4bb883fbcab53b62e79b8cbacc3c957 | 856 | py | Python | web/beats/apps/tracks/migrations/0002_fileupload.py | WilliamQLiu/beats | d3a8236c2f8820cf9ac78e5758eb700a1728d72b | [
"Apache-2.0"
] | null | null | null | web/beats/apps/tracks/migrations/0002_fileupload.py | WilliamQLiu/beats | d3a8236c2f8820cf9ac78e5758eb700a1728d72b | [
"Apache-2.0"
] | 5 | 2020-02-11T23:00:27.000Z | 2021-06-10T17:57:16.000Z | web/beats/apps/tracks/migrations/0002_fileupload.py | WilliamQLiu/beats | d3a8236c2f8820cf9ac78e5758eb700a1728d72b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-06-19 06:01
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tracks', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 31.703704 | 114 | 0.586449 |
1581e154ff6885660691730f51668539c0ac6bcd | 9,697 | py | Python | src/ui_manager.py | soyuka/botty | cc1670ea1db72c5e0ac91685897bf63c89b18896 | [
"MIT"
] | null | null | null | src/ui_manager.py | soyuka/botty | cc1670ea1db72c5e0ac91685897bf63c89b18896 | [
"MIT"
] | null | null | null | src/ui_manager.py | soyuka/botty | cc1670ea1db72c5e0ac91685897bf63c89b18896 | [
"MIT"
] | null | null | null | import keyboard
import os
import numpy as np
import time
from utils.custom_mouse import mouse
from utils.misc import wait
from logger import Logger
from config import Config
from screen import grab, convert_screen_to_monitor, convert_abs_to_monitor
from template_finder import TemplateFinder, TemplateMatch
from dataclas... | 28.520588 | 123 | 0.630711 |
9391a1122d1f2fe0ef92081d3a68242ac49fd384 | 1,353 | py | Python | pyclesperanto_prototype/_tier1/_average_distance_of_n_nearest_distances.py | DrLachie/pyclesperanto_prototype | 56843fac2543265c40f108fd40eac3ecf85c8458 | [
"BSD-3-Clause"
] | null | null | null | pyclesperanto_prototype/_tier1/_average_distance_of_n_nearest_distances.py | DrLachie/pyclesperanto_prototype | 56843fac2543265c40f108fd40eac3ecf85c8458 | [
"BSD-3-Clause"
] | null | null | null | pyclesperanto_prototype/_tier1/_average_distance_of_n_nearest_distances.py | DrLachie/pyclesperanto_prototype | 56843fac2543265c40f108fd40eac3ecf85c8458 | [
"BSD-3-Clause"
] | null | null | null | from .._tier0 import execute
from .._tier0 import plugin_function
from .._tier0 import Image
from .._tier0 import create_none
@plugin_function(output_creator=create_none)
def average_distance_of_n_nearest_distances(distance_matrix : Image, distance_vector_destination: Image = None, n : int = 1) -> Image:
"""Determ... | 32.214286 | 134 | 0.726534 |
10b46e5ac5b1295c811c4283766b5badc1f39d11 | 9,672 | py | Python | tests/test_averager2d.py | PrincetonUniversity/ASPIRE-Python | 1bff8d3884183203bd77695a76bccb1efc909fd3 | [
"MIT"
] | 7 | 2018-11-07T16:45:35.000Z | 2020-01-10T16:54:26.000Z | tests/test_averager2d.py | PrincetonUniversity/ASPIRE-Python | 1bff8d3884183203bd77695a76bccb1efc909fd3 | [
"MIT"
] | 1 | 2019-04-05T18:41:39.000Z | 2019-04-05T18:41:39.000Z | tests/test_averager2d.py | PrincetonUniversity/ASPIRE-Python | 1bff8d3884183203bd77695a76bccb1efc909fd3 | [
"MIT"
] | 2 | 2019-06-04T17:01:53.000Z | 2019-07-08T19:01:40.000Z | import logging
import os
from unittest import TestCase
import numpy as np
import pytest
from aspire.basis import DiracBasis, FFBBasis2D
from aspire.classification import (
Averager2D,
BFRAverager2D,
BFSRAverager2D,
BFSReddyChatterjiAverager2D,
ReddyChatterjiAverager2D,
)
from aspire.source import ... | 33.936842 | 88 | 0.633581 |
3df9095cfb2b9c2980daa523894ab7380975fb22 | 4,272 | py | Python | parlai/scripts/multiprocessing_train.py | josharnoldjosh/ParlAI | 262f8414444c5a0cc70895e519ffc63a7909faf2 | [
"MIT"
] | 1 | 2019-07-25T17:30:18.000Z | 2019-07-25T17:30:18.000Z | parlai/scripts/multiprocessing_train.py | abisee/ParlAI | 5507d4745ca23b23af311673a6b0d1b7e72eb5cd | [
"MIT"
] | null | null | null | parlai/scripts/multiprocessing_train.py | abisee/ParlAI | 5507d4745ca23b23af311673a6b0d1b7e72eb5cd | [
"MIT"
] | 1 | 2019-07-28T14:53:18.000Z | 2019-07-28T14:53:18.000Z | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Main launch script for single-host, multi-GPU training.
This is a drop-in replacement for train_model.py. This scr... | 32.363636 | 85 | 0.681414 |
334dc54f4613c8c819902b34a067c7f7077bca78 | 4,872 | py | Python | openshift/installer/vendored/openshift-ansible-3.7.52-1/roles/lib_vendored_deps/filter_plugins/openshift_version.py | fahlmant/openshift-tools | dbb4f16ccde3404c36c23108c45ca7b67138ee12 | [
"Apache-2.0"
] | null | null | null | openshift/installer/vendored/openshift-ansible-3.7.52-1/roles/lib_vendored_deps/filter_plugins/openshift_version.py | fahlmant/openshift-tools | dbb4f16ccde3404c36c23108c45ca7b67138ee12 | [
"Apache-2.0"
] | 3 | 2016-12-01T23:01:36.000Z | 2016-12-02T00:16:48.000Z | openshift/installer/vendored/openshift-ansible-3.7.52-1/roles/lib_vendored_deps/filter_plugins/openshift_version.py | fahlmant/openshift-tools | dbb4f16ccde3404c36c23108c45ca7b67138ee12 | [
"Apache-2.0"
] | 2 | 2018-10-16T05:11:13.000Z | 2018-11-07T01:46:29.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
"""
Custom version comparison filters for use in openshift-ansible
"""
# pylint can't locate distutils.version within virtualenv
# https://github.com/PyCQA/pylint/issues/73
# pylint: disable=no-name-in-module, import-error
from distutil... | 37.476923 | 105 | 0.55624 |
23a18dc3ce6d43c5c205febfbe033d3c70a2738e | 5,102 | py | Python | contrib/linearize/linearize-hashes.py | Soptq/bitgesell | 4e31314180d8cadaee5868c4d797208ddac7d392 | [
"MIT"
] | 12 | 2020-05-14T20:22:20.000Z | 2021-06-07T19:21:34.000Z | contrib/linearize/linearize-hashes.py | slowriot/bitgesell | 9b7f9e207323e9863253ad2598068b0ad0b159d7 | [
"MIT"
] | 55 | 2021-03-24T15:00:42.000Z | 2022-02-22T10:07:14.000Z | contrib/linearize/linearize-hashes.py | slowriot/bitgesell | 9b7f9e207323e9863253ad2598068b0ad0b159d7 | [
"MIT"
] | 35 | 2021-02-03T03:02:04.000Z | 2021-11-22T07:27:55.000Z | #!/usr/bin/env python3
#
# linearize-hashes.py: List blocks in a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from http.client imp... | 33.346405 | 108 | 0.606429 |
57756e9dee00799aedf4faff7d697c0b84560f83 | 19,164 | py | Python | torchlib/save_segneuralnet.py | CarlosPena00/pytorch-unet | 8365bace23e4b04b9c5b75cd6720807ea8cac5ab | [
"MIT"
] | null | null | null | torchlib/save_segneuralnet.py | CarlosPena00/pytorch-unet | 8365bace23e4b04b9c5b75cd6720807ea8cac5ab | [
"MIT"
] | null | null | null | torchlib/save_segneuralnet.py | CarlosPena00/pytorch-unet | 8365bace23e4b04b9c5b75cd6720807ea8cac5ab | [
"MIT"
] | null | null | null |
import os
import math
import shutil
import time
import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import time
from tqdm import tqdm
from . import models as nnmodels
from . import losses as nloss
from . import metrics
from pytvision.neuralnet ... | 34.843636 | 124 | 0.495512 |
97e535165514712553cbcd0b5270a719c6cb82eb | 5,258 | py | Python | examples/embedded_boundary.py | dbstein/ipde | 834e16a617f47a3eabe3307ba151d5b7db527b30 | [
"Apache-2.0"
] | 2 | 2019-10-17T15:29:38.000Z | 2021-02-19T20:01:34.000Z | examples/embedded_boundary.py | dbstein/ipde | 834e16a617f47a3eabe3307ba151d5b7db527b30 | [
"Apache-2.0"
] | null | null | null | examples/embedded_boundary.py | dbstein/ipde | 834e16a617f47a3eabe3307ba151d5b7db527b30 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import pybie2d
from ipde.embedded_boundary import EmbeddedBoundary
from ipde.heavisides import SlepianMollifier
from ipde.derivatives import fd_x_4, fd_y_4, fourier
from personal_utilities.arc_length_reparametrization import arc_length_paramete... | 37.028169 | 99 | 0.681818 |
16ac2cc5f2a91ba83196c9fadd252c2d0b1779da | 11,289 | py | Python | tests/api/endpoints/test_share_links.py | xiez/seahub | 8dfaa726e804afdf27e0b530de3e127b1654a7e3 | [
"Apache-2.0"
] | null | null | null | tests/api/endpoints/test_share_links.py | xiez/seahub | 8dfaa726e804afdf27e0b530de3e127b1654a7e3 | [
"Apache-2.0"
] | null | null | null | tests/api/endpoints/test_share_links.py | xiez/seahub | 8dfaa726e804afdf27e0b530de3e127b1654a7e3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import json
from mock import patch
from seaserv import seafile_api
from django.core.urlresolvers import reverse
from seahub.test_utils import BaseTestCase
from seahub.share.models import FileShare
from seahub.api2.permissions import CanGenerateShareLink
try:
from seahub.settings import LO... | 36.182692 | 99 | 0.641244 |
0751d93fe59e50649cc838fc13271ed068a3a16a | 1,076 | py | Python | fuse-version.py | monash-wsrn/psoc-camera-firmware | 0c58b41b0eb72a533de42dfc179a5bc8d478352d | [
"MIT"
] | null | null | null | fuse-version.py | monash-wsrn/psoc-camera-firmware | 0c58b41b0eb72a533de42dfc179a5bc8d478352d | [
"MIT"
] | null | null | null | fuse-version.py | monash-wsrn/psoc-camera-firmware | 0c58b41b0eb72a533de42dfc179a5bc8d478352d | [
"MIT"
] | null | null | null | #!/usr/bin/python
from fuse import FUSE,Operations,FuseOSError
from subprocess import check_output
from errno import ENOENT
from stat import S_IFDIR,S_IFREG
class git_version(Operations):
def getattr(self,path,fh=None):
self.version=check_output(['git','describe','--abbrev=8','--dirty','--always','--tags']... | 30.742857 | 96 | 0.645911 |
864dce2a6678d15acd7e82f7dc140723550b55a9 | 182 | py | Python | lab/lab8/genmat.py | YZL24/SUSTech-CS205 | c15e4055b3e260e84e94c8db46b4180448c3619f | [
"MIT"
] | null | null | null | lab/lab8/genmat.py | YZL24/SUSTech-CS205 | c15e4055b3e260e84e94c8db46b4180448c3619f | [
"MIT"
] | null | null | null | lab/lab8/genmat.py | YZL24/SUSTech-CS205 | c15e4055b3e260e84e94c8db46b4180448c3619f | [
"MIT"
] | null | null | null | from random import random
with open('mat2.txt', 'w+') as f:
for _ in range(100):
for _ in range(100):
f.write(f'{random()*100:.2f} ')
f.write('\n')
| 20.222222 | 43 | 0.516484 |
06857c5a05e536dade348771f844193c030997b4 | 44,206 | py | Python | manila/tests/share/drivers/glusterfs/test_layout_volume.py | openstack/manila | 1ebae738c235c6f1874ac7b11307e0d5fb567dba | [
"Apache-2.0"
] | 159 | 2015-01-02T09:35:15.000Z | 2022-01-04T11:51:34.000Z | manila/tests/share/drivers/glusterfs/test_layout_volume.py | openstack/manila | 1ebae738c235c6f1874ac7b11307e0d5fb567dba | [
"Apache-2.0"
] | 5 | 2015-07-24T09:28:21.000Z | 2020-11-20T04:33:51.000Z | manila/tests/share/drivers/glusterfs/test_layout_volume.py | openstack/manila | 1ebae738c235c6f1874ac7b11307e0d5fb567dba | [
"Apache-2.0"
] | 128 | 2015-01-05T22:52:28.000Z | 2021-12-29T14:00:58.000Z | # Copyright (c) 2014 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 45.108163 | 79 | 0.618626 |
f24f591aaffdb5881087819a0461f1383878b689 | 581 | py | Python | fun.py | Shridat/Assignment3 | 8a19d3fb0553260a95d7320117de7bcd76cd002d | [
"MIT"
] | null | null | null | fun.py | Shridat/Assignment3 | 8a19d3fb0553260a95d7320117de7bcd76cd002d | [
"MIT"
] | null | null | null | fun.py | Shridat/Assignment3 | 8a19d3fb0553260a95d7320117de7bcd76cd002d | [
"MIT"
] | null | null | null | dict1={}
string=str(input("Enter String="))
i=0
j=0
def most_frequent(string):
for i in range(0,len(string)):
count=0
for j in range(0,len(string)):
if(string[i]==string[j]):
count=count+1
if string[i] not in dict1.keys():
dict1.update({string[i]:coun... | 27.666667 | 90 | 0.567986 |
b3bf97cde7fa0e4b2270da06d782a96f5a5e50b8 | 4,748 | py | Python | skrebate/surf.py | bukson/scikit-rebate | b3236154e5e6951007829a2ab34a043e7bc84fee | [
"MIT"
] | null | null | null | skrebate/surf.py | bukson/scikit-rebate | b3236154e5e6951007829a2ab34a043e7bc84fee | [
"MIT"
] | null | null | null | skrebate/surf.py | bukson/scikit-rebate | b3236154e5e6951007829a2ab34a043e7bc84fee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
scikit-rebate was primarily developed at the University of Pennsylvania by:
- Randal S. Olson (rso@randalolson.com)
- Pete Schmitt (pschmitt@upenn.edu)
- Ryan J. Urbanowicz (ryanurb@upenn.edu)
- Weixuan Fu (weixuanf@upenn.edu)
- and many more generous open source contrib... | 44.792453 | 121 | 0.672072 |
bb2a79036e4fa6ba0d516e951b8bb49143fa94df | 382 | py | Python | tests/test_sdf_time.py | soundmaking/sdfspu | 164af2602d07b18c45a8182cd5e9638628c7e165 | [
"MIT"
] | null | null | null | tests/test_sdf_time.py | soundmaking/sdfspu | 164af2602d07b18c45a8182cd5e9638628c7e165 | [
"MIT"
] | null | null | null | tests/test_sdf_time.py | soundmaking/sdfspu | 164af2602d07b18c45a8182cd5e9638628c7e165 | [
"MIT"
] | null | null | null | from sdfspu import sdf_time
def test_stamp_utc_now_no_arg():
stamp = sdf_time.stamp_utc_now()
assert "_" in stamp
assert "." in stamp
assert len(stamp) == len("YYYYMMDD_HHMMSS.mss")
def test_stamp_utc_now_ms_false():
stamp = sdf_time.stamp_utc_now(ms=False)
assert "_" in stamp
assert "."... | 23.875 | 51 | 0.693717 |
df68f091832b9d67747a370da4ae806e25a47e8e | 672 | py | Python | app/core/management/commands/wait_for_db.py | Adam-Palucki/recipe-app-api | 1b44fd74d04ffd8688ec92d0381c00070acd8e71 | [
"MIT"
] | null | null | null | app/core/management/commands/wait_for_db.py | Adam-Palucki/recipe-app-api | 1b44fd74d04ffd8688ec92d0381c00070acd8e71 | [
"MIT"
] | 1 | 2020-07-01T18:12:13.000Z | 2020-07-01T18:12:13.000Z | app/core/management/commands/wait_for_db.py | Adam-Palucki/recipe-app-api | 1b44fd74d04ffd8688ec92d0381c00070acd8e71 | [
"MIT"
] | 1 | 2019-09-19T06:40:43.000Z | 2019-09-19T06:40:43.000Z | import time
from django.db import connections
from django.db.utils import OperationalError
from django.core.management.base import BaseCommand
class Command(BaseCommand):
'''Django command to pause execution until database is available'''
def handle(self, *args, **options):
self.stdout.write('Waitin... | 30.545455 | 78 | 0.651786 |
6284958bd8500f1c1eea8df6d11b3e7cb60a90a1 | 312 | py | Python | algo-week-1/WeWantMilk.py | ilkerkosaroglu/METU-Contests | a917548ed2755406c962c7ead7d8f615e5508f6e | [
"MIT"
] | null | null | null | algo-week-1/WeWantMilk.py | ilkerkosaroglu/METU-Contests | a917548ed2755406c962c7ead7d8f615e5508f6e | [
"MIT"
] | null | null | null | algo-week-1/WeWantMilk.py | ilkerkosaroglu/METU-Contests | a917548ed2755406c962c7ead7d8f615e5508f6e | [
"MIT"
] | 1 | 2019-03-15T12:53:05.000Z | 2019-03-15T12:53:05.000Z | inp,M=map(int,raw_input().split())
bucketList=[]
for i in xrange(inp):
cow=map(int,raw_input().split())
bucketList.append(cow)
bucketList.sort()
sum=0
for i in bucketList:
if i[1]<M:
sum+=i[0]*i[1]
M-=i[1]
if M==0:break
else:
sum+=i[0]*M
break
print sum
| 16.421053 | 36 | 0.551282 |
90c7dddae47d3c10b354b6c5bb5239382a1715f6 | 8,317 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_04_01/operations/_default_security_rules_operations.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 1 | 2021-06-02T08:01:35.000Z | 2021-06-02T08:01:35.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_04_01/operations/_default_security_rules_operations.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_04_01/operations/_default_security_rules_operations.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.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 ... | 46.205556 | 220 | 0.667909 |
7c7c9b354433945ac9ca01d1d51f45da61254b06 | 629 | py | Python | DQM/L1TMonitorClient/python/L1TStage2OMTFDEQualityTests_cfi.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 3 | 2018-08-24T19:10:26.000Z | 2019-02-19T11:45:32.000Z | DQM/L1TMonitorClient/python/L1TStage2OMTFDEQualityTests_cfi.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 7 | 2016-07-17T02:34:54.000Z | 2019-08-13T07:58:37.000Z | DQM/L1TMonitorClient/python/L1TStage2OMTFDEQualityTests_cfi.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 5 | 2018-08-21T16:37:52.000Z | 2020-01-09T13:33:17.000Z | # quality tests for L1T Stage2 OMTF Data vs Emulator
import FWCore.ParameterSet.Config as cms
l1TStage2OMTFDEQualityTests = cms.EDAnalyzer("QualityTester",
qtList=cms.untracked.FileInPath('DQM/L1TMonitorClient/data/L1TStage2OMTFDEQualityTests.xml'),
QualityTestPrescaler=cms.untracked.int32(1),
getQualit... | 39.3125 | 97 | 0.780604 |
583634cf76bdf6418c49f45d8cc54edba8d50e80 | 557 | py | Python | batch.py | UNIST-LIM-Lab/NeuBoots | 196adf9e1ece2abc145f69966504bac2676e5b5e | [
"MIT"
] | null | null | null | batch.py | UNIST-LIM-Lab/NeuBoots | 196adf9e1ece2abc145f69966504bac2676e5b5e | [
"MIT"
] | null | null | null | batch.py | UNIST-LIM-Lab/NeuBoots | 196adf9e1ece2abc145f69966504bac2676e5b5e | [
"MIT"
] | null | null | null | import os
import torch.multiprocessing as mp
mp.set_start_method('spawn', force=True)
def run(str):
os.system(str)
return 0
def main():
strs = [f"python -m torch.distributed.launch --nproc_per_node=1 main.py deep --gpus {i%8} --seed {i}" for i in range(40)]
processes = []
for i in range(5):
... | 21.423077 | 125 | 0.574506 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.