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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ac28cc037b37abb77ef41622f5d43a997fc33033 | 690 | bzl | Python | runsc/test/build_defs.bzl | dna2fork/gvisor | eefa817cfdb04ff07e7069396f21bd6ba2c89957 | [
"Apache-2.0"
] | 2 | 2020-07-24T04:06:44.000Z | 2021-06-28T00:49:20.000Z | runsc/test/build_defs.bzl | dna2fork/gvisor | eefa817cfdb04ff07e7069396f21bd6ba2c89957 | [
"Apache-2.0"
] | null | null | null | runsc/test/build_defs.bzl | dna2fork/gvisor | eefa817cfdb04ff07e7069396f21bd6ba2c89957 | [
"Apache-2.0"
] | 1 | 2020-10-07T12:33:19.000Z | 2020-10-07T12:33:19.000Z | """Defines a rule for runsc test targets."""
load("@io_bazel_rules_go//go:def.bzl", _go_test = "go_test")
# runtime_test is a macro that will create targets to run the given test target
# with different runtime options.
def runtime_test(**kwargs):
"""Runs the given test target with different runtime options."""
... | 34.5 | 79 | 0.649275 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 397 | 0.575362 |
ac2bbb2fda911605c3e823751d84b99cb9f30d2f | 918 | py | Python | python/akg/ms/utils.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | python/akg/ms/utils.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | python/akg/ms/utils.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019-2021 Huawei Technologies Co., Ltd
#
# 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 agre... | 27.818182 | 74 | 0.740741 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 772 | 0.840959 |
ac2c508dc7ed127c37e761fe6253d817c522f603 | 5,254 | py | Python | foursight_core/sqs_utils.py | 4dn-dcic/foursight-core | 2e5ea594d38d04ad58f63ee42e5fb4b920bfb63c | [
"MIT"
] | null | null | null | foursight_core/sqs_utils.py | 4dn-dcic/foursight-core | 2e5ea594d38d04ad58f63ee42e5fb4b920bfb63c | [
"MIT"
] | 3 | 2021-08-11T07:09:24.000Z | 2022-02-16T18:58:45.000Z | foursight_core/sqs_utils.py | 4dn-dcic/foursight-core | 2e5ea594d38d04ad58f63ee42e5fb4b920bfb63c | [
"MIT"
] | null | null | null | from datetime import datetime
import boto3
import json
from .stage import Stage
class SQS(object):
"""
class SQS is a collection of utils related to Foursight queues
"""
def __init__(self, foursight_prefix):
self.stage = Stage(foursight_prefix)
def invoke_check_runner(self, runner_input)... | 33.896774 | 87 | 0.592882 | 5,171 | 0.984203 | 0 | 0 | 1,756 | 0.334222 | 0 | 0 | 2,453 | 0.466882 |
ac2c93e2be1b6adb27d68e1973a9207d9ea0da74 | 1,476 | py | Python | setup.py | sabraha2/shadho | c17109a4526961113933d1189f0ca98eb8119ac1 | [
"MIT"
] | null | null | null | setup.py | sabraha2/shadho | c17109a4526961113933d1189f0ca98eb8119ac1 | [
"MIT"
] | null | null | null | setup.py | sabraha2/shadho | c17109a4526961113933d1189f0ca98eb8119ac1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
from setuptools import setup
from setuptools.command.install import install
LONG_DESCRIPTION = ""
with open(os.path.join(os.path.dirname(__file__), 'README.md'), 'r') as f:
LONG_DESCRIPTION = f.read()
setup(
name='shadho',
version='0.4.3.post2',
description='Hyperparam... | 31.404255 | 78 | 0.630759 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 754 | 0.51084 |
ac2e50e2c0ed0f0cb69c0d20141ee9476a2e3b0c | 20,837 | py | Python | foyer/tests/test_gmso_forcefield.py | jennyfothergill/foyer | 60a738da43fbb18c7207821662688361a1e6017d | [
"MIT"
] | 62 | 2017-02-14T19:38:31.000Z | 2022-02-25T16:09:54.000Z | foyer/tests/test_gmso_forcefield.py | jennyfothergill/foyer | 60a738da43fbb18c7207821662688361a1e6017d | [
"MIT"
] | 384 | 2017-02-10T05:56:41.000Z | 2022-03-30T21:47:22.000Z | foyer/tests/test_gmso_forcefield.py | jennyfothergill/foyer | 60a738da43fbb18c7207821662688361a1e6017d | [
"MIT"
] | 65 | 2017-02-24T16:43:20.000Z | 2022-01-06T21:01:28.000Z | import difflib
import glob
import os
import gmso
import mbuild as mb
import pytest
from pkg_resources import resource_filename
from foyer.exceptions import FoyerError
from foyer.general_forcefield import Forcefield
from foyer.tests.base_test import BaseTest
from foyer.tests.utils import get_fn, register_mock_request
... | 41.757515 | 133 | 0.625474 | 19,351 | 0.928685 | 0 | 0 | 1,616 | 0.077554 | 0 | 0 | 11,419 | 0.548016 |
ac2e60dace04a2bf9deac82a5edb304e62120e11 | 2,315 | py | Python | visualize/usecases/get_user_info.py | RevanthRyo/Alize | 60f4153c0c4b665e60c02bc90f99f833bf3173c8 | [
"Unlicense"
] | 160 | 2018-05-08T09:12:35.000Z | 2021-11-08T14:45:18.000Z | visualize/usecases/get_user_info.py | RevanthRyo/Alize | 60f4153c0c4b665e60c02bc90f99f833bf3173c8 | [
"Unlicense"
] | 15 | 2018-05-08T09:13:53.000Z | 2022-03-11T23:20:39.000Z | visualize/usecases/get_user_info.py | RevanthRyo/Alize | 60f4153c0c4b665e60c02bc90f99f833bf3173c8 | [
"Unlicense"
] | 12 | 2018-05-08T16:19:11.000Z | 2021-11-08T14:45:58.000Z | import requests
from django.conf import settings
from visualize.utils.api import Client
class GetUserInfo(object):
"""
GetUserInfo :
params : username
response :
{
"login": "torvalds",
"id": 1024025,
"avatar_url": "https://avatars0.githubusercontent.com/u/1024025?v=4",
"gravatar_id": ""... | 31.283784 | 84 | 0.651404 | 2,224 | 0.960691 | 0 | 0 | 0 | 0 | 0 | 0 | 1,671 | 0.721814 |
ac2ed7f7134d3ec9fcd2d668ed386c6b314f071b | 1,306 | py | Python | FusionIIIT/applications/counselling_cell/migrations/0002_auto_20210501_1036.py | sabhishekpratap5/sonarcubeTest2 | 9bd8105e457f6feb8c38fa94b335e54783fca99e | [
"bzip2-1.0.6"
] | 1 | 2021-08-05T10:31:35.000Z | 2021-08-05T10:31:35.000Z | FusionIIIT/applications/counselling_cell/migrations/0002_auto_20210501_1036.py | sabhishekpratap5/sonarcubeTest2 | 9bd8105e457f6feb8c38fa94b335e54783fca99e | [
"bzip2-1.0.6"
] | 1 | 2021-05-05T09:50:22.000Z | 2021-05-05T09:50:22.000Z | FusionIIIT/applications/counselling_cell/migrations/0002_auto_20210501_1036.py | sabhishekpratap5/sonarcubeTest2 | 9bd8105e457f6feb8c38fa94b335e54783fca99e | [
"bzip2-1.0.6"
] | 4 | 2021-03-16T08:11:42.000Z | 2021-05-06T11:03:44.000Z | # Generated by Django 3.1.5 on 2021-05-01 10:36
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('globals', '0003_auto_20191024_1242'),
('counselling_cell', '0001_initial'),
]
operations = [
migrat... | 31.853659 | 128 | 0.624043 | 1,180 | 0.903522 | 0 | 0 | 0 | 0 | 0 | 0 | 419 | 0.320827 |
ac2f7b7236d2c24e643b4339626cb713bad31a0c | 2,650 | py | Python | config.py | KodeInWork/openue_exp | 31b46999188bf73160af84c0e6f5d3e75c0c52ea | [
"MIT"
] | null | null | null | config.py | KodeInWork/openue_exp | 31b46999188bf73160af84c0e6f5d3e75c0c52ea | [
"MIT"
] | null | null | null | config.py | KodeInWork/openue_exp | 31b46999188bf73160af84c0e6f5d3e75c0c52ea | [
"MIT"
] | null | null | null | import os
class config():
input_dir = ''
max_len = '128'
pretrain_model_dir = ''
home_dir = os.getcwd() + '/'
data_dir = home_dir + 'raw_data/ske/'
tf_serving_addr = '127.0.0.1:8501'
bert_vocab_dir = home_dir + 'pretrained_model/chinese_wwm_ext_L-12_H-768_A-12/vocab.txt'
bert_config_dir ... | 38.970588 | 347 | 0.441132 | 3,615 | 0.996966 | 0 | 0 | 0 | 0 | 0 | 0 | 2,446 | 0.674573 |
ac3000c2861cfc54577cebc22127160c6d8e95fb | 86 | py | Python | ipfsApi/__init__.py | dardevelin/python-ipfs-api | 841595f7d2b07db511eef34aa046163ee4a3020e | [
"MIT"
] | 1 | 2018-08-14T02:10:35.000Z | 2018-08-14T02:10:35.000Z | ipfsApi/__init__.py | ipfs-client-libraries/python-ipfs-api | 841595f7d2b07db511eef34aa046163ee4a3020e | [
"MIT"
] | null | null | null | ipfsApi/__init__.py | ipfs-client-libraries/python-ipfs-api | 841595f7d2b07db511eef34aa046163ee4a3020e | [
"MIT"
] | 1 | 2022-01-28T13:37:31.000Z | 2022-01-28T13:37:31.000Z | from __future__ import absolute_import
from .client import *
__version__ = '0.2.2'
| 12.285714 | 38 | 0.755814 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.081395 |
ac31a080b5043ec20246c62e223e567243898b56 | 440 | py | Python | leprikon/models/useragreement.py | leprikon-cz/leprikon | b1bec36fb6bcf0220bffccca53b6f200f9e95910 | [
"BSD-3-Clause"
] | 4 | 2018-10-29T17:46:09.000Z | 2021-12-16T08:57:48.000Z | leprikon/models/useragreement.py | leprikon-cz/leprikon | b1bec36fb6bcf0220bffccca53b6f200f9e95910 | [
"BSD-3-Clause"
] | 68 | 2016-07-11T07:48:54.000Z | 2022-03-18T01:32:06.000Z | leprikon/models/useragreement.py | leprikon-cz/leprikon | b1bec36fb6bcf0220bffccca53b6f200f9e95910 | [
"BSD-3-Clause"
] | 2 | 2016-07-12T20:39:53.000Z | 2020-10-10T03:14:42.000Z | from django.db import models
from django.utils.translation import ugettext_lazy as _
from ..conf import settings
class UserAgreement(models.Model):
user = models.OneToOneField(
settings.AUTH_USER_MODEL,
primary_key=True,
verbose_name=_("user"),
related_name="agreement",
on... | 27.5 | 89 | 0.706818 | 323 | 0.734091 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 0.081818 |
ac3349d8016af9897cd5989665c953a2b04c0963 | 2,076 | py | Python | fair-api-datasets-update.py | RossBarnie/fair-api-beta-utilities | 4642d2d0cf5f601c55b343e788f79824acf227ee | [
"MIT"
] | 3 | 2020-09-04T08:21:09.000Z | 2021-03-04T00:19:57.000Z | fair-api-datasets-update.py | RossBarnie/fair-api-beta-utilities | 4642d2d0cf5f601c55b343e788f79824acf227ee | [
"MIT"
] | 9 | 2020-09-02T11:23:04.000Z | 2021-09-27T15:12:56.000Z | fair-api-datasets-update.py | RossBarnie/fair-api-beta-utilities | 4642d2d0cf5f601c55b343e788f79824acf227ee | [
"MIT"
] | 2 | 2021-03-25T16:48:53.000Z | 2021-05-19T10:00:16.000Z | import json
import sys
import os
import requests
from datasets.diff_helper import DiffHelper
from common.constants import BASE_HEADERS, FAIR_API_ENDPOINT, SSL_VERIFY, FAIR_URL, DRY_RUN
def dataset_url(code):
return f"{FAIR_API_ENDPOINT}{code}"
def get_request(dataset_code):
resp = requests.get(
datase... | 34.032787 | 121 | 0.67341 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 807 | 0.388728 |
ac343909a3ad8704870bfb000e6780fc9350783a | 18,207 | py | Python | scripts/convert_excel_files_to_json.py | sheecegardezi/sifra | a7af896159ea7db231e23aeab187b7493887a080 | [
"Apache-2.0"
] | null | null | null | scripts/convert_excel_files_to_json.py | sheecegardezi/sifra | a7af896159ea7db231e23aeab187b7493887a080 | [
"Apache-2.0"
] | null | null | null | scripts/convert_excel_files_to_json.py | sheecegardezi/sifra | a7af896159ea7db231e23aeab187b7493887a080 | [
"Apache-2.0"
] | null | null | null | import os
import json
from collections import OrderedDict
import pandas as pd
def write_json_to_file(json_data, json_file_path):
parsed = json.loads(json_data)
parsed = json.dumps(parsed, indent=4, sort_keys=True)
obj = open(json_file_path, 'w')
obj.write(parsed)
obj.close()
# replace " with ' ... | 43.766827 | 79 | 0.543417 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,040 | 0.276817 |
ac36030e8e89e493e372409b81e3e6f1ab9b3e03 | 1,173 | py | Python | QUANTAXIS/example/DataFetcher.py | cyy1229/QUANTAXIS | 320eff53dfa2cde8032a5e066499f4da0b5064a2 | [
"MIT"
] | null | null | null | QUANTAXIS/example/DataFetcher.py | cyy1229/QUANTAXIS | 320eff53dfa2cde8032a5e066499f4da0b5064a2 | [
"MIT"
] | null | null | null | QUANTAXIS/example/DataFetcher.py | cyy1229/QUANTAXIS | 320eff53dfa2cde8032a5e066499f4da0b5064a2 | [
"MIT"
] | null | null | null | from QUANTAXIS import QA_fetch_stock_day_adv, QA_fetch_stock_list_adv, QA_fetch_stock_day_full_adv, QA_Setting
import pandas as pd
QASETTING = QA_Setting()
DATABASE = QASETTING.client.quantaxis
# def getAllTradeCal():
# return pd.DataFrame(DATABASE.trade_date.find({"is_open": 1}))
class MongoDataLoader:
de... | 27.27907 | 110 | 0.627451 | 808 | 0.675021 | 0 | 0 | 0 | 0 | 0 | 0 | 207 | 0.172932 |
ac36a8837c04b4a05f6772531a3bc4400bce36fc | 2,934 | py | Python | temp-uplift-submission/sparkml/adult_spark.py | damslab/reproducibility | f7804b2513859f7e6f14fa7842d81003d0758bf8 | [
"Apache-2.0"
] | 4 | 2021-12-10T17:20:26.000Z | 2021-12-27T14:38:40.000Z | temp-uplift-submission/sparkml/adult_spark.py | damslab/reproducibility | f7804b2513859f7e6f14fa7842d81003d0758bf8 | [
"Apache-2.0"
] | null | null | null | temp-uplift-submission/sparkml/adult_spark.py | damslab/reproducibility | f7804b2513859f7e6f14fa7842d81003d0758bf8 | [
"Apache-2.0"
] | null | null | null | import sys
import time
import numpy as np
import scipy as sp
import pandas as pd
import math
import warnings
from pyspark.sql import SparkSession
from pyspark import StorageLevel
from pyspark.ml.feature import Normalizer
from pyspark.ml.feature import StringIndexer, StandardScaler
from pyspark.ml.feature import OneHotE... | 36.675 | 106 | 0.720177 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 732 | 0.249489 |
ac373cedd278bb0dc68d30fdfd250e87a1a074b4 | 800 | py | Python | populate/entities/SmellEmission.py | Odeuropa/knowledge-graph | c9c10cb984e79760b202325fe4314c8706de26fa | [
"Apache-2.0"
] | null | null | null | populate/entities/SmellEmission.py | Odeuropa/knowledge-graph | c9c10cb984e79760b202325fe4314c8706de26fa | [
"Apache-2.0"
] | null | null | null | populate/entities/SmellEmission.py | Odeuropa/knowledge-graph | c9c10cb984e79760b202325fe4314c8706de26fa | [
"Apache-2.0"
] | null | null | null | import re
from .Entity import Entity
from .SmellSource import SmellSource
from .ontologies import ODEUROPA
class SmellEmission(Entity):
def __init__(self, seed, smell, source='', carrier='', lang='en'):
super().__init__(seed)
self.setclass(ODEUROPA.L12_Smell_Emission)
self.add(ODEUROPA.F1... | 30.769231 | 88 | 0.57125 | 689 | 0.86125 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.04875 |
ac37bd5c4fb9186e20a9020b619a9482fbce7644 | 489 | py | Python | constants.py | duongntbk/ToyMachineLearning | 0a9cb02ddaebc3e4064d7ecb04bc654a08f4b1ee | [
"MIT"
] | null | null | null | constants.py | duongntbk/ToyMachineLearning | 0a9cb02ddaebc3e4064d7ecb04bc654a08f4b1ee | [
"MIT"
] | null | null | null | constants.py | duongntbk/ToyMachineLearning | 0a9cb02ddaebc3e4064d7ecb04bc654a08f4b1ee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
MNIST_DATASET_PATH = 'raw_data/mnist.pkl.gz'
TEST_FOLDER = 'test/'
TRAIN_FOLDER = 'train/'
MODEL_FILE_PATH = 'model/recognizer.pickle'
LABEL_ENCODER_FILE_PATH = 'model/label_encoder.pickle'
# Manual
DEMO_HELP_MSG = '\n' + \
'Input parameter is incorrect\n' + \
'Display ... | 30.5625 | 58 | 0.619632 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 273 | 0.558282 |
ac3856d097cb7252fe1c11137bb19dafaaf4bd31 | 435 | py | Python | python3/cut_the_sticks.py | ahavrylyuk/hackerrank | a8be83c8166a05f6f91bdd86cca3d4c544428b4b | [
"MIT"
] | null | null | null | python3/cut_the_sticks.py | ahavrylyuk/hackerrank | a8be83c8166a05f6f91bdd86cca3d4c544428b4b | [
"MIT"
] | null | null | null | python3/cut_the_sticks.py | ahavrylyuk/hackerrank | a8be83c8166a05f6f91bdd86cca3d4c544428b4b | [
"MIT"
] | null | null | null | #! /usr/bin/env python
def cut_the_sticks(a):
cuts = []
while len(a) > 0:
cutter = a.pop()
if cutter == 0:
continue
for i in range(len(a)):
a[i] -= cutter
cuts.append(len(a) + 1)
return cuts
if __name__ == '__main__':
_ = input()
value = map... | 20.714286 | 53 | 0.508046 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 35 | 0.08046 |
ac3afa06674bd280c370406d538274f60a4acaa0 | 2,330 | py | Python | ex01_search.py | tbaptista/pacman | f30213e1104b794996204fa0a4ac90c583f8a2e4 | [
"Apache-2.0"
] | 1 | 2019-01-10T05:37:10.000Z | 2019-01-10T05:37:10.000Z | ex01_search.py | tbaptista/pacman | f30213e1104b794996204fa0a4ac90c583f8a2e4 | [
"Apache-2.0"
] | null | null | null | ex01_search.py | tbaptista/pacman | f30213e1104b794996204fa0a4ac90c583f8a2e4 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# -----------------------------------------------------------------------------
# Copyright (c) 2015 Tiago Baptista
# All rights reserved.
# -----------------------------------------------------------------------------
"""
Path-finding exercise using the pac-man game. Using the mouse, choose a target
l... | 28.072289 | 82 | 0.584979 | 1,492 | 0.640343 | 0 | 0 | 271 | 0.116309 | 0 | 0 | 750 | 0.321888 |
ac3bc1d1f68c8f2adb204c9c5f0374180c3d4c1e | 3,867 | py | Python | site_search/tests/test_permissions.py | AccentDesign/djangocms-site-search | 90ed1e5ab5fe96be8f1a4a74994f18164a7363aa | [
"MIT"
] | 1 | 2019-06-06T12:56:30.000Z | 2019-06-06T12:56:30.000Z | site_search/tests/test_permissions.py | AccentDesign/djangocms-site-search | 90ed1e5ab5fe96be8f1a4a74994f18164a7363aa | [
"MIT"
] | null | null | null | site_search/tests/test_permissions.py | AccentDesign/djangocms-site-search | 90ed1e5ab5fe96be8f1a4a74994f18164a7363aa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from datetime import datetime, timedelta
from django.contrib.auth.models import User
from django.test import TestCase
from cms.api import assign_user_to_page, create_page
from ..helpers import get_request
from ..views import SearchResultsView
class PermissionsTestCase(TestCase):
def set... | 40.28125 | 75 | 0.58495 | 3,599 | 0.929734 | 0 | 0 | 0 | 0 | 0 | 0 | 779 | 0.20124 |
ac3bc471644b6e8784c772369a7f273ad6a22e32 | 12,179 | py | Python | FSO_Comm_Demo.py | MansourM61/FSO-Comm-GnuRadio-Module | 44bfefaa95fb9af19f9817029f663892b0f84417 | [
"MIT"
] | 6 | 2019-10-31T10:02:49.000Z | 2022-03-03T21:42:19.000Z | FSO_Comm_Demo.py | MansourM61/FSO-Comm-GnuRadio-Module | 44bfefaa95fb9af19f9817029f663892b0f84417 | [
"MIT"
] | null | null | null | FSO_Comm_Demo.py | MansourM61/FSO-Comm-GnuRadio-Module | 44bfefaa95fb9af19f9817029f663892b0f84417 | [
"MIT"
] | 2 | 2022-01-03T07:59:44.000Z | 2022-01-30T11:25:21.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
##################################################
# GNU Radio Python Flow Graph
# Title: FSO Communication Block Modules Test
# Author: M Mansour Abadi
# Description: Modules from FSO_Comm are used in a simple FSO comunication link including various channel effects.
# Gen... | 36.247024 | 131 | 0.642417 | 10,598 | 0.870186 | 0 | 0 | 0 | 0 | 0 | 0 | 1,175 | 0.096478 |
ac3ca086610d59e10a3cca75b54708abf363a598 | 6,194 | py | Python | Script/WDI_writer_functions.py | Riemer1818/Cattlelyst_wikibase_2021 | 1f3e3199391844206e6621e63756461bf984bf36 | [
"MIT"
] | null | null | null | Script/WDI_writer_functions.py | Riemer1818/Cattlelyst_wikibase_2021 | 1f3e3199391844206e6621e63756461bf984bf36 | [
"MIT"
] | null | null | null | Script/WDI_writer_functions.py | Riemer1818/Cattlelyst_wikibase_2021 | 1f3e3199391844206e6621e63756461bf984bf36 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from wikidataintegrator import wdi_core, wdi_login
import logging
import pickle
__author__ = "Riemer van der Vliet"
__copyright__ = "Copyright 2020, Laboratory of Systems and Synthetic Biology"
__credits__ = ["Riemer van der Vliet", "Jasper Koehorst"]
__license_... | 30.512315 | 102 | 0.66516 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,380 | 0.545689 |
ac3d7ed801511882792da9a883bfb2bc98512cd5 | 3,449 | py | Python | kitt/callbacks.py | David-Ciz/kitt | 44a6faf7fcf1bc6f3db082debeab0ef4dfcc9c4a | [
"MIT"
] | null | null | null | kitt/callbacks.py | David-Ciz/kitt | 44a6faf7fcf1bc6f3db082debeab0ef4dfcc9c4a | [
"MIT"
] | null | null | null | kitt/callbacks.py | David-Ciz/kitt | 44a6faf7fcf1bc6f3db082debeab0ef4dfcc9c4a | [
"MIT"
] | null | null | null | import heapq
import logging
import os
from tensorflow.keras.callbacks import Callback
class ModelCheckpoint(Callback):
def __init__(
self,
filepath: str,
monitor: str,
mode: str = "max",
save_every_n_epochs: int = None,
save_n_best=1,
save_optimizer=False,
... | 35.556701 | 95 | 0.612351 | 3,359 | 0.973905 | 0 | 0 | 0 | 0 | 0 | 0 | 749 | 0.217164 |
ac3e07e4760f9a790f20faf0e15bb7e637cec1a9 | 3,851 | py | Python | migrations/versions/2018_03_30_1f4385bac8f9_change_activity_picture_paths_to_file_.py | tch1bo/viaduct | bfd37b0a8408b2dd66fb01138163b80ce97699ff | [
"MIT"
] | 11 | 2015-04-23T21:57:56.000Z | 2019-04-28T12:48:58.000Z | migrations/versions/2018_03_30_1f4385bac8f9_change_activity_picture_paths_to_file_.py | tch1bo/viaduct | bfd37b0a8408b2dd66fb01138163b80ce97699ff | [
"MIT"
] | 1 | 2016-10-05T14:10:58.000Z | 2016-10-05T14:12:23.000Z | migrations/versions/2018_03_30_1f4385bac8f9_change_activity_picture_paths_to_file_.py | tch1bo/viaduct | bfd37b0a8408b2dd66fb01138163b80ce97699ff | [
"MIT"
] | 3 | 2016-10-05T14:00:42.000Z | 2019-01-16T14:33:43.000Z | """Change activity picture paths to file ids.
Revision ID: 1f4385bac8f9
Revises: c8cd32037cde
Create Date: 2018-03-30 16:01:56.532893
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmake... | 27.905797 | 138 | 0.65879 | 643 | 0.16697 | 0 | 0 | 0 | 0 | 0 | 0 | 1,150 | 0.298624 |
ac3e3b4c92edc26c0c53ec7942b32aed32b778c8 | 1,165 | py | Python | fapistrano/signal.py | liwushuo/fapistrano | 2a31aad01a04d7ea9108dc6f95aee9a53290459f | [
"MIT"
] | 18 | 2016-03-25T09:40:20.000Z | 2022-02-23T02:09:50.000Z | fapistrano/signal.py | liwushuo/fapistrano | 2a31aad01a04d7ea9108dc6f95aee9a53290459f | [
"MIT"
] | null | null | null | fapistrano/signal.py | liwushuo/fapistrano | 2a31aad01a04d7ea9108dc6f95aee9a53290459f | [
"MIT"
] | 3 | 2016-03-22T07:41:15.000Z | 2021-02-25T04:27:53.000Z | # -*- coding: utf-8 -*-
from functools import wraps
from .utils import run_function
class Signal(object):
def __init__(self, name, doc=''):
self.name = name
self.doc = doc
self.receivers = {}
class Namespace(dict):
def signal(self, name, doc=None):
try:
return se... | 22.843137 | 62 | 0.611159 | 325 | 0.27897 | 0 | 0 | 113 | 0.096996 | 0 | 0 | 100 | 0.085837 |
ac3e6405e38364554897a98ee0697c92ce3335ab | 463 | py | Python | Pyon exercicios/Exercicios/011.py | alefbispo/Exercicios-do-curso-de-Python | 16cd569ab16542135b834ac8d0cfb0ae84836d53 | [
"MIT"
] | null | null | null | Pyon exercicios/Exercicios/011.py | alefbispo/Exercicios-do-curso-de-Python | 16cd569ab16542135b834ac8d0cfb0ae84836d53 | [
"MIT"
] | null | null | null | Pyon exercicios/Exercicios/011.py | alefbispo/Exercicios-do-curso-de-Python | 16cd569ab16542135b834ac8d0cfb0ae84836d53 | [
"MIT"
] | null | null | null | #pedir a altura e a largura de uma parede e dizer quantos litros de tinta vai gastar sabendo que cada litro de tinta pinta 2m2
altura = float(input('Qual a altura da parede? '))
largura = float(input('Qual a largura da parede? '))
area = altura * largura
tinta = (altura * largura) / 2
print('Voce tem a area de {}x{} ... | 42.090909 | 172 | 0.708423 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 310 | 0.668103 |
ac3fd84e905bc1166a7d4dcb6bd2d1a33b2c8e12 | 148 | py | Python | textutils/pages/views.py | sohanur-shanto/Django-Play-With-Text | e81177c22e409a584daebd8a826e2aaee14fb59c | [
"BSD-3-Clause-Attribution"
] | 2 | 2021-04-09T12:54:26.000Z | 2021-04-10T07:36:22.000Z | textutils/pages/views.py | sohanur-shanto/Django-Play-With-Text | e81177c22e409a584daebd8a826e2aaee14fb59c | [
"BSD-3-Clause-Attribution"
] | null | null | null | textutils/pages/views.py | sohanur-shanto/Django-Play-With-Text | e81177c22e409a584daebd8a826e2aaee14fb59c | [
"BSD-3-Clause-Attribution"
] | null | null | null | from django.http import HttpResponse
from django.shortcuts import render
def funwithmath(request):
return render (request, 'funwithmath.html') | 24.666667 | 47 | 0.797297 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.121622 |
ac40152e1997a785e6185c250577f8e42a50d310 | 1,155 | py | Python | main.py | fthome/repetier_ui | 49be402ac479f5e066ae27eaa2a8a02473bb8045 | [
"MIT"
] | null | null | null | main.py | fthome/repetier_ui | 49be402ac479f5e066ae27eaa2a8a02473bb8045 | [
"MIT"
] | null | null | null | main.py | fthome/repetier_ui | 49be402ac479f5e066ae27eaa2a8a02473bb8045 | [
"MIT"
] | null | null | null | # -*-coding:Utf-8 -*
from repetier_ui import *
import time
import set_ifttt
from FUTIL.my_logging import *
my_logging(console_level = DEBUG, logfile_level = INFO)
HD = repetier_printer (repetier_api(api_key='142a8eed-7d86-4bea-96bc-cfcf5b3ca742'),'HD')
sys.path.insert(0,'/home/pi')
import iftt_key
ifttt0 = set_if... | 31.216216 | 110 | 0.768831 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 289 | 0.25 |
ac40231ed6f638e7905b68291dba05edd0eca13c | 5,195 | py | Python | cows/model/wms.py | cedadev/cows | db9ed729c886b271ce85355b97e39243081e8246 | [
"BSD-2-Clause"
] | 2 | 2018-05-09T16:12:43.000Z | 2018-08-21T17:10:22.000Z | cows/model/wms.py | cedadev/cows | db9ed729c886b271ce85355b97e39243081e8246 | [
"BSD-2-Clause"
] | null | null | null | cows/model/wms.py | cedadev/cows | db9ed729c886b271ce85355b97e39243081e8246 | [
"BSD-2-Clause"
] | null | null | null | # BSD Licence
# Copyright (c) 2009, Science & Technology Facilities Council (STFC)
# All rights reserved.
#
# See the LICENSE file in the source distribution of this software for
# the full license text.
# Copyright (C) 2007 STFC & NERC (Science and Technology Facilities Council).
# This software may be distributed un... | 30.739645 | 95 | 0.663523 | 4,502 | 0.866603 | 0 | 0 | 0 | 0 | 0 | 0 | 2,734 | 0.526275 |
ac42226253879560e3b7ec3fc4e10b477bc7a82f | 2,942 | py | Python | utilities/prev_projects/DATAFIT/VIEW/WINDOWSVIEW/GraphView.py | Saldenisov/pyconlyse | 1de301b4a4c15ee0bd19034aa8d5da1beacfd124 | [
"MIT"
] | null | null | null | utilities/prev_projects/DATAFIT/VIEW/WINDOWSVIEW/GraphView.py | Saldenisov/pyconlyse | 1de301b4a4c15ee0bd19034aa8d5da1beacfd124 | [
"MIT"
] | null | null | null | utilities/prev_projects/DATAFIT/VIEW/WINDOWSVIEW/GraphView.py | Saldenisov/pyconlyse | 1de301b4a4c15ee0bd19034aa8d5da1beacfd124 | [
"MIT"
] | null | null | null | from PyQt5.Qt import QMainWindow
from prev_projects.DATAFIT.UTILITY.OBSERVER import GraphObserver
from prev_projects.DATAFIT.UTILITY.META import Meta
from prev_projects.DATAFIT.VIEW.UI import Ui_GraphWindow
class GraphView(QMainWindow, GraphObserver, metaclass=Meta):
"""
Represents graphical view of experime... | 40.30137 | 98 | 0.71516 | 2,731 | 0.92828 | 0 | 0 | 0 | 0 | 0 | 0 | 308 | 0.104691 |
ac435b3434ef327610b43e5ed8a12c8f4b36a43d | 1,205 | py | Python | src/normalizer.py | lucassouzamatos/water-potability-ai | 6714e894b4575a58e35cc6e1cac699f0f5f1e9bc | [
"MIT"
] | null | null | null | src/normalizer.py | lucassouzamatos/water-potability-ai | 6714e894b4575a58e35cc6e1cac699f0f5f1e9bc | [
"MIT"
] | null | null | null | src/normalizer.py | lucassouzamatos/water-potability-ai | 6714e894b4575a58e35cc6e1cac699f0f5f1e9bc | [
"MIT"
] | null | null | null | import pandas as pd
class Normalizer:
csv_data = 'dataset/water_potability.csv' # file from work data
def __init__(self) -> None:
self.dataset = pd.read_csv(self.csv_data)
self.__normalize_data__()
self.__separate__()
'''
@ convert all info to number
'''
def __normalize_data__(self) -> Non... | 40.166667 | 149 | 0.712863 | 1,128 | 0.9361 | 0 | 0 | 0 | 0 | 0 | 0 | 340 | 0.282158 |
ac44378df9c1e3bccd01c971db20ecdd0d460d5a | 541 | py | Python | CoProcessing/PythonCatalyst/Testing/Cxx/outputcheck.py | brown-ccv/paraview-scalable | 64b221a540737d2ac94a120039bd8d1e661bdc8f | [
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2019-09-27T08:04:34.000Z | 2019-10-16T22:30:54.000Z | CoProcessing/PythonCatalyst/Testing/Cxx/outputcheck.py | sakjain92/paraview | f3af0cd9f6750e24ad038eac573b870c88d6b7dd | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | CoProcessing/PythonCatalyst/Testing/Cxx/outputcheck.py | sakjain92/paraview | f3af0cd9f6750e24ad038eac573b870c88d6b7dd | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2021-03-13T03:35:01.000Z | 2021-03-13T03:35:01.000Z | import sys
if len(sys.argv) != 2:
print("command is 'python <vtk file>'")
sys.exit(1)
from paraview.simple import *
proxy = OpenDataFile(sys.argv[1])
r = proxy.GetClientSideObject()
r.Update()
g = r.GetOutput()
if g.GetNumberOfPoints() != 441 or g.GetNumberOfCells() != 800:
print('Output grid is incorre... | 25.761905 | 77 | 0.64695 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 173 | 0.319778 |
ac455afb457dd1a64725218027c80809e20d17f1 | 3,594 | py | Python | mrl/g_models/generative_base.py | DarkMatterAI/mrl | e000c3570d4461c3054c882697cce55217ede552 | [
"MIT"
] | 4 | 2021-11-16T09:29:55.000Z | 2021-12-27T17:55:32.000Z | mrl/g_models/generative_base.py | DarkMatterAI/mrl | e000c3570d4461c3054c882697cce55217ede552 | [
"MIT"
] | null | null | null | mrl/g_models/generative_base.py | DarkMatterAI/mrl | e000c3570d4461c3054c882697cce55217ede552 | [
"MIT"
] | 3 | 2021-11-16T09:41:41.000Z | 2021-12-27T17:55:33.000Z | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/09_generative_models.generative_base.ipynb (unless otherwise specified).
__all__ = ['GenerativeModel', 'beam_search']
# Cell
from ..imports import *
from ..torch_imports import *
from ..torch_core import *
from ..layers import *
# Cell
class GenerativeModel(nn.Module... | 28.299213 | 120 | 0.598219 | 1,206 | 0.335559 | 0 | 0 | 0 | 0 | 0 | 0 | 1,323 | 0.368114 |
ac45e6abbbb88f1ae1939bcf71db99437c006d19 | 154 | py | Python | desafios/des003/des003_p03.py | brenoedl0/python | 92ee4ea141584e0bd140449c093f871c2140b1a5 | [
"MIT"
] | null | null | null | desafios/des003/des003_p03.py | brenoedl0/python | 92ee4ea141584e0bd140449c093f871c2140b1a5 | [
"MIT"
] | null | null | null | desafios/des003/des003_p03.py | brenoedl0/python | 92ee4ea141584e0bd140449c093f871c2140b1a5 | [
"MIT"
] | null | null | null | nota1 = float(input('nota 1: '))
nota2 = float(input('nota 2: '))
media = (nota1 + nota2)/2
print('A media entre a nota 1 e a nota 2 é {}'.format(media))
| 30.8 | 61 | 0.62987 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.393548 |
ac460ebb2a0293670e0c132534dbc9da8b9efb13 | 5,588 | py | Python | rio_tiler/mosaic/methods/defaults.py | vincentsarago/rio-tiler | 21022a0766009a64acf0038dc6adae33d9831a41 | [
"BSD-3-Clause"
] | 77 | 2017-10-12T18:17:14.000Z | 2019-01-17T15:39:24.000Z | rio_tiler/mosaic/methods/defaults.py | vincentsarago/rio-tiler | 21022a0766009a64acf0038dc6adae33d9831a41 | [
"BSD-3-Clause"
] | 40 | 2017-10-17T08:31:51.000Z | 2019-01-11T22:00:44.000Z | rio_tiler/mosaic/methods/defaults.py | vincentsarago/rio-tiler | 21022a0766009a64acf0038dc6adae33d9831a41 | [
"BSD-3-Clause"
] | 23 | 2017-10-13T21:41:08.000Z | 2019-01-09T06:08:27.000Z | """rio_tiler.mosaic.methods.defaults: default mosaic filling methods."""
import numpy
from .base import MosaicMethodBase
class FirstMethod(MosaicMethodBase):
"""Feed the mosaic tile with the first pixel available."""
def __init__(self):
"""Overwrite base and init First method."""
super(Firs... | 29.256545 | 86 | 0.573193 | 5,441 | 0.973694 | 0 | 0 | 1,589 | 0.284359 | 0 | 0 | 1,044 | 0.186829 |
ac4628419c7ff8fb2c36d8b816ed31e520537c50 | 13,442 | py | Python | apps/render_data_.py | ckxz/PIFu | d1cf528652ba538368ec114ddafcbea5c73d7e3d | [
"MIT"
] | null | null | null | apps/render_data_.py | ckxz/PIFu | d1cf528652ba538368ec114ddafcbea5c73d7e3d | [
"MIT"
] | null | null | null | apps/render_data_.py | ckxz/PIFu | d1cf528652ba538368ec114ddafcbea5c73d7e3d | [
"MIT"
] | null | null | null | import os, sys
import random
import argparse
from pathlib import Path
from tqdm import tqdm
import cv2
import math
import pyexr
import shutil
import numpy as np
PACKAGE_PARENT = '..'
SCRIPT_DIR = os.path.dirname(os.path.realpath(os.path.join(os.getcwd(), os.path.expanduser(__file__))))
sys.path.append(os.path.normpat... | 35.096606 | 185 | 0.668725 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,678 | 0.27362 |
ac474bcb1cc36e8c400164e2a77001ca5f025265 | 498 | py | Python | venv/lib/python3.8/site-packages/webargs/__init__.py | mrunix1998/booking-flights-system | 4eab3d845c4ba6742bd550604fe69b7f101c8da4 | [
"MIT"
] | 1 | 2022-03-28T16:37:17.000Z | 2022-03-28T16:37:17.000Z | venv/venv/lib/python3.8/site-packages/webargs/__init__.py | mrunix1998/booking-flights-system | 4eab3d845c4ba6742bd550604fe69b7f101c8da4 | [
"MIT"
] | null | null | null | venv/venv/lib/python3.8/site-packages/webargs/__init__.py | mrunix1998/booking-flights-system | 4eab3d845c4ba6742bd550604fe69b7f101c8da4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from distutils.version import LooseVersion
from marshmallow.utils import missing
# Make marshmallow's validation functions importable from webargs
from marshmallow import validate
from webargs.core import dict2schema, ValidationError
from webargs import fields
__version__ = "5.3.2"
__version_... | 27.666667 | 77 | 0.783133 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 171 | 0.343373 |
ac483bee0ecf390755efd9546940d7a56a66bf85 | 483 | py | Python | scripts/imageio_remove_bin-script.py | shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings | 1fa4cd6a566c8745f455fc3d2273208f21f88ced | [
"bzip2-1.0.6"
] | 1 | 2021-11-25T02:14:23.000Z | 2021-11-25T02:14:23.000Z | scripts/imageio_remove_bin-script.py | shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings | 1fa4cd6a566c8745f455fc3d2273208f21f88ced | [
"bzip2-1.0.6"
] | null | null | null | scripts/imageio_remove_bin-script.py | shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings | 1fa4cd6a566c8745f455fc3d2273208f21f88ced | [
"bzip2-1.0.6"
] | null | null | null | #!C:\Users\stpny\Downloads\grasp_public-master\grasp_public-master\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'imageio==2.5.0','console_scripts','imageio_remove_bin'
__requires__ = 'imageio==2.5.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] =... | 37.153846 | 86 | 0.689441 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 278 | 0.575569 |
ac4880579ecf2bb75288ce5118717d81f57be27a | 1,351 | py | Python | mw2fcitx/build_dict.py | outloudvi/mw2fcitx | a4fbbcd5e8068ee1f08714f0e18b46c8b289a42c | [
"Unlicense"
] | 67 | 2020-08-13T13:58:03.000Z | 2022-03-29T11:33:51.000Z | mw2fcitx/build_dict.py | outloudvi/fcitx5-pinyin-moegirl | c62d3f7d049143a4d8726f408bdd345f53ff3347 | [
"Unlicense"
] | 5 | 2020-11-16T01:48:32.000Z | 2022-02-18T08:04:32.000Z | mw2fcitx/build_dict.py | outloudvi/fcitx5-pinyin-moegirl | c62d3f7d049143a4d8726f408bdd345f53ff3347 | [
"Unlicense"
] | 3 | 2020-10-08T15:44:30.000Z | 2022-03-23T12:40:11.000Z | import logging
import sys
from .pipeline import MWFPipeline
def build(config):
config["source"] = config["source"] or {}
config["tweaks"] = config["tweaks"] or []
config["converter"] = config["converter"] or {}
config["generator"] = config["generator"] or []
pipeline = MWFPipeline(config["source"... | 39.735294 | 76 | 0.61658 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 291 | 0.215396 |
ac495d1405722c44232ce6b138bdc896307b81e8 | 21,345 | py | Python | pythonweb/user/views.py | onwebbe/rasiberryPiWebManager | 14ff9f14f3f873457666fa1669fae715148538c9 | [
"Apache-2.0"
] | null | null | null | pythonweb/user/views.py | onwebbe/rasiberryPiWebManager | 14ff9f14f3f873457666fa1669fae715148538c9 | [
"Apache-2.0"
] | 7 | 2020-09-07T07:51:28.000Z | 2022-02-26T17:54:49.000Z | pythonweb/user/views.py | onwebbe/rasiberryPiWebManager | 14ff9f14f3f873457666fa1669fae715148538c9 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
import json
# Create your views here.
def info(request):
userInfo = {
'id': '4291d7da9005377ec9aec4a71ea837f',
'name': '天野远子',
'username': 'admin',
'password': '',
'avatar': '/avatar2.jpg',
'status': 1,
'telephone': ... | 25.747889 | 357 | 0.469056 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12,974 | 0.582761 |
ac4bb093b09ad6b3234a1c157636387e7fbb5f98 | 3,278 | py | Python | WHI_long_term_size_distr_including_fresh_emissions_plotting.py | annahs/atmos_research | b5853c9b12e327492f8f8ba5069bca3fd2e981c8 | [
"MIT"
] | 2 | 2018-08-17T15:25:26.000Z | 2019-04-17T16:50:00.000Z | WHI_long_term_size_distr_including_fresh_emissions_plotting.py | annahs/atmos_research | b5853c9b12e327492f8f8ba5069bca3fd2e981c8 | [
"MIT"
] | null | null | null | WHI_long_term_size_distr_including_fresh_emissions_plotting.py | annahs/atmos_research | b5853c9b12e327492f8f8ba5069bca3fd2e981c8 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
from scipy.optimize import curve_fit
from matplotlib import dates
import os
import pickle
from datetime import datetime
from pprint import pprint
import sys
import math
import traceback
import time
os.chdir('C:/Users/Sarah Hanna/Documents/Data/WHI long term record/co... | 26.650407 | 137 | 0.742221 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 473 | 0.144295 |
ac4e9a7286b947fb0b00f67815da9872ce954025 | 161 | py | Python | Estrutura_Decisao/pair_or_odd.py | M3nin0/supreme-broccoli | 186c1ea3b839ba3139f9301660dec8fbd27a162e | [
"Apache-2.0"
] | null | null | null | Estrutura_Decisao/pair_or_odd.py | M3nin0/supreme-broccoli | 186c1ea3b839ba3139f9301660dec8fbd27a162e | [
"Apache-2.0"
] | null | null | null | Estrutura_Decisao/pair_or_odd.py | M3nin0/supreme-broccoli | 186c1ea3b839ba3139f9301660dec8fbd27a162e | [
"Apache-2.0"
] | null | null | null | num = int(input("Insira um numero para descobrir se este é par ou impar: "))
if num % 2 == 0:
print("Este numero é par")
else:
print("Este numero é impar")
| 17.888889 | 76 | 0.658385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.615854 |
ac4ee0a9c265d35fc43a606e8c10147a4a14ebe8 | 342 | py | Python | pos_multie_print/config/docs.py | ashish-greycube/pos_multie_print | f84f36cdf32f53b200c8fe7b9c754e199094d841 | [
"MIT"
] | null | null | null | pos_multie_print/config/docs.py | ashish-greycube/pos_multie_print | f84f36cdf32f53b200c8fe7b9c754e199094d841 | [
"MIT"
] | null | null | null | pos_multie_print/config/docs.py | ashish-greycube/pos_multie_print | f84f36cdf32f53b200c8fe7b9c754e199094d841 | [
"MIT"
] | null | null | null | """
Configuration for docs
"""
# source_link = "https://github.com/[org_name]/pos_multie_print"
# docs_base_url = "https://[org_name].github.io/pos_multie_print"
# headline = "App that does everything"
# sub_heading = "Yes, you got that right the first time, everything"
def get_context(context):
context.brand_html =... | 28.5 | 68 | 0.739766 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 286 | 0.836257 |
ac4f1637d2da63115e2a93b02c3d3a4bb30ba74a | 56 | py | Python | src/import_hook/__init__.py | zthxxx/sniputils | e67f55dfa0689f1dde6b6e78d76f04022b4d4585 | [
"MIT"
] | null | null | null | src/import_hook/__init__.py | zthxxx/sniputils | e67f55dfa0689f1dde6b6e78d76f04022b4d4585 | [
"MIT"
] | null | null | null | src/import_hook/__init__.py | zthxxx/sniputils | e67f55dfa0689f1dde6b6e78d76f04022b4d4585 | [
"MIT"
] | null | null | null | from .import_track import *
from .reimportable import *
| 18.666667 | 27 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ac4f175249ba254c543b5b853dde50f7e4c40661 | 837 | py | Python | check_performance.py | 5laps2go/xbrr | 4c0824b53bfe971111d60e6c1ff4e36f4f4845a3 | [
"MIT"
] | null | null | null | check_performance.py | 5laps2go/xbrr | 4c0824b53bfe971111d60e6c1ff4e36f4f4845a3 | [
"MIT"
] | null | null | null | check_performance.py | 5laps2go/xbrr | 4c0824b53bfe971111d60e6c1ff4e36f4f4845a3 | [
"MIT"
] | null | null | null | import os
import shutil
import pyfbi
from xbrr.edinet.client.document_client import DocumentClient
from xbrr.edinet.reader.reader import Reader
from xbrr.edinet.reader.doc import Doc
from xbrr.edinet.reader.aspects.finance import Finance
@pyfbi.target
def check():
_dir = os.path.join(os.path.dirname(__file__), ".... | 26.15625 | 78 | 0.710872 | 0 | 0 | 0 | 0 | 527 | 0.62963 | 0 | 0 | 77 | 0.091995 |
ac4f82e72b64166dbb545dc5a1c2ec940777bbee | 1,096 | py | Python | pe3.py | ChrisCalderon/project-euler | 96055343fc3ef7653184708fe350018ee751ea17 | [
"MIT"
] | 1 | 2015-12-16T05:13:30.000Z | 2015-12-16T05:13:30.000Z | pe3.py | ChrisCalderon/project-euler | 96055343fc3ef7653184708fe350018ee751ea17 | [
"MIT"
] | null | null | null | pe3.py | ChrisCalderon/project-euler | 96055343fc3ef7653184708fe350018ee751ea17 | [
"MIT"
] | null | null | null | PRIMES = [3]
def next_prime():
num = PRIMES[-1] + 2 # odd + 2 is the next odd, don't check evens for primality
is_prime = False
while True:
lim = num**0.5 # don't check for prime factors larger than this
for p in PRIMES:
if p > lim:
is_prime = True
... | 22.833333 | 83 | 0.469891 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 220 | 0.20073 |
ac4fb7ef759fec615c1233d88bd6d5b5c8a82c1d | 144 | py | Python | backend/puzzle/apps.py | mductran/puzzle | c4598f5420dff126fa67db1e0adee1677a8baf8f | [
"Apache-2.0"
] | null | null | null | backend/puzzle/apps.py | mductran/puzzle | c4598f5420dff126fa67db1e0adee1677a8baf8f | [
"Apache-2.0"
] | null | null | null | backend/puzzle/apps.py | mductran/puzzle | c4598f5420dff126fa67db1e0adee1677a8baf8f | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class PuzzleConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'puzzle'
| 20.571429 | 56 | 0.756944 | 107 | 0.743056 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.270833 |
ac505c7c29aa070c9931ea9a50fc3af3c4aa490f | 10,701 | py | Python | cryptoquant/api/okex/futures_api.py | studyquant/StudyQuant | 24790634ac320b25361672754558c3797f4fc9e3 | [
"Apache-2.0"
] | 74 | 2018-08-10T17:05:57.000Z | 2022-03-26T07:06:02.000Z | cryptoquant/api/okex/futures_api.py | ezailwoo/studyquant | 24790634ac320b25361672754558c3797f4fc9e3 | [
"Apache-2.0"
] | 1 | 2022-03-24T06:42:00.000Z | 2022-03-24T06:42:00.000Z | cryptoquant/api/okex/futures_api.py | ezailwoo/studyquant | 24790634ac320b25361672754558c3797f4fc9e3 | [
"Apache-2.0"
] | 18 | 2020-09-22T09:03:49.000Z | 2022-03-31T20:48:54.000Z | from .client import Client
from .consts import *
class FutureAPI(Client):
def __init__(self, api_key, api_secret_key, passphrase, use_server_time=False, first=False):
Client.__init__(self, api_key, api_secret_key, passphrase, use_server_time, first)
# query position
def get_position(self):
... | 43.149194 | 236 | 0.657882 | 10,837 | 0.995225 | 0 | 0 | 0 | 0 | 0 | 0 | 2,373 | 0.217926 |
ac52168f298fb9c551b44c7fca2f04721962c5e4 | 2,254 | py | Python | advent_of_code_2017/day 14/solution.py | jvanelteren/advent_of_code | 3c547645250adb2d95ebac43d5d2111cdf9b09e9 | [
"MIT"
] | 1 | 2021-12-23T11:24:11.000Z | 2021-12-23T11:24:11.000Z | advent_of_code_2017/day 14/solution.py | jvanelteren/advent_of_code | 3c547645250adb2d95ebac43d5d2111cdf9b09e9 | [
"MIT"
] | null | null | null | advent_of_code_2017/day 14/solution.py | jvanelteren/advent_of_code | 3c547645250adb2d95ebac43d5d2111cdf9b09e9 | [
"MIT"
] | null | null | null | #%%
# read full assignment
# think algo before implementing
# dont use a dict when you need a list
# assignment is still = and not ==
# dont use itertools when you can use np.roll
# check mathemathical functions if the parentheses are ok
# networkx is awesome
# sometimes while true is better than just too small for loo... | 25.325843 | 72 | 0.613576 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 528 | 0.23425 |
ac53a111991d6177a1eaab1a5dfb80e80e02f826 | 1,423 | py | Python | binyard/general_diff.py | giprayogo/binyard | c1cfa880cb9907416da2363fa0e4ca2de920543e | [
"MIT"
] | null | null | null | binyard/general_diff.py | giprayogo/binyard | c1cfa880cb9907416da2363fa0e4ca2de920543e | [
"MIT"
] | null | null | null | binyard/general_diff.py | giprayogo/binyard | c1cfa880cb9907416da2363fa0e4ca2de920543e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import math
import argparse
from fractions import Fraction
parser = argparse.ArgumentParser()
parser.add_argument('filename')
parser.add_argument('--column', '-c', required=True)
parser.add_argument('--error-column', '-e')
args = parser.parse_args()
filename = args.filename
columns = list(map(i... | 36.487179 | 114 | 0.583275 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.063247 |
ac53b737b7f7790c24745dd75f232a7019768317 | 7,968 | py | Python | challenges/challenge1_test.py | jamiejamiebobamie/CS-2.2-Advanced-Recursion-and-Graphs | 3de50122ed783ee9dee251ae87173286a861f33d | [
"MIT"
] | null | null | null | challenges/challenge1_test.py | jamiejamiebobamie/CS-2.2-Advanced-Recursion-and-Graphs | 3de50122ed783ee9dee251ae87173286a861f33d | [
"MIT"
] | 5 | 2019-07-26T05:39:34.000Z | 2019-08-16T14:59:21.000Z | challenges/challenge1_test.py | jamiejamiebobamie/CS-2.2-Advanced-Recursion-and-Graphs | 3de50122ed783ee9dee251ae87173286a861f33d | [
"MIT"
] | null | null | null |
import unittest
from challenge1 import *
"""class Test_Read_Graph_Method(unittest.TestCase):
def __init__(self):
super(TestingClass, self).__init__()
self.filepath = "graph_data.txt"
self.vertices, self.edges = read_graph(filepath)
def test_read(self):
self.assertTrue(self.v... | 41.717277 | 190 | 0.616717 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,728 | 0.718876 |
ac53ceb43286b504010da1532640f80e8e04aec8 | 870 | py | Python | utils.py | twerkmeister/tacotron2 | 404c0758591dab8b72933f010f51c5c2b7490827 | [
"BSD-3-Clause"
] | null | null | null | utils.py | twerkmeister/tacotron2 | 404c0758591dab8b72933f010f51c5c2b7490827 | [
"BSD-3-Clause"
] | null | null | null | utils.py | twerkmeister/tacotron2 | 404c0758591dab8b72933f010f51c5c2b7490827 | [
"BSD-3-Clause"
] | 1 | 2020-04-30T11:21:15.000Z | 2020-04-30T11:21:15.000Z | import numpy as np
from scipy.io.wavfile import read
import torch
def get_mask_from_lengths(lengths):
max_len = torch.max(lengths).item()
if torch.cuda.is_available():
ids = torch.arange(0, max_len, out=torch.cuda.LongTensor(max_len))
else:
ids = torch.arange(0, max_len, out=torch.LongTens... | 26.363636 | 74 | 0.687356 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.011494 |
ac54c2f02d6419e0bb0da94bc53fab30b66b86a4 | 8,526 | py | Python | plugins/_Post_Process/_XAI/lime_tabular_batch.py | isabella232/nnc-plugin | 3bc71266696d0341e5e9a2ff2020980700f28719 | [
"Apache-2.0"
] | null | null | null | plugins/_Post_Process/_XAI/lime_tabular_batch.py | isabella232/nnc-plugin | 3bc71266696d0341e5e9a2ff2020980700f28719 | [
"Apache-2.0"
] | null | null | null | plugins/_Post_Process/_XAI/lime_tabular_batch.py | isabella232/nnc-plugin | 3bc71266696d0341e5e9a2ff2020980700f28719 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021,2022 Sony Group Corporation.
#
# 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 agree... | 40.407583 | 144 | 0.59301 | 33 | 0.003871 | 0 | 0 | 0 | 0 | 0 | 0 | 1,664 | 0.195168 |
ac54d54663f6738aa459a24b061f95f72da27abe | 3,454 | py | Python | examples/applications/plot_circuits.py | ImportanceOfBeingErnest/networkx | eb3a675c5b2b15e33b0a4a35bcee34d6b81ed94d | [
"BSD-3-Clause"
] | 1 | 2020-03-06T05:04:14.000Z | 2020-03-06T05:04:14.000Z | examples/applications/plot_circuits.py | ImportanceOfBeingErnest/networkx | eb3a675c5b2b15e33b0a4a35bcee34d6b81ed94d | [
"BSD-3-Clause"
] | 1 | 2019-11-28T21:08:50.000Z | 2019-11-28T21:08:50.000Z | examples/applications/plot_circuits.py | ImportanceOfBeingErnest/networkx | eb3a675c5b2b15e33b0a4a35bcee34d6b81ed94d | [
"BSD-3-Clause"
] | 4 | 2019-07-19T15:06:37.000Z | 2021-03-17T22:29:04.000Z | #!/usr/bin/env python
# circuits.py - convert a Boolean circuit to an equivalent Boolean formula
#
# Copyright 2016 Jeffrey Finkelstein <[email protected]>.
#
# This file is part of NetworkX.
#
# NetworkX is distributed under a BSD license; see LICENSE.txt for more
# information.
"""
========
Circuits
=====... | 34.19802 | 76 | 0.675738 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,787 | 0.515134 |
ac576d0fc1700d09b6ee7d12ba1be4753eca3284 | 4,669 | py | Python | torchtools/tensors/tensor_group.py | cjwcommuny/torch-tools | a64c0bdd87df065744fb49644f767165d3516b27 | [
"MIT"
] | null | null | null | torchtools/tensors/tensor_group.py | cjwcommuny/torch-tools | a64c0bdd87df065744fb49644f767165d3516b27 | [
"MIT"
] | null | null | null | torchtools/tensors/tensor_group.py | cjwcommuny/torch-tools | a64c0bdd87df065744fb49644f767165d3516b27 | [
"MIT"
] | null | null | null | from typing import Dict, Tuple
import torch
from torch import Tensor
from torchtools.tensors.function import unsqueeze
class TensorGroup:
def __init__(self, tensors: Dict[str, Tensor], check_validity: bool=True):
self.tensors = tensors
if check_validity:
assert self.check_tensors_len... | 32.2 | 128 | 0.572714 | 4,546 | 0.973656 | 0 | 0 | 286 | 0.061255 | 0 | 0 | 663 | 0.142 |
ac57b9751b82e69ea88e5b4020e3f0156b95a4e8 | 5,029 | py | Python | merlinservices/urls.py | USGS-WiM/merlin_django | 880a5634736de36fbb48cbfe7f60305a83975dcf | [
"CC0-1.0"
] | null | null | null | merlinservices/urls.py | USGS-WiM/merlin_django | 880a5634736de36fbb48cbfe7f60305a83975dcf | [
"CC0-1.0"
] | 28 | 2019-08-20T20:06:32.000Z | 2021-12-17T23:08:05.000Z | merlinservices/urls.py | USGS-WiM/merlin_django | 880a5634736de36fbb48cbfe7f60305a83975dcf | [
"CC0-1.0"
] | 2 | 2020-02-21T17:52:18.000Z | 2020-05-08T09:05:55.000Z | from django.urls import path
from django.conf.urls import url, include
from django.views.generic.base import TemplateView
from merlinservices import views
from rest_framework.routers import DefaultRouter
from rest_framework.schemas import get_schema_view
from rest_framework_bulk.routes import BulkRouter
#router = Defa... | 65.311688 | 114 | 0.791211 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,785 | 0.354941 |
ac5a48ef46f5c110ca09df0b1e0e5cb2859ebb3d | 1,134 | py | Python | model.py | bruchano/StockPricePrediction | 6fa3a643e9959fbf26ffd95af54981b077ddd33f | [
"MIT"
] | null | null | null | model.py | bruchano/StockPricePrediction | 6fa3a643e9959fbf26ffd95af54981b077ddd33f | [
"MIT"
] | null | null | null | model.py | bruchano/StockPricePrediction | 6fa3a643e9959fbf26ffd95af54981b077ddd33f | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as F
import datetime as dt
import pandas_datareader
class FullyConnected(torch.nn.Module):
def __init__(self, in_features, out_features, dropout=0.):
super().__init__()
self.fc = torch.nn.Linear(in_features, out_features)
self.norm = torch.... | 32.4 | 90 | 0.614638 | 1,024 | 0.902998 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0.002646 |
ac5ca3d9a1b5567a5c378d005b2800a24b5822f4 | 1,148 | py | Python | python/paddle/fluid/tests/unittests/test_python_bf16_numpy_datatype.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 11 | 2016-08-29T07:43:26.000Z | 2016-08-29T07:51:24.000Z | python/paddle/fluid/tests/unittests/test_python_bf16_numpy_datatype.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_python_bf16_numpy_datatype.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 1 | 2021-12-09T08:59:17.000Z | 2021-12-09T08:59:17.000Z | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 31.888889 | 74 | 0.718641 | 415 | 0.361498 | 0 | 0 | 0 | 0 | 0 | 0 | 607 | 0.528746 |
ac5d5c3626cc5c773bf91a5f517bfdbe0b549607 | 687 | py | Python | tests/api/v2/test_datasources.py | droessmj/python-sdk | 42ea2366d08ef5e4d1fa45029480b800352ab765 | [
"MIT"
] | 2 | 2020-09-08T20:42:05.000Z | 2020-09-09T14:27:55.000Z | tests/api/v2/test_datasources.py | droessmj/python-sdk | 42ea2366d08ef5e4d1fa45029480b800352ab765 | [
"MIT"
] | null | null | null | tests/api/v2/test_datasources.py | droessmj/python-sdk | 42ea2366d08ef5e4d1fa45029480b800352ab765 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Test suite for the community-developed Python SDK for interacting with Lacework APIs.
"""
import pytest
from laceworksdk.api.v2.datasources import DatasourcesAPI
from tests.api.test_base_endpoint import BaseEndpoint
# Tests
@pytest.fixture(scope="module")
def api_object(api):
return... | 22.9 | 85 | 0.737991 | 347 | 0.505095 | 0 | 0 | 79 | 0.114993 | 0 | 0 | 149 | 0.216885 |
ac5ea208004616e2bfb96c0a007f009fdaeed064 | 2,793 | py | Python | src/expand_mnist.py | whalsey/misc | 8649cb070017a2a6c3c1cdd7fd1e37f45b251ef1 | [
"Unlicense"
] | null | null | null | src/expand_mnist.py | whalsey/misc | 8649cb070017a2a6c3c1cdd7fd1e37f45b251ef1 | [
"Unlicense"
] | null | null | null | src/expand_mnist.py | whalsey/misc | 8649cb070017a2a6c3c1cdd7fd1e37f45b251ef1 | [
"Unlicense"
] | null | null | null | """expand_mnist.py
~~~~~~~~~~~~~~~~~~
Take the 50,000 MNIST training images, and create an expanded set of
250,000 images, by displacing each training image up, down, left and
right, by one pixel. Save the resulting file to
../data/mnist_expanded.pkl.gz.
Note that this program is memory intensive, and may not run on... | 29.09375 | 88 | 0.6058 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,237 | 0.442893 |
ac6056041eeb8497e63663fa127d721d28fac540 | 17,489 | py | Python | randconv/coordinator_factory.py | jm-begon/randconv | cb7438f5876c18192e8caaf3cafd88e839c26048 | [
"BSD-3-Clause"
] | 1 | 2016-08-01T08:09:28.000Z | 2016-08-01T08:09:28.000Z | randconv/coordinator_factory.py | jm-begon/randconv | cb7438f5876c18192e8caaf3cafd88e839c26048 | [
"BSD-3-Clause"
] | null | null | null | randconv/coordinator_factory.py | jm-begon/randconv | cb7438f5876c18192e8caaf3cafd88e839c26048 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
A set of factory function to help create usual cases of coordinator
"""
__author__ = "Begon Jean-Michel <[email protected]>"
__copyright__ = "3-clause BSD License"
__date__ = "20 January 2015"
import math
from .image import *
from .util import (OddUniformGenerator, NumberGenerator,
... | 40.204598 | 95 | 0.623535 | 1,075 | 0.061467 | 0 | 0 | 0 | 0 | 0 | 0 | 7,140 | 0.408257 |
ac6074b9d7933f990f474a4b8d34085357c16a13 | 2,944 | py | Python | projections.py | barrulik/3d-projections | 291770c466383c917dd68eb0ad4121195598a29f | [
"Apache-2.0"
] | 1 | 2022-01-20T20:01:24.000Z | 2022-01-20T20:01:24.000Z | projections.py | barrulik/3d-projections | 291770c466383c917dd68eb0ad4121195598a29f | [
"Apache-2.0"
] | 1 | 2022-01-20T20:01:30.000Z | 2022-01-21T14:23:11.000Z | projections.py | barrulik/3d-projections | 291770c466383c917dd68eb0ad4121195598a29f | [
"Apache-2.0"
] | null | null | null | import pygame
import numpy as np
from math import *
import json
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
RAINBOW = (0, 0, 0)
rainbow = True
WIDTH, HEIGHT = 800, 600
#WIDTH, HEIGHT = 1600, 900
def drawLine(point1, point2, screen):
if rainbow:
pygame.draw.line(screen, RAINBOW, (point1[0], point1[1]), (po... | 27.009174 | 224 | 0.571332 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 215 | 0.07303 |
ac615575fca01649282cfa5b82c564f0a14d7c09 | 708 | py | Python | insert_data.py | Amantechcse/cricket-fantasy-game | dd256adef88de7fd4132dea55d52bfba493efa30 | [
"MIT"
] | null | null | null | insert_data.py | Amantechcse/cricket-fantasy-game | dd256adef88de7fd4132dea55d52bfba493efa30 | [
"MIT"
] | null | null | null | insert_data.py | Amantechcse/cricket-fantasy-game | dd256adef88de7fd4132dea55d52bfba493efa30 | [
"MIT"
] | null | null | null | import sqlite3
book=sqlite3.connect("bookstore.db")
curbook=book.cursor()
#curbook.execute('''create table books (book_id integer primary key autoincrement , book_name text(20), author text(20), price integer);''')
while True:
x=input("want to enter data yes/no: ")
if x=='yes':
book_id=int(input("Ente... | 28.32 | 141 | 0.638418 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 375 | 0.529661 |
ac61daa3c54495624b8682899688bd4fd36deaca | 13,110 | py | Python | api/config/h5Template/tanmuContent.py | jimbunny/wedding-invitation | a3648454e1105d9362f95d9f6e69055a7522e15b | [
"MIT"
] | null | null | null | api/config/h5Template/tanmuContent.py | jimbunny/wedding-invitation | a3648454e1105d9362f95d9f6e69055a7522e15b | [
"MIT"
] | null | null | null | api/config/h5Template/tanmuContent.py | jimbunny/wedding-invitation | a3648454e1105d9362f95d9f6e69055a7522e15b | [
"MIT"
] | null | null | null | tanmuContent = '''
<style>
.barrage-input-tip {
z-index: 1999;
position: absolute;
left: 10px;
width: 179.883px;
height: 35.7422px;
line-height: 35.7422px;
border-radius: 35.7422px;
box-sizing: border-box;
color: rgb(255, 255, 255);
... | 39.017857 | 427 | 0.564607 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14,224 | 0.998947 |
ac622bca39310127b42776aefdbd9c65467abc04 | 871 | py | Python | example/example2.py | xrloong/xrSolver | 4f36660b78456840f65215ffce0481cdc280f980 | [
"Apache-2.0"
] | null | null | null | example/example2.py | xrloong/xrSolver | 4f36660b78456840f65215ffce0481cdc280f980 | [
"Apache-2.0"
] | null | null | null | example/example2.py | xrloong/xrSolver | 4f36660b78456840f65215ffce0481cdc280f980 | [
"Apache-2.0"
] | null | null | null | from xrsolver import Problem
import solver
# This example is the second case from https://www.youtube.com/watch?v=WJEZh7GWHnw
s = solver.Solver()
p = Problem()
x1 = p.generateVariable("x1", lb=0, ub=3)
x2 = p.generateVariable("x2", lb=0, ub=3)
x3 = p.generateVariable("x3", lb=0, ub=3)
x4 = p.generateVariable("x4",... | 23.540541 | 82 | 0.64868 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 132 | 0.15155 |
ac635fff94dc7903f590b0e63087a7ab13c8a9ab | 11,669 | py | Python | src/ipyradiant/visualization/explore/interactive_exploration.py | lnijhawan/ipyradiant | d804e9031ef39c1ea75fedd52d110302c065ad84 | [
"BSD-3-Clause"
] | null | null | null | src/ipyradiant/visualization/explore/interactive_exploration.py | lnijhawan/ipyradiant | d804e9031ef39c1ea75fedd52d110302c065ad84 | [
"BSD-3-Clause"
] | null | null | null | src/ipyradiant/visualization/explore/interactive_exploration.py | lnijhawan/ipyradiant | d804e9031ef39c1ea75fedd52d110302c065ad84 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2021 ipyradiant contributors.
# Distributed under the terms of the Modified BSD License.
from typing import Union
import ipycytoscape as cyto
import ipywidgets as W
import rdflib
import traitlets as trt
from ipyradiant.query.api import SPARQLQueryFramer
from ipyradiant.rdf2nx.uri_converter import URI... | 32.504178 | 88 | 0.589768 | 8,418 | 0.721399 | 0 | 0 | 2,969 | 0.254435 | 0 | 0 | 3,926 | 0.336447 |
ac64882142c0ccfa449492e6be034f7737d14e85 | 2,165 | py | Python | src/main/serialization/codec/object/collectionCodec.py | typingtanuki/pyserialization | f4a0d9cff08b3a6ce8f83f3a258c4dce1367d151 | [
"Apache-2.0"
] | null | null | null | src/main/serialization/codec/object/collectionCodec.py | typingtanuki/pyserialization | f4a0d9cff08b3a6ce8f83f3a258c4dce1367d151 | [
"Apache-2.0"
] | null | null | null | src/main/serialization/codec/object/collectionCodec.py | typingtanuki/pyserialization | f4a0d9cff08b3a6ce8f83f3a258c4dce1367d151 | [
"Apache-2.0"
] | null | null | null | from typing import List, TypeVar
from src.main.serialization.codec.codec import Codec
from src.main.serialization.codec.codecCache import CodecCache
from src.main.serialization.codec.object.noneCodec import NoneCodec
from src.main.serialization.codec.utils.byteIo import ByteIo
from src.main.serialization.codec.utils.b... | 29.657534 | 69 | 0.611085 | 1,810 | 0.836028 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.018476 |
ac64c1d7463ad68a50c3cf1fa6beb3067354a863 | 3,049 | py | Python | pyatv/__init__.py | acheronfail/pyatv | 9cb96ffcc49938c4b43c92b7b40ddcecae37e732 | [
"MIT"
] | null | null | null | pyatv/__init__.py | acheronfail/pyatv | 9cb96ffcc49938c4b43c92b7b40ddcecae37e732 | [
"MIT"
] | 128 | 2020-04-24T06:42:29.000Z | 2021-02-19T11:34:20.000Z | pyatv/__init__.py | acheronfail/pyatv | 9cb96ffcc49938c4b43c92b7b40ddcecae37e732 | [
"MIT"
] | null | null | null | """Main routines for interacting with an Apple TV."""
import asyncio
import datetime # noqa
from ipaddress import IPv4Address
from typing import List
import aiohttp
from pyatv import conf, exceptions, interface
from pyatv.airplay import AirPlayStreamAPI
from pyatv.const import Protocol
from pyatv.dmap import DmapAp... | 29.317308 | 84 | 0.711053 | 0 | 0 | 0 | 0 | 0 | 0 | 2,412 | 0.791079 | 328 | 0.107576 |
ac65e8637b6048418cfca104d86483ce0041387d | 1,323 | py | Python | demessifyme/file_read_write.py | lilianluong/demessifyme | 7b90611316a4fc723fe38af8fe6e1ee4209e8fd2 | [
"MIT"
] | null | null | null | demessifyme/file_read_write.py | lilianluong/demessifyme | 7b90611316a4fc723fe38af8fe6e1ee4209e8fd2 | [
"MIT"
] | null | null | null | demessifyme/file_read_write.py | lilianluong/demessifyme | 7b90611316a4fc723fe38af8fe6e1ee4209e8fd2 | [
"MIT"
] | 1 | 2020-10-10T11:13:37.000Z | 2020-10-10T11:13:37.000Z | import glob
import os
from doc2vec import read_file, embed_document
def get_file_embeddings():
# Returns a list of names in list files.
txt_files = glob.glob('**/*.txt', recursive=True)
pdf_files = glob.glob('**/*.pdf', recursive=True)
docx_files = glob.glob('**/*.docx', recursive=True)
file_names... | 33.075 | 84 | 0.615268 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 241 | 0.182162 |
ac665b07df9871fa56973cfc475e0b3e944d2fc8 | 8,902 | py | Python | util/third_party/tensorflow_extra/tool/tflite/tflite.py | bojanpotocnik/gecko_sdk | 9e70b13fc4701459c5f8a8f5e8918ec3f5ea8903 | [
"Zlib"
] | 82 | 2016-06-29T17:24:43.000Z | 2021-04-16T06:49:17.000Z | util/third_party/tensorflow_extra/tool/tflite/tflite.py | bojanpotocnik/gecko_sdk | 9e70b13fc4701459c5f8a8f5e8918ec3f5ea8903 | [
"Zlib"
] | 2 | 2017-02-13T10:07:17.000Z | 2017-03-22T21:28:26.000Z | util/third_party/tensorflow_extra/tool/tflite/tflite.py | bojanpotocnik/gecko_sdk | 9e70b13fc4701459c5f8a8f5e8918ec3f5ea8903 | [
"Zlib"
] | 56 | 2016-08-02T10:50:50.000Z | 2021-07-19T08:57:34.000Z | #!/usr/bin/env python3
import sys
import os
import argparse
from string import Template
import re
# Patch site-packages to find numpy
import jinja2
if sys.platform.startswith("win"):
site_packages_path = os.path.abspath(os.path.join(os.path.dirname(jinja2.__file__), "../../../ext-site-packages"))
else:
site_packa... | 30.909722 | 149 | 0.702089 | 0 | 0 | 281 | 0.031566 | 0 | 0 | 0 | 0 | 4,025 | 0.452146 |
ac66fd2ca8108c50a826f92ddb5befe5db26ac80 | 3,290 | py | Python | braintree/transparent_redirect_gateway.py | eldarion/braintree_python | 8be3f69fb9a4171c5e9be049c8440fcc4f79fb40 | [
"MIT"
] | 3 | 2015-11-05T08:57:12.000Z | 2016-07-17T18:10:55.000Z | braintree/transparent_redirect_gateway.py | eldarion/braintree_python | 8be3f69fb9a4171c5e9be049c8440fcc4f79fb40 | [
"MIT"
] | null | null | null | braintree/transparent_redirect_gateway.py | eldarion/braintree_python | 8be3f69fb9a4171c5e9be049c8440fcc4f79fb40 | [
"MIT"
] | null | null | null | import cgi
from datetime import datetime
import urllib
import braintree
from braintree.util.crypto import Crypto
from braintree.error_result import ErrorResult
from braintree.exceptions.forged_query_string_error import ForgedQueryStringError
from braintree.util.http import Http
from braintree.successful_result import S... | 40.121951 | 143 | 0.687234 | 2,888 | 0.877812 | 0 | 0 | 0 | 0 | 0 | 0 | 603 | 0.183283 |
ac67224e0a480ab178264f670f037b9c677d4fdc | 358 | py | Python | paint/migrations/0007_auto_20200405_1748.py | atulk17/Paint-App | 4b56455596d140cee4a9b19c71fe82364c3f3b7c | [
"BSD-2-Clause"
] | null | null | null | paint/migrations/0007_auto_20200405_1748.py | atulk17/Paint-App | 4b56455596d140cee4a9b19c71fe82364c3f3b7c | [
"BSD-2-Clause"
] | null | null | null | paint/migrations/0007_auto_20200405_1748.py | atulk17/Paint-App | 4b56455596d140cee4a9b19c71fe82364c3f3b7c | [
"BSD-2-Clause"
] | 1 | 2020-05-31T11:37:48.000Z | 2020-05-31T11:37:48.000Z | # Generated by Django 3.0.4 on 2020-04-05 12:18
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('paint', '0006_auto_20200405_1746'),
]
operations = [
migrations.AlterModelTable(
name='office_expense',
table=... | 19.888889 | 48 | 0.578212 | 267 | 0.74581 | 0 | 0 | 0 | 0 | 0 | 0 | 112 | 0.312849 |
ac681a8ffae94d52efd701e9160788c29c5b6e8c | 72 | py | Python | app.py | ManarAbdelkarim/-hr-managmentSystem | 22d2ea340824c9533576c3e7c96296f443d7bf50 | [
"MIT"
] | null | null | null | app.py | ManarAbdelkarim/-hr-managmentSystem | 22d2ea340824c9533576c3e7c96296f443d7bf50 | [
"MIT"
] | null | null | null | app.py | ManarAbdelkarim/-hr-managmentSystem | 22d2ea340824c9533576c3e7c96296f443d7bf50 | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__,static_folder='../static') | 36 | 47 | 0.763889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.152778 |
ac68c7b7a0f74f060897b04d3c95265a4c3918fb | 4,412 | py | Python | esprit/models.py | Ken125pig/esprit | 6fc6b24450627077f1d38145e14765f776feba8b | [
"Apache-2.0"
] | null | null | null | esprit/models.py | Ken125pig/esprit | 6fc6b24450627077f1d38145e14765f776feba8b | [
"Apache-2.0"
] | 6 | 2016-02-04T12:08:40.000Z | 2017-12-08T15:48:35.000Z | esprit/models.py | Ken125pig/esprit | 6fc6b24450627077f1d38145e14765f776feba8b | [
"Apache-2.0"
] | 4 | 2016-09-09T11:01:27.000Z | 2021-11-21T05:49:14.000Z | from copy import deepcopy
import string
from esprit import versions
unicode_punctuation_map = dict((ord(char), None) for char in string.punctuation)
class Query(object):
def __init__(self, raw=None):
self.q = QueryBuilder.match_all() if raw is None else raw
if "query" not in self.q:
s... | 34.46875 | 120 | 0.529465 | 4,256 | 0.964642 | 0 | 0 | 1,776 | 0.402539 | 0 | 0 | 904 | 0.204896 |
ac6bcb9638b71ebbb75437e8984e9150ca824759 | 2,074 | py | Python | src/focus/api.py | RogerRueegg/lvw-young-talents | baf8490230230fffb232a13eb641b55ede29a710 | [
"MIT"
] | 1 | 2018-02-13T08:09:02.000Z | 2018-02-13T08:09:02.000Z | src/focus/api.py | RogerRueegg/lvw-young-talents | baf8490230230fffb232a13eb641b55ede29a710 | [
"MIT"
] | null | null | null | src/focus/api.py | RogerRueegg/lvw-young-talents | baf8490230230fffb232a13eb641b55ede29a710 | [
"MIT"
] | null | null | null | from . import models
from . import serializers
from rest_framework import viewsets, permissions
class CompetitionViewSet(viewsets.ModelViewSet):
"""ViewSet for the Competition class"""
queryset = models.Competition.objects.all()
serializer_class = serializers.CompetitionSerializer
permission_classes ... | 29.628571 | 61 | 0.771456 | 1,952 | 0.941176 | 0 | 0 | 0 | 0 | 0 | 0 | 294 | 0.141755 |
ac6bff0ef28a6f43b86268b434e114b49de8f3f4 | 1,273 | py | Python | algorithms/array/majority_element.py | kevinshenyang07/Data-Structure-and-Algo | 36b02feea04b892f1256de090c4fcf7b6aa98873 | [
"MIT"
] | null | null | null | algorithms/array/majority_element.py | kevinshenyang07/Data-Structure-and-Algo | 36b02feea04b892f1256de090c4fcf7b6aa98873 | [
"MIT"
] | null | null | null | algorithms/array/majority_element.py | kevinshenyang07/Data-Structure-and-Algo | 36b02feea04b892f1256de090c4fcf7b6aa98873 | [
"MIT"
] | null | null | null | # Moore Voting
# Majority Element
# Given an array of size n, find the majority element.
# The majority element is the element that appears more than ⌊ n/2 ⌋ times.
# assume at leat one element
class Solution(object):
def majorityElement(self, nums):
count, major_num = 0, nums[0]
for num in nums:
... | 25.979592 | 75 | 0.495679 | 1,052 | 0.823806 | 0 | 0 | 0 | 0 | 0 | 0 | 214 | 0.16758 |
ac6d9ecff3da360afd64ff653a18f8313213ea89 | 13,844 | py | Python | evmosproto/evmos/incentives/v1/incentives_pb2.py | hanchon-live/evmosproto | 141f336cf027a88c5bf227ab49069dd1cf2e4853 | [
"MIT"
] | null | null | null | evmosproto/evmos/incentives/v1/incentives_pb2.py | hanchon-live/evmosproto | 141f336cf027a88c5bf227ab49069dd1cf2e4853 | [
"MIT"
] | null | null | null | evmosproto/evmos/incentives/v1/incentives_pb2.py | hanchon-live/evmosproto | 141f336cf027a88c5bf227ab49069dd1cf2e4853 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: evmos/incentives/v1/incentives.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflect... | 48.069444 | 1,372 | 0.769142 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,995 | 0.288573 |
ac6da0ba7a668648271540c11b0b554223adac1a | 15,332 | py | Python | modules/dashboard/question_editor.py | danieldanciu/schoggi | 0e18f0cca58cf2318525d57691c2e674b131206d | [
"Apache-2.0"
] | null | null | null | modules/dashboard/question_editor.py | danieldanciu/schoggi | 0e18f0cca58cf2318525d57691c2e674b131206d | [
"Apache-2.0"
] | null | null | null | modules/dashboard/question_editor.py | danieldanciu/schoggi | 0e18f0cca58cf2318525d57691c2e674b131206d | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 40.560847 | 79 | 0.621706 | 14,307 | 0.933146 | 0 | 0 | 5,780 | 0.376989 | 0 | 0 | 4,780 | 0.311766 |
ac6e43614244577418d650dcbc06148d7a2b0c7c | 5,598 | py | Python | clayful/__init__.py | Clayful/clayful-python | ddd5f1f986fb0079d5128e17f4b0fdce83b4cec1 | [
"MIT"
] | null | null | null | clayful/__init__.py | Clayful/clayful-python | ddd5f1f986fb0079d5128e17f4b0fdce83b4cec1 | [
"MIT"
] | 3 | 2020-04-17T05:24:06.000Z | 2022-02-10T09:00:22.000Z | clayful/__init__.py | Clayful/clayful-python | ddd5f1f986fb0079d5128e17f4b0fdce83b4cec1 | [
"MIT"
] | null | null | null | import re
import urllib
import numbers
from clayful.models import register_models
from clayful.requester import request
from clayful.exception import ClayfulException
class Clayful:
base_url = 'https://api.clayful.io'
default_headers = {
'Accept-Encoding': 'gzip',
'User-Agent': 'clayful-python',
'Clayfu... | 19.992857 | 128 | 0.66363 | 5,385 | 0.961951 | 0 | 0 | 5,060 | 0.903894 | 0 | 0 | 1,102 | 0.196856 |
ac6eca8aa04c226da4e5ecb684240f7192f29f63 | 1,478 | py | Python | racecar_gym/envs/scenarios.py | luigiberducci/racecar_gym | fd2ff7fb14e9319530786ef54a4a6864bf1f1c26 | [
"MIT"
] | 16 | 2020-11-27T02:55:24.000Z | 2022-03-24T01:27:29.000Z | racecar_gym/envs/scenarios.py | luigiberducci/racecar_gym | fd2ff7fb14e9319530786ef54a4a6864bf1f1c26 | [
"MIT"
] | 5 | 2020-08-24T15:59:39.000Z | 2020-10-20T19:45:46.000Z | racecar_gym/envs/scenarios.py | luigiberducci/racecar_gym | fd2ff7fb14e9319530786ef54a4a6864bf1f1c26 | [
"MIT"
] | 4 | 2020-10-08T16:14:19.000Z | 2021-12-26T18:19:53.000Z | from dataclasses import dataclass
from typing import Dict
from racecar_gym.bullet import load_world, load_vehicle
from racecar_gym.tasks import Task, get_task
from racecar_gym.core import World, Agent
from .specs import ScenarioSpec, TaskSpec
def task_from_spec(spec: TaskSpec) -> Task:
task = get_task(spec.task_n... | 30.791667 | 119 | 0.688092 | 1,094 | 0.740189 | 0 | 0 | 1,116 | 0.755074 | 0 | 0 | 41 | 0.02774 |
ac6eda3ee83ebc645d67258023269c71e7def1cb | 26,972 | py | Python | vkts/real.py | smurphik/vkts | 21e16f37eebf80cd41fd02d7401e523e772e98f9 | [
"MIT"
] | null | null | null | vkts/real.py | smurphik/vkts | 21e16f37eebf80cd41fd02d7401e523e772e98f9 | [
"MIT"
] | null | null | null | vkts/real.py | smurphik/vkts | 21e16f37eebf80cd41fd02d7401e523e772e98f9 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
"""Implementation of the main functions of the application: editing user data,
thematic search, other console commands"""
import sys
import re
from collections import Counter
from .report import Report
from . import vklib as vk
from .vklib import apply_vk_method
from .usrdata import UsrData
fr... | 38.752874 | 84 | 0.58075 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13,977 | 0.510519 |
ac6f2dbc609bab1cd3af2ace2bafd614f0610168 | 10,226 | py | Python | sample_facemesh.py | swipswaps/mediapipe-python | 00700129ced41dcdab174cd46454f5e7e3d9e25b | [
"Apache-2.0"
] | 92 | 2021-03-09T08:27:17.000Z | 2022-03-09T08:20:48.000Z | sample_facemesh.py | swipswaps/mediapipe-python | 00700129ced41dcdab174cd46454f5e7e3d9e25b | [
"Apache-2.0"
] | 1 | 2021-12-23T05:15:26.000Z | 2022-02-21T20:35:21.000Z | sample_facemesh.py | swipswaps/mediapipe-python | 00700129ced41dcdab174cd46454f5e7e3d9e25b | [
"Apache-2.0"
] | 46 | 2021-03-08T10:24:54.000Z | 2021-12-20T07:12:48.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import copy
import argparse
import cv2 as cv
import numpy as np
import mediapipe as mp
from utils import CvFpsCalc
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument("--device", type=int, default=0)
parser.add_argument("--width", help='c... | 38.588679 | 88 | 0.552415 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,336 | 0.127798 |
ac6f3083292de976db6a89e3601228fd50986b48 | 1,413 | py | Python | andromeda/modules/loans/views/inventory_loans.py | sango09/andromeda_api_rest | b4a3267146f4f9a985fb3f512e652d4ff354bba2 | [
"MIT"
] | 1 | 2021-09-08T18:58:16.000Z | 2021-09-08T18:58:16.000Z | andromeda/modules/loans/views/inventory_loans.py | sango09/andromeda_api_rest | b4a3267146f4f9a985fb3f512e652d4ff354bba2 | [
"MIT"
] | null | null | null | andromeda/modules/loans/views/inventory_loans.py | sango09/andromeda_api_rest | b4a3267146f4f9a985fb3f512e652d4ff354bba2 | [
"MIT"
] | null | null | null | """Vista del inventario del modulo de prestamos tecnologicos."""
# Django REST Framework
from rest_framework import viewsets, mixins
# Permisos
from rest_framework.permissions import IsAuthenticated
from andromeda.modules.inventory.permissions import IsAdmin, IsStaff
# Modelos
from andromeda.modules.loans.models imp... | 36.230769 | 104 | 0.685775 | 954 | 0.674205 | 0 | 0 | 0 | 0 | 0 | 0 | 327 | 0.231095 |
ac6fc1b210632046a04f35464d2d89383a795143 | 876 | py | Python | N-Gram/PlotUtils.py | FindTheTruth/Natural-Language-Processing | a52c777e505dd5ccd9f892fbf98ba50d4c29b31b | [
"Apache-2.0"
] | 1 | 2022-03-23T09:26:59.000Z | 2022-03-23T09:26:59.000Z | N-Gram/PlotUtils.py | FindTheTruth/Natural-Language-Processing | a52c777e505dd5ccd9f892fbf98ba50d4c29b31b | [
"Apache-2.0"
] | null | null | null | N-Gram/PlotUtils.py | FindTheTruth/Natural-Language-Processing | a52c777e505dd5ccd9f892fbf98ba50d4c29b31b | [
"Apache-2.0"
] | null | null | null | import matplotlib.pyplot as plt
x = ["N=1", "N=2", "N=3", "N=4", "N=5","N=6"]
y = [0.9365, 0.9865, 0.9895, 0.9950,0.9880,0.9615]
rects = plt.barh(x, y, color=["red", "blue", "purple", "violet", "green", "black"])
for rect in rects: # rects 是三根柱子的集合
width = rect.get_width()
print(width)
plt.text(width, rec... | 36.5 | 83 | 0.589041 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 303 | 0.3337 |
ac70a851d5c96469acf3749c8c769ab79086f7dc | 226 | py | Python | tests/test_logger.py | sp-95/python-template | 3d4fab175314fe2b200e77c7c71c464e897749b9 | [
"MIT"
] | null | null | null | tests/test_logger.py | sp-95/python-template | 3d4fab175314fe2b200e77c7c71c464e897749b9 | [
"MIT"
] | null | null | null | tests/test_logger.py | sp-95/python-template | 3d4fab175314fe2b200e77c7c71c464e897749b9 | [
"MIT"
] | null | null | null | from _pytest.logging import LogCaptureFixture
from loguru import logger
def test_log_configuration(caplog: LogCaptureFixture) -> None:
message = "Test message"
logger.info(message)
assert message in caplog.text
| 22.6 | 62 | 0.774336 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.061947 |
ac714ac75d2b71ae4b1604d302d1232df43b166e | 142 | py | Python | Semana 09/fase.py | heltonricardo/grupo-estudos-maratonas-programacao | 0c07d84a900858616647d07574ec56b0533cddfb | [
"MIT"
] | null | null | null | Semana 09/fase.py | heltonricardo/grupo-estudos-maratonas-programacao | 0c07d84a900858616647d07574ec56b0533cddfb | [
"MIT"
] | null | null | null | Semana 09/fase.py | heltonricardo/grupo-estudos-maratonas-programacao | 0c07d84a900858616647d07574ec56b0533cddfb | [
"MIT"
] | null | null | null | n, k, v = int(input()), int(input()), []
for i in range(n): v.append(int(input()))
v = sorted(v, reverse=True)
print(k + v[k:].count(v[k-1]))
| 28.4 | 41 | 0.570423 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ac715495b2bb97e43a63daf0a85ca3c192ec09c8 | 1,160 | py | Python | 02_crowsnest/ragz_crowsnest.py | zrucker/tiny_python_projects | 7760c9db2e89640c6485e01891a0022927a46c3b | [
"MIT"
] | null | null | null | 02_crowsnest/ragz_crowsnest.py | zrucker/tiny_python_projects | 7760c9db2e89640c6485e01891a0022927a46c3b | [
"MIT"
] | null | null | null | 02_crowsnest/ragz_crowsnest.py | zrucker/tiny_python_projects | 7760c9db2e89640c6485e01891a0022927a46c3b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Date : 2021-09-06
Purpose: learning to work with strings
"""
import argparse
# --------------------------------------------------
def get_args():
"""Get command-line arguments"""
parser = argparse.ArgumentParser(
description='Crow\'s Nest -- choose the correct article',
... | 21.481481 | 77 | 0.483621 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 568 | 0.489655 |
ac71f74611bb270f9befb24fa9ac317b196927ef | 9,397 | py | Python | lvsfunc/render.py | End-of-Eternity/lvsfunc | 1c9ff7f1d9731378536fb428f077075285e25843 | [
"MIT"
] | null | null | null | lvsfunc/render.py | End-of-Eternity/lvsfunc | 1c9ff7f1d9731378536fb428f077075285e25843 | [
"MIT"
] | null | null | null | lvsfunc/render.py | End-of-Eternity/lvsfunc | 1c9ff7f1d9731378536fb428f077075285e25843 | [
"MIT"
] | null | null | null | """
Clip rendering helpers.
"""
import vapoursynth as vs
from enum import Enum
from threading import Condition
from typing import BinaryIO, Callable, Dict, List, Optional, TextIO, Union
from concurrent.futures import Future
from functools import partial
from .progress import Progress, BarColumn, FPSColumn, TextColumn... | 36.85098 | 117 | 0.612536 | 601 | 0.063957 | 0 | 0 | 0 | 0 | 0 | 0 | 3,200 | 0.340534 |
ac72f9700e343b6945d908397ce48596d4d77b7e | 1,689 | py | Python | geekjobs/forms.py | paconte/geekjobs | 4f5f72c9a08dd4e7bf58dc68364dedce9c248c3e | [
"MIT"
] | null | null | null | geekjobs/forms.py | paconte/geekjobs | 4f5f72c9a08dd4e7bf58dc68364dedce9c248c3e | [
"MIT"
] | null | null | null | geekjobs/forms.py | paconte/geekjobs | 4f5f72c9a08dd4e7bf58dc68364dedce9c248c3e | [
"MIT"
] | 1 | 2019-09-14T21:59:18.000Z | 2019-09-14T21:59:18.000Z | from django import forms
from django.utils.translation import ugettext_lazy as _
from geekjobs.models import Job
"""
class JobForm(forms.Form):
title = forms.CharField(label='Job title', max_length=380)
city = forms.CharField(label='City', max_length=100, required=False)
state = forms.ChoiceField(label='St... | 40.214286 | 118 | 0.616341 | 745 | 0.441089 | 0 | 0 | 0 | 0 | 0 | 0 | 1,143 | 0.676732 |
ac7444482c933dd6646be8739b9a9cde05c17711 | 1,133 | py | Python | solutions/day3/solution.py | JavierLuna/advent-of-code-2020 | 57429a7973446472fffb07dc770f260160407f0c | [
"MIT"
] | 1 | 2020-12-03T08:57:20.000Z | 2020-12-03T08:57:20.000Z | solutions/day3/solution.py | JavierLuna/advent-of-code-2020 | 57429a7973446472fffb07dc770f260160407f0c | [
"MIT"
] | null | null | null | solutions/day3/solution.py | JavierLuna/advent-of-code-2020 | 57429a7973446472fffb07dc770f260160407f0c | [
"MIT"
] | null | null | null | import math
from typing import Tuple, Set
from solutions.runner.base_solution import BaseSolution
from solutions.runner.readers.base_reader import BaseReader
TREE = "#"
class Day3Reader(BaseReader):
@staticmethod
def transform_raw_line(line: str):
line = line.strip()
return line
class Da... | 24.106383 | 85 | 0.579876 | 955 | 0.842895 | 0 | 0 | 100 | 0.088261 | 0 | 0 | 3 | 0.002648 |
ac74f61ecc9c4ba33c87adf303e2474d5cc2e06f | 10,003 | py | Python | lib/core_tools/tools.py | rocketcapital-ai/competition_submission | bb9663dfe17733cc7de841f48e9e2770d911c599 | [
"MIT"
] | 1 | 2022-02-12T08:38:42.000Z | 2022-02-12T08:38:42.000Z | lib/core_tools/tools.py | rocketcapital-ai/competition_submission | bb9663dfe17733cc7de841f48e9e2770d911c599 | [
"MIT"
] | null | null | null | lib/core_tools/tools.py | rocketcapital-ai/competition_submission | bb9663dfe17733cc7de841f48e9e2770d911c599 | [
"MIT"
] | null | null | null | import base58
import datetime
import json
import os
import pandas as pd
import requests
import shutil
import time
import web3
import yaml
from Crypto.Cipher import AES, PKCS1_OAEP
from Crypto.PublicKey import RSA
from Crypto.Random import get_random_bytes
from decimal import Decimal
from typing import Any, Callable
fro... | 41.853556 | 148 | 0.674298 | 119 | 0.011896 | 0 | 0 | 0 | 0 | 0 | 0 | 1,734 | 0.173348 |
ac75e12c17c4b689ad5e95e21f9b92a7a82c808e | 2,108 | py | Python | my_loc/__init__.py | PIYUSH-GEEK/my_loc | 777eeefec3bc29f03c1be956037c10bf8457dfc9 | [
"MIT"
] | 1 | 2019-08-18T07:06:36.000Z | 2019-08-18T07:06:36.000Z | my_loc/__init__.py | PIYUSH-GEEK/my_loc | 777eeefec3bc29f03c1be956037c10bf8457dfc9 | [
"MIT"
] | null | null | null | my_loc/__init__.py | PIYUSH-GEEK/my_loc | 777eeefec3bc29f03c1be956037c10bf8457dfc9 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
def locate(i):
my_loc = requests.get('https://ipinfo.io').json()
if str(i).isdigit():
return 'Invalid input. Try a string.'
else:
if i == 'ip':
return my_loc['ip']
elif i == 'city' or i == 'capital':
return my_loc['city']
elif i == 'region' or i == 'stat... | 22.913043 | 80 | 0.624763 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 639 | 0.303131 |
ac7655238bec5c95a9a31d91cc90421f9c35aee8 | 1,045 | py | Python | Python3/03_Longest_Substring_Without_Repeating_Characters.py | yangjiahao106/LeetCode | c30ba0ef06f444951f7ab8eee495ac43613d7f4f | [
"RSA-MD"
] | 1 | 2018-04-28T09:07:11.000Z | 2018-04-28T09:07:11.000Z | Python3/03_Longest_Substring_Without_Repeating_Characters.py | yangjiahao106/LeetCode | c30ba0ef06f444951f7ab8eee495ac43613d7f4f | [
"RSA-MD"
] | 1 | 2018-02-24T16:26:30.000Z | 2018-02-24T16:26:44.000Z | Python3/03_Longest_Substring_Without_Repeating_Characters.py | yangjiahao106/LeetCode | c30ba0ef06f444951f7ab8eee495ac43613d7f4f | [
"RSA-MD"
] | null | null | null | #! python3
# __author__ = "YangJiaHao"
# date: 2018/1/26
class Solution:
def lengthOfLongestSubstring(self, s: str) -> int:
d = dict()
l, r = 0, 0
res = 0
while r < len(s):
if s[r] not in d:
d[s[r]] = None
r += 1
res = max(... | 23.222222 | 56 | 0.453589 | 853 | 0.816268 | 0 | 0 | 0 | 0 | 0 | 0 | 128 | 0.122488 |
ac78bb16539f516e7b674abcc8a2e5d7d2d059dd | 2,636 | py | Python | youwol/backends/cdn/resources_initialization.py | youwol/py-youwol | 85a8877e302c9da1aea168bf1d964d19036c1134 | [
"MIT"
] | null | null | null | youwol/backends/cdn/resources_initialization.py | youwol/py-youwol | 85a8877e302c9da1aea168bf1d964d19036c1134 | [
"MIT"
] | 1 | 2022-03-14T09:40:15.000Z | 2022-03-14T09:40:15.000Z | youwol/backends/cdn/resources_initialization.py | youwol/py-youwol | 85a8877e302c9da1aea168bf1d964d19036c1134 | [
"MIT"
] | null | null | null | import asyncio
import os
from youwol_utils import WhereClause, QueryBody, Query, Path, flatten
from .configurations import Configuration
from .utils import format_download_form, post_storage_by_chunk, md5_from_folder
from .utils_indexing import format_doc_db_record, post_indexes, get_version_number_str
async def in... | 42.516129 | 115 | 0.685129 | 0 | 0 | 0 | 0 | 0 | 0 | 2,324 | 0.881639 | 350 | 0.132777 |
ac79385f0f5c532c4496afb0999dcc78d78a4e70 | 174 | py | Python | Python32/hackeandoface3.py | andersonsilvade/python_C | ffc00184883089f1c2d9b8a6c32503b2c8b8d035 | [
"MIT"
] | null | null | null | Python32/hackeandoface3.py | andersonsilvade/python_C | ffc00184883089f1c2d9b8a6c32503b2c8b8d035 | [
"MIT"
] | null | null | null | Python32/hackeandoface3.py | andersonsilvade/python_C | ffc00184883089f1c2d9b8a6c32503b2c8b8d035 | [
"MIT"
] | 1 | 2020-11-04T08:36:28.000Z | 2020-11-04T08:36:28.000Z | import urllib.request
import json
url = 'http://graph.facebook.com/fmasanori'
resp = urllib.request.urlopen(url).read()
data = json.loads(resp.decode('utf-8'))
print(data)
| 19.333333 | 43 | 0.735632 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.252874 |
ac79cb182a550452c6328b4a381ff03422af574d | 1,769 | py | Python | oasislmf/cli/admin.py | fl-ndaq/OasisLMF | 921718bfad2eb12844960df7f7330284d4e0bedc | [
"BSD-3-Clause"
] | 88 | 2018-03-24T11:57:10.000Z | 2022-03-21T13:04:41.000Z | oasislmf/cli/admin.py | fl-ndaq/OasisLMF | 921718bfad2eb12844960df7f7330284d4e0bedc | [
"BSD-3-Clause"
] | 558 | 2018-03-14T14:16:30.000Z | 2022-03-29T12:48:14.000Z | oasislmf/cli/admin.py | fl-ndaq/OasisLMF | 921718bfad2eb12844960df7f7330284d4e0bedc | [
"BSD-3-Clause"
] | 41 | 2018-04-09T11:13:12.000Z | 2021-10-05T14:43:11.000Z | __all__ = [
'AdminCmd',
'CreateComplexModelCmd',
'CreateSimpleModelCmd',
'EnableBashCompleteCmd',
]
from argparse import RawDescriptionHelpFormatter
from .command import OasisBaseCommand, OasisComputationCommand
class EnableBashCompleteCmd(OasisComputationCommand):
"""
Adds required command ... | 30.5 | 76 | 0.70944 | 1,524 | 0.861504 | 0 | 0 | 0 | 0 | 0 | 0 | 1,045 | 0.590729 |
ac7ad18388f99ac970094896775d9050ae74ed49 | 1,802 | py | Python | examples/spend_non_std_tx.py | kanzure/python-bitcoin-utils | a75b470676edb70bd71cb6a57e7e86f78ccc63ce | [
"MIT"
] | null | null | null | examples/spend_non_std_tx.py | kanzure/python-bitcoin-utils | a75b470676edb70bd71cb6a57e7e86f78ccc63ce | [
"MIT"
] | null | null | null | examples/spend_non_std_tx.py | kanzure/python-bitcoin-utils | a75b470676edb70bd71cb6a57e7e86f78ccc63ce | [
"MIT"
] | null | null | null | # Copyright (C) 2018 The python-bitcoin-utils developers
#
# This file is part of python-bitcoin-utils
#
# It is subject to the license terms in the LICENSE file found in the top-level
# directory of this distribution.
#
# No part of python-bitcoin-utils, including this file, may be copied,
# modified,
# propagated, or... | 34.653846 | 89 | 0.743618 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,287 | 0.714206 |
ac7e3f648dd1532e3a366df0f18eb0ba06867a86 | 801 | py | Python | src/nutman_field_names.py | hudsonburgess/nutcracker | 2533d7659873d1ec75beb251f941e8a90bdebb89 | [
"MIT"
] | null | null | null | src/nutman_field_names.py | hudsonburgess/nutcracker | 2533d7659873d1ec75beb251f941e8a90bdebb89 | [
"MIT"
] | null | null | null | src/nutman_field_names.py | hudsonburgess/nutcracker | 2533d7659873d1ec75beb251f941e8a90bdebb89 | [
"MIT"
] | null | null | null | def get_field_name_from_line(line):
return line.split(':')[1].strip()
def remove_description(line):
if '-' in line:
return line.split('-')[0].strip()
else:
return line
def split_multiple_field_names(line):
if ',' in line:
field_names = line.split(',')
return map(lambda ... | 27.62069 | 64 | 0.627965 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 0.108614 |
ac7e4bb5b2639e3ce5fc5958996d880251838bdd | 317 | py | Python | setup.py | algerbrex/plex | 0d7096634d13ee4d695b580892894910eba6a4eb | [
"MIT"
] | 2 | 2018-02-15T16:26:54.000Z | 2021-11-08T12:26:12.000Z | setup.py | algerbrex/plex | 0d7096634d13ee4d695b580892894910eba6a4eb | [
"MIT"
] | null | null | null | setup.py | algerbrex/plex | 0d7096634d13ee4d695b580892894910eba6a4eb | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(
name='plex',
version='0.1.0',
author='Christian Dean',
author_email='[email protected]',
packages=['plex'],
license='MIT',
platforms='any',
description='Generic, lighweight regex based lexer.',
long_description=open('README.md').read(),
)
| 21.133333 | 57 | 0.649842 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 0.362776 |
ac8080a2e2bb7b553d1d31e52508d8e6de00b522 | 595 | py | Python | kwikposts/admin.py | Vicynet/kwiktalk | 198efdd5965cc0cd3ee8dcf5e469d9022330ec25 | [
"bzip2-1.0.6"
] | null | null | null | kwikposts/admin.py | Vicynet/kwiktalk | 198efdd5965cc0cd3ee8dcf5e469d9022330ec25 | [
"bzip2-1.0.6"
] | null | null | null | kwikposts/admin.py | Vicynet/kwiktalk | 198efdd5965cc0cd3ee8dcf5e469d9022330ec25 | [
"bzip2-1.0.6"
] | null | null | null | from django.contrib import admin
from .models import KwikPost, Comment, Like
# Register your models here.
@admin.register(KwikPost)
class KwikPostAdmin(admin.ModelAdmin):
list_display = ['user', 'featured_image', 'slug', 'post_body', 'created_at']
list_filter = ['created_at']
prepopulated_fields = {'slug... | 25.869565 | 80 | 0.710924 | 405 | 0.680672 | 0 | 0 | 478 | 0.803361 | 0 | 0 | 178 | 0.29916 |
ac82ebe59874721741e7d60b6d0389e4f4666104 | 3,113 | py | Python | solvebio/resource/solveobject.py | PolinaBevad/solvebio-python | f6c736baa01b5a868a385cb0baf8f9dc2007cec3 | [
"MIT"
] | 14 | 2015-01-07T15:31:00.000Z | 2021-11-02T10:03:28.000Z | solvebio/resource/solveobject.py | PolinaBevad/solvebio-python | f6c736baa01b5a868a385cb0baf8f9dc2007cec3 | [
"MIT"
] | 200 | 2015-01-26T17:12:21.000Z | 2022-01-14T08:59:30.000Z | solvebio/resource/solveobject.py | PolinaBevad/solvebio-python | f6c736baa01b5a868a385cb0baf8f9dc2007cec3 | [
"MIT"
] | 9 | 2015-02-18T22:49:28.000Z | 2020-09-01T17:48:35.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import six
import sys
from ..client import client
from .util import json
def convert_to_solve_object(resp, **kwargs):
from . import types
_client = kwargs.pop('client', None)
if isinstance(resp, list):
return [convert_to_solve_obje... | 28.3 | 73 | 0.603919 | 2,369 | 0.761002 | 0 | 0 | 302 | 0.097013 | 0 | 0 | 317 | 0.101831 |