hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b6c72c3319173095665e5e2d07e06402986c26c7 | 1,090 | py | Python | app/core/migrations/0001_initial.py | clicktravel-gary/tk-django-recipe-exercise | 0cb0e69bb840cb0f54aa3b37a050e135a011bbbe | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | clicktravel-gary/tk-django-recipe-exercise | 0cb0e69bb840cb0f54aa3b37a050e135a011bbbe | [
"MIT"
] | 1 | 2021-09-17T15:24:01.000Z | 2021-09-17T15:24:01.000Z | app/core/migrations/0001_initial.py | clicktravel-gary/tk-django-recipe-exercise | 0cb0e69bb840cb0f54aa3b37a050e135a011bbbe | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2021-09-15 08:08
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Ingredient',
fields=[
... | 30.277778 | 127 | 0.573394 |
fb01b5d77a142d5508a80af3516203708dd71301 | 15,838 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20190401/express_route_circuit.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20190401/express_route_circuit.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20190401/express_route_circuit.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 52.270627 | 2,607 | 0.690807 |
3e76ae4f9fdac15be7f4b2694a63ee68989ccf4f | 1,602 | py | Python | resource/github_login.py | gabrielhicks/flask-online-store | 43b96522126c84ecb4c646ce7282ddd7f7d933fa | [
"MIT"
] | null | null | null | resource/github_login.py | gabrielhicks/flask-online-store | 43b96522126c84ecb4c646ce7282ddd7f7d933fa | [
"MIT"
] | null | null | null | resource/github_login.py | gabrielhicks/flask-online-store | 43b96522126c84ecb4c646ce7282ddd7f7d933fa | [
"MIT"
] | null | null | null | from flask import g,jsonify,request,url_for
from flask_restful import Resource
from outh import github
from model.users import UserModel
from flask_jwt_extended import create_access_token,create_refresh_token
class Github(Resource):
@classmethod
def get(cls):
return github.authorize(url_for("github.aut... | 36.409091 | 98 | 0.652934 |
853f77d5a075c3f2d12d895e794310963f3e907d | 1,786 | py | Python | src/compas/datastructures/mesh/combinatorics.py | adacko/compas | 47c443ad3825897ec7ed932ec20734c2f08ef120 | [
"MIT"
] | null | null | null | src/compas/datastructures/mesh/combinatorics.py | adacko/compas | 47c443ad3825897ec7ed932ec20734c2f08ef120 | [
"MIT"
] | null | null | null | src/compas/datastructures/mesh/combinatorics.py | adacko/compas | 47c443ad3825897ec7ed932ec20734c2f08ef120 | [
"MIT"
] | 1 | 2022-01-16T02:32:43.000Z | 2022-01-16T02:32:43.000Z | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from compas.topology import breadth_first_traverse
__all__ = [
'mesh_is_connected'
]
def mesh_is_connected(mesh):
"""Verify that the mesh is connected.
Parameters
----------
mesh : comp... | 21.780488 | 80 | 0.582307 |
2785fc4d817a3e50b861b28f59c20841c3d0d24c | 4,477 | py | Python | backbone/MobileFaceNets.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 1,329 | 2021-01-13T07:06:30.000Z | 2022-03-31T07:23:39.000Z | backbone/MobileFaceNets.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 115 | 2021-01-13T10:42:57.000Z | 2022-03-28T03:57:52.000Z | backbone/MobileFaceNets.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 351 | 2021-01-13T07:21:00.000Z | 2022-03-29T14:11:39.000Z | """
@author: Jun Wang
@date: 20201019
@contact: jun21wangustc@gmail.com
"""
# based on:
# https://github.com/TreB1eN/InsightFace_Pytorch/blob/master/model.py
from torch.nn import Linear, Conv2d, BatchNorm1d, BatchNorm2d, PReLU, Sequential, Module
import torch
class Flatten(Module):
def forward(self, input):
... | 43.892157 | 131 | 0.611347 |
88661072f11a1f7d175bcb32f7a298e09d14cbbd | 5,196 | py | Python | electrum_audax/gui/qt/invoice_list.py | theaudaxproject/electrum-audax | 614845e536a21cb593376bdde7df6163b651ab21 | [
"MIT"
] | null | null | null | electrum_audax/gui/qt/invoice_list.py | theaudaxproject/electrum-audax | 614845e536a21cb593376bdde7df6163b651ab21 | [
"MIT"
] | null | null | null | electrum_audax/gui/qt/invoice_list.py | theaudaxproject/electrum-audax | 614845e536a21cb593376bdde7df6163b651ab21 | [
"MIT"
] | 2 | 2019-10-08T06:52:54.000Z | 2019-10-24T03:33:20.000Z | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without... | 42.942149 | 141 | 0.674942 |
5dbec287055fe65a3896957ae3acf38690bd3f08 | 259 | py | Python | examples/linkedExample.py | gamirou/pymbdata | bb6afba81c07844027c5b6df7fdf9f4d69b48580 | [
"MIT"
] | 1 | 2019-03-10T19:14:44.000Z | 2019-03-10T19:14:44.000Z | examples/linkedExample.py | gamirou/pymbdata | bb6afba81c07844027c5b6df7fdf9f4d69b48580 | [
"MIT"
] | null | null | null | examples/linkedExample.py | gamirou/pymbdata | bb6afba81c07844027c5b6df7fdf9f4d69b48580 | [
"MIT"
] | null | null | null | import sys
sys.path.insert(0, r'.\pymb')
from linkedlist import *
linked = LinkedList()
linked.insert(7)
linked.insert(2)
print(linked)
linked2 = LinkedList()
linked2.insert(3)
linked2.insert(8)
print(linked2)
linked3 = linked.merge(linked2)
print(linked3) | 16.1875 | 31 | 0.752896 |
d5d4b15bf63bf653ca026c9b2fa456736242dd8a | 421 | py | Python | Python/ex033.py | maurovasconcelos/Ola-Mundo | 526c6c271fbe916c4f9f22153828e4d8c726a544 | [
"MIT"
] | 1 | 2021-02-16T17:36:53.000Z | 2021-02-16T17:36:53.000Z | Python/ex033.py | maurovasconcelos/Ola-Mundo | 526c6c271fbe916c4f9f22153828e4d8c726a544 | [
"MIT"
] | null | null | null | Python/ex033.py | maurovasconcelos/Ola-Mundo | 526c6c271fbe916c4f9f22153828e4d8c726a544 | [
"MIT"
] | null | null | null | a = int(input('Escreva o primeiro numero: '))
b = int(input('Escreva o segundo numero: '))
c = int(input('Escreva o terceiro numero: '))
#Verificando quem é menor
menor = a
if b<a and b<c:
menor = b
if c<a and c<b:
menor = c
#Verificando quem é o maior
maior = a
if b>a and b>c:
maior = b
if c>a and c>b:
... | 21.05 | 45 | 0.634204 |
7f333e3f9ee05d147a1c5e47541808771cf5f486 | 122 | py | Python | evaluate/__init__.py | geoffbacon/eval | 5390ced378a9b7206fc274f5f24f4715f2f4e0fb | [
"MIT"
] | null | null | null | evaluate/__init__.py | geoffbacon/eval | 5390ced378a9b7206fc274f5f24f4715f2f4e0fb | [
"MIT"
] | null | null | null | evaluate/__init__.py | geoffbacon/eval | 5390ced378a9b7206fc274f5f24f4715f2f4e0fb | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
from .version import __version__
from .evaluate import *
| 30.5 | 64 | 0.844262 |
ca13c79782eb00681fc363b044a26e64fdd38bce | 2,033 | py | Python | src/contact/tests/test_models.py | Mathipe98/TDT4140_project | 7643b48b086c0f71c1b69728852428afae2bcdd5 | [
"MIT"
] | null | null | null | src/contact/tests/test_models.py | Mathipe98/TDT4140_project | 7643b48b086c0f71c1b69728852428afae2bcdd5 | [
"MIT"
] | null | null | null | src/contact/tests/test_models.py | Mathipe98/TDT4140_project | 7643b48b086c0f71c1b69728852428afae2bcdd5 | [
"MIT"
] | null | null | null | """
Tests that the models in contact function as intended.
Classes
ThreadTestCase: TestCase
Tests that the Thread model found in contact/models.py work as intended together with the associated models.
"""
from django.test import TestCase
from contact.models import Thread, Messages
fro... | 39.862745 | 120 | 0.646827 |
6a62df2c5a55e29abf7f76cd0950f03c84429509 | 23,381 | py | Python | scripts/util.py | weiya711/scadi_graph | 5ce78fe09286e9722c2627f7f959c4ad3f2288eb | [
"MIT"
] | null | null | null | scripts/util.py | weiya711/scadi_graph | 5ce78fe09286e9722c2627f7f959c4ad3f2288eb | [
"MIT"
] | null | null | null | scripts/util.py | weiya711/scadi_graph | 5ce78fe09286e9722c2627f7f959c4ad3f2288eb | [
"MIT"
] | null | null | null | import scipy.sparse
import scipy.io
import sparse
import os
import glob
import numpy
import itertools
import shutil
import numpy as np
import math
from pathlib import Path
from dataclasses import dataclass
HOSTNAME = os.environ['HOSTNAME']
def round_sparse(x):
if 0.0 <= x < 1:
return 1
elif 0.0 > x ... | 38.455592 | 104 | 0.554681 |
f56e41a0c22d2bd69d441e250e5bee4bb4ff2875 | 481 | py | Python | Paarthurnax/plugins/p_trivia/__init__.py | Raka-loah/qqbot-plugin-warframe | 18688105a5e6ce6aaa7ba19451f233744f38cb0b | [
"MIT"
] | 14 | 2018-11-05T09:22:18.000Z | 2020-05-08T05:25:25.000Z | Paarthurnax/plugins/p_trivia/__init__.py | Raka-loah/qqbot-plugin-warframe | 18688105a5e6ce6aaa7ba19451f233744f38cb0b | [
"MIT"
] | 3 | 2019-12-24T03:42:09.000Z | 2020-03-04T08:55:03.000Z | Paarthurnax/plugins/p_trivia/__init__.py | Raka-loah/qqbot-plugin-warframe | 18688105a5e6ce6aaa7ba19451f233744f38cb0b | [
"MIT"
] | 9 | 2019-01-15T03:10:54.000Z | 2020-03-05T03:18:26.000Z | # Metadata for plugin
#
# bot_command template:
# 'keyword':
# [function,
# 0 - blocklist / 1 - allowlist,
# ['groupid1', 'groupid2'],
# cooldown in seconds,
# is message body required,
# is keyword regex,
# is suffix suppressed],
import Paarthurnax.plugins.p_trivia.trivia as trivia
Metadata = {
... | 17.178571 | 52 | 0.5842 |
b4b1064aa9abd19fa397d274c5018615d155d30a | 4,408 | py | Python | fmcapi/api_objects/device_group_services/devicegrouprecords.py | realvitya/fmcapi | 38fb9a8da2d9ebbadf4ed4cb559244646b3bf3be | [
"BSD-3-Clause"
] | null | null | null | fmcapi/api_objects/device_group_services/devicegrouprecords.py | realvitya/fmcapi | 38fb9a8da2d9ebbadf4ed4cb559244646b3bf3be | [
"BSD-3-Clause"
] | null | null | null | fmcapi/api_objects/device_group_services/devicegrouprecords.py | realvitya/fmcapi | 38fb9a8da2d9ebbadf4ed4cb559244646b3bf3be | [
"BSD-3-Clause"
] | null | null | null | from fmcapi.api_objects.apiclasstemplate import APIClassTemplate
from fmcapi.api_objects.device_services.devicerecords import DeviceRecords
from fmcapi.api_objects.device_ha_pair_services.ftddevicehapairs import FTDDeviceHAPairs
import logging
import warnings
class DeviceGroupRecords(APIClassTemplate):
"""
Th... | 42.384615 | 96 | 0.462341 |
87cde88740a8591387915759354a34671967109f | 412 | py | Python | python/runInNewTab.py | airjp73/automation | d5a2d1ad3b679cd51eee3e36f4c034b6e9f27d06 | [
"MIT"
] | null | null | null | python/runInNewTab.py | airjp73/automation | d5a2d1ad3b679cd51eee3e36f4c034b6e9f27d06 | [
"MIT"
] | null | null | null | python/runInNewTab.py | airjp73/automation | d5a2d1ad3b679cd51eee3e36f4c034b6e9f27d06 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.7
import iterm2
import sys
command = sys.argv[1]
title = sys.argv[2]
async def runInNewTab(connection):
app = await iterm2.async_get_app(connection)
window = app.current_terminal_window
if window is None:
return 0
tab = await window.async_create_tab(command=command, pr... | 21.684211 | 73 | 0.737864 |
1aba40fec5c2a093b9d3ec1cccc0327b342939d5 | 3,146 | py | Python | day18.py | FlorianGD/adventofcode_2018 | cfe452b823b8d24a20857becf7974c448cd67f68 | [
"MIT"
] | null | null | null | day18.py | FlorianGD/adventofcode_2018 | cfe452b823b8d24a20857becf7974c448cd67f68 | [
"MIT"
] | null | null | null | day18.py | FlorianGD/adventofcode_2018 | cfe452b823b8d24a20857becf7974c448cd67f68 | [
"MIT"
] | null | null | null | """AoC 2018 Day 18: Settlers of The North Pole"""
from collections import Counter
# Part 1
class Land():
def __init__(self, input):
land = dict()
for y, line in enumerate(input.splitlines()):
for x, elem in enumerate(line):
land[(x, y)] = elem
self.current_lan... | 29.401869 | 78 | 0.526701 |
098fd26392edff864d3909636144387be274fa39 | 9,446 | py | Python | datumaro/tests/test_labelme_format.py | javoweb/cvat | 684544d2a06c192e7155f655897e6360b4a3be37 | [
"MIT"
] | 2 | 2020-07-24T18:12:18.000Z | 2020-08-12T09:14:07.000Z | datumaro/tests/test_labelme_format.py | javoweb/cvat | 684544d2a06c192e7155f655897e6360b4a3be37 | [
"MIT"
] | 24 | 2020-11-13T18:43:15.000Z | 2022-03-12T00:21:52.000Z | datumaro/tests/test_labelme_format.py | javoweb/cvat | 684544d2a06c192e7155f655897e6360b4a3be37 | [
"MIT"
] | 5 | 2020-07-01T18:02:48.000Z | 2021-01-22T02:21:48.000Z | import numpy as np
import os.path as osp
from unittest import TestCase
from datumaro.components.extractor import (Extractor, DatasetItem,
AnnotationType, Bbox, Mask, Polygon, LabelCategories
)
from datumaro.components.project import Dataset
from datumaro.plugins.labelme_format import LabelMeExtractor, LabelMeImpo... | 42.742081 | 93 | 0.352848 |
0ff23164eec9e73fa01476dc56b18df890b6cbf4 | 632 | py | Python | app/core/management/commands/wait_for_db.py | evTech/recipe-app-api | 21c09e83fb1bd211bc595255e53478c542d4fdd7 | [
"MIT"
] | null | null | null | app/core/management/commands/wait_for_db.py | evTech/recipe-app-api | 21c09e83fb1bd211bc595255e53478c542d4fdd7 | [
"MIT"
] | null | null | null | app/core/management/commands/wait_for_db.py | evTech/recipe-app-api | 21c09e83fb1bd211bc595255e53478c542d4fdd7 | [
"MIT"
] | null | null | null | import time
from django.db import connections
from django.db.utils import OperationalError
from django.core.management.base import BaseCommand
class Command(BaseCommand):
"""Djnago command to pause exceutionun t """
def handle(self, *args, **options):
self.stdout.write('Waiting for DB')
db_c... | 30.095238 | 72 | 0.643987 |
6f8e5baedd1ad812ec55f92264f3a13105b9163b | 2,087 | py | Python | parsing.py | olanderofc/tinyIDS | fbcfc2e33b95f1688f478e37f560cf5dc1db58e5 | [
"MIT"
] | null | null | null | parsing.py | olanderofc/tinyIDS | fbcfc2e33b95f1688f478e37f560cf5dc1db58e5 | [
"MIT"
] | null | null | null | parsing.py | olanderofc/tinyIDS | fbcfc2e33b95f1688f478e37f560cf5dc1db58e5 | [
"MIT"
] | null | null | null | from StringIO import StringIO
from config import config
import json
import glob
import binascii
import base64
import gzip
import dpkt, pcap, socket
import traceback
import logging
import re
import time
import os
class parsing:
def __init__(self, thedir):
self.ruledir = thedir
self.rules = []
... | 27.826667 | 118 | 0.511739 |
cd36433c38a5c214bd6d8c2fd39caf7cdac3aac6 | 1,310 | py | Python | compute.py | elin-d/kaya-identity | bc1434776a627a768390c89bfc3bec09889946c5 | [
"MIT"
] | null | null | null | compute.py | elin-d/kaya-identity | bc1434776a627a768390c89bfc3bec09889946c5 | [
"MIT"
] | 1 | 2020-11-12T09:04:16.000Z | 2020-11-12T09:04:16.000Z | compute.py | elin-d/kaya-identity | bc1434776a627a768390c89bfc3bec09889946c5 | [
"MIT"
] | null | null | null | def compute_kaya_identity(pop, gdp, enInt, carbInt, output_type="CO2"):
"""
Equation that expresses yearly CO2 emissions.
Extended description of function.
Parameters:
pop(numeric): Population size (in millions)
gdp(numeric): GDP per capita (in 1000$/person)
enInt(numeric): Energy Intensit... | 31.190476 | 120 | 0.664122 |
a41101a6438420e6576179d1d1eb164af85701a2 | 12,672 | py | Python | serpent/machine_learning/reinforcement_learning/agents/rainbow_dqn_agent.py | JackEasons/SerpentAI | 00a487dd088c6ca2528d025f3273c0a796efe210 | [
"MIT"
] | 6,762 | 2017-09-17T20:28:40.000Z | 2022-03-31T12:35:47.000Z | serpent/machine_learning/reinforcement_learning/agents/rainbow_dqn_agent.py | JackEasons/SerpentAI | 00a487dd088c6ca2528d025f3273c0a796efe210 | [
"MIT"
] | 159 | 2017-09-19T21:54:58.000Z | 2021-03-26T18:15:58.000Z | serpent/machine_learning/reinforcement_learning/agents/rainbow_dqn_agent.py | JackEasons/SerpentAI | 00a487dd088c6ca2528d025f3273c0a796efe210 | [
"MIT"
] | 880 | 2017-09-23T01:16:50.000Z | 2022-03-27T18:58:30.000Z | from serpent.machine_learning.reinforcement_learning.agent import Agent
from serpent.game_frame import GameFrame
from serpent.game_frame_buffer import GameFrameBuffer
from serpent.input_controller import KeyboardEvent, MouseEvent
from serpent.enums import InputControlTypes
from serpent.logger import Loggers
from s... | 35.595506 | 151 | 0.624448 |
fa544573783e49f4e492d8997a036b62f136b364 | 7,804 | py | Python | research/slim/nets/nets_factory.py | BardOfCodes/models | eb0c8a7f3075be0bb3a41e0a187ce8a6571dd60f | [
"Apache-2.0"
] | null | null | null | research/slim/nets/nets_factory.py | BardOfCodes/models | eb0c8a7f3075be0bb3a41e0a187ce8a6571dd60f | [
"Apache-2.0"
] | null | null | null | research/slim/nets/nets_factory.py | BardOfCodes/models | eb0c8a7f3075be0bb3a41e0a187ce8a6571dd60f | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 46.177515 | 90 | 0.653383 |
562d230cda35a0e3a11227299f484233c99b1e2f | 5,287 | py | Python | docs/conf.py | learnxuoh/Policies | e144c8c2d3b69808ab2433d3458b883ccb97bbe5 | [
"CC0-1.0"
] | null | null | null | docs/conf.py | learnxuoh/Policies | e144c8c2d3b69808ab2433d3458b883ccb97bbe5 | [
"CC0-1.0"
] | null | null | null | docs/conf.py | learnxuoh/Policies | e144c8c2d3b69808ab2433d3458b883ccb97bbe5 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 30.211429 | 82 | 0.660488 |
1063d24e96081656030b7adbe9995d9d752f667b | 449 | py | Python | mcfunction/versions/mc_1_8/deop.py | Le0Developer/mcast | bdabd897e399ff17c734b9e02d3e1e5099674a1c | [
"MIT"
] | 2 | 2021-12-28T14:10:13.000Z | 2022-01-12T16:59:20.000Z | mcfunction/versions/mc_1_8/deop.py | Le0Developer/mcast | bdabd897e399ff17c734b9e02d3e1e5099674a1c | [
"MIT"
] | 11 | 2021-01-18T09:00:23.000Z | 2021-01-29T09:29:04.000Z | mcfunction/versions/mc_1_8/deop.py | Le0Developer/mcast | bdabd897e399ff17c734b9e02d3e1e5099674a1c | [
"MIT"
] | null | null | null |
from dataclasses import dataclass
from .. import Command, ParsedCommand, Parser
from ...nodes import EntityNode
from ...parser_types import Entity
@dataclass()
class ParsedDeopCommand(ParsedCommand):
command: str
target: EntityNode
def __str__(self):
return f'{self.command} {self.target}'
de... | 17.96 | 59 | 0.717149 |
ea04c59fe72d4f8c44130248d6e4c4769a7d2699 | 2,507 | py | Python | predict.py | 12-wu/- | 69362fa00b3956e1d56caced340389e31cb944a0 | [
"MIT"
] | null | null | null | predict.py | 12-wu/- | 69362fa00b3956e1d56caced340389e31cb944a0 | [
"MIT"
] | null | null | null | predict.py | 12-wu/- | 69362fa00b3956e1d56caced340389e31cb944a0 | [
"MIT"
] | null | null | null | import os
import argparse
import torch
import json
import numpy as np
import torchvision.transforms as transforms
from torchvision.utils import save_image
from models import CompletionNetwork
from PIL import Image
from utils import poisson_blend, gen_input_mask
parser = argparse.ArgumentParser()
parser.add_argument('... | 31.3375 | 69 | 0.624651 |
275ec63699830a9e416130aaf13a2188da853cd7 | 2,359 | py | Python | genomepy/plugin.py | alienzj/genomepy | a9c6c40ffd350909bda882f733ee42606a3fec0b | [
"MIT"
] | null | null | null | genomepy/plugin.py | alienzj/genomepy | a9c6c40ffd350909bda882f733ee42606a3fec0b | [
"MIT"
] | null | null | null | genomepy/plugin.py | alienzj/genomepy | a9c6c40ffd350909bda882f733ee42606a3fec0b | [
"MIT"
] | null | null | null | import norns
import os
import re
config = norns.config("genomepy", default="cfg/default.yaml")
class Plugin(object):
"""Plugin base class.
"""
active = False
def name(self):
n = type(self).__name__.replace("Plugin", "")
return convert(n)
def activate(self):
self.active ... | 20.692982 | 80 | 0.590928 |
29bd3687eb52081ff56d48880450c3c4526cdfb3 | 16,726 | py | Python | proso_flashcards/management/commands/load_flashcards.py | adaptive-learning/proso-apps | 58c95ebb4da1207de8972237c383489575ce2a20 | [
"MIT"
] | 2 | 2015-11-14T15:02:57.000Z | 2017-04-26T10:42:20.000Z | proso_flashcards/management/commands/load_flashcards.py | adaptive-learning/proso-apps | 58c95ebb4da1207de8972237c383489575ce2a20 | [
"MIT"
] | 175 | 2015-01-19T19:02:10.000Z | 2022-03-11T23:17:08.000Z | proso_flashcards/management/commands/load_flashcards.py | adaptive-learning/proso-apps | 58c95ebb4da1207de8972237c383489575ce2a20 | [
"MIT"
] | 11 | 2016-03-02T19:49:08.000Z | 2020-06-22T10:01:12.000Z | from clint.textui import progress
from django.conf import settings
from django.core.cache import cache
from django.core.management import call_command
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from django.db.models import Count
from jsonschema import validate
fr... | 51.149847 | 180 | 0.593148 |
5841567e5cda76a54e34a96c8f479624208cd074 | 3,309 | py | Python | project/kay/management/__init__.py | yosukesuzuki/let-me-notify | 39f50214403822712329c1cd953167d6e9b315d6 | [
"MIT"
] | 1 | 2020-09-13T06:56:22.000Z | 2020-09-13T06:56:22.000Z | project/kay/management/__init__.py | yosukesuzuki/let-me-notify | 39f50214403822712329c1cd953167d6e9b315d6 | [
"MIT"
] | null | null | null | project/kay/management/__init__.py | yosukesuzuki/let-me-notify | 39f50214403822712329c1cd953167d6e9b315d6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
kay.management
:Copyright: (c) 2009 Accense Technology, Inc.
Takashi Matsuo <tmatsuo@candit.jp>,
All rights reserved.
:license: BSD, see LICENSE for more details.
Taken from django.
"""
import sys
import os
from werkzeug.utils import import_st... | 34.113402 | 78 | 0.781203 |
dd623806de3f1789522b61894bf62d7b27c28a09 | 1,353 | py | Python | vm-alias.py | ByK95/vm-alias | 15ddd624a555f8f2aded90bfc7ea587f2b743296 | [
"MIT"
] | null | null | null | vm-alias.py | ByK95/vm-alias | 15ddd624a555f8f2aded90bfc7ea587f2b743296 | [
"MIT"
] | null | null | null | vm-alias.py | ByK95/vm-alias | 15ddd624a555f8f2aded90bfc7ea587f2b743296 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import subprocess
import sys
import psutil
def start(vm_name, is_headless=True):
cmd = ["C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe", "startvm", vm_name]
if is_headless:
cmd.append('--type')
cmd.append('headless')
return cmd
def close(vm_name):
return... | 24.160714 | 109 | 0.609756 |
ba530c07a6586743419b4378b635acb621bafc3d | 13,544 | py | Python | rmn/models/inception.py | TomKingsfordUoA/ResidualMaskingNetwork | 6ce5ddf70f8ac8f1e6da2746b0bbeb9e457ceb7d | [
"MIT"
] | 242 | 2020-01-09T11:06:21.000Z | 2022-03-26T14:51:48.000Z | rmn/models/inception.py | huyhnueit68/ResidualMaskingNetwork | b77abb6e548b9a09b5c96b1592d71332b45d050e | [
"MIT"
] | 33 | 2020-01-09T08:42:10.000Z | 2022-03-23T07:52:56.000Z | rmn/models/inception.py | huyhnueit68/ResidualMaskingNetwork | b77abb6e548b9a09b5c96b1592d71332b45d050e | [
"MIT"
] | 61 | 2020-01-19T02:20:37.000Z | 2022-03-25T13:08:48.000Z | from collections import namedtuple
import torch
import torch.nn as nn
import torch.nn.functional as F
from .utils import load_state_dict_from_url
__all__ = ["Inception3", "inception_v3"]
model_urls = {
# Inception v3 ported from TensorFlow
"inception_v3_google": "https://download.pytorch.org/models/inceptio... | 37.518006 | 102 | 0.625591 |
03bbf0f76d5afd6c4d48f46e35e11d972be255a2 | 51 | py | Python | facenet/model/__init__.py | YaleDHLab/facenet | d5b845ff8da62a544d77c1eb0f6337c07d7e4fae | [
"RSA-MD"
] | 1 | 2019-08-12T17:22:35.000Z | 2019-08-12T17:22:35.000Z | facenet/model/__init__.py | YaleDHLab/facenet | d5b845ff8da62a544d77c1eb0f6337c07d7e4fae | [
"RSA-MD"
] | null | null | null | facenet/model/__init__.py | YaleDHLab/facenet | d5b845ff8da62a544d77c1eb0f6337c07d7e4fae | [
"RSA-MD"
] | null | null | null | from facenet.model.embeddings import get_embeddings | 51 | 51 | 0.901961 |
fa2e3635a1ce6e1d61264a24a1f18a3d93a24dde | 22,415 | py | Python | strategy/financialpredict.py | chung-ejy/longshot | c9ff1a6586546b496ed6ba2f0b43ff9cd68fa15d | [
"MIT"
] | null | null | null | strategy/financialpredict.py | chung-ejy/longshot | c9ff1a6586546b496ed6ba2f0b43ff9cd68fa15d | [
"MIT"
] | null | null | null | strategy/financialpredict.py | chung-ejy/longshot | c9ff1a6586546b496ed6ba2f0b43ff9cd68fa15d | [
"MIT"
] | 1 | 2021-08-05T02:12:51.000Z | 2021-08-05T02:12:51.000Z | import pandas as pd
from strategy.anaistrategy import AnAIStrategy
from datetime import timedelta, datetime
import pytz
from tqdm import tqdm
pd.options.mode.chained_assignment = None
from modeler.modeler import Modeler as m
from processor.processor import Processor as p
import numpy as np
import pickle
class Financia... | 58.524804 | 167 | 0.530716 |
3c1ba5c4eefbbe52a5bc6093ee9e65bd2f73c140 | 179 | py | Python | scripts/poll_new_blocks.py | NotPeopling2day/ape-demo-project | 76f40817205f26d77cc1d11e1c5838b3d36cb8de | [
"MIT"
] | null | null | null | scripts/poll_new_blocks.py | NotPeopling2day/ape-demo-project | 76f40817205f26d77cc1d11e1c5838b3d36cb8de | [
"MIT"
] | null | null | null | scripts/poll_new_blocks.py | NotPeopling2day/ape-demo-project | 76f40817205f26d77cc1d11e1c5838b3d36cb8de | [
"MIT"
] | 1 | 2021-12-08T14:29:07.000Z | 2021-12-08T14:29:07.000Z | import click
from ape import chain
def main():
click.echo("Polling for new blocks...")
for new_block in chain.blocks.poll_blocks():
click.echo(new_block.number)
| 19.888889 | 48 | 0.692737 |
9b1ef4f5bc7b6497d12f01dfb7adb0f34a2652c1 | 871 | py | Python | experiments/2013-09-27.py | jaesikchoi/gpss-research | 2a64958a018f1668f7b8eedf33c4076a63af7868 | [
"MIT"
] | 151 | 2015-01-09T19:25:05.000Z | 2022-01-05T02:05:52.000Z | experiments/2013-09-27.py | jaesikchoi/gpss-research | 2a64958a018f1668f7b8eedf33c4076a63af7868 | [
"MIT"
] | 1 | 2016-08-04T13:12:51.000Z | 2016-08-04T13:12:51.000Z | experiments/2013-09-27.py | jaesikchoi/gpss-research | 2a64958a018f1668f7b8eedf33c4076a63af7868 | [
"MIT"
] | 59 | 2015-02-04T19:13:58.000Z | 2021-07-28T23:36:09.000Z | Experiment(description='Seeing if keeping some likelihood noise around helps stability - and reducing jitter',
data_dir='../data/tsdlr/',
max_depth=10,
random_order=False,
k=1,
debug=False,
local_computation=False,
n_rand=9,
sd=2... | 31.107143 | 110 | 0.52698 |
91807b9e28b2e9a72b759c3a2e7daac048de550c | 1,056 | py | Python | client/kitchen.py | Sodsixela/SmartHome | 435122474a861f39cc5ddcf4f3a31d8702d78cc6 | [
"MIT"
] | null | null | null | client/kitchen.py | Sodsixela/SmartHome | 435122474a861f39cc5ddcf4f3a31d8702d78cc6 | [
"MIT"
] | null | null | null | client/kitchen.py | Sodsixela/SmartHome | 435122474a861f39cc5ddcf4f3a31d8702d78cc6 | [
"MIT"
] | null | null | null | from coapthon.client.helperclient import HelperClient
from tools import color
lightK = ""
hood = ""
cooker = ""
sink = ""
def kitchen(object,client, button, buttonB = None):
path = "kitchen"
#object = raw_input("object: ")
if object == "hood":
global hood
hood = not hood
response =... | 31.058824 | 79 | 0.578598 |
9965078f9749dc5e6b4863e4b131b03e84c95ed4 | 15,761 | py | Python | lmctl/project/handlers/interface.py | pmallan/lmctl | 0b8b86dd451a2d46595fcebc66bac409cca4650a | [
"Apache-2.0"
] | null | null | null | lmctl/project/handlers/interface.py | pmallan/lmctl | 0b8b86dd451a2d46595fcebc66bac409cca4650a | [
"Apache-2.0"
] | null | null | null | lmctl/project/handlers/interface.py | pmallan/lmctl | 0b8b86dd451a2d46595fcebc66bac409cca4650a | [
"Apache-2.0"
] | null | null | null | import abc
import os
import shutil
from lmctl.project.source.config import RootProjectConfig
import lmctl.project.types as project_types
from datetime import datetime, timezone
PACKAGING_PARAM = 'packaging'
TGZ_PACKAGING = 'tgz'
CSAR_PACKAGING = 'csar'
TOSCA_METADATA = 'TOSCA-Metadata'
TOSCA_META_FILE = 'TOSCA.meta'
L... | 36.568445 | 230 | 0.665123 |
cfe474011b51f982a26e57f215819ed2314d1ed8 | 514 | py | Python | backend/serializers/__init__.py | Atari4800/fast-backend | 4864300351f5cb93638deb6c18017149eb7f17ca | [
"MIT"
] | 1 | 2021-11-25T22:57:59.000Z | 2021-11-25T22:57:59.000Z | backend/serializers/__init__.py | Capstone-Team-Fast/fast-backend | 7854a2731ba0923e89581c1fbb6cc95ea210fed0 | [
"MIT"
] | null | null | null | backend/serializers/__init__.py | Capstone-Team-Fast/fast-backend | 7854a2731ba0923e89581c1fbb6cc95ea210fed0 | [
"MIT"
] | 3 | 2022-01-29T21:32:54.000Z | 2022-03-09T09:30:44.000Z |
# from .testSerializer import TestSerializer
from .availabilitySerializer import AvailabilitySerializer
from .languageSerializer import LanguageSerializer
from .locationSerializer import LocationSerializer
from .clientRoutingSerializer import ClientRoutingSerializer
from .clientSerializer import ClientSerializer
from... | 39.538462 | 60 | 0.894942 |
ac5a77a4f6e802345ede4b9a78f83f04dcf4fafe | 225 | py | Python | practice/reverse_string.py | haandol/dojo | c29dc54614bdfaf79eb4862ed9fa25974a0f5654 | [
"MIT"
] | null | null | null | practice/reverse_string.py | haandol/dojo | c29dc54614bdfaf79eb4862ed9fa25974a0f5654 | [
"MIT"
] | null | null | null | practice/reverse_string.py | haandol/dojo | c29dc54614bdfaf79eb4862ed9fa25974a0f5654 | [
"MIT"
] | null | null | null | import re
def reverse(s):
return s[::-1]
def fix_tag(s):
pat = r'>(\w+)\/<(\w+)>(\w+)<'
return re.sub(pat, r'<\g<3>>\g<2></\g<1>>', s)
s = 'Amazon TV <em>Alexa</em> And <b>Echo</b>'
print(fix_tag(reverse(s))) | 17.307692 | 50 | 0.506667 |
1474cbf3616ac60cf4e71fc3fc3a737017c71ef8 | 4,240 | py | Python | cogs/loan.py | TrendingTechnology/tessarect-bot | 201680e6288014bbf55fed4589570acc12f1cd3e | [
"MIT"
] | 1 | 2022-01-29T05:13:22.000Z | 2022-01-29T05:13:22.000Z | cogs/loan.py | TrendingTechnology/tessarect-bot | 201680e6288014bbf55fed4589570acc12f1cd3e | [
"MIT"
] | null | null | null | cogs/loan.py | TrendingTechnology/tessarect-bot | 201680e6288014bbf55fed4589570acc12f1cd3e | [
"MIT"
] | null | null | null | from discord.ext import commands
import perms
import discord, json, asyncio
with open("loan.json") as file:
bank = json.load(file)
class Loan(commands.Cog):
'''Loan Commands'''
def __init__(self, bot):
self.bot = bot
@commands.group(invoke_without_command=True)
async def loan(self,ctx):... | 53 | 338 | 0.624292 |
18c21c9f898dd45838d4e10cd6729eece30a426d | 922 | py | Python | 1429_First_Unique_Number.py | rpm1995/LeetCode | 147d99e273bc398c107f2aef73aba0d6bb88dea0 | [
"MIT"
] | null | null | null | 1429_First_Unique_Number.py | rpm1995/LeetCode | 147d99e273bc398c107f2aef73aba0d6bb88dea0 | [
"MIT"
] | null | null | null | 1429_First_Unique_Number.py | rpm1995/LeetCode | 147d99e273bc398c107f2aef73aba0d6bb88dea0 | [
"MIT"
] | null | null | null | from collections import deque
class FirstUnique:
def __init__(self, nums: List[int]):
self.queue = deque([])
self.is_unique = {}
for num in nums:
if num not in self.is_unique:
self.queue.append(num)
self.is_unique[num] = True
els... | 23.05 | 68 | 0.58243 |
f3973cd82495f4dbc1e944b0633ff61555152512 | 3,967 | py | Python | MyTest.py | WynMew/ssd.pytorch | 466123cb3cfda8050929834824e037d206e75e79 | [
"MIT"
] | 1 | 2019-04-03T19:04:09.000Z | 2019-04-03T19:04:09.000Z | MyTest.py | WynMew/ssd.pytorch | 466123cb3cfda8050929834824e037d206e75e79 | [
"MIT"
] | null | null | null | MyTest.py | WynMew/ssd.pytorch | 466123cb3cfda8050929834824e037d206e75e79 | [
"MIT"
] | null | null | null | from __future__ import print_function
import sys
import os
import argparse
import torch
import torch.nn as nn
import torch.backends.cudnn as cudnn
import torchvision.transforms as transforms
from torch.autograd import Variable
from data import My_ROOT, My_CLASSES as labelmap
from PIL import Image
from data import MyAnn... | 40.896907 | 120 | 0.621124 |
7c741f11a681503b5fe290201a43d09486c6cdd9 | 13,282 | py | Python | SIGMA.py | sgulania/SQ2EOM | d10b79fc661ded29a6712e447eee3ea852e22882 | [
"MIT"
] | null | null | null | SIGMA.py | sgulania/SQ2EOM | d10b79fc661ded29a6712e447eee3ea852e22882 | [
"MIT"
] | null | null | null | SIGMA.py | sgulania/SQ2EOM | d10b79fc661ded29a6712e447eee3ea852e22882 | [
"MIT"
] | null | null | null | from sympy import *
from sympy.physics.secondquant import F, Fd, wicks, Commutator,evaluate_deltas,AntiSymmetricTensor,NO
from sympy.physics.quantum import Commutator, Dagger, Operator
from fractions import Fraction
from sympy.physics.second... | 50.501901 | 119 | 0.715028 |
933ebc745b522cb128d588ce6bf031149b9b2f33 | 61,631 | py | Python | rasa/nlu/classifiers/diet_classifier.py | lpschaub/rasa | 2d04945baf4877ab6476be42e5e77ffeeb437161 | [
"Apache-2.0"
] | null | null | null | rasa/nlu/classifiers/diet_classifier.py | lpschaub/rasa | 2d04945baf4877ab6476be42e5e77ffeeb437161 | [
"Apache-2.0"
] | null | null | null | rasa/nlu/classifiers/diet_classifier.py | lpschaub/rasa | 2d04945baf4877ab6476be42e5e77ffeeb437161 | [
"Apache-2.0"
] | null | null | null | import logging
from collections import defaultdict
from pathlib import Path
import numpy as np
import os
import scipy.sparse
import tensorflow as tf
import tensorflow_addons as tfa
from typing import Any, Dict, List, Optional, Text, Tuple, Union, Type, NamedTuple
import rasa.utils.common as common_utils
import rasa.... | 36.532899 | 88 | 0.625805 |
c983665876713b87a9b38939f1fdf169068df799 | 1,075 | py | Python | packages/pycopy/v2.11.0.1/esp8266/stubs/lwip.py | TheVinhLuong102/micropy-stubs | 55ff1773008f7c4dfc3d70a403986486226eb6b3 | [
"MIT"
] | 18 | 2019-07-11T13:31:09.000Z | 2022-01-27T06:38:40.000Z | packages/pycopy/v2.11.0.1/esp8266/stubs/lwip.py | TheVinhLuong102/micropy-stubs | 55ff1773008f7c4dfc3d70a403986486226eb6b3 | [
"MIT"
] | 9 | 2019-09-01T21:44:49.000Z | 2022-02-04T20:55:08.000Z | packages/pycopy/v2.11.0.1/esp8266/stubs/lwip.py | TheVinhLuong102/micropy-stubs | 55ff1773008f7c4dfc3d70a403986486226eb6b3 | [
"MIT"
] | 6 | 2019-10-08T05:31:21.000Z | 2021-04-22T10:21:01.000Z | """
Module: 'lwip' on esp8266 v2.11.0.1 on 2019
"""
# MCU: (sysname='esp8266', nodename='esp8266', release='2.2.0-dev(9422289)', version='v2.11.0.1 on 2019-07-26', machine='ESP module with ESP8266')
# Stubber: 1.2.0
AF_INET = 2
AF_INET6 = 10
IPPROTO_IP = 0
IP_ADD_MEMBERSHIP = 1024
SOCK_DGRAM = 2
SOCK_RAW = 3
SOCK_STREA... | 12.797619 | 146 | 0.529302 |
048e1568c775fb2410eec1e7ddd1817ac1f7eb52 | 6,739 | py | Python | bindings/python/ensmallen_graph/datasets/string/thermusspccbus3uf1.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/thermusspccbus3uf1.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/thermusspccbus3uf1.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | """
This file offers the methods to automatically retrieve the graph Thermus sp. CCBUS3UF1.
The graph is automatically retrieved from the STRING repository.
Report
---------------------
At the time of rendering these methods (please see datetime below), the graph
had the following characteristics:
Datetime: 2021-... | 35.282723 | 223 | 0.704407 |
197d0e66772be13e785692ab43ad9069acd3e04e | 150 | py | Python | tests/__init__.py | ntropy-network/ntropy-sdk | 7fa1c1e90be64f27f5f5034f804b1eb04e78ad78 | [
"MIT"
] | 10 | 2021-05-18T14:22:32.000Z | 2022-03-29T13:21:30.000Z | tests/__init__.py | ntropy-network/ntropy-sdk | 7fa1c1e90be64f27f5f5034f804b1eb04e78ad78 | [
"MIT"
] | 9 | 2021-08-25T13:30:19.000Z | 2022-03-21T11:54:17.000Z | tests/__init__.py | ntropy-network/ntropy-sdk | 7fa1c1e90be64f27f5f5034f804b1eb04e78ad78 | [
"MIT"
] | 3 | 2021-08-25T11:42:27.000Z | 2021-12-09T12:13:30.000Z | import os
API_KEY = os.environ.get("NTROPY_API_KEY")
if not API_KEY:
raise RuntimeError("Environment variable NTROPY_API_KEY is not defined")
| 16.666667 | 76 | 0.766667 |
1c0bccd4360f2d7abd63a289b46ad3db24085f78 | 4,995 | py | Python | open_gateway/video_sources/video_base.py | sanyaade-teachings/SensiML-open-gateway | 68aabbba7b2edb14937065b5f8a9d1a2f4a64083 | [
"BSD-3-Clause"
] | 20 | 2021-04-24T08:11:00.000Z | 2022-03-24T19:32:20.000Z | open_gateway/video_sources/video_base.py | sanyaade-teachings/SensiML-open-gateway | 68aabbba7b2edb14937065b5f8a9d1a2f4a64083 | [
"BSD-3-Clause"
] | 3 | 2021-04-16T06:49:18.000Z | 2021-10-04T15:55:25.000Z | open_gateway/video_sources/video_base.py | sanyaade-teachings/SensiML-open-gateway | 68aabbba7b2edb14937065b5f8a9d1a2f4a64083 | [
"BSD-3-Clause"
] | 7 | 2021-04-30T19:50:02.000Z | 2022-03-08T19:37:17.000Z | import os
import sys
import threading
import time
import cv2
from open_gateway.video_sources import get_video_source_name
from open_gateway import basedir, ensure_folder_exists
MAX_VIDEO_STREAMS = 1
class VideoBase(object):
def __init__(self, camera_index):
self.vs = None
self.output_frame = None... | 30.090361 | 103 | 0.523323 |
2b4286ccb0dad69c9fd08217e1edcbd907612ae1 | 5,700 | py | Python | tools/register_coco_data_roadmarking.py | MIXIAOXIN/FCOSRM | 657a9f0fe181b870d12fe689e4a968f7101ff5d5 | [
"BSD-2-Clause"
] | null | null | null | tools/register_coco_data_roadmarking.py | MIXIAOXIN/FCOSRM | 657a9f0fe181b870d12fe689e4a968f7101ff5d5 | [
"BSD-2-Clause"
] | null | null | null | tools/register_coco_data_roadmarking.py | MIXIAOXIN/FCOSRM | 657a9f0fe181b870d12fe689e4a968f7101ff5d5 | [
"BSD-2-Clause"
] | null | null | null | # author: mixiaoxin@whu.edu.cn
import logging
import os, cv2
from collections import OrderedDict
import torch
from torch.nn.parallel import DistributedDataParallel
import detectron2.utils.comm as comm
from detectron2.data import DatasetCatalog, MetadataCatalog, build_detection_train_loader
from detectron2.data.datase... | 47.5 | 139 | 0.584912 |
382c9aeb82f7b7bc26080bde39cbcbf91c151f6b | 2,955 | py | Python | doc/source/conf.py | hemna/os-brick-1 | df2a3969b7e191d40430e6c37f28dcf31d4b1da1 | [
"Apache-2.0"
] | 1 | 2020-01-07T21:41:36.000Z | 2020-01-07T21:41:36.000Z | doc/source/conf.py | hemna/os-brick-1 | df2a3969b7e191d40430e6c37f28dcf31d4b1da1 | [
"Apache-2.0"
] | 2 | 2020-01-09T16:37:01.000Z | 2020-09-18T12:58:13.000Z | doc/source/conf.py | hemna/os-brick-1 | df2a3969b7e191d40430e6c37f28dcf31d4b1da1 | [
"Apache-2.0"
] | 1 | 2020-07-10T18:18:34.000Z | 2020-07-10T18:18:34.000Z | # 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, software
# distributed under the... | 30.463918 | 79 | 0.678173 |
69ce1924a65192e44c81cd46ce2b3bcb008a4247 | 2,814 | py | Python | pyportable_installer/compilers/mypyc_compiler.py | Likianta/lkdist | b5dc346fd0804965ff0c2d5bbc666dd4ad522799 | [
"MIT"
] | 3 | 2021-08-08T05:39:29.000Z | 2021-09-27T07:36:31.000Z | pyportable_installer/compilers/mypyc_compiler.py | Likianta/lkdist | b5dc346fd0804965ff0c2d5bbc666dd4ad522799 | [
"MIT"
] | 2 | 2021-09-09T11:49:19.000Z | 2021-10-01T17:36:37.000Z | pyportable_installer/compilers/mypyc_compiler.py | Likianta/pyportable-installer | b5dc346fd0804965ff0c2d5bbc666dd4ad522799 | [
"MIT"
] | null | null | null | """
Warnings:
~/docs/devnote/currently-known-compilers-issues.md
FIXME:
This module is not suggest to use, it will be refactored with the guidance
of `.cython_compiler.CythonCompiler`.
"""
import os
import subprocess
import sys
from os import listdir
from os import mkdir
from os.path import basename
fr... | 29.93617 | 78 | 0.600924 |
525ddfd656dc1a2cbc3aeac8440d50ec72e7eeb7 | 18,128 | py | Python | app.py | max-torch/Custom-Shopify-Analytics | 4b6bd5795bbbcd4b33bdceb9c146dd08780b3968 | [
"MIT"
] | 2 | 2022-01-31T02:04:10.000Z | 2022-01-31T04:15:03.000Z | app.py | max-torch/Custom-Shopify-Analytics | 4b6bd5795bbbcd4b33bdceb9c146dd08780b3968 | [
"MIT"
] | null | null | null | app.py | max-torch/Custom-Shopify-Analytics | 4b6bd5795bbbcd4b33bdceb9c146dd08780b3968 | [
"MIT"
] | null | null | null | '''
This module fetches data from a client's Shopify Store account, uses it to generate a dashboard, and starts a web application server
in debug mode for app testing. Additional steps need to be taken to prepare this for deployment, such as using an appropriate
production server.
'''
from time import time
import json... | 37.071575 | 150 | 0.546889 |
f61a076396894f428833e8d97f6421f01485843d | 2,338 | py | Python | notify/scripts/logger.py | dpvonline/keycloak-config | 5fcad4cf63c5a86b7769e1e71eb7ea97b55da450 | [
"MIT"
] | 1 | 2021-12-12T16:04:50.000Z | 2021-12-12T16:04:50.000Z | notify/scripts/logger.py | dpvonline/keycloak-config | 5fcad4cf63c5a86b7769e1e71eb7ea97b55da450 | [
"MIT"
] | null | null | null | notify/scripts/logger.py | dpvonline/keycloak-config | 5fcad4cf63c5a86b7769e1e71eb7ea97b55da450 | [
"MIT"
] | 1 | 2021-04-30T16:40:57.000Z | 2021-04-30T16:40:57.000Z | #!/usr/bin/env python
__author__ = "OBI"
__copyright__ = "Copyright 2021, DPV e.V."
__license__ = "MIT"
import logging
import smtplib
from logging import handlers
logger = logging.getLogger("dpv_auth_notify")
def init_mail(fromaddr: str, password: str, toaddrs: str, mailhost: str, mailport: int, send_mail: bool = T... | 35.969231 | 111 | 0.611634 |
e310b51437f9e773cb9545cdf9e856c62da30aab | 6,180 | py | Python | schema_salad/tests/test_cg.py | ksebby/schema_salad | 6dcf0c1cd487ab3460247d4d5cb8131b564919d4 | [
"Apache-2.0"
] | null | null | null | schema_salad/tests/test_cg.py | ksebby/schema_salad | 6dcf0c1cd487ab3460247d4d5cb8131b564919d4 | [
"Apache-2.0"
] | null | null | null | schema_salad/tests/test_cg.py | ksebby/schema_salad | 6dcf0c1cd487ab3460247d4d5cb8131b564919d4 | [
"Apache-2.0"
] | null | null | null | import json
import os
import pytest # type: ignore
import schema_salad.metaschema as cg_metaschema
from schema_salad.exceptions import ValidationException
from schema_salad.ref_resolver import file_uri
from .matcher import JsonDiffMatcher
from .util import get_data
def test_load() -> None:
doc = {
"ty... | 29.711538 | 88 | 0.563592 |
143985044598ef6fe0b10697d62640133666aed1 | 661 | py | Python | nfsops/package.py | nfsops/nfsops | d7b6fc12c5a1845f468e2737fad7031fd37bd3f2 | [
"BSD-3-Clause"
] | null | null | null | nfsops/package.py | nfsops/nfsops | d7b6fc12c5a1845f468e2737fad7031fd37bd3f2 | [
"BSD-3-Clause"
] | null | null | null | nfsops/package.py | nfsops/nfsops | d7b6fc12c5a1845f468e2737fad7031fd37bd3f2 | [
"BSD-3-Clause"
] | null | null | null | '''
Package description information.
'''
#: Package display name.
__title__ = 'NFSops'
#: Package version.
__version__ = 'latest'
#: Package description.
__description__ = 'NFSops Python SDK. Storage management for workspaces.'
#: Package author name.
__author__ = 'NFSops Developers'
#: Package author email.
__ema... | 18.361111 | 77 | 0.70348 |
0f994fc21feaa6ebc158a55f96c8815a17664d73 | 1,713 | py | Python | config/settings/test.py | yulqen/ctrack | b370cdda72e7fab9b85a4e737923fabef679e31d | [
"MIT"
] | null | null | null | config/settings/test.py | yulqen/ctrack | b370cdda72e7fab9b85a4e737923fabef679e31d | [
"MIT"
] | 16 | 2020-08-13T09:18:57.000Z | 2021-11-05T14:32:05.000Z | config/settings/test.py | hammerheadlemon/ctrack | b370cdda72e7fab9b85a4e737923fabef679e31d | [
"MIT"
] | null | null | null | """
With these settings, tests run faster.
"""
from .gcloud_settings import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env(
"DJANGO_SECRET_KEY",
default... | 32.942308 | 80 | 0.500876 |
c6b39f67c35758c084f91bfe8bdbcc4e5e1e2b48 | 388 | py | Python | app/views/member/Member.py | RedFalsh/flask-example | 561b04d31356cf1a4a0324a89ebc4f3dcd94e16c | [
"MIT"
] | 1 | 2019-02-26T07:40:07.000Z | 2019-02-26T07:40:07.000Z | app/views/member/Member.py | RedFalsh/flask-example | 561b04d31356cf1a4a0324a89ebc4f3dcd94e16c | [
"MIT"
] | null | null | null | app/views/member/Member.py | RedFalsh/flask-example | 561b04d31356cf1a4a0324a89ebc4f3dcd94e16c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
from flask import Blueprint, render_template
from app import db
member = Blueprint('member', __name__,
template_folder='templates',
static_folder='static')
@member.route('/info')
def index():
return 'member info'
# @home.route('home')
# ... | 18.47619 | 47 | 0.649485 |
78750988ea9f30715030a0b8529312e80b311b5a | 4,060 | py | Python | modules/MMM-fitbit/python/setupAccess.py | TheWass/mm4cd | 5749665011c48b4437c92d4c79d81556e1ef35bb | [
"MIT"
] | null | null | null | modules/MMM-fitbit/python/setupAccess.py | TheWass/mm4cd | 5749665011c48b4437c92d4c79d81556e1ef35bb | [
"MIT"
] | null | null | null | modules/MMM-fitbit/python/setupAccess.py | TheWass/mm4cd | 5749665011c48b4437c92d4c79d81556e1ef35bb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# addapted from gather_key_oauth2.py included with https://github.com/orcasgit/python-fitbit
import cherrypy
import os
import sys
import threading
import traceback
import webbrowser
from base64 import b64encode
from fitbit.api import FitbitOauth2Client
from oauthlib.oauth2.rfc6749.errors import ... | 34.117647 | 92 | 0.650493 |
b6d2571ab049ee870182642a4f82012394c18736 | 1,108 | py | Python | django/core/management/commands/check.py | fizista/django | 16f3a6a4c7bab11644d11c2be029374e5095cb56 | [
"BSD-3-Clause"
] | 1 | 2019-02-10T19:33:27.000Z | 2019-02-10T19:33:27.000Z | django/core/management/commands/check.py | fizista/django | 16f3a6a4c7bab11644d11c2be029374e5095cb56 | [
"BSD-3-Clause"
] | null | null | null | django/core/management/commands/check.py | fizista/django | 16f3a6a4c7bab11644d11c2be029374e5095cb56 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from optparse import make_option
from django.apps import apps
from django.core import checks
from django.core.management.base import BaseCommand, CommandError
class Command(BaseCommand):
help = "Checks the entire Django project for potential proble... | 33.575758 | 91 | 0.679603 |
b46ff2c73b60875ed490a7b18efd6af353803cc4 | 2,734 | py | Python | tests/test_text_utils.py | pitoukiller/my-shield | 53b6b1a207f4ef9759ebf5771431949ace0f3b90 | [
"MIT"
] | 3 | 2020-08-14T13:26:27.000Z | 2021-03-16T16:58:30.000Z | tests/test_text_utils.py | GG-HH/gg-shield | 8e39fd46d172ffdfe606502015307c915ff57fe7 | [
"MIT"
] | null | null | null | tests/test_text_utils.py | GG-HH/gg-shield | 8e39fd46d172ffdfe606502015307c915ff57fe7 | [
"MIT"
] | null | null | null | from typing import List
import pytest
from ggshield.text_utils import (
Line,
LineCategory,
format_line_count_break,
get_offset,
get_padding,
)
def test_line_validation():
line_to_test = Line("hello", category=" ")
with pytest.raises(TypeError):
line_to_test.build_line_count(0, F... | 29.085106 | 88 | 0.569129 |
5da2eec4b075c759d1ae1452a6079c67a93c7c4e | 37,413 | py | Python | noted1.py | ramakrishnamekala129/tradingviewwebhooksbotByRK | dcb6a19325715ada6bf473177af8bd932dbf2800 | [
"MIT"
] | null | null | null | noted1.py | ramakrishnamekala129/tradingviewwebhooksbotByRK | dcb6a19325715ada6bf473177af8bd932dbf2800 | [
"MIT"
] | null | null | null | noted1.py | ramakrishnamekala129/tradingviewwebhooksbotByRK | dcb6a19325715ada6bf473177af8bd932dbf2800 | [
"MIT"
] | 3 | 2021-08-18T02:51:47.000Z | 2021-10-14T18:17:05.000Z | from database import db
from datetime import datetime
print("balance" in db.list_collection_names())
import dateutil
import os
import sys
import time
import pandas as pd
from pandas import ExcelWriter
from database import db
import pymongo
root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file... | 34.609621 | 1,155 | 0.657525 |
2ca3729306e1b31f70d4e685ca8ecbb11bfa0c11 | 12,208 | py | Python | python/paddle/fluid/tests/unittests/test_fill_constant_op.py | juncaipeng/Paddle | e5bbffa84cf0c0768dd681b9aa0133169cca6c58 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_fill_constant_op.py | juncaipeng/Paddle | e5bbffa84cf0c0768dd681b9aa0133169cca6c58 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_fill_constant_op.py | juncaipeng/Paddle | e5bbffa84cf0c0768dd681b9aa0133169cca6c58 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 32.817204 | 92 | 0.597887 |
ac9cf488e3e1d6d0ff2dec7d1450b8442cc69f9b | 4,117 | py | Python | discovery-provider/src/queries/get_tracks_including_unlisted.py | atticwip/audius-protocol | 9758e849fae01508fa1d27675741228b11533e6e | [
"Apache-2.0"
] | 429 | 2019-08-14T01:34:07.000Z | 2022-03-30T06:31:38.000Z | discovery-provider/src/queries/get_tracks_including_unlisted.py | SNOmad1/audius-protocol | 3d5fc2bf688265eb529060f1f3234ef2b95ed231 | [
"Apache-2.0"
] | 998 | 2019-08-14T01:52:37.000Z | 2022-03-31T23:17:22.000Z | discovery-provider/src/queries/get_tracks_including_unlisted.py | SNOmad1/audius-protocol | 3d5fc2bf688265eb529060f1f3234ef2b95ed231 | [
"Apache-2.0"
] | 73 | 2019-10-04T04:24:16.000Z | 2022-03-24T16:27:30.000Z | import logging # pylint: disable=C0302
from sqlalchemy import or_, and_
from flask.globals import request
from src.models import Track
from src.utils import helpers
from src.utils.db_session import get_db_read_replica
from src.queries.query_helpers import (
populate_track_metadata,
paginate_query,
get_us... | 35.8 | 102 | 0.629342 |
e5f74fbc148f08081d5a9dbed6bfa3fe4ebace27 | 7,096 | py | Python | bin/redsea/mediadownloader.py | SultanSGillani/dotfiles | 17705501de7c72399656f909f06746700d5f04cd | [
"0BSD"
] | 7 | 2020-02-10T03:07:05.000Z | 2022-02-03T20:50:31.000Z | bin/redsea/mediadownloader.py | SultanSGillani/dotfiles | 17705501de7c72399656f909f06746700d5f04cd | [
"0BSD"
] | 2 | 2020-07-18T14:42:36.000Z | 2022-01-20T14:41:03.000Z | bin/redsea/mediadownloader.py | SultanSGillani/dotfiles | 17705501de7c72399656f909f06746700d5f04cd | [
"0BSD"
] | 1 | 2018-11-27T16:51:10.000Z | 2018-11-27T16:51:10.000Z | import errno
import os
import os.path as path
import re
import requests
from .decryption import decrypt_file, decrypt_security_token
from .tagger import FeaturingFormat
from .tidal_api import TidalApi, TidalRequestError
COVER_FILE = 'Cover.jpg'
chunck_size = 1024
def _mkdir_p(path):
try:
os.makedirs(pat... | 36.766839 | 124 | 0.565107 |
45cb3911b05755c73f406816c888f59746f147b7 | 4,138 | py | Python | Datasets/Vectors/us_census_tracts.py | jdgomezmo/gee | 7016c47ee902dbf60b1aeb6319424c61c1107345 | [
"MIT"
] | 1 | 2020-11-16T22:07:42.000Z | 2020-11-16T22:07:42.000Z | Datasets/Vectors/us_census_tracts.py | jdgomezmo/gee | 7016c47ee902dbf60b1aeb6319424c61c1107345 | [
"MIT"
] | null | null | null | Datasets/Vectors/us_census_tracts.py | jdgomezmo/gee | 7016c47ee902dbf60b1aeb6319424c61c1107345 | [
"MIT"
] | null | null | null | # %%
"""
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Datasets/Vectors/us_census_tracts.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a ta... | 48.682353 | 1,021 | 0.743596 |
74e89e257d05fc79a30450f245e5d19c0f653ab7 | 1,425 | py | Python | parser/team12/src/FUNCIONES_NATIVAS/TRIGRONOMETRIC_FUNCTION/Sin.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 35 | 2020-12-07T03:11:43.000Z | 2021-04-15T17:38:16.000Z | parser/team12/src/FUNCIONES_NATIVAS/TRIGRONOMETRIC_FUNCTION/Sin.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 47 | 2020-12-09T01:29:09.000Z | 2021-01-13T05:37:50.000Z | parser/team12/src/FUNCIONES_NATIVAS/TRIGRONOMETRIC_FUNCTION/Sin.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 556 | 2020-12-07T03:13:31.000Z | 2021-06-17T17:41:10.000Z | import sys, os.path
import math
dir_nodo = (os.path.abspath(os.path.join(os.path.dirname(__file__), '..','..')) + '\\EXPRESION\\EXPRESION\\')
sys.path.append(dir_nodo)
ent_nodo = (os.path.abspath(os.path.join(os.path.dirname(__file__), '..','..')) + '\\ENTORNO\\')
sys.path.append(ent_nodo)
from Expresion import Expr... | 29.081633 | 109 | 0.614737 |
1c7bc9b3f59efac3384db7b43404ee53b1a085a6 | 1,811 | py | Python | iamheadless_projects/lookups/project_users.py | plain-ie/iamheadless_projects | 9094f000262602d6a7d5441ab65a0333adb27721 | [
"MIT"
] | null | null | null | iamheadless_projects/lookups/project_users.py | plain-ie/iamheadless_projects | 9094f000262602d6a7d5441ab65a0333adb27721 | [
"MIT"
] | null | null | null | iamheadless_projects/lookups/project_users.py | plain-ie/iamheadless_projects | 9094f000262602d6a7d5441ab65a0333adb27721 | [
"MIT"
] | null | null | null | import math
from django.db.models import Q
from .. import utils
from ..pydantic_models import UserSchema
from .pagination import ALLOWED_FORMATS, pagination
def get_project_users(
project_id,
active=None,
count='__all__',
emails=None,
format='queryset',
page=1,
... | 23.828947 | 76 | 0.632247 |
44b6240945c71f1f94f995d30b2a32f40b529c2c | 1,632 | py | Python | rlkit/pytorch/dqn/double_dqn.py | Knoxantropicen/rlkit | c60fb3794bdd8a6fc4480e668dc3832c5f5f3ab5 | [
"MIT"
] | null | null | null | rlkit/pytorch/dqn/double_dqn.py | Knoxantropicen/rlkit | c60fb3794bdd8a6fc4480e668dc3832c5f5f3ab5 | [
"MIT"
] | null | null | null | rlkit/pytorch/dqn/double_dqn.py | Knoxantropicen/rlkit | c60fb3794bdd8a6fc4480e668dc3832c5f5f3ab5 | [
"MIT"
] | null | null | null | from collections import OrderedDict
import numpy as np
import torch
import rlkit.pytorch.pytorch_util as ptu
from rlkit.core.eval_util import create_stats_ordered_dict
from rlkit.pytorch.dqn.dqn import DQN
class DoubleDQN(DQN):
def _do_training(self):
batch = self.get_batch(training=True)
reward... | 30.222222 | 79 | 0.613358 |
279f2f79629b6fa341037da1d152740fa7825efd | 32,930 | py | Python | tests/test_plugin.py | bambu/cmd2 | 52bbce0a938e3769d0814010245687c1473f7e5c | [
"MIT"
] | null | null | null | tests/test_plugin.py | bambu/cmd2 | 52bbce0a938e3769d0814010245687c1473f7e5c | [
"MIT"
] | null | null | null | tests/test_plugin.py | bambu/cmd2 | 52bbce0a938e3769d0814010245687c1473f7e5c | [
"MIT"
] | null | null | null | # coding=utf-8
# flake8: noqa E302
"""
Test plugin infrastructure and hooks.
"""
import argparse
import sys
import pytest
import cmd2
from cmd2 import Cmd2ArgumentParser, exceptions, plugin, with_argparser
# Python 3.5 had some regressions in the unitest.mock module, so use 3rd party mock if available
try:
impor... | 35.256959 | 127 | 0.720528 |
2fac2b1d33693bac89703b1507483f53095af71d | 2,274 | py | Python | setup.py | phst/commonmark.py | d031003aa23cfce1787cfb29c1eb109b369ca5b7 | [
"BSD-3-Clause"
] | 154 | 2015-12-10T23:17:28.000Z | 2019-04-04T06:49:36.000Z | setup.py | phst/commonmark.py | d031003aa23cfce1787cfb29c1eb109b369ca5b7 | [
"BSD-3-Clause"
] | 131 | 2019-07-02T15:56:33.000Z | 2022-03-25T19:54:02.000Z | setup.py | phst/commonmark.py | d031003aa23cfce1787cfb29c1eb109b369ca5b7 | [
"BSD-3-Clause"
] | 53 | 2015-12-08T18:06:51.000Z | 2019-05-02T18:08:10.000Z | from setuptools import setup, find_packages, Command
import io
from os import path
class Test(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import subprocess
import sys
errno = subprocess.call([... | 29.921053 | 77 | 0.631486 |
1476f3323a50426911831ba75d5305e9271bd1c8 | 1,325 | py | Python | ooobuild/dyn/awt/tree/x_tree_node.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/awt/tree/x_tree_node.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/awt/tree/x_tree_node.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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 applicab... | 35.810811 | 76 | 0.757736 |
31dce41266f0db048be59c480a50fa95d1e9f58c | 6,993 | py | Python | tests/training/metrics/attachment_scores_test.py | MSLars/allennlp | 2cdb8742c8c8c3c38ace4bdfadbdc750a1aa2475 | [
"Apache-2.0"
] | 11,433 | 2017-06-27T03:08:46.000Z | 2022-03-31T18:14:33.000Z | tests/training/metrics/attachment_scores_test.py | MSLars/allennlp | 2cdb8742c8c8c3c38ace4bdfadbdc750a1aa2475 | [
"Apache-2.0"
] | 4,006 | 2017-06-26T21:45:43.000Z | 2022-03-31T02:11:10.000Z | tests/training/metrics/attachment_scores_test.py | MSLars/allennlp | 2cdb8742c8c8c3c38ace4bdfadbdc750a1aa2475 | [
"Apache-2.0"
] | 2,560 | 2017-06-26T21:16:53.000Z | 2022-03-30T07:55:46.000Z | from typing import Any, Dict, List, Tuple, Union
import torch
from allennlp.common.testing import (
AllenNlpTestCase,
multi_device,
run_distributed_test,
global_distributed_metric,
)
from allennlp.training.metrics import AttachmentScores
class AttachmentScoresTest(AllenNlpTestCase):
def setup_met... | 32.375 | 100 | 0.57529 |
d0f1457cf7d2ca1d08c176b8c8c02bd3e8bc7386 | 2,138 | py | Python | codebin/codebin/settings.py | DylanTheVillain/CodeBin | f27987166d70a598bff13cc114fee2fb08ac8a2f | [
"Apache-2.0"
] | null | null | null | codebin/codebin/settings.py | DylanTheVillain/CodeBin | f27987166d70a598bff13cc114fee2fb08ac8a2f | [
"Apache-2.0"
] | null | null | null | codebin/codebin/settings.py | DylanTheVillain/CodeBin | f27987166d70a598bff13cc114fee2fb08ac8a2f | [
"Apache-2.0"
] | null | null | null | """
Django settings for codebin project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
im... | 24.022472 | 71 | 0.72638 |
728ffa61541f496316d87f4a76ffa72008add701 | 420 | py | Python | Day-06/Fir_part2.py | parastuffs/adventofcode-2020 | a5e0ba7a8ae47dd2643befb6281a05c22a79545b | [
"CC0-1.0"
] | null | null | null | Day-06/Fir_part2.py | parastuffs/adventofcode-2020 | a5e0ba7a8ae47dd2643befb6281a05c22a79545b | [
"CC0-1.0"
] | null | null | null | Day-06/Fir_part2.py | parastuffs/adventofcode-2020 | a5e0ba7a8ae47dd2643befb6281a05c22a79545b | [
"CC0-1.0"
] | null | null | null |
with open("input", 'r') as f:
lines = f.readlines()
# lines = [x.strip("\n") for x in lines]
lines.append("\n")
total = 0
answers = None
for line in lines:
tmpSet = set()
if line == "\n":
total += len(answers)
answers = None
else:
for letter in line.strip("\n"):
tmpSet.add(letter)
if answers == None:... | 16.8 | 40 | 0.607143 |
8473affbabaf4450ca2f6288edf4a4692cf67bc9 | 407 | py | Python | app/myutil.py | jone0618/DJANGO-OA | 88feea243ee4774023f12a6a76da2c43f73dc1f0 | [
"Apache-2.0"
] | null | null | null | app/myutil.py | jone0618/DJANGO-OA | 88feea243ee4774023f12a6a76da2c43f73dc1f0 | [
"Apache-2.0"
] | null | null | null | app/myutil.py | jone0618/DJANGO-OA | 88feea243ee4774023f12a6a76da2c43f73dc1f0 | [
"Apache-2.0"
] | 3 | 2018-11-15T10:52:11.000Z | 2018-11-17T00:56:58.000Z | import uuid
import hashlib
import random
def get_unique_str():
uuid_str = str(uuid.uuid4()).encode('utf-8')
# 实例化MD5
md5 = hashlib.md5()
# 加密
md5.update(uuid_str)
# 返回32位16进制数据
return md5.hexdigest()
def get_random_color():
r = random.randint(0,256)
g = random.rand... | 12.71875 | 49 | 0.567568 |
d5d24a598cf8ff3c7f416f795be2d9c2020c1be2 | 3,104 | py | Python | aliyun-python-sdk-cms/aliyunsdkcms/request/v20190101/CreateDynamicTagGroupRequest.py | liuzheng/aliyun-openapi-python-sdk | 1ba6743f3d6f2cef57ec9e3be1754b04293c3150 | [
"Apache-2.0"
] | 1 | 2021-03-08T02:59:17.000Z | 2021-03-08T02:59:17.000Z | aliyun-python-sdk-cms/aliyunsdkcms/request/v20190101/CreateDynamicTagGroupRequest.py | bricklayer-Liu/aliyun-openapi-python-sdk | 20da2554de22679fc7c5462c483663e4d79512aa | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-cms/aliyunsdkcms/request/v20190101/CreateDynamicTagGroupRequest.py | bricklayer-Liu/aliyun-openapi-python-sdk | 20da2554de22679fc7c5462c483663e4d79512aa | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 40.842105 | 139 | 0.769652 |
d00104ece65f7f15fd0a55652a3e173316cdbc9d | 7,212 | py | Python | django/mysite/learn/views.py | tochenwei/mypython.github.io | 10e7917b15dee219751e76ed49d9f72c31bc6a27 | [
"Apache-2.0"
] | null | null | null | django/mysite/learn/views.py | tochenwei/mypython.github.io | 10e7917b15dee219751e76ed49d9f72c31bc6a27 | [
"Apache-2.0"
] | null | null | null | django/mysite/learn/views.py | tochenwei/mypython.github.io | 10e7917b15dee219751e76ed49d9f72c31bc6a27 | [
"Apache-2.0"
] | null | null | null | #coding:utf-8
from django.shortcuts import render
from django.http import HttpResponse
def home(request):
string = u"我在自强学堂学习Django,用它来建网站"
TutorialList = ["HTML", "CSS", "jQuery", "Python", "Django"]
info_dict = {'site': u'自强学堂', 'content': u'各种IT技术教程'}
List = map(str, range(100))# 一个长度为100的 List
... | 32.340807 | 123 | 0.627981 |
08df12d4c4ea8e9e4fe2f4d3600dfef3a3d4618f | 3,280 | py | Python | transport_system/settings.py | iradupat/transport_system | cf014b5458d1dfd830bf294d055d6b4830f7e79c | [
"MIT"
] | null | null | null | transport_system/settings.py | iradupat/transport_system | cf014b5458d1dfd830bf294d055d6b4830f7e79c | [
"MIT"
] | null | null | null | transport_system/settings.py | iradupat/transport_system | cf014b5458d1dfd830bf294d055d6b4830f7e79c | [
"MIT"
] | null | null | null | """
Django settings for transport_system project.
Generated by 'django-admin startproject' using Django 3.2.4.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
fro... | 25.826772 | 91 | 0.703659 |
8d189d3812207dcb80cb319417cc8aa1daec56be | 9,679 | py | Python | middleware/legato/library/plugins_java/scripts/generator/widget_bargraph.py | automaate/gfx3.8 | 55bf94302f00c8d513c84d910185cef2ca6b5be2 | [
"0BSD"
] | null | null | null | middleware/legato/library/plugins_java/scripts/generator/widget_bargraph.py | automaate/gfx3.8 | 55bf94302f00c8d513c84d910185cef2ca6b5be2 | [
"0BSD"
] | null | null | null | middleware/legato/library/plugins_java/scripts/generator/widget_bargraph.py | automaate/gfx3.8 | 55bf94302f00c8d513c84d910185cef2ca6b5be2 | [
"0BSD"
] | null | null | null | widget = WidgetDefault()
widget.width = 101
widget.height = 101
widget.border = "None"
widget.background = "None"
commonDefaults["BarGraphWidget"] = widget
def generateBarGraphWidget(file, screen, bar, parentName):
name = bar.getName()
file.write(" %s = leBarGraphWidget_New();" % (name))
generateBase... | 37.661479 | 130 | 0.648414 |
5148e3a0654a781bc571b37f38197b16cad3d0ed | 2,860 | py | Python | main/admin.py | oronibrian/Tenant | 42662797db54f8f169a570c920795c487ce3896a | [
"MIT"
] | 24 | 2015-01-28T20:02:27.000Z | 2021-10-03T15:29:44.000Z | main/admin.py | oronibrian/Tenant | 42662797db54f8f169a570c920795c487ce3896a | [
"MIT"
] | 31 | 2015-01-19T20:51:40.000Z | 2018-12-13T14:54:01.000Z | main/admin.py | oronibrian/Tenant | 42662797db54f8f169a570c920795c487ce3896a | [
"MIT"
] | 20 | 2015-11-15T14:07:20.000Z | 2021-10-03T17:07:42.000Z | from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from main import models
from django.core import urlresolvers
from django.utils.html import format_html
from django.utils.safestring import mark_safe
class BuildingFileInline(admin.TabularInline):
model = models.BuildingFile
... | 26.481481 | 78 | 0.701748 |
f904f95cb533ca4db51ea247762438e083f0b3ff | 5,224 | py | Python | example/generic_social_network/app/models/tables/my_model.py | Patreon/cartographer | fe5c03decf01c9f7894bb9cf1f839af435143527 | [
"Apache-2.0"
] | 29 | 2016-03-30T00:53:42.000Z | 2022-03-02T23:45:12.000Z | example/generic_social_network/app/models/tables/my_model.py | Patreon/cartographer | fe5c03decf01c9f7894bb9cf1f839af435143527 | [
"Apache-2.0"
] | 20 | 2016-04-19T18:34:05.000Z | 2022-02-14T14:18:33.000Z | example/generic_social_network/app/models/tables/my_model.py | Patreon/cartographer | fe5c03decf01c9f7894bb9cf1f839af435143527 | [
"Apache-2.0"
] | 5 | 2016-04-28T00:44:24.000Z | 2019-10-26T08:09:17.000Z | import generic_social_network
from flask_sqlalchemy import Model
from sqlalchemy import inspect
from sqlalchemy.ext.compiler import compiles
from sqlalchemy.sql.expression import Insert
from generic_social_network.app.services.caching import clear_request_cache
class InsertOnDuplicate(Insert):
pass
@compiles(In... | 33.487179 | 98 | 0.669793 |
8088f475688161fc949a6e231d73d1ef42d5aa36 | 26,713 | py | Python | dash_docs/chapters/testing/index.py | kozo2/dash-docs | 5140cfd1fda439233e8b95e2443332a32a2453f5 | [
"MIT"
] | null | null | null | dash_docs/chapters/testing/index.py | kozo2/dash-docs | 5140cfd1fda439233e8b95e2443332a32a2453f5 | [
"MIT"
] | null | null | null | dash_docs/chapters/testing/index.py | kozo2/dash-docs | 5140cfd1fda439233e8b95e2443332a32a2453f5 | [
"MIT"
] | null | null | null | import dash_html_components as html
import dash_core_components as dcc
from dash_docs import reusable_components as rc
from dash_docs import tools
layout = html.Div([
rc.Markdown(u"""
# Dash Testing
*New in Dash v1.0*
*support Dash for R testing added in v1.1.0*
`dash.testing` \U0001f9ea provide... | 52.79249 | 634 | 0.722457 |
654e0a0734dfc35991b7231f70c7bc73fe9e7382 | 127 | py | Python | app.py | Taycode/searchThem | 6a8ef74b1fb8a3803246d57513f81108c24110e0 | [
"MIT"
] | null | null | null | app.py | Taycode/searchThem | 6a8ef74b1fb8a3803246d57513f81108c24110e0 | [
"MIT"
] | null | null | null | app.py | Taycode/searchThem | 6a8ef74b1fb8a3803246d57513f81108c24110e0 | [
"MIT"
] | null | null | null | from src import create_app
app = create_app()
if __name__ == "__main__":
app.run(host="0.0.0.0", debug=True, port=5002)
| 15.875 | 50 | 0.669291 |
140eb499dc421c8d7c05919ed928b186046f7e03 | 3,314 | py | Python | stereo_vision/stereo_vision.py | extra2000/stereo-vision | 031a8bcaab53064723c1f5b2f32a2754365c4a8a | [
"MIT"
] | null | null | null | stereo_vision/stereo_vision.py | extra2000/stereo-vision | 031a8bcaab53064723c1f5b2f32a2754365c4a8a | [
"MIT"
] | null | null | null | stereo_vision/stereo_vision.py | extra2000/stereo-vision | 031a8bcaab53064723c1f5b2f32a2754365c4a8a | [
"MIT"
] | null | null | null | import os
import logging
import numpy as np
import cv2
logger = logging.getLogger(__name__)
class StereoVision:
"""Stereo Vision
"""
def __init__(self):
"""Implement Stereo Vision
"""
self.cfg = None
@staticmethod
def get_disparity_map(leftimage, rightimage, **kwargs):... | 30.40367 | 95 | 0.609234 |
79fd8009d5314a1ffe44ba4ece31fb407089909b | 631 | py | Python | src/settings.py | dinulade101/apartment-finder | 397b75edb7ae3fb43703060666a9af1228d21af8 | [
"MIT"
] | null | null | null | src/settings.py | dinulade101/apartment-finder | 397b75edb7ae3fb43703060666a9af1228d21af8 | [
"MIT"
] | null | null | null | src/settings.py | dinulade101/apartment-finder | 397b75edb7ae3fb43703060666a9af1228d21af8 | [
"MIT"
] | null | null | null | '''
This file contains all the settings such as the University coordinates for the
program
'''
# set the minimum and maximum prices for the apartments
MIN_PRICE = 0
MAX_PRICE = 1299
#DELAY = 10
# maximum distance away from university
MAX_DIST_TO_UNI = 100
# maximum distance away closest LRT station
MAX_DIST_TO_LRT ... | 21.033333 | 101 | 0.73851 |
0ddf70bf8e1bbf5bc20b4ce995028fd8820e67d8 | 841 | py | Python | auctioning_platform/main/main/redis.py | nhdinh/smp-modulith | 84c31b36e9b449fe3135f3802c1bbc362e7fb459 | [
"MIT"
] | 299 | 2019-09-13T23:03:29.000Z | 2022-03-24T09:20:43.000Z | auctioning_platform/main/main/redis.py | winston-won/clean-architecture | 95546b29c9a5ff0e16c7f67b9ab736749e87f8ae | [
"MIT"
] | 109 | 2019-11-03T12:16:16.000Z | 2021-07-26T08:32:28.000Z | auctioning_platform/main/main/redis.py | winston-won/clean-architecture | 95546b29c9a5ff0e16c7f67b9ab736749e87f8ae | [
"MIT"
] | 38 | 2019-09-13T23:03:34.000Z | 2022-03-24T09:21:10.000Z | from types import TracebackType
from typing import Optional, Type
from redis import StrictRedis
from typing_extensions import Literal
from foundation.locks import AlreadyLocked, Lock
class RedisLock(Lock):
LOCK_VALUE = "LOCKED"
def __init__(self, redis: StrictRedis, name: str, timeout: int = 30) -> None:
... | 30.035714 | 120 | 0.690844 |
b7451b1e6d95dc74a2b1c40d6a3e64648c4455e8 | 209 | py | Python | bitcoin_3xbit/wsgi.py | fabio-jreis/bitcoin_3xbit | 0add32e8c9933fa350f16ca9ae8e736736501556 | [
"MIT"
] | null | null | null | bitcoin_3xbit/wsgi.py | fabio-jreis/bitcoin_3xbit | 0add32e8c9933fa350f16ca9ae8e736736501556 | [
"MIT"
] | null | null | null | bitcoin_3xbit/wsgi.py | fabio-jreis/bitcoin_3xbit | 0add32e8c9933fa350f16ca9ae8e736736501556 | [
"MIT"
] | null | null | null | import os
from django.core.wsgi import get_wsgi_application
from dj_static import Cling
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bitcoin_3xbit.settings')
application = Cling(get_wsgi_application())
| 23.222222 | 73 | 0.832536 |
9fe1c7c83a2ff4fc56329800a59e1e2f6172694d | 5,993 | py | Python | rasa/core/train.py | n01deas/rasa | 79f0feeb02919142eb06b8c52da5632f1c25c251 | [
"Apache-2.0"
] | 1 | 2021-06-13T10:56:23.000Z | 2021-06-13T10:56:23.000Z | rasa/core/train.py | n01deas/rasa | 79f0feeb02919142eb06b8c52da5632f1c25c251 | [
"Apache-2.0"
] | 6 | 2020-01-28T23:04:20.000Z | 2022-02-10T00:43:04.000Z | rasa/core/train.py | n01deas/rasa | 79f0feeb02919142eb06b8c52da5632f1c25c251 | [
"Apache-2.0"
] | 1 | 2019-10-02T17:06:44.000Z | 2019-10-02T17:06:44.000Z | import argparse
import logging
import os
import tempfile
import typing
from typing import Dict, Optional, Text, Union, List
from rasa.constants import NUMBER_OF_TRAINING_STORIES_FILE, PERCENTAGE_KEY
from rasa.core.domain import Domain
from rasa.utils.common import TempDirectoryPath
if typing.TYPE_CHECKING:
from r... | 30.733333 | 88 | 0.637577 |
ded9933894e8e3db38fbfb6c5e1ed4704abc0efb | 7,751 | py | Python | great_expectations/expectations/core/expect_column_most_common_value_to_be_in_set.py | aworld1/great_expectations | e462af40eac37b6be751ab31079becc797299ebe | [
"Apache-2.0"
] | null | null | null | great_expectations/expectations/core/expect_column_most_common_value_to_be_in_set.py | aworld1/great_expectations | e462af40eac37b6be751ab31079becc797299ebe | [
"Apache-2.0"
] | null | null | null | great_expectations/expectations/core/expect_column_most_common_value_to_be_in_set.py | aworld1/great_expectations | e462af40eac37b6be751ab31079becc797299ebe | [
"Apache-2.0"
] | null | null | null | from typing import Dict, List, Optional, Union
import numpy as np
import pandas as pd
from great_expectations.core.batch import Batch
from great_expectations.core.expectation_configuration import ExpectationConfiguration
from great_expectations.execution_engine import ExecutionEngine, PandasExecutionEngine
from great... | 39.345178 | 121 | 0.615792 |
1c87573b564233192990912b6a63b06c01a08090 | 8,234 | py | Python | source_convert_IFF_code/321/DWD_oseas_data_extract_station_level_pressure_pacific.py | glamod/glamod-nuim | eed6f9d7d71b0c456ef39fdea6b58677e13ab50c | [
"BSD-3-Clause"
] | null | null | null | source_convert_IFF_code/321/DWD_oseas_data_extract_station_level_pressure_pacific.py | glamod/glamod-nuim | eed6f9d7d71b0c456ef39fdea6b58677e13ab50c | [
"BSD-3-Clause"
] | 23 | 2022-01-28T13:57:39.000Z | 2022-03-28T09:34:41.000Z | source_convert_IFF_code/321/DWD_oseas_data_extract_station_level_pressure_pacific.py | glamod/glamod-nuim | eed6f9d7d71b0c456ef39fdea6b58677e13ab50c | [
"BSD-3-Clause"
] | 1 | 2019-01-24T12:06:06.000Z | 2019-01-24T12:06:06.000Z |
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 19 09:02:55 2019
@author: 67135099
"""
##reads all the files in the current working directory, make sure only input files are in folde
import os
#import numpy as np
os.chdir(r"D:/DWD_overseas_subdy/data_pacific/")
files = [ f for f in os.listdir( os.curd... | 49.60241 | 146 | 0.584285 |
9e6df3eebcaa856f35001c2cdca6fb92ecffad8a | 163 | py | Python | testdata/python/demo1.py | fanghon/antiplag | c20c396e8cd4c5737e29f643e5bec83f0b6e8875 | [
"Apache-2.0"
] | 236 | 2015-01-02T15:07:13.000Z | 2022-03-29T13:50:22.000Z | testdata/python/demo1.py | liang530/antiplag | c20c396e8cd4c5737e29f643e5bec83f0b6e8875 | [
"Apache-2.0"
] | 10 | 2019-10-11T07:04:22.000Z | 2021-10-10T03:44:25.000Z | testdata/python/demo1.py | liang530/antiplag | c20c396e8cd4c5737e29f643e5bec83f0b6e8875 | [
"Apache-2.0"
] | 49 | 2016-11-09T09:50:16.000Z | 2022-03-17T07:16:23.000Z | # coding=utf-8
#导入包
from hyperlpr import *
#导入OpenCV库
import cv2
#读入图片
image = cv2.imread("anpimages/outdoorAA-1.jpg")
#识别结果
print(HyperLPR_PlateRecogntion(image)) | 18.111111 | 47 | 0.779141 |
5029847a784a3392347504a95a75db57ded0b02d | 589 | py | Python | pip_services3_datadog/clients/DataDogMetric.py | pip-services3-python/pip-services3-datadog-python | 5d4549685b8486f1fc663b0e50ea52d019095909 | [
"MIT"
] | null | null | null | pip_services3_datadog/clients/DataDogMetric.py | pip-services3-python/pip-services3-datadog-python | 5d4549685b8486f1fc663b0e50ea52d019095909 | [
"MIT"
] | null | null | null | pip_services3_datadog/clients/DataDogMetric.py | pip-services3-python/pip-services3-datadog-python | 5d4549685b8486f1fc663b0e50ea52d019095909 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from typing import List, Any
from pip_services3_datadog.clients.DataDogMetricPoint import DataDogMetricPoint
class DataDogMetric:
def __init__(self, metric: str, type: str, points: List[DataDogMetricPoint],
service: str = None, host: str = None, tags: Any = None, interval... | 32.722222 | 96 | 0.646859 |
d032be2bf70caab5923fa0e03ecc42ba8c207bd4 | 1,462 | py | Python | scripts/clarify_php.py | ShawnMilo/misc | fc3ab19cefabf0bcd699a968444eb025be8a36ea | [
"BSD-2-Clause"
] | null | null | null | scripts/clarify_php.py | ShawnMilo/misc | fc3ab19cefabf0bcd699a968444eb025be8a36ea | [
"BSD-2-Clause"
] | null | null | null | scripts/clarify_php.py | ShawnMilo/misc | fc3ab19cefabf0bcd699a968444eb025be8a36ea | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
"""
Attempt to un-obfuscate PHP malware. Such malware will often have a
gibberish string which is used as an "alphabet," by referring to indexes
of it throughout the remainder of the code. If you identify this, replace
the gibberish variable name with "$alphabet" before running this for best
resu... | 27.074074 | 73 | 0.649111 |
ec135a1c8d038d25902817e6f6be50e75f8f86ac | 1,122 | py | Python | V00 Main.py | horizonger/Game | 4b9e2a9d76b1640f59f4d9532d236a03bb85717c | [
"MIT"
] | null | null | null | V00 Main.py | horizonger/Game | 4b9e2a9d76b1640f59f4d9532d236a03bb85717c | [
"MIT"
] | 1 | 2020-10-04T18:42:24.000Z | 2020-10-04T18:43:16.000Z | V00 Main.py | horizonger/game | 4b9e2a9d76b1640f59f4d9532d236a03bb85717c | [
"MIT"
] | null | null | null | # Modules
from GameIGuess import Character
from GameIGuess import Episode1
#Episode function
def episode_one(episode):
return episode1.welcome(episode)
def first(step_one):
return episode1.first_choose(step_one)
print("""
WELCOME THE GAME
JUST CHOOSE ONE CHARACTER
Character:
1:WARRIOR
2:O... | 23.87234 | 55 | 0.692513 |
eb5782a54f8bd8bc0bc85a570c4ba19651996fd0 | 146 | py | Python | pyxel/editor/constants.py | luo4lu/python_pyxel | 398fa62ca5a847367d05c6c06cb33cf341ed93cf | [
"MIT"
] | null | null | null | pyxel/editor/constants.py | luo4lu/python_pyxel | 398fa62ca5a847367d05c6c06cb33cf341ed93cf | [
"MIT"
] | null | null | null | pyxel/editor/constants.py | luo4lu/python_pyxel | 398fa62ca5a847367d05c6c06cb33cf341ed93cf | [
"MIT"
] | null | null | null | EDITOR_WIDTH = 240
EDITOR_HEIGHT = 180
TOOL_SELECT = 0
TOOL_PENCIL = 1
TOOL_RECTB = 2
TOOL_RECT = 3
TOOL_CIRCB = 4
TOOL_CIRC = 5
TOOL_BUCKET = 6
| 13.272727 | 19 | 0.746575 |
ed2c6b1d3bf00601dae4d0dc035654db32f5572a | 21,699 | py | Python | noise_analysis/config_tradeStudy_noise_analysis/config_tradeStudy_noise_analysis.py | jomorlier/eVTOL | 753b9261ebb3180bdc344120766c0190f355be90 | [
"MIT"
] | null | null | null | noise_analysis/config_tradeStudy_noise_analysis/config_tradeStudy_noise_analysis.py | jomorlier/eVTOL | 753b9261ebb3180bdc344120766c0190f355be90 | [
"MIT"
] | null | null | null | noise_analysis/config_tradeStudy_noise_analysis/config_tradeStudy_noise_analysis.py | jomorlier/eVTOL | 753b9261ebb3180bdc344120766c0190f355be90 | [
"MIT"
] | 1 | 2020-05-25T17:20:24.000Z | 2020-05-25T17:20:24.000Z | #Noise analysis as part of vehicle top-level trade study
import os
import sys
sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/../..'))
import numpy as np
from gpkit import Model, ureg
from matplotlib import pyplot as plt
from aircraft_models import OnDemandAircraft
from aircraft_models import OnDemandS... | 44.374233 | 143 | 0.729849 |
cab7445cfe861bb056031167f7de308b3daa1c05 | 5,058 | py | Python | tests/scripts/thread-cert/test_coap_observe.py | dismirlian/openthread | 726f793609e11d8f14358cd04385a72a86d1fe74 | [
"BSD-3-Clause"
] | 2 | 2019-07-12T13:19:40.000Z | 2019-07-15T13:39:04.000Z | tests/scripts/thread-cert/test_coap_observe.py | dismirlian/openthread | 726f793609e11d8f14358cd04385a72a86d1fe74 | [
"BSD-3-Clause"
] | 14 | 2020-04-21T19:36:36.000Z | 2021-01-15T01:39:59.000Z | tests/scripts/thread-cert/test_coap_observe.py | dismirlian/openthread | 726f793609e11d8f14358cd04385a72a86d1fe74 | [
"BSD-3-Clause"
] | 1 | 2019-07-16T00:14:53.000Z | 2019-07-16T00:14:53.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2020, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... | 34.643836 | 78 | 0.651443 |
db28a6df928fc285ee359a4f489ed905a58e4a79 | 1,207 | py | Python | series_tiempo_ar_api/apps/management/migrations/0007_auto_20180110_1455.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 28 | 2017-12-16T20:30:52.000Z | 2021-08-11T17:35:04.000Z | series_tiempo_ar_api/apps/management/migrations/0007_auto_20180110_1455.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 446 | 2017-11-16T15:21:40.000Z | 2021-06-10T20:14:21.000Z | series_tiempo_ar_api/apps/management/migrations/0007_auto_20180110_1455.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 12 | 2018-08-23T16:13:32.000Z | 2022-03-01T23:12:28.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-01-10 17:55
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('management', '0006_indexingtask_weekdays_only'),
]
operations = [
migration... | 34.485714 | 192 | 0.583264 |
745d14921f082295c6b84b077dbce67f74005065 | 932 | py | Python | best_time_buy_stock.py | rksaxena/leetcode_solutions | 00c8879f739706653d955c1390e2b3ecf1294b8d | [
"MIT"
] | null | null | null | best_time_buy_stock.py | rksaxena/leetcode_solutions | 00c8879f739706653d955c1390e2b3ecf1294b8d | [
"MIT"
] | null | null | null | best_time_buy_stock.py | rksaxena/leetcode_solutions | 00c8879f739706653d955c1390e2b3ecf1294b8d | [
"MIT"
] | null | null | null |
__author__ = Rohit Kamal Saxena
__email__ = rohit_kamal2003@yahoo.com
"""
https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transaction(i.e., buy one and sell one ... | 27.411765 | 158 | 0.612661 |
1bf8922300cf9c4122a7f081c438711bfdf495fb | 383 | py | Python | mac/asgi.py | Ritwik880/My-awesome-cart | bc818297b251b9c030fe298c0826352deabf3885 | [
"MIT"
] | 2 | 2020-06-30T03:09:23.000Z | 2020-08-09T13:48:07.000Z | mac/asgi.py | Ritwik880/My-awesome-cart | bc818297b251b9c030fe298c0826352deabf3885 | [
"MIT"
] | null | null | null | mac/asgi.py | Ritwik880/My-awesome-cart | bc818297b251b9c030fe298c0826352deabf3885 | [
"MIT"
] | null | null | null | """
ASGI config for mac project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_... | 22.529412 | 78 | 0.780679 |
f0f239334fe2e2b376e32586f30a51db4ac20ba6 | 2,613 | py | Python | cyber_sdk/core/sign_doc.py | SaveTheAles/cyber.py | 69211d4f9e861e3c64990725a4a483d2cbee0be1 | [
"MIT"
] | null | null | null | cyber_sdk/core/sign_doc.py | SaveTheAles/cyber.py | 69211d4f9e861e3c64990725a4a483d2cbee0be1 | [
"MIT"
] | null | null | null | cyber_sdk/core/sign_doc.py | SaveTheAles/cyber.py | 69211d4f9e861e3c64990725a4a483d2cbee0be1 | [
"MIT"
] | null | null | null | """Data objects about SignDoc."""
from __future__ import annotations
import json
import attr
from cyber_proto.cosmos.tx.v1beta1 import SignDoc as SignDoc_pb
from cyber_sdk.core.tx import AuthInfo, TxBody
from cyber_sdk.util.json import JSONSerializable
__all__ = ["SignDoc"]
from cyber_sdk.util.remove_none import ... | 30.383721 | 82 | 0.603521 |
bdff83e540d0f56f6228c23646a9685b09544a14 | 6,667 | py | Python | ait/core/bin/ait_yaml_validate.py | robschneider16/AIT-Core | 628e7f60041c4929b82e55dad1a576fc1e8e5e9f | [
"MIT"
] | 1 | 2019-07-29T20:18:34.000Z | 2019-07-29T20:18:34.000Z | ait/core/bin/ait_yaml_validate.py | seanlu99/AIT-Core | d746079bcff574d930f633bee59337eabf54e99c | [
"MIT"
] | null | null | null | ait/core/bin/ait_yaml_validate.py | seanlu99/AIT-Core | d746079bcff574d930f633bee59337eabf54e99c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Advanced Multi-Mission Operations System (AMMOS) Instrument Toolkit (AIT)
# Bespoke Link to Instruments and Small Satellites (BLISS)
#
# Copyright 2013, by the California Institute of Technology. ALL RIGHTS
# RESERVED. United States Government Sponsorship acknowledged. Any
# commercial use must... | 32.052885 | 78 | 0.655317 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.