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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f94195b0e745d91852d2ea4775d406dd9acd653a | 3,336 | py | Python | mcenter_client/tests/mcenter_server_api/controllers/users_controller.py | lisapm/mlpiper | 74ad5ae343d364682cc2f8aaa007f2e8a1d84929 | [
"Apache-2.0"
] | 7 | 2019-04-08T02:31:55.000Z | 2021-11-15T14:40:49.000Z | mcenter_client/tests/mcenter_server_api/controllers/users_controller.py | lisapm/mlpiper | 74ad5ae343d364682cc2f8aaa007f2e8a1d84929 | [
"Apache-2.0"
] | 31 | 2019-02-22T22:23:26.000Z | 2021-08-02T17:17:06.000Z | mcenter_client/tests/mcenter_server_api/controllers/users_controller.py | lisapm/mlpiper | 74ad5ae343d364682cc2f8aaa007f2e8a1d84929 | [
"Apache-2.0"
] | 8 | 2019-03-15T23:46:08.000Z | 2020-02-06T09:16:02.000Z | import connexion
import six
import flask
import copy
import os
import base64
import time
from mcenter_server_api.models.inline_response200 import InlineResponse200 # noqa: E501
from mcenter_server_api.models.inline_response2001 import InlineResponse2001 # noqa: E501
from mcenter_server_api.models.user import User #... | 20.096386 | 90 | 0.627098 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,371 | 0.410971 |
f941abe12e92f9a9d99898da1845f80024a4bf16 | 105 | py | Python | dash_react_json_schema_form/_imports_.py | dabble-of-devops-bioanalyze/dash_react_json_schema_form | f8b8826e6798efca1a7f603aa73b9e054056dc9a | [
"Apache-2.0"
] | null | null | null | dash_react_json_schema_form/_imports_.py | dabble-of-devops-bioanalyze/dash_react_json_schema_form | f8b8826e6798efca1a7f603aa73b9e054056dc9a | [
"Apache-2.0"
] | null | null | null | dash_react_json_schema_form/_imports_.py | dabble-of-devops-bioanalyze/dash_react_json_schema_form | f8b8826e6798efca1a7f603aa73b9e054056dc9a | [
"Apache-2.0"
] | null | null | null | from .DashReactJsonSchemaForm import DashReactJsonSchemaForm
__all__ = [
"DashReactJsonSchemaForm"
] | 21 | 60 | 0.819048 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.238095 |
f94563e81861f76b57c556bc8928617eb8ac0410 | 19,471 | py | Python | symbol.py | LizhengMathAi/symbol_FEM | a2679ff90cfffa40316e33102be1a802e210768a | [
"Apache-2.0"
] | 1 | 2021-02-07T00:53:51.000Z | 2021-02-07T00:53:51.000Z | symbol.py | LizhengMathAi/symbol_FEM | a2679ff90cfffa40316e33102be1a802e210768a | [
"Apache-2.0"
] | null | null | null | symbol.py | LizhengMathAi/symbol_FEM | a2679ff90cfffa40316e33102be1a802e210768a | [
"Apache-2.0"
] | null | null | null | from functools import reduce
import numpy as np
from sparse import SparseTensor
def reduce_prod(seq): return reduce(lambda item_1, item_2: item_1 * item_2, seq)
class Polynomial:
def __init__(self, coeff, indices, merge=True):
"""\\sum_{i=0}^{N-1} coeff[i] \\Pi_{j=0}^{NV-1} x_j^{indices[i, j]}"""
... | 49.544529 | 137 | 0.558472 | 13,496 | 0.693133 | 0 | 0 | 867 | 0.044528 | 0 | 0 | 4,025 | 0.206718 |
f9466d3c2d2932494116e2cb70d044cef50ea795 | 266 | py | Python | pollbot/helper/display/management.py | 3wille/ultimate-poll-bot | 7a99659df463a891b20a1ab424665cd84d4242b4 | [
"MIT"
] | null | null | null | pollbot/helper/display/management.py | 3wille/ultimate-poll-bot | 7a99659df463a891b20a1ab424665cd84d4242b4 | [
"MIT"
] | null | null | null | pollbot/helper/display/management.py | 3wille/ultimate-poll-bot | 7a99659df463a891b20a1ab424665cd84d4242b4 | [
"MIT"
] | null | null | null | """The poll management text."""
from .poll import get_poll_text
def get_poll_management_text(session, poll, show_warning=False):
"""Create the management interface for a poll."""
poll_text = get_poll_text(session, poll, show_warning)
return poll_text
| 26.6 | 64 | 0.74812 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.300752 |
f9469121eeab103831a2110844d01c4c5cbbd7f5 | 354 | py | Python | codewof/programming/migrations/0009_auto_20200417_0013.py | uccser-admin/programming-practice-prototype | 3af4c7d85308ac5bb35bb13be3ec18cac4eb8308 | [
"MIT"
] | 3 | 2019-08-29T04:11:22.000Z | 2021-06-22T16:05:51.000Z | codewof/programming/migrations/0009_auto_20200417_0013.py | uccser-admin/programming-practice-prototype | 3af4c7d85308ac5bb35bb13be3ec18cac4eb8308 | [
"MIT"
] | 265 | 2019-05-30T03:51:46.000Z | 2022-03-31T01:05:12.000Z | codewof/programming/migrations/0009_auto_20200417_0013.py | samuelsandri/codewof | c9b8b378c06b15a0c42ae863b8f46581de04fdfc | [
"MIT"
] | 7 | 2019-06-29T12:13:37.000Z | 2021-09-06T06:49:14.000Z | # Generated by Django 2.2.3 on 2020-04-16 12:13
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('programming', '0008_auto_20200415_1406'),
]
operations = [
migrations.AlterModelOptions(
name='badge',
options={'ordering': ... | 19.666667 | 51 | 0.59887 | 269 | 0.759887 | 0 | 0 | 0 | 0 | 0 | 0 | 114 | 0.322034 |
f946e2fce4d695420e4afffc8e580dcd4dade5ec | 273 | py | Python | diy_programs/diy_9_csv_module.py | bhalajin/blueprints | 7ad1d7860aafbb4c333de9efbbb7e546ed43c569 | [
"MIT"
] | null | null | null | diy_programs/diy_9_csv_module.py | bhalajin/blueprints | 7ad1d7860aafbb4c333de9efbbb7e546ed43c569 | [
"MIT"
] | null | null | null | diy_programs/diy_9_csv_module.py | bhalajin/blueprints | 7ad1d7860aafbb4c333de9efbbb7e546ed43c569 | [
"MIT"
] | null | null | null | import csv
a = [[1,2,3], [4,5,6]]
with open('test.csv', 'w', newline='') as testfile:
csvwriter = csv.writer(testfile)
for row in a:
csvwriter.writerow(row)
with open('test.csv', 'r') as testfile:
csvreader = csv.reader(testfile)
for row in csvreader:
print(row) | 21 | 51 | 0.663004 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.102564 |
f948dbae262921813e79d529b722c0b66116eaf6 | 543 | py | Python | sourceFiles/ex027_LerNomeMostraUltimo.py | mcleber/Aulas_Python | bd224b593fcf907d54c8a2b92eb3afa88d327171 | [
"MIT"
] | null | null | null | sourceFiles/ex027_LerNomeMostraUltimo.py | mcleber/Aulas_Python | bd224b593fcf907d54c8a2b92eb3afa88d327171 | [
"MIT"
] | null | null | null | sourceFiles/ex027_LerNomeMostraUltimo.py | mcleber/Aulas_Python | bd224b593fcf907d54c8a2b92eb3afa88d327171 | [
"MIT"
] | null | null | null | '''
Faça um programa que leia o nome completo de uma pessoa, mostrando em seguida o primeiro e o último
nome separadamente.
Ex.: Ana Maria de Souza
primeiro = Ana
último = Souza
'''
n = str(input('Digite seu nome completo: ')).strip()
nome = n.split() # split particiona e cria uma lista começando no indice 0
p... | 38.785714 | 100 | 0.696133 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 411 | 0.745917 |
f949b7feca2216ed779a38104fad871de931f5cd | 1,715 | py | Python | hknweb/forms.py | Boomaa23/hknweb | 2c2ce38b5f1c0c6e04ba46282141557357bd5326 | [
"MIT"
] | null | null | null | hknweb/forms.py | Boomaa23/hknweb | 2c2ce38b5f1c0c6e04ba46282141557357bd5326 | [
"MIT"
] | null | null | null | hknweb/forms.py | Boomaa23/hknweb | 2c2ce38b5f1c0c6e04ba46282141557357bd5326 | [
"MIT"
] | null | null | null | from django import forms
from django.contrib.auth.forms import (
UserCreationForm,
SetPasswordForm,
)
from hknweb.models import User, Profile
class SettingsForm(forms.ModelForm):
class Meta:
model = User
fields = ("username", "email", "first_name", "last_name", "password")
class Profile... | 24.855072 | 77 | 0.593586 | 1,549 | 0.903207 | 0 | 0 | 0 | 0 | 0 | 0 | 302 | 0.176093 |
f94e553843e7ec006e6711f29cd3c8bedc298b1e | 18,184 | py | Python | pfstats.py | altinukshini/pfstats | 90137cdfdc7c5ae72b782c3fc113d56231e2667d | [
"MIT"
] | 18 | 2017-09-03T19:59:08.000Z | 2022-02-02T11:59:48.000Z | pfstats.py | altinukshini/pfstats | 90137cdfdc7c5ae72b782c3fc113d56231e2667d | [
"MIT"
] | 3 | 2018-04-23T14:09:47.000Z | 2020-09-30T10:26:16.000Z | pfstats.py | altinukshini/pfstats | 90137cdfdc7c5ae72b782c3fc113d56231e2667d | [
"MIT"
] | 14 | 2017-09-03T19:59:10.000Z | 2022-03-15T12:19:57.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Postfix mail log parser and filter.
This script filters and parses Postfix logs based on provided filter parameters.
Example:
To use this script type 'python pfstats.py -h'. Below is an example
that filteres postfix log file (even gziped) based on date,
se... | 31.460208 | 144 | 0.592444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,801 | 0.37401 |
f951cf837ee7d78498aad48b843418086e875c47 | 1,524 | py | Python | test/atw_config_auto.py | lichengwu/python_tools | 3ebf70e6a6f6689ce2b615bed1500b8817f0b82a | [
"Apache-2.0"
] | null | null | null | test/atw_config_auto.py | lichengwu/python_tools | 3ebf70e6a6f6689ce2b615bed1500b8817f0b82a | [
"Apache-2.0"
] | null | null | null | test/atw_config_auto.py | lichengwu/python_tools | 3ebf70e6a6f6689ce2b615bed1500b8817f0b82a | [
"Apache-2.0"
] | null | null | null | __author__ = 'lichengwu'
def get_groups(sharding):
sc = (int(sharding) - 1) * 8
group_list = ""
for s in xrange(sc, sc + 8):
group_list += str(s) + ","
return group_list[:-1]
def get_note(host):
v = host[3]
if v == 'm':
return 'message_' + host[17:]
else:
t = host... | 30.48 | 176 | 0.571522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 700 | 0.459318 |
f9557c2acc79de6411f64feb5d4d5550266b917c | 992 | py | Python | release/stubs.min/System/Diagnostics/__init___parts/EventLogPermissionEntry.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/System/Diagnostics/__init___parts/EventLogPermissionEntry.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/System/Diagnostics/__init___parts/EventLogPermissionEntry.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | class EventLogPermissionEntry(object):
"""
Defines the smallest unit of a code access security permission that is set for an System.Diagnostics.EventLog.
EventLogPermissionEntry(permissionAccess: EventLogPermissionAccess,machineName: str)
"""
@staticmethod
def __new__(self, permissionAcces... | 24.8 | 112 | 0.686492 | 990 | 0.997984 | 0 | 0 | 178 | 0.179435 | 0 | 0 | 609 | 0.613911 |
f9564d9454e04c5d07bedcb3655d9efe0ca449c7 | 133 | py | Python | compound_types/built_ins/lists.py | vahndi/compound-types | cda4f49651b4bfbcd9fe199de276be472620cfad | [
"MIT"
] | null | null | null | compound_types/built_ins/lists.py | vahndi/compound-types | cda4f49651b4bfbcd9fe199de276be472620cfad | [
"MIT"
] | null | null | null | compound_types/built_ins/lists.py | vahndi/compound-types | cda4f49651b4bfbcd9fe199de276be472620cfad | [
"MIT"
] | null | null | null | from typing import List
BoolList = List[bool]
DictList = List[dict]
FloatList = List[float]
IntList = List[int]
StrList = List[str]
| 16.625 | 23 | 0.736842 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f956a3d5495345885097a51ce9c2704ddca7f850 | 3,396 | py | Python | Sketches/TG/soc2007/shard_final/BranchShard.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 12 | 2015-10-20T10:22:01.000Z | 2021-07-19T10:09:44.000Z | Sketches/TG/soc2007/shard_final/BranchShard.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 2 | 2015-10-20T10:22:55.000Z | 2017-02-13T11:05:25.000Z | Sketches/TG/soc2007/shard_final/BranchShard.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 6 | 2015-03-09T12:51:59.000Z | 2020-03-01T13:06:21.000Z | # -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Version 2.0 (the "Lic... | 39.488372 | 107 | 0.608952 | 2,560 | 0.753828 | 0 | 0 | 0 | 0 | 0 | 0 | 2,189 | 0.644582 |
f9570198e7a5f622e1af77b862f79e6f0ce39380 | 486 | py | Python | infrastructure/crypto_ml/agent/SimpleAgent.py | ATCUWgithub/CryptoML | 6010c5daf7d985217fa76197b29331457a60a306 | [
"MIT"
] | 1 | 2020-02-18T00:38:16.000Z | 2020-02-18T00:38:16.000Z | infrastructure/crypto_ml/agent/SimpleAgent.py | ATCUWgithub/CryptoML | 6010c5daf7d985217fa76197b29331457a60a306 | [
"MIT"
] | null | null | null | infrastructure/crypto_ml/agent/SimpleAgent.py | ATCUWgithub/CryptoML | 6010c5daf7d985217fa76197b29331457a60a306 | [
"MIT"
] | 1 | 2020-02-18T00:39:12.000Z | 2020-02-18T00:39:12.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright © 2020 UWATC. All rights reserved.
#
# Use of this source code is governed by an MIT license that can
# be found in the LICENSE.txt file or at https://opensource.org/licenses/MIT
from .AgentTemplate import AgentTemplate
class SimpleAgent(AgentTemplate):
def... | 32.4 | 76 | 0.748971 | 204 | 0.418891 | 0 | 0 | 0 | 0 | 0 | 0 | 314 | 0.644764 |
f9576382290725337f6455bafa4ade3618c4bd12 | 8,349 | py | Python | pod.py | ddh0/pod | 5c630f609db6d4e2d6704874144faf9fe64ee15b | [
"MIT"
] | 1 | 2020-11-20T16:35:07.000Z | 2020-11-20T16:35:07.000Z | pod.py | ddh0/pod | 5c630f609db6d4e2d6704874144faf9fe64ee15b | [
"MIT"
] | null | null | null | pod.py | ddh0/pod | 5c630f609db6d4e2d6704874144faf9fe64ee15b | [
"MIT"
] | null | null | null | # Program that downloads all episodes of a podcast
# Features
# -- Functions: add, remove, update
# - Run the file to update without having to use python interpreter
# - Download all episodes of a podcast, put into the correct folder
# - Tag each file with metadata from the feed and the stored config
import os
... | 39.947368 | 177 | 0.548928 | 454 | 0.054378 | 0 | 0 | 0 | 0 | 0 | 0 | 3,410 | 0.408432 |
f9577ac9ab9b2574ecfc469b539a86e4c283b783 | 1,954 | py | Python | threading_ext/RecordingThread.py | Antoine-BL/chess-ai.py | c68ca76063c14b1b8b91d338c8cead9f411521ca | [
"MIT"
] | 2 | 2019-08-21T15:52:29.000Z | 2021-09-11T23:07:17.000Z | threading_ext/RecordingThread.py | Antoine-BL/chess-ai.py | c68ca76063c14b1b8b91d338c8cead9f411521ca | [
"MIT"
] | 5 | 2020-09-25T23:15:31.000Z | 2022-02-10T00:07:33.000Z | threading_ext/RecordingThread.py | Antoine-BL/EuroTruck-ai.py | c68ca76063c14b1b8b91d338c8cead9f411521ca | [
"MIT"
] | null | null | null | import time
import numpy as np
import cv2
from mss import mss
from threading_ext.GameRecorder import GameRecorder
from threading_ext.PausableThread import PausableThread
class RecordingThread(PausableThread):
def __init__(self, training_data_path: str, session_number: int, recorder: GameRecorder):
supe... | 33.689655 | 96 | 0.619754 | 1,778 | 0.909928 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.0348 |
f957da3a4215ef9104b40d885730febc525fd16f | 638 | py | Python | multicast/mtc_recv.py | Tatchakorn/Multi-threaded-Server- | d5502a3da942e06736d07efc8d64186bc03a23d7 | [
"Beerware"
] | 2 | 2021-11-11T12:14:35.000Z | 2021-12-07T15:03:41.000Z | multicast/mtc_recv.py | Tatchakorn/Multi-threaded-Server- | d5502a3da942e06736d07efc8d64186bc03a23d7 | [
"Beerware"
] | null | null | null | multicast/mtc_recv.py | Tatchakorn/Multi-threaded-Server- | d5502a3da942e06736d07efc8d64186bc03a23d7 | [
"Beerware"
] | null | null | null | #! /usr/bin/python3
import threading
import socket
from test import create_upd_clients
from client import multicast_receive
def test_multicast_receive():
clients = create_upd_clients(3)
def run(client: socket.socket) -> None:
multicast_receive(client)
threads = [threading.Thread(name=f'clien... | 24.538462 | 84 | 0.652038 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.100313 |
f958f1f208280fca2b61c5a648551399de305a52 | 2,135 | py | Python | train/name_test.py | csgwon/dl-pipeline | 5ac2cdafe0daac675d3f3e810918133de3466f8a | [
"Apache-2.0"
] | 7 | 2018-06-26T13:09:12.000Z | 2020-07-15T18:18:38.000Z | train/name_test.py | csgwon/dl-pipeline | 5ac2cdafe0daac675d3f3e810918133de3466f8a | [
"Apache-2.0"
] | null | null | null | train/name_test.py | csgwon/dl-pipeline | 5ac2cdafe0daac675d3f3e810918133de3466f8a | [
"Apache-2.0"
] | 1 | 2018-08-30T19:51:08.000Z | 2018-08-30T19:51:08.000Z | from tools import *
from model import *
import torch
import torch.nn as nn
from torch.autograd import Variable
import torch.nn.functional as F
from torch.utils.data import Dataset, DataLoader
class NamesDataset(Dataset):
"""Name Classification dataset"""
def __init__(self, path):
self.data = pd.read_c... | 32.348485 | 109 | 0.635597 | 516 | 0.241686 | 0 | 0 | 0 | 0 | 0 | 0 | 241 | 0.112881 |
f95969e5274454c89e1f512e9e3893dfdf0ca196 | 737 | py | Python | automated_logging/migrations/0019_auto_20210504_1247.py | rewardz/django-automated-logging | 3f7c578b42de1e5ddc72cac79014715fc7dffa46 | [
"MIT"
] | null | null | null | automated_logging/migrations/0019_auto_20210504_1247.py | rewardz/django-automated-logging | 3f7c578b42de1e5ddc72cac79014715fc7dffa46 | [
"MIT"
] | null | null | null | automated_logging/migrations/0019_auto_20210504_1247.py | rewardz/django-automated-logging | 3f7c578b42de1e5ddc72cac79014715fc7dffa46 | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2021-05-04 03:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('automated_logging', '0018_decoratoroverrideexclusiontest_foreignkeytest_fullclassbasedexclusiontest_fulldecoratorbasedexclusio'),
]
operations = [
... | 30.708333 | 139 | 0.662144 | 646 | 0.876526 | 0 | 0 | 0 | 0 | 0 | 0 | 289 | 0.39213 |
f95b45ce076430bae5232cdd5ec93fdf00431354 | 2,037 | py | Python | libdiscid/tests/common.py | phw/python-libdiscid | fac3ca94057c7da2857af2fd7bd099f726a02869 | [
"MIT"
] | null | null | null | libdiscid/tests/common.py | phw/python-libdiscid | fac3ca94057c7da2857af2fd7bd099f726a02869 | [
"MIT"
] | null | null | null | libdiscid/tests/common.py | phw/python-libdiscid | fac3ca94057c7da2857af2fd7bd099f726a02869 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2013 Sebastian Ramacher <sebastian+dev@ramacher.at>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation th... | 31.338462 | 79 | 0.716249 | 795 | 0.389515 | 0 | 0 | 0 | 0 | 0 | 0 | 1,210 | 0.592847 |
f95b8e23ac103c21bff72619bd1a14be401e08f2 | 161 | py | Python | alexa_skill_boilerplate/__init__.py | variable/alexa_skill_boilerplate | c2c7fc2a3fe8f0bc69ec7559ec9b11f211d76bdc | [
"MIT"
] | null | null | null | alexa_skill_boilerplate/__init__.py | variable/alexa_skill_boilerplate | c2c7fc2a3fe8f0bc69ec7559ec9b11f211d76bdc | [
"MIT"
] | null | null | null | alexa_skill_boilerplate/__init__.py | variable/alexa_skill_boilerplate | c2c7fc2a3fe8f0bc69ec7559ec9b11f211d76bdc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for Alexa Skill Boilerplate."""
__author__ = """James Lin"""
__email__ = 'james@lin.net.nz'
__version__ = '0.1.0'
| 20.125 | 52 | 0.639752 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 0.714286 |
f95ba865fff759b92ca23cecc5920a5a1660850c | 1,881 | py | Python | train_teachers.py | offthewallace/DP_CNN | e7f4607cbb890a348d088b515c4aa7093fadb878 | [
"MIT"
] | 9 | 2018-02-28T06:09:23.000Z | 2022-03-15T13:42:47.000Z | train_teachers.py | offthewallace/DP_CNN | e7f4607cbb890a348d088b515c4aa7093fadb878 | [
"MIT"
] | null | null | null | train_teachers.py | offthewallace/DP_CNN | e7f4607cbb890a348d088b515c4aa7093fadb878 | [
"MIT"
] | 4 | 2018-01-21T06:42:10.000Z | 2020-08-17T09:07:42.000Z | #Author: Wallace He
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import glob
import keras
from keras.models import Sequential
from keras.models import model_from_json
from keras.models import load_model
import partition
import train_CNN
def train_teach... | 31.35 | 105 | 0.698033 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 710 | 0.377459 |
f95de109f7f76174c635351d3c9d2f28ebfb7d06 | 3,651 | py | Python | descartes_rpa/fetch/descartes.py | reactome/descartes | 7e7f21c5ccdf42b867db9e68fe0cb7a17d06fb25 | [
"Apache-2.0"
] | 2 | 2021-08-02T18:09:07.000Z | 2022-01-18T08:29:59.000Z | descartes_rpa/fetch/descartes.py | reactome/descartes | 7e7f21c5ccdf42b867db9e68fe0cb7a17d06fb25 | [
"Apache-2.0"
] | 5 | 2021-06-22T22:27:23.000Z | 2021-08-04T02:04:09.000Z | descartes_rpa/fetch/descartes.py | reactome/descartes_rpa | 7e7f21c5ccdf42b867db9e68fe0cb7a17d06fb25 | [
"Apache-2.0"
] | null | null | null | import requests
import shutil
import pandas as pd
from typing import Dict, List
def fetch_descartes_human_tissue(out_file: str, verbose: bool = True) -> None:
"""Function to fetch Loom Single-Cell tissue data from
Descartes human database.
Args:
out_file: Output file that is going to store .loom... | 30.940678 | 78 | 0.621747 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,145 | 0.58751 |
f95e41290f52dc02f46f6b46f92ae4c07e63dc68 | 9,528 | py | Python | run.py | magechaP/passwordlocker2.0 | e0ae82aa650c4f1cd285f319ec16de38ba0670ea | [
"Unlicense",
"MIT"
] | null | null | null | run.py | magechaP/passwordlocker2.0 | e0ae82aa650c4f1cd285f319ec16de38ba0670ea | [
"Unlicense",
"MIT"
] | null | null | null | run.py | magechaP/passwordlocker2.0 | e0ae82aa650c4f1cd285f319ec16de38ba0670ea | [
"Unlicense",
"MIT"
] | null | null | null | #!/usr/bin/env python3.6
import random #importing random module
from user import User #importing class User
from credential import Credential #importing class Credential
def create_credential(username,accountname,password):
"""
create_credential function that creates an instance of the class credential
... | 46.478049 | 260 | 0.524244 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,532 | 0.370697 |
f96072c2c69a90c36b742be295db7b6791bf37ec | 1,173 | py | Python | src/Support/Scripts/AlignOperators.py | bobthecow/ManipulateCoda | 5a0e03fb535cfc623070ddd44a9e09d34d313193 | [
"MIT"
] | 5 | 2015-01-05T21:44:18.000Z | 2017-09-08T09:31:44.000Z | src/Support/Scripts/AlignOperators.py | bobthecow/ManipulateCoda | 5a0e03fb535cfc623070ddd44a9e09d34d313193 | [
"MIT"
] | 3 | 2015-01-06T15:21:58.000Z | 2019-04-09T12:03:13.000Z | src/Support/Scripts/AlignOperators.py | bobthecow/ManipulateCoda | 5a0e03fb535cfc623070ddd44a9e09d34d313193 | [
"MIT"
] | null | null | null | '''Line up operators...'''
import cp_actions as cp
import re
def act(controller, bundle, options):
'''
Required action method
'''
context = cp.get_context(controller)
line_ending = cp.get_line_ending(context)
lines, range = cp.lines_and_range(context)
newlines = line_ending.join(balance_... | 27.27907 | 146 | 0.546462 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 163 | 0.13896 |
f9635ddcc69eb4603c2a017bb384ecbb61ddeafe | 1,333 | py | Python | continuous-variables/literature-code-in-python/random_reaction_gen.py | YANGZ001/OrganicChem-LabMate-AI | fb826d85dd852aab987b9bef6856d8da6a4bd9be | [
"MIT"
] | null | null | null | continuous-variables/literature-code-in-python/random_reaction_gen.py | YANGZ001/OrganicChem-LabMate-AI | fb826d85dd852aab987b9bef6856d8da6a4bd9be | [
"MIT"
] | null | null | null | continuous-variables/literature-code-in-python/random_reaction_gen.py | YANGZ001/OrganicChem-LabMate-AI | fb826d85dd852aab987b9bef6856d8da6a4bd9be | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import itertools
'''
Section below creates lists for your reaction parameters. Change names of lists where appropriate
'''
#For bigger lists use np.arange(min_value, max_value, step)
Pyridine = [0.1, 0.2, 0.3] # in mmol
Aldehyde = [0.1, 0.2, 0.3] # in mmol
Isocyanide = [0.1, 0.... | 37.027778 | 150 | 0.701425 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 707 | 0.530383 |
f96819f7fca3841f9dba660989413c0f8440f951 | 183 | py | Python | agent/tandem/agent/models/connection_state.py | geoffxy/tandem | 81e76f675634f1b42c8c3070c73443f3f68f8624 | [
"Apache-2.0"
] | 732 | 2018-03-11T03:35:17.000Z | 2022-01-06T12:22:03.000Z | agent/tandem/agent/models/connection_state.py | geoffxy/tandem | 81e76f675634f1b42c8c3070c73443f3f68f8624 | [
"Apache-2.0"
] | 21 | 2018-03-11T02:28:22.000Z | 2020-08-30T15:36:40.000Z | plugin/tandem_lib/agent/tandem/agent/models/connection_state.py | typeintandem/vim | e076a9954d73ccb60cd6828e53adf8da76462fc6 | [
"Apache-2.0"
] | 24 | 2018-03-14T05:37:17.000Z | 2022-01-18T14:44:42.000Z | import enum
class ConnectionState(enum.Enum):
PING = "ping"
SEND_SYN = "syn"
WAIT_FOR_SYN = "wait"
OPEN = "open"
RELAY = "relay"
UNREACHABLE = "unreachable"
| 16.636364 | 33 | 0.617486 | 168 | 0.918033 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.234973 |
f9686a6e64b3ada450c52aa9db27ba394fa0f073 | 2,241 | py | Python | mechroutines/es/newts/_fs.py | keceli/mechdriver | 978994ba5c77b6df00078b639c4482dacf269440 | [
"Apache-2.0"
] | null | null | null | mechroutines/es/newts/_fs.py | keceli/mechdriver | 978994ba5c77b6df00078b639c4482dacf269440 | [
"Apache-2.0"
] | null | null | null | mechroutines/es/newts/_fs.py | keceli/mechdriver | 978994ba5c77b6df00078b639c4482dacf269440 | [
"Apache-2.0"
] | 8 | 2019-12-18T20:09:46.000Z | 2020-11-14T16:37:28.000Z | """ rpath task function
"""
from mechlib import filesys
from mechlib.filesys import build_fs
from mechlib.filesys import root_locs
def rpath_fs(ts_dct, tsname,
mod_ini_thy_info,
es_keyword_dct,
run_prefix, save_prefix):
""" reaction path filesystem
"""
# Set up coo... | 33.954545 | 70 | 0.646586 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 567 | 0.253012 |
f968be6f1cca8629346c90e2699c898d9571ac20 | 1,361 | py | Python | computation/listallfiles.py | thirschbuechler/didactic-barnacles | 88d0a2b572aacb2cb45e68bb4f05fa5273224439 | [
"MIT"
] | null | null | null | computation/listallfiles.py | thirschbuechler/didactic-barnacles | 88d0a2b572aacb2cb45e68bb4f05fa5273224439 | [
"MIT"
] | null | null | null | computation/listallfiles.py | thirschbuechler/didactic-barnacles | 88d0a2b572aacb2cb45e68bb4f05fa5273224439 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Sep 29 14:38:54 2020
@author: https://stackoverflow.com/questions/18262293/how-to-open-every-file-in-a-folder
"""
import os #os module imported here
location = os.getcwd() # get present working directory location here
counter = 0 #keep a count of all files found
csvf... | 34.897436 | 100 | 0.603968 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 609 | 0.447465 |
f96a73f7ebbc6d2b474f86a30e29cb3233db9724 | 5,317 | py | Python | rootfs/api/apps_extra/social_core/actions.py | jianxiaoguo/controller | 8cc1e11601e5725e583f0fa82cdb2c10872ca485 | [
"Apache-2.0"
] | null | null | null | rootfs/api/apps_extra/social_core/actions.py | jianxiaoguo/controller | 8cc1e11601e5725e583f0fa82cdb2c10872ca485 | [
"Apache-2.0"
] | 19 | 2020-07-30T06:31:29.000Z | 2022-03-14T07:33:44.000Z | rootfs/api/apps_extra/social_core/actions.py | jianxiaoguo/controller | 8cc1e11601e5725e583f0fa82cdb2c10872ca485 | [
"Apache-2.0"
] | 9 | 2020-07-30T02:50:12.000Z | 2020-12-11T06:44:19.000Z | from urllib.parse import quote
from social_core.utils import sanitize_redirect, user_is_authenticated, \
user_is_active, partial_pipeline_data, setting_url
def do_auth(backend, redirect_name='next'):
# Save any defined next value into session
data = backend.strategy.request_data(merge=Fals... | 42.536 | 86 | 0.618018 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,123 | 0.211209 |
f96c7c015c3ad71d48f4085619b3a3dcae5954cc | 1,667 | py | Python | Part_1/src/manual_split_test/make_paired_cases.py | Bhaskers-Blu-Org2/datascience4managers | 2410182fe6913a8c986d2f28f5db6850cddb75f2 | [
"MIT"
] | 8 | 2019-11-24T08:23:12.000Z | 2021-01-19T02:48:46.000Z | Part_1/src/manual_split_test/make_paired_cases.py | Bhaskers-Blu-Org2/datascience4managers | 2410182fe6913a8c986d2f28f5db6850cddb75f2 | [
"MIT"
] | 1 | 2021-06-02T02:05:15.000Z | 2021-06-02T02:05:15.000Z | Part_1/src/manual_split_test/make_paired_cases.py | microsoft/datascience4managers | 7c332bf23a85f281237c841e1981ab21ed4ca072 | [
"MIT"
] | 9 | 2019-10-29T18:45:36.000Z | 2021-03-27T07:23:13.000Z | #!/usr/bin/python
# Oct 2019 JMA
# make_samples.py Use the splits_aggregator module to create samples
'''
Write a short description of what the program does here.
Usage:
$ ./make_samples.py [-v] [-d ROOT_DIR] [-c pair_cnt]
-v verbose output
-d data directory to read from
-c number of randomly ... | 24.880597 | 80 | 0.515297 | 34 | 0.020396 | 0 | 0 | 0 | 0 | 0 | 0 | 732 | 0.439112 |
f96ca18e0cac4358cc1ae51e86890db7bc505477 | 1,550 | py | Python | src/pySUMOQt/Designer/css_rc.py | pySUMO/pysumo | 889969f94bd45e2b67e25ff46452378351ca5186 | [
"BSD-2-Clause"
] | 7 | 2015-08-21T17:17:35.000Z | 2021-03-02T21:40:00.000Z | src/pySUMOQt/Designer/css_rc.py | pySUMO/pysumo | 889969f94bd45e2b67e25ff46452378351ca5186 | [
"BSD-2-Clause"
] | 2 | 2015-04-14T12:40:37.000Z | 2015-04-14T12:44:03.000Z | src/pySUMOQt/Designer/css_rc.py | pySUMO/pysumo | 889969f94bd45e2b67e25ff46452378351ca5186 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Resource object code
#
# Created: Di. Feb 3 12:11:53 2015
# by: The Resource Compiler for PySide (Qt v4.8.4)
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore
qt_resource_data = b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x009QStatusBar::... | 70.454545 | 488 | 0.75871 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,194 | 0.770323 |
f96e0469991c8e15ab4a23bec3525036f33b7b33 | 12,081 | py | Python | tests/test_core.py | sobamchan/lineflow | 708a875c090b7df48c9eca3f630915a9c6e5bbd6 | [
"MIT"
] | null | null | null | tests/test_core.py | sobamchan/lineflow | 708a875c090b7df48c9eca3f630915a9c6e5bbd6 | [
"MIT"
] | null | null | null | tests/test_core.py | sobamchan/lineflow | 708a875c090b7df48c9eca3f630915a9c6e5bbd6 | [
"MIT"
] | null | null | null | from unittest import TestCase
from unittest.mock import patch, Mock
import lineflow
from lineflow import Dataset
from lineflow.core import ConcatDataset, ZipDataset
from lineflow.core import RandomAccessConcat, RandomAccessZip
class RandomAccessConcatTestCase(TestCase):
def setUp(self):
self.n = 5
... | 35.017391 | 92 | 0.632067 | 11,832 | 0.979389 | 0 | 0 | 4,889 | 0.404685 | 0 | 0 | 709 | 0.058687 |
f96ed484656fab8971f82e7e48fafd3dcd557e30 | 2,393 | py | Python | aerosandbox/tools/miscellaneous.py | SzymonSzyszko/AeroSandbox | d4084899b665f735c1ec218282b2e4aee08eacff | [
"MIT"
] | null | null | null | aerosandbox/tools/miscellaneous.py | SzymonSzyszko/AeroSandbox | d4084899b665f735c1ec218282b2e4aee08eacff | [
"MIT"
] | null | null | null | aerosandbox/tools/miscellaneous.py | SzymonSzyszko/AeroSandbox | d4084899b665f735c1ec218282b2e4aee08eacff | [
"MIT"
] | null | null | null | import math
import numpy as np
def eng_string(x, format='%.3g', si=True):
'''
Taken from: https://stackoverflow.com/questions/17973278/python-decimal-engineering-notation-for-mili-10e-3-and-micro-10e-6/40691220
Returns float/int value <x> formatted in a simplified engineering format -
using an expone... | 28.488095 | 136 | 0.600501 | 0 | 0 | 1,110 | 0.463853 | 1,126 | 0.470539 | 0 | 0 | 1,362 | 0.56916 |
f96ffcf56dbd7255308f0925c87a38f826c98376 | 595 | py | Python | web_app/routes/Directory.py | AmyBeisel/BW_Med_Cabinet | 3cce7ff14f2324cdb81a7a1ea313037a6e3eead6 | [
"MIT"
] | null | null | null | web_app/routes/Directory.py | AmyBeisel/BW_Med_Cabinet | 3cce7ff14f2324cdb81a7a1ea313037a6e3eead6 | [
"MIT"
] | null | null | null | web_app/routes/Directory.py | AmyBeisel/BW_Med_Cabinet | 3cce7ff14f2324cdb81a7a1ea313037a6e3eead6 | [
"MIT"
] | null | null | null | # Directory.py
# Import
from flask import Blueprint, render_template
# Make Blueprint for __init__.py
Directory = Blueprint("Directory", __name__)
# App Welcome Page
@Directory.route('/')
def index():
return render_template("home.html", message = "DS Med Cabinet API using natural language processing to re... | 17.5 | 168 | 0.734454 | 0 | 0 | 0 | 0 | 371 | 0.623529 | 0 | 0 | 298 | 0.50084 |
f97211763e2fc9e54ef976a18d06e39b22339ef9 | 567 | py | Python | saleor/product/migrations/0125_auto_20200916_1511.py | fairhopeweb/saleor | 9ac6c22652d46ba65a5b894da5f1ba5bec48c019 | [
"CC-BY-4.0"
] | 15,337 | 2015-01-12T02:11:52.000Z | 2021-10-05T19:19:29.000Z | saleor/product/migrations/0125_auto_20200916_1511.py | fairhopeweb/saleor | 9ac6c22652d46ba65a5b894da5f1ba5bec48c019 | [
"CC-BY-4.0"
] | 7,486 | 2015-02-11T10:52:13.000Z | 2021-10-06T09:37:15.000Z | saleor/product/migrations/0125_auto_20200916_1511.py | aminziadna/saleor | 2e78fb5bcf8b83a6278af02551a104cfa555a1fb | [
"CC-BY-4.0"
] | 5,864 | 2015-01-16T14:52:54.000Z | 2021-10-05T23:01:15.000Z | # Generated by Django 3.1.1 on 2020-09-16 15:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("product", "0124_auto_20200909_0904"),
]
operations = [
migrations.AlterModelOptions(
name="productvariant",
options=... | 24.652174 | 80 | 0.59612 | 474 | 0.835979 | 0 | 0 | 0 | 0 | 0 | 0 | 152 | 0.268078 |
f974a1282e8728c135564243668674955a9e7d22 | 943 | py | Python | lintcode/NineChapters/03/binary-tree-level-order-traversal-ii.py | shootsoft/practice | 49f28c2e0240de61d00e4e0291b3c5edd930e345 | [
"Apache-2.0"
] | null | null | null | lintcode/NineChapters/03/binary-tree-level-order-traversal-ii.py | shootsoft/practice | 49f28c2e0240de61d00e4e0291b3c5edd930e345 | [
"Apache-2.0"
] | null | null | null | lintcode/NineChapters/03/binary-tree-level-order-traversal-ii.py | shootsoft/practice | 49f28c2e0240de61d00e4e0291b3c5edd930e345 | [
"Apache-2.0"
] | null | null | null | __author__ = 'yinjun'
"""
Definition of TreeNode:
class TreeNode:
def __init__(self, val):
this.val = val
this.left, this.right = None, None
"""
class Solution:
"""
@param root: The root of binary tree.
@return: buttom-up level order in a list of lists of integers
"""
def leve... | 18.86 | 65 | 0.45175 | 775 | 0.821845 | 0 | 0 | 0 | 0 | 0 | 0 | 291 | 0.30859 |
f974a73c7d07887b66165d4b3f68128150448a37 | 530 | py | Python | setup.py | Moi-Teaching-Referral-Hospital/ERPNextMTRHModifications | 393cef3294d6b07f2c7ff21899c99a82276be43f | [
"MIT"
] | null | null | null | setup.py | Moi-Teaching-Referral-Hospital/ERPNextMTRHModifications | 393cef3294d6b07f2c7ff21899c99a82276be43f | [
"MIT"
] | 1 | 2021-01-09T20:00:38.000Z | 2021-01-09T20:00:38.000Z | setup.py | Moi-Teaching-Referral-Hospital/mtrh_dev | 367af3922d0fe0c19e35b0edd999dfc42f9a225b | [
"MIT"
] | 2 | 2020-07-28T22:22:04.000Z | 2020-08-16T16:12:56.000Z | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('requirements.txt') as f:
install_requires = f.read().strip().split('\n')
# get version from __version__ variable in mtrh_dev/__init__.py
from mtrh_dev import __version__ as version
setup(
name='mtrh_dev',
version=version,
description=... | 25.238095 | 65 | 0.762264 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 191 | 0.360377 |
f974ccb0279e3323702f280c06f3f6d71a27a8f5 | 23,062 | py | Python | tools/programController.py | brewpi-remix/uno-test | a153a5277bea2a8e58ee479792d6977f0beb853e | [
"MIT"
] | null | null | null | tools/programController.py | brewpi-remix/uno-test | a153a5277bea2a8e58ee479792d6977f0beb853e | [
"MIT"
] | null | null | null | tools/programController.py | brewpi-remix/uno-test | a153a5277bea2a8e58ee479792d6977f0beb853e | [
"MIT"
] | 1 | 2021-07-31T15:23:07.000Z | 2021-07-31T15:23:07.000Z | #!/usr/bin/env python3
import subprocess as sub
import time
import simplejson as json
import os
from sys import stderr
import subprocess
import platform
import sys
import stat
import pwd
import grp
import BrewPiUtil as util
import brewpiVersion
import expandLogMessage
from packaging import version
from MigrateSettings... | 37.683007 | 146 | 0.588674 | 21,112 | 0.915445 | 0 | 0 | 451 | 0.019556 | 0 | 0 | 5,763 | 0.249892 |
f975435861ec73bfce0399c6d6ca18e0c1beb891 | 10,086 | py | Python | common/hil_slurm_helpers.py | mghpcc-projects/user_level_slurm_reservations | eae56588bb00abfe043714317a27481e036fcc29 | [
"MIT"
] | null | null | null | common/hil_slurm_helpers.py | mghpcc-projects/user_level_slurm_reservations | eae56588bb00abfe043714317a27481e036fcc29 | [
"MIT"
] | 11 | 2017-09-14T17:21:31.000Z | 2021-06-01T21:48:47.000Z | common/hil_slurm_helpers.py | mghpcc-projects/user_level_slurm_reservations | eae56588bb00abfe043714317a27481e036fcc29 | [
"MIT"
] | 3 | 2017-08-16T13:54:40.000Z | 2018-01-10T19:26:59.000Z | """
MassOpenCloud / Hardware Isolation Layer (MOC/HIL)
Slurm and *NX Subprocess Command Helpers
May 2017, Tim Donahue tpd001@gmail.com
"""
import os
from pwd import getpwnam, getpwuid
from subprocess import Popen, PIPE
from time import time
from hil_slurm_constants import (HIL_RESNAME_PREFIX, HIL_RESNAME_FIELD_SEPA... | 31.716981 | 98 | 0.65348 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,708 | 0.367638 |
f976fcf3758aba64e0576f78efb657866db8fe14 | 17,596 | py | Python | tools/contourlet_transform/tools/dfilters.py | yilinshao/CoT-Contourlet-Transformer | 44d36a05f81ec168e3ccd8b9438ddaee6283189e | [
"MIT"
] | 4 | 2021-12-21T07:45:01.000Z | 2021-12-21T09:15:47.000Z | tools/contourlet_transform/tools/dfilters.py | yilinshao/CoT-Contourlet-Transformer | 44d36a05f81ec168e3ccd8b9438ddaee6283189e | [
"MIT"
] | null | null | null | tools/contourlet_transform/tools/dfilters.py | yilinshao/CoT-Contourlet-Transformer | 44d36a05f81ec168e3ccd8b9438ddaee6283189e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PyContourlet
#
# A Python library for the Contourlet Transform.
#
# Copyright (C) 2011 Mazay Jiménez
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation ... | 37.759657 | 103 | 0.436065 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,007 | 0.284537 |
f9773a9cbbac8043bcf3bf565130d13c371454b2 | 96 | py | Python | src/wavestate/iirrational/external/tabulate/__init__.py | wavestate/wavestate-iirrational | 01d6dba8b2131fa2a099a74f17e6540f30cee606 | [
"Apache-2.0"
] | null | null | null | src/wavestate/iirrational/external/tabulate/__init__.py | wavestate/wavestate-iirrational | 01d6dba8b2131fa2a099a74f17e6540f30cee606 | [
"Apache-2.0"
] | null | null | null | src/wavestate/iirrational/external/tabulate/__init__.py | wavestate/wavestate-iirrational | 01d6dba8b2131fa2a099a74f17e6540f30cee606 | [
"Apache-2.0"
] | null | null | null | """
External libraries packaged with for version stability
"""
from .tabulate import tabulate
| 13.714286 | 54 | 0.770833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.645833 |
f97830507a9e81ba352de5e77becd93d7de239ce | 1,112 | py | Python | tests/test_statsutils.py | ofek/boltons | 395f690f4a24331c4554e2169ac18a15955a4eab | [
"BSD-3-Clause"
] | 6,058 | 2015-03-18T16:44:39.000Z | 2022-03-28T08:42:16.000Z | tests/test_statsutils.py | ofek/boltons | 395f690f4a24331c4554e2169ac18a15955a4eab | [
"BSD-3-Clause"
] | 289 | 2015-04-09T23:09:24.000Z | 2022-03-30T00:29:33.000Z | tests/test_statsutils.py | ofek/boltons | 395f690f4a24331c4554e2169ac18a15955a4eab | [
"BSD-3-Clause"
] | 407 | 2015-04-09T20:09:15.000Z | 2022-03-30T10:43:22.000Z | # -*- coding: utf-8 -*-
from boltons.statsutils import Stats
def test_stats_basic():
da = Stats(range(20))
assert da.mean == 9.5
assert round(da.std_dev, 2) == 5.77
assert da.variance == 33.25
assert da.skewness == 0
assert round(da.kurtosis, 1) == 1.9
assert da.median == 9.5
def _test_p... | 32.705882 | 115 | 0.615108 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 467 | 0.419964 |
f979feef783a84ff7f70e9da364235d7c960d2cb | 1,018 | py | Python | funcs.py | pgDora56/shinyintro | 15cc153106ebd88a5f73801f2bf0bef52d37cdab | [
"MIT"
] | null | null | null | funcs.py | pgDora56/shinyintro | 15cc153106ebd88a5f73801f2bf0bef52d37cdab | [
"MIT"
] | null | null | null | funcs.py | pgDora56/shinyintro | 15cc153106ebd88a5f73801f2bf0bef52d37cdab | [
"MIT"
] | null | null | null | import os
import pprint
import json
import random
accept = False
colors = {
"Vo": "#e05ab4",
"Da": "#59afe1",
"Vi": "#e0e05a"
}
with open('idols.json') as f:
idols = (json.load(f))["idols"] # Insert 23 data
def pick(msg):
global accept
if not accept:
print("Not accept")
retu... | 18.851852 | 72 | 0.54224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 281 | 0.272816 |
f97b2f6c294156a507ee4e398ae4a7d90fba5ed9 | 240 | py | Python | world_state.py | puskini33/Calculator | 79cc0021e8c9b5235d6c57c2d721deb254d73a33 | [
"MIT"
] | null | null | null | world_state.py | puskini33/Calculator | 79cc0021e8c9b5235d6c57c2d721deb254d73a33 | [
"MIT"
] | null | null | null | world_state.py | puskini33/Calculator | 79cc0021e8c9b5235d6c57c2d721deb254d73a33 | [
"MIT"
] | null | null | null | class WorldState(object):
def __init__(self):
self.variables = {}
def clone(self):
temporary_world_state = WorldState()
temporary_world_state.variables = self.variables
return temporary_world_state
| 24 | 56 | 0.675 | 239 | 0.995833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f97c2537579109b781456eb2fe785026c3ea5e59 | 10,782 | py | Python | UWBsim/interface/plot_widgets.py | kianheus/uwb-simulator | 888cdcae0d4ca101970971afbdf0113ba3bb1480 | [
"MIT"
] | 2 | 2021-08-25T03:27:06.000Z | 2021-09-26T05:08:19.000Z | UWBsim/interface/plot_widgets.py | kianheus/uwb-simulator | 888cdcae0d4ca101970971afbdf0113ba3bb1480 | [
"MIT"
] | null | null | null | UWBsim/interface/plot_widgets.py | kianheus/uwb-simulator | 888cdcae0d4ca101970971afbdf0113ba3bb1480 | [
"MIT"
] | 1 | 2021-07-17T10:59:15.000Z | 2021-07-17T10:59:15.000Z | """Plot Widgets for the UWB Simulation GUI
This file contains several plot widgets that can be used to plot
simulation data in real time and redraw the plots with matplotlib for
better quality.
Classes:
QLivePlot: Base class for real time plots
QLivePlot_Groundtrack: Real time plot for groundtrack
QLiveP... | 34.66881 | 126 | 0.516602 | 10,134 | 0.9399 | 0 | 0 | 0 | 0 | 0 | 0 | 1,715 | 0.159061 |
f97ca4c83d65c548b29075ec69330e20d6ca30b3 | 1,018 | py | Python | scripts/plot_summary_stats.py | JackKelly/slicedpy | c2fa7eb4c7b7374f8192a43d8e617b63c9e25e62 | [
"Apache-2.0"
] | 3 | 2017-02-03T22:05:25.000Z | 2017-08-29T19:06:17.000Z | scripts/plot_summary_stats.py | JackKelly/slicedpy | c2fa7eb4c7b7374f8192a43d8e617b63c9e25e62 | [
"Apache-2.0"
] | null | null | null | scripts/plot_summary_stats.py | JackKelly/slicedpy | c2fa7eb4c7b7374f8192a43d8e617b63c9e25e62 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from pda.dataset import init_aggregate_and_appliance_dataset_figure
import matplotlib.pyplot as plt
from scipy.stats import *
import numpy as np
subplots, chan = init_aggregate_and_appliance_dataset_figure(
start_date='2013/6/4 10:00', end_date='2013/6/4 13:30',
n_subplots=2, date_format... | 28.277778 | 73 | 0.656189 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 157 | 0.154224 |
f97cacad56a833075fdbf1486e99e188f8024b55 | 2,691 | py | Python | sciibo/network/connection.py | fdev/sciibo | 984ec1945cd0f371bce148c1eb1e811befadb478 | [
"MIT"
] | 14 | 2017-06-16T14:16:57.000Z | 2021-02-26T13:53:56.000Z | sciibo/network/connection.py | fdev/sciibo | 984ec1945cd0f371bce148c1eb1e811befadb478 | [
"MIT"
] | 1 | 2018-06-27T16:11:48.000Z | 2019-01-23T12:02:17.000Z | sciibo/network/connection.py | fdev/sciibo | 984ec1945cd0f371bce148c1eb1e811befadb478 | [
"MIT"
] | null | null | null | import socket
import json
import struct
from sciibo.core.helpers import Queue
from .thread import SocketThread
class ConnectionThread(SocketThread):
def __init__(self, sock):
super(ConnectionThread, self).__init__()
self.sock = sock
# The number of bytes we are expecting
self.exp... | 27.459184 | 84 | 0.544036 | 2,575 | 0.956893 | 0 | 0 | 0 | 0 | 0 | 0 | 500 | 0.185805 |
f97d02d723f0a4441c6c06372a7158427073778d | 2,651 | py | Python | libs/PieMeter.py | lionheart/TimeTracker-Linux | 64405d53fd12d2593ef4879b867ff38a4d5b9ca9 | [
"MIT"
] | 12 | 2015-02-06T19:06:49.000Z | 2019-09-24T17:58:17.000Z | libs/PieMeter.py | lionheart/TimeTracker-Linux | 64405d53fd12d2593ef4879b867ff38a4d5b9ca9 | [
"MIT"
] | null | null | null | libs/PieMeter.py | lionheart/TimeTracker-Linux | 64405d53fd12d2593ef4879b867ff38a4d5b9ca9 | [
"MIT"
] | 6 | 2015-11-22T01:58:31.000Z | 2019-11-04T22:56:38.000Z | # Copyright (C) 2008 Jimmy Do <jimmydo@users.sourceforge.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This... | 33.987179 | 97 | 0.626556 | 1,812 | 0.683516 | 0 | 0 | 0 | 0 | 0 | 0 | 804 | 0.303282 |
f97d4fd046debdeff0094ec80a682b86eb50db54 | 6,192 | py | Python | examples/pinball.py | jgrigonis/arcade | 9b624da7da52e3909f6e82c552446b90249041f1 | [
"MIT"
] | 1 | 2021-05-23T20:30:46.000Z | 2021-05-23T20:30:46.000Z | examples/pinball.py | jgrigonis/arcade | 9b624da7da52e3909f6e82c552446b90249041f1 | [
"MIT"
] | null | null | null | examples/pinball.py | jgrigonis/arcade | 9b624da7da52e3909f6e82c552446b90249041f1 | [
"MIT"
] | null | null | null | import arcade
import timeit
BALL_DRAG = 0.001
NO_FLIPPER = 0
FLIPPER_UP = 1
class MyApplication(arcade.Window):
""" Main application class. """
def __init__(self, width, height, resizable):
super().__init__(width, height, resizable=resizable)
self.sprite_list = arcade.SpriteList()
s... | 33.652174 | 138 | 0.55491 | 6,021 | 0.972384 | 0 | 0 | 0 | 0 | 0 | 0 | 723 | 0.116764 |
f97e5968772769d07d1c5c3519564d5e93b96cb9 | 2,350 | py | Python | pygomas/pack.py | sfp932705/pygomas | 8cdd7e973b8b4e8de467803c106ec44ca6b8bd03 | [
"MIT"
] | 3 | 2019-06-20T08:55:36.000Z | 2019-07-04T14:10:40.000Z | pygomas/pack.py | sfp932705/pygomas | 8cdd7e973b8b4e8de467803c106ec44ca6b8bd03 | [
"MIT"
] | null | null | null | pygomas/pack.py | sfp932705/pygomas | 8cdd7e973b8b4e8de467803c106ec44ca6b8bd03 | [
"MIT"
] | null | null | null | import json
from loguru import logger
from .config import PERFORMATIVE, PERFORMATIVE_PACK, PERFORMATIVE_PACK_TAKEN, TEAM, X, Y, Z, NAME, ACTION, CREATE, \
TYPE
from .agent import AbstractAgent, LONG_RECEIVE_WAIT
from .vector import Vector3D
from spade.message import Message
from spade.behaviour import OneShotBehav... | 31.333333 | 116 | 0.635745 | 1,682 | 0.715745 | 0 | 0 | 0 | 0 | 1,035 | 0.440426 | 112 | 0.04766 |
f97e89c0eb4e106c1ec357be4b95f0207161d996 | 2,178 | py | Python | Utils/initialize.py | soshishimada/PhysCap_demo_release | 542756ed9ecdca77eda8b6b44ba2348253b999c3 | [
"Unlicense"
] | 62 | 2021-09-05T19:36:06.000Z | 2022-03-29T11:47:09.000Z | Utils/initialize.py | soshishimada/PhysCap_demo_release | 542756ed9ecdca77eda8b6b44ba2348253b999c3 | [
"Unlicense"
] | 4 | 2021-09-21T09:52:02.000Z | 2022-03-27T09:08:30.000Z | Utils/initialize.py | soshishimada/PhysCap_demo_release | 542756ed9ecdca77eda8b6b44ba2348253b999c3 | [
"Unlicense"
] | 10 | 2021-09-05T00:27:17.000Z | 2022-03-22T13:25:57.000Z | import numpy as np
import pybullet as p
class Initializer():
def __init__(self,floor_known=None,floor_frame_path=None,):
if floor_known:
self.RT = np.load(floor_frame_path)
else:
self.RT =np.eye(4)
self.rbdl2bullet = [0, 1, 2, 3, 4, 5, 6, 7, 8, ... | 34.571429 | 166 | 0.573462 | 2,134 | 0.979798 | 0 | 0 | 0 | 0 | 0 | 0 | 224 | 0.102847 |
f97e91890c0cdcab8847df722787798324fca2ec | 3,220 | py | Python | nlptasks/padding.py | ulf1/nlptasks | 07d36448b517a18f76088f5d9cfb853e7602b079 | [
"Apache-2.0"
] | 2 | 2020-12-30T13:11:09.000Z | 2021-11-04T19:40:31.000Z | nlptasks/padding.py | ulf1/nlptasks | 07d36448b517a18f76088f5d9cfb853e7602b079 | [
"Apache-2.0"
] | 99 | 2020-11-02T14:58:04.000Z | 2021-04-09T18:01:34.000Z | nlptasks/padding.py | ulf1/nlptasks | 07d36448b517a18f76088f5d9cfb853e7602b079 | [
"Apache-2.0"
] | null | null | null | import tensorflow.keras as keras # pad_sequences
from pad_sequences import pad_sequences_adjacency
from pad_sequences import pad_sequences_sparse
def pad_idseqs(func):
def wrapper(*args, **kwargs):
# read and remove padding settings
maxlen = kwargs.pop('maxlen', None)
padding = kwargs.pop... | 34.255319 | 73 | 0.617081 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 616 | 0.191304 |
f97eb5e10ca3b047fe571ca899a9ef09001fcef1 | 4,894 | py | Python | py/g1/threads/tests/test_locks.py | clchiou/garage | 446ff34f86cdbd114b09b643da44988cf5d027a3 | [
"MIT"
] | 3 | 2016-01-04T06:28:52.000Z | 2020-09-20T13:18:40.000Z | py/g1/threads/tests/test_locks.py | clchiou/garage | 446ff34f86cdbd114b09b643da44988cf5d027a3 | [
"MIT"
] | null | null | null | py/g1/threads/tests/test_locks.py | clchiou/garage | 446ff34f86cdbd114b09b643da44988cf5d027a3 | [
"MIT"
] | null | null | null | import unittest
import threading
from g1.threads import locks
class ReadWriteLockTest(unittest.TestCase):
def setUp(self):
super().setUp()
self.rwlock = locks.ReadWriteLock()
def assert_state(self, num_readers, num_writers):
self.assertEqual(self.rwlock._num_readers, num_readers)
... | 28.619883 | 66 | 0.585411 | 4,708 | 0.961994 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.002043 |
f9835a83cc85b616ebc4877cb26f2e75d6afe07f | 1,104 | py | Python | statisticalDistributions.py | mrhsce/simPython | 94598164abc9833bad1121a978acb94c4fecec27 | [
"Apache-2.0"
] | 2 | 2015-12-19T04:27:12.000Z | 2016-11-23T18:53:50.000Z | statisticalDistributions.py | mrhsce/simPython | 94598164abc9833bad1121a978acb94c4fecec27 | [
"Apache-2.0"
] | null | null | null | statisticalDistributions.py | mrhsce/simPython | 94598164abc9833bad1121a978acb94c4fecec27 | [
"Apache-2.0"
] | null | null | null | """ Here definitions and attributes of all statistical distributions that are used in the simulation are defined"""
from abc import ABCMeta, abstractmethod
import random
#import np
class StatDis(object):
__metaclass__ = ABCMeta
def __init__(self):
pass
@abstractmethod
def generate(self):
... | 19.714286 | 115 | 0.645833 | 908 | 0.822464 | 0 | 0 | 52 | 0.047101 | 0 | 0 | 125 | 0.113225 |
f983fe925ecae418e3ac67726cae140e97825556 | 6,594 | py | Python | RainbowGrades/parsexml.py | hifiadi/Submitty | 62a8239313cff7e3f841ff66aeda6b0557e9c15b | [
"BSD-3-Clause"
] | 2 | 2017-10-11T17:48:33.000Z | 2020-12-15T16:05:05.000Z | RainbowGrades/parsexml.py | hifiadi/Submitty | 62a8239313cff7e3f841ff66aeda6b0557e9c15b | [
"BSD-3-Clause"
] | 4 | 2019-04-25T02:47:34.000Z | 2020-03-31T18:56:45.000Z | RainbowGrades/parsexml.py | hifiadi/Submitty | 62a8239313cff7e3f841ff66aeda6b0557e9c15b | [
"BSD-3-Clause"
] | 1 | 2020-02-07T19:19:20.000Z | 2020-02-07T19:19:20.000Z | #!/usr/bin/env python3
import csv
import xml.etree.ElementTree as ET
import sys
import os.path
class QuestionData:
final_answer = ""
final_answer_time = 0
first_answer = ""
attempts = 0
first_answer_time = 0
def __init__(self,final_answer,final_answer_time,attempts,first_answer,first_answer_t... | 44.554054 | 120 | 0.474826 | 445 | 0.067486 | 0 | 0 | 0 | 0 | 0 | 0 | 1,313 | 0.19912 |
f98449b95d48df636ca504bf4073160f56093406 | 2,255 | py | Python | header.py | yufernando/inDelphi-app | 37938f7aaa1630fb80e7568d3d13472eedb76a6d | [
"FSFAP"
] | 13 | 2018-11-18T21:53:46.000Z | 2021-03-01T16:14:21.000Z | header.py | yufernando/inDelphi-app | 37938f7aaa1630fb80e7568d3d13472eedb76a6d | [
"FSFAP"
] | 2 | 2020-02-11T22:34:41.000Z | 2020-06-05T18:16:10.000Z | header.py | yufernando/inDelphi-app | 37938f7aaa1630fb80e7568d3d13472eedb76a6d | [
"FSFAP"
] | 3 | 2018-12-03T05:20:01.000Z | 2021-07-28T22:33:54.000Z | import dash
import dash_core_components as dcc
import dash_html_components as html
divider_text = ' • '
def get_navigation_header(page_nm):
font_size_param = 16
dot_style = dict(
color = 'gray',
fontSize = '%spx' % (font_size_param),
)
default_style = dict(
position = 'relativ... | 23.010204 | 59 | 0.446563 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 386 | 0.171023 |
f9850dd79a394638d5a5c2e62aadd31fb4c2407b | 96 | py | Python | venv/lib/python3.8/site-packages/poetry/core/_vendor/packaging/tags.py | GiulianaPola/select_repeats | 17a0d053d4f874e42cf654dd142168c2ec8fbd11 | [
"MIT"
] | 2 | 2022-03-13T01:58:52.000Z | 2022-03-31T06:07:54.000Z | venv/lib/python3.8/site-packages/poetry/core/_vendor/packaging/tags.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | 19 | 2021-11-20T04:09:18.000Z | 2022-03-23T15:05:55.000Z | venv/lib/python3.8/site-packages/poetry/core/_vendor/packaging/tags.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | null | null | null | /home/runner/.cache/pip/pool/68/e2/05/188e3a14bbe42690f0cbce7c7c576b1dbc9d3d1bb571a2d3908f144cea | 96 | 96 | 0.895833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f98574c16f4148423e98de5b6034c5f75d3ac988 | 217 | py | Python | toolbox/util/normalize.py | Yilin1010/DeleteKnowledge | 49b7e0e3a2247e482ba8876762719e4adb3074c6 | [
"Apache-2.0"
] | null | null | null | toolbox/util/normalize.py | Yilin1010/DeleteKnowledge | 49b7e0e3a2247e482ba8876762719e4adb3074c6 | [
"Apache-2.0"
] | null | null | null | toolbox/util/normalize.py | Yilin1010/DeleteKnowledge | 49b7e0e3a2247e482ba8876762719e4adb3074c6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue May 24 11:14:03 2016
@author: Wajih-PC
"""
import numpy as np
def normalize(x,mu,sigma):
x = np.subtract(x,mu)
x = np.true_divide(x,sigma)
return x | 19.727273 | 36 | 0.580645 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.414747 |
f9867c0f2c0b8271efb4f277dc9a847054941a6b | 1,070 | py | Python | 34_Find_First_and_Last_Position_of_Element_in_Sorted_Array.py | yuqingchen/Leetcode | 6cbcb36e66a10a226ddb0966701e61ce4c2434d4 | [
"MIT"
] | 1 | 2019-12-12T20:16:08.000Z | 2019-12-12T20:16:08.000Z | 34_Find_First_and_Last_Position_of_Element_in_Sorted_Array.py | yuqingchen/Leetcode | 6cbcb36e66a10a226ddb0966701e61ce4c2434d4 | [
"MIT"
] | null | null | null | 34_Find_First_and_Last_Position_of_Element_in_Sorted_Array.py | yuqingchen/Leetcode | 6cbcb36e66a10a226ddb0966701e61ce4c2434d4 | [
"MIT"
] | null | null | null | class Solution:
def searchRange(self, nums: List[int], target: int) -> List[int]:
left, right = self.first(nums, target), self.last(nums, target)
return [left, right]
def last(self, nums, target) :
if not nums :
return -1
left, right = 0, len(nums) -1
whi... | 29.722222 | 71 | 0.44486 | 1,070 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f986bf3f2c420c696f6c53ea84f10ad7ccfa26ea | 1,526 | py | Python | demos/pandas/pandas_concat&append.py | szj2ys/deal_with_the_tasks_and_challenges | 94b9f4aad26c7e2ec5a59cf67e9e977bfa3d5221 | [
"Apache-2.0"
] | null | null | null | demos/pandas/pandas_concat&append.py | szj2ys/deal_with_the_tasks_and_challenges | 94b9f4aad26c7e2ec5a59cf67e9e977bfa3d5221 | [
"Apache-2.0"
] | null | null | null | demos/pandas/pandas_concat&append.py | szj2ys/deal_with_the_tasks_and_challenges | 94b9f4aad26c7e2ec5a59cf67e9e977bfa3d5221 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy as np
#定义资料集
df1 = pd.DataFrame(np.ones((3, 4)) * 0, columns=['a', 'b', 'c', 'd'])
df2 = pd.DataFrame(np.ones((3, 4)) * 1, columns=['a', 'b', 'c', 'd'])
df3 = pd.DataFrame(np.ones((3, 4)) * 2, columns=['a', 'b', 'c', 'd'])
#concat纵向合并 axis=0纵向,axis=1横向
res = pd.concat([df1, df2, df3],... | 26.310345 | 69 | 0.593054 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 773 | 0.416936 |
f9873b3ec6305739faa020963cb0f6929823dc6d | 799 | py | Python | e/mail-relay/web/apps/core/migrations/0051_customersetting_transfer_max_size.py | zhouli121018/nodejsgm | 0ccbc8acf61badc812f684dd39253d55c99f08eb | [
"MIT"
] | null | null | null | e/mail-relay/web/apps/core/migrations/0051_customersetting_transfer_max_size.py | zhouli121018/nodejsgm | 0ccbc8acf61badc812f684dd39253d55c99f08eb | [
"MIT"
] | 18 | 2020-06-05T18:17:40.000Z | 2022-03-11T23:25:21.000Z | e/mail-relay/web/apps/core/migrations/0051_customersetting_transfer_max_size.py | zhouli121018/nodejsgm | 0ccbc8acf61badc812f684dd39253d55c99f08eb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0050_customersetting_can_view_mail'),
]
operations = [
migrations.AddField(
model_name='customersetting'... | 39.95 | 421 | 0.713392 | 690 | 0.863579 | 0 | 0 | 0 | 0 | 0 | 0 | 446 | 0.558198 |
f9873ed126ec1fdd07f8e281595ede0f1e5dfbf6 | 4,128 | py | Python | python-django/oauth2demo/oauth/core/oauthclient.py | SequencingDOTcom/oAuth2-demo | 609bd138cff07643a0c3e1df48f4f2e4adc9be34 | [
"MIT"
] | 1 | 2020-11-05T22:16:37.000Z | 2020-11-05T22:16:37.000Z | python-django/oauth2demo/oauth/core/oauthclient.py | SequencingDOTcom/oAuth2-demo | 609bd138cff07643a0c3e1df48f4f2e4adc9be34 | [
"MIT"
] | 3 | 2018-02-24T15:01:20.000Z | 2021-11-29T17:29:02.000Z | python-django/oauth2demo/oauth/core/oauthclient.py | SequencingDOTcom/oAuth2-demo | 609bd138cff07643a0c3e1df48f4f2e4adc9be34 | [
"MIT"
] | 3 | 2017-04-06T01:38:20.000Z | 2017-05-17T09:44:35.000Z | import urllib
import sched
import time
from threading import Thread
from token import Token
from ..utils.http import do_basic_secure_post
from ..exceptions.exceptions import BasicAuthenticationFailedException
class DefaultSequencingOAuth2Client(object):
# Attribute for value of redirect url
ATTR_REDIRECT_UR... | 34.115702 | 96 | 0.678537 | 3,915 | 0.948401 | 0 | 0 | 0 | 0 | 0 | 0 | 548 | 0.132752 |
f987b372c8da570186369c27352bfdc8a2dc0b25 | 1,019 | py | Python | commands/elastic/utils.py | surfedushare/search-portal | f5486d6b07b7b04a46ce707cee5174db4f8da222 | [
"MIT"
] | 2 | 2021-08-19T09:40:59.000Z | 2021-12-14T11:08:20.000Z | commands/elastic/utils.py | surfedushare/search-portal | 708a0d05eee13c696ca9abd7e84ab620d3900fbe | [
"MIT"
] | 159 | 2020-05-14T14:17:34.000Z | 2022-03-23T10:28:13.000Z | commands/elastic/utils.py | nppo/search-portal | aedf21e334f178c049f9d6cf37cafd6efc07bc0d | [
"MIT"
] | 1 | 2021-11-11T13:37:22.000Z | 2021-11-11T13:37:22.000Z | from elasticsearch import Elasticsearch, RequestsHttpConnection
from requests_aws4auth import AWS4Auth
import boto3
def get_es_client(conn, silent=False):
"""
Returns the elasticsearch client connected through port forwarding settings
"""
elastic_url = "https://localhost:9222"
protocol_config = {
... | 31.84375 | 94 | 0.684004 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 239 | 0.234544 |
f98a6174a8d5b6ced1433ccb3968837fdf52d7af | 7,135 | py | Python | tests/test_signals.py | sulfadimetoxin/oarepo-taxonomies | b8385173614aa711a5e316c8fc24ac065b48aa3d | [
"MIT"
] | null | null | null | tests/test_signals.py | sulfadimetoxin/oarepo-taxonomies | b8385173614aa711a5e316c8fc24ac065b48aa3d | [
"MIT"
] | 9 | 2020-08-24T08:49:15.000Z | 2021-08-05T16:45:23.000Z | tests/test_signals.py | sulfadimetoxin/oarepo-taxonomies | b8385173614aa711a5e316c8fc24ac065b48aa3d | [
"MIT"
] | 1 | 2020-08-20T18:39:43.000Z | 2020-08-20T18:39:43.000Z | from pprint import pprint
import pytest
from flask_taxonomies.proxies import current_flask_taxonomies
from flask_taxonomies.term_identification import TermIdentification
from invenio_records import Record
from oarepo_taxonomies.exceptions import DeleteAbortedError
from oarepo_taxonomies.signals import lock_term
from ... | 38.777174 | 99 | 0.568605 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,017 | 0.282691 |
f98c3635dfd0d3ae569222c031b018e24dab8ea9 | 1,322 | py | Python | sendemail/views.py | sami-sinnari/MilestoneProject4 | 4a66f5cd5e44e9ff4dbaeeb3e8733c0e2db6629e | [
"W3C",
"PostgreSQL"
] | null | null | null | sendemail/views.py | sami-sinnari/MilestoneProject4 | 4a66f5cd5e44e9ff4dbaeeb3e8733c0e2db6629e | [
"W3C",
"PostgreSQL"
] | null | null | null | sendemail/views.py | sami-sinnari/MilestoneProject4 | 4a66f5cd5e44e9ff4dbaeeb3e8733c0e2db6629e | [
"W3C",
"PostgreSQL"
] | 1 | 2021-08-31T03:29:02.000Z | 2021-08-31T03:29:02.000Z | from django.core.mail import send_mail, BadHeaderError
from django.http import HttpResponse
from django.shortcuts import render, redirect
from .forms import ContactForm
from profiles.models import UserProfile
def contactView(request):
if request.user.is_authenticated:
try:
profile = UserProfil... | 31.47619 | 78 | 0.621785 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 189 | 0.142965 |
f98cbeedab7f46e8e4601542568092c0c0c15c19 | 592 | py | Python | tests/test_accounts.py | edgeee/buycoins-python | 72a3130cf43d0c618e58418b3d8cb7ce73b0f133 | [
"MIT"
] | 55 | 2021-02-02T22:09:37.000Z | 2022-02-24T12:17:23.000Z | tests/test_accounts.py | edgeee/buycoins-python | 72a3130cf43d0c618e58418b3d8cb7ce73b0f133 | [
"MIT"
] | 2 | 2021-03-24T20:11:02.000Z | 2021-04-27T13:13:27.000Z | tests/test_accounts.py | edgeee/buycoins-python | 72a3130cf43d0c618e58418b3d8cb7ce73b0f133 | [
"MIT"
] | 8 | 2021-02-08T17:06:53.000Z | 2022-02-13T09:38:59.000Z | from tests.utils import _mock_gql
create_deposit_response = dict(
createDepositAccount=dict(
accountNumber="123",
accountName="john doe",
accountType="deposit",
bankName="Providus",
accountReference="ref",
)
)
def test_create_deposit():
from buycoins import accoun... | 23.68 | 58 | 0.689189 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.116554 |
f98d3f6b60f1e702d811a09d53f295688785eb0a | 3,755 | py | Python | fabfile/s3_copy.py | MadeInHaus/django-template | 73d3bdb85e9b1b2723a1de67d6765ce0647dce3a | [
"MIT"
] | 1 | 2015-06-18T22:37:28.000Z | 2015-06-18T22:37:28.000Z | fabfile/s3_copy.py | MadeInHaus/django-template | 73d3bdb85e9b1b2723a1de67d6765ce0647dce3a | [
"MIT"
] | 11 | 2015-01-07T16:58:55.000Z | 2022-01-27T16:22:22.000Z | fabfile/s3_copy.py | MadeInHaus/django-template | 73d3bdb85e9b1b2723a1de67d6765ce0647dce3a | [
"MIT"
] | null | null | null | from fabric.decorators import task, roles
from haus_vars import APP_INFO, parse_vars
from fabric.api import run, execute
from fabric.context_managers import cd
from heroku import create_fixture_on_s3, grab_fixture_on_s3
import cStringIO
def copyBucket(srcBucketName, dstBucketName, aws_key, aws_secret, folder_name... | 40.376344 | 170 | 0.694541 | 0 | 0 | 0 | 0 | 1,853 | 0.493475 | 0 | 0 | 944 | 0.251398 |
f98d78abc4c61ae00ffd3cee5b5299a82b124239 | 505 | py | Python | umysqldb/__init__.py | arozumenko/pyumysql | 34b61faf33e2db644b02c483c07ddca32165539a | [
"Apache-2.0"
] | null | null | null | umysqldb/__init__.py | arozumenko/pyumysql | 34b61faf33e2db644b02c483c07ddca32165539a | [
"Apache-2.0"
] | null | null | null | umysqldb/__init__.py | arozumenko/pyumysql | 34b61faf33e2db644b02c483c07ddca32165539a | [
"Apache-2.0"
] | null | null | null | from umysqldb import connections
from umysqldb import cursors
def connect(db, host="localhost", port=3306, user="root", passwd="root",
charset="utf8", cursorclass=cursors.Cursor, autocommit=False):
return connections.Connection(database=db, host=host, port=port, user=user,
... | 42.083333 | 79 | 0.609901 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.057426 |
f98fe6f86f42085c174f1fcd733ce2400cb3d904 | 2,696 | py | Python | system_monitor_script/build_network.py | carabri/carabri | c8b94080331ab66ee116ee6e87e13e295e4f9604 | [
"Apache-2.0"
] | null | null | null | system_monitor_script/build_network.py | carabri/carabri | c8b94080331ab66ee116ee6e87e13e295e4f9604 | [
"Apache-2.0"
] | null | null | null | system_monitor_script/build_network.py | carabri/carabri | c8b94080331ab66ee116ee6e87e13e295e4f9604 | [
"Apache-2.0"
] | null | null | null | import re
import networkx
import itertools
import argparse
import json
def build_network(filename,outfile,mb_threshold):
regex = re.compile('([0-9]+) kB: (.*)(?=\()')
network_list = []
current_network = []
with open(filename, 'r') as memlog:
ignore_line = True
for line in memlog.r... | 42.125 | 177 | 0.555267 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 690 | 0.255935 |
f98fff79925e8d8be7997e37273c0b32991d86de | 1,428 | py | Python | BigO/insertion_sort.py | jeff-lund/CS350 | 7227b53275c62d45e899a531136a96a866c32a16 | [
"MIT"
] | 2 | 2019-10-16T01:59:42.000Z | 2019-11-13T19:25:00.000Z | BigO/insertion_sort.py | jeff-lund/CS350 | 7227b53275c62d45e899a531136a96a866c32a16 | [
"MIT"
] | null | null | null | BigO/insertion_sort.py | jeff-lund/CS350 | 7227b53275c62d45e899a531136a96a866c32a16 | [
"MIT"
] | 2 | 2019-10-16T01:59:49.000Z | 2019-11-15T01:19:18.000Z | from sys import argv
from random import randint
from time import time
import matplotlib.pyplot as plt
def insertion_sort(arr):
n = len(arr)
for i in range(1, n):
v = arr[i]
j = i - 1
while j >= 0 and arr[j] > v:
arr[j + 1] = arr[j]
j -= 1
arr... | 28.56 | 134 | 0.459384 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 186 | 0.130252 |
f994d4e53b4b2fdca4fdd7080892fff0acd2645e | 638 | py | Python | tasks.py | RevolutionTech/revolutiontech.ca | a3f0f1526812554938674c4fc9e7ea90ed4ffe6d | [
"0BSD"
] | null | null | null | tasks.py | RevolutionTech/revolutiontech.ca | a3f0f1526812554938674c4fc9e7ea90ed4ffe6d | [
"0BSD"
] | 171 | 2017-11-02T05:39:37.000Z | 2022-03-07T01:13:53.000Z | tasks.py | RevolutionTech/carrier-owl | f72f47e39ea819681fa7b50de2b52e393edeeb96 | [
"0BSD"
] | 1 | 2018-01-13T08:11:26.000Z | 2018-01-13T08:11:26.000Z | from invoke import Collection, task
from opstrich.invoke import check, openssl
@task
def deploy(c):
"""
Build and run a Docker container to deploy.
"""
c.run("docker build -t zappa-lambda .")
c.run("docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY zappa-lambda")
c.run(
"DJANGO_... | 23.62963 | 106 | 0.694357 | 0 | 0 | 0 | 0 | 493 | 0.772727 | 0 | 0 | 351 | 0.550157 |
f994d8e1e290868506a6fadbde009edec090ad8b | 2,490 | py | Python | bear/scripts/lunar_lander/remove_data.py | junmokane/AI602_Project | 59c132ae04751f9fb6cf6ebb491042cbf4de003d | [
"Apache-2.0"
] | 1 | 2020-10-14T05:51:36.000Z | 2020-10-14T05:51:36.000Z | bear/scripts/lunar_lander/remove_data.py | junmokane/AI602_Project | 59c132ae04751f9fb6cf6ebb491042cbf4de003d | [
"Apache-2.0"
] | null | null | null | bear/scripts/lunar_lander/remove_data.py | junmokane/AI602_Project | 59c132ae04751f9fb6cf6ebb491042cbf4de003d | [
"Apache-2.0"
] | null | null | null | import torch
import numpy as np
import copy
def remove(path):
data = torch.load(path)
location_list, action_list = [np.reshape(st[0], (1, 8)) for st in data], [st[1] for st in data]
location_list = np.concatenate(location_list, axis=0)
action_list = np.asarray(action_list)
action_0 = action_l... | 35.070423 | 112 | 0.65743 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 459 | 0.184337 |
f9962c0754c5c1d3d6c4db26b056e29e7ec2794f | 188 | py | Python | tests/data/demo-project/demo/c/d.py | youngquan/goldenmask | 5b16eea94df7ddd988fae0c1a4e265b16af9ded2 | [
"Apache-2.0"
] | 6 | 2020-04-28T18:13:54.000Z | 2021-12-23T18:26:30.000Z | tests/data/demo-project/demo/c/d.py | youngquan/goldenmask | 5b16eea94df7ddd988fae0c1a4e265b16af9ded2 | [
"Apache-2.0"
] | 1 | 2020-04-28T18:08:46.000Z | 2020-04-30T12:49:46.000Z | tests/data/demo-project/demo/c/d.py | youngquan/goldenmask | 5b16eea94df7ddd988fae0c1a4e265b16af9ded2 | [
"Apache-2.0"
] | 1 | 2020-08-18T21:03:39.000Z | 2020-08-18T21:03:39.000Z | def e():
print("This is function e in file d!")
class E:
def __init__(self):
self.content = "This is class E in file d"
def print(self):
print(self.content)
| 17.090909 | 50 | 0.585106 | 133 | 0.707447 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 0.308511 |
f9990629b2219f3dd1a7da2e2230e3d0eb99c9a8 | 2,435 | py | Python | flex/http/negotiators.py | centergy/flex | 4fc11d3ad48e4b5016f53256015e3eed2157daae | [
"MIT"
] | null | null | null | flex/http/negotiators.py | centergy/flex | 4fc11d3ad48e4b5016f53256015e3eed2157daae | [
"MIT"
] | null | null | null | flex/http/negotiators.py | centergy/flex | 4fc11d3ad48e4b5016f53256015e3eed2157daae | [
"MIT"
] | null | null | null | """
Content negotiation deals with selecting an appropriate renderer given the
incoming request. Typically this will be based on the request's Accept header.
"""
import flask as fl
from . import exc
class BaseContentNegotiator(object):
def get_accept_mimetypes(self, request=None):
"""Given the incoming request... | 27.988506 | 92 | 0.70308 | 2,227 | 0.914579 | 249 | 0.102259 | 0 | 0 | 0 | 0 | 478 | 0.196304 |
f999e5eac5ca0101fdb8157a0b22f62d11306d51 | 403 | py | Python | accounts/migrations/0005_addtocart_cart_useremail.py | noelsj007/ecommerceweb | e00edfe9110d2cc54deebd97043e0aa152c8afd4 | [
"Unlicense"
] | null | null | null | accounts/migrations/0005_addtocart_cart_useremail.py | noelsj007/ecommerceweb | e00edfe9110d2cc54deebd97043e0aa152c8afd4 | [
"Unlicense"
] | null | null | null | accounts/migrations/0005_addtocart_cart_useremail.py | noelsj007/ecommerceweb | e00edfe9110d2cc54deebd97043e0aa152c8afd4 | [
"Unlicense"
] | null | null | null | # Generated by Django 3.0.8 on 2020-08-11 14:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0004_addtocart'),
]
operations = [
migrations.AddField(
model_name='addtocart',
name='cart_useremail',
... | 21.210526 | 66 | 0.60794 | 310 | 0.769231 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.248139 |
f99b06a71dceb4f5f766c0212d0a17f6f162c70a | 539 | py | Python | uva_answers/10018/main.py | andriisoldatenko/fan | e7ed6ea0f39bd71af4e286af8d81ebc137ae8ff4 | [
"MIT"
] | 6 | 2018-11-18T15:00:02.000Z | 2022-03-23T21:32:24.000Z | uva_answers/10018/main.py | andriisoldatenko/leetcode | 8fef4da00234f8acbea9b71ee730b2267b70395f | [
"MIT"
] | null | null | null | uva_answers/10018/main.py | andriisoldatenko/leetcode | 8fef4da00234f8acbea9b71ee730b2267b70395f | [
"MIT"
] | null | null | null | import pprint
import sys
import re
FILE = sys.stdin
#FILE = open('sample.in')
def is_palindrome(n):
k = str(n)
return list(k) == list(reversed(k))
def reverse_add(n):
return n + int(str(n)[::-1])
#import ipdb;ipdb.set_trace()
test_cases = range(int(FILE.readline()))
#import ipdb; ipdb.set_trace()
for t... | 20.730769 | 40 | 0.64564 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 85 | 0.157699 |
f99c7dc6ce29a2ffb9fe2abe6759971a3c9cf033 | 214 | py | Python | cogkge/data/processor/fb15k237processor.py | jinzhuoran/CogKGE | b0e819a1d34cf61a7d70c33808da3377b73c8fd6 | [
"MIT"
] | 18 | 2022-01-22T09:52:57.000Z | 2022-03-22T15:02:12.000Z | cogkge/data/processor/fb15k237processor.py | CogNLP/CogKGE | 70d851d6489600c1e90eb25b0388a3ceba2f078c | [
"MIT"
] | null | null | null | cogkge/data/processor/fb15k237processor.py | CogNLP/CogKGE | 70d851d6489600c1e90eb25b0388a3ceba2f078c | [
"MIT"
] | null | null | null | from .baseprocessor import BaseProcessor
class FB15K237Processor(BaseProcessor):
def __init__(self, node_lut, relation_lut, reprocess):
super().__init__("FB15K237", node_lut, relation_lut, reprocess)
| 30.571429 | 71 | 0.771028 | 170 | 0.794393 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.046729 |
f99d843d5eb26f48db07153b199bcf310e6ecade | 1,256 | pyw | Python | python/discord.pyw | hentai-burner/mastur-beta | 2893a4ef3ee4aae5a9a78141badae4e6544fb071 | [
"MIT"
] | null | null | null | python/discord.pyw | hentai-burner/mastur-beta | 2893a4ef3ee4aae5a9a78141badae4e6544fb071 | [
"MIT"
] | null | null | null | python/discord.pyw | hentai-burner/mastur-beta | 2893a4ef3ee4aae5a9a78141badae4e6544fb071 | [
"MIT"
] | null | null | null | import time
import os
import pathlib
import sys
from subprocess import call
#TODO: Maybe make a pip_handler file idk
def pip_install(packageName: str):
try:
call(f'py -m pip install {packageName}')
except:
call(f'pip install {packageName}')
try:
from pypresence import prese... | 27.304348 | 84 | 0.621815 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 595 | 0.473726 |
f99fbafb536fdd0dcee45c41f8a1a58e47ef7f46 | 1,086 | py | Python | 2dtree/bin/bpy_validation.py | LeanderSilur/Snippets | 3ff718f91439450bd5aff13342aa98a9d4957e85 | [
"MIT"
] | 9 | 2020-02-04T05:41:09.000Z | 2022-03-08T06:14:54.000Z | 2dtree/bin/bpy_validation.py | LeanderSilur/Snippets | 3ff718f91439450bd5aff13342aa98a9d4957e85 | [
"MIT"
] | 2 | 2020-06-14T19:58:01.000Z | 2021-07-04T14:21:33.000Z | 2dtree/bin/bpy_validation.py | LeanderSilur/Snippets | 3ff718f91439450bd5aff13342aa98a9d4957e85 | [
"MIT"
] | 2 | 2020-07-29T19:54:44.000Z | 2020-07-29T20:00:24.000Z | import bpy
import subprocess
REBUILD = 0
if REBUILD:
subprocess.call([
"g++",
bpy.path.abspath('//../main.cpp'),
bpy.path.abspath('//../PtTree.cpp'),
"-o",
bpy.path.abspath('//PtTree')
])
# Collect the input data.
verts = bpy.data.meshes['PointCloud'].vertices
quer... | 22.163265 | 69 | 0.621547 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 183 | 0.168508 |
f9a216fdaa67e5fc6913f5aa98c379d5a25e120e | 10,274 | py | Python | zgrab2_schemas/zgrab2/ssh.py | aspacewalz/zgrab2 | d9ed4f141dae102d65ba1e08bf2eb4179678d172 | [
"Apache-2.0"
] | 1,031 | 2016-11-29T15:12:05.000Z | 2022-03-31T05:02:50.000Z | zgrab2_schemas/zgrab2/ssh.py | vl4deee11/zgrab2 | c859e9ef1173955dadae88416289ef8cc8910495 | [
"Apache-2.0"
] | 191 | 2017-07-24T17:27:57.000Z | 2022-03-16T04:59:59.000Z | zgrab2_schemas/zgrab2/ssh.py | vl4deee11/zgrab2 | c859e9ef1173955dadae88416289ef8cc8910495 | [
"Apache-2.0"
] | 230 | 2017-11-14T07:25:57.000Z | 2022-03-31T04:20:46.000Z | # zschema sub-schema for zgrab2's ssh module (modules/ssh.go)
# Registers zgrab2-ssh globally, and ssh with the main zgrab2 schema.
from zschema.leaves import *
from zschema.compounds import *
import zschema.registry
import zcrypto_schemas.zcrypto as zcrypto
from . import zgrab2
# NOTE: Despite the fact that we have... | 40.448819 | 234 | 0.694569 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,058 | 0.589644 |
f9a21f50645fbd8f00212379587d12cc0568bcd5 | 5,123 | py | Python | app/main/views.py | Juru-10/blog | ac554952e884c35ce7dd50cf0ef9748a8da96a3f | [
"MIT"
] | null | null | null | app/main/views.py | Juru-10/blog | ac554952e884c35ce7dd50cf0ef9748a8da96a3f | [
"MIT"
] | null | null | null | app/main/views.py | Juru-10/blog | ac554952e884c35ce7dd50cf0ef9748a8da96a3f | [
"MIT"
] | null | null | null | from flask import render_template,request,redirect,url_for,abort
from ..models import User,Post,Comment,Subscriber
from ..requests import get_quotes
from . import main
from .forms import PostForm,CommentForm,DelForm,UpdateProfile
from app.auth.forms import SubscriptionForm
from .. import db,photos
from flask_login impo... | 33.927152 | 117 | 0.662112 | 0 | 0 | 0 | 0 | 2,960 | 0.577786 | 0 | 0 | 2,243 | 0.437829 |
f9a2d31ea31e4c014413d3196c6cde1579895080 | 100 | py | Python | data_types/numeric_type/float_type.py | aryanz-co-in/python-indentation-datatypes-tamil | 69c291f0b6bd911fec96e8cd9e670880501d9959 | [
"Apache-2.0"
] | null | null | null | data_types/numeric_type/float_type.py | aryanz-co-in/python-indentation-datatypes-tamil | 69c291f0b6bd911fec96e8cd9e670880501d9959 | [
"Apache-2.0"
] | null | null | null | data_types/numeric_type/float_type.py | aryanz-co-in/python-indentation-datatypes-tamil | 69c291f0b6bd911fec96e8cd9e670880501d9959 | [
"Apache-2.0"
] | null | null | null | # int, float, complex Numeric Types
# Float are nothing but decimal values
pi = 3.14
print(pi)
| 12.5 | 38 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 0.75 |
f9a2fdd3c94e96ddac9d38ba04e226d5f50ff29b | 452 | py | Python | docker/dev_app/views.py | uw-it-aca/uw-django-saml2 | 04cd99c0f8fff6160c13e3aa0e44324f6a4079fe | [
"Apache-2.0"
] | 2 | 2018-04-20T19:02:11.000Z | 2020-01-21T07:08:48.000Z | docker/dev_app/views.py | uw-it-aca/uw-django-saml2 | 04cd99c0f8fff6160c13e3aa0e44324f6a4079fe | [
"Apache-2.0"
] | 71 | 2018-03-27T17:52:31.000Z | 2022-02-18T23:09:05.000Z | docker/dev_app/views.py | uw-it-aca/uw-django-saml2 | 04cd99c0f8fff6160c13e3aa0e44324f6a4079fe | [
"Apache-2.0"
] | 1 | 2018-12-04T19:20:36.000Z | 2018-12-04T19:20:36.000Z | from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from uw_saml.utils import is_member_of_group
# Create your views here.
@login_required
def index(request):
if is_member_of_group(request, settings.UW_SAML_PERMISSIONS['perm2']):
... | 28.25 | 74 | 0.765487 | 0 | 0 | 0 | 0 | 248 | 0.548673 | 0 | 0 | 100 | 0.221239 |
f9a3781192095c8ae404cd60bb006a2f14049443 | 4,370 | py | Python | genoml/steps/model_validate.py | GenoML/genoml | bfe0164e99a27d5ec2b720b5a24e059294603e3f | [
"Apache-2.0"
] | 13 | 2019-03-22T12:12:12.000Z | 2021-10-04T15:06:18.000Z | genoml/steps/model_validate.py | GenoML/genoml | bfe0164e99a27d5ec2b720b5a24e059294603e3f | [
"Apache-2.0"
] | 21 | 2019-03-15T15:40:59.000Z | 2020-08-03T21:44:26.000Z | genoml/steps/model_validate.py | GenoML/genoml | bfe0164e99a27d5ec2b720b5a24e059294603e3f | [
"Apache-2.0"
] | 4 | 2019-06-28T18:25:37.000Z | 2020-01-21T01:22:07.000Z | #! /usr/bin/env python -u
# coding=utf-8
from shutil import copyfile
from genoml.steps import PhenoScale, StepBase
from genoml.utils import DescriptionLoader
__author__ = 'Sayed Hadi Hashemi'
class ModelValidateStep(StepBase):
"""performs validation with existing data"""
_valid_prefix = None
def _reduc... | 38 | 118 | 0.576659 | 4,173 | 0.95492 | 0 | 0 | 260 | 0.059497 | 0 | 0 | 1,223 | 0.279863 |
f9a4a4c34323aeec9f75c70fae31ad785ce964df | 721 | py | Python | resotocore/tests/resotocore/dependencies_test.py | someengineering/resoto | ee17313f5376e9797ed305e7fdb62d40139a6608 | [
"Apache-2.0"
] | 126 | 2022-01-13T18:22:03.000Z | 2022-03-31T11:03:14.000Z | resotocore/tests/resotocore/dependencies_test.py | someengineering/resoto | ee17313f5376e9797ed305e7fdb62d40139a6608 | [
"Apache-2.0"
] | 110 | 2022-01-13T22:27:55.000Z | 2022-03-30T22:26:50.000Z | resotocore/tests/resotocore/dependencies_test.py | someengineering/resoto | ee17313f5376e9797ed305e7fdb62d40139a6608 | [
"Apache-2.0"
] | 8 | 2022-01-15T10:28:16.000Z | 2022-03-30T16:38:21.000Z | from typing import Tuple, List
from resotocore.dependencies import parse_args
from resotocore.types import JsonElement
def test_parse_override() -> None:
def parse(args: str) -> List[Tuple[str, JsonElement]]:
return parse_args(args.split()).config_override # type: ignore
assert parse(f"--override a... | 45.0625 | 103 | 0.617198 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 275 | 0.381415 |
f9a5ad42dfd6f80195b93f6de20b3058e7e2213b | 7,374 | py | Python | pyquil/api/_benchmark.py | stjordanis/pyquil | 36987ecb78d5dc85d299dd62395b7669a1cedd5a | [
"Apache-2.0"
] | 677 | 2017-01-09T23:20:22.000Z | 2018-11-26T10:57:49.000Z | pyquil/api/_benchmark.py | stjordanis/pyquil | 36987ecb78d5dc85d299dd62395b7669a1cedd5a | [
"Apache-2.0"
] | 574 | 2018-11-28T05:38:40.000Z | 2022-03-23T20:38:28.000Z | pyquil/api/_benchmark.py | stjordanis/pyquil | 36987ecb78d5dc85d299dd62395b7669a1cedd5a | [
"Apache-2.0"
] | 202 | 2018-11-30T06:36:28.000Z | 2022-03-29T15:38:18.000Z | ##############################################################################
# Copyright 2018 Rigetti Computing
#
# 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://ww... | 46.670886 | 118 | 0.675481 | 6,151 | 0.834147 | 0 | 0 | 0 | 0 | 0 | 0 | 4,049 | 0.549091 |
f9a664bbf396891165319f919889de28be4868a4 | 212 | py | Python | mine/collatz.py | zahessi/unileaks | 3ed2462e11f8e3decc64ed8faceee42438ec06ff | [
"MIT"
] | null | null | null | mine/collatz.py | zahessi/unileaks | 3ed2462e11f8e3decc64ed8faceee42438ec06ff | [
"MIT"
] | null | null | null | mine/collatz.py | zahessi/unileaks | 3ed2462e11f8e3decc64ed8faceee42438ec06ff | [
"MIT"
] | null | null | null | n = input("Мы будем проверять теорию коллатца. Введите число")
def collatz(num):
num = int(num)
if not num: return None
while num != 1:
num = num/2 if num % 2 == 0 else 3*num + 1
collatz(n)
| 21.2 | 62 | 0.603774 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 93 | 0.366142 |
f9a78f0606518ebedfb5bc19389f7930753e4683 | 554 | py | Python | questions/q292_pair_with_given_difference/simple_storage.py | aadhityasw/Competitive-Programs | 901a48d35f024a3a87c32a45b7f4531e8004a203 | [
"MIT"
] | null | null | null | questions/q292_pair_with_given_difference/simple_storage.py | aadhityasw/Competitive-Programs | 901a48d35f024a3a87c32a45b7f4531e8004a203 | [
"MIT"
] | 1 | 2021-05-15T07:56:51.000Z | 2021-05-15T07:56:51.000Z | questions/q292_pair_with_given_difference/simple_storage.py | aadhityasw/Competitive-Programs | 901a48d35f024a3a87c32a45b7f4531e8004a203 | [
"MIT"
] | null | null | null | class Solution:
def findPair(self, arr, L,N):
store = set()
for num in arr :
if num in store :
return True
store.add(num - N)
store.add(num + N)
return False
if __name__ == '__main__':
t = int(input())
for _ i... | 19.103448 | 47 | 0.440433 | 256 | 0.462094 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.018051 |
f9a9b8479139b00ee0e9e3f90eb6496c035fb7c6 | 1,270 | py | Python | tlh/data/pointer.py | notyourav/the-little-hat | f52b38b18b762e704b36cef06c07656348ea6995 | [
"MIT"
] | null | null | null | tlh/data/pointer.py | notyourav/the-little-hat | f52b38b18b762e704b36cef06c07656348ea6995 | [
"MIT"
] | null | null | null | tlh/data/pointer.py | notyourav/the-little-hat | f52b38b18b762e704b36cef06c07656348ea6995 | [
"MIT"
] | 2 | 2021-10-05T20:40:12.000Z | 2022-01-05T00:17:36.000Z | from dataclasses import dataclass
from tlh.const import RomVariant
from intervaltree import IntervalTree, Interval
@dataclass
class Pointer:
rom_variant: RomVariant = None
address: int = 0
points_to: int = 0
certainty: int = 0
author: str = ''
note: str = ''
class PointerList:
def __init_... | 30.97561 | 87 | 0.659843 | 1,140 | 0.897638 | 0 | 0 | 167 | 0.131496 | 0 | 0 | 4 | 0.00315 |
f9ad826a4941dde9f3abe0bd1c8c6c6ea3cdfc2e | 554 | py | Python | tests/testapp/models.py | jcass77/django-yearlessdate | 19ed3ecb16efe33eea6f02138bb4365447cb2ea7 | [
"BSD-3-Clause"
] | 16 | 2016-09-23T07:09:40.000Z | 2022-01-13T13:22:31.000Z | tests/testapp/models.py | jcass77/django-yearlessdate | 19ed3ecb16efe33eea6f02138bb4365447cb2ea7 | [
"BSD-3-Clause"
] | 8 | 2017-12-06T08:32:12.000Z | 2021-05-13T15:31:21.000Z | tests/testapp/models.py | jcass77/django-yearlessdate | 19ed3ecb16efe33eea6f02138bb4365447cb2ea7 | [
"BSD-3-Clause"
] | 16 | 2016-03-04T07:55:56.000Z | 2021-04-16T15:14:26.000Z | from django.db import models
from djangoyearlessdate.models import YearlessDateField, YearField
from djangoyearlessdate.helpers import YearlessDate
class YearlessDateModel(models.Model):
"""Sample model for testing YearlessDateField.
"""
yearless_date = YearlessDateField()
optional_yearless_date = Yea... | 30.777778 | 88 | 0.772563 | 400 | 0.722022 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.180505 |
f9ade94d5d26429d7edd4cdfcee8f28919e4bd4f | 597 | py | Python | ror/NoTieResolver.py | jakub-tomczak/ror | cf9ab38a2d66f4816a1289b9726911960059fce7 | [
"MIT"
] | null | null | null | ror/NoTieResolver.py | jakub-tomczak/ror | cf9ab38a2d66f4816a1289b9726911960059fce7 | [
"MIT"
] | null | null | null | ror/NoTieResolver.py | jakub-tomczak/ror | cf9ab38a2d66f4816a1289b9726911960059fce7 | [
"MIT"
] | null | null | null | from ror.RORParameters import RORParameters
from ror.RORResult import RORResult
from ror.AbstractTieResolver import AbstractTieResolver
from ror.result_aggregator_utils import Rank
class NoTieResolver(AbstractTieResolver):
def __init__(self) -> None:
super().__init__('NoResolver')
def resolve_rank(se... | 37.3125 | 99 | 0.740369 | 414 | 0.693467 | 0 | 0 | 0 | 0 | 0 | 0 | 96 | 0.160804 |
f9ae44085aad4c16f6592f43de3a099254f05d59 | 47 | py | Python | conjur/util/__init__.py | mbjahnoon/conjur-api-python3 | ec1f62bb1baf2bdcd34d2fb92c97db724f761020 | [
"Apache-2.0"
] | 16 | 2019-05-17T15:34:59.000Z | 2021-11-08T10:30:21.000Z | conjur/util/__init__.py | mbjahnoon/conjur-api-python3 | ec1f62bb1baf2bdcd34d2fb92c97db724f761020 | [
"Apache-2.0"
] | 301 | 2019-05-07T18:27:10.000Z | 2022-01-26T13:03:49.000Z | conjur/util/__init__.py | cyberark/cyberark-conjur-cli | 2507e8769808643d89efa7e2496cfc14f505bd7e | [
"Apache-2.0"
] | 10 | 2019-07-30T17:00:13.000Z | 2022-01-20T17:00:34.000Z | """
util
This package is for util modules
"""
| 7.833333 | 32 | 0.659574 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 0.978723 |
f9ae75ada823a3568610724a901cd66400be071c | 331 | py | Python | Algo and DSA/LeetCode-Solutions-master/Python/bulb-switcher-iii.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 3,269 | 2018-10-12T01:29:40.000Z | 2022-03-31T17:58:41.000Z | Algo and DSA/LeetCode-Solutions-master/Python/bulb-switcher-iii.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 53 | 2018-12-16T22:54:20.000Z | 2022-02-25T08:31:20.000Z | Algo and DSA/LeetCode-Solutions-master/Python/bulb-switcher-iii.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 1,236 | 2018-10-12T02:51:40.000Z | 2022-03-30T13:30:37.000Z | # Time: O(n)
# Space: O(1)
class Solution(object):
def numTimesAllBlue(self, light):
"""
:type light: List[int]
:rtype: int
"""
result, right = 0, 0
for i, num in enumerate(light, 1):
right = max(right, num)
result += (right == i)
ret... | 22.066667 | 42 | 0.483384 | 301 | 0.909366 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 0.277946 |
f9af9e5f05d82322479bf82bec5cb2e8770d26f1 | 119 | py | Python | code/aoc/day1.py | souradeepta/PythonPractice | fa956ca4b87a0eb92fee21fa78e59757ce665770 | [
"MIT"
] | null | null | null | code/aoc/day1.py | souradeepta/PythonPractice | fa956ca4b87a0eb92fee21fa78e59757ce665770 | [
"MIT"
] | 4 | 2021-03-19T02:04:20.000Z | 2021-09-22T18:54:16.000Z | code/aoc/day1.py | souradeepta/PythonPractice | fa956ca4b87a0eb92fee21fa78e59757ce665770 | [
"MIT"
] | null | null | null |
def input_parse():
with open("day1.txt", r) as inputFile:
input_list = inputFile.readline()
return | 23.8 | 42 | 0.621849 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.084034 |
f9b08e37d9b636d67355ff414f22cda84aa9f53b | 3,472 | py | Python | tilapia/lib/provider/chains/bch/provider.py | huazhouwang/python_multichain_wallet | 52e0acdc2984c08990cb36433ef17a414fbe8312 | [
"MIT"
] | 2 | 2021-09-23T13:47:08.000Z | 2021-09-24T02:39:14.000Z | tilapia/lib/provider/chains/bch/provider.py | huazhouwang/tilapia | 52e0acdc2984c08990cb36433ef17a414fbe8312 | [
"MIT"
] | null | null | null | tilapia/lib/provider/chains/bch/provider.py | huazhouwang/tilapia | 52e0acdc2984c08990cb36433ef17a414fbe8312 | [
"MIT"
] | null | null | null | import itertools
import logging
from typing import Dict, Tuple
from tilapia.lib.basic import bip44
from tilapia.lib.basic.functional.require import require
from tilapia.lib.hardware import interfaces as hardware_interfaces
from tilapia.lib.provider import data
from tilapia.lib.provider.chains import btc
from tilapia.l... | 39.908046 | 118 | 0.701613 | 2,998 | 0.863479 | 0 | 0 | 0 | 0 | 0 | 0 | 255 | 0.073445 |
f9b1801867198f74dece84cf86c7c8fce031dea8 | 1,747 | py | Python | Excercises/Automata.py | RyanClinton777/graph-theory-project | a3ff9512da3ac2d48138b59d2e8eb8899d8e552d | [
"Unlicense"
] | null | null | null | Excercises/Automata.py | RyanClinton777/graph-theory-project | a3ff9512da3ac2d48138b59d2e8eb8899d8e552d | [
"Unlicense"
] | null | null | null | Excercises/Automata.py | RyanClinton777/graph-theory-project | a3ff9512da3ac2d48138b59d2e8eb8899d8e552d | [
"Unlicense"
] | null | null | null | """ DFA Automata Implementation """
class State:
""" Nodes/States in an automaton """
def __init__(self, isAccept, arrows):
# Boolean, wether or not this state is an accept state
self.isAccept = isAccept
# dictionary of keys/labels:Other states
self.arrows = arrows
class DFA:
... | 28.639344 | 117 | 0.611906 | 835 | 0.477962 | 0 | 0 | 0 | 0 | 0 | 0 | 899 | 0.514596 |
f9b1deee9145e20a82bd34752d2e98a230a5a620 | 568 | py | Python | src/database/migrations/0027_auto_20190829_1530.py | gregory-chekler/api | 11ecbea945e7eb6fa677a0c0bb32bda51ba15f28 | [
"MIT"
] | 2 | 2020-07-24T12:58:17.000Z | 2020-12-17T02:26:13.000Z | src/database/migrations/0027_auto_20190829_1530.py | gregory-chekler/api | 11ecbea945e7eb6fa677a0c0bb32bda51ba15f28 | [
"MIT"
] | 214 | 2019-06-26T17:33:54.000Z | 2022-03-26T00:02:34.000Z | src/database/migrations/0027_auto_20190829_1530.py | massenergize/portalBackEnd | 7ed971b2be13901667a216d8c8a46f0bed6d6ccd | [
"MIT"
] | 6 | 2020-03-13T20:29:06.000Z | 2021-08-20T16:15:08.000Z | # Generated by Django 2.2.3 on 2019-08-29 15:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('database', '0026_auto_20190829_1528'),
]
operations = [
migrations.AddField(
model_name='vendor',
name='email',
... | 23.666667 | 64 | 0.584507 | 475 | 0.836268 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 0.209507 |
f9b3824e8469cbf08d1932118a1c35ca85f4a512 | 207 | py | Python | robots/PDF.py | NaskIII/Projeto-Alpha-X | 23e3de59185cdc85b7fc13299cfc51846bfc63b6 | [
"MIT"
] | null | null | null | robots/PDF.py | NaskIII/Projeto-Alpha-X | 23e3de59185cdc85b7fc13299cfc51846bfc63b6 | [
"MIT"
] | 3 | 2019-08-26T03:51:57.000Z | 2019-08-29T04:24:51.000Z | robots/PDF.py | NaskIII/Projeto-Alpha-X | 23e3de59185cdc85b7fc13299cfc51846bfc63b6 | [
"MIT"
] | null | null | null | import sys
import os
class PDF(object):
def pdf(self, docx):
sofficepath = 'soffice'
convertcmd = '%s --headless --convert-to pdf %%s' % sofficepath
os.popen(convertcmd % docx)
| 20.7 | 71 | 0.613527 | 183 | 0.884058 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.217391 |
f9b5b83c0da1cf14ae65df8fb1a134313f52638f | 1,181 | py | Python | ntlmlib/__init__.py | Dlat/ntlmlib | 49eadfe4701bcce84a4ca9cbab5b6d5d72eaad05 | [
"Apache-2.0"
] | 1 | 2018-08-20T19:33:58.000Z | 2018-08-20T19:33:58.000Z | ntlmlib/__init__.py | Dlat/ntlmlib | 49eadfe4701bcce84a4ca9cbab5b6d5d72eaad05 | [
"Apache-2.0"
] | null | null | null | ntlmlib/__init__.py | Dlat/ntlmlib | 49eadfe4701bcce84a4ca9cbab5b6d5d72eaad05 | [
"Apache-2.0"
] | null | null | null | """
_ _ _ _ _
_ __ | |_| |_ __ ___ | (_) |__
| '_ \| __| | '_ ` _ \| | | '_ \
| | | | |_| | | | | | | | | |_) |
|_| |_|\__|_|_| |_| |_|_|_|_.__/
A robust, fast and efficient 'first-class' Python Library for NTLM authentication, signing and encryption
(c) 2015, Ian Clegg <ian.clegg@sour... | 33.742857 | 106 | 0.679932 | 84 | 0.071126 | 0 | 0 | 0 | 0 | 0 | 0 | 956 | 0.809483 |