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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
31003c512b10b0b0ca56e1c7ca80af3e0e177a3f | 2,662 | py | Python | simple_ddl_parser/tokens.py | burakuyar/simple-ddl-parser | f5714e0947a7cb48c202a91969b6e6d0d9a64d24 | [
"MIT"
] | 46 | 2021-03-07T02:21:29.000Z | 2022-03-24T12:45:03.000Z | simple_ddl_parser/tokens.py | burakuyar/simple-ddl-parser | f5714e0947a7cb48c202a91969b6e6d0d9a64d24 | [
"MIT"
] | 53 | 2021-03-08T08:50:00.000Z | 2022-03-29T06:11:13.000Z | simple_ddl_parser/tokens.py | burakuyar/simple-ddl-parser | f5714e0947a7cb48c202a91969b6e6d0d9a64d24 | [
"MIT"
] | 12 | 2021-06-21T16:14:17.000Z | 2022-03-25T13:52:35.000Z | # statements that used at the start of defenition or in statements without columns
defenition_statements = {
"DROP": "DROP",
"CREATE": "CREATE",
"TABLE": "TABLE",
"DATABASE": "DATABASE",
"SCHEMA": "SCHEMA",
"ALTER": "ALTER",
"TYPE": "TYPE",
"DOMAIN": "DOMAIN",
"REPLACE": "REPLACE",
... | 22.752137 | 82 | 0.545079 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,440 | 0.540947 |
3100684d54c98a60b6eb64626957c2c118c7564c | 7,715 | py | Python | rmexp/worker.py | junjuew/scalable-edge-native-applications | 1ace9ce71bef267880049633160e7cb74c57bddb | [
"Apache-2.0"
] | 1 | 2021-05-12T12:49:15.000Z | 2021-05-12T12:49:15.000Z | rmexp/worker.py | junjuew/scalable-edge-native-applications | 1ace9ce71bef267880049633160e7cb74c57bddb | [
"Apache-2.0"
] | null | null | null | rmexp/worker.py | junjuew/scalable-edge-native-applications | 1ace9ce71bef267880049633160e7cb74c57bddb | [
"Apache-2.0"
] | 1 | 2021-11-21T08:12:19.000Z | 2021-11-21T08:12:19.000Z | from __future__ import absolute_import, division, print_function
import json
import logging
import os
import time
import importlib
import multiprocessing
import cv2
import fire
import logzero
from logzero import logger
import numpy as np
from rmexp import config, cvutils, dbutils, gabriel_pb2, client
from rmexp.sche... | 31.748971 | 125 | 0.564485 | 576 | 0.07466 | 0 | 0 | 0 | 0 | 0 | 0 | 1,541 | 0.199741 |
3101d2087b21203c5098923bc3b4dd50b2a5f5c1 | 616 | py | Python | app/requests/users.py | codingedward/book-a-meal-api | 36756abc225bf7e8306330f2c3e223dc32af7869 | [
"MIT"
] | null | null | null | app/requests/users.py | codingedward/book-a-meal-api | 36756abc225bf7e8306330f2c3e223dc32af7869 | [
"MIT"
] | null | null | null | app/requests/users.py | codingedward/book-a-meal-api | 36756abc225bf7e8306330f2c3e223dc32af7869 | [
"MIT"
] | 2 | 2018-10-01T17:45:19.000Z | 2020-12-07T13:48:25.000Z | from .base import JsonRequest
class PostRequest(JsonRequest):
@staticmethod
def rules():
return {
'email': 'required|email|unique:User,email',
'password': 'required|string|confirmed|least_string:6',
'username': 'required|alpha|least_string:3',
'role': 'i... | 26.782609 | 67 | 0.586039 | 580 | 0.941558 | 0 | 0 | 509 | 0.826299 | 0 | 0 | 283 | 0.459416 |
3101d908081b56ffdf8894a573c86a99a80dea01 | 1,650 | py | Python | kmp.py | mutux/kmp | 9fa87296a79716a22344314d1a19f53833df5b41 | [
"MIT"
] | 3 | 2017-09-23T09:59:23.000Z | 2022-02-25T16:59:05.000Z | kmp.py | mutux/kmp | 9fa87296a79716a22344314d1a19f53833df5b41 | [
"MIT"
] | null | null | null | kmp.py | mutux/kmp | 9fa87296a79716a22344314d1a19f53833df5b41 | [
"MIT"
] | 2 | 2019-04-24T04:30:39.000Z | 2019-12-03T14:05:33.000Z | def kmp(P, T):
# Compute the start position (number of chars) of the longest suffix that matches a prefix,
# and store them into list K, the first element of K is set to be -1, the second
#
K = [] # K[t] store the value that when mismatch happens at t, should move Pattern P K[t] characters ahead
t ... | 55 | 145 | 0.621212 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,152 | 0.698182 |
310233a1e9f02803dc17a9f40655a8b55df02a4a | 1,657 | py | Python | weeklypedia/publish.py | Nintendofan885/weeklypedia | 512be3814a693d7ba3044bda7965e7a5d3d137fd | [
"Unlicense"
] | null | null | null | weeklypedia/publish.py | Nintendofan885/weeklypedia | 512be3814a693d7ba3044bda7965e7a5d3d137fd | [
"Unlicense"
] | null | null | null | weeklypedia/publish.py | Nintendofan885/weeklypedia | 512be3814a693d7ba3044bda7965e7a5d3d137fd | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import json
from os.path import dirname
from argparse import ArgumentParser
from clastic.render import AshesRenderFactory
from common import DEBUG, DEBUG_LIST_ID, SENDKEY
from web import (comma_int,
ISSUE_TEMPLATES_PATH)
from bake import (Issue,
b... | 31.264151 | 86 | 0.674713 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 170 | 0.102595 |
310343fbd38310545ea02277eee138c31da84d40 | 292 | py | Python | scripts/words_gen.py | andybui01/Bloom | 20cc1bbb03f84c6f96a191f92e596013c9ac2da9 | [
"MIT"
] | null | null | null | scripts/words_gen.py | andybui01/Bloom | 20cc1bbb03f84c6f96a191f92e596013c9ac2da9 | [
"MIT"
] | null | null | null | scripts/words_gen.py | andybui01/Bloom | 20cc1bbb03f84c6f96a191f92e596013c9ac2da9 | [
"MIT"
] | null | null | null | import random
import sys
# usage: python3 words_gen.py > list.txt
N = int(sys.argv[1]) # how many words should be in the resulting list
with open("scripts/words.txt", "r") as f:
words = f.readlines()
for i in range(N):
print(words[random.randint(0, 466550 - 1)].rstrip())
| 22.461538 | 69 | 0.657534 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.376712 |
3103a85a9b3f81384b162df662d084203f7e48e2 | 3,037 | py | Python | testing/test_input.py | arunumd/Rover | 622ed4775827514a5add787ffb25b338e8faacf3 | [
"MIT"
] | 1 | 2020-11-22T12:01:25.000Z | 2020-11-22T12:01:25.000Z | testing/test_input.py | arunumd/Rover | 622ed4775827514a5add787ffb25b338e8faacf3 | [
"MIT"
] | null | null | null | testing/test_input.py | arunumd/Rover | 622ed4775827514a5add787ffb25b338e8faacf3 | [
"MIT"
] | 2 | 2020-05-16T13:41:35.000Z | 2021-12-30T10:28:04.000Z | import unittest
from modules.Input import *
class CommandInputTest(unittest.TestCase):
def setUp(self):
self.field_a_locations = ["gOtOFieldAroW8",
" go to fieLDA RoW 18 ",
"gOTOfield A rOW88"]
self.field_b_locations = ["gOtOFie... | 46.723077 | 79 | 0.622654 | 2,940 | 0.968061 | 0 | 0 | 0 | 0 | 0 | 0 | 450 | 0.148173 |
31042f7232eebc872883e4144e0716776054ead0 | 14,601 | py | Python | rmgpy/kinetics/chebyshevTest.py | pm15ma/RMG-Py | ca2f663c711ec45012afc911138716aaf0049296 | [
"MIT"
] | 1 | 2020-10-14T12:01:47.000Z | 2020-10-14T12:01:47.000Z | rmgpy/kinetics/chebyshevTest.py | pm15ma/RMG-Py | ca2f663c711ec45012afc911138716aaf0049296 | [
"MIT"
] | null | null | null | rmgpy/kinetics/chebyshevTest.py | pm15ma/RMG-Py | ca2f663c711ec45012afc911138716aaf0049296 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
###############################################################################
# #
# RMG - Reaction Mechanism Generator #
# ... | 43.455357 | 120 | 0.562496 | 12,018 | 0.823094 | 0 | 0 | 0 | 0 | 0 | 0 | 4,500 | 0.308198 |
31048c01335723cf99267bce9b58d406c5d4fced | 3,230 | py | Python | SceneDistribution_Blender/Source/__init__.py | FilmakademieRnd/v-p-e-t | d7dd8efb6d4aa03784e1bb4f941d2bcef919f28b | [
"MIT"
] | 62 | 2016-10-12T17:29:37.000Z | 2022-02-27T01:24:48.000Z | SceneDistribution_Blender/Source/__init__.py | FilmakademieRnd/v-p-e-t | d7dd8efb6d4aa03784e1bb4f941d2bcef919f28b | [
"MIT"
] | 75 | 2017-01-05T12:02:43.000Z | 2021-04-06T19:07:50.000Z | SceneDistribution_Blender/Source/__init__.py | FilmakademieRnd/v-p-e-t | d7dd8efb6d4aa03784e1bb4f941d2bcef919f28b | [
"MIT"
] | 16 | 2016-10-12T17:29:42.000Z | 2021-12-01T17:27:33.000Z | """
-----------------------------------------------------------------------------
This source file is part of VPET - Virtual Production Editing Tools
http://vpet.research.animationsinstitut.de/
http://github.com/FilmakademieRnd/VPET
Copyright (c) 2021 Filmakademie Baden-Wuerttemberg, Animationsinstitut R&D Lab
This p... | 37.55814 | 96 | 0.71517 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,105 | 0.650696 |
310520cb4491a27df4f8da00ca88e83d5b43b0ea | 3,453 | py | Python | defences/CIFAR10/standard_training.py | calinbiberea/imperial-individual-project | 86f224f183b8348d21b4c7a4aed408cd1ca41df1 | [
"MIT"
] | null | null | null | defences/CIFAR10/standard_training.py | calinbiberea/imperial-individual-project | 86f224f183b8348d21b4c7a4aed408cd1ca41df1 | [
"MIT"
] | null | null | null | defences/CIFAR10/standard_training.py | calinbiberea/imperial-individual-project | 86f224f183b8348d21b4c7a4aed408cd1ca41df1 | [
"MIT"
] | null | null | null | # Unlike the other datasets, CIFAR-10 uses ResNet and suffers from
# a variety of problems, including exploding gradients
import torch
import torch.nn as nn
from tqdm.notebook import tnrange, tqdm
# For loading model sanely
import os.path
import sys
# This here actually adds the path
sys.path.append("../../")
import ... | 30.026087 | 87 | 0.645815 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,110 | 0.32146 |
31052f39ded0bd3a3116064ecf6b648965c83185 | 4,510 | py | Python | src/romt/manifest.py | hehaoqian/romt | 02d5d3f10f22883e277a319e19c199e349b1c8e5 | [
"MIT"
] | 29 | 2020-05-09T17:06:06.000Z | 2022-03-30T16:18:01.000Z | src/romt/manifest.py | hehaoqian/romt | 02d5d3f10f22883e277a319e19c199e349b1c8e5 | [
"MIT"
] | 12 | 2020-05-23T13:10:51.000Z | 2022-03-27T21:48:18.000Z | src/romt/manifest.py | hehaoqian/romt | 02d5d3f10f22883e277a319e19c199e349b1c8e5 | [
"MIT"
] | 9 | 2020-10-15T17:07:13.000Z | 2022-03-13T18:47:25.000Z | #!/usr/bin/env python3
# coding=utf-8
import copy
from pathlib import Path
from typing import (
Any,
Generator,
Iterable,
List,
MutableMapping,
Optional,
)
import toml
from romt import error
def target_matches_any(target: str, expected_targets: Iterable[str]) -> bool:
if target == "*":
... | 30.268456 | 79 | 0.595787 | 4,035 | 0.894678 | 723 | 0.16031 | 1,625 | 0.36031 | 0 | 0 | 727 | 0.161197 |
3105dd47d27bbfccfce90631a437c8b92d2e3fa8 | 212 | py | Python | examples/unread_sms.py | MikeRixWolfe/pygooglevoice | 1da84249e4ee3ecda921e7a20495074ff89a99cd | [
"BSD-3-Clause"
] | 1 | 2015-08-19T18:22:10.000Z | 2015-08-19T18:22:10.000Z | examples/unread_sms.py | MikeRixWolfe/pygooglevoice | 1da84249e4ee3ecda921e7a20495074ff89a99cd | [
"BSD-3-Clause"
] | null | null | null | examples/unread_sms.py | MikeRixWolfe/pygooglevoice | 1da84249e4ee3ecda921e7a20495074ff89a99cd | [
"BSD-3-Clause"
] | null | null | null | from googlevoice import Voice
voice = Voice()
voice.login()
for message in voice.sms().messages:
#if not message.isRead:
print(message.id, message.phoneNumber, message.messageText)
#message.mark(1)
| 21.2 | 63 | 0.726415 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.183962 |
310702fdf551ae6fbf1e07ce937cc37a28affac0 | 233 | py | Python | libra/handlers/user.py | pitomba/libra | 8a2e4008f5a6038995ed03ea29d1cbf3dc3c589d | [
"MIT"
] | 2 | 2015-03-22T09:44:36.000Z | 2015-06-04T06:30:13.000Z | libra/handlers/user.py | pitomba/libra | 8a2e4008f5a6038995ed03ea29d1cbf3dc3c589d | [
"MIT"
] | null | null | null | libra/handlers/user.py | pitomba/libra | 8a2e4008f5a6038995ed03ea29d1cbf3dc3c589d | [
"MIT"
] | null | null | null | # coding: utf-8
from tornado.web import RequestHandler
from libra.handlers.base import authenticated
class UserHandler(RequestHandler):
@authenticated
def post(self, user, **kwargs):
self.write({"msg": "Success"})
| 21.181818 | 45 | 0.716738 | 129 | 0.553648 | 0 | 0 | 89 | 0.381974 | 0 | 0 | 29 | 0.124464 |
31079504b1f3b5dee16171b9a8d5ac6fd490a1d8 | 1,327 | py | Python | plextraktsync/commands/unmatched.py | RoyXiang/PlexTraktSync | 3f8d42448a3ba335d547e317dc8ca40c9ef6313e | [
"MIT"
] | null | null | null | plextraktsync/commands/unmatched.py | RoyXiang/PlexTraktSync | 3f8d42448a3ba335d547e317dc8ca40c9ef6313e | [
"MIT"
] | null | null | null | plextraktsync/commands/unmatched.py | RoyXiang/PlexTraktSync | 3f8d42448a3ba335d547e317dc8ca40c9ef6313e | [
"MIT"
] | null | null | null | import click
from plextraktsync.commands.login import ensure_login
from plextraktsync.factory import factory
from plextraktsync.walker import WalkConfig, Walker
def unmatched(no_progress_bar: bool, local: bool):
config = factory.run_config().update(progressbar=not no_progress_bar)
ensure_login()
plex = f... | 28.847826 | 84 | 0.602864 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 186 | 0.140166 |
31084212e6f6b3216d28d48c58d75e7c0f29d92d | 1,940 | py | Python | montepython/likelihoods/covfefe/__init__.py | Maquiner/Monte_Python_2CCL | 900d362def8f0b3607645f911b2fac0f102d6700 | [
"MIT"
] | 1 | 2018-04-29T06:48:35.000Z | 2018-04-29T06:48:35.000Z | montepython/likelihoods/covfefe/__init__.py | Maquiner/Monte_Python_2CCL | 900d362def8f0b3607645f911b2fac0f102d6700 | [
"MIT"
] | null | null | null | montepython/likelihoods/covfefe/__init__.py | Maquiner/Monte_Python_2CCL | 900d362def8f0b3607645f911b2fac0f102d6700 | [
"MIT"
] | 2 | 2019-10-11T09:46:35.000Z | 2019-12-05T14:55:04.000Z | import os
import numpy as np
from montepython.likelihood_class import Likelihood
import montepython.io_mp as io_mp
import warnings
import ccl_tools as tools
import pyccl as ccl
class covfefe(Likelihood):
# initialization routine
def __init__(self, path, data, command_line):
Likelihood.__init__(sel... | 29.393939 | 99 | 0.615464 | 1,759 | 0.906701 | 0 | 0 | 0 | 0 | 0 | 0 | 295 | 0.152062 |
3109cfe9dfb7d000bea9fd6f0dead3f4122daff9 | 1,156 | py | Python | tests/integration/web3/conftest.py | cducrest/eth-tester-rpc | f34dcce2b4110010e3b54531a5cd8add4df43beb | [
"MIT"
] | 3 | 2018-08-09T08:33:30.000Z | 2021-10-06T15:05:57.000Z | tests/integration/web3/conftest.py | cducrest/eth-tester-rpc | f34dcce2b4110010e3b54531a5cd8add4df43beb | [
"MIT"
] | 11 | 2018-09-15T18:58:24.000Z | 2020-11-30T17:00:46.000Z | tests/integration/web3/conftest.py | cducrest/eth-tester-rpc | f34dcce2b4110010e3b54531a5cd8add4df43beb | [
"MIT"
] | 3 | 2018-09-24T13:47:23.000Z | 2020-11-25T16:39:08.000Z | from eth_utils import (
to_bytes,
)
from eth_utils.toolz import (
identity,
)
import pytest
from web3._utils.module_testing.emitter_contract import (
CONTRACT_EMITTER_ABI,
CONTRACT_EMITTER_CODE,
)
from web3._utils.module_testing.math_contract import (
MATH_ABI,
MATH_BYTECODE,
)
from web3._utils.... | 25.130435 | 98 | 0.772491 | 0 | 0 | 0 | 0 | 726 | 0.628028 | 0 | 0 | 32 | 0.027682 |
310bacdf46c233952b779b59db8e0cb5aa5c4604 | 5,068 | py | Python | planning/domains/depth/depthGenerator.py | xlbandy/fape | 8a00f9d4c20f722930c11d88b60e0e82f523a439 | [
"BSD-2-Clause"
] | 14 | 2017-01-09T23:25:12.000Z | 2022-02-16T12:08:48.000Z | planning/domains/depth/depthGenerator.py | xlbandy/fape | 8a00f9d4c20f722930c11d88b60e0e82f523a439 | [
"BSD-2-Clause"
] | 7 | 2018-05-18T08:27:03.000Z | 2022-03-23T06:39:42.000Z | planning/domains/depth/depthGenerator.py | xlbandy/fape | 8a00f9d4c20f722930c11d88b60e0e82f523a439 | [
"BSD-2-Clause"
] | 8 | 2016-12-09T13:31:43.000Z | 2022-02-16T12:08:50.000Z | from __future__ import division
import itertools
import json
import math
import os
import random
import shutil
import subprocess
import sys
durationA = str(5)
durationB = str(4)
durationC = str(1)
def main():
if len(sys.argv) > 1:
nbDepth = int(sys.argv[1])
if nbDepth < 2 :
nbDept... | 36.992701 | 89 | 0.414759 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,568 | 0.309392 |
310c2ef28341d61c8889cc1642f625b5908d2dd0 | 24,120 | py | Python | idc/settings.py | fedorov/IDC-WebApp | a2e2ef492d6d227c1b617e0da2a77a710e5415a6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | idc/settings.py | fedorov/IDC-WebApp | a2e2ef492d6d227c1b617e0da2a77a710e5415a6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | idc/settings.py | fedorov/IDC-WebApp | a2e2ef492d6d227c1b617e0da2a77a710e5415a6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | ###
# Copyright 2015-2020, Institute for Systems Biology
#
# 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 la... | 37.628705 | 165 | 0.651368 | 160 | 0.006633 | 0 | 0 | 0 | 0 | 0 | 0 | 13,855 | 0.57442 |
310c8eff631db50cd8a05c87d1793446b7ad450c | 4,065 | py | Python | examples/fixed_play.py | wwxFromTju/malib | 7cd2a4af55cf1f56da8854e26ea7a4f3782ceea2 | [
"MIT"
] | 6 | 2021-05-19T10:25:36.000Z | 2021-12-27T03:30:33.000Z | examples/fixed_play.py | wwxFromTju/malib | 7cd2a4af55cf1f56da8854e26ea7a4f3782ceea2 | [
"MIT"
] | 1 | 2021-05-29T04:51:37.000Z | 2021-05-30T06:18:10.000Z | examples/fixed_play.py | ying-wen/malib_deprecated | 875338b81c4d87064ad31201f461ef742db05f25 | [
"MIT"
] | 1 | 2021-05-31T16:16:12.000Z | 2021-05-31T16:16:12.000Z | # Created by yingwen at 2019-03-16
from multiprocessing import Process
from malib.agents.agent_factory import *
from malib.environments import DifferentialGame
from malib.logger.utils import set_logger
from malib.samplers.sampler import MASampler
from malib.trainers import MATrainer
from malib.utils.random import set_... | 28.229167 | 85 | 0.613284 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 294 | 0.072325 |
310e8a0bf4712762b03a5c5b70b449b48e5c9b02 | 776 | py | Python | hypha/apply/projects/templatetags/payment_request_tools.py | maxpearl/hypha | e181ebadfb744aab34617bb766e746368d6f2de0 | [
"BSD-3-Clause"
] | 16 | 2020-01-24T11:52:46.000Z | 2021-02-02T22:21:04.000Z | hypha/apply/projects/templatetags/payment_request_tools.py | maxpearl/hypha | e181ebadfb744aab34617bb766e746368d6f2de0 | [
"BSD-3-Clause"
] | 538 | 2020-01-24T08:27:13.000Z | 2021-04-05T07:15:01.000Z | hypha/apply/projects/templatetags/payment_request_tools.py | maxpearl/hypha | e181ebadfb744aab34617bb766e746368d6f2de0 | [
"BSD-3-Clause"
] | 17 | 2020-02-07T14:55:54.000Z | 2021-04-04T19:32:38.000Z | import decimal
from django import template
register = template.Library()
@register.simple_tag
def can_change_status(payment_request, user):
return payment_request.can_user_change_status(user)
@register.simple_tag
def can_delete(payment_request, user):
return payment_request.can_user_delete(user)
@regist... | 20.972973 | 59 | 0.748711 | 0 | 0 | 0 | 0 | 689 | 0.887887 | 0 | 0 | 60 | 0.07732 |
310f1e6f71fa93dea9a16a0f58d9908f5ecbe8c1 | 15,870 | py | Python | pylabnet/hardware/counter/swabian_instruments/qudi/slow_ctr.py | wi11dey/pylabnet | a6e3362f727c45aaa60e61496e858ae92e85574d | [
"MIT"
] | 10 | 2020-01-07T23:28:49.000Z | 2022-02-02T19:09:17.000Z | pylabnet/hardware/counter/swabian_instruments/qudi/slow_ctr.py | wi11dey/pylabnet | a6e3362f727c45aaa60e61496e858ae92e85574d | [
"MIT"
] | 249 | 2019-12-28T19:38:49.000Z | 2022-03-28T16:45:32.000Z | pylabnet/hardware/counter/swabian_instruments/qudi/slow_ctr.py | wi11dey/pylabnet | a6e3362f727c45aaa60e61496e858ae92e85574d | [
"MIT"
] | 5 | 2020-11-17T19:45:10.000Z | 2022-01-04T18:07:04.000Z | """ pylabnet measurement and service classes for Swabian Instruments TimeTagger
which implements qudi's SlowCounter interface.
This file contains pylabnet wrapper and service classes to allow qudi to
access Swabian Instruments TT through pylabnet network as SlowCounter.
Steps:
- instantiate TimeTagger
- instantiate p... | 36.65127 | 120 | 0.60189 | 15,173 | 0.956081 | 0 | 0 | 0 | 0 | 0 | 0 | 10,330 | 0.650914 |
310f4d83fe0811735557a3547fef59abd4752a52 | 174,167 | py | Python | dev0s/classes/defaults/files.py | vandenberghinc/dev0s | 1c9629e2a81ad111fd3e74929aaeb05c97be0276 | [
"MIT"
] | 1 | 2021-03-09T20:14:29.000Z | 2021-03-09T20:14:29.000Z | dev0s/classes/defaults/files.py | vandenberghinc/dev0s | 1c9629e2a81ad111fd3e74929aaeb05c97be0276 | [
"MIT"
] | null | null | null | dev0s/classes/defaults/files.py | vandenberghinc/dev0s | 1c9629e2a81ad111fd3e74929aaeb05c97be0276 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Must still be recoded with some cleaner code.
"""
# imports.
from dev0s.classes.config import *
from dev0s.classes import utils
from dev0s.classes.defaults.color import color, symbol
from dev0s.classes import console
from dev0s.classes.defaults.exceptions import Excep... | 33.532345 | 366 | 0.647849 | 172,855 | 0.992404 | 0 | 0 | 456 | 0.002618 | 0 | 0 | 43,000 | 0.246874 |
31106007c9cf6a0a237a91ff54fe5bef674f40ab | 619 | py | Python | object_torus.py | KeerthanBhat/pygame-Search-the-Key | f3488c164c1dfca0ae85d3af8ad6bfc612676dc3 | [
"MIT"
] | null | null | null | object_torus.py | KeerthanBhat/pygame-Search-the-Key | f3488c164c1dfca0ae85d3af8ad6bfc612676dc3 | [
"MIT"
] | null | null | null | object_torus.py | KeerthanBhat/pygame-Search-the-Key | f3488c164c1dfca0ae85d3af8ad6bfc612676dc3 | [
"MIT"
] | 2 | 2019-10-19T15:55:14.000Z | 2019-10-28T18:05:15.000Z | import pygame
from pygame.locals import *
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
def main():
pygame.init()
glutInit()
display = (800,600)
pygame.display.set_mode(display, DOUBLEBUF|OPENGL)
gluPerspective(45, (display[0]/display[1]), 0.1, 50.0)
glTranslatef(0.0, 0.0, -5)
w... | 19.967742 | 55 | 0.686591 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3110dcee53cb41b5b07143e76922f9343f0ed9c4 | 2,794 | py | Python | samples/snippets/translate_v3_batch_translate_text_with_glossary_and_model.py | renovate-bot/python-translate | 1ab82aa12ecd4bbb0195e4c39ca476b944cdddbc | [
"Apache-2.0"
] | 70 | 2020-03-03T04:02:23.000Z | 2022-03-29T20:09:22.000Z | samples/snippets/translate_v3_batch_translate_text_with_glossary_and_model.py | renovate-bot/python-translate | 1ab82aa12ecd4bbb0195e4c39ca476b944cdddbc | [
"Apache-2.0"
] | 130 | 2020-01-31T20:17:09.000Z | 2022-03-24T17:01:21.000Z | samples/snippets/translate_v3_batch_translate_text_with_glossary_and_model.py | renovate-bot/python-translate | 1ab82aa12ecd4bbb0195e4c39ca476b944cdddbc | [
"Apache-2.0"
] | 47 | 2020-01-31T21:25:59.000Z | 2022-03-31T20:52:21.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 35.820513 | 83 | 0.710451 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,537 | 0.550107 |
3110e66487f691f9c1b42704fe374f3e4fc85644 | 4,044 | py | Python | movo_common/movo_third_party/executive_smach/smach_ros/test/concurrence.py | zkytony/kinova-movo | 37d7454b2dc589d44133f3913f567b9cc321a66d | [
"BSD-3-Clause"
] | 2 | 2019-12-07T20:45:15.000Z | 2019-12-25T01:21:32.000Z | movo_common/movo_third_party/executive_smach/smach_ros/test/concurrence.py | ALAN-NUS/kinova_movo | 05a0451f5c563359ae0ffe3280e1df85caec9e55 | [
"BSD-3-Clause"
] | null | null | null | movo_common/movo_third_party/executive_smach/smach_ros/test/concurrence.py | ALAN-NUS/kinova_movo | 05a0451f5c563359ae0ffe3280e1df85caec9e55 | [
"BSD-3-Clause"
] | 1 | 2020-01-21T11:05:24.000Z | 2020-01-21T11:05:24.000Z | #!/usr/bin/env python
import roslib; roslib.load_manifest('smach_ros')
import rospy
import rostest
import unittest
from actionlib import *
from actionlib.msg import *
from smach import *
from smach_ros import *
from smach_msgs.msg import *
# Static goals
g1 = TestGoal(1) # This goal should succeed
g2 = TestGoal(2... | 30.870229 | 84 | 0.562067 | 3,424 | 0.846686 | 0 | 0 | 0 | 0 | 0 | 0 | 1,027 | 0.253956 |
31118c5b5246a2ec094961b6d1e7c75e1bcdc0c9 | 279 | py | Python | KaratAPP/models.py | MHuiG/Karat-Django-Backend | 8887417bb3eee302a1639e247957539479d2ef67 | [
"MIT"
] | null | null | null | KaratAPP/models.py | MHuiG/Karat-Django-Backend | 8887417bb3eee302a1639e247957539479d2ef67 | [
"MIT"
] | null | null | null | KaratAPP/models.py | MHuiG/Karat-Django-Backend | 8887417bb3eee302a1639e247957539479d2ef67 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
##########################################################################
#投票
class Vote(models.Model):
data=models.CharField(max_length=255)
########################################################################## | 31 | 74 | 0.351254 | 67 | 0.236749 | 0 | 0 | 0 | 0 | 0 | 0 | 181 | 0.639576 |
311249ddd416775b05d1978d206331804a252949 | 3,016 | py | Python | arguments.py | nudles/a2c | 6225845ab450b5ea03b6a066455b0446d3f92ed0 | [
"MIT"
] | null | null | null | arguments.py | nudles/a2c | 6225845ab450b5ea03b6a066455b0446d3f92ed0 | [
"MIT"
] | 4 | 2021-03-19T03:19:18.000Z | 2022-01-13T01:35:04.000Z | arguments.py | nudles/a2c | 6225845ab450b5ea03b6a066455b0446d3f92ed0 | [
"MIT"
] | null | null | null | import argparse
import torch
def get_args():
parser = argparse.ArgumentParser(description='RL')
parser.add_argument('--algo', default='a2c',
help='algorithm to use: a2c | ppo ')
parser.add_argument('--lr', type=float, default=7e-5,
help='learning rate (defau... | 52 | 94 | 0.590186 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,089 | 0.361074 |
31138701c903a02d7a07c3e409e2e717ebba46c9 | 207 | py | Python | vega/algorithms/nas/__init__.py | wnov/vega | bf51cbe389d41033c4ae4bc02e5078c3c247c845 | [
"MIT"
] | 6 | 2020-11-13T15:44:47.000Z | 2021-12-02T08:14:06.000Z | vega/algorithms/nas/__init__.py | JacobLee121/vega | 19256aca4d047bfad3b461f0a927e1c2abb9eb03 | [
"MIT"
] | null | null | null | vega/algorithms/nas/__init__.py | JacobLee121/vega | 19256aca4d047bfad3b461f0a927e1c2abb9eb03 | [
"MIT"
] | 2 | 2021-06-25T09:42:32.000Z | 2021-08-06T18:00:09.000Z | from .backbone_nas import *
from .adelaide_ea import *
from .sr_ea import *
from .esr_ea import *
from .darts_cnn import *
from .cars import *
from .fis import *
from .auto_lane import *
from .mfkd import *
| 20.7 | 27 | 0.73913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
31139b4fff3a18ffb360806368a4eb20f571136a | 10,221 | py | Python | ai.py | s18mbbustorff/AI_Hanabi_Assignment | 651699bdd77f10e72b49cdb2c62faeca585bdfa3 | [
"CNRI-Python"
] | null | null | null | ai.py | s18mbbustorff/AI_Hanabi_Assignment | 651699bdd77f10e72b49cdb2c62faeca585bdfa3 | [
"CNRI-Python"
] | null | null | null | ai.py | s18mbbustorff/AI_Hanabi_Assignment | 651699bdd77f10e72b49cdb2c62faeca585bdfa3 | [
"CNRI-Python"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 9 12:27:15 2021
@author: kuba
"""
import copy
import numpy as np
w = {"H0": {"H0":0.2,"H1": 0.2, "P0": 0.5, "P1": 0.1},
"H1": {"H0":0.2,"H1": 0.2, "P0": 0.1, "P1": 0.5},
"P0": {"H0":0.3,"H1": 0.3, "P0": 0.2, "P1": 0.2},
"P1": {"H0... | 36.503571 | 203 | 0.551609 | 8,300 | 0.812054 | 0 | 0 | 0 | 0 | 0 | 0 | 4,502 | 0.440466 |
3113f40d512a333a3eafda75e8d9b764160cd806 | 15,467 | py | Python | (19.12.06) Culminating/sprites.py | bly852/ICS3U1 | 8844321b26027d1612fad7fba88e70a1108de2eb | [
"MIT"
] | null | null | null | (19.12.06) Culminating/sprites.py | bly852/ICS3U1 | 8844321b26027d1612fad7fba88e70a1108de2eb | [
"MIT"
] | null | null | null | (19.12.06) Culminating/sprites.py | bly852/ICS3U1 | 8844321b26027d1612fad7fba88e70a1108de2eb | [
"MIT"
] | null | null | null | # course: ICS3U1 2019
# exercise: Culminating Activity
# date: 2019-12-06
# student number: 340926187
# name: Brandon Ly
# description: Two players (Mr Chun & Mr Pileggi) running around the school
# collecting food for the food drive.
# sprite classes
import pygame... | 40.174026 | 140 | 0.541799 | 15,075 | 0.974656 | 0 | 0 | 0 | 0 | 0 | 0 | 3,468 | 0.224219 |
311469936b15c039449f088fcb08c289febfdf41 | 294 | py | Python | app/schemas/usage_logs.py | wiki-yu/fastapi-algorithm-library | 8f745e9fe4d1d063dc8505d4c7f467e95209a385 | [
"MIT"
] | null | null | null | app/schemas/usage_logs.py | wiki-yu/fastapi-algorithm-library | 8f745e9fe4d1d063dc8505d4c7f467e95209a385 | [
"MIT"
] | null | null | null | app/schemas/usage_logs.py | wiki-yu/fastapi-algorithm-library | 8f745e9fe4d1d063dc8505d4c7f467e95209a385 | [
"MIT"
] | null | null | null | from typing import Optional, List
from pydantic import BaseModel
class UsageLog(BaseModel):
api_key: str
is_active: bool
never_expire: bool
expiration_date: str
latest_query_date: Optional[str]
total_queries: int
class UsageLogs(BaseModel):
logs: List[UsageLog]
| 18.375 | 36 | 0.738095 | 223 | 0.758503 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
31156273ccc04dff6529eec50612ae1c8d644cbc | 10,811 | py | Python | dstf/core.py | anthonydugois/dstf | a08bfc8927910e104234e4189113c40029cf96c0 | [
"MIT"
] | null | null | null | dstf/core.py | anthonydugois/dstf | a08bfc8927910e104234e4189113c40029cf96c0 | [
"MIT"
] | null | null | null | dstf/core.py | anthonydugois/dstf | a08bfc8927910e104234e4189113c40029cf96c0 | [
"MIT"
] | null | null | null | from abc import ABCMeta, abstractmethod
from collections import OrderedDict
from math import inf
from typing import Iterator, Any, List, Dict, Type, Optional
EPSILON = 1e-4
class Error(Exception):
pass
class ConstraintError(Error):
pass
class Constraint(metaclass=ABCMeta):
@abstractmethod
def isv... | 30.367978 | 107 | 0.590232 | 10,607 | 0.98113 | 272 | 0.02516 | 251 | 0.023217 | 0 | 0 | 801 | 0.074091 |
311598ad6b841ab60db61f4fd1280dc1532a3bf1 | 2,789 | py | Python | 2018/2018_06a.py | davidxiao93/Advent-of-Code | 29503100ae4eb46b048fc3ab68ff0181c6f00ee5 | [
"MIT"
] | null | null | null | 2018/2018_06a.py | davidxiao93/Advent-of-Code | 29503100ae4eb46b048fc3ab68ff0181c6f00ee5 | [
"MIT"
] | null | null | null | 2018/2018_06a.py | davidxiao93/Advent-of-Code | 29503100ae4eb46b048fc3ab68ff0181c6f00ee5 | [
"MIT"
] | null | null | null | input = """154, 159
172, 84
235, 204
181, 122
161, 337
305, 104
128, 298
176, 328
146, 71
210, 87
341, 195
50, 96
225, 151
86, 171
239, 68
79, 50
191, 284
200, 122
282, 240
224, 282
327, 74
158, 289
331, 244
154, 327
317, 110
272, 179
173, 175
187, 104
44, 194
202, 332
249, 197
244, 225
52, 127
299, 198
123, 198
349, 7... | 20.357664 | 87 | 0.61635 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 779 | 0.279312 |
3117a458a92a3f74cb40891238fd7657a360b0d8 | 207 | py | Python | tests/test_backup.py | KonstantinPankratov/Backupy | bfbbc97242bbf3c16da5454b5ff8741bfafa74c0 | [
"MIT"
] | 1 | 2020-02-12T12:58:28.000Z | 2020-02-12T12:58:28.000Z | tests/test_backup.py | KonstantinPankratov/Backupy | bfbbc97242bbf3c16da5454b5ff8741bfafa74c0 | [
"MIT"
] | null | null | null | tests/test_backup.py | KonstantinPankratov/Backupy | bfbbc97242bbf3c16da5454b5ff8741bfafa74c0 | [
"MIT"
] | null | null | null | import os
from Backupy import Backupy
def test_backup():
backup = Backupy()
backup.add_directory('./')
backup.start()
assert os.path.exists(backup.filename)
os.remove(backup.filename)
| 17.25 | 42 | 0.690821 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0.019324 |
3117d8dd620c63b6e9601bc884ac493aa6485d06 | 1,100 | py | Python | tweetf0rm/process/crawler_process.py | amaurywalbert/mytweetf0rm | 2272b53214b3669eb104762f5b5b38ff4adda435 | [
"MIT"
] | 1 | 2015-02-16T11:08:35.000Z | 2015-02-16T11:08:35.000Z | tweetf0rm/process/crawler_process.py | maruthiprithivi/tweetf0rm | f59e57495afda05032d41b161b5aed74f2bc4dfe | [
"MIT"
] | null | null | null | tweetf0rm/process/crawler_process.py | maruthiprithivi/tweetf0rm | f59e57495afda05032d41b161b5aed74f2bc4dfe | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
import logging
logger = logging.getLogger(__name__)
import multiprocessing as mp
import tweetf0rm.handler
from tweetf0rm.redis_helper import CrawlerQueue
#MAX_QUEUE_SIZE = 32767
class CrawlerProcess(mp.Process):
def __init__(self, node_id, crawler_id, redis_config, ha... | 22.916667 | 83 | 0.75 | 868 | 0.789091 | 0 | 0 | 0 | 0 | 0 | 0 | 237 | 0.215455 |
3118987786d875c02803a2f89249abb09e8ea633 | 6,500 | py | Python | cloudify_aws/ec2/resources/dhcp.py | marrowne/cloudify-aws-plugin | e75506f29048c666aeed20ade8a5a8cdfb6f2adf | [
"Apache-2.0"
] | null | null | null | cloudify_aws/ec2/resources/dhcp.py | marrowne/cloudify-aws-plugin | e75506f29048c666aeed20ade8a5a8cdfb6f2adf | [
"Apache-2.0"
] | null | null | null | cloudify_aws/ec2/resources/dhcp.py | marrowne/cloudify-aws-plugin | e75506f29048c666aeed20ade8a5a8cdfb6f2adf | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 Cloudify Platform Ltd. 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 ap... | 34.210526 | 77 | 0.667077 | 1,977 | 0.304154 | 0 | 0 | 3,740 | 0.575385 | 0 | 0 | 1,974 | 0.303692 |
311bd4a62d810173917c5fcccdb8b5d1d7bc7a2e | 4,038 | py | Python | tests/testing_support/sample_applications.py | douglasfarinelli/newrelic-python-agent | 429edc07c29f318b7d233f4a70367634ad2b9ae4 | [
"Apache-2.0"
] | 1 | 2020-08-27T21:36:14.000Z | 2020-08-27T21:36:14.000Z | tests/testing_support/sample_applications.py | douglasfarinelli/newrelic-python-agent | 429edc07c29f318b7d233f4a70367634ad2b9ae4 | [
"Apache-2.0"
] | null | null | null | tests/testing_support/sample_applications.py | douglasfarinelli/newrelic-python-agent | 429edc07c29f318b7d233f4a70367634ad2b9ae4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 New Relic, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 30.360902 | 80 | 0.636701 | 0 | 0 | 0 | 0 | 2,138 | 0.52947 | 0 | 0 | 1,489 | 0.368747 |
311bd8e2e5361bb4ec7f13dfdb4e6813c5dab95c | 14,767 | py | Python | spydrnet_tmr/transformation/replication/nmr.py | byuccl/spydrnet-tmr | ca9f026db70be96d57aa3604447abecb68670c56 | [
"BSD-3-Clause"
] | null | null | null | spydrnet_tmr/transformation/replication/nmr.py | byuccl/spydrnet-tmr | ca9f026db70be96d57aa3604447abecb68670c56 | [
"BSD-3-Clause"
] | 6 | 2021-08-13T18:39:59.000Z | 2022-03-04T22:20:44.000Z | spydrnet_tmr/transformation/replication/nmr.py | byuccl/spydrnet-tmr | ca9f026db70be96d57aa3604447abecb68670c56 | [
"BSD-3-Clause"
] | null | null | null | from spydrnet.ir import Port, Instance, InnerPin
from spydrnet_tmr.transformation.util import add_suffix_to_name
IN = Port.Direction.IN
OUT = Port.Direction.OUT
INOUT = Port.Direction.INOUT
def apply_nmr(ports_and_instances_to_replicate, degree, name_suffix='NMR', rename_original=True):
"""
Replicate the sele... | 44.212575 | 115 | 0.556511 | 13,826 | 0.936277 | 0 | 0 | 2,990 | 0.202478 | 0 | 0 | 662 | 0.04483 |
311f1ca9e1d1619bad521ce3c12b38ab4bf5a569 | 1,088 | py | Python | pyspark/example/spark_core/4.7_spark_prog.py | chiliangpi/hellobi | e773c493d87bc84e7ae9f297232f0c267baaf184 | [
"Apache-2.0"
] | 53 | 2017-09-01T04:43:38.000Z | 2021-11-30T14:59:39.000Z | pyspark/example/spark_core/4.7_spark_prog.py | chiliangpi/hellobi | e773c493d87bc84e7ae9f297232f0c267baaf184 | [
"Apache-2.0"
] | null | null | null | pyspark/example/spark_core/4.7_spark_prog.py | chiliangpi/hellobi | e773c493d87bc84e7ae9f297232f0c267baaf184 | [
"Apache-2.0"
] | 43 | 2017-12-27T02:11:48.000Z | 2021-09-12T09:04:31.000Z | import os
import numpy as np
import sys
import logging
LOG_PATH = os.environ['log']
spark_home = os.environ['SPARK_HOME']
sys.path.insert(0, os.path.join(spark_home, 'python'))
sys.path.insert(0, os.path.join(spark_home, 'python/lib/py4j-0.10.4-src.zip'))
from pyspark.sql import SparkSession
spark = SparkSession.bui... | 29.405405 | 78 | 0.625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 248 | 0.227941 |
31214aa0773f4d81be3dd4aff0c91ccb664626ac | 1,436 | py | Python | infra_macros/fbcode_macros/tests/shell_test.py | xw285cornell/buckit | 678d97618c1324288770ba423a1ecc0ce06ead0f | [
"BSD-3-Clause"
] | null | null | null | infra_macros/fbcode_macros/tests/shell_test.py | xw285cornell/buckit | 678d97618c1324288770ba423a1ecc0ce06ead0f | [
"BSD-3-Clause"
] | null | null | null | infra_macros/fbcode_macros/tests/shell_test.py | xw285cornell/buckit | 678d97618c1324288770ba423a1ecc0ce06ead0f | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
from __future__ import absol... | 35.02439 | 92 | 0.616295 | 1,024 | 0.713092 | 0 | 0 | 913 | 0.635794 | 0 | 0 | 669 | 0.465877 |
31220bdb897647890966f63a3b737299ebc02027 | 244 | py | Python | bash/src/_func_storage.py | BillGatesCat/yf | 118fdecd7e33cd4970b6250cf88be83e143d7a5f | [
"Apache-2.0"
] | 19 | 2020-12-24T04:49:52.000Z | 2021-02-19T04:58:10.000Z | bash/src/_func_storage.py | BillGatesCat/yf | 118fdecd7e33cd4970b6250cf88be83e143d7a5f | [
"Apache-2.0"
] | 2 | 2020-12-26T19:02:19.000Z | 2020-12-26T19:07:11.000Z | bash/src/_func_storage.py | BillGatesCat/yf | 118fdecd7e33cd4970b6250cf88be83e143d7a5f | [
"Apache-2.0"
] | 2 | 2020-12-28T01:41:03.000Z | 2021-07-06T19:27:25.000Z | class _FuncStorage:
def __init__(self):
self._function_map = {}
def insert_function(self, name, function):
self._function_map[name] = function
def get_all_functions(self):
return self._function_map
| 24.4 | 46 | 0.651639 | 235 | 0.963115 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3124e4502bdcf98a842434a1911bac0c10e7cab6 | 5,482 | py | Python | tests/unit/core/SubdomainTest.py | edgargmartinez/OpenPNM | c68745993b3e9895f53938164a9cf6305500748e | [
"MIT"
] | 3 | 2019-07-17T01:35:09.000Z | 2021-05-08T02:03:35.000Z | tests/unit/core/SubdomainTest.py | ChahatAggarwal/OpenPNM | b3873d35270b0acaad019264368d0055c677d159 | [
"MIT"
] | null | null | null | tests/unit/core/SubdomainTest.py | ChahatAggarwal/OpenPNM | b3873d35270b0acaad019264368d0055c677d159 | [
"MIT"
] | null | null | null | import openpnm as op
import scipy as sp
import pytest
class SubdomainTest:
def setup_class(self):
ws = op.Workspace()
ws.settings['local_data'] = True
self.net = op.network.Cubic(shape=[3, 3, 3])
self.geo = op.geometry.GenericGeometry(network=self.net,
... | 39.724638 | 79 | 0.572419 | 5,193 | 0.947282 | 0 | 0 | 0 | 0 | 0 | 0 | 714 | 0.130244 |
31253c2d60769e0b2c0da32d81b683d12aa6619e | 8,024 | py | Python | loci/io.py | SLIPO-EU/loci | 1b92b9a582c4d062b55176aad41cf305260f8f87 | [
"Apache-2.0"
] | 3 | 2020-04-20T11:38:48.000Z | 2022-01-04T14:56:15.000Z | loci/io.py | SLIPO-EU/loci | 1b92b9a582c4d062b55176aad41cf305260f8f87 | [
"Apache-2.0"
] | null | null | null | loci/io.py | SLIPO-EU/loci | 1b92b9a582c4d062b55176aad41cf305260f8f87 | [
"Apache-2.0"
] | 1 | 2021-07-05T13:52:40.000Z | 2021-07-05T13:52:40.000Z | import pandas as pd
from shapely.geometry import Point
import geopandas as gpd
import math
import osmnx
import requests
from io import BytesIO
from zipfile import ZipFile
def read_poi_csv(input_file, col_id='id', col_name='name', col_lon='lon', col_lat='lat', col_kwds='kwds', col_sep=';',
kwds_sep=',... | 35.039301 | 119 | 0.636964 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,168 | 0.394816 |
31256e5c7977352e63d64f5b9580f52cc98fe3c5 | 11,938 | py | Python | src/roles/wolf.py | timson622222/lykos | cdaae22b2f69fe907c5ac93d14c4d2d78e23eb1a | [
"BSD-2-Clause"
] | null | null | null | src/roles/wolf.py | timson622222/lykos | cdaae22b2f69fe907c5ac93d14c4d2d78e23eb1a | [
"BSD-2-Clause"
] | null | null | null | src/roles/wolf.py | timson622222/lykos | cdaae22b2f69fe907c5ac93d14c4d2d78e23eb1a | [
"BSD-2-Clause"
] | null | null | null | import re
import random
from collections import defaultdict
import src.settings as var
from src.utilities import *
from src import debuglog, errlog, plog
from src.decorators import cmd, event_listener
from src.messages import messages
from src.events import Event
KILLS = {} # type: Dict[str, List[str]]
@cmd("kill", ... | 39.269737 | 200 | 0.590467 | 0 | 0 | 0 | 0 | 11,580 | 0.970012 | 0 | 0 | 3,026 | 0.253476 |
31268631bfa9305773df79c3ef1137b982360dd1 | 2,878 | py | Python | BOG.py | punyajoy/biosbias | bedca0b8605e3e99d2a2b56c78a5b98c9839a77b | [
"MIT"
] | null | null | null | BOG.py | punyajoy/biosbias | bedca0b8605e3e99d2a2b56c78a5b98c9839a77b | [
"MIT"
] | null | null | null | BOG.py | punyajoy/biosbias | bedca0b8605e3e99d2a2b56c78a5b98c9839a77b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Feb 28 13:52:20 2020
@author: midas
"""
import os
import glob
import pandas as pd
import numpy as np
all_filenames=['Data/Train.csv', 'Data/Test.csv']
combined_csv = pd.concat([pd.read_csv(f) for f in all_filenames ])
combined_csv.to_csv( "combined_csv... | 24.184874 | 95 | 0.683113 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 595 | 0.206741 |
31274ba4d0ae0b5f6147828e52210073924bc1c5 | 12,388 | py | Python | src/ploomber/jupyter/manager.py | idomic/ploomber | 89b5e544b0540cf2cbb6bcd09946537198115d17 | [
"Apache-2.0"
] | null | null | null | src/ploomber/jupyter/manager.py | idomic/ploomber | 89b5e544b0540cf2cbb6bcd09946537198115d17 | [
"Apache-2.0"
] | null | null | null | src/ploomber/jupyter/manager.py | idomic/ploomber | 89b5e544b0540cf2cbb6bcd09946537198115d17 | [
"Apache-2.0"
] | null | null | null | """
Module for the jupyter extension
"""
import sys
import datetime
import os
import contextlib
from pprint import pprint
from pathlib import Path
from jupytext.contentsmanager import TextFileContentsManager
from ploomber.sources.notebooksource import (_cleanup_rendered_nb, inject_cell)
from ploomber.spec.dagspec imp... | 40.220779 | 109 | 0.56813 | 8,733 | 0.704956 | 142 | 0.011463 | 169 | 0.013642 | 0 | 0 | 4,742 | 0.38279 |
3129453a0038e24bbee80e8d29bce23d328268df | 4,114 | py | Python | quake_reporter/quake_datafeed.py | shandozer/quake_reporter | 4e1eed5180b2f7dc3662b61ef32ef0b69c0fae01 | [
"MIT"
] | null | null | null | quake_reporter/quake_datafeed.py | shandozer/quake_reporter | 4e1eed5180b2f7dc3662b61ef32ef0b69c0fae01 | [
"MIT"
] | null | null | null | quake_reporter/quake_datafeed.py | shandozer/quake_reporter | 4e1eed5180b2f7dc3662b61ef32ef0b69c0fae01 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
__author__ = Shannon T. Buckley, 10/8/16
Python 2.7.x
"""
import json
import urllib2
import datetime
import argparse
VERSION = '0.2.1'
def get_parser():
parser = argparse.ArgumentParser()
parser.add_argument('-m', '--magnitude', action="store", type=float,
... | 25.395062 | 113 | 0.564657 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,304 | 0.316966 |
312a1142332c9f2c1bc137f8c71e0ab19ca1463f | 2,792 | py | Python | tests/visualization/data_sources/test_satellite.py | openclimatefix/nowcasting_utils | 7a45e9d24ce29693d96fd9c75a34ca1d205b64bc | [
"MIT"
] | 2 | 2021-12-20T15:56:40.000Z | 2022-02-09T07:31:27.000Z | tests/visualization/data_sources/test_satellite.py | openclimatefix/nowcasting_utils | 7a45e9d24ce29693d96fd9c75a34ca1d205b64bc | [
"MIT"
] | 37 | 2021-09-08T14:36:00.000Z | 2022-02-16T20:05:24.000Z | tests/visualization/data_sources/test_satellite.py | openclimatefix/nowcasting_utils | 7a45e9d24ce29693d96fd9c75a34ca1d205b64bc | [
"MIT"
] | null | null | null | """ Tests to plot satellite data """
import os
import plotly.graph_objects as go
from nowcasting_dataset.data_sources.fake.batch import satellite_fake
from nowcasting_dataset.geospatial import osgb_to_lat_lon
from nowcasting_utils.visualization.data_sources.plot_satellite import (
make_animation_all_channels,
... | 29.389474 | 92 | 0.716691 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 367 | 0.131447 |
312a2c813f2b31f42294655c9412690a04165f37 | 200 | py | Python | owtf/__main__.py | Udbhavbisarya23/owtf | 27623937677caf975569f8de8af7983ca57611bc | [
"BSD-3-Clause"
] | 1,514 | 2015-01-15T18:42:58.000Z | 2022-03-25T08:14:40.000Z | owtf/__main__.py | justdvnsh/owtf | 3a543b4eb2a7ad67155eb96dd2d99efbc181498d | [
"BSD-3-Clause"
] | 652 | 2015-01-09T18:27:37.000Z | 2022-03-21T18:41:01.000Z | owtf/__main__.py | justdvnsh/owtf | 3a543b4eb2a7ad67155eb96dd2d99efbc181498d | [
"BSD-3-Clause"
] | 506 | 2015-01-02T09:28:47.000Z | 2022-03-10T23:27:27.000Z | """
owtf.__main__
~~~~~~~~~~~~~
A __main__ method for OWTF so that internal services can be called as Python modules.
"""
import sys
from owtf.core import main
if __name__ == "__main__":
main()
| 16.666667 | 85 | 0.675 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.655 |
312a37dbf8253fa5df799a76f2660e8811afe2b8 | 1,823 | py | Python | sympyosis/logger.py | ZechCodes/sympyosis | 0c7315a08fc91d2d074b42f0aeb5d04c6f3f22d1 | [
"MIT"
] | null | null | null | sympyosis/logger.py | ZechCodes/sympyosis | 0c7315a08fc91d2d074b42f0aeb5d04c6f3f22d1 | [
"MIT"
] | null | null | null | sympyosis/logger.py | ZechCodes/sympyosis | 0c7315a08fc91d2d074b42f0aeb5d04c6f3f22d1 | [
"MIT"
] | null | null | null | from enum import IntEnum
from typing import Type, TypeVar
import logging
T = TypeVar("T")
class LogLevel(IntEnum):
DEBUG = logging.DEBUG
INFO = logging.INFO
WARNING = logging.WARNING
ERROR = logging.ERROR
CRITICAL = logging.CRITICAL
@classmethod
def get(cls: Type[T], name: str) -> T:
... | 28.484375 | 81 | 0.633571 | 1,725 | 0.946242 | 0 | 0 | 213 | 0.11684 | 0 | 0 | 3 | 0.001646 |
312a5215e0e355ad2b4d5e01dca1809280fd23f6 | 647 | py | Python | peframe/modules/apialert.py | ki1556ki/MJUOpenSource | 4087db825bbc7c460f8275428703e5c7066a84ae | [
"MIT"
] | null | null | null | peframe/modules/apialert.py | ki1556ki/MJUOpenSource | 4087db825bbc7c460f8275428703e5c7066a84ae | [
"MIT"
] | null | null | null | peframe/modules/apialert.py | ki1556ki/MJUOpenSource | 4087db825bbc7c460f8275428703e5c7066a84ae | [
"MIT"
] | 1 | 2020-07-14T03:39:06.000Z | 2020-07-14T03:39:06.000Z | # -*- coding: utf-8 -*-
# json 형식 사용을 위한 임폴트
import json
# get함수, 각각의 반복문을 통해 apialert_found안에 문자열 삽입후 리스트형식으로 정렬하여 리턴값 반환.
def get(pe, strings_match):
alerts = strings_match['apialert']
apialert_found = []
# pe에 DIRECTORY_ENTRY_IMPORT라는 변수가 있는지 확인하여 있으면 참 없으면 거짓.
if hasattr(pe, 'DIRECTORY_ENTRY_IMPORT'):... | 32.35 | 75 | 0.693972 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 469 | 0.56711 |
312bfac4cf2875d133c13b3a00e0ae85f3c76c44 | 2,084 | py | Python | tests/conftest.py | Ninjagod1251/ape | 9b40ef15f25362ddb83cb6d571d60cab041fce4a | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | Ninjagod1251/ape | 9b40ef15f25362ddb83cb6d571d60cab041fce4a | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | Ninjagod1251/ape | 9b40ef15f25362ddb83cb6d571d60cab041fce4a | [
"Apache-2.0"
] | null | null | null | import shutil
from pathlib import Path
from tempfile import mkdtemp
import pytest
from click.testing import CliRunner
import ape
# NOTE: Ensure that we don't use local paths for these
ape.config.DATA_FOLDER = Path(mkdtemp()).resolve()
ape.config.PROJECT_FOLDER = Path(mkdtemp()).resolve()
@pytest.fixture(scope="ses... | 21.265306 | 93 | 0.65739 | 0 | 0 | 651 | 0.31238 | 1,756 | 0.84261 | 0 | 0 | 580 | 0.278311 |
312c17d992442c57e3032d03093f0ff6832854f9 | 1,053 | py | Python | recipes/Python/576543_Prime_Number_Generator_Checker/recipe-576543.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/576543_Prime_Number_Generator_Checker/recipe-576543.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/576543_Prime_Number_Generator_Checker/recipe-576543.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | #
# prime number generator
# This program gets two number as input
# and prints
# Prime numbers in the range
# Actual number of primes in the range
# and Estimation based on formula
# n
# pi(n)= -------
# log(n)
# pi(n)=number of primes less than n... | 30.970588 | 73 | 0.531814 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 568 | 0.539411 |
312cb34d34abecdfef42214150394d17f2b7b90e | 118 | py | Python | Practica 1 E4.py | pardo13/python | 3d15c9a0414a240588da4d24184f63370b736d55 | [
"MIT"
] | null | null | null | Practica 1 E4.py | pardo13/python | 3d15c9a0414a240588da4d24184f63370b736d55 | [
"MIT"
] | null | null | null | Practica 1 E4.py | pardo13/python | 3d15c9a0414a240588da4d24184f63370b736d55 | [
"MIT"
] | null | null | null | A=int(input("dame int"))
B=int(input("dame int"))
if(A>B):
print("A es mayor")
else:
print("B es mayor")
| 14.75 | 24 | 0.559322 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.372881 |
312d87f76ce3d3d748ca0ec5f49e7654fc2b52fb | 11,520 | py | Python | selenium_driver_updater/_phantomJS.py | Svinokur/selenium_driver_updater | f773d5c4dc064e512c92cf58016843007ba3e6e3 | [
"MIT"
] | 8 | 2021-04-18T17:50:00.000Z | 2022-01-01T18:01:34.000Z | selenium_driver_updater/_phantomJS.py | Svinokur/selenium_driver_updater | f773d5c4dc064e512c92cf58016843007ba3e6e3 | [
"MIT"
] | 1 | 2021-11-02T22:05:36.000Z | 2021-11-03T07:58:00.000Z | selenium_driver_updater/_phantomJS.py | Svinokur/selenium_driver_updater | f773d5c4dc064e512c92cf58016843007ba3e6e3 | [
"MIT"
] | 1 | 2021-08-04T12:45:30.000Z | 2021-08-04T12:45:30.000Z | #pylint: disable=logging-fstring-interpolation
#Standart library imports
import shutil
import os
import time
from typing import Tuple
from pathlib import Path
import re
from shutil import copyfile
import wget
# Local imports
from selenium_driver_updater.util.logger import logger
from selenium_driver_updater.util.excep... | 33.198847 | 158 | 0.642795 | 11,096 | 0.963111 | 0 | 0 | 0 | 0 | 0 | 0 | 3,505 | 0.304227 |
312ecd011c5a15ca58383960f9caea10321bad18 | 1,779 | py | Python | src/ychaos/settings.py | vanderh0ff/ychaos | 5148c889912b744ee73907e4dd30c9ddb851aeb3 | [
"Apache-2.0"
] | 8 | 2021-07-21T15:37:48.000Z | 2022-03-03T14:43:09.000Z | src/ychaos/settings.py | vanderh0ff/ychaos | 5148c889912b744ee73907e4dd30c9ddb851aeb3 | [
"Apache-2.0"
] | 102 | 2021-07-20T16:08:29.000Z | 2022-03-25T07:28:37.000Z | src/ychaos/settings.py | vanderh0ff/ychaos | 5148c889912b744ee73907e4dd30c9ddb851aeb3 | [
"Apache-2.0"
] | 8 | 2021-07-20T13:37:46.000Z | 2022-02-18T01:44:52.000Z | # Copyright 2021, Yahoo
# Licensed under the terms of the Apache 2.0 license. See the LICENSE file in the project root for terms
from pathlib import Path
from typing import Optional, Union
from pydantic import BaseModel
class ApplicationSettings(BaseModel):
"""
Defines the Global Settings that are consiste... | 25.782609 | 105 | 0.681282 | 1,544 | 0.867903 | 0 | 0 | 420 | 0.236088 | 0 | 0 | 660 | 0.370995 |
312efdddb68056b4177eee4701aa3c39ea0d5fe6 | 6,656 | py | Python | tests/func/test_pipeline.py | kacmak7/dvc | 7f92cc3be31f55a1d47c56fc5a39896dd5d1e313 | [
"Apache-2.0"
] | null | null | null | tests/func/test_pipeline.py | kacmak7/dvc | 7f92cc3be31f55a1d47c56fc5a39896dd5d1e313 | [
"Apache-2.0"
] | null | null | null | tests/func/test_pipeline.py | kacmak7/dvc | 7f92cc3be31f55a1d47c56fc5a39896dd5d1e313 | [
"Apache-2.0"
] | null | null | null | import logging
from dvc.main import main
from tests.basic_env import TestDvc
from tests.func.test_repro import TestRepro
from tests.func.test_repro import TestReproChangedDeepData
class TestPipelineShowSingle(TestDvc):
def setUp(self):
super().setUp()
self.stage = "foo.dvc"
ret = main(["a... | 29.847534 | 79 | 0.594351 | 5,473 | 0.822266 | 0 | 0 | 0 | 0 | 0 | 0 | 1,115 | 0.167518 |
31305c3885e35daac8ecf91b5ede410dc7a3d63d | 5,497 | py | Python | my_modes/ChaseLoop.py | mjocean/T2Game | d85d1a9b9adb1e3836548ea60befac02b0907f6f | [
"MIT"
] | null | null | null | my_modes/ChaseLoop.py | mjocean/T2Game | d85d1a9b9adb1e3836548ea60befac02b0907f6f | [
"MIT"
] | null | null | null | my_modes/ChaseLoop.py | mjocean/T2Game | d85d1a9b9adb1e3836548ea60befac02b0907f6f | [
"MIT"
] | null | null | null | import procgame.game
from procgame.game import AdvancedMode
import logging
class ChaseLoop(procgame.game.AdvancedMode):
"""
Example of T2 "Chase Loop" functionality
(described in the rules PDF on page J)
TODO: Sound effects, other visual feedback??
"""
def __init__(self, game):
super(... | 36.646667 | 242 | 0.62525 | 5,418 | 0.985629 | 0 | 0 | 0 | 0 | 0 | 0 | 1,072 | 0.195015 |
313105ee1f0beaa4963e8ca27411e52ee4288019 | 130 | py | Python | app/dists/admin.py | ariashahverdi/Backend | ea8976f1eec4e75eba895f467d157f0f1345b2b7 | [
"MIT"
] | null | null | null | app/dists/admin.py | ariashahverdi/Backend | ea8976f1eec4e75eba895f467d157f0f1345b2b7 | [
"MIT"
] | null | null | null | app/dists/admin.py | ariashahverdi/Backend | ea8976f1eec4e75eba895f467d157f0f1345b2b7 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Distribution
admin.site.register(Distribution)
# Register your models here.
| 21.666667 | 33 | 0.823077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.215385 |
313142ab6ce549a139115eb0b45ced16e5e3b5d9 | 1,671 | py | Python | examples_ltnw/binary_classifier.py | gilbeckers/logictensornetworks | c4cc3628db91030230c78d3b964c26304a3b452b | [
"MIT"
] | null | null | null | examples_ltnw/binary_classifier.py | gilbeckers/logictensornetworks | c4cc3628db91030230c78d3b964c26304a3b452b | [
"MIT"
] | null | null | null | examples_ltnw/binary_classifier.py | gilbeckers/logictensornetworks | c4cc3628db91030230c78d3b964c26304a3b452b | [
"MIT"
] | 1 | 2019-05-19T01:28:04.000Z | 2019-05-19T01:28:04.000Z | # -*- coding: utf-8 -*-
import logging; logging.basicConfig(level=logging.INFO)
import numpy as np
import matplotlib.pyplot as plt
import logictensornetworks_wrapper as ltnw
nr_samples=500
data=np.random.uniform([0,0],[1.,1.],(nr_samples,2)).astype(np.float32)
data_A=data[np.where(np.sum(np.square(data-[.5,.5]),axi... | 27.85 | 71 | 0.689408 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 327 | 0.195691 |
31319d47ec8ad06ca44bd80af1576e1016d0086b | 837 | py | Python | leetcode/0015_3Sum/result.py | theck17/notes | f32f0f4b8f821b1ed38d173ef0913efddd094b91 | [
"MIT"
] | null | null | null | leetcode/0015_3Sum/result.py | theck17/notes | f32f0f4b8f821b1ed38d173ef0913efddd094b91 | [
"MIT"
] | null | null | null | leetcode/0015_3Sum/result.py | theck17/notes | f32f0f4b8f821b1ed38d173ef0913efddd094b91 | [
"MIT"
] | null | null | null | # !/usr/bin/env python3
# Author: C.K
# Email: theck17@163.com
# DateTime:2021-03-15 00:07:14
# Description:
class Solution:
def threeSum(self, nums: List[int]) -> List[List[int]]:
result = set()
for i in range(0, len(nums) - 1):
# Reduce the problem to two sum(0)
two_sum =... | 28.862069 | 81 | 0.51135 | 687 | 0.820789 | 0 | 0 | 0 | 0 | 0 | 0 | 241 | 0.287933 |
313299b92381faa8b71fda04a1042894c5a9f593 | 2,937 | py | Python | customer/views.py | lautarianoo/django_shop | 9bc575df8b7af5452bd15cc3cf4fb375be6384bd | [
"MIT"
] | null | null | null | customer/views.py | lautarianoo/django_shop | 9bc575df8b7af5452bd15cc3cf4fb375be6384bd | [
"MIT"
] | null | null | null | customer/views.py | lautarianoo/django_shop | 9bc575df8b7af5452bd15cc3cf4fb375be6384bd | [
"MIT"
] | null | null | null | from django.contrib.auth import authenticate, login
from django.shortcuts import render, redirect
from cart.models import Cart
from django.views import View
from .forms import LoginForm, RegistrationForm, CreateCompanyForm
from customer.models import Customer, ShippingAddress
from src.utils.mixins import CustomerMixin
... | 41.957143 | 86 | 0.640449 | 2,565 | 0.87334 | 0 | 0 | 0 | 0 | 0 | 0 | 309 | 0.105209 |
3132c447ee024e396e1324d642bb304d3461295b | 1,771 | py | Python | kickstarter/app.py | Annapurnaj91/kickstarter3 | 372b2fd53b0b2b35dad210a7d6d54baff1a16204 | [
"MIT"
] | null | null | null | kickstarter/app.py | Annapurnaj91/kickstarter3 | 372b2fd53b0b2b35dad210a7d6d54baff1a16204 | [
"MIT"
] | null | null | null | kickstarter/app.py | Annapurnaj91/kickstarter3 | 372b2fd53b0b2b35dad210a7d6d54baff1a16204 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request
# from .recommendation import *
# import pickle
import pandas as pd
import numpy as np
# import keras
# from keras.models import load_model
import pickle
def create_app():
# initializes our app
APP = Flask(__name__)
@APP.route('/')
def form():
... | 29.032787 | 73 | 0.59345 | 0 | 0 | 0 | 0 | 668 | 0.377188 | 0 | 0 | 566 | 0.319593 |
3132c79a2cad6d01993855975464a0c7d164ed0d | 898 | py | Python | src/apiron/service/discoverable.py | tushar-deepsource/apiron | 6b542d498e1e2a76d5f8a2d086d237be43d09bc3 | [
"MIT"
] | 109 | 2018-10-01T19:38:36.000Z | 2022-03-10T05:28:34.000Z | src/apiron/service/discoverable.py | tushar-deepsource/apiron | 6b542d498e1e2a76d5f8a2d086d237be43d09bc3 | [
"MIT"
] | 39 | 2018-10-01T20:51:49.000Z | 2022-03-07T15:38:32.000Z | src/apiron/service/discoverable.py | tushar-deepsource/apiron | 6b542d498e1e2a76d5f8a2d086d237be43d09bc3 | [
"MIT"
] | 10 | 2018-10-02T06:54:40.000Z | 2020-05-28T14:30:12.000Z | from typing import List, Type
from apiron.service.base import ServiceBase
class DiscoverableService(ServiceBase):
"""
A Service whose hosts are determined via a host resolver.
A host resolver is any class with a :func:`resolve` method
that takes a service name as its sole argument
and returns a l... | 30.965517 | 115 | 0.707127 | 820 | 0.91314 | 0 | 0 | 114 | 0.126949 | 0 | 0 | 326 | 0.363029 |
3133622434c8873a4080869ebe2b301b8b8641a5 | 2,765 | py | Python | src/plotman/plot_util.py | rafaelsteil/plotman | b7b4d97a12b60c31f66e18764ff60469930e3b37 | [
"Apache-2.0"
] | null | null | null | src/plotman/plot_util.py | rafaelsteil/plotman | b7b4d97a12b60c31f66e18764ff60469930e3b37 | [
"Apache-2.0"
] | null | null | null | src/plotman/plot_util.py | rafaelsteil/plotman | b7b4d97a12b60c31f66e18764ff60469930e3b37 | [
"Apache-2.0"
] | null | null | null | import math
import os
import re
import shutil
from plotman import job
GB = 1_000_000_000
def df_b(d):
'Return free space for directory (in bytes)'
usage = shutil.disk_usage(d)
return usage.free
def get_k32_plotsize():
return 108 * GB
def is_valid_plot_dst(d, sched_cfg, all_jobs):
if sched_cfg.s... | 30.384615 | 79 | 0.609403 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 667 | 0.24123 |
313400b0bdd90b560bc3c6b261a67708f28e5651 | 608 | py | Python | src/config.py | forkedbranch/femm-opt | 78d9cd56510f781fe2643da4c2dadae002537d64 | [
"Apache-2.0"
] | 1 | 2016-05-03T13:58:00.000Z | 2016-05-03T13:58:00.000Z | src/config.py | forkedbranch/femm-opt | 78d9cd56510f781fe2643da4c2dadae002537d64 | [
"Apache-2.0"
] | null | null | null | src/config.py | forkedbranch/femm-opt | 78d9cd56510f781fe2643da4c2dadae002537d64 | [
"Apache-2.0"
] | null | null | null | # (c) Copyright 2016 forkedbranch (http://forkedbranch.eu/)
# Licensed under the Apache License, Version 2.0
import configparser
config = configparser.ConfigParser()
config.read('config.ini')
def get_input_folder():
return config['DEFAULT']['InputFolder']
def get_output_folder():
return config['DEFAULT'... | 24.32 | 59 | 0.717105 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 247 | 0.40625 |
3134461b8aadf2c623046676e642ba5bc115a4e1 | 4,091 | py | Python | vespene/workers/registration.py | Conan-Kudo/vespene | 9e9977523f45586e1326ccd77d8cc0cb10591a07 | [
"Apache-2.0"
] | 680 | 2018-10-29T12:12:10.000Z | 2019-04-27T09:52:58.000Z | vespene/workers/registration.py | Conan-Kudo/vespene | 9e9977523f45586e1326ccd77d8cc0cb10591a07 | [
"Apache-2.0"
] | 110 | 2018-10-29T12:33:34.000Z | 2019-02-14T02:31:43.000Z | vespene/workers/registration.py | Conan-Kudo/vespene | 9e9977523f45586e1326ccd77d8cc0cb10591a07 | [
"Apache-2.0"
] | 92 | 2018-10-29T12:21:12.000Z | 2019-06-08T11:08:08.000Z | # Copyright 2018, Michael DeHaan LLC
# License: Apache License Version 2.0
# -------------------------------------------------------------------------
# registration.py - updates the database to say who is building something
# and what the current settings are, which is used by the file serving
# code to see if i... | 32.728 | 124 | 0.620142 | 3,236 | 0.791005 | 0 | 0 | 0 | 0 | 0 | 0 | 1,170 | 0.285994 |
313582b593f74c9cfe2f0d1c30d9930aec3b40a3 | 12,957 | py | Python | src/robustness.py | mathigatti/sota-music-tagging-models | b4331b07fe45902af96830f2821926ab86e17d42 | [
"MIT"
] | null | null | null | src/robustness.py | mathigatti/sota-music-tagging-models | b4331b07fe45902af96830f2821926ab86e17d42 | [
"MIT"
] | null | null | null | src/robustness.py | mathigatti/sota-music-tagging-models | b4331b07fe45902af96830f2821926ab86e17d42 | [
"MIT"
] | null | null | null | # coding: utf-8
'''
Deformation codes are borrowed from MUDA
McFee et al., A software framework for musical data augmentation, 2015
https://github.com/bmcfee/muda
'''
import os
import time
import subprocess
import tempfile
import numpy as np
import pandas as pd
import datetime
import tqdm
import csv
import fire
import ... | 39.027108 | 1,080 | 0.56317 | 10,011 | 0.772633 | 0 | 0 | 655 | 0.050552 | 0 | 0 | 3,063 | 0.236397 |
31359392b650301014dc6082de0814c668402f3a | 742 | py | Python | tests/test_db_mathes_ui.py | AlexRovan/Python_training | 4878be4a7d354bd93e0e33b6e40a23a9592de213 | [
"Apache-2.0"
] | null | null | null | tests/test_db_mathes_ui.py | AlexRovan/Python_training | 4878be4a7d354bd93e0e33b6e40a23a9592de213 | [
"Apache-2.0"
] | null | null | null | tests/test_db_mathes_ui.py | AlexRovan/Python_training | 4878be4a7d354bd93e0e33b6e40a23a9592de213 | [
"Apache-2.0"
] | null | null | null | from model.group import Group
from model.contact import Contact
def test_group_list(app,db):
ui_group = app.group.get_groups_list()
def clean(group):
return Group(id=group.id, name=group.name.strip())
bd_group = map(clean,db.get_group_list())
assert sorted(ui_group,key=Group.id_or_max) == sorte... | 43.647059 | 135 | 0.725067 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.013477 |
3136541ef58415903ff6578bb2e900d003116de0 | 1,065 | py | Python | 10 Days of Statistics/Day 5 - Normal Distribution I.py | sohammanjrekar/HackerRank | 1f5010133a1ac1e765e855a086053c97d9e958be | [
"MIT"
] | null | null | null | 10 Days of Statistics/Day 5 - Normal Distribution I.py | sohammanjrekar/HackerRank | 1f5010133a1ac1e765e855a086053c97d9e958be | [
"MIT"
] | null | null | null | 10 Days of Statistics/Day 5 - Normal Distribution I.py | sohammanjrekar/HackerRank | 1f5010133a1ac1e765e855a086053c97d9e958be | [
"MIT"
] | null | null | null | """
Day 5: Normal Distribution I
In certain plant, the time taken to assemble a car is a random variable, X having a normal distribution
with a mean of 20 hours and a standard deviation of 2 hours. What is the probability that a car can be
assembled at this plant in:
1. Less han 19.5 hours?
2. Between 20 and ... | 27.307692 | 104 | 0.638498 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 406 | 0.381221 |
3136a4ea2bcd00c8806e57580d4c6c2d114d3d2d | 68 | py | Python | 11024/11024.py3.py | isac322/BOJ | 35959dd1a63d75ebca9ed606051f7a649d5c0c7b | [
"MIT"
] | 14 | 2017-05-02T02:00:42.000Z | 2021-11-16T07:25:29.000Z | 11024/11024.py3.py | isac322/BOJ | 35959dd1a63d75ebca9ed606051f7a649d5c0c7b | [
"MIT"
] | 1 | 2017-12-25T14:18:14.000Z | 2018-02-07T06:49:44.000Z | 11024/11024.py3.py | isac322/BOJ | 35959dd1a63d75ebca9ed606051f7a649d5c0c7b | [
"MIT"
] | 9 | 2016-03-03T22:06:52.000Z | 2020-04-30T22:06:24.000Z | for _ in range(int(input())):
print(sum(map(int, input().split()))) | 34 | 38 | 0.632353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3136edb9ff4f65fcd40844fb2d3465f8582e6c6f | 4,325 | py | Python | tests/test_contact_form.py | LaudateCorpus1/apostello | 1ace89d0d9e1f7a1760f6247d90a60a9787a4f12 | [
"MIT"
] | 69 | 2015-10-03T20:27:53.000Z | 2021-04-06T05:26:18.000Z | tests/test_contact_form.py | LaudateCorpus1/apostello | 1ace89d0d9e1f7a1760f6247d90a60a9787a4f12 | [
"MIT"
] | 73 | 2015-10-03T17:53:47.000Z | 2020-10-01T03:08:01.000Z | tests/test_contact_form.py | LaudateCorpus1/apostello | 1ace89d0d9e1f7a1760f6247d90a60a9787a4f12 | [
"MIT"
] | 29 | 2015-10-23T22:00:13.000Z | 2021-11-30T04:48:06.000Z | import pytest
from apostello import models
@pytest.mark.slow
@pytest.mark.django_db
class TestContactForm:
"""Test the sending of SMS."""
def test_number_permissions_staff_exception(self, recipients, users):
"""Test sending a message now."""
calvin = recipients["calvin"]
# check good... | 34.6 | 104 | 0.536647 | 4,237 | 0.979653 | 0 | 0 | 4,278 | 0.989133 | 0 | 0 | 1,099 | 0.254104 |
31383059d386bdab69fab697d6aece922f099277 | 1,236 | py | Python | tests/unit/records/format_hints.py | cwegrzyn/records-mover | e3b71d6c09d99d0bcd6a956b9d09d20f8abe98d2 | [
"Apache-2.0"
] | 36 | 2020-03-17T11:56:51.000Z | 2022-01-19T16:03:32.000Z | tests/unit/records/format_hints.py | cwegrzyn/records-mover | e3b71d6c09d99d0bcd6a956b9d09d20f8abe98d2 | [
"Apache-2.0"
] | 60 | 2020-03-02T23:13:29.000Z | 2021-05-19T15:05:42.000Z | tests/unit/records/format_hints.py | cwegrzyn/records-mover | e3b71d6c09d99d0bcd6a956b9d09d20f8abe98d2 | [
"Apache-2.0"
] | 4 | 2020-08-11T13:17:37.000Z | 2021-11-05T21:11:52.000Z | bluelabs_format_hints = {
'field-delimiter': ',',
'record-terminator': "\n",
'compression': 'GZIP',
'quoting': None,
'quotechar': '"',
'doublequote': False,
'escape': '\\',
'encoding': 'UTF8',
'dateformat': 'YYYY-MM-DD',
'timeonlyformat': 'HH24:MI:SS',
'datetimeformattz': 'YY... | 25.75 | 48 | 0.572006 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 796 | 0.644013 |
313a0495ccbff8beabc442ab70ce74da829e195f | 1,829 | py | Python | CONST.py | Bobobert/DQN-Vanilla | a793021692b58f9b8249819302cb2cd08ad57edb | [
"MIT"
] | null | null | null | CONST.py | Bobobert/DQN-Vanilla | a793021692b58f9b8249819302cb2cd08ad57edb | [
"MIT"
] | null | null | null | CONST.py | Bobobert/DQN-Vanilla | a793021692b58f9b8249819302cb2cd08ad57edb | [
"MIT"
] | null | null | null | # FROM THE OP PAPER-ISH
MINI_BATCH_SIZE = 32
MEMORY_SIZE = 10**6
BUFFER_SIZE = 100
LHIST = 4
GAMMA = 0.99
UPDATE_FREQ_ONlINE = 4
UPDATE_TARGET = 2500 # This was 10**4 but is measured in actor steps, so it's divided update_freq_online
TEST_FREQ = 5*10**4 # Measure in updates
TEST_STEPS = 10**4
LEARNING_RATE = 0.00025
G_... | 29.5 | 104 | 0.640241 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 958 | 0.523783 |
313a4f7ab87e42cd98ccf9595c3af6b5e740cfb1 | 6,031 | py | Python | milieu/paper/methods/milieu.py | seyuboglu/milieu | dfcd23ecb4449e6fa5debf8ed371fbc5d5c22e8e | [
"Apache-2.0"
] | 1 | 2020-07-15T18:52:29.000Z | 2020-07-15T18:52:29.000Z | milieu/paper/methods/milieu.py | seyuboglu/milieu | dfcd23ecb4449e6fa5debf8ed371fbc5d5c22e8e | [
"Apache-2.0"
] | null | null | null | milieu/paper/methods/milieu.py | seyuboglu/milieu | dfcd23ecb4449e6fa5debf8ed371fbc5d5c22e8e | [
"Apache-2.0"
] | null | null | null |
import os
import json
import logging
from collections import defaultdict
import numpy as np
import networkx as nx
import torch
from torch.utils.data import DataLoader
from torch.optim import Adam
from tqdm import tqdm
from milieu.util.util import place_on_cpu, place_on_gpu
from milieu.paper.methods.method import D... | 37.459627 | 92 | 0.521472 | 5,699 | 0.944951 | 0 | 0 | 0 | 0 | 0 | 0 | 696 | 0.115404 |
313cc87d19724030ef67c4661d1e5a9c641aaae1 | 5,185 | py | Python | scripts/telegram_bot.py | luigi311/ArBluna | bc65cb1be30339c83699f06f520ed8cb00048abf | [
"MIT"
] | 18 | 2021-08-21T05:42:40.000Z | 2022-03-16T21:00:56.000Z | scripts/telegram_bot.py | luigi311/ArBluna | bc65cb1be30339c83699f06f520ed8cb00048abf | [
"MIT"
] | 4 | 2021-08-21T06:05:04.000Z | 2021-12-07T02:23:05.000Z | scripts/telegram_bot.py | luigi311/ArBluna | bc65cb1be30339c83699f06f520ed8cb00048abf | [
"MIT"
] | 5 | 2021-08-24T08:29:51.000Z | 2022-03-04T17:14:49.000Z | import os
import distutils.util
from telegram import Update
from telegram.ext import Updater, CommandHandler, Filters, CallbackContext
from dotenv import load_dotenv
from scripts.get_info import get_ratio
from scripts.terra import get_balances, execute_swap
load_dotenv(override=True)
notify_telegram = bool(distutil... | 34.798658 | 291 | 0.652652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,212 | 0.233751 |
313ce62aeca2701889c38df68499f25c82820cc8 | 3,179 | py | Python | envs/mujoco/utils/download_meshes.py | hzm2016/assistive-gym-robosuite | 5c529f4444cc386383618bfa584341740a8468f9 | [
"MIT"
] | 1 | 2021-11-22T07:45:28.000Z | 2021-11-22T07:45:28.000Z | envs/mujoco/utils/download_meshes.py | hzm2016/assistive-gym-robosuite | 5c529f4444cc386383618bfa584341740a8468f9 | [
"MIT"
] | null | null | null | envs/mujoco/utils/download_meshes.py | hzm2016/assistive-gym-robosuite | 5c529f4444cc386383618bfa584341740a8468f9 | [
"MIT"
] | null | null | null | import os
import zipfile
import requests
def check_and_download(name, google_id, files=None, force_download=False):
"""
Checks if the meshes folder exists in the xml directory
If not it will ask the user if they want to download them
to be able to proceed
Parameters
----------
name: string
the file or direc... | 30.27619 | 121 | 0.709343 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,232 | 0.387543 |
313da56284119f917128f140877f55d791f270c7 | 2,188 | py | Python | wagtail/users/models.py | originell/wagtail | d2b02dff00edbd24bfaf971ae0a0d1fa71ea5df4 | [
"BSD-3-Clause"
] | null | null | null | wagtail/users/models.py | originell/wagtail | d2b02dff00edbd24bfaf971ae0a0d1fa71ea5df4 | [
"BSD-3-Clause"
] | null | null | null | wagtail/users/models.py | originell/wagtail | d2b02dff00edbd24bfaf971ae0a0d1fa71ea5df4 | [
"BSD-3-Clause"
] | null | null | null | import os
import uuid
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
def upload_avatar_to(instance, filename):
filename, ext = os.path.splitext(filename)
return os.path.join(
'avatar_images',
'avatar_{uuid}_{filename}{ext}... | 28.415584 | 94 | 0.675503 | 1,790 | 0.818099 | 0 | 0 | 100 | 0.045704 | 0 | 0 | 461 | 0.210695 |
313df0c7ff39a3b7b860f162c9978fb31e8f55a5 | 248 | py | Python | python/simulator.py | chongdashu/puzzlescript-analyze | 0dfada4584428f7690e717d317d5396487e1f8d0 | [
"MIT"
] | 1 | 2016-02-10T14:06:43.000Z | 2016-02-10T14:06:43.000Z | python/simulator.py | chongdashu/puzzlescript-analyze | 0dfada4584428f7690e717d317d5396487e1f8d0 | [
"MIT"
] | null | null | null | python/simulator.py | chongdashu/puzzlescript-analyze | 0dfada4584428f7690e717d317d5396487e1f8d0 | [
"MIT"
] | null | null | null | __author__ = 'Chong-U Lim, culim@mit.edu'
import uinput
def Simulator():
def __init__(self):
pass
def test1(self):
device = uinput.Device([uinput.KEY_E, uinput.KEY_H, uinput.KEY_L, uinput.KEY_O])
device.emit_click(uinput.KEY_H)
| 11.809524 | 82 | 0.701613 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.112903 |
313e16f482043a4d9b63143c96c69a32c7de5ed4 | 4,898 | py | Python | PRESUBMIT.py | oneumyvakin/catapult | 69d05ea70e77998c86149ac78044470e3ca364ad | [
"BSD-3-Clause"
] | null | null | null | PRESUBMIT.py | oneumyvakin/catapult | 69d05ea70e77998c86149ac78044470e3ca364ad | [
"BSD-3-Clause"
] | null | null | null | PRESUBMIT.py | oneumyvakin/catapult | 69d05ea70e77998c86149ac78044470e3ca364ad | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for catapult.
See https://www.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmi... | 37.676923 | 80 | 0.638424 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,140 | 0.436913 |
313f2defc3a370222bbd7525f5b1756e0fdd639e | 1,454 | py | Python | exam_at_home/2/boolean_expression.py | jamie-jjd/110_spring_IDS | 7f15c0c73b9d663373b791b9ddcc836957dcc3d2 | [
"MIT"
] | 2 | 2022-02-21T10:37:22.000Z | 2022-03-02T01:43:30.000Z | exam_at_home/2/boolean_expression.py | jamie-jjd/110_spring_IDS | 7f15c0c73b9d663373b791b9ddcc836957dcc3d2 | [
"MIT"
] | null | null | null | exam_at_home/2/boolean_expression.py | jamie-jjd/110_spring_IDS | 7f15c0c73b9d663373b791b9ddcc836957dcc3d2 | [
"MIT"
] | 3 | 2022-02-21T05:06:19.000Z | 2022-03-27T07:58:11.000Z | # author: jamie
# email: jinjiedeng.jjd@gmail.com
def Priority (c):
if c == '&': return 3
elif c == '|': return 2
elif c == '^': return 1
elif c == '(': return 0
def InfixToPostfix (infix, postfix):
stack = []
for c in infix:
if c == '(':
stack.append('(')
elif c =... | 29.673469 | 68 | 0.462861 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 121 | 0.083219 |
313fe3ae0a54054320169a34676d7ed8d2ac4692 | 203 | py | Python | workoutlog/workout/admin.py | michaelrodgers/itc172_final | b71f25a5cbffab00b06c60c8816f339d169d9dc1 | [
"Apache-2.0"
] | null | null | null | workoutlog/workout/admin.py | michaelrodgers/itc172_final | b71f25a5cbffab00b06c60c8816f339d169d9dc1 | [
"Apache-2.0"
] | null | null | null | workoutlog/workout/admin.py | michaelrodgers/itc172_final | b71f25a5cbffab00b06c60c8816f339d169d9dc1 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import Target, Exercise, Workout
# Register your models here.
admin.site.register(Target)
admin.site.register(Exercise)
admin.site.register(Workout)
| 25.375 | 46 | 0.783251 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.142857 |
31416eaefbae7d0e56e7b72dee697c6ec5ef4bc8 | 1,015 | py | Python | ciclo.py | BeltetonJosue96/Ejercicio3Python | 2ee1584be1b1f1a096d9793a581013b1303feec4 | [
"CC0-1.0"
] | null | null | null | ciclo.py | BeltetonJosue96/Ejercicio3Python | 2ee1584be1b1f1a096d9793a581013b1303feec4 | [
"CC0-1.0"
] | null | null | null | ciclo.py | BeltetonJosue96/Ejercicio3Python | 2ee1584be1b1f1a096d9793a581013b1303feec4 | [
"CC0-1.0"
] | null | null | null | class Ciclo:
def __init__(self):
self.cicloNew = ()
self.respu = ()
self.a = ()
self.b = ()
self.c = ()
def nuevoCiclo(self):
cicloNew = []
print(" ")
print("Formulario de ingreso de ciclos")
print("-----------------------------------")
... | 31.71875 | 90 | 0.429557 | 997 | 0.97841 | 0 | 0 | 0 | 0 | 0 | 0 | 319 | 0.313052 |
3143940a1c35677273eb448afe16a887f6eec384 | 4,997 | py | Python | timeglass.py | mountwebs/timeglass | 2f527e190cb90199cdd3a29ea7625e1f561fe01c | [
"MIT"
] | 110 | 2020-05-07T12:00:28.000Z | 2022-03-05T17:52:13.000Z | timeglass.py | mountwebs/timeglass | 2f527e190cb90199cdd3a29ea7625e1f561fe01c | [
"MIT"
] | 4 | 2020-05-07T12:01:21.000Z | 2021-01-01T14:23:59.000Z | timeglass.py | mountwebs/timeglass | 2f527e190cb90199cdd3a29ea7625e1f561fe01c | [
"MIT"
] | 6 | 2020-05-07T16:16:53.000Z | 2021-11-10T02:42:00.000Z | import rumps
import sys
import icon_manager
from datetime import timedelta
import timekeeper
import os
# pyinstaller --onefile -w --add-data "Icons/:Icons" --icon="Icons/timeglass.png" --clean timeglass.spec
# rumps.debug_mode(True)
class TimerApp(rumps.App):
def __init__(self, initial_seconds):
super(Ti... | 33.092715 | 132 | 0.553932 | 4,664 | 0.93336 | 0 | 0 | 1,474 | 0.294977 | 0 | 0 | 538 | 0.107665 |
3143e4df394889222436d2c1bdb781765f3da6bd | 223 | py | Python | example_bot/bot.py | JakeCover/Flare-DiscordPy | 24cc2541a6ef548583e46d58ae18abe72da5f37f | [
"MIT"
] | 1 | 2021-04-02T20:16:03.000Z | 2021-04-02T20:16:03.000Z | example_bot/bot.py | JakeCover/Flare-DiscordPy | 24cc2541a6ef548583e46d58ae18abe72da5f37f | [
"MIT"
] | null | null | null | example_bot/bot.py | JakeCover/Flare-DiscordPy | 24cc2541a6ef548583e46d58ae18abe72da5f37f | [
"MIT"
] | null | null | null | import os
from discord.ext.commands import Bot
from Flare import Flare
bot = Bot("~~")
bot.add_cog(Flare(bot))
@bot.command("ping")
async def ping_pong(ctx):
ctx.send("pong")
bot.run(os.environ.get("BOT_TOKEN"))
| 13.117647 | 36 | 0.695067 | 0 | 0 | 0 | 0 | 67 | 0.300448 | 46 | 0.206278 | 27 | 0.121076 |
31449da74730870d929a003f3070a25b350f24be | 1,869 | py | Python | utils/logger.py | huangxd-/BTC-ISMIR19 | cc2df75de9aba9af1c240a243ca167b1a8b07f7b | [
"MIT"
] | 82 | 2019-07-04T06:12:15.000Z | 2022-03-07T06:47:42.000Z | utils/logger.py | sungbohsun/b19 | 8d376c4284bd843664d81e3602d6e3e106d23cd4 | [
"MIT"
] | 4 | 2020-01-28T01:47:24.000Z | 2021-05-21T16:45:39.000Z | utils/logger.py | sungbohsun/b19 | 8d376c4284bd843664d81e3602d6e3e106d23cd4 | [
"MIT"
] | 13 | 2019-10-12T04:34:38.000Z | 2022-01-03T02:13:31.000Z | import logging
import os
import sys
import time
project_name = os.getcwd().split('/')[-1]
_logger = logging.getLogger(project_name)
_logger.addHandler(logging.StreamHandler())
def _log_prefix():
# Returns (filename, line number) for the stack frame.
def _get_file_line():
# pylint: disable=protected... | 25.60274 | 85 | 0.594971 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 310 | 0.165864 |
3144e6270af5c5cebfce71812937eeb79f014048 | 882 | py | Python | setup.py | VNOpenAI/OpenControl | 0087408c57bc77f34f524b28f8c4363b116700bb | [
"MIT"
] | 5 | 2021-07-05T18:03:45.000Z | 2021-07-16T09:31:02.000Z | setup.py | VNOpenAI/OpenControl | 0087408c57bc77f34f524b28f8c4363b116700bb | [
"MIT"
] | null | null | null | setup.py | VNOpenAI/OpenControl | 0087408c57bc77f34f524b28f8c4363b116700bb | [
"MIT"
] | null | null | null | import setuptools
ver = {}
with open('OpenControl/_version.py') as fd:
exec(fd.read(), ver)
version = ver.get('__version__')
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="OpenControl",
version=version,
author="VNOpenAI",
author_e... | 29.4 | 72 | 0.659864 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 377 | 0.427438 |
31462c4ba41af6d515b3c86cd2798c8806f3724f | 65,264 | py | Python | ismore/plants.py | DerekYJC/bmi_python | 7b9cf3f294a33688db24b0863c1035e9cc6999ea | [
"Apache-2.0"
] | null | null | null | ismore/plants.py | DerekYJC/bmi_python | 7b9cf3f294a33688db24b0863c1035e9cc6999ea | [
"Apache-2.0"
] | null | null | null | ismore/plants.py | DerekYJC/bmi_python | 7b9cf3f294a33688db24b0863c1035e9cc6999ea | [
"Apache-2.0"
] | null | null | null | '''See the shared Google Drive documentation for an inheritance diagram that
shows the relationships between the classes defined in this file.
'''
import numpy as np
import socket
import time
from riglib import source
from ismore import settings, udp_feedback_client
import ismore_bmi_lib
from utils.constants import *... | 40.637609 | 155 | 0.58412 | 64,335 | 0.985766 | 0 | 0 | 0 | 0 | 0 | 0 | 16,450 | 0.252053 |
3146c14380ad5914b64e35f3048435f94f9e6ee7 | 22,089 | py | Python | catalog/client/services/catalog.py | eoss-cloud/madxxx_catalog_api | ef37374a36129de4f0a6fe5dd46b5bc2e2f01d1d | [
"MIT"
] | null | null | null | catalog/client/services/catalog.py | eoss-cloud/madxxx_catalog_api | ef37374a36129de4f0a6fe5dd46b5bc2e2f01d1d | [
"MIT"
] | null | null | null | catalog/client/services/catalog.py | eoss-cloud/madxxx_catalog_api | ef37374a36129de4f0a6fe5dd46b5bc2e2f01d1d | [
"MIT"
] | null | null | null | #-*- coding: utf-8 -*-
""" EOSS catalog system
functionality for the catalog endpoint
"""
from utilities.web_utils import remote_file_exists
__author__ = "Thilo Wehrmann, Steffen Gebhardt"
__copyright__ = "Copyright 2016, EOSS GmbH"
__credits__ = ["Thilo Wehrmann", "Steffen Gebhardt"]
__license__ = "GPL"
__version__... | 43.740594 | 145 | 0.552175 | 20,725 | 0.93825 | 0 | 0 | 0 | 0 | 0 | 0 | 5,450 | 0.246729 |
3146dc4305a3e628e2c3b3c5cb8a0e5989294e0f | 8,919 | py | Python | tests/ui/test_pvc_ui.py | MeridianExplorer/ocs-ci | a33d5116128b88f176f5eff68a3ef805125cdba1 | [
"MIT"
] | null | null | null | tests/ui/test_pvc_ui.py | MeridianExplorer/ocs-ci | a33d5116128b88f176f5eff68a3ef805125cdba1 | [
"MIT"
] | null | null | null | tests/ui/test_pvc_ui.py | MeridianExplorer/ocs-ci | a33d5116128b88f176f5eff68a3ef805125cdba1 | [
"MIT"
] | null | null | null | import logging
import pytest
from ocs_ci.framework.testlib import tier1, skipif_ui_not_support, ui
from ocs_ci.ocs.ui.pvc_ui import PvcUI
from ocs_ci.framework.testlib import skipif_ocs_version
from ocs_ci.framework.pytest_customization.marks import green_squad
from ocs_ci.ocs.resources.pvc import get_all_pvc_objs, ge... | 31.40493 | 92 | 0.595582 | 8,173 | 0.916358 | 0 | 0 | 8,248 | 0.924767 | 0 | 0 | 2,088 | 0.234107 |
3146f37afae0ee7bf1ffcaaddfa9a23cd4051a59 | 1,955 | py | Python | feature_generation/datasets/CSCW.py | s0lvang/ideal-pancake | f7a55f622b02b03a987d74cfdff1c51288bfb657 | [
"MIT"
] | 6 | 2020-09-22T06:54:51.000Z | 2021-03-25T05:38:05.000Z | feature_generation/datasets/CSCW.py | s0lvang/ideal-pancake | f7a55f622b02b03a987d74cfdff1c51288bfb657 | [
"MIT"
] | 12 | 2020-09-21T13:20:49.000Z | 2021-04-07T08:01:12.000Z | feature_generation/datasets/CSCW.py | s0lvang/ideal-pancake | f7a55f622b02b03a987d74cfdff1c51288bfb657 | [
"MIT"
] | null | null | null | import pandas as pd
from feature_generation.datasets.Timeseries import Timeseries
from os.path import basename
class CSCW(Timeseries):
def __init__(self):
super().__init__("cscw")
self.column_name_mapping = {
"id": self.column_names["subject_id"],
"Fixation Start [ms]": sel... | 39.897959 | 78 | 0.636317 | 1,841 | 0.941688 | 0 | 0 | 0 | 0 | 0 | 0 | 248 | 0.126854 |
314716be771983df86f570f640cfc57d97707513 | 16,103 | py | Python | reactics-smt/rs/reaction_system_with_concentrations.py | arturmeski/reactics | a565b5bf5ec671ccad4bbdab38ad264b9d8369cc | [
"MIT"
] | 2 | 2019-03-04T08:51:00.000Z | 2019-11-04T10:42:13.000Z | reactics-smt/rs/reaction_system_with_concentrations.py | arturmeski/reactics | a565b5bf5ec671ccad4bbdab38ad264b9d8369cc | [
"MIT"
] | null | null | null | reactics-smt/rs/reaction_system_with_concentrations.py | arturmeski/reactics | a565b5bf5ec671ccad4bbdab38ad264b9d8369cc | [
"MIT"
] | null | null | null | from sys import exit
from colour import *
from rs.reaction_system import ReactionSystem
class ReactionSystemWithConcentrations(ReactionSystem):
def __init__(self):
self.reactions = []
self.meta_reactions = dict()
self.permanent_entities = dict()
self.background_set = []
... | 37.103687 | 145 | 0.541949 | 16,000 | 0.993604 | 0 | 0 | 0 | 0 | 0 | 0 | 1,821 | 0.113085 |
3147807fd05cce08c68a76d2267bf8400ec93917 | 9,241 | py | Python | src/models/cnn_train.py | zh272/AIGOGO | 0255cf8c4776358b73ee6b1792325a151a0cfa78 | [
"BSD-3-Clause"
] | null | null | null | src/models/cnn_train.py | zh272/AIGOGO | 0255cf8c4776358b73ee6b1792325a151a0cfa78 | [
"BSD-3-Clause"
] | null | null | null | src/models/cnn_train.py | zh272/AIGOGO | 0255cf8c4776358b73ee6b1792325a151a0cfa78 | [
"BSD-3-Clause"
] | null | null | null | import os
import time
import fire
import torch
import random
import numpy as np
import pandas as pd
import torch.nn.functional as F
## to detach from monitor
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from trainer import Trainer
from model import ConvNet1D
from helpers imp... | 37.872951 | 136 | 0.634455 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,060 | 0.22292 |
31489fbab4ef2b5a4414a0a8b4a377eb59e53266 | 730 | py | Python | tests/fetchers/test_hvdcLineCktOwnersFetcher.py | rohit98077/mis_outages_ingest | 1f563962ea8f93ed1825a7e07bde231b67240bcb | [
"MIT"
] | null | null | null | tests/fetchers/test_hvdcLineCktOwnersFetcher.py | rohit98077/mis_outages_ingest | 1f563962ea8f93ed1825a7e07bde231b67240bcb | [
"MIT"
] | 5 | 2020-09-19T08:52:48.000Z | 2021-06-02T03:29:38.000Z | tests/fetchers/test_hvdcLineCktOwnersFetcher.py | rohit98077/mis_outages_ingest | 1f563962ea8f93ed1825a7e07bde231b67240bcb | [
"MIT"
] | 2 | 2020-09-19T08:45:47.000Z | 2020-11-07T12:00:24.000Z | import unittest
from src.fetchers.hvdcLineCktOwnersFetcher import getOwnersForHvdcLineCktIds
import datetime as dt
from src.appConfig import getConfig
class TestHvdcLineCktOwnersFetcher(unittest.TestCase):
appConfig: dict = {}
def setUp(self):
self.appConfig = getConfig()
def test_run(self) -> N... | 31.73913 | 82 | 0.680822 | 576 | 0.789041 | 0 | 0 | 0 | 0 | 0 | 0 | 180 | 0.246575 |
314a3567674f4832f50804842163798ba6755e31 | 1,322 | py | Python | 3rdParty/boost/1.71.0/libs/python/test/iterator.py | rajeev02101987/arangodb | 817e6c04cb82777d266f3b444494140676da98e2 | [
"Apache-2.0"
] | 12,278 | 2015-01-29T17:11:33.000Z | 2022-03-31T21:12:00.000Z | 3rdParty/boost/1.71.0/libs/python/test/iterator.py | rajeev02101987/arangodb | 817e6c04cb82777d266f3b444494140676da98e2 | [
"Apache-2.0"
] | 9,469 | 2015-01-30T05:33:07.000Z | 2022-03-31T16:17:21.000Z | 3rdParty/boost/1.71.0/libs/python/test/iterator.py | rajeev02101987/arangodb | 817e6c04cb82777d266f3b444494140676da98e2 | [
"Apache-2.0"
] | 892 | 2015-01-29T16:26:19.000Z | 2022-03-20T07:44:30.000Z | # Copyright David Abrahams 2004. Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
from __future__ import print_function
'''
>>> from iterator_ext import *
>>> from input_iterator import *
>>> x = list_int()
>>> x.push_... | 16.734177 | 71 | 0.599849 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 998 | 0.754917 |
314a37a6a50187301c229c5c2b0248cf18eb14ce | 5,995 | py | Python | py/locationdb/geonames.py | acorg/locationdb | f3a70e254c3b81e12b8ddbbd02bb4baf7b1395b7 | [
"MIT"
] | null | null | null | py/locationdb/geonames.py | acorg/locationdb | f3a70e254c3b81e12b8ddbbd02bb4baf7b1395b7 | [
"MIT"
] | null | null | null | py/locationdb/geonames.py | acorg/locationdb | f3a70e254c3b81e12b8ddbbd02bb4baf7b1395b7 | [
"MIT"
] | null | null | null | # -*- Python -*-
# license
# license.
# ======================================================================
"""Looks name up in the [geonames database](http://www.geonames.org/).
[GeoNames Search Webservice API](http://www.geonames.org/export/geonames-search.html)
"""
import sys, os, urllib.request, json, time
fro... | 37.006173 | 177 | 0.481568 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,290 | 0.381858 |
314a686b41ad5ce98c4fc71d262791e5baa688cc | 117 | py | Python | python/testData/completion/notImportedQualifiedName/UseImportPriorityWhenAddingImport/main.py | 06needhamt/intellij-community | 63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b | [
"Apache-2.0"
] | null | null | null | python/testData/completion/notImportedQualifiedName/UseImportPriorityWhenAddingImport/main.py | 06needhamt/intellij-community | 63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b | [
"Apache-2.0"
] | null | null | null | python/testData/completion/notImportedQualifiedName/UseImportPriorityWhenAddingImport/main.py | 06needhamt/intellij-community | 63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b | [
"Apache-2.0"
] | null | null | null | import subprocess
import sys
import django.conf
import django.utils.encoding
subprocess.Popen
sys.argv
plt.<caret> | 11.7 | 28 | 0.820513 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
314b449f6ae2a854d067dfd6393a546317c348b5 | 2,921 | py | Python | Array/271EncodeDecodeStrings.py | john-the-dev/leetcode | f1038a5357c841a0d3c8aca1ae1a7d0387f77545 | [
"Apache-2.0"
] | null | null | null | Array/271EncodeDecodeStrings.py | john-the-dev/leetcode | f1038a5357c841a0d3c8aca1ae1a7d0387f77545 | [
"Apache-2.0"
] | null | null | null | Array/271EncodeDecodeStrings.py | john-the-dev/leetcode | f1038a5357c841a0d3c8aca1ae1a7d0387f77545 | [
"Apache-2.0"
] | null | null | null | # 271. Encode and Decode Strings
'''
Design an algorithm to encode a list of strings to a string. The encoded string is then sent over the network and is decoded back to the original list of strings.
Machine 1 (sender) has the function:
string encode(vector<string> strs) {
// ... your code
return encoded_string;
... | 30.113402 | 162 | 0.624444 | 1,050 | 0.359466 | 0 | 0 | 0 | 0 | 0 | 0 | 1,599 | 0.547415 |
314bff70a566f2c7c9e67a0b7e9a88c99668d8c8 | 857 | py | Python | ois_api_client/v2_0/deserialization/deserialize_invoice_number_query.py | peterkulik/ois_api_client | 51dabcc9f920f89982c4419bb058f5a88193cee0 | [
"MIT"
] | 7 | 2020-10-22T08:15:29.000Z | 2022-01-27T07:59:39.000Z | ois_api_client/v2_0/deserialization/deserialize_invoice_number_query.py | peterkulik/ois_api_client | 51dabcc9f920f89982c4419bb058f5a88193cee0 | [
"MIT"
] | null | null | null | ois_api_client/v2_0/deserialization/deserialize_invoice_number_query.py | peterkulik/ois_api_client | 51dabcc9f920f89982c4419bb058f5a88193cee0 | [
"MIT"
] | null | null | null | from typing import Optional
import xml.etree.ElementTree as ET
from ...xml.XmlReader import XmlReader as XR
from ..namespaces import API
from ..namespaces import DATA
from ...deserialization.create_enum import create_enum
from ..dto.InvoiceNumberQuery import InvoiceNumberQuery
from ..dto.InvoiceDirection import Invoice... | 37.26087 | 109 | 0.771295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.074679 |
314c834bc34744a5153b8449b8d6ede84e3fa535 | 1,614 | py | Python | scripts/markov_rulesets.py | takuyakanbr/covfefe | 8d6a88c838945fc8c8b8c88d19b775ec48a998b7 | [
"BSD-3-Clause"
] | null | null | null | scripts/markov_rulesets.py | takuyakanbr/covfefe | 8d6a88c838945fc8c8b8c88d19b775ec48a998b7 | [
"BSD-3-Clause"
] | 4 | 2019-12-02T17:39:27.000Z | 2019-12-02T17:43:49.000Z | scripts/markov_rulesets.py | takuyakanbr/covfefe | 8d6a88c838945fc8c8b8c88d19b775ec48a998b7 | [
"BSD-3-Clause"
] | null | null | null | # Script to generate the necessary grammar rules for the
# markov generator output type
# Dataset:
# http://www.drmaciver.com/2009/12/i-want-one-meelyun-sentences/
import re
ALPHA = ' abcdefghijklmnopqrstuvwxyz'
# read data from file
with open('sentences', 'r', encoding="utf8") as f:
content = f.read().splitlin... | 24.454545 | 64 | 0.502478 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 436 | 0.270136 |