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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f6af847c4409dc5698048181b6fa67b8dcf6d55a | 1,808 | py | Python | playback/db.py | Nierot/Spotify | 11dfe064cbd281c86473ef025d41f7eef293e81b | [
"MIT"
] | null | null | null | playback/db.py | Nierot/Spotify | 11dfe064cbd281c86473ef025d41f7eef293e81b | [
"MIT"
] | null | null | null | playback/db.py | Nierot/Spotify | 11dfe064cbd281c86473ef025d41f7eef293e81b | [
"MIT"
] | null | null | null | from . import models
def new_user(name, date, token):
existing_users = models.User.objects.filter(token=token)
if (len(models.User.objects.filter(token=token)) > 0):
return False
else:
user = models.User(name=name,created_at=date,token=token)
user.save()
return True
def new... | 27.393939 | 81 | 0.690819 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 279 | 0.154314 |
f6b1170ad7a3338dfad41aa494313487f0ff14fc | 767 | py | Python | invenio_records_rest/loaders/__init__.py | NRodriguezcuellar/invenio-records-rest | c4a3717afcf9b08b6e42f3529addecc64bb2e47c | [
"MIT"
] | 5 | 2017-10-22T00:13:49.000Z | 2019-10-04T11:35:18.000Z | invenio_records_rest/loaders/__init__.py | NRodriguezcuellar/invenio-records-rest | c4a3717afcf9b08b6e42f3529addecc64bb2e47c | [
"MIT"
] | 221 | 2015-10-30T23:27:52.000Z | 2022-03-07T13:17:55.000Z | invenio_records_rest/loaders/__init__.py | NRodriguezcuellar/invenio-records-rest | c4a3717afcf9b08b6e42f3529addecc64bb2e47c | [
"MIT"
] | 60 | 2015-10-30T22:43:27.000Z | 2022-02-10T10:08:08.000Z | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Loaders for deserializing records in the REST API."""
from ..schemas import Recor... | 28.407407 | 72 | 0.762712 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 439 | 0.57236 |
f6b1308798ea655f67ea118514f86ed5643a557d | 665 | py | Python | tests/test_csvtodb.py | rv816/csvtodb | 020ef50e44e458cddeec84f42d3d6e372aa678df | [
"0BSD"
] | null | null | null | tests/test_csvtodb.py | rv816/csvtodb | 020ef50e44e458cddeec84f42d3d6e372aa678df | [
"0BSD"
] | null | null | null | tests/test_csvtodb.py | rv816/csvtodb | 020ef50e44e458cddeec84f42d3d6e372aa678df | [
"0BSD"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_csvtodb
----------------------------------
Tests for `csvtodb` module.
"""
import unittest
from csvtodb.csvtodb import *
class TestCsvtodb(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_000_somethin... | 19 | 86 | 0.593985 | 158 | 0.237594 | 0 | 0 | 0 | 0 | 0 | 0 | 223 | 0.335338 |
f6b177997afccd32ce4402f37f222e11eaf794c4 | 915 | py | Python | config.py | mscienski/code-challenge-starter-python-flask | 17f5856bdde0e7ea73dc7dab20b4b366e01a61a2 | [
"MIT"
] | null | null | null | config.py | mscienski/code-challenge-starter-python-flask | 17f5856bdde0e7ea73dc7dab20b4b366e01a61a2 | [
"MIT"
] | null | null | null | config.py | mscienski/code-challenge-starter-python-flask | 17f5856bdde0e7ea73dc7dab20b4b366e01a61a2 | [
"MIT"
] | null | null | null | #pylint: disable=no-member
import os
import logging
from flask import Flask
from flask_cors import CORS
from sqlalchemy.orm import sessionmaker
from flask_sqlalchemy import SQLAlchemy
host: str = os.getenv('DB_HOST', 'localhost')
port: int = int(os.getenv('DB_PORT', '5432'))
user: str = os.getenv('DB_USER', 'postgres'... | 29.516129 | 63 | 0.780328 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 262 | 0.286339 |
f6b27fc8dc15fd2e2b41b5a9f80c430678ed9908 | 389 | py | Python | shared-data/python/tests/labware/__init__.py | Opentrons/protocol_framework | ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f | [
"Apache-2.0"
] | 2 | 2015-11-10T17:49:51.000Z | 2016-01-15T04:43:37.000Z | shared-data/python/tests/labware/__init__.py | Opentrons/labware | e21d8db51eac5818477264a45ef12c0a2d15fb72 | [
"Apache-2.0"
] | null | null | null | shared-data/python/tests/labware/__init__.py | Opentrons/labware | e21d8db51eac5818477264a45ef12c0a2d15fb72 | [
"Apache-2.0"
] | null | null | null | from typing import List, Tuple
from pathlib import Path
def get_ot_defs() -> List[Tuple[str, int]]:
def_files = (
Path(__file__).parent / ".." / ".." / ".." / "labware" / "definitions" / "2"
).glob("**/*.json")
# example filename
# shared-data/labware/definitions/2/opentrons_96_tiprack_300ul... | 27.785714 | 84 | 0.627249 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 0.347044 |
f6b3633afcaa133a55552fd744518177020a4b93 | 2,699 | py | Python | scripts/migrate_unconfirmed_valid_users.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | 1 | 2015-10-02T18:35:53.000Z | 2015-10-02T18:35:53.000Z | scripts/migrate_unconfirmed_valid_users.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | 4 | 2016-05-13T14:24:16.000Z | 2017-03-30T15:28:31.000Z | scripts/migrate_unconfirmed_valid_users.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Script to migrate users with a valid date_last_login but no date_confirmed."""
import sys
import logging
from django.utils import timezone
from website.app import init_app
from website.models import User
from scripts import utils as script_utils
from tests.base import... | 28.712766 | 98 | 0.659504 | 1,125 | 0.416821 | 0 | 0 | 0 | 0 | 0 | 0 | 371 | 0.137458 |
f6b528db6aa41bb01a751fc5e92895bd172d0c13 | 681 | py | Python | src/main/python/proc/expression/let.py | cjblink1/lang | 245b8d002341dce4fa5905b1f274770e34867c7e | [
"MIT"
] | null | null | null | src/main/python/proc/expression/let.py | cjblink1/lang | 245b8d002341dce4fa5905b1f274770e34867c7e | [
"MIT"
] | null | null | null | src/main/python/proc/expression/let.py | cjblink1/lang | 245b8d002341dce4fa5905b1f274770e34867c7e | [
"MIT"
] | null | null | null |
from proc.expression.expression import Expression
from proc.environment import Environment
class LetExpression(Expression):
def __init__(self, variable: str, bound_expression: Expression, body: Expression):
self.variable = variable
self.bound_expression = bound_expression
self.body = body... | 40.058824 | 123 | 0.735683 | 588 | 0.863436 | 0 | 0 | 0 | 0 | 0 | 0 | 52 | 0.076358 |
f6b7fa5f60e2de9db3a6e09ccdc529c81f6a56da | 203 | py | Python | cah/__init__.py | pordino/aikaterna-cogs | 07108bc808b571395e511586492f719c6582e72e | [
"Apache-2.0"
] | 98 | 2017-09-12T01:52:17.000Z | 2022-03-17T16:43:01.000Z | cah/__init__.py | pordino/aikaterna-cogs | 07108bc808b571395e511586492f719c6582e72e | [
"Apache-2.0"
] | 147 | 2016-12-01T04:39:05.000Z | 2022-02-13T02:20:14.000Z | cah/__init__.py | pordino/aikaterna-cogs | 07108bc808b571395e511586492f719c6582e72e | [
"Apache-2.0"
] | 160 | 2016-12-01T20:19:44.000Z | 2022-03-30T10:32:41.000Z | from .cah import CardsAgainstHumanity
__red_end_user_data_statement__ = "This cog does not persistently store data or metadata about users."
def setup(bot):
bot.add_cog(CardsAgainstHumanity(bot))
| 25.375 | 102 | 0.802956 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.334975 |
f6b888452d4e63186e8b7dc8abfa403e51a0d83f | 895 | py | Python | apps/civic_pulse/management/commands/create_scraper_user.py | JimHafner/GovLens | ea44084255d5409fa25ab11b24562f4d14d51bd1 | [
"MIT"
] | 17 | 2019-08-21T07:58:05.000Z | 2021-09-03T20:00:56.000Z | apps/civic_pulse/management/commands/create_scraper_user.py | JimHafner/GovLens | ea44084255d5409fa25ab11b24562f4d14d51bd1 | [
"MIT"
] | 51 | 2019-08-20T23:00:10.000Z | 2022-03-11T23:45:35.000Z | apps/civic_pulse/management/commands/create_scraper_user.py | JimHafner/GovLens | ea44084255d5409fa25ab11b24562f4d14d51bd1 | [
"MIT"
] | 44 | 2019-08-30T01:45:53.000Z | 2021-09-30T23:27:02.000Z | """Idempotent management command to create the scraper user with a DRF token
"""
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from rest_framework.authtoken.models import Token
SCRAPER_USERNAME = "scraper"
class Command(BaseCommand):
help = "Get or create a scrap... | 33.148148 | 83 | 0.707263 | 635 | 0.709497 | 0 | 0 | 0 | 0 | 0 | 0 | 303 | 0.338547 |
f6b8bf7ed46f49468f699cdf6f50b8125f1977b6 | 1,591 | py | Python | Simulation/reaching_gym/render.py | wq13552463699/UCD_UR5E | 513acb7e235ab940fd03c3038208678e285690f3 | [
"MIT"
] | 5 | 2021-11-02T10:48:54.000Z | 2022-01-10T12:32:51.000Z | Simulation/reaching_gym/render.py | wq13552463699/UR5E_robot_gym_env_Real_and_Sim | 513acb7e235ab940fd03c3038208678e285690f3 | [
"MIT"
] | null | null | null | Simulation/reaching_gym/render.py | wq13552463699/UR5E_robot_gym_env_Real_and_Sim | 513acb7e235ab940fd03c3038208678e285690f3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 7 23:19:58 2021
@author: qiang
"""
import tensorflow.keras.backend as K
import tensorflow as tf
import time
from rl_symbol_env_continous import symbol_env_continous
from DDPG_keras import ActorCritic
from env_base import UR5_env
obs_dim = (10,)
... | 24.476923 | 86 | 0.706474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 233 | 0.146449 |
f6b926004f1740bebae35f7fc98b1abf6a61ed14 | 2,111 | py | Python | battingOrbowling_comp.py | ThomasAitken/Cricket-Modelling-Project | a0b8265c562d988dab16a145dc2e73225e2a4774 | [
"MIT"
] | null | null | null | battingOrbowling_comp.py | ThomasAitken/Cricket-Modelling-Project | a0b8265c562d988dab16a145dc2e73225e2a4774 | [
"MIT"
] | null | null | null | battingOrbowling_comp.py | ThomasAitken/Cricket-Modelling-Project | a0b8265c562d988dab16a145dc2e73225e2a4774 | [
"MIT"
] | null | null | null | #how to get a measure of batting or bowling strength? why it's simple! take top-100 rankings list at given period...
#what is score held by #1 player? normalise against this score (i.e. this score now equivalent to 1)
#now add up top 8 normalised scores for each nation's top 8 players in top 100 (set x: 0 <= x <= 1) .... | 39.830189 | 226 | 0.672667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,335 | 0.632402 |
f6b9ca45aa3335bdf8507d0c324366c72d34aef6 | 460 | py | Python | Python-Programming/apply_functions_to_args.py | clickok/Code-Snippets | 403796256a2ec1bd37b2deb4ce5052671a39048f | [
"MIT"
] | null | null | null | Python-Programming/apply_functions_to_args.py | clickok/Code-Snippets | 403796256a2ec1bd37b2deb4ce5052671a39048f | [
"MIT"
] | null | null | null | Python-Programming/apply_functions_to_args.py | clickok/Code-Snippets | 403796256a2ec1bd37b2deb4ce5052671a39048f | [
"MIT"
] | null | null | null | #!/usr/bin/python3
""" Applies a list of functions to command line arguments.
For quick-and-dirty command line argument handling.
"""
import sys
# List of functions to apply
funcLst = [int, int, float, float, int, int, int]
def parseArgs(argLst):
for i in range(len(argLst)):
print(funcLst[i](argLst[i]))
def... | 17.692308 | 59 | 0.663043 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 191 | 0.415217 |
f6ba4c3ad84b5b9411ffe7603ebe9e1cc9a52bf6 | 3,583 | py | Python | slot_filling/corpus_server_direct.py | IBM/kgi-slot-filling | 24f8005bc1d010746e046a8c2ec292a2222fff00 | [
"Apache-2.0"
] | 21 | 2021-05-27T23:14:19.000Z | 2022-02-10T06:36:55.000Z | slot_filling/corpus_server_direct.py | IBM/retrieve-write-slot-filling | 24f8005bc1d010746e046a8c2ec292a2222fff00 | [
"Apache-2.0"
] | 1 | 2021-11-26T04:00:19.000Z | 2021-11-26T04:00:19.000Z | slot_filling/corpus_server_direct.py | IBM/kgi-slot-filling | 24f8005bc1d010746e046a8c2ec292a2222fff00 | [
"Apache-2.0"
] | 3 | 2021-06-04T13:14:22.000Z | 2022-03-09T14:45:50.000Z | #!/usr/bin/env python
# encoding: utf-8
from flask import Flask, request, jsonify
import base64
import numpy as np
from util.args_help import fill_from_args
import os
import logging
from dpr.simple_mmap_dataset import Corpus
from dpr.faiss_index import ANNIndex
logger = logging.getLogger(__name__)
class Options():
... | 36.561224 | 132 | 0.612057 | 443 | 0.123639 | 0 | 0 | 1,954 | 0.545353 | 0 | 0 | 745 | 0.207926 |
f6bb83e5aaef3e05a37054dc4da7d7e3f6405a72 | 2,019 | py | Python | b2btool/rename/rename_to_jde.py | recs12/b2btool | 37108c856f1be399b2b90c31ee90afa5b828481f | [
"Apache-2.0",
"MIT"
] | null | null | null | b2btool/rename/rename_to_jde.py | recs12/b2btool | 37108c856f1be399b2b90c31ee90afa5b828481f | [
"Apache-2.0",
"MIT"
] | null | null | null | b2btool/rename/rename_to_jde.py | recs12/b2btool | 37108c856f1be399b2b90c31ee90afa5b828481f | [
"Apache-2.0",
"MIT"
] | null | null | null | import os
import shutil
import pandas as pd
from pathlib import Path
from b2btool.blob.storage import *
try:
conversion = pd.read_excel(
r"J:\PTCR\Users\RECS\.b2btool\drawings_to_jde.xlsx",
dtype={"ID": str, "JDE": str},
)
except FileNotFoundError as ex:
print(ex.args)
def find_jde(draw... | 29.691176 | 89 | 0.630015 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 566 | 0.280337 |
f6bbb4bc704bc44c6e1985c37232af967115f61d | 1,849 | py | Python | nlp/extract/util/nlp_process.py | anndawn/ccij-water-search | 0ec153f3f9eaa0e80184f4ddc9b3bd7f2e29c2ba | [
"Apache-2.0"
] | null | null | null | nlp/extract/util/nlp_process.py | anndawn/ccij-water-search | 0ec153f3f9eaa0e80184f4ddc9b3bd7f2e29c2ba | [
"Apache-2.0"
] | null | null | null | nlp/extract/util/nlp_process.py | anndawn/ccij-water-search | 0ec153f3f9eaa0e80184f4ddc9b3bd7f2e29c2ba | [
"Apache-2.0"
] | 1 | 2020-11-05T07:04:59.000Z | 2020-11-05T07:04:59.000Z | import spacy
import pandas as pd
import numpy as np
# Given tokens, find sentences containing a keyword from texts
def find_sents(tokens,keyword):
useful_sents=[]
for sent in tokens.sents:
bows=[token.text for token in sent]
for word in bows:
if ((keyword in word.lower()) & (sent n... | 38.520833 | 87 | 0.66901 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 631 | 0.341266 |
f6bccbdedb65751e2dbdc99d5d3f99b99bf35188 | 2,608 | py | Python | recipes/onedpl/all/conanfile.py | dvirtz/conan-center-index | 2e7a6337804325616f8d97e3a5b6f66cc72699cb | [
"MIT"
] | 562 | 2019-09-04T12:23:43.000Z | 2022-03-29T16:41:43.000Z | recipes/onedpl/all/conanfile.py | dvirtz/conan-center-index | 2e7a6337804325616f8d97e3a5b6f66cc72699cb | [
"MIT"
] | 9,799 | 2019-09-04T12:02:11.000Z | 2022-03-31T23:55:45.000Z | recipes/onedpl/all/conanfile.py | dvirtz/conan-center-index | 2e7a6337804325616f8d97e3a5b6f66cc72699cb | [
"MIT"
] | 1,126 | 2019-09-04T11:57:46.000Z | 2022-03-31T16:43:38.000Z | import os
from conans import ConanFile, CMake, tools
required_conan_version = ">=1.28.0"
class OneDplConan(ConanFile):
name = "onedpl"
description = ("OneDPL (Formerly Parallel STL) is an implementation of "
"the C++ standard library algorithms"
"with support for executi... | 39.515152 | 109 | 0.643788 | 2,515 | 0.96434 | 0 | 0 | 76 | 0.029141 | 0 | 0 | 870 | 0.333589 |
f6bd32f46d54d98cc09632370c1ad80e2609554b | 5,521 | py | Python | atvpolimorfismo.py | Patricia-Silva1/atividade | f294c52a8156a5b69972d0190deedccab6c5df2f | [
"MIT"
] | null | null | null | atvpolimorfismo.py | Patricia-Silva1/atividade | f294c52a8156a5b69972d0190deedccab6c5df2f | [
"MIT"
] | null | null | null | atvpolimorfismo.py | Patricia-Silva1/atividade | f294c52a8156a5b69972d0190deedccab6c5df2f | [
"MIT"
] | null | null | null | class Atletas:
def _init_(self,nome,idade,pontuacao):
self.nome = nome
self.idade = idade
self.pontuacao = pontuacao
class Amador(Atletas):
def _init_(self, nome, idade, pontuacao):
super()._init_(nome, idade, pontuacao)
self.amador = True
self.profissional = Fa... | 34.080247 | 106 | 0.649158 | 5,485 | 0.992401 | 0 | 0 | 0 | 0 | 0 | 0 | 363 | 0.065678 |
f6be3f33c5cbe03b07efac65c5537f50b908734b | 573 | py | Python | grouper/ctl/base.py | aneeq009/merou | 7a87b43aaf64244932fa460842132a2d9329e704 | [
"Apache-2.0"
] | 58 | 2017-05-26T06:46:24.000Z | 2022-03-25T20:55:51.000Z | grouper/ctl/base.py | aneeq009/merou | 7a87b43aaf64244932fa460842132a2d9329e704 | [
"Apache-2.0"
] | 74 | 2017-06-16T17:48:37.000Z | 2022-03-28T23:09:54.000Z | grouper/ctl/base.py | aneeq009/merou | 7a87b43aaf64244932fa460842132a2d9329e704 | [
"Apache-2.0"
] | 43 | 2017-05-20T22:11:51.000Z | 2022-03-25T00:24:56.000Z | from abc import ABCMeta, abstractmethod
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from argparse import ArgumentParser, Namespace
class CtlCommand(metaclass=ABCMeta):
"""Implements a subcommand of grouper-ctl."""
@staticmethod
@abstractmethod
def add_arguments(parser):
# type: (A... | 24.913043 | 72 | 0.666667 | 427 | 0.745201 | 0 | 0 | 329 | 0.574171 | 0 | 0 | 208 | 0.363002 |
f6c144a6777f88e0431ff780adf19960dca5e7ab | 6,798 | py | Python | noysim/geo.py | bertdecoensel/noysim | 0f45958093e3db453db8be6edc54f4cb1e119be0 | [
"MIT"
] | 1 | 2016-06-12T08:27:58.000Z | 2016-06-12T08:27:58.000Z | noysim/geo.py | bertdecoensel/noysim | 0f45958093e3db453db8be6edc54f4cb1e119be0 | [
"MIT"
] | null | null | null | noysim/geo.py | bertdecoensel/noysim | 0f45958093e3db453db8be6edc54f4cb1e119be0 | [
"MIT"
] | 1 | 2019-01-16T13:16:56.000Z | 2019-01-16T13:16:56.000Z | # Noysim -- Noise simulation tools for Aimsun.
# Copyright (c) 2010-2011 by Bert De Coensel, Ghent University & Griffith University.
#
# Basic geometry functions and classes
import numpy
import pylab
EPSILON = 10e-12 # smallest difference for points/directions
#-----------------------------------------... | 32.84058 | 115 | 0.529126 | 3,703 | 0.544719 | 0 | 0 | 0 | 0 | 0 | 0 | 2,866 | 0.421595 |
f6c1d658392020e0d6f57aed9f80cf163700273d | 197 | py | Python | aa.py | ani37/Hello-world | db3998f9ce110b145c48eda401c607acc726cd2c | [
"MIT"
] | null | null | null | aa.py | ani37/Hello-world | db3998f9ce110b145c48eda401c607acc726cd2c | [
"MIT"
] | null | null | null | aa.py | ani37/Hello-world | db3998f9ce110b145c48eda401c607acc726cd2c | [
"MIT"
] | 1 | 2018-10-27T10:14:24.000Z | 2018-10-27T10:14:24.000Z | MAX = 100000
MOD = pwo(10, 9) + 7
dp = [1 for in xrange(MAX)]
for i in xrange(7, MAX):
dp[i] = (dp[i - 1] + dp[i - 7]) % MOD
n = input()
for i in xrange(n):
k = input()
print dp[k]
| 16.416667 | 39 | 0.502538 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f6c25e843d1f45408a584bccb97be735f0255735 | 17,651 | py | Python | pyrometheus/codegen/python.py | pyrometheus/pyrometheus | 9cfb6fb404173c132d1a92439cce0e4ed10d1406 | [
"MIT"
] | 7 | 2021-12-29T18:17:49.000Z | 2022-01-10T09:53:09.000Z | pyrometheus/codegen/python.py | pyrometheus/pyrometheus | 9cfb6fb404173c132d1a92439cce0e4ed10d1406 | [
"MIT"
] | 3 | 2022-02-06T01:22:09.000Z | 2022-03-16T15:20:16.000Z | pyrometheus/codegen/python.py | pyrometheus/pyrometheus | 9cfb6fb404173c132d1a92439cce0e4ed10d1406 | [
"MIT"
] | null | null | null | """
Python code generation
----------------------
.. autofunction:: gen_thermochem_code
.. autofunction:: get_thermochem_class
"""
__copyright__ = """
Copyright (C) 2020 Esteban Cisneros
Copyright (C) 2020 Andreas Kloeckner
"""
__license__ = """
Permission is hereby granted, free of charge, to any person obtaining... | 35.372745 | 89 | 0.622798 | 1,189 | 0.067362 | 0 | 0 | 0 | 0 | 0 | 0 | 15,121 | 0.856665 |
f6c294247659dfe928a49c1fe3981150196bea4a | 1,107 | py | Python | foxwall_api/urls.py | umtdemr/foxwall | 7854806774486bed1895c114f14398cacc90449c | [
"MIT"
] | null | null | null | foxwall_api/urls.py | umtdemr/foxwall | 7854806774486bed1895c114f14398cacc90449c | [
"MIT"
] | null | null | null | foxwall_api/urls.py | umtdemr/foxwall | 7854806774486bed1895c114f14398cacc90449c | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from drf_spectacular.views import (
SpectacularAPIView,
SpectacularRedocView,
SpectacularSwaggerView
)
urlpatterns = [
path('admin/', admin.site.urls),
... | 26.357143 | 69 | 0.650407 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 190 | 0.171635 |
f6c4ba56f91f92449ed57ea8aedac277928e66b9 | 3,025 | py | Python | python/dash_tools/staticdownloader.py | jainsat/media-tools | 1f457d3a84dc3e1c8a5461774ebd45bcbb2eefb4 | [
"BSD-3-Clause"
] | 1 | 2021-04-26T06:34:08.000Z | 2021-04-26T06:34:08.000Z | python/dash_tools/staticdownloader.py | jainsat/media-tools | 1f457d3a84dc3e1c8a5461774ebd45bcbb2eefb4 | [
"BSD-3-Clause"
] | null | null | null | python/dash_tools/staticdownloader.py | jainsat/media-tools | 1f457d3a84dc3e1c8a5461774ebd45bcbb2eefb4 | [
"BSD-3-Clause"
] | 1 | 2020-05-18T22:08:07.000Z | 2020-05-18T22:08:07.000Z | #!/usr/bin/env python
import os
from common import fetch_file
import staticmpdparser
import client
import json
import pdb
def download(options, mpd_url=None, mpd_str=None, base_url=None, base_dst=""):
"Download MPD if url specified and then start downloading segments."
if mpd_url:
# First download the ... | 43.84058 | 180 | 0.669421 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 993 | 0.328264 |
f6c60cbb47c6eb49ed0c025ad7108cd872063833 | 303 | py | Python | Python/Delta/Delta.py | jankupczyk/Proste-Programy-PY | 96d932a5869e71861de89422caf1329f9edcd5f3 | [
"MIT"
] | 1 | 2021-06-28T15:53:51.000Z | 2021-06-28T15:53:51.000Z | Python/Delta/Delta.py | jankupczyk/Proste-Programy-PY | 96d932a5869e71861de89422caf1329f9edcd5f3 | [
"MIT"
] | null | null | null | Python/Delta/Delta.py | jankupczyk/Proste-Programy-PY | 96d932a5869e71861de89422caf1329f9edcd5f3 | [
"MIT"
] | null | null | null | # Oblicza delte
a = int(input("Podaj [a]:"))
b = int(input("Podaj [b]:"))
c = int(input("Podaj [c]:"))
d = b**2-4*a*c
if d > 0:
print("2 rozwiązania")
elif d == 0:
print("1 rozwiązanie")
else:
print("0 rozwiązań")
for i in range():
if i != 0:
print(i, end=" ")
| 17.823529 | 29 | 0.49505 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 102 | 0.332248 |
f6c771f2f38897991f6c87629ffcfa7268ef1620 | 142 | py | Python | mealie/db/mongo/user_models.py | stevenroh/mealie | ba111073d652a2f34aea8324d0bce4203de34127 | [
"MIT"
] | null | null | null | mealie/db/mongo/user_models.py | stevenroh/mealie | ba111073d652a2f34aea8324d0bce4203de34127 | [
"MIT"
] | 1 | 2021-01-25T18:49:10.000Z | 2021-01-25T18:49:10.000Z | mealie/db/mongo/user_models.py | stevenroh/mealie | ba111073d652a2f34aea8324d0bce4203de34127 | [
"MIT"
] | null | null | null |
# import mongoengine
# class User(mongoengine.Document):
# username: mongoengine.EmailField()
# password: mongoengine.ReferenceField | 23.666667 | 42 | 0.753521 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 137 | 0.964789 |
f6c87781dc296b3f3f472139665bb2dcb047df30 | 2,005 | py | Python | common/xrd-ui-tests-python/tests/xroad_global_groups_tests/XroadMemberRemoveFromGlobalGroup.py | nordic-institute/X-Road-tests | e030661a0ad8ceab74dd8122b751e88025a3474a | [
"MIT"
] | 1 | 2019-02-09T00:16:54.000Z | 2019-02-09T00:16:54.000Z | common/xrd-ui-tests-python/tests/xroad_global_groups_tests/XroadMemberRemoveFromGlobalGroup.py | nordic-institute/X-Road-tests | e030661a0ad8ceab74dd8122b751e88025a3474a | [
"MIT"
] | 1 | 2018-06-06T08:33:32.000Z | 2018-06-06T08:33:32.000Z | common/xrd-ui-tests-python/tests/xroad_global_groups_tests/XroadMemberRemoveFromGlobalGroup.py | nordic-institute/X-Road-tests | e030661a0ad8ceab74dd8122b751e88025a3474a | [
"MIT"
] | 3 | 2018-07-09T08:51:00.000Z | 2020-07-23T18:40:24.000Z | import unittest
from helpers import auditchecker, xroad
from main.maincontroller import MainController
from tests.xroad_global_groups_tests import global_groups_tests
class XroadMemberRemoveFromGlobalGroup(unittest.TestCase):
"""
SERVICE_38 Remove an X-Road Member from a Global Group
RIA URL: https://jir... | 43.586957 | 128 | 0.597007 | 1,834 | 0.914713 | 0 | 0 | 0 | 0 | 0 | 0 | 403 | 0.200998 |
f6c989f83c09341fd2147143a2556f4bde064d93 | 6,582 | py | Python | python/GafferTest/ExtensionAlgoTest.py | ddesmond/gaffer | 4f25df88103b7893df75865ea919fb035f92bac0 | [
"BSD-3-Clause"
] | 561 | 2016-10-18T04:30:48.000Z | 2022-03-30T06:52:04.000Z | python/GafferTest/ExtensionAlgoTest.py | ddesmond/gaffer | 4f25df88103b7893df75865ea919fb035f92bac0 | [
"BSD-3-Clause"
] | 1,828 | 2016-10-14T19:01:46.000Z | 2022-03-30T16:07:19.000Z | python/GafferTest/ExtensionAlgoTest.py | ddesmond/gaffer | 4f25df88103b7893df75865ea919fb035f92bac0 | [
"BSD-3-Clause"
] | 120 | 2016-10-18T15:19:13.000Z | 2021-12-20T16:28:23.000Z | ##########################################################################
#
# Copyright (c) 2019, John Haddon. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of so... | 41.1375 | 133 | 0.692343 | 4,657 | 0.707536 | 0 | 0 | 0 | 0 | 0 | 0 | 2,479 | 0.376633 |
f6c9dadb66ba06561d5aa2ae635083ad448267fc | 494 | py | Python | sentimental_analysis.py | akrakman/hackillinois | a4cfb107aefb95ff987ba159e3c7867a9d10ce9a | [
"MIT"
] | null | null | null | sentimental_analysis.py | akrakman/hackillinois | a4cfb107aefb95ff987ba159e3c7867a9d10ce9a | [
"MIT"
] | null | null | null | sentimental_analysis.py | akrakman/hackillinois | a4cfb107aefb95ff987ba159e3c7867a9d10ce9a | [
"MIT"
] | null | null | null | from numpy import average, number
from textblob import TextBlob
class ScaleUtilities:
average = 0
number = 0
def __init__(self, string, number):
self.string = string
def get_subjectivity_of(string):
polarity = TextBlob(string).sentiment.polarity * 5
number += 1
average... | 22.454545 | 58 | 0.605263 | 428 | 0.866397 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.022267 |
f6ca9a419c623fefe3a83ca6f9ace8a92f85a66b | 2,753 | py | Python | chibi_command/lxc/lxc.py | dem4ply/chibi_command | 49efc3070bdf40e5f27146379487345b1accd427 | [
"WTFPL"
] | null | null | null | chibi_command/lxc/lxc.py | dem4ply/chibi_command | 49efc3070bdf40e5f27146379487345b1accd427 | [
"WTFPL"
] | null | null | null | chibi_command/lxc/lxc.py | dem4ply/chibi_command | 49efc3070bdf40e5f27146379487345b1accd427 | [
"WTFPL"
] | null | null | null | from chibi.atlas import Chibi_atlas
from chibi_command import Command, Command_result
from chibi_hybrid.chibi_hybrid import Chibi_hybrid
__all__ = [ 'Create', 'Start', 'Stop', 'Attach', 'Info', 'Destroy' ]
class Info_result( Command_result ):
def parse_result( self ):
if not self:
return
... | 22.941667 | 79 | 0.54486 | 2,521 | 0.915728 | 0 | 0 | 873 | 0.317109 | 0 | 0 | 261 | 0.094806 |
f6cb67b13096c25131faa2e988c43e882cde21bd | 166,942 | py | Python | SeagateSenseCodes.py | ssmore98/siod | 5e1bd2691710ebaf49223d52894c2b08aa958112 | [
"Unlicense"
] | null | null | null | SeagateSenseCodes.py | ssmore98/siod | 5e1bd2691710ebaf49223d52894c2b08aa958112 | [
"Unlicense"
] | null | null | null | SeagateSenseCodes.py | ssmore98/siod | 5e1bd2691710ebaf49223d52894c2b08aa958112 | [
"Unlicense"
] | null | null | null | seagate_sense_codes = {0: {0: {0: {0: 'No error.', 'L1': 'No Sense', 'L2': 'No Sense'},
31: {0: 'No Specific FRU code.',
'L1': 'No Sense',
'L2': 'Logical unit transitioning to another power condition'}},
... | 82.481225 | 297 | 0.40913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 81,906 | 0.490625 |
f6ce2226b79bcac9a02e30d6519e6b995825bb27 | 263 | py | Python | kuwala/common/python_utils/src/time_utils.py | bmahmoudyan/kuwala | 7951ed49ac1c31c874a4446bb4661152c4d69c90 | [
"Apache-2.0"
] | 381 | 2021-04-08T13:04:57.000Z | 2022-03-29T09:49:46.000Z | kuwala/common/python_utils/src/time_utils.py | bmahmoudyan/kuwala | 7951ed49ac1c31c874a4446bb4661152c4d69c90 | [
"Apache-2.0"
] | 92 | 2021-04-20T12:28:40.000Z | 2022-03-30T17:55:36.000Z | kuwala/common/python_utils/src/time_utils.py | bmahmoudyan/kuwala | 7951ed49ac1c31c874a4446bb4661152c4d69c90 | [
"Apache-2.0"
] | 27 | 2021-04-26T17:52:32.000Z | 2022-03-21T19:36:34.000Z | import time
from time import sleep
def print_elapsed_time(exit_event):
start_time = time.time()
while True:
if exit_event.is_set():
break
print(f'Running for {round(time.time() - start_time)} s', end='\r')
sleep(1)
| 18.785714 | 75 | 0.608365 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 54 | 0.205323 |
f6cea815c5270561f528bdb9b5e87bb0ee900148 | 8,218 | py | Python | adapted/adapt_cli.py | GoodTown/IDeAS-ADAPT-Client-GUI | 3b124cc1f8a9f49d1e84a90e519f4927e43ac547 | [
"Apache-2.0"
] | null | null | null | adapted/adapt_cli.py | GoodTown/IDeAS-ADAPT-Client-GUI | 3b124cc1f8a9f49d1e84a90e519f4927e43ac547 | [
"Apache-2.0"
] | null | null | null | adapted/adapt_cli.py | GoodTown/IDeAS-ADAPT-Client-GUI | 3b124cc1f8a9f49d1e84a90e519f4927e43ac547 | [
"Apache-2.0"
] | null | null | null | """ Adapt Server
This module contains all the functionality necessary to
setup an Adapt Server node (not really).
Example
-------
python3 adapt_server.py -v ingest -s testfile.txt
"""
import filesystem
from filesystem import FSOperationError
import sys
import os
import argparse
import logging
from general import... | 27.577181 | 112 | 0.582015 | 5,633 | 0.685447 | 0 | 0 | 0 | 0 | 0 | 0 | 3,226 | 0.392553 |
f6cf6e5adafcafd146a24c56c7720f6b81509ba4 | 1,229 | py | Python | app/classes.py | lightness/EmploymentAgency | ab9e4d339621a00a3f20a9e0e5a645e445188df0 | [
"Unlicense"
] | 1 | 2019-06-13T14:38:54.000Z | 2019-06-13T14:38:54.000Z | app/classes.py | lightness/EmploymentAgency | ab9e4d339621a00a3f20a9e0e5a645e445188df0 | [
"Unlicense"
] | null | null | null | app/classes.py | lightness/EmploymentAgency | ab9e4d339621a00a3f20a9e0e5a645e445188df0 | [
"Unlicense"
] | null | null | null | from django.core.urlresolvers import reverse, reverse_lazy
ALERT_TYPES = ("alert-success", "alert-info", "alert-warning", "alert-danger",)
BUTTON_TYPES = ("btn-default", "btn-primary", "btn-success", "btn-warning", "btn-danger", "btn-info", "btn-link",)
DEFAULT_ALERT_TYPE = ALERT_TYPES[0]
DEFAULT_BUTTON_TYPE = BUTTON... | 35.114286 | 114 | 0.6607 | 897 | 0.729862 | 0 | 0 | 0 | 0 | 0 | 0 | 275 | 0.223759 |
f6cf8e1e4cf3c4ec76807ee6ba0e6caf90f8c85f | 316 | py | Python | classes/__init__.py | OmarThinks/MoRG | fecf78e15453b0efa9223cd5196fea8176cdfdf3 | [
"MIT"
] | null | null | null | classes/__init__.py | OmarThinks/MoRG | fecf78e15453b0efa9223cd5196fea8176cdfdf3 | [
"MIT"
] | null | null | null | classes/__init__.py | OmarThinks/MoRG | fecf78e15453b0efa9223cd5196fea8176cdfdf3 | [
"MIT"
] | null | null | null | """
try:
from .NotReceived import NotReceived
from .errors import *
from .classreader import *
from .checkpoint import Checkpoint
except Exception as e:
from NotReceived import NotReceived
from errors import *
from classreader import *
from checkpoint import Checkpoint
"""
"""
import sys
print(sys.path)""" | 19.75 | 37 | 0.759494 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 314 | 0.993671 |
f6cfba446c1b7d27bb2983b109b1c4404b84a1da | 2,084 | py | Python | project_name/project_name/settings/dev.py | aexeagmbh/django-project-template | 123c4bd8b79320b460677d8df42895600ad99393 | [
"MIT"
] | null | null | null | project_name/project_name/settings/dev.py | aexeagmbh/django-project-template | 123c4bd8b79320b460677d8df42895600ad99393 | [
"MIT"
] | null | null | null | project_name/project_name/settings/dev.py | aexeagmbh/django-project-template | 123c4bd8b79320b460677d8df42895600ad99393 | [
"MIT"
] | null | null | null | # coding=utf-8
"""Development settings and globals."""
from .base import *
# ######### DEBUG CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = True
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
TEMPLATE_DEBUG = DEBUG
# ######### END DEBUG CONFIGURATION... | 26.717949 | 93 | 0.712092 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,438 | 0.690019 |
f6d0cac352b221bf2f7870f056af97d65cf0f1e3 | 354 | py | Python | examples/unlock_antidotes.py | astitva22/Pixelate-22-Sample-Arena | 0bee7aea075d760e60456d38225bb3d6d1b68fed | [
"MIT"
] | 1 | 2022-03-01T20:39:25.000Z | 2022-03-01T20:39:25.000Z | examples/unlock_antidotes.py | astitva22/Pixelate-22-Sample-Arena | 0bee7aea075d760e60456d38225bb3d6d1b68fed | [
"MIT"
] | null | null | null | examples/unlock_antidotes.py | astitva22/Pixelate-22-Sample-Arena | 0bee7aea075d760e60456d38225bb3d6d1b68fed | [
"MIT"
] | 7 | 2022-03-01T20:37:14.000Z | 2022-03-09T06:27:38.000Z | import gym
import pixelate_arena
import time
import pybullet as p
import os
if __name__ == "__main__":
parent_path = os.path.dirname(os.getcwd())
os.chdir(parent_path)
env = gym.make("pixelate_arena-v0")
x=0
while True:
p.stepSimulation()
if x==10000:
env.unlock_antidote... | 20.823529 | 46 | 0.629944 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.081921 |
f6d1ef89f7ebaa279f2502614a3dee1d2c83c0b6 | 646 | py | Python | web_service/src/__init__.py | leckijakub/hipotap | 28fb20a165d0c50379828285efe18169e3ecce0f | [
"MIT"
] | null | null | null | web_service/src/__init__.py | leckijakub/hipotap | 28fb20a165d0c50379828285efe18169e3ecce0f | [
"MIT"
] | 4 | 2022-03-21T20:45:22.000Z | 2022-03-30T18:15:40.000Z | web_service/src/__init__.py | leckijakub/hipotap | 28fb20a165d0c50379828285efe18169e3ecce0f | [
"MIT"
] | null | null | null | from flask import Flask
def create_app():
app = Flask(__name__)
app.config["SECRET_KEY"] = "secret-key-goes-here"
# blueprint for auth routes in our app
from .blue_prints.auth import auth as auth_blueprint
app.register_blueprint(auth_blueprint)
# blueprint for non-auth parts of app
from... | 26.916667 | 62 | 0.756966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.168731 |
f6d2aef8cfd625f778e471dacf0dbcddb046931b | 3,005 | py | Python | BertLibrary/models/BertModel.py | PinkDraconian/Bert-as-a-Library | 04171b439b970e9c0f4384095f9275ae5520c177 | [
"MIT"
] | 13 | 2019-08-06T14:26:57.000Z | 2021-09-20T15:05:29.000Z | BertLibrary/models/BertModel.py | PinkDraconian/Bert-as-a-Library | 04171b439b970e9c0f4384095f9275ae5520c177 | [
"MIT"
] | 1 | 2020-03-10T17:04:40.000Z | 2021-01-12T13:53:41.000Z | BertLibrary/models/BertModel.py | PinkDraconian/Bert-as-a-Library | 04171b439b970e9c0f4384095f9275ae5520c177 | [
"MIT"
] | 2 | 2021-03-16T11:40:39.000Z | 2021-07-06T19:21:50.000Z | import os
import tensorflow as tf
from BertLibrary.bert_predictor import BertPredictor
from BertLibrary.bert_trainer import BertTrainer
from BertLibrary.bert_evaluator import BertEvaluator
from tensorflow.estimator import Estimator
from tensorflow.estimator import RunConfig
from BertLibrary.bert.run_classifier import... | 34.94186 | 79 | 0.674542 | 2,582 | 0.859235 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.028619 |
f6d33fa7bc783b74658c4fb6fc2bd1803a290e65 | 2,331 | py | Python | neuroscout/tasks/utils.py | effigies/BLiMP | 509192cd593e0a496a441b08ac0e2d48f9627d55 | [
"BSD-3-Clause"
] | null | null | null | neuroscout/tasks/utils.py | effigies/BLiMP | 509192cd593e0a496a441b08ac0e2d48f9627d55 | [
"BSD-3-Clause"
] | null | null | null | neuroscout/tasks/utils.py | effigies/BLiMP | 509192cd593e0a496a441b08ac0e2d48f9627d55 | [
"BSD-3-Clause"
] | null | null | null | """ utils """
import json
import tarfile
from ..utils.db import put_record, dump_pe
from ..models import Analysis, PredictorEvent
from ..schemas.analysis import AnalysisFullSchema, AnalysisResourcesSchema
def update_record(model, exception=None, **fields):
if exception is not None:
if 'traceback' in field... | 31.931507 | 78 | 0.661948 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 774 | 0.332046 |
f6d7d9fa5e972fea2d582789bda3bf36878133b2 | 3,673 | py | Python | test/priors/test_half_cauchy_prior.py | noamsgl/gpytorch | c3e3109c756ace47d82ff8b1f52b2d77748ff09c | [
"MIT"
] | 188 | 2017-06-09T20:42:18.000Z | 2018-02-15T11:17:09.000Z | test/priors/test_half_cauchy_prior.py | noamsgl/gpytorch | c3e3109c756ace47d82ff8b1f52b2d77748ff09c | [
"MIT"
] | 49 | 2017-07-18T02:55:17.000Z | 2018-02-15T21:23:42.000Z | test/priors/test_half_cauchy_prior.py | noamsgl/gpytorch | c3e3109c756ace47d82ff8b1f52b2d77748ff09c | [
"MIT"
] | 24 | 2017-07-12T17:29:52.000Z | 2018-02-15T19:25:07.000Z | #!/usr/bin/env python3
import unittest
import torch
from torch.distributions import HalfCauchy
from gpytorch.priors import HalfCauchyPrior
from gpytorch.test.utils import least_used_cuda_device
class TestHalfCauchyPrior(unittest.TestCase):
def test_half_cauchy_prior_to_gpu(self):
if torch.cuda.is_avail... | 41.738636 | 84 | 0.665941 | 3,424 | 0.932208 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.020964 |
f6d888c56b6287070e718e5217a701c20c0ee095 | 2,303 | py | Python | Tools/decrypt_ulog.py | lgarciaos/Firmware | 26dba1407bd1fbc65c23870a22fed904afba6347 | [
"BSD-3-Clause"
] | 4,224 | 2015-01-02T11:51:02.000Z | 2020-10-27T23:42:28.000Z | Tools/decrypt_ulog.py | lgarciaos/Firmware | 26dba1407bd1fbc65c23870a22fed904afba6347 | [
"BSD-3-Clause"
] | 11,736 | 2015-01-01T11:59:16.000Z | 2020-10-28T17:13:38.000Z | Tools/decrypt_ulog.py | lgarciaos/Firmware | 26dba1407bd1fbc65c23870a22fed904afba6347 | [
"BSD-3-Clause"
] | 11,850 | 2015-01-02T14:54:47.000Z | 2020-10-28T16:42:47.000Z | #!/usr/bin/env python3
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_OAEP
from Crypto.Cipher import ChaCha20
from Crypto.Hash import SHA256
import binascii
import argparse
#from pathlib import Path
import sys
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="""CLI tool t... | 36.555556 | 111 | 0.639601 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 647 | 0.280938 |
f6dbbab722f0cfd5200a6eb72ad30ddd4c962c78 | 1,179 | py | Python | modules/math-codes/modules/algebra/linear-equations/src/test_slope.py | drigols/Studies | 9c293156935b491ded24be6b511daac67fd43538 | [
"MIT"
] | 1 | 2020-09-06T22:17:19.000Z | 2020-09-06T22:17:19.000Z | modules/math-codes/modules/algebra/linear-equations/src/test_slope.py | drigols/Studies | 9c293156935b491ded24be6b511daac67fd43538 | [
"MIT"
] | null | null | null | modules/math-codes/modules/algebra/linear-equations/src/test_slope.py | drigols/Studies | 9c293156935b491ded24be6b511daac67fd43538 | [
"MIT"
] | null | null | null | from matplotlib import pyplot as plt
import pandas as pd
df = pd.DataFrame ({'x': range(-10, 10+1)})
df['y'] = (3*df['x'] - 4) / 2
plt.figure(figsize=(10, 10))
plt.plot(df.x, df.y, color="grey", marker = "o")
plt.xlabel('x')
plt.ylabel('y = 3*x -4 / 2')
plt.title("Relação Linear entre as variáveis x e y = 3*x -4/2")
... | 39.3 | 110 | 0.65564 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 688 | 0.573812 |
f6de464d223fc210c33e43316c1d71d4ff532268 | 190 | py | Python | website/message/admin.py | m3alamin/message-system | 44b50be1426236483ff14e2ea3ed76755ad81ea8 | [
"MIT"
] | 1 | 2018-07-23T10:51:20.000Z | 2018-07-23T10:51:20.000Z | website/message/admin.py | m3alamin/message-system | 44b50be1426236483ff14e2ea3ed76755ad81ea8 | [
"MIT"
] | null | null | null | website/message/admin.py | m3alamin/message-system | 44b50be1426236483ff14e2ea3ed76755ad81ea8 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Message, Reply, Reader
# Register your models here.
admin.site.register(Message)
admin.site.register(Reply)
admin.site.register(Reader)
| 23.75 | 42 | 0.805263 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.147368 |
f6ded3c6b708c223c654cc059475981aefcf7444 | 2,570 | py | Python | Authors' code/Few_shot_learning/models/selector.py | onicolini/zero-shot_knowledge_transfer | 9dd6d08eadb8243881f0fb8e9ac2d5653dd25229 | [
"MIT"
] | null | null | null | Authors' code/Few_shot_learning/models/selector.py | onicolini/zero-shot_knowledge_transfer | 9dd6d08eadb8243881f0fb8e9ac2d5653dd25229 | [
"MIT"
] | null | null | null | Authors' code/Few_shot_learning/models/selector.py | onicolini/zero-shot_knowledge_transfer | 9dd6d08eadb8243881f0fb8e9ac2d5653dd25229 | [
"MIT"
] | 1 | 2019-10-27T15:44:17.000Z | 2019-10-27T15:44:17.000Z | from models.lenet import *
from models.wresnet import *
import os
def select_model(dataset,
model_name,
pretrained=False,
pretrained_models_path=None):
if dataset in ['SVHN', 'CIFAR10', 'CINIC10', 'CIFAR100']:
n_classes = 100 if dataset == 'CIFAR100' else... | 38.939394 | 98 | 0.633463 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 420 | 0.163424 |
f6df43c8e47a8e2830e3c578575609c364fe0d3b | 4,818 | py | Python | navigator/auth/handlers.py | phenobarbital/navigator-api | 15a0336b570ec861bdcc9c225e6f1b5684900a9d | [
"Apache-2.0",
"BSD-3-Clause"
] | 10 | 2020-07-27T03:33:20.000Z | 2022-02-18T21:25:49.000Z | navigator/auth/handlers.py | phenobarbital/navigator-api | 15a0336b570ec861bdcc9c225e6f1b5684900a9d | [
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2020-09-07T15:20:54.000Z | 2021-05-28T00:56:45.000Z | navigator/auth/handlers.py | phenobarbital/navigator-api | 15a0336b570ec861bdcc9c225e6f1b5684900a9d | [
"Apache-2.0",
"BSD-3-Clause"
] | 3 | 2020-07-27T07:36:45.000Z | 2021-09-26T18:36:34.000Z | # -*- coding: utf-8 -*-
#!/usr/bin/env python3
import asyncio
import base64
import json
import os
import sys
from aiohttp import web
from navigator.conf import (
DEBUG,
SESSION_PREFIX,
SESSION_URL,
SESSION_KEY,
config
)
from navigator.handlers import nav_exception_handler
from navigator.exception... | 29.558282 | 84 | 0.527397 | 4,210 | 0.873807 | 0 | 0 | 0 | 0 | 4,112 | 0.853466 | 687 | 0.14259 |
f6e068263f9613c699cad7addbef56e8d591ae52 | 868 | py | Python | images.py | krutika-bhalla/Web-Scraping | 01169cc2d031b6d0353a1ff87b6d19d26d370af8 | [
"Apache-2.0"
] | null | null | null | images.py | krutika-bhalla/Web-Scraping | 01169cc2d031b6d0353a1ff87b6d19d26d370af8 | [
"Apache-2.0"
] | null | null | null | images.py | krutika-bhalla/Web-Scraping | 01169cc2d031b6d0353a1ff87b6d19d26d370af8 | [
"Apache-2.0"
] | null | null | null | from bs4 import BeautifulSoup
from PIL import Image
from io import BytesIO
import requests
import os
def start_search():
search = input("Enter Search Item: ")
params = {"q": search}
dir_name = search.replace(" ", "_").lower()
if not os.path.isdir(dir_name):
os.makedirs(dir_name)
r = req... | 25.529412 | 72 | 0.599078 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 141 | 0.162442 |
f6e0f69bab1cd6496a44232820ff0d043380ef43 | 12,822 | py | Python | repeat_cook_funcs.py | byu-imaal/dns-cookies-pam21 | a0e79a3538f2c32aa3f23d89b96ad1afe046d0f3 | [
"BSD-2-Clause"
] | null | null | null | repeat_cook_funcs.py | byu-imaal/dns-cookies-pam21 | a0e79a3538f2c32aa3f23d89b96ad1afe046d0f3 | [
"BSD-2-Clause"
] | null | null | null | repeat_cook_funcs.py | byu-imaal/dns-cookies-pam21 | a0e79a3538f2c32aa3f23d89b96ad1afe046d0f3 | [
"BSD-2-Clause"
] | null | null | null | """
Collection of functions for analyzing repeat cookie data
Designed to run a single function via CLI
"""
import argparse
import inspect
import json
import math
import subprocess
import sys
from collections import Counter
from collections import defaultdict
from shared.colors import color
from tqdm import tqdm
def... | 36.016854 | 115 | 0.522461 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,962 | 0.231009 |
f6e1f7647b60fef3a5175db89e79a4186e1503a5 | 816 | py | Python | data/count_office31.py | mo6zes/Reproducing-Deep-Fair-Clustering | 91f915436821eb05cdd021d3e9eb050a248fe993 | [
"Unlicense"
] | 4 | 2021-01-30T12:36:18.000Z | 2022-03-23T10:10:45.000Z | data/count_office31.py | mo6zes/Reproducing-Deep-Fair-Clustering | 91f915436821eb05cdd021d3e9eb050a248fe993 | [
"Unlicense"
] | 1 | 2021-11-05T09:16:36.000Z | 2021-11-05T15:27:25.000Z | data/count_office31.py | mo6zes/Reproducing-Deep-Fair-Clustering | 91f915436821eb05cdd021d3e9eb050a248fe993 | [
"Unlicense"
] | 1 | 2021-03-21T19:44:45.000Z | 2021-03-21T19:44:45.000Z | from office31 import office31
from office31 import download_and_extract_office31
from pathlib import Path
import os
#Hacky script to count how many images are in each folder/cluster in both sources
out_name = "./data/office31/office31_count.txt"
def count_items(src="amazon"):
file_open=open(out_name, "a")
labe... | 30.222222 | 81 | 0.634804 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 187 | 0.229167 |
f6e28a13700fedee22ada39a3fa8792554af7720 | 11,213 | py | Python | mm2s5/mm2s5.py | scottkirkwood/mm2s5 | 05160ead97b28a82e3d6f529672c8cd2067ff27c | [
"Apache-2.0"
] | null | null | null | mm2s5/mm2s5.py | scottkirkwood/mm2s5 | 05160ead97b28a82e3d6f529672c8cd2067ff27c | [
"Apache-2.0"
] | null | null | null | mm2s5/mm2s5.py | scottkirkwood/mm2s5 | 05160ead97b28a82e3d6f529672c8cd2067ff27c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: latin1 -*-
#
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 33.471642 | 116 | 0.605725 | 8,090 | 0.721484 | 0 | 0 | 0 | 0 | 0 | 0 | 6,064 | 0.540801 |
f6e2d912d61b57a1bc1a9fc88cfe7298ffc1b85b | 480 | py | Python | covid19sweden/__init__.py | martinbenes1996/covid19sweden | 100993e41c302ffd96fa39857dd8ddd21267f1ed | [
"MIT"
] | 1 | 2020-06-06T21:02:10.000Z | 2020-06-06T21:02:10.000Z | covid19sweden/__init__.py | martinbenes1996/covid19sweden | 100993e41c302ffd96fa39857dd8ddd21267f1ed | [
"MIT"
] | 1 | 2020-06-25T00:18:21.000Z | 2020-06-26T02:34:19.000Z | covid19sweden/__init__.py | martinbenes1996/covid19sweden | 100993e41c302ffd96fa39857dd8ddd21267f1ed | [
"MIT"
] | 1 | 2020-06-06T21:04:22.000Z | 2020-06-06T21:04:22.000Z | # -*- coding: utf-8 -*-
"""Webscraper for Swedish data.
Reference: https://www.scb.se/hitta-statistik/statistik-efter-amne/befolkning/befolkningens-sammansattning/befolkningsstatistik/pong/tabell-och-diagram/preliminar-statistik-over-doda/
Todo:
* caching
"""
import pkg_resources
from .main import *
from . impo... | 24 | 183 | 0.75625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 279 | 0.58125 |
f6e364a4d8935e2990712e28b098a07099b88272 | 395 | py | Python | public/ViPER/modules/head.py | severnake/ViPER | e788f73bfe894f7fd03081782c87778de38a8df2 | [
"MIT"
] | 23 | 2016-11-26T06:55:44.000Z | 2021-07-27T19:28:05.000Z | public/ViPER/modules/head.py | severnake/ViPER | e788f73bfe894f7fd03081782c87778de38a8df2 | [
"MIT"
] | 2 | 2021-03-11T04:35:03.000Z | 2021-05-11T22:03:33.000Z | public/ViPER/modules/head.py | severnake/ViPER | e788f73bfe894f7fd03081782c87778de38a8df2 | [
"MIT"
] | 7 | 2017-08-12T10:44:41.000Z | 2022-03-22T05:49:49.000Z | import requests
from termcolor.termcolor import colored, cprint
class header:
"""
Class for extracting headers
"""
def __init__(self):
pass
def get_headers(self, target):
req = requests.head(target)
req = req.headers
for i in... | 23.235294 | 60 | 0.531646 | 328 | 0.83038 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.156962 |
f6e4193df3aa52bc4f5ce439f49c5d54acb0e849 | 1,190 | py | Python | src/airflow_actionproject/callables/action.py | actionprojecteu/airflow-actionproject | 6518e73e5709ebce927e0b463b5e36d80194491c | [
"MIT"
] | null | null | null | src/airflow_actionproject/callables/action.py | actionprojecteu/airflow-actionproject | 6518e73e5709ebce927e0b463b5e36d80194491c | [
"MIT"
] | null | null | null | src/airflow_actionproject/callables/action.py | actionprojecteu/airflow-actionproject | 6518e73e5709ebce927e0b463b5e36d80194491c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# Copyright (c) 2021
#
# See the LICENSE file for details
# see the AUTHORS file for authors
# ----------------------------------------------------------------------
#--------------------
# System wide imports
# ----------... | 24.285714 | 122 | 0.512605 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 643 | 0.540336 |
f6e5c99d7184da2fbbd07b8e09ae981f7738a398 | 5,838 | py | Python | stp_raet/test/test_communication.py | ArtObr/indy-plenum | c568eefb0042b3ec3aec84e9241cb1b5df419365 | [
"Apache-2.0"
] | null | null | null | stp_raet/test/test_communication.py | ArtObr/indy-plenum | c568eefb0042b3ec3aec84e9241cb1b5df419365 | [
"Apache-2.0"
] | null | null | null | stp_raet/test/test_communication.py | ArtObr/indy-plenum | c568eefb0042b3ec3aec84e9241cb1b5df419365 | [
"Apache-2.0"
] | null | null | null | from ioflo.base.consoling import getConsole
from stp_core.crypto.nacl_wrappers import Signer as NaclSigner, Privateer
from raet.raeting import AutoMode, Acceptance
from raet.road.estating import RemoteEstate
from raet.road.stacking import RoadStack
from stp_raet.test.helper import handshake, sendMsgs, cleanup, getRemo... | 29.484848 | 73 | 0.577595 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 388 | 0.066461 |
f6e6fadb85ba7a38ec23f0b2f12e5f4cc663ece0 | 14,393 | py | Python | RedYoshiBot/server/CTGP7ServerDatabase.py | mariohackandglitch/RedYoshiBot | 436d4d22b75673f1b10e1ac478e797f8544e388d | [
"Apache-2.0"
] | 4 | 2018-03-12T17:02:57.000Z | 2021-03-26T18:44:21.000Z | RedYoshiBot/server/CTGP7ServerDatabase.py | mariohackandglitch/RedYoshiBot | 436d4d22b75673f1b10e1ac478e797f8544e388d | [
"Apache-2.0"
] | null | null | null | RedYoshiBot/server/CTGP7ServerDatabase.py | mariohackandglitch/RedYoshiBot | 436d4d22b75673f1b10e1ac478e797f8544e388d | [
"Apache-2.0"
] | null | null | null | import threading
import sqlite3
from enum import Enum
import time
import datetime
from ..CTGP7Defines import CTGP7Defines
current_time_min = lambda: int(round(time.time() / 60))
class ConsoleMessageType(Enum):
SINGLE_MESSAGE = 0
TIMED_MESSAGE = 1
SINGLE_KICKMESSAGE = 2
TIMED_KICKMESSAGE = 3
class CT... | 39.111413 | 155 | 0.556868 | 14,210 | 0.987285 | 0 | 0 | 0 | 0 | 0 | 0 | 2,462 | 0.171055 |
f6e7d67ad18d6db3685d0903fe664237cb666d24 | 299 | py | Python | autographql/apps.py | ehsu0407/django-autographql | 95147501b2e542ee2a4b7903546665fb84d5115e | [
"MIT"
] | 1 | 2021-11-20T03:52:51.000Z | 2021-11-20T03:52:51.000Z | autographql/apps.py | ehsu0407/django-autographql | 95147501b2e542ee2a4b7903546665fb84d5115e | [
"MIT"
] | null | null | null | autographql/apps.py | ehsu0407/django-autographql | 95147501b2e542ee2a4b7903546665fb84d5115e | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class AutographqlConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'autographql'
def ready(self):
import autographql.converters
import autographql.filters.converters
import autographql.monkeypatch
| 24.916667 | 56 | 0.735786 | 262 | 0.876254 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.147157 |
f6ea9490bd3489c0fea713bbe5332c6ac5c901a3 | 982 | py | Python | FD_wave_example.py | miaoziemm/Seismic_Forward_Engine | 163a589254389772820744452e406f947e29e085 | [
"MIT"
] | 1 | 2021-11-05T13:17:02.000Z | 2021-11-05T13:17:02.000Z | FD_wave_example.py | miaoziemm/Seismic_Forward_Engine | 163a589254389772820744452e406f947e29e085 | [
"MIT"
] | null | null | null | FD_wave_example.py | miaoziemm/Seismic_Forward_Engine | 163a589254389772820744452e406f947e29e085 | [
"MIT"
] | null | null | null | import taichi as ti
from FD_wave.wave_module_2d4d import wave
from FD_wave.receiver_module import receiver
import Visualization.SFE_visual as vis
ti.init(arch=ti.gpu)
frame = 1
c = ti.field(dtype=ti.f32, shape=(600,600))
c_s = ti.field(dtype=ti.f32, shape=(1000, 1000))
wave_cs = wave(300, 400, 600, 600, 10.0, 10.0, 1... | 23.380952 | 69 | 0.704684 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.037678 |
f6eaf7e5bb35cf8e7466e792deece88534700ba4 | 3,425 | py | Python | ENGR 102.py | jemmypotter/Python | c8fc5c49c5289dc0598c93eef4cfbcb5701c2b32 | [
"bzip2-1.0.6"
] | null | null | null | ENGR 102.py | jemmypotter/Python | c8fc5c49c5289dc0598c93eef4cfbcb5701c2b32 | [
"bzip2-1.0.6"
] | null | null | null | ENGR 102.py | jemmypotter/Python | c8fc5c49c5289dc0598c93eef4cfbcb5701c2b32 | [
"bzip2-1.0.6"
] | null | null | null | critics={'Lisa Rose': {'Lady in the Water': 2.5, 'Snakes on a Plane': 3.5, 'Just My Luck': 3.0, 'Superman Returns': 3.5, 'You, Me and Dupree': 2.5, 'The Night Listener': 3.0},
'Gene Seymour': {'Lady in the Water': 3.0, 'Snakes on a Plane': 3.5, 'Just My Luck': 1.5, 'Superman Returns': 5.0, 'The Night Listener'... | 38.483146 | 191 | 0.637664 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,743 | 0.508905 |
f6ec3cd9ae8ae57a80bd9ab3c56c8873b3588b8f | 110 | py | Python | src/applications/core/admin.py | sleonvaz/rindus-task | fc3fc1454d5b29bb8df6194a86612ad6462ee08c | [
"MIT"
] | null | null | null | src/applications/core/admin.py | sleonvaz/rindus-task | fc3fc1454d5b29bb8df6194a86612ad6462ee08c | [
"MIT"
] | null | null | null | src/applications/core/admin.py | sleonvaz/rindus-task | fc3fc1454d5b29bb8df6194a86612ad6462ee08c | [
"MIT"
] | null | null | null | from django.contrib import admin
from applications.core.models import Clients
admin.site.register(Clients)
| 15.714286 | 44 | 0.827273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f6ecd0aafed1e62eb63756a09afea3562d8bef9e | 99 | py | Python | api/newsCategory/apps.py | jhonatantft/ckl | 8a0d533922fa091ac5f2dbe50caee3920ec2b90d | [
"MIT"
] | null | null | null | api/newsCategory/apps.py | jhonatantft/ckl | 8a0d533922fa091ac5f2dbe50caee3920ec2b90d | [
"MIT"
] | 2 | 2021-05-08T21:26:43.000Z | 2022-02-19T00:26:17.000Z | api/newsCategory/apps.py | jhonatantft/ckl | 8a0d533922fa091ac5f2dbe50caee3920ec2b90d | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class NewscategoryConfig(AppConfig):
name = 'newsCategory'
| 16.5 | 36 | 0.777778 | 62 | 0.626263 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.141414 |
f6ed93bc4cbe3c8880ecf1e3e007e8f0fa6018d9 | 77,326 | py | Python | cfdm/data/data.py | NCAS-CMS/cfdm | 8e6ac54c1a2966ad5c07cd51ef609005a1fd70cc | [
"MIT"
] | 22 | 2018-11-07T18:16:22.000Z | 2022-03-16T16:05:21.000Z | cfdm/data/data.py | davidhassell/cfdm | 8e6ac54c1a2966ad5c07cd51ef609005a1fd70cc | [
"MIT"
] | 119 | 2019-04-08T08:00:24.000Z | 2022-03-22T08:21:22.000Z | cfdm/data/data.py | davidhassell/cfdm | 8e6ac54c1a2966ad5c07cd51ef609005a1fd70cc | [
"MIT"
] | 8 | 2019-04-09T10:12:26.000Z | 2021-07-22T02:41:15.000Z | import itertools
import logging
import netCDF4
import numpy
from .. import core
from ..constants import masked as cfdm_masked
from ..decorators import (
_inplace_enabled,
_inplace_enabled_define_and_cleanup,
_manage_log_level_via_verbosity,
)
from ..functions import abspath
from ..mixin.container import C... | 28.692393 | 116 | 0.477239 | 76,883 | 0.994271 | 1,226 | 0.015855 | 33,647 | 0.435132 | 0 | 0 | 48,821 | 0.631366 |
f6efdf1a1e2ca3bc054152966617543b747082cb | 9,458 | py | Python | alipay/aop/api/domain/ArInvoiceReceiptQueryOpenApiDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/ArInvoiceReceiptQueryOpenApiDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/ArInvoiceReceiptQueryOpenApiDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.MultiCurrencyMoneyOpenApi import MultiCurrencyMoneyOpenApi
from alipay.aop.api.domain.MultiCurrencyMoneyOpenApi import MultiCurrencyMoneyOpenApi
from alipay.aop.api.domain.MultiCurr... | 32.279863 | 86 | 0.591774 | 9,083 | 0.960351 | 0 | 0 | 4,336 | 0.458448 | 0 | 0 | 1,084 | 0.114612 |
f6f037d5301de39668019ccf1a2625274e621032 | 14,051 | py | Python | Model/lookalike-model/tests/pipeline/test_main_clean.py | rangaswamymr/blue-marlin | 2ab39a6af01e14f40386f640fe087aeb284b5524 | [
"Apache-2.0"
] | null | null | null | Model/lookalike-model/tests/pipeline/test_main_clean.py | rangaswamymr/blue-marlin | 2ab39a6af01e14f40386f640fe087aeb284b5524 | [
"Apache-2.0"
] | null | null | null | Model/lookalike-model/tests/pipeline/test_main_clean.py | rangaswamymr/blue-marlin | 2ab39a6af01e14f40386f640fe087aeb284b5524 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may... | 44.46519 | 142 | 0.647925 | 12,853 | 0.914739 | 0 | 0 | 0 | 0 | 0 | 0 | 4,814 | 0.342609 |
f6f09641b35ebd494e5edb18cd6f3b2853290c77 | 8,663 | py | Python | src/nemo/datasets.py | thomasjo/nemo-redux | c4196c0d99633dca011d60008be0cb7667c348b7 | [
"MIT"
] | null | null | null | src/nemo/datasets.py | thomasjo/nemo-redux | c4196c0d99633dca011d60008be0cb7667c348b7 | [
"MIT"
] | null | null | null | src/nemo/datasets.py | thomasjo/nemo-redux | c4196c0d99633dca011d60008be0cb7667c348b7 | [
"MIT"
] | null | null | null | import json
from pathlib import Path
import numpy as np
import torch
import torchvision as vision
import yaml
from PIL import Image
from sklearn.model_selection import train_test_split
from torch.utils.data import DataLoader, Dataset, SubsetRandomSampler
from torch.utils.data.dataset import Subset
from torchvision.d... | 34.931452 | 136 | 0.669399 | 4,131 | 0.476856 | 0 | 0 | 0 | 0 | 0 | 0 | 1,041 | 0.120166 |
f6f1181b9d63e4b1e1908205531b518c477401af | 6,255 | py | Python | ever2text/converter.py | nicholaskuechler/ever2text | dc21ca86b691f2ee793ce273035341e55374448e | [
"MIT"
] | 13 | 2016-12-16T18:57:53.000Z | 2021-04-30T22:14:45.000Z | ever2text/converter.py | nicholaskuechler/ever2text | dc21ca86b691f2ee793ce273035341e55374448e | [
"MIT"
] | 2 | 2017-01-21T19:46:10.000Z | 2020-11-16T11:03:27.000Z | ever2text/converter.py | nicholaskuechler/ever2text | dc21ca86b691f2ee793ce273035341e55374448e | [
"MIT"
] | 3 | 2016-09-16T02:10:04.000Z | 2021-04-30T22:16:08.000Z | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from builtins import open
from builtins import str
import json
import os
import sys
from dateutil.parser import parse
from html2text import HTML2Te... | 40.096154 | 79 | 0.566107 | 5,877 | 0.939418 | 0 | 0 | 0 | 0 | 0 | 0 | 999 | 0.159687 |
f6f2d88af8b19a330bc99f6628aa11a5d1619261 | 4,055 | pyw | Python | randomopgavergui.pyw | jensjacobt/randomopgaver | 24a2b032bcd1bccd90dface0365feff419819d58 | [
"MIT"
] | null | null | null | randomopgavergui.pyw | jensjacobt/randomopgaver | 24a2b032bcd1bccd90dface0365feff419819d58 | [
"MIT"
] | null | null | null | randomopgavergui.pyw | jensjacobt/randomopgaver | 24a2b032bcd1bccd90dface0365feff419819d58 | [
"MIT"
] | null | null | null | # The GUI of Randomopgaver
# -*- coding: utf-8 -*-
import os
import tkinter
from tkinter import *
from tkinter import scrolledtext
from tkinter import messagebox
from tkinter.filedialog import askopenfilename
from tkinter.filedialog import askdirectory
from filegenerator import create_randomopgaver
global doc_file, ta... | 28.356643 | 87 | 0.641184 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 836 | 0.205962 |
f6f3a7cb2f1f74649f7392db25208bff5b69d6eb | 8,325 | py | Python | reb/plain.py | workingenius/reb | ebc597d95f79d6f2d89a401940f24d7a2c4274f0 | [
"MIT"
] | 1 | 2021-04-27T04:03:21.000Z | 2021-04-27T04:03:21.000Z | reb/plain.py | workingenius/reb | ebc597d95f79d6f2d89a401940f24d7a2c4274f0 | [
"MIT"
] | null | null | null | reb/plain.py | workingenius/reb | ebc597d95f79d6f2d89a401940f24d7a2c4274f0 | [
"MIT"
] | null | null | null | """Reb plain Implementation"""
from typing import Iterator, List, Optional
from functools import singledispatch
from .parse_tree import PTNode, VirtualPTNode
from .pattern import (
Finder,
Pattern,
PText, PAnyChar, PTag, PNotInChars, PInChars,
PAny, PRepeat, PAdjacent,
PExample,
PStarting, PEn... | 33.3 | 106 | 0.599399 | 7,112 | 0.854294 | 4,116 | 0.494414 | 4,498 | 0.5403 | 0 | 0 | 415 | 0.04985 |
f6f524b71daa4dbc98c31cccc8cb7fce4eac5538 | 881 | py | Python | AdversarialAttack/SST/gen_pos.py | thunlp/DictSKB | ac7c328db4d25cf6bdc3c64aefa9b773854ba525 | [
"MIT"
] | 2 | 2021-11-21T13:42:06.000Z | 2022-01-11T05:33:43.000Z | AdversarialAttack/SST/gen_pos.py | thunlp/DictSKB | ac7c328db4d25cf6bdc3c64aefa9b773854ba525 | [
"MIT"
] | null | null | null | AdversarialAttack/SST/gen_pos.py | thunlp/DictSKB | ac7c328db4d25cf6bdc3c64aefa9b773854ba525 | [
"MIT"
] | 3 | 2021-09-14T06:40:51.000Z | 2021-12-23T09:41:22.000Z | import pickle
with open('./aux_files/dataset_13837.pkl','rb') as fp:
dataset=pickle.load(fp)
from nltk.tag import StanfordPOSTagger
jar = 'stanford-postagger-full-2018-10-16/stanford-postagger.jar'
model = 'stanford-postagger-full-2018-10-16/models/english-left3words-distsim.tagger'
pos_tagger = StanfordPOSTagger... | 32.62963 | 85 | 0.76277 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 218 | 0.247446 |
f6f688d8a5f12a882c462a7d43fb10da64d6fa89 | 5,009 | py | Python | PiCam/picam.py | alexwtz/pciam | 7e90dd22a8e97e41fb480cb85cdf95cefd2d974e | [
"MIT"
] | null | null | null | PiCam/picam.py | alexwtz/pciam | 7e90dd22a8e97e41fb480cb85cdf95cefd2d974e | [
"MIT"
] | null | null | null | PiCam/picam.py | alexwtz/pciam | 7e90dd22a8e97e41fb480cb85cdf95cefd2d974e | [
"MIT"
] | null | null | null | import serial
import time
import atexit
from functools import wraps
from flask import Flask, render_template, request, Response
app = Flask(__name__)
def check_auth(username, password):
"""This function is called to check if a username /
password combination is valid.
"""
return username == 'admin' and... | 28.787356 | 84 | 0.609503 | 0 | 0 | 0 | 0 | 2,796 | 0.558195 | 0 | 0 | 1,663 | 0.332002 |
f6f935040202abf72d1e7c6636a1df716225a0b0 | 7,834 | py | Python | simplemfa/helpers.py | mwhawkins/django-simple-mfa | 58b5188473a776f5fcebda9843e2147123dce59f | [
"MIT"
] | 3 | 2020-07-17T09:14:09.000Z | 2020-12-15T09:26:56.000Z | simplemfa/helpers.py | mwhawkins/django-simple-mfa | 58b5188473a776f5fcebda9843e2147123dce59f | [
"MIT"
] | 1 | 2020-11-25T10:41:02.000Z | 2020-11-25T10:41:02.000Z | simplemfa/helpers.py | mwhawkins/django-simple-mfa | 58b5188473a776f5fcebda9843e2147123dce59f | [
"MIT"
] | 2 | 2020-11-25T10:47:20.000Z | 2021-11-04T15:41:21.000Z | from django import template
from django.core.mail import send_mail
from django.template.loader import get_template
from django.conf import settings
from django.shortcuts import reverse
from twilio.twiml.voice_response import VoiceResponse, Say
from twilio.rest import Client
from django.utils import timezone
def get_c... | 34.359649 | 111 | 0.616033 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,168 | 0.149094 |
f6fad38b5c6177592103f90dc3306807b04807de | 443 | py | Python | wsgi/djkatta/cabshare/urls.py | ashishnitinpatil/mukatta | dfec9cd65d08f6b7d76b686fae3605986b31b80d | [
"BSD-2-Clause-FreeBSD",
"PSF-2.0",
"Apache-2.0",
"MIT",
"BSD-3-Clause"
] | null | null | null | wsgi/djkatta/cabshare/urls.py | ashishnitinpatil/mukatta | dfec9cd65d08f6b7d76b686fae3605986b31b80d | [
"BSD-2-Clause-FreeBSD",
"PSF-2.0",
"Apache-2.0",
"MIT",
"BSD-3-Clause"
] | null | null | null | wsgi/djkatta/cabshare/urls.py | ashishnitinpatil/mukatta | dfec9cd65d08f6b7d76b686fae3605986b31b80d | [
"BSD-2-Clause-FreeBSD",
"PSF-2.0",
"Apache-2.0",
"MIT",
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import patterns, url
# App specific URL patterns
urlpatterns = patterns("djkatta.cabshare.views",
# post new req
url(r'new_post/$', 'new_post', name='new_post'),
# view posts by the user
url(r'my_posts/$', 'my_posts', name='my_posts'),
# modify old req
url(r'(?P<post_id... | 24.611111 | 59 | 0.611738 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 267 | 0.602709 |
f6fadb640578e054ade2f1f7f1755e165fd9b8bc | 3,035 | py | Python | GANs/WGAN/train.py | sushant097/Deep-Learning-Paper-Scratch-Implementation | e1e5cbd0f1f10dd9ed0673e8a0506f33c94f6725 | [
"MIT"
] | 4 | 2022-01-07T14:48:13.000Z | 2022-02-24T10:10:24.000Z | GANs/WGAN/train.py | sushant097/Deep-Learning-Paper-Scratch-Implementation | e1e5cbd0f1f10dd9ed0673e8a0506f33c94f6725 | [
"MIT"
] | null | null | null | GANs/WGAN/train.py | sushant097/Deep-Learning-Paper-Scratch-Implementation | e1e5cbd0f1f10dd9ed0673e8a0506f33c94f6725 | [
"MIT"
] | null | null | null | import torch
from torchvision.utils import save_image
from torchvision import datasets
from torchvision.transforms import transforms
import os
from model import Generator, Discriminator, init_weights, denorm_image
from config import *
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# create a d... | 28.364486 | 105 | 0.632619 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 780 | 0.257002 |
f6fb3b9906e2a0e989b1efec9cae5a714bfdf274 | 5,969 | py | Python | examples/mpi_based_distributed_execution/MODIS_Aggregation_MPI.py | big-data-lab-umbc/MODIS_Aggregation | 43b79c44b0f62affdc3befb9c089a296e840893a | [
"Apache-2.0"
] | 3 | 2021-05-02T10:11:19.000Z | 2021-12-24T22:00:10.000Z | examples/mpi_based_distributed_execution/MODIS_Aggregation_MPI.py | big-data-lab-umbc/MODIS_Aggregation | 43b79c44b0f62affdc3befb9c089a296e840893a | [
"Apache-2.0"
] | 5 | 2019-11-26T21:09:35.000Z | 2022-03-03T19:23:25.000Z | examples/mpi_based_distributed_execution/MODIS_Aggregation_MPI.py | big-data-lab-umbc/MODIS_Aggregation | 43b79c44b0f62affdc3befb9c089a296e840893a | [
"Apache-2.0"
] | 4 | 2020-08-18T14:26:01.000Z | 2021-10-20T12:42:14.000Z | #!/usr/bin/env python
# coding:utf8
# -*- coding: utf-8 -*-
"""
Main Program: Run MODIS AGGREGATION IN MPI WITH FLEXIBLE STATISTICS
Created on 2020
@author: Jianyu Zheng (Email: jzheng3@umbc.edu)
"""
import os
import sys
import h5py
import timeit
import random
import calendar
import numpy as np
import pandas as pd
f... | 37.074534 | 171 | 0.68638 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,561 | 0.261518 |
f6fb899f61687e61712367affa88a5603ababa3e | 5,631 | py | Python | repack_img.py | Illidanz/VampireTranslation | d57e88d0dcd7d5d1c9dcaaff2d6e5ea098d842b6 | [
"MIT"
] | 3 | 2021-12-02T07:12:21.000Z | 2022-02-16T04:26:21.000Z | repack_img.py | Illidanz/VampireTranslation | d57e88d0dcd7d5d1c9dcaaff2d6e5ea098d842b6 | [
"MIT"
] | 1 | 2021-12-07T17:54:58.000Z | 2021-12-07T17:54:59.000Z | repack_img.py | Illidanz/VampireTranslation | d57e88d0dcd7d5d1c9dcaaff2d6e5ea098d842b6 | [
"MIT"
] | null | null | null | import os
from hacktools import common, nitro
import images
def run(data):
infolder = data + "extract_BMP/"
outfolder = data + "repack_BMP/"
workfolder = data + "work_IMG/"
common.logMessage("Repacking IMG from", workfolder, "...")
files = common.getFiles(infolder, ".IMG")
lastpals = []
t... | 45.780488 | 161 | 0.485171 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 609 | 0.108151 |
f6fbcb6ce3a18a3d1314248bf99c7af9b4df0da9 | 1,741 | py | Python | src/waffle/downloader.py | JasonMWhite/congenial-waffle | 281513b4f566c43a3c326947c88ea53d60cc5fc3 | [
"MIT"
] | null | null | null | src/waffle/downloader.py | JasonMWhite/congenial-waffle | 281513b4f566c43a3c326947c88ea53d60cc5fc3 | [
"MIT"
] | 1 | 2021-12-13T19:53:44.000Z | 2021-12-13T19:53:44.000Z | src/waffle/downloader.py | JasonMWhite/congenial-waffle | 281513b4f566c43a3c326947c88ea53d60cc5fc3 | [
"MIT"
] | null | null | null | import typing
from lxml import html
import requests
from dataclasses import dataclass
from waffle.logger import LOG
from waffle.law_url import LawUrl
@dataclass
class _FollowResults:
path: LawUrl
links: typing.List[LawUrl]
@dataclass
class DownloadResults:
path: LawUrl
content: str
class Downloade... | 30.54386 | 117 | 0.643308 | 1,560 | 0.896037 | 508 | 0.291786 | 957 | 0.549684 | 0 | 0 | 140 | 0.080414 |
f6fc765a80d06b184d48204318ac290f02c0daa1 | 756 | py | Python | ozone-framework-python-server/people/urls.py | aamduka/ozone | 3fdbf232f5ea70661204a632e45310ca9d374973 | [
"Apache-2.0"
] | 6 | 2020-02-21T22:06:31.000Z | 2020-12-08T10:48:07.000Z | ozone-framework-python-server/people/urls.py | aamduka/ozone | 3fdbf232f5ea70661204a632e45310ca9d374973 | [
"Apache-2.0"
] | 12 | 2019-12-26T17:38:40.000Z | 2022-02-10T14:15:55.000Z | ozone-framework-python-server/people/urls.py | aamduka/ozone | 3fdbf232f5ea70661204a632e45310ca9d374973 | [
"Apache-2.0"
] | 4 | 2019-08-05T13:22:29.000Z | 2021-07-21T16:04:03.000Z | from django.urls import path
from rest_framework import routers
from .administration.views import AdministrationOfUserAPIView
from .views import PersonDetailView, PersonDashboardsWidgetsView, PersonWidgetDefinitionViewSet, PersonStackViewset
router = routers.SimpleRouter()
router.register(r'admin/users', Administrati... | 42 | 115 | 0.806878 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 172 | 0.227513 |
f6fe49f2caf10f8c0e6901c9acd0a24f3952045a | 3,899 | py | Python | 00_CoinMarketCap_PullCryptoStats.py | prajwal-skdlove/CryptoCurrencyAnalysis | fd3dcc54c4e36722bb44405f16a4064452d83920 | [
"MIT"
] | 1 | 2021-12-05T19:37:58.000Z | 2021-12-05T19:37:58.000Z | 00_CoinMarketCap_PullCryptoStats.py | prajwal-skdlove/CryptoCurrencyAnalysis | fd3dcc54c4e36722bb44405f16a4064452d83920 | [
"MIT"
] | null | null | null | 00_CoinMarketCap_PullCryptoStats.py | prajwal-skdlove/CryptoCurrencyAnalysis | fd3dcc54c4e36722bb44405f16a4064452d83920 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''This code pulls all coins from Conmarketcap.com
It stores it in a pandas dataframe'''
from bs4 import BeautifulSoup
import requests
import pandas as pd
import json
import collections
def coinmarketcap_coins(n):
'''This function pulls all the cryptocurrencies and its relat... | 43.808989 | 97 | 0.611952 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,223 | 0.570146 |
f6fee774c750964c054daa25511fd9a0fd69478c | 903 | py | Python | api/views/logs/resources.py | bdeprez/machinaris | 233d6e60ae6526b999fb660d9b87a895341de96f | [
"Apache-2.0"
] | null | null | null | api/views/logs/resources.py | bdeprez/machinaris | 233d6e60ae6526b999fb660d9b87a895341de96f | [
"Apache-2.0"
] | null | null | null | api/views/logs/resources.py | bdeprez/machinaris | 233d6e60ae6526b999fb660d9b87a895341de96f | [
"Apache-2.0"
] | null | null | null | import json
import re
import traceback
from flask import request, make_response, abort
from flask.views import MethodView
from api import app
from api.extensions.api import Blueprint
from api.commands import log_parser
blp = Blueprint(
'Log',
__name__,
url_prefix='/logs',
description="Operations on ... | 23.763158 | 127 | 0.687708 | 527 | 0.58361 | 0 | 0 | 565 | 0.625692 | 0 | 0 | 160 | 0.177187 |
f6fefb9a652b9bf59e233f2f5acfc1fedff02992 | 11,550 | py | Python | train_hg_seqnet.py | middleprince/fashionAi | c512936b4983c2fb093008f06e04753180af0a90 | [
"Apache-2.0"
] | 316 | 2018-06-01T16:21:21.000Z | 2022-03-22T03:25:20.000Z | train_hg_seqnet.py | middleprince/fashionAi | c512936b4983c2fb093008f06e04753180af0a90 | [
"Apache-2.0"
] | 8 | 2018-06-02T07:07:49.000Z | 2019-07-11T06:55:43.000Z | train_hg_seqnet.py | middleprince/fashionAi | c512936b4983c2fb093008f06e04753180af0a90 | [
"Apache-2.0"
] | 91 | 2018-06-01T17:12:21.000Z | 2022-03-19T06:54:34.000Z | # Copyright 2018 Changan Wang
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, so... | 39.690722 | 153 | 0.638874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,976 | 0.517403 |
f6ff14536113c487785785cf8713fabd87f3391a | 34,386 | py | Python | W_conv.py | jeongjuns/Control_yolact | dad800dcc1aa0b02445e302256b4508b7688880c | [
"MIT"
] | null | null | null | W_conv.py | jeongjuns/Control_yolact | dad800dcc1aa0b02445e302256b4508b7688880c | [
"MIT"
] | null | null | null | W_conv.py | jeongjuns/Control_yolact | dad800dcc1aa0b02445e302256b4508b7688880c | [
"MIT"
] | null | null | null |
import math
import warnings
import torch
from torch import Tensor
from torch.nn.parameter import Parameter
import torch.nn.functional as F
import torch.nn.init as init
from torch.nn.modules.module import Module
from torch.nn.modules.utils import _single, _pair, _triple, _reverse_repeat_tuple
from torch.autograd impor... | 34.351648 | 120 | 0.529663 | 32,825 | 0.954493 | 0 | 0 | 0 | 0 | 0 | 0 | 2,374 | 0.069032 |
1001525132d1016af0a89108b37f0bd4e52435e6 | 2,246 | py | Python | instapyper.py | rriehle/instapyper | 0a2e01793a971ccaa47dac1cc32b6d6209ad7d77 | [
"MIT"
] | 1 | 2017-09-27T19:17:18.000Z | 2017-09-27T19:17:18.000Z | instapyper.py | rriehle/instapyper | 0a2e01793a971ccaa47dac1cc32b6d6209ad7d77 | [
"MIT"
] | null | null | null | instapyper.py | rriehle/instapyper | 0a2e01793a971ccaa47dac1cc32b6d6209ad7d77 | [
"MIT"
] | null | null | null | # encoding: utf-8
import requests
from requests_oauthlib import OAuth1
class Instapyper:
# Not sure this dict is necessary or even useful
status_codes = {
200: "Ok",
201: "URL successfully added",
400: "Bad Request",
401: "Unauthorized",
403: "Invalid username or pass... | 25.522727 | 93 | 0.547195 | 2,171 | 0.966607 | 0 | 0 | 0 | 0 | 0 | 0 | 813 | 0.361977 |
10016d95225710db6712e5ab81370184805de3d2 | 4,732 | py | Python | tests/parser/test_mamanger.py | Sungup/sungup-utils | 6ef3f9d65aaf5d9f11c683356823ead174c5793b | [
"MIT"
] | null | null | null | tests/parser/test_mamanger.py | Sungup/sungup-utils | 6ef3f9d65aaf5d9f11c683356823ead174c5793b | [
"MIT"
] | null | null | null | tests/parser/test_mamanger.py | Sungup/sungup-utils | 6ef3f9d65aaf5d9f11c683356823ead174c5793b | [
"MIT"
] | null | null | null | import os
import re
import string
from collections import namedtuple, defaultdict
from tests import utils
from tests.parser import ParserTestCase
from sglove.parser.exception import *
from sglove.parser import _OptionManager
class TestOptionManager(ParserTestCase):
__TEST_COUNT = 50
def __test_invalid_nami... | 37.259843 | 79 | 0.595097 | 4,502 | 0.951395 | 0 | 0 | 0 | 0 | 0 | 0 | 431 | 0.091082 |
1003316b1ac47d4a3dfc26a90b05ca7e035820e5 | 6,333 | py | Python | gitea_api/models/internal_tracker.py | awalker125/gitea-api | 2dea0493d4b6a92d6e63a7284afb2c80cbf35cf7 | [
"MIT"
] | null | null | null | gitea_api/models/internal_tracker.py | awalker125/gitea-api | 2dea0493d4b6a92d6e63a7284afb2c80cbf35cf7 | [
"MIT"
] | null | null | null | gitea_api/models/internal_tracker.py | awalker125/gitea-api | 2dea0493d4b6a92d6e63a7284afb2c80cbf35cf7 | [
"MIT"
] | 1 | 2022-01-27T14:12:40.000Z | 2022-01-27T14:12:40.000Z | # coding: utf-8
"""
Gitea API.
This documentation describes the Gitea API. # noqa: E501
OpenAPI spec version: 1.15.3
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from gitea_api.configuration import Configuration
clas... | 34.796703 | 160 | 0.657666 | 6,016 | 0.949945 | 0 | 0 | 2,627 | 0.414811 | 0 | 0 | 2,934 | 0.463288 |
1003df02d14e656596e0f0e0b34b98df84ded585 | 2,501 | py | Python | tests/unit/flow/test_flow_except.py | gvvynplaine/jina | 1441f40f849d22c21b8397527960b4307ff0d5a3 | [
"Apache-2.0"
] | 1 | 2021-09-07T05:10:24.000Z | 2021-09-07T05:10:24.000Z | tests/unit/flow/test_flow_except.py | gvvynplaine/jina | 1441f40f849d22c21b8397527960b4307ff0d5a3 | [
"Apache-2.0"
] | null | null | null | tests/unit/flow/test_flow_except.py | gvvynplaine/jina | 1441f40f849d22c21b8397527960b4307ff0d5a3 | [
"Apache-2.0"
] | null | null | null | import unittest
from jina.executors.crafters import BaseCrafter
from jina.flow import Flow
from jina.proto import jina_pb2
from tests import JinaTestCase
class DummyCrafter(BaseCrafter):
def craft(self, *args, **kwargs):
return 1 / 0
class FlowExceptTestCase(JinaTestCase):
def test_bad_flow(self):... | 35.225352 | 94 | 0.608956 | 2,291 | 0.916034 | 0 | 0 | 0 | 0 | 0 | 0 | 498 | 0.19912 |
10058581bb6dbcacbc9e94927325b0900f7918f8 | 5,734 | py | Python | Operator/server.py | ale9412/Operator | 353f873878018503015113cd26592ac7bf08bfc8 | [
"MIT"
] | null | null | null | Operator/server.py | ale9412/Operator | 353f873878018503015113cd26592ac7bf08bfc8 | [
"MIT"
] | null | null | null | Operator/server.py | ale9412/Operator | 353f873878018503015113cd26592ac7bf08bfc8 | [
"MIT"
] | null | null | null | import socketserver
import multiprocessing as mp
from shunting_yard_algorithm import evaluate
class MyTCPHandler(socketserver.BaseRequestHandler):
"""
The request handler class for our server.
It is instantiated once per connection to the server, and must
override the handle() method to implement com... | 40.380282 | 120 | 0.647367 | 3,988 | 0.695501 | 0 | 0 | 0 | 0 | 0 | 0 | 2,982 | 0.520056 |
10075c04799cef519143b0f99e086bee68012233 | 16,539 | py | Python | cbh.py | jensengroup/fragreact | 2a9113505fd469e934eec6c6ac8200de67f65dd6 | [
"MIT"
] | 2 | 2018-10-01T00:40:12.000Z | 2020-01-16T15:02:51.000Z | cbh.py | jensengroup/fragreact | 2a9113505fd469e934eec6c6ac8200de67f65dd6 | [
"MIT"
] | null | null | null | cbh.py | jensengroup/fragreact | 2a9113505fd469e934eec6c6ac8200de67f65dd6 | [
"MIT"
] | 1 | 2021-04-24T10:53:30.000Z | 2021-04-24T10:53:30.000Z | #!/usr/bin/env python
import numpy as np
import re
from rdkit import Chem
from rdkit.Chem import rdMolDescriptors
from itertools import combinations
import copy
def print_smiles(smiles_list, human=False):
smiles_dict = count_smiles(smiles_list)
keys = smiles_dict.keys()
keys.sort()
out = []
fo... | 23.459574 | 98 | 0.587279 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,675 | 0.161739 |
1007feef6144ad7d9a7ba9c6b18904b4be96b045 | 2,075 | py | Python | dlchord2/parser/accidentals_parser.py | anime-song/DLChord-2 | 10487b4c96ae1606974f52e08c0cb2e11940f5d0 | [
"MIT"
] | null | null | null | dlchord2/parser/accidentals_parser.py | anime-song/DLChord-2 | 10487b4c96ae1606974f52e08c0cb2e11940f5d0 | [
"MIT"
] | null | null | null | dlchord2/parser/accidentals_parser.py | anime-song/DLChord-2 | 10487b4c96ae1606974f52e08c0cb2e11940f5d0 | [
"MIT"
] | null | null | null | from enum import Enum
from dlchord2.const import ACCIDENTALS_SHARP, ACCIDENTALS_FLAT
from dlchord2.exceptions.accidentals_exceptions import AccidentalsParseError
class AccidentalsType(Enum):
"""
調号の種類を表す列挙体
"""
NONE = 0
SHARP = 1
FLAT = 2
class AccidentalsParseData(object):
"""
調号を解... | 23.314607 | 76 | 0.619277 | 2,207 | 0.927701 | 0 | 0 | 623 | 0.261875 | 0 | 0 | 853 | 0.358554 |
1009bd5fe50141546afdc9a3c7299fc08481285f | 6,144 | py | Python | tests/unit/utils/test_instantiate.py | schiotz/nequip | c343ce25ecfeb64f6df92e96022e673a7714e3a6 | [
"MIT"
] | 153 | 2021-06-20T20:12:01.000Z | 2022-03-31T13:57:45.000Z | tests/unit/utils/test_instantiate.py | schiotz/nequip | c343ce25ecfeb64f6df92e96022e673a7714e3a6 | [
"MIT"
] | 25 | 2021-06-17T16:00:16.000Z | 2022-03-29T07:04:00.000Z | tests/unit/utils/test_instantiate.py | schiotz/nequip | c343ce25ecfeb64f6df92e96022e673a7714e3a6 | [
"MIT"
] | 25 | 2021-06-21T22:25:22.000Z | 2022-03-30T04:39:46.000Z | import pytest
import yaml
from nequip.utils import instantiate
simple_default = {"b": 1, "d": 31}
class SimpleExample:
def __init__(self, a, b=simple_default["b"], d=simple_default["d"]):
self.a = a
self.b = b
self.d = d
nested_default = {"d": 37}
class NestedExample:
def __init... | 26.144681 | 87 | 0.60791 | 789 | 0.128418 | 0 | 0 | 2,603 | 0.423665 | 0 | 0 | 681 | 0.11084 |
100e849d7eae3f15a11b1eea05ca93095bd322e6 | 9,160 | py | Python | models/wct2.py | momenator/spine_uda | 3d6c9cd2431bcdb084d7603d0cc3101163b0902c | [
"MIT"
] | 1 | 2020-12-15T08:46:39.000Z | 2020-12-15T08:46:39.000Z | models/wct2.py | momenator/spine_uda | 3d6c9cd2431bcdb084d7603d0cc3101163b0902c | [
"MIT"
] | null | null | null | models/wct2.py | momenator/spine_uda | 3d6c9cd2431bcdb084d7603d0cc3101163b0902c | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import os
import torch.optim as optim
import torch.optim.lr_scheduler as lr_scheduler
from .modules import WavePool, WaveUnpool, ImagePool, NLayerDiscriminator
from utils.metrics import compute_dice_metric
from utils.losses import DiceLoss
import numpy as np
class WaveEncoder(nn.Mod... | 34.179104 | 96 | 0.569978 | 8,842 | 0.965284 | 0 | 0 | 0 | 0 | 0 | 0 | 2,254 | 0.24607 |
100fae21e6b69b129ccd390195c8899a6d2d0807 | 1,188 | py | Python | api/public/urls.py | marinimau/wayne_django_rest | eeaef0b9e3544c0f678b7f66684ac56f5ef90759 | [
"MIT"
] | null | null | null | api/public/urls.py | marinimau/wayne_django_rest | eeaef0b9e3544c0f678b7f66684ac56f5ef90759 | [
"MIT"
] | 5 | 2021-04-08T20:43:19.000Z | 2021-09-22T19:42:03.000Z | api/public/urls.py | marinimau/wayne_django_rest | eeaef0b9e3544c0f678b7f66684ac56f5ef90759 | [
"MIT"
] | null | null | null | #
# copyright © 2020 - all rights reserved
# Created at: 03/11/20
# By: mauromarini
# License: MIT
# Repository: https://github.com/marinimau/wayne_django_rest
# Credits: @marinimau (https://github.com/marinimau)
#
from django.urls import path
from api.user import views as user_views
from api.social impor... | 45.692308 | 120 | 0.591751 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 671 | 0.56434 |
1012347db29b0e7431b7d278a87031a83ffc0e9a | 419 | py | Python | mentoring_app/migrations/0007_mentoringprogram_is_published.py | ShouravAhmed/Luminar | f80c621028f81ef7f657592560e4c95fd8e91699 | [
"MIT"
] | null | null | null | mentoring_app/migrations/0007_mentoringprogram_is_published.py | ShouravAhmed/Luminar | f80c621028f81ef7f657592560e4c95fd8e91699 | [
"MIT"
] | null | null | null | mentoring_app/migrations/0007_mentoringprogram_is_published.py | ShouravAhmed/Luminar | f80c621028f81ef7f657592560e4c95fd8e91699 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-12-28 05:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mentoring_app', '0006_mentoringprogram_is_archived'),
]
operations = [
migrations.AddField(
model_name='mentoringprogram',
... | 22.052632 | 63 | 0.630072 | 326 | 0.778043 | 0 | 0 | 0 | 0 | 0 | 0 | 129 | 0.307876 |
1013ecf59bc70ab9d79d68b8649884c783a2823a | 6,613 | py | Python | csdaily/data.py | qytz/cn_stock_daily | 93950c7be37f6717d1448e0f6c0f93947fdcafce | [
"Apache-2.0"
] | 1 | 2018-05-29T09:13:05.000Z | 2018-05-29T09:13:05.000Z | csdaily/data.py | qytz/cn_stock_daily | 93950c7be37f6717d1448e0f6c0f93947fdcafce | [
"Apache-2.0"
] | 1 | 2018-04-14T02:04:39.000Z | 2018-04-14T06:30:36.000Z | csdaily/data.py | qytz/csdaily | 93950c7be37f6717d1448e0f6c0f93947fdcafce | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This file is part of CSDaily.
# Copyright (C) 2018-present qytz <hhhhhf@foxmail.com>
#
# 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/l... | 36.535912 | 97 | 0.556782 | 5,949 | 0.860304 | 0 | 0 | 5,977 | 0.864353 | 5,669 | 0.819812 | 3,013 | 0.435719 |
101537d3feef1a4dbbd2ef2f6aa60048ff8c781a | 1,265 | py | Python | RecordSpider/beian.py | wjcIvan/oschinaLearning | 4f172b068ab00063b4b0e6217d031e0dcb48f492 | [
"MIT"
] | 1 | 2020-07-29T07:00:32.000Z | 2020-07-29T07:00:32.000Z | RecordSpider/beian.py | wjcIvan/oschinaLearning | 4f172b068ab00063b4b0e6217d031e0dcb48f492 | [
"MIT"
] | 4 | 2020-07-30T08:44:04.000Z | 2020-07-30T08:45:14.000Z | RecordSpider/beian.py | wjcIvan/oschinaLearning | 4f172b068ab00063b4b0e6217d031e0dcb48f492 | [
"MIT"
] | null | null | null | # coding:utf-8
import sys
from PyQt5 import QtWidgets
import window
import recordSpider
class MainWindow(object):
def __init__(self):
app = QtWidgets.QApplication(sys.argv)
MainWindow = QtWidgets.QMainWindow()
self.ui = window.Ui_MainWindow()
self.ui.setupUi(MainWindow)
M... | 30.119048 | 62 | 0.618972 | 1,150 | 0.892164 | 0 | 0 | 0 | 0 | 0 | 0 | 130 | 0.100853 |
10182dc2e471f5a0f909b79006a7d28c08916403 | 509 | py | Python | querybook/server/datasources_socketio/connect.py | shivammmmm/querybook | 71263eb7db79e56235ea752f2cf3339ca9b3a092 | [
"Apache-2.0"
] | 1,144 | 2021-03-30T05:06:16.000Z | 2022-03-31T10:40:31.000Z | querybook/server/datasources_socketio/connect.py | shivammmmm/querybook | 71263eb7db79e56235ea752f2cf3339ca9b3a092 | [
"Apache-2.0"
] | 593 | 2021-07-01T10:34:25.000Z | 2022-03-31T23:24:40.000Z | querybook/server/datasources_socketio/connect.py | shivammmmm/querybook | 71263eb7db79e56235ea752f2cf3339ca9b3a092 | [
"Apache-2.0"
] | 113 | 2021-03-30T00:07:20.000Z | 2022-03-31T07:18:43.000Z | from flask_login import current_user
from flask_socketio import ConnectionRefusedError
from app.flask_app import socketio
from const.data_doc import DATA_DOC_NAMESPACE
from const.query_execution import QUERY_EXECUTION_NAMESPACE
def connect():
if not current_user.is_authenticated:
raise ConnectionRefusedE... | 31.8125 | 87 | 0.827112 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.131631 |
1019beaa3b165ae0d0bc9fd6b35ceadc23df9167 | 587 | py | Python | python/alibiexplainer/tests/utils.py | owennewo/kfserving | 89f73c87525b8e06ea799f69f2979c4ad272fcb3 | [
"Apache-2.0"
] | 2 | 2020-10-06T09:20:22.000Z | 2022-01-18T15:04:57.000Z | python/alibiexplainer/tests/utils.py | owennewo/kfserving | 89f73c87525b8e06ea799f69f2979c4ad272fcb3 | [
"Apache-2.0"
] | 15 | 2020-11-13T19:05:44.000Z | 2022-03-12T00:49:45.000Z | python/alibiexplainer/tests/utils.py | owennewo/kfserving | 89f73c87525b8e06ea799f69f2979c4ad272fcb3 | [
"Apache-2.0"
] | 2 | 2020-10-06T09:24:31.000Z | 2020-12-20T15:10:56.000Z | import kfserving
from typing import List, Union
import numpy as np
class Predictor(): # pylint:disable=too-few-public-methods
def __init__(self, clf: kfserving.KFModel):
self.clf = clf
def predict_fn(self, arr: Union[np.ndarray, List]) -> np.ndarray:
instances = []
for req_data in arr... | 30.894737 | 69 | 0.623509 | 517 | 0.88075 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 0.107325 |
101a10a127a273feed1bef4adf70f1e5a220a9a0 | 2,186 | py | Python | relations/views.py | Mansouroopi/DRF | 057c6d77c012386734deee9c9076264c005d0221 | [
"MIT"
] | null | null | null | relations/views.py | Mansouroopi/DRF | 057c6d77c012386734deee9c9076264c005d0221 | [
"MIT"
] | null | null | null | relations/views.py | Mansouroopi/DRF | 057c6d77c012386734deee9c9076264c005d0221 | [
"MIT"
] | null | null | null |
from snippets.permissions import IsOwnerOrReadOnly
from rest_framework import permissions
from rest_framework import viewsets
from .models import Album, Track, Student, Module
from .serializers import AlbumSerializer, StudentSerializer, ModuleSerializer, TrackSerializer
from rest_framework.response import Response
... | 31.681159 | 94 | 0.663769 | 1,856 | 0.849039 | 0 | 0 | 0 | 0 | 0 | 0 | 780 | 0.356816 |
101a86c8d6437538ab20c4171397229b83fd18f9 | 184,923 | py | Python | venv/lib/python3.7/site-packages/torch/testing/_internal/common_methods_invocations.py | GOOGLE-M/SGC | 78ad8d02b80808302e38559e2d0f430f66a809bd | [
"MIT"
] | null | null | null | venv/lib/python3.7/site-packages/torch/testing/_internal/common_methods_invocations.py | GOOGLE-M/SGC | 78ad8d02b80808302e38559e2d0f430f66a809bd | [
"MIT"
] | null | null | null | venv/lib/python3.7/site-packages/torch/testing/_internal/common_methods_invocations.py | GOOGLE-M/SGC | 78ad8d02b80808302e38559e2d0f430f66a809bd | [
"MIT"
] | null | null | null | from functools import reduce, wraps, partial
from itertools import product
from operator import mul, itemgetter
import collections
import operator
import torch
import numpy as np
from torch._six import inf, istuple
from torch.autograd import Variable
import collections.abc
from typing import List, Tuple, Dict, Any
f... | 52.639624 | 129 | 0.546352 | 20,401 | 0.110322 | 0 | 0 | 128 | 0.000692 | 0 | 0 | 42,592 | 0.230323 |
101a8bad1d0114bbb79e68c96eb4371364f2ff83 | 771 | py | Python | examples/python/numpy_functions.py | benedicteb/FYS2140-Resources | 31b572e455c3ac8dff868db903f18687e363f1bf | [
"MIT"
] | null | null | null | examples/python/numpy_functions.py | benedicteb/FYS2140-Resources | 31b572e455c3ac8dff868db903f18687e363f1bf | [
"MIT"
] | null | null | null | examples/python/numpy_functions.py | benedicteb/FYS2140-Resources | 31b572e455c3ac8dff868db903f18687e363f1bf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Created on Mon 2 Dec 2013
Script viser import av funksjoner fra numpy og bruk av noen.
@author Benedicte Emilie Braekken
"""
from numpy import *
print 'e^1 =', exp( 1 ) # Eksponentialfunksjonen
print 'cos(pi) =', cos( pi ) # Cosinus
print 'sqrt(4) =', sqrt... | 28.555556 | 72 | 0.553826 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 548 | 0.710765 |
63d7715ef7d63209fb2728483a0c7ddffb7d19ed | 4,261 | py | Python | homeassistant/components/automation/sun.py | instantchow/home-assistant | 6797365d4fd74328a0c9e961f652cfb37f48bc7d | [
"MIT"
] | null | null | null | homeassistant/components/automation/sun.py | instantchow/home-assistant | 6797365d4fd74328a0c9e961f652cfb37f48bc7d | [
"MIT"
] | null | null | null | homeassistant/components/automation/sun.py | instantchow/home-assistant | 6797365d4fd74328a0c9e961f652cfb37f48bc7d | [
"MIT"
] | null | null | null | """
Offer sun based automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/components/automation/#sun-trigger
"""
import logging
from datetime import timedelta
import homeassistant.util.dt as dt_util
from homeassistant.components import sun
from h... | 28.986395 | 78 | 0.633185 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 921 | 0.216146 |
63d787602e9b9889274c51a3e392c5c66b98f987 | 4,821 | py | Python | docs/source/conf.py | tanlin2013/Tensor-Network | 5b9a48076db57fc16f874ee453fe1ededdc5ebf6 | [
"Apache-2.0"
] | 1 | 2020-09-07T21:35:34.000Z | 2020-09-07T21:35:34.000Z | docs/source/conf.py | tanlin2013/Tensor-Network | 5b9a48076db57fc16f874ee453fe1ededdc5ebf6 | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | tanlin2013/Tensor-Network | 5b9a48076db57fc16f874ee453fe1ededdc5ebf6 | [
"Apache-2.0"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 30.512658 | 95 | 0.669156 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,920 | 0.813109 |
63d7cdd21b779bfe16c82daade1776e92192157f | 1,963 | py | Python | tests/modules/organizations/test_models.py | karenc/houston | 4eaaaf11d61394035e34b55bb847ea7eb4099c61 | [
"Apache-2.0"
] | null | null | null | tests/modules/organizations/test_models.py | karenc/houston | 4eaaaf11d61394035e34b55bb847ea7eb4099c61 | [
"Apache-2.0"
] | 2 | 2021-03-16T20:28:06.000Z | 2021-03-29T15:54:11.000Z | tests/modules/organizations/test_models.py | karenc/houston | 4eaaaf11d61394035e34b55bb847ea7eb4099c61 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# pylint: disable=invalid-name,missing-docstring
import sqlalchemy
import logging
def test_Organization_add_members(db, temp_user): # pylint: disable=unused-argument
from app.modules.organizations.models import (
Organization,
OrganizationUserMembershipEnrollment,
)
... | 32.716667 | 85 | 0.745288 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 191 | 0.0973 |