hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | 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 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
54c2080e5645618306574034c2f0f322d70362eb | 1,573 | py | Python | mergedataset.py | yecfly/DEPRESSIONEST | 21b72906aac9f310e264f7a5eea348480a647197 | [
"Unlicense"
] | null | null | null | mergedataset.py | yecfly/DEPRESSIONEST | 21b72906aac9f310e264f7a5eea348480a647197 | [
"Unlicense"
] | null | null | null | mergedataset.py | yecfly/DEPRESSIONEST | 21b72906aac9f310e264f7a5eea348480a647197 | [
"Unlicense"
] | null | null | null | import time
import DataSetPrepare as DSP
datalist=[]
#dfile='./Datasets/D10_CKplus_10groups_groupedbythe_CKplus-group-details_preprocessdata_with_calibRotation_rescaleimg_geometricfeatures_facepatches_weberface_skip-contempV2.pkl'
#datalist.append(dfile)
#dfile='./Datasets/D33_KDEF_10G_rescaleimg_geometryfeature... | 43.694444 | 178 | 0.830896 | import os, pickle, time, sys, traceback
import DataSetPrepare as DSP
datalist=[]
#dfile='./Datasets/D10_CKplus_10groups_groupedbythe_CKplus-group-details_preprocessdata_with_calibRotation_rescaleimg_geometricfeatures_facepatches_weberface_skip-contempV2.pkl'
#datalist.append(dfile)
#dfile='./Datasets/D33_KDEF_10... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0 |
637b1a66ab7ccaa84634ce06e0fafc07547a4c82 | 695 | py | Python | tests.py | GitHistoryDigger/multibranch | 9eb9d80f358538df8c43eb986b3c7b7047be8756 | [
"MIT"
] | null | null | null | tests.py | GitHistoryDigger/multibranch | 9eb9d80f358538df8c43eb986b3c7b7047be8756 | [
"MIT"
] | null | null | null | tests.py | GitHistoryDigger/multibranch | 9eb9d80f358538df8c43eb986b3c7b7047be8756 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The tests."""
| 26.730769 | 68 | 0.471942 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The tests."""
from unittest import TestCase
from fzbz import FizzBuzz
class FzBzTest(TestCase):
"""Fizz Buzz Test."""
def setUp(self):
"""Setup."""
self.obj = FizzBuzz()
def test_num(self):
"""The return value should be based of F... | 0 | 0 | 0 | 551 | 0 | 0 | 0 | 12 | 68 |
7cbed2da338d7fbd8abddd673accd3d3819c36d7 | 8,007 | py | Python | firexkit/chain.py | FireXStuff/firexk | e00907691bdfd39981dd7c10314972241f759ee1 | [
"BSD-3-Clause"
] | 3 | 2019-01-11T22:58:14.000Z | 2019-09-17T18:18:16.000Z | firexkit/chain.py | FireXStuff/firexk | e00907691bdfd39981dd7c10314972241f759ee1 | [
"BSD-3-Clause"
] | 4 | 2019-02-07T21:07:56.000Z | 2022-01-06T22:33:34.000Z | firexkit/chain.py | FireXStuff/firexkit | e00907691bdfd39981dd7c10314972241f759ee1 | [
"BSD-3-Clause"
] | null | null | null | import inspect
from inspect import signature, getfullargspec
from celery.canvas import Signature
from celery.utils.log import get_task_logger
from firexkit.bag_of_goodies import BagOfGoodies
from firexkit.task import parse_signature, FireXTask, undecorate, ReturnsCodingException, get_attr_unwrapped
logger = get_task_... | 34.965066 | 114 | 0.659548 | import inspect
from inspect import signature, getfullargspec
from functools import wraps
from typing import Union
from celery.canvas import chain, Signature
from celery.local import PromiseProxy
from celery.result import AsyncResult
from celery.utils.log import get_task_logger
from firexkit.result import wait_on_asyn... | 0 | 205 | 0 | 692 | 0 | 1,953 | 0 | 92 | 276 |
02d4055328774f4b18373ca4cc802f8e80a90b34 | 6,366 | py | Python | src/tweetengine/model.py | Arachnid/tweetengine | 2e111a8cfb5316c868f644a10536e25edca9a179 | [
"Apache-2.0"
] | 2 | 2017-09-03T20:55:23.000Z | 2020-05-31T17:07:57.000Z | src/tweetengine/model.py | Arachnid/tweetengine | 2e111a8cfb5316c868f644a10536e25edca9a179 | [
"Apache-2.0"
] | null | null | null | src/tweetengine/model.py | Arachnid/tweetengine | 2e111a8cfb5316c868f644a10536e25edca9a179 | [
"Apache-2.0"
] | null | null | null | from tweetengine.i18n import _
ROLE_ANYONE = 0
ROLE_USER = 1
ROLE_ADMINISTRATOR = 2
ROLES = [
(ROLE_ANYONE, _("Anyone")),
(ROLE_USER, _("User")),
(ROLE_ADMINISTRATOR, _("Administrator"))
]
ROLE_IDS = [id for id,name in ROLES]
| 32.151515 | 84 | 0.635407 | import datetime
import time
from google.appengine.api import urlfetch
from google.appengine.api.labs import taskqueue
from google.appengine.ext import db
from google.appengine.ext.db import polymodel
from tweetengine import oauth
from tweetengine.i18n import _
class UserAccount(polymodel.PolyModel):
def get_usern... | 0 | 1,113 | 0 | 4,312 | 0 | 272 | 0 | 76 | 339 |
d3db459d0a2ed54062bd6a03184579f6b9684a06 | 5,943 | py | Python | tools/utilities/pythonlibs/audio/training/make_training_list.py | dashesy/ELL | b4a2b852fc0479d8f0854b1133ee324e14c66bf8 | [
"MIT"
] | null | null | null | tools/utilities/pythonlibs/audio/training/make_training_list.py | dashesy/ELL | b4a2b852fc0479d8f0854b1133ee324e14c66bf8 | [
"MIT"
] | null | null | null | tools/utilities/pythonlibs/audio/training/make_training_list.py | dashesy/ELL | b4a2b852fc0479d8f0854b1133ee324e14c66bf8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
###################################################################################################
#
# Project: Embedded Learning Library (ELL)
# File: make_training_list.py
# Authors: Chris Lovett
#
# Requires: Python 3.x
#
#############################################################... | 34.352601 | 117 | 0.604913 | #!/usr/bin/env python3
###################################################################################################
#
# Project: Embedded Learning Library (ELL)
# File: make_training_list.py
# Authors: Chris Lovett
#
# Requires: Python 3.x
#
#############################################################... | 0 | 0 | 0 | 0 | 0 | 1,005 | 0 | 0 | 115 |
9065db250c8ed5f5e06d1a4881dfa2624929cdfc | 27,792 | py | Python | tests/opencl/test_update_statuses_kernel.py | manluow/RAMP-UA | 45ddd280b16c81c42431a61121a8e0cdb941c4f4 | [
"MIT"
] | null | null | null | tests/opencl/test_update_statuses_kernel.py | manluow/RAMP-UA | 45ddd280b16c81c42431a61121a8e0cdb941c4f4 | [
"MIT"
] | null | null | null | tests/opencl/test_update_statuses_kernel.py | manluow/RAMP-UA | 45ddd280b16c81c42431a61121a8e0cdb941c4f4 | [
"MIT"
] | null | null | null |
nplaces = 8
npeople = 50000
nslots = 8
| 43.222395 | 112 | 0.787457 | import numpy as np
from matplotlib import pyplot as plt
import scipy.stats
from microsim.opencl.ramp.params import Params
from microsim.opencl.ramp.simulator import Simulator
from microsim.opencl.ramp.snapshot import Snapshot
from microsim.opencl.ramp.disease_statuses import DiseaseStatus
nplaces = 8
npeople = 50000
n... | 0 | 0 | 0 | 0 | 0 | 27,126 | 0 | 136 | 476 |
8034452f95fd18ccdac09ca778179ad9c4e7fbce | 3,474 | py | Python | chef_validator/tests/unit/clients/test_glance_client.py | ging/fi-ware-chef_validator | eaeb72801f3f2dba7f933740b033687dcb02e5c8 | [
"Apache-2.0"
] | 1 | 2015-08-27T08:49:28.000Z | 2015-08-27T08:49:28.000Z | chef_validator/tests/unit/clients/test_glance_client.py | ging/fiware-chef_validator | eaeb72801f3f2dba7f933740b033687dcb02e5c8 | [
"Apache-2.0"
] | null | null | null | chef_validator/tests/unit/clients/test_glance_client.py | ging/fiware-chef_validator | eaeb72801f3f2dba7f933740b033687dcb02e5c8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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 ... | 38.175824 | 76 | 0.681635 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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 ... | 0 | 0 | 0 | 2,403 | 0 | 0 | 0 | 119 | 134 |
e20b6ca1ff328d0294cf0c005e0d57809d34ef75 | 10,494 | py | Python | osint/seek-leak/seek-leak.py | skateforever/pentest-scripts | 7adc08af2bdf4801bc20a0c6f578cc8a417b2712 | [
"MIT"
] | 18 | 2020-06-03T02:06:43.000Z | 2022-03-22T01:29:09.000Z | osint/seek-leak/seek-leak.py | skateforever/pentest-scripts | 7adc08af2bdf4801bc20a0c6f578cc8a417b2712 | [
"MIT"
] | 11 | 2020-03-16T22:27:45.000Z | 2021-12-15T10:03:03.000Z | osint/seek-leak/seek-leak.py | skateforever/pentest-scripts | 7adc08af2bdf4801bc20a0c6f578cc8a417b2712 | [
"MIT"
] | 6 | 2020-07-11T19:37:06.000Z | 2022-03-28T13:42:56.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
import sys
# Colors
green = '\033[32m'
red = '\033[31m'
reset = '\033[0m'
yellow = '\033[33m'
banner = """
... | 49.037383 | 102 | 0.487993 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
import re
import socket
import sys
# Colors
from argparse import Namespace
green = '\033[32m'
red = '\033[31m'
reset = '\033[0m'
yellow = '\033[33m'
banner = """
██████ ▓█████ ▓█████ ██ ▄█▀ ██▓ ▓█████ ▄▄▄ ██ ▄█▀
▒██ ▒ ▓█ ▀ ▓█ ... | 942 | 0 | 0 | 0 | 0 | 8,876 | 0 | 59 | 219 |
1394d09693b613c70face0e83170631b221b95ff | 18,746 | py | Python | surface_distance/lookup_tables.py | taznux/surface-distance | 6225355f2a6111479d39ce8260a9db3d506c11b6 | [
"Apache-2.0"
] | 3 | 2022-01-18T19:25:46.000Z | 2022-02-05T18:53:24.000Z | surface_distance/lookup_tables.py | taznux/surface-distance | 6225355f2a6111479d39ce8260a9db3d506c11b6 | [
"Apache-2.0"
] | null | null | null | surface_distance/lookup_tables.py | taznux/surface-distance | 6225355f2a6111479d39ce8260a9db3d506c11b6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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 ... | 66.007042 | 101 | 0.428998 | # Copyright 2018 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 ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
facce2690a51d8bb88db15bf7b483d978bb4ab36 | 5,434 | py | Python | keras_tuner.py | newcodevelop/DL-Adventures | 76d4fcaf7c7b53cb1a2241a03d6d32bcd4406e92 | [
"MIT"
] | null | null | null | keras_tuner.py | newcodevelop/DL-Adventures | 76d4fcaf7c7b53cb1a2241a03d6d32bcd4406e92 | [
"MIT"
] | null | null | null | keras_tuner.py | newcodevelop/DL-Adventures | 76d4fcaf7c7b53cb1a2241a03d6d32bcd4406e92 | [
"MIT"
] | 1 | 2020-08-04T15:22:37.000Z | 2020-08-04T15:22:37.000Z | # -*- coding: utf-8 -*-
!pip uninstall tensorflow
!pip install tensorflow-gpu==2.0.0
!pip install keras-tuner==1.0.0 --no-dependencies
!pip install terminaltables colorama
import tensorflow as tf
import kerastuner as kt
import matplotlib.pyplot as plt
(train_images, train_labels), (test_images, test_labels) =\
... | 31.593023 | 100 | 0.647957 | # -*- coding: utf-8 -*-
!pip uninstall tensorflow
!pip install tensorflow-gpu==2.0.0
!pip install keras-tuner==1.0.0 --no-dependencies
!pip install terminaltables colorama
import tensorflow as tf
import kerastuner as kt
import matplotlib.pyplot as plt
(train_images, train_labels), (test_images, test_labels) =\
... | 0 | 390 | 0 | 3,014 | 0 | 66 | 0 | 0 | 116 |
79c92f9c2d73536cf58ec055fd4f77c5b661cbba | 2,056 | py | Python | src/preprocessing/config.py | varunnathan/NLP | 4183fed8105c6986d2471fc87129054e7a47d0f8 | [
"MIT"
] | null | null | null | src/preprocessing/config.py | varunnathan/NLP | 4183fed8105c6986d2471fc87129054e7a47d0f8 | [
"MIT"
] | null | null | null | src/preprocessing/config.py | varunnathan/NLP | 4183fed8105c6986d2471fc87129054e7a47d0f8 | [
"MIT"
] | null | null | null | LOCAL_DATA_ROOT = '/Users/varunn/Documents/projects/Sentence_Embeddings/'
INP_PATH = LOCAL_DATA_ROOT + 'raw_data/'
INT_PATH = LOCAL_DATA_ROOT + 'inter_data/'
PRE_PATH = LOCAL_DATA_ROOT + 'preprocessed_data/'
MODEL_PATH = LOCAL_DATA_ROOT + 'modelling/'
RESULTS_PATH = LOCAL_DATA_ROOT + 'results/'
INP_TICKETS_FN = INP_PAT... | 28.957746 | 81 | 0.718385 | LOCAL_DATA_ROOT = '/Users/varunn/Documents/projects/Sentence_Embeddings/'
INP_PATH = LOCAL_DATA_ROOT + 'raw_data/'
INT_PATH = LOCAL_DATA_ROOT + 'inter_data/'
PRE_PATH = LOCAL_DATA_ROOT + 'preprocessed_data/'
MODEL_PATH = LOCAL_DATA_ROOT + 'modelling/'
RESULTS_PATH = LOCAL_DATA_ROOT + 'results/'
INP_TICKETS_FN = INP_PAT... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b925f16e10230bea2c43f15d825d3146909e7b2c | 16,094 | py | Python | pse/dm_control/utils/env_utils.py | pedersor/google-research | 6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6 | [
"Apache-2.0"
] | null | null | null | pse/dm_control/utils/env_utils.py | pedersor/google-research | 6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6 | [
"Apache-2.0"
] | null | null | null | pse/dm_control/utils/env_utils.py | pedersor/google-research | 6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 35.844098 | 80 | 0.739095 | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 0 | 13,406 | 0 | 0 | 0 | 0 | 0 | 115 | 357 |
0e9bb0d47c6df249c7d70ec86c2ef9cb3a6ebbb5 | 3,328 | py | Python | ad-joining/register-computer/kerberos/password.py | jeremyje/gce-automated-ad-join | 28c1ef58fedb18752683c3f61bf6fa06cc5892f4 | [
"Apache-2.0"
] | 4 | 2020-01-30T09:45:57.000Z | 2021-10-09T03:09:01.000Z | ad-joining/register-computer/kerberos/password.py | jeremyje/gce-automated-ad-join | 28c1ef58fedb18752683c3f61bf6fa06cc5892f4 | [
"Apache-2.0"
] | 16 | 2020-07-30T14:50:56.000Z | 2022-01-11T17:24:25.000Z | ad-joining/register-computer/kerberos/password.py | jeremyje/gce-automated-ad-join | 28c1ef58fedb18752683c3f61bf6fa06cc5892f4 | [
"Apache-2.0"
] | 9 | 2020-08-06T11:58:17.000Z | 2021-10-09T03:08:51.000Z | #
# Copyright 2019 Google LLC
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 ... | 32.627451 | 132 | 0.672476 | #
# Copyright 2019 Google LLC
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 ... | 0 | 0 | 0 | 2,403 | 0 | 0 | 0 | -29 | 135 |
d975243f07d914c6bdc558254af84a6224c99789 | 1,185 | py | Python | elpis/test/test_model.py | guillaume-wisniewski/elpis | 550c350fd0098751b9a502a253bc4066f15c47db | [
"Apache-2.0"
] | 118 | 2018-11-25T22:00:11.000Z | 2022-03-18T10:18:33.000Z | elpis/test/test_model.py | guillaume-wisniewski/elpis | 550c350fd0098751b9a502a253bc4066f15c47db | [
"Apache-2.0"
] | 189 | 2019-01-25T01:37:59.000Z | 2022-02-16T02:31:23.000Z | elpis/test/test_model.py | guillaume-wisniewski/elpis | 550c350fd0098751b9a502a253bc4066f15c47db | [
"Apache-2.0"
] | 34 | 2018-11-28T20:31:38.000Z | 2022-01-27T12:20:59.000Z |
def test_model_training(pipeline_upto_step_1):
"""
Test training the model
"""
kaldi, ds = pipeline_upto_step_1
pd = kaldi.new_pron_dict('pron_dict_y')
pd.link(ds)
pd.set_l2s_path('/recordings/letter_to_sound.txt')
pd.generate_lexicon()
m = kaldi.new_model('model_z')
m.link(ds,... | 25.76087 | 95 | 0.674262 | import pytest
from elpis.wrappers.objects.interface import KaldiInterface
@pytest.fixture
def pipeline_upto_step_1(tmpdir):
"""
PyTest Fixture: returns a pipeline that executes once per session up to step 1.
"""
# Step 0
# ======
# Create a Kaldi interface directory (where all the associated ... | 0 | 535 | 0 | 0 | 0 | 0 | 0 | 30 | 68 |
366b38c3b778f81d2b1774b20dd1eb950f229b52 | 1,379 | py | Python | member_manager/tests/availability.py | 4sfc/django-member-manager | b9ad955786b6ac7253f0d07d8784ff5b5d3371f8 | [
"MIT"
] | null | null | null | member_manager/tests/availability.py | 4sfc/django-member-manager | b9ad955786b6ac7253f0d07d8784ff5b5d3371f8 | [
"MIT"
] | 21 | 2020-07-29T18:43:23.000Z | 2020-10-23T02:46:07.000Z | member_manager/tests/availability.py | 4sfc/django-member-manager | b9ad955786b6ac7253f0d07d8784ff5b5d3371f8 | [
"MIT"
] | null | null | null | """AvailabilityTest class"""
| 41.787879 | 77 | 0.478608 | """AvailabilityTest class"""
from django.contrib.auth.models import User
from django.test import TestCase
from member_manager.models import Availability
from member_manager.models import Profile
class AvailabilityTest(TestCase):
"""Test Availability model"""
@classmethod
def setUpTestData(cls):
... | 0 | 526 | 0 | 632 | 0 | 0 | 0 | 78 | 113 |
419fd05fe1c60f9a3396a7634f44c4ad51453e94 | 16,494 | py | Python | tests/film_model.py | BaptisteLefebvre/pyalp | 05cb8ff9e66f95ed9c70a8ab8a91c78794f7350a | [
"MIT"
] | 1 | 2020-11-09T09:23:11.000Z | 2020-11-09T09:23:11.000Z | tests/film_model.py | BaptisteLefebvre/pyalp | 05cb8ff9e66f95ed9c70a8ab8a91c78794f7350a | [
"MIT"
] | null | null | null | tests/film_model.py | BaptisteLefebvre/pyalp | 05cb8ff9e66f95ed9c70a8ab8a91c78794f7350a | [
"MIT"
] | 1 | 2020-11-09T09:23:19.000Z | 2020-11-09T09:23:19.000Z | # /* BitCompression
# This sample is provided as-is, without any warranty.
#
# (c) 2007 ViALUX GmbH. All rights reserved.
# */
#
# // BlackWhiteSample.cpp : Defines the entry point for the console application.
# //
#
# #include <TCHAR.h>
# #include <windows.h>
# #include <conio.h>
# #include <stdio.h>
# #include <stdli... | 28.05102 | 159 | 0.587789 | # /* BitCompression
# This sample is provided as-is, without any warranty.
#
# (c) 2007 ViALUX GmbH. All rights reserved.
# */
#
# // BlackWhiteSample.cpp : Defines the entry point for the console application.
# //
#
# #include <TCHAR.h>
# #include <windows.h>
# #include <conio.h>
# #include <stdio.h>
# #include <stdli... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
16c038ca9e1bb6afd758d6fec4f738a2eedd0e7b | 1,128 | py | Python | KartAI/Controls.py | eritzyg/KartAI | 5c49ca29148aea19f80d6635b0799d0d32b9c053 | [
"MIT"
] | 10 | 2017-10-18T21:20:16.000Z | 2020-04-07T17:02:55.000Z | KartAI/Controls.py | Garnica1999/Self-Driving-Car-Reinforcement-Learning | f7f5d2e7ce912f708a1c82fb40bb0d8b645ecb8a | [
"MIT"
] | null | null | null | KartAI/Controls.py | Garnica1999/Self-Driving-Car-Reinforcement-Learning | f7f5d2e7ce912f708a1c82fb40bb0d8b645ecb8a | [
"MIT"
] | 5 | 2017-10-18T21:12:27.000Z | 2020-04-17T08:44:57.000Z | # KartAI https://github.com/eritzyg/KartAI/
# Copyright (c) 2017 Eritz Yerga Gutierrez and Iker Garca Ferrero
# MIT License https://github.com/eritzyg/KartAI/blob/master/LICENSE | 26.857143 | 67 | 0.653369 | # KartAI https://github.com/eritzyg/KartAI/
# Copyright (c) 2017 Eritz Yerga Gutierrez and Iker García Ferrero
# MIT License https://github.com/eritzyg/KartAI/blob/master/LICENSE
import Global as glv
import Player as player
import TrackManager as tm
import Timer as timer
import Points as points
def turnLeft():
if... | 2 | 0 | 0 | 0 | 0 | 705 | 0 | 7 | 238 |
045b5d6e14d47c33554f39fd440f545aac334083 | 6,213 | py | Python | test.py | ChetWei/yolov3_pytorch | bfdac113c8c458790bff48466df1a6d662e3bd41 | [
"MIT"
] | 1 | 2021-12-17T14:34:13.000Z | 2021-12-17T14:34:13.000Z | test.py | ChetWei/yolov3_pytorch | bfdac113c8c458790bff48466df1a6d662e3bd41 | [
"MIT"
] | null | null | null | test.py | ChetWei/yolov3_pytorch | bfdac113c8c458790bff48466df1a6d662e3bd41 | [
"MIT"
] | 1 | 2021-12-17T14:34:15.000Z | 2021-12-17T14:34:15.000Z | # -*- coding: utf-8 -*-
import tqdm
import torch
from torch.autograd import Variable
import numpy as np
from utils.util import xywh2xyxy, non_max_suppression, get_batch_statistics, ap_per_class
#
#
def _evaluate(model, dataloader, class_names, img_size, iou_thres, conf_thres, nms_thres, verbose, device):
... | 36.333333 | 117 | 0.68067 | # -*- coding: utf-8 -*-
import argparse
import tqdm
import torch
from torch.utils.data import DataLoader
from torch.autograd import Variable
import numpy as np
import yaml
from terminaltables import AsciiTable
from models.Yolo3Body import YOLOV3
from utils.util import xywh2xyxy, non_max_suppression, get_batch_stat... | 339 | 0 | 0 | 0 | 0 | 3,442 | 0 | 75 | 223 |
9ae544722a4952573427811c9f33c38828daf98f | 7,250 | py | Python | functions/todo.py | knightelvis/teambot | fc25f528b51ee820b572c73bb978ba32cbf60876 | [
"BSD-2-Clause"
] | null | null | null | functions/todo.py | knightelvis/teambot | fc25f528b51ee820b572c73bb978ba32cbf60876 | [
"BSD-2-Clause"
] | null | null | null | functions/todo.py | knightelvis/teambot | fc25f528b51ee820b572c73bb978ba32cbf60876 | [
"BSD-2-Clause"
] | null | null | null | import datetime as dt
import functions.models as models
#import sys
def create_task(from_user, from_user_id,
owner, content, priority=3):
'''
Create a task with given params.
'''
models.database.connect()
db_task = models.Task.create(from_user = from_user,
from_us... | 27.992278 | 76 | 0.522897 | import datetime as dt
import random
import functions.models as models
#import sys
def is_valid_task_index(task_num, indices):
return all((index >= 1) and
(index <= task_num)
for index in indices)
def create_task(from_user, from_user_id,
owner, content, priority=3):
... | 0 | 0 | 0 | 4,400 | 0 | 657 | 0 | -8 | 160 |
5d29c43217d2da5336d97d31d5e11e9b2aa49314 | 1,046 | py | Python | Chapter 09/9.02_lock_demo.py | ACsBlack/Tkinter-GUI-Application-Development-Blueprints-Second-Edition | c6a045fbf5ba3ece5e8a02bbe33ac13bb57b2b8e | [
"MIT"
] | 120 | 2018-03-04T07:17:00.000Z | 2022-01-25T08:09:57.000Z | Chapter 09/9.02_lock_demo.py | ACsBlack/Tkinter-GUI-Application-Development-Blueprints-Second-Edition | c6a045fbf5ba3ece5e8a02bbe33ac13bb57b2b8e | [
"MIT"
] | 3 | 2019-03-24T09:32:43.000Z | 2020-07-28T07:35:49.000Z | Chapter 09/9.02_lock_demo.py | ACsBlack/Tkinter-GUI-Application-Development-Blueprints-Second-Edition | c6a045fbf5ba3ece5e8a02bbe33ac13bb57b2b8e | [
"MIT"
] | 81 | 2018-04-18T06:51:46.000Z | 2022-03-30T01:31:35.000Z | """
Code illustration: 9.02
Lock Demo
Tkinter GUI Application Development Blueprints
"""
if __name__ == "__main__":
for i in range(100):
LockDemo()
| 24.325581 | 72 | 0.600382 | """
Code illustration: 9.02
Lock Demo
Tkinter GUI Application Development Blueprints
"""
import threading
class LockDemo():
def __init__(self):
self.shared_var = 0
self.total_count = 100000
self.lock = threading.Lock()
self.demo_of_lock_to_avoid_race_condition()
def incr... | 0 | 0 | 0 | 839 | 0 | 0 | 0 | -5 | 46 |
4e317bb16ab4c4726c2e00a8ecc565e100aa6ca0 | 75 | py | Python | tables/shiftLeftTable.py | pangqianjin/py-des | 75330f9f74a2e66ae9882d5dbf0e34fb5a9ab414 | [
"MIT"
] | null | null | null | tables/shiftLeftTable.py | pangqianjin/py-des | 75330f9f74a2e66ae9882d5dbf0e34fb5a9ab414 | [
"MIT"
] | null | null | null | tables/shiftLeftTable.py | pangqianjin/py-des | 75330f9f74a2e66ae9882d5dbf0e34fb5a9ab414 | [
"MIT"
] | null | null | null | shiftLeftTable = [
1, 1, 2, 2, 2, 2, 2, 2,
1, 2, 2, 2, 2, 2, 2, 1
] | 18.75 | 27 | 0.4 | shiftLeftTable = [
1, 1, 2, 2, 2, 2, 2, 2,
1, 2, 2, 2, 2, 2, 2, 1
] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fca21e622fd5b3beaa3970bb5a1cb7af43c8cad0 | 5,247 | py | Python | excel_output.py | xiaodongtidy/tools | 7555a955f65489f56e1568796c5f264cb9dff6c9 | [
"MIT"
] | null | null | null | excel_output.py | xiaodongtidy/tools | 7555a955f65489f56e1568796c5f264cb9dff6c9 | [
"MIT"
] | null | null | null | excel_output.py | xiaodongtidy/tools | 7555a955f65489f56e1568796c5f264cb9dff6c9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
if __name__ == '__main__':
with open('a.xls', 'wb') as fp:
a = DetailExcelOutput()
data_ = [
{'number': '1', 'status': 1, 'is_pay': False, 'details': [{'': '', '': 2}, {'': '', '': 4}]},
{'number': '2', 'status': 3, 'is_pay': T... | 38.29927 | 120 | 0.515342 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import io
from xlwt import *
class BaseExcelOutput:
"""
基础单表数据导出
"""
def run(self, data: [dict, dict], format_data: dict) -> bytes:
"""
:param data: example——[
{'number': '123', 'status': 1, 'is_pay': False},
... | 1,239 | 2,165 | 0 | 1,938 | 0 | 0 | 0 | -15 | 90 |
024fcd188d62dbbe3b60066e49ecae193201d391 | 3,637 | py | Python | src/main.py | whklwhkl/CenterNet | a87f1e972528081505f89c9ede4d3bdd9aadb2ce | [
"MIT"
] | null | null | null | src/main.py | whklwhkl/CenterNet | a87f1e972528081505f89c9ede4d3bdd9aadb2ce | [
"MIT"
] | null | null | null | src/main.py | whklwhkl/CenterNet | a87f1e972528081505f89c9ede4d3bdd9aadb2ce | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import torch
from opts import opts
# from apex import amp
PATIENT = 3
if __name__ == '__main__':
opt = opts().parse()
main(opt) | 32.473214 | 99 | 0.675832 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import _init_paths
import os
import torch
import torch.utils.data
from opts import opts
from models.model import create_model, load_model, save_model
from logger import Logger
from datasets.dataset_factory im... | 0 | 0 | 0 | 0 | 0 | 3,102 | 0 | 91 | 201 |
dc04bb9107acd8c90b00b3591f7df76c29f25f8a | 1,775 | py | Python | search/__init__.py | YangXuepei/ime-eval | e47d05e15aef9f10bf9e906f0622699fd1613db4 | [
"WTFPL"
] | null | null | null | search/__init__.py | YangXuepei/ime-eval | e47d05e15aef9f10bf9e906f0622699fd1613db4 | [
"WTFPL"
] | null | null | null | search/__init__.py | YangXuepei/ime-eval | e47d05e15aef9f10bf9e906f0622699fd1613db4 | [
"WTFPL"
] | null | null | null | # -*- coding:utf-8 -*-#
import gradient_descend_optimization as gd
import eval.eval_by_effort as ebe
import eval.layout as lyt
import time as timestamp
import process_layout as pl
#import genetic_optimization as gen
import simulated_annealing_optimization as sa
#import neural_network_optimization as nn
import sys
# p... | 29.583333 | 77 | 0.598873 | # -*- coding:utf-8 -*-#
import gradient_descend_optimization as gd
import eval.eval_by_effort as ebe
import eval.layout as lyt
import time as timestamp
import process_layout as pl
#import genetic_optimization as gen
import simulated_annealing_optimization as sa
#import neural_network_optimization as nn
import sys
# p... | 0 | 0 | 0 | 0 | 0 | 1,136 | 0 | 0 | 23 |
edc9a067daf242d5858b3b9bad7b8836b6035a7f | 195 | py | Python | lib/cfg.py | martj001/13fscrub | 1489395fd26520b146581a2a0b943b2b7e8bbe35 | [
"MIT"
] | null | null | null | lib/cfg.py | martj001/13fscrub | 1489395fd26520b146581a2a0b943b2b7e8bbe35 | [
"MIT"
] | null | null | null | lib/cfg.py | martj001/13fscrub | 1489395fd26520b146581a2a0b943b2b7e8bbe35 | [
"MIT"
] | null | null | null | URL_COMPANY_FILING_SEARCH = 'https://www.sec.gov/cgi-bin/browse-edgar?CIK=[cik]&action=getcompany'
URL_13F_QR_XML = 'https://www.sec.gov/Archives/edgar/data/[cik]/[acc_no]/form13fInfoTable.xml'
| 48.75 | 98 | 0.774359 | URL_COMPANY_FILING_SEARCH = 'https://www.sec.gov/cgi-bin/browse-edgar?CIK=[cik]&action=getcompany'
URL_13F_QR_XML = 'https://www.sec.gov/Archives/edgar/data/[cik]/[acc_no]/form13fInfoTable.xml'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fcf2ff018ffecdfa03c59dbf3df8d9f0456c5e07 | 8,107 | py | Python | setup.py | sergiorochalopes/oci-utils | 527db595b148762742fcc0091513e28f9de3b4ff | [
"UPL-1.0"
] | 1 | 2020-07-20T14:23:34.000Z | 2020-07-20T14:23:34.000Z | setup.py | sergiorochalopes/oci-utils | 527db595b148762742fcc0091513e28f9de3b4ff | [
"UPL-1.0"
] | null | null | null | setup.py | sergiorochalopes/oci-utils | 527db595b148762742fcc0091513e28f9de3b4ff | [
"UPL-1.0"
] | null | null | null | # Copyright (c) 2017, 2019 Oracle and/or its affiliates. All rights reserved.
""" Build an rpm from oci-utils.
"""
import os
import sys
sys.path.insert(0, os.path.abspath('lib'))
try:
from setuptools import setup, find_packages
except ImportError:
print("oci-utils needs setuptools in order to build. Install ... | 33.920502 | 140 | 0.543604 | # Copyright (c) 2017, 2019 Oracle and/or its affiliates. All rights reserved.
""" Build an rpm from oci-utils.
"""
import os
import subprocess
import sys
from distutils.core import Command
from distutils.errors import DistutilsExecError
from distutils import log
sys.path.insert(0, os.path.abspath('lib'))
try:
f... | 0 | 0 | 0 | 3,662 | 0 | 0 | 0 | 39 | 135 |
81ce19d9fe67509f03e75e87e8dd190ac5b67ad4 | 22 | py | Python | Analysis/CardioVascularLab/ExVivo/uniaxanalysis/testcode.py | sassystacks/TissueMechanicsLab | 0f881a57ebf7cbadfeb2041daabd4e4b79b25b91 | [
"MIT"
] | null | null | null | Analysis/CardioVascularLab/ExVivo/uniaxanalysis/testcode.py | sassystacks/TissueMechanicsLab | 0f881a57ebf7cbadfeb2041daabd4e4b79b25b91 | [
"MIT"
] | null | null | null | Analysis/CardioVascularLab/ExVivo/uniaxanalysis/testcode.py | sassystacks/TissueMechanicsLab | 0f881a57ebf7cbadfeb2041daabd4e4b79b25b91 | [
"MIT"
] | null | null | null | print(type(range(3)))
| 11 | 21 | 0.681818 | print(type(range(3)))
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
644fe1bdc1784b3685dc77a0f3cf83ee128c893e | 4,183 | py | Python | mylib/ext/pyside2/layout.py | fakegit/mo-han-toolbox | 9d5bbc1fe7f12040715d3a0d3f320a1ad617aed8 | [
"MIT"
] | 24 | 2019-12-08T03:56:32.000Z | 2021-10-02T13:26:37.000Z | mylib/ext/pyside2/layout.py | fakegit/mo-han-toolbox | 9d5bbc1fe7f12040715d3a0d3f320a1ad617aed8 | [
"MIT"
] | 2 | 2020-04-27T14:20:01.000Z | 2020-07-17T06:05:33.000Z | mylib/ext/pyside2/layout.py | fakegit/mo-han-toolbox | 9d5bbc1fe7f12040715d3a0d3f320a1ad617aed8 | [
"MIT"
] | 10 | 2019-08-06T01:11:28.000Z | 2021-07-19T08:45:11.000Z | #!/usr/bin/env python3
| 32.679688 | 113 | 0.586421 | #!/usr/bin/env python3
from PySide2.QtCore import *
from PySide2.QtWidgets import *
from mylib.easy import T
class EzQtLayoutWrapper:
def __init__(self, layout_class, owner_widget=None, parent=None):
self.widget = owner_widget or QWidget(parent)
self.layout = layout_class(self.widget)
sel... | 0 | 254 | 0 | 3,747 | 0 | 0 | 0 | 20 | 136 |
ab41279e52d1c7490b8a00addbab8e7f44970e0f | 471 | py | Python | leetcode/jumpGame.py | kokuraxc/play-ground | 48b5291f3cca117e0cd0a17bf9255ec4dc1a5cdd | [
"MIT"
] | null | null | null | leetcode/jumpGame.py | kokuraxc/play-ground | 48b5291f3cca117e0cd0a17bf9255ec4dc1a5cdd | [
"MIT"
] | null | null | null | leetcode/jumpGame.py | kokuraxc/play-ground | 48b5291f3cca117e0cd0a17bf9255ec4dc1a5cdd | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/jump-game/
nums = [2, 3, 1, 1, 4]
print(Solution().canJump(nums))
nums = [3, 2, 1, 0, 4]
print(Solution().canJump(nums)) | 23.55 | 49 | 0.526539 | # https://leetcode.com/problems/jump-game/
class Solution:
def canJump(self, nums: list[int]) -> bool:
last = 0
for index in range(len(nums)):
if index > last:
return False
last = max(last, index + nums[index])
if last >= len(nums) - 1:
... | 0 | 0 | 0 | 292 | 0 | 0 | 0 | 0 | 23 |
8cc6993d3105afbe975cd32ccd39f9f479e03924 | 769 | py | Python | Python/contains-duplicate-iii.py | se77enn/LeetCode-Solution | d29ef5358cae592b63952c3d293897a176fb75e1 | [
"MIT"
] | 1 | 2020-10-27T03:22:31.000Z | 2020-10-27T03:22:31.000Z | Python/contains-duplicate-iii.py | se77enn/LeetCode-Solution | d29ef5358cae592b63952c3d293897a176fb75e1 | [
"MIT"
] | null | null | null | Python/contains-duplicate-iii.py | se77enn/LeetCode-Solution | d29ef5358cae592b63952c3d293897a176fb75e1 | [
"MIT"
] | 1 | 2021-03-22T18:58:23.000Z | 2021-03-22T18:58:23.000Z | # Time: O(n * t)
# Space: O(max(k, t))
| 27.464286 | 90 | 0.507152 | # Time: O(n * t)
# Space: O(max(k, t))
import collections
class Solution:
# @param {integer[]} nums
# @param {integer} k
# @param {integer} t
# @return {boolean}
def containsNearbyAlmostDuplicate(self, nums, k, t):
if k < 0 or t < 0:
return False
window = collections.O... | 0 | 0 | 0 | 685 | 0 | 0 | 0 | -3 | 46 |
822e39476188e66046cf0c4f379b55ffbd63e9f2 | 243 | py | Python | jp.atcoder/abc151/abc151_b/9487259.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-09T03:06:25.000Z | 2022-02-09T03:06:25.000Z | jp.atcoder/abc151/abc151_b/9487259.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-05T22:53:18.000Z | 2022-02-09T01:29:30.000Z | jp.atcoder/abc151/abc151_b/9487259.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | null | null | null | import sys
n, k, m, *a = map(int, sys.stdin.read().split())
if __name__ == '__main__':
ans = main()
print(ans)
| 17.357143 | 49 | 0.506173 | import sys
n, k, m, *a = map(int, sys.stdin.read().split())
def main():
s = sum(a)
target = m * n
res = target - s
return -1 if res > k else max(0, res)
if __name__ == '__main__':
ans = main()
print(ans)
| 0 | 0 | 0 | 0 | 0 | 91 | 0 | 0 | 25 |
c51b2727a642fcdae1ef0dfe860bfde918487509 | 5,795 | py | Python | instana/instrumentation/sanic_inst.py | rlopes-ki/python-sensor | 07e827f9982b2a0c482e8eab82d1a420923efd5e | [
"MIT"
] | 61 | 2017-09-27T02:50:17.000Z | 2022-03-22T12:13:37.000Z | instana/instrumentation/sanic_inst.py | rlopes-ki/python-sensor | 07e827f9982b2a0c482e8eab82d1a420923efd5e | [
"MIT"
] | 82 | 2017-07-11T13:47:33.000Z | 2022-03-22T10:10:38.000Z | instana/instrumentation/sanic_inst.py | rlopes-ki/python-sensor | 07e827f9982b2a0c482e8eab82d1a420923efd5e | [
"MIT"
] | 27 | 2017-09-11T16:22:32.000Z | 2022-03-11T17:21:49.000Z | # (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2021
"""
Instrumentation for Sanic
https://sanicframework.org/en/
"""
try:
import sanic
import wrapt
import opentracing
from ..log import logger
from ..singletons import async_tracer, agent
from ..util.secrets import strip_secrets_from... | 40.243056 | 110 | 0.574806 | # (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2021
"""
Instrumentation for Sanic
https://sanicframework.org/en/
"""
try:
import sanic
import wrapt
import opentracing
from ..log import logger
from ..singletons import async_tracer, agent
from ..util.secrets import strip_secrets_from... | 0 | 4,437 | 0 | 0 | 0 | 586 | 0 | 0 | 172 |
e2ef5d35d03c3493f6abc49abfaf537ea5ca37f1 | 4,717 | py | Python | prod/stock_em02_rpc02/run_service.py | liuying3013/vnpy | e1cc1ea4af5fa6ec9a31e5b954c19cfaa0a3130e | [
"MIT"
] | 323 | 2015-11-21T14:45:29.000Z | 2022-03-16T08:54:37.000Z | prod/stock_em02_rpc02/run_service.py | liuying3013/vnpy | e1cc1ea4af5fa6ec9a31e5b954c19cfaa0a3130e | [
"MIT"
] | 9 | 2017-03-21T08:26:21.000Z | 2021-08-23T06:41:17.000Z | prod/stock_em02_rpc02/run_service.py | liuying3013/vnpy | e1cc1ea4af5fa6ec9a31e5b954c19cfaa0a3130e | [
"MIT"
] | 148 | 2016-09-26T03:25:39.000Z | 2022-02-06T14:43:48.000Z | # flake8: noqa
import os
import sys
from logging import DEBUG
# repostoryi
ROOT_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
if ROOT_PATH not in sys.path:
sys.path.append(ROOT_PATH)
print(f'append {ROOT_PATH} into sys.path')
from vnpy.trader.setting import SETTINGS
from vnpy.tra... | 29.48125 | 108 | 0.640025 | # flake8: noqa
import os
import sys
import multiprocessing
from time import sleep
from datetime import datetime, time
from logging import DEBUG
# 将repostory的目录i,作为根目录,添加到系统环境中。
ROOT_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
if ROOT_PATH not in sys.path:
sys.path.append(ROOT_PATH)... | 543 | 0 | 0 | 2,939 | 0 | 0 | 0 | 270 | 266 |
f16fd565b9f0d2be746b6a8e694c011af883804e | 7,509 | py | Python | deflicker.py | gondsm/timelapse_deflickerer | c5b8d28a76bac0258ac9276352c1363094240e7c | [
"MIT"
] | 4 | 2019-09-30T14:52:56.000Z | 2021-06-29T08:25:56.000Z | deflicker.py | gondsm/timelapse_deflickerer | c5b8d28a76bac0258ac9276352c1363094240e7c | [
"MIT"
] | null | null | null | deflicker.py | gondsm/timelapse_deflickerer | c5b8d28a76bac0258ac9276352c1363094240e7c | [
"MIT"
] | 3 | 2020-08-18T17:15:14.000Z | 2021-01-08T21:16:09.000Z | #!/usr/bin/env python2
# Futures
from __future__ import print_function, division
# Standard
import os
import multiprocessing
# Non-standard
import cv2
import numpy as np
import matplotlib.pyplot as plt
def list_images(input_dir):
""" Produces a list of all the filenames in the input directory. """
# List the fil... | 27.708487 | 120 | 0.745239 | #!/usr/bin/env python2
# Futures
from __future__ import print_function, division
# Standard
import os
import multiprocessing
# Non-standard
import cv2
import numpy as np
import matplotlib.pyplot as plt
def list_images(input_dir):
""" Produces a list of all the filenames in the input directory. """
# List the fil... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cd0f6818280b452ff518dc257d018138dbe2e39c | 7,696 | py | Python | Cura/Cura/plugins/LegacyProfileReader/tests/TestLegacyProfileReader.py | TIAO-JI-FU/3d-printing-with-moveo-1 | 100ecfd1208fe1890f8bada946145d716b2298eb | [
"MIT"
] | null | null | null | Cura/Cura/plugins/LegacyProfileReader/tests/TestLegacyProfileReader.py | TIAO-JI-FU/3d-printing-with-moveo-1 | 100ecfd1208fe1890f8bada946145d716b2298eb | [
"MIT"
] | null | null | null | Cura/Cura/plugins/LegacyProfileReader/tests/TestLegacyProfileReader.py | TIAO-JI-FU/3d-printing-with-moveo-1 | 100ecfd1208fe1890f8bada946145d716b2298eb | [
"MIT"
] | null | null | null | # Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import os.path # To find the integration test .ini files.
import sys
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
import UM.Application # To mock the application out.
import UM.PluginRegis... | 39.265306 | 138 | 0.664761 | # Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import configparser # An input for some functions we're testing.
import os.path # To find the integration test .ini files.
import pytest # To register tests with.
import unittest.mock # To mock the application, plug-in and ... | 0 | 5,184 | 0 | 0 | 0 | 0 | 0 | 38 | 459 |
20b0142c5622d0f930bb32afa0c65e81dad89d2d | 144 | py | Python | ava/messenger/routing.py | patrickporto/elearning | b746fcfa5dadc77eaa0b3e20ff006f386b9dae67 | [
"MIT"
] | null | null | null | ava/messenger/routing.py | patrickporto/elearning | b746fcfa5dadc77eaa0b3e20ff006f386b9dae67 | [
"MIT"
] | null | null | null | ava/messenger/routing.py | patrickporto/elearning | b746fcfa5dadc77eaa0b3e20ff006f386b9dae67 | [
"MIT"
] | null | null | null | from django.urls import path
from .consumers import ChatConsumer
websocket_urlpatterns = [
path(r'ws/chat/<room_name>/', ChatConsumer),
]
| 18 | 48 | 0.75 | from django.urls import path
from .consumers import ChatConsumer
websocket_urlpatterns = [
path(r'ws/chat/<room_name>/', ChatConsumer),
]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b4a62fa78d114a5fef3257984a2187a7f92a4b28 | 1,436 | py | Python | examples/fonteffects/sample05_shearedshadow.py | chromia/wandplus | 815127aeee85dbac3bc8fca35971d2153b1898a9 | [
"ImageMagick",
"MIT"
] | null | null | null | examples/fonteffects/sample05_shearedshadow.py | chromia/wandplus | 815127aeee85dbac3bc8fca35971d2153b1898a9 | [
"ImageMagick",
"MIT"
] | null | null | null | examples/fonteffects/sample05_shearedshadow.py | chromia/wandplus | 815127aeee85dbac3bc8fca35971d2153b1898a9 | [
"ImageMagick",
"MIT"
] | null | null | null | #!/usr/bin/env python
from wand.image import Image
from wand.drawing import Drawing
from wand.color import Color
import math
# http://www.imagemagick.org/Usage/fonts/
# original imagemagick command:
# convert -size 320x115 xc:lightblue -font Candice -pointsize 72 \
# -fill Navy -annotate 0x0+12+55 'An... | 33.395349 | 91 | 0.611421 | #!/usr/bin/env python
from wand.image import Image
from wand.drawing import Drawing
from wand.color import Color
import math
# http://www.imagemagick.org/Usage/fonts/
# original imagemagick command:
# convert -size 320x115 xc:lightblue -font Candice -pointsize 72 \
# -fill Navy -annotate 0x0+12+55 'An... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ed8188e0283065e5a9b4dfb109976da6b588a208 | 1,607 | py | Python | setup.py | thu2thu2/redstone | 5f3722cefb19ac336486018454d8bf813e8add0e | [
"Apache-2.0"
] | null | null | null | setup.py | thu2thu2/redstone | 5f3722cefb19ac336486018454d8bf813e8add0e | [
"Apache-2.0"
] | null | null | null | setup.py | thu2thu2/redstone | 5f3722cefb19ac336486018454d8bf813e8add0e | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Mathew Odden
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 33.479167 | 74 | 0.671437 | # Copyright 2021 Mathew Odden
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7a95b2f8928109e0fca8d545ed19193b682ae4f4 | 1,606 | py | Python | writehtml.py | gmaterni/teimed2html | 6e273a502a30eaf2b975808660f93fc9fa87f326 | [
"MIT"
] | 1 | 2021-01-17T00:42:49.000Z | 2021-01-17T00:42:49.000Z | writehtml.py | gmaterni/teixml2html | 6e273a502a30eaf2b975808660f93fc9fa87f326 | [
"MIT"
] | null | null | null | writehtml.py | gmaterni/teixml2html | 6e273a502a30eaf2b975808660f93fc9fa87f326 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import argparse
import os
from teixml2lib.ualog import Log
import teixml2lib.file_utils as fut
__date__ = "'4-01-2021"
__version__ = "0.1.0"
__author__ = "Marta Materni"
logerr = Log("a")
if __name__ == "__main__":
logerr.open("log/writehtml.ERR.log", 1... | 30.301887 | 71 | 0.466999 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from pdb import set_trace
import sys
import argparse
import os
from teixml2lib.ualog import Log
import teixml2lib.file_utils as fut
__date__ = "'4-01-2021"
__version__ = "0.1.0"
__author__ = "Marta Materni"
logerr = Log("a")
if __name__ == "__main__":
logerr.open(... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 22 |
33ac5961ad6572d51bc56be7d8bd09fd475c0e85 | 541 | py | Python | helpingnetwork/volunteer/models.py | neopentane/Techathon_19 | defaea24e55bdc4a26138a7a8c8813f5b12156f2 | [
"MIT"
] | null | null | null | helpingnetwork/volunteer/models.py | neopentane/Techathon_19 | defaea24e55bdc4a26138a7a8c8813f5b12156f2 | [
"MIT"
] | 22 | 2020-02-12T00:01:41.000Z | 2022-03-11T23:44:42.000Z | helpingnetwork/volunteer/models.py | neopentane/Techathon_19 | defaea24e55bdc4a26138a7a8c8813f5b12156f2 | [
"MIT"
] | 2 | 2019-04-03T18:01:54.000Z | 2019-04-04T03:57:55.000Z |
#hello this is priyaa
# Create your models here.
| 27.05 | 66 | 0.783734 | from django.db import models
from django.contrib.auth.models import User
#hello this is priyaa
# Create your models here.
class City(models.Model):
name=models.CharField(max_length=100)
def __str__(self):
return self.name
class Volunteer(models.Model):
user=models.OneToOneField(User,on_delete=models.CASCADE)
my_... | 0 | 0 | 0 | 369 | 0 | 0 | 0 | 29 | 88 |
4cccd4facf20028d9bf7d2fa78ee4b4d92dbcb78 | 4,036 | py | Python | timings/plot.py | bml1g12/benchmarking_video_reading_python | 6447f0a434fbde1e21781e1150b6f41062737759 | [
"MIT"
] | 19 | 2021-03-28T19:40:34.000Z | 2022-03-09T07:37:02.000Z | timings/plot.py | bml1g12/bechmarking_video_reading_python | 6447f0a434fbde1e21781e1150b6f41062737759 | [
"MIT"
] | 1 | 2022-01-02T20:05:52.000Z | 2022-01-05T20:08:18.000Z | timings/plot.py | bml1g12/bechmarking_video_reading_python | 6447f0a434fbde1e21781e1150b6f41062737759 | [
"MIT"
] | 3 | 2021-09-10T15:51:45.000Z | 2021-12-30T02:42:27.000Z | """Plots graphs of timings"""
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from matplotlib.lines import Line2D
def fps_plot(df, title):
"""plots graphs of timings"""
df = df[~df.groupname.str.contains("ffmpeg_unblocked_decoding_speed")]
df["groupname"] = df.groupname.str.spl... | 41.608247 | 101 | 0.645937 | """Plots graphs of timings"""
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from matplotlib.lines import Line2D
def fps_plot(df, title):
"""plots graphs of timings"""
df = df[~df.groupname.str.contains("ffmpeg_unblocked_decoding_speed")]
df["groupname"] = df.groupname.str.spl... | 0 | 0 | 0 | 0 | 0 | 194 | 0 | 0 | 23 |
18783b3d975baa8ad44a386df095f05645c38ceb | 672 | py | Python | isy994/items/devices/zwave/device_zwave_controller.py | BurntTech/ISY994v5 | 47d5c750367d36f2ae31435859d24cefcb617f06 | [
"MIT"
] | null | null | null | isy994/items/devices/zwave/device_zwave_controller.py | BurntTech/ISY994v5 | 47d5c750367d36f2ae31435859d24cefcb617f06 | [
"MIT"
] | null | null | null | isy994/items/devices/zwave/device_zwave_controller.py | BurntTech/ISY994v5 | 47d5c750367d36f2ae31435859d24cefcb617f06 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
paddle_events = {"DON", "DOF", "DIM", "BRT", "DFON", "DFOF"}
| 29.217391 | 80 | 0.705357 | #! /usr/bin/env python
from ..common.device_base import Device_Base
from .device_zwave_base import Device_ZWave_Base
paddle_events = {"DON", "DOF", "DIM", "BRT", "DFON", "DFOF"}
class Device_ZWave_Controller(Device_Base, Device_ZWave_Base):
def __init__(self, container, device_info):
Device_Base.__init... | 0 | 0 | 0 | 466 | 0 | 0 | 0 | 50 | 68 |
9925342de64029f3fac13e04c741c59e684cc1a8 | 947 | py | Python | database.py | Zanice/Flashcards-Project | ea5c457794a532f7a364ad8e6a98419df3bbf1bf | [
"MIT"
] | null | null | null | database.py | Zanice/Flashcards-Project | ea5c457794a532f7a364ad8e6a98419df3bbf1bf | [
"MIT"
] | null | null | null | database.py | Zanice/Flashcards-Project | ea5c457794a532f7a364ad8e6a98419df3bbf1bf | [
"MIT"
] | null | null | null | # native imports
# project imports
# external imports
import sqlalchemy
import sqlalchemy.ext.declarative
Base = sqlalchemy.ext.declarative.declarative_base()
Session = sqlalchemy.orm.scoped_session(sqlalchemy.orm.sessionmaker())
| 32.655172 | 82 | 0.810982 | # native imports
# project imports
# external imports
import sqlalchemy
import sqlalchemy.ext.declarative
Base = sqlalchemy.ext.declarative.declarative_base()
Session = sqlalchemy.orm.scoped_session(sqlalchemy.orm.sessionmaker())
def init_db(username, password, database):
connection_url = sqlalchemy.engine.url.mak... | 0 | 0 | 0 | 327 | 0 | 340 | 0 | 0 | 46 |
7fed79f013fe5d4b9895a03d5104f0513bbec085 | 575 | py | Python | SimplE/main.py | dertilo/knowledge-graph-reasoning | e36d57ee34aa2b532f4dfa98a1e1d222037337cc | [
"MIT"
] | null | null | null | SimplE/main.py | dertilo/knowledge-graph-reasoning | e36d57ee34aa2b532f4dfa98a1e1d222037337cc | [
"MIT"
] | null | null | null | SimplE/main.py | dertilo/knowledge-graph-reasoning | e36d57ee34aa2b532f4dfa98a1e1d222037337cc | [
"MIT"
] | null | null | null | from trainer import Trainer
from tester import Tester
from dataset import Dataset, Params
if __name__ == "__main__":
args = Params()
dataset = Dataset(args.dataset)
#
print("~~~~ Training ~~~~")
trainer = Trainer(dataset, args)
trainer.train()
print("~~~~ Select best epoch on validation se... | 26.136364 | 64 | 0.655652 | from trainer import Trainer
from tester import Tester
from dataset import Dataset, Params
if __name__ == "__main__":
args = Params()
dataset = Dataset(args.dataset)
#
print("~~~~ Training ~~~~")
trainer = Trainer(dataset, args)
trainer.train()
print("~~~~ Select best epoch on validation se... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
80b5ae0ecb12a7c8f4a3c1c86f5197e223dbb87f | 12,384 | py | Python | actin/actin.py | j-faria/ACTIN | f16d597472ccabb7627753179032e18ae21e83a2 | [
"MIT"
] | null | null | null | actin/actin.py | j-faria/ACTIN | f16d597472ccabb7627753179032e18ae21e83a2 | [
"MIT"
] | null | null | null | actin/actin.py | j-faria/ACTIN | f16d597472ccabb7627753179032e18ae21e83a2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# compatibility with python 2/3:
from __future__ import print_function
from __future__ import division
import sys, os
import time
import numpy as np
import argparse
import pkg_resources
import appdirs
# Directory of this file
path = os.path.dirname(os.path.realpath(__file__))
# Global variab... | 35.791908 | 251 | 0.621286 | #!/usr/bin/env python
# compatibility with python 2/3:
from __future__ import print_function
from __future__ import division
import sys, os
import glob
import time
import datetime
import numpy as np
import astropy.io.fits as pyfits
import argparse
import pkg_resources
import appdirs
# Directory of this file
path =... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 111 |
072168f662e41ab278d8f3557efd63418a24e18b | 6,647 | py | Python | devito/ir/equations/algorithms.py | kenhester/devito | 4d60cfca76b90daaaca71a1407e7311ad238ddd5 | [
"MIT"
] | 204 | 2020-01-09T11:27:58.000Z | 2022-03-20T22:53:37.000Z | devito/ir/equations/algorithms.py | kenhester/devito | 4d60cfca76b90daaaca71a1407e7311ad238ddd5 | [
"MIT"
] | 835 | 2019-12-30T08:12:25.000Z | 2022-03-29T04:52:55.000Z | devito/ir/equations/algorithms.py | kenhester/devito | 4d60cfca76b90daaaca71a1407e7311ad238ddd5 | [
"MIT"
] | 131 | 2020-01-08T17:43:13.000Z | 2022-03-27T11:36:47.000Z | from collections.abc import Iterable
from operator import attrgetter
from sympy import sympify
from devito.symbolics import (retrieve_functions, retrieve_indexed, uxreplace)
from devito.tools import PartialOrderTuple, filter_sorted, as_tuple
from devito.types import Dimension, Eq, IgnoreDimSort
__all__ = ['dimension... | 39.1 | 87 | 0.608094 | from collections.abc import Iterable
from operator import attrgetter
from sympy import sympify
from devito.symbolics import (retrieve_functions, retrieve_indexed, split_affine,
uxreplace)
from devito.tools import PartialOrderTuple, filter_sorted, flatten, as_tuple
from devito.types impor... | 0 | 0 | 0 | 0 | 0 | 839 | 0 | 53 | 27 |
e57a0cfa01980be52ea2a6d6cca342f80711bdd6 | 118 | py | Python | ObjectDetection/importPaths.py | eMSiBi/LeraBots | 50cd0241ec1f8eb2fc2eb47fb56fac8ba056e054 | [
"BSD-4-Clause"
] | null | null | null | ObjectDetection/importPaths.py | eMSiBi/LeraBots | 50cd0241ec1f8eb2fc2eb47fb56fac8ba056e054 | [
"BSD-4-Clause"
] | null | null | null | ObjectDetection/importPaths.py | eMSiBi/LeraBots | 50cd0241ec1f8eb2fc2eb47fb56fac8ba056e054 | [
"BSD-4-Clause"
] | null | null | null | # https://docs.python.org/3/tutorial/modules.html#standard-modules
import sys
sys.path.append("../ImageManupilation")
| 29.5 | 66 | 0.779661 | # https://docs.python.org/3/tutorial/modules.html#standard-modules
import sys
sys.path.append("../ImageManupilation")
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e0c9d608de91d5242c7f7c6dda4bd36d286585d7 | 12,260 | py | Python | dev/Tools/build/waf-1.7.13/waflib/Tools/tex.py | brianherrera/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | [
"AML"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | dev/Tools/build/waf-1.7.13/waflib/Tools/tex.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | dev/Tools/build/waf-1.7.13/waflib/Tools/tex.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2006-2010 (ita)
"""
TeX/LaTeX/PDFLaTeX/XeLaTeX support
Example::
def configure(conf):
conf.load('tex')
if not conf.env.LATEX:
conf.fatal('The program LaTex is required')
def build(bld):
bld(
features = 'tex',
type = 'latex', # pdflatex or x... | 28.37963 | 158 | 0.659135 | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2006-2010 (ita)
"""
TeX/LaTeX/PDFLaTeX/XeLaTeX support
Example::
def configure(conf):
conf.load('tex')
if not conf.env.LATEX:
conf.fatal('The program LaTex is required')
def build(bld):
bld(
features = 'tex',
type = 'latex', # pdflatex or x... | 0 | 1,921 | 0 | 7,774 | 0 | 0 | 0 | 53 | 204 |
a330e647e287874cf96765db50d5198e6c97ec4b | 863 | py | Python | migrations/0001_initial.py | redditnfl/draft-cards | 63779107a731ad741c8cf02b98a4b3d74cdcc3ac | [
"Apache-2.0",
"0BSD"
] | null | null | null | migrations/0001_initial.py | redditnfl/draft-cards | 63779107a731ad741c8cf02b98a4b3d74cdcc3ac | [
"Apache-2.0",
"0BSD"
] | 10 | 2020-06-05T20:27:08.000Z | 2022-02-10T10:47:58.000Z | migrations/0001_initial.py | redditnfl/draft-cards | 63779107a731ad741c8cf02b98a4b3d74cdcc3ac | [
"Apache-2.0",
"0BSD"
] | 1 | 2021-06-06T01:11:32.000Z | 2021-06-06T01:11:32.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-25 21:34
from __future__ import unicode_literals
| 31.962963 | 199 | 0.568946 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-25 21:34
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Player',... | 0 | 0 | 0 | 686 | 0 | 0 | 0 | 19 | 46 |
b411b79557c7c7bdd88f52280dcd9b14b3d35b8d | 2,945 | py | Python | treecode/telemetry.py | Dvakote/LSS-sim | c1e43222f82bf1d6751b906b264f93b050abebb4 | [
"MIT"
] | null | null | null | treecode/telemetry.py | Dvakote/LSS-sim | c1e43222f82bf1d6751b906b264f93b050abebb4 | [
"MIT"
] | null | null | null | treecode/telemetry.py | Dvakote/LSS-sim | c1e43222f82bf1d6751b906b264f93b050abebb4 | [
"MIT"
] | 1 | 2018-05-22T08:19:33.000Z | 2018-05-22T08:19:33.000Z | # -*- coding: utf-8 -*-
| 37.278481 | 77 | 0.650594 | # -*- coding: utf-8 -*-
import numpy as np
import treecode.energy_and_momentum as EM
def is_gravity_field_weak(particles, C_2):
# Функция, выдающая ошибку, если гравитационное поле становится
# слишком сильным для применения используемой модели
ERROR_NAME = ''
# Считаем величину phi / c^2, ... | 1,630 | 0 | 0 | 0 | 0 | 1,959 | 0 | 17 | 123 |
2f50591ead8cefee497b16687fd3de622854c324 | 1,407 | py | Python | run.py | hoshinohikari/stereo-target-detection-and-ranging | 7bdd7be7da999466d2cb2ff58303a2dcf3c76b8d | [
"MIT"
] | null | null | null | run.py | hoshinohikari/stereo-target-detection-and-ranging | 7bdd7be7da999466d2cb2ff58303a2dcf3c76b8d | [
"MIT"
] | null | null | null | run.py | hoshinohikari/stereo-target-detection-and-ranging | 7bdd7be7da999466d2cb2ff58303a2dcf3c76b8d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import argparse
from yolo import YOLO
from cache import detect_cam, detect_video
FLAGS = None
if __name__ == '__main__':
parser = argparse.ArgumentParser(argument_default=argparse.SUPPRESS)
'''
Command line options
'''
parser.add_argument(
"--camera", nargs='?', type=int, requir... | 28.14 | 95 | 0.665956 | # -*- coding: utf-8 -*-
import argparse
from yolo import YOLO
from cache import detect_cam ,detect_video
FLAGS = None
if __name__ == '__main__':
parser = argparse.ArgumentParser(argument_default=argparse.SUPPRESS)
'''
Command line options
'''
parser.add_argument(
"--camera", nargs='?', type=int, requir... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bfada3b7a4b39829017c4beaa8920cd0ff89c9d0 | 722 | py | Python | pycture/constants.py | joaopalmeiro/pycture | 408de3cda5773f6c1808f92f44658c3fe0d5c6e5 | [
"MIT"
] | 1 | 2021-04-30T14:49:23.000Z | 2021-04-30T14:49:23.000Z | pycture/constants.py | joaopalmeiro/pycture | 408de3cda5773f6c1808f92f44658c3fe0d5c6e5 | [
"MIT"
] | 7 | 2021-04-30T17:11:08.000Z | 2022-01-06T14:22:16.000Z | pycture/constants.py | joaopalmeiro/pycture | 408de3cda5773f6c1808f92f44658c3fe0d5c6e5 | [
"MIT"
] | null | null | null | from typing import Callable, Dict, List
# CLI
OUTPUT_DIR_HELP: str = "The path to the output directory."
PRETTY_HELP: str = "Pretty-print the SVG code."
SOURCE_HELP: str = "The source of the emoji to obtain."
SOURCES: List[str] = ["Twemoji", "OpenMoji"]
# URLs
TWEMOJI_URL: str = (
"https://raw.githubusercontent.... | 27.769231 | 87 | 0.691136 | from typing import Callable, Dict, List
# CLI
OUTPUT_DIR_HELP: str = "The path to the output directory."
PRETTY_HELP: str = "Pretty-print the SVG code."
SOURCE_HELP: str = "The source of the emoji to obtain."
SOURCES: List[str] = ["Twemoji", "OpenMoji"]
# URLs
TWEMOJI_URL: str = (
"https://raw.githubusercontent.... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3644df109aa6864369da59cd9c4baa3e482a3f56 | 62 | py | Python | ytmdl/__version__.py | philodavies/ytmdl | 7ba7f2e38e4602b73aca5cbaddcf4de4badce07e | [
"MIT"
] | 2,495 | 2018-06-20T07:17:15.000Z | 2022-03-31T18:50:44.000Z | ytmdl/__version__.py | philodavies/ytmdl | 7ba7f2e38e4602b73aca5cbaddcf4de4badce07e | [
"MIT"
] | 204 | 2018-07-10T13:48:59.000Z | 2022-03-21T22:04:33.000Z | ytmdl/__version__.py | philodavies/ytmdl | 7ba7f2e38e4602b73aca5cbaddcf4de4badce07e | [
"MIT"
] | 175 | 2018-06-20T07:17:54.000Z | 2022-03-26T00:17:58.000Z | # Store the version of the package
__version__ = "2021.08.01"
| 20.666667 | 34 | 0.741935 | # Store the version of the package
__version__ = "2021.08.01"
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8c64684af6441ce6479eb4599d84489030382d45 | 3,854 | py | Python | utils/database_tester.py | ax-rwnd/E-dot | b1b64fcce43c5d6f54dc38959498cdba95e757b1 | [
"BSD-3-Clause"
] | null | null | null | utils/database_tester.py | ax-rwnd/E-dot | b1b64fcce43c5d6f54dc38959498cdba95e757b1 | [
"BSD-3-Clause"
] | 1 | 2015-12-05T02:04:35.000Z | 2015-12-11T02:47:28.000Z | utils/database_tester.py | ax-rwnd/E-dot | b1b64fcce43c5d6f54dc38959498cdba95e757b1 | [
"BSD-3-Clause"
] | null | null | null | DATABASE = 'db_edot'
# mysql
HOST = 'localhost'
PORT = 3306
USER = 'root'
PASSWD = ''
SQLDB = 'db_edot'
from flask import Flask
app = Flask(__name__)
# DB support
# returns a database connection for MySQL
# set this line to define database connection
DBFUNC = connect_to_database_mysql
tbl_user = "tbl_user"
tbl_pro... | 37.057692 | 303 | 0.669694 | DATABASE = 'db_edot'
# mysql
HOST = 'localhost'
PORT = 3306
USER = 'root'
PASSWD = ''
SQLDB = 'db_edot'
from flask import Flask, render_template, request, g
app = Flask(__name__)
# DB support
import MySQLdb
# returns a database connection for MySQL
def connect_to_database_mysql(database=None):
if database:
... | 0 | 0 | 0 | 0 | 0 | 1,331 | 0 | 22 | 120 |
f1d7041877ea2e8ed70c2dea2746ce74d5e4cdaa | 364 | py | Python | plugins/_template/admin.py | adlerosn/corpusslayer | d3dea2e2d15e911d048a39f6ef6cb2d5f7b33e58 | [
"MIT"
] | null | null | null | plugins/_template/admin.py | adlerosn/corpusslayer | d3dea2e2d15e911d048a39f6ef6cb2d5f7b33e58 | [
"MIT"
] | 1 | 2019-07-06T20:43:45.000Z | 2019-07-06T20:43:45.000Z | plugins/unitexgramlab/admin.py | adlerosn/corpusslayer | d3dea2e2d15e911d048a39f6ef6cb2d5f7b33e58 | [
"MIT"
] | null | null | null | import os
pluginName = os.path.abspath(__file__).split(os.path.sep)[-2]
importline = 'import '+('.'.join(['plugins',pluginName,'models'])+' as models')
exec(importline) #import plugins.thisplugin.models as models
from corpusslayer.adminModelRegister import registerForMe
from django.contrib import admin
# Register your... | 33.090909 | 79 | 0.777473 | import os
pluginName = os.path.abspath(__file__).split(os.path.sep)[-2]
importline = 'import '+('.'.join(['plugins',pluginName,'models'])+' as models')
exec(importline) #import plugins.thisplugin.models as models
from corpusslayer.adminModelRegister import registerForMe
from django.contrib import admin
# Register your... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a74e9a74a8de6e000dccedacec1d6592c951e8b2 | 2,176 | py | Python | checkio/Scientific Expedition/Seven Segment/test_seven_segment.py | KenMercusLai/checkio | c7702221e1bc0b0b30425859ffa6c09722949d65 | [
"MIT"
] | 39 | 2015-02-09T13:24:12.000Z | 2019-05-16T17:51:19.000Z | checkio/Scientific Expedition/Seven Segment/test_seven_segment.py | KenMercusLai/checkio | c7702221e1bc0b0b30425859ffa6c09722949d65 | [
"MIT"
] | 1 | 2019-10-21T16:18:14.000Z | 2019-10-21T16:18:14.000Z | checkio/Scientific Expedition/Seven Segment/test_seven_segment.py | KenMercusLai/checkio | c7702221e1bc0b0b30425859ffa6c09722949d65 | [
"MIT"
] | 22 | 2015-01-30T18:00:05.000Z | 2021-05-22T02:57:23.000Z |
# class Tests(unittest.TestCase):
# TESTS = {
# "Basics": [
# {
# "input": [['B', 'C', 'b', 'c'],
# ['A']],
# "answer": 2,
# },
# {
# "input": [['B', 'C', 'a', 'f', 'g', 'c', 'd'],
# ... | 32 | 94 | 0.318015 | import unittest
from seven_segment import possible_numbers, seven_segment
def test_possible_numbers():
first_digit = ['A', 'B', 'C', 'D', 'E', 'F', 'G']
second_digit = ['a', 'b', 'c', 'd', 'e', 'f', 'g']
assert possible_numbers({'B', 'C', 'b', 'c'}, {'A'}, first_digit) == [1, 7]
assert possible_numbe... | 0 | 0 | 0 | 0 | 0 | 527 | 0 | 30 | 68 |
60eb4c2205f9969008f6b282fbddedb495463094 | 559 | py | Python | docs/tutorial/curves_and_surfaces/curve_from_line.py | Sam-Bouten/compas | 011c7779ded9b69bb602568b470bb0443e336f62 | [
"MIT"
] | null | null | null | docs/tutorial/curves_and_surfaces/curve_from_line.py | Sam-Bouten/compas | 011c7779ded9b69bb602568b470bb0443e336f62 | [
"MIT"
] | null | null | null | docs/tutorial/curves_and_surfaces/curve_from_line.py | Sam-Bouten/compas | 011c7779ded9b69bb602568b470bb0443e336f62 | [
"MIT"
] | null | null | null | from compas.geometry import Point
from compas.geometry import Line
from compas.geometry import NurbsCurve
from compas.artists import Artist
from compas.colors import Color
line = Line(Point(0, 0, 0), Point(3, 3, 0))
curve = NurbsCurve.from_line(line)
# ================================================================... | 24.304348 | 80 | 0.538462 | from compas.geometry import Point
from compas.geometry import Line
from compas.geometry import NurbsCurve
from compas.artists import Artist
from compas.colors import Color
line = Line(Point(0, 0, 0), Point(3, 3, 0))
curve = NurbsCurve.from_line(line)
# ================================================================... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f9903ecf48f6f358c06e87554cc8ee21241c5f64 | 146 | py | Python | parinx/errors.py | rahulrrixe/parinx | 6493798ceba8089345d970f71be4a896eb6b081d | [
"Apache-2.0"
] | 8 | 2015-04-10T10:13:12.000Z | 2018-07-14T18:01:22.000Z | parinx/errors.py | coyo8/parinx | 6493798ceba8089345d970f71be4a896eb6b081d | [
"Apache-2.0"
] | 7 | 2015-08-29T18:34:44.000Z | 2018-05-10T18:55:56.000Z | parinx/errors.py | rahulrrixe/parinx | 6493798ceba8089345d970f71be4a896eb6b081d | [
"Apache-2.0"
] | 13 | 2015-04-10T10:31:08.000Z | 2018-07-30T06:49:46.000Z | # -*- coding:utf-8 -*-
try:
import simplejson as json
except ImportError:
| 14.6 | 40 | 0.69863 | # -*- coding:utf-8 -*-
try:
import simplejson as json
except ImportError:
import json
class MethodParsingException(Exception):
pass
| 0 | 0 | 0 | 28 | 0 | 0 | 0 | -10 | 49 |
e9d95111913e6f09119904ef1e1a8752c93866d6 | 2,881 | py | Python | tests/extension/thread_/ram_rtl/thread_ram_rtl.py | akmaru/veriloggen | 74f998139e8cf613f7703fa4cffd571bbf069bbc | [
"Apache-2.0"
] | null | null | null | tests/extension/thread_/ram_rtl/thread_ram_rtl.py | akmaru/veriloggen | 74f998139e8cf613f7703fa4cffd571bbf069bbc | [
"Apache-2.0"
] | null | null | null | tests/extension/thread_/ram_rtl/thread_ram_rtl.py | akmaru/veriloggen | 74f998139e8cf613f7703fa4cffd571bbf069bbc | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
import sys
import os
# the next line can be removed after installation
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))))
if __name__ == '__main__':
... | 22.685039 | 69 | 0.600139 | from __future__ import absolute_import
from __future__ import print_function
import sys
import os
# the next line can be removed after installation
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))))
from veriloggen import *
import ve... | 0 | 0 | 0 | 0 | 0 | 2,304 | 0 | 17 | 91 |
f33ca650165f32138a6621797c89f7f562536ba6 | 8,084 | py | Python | multi_classification.py | facebookresearch/mpcfp | cb29797aa4f2ce524dd584ecf47c863fd9f414a6 | [
"MIT"
] | 5 | 2020-11-18T23:55:17.000Z | 2022-01-14T07:15:35.000Z | multi_classification.py | facebookresearch/mpcfp | cb29797aa4f2ce524dd584ecf47c863fd9f414a6 | [
"MIT"
] | null | null | null | multi_classification.py | facebookresearch/mpcfp | cb29797aa4f2ce524dd584ecf47c863fd9f414a6 | [
"MIT"
] | 2 | 2021-11-06T14:06:13.000Z | 2022-01-14T07:16:29.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import argparse
def parse_args():
'''
Parse input arguments.
'''
parser = argparse.ArgumentParser(
... | 36.414414 | 79 | 0.584117 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import logging
import os
import time
import torch
import numpy as np
from shared import SharedTensor
... | 0 | 0 | 0 | 0 | 0 | 6,307 | 0 | -41 | 224 |
9cc80b7f123e331cc2a308a3863cef6b0c5ec77d | 4,097 | py | Python | calamari_ocr/ocr/text_processing/text_synchronizer.py | Nesbi/calamari | 25eb872118d15d0740f702ef42ef6f785e1a5858 | [
"Apache-2.0"
] | 5 | 2021-02-12T16:22:46.000Z | 2021-03-08T13:04:15.000Z | calamari_ocr/ocr/text_processing/text_synchronizer.py | Nesbi/calamari | 25eb872118d15d0740f702ef42ef6f785e1a5858 | [
"Apache-2.0"
] | 1 | 2020-05-06T15:03:17.000Z | 2020-05-07T15:22:01.000Z | calamari_ocr/ocr/text_processing/text_synchronizer.py | Nesbi/calamari | 25eb872118d15d0740f702ef42ef6f785e1a5858 | [
"Apache-2.0"
] | null | null | null |
if __name__ == "__main__":
synclist = synchronize(["AbcdEfG", "cdEFG"])
print([s.get_text() for s in synclist])
| 28.65035 | 104 | 0.51257 | import numpy as np
class Sync:
def __init__(self, texts, substr=None, match=None):
self.texts = texts
if substr:
assert(substr.shape[0] == len(self.texts))
self.substr = substr
else:
self.substr = np.zeros((len(texts), 3), dtype=int)
self.match... | 0 | 0 | 0 | 1,047 | 0 | 2,861 | 0 | -3 | 68 |
8f227b81ea11fb48fca3308db245e1fd002d3e63 | 4,466 | py | Python | src/bones-core/bones/tests/test_fits.py | DangerMouseB/coppertop | 26e9b01034b29fa8ec0e41bf1fa2b81c7c7bb34d | [
"BSD-3-Clause"
] | null | null | null | src/bones-core/bones/tests/test_fits.py | DangerMouseB/coppertop | 26e9b01034b29fa8ec0e41bf1fa2b81c7c7bb34d | [
"BSD-3-Clause"
] | null | null | null | src/bones-core/bones/tests/test_fits.py | DangerMouseB/coppertop | 26e9b01034b29fa8ec0e41bf1fa2b81c7c7bb34d | [
"BSD-3-Clause"
] | null | null | null | # *******************************************************************************
#
# Copyright (c) 2019-2021 David Briant. All rights reserved.
#
# *******************************************************************************
from bones.metatypes import BTAtom
tFred = BTAtom.ensure('fred')
tJoe = BTAtom.ensur... | 32.129496 | 95 | 0.572324 | # *******************************************************************************
#
# Copyright (c) 2019-2021 David Briant. All rights reserved.
#
# *******************************************************************************
from coppertop.pipe import *
from coppertop.core import Missing
from coppertop.std imp... | 0 | 114 | 0 | 0 | 0 | 3,527 | 0 | 165 | 228 |
dcc5be5722f0d8300f130394f59f56a4040133a6 | 3,593 | py | Python | trend_analyze/src/fetch_data.py | popper2710/Trend_Analyze | 0c98bcd7986bdb2d2b9bdc8022bfa08ddf0e7b0f | [
"MIT"
] | null | null | null | trend_analyze/src/fetch_data.py | popper2710/Trend_Analyze | 0c98bcd7986bdb2d2b9bdc8022bfa08ddf0e7b0f | [
"MIT"
] | 2 | 2020-09-26T14:58:33.000Z | 2021-03-31T20:01:40.000Z | trend_analyze/src/fetch_data.py | popper2710/Trend_Analyze | 0c98bcd7986bdb2d2b9bdc8022bfa08ddf0e7b0f | [
"MIT"
] | null | null | null | import logging
| 33.896226 | 116 | 0.597829 | import logging
import logging.config
import datetime
import GetOldTweets3 as Got
from typing import List
from trend_analyze.src.convert_to_model import ConvertTM
from trend_analyze.src.scraping_tweet import TwitterScraper
from trend_analyze.config import *
from trend_analyze.src.model import *
class TwitterFetcher:... | 0 | 0 | 0 | 3,272 | 0 | 0 | 0 | 104 | 201 |
7f476ff034ee0499e8cb4ca6060ddc10a61ebbab | 42 | py | Python | Python/Book Assignments/calc1.py | AungWinnHtut/CStutorial | 4b57721b814e9c2d288af64a979704dd70f14ddb | [
"MIT"
] | null | null | null | Python/Book Assignments/calc1.py | AungWinnHtut/CStutorial | 4b57721b814e9c2d288af64a979704dd70f14ddb | [
"MIT"
] | null | null | null | Python/Book Assignments/calc1.py | AungWinnHtut/CStutorial | 4b57721b814e9c2d288af64a979704dd70f14ddb | [
"MIT"
] | 1 | 2022-03-15T12:20:26.000Z | 2022-03-15T12:20:26.000Z | a=123*456
b=(34*99)+22
print(a)
print(b)
| 7 | 12 | 0.619048 | a=123*456
b=(34*99)+22
print(a)
print(b)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
eb82951b7423ded8bfd349910cd8eac73c4109a2 | 2,457 | py | Python | shub_workflow/utils/__init__.py | curita/shub-workflow | 5450da1502f8c300be242609dc6ae67bd3702079 | [
"BSD-3-Clause"
] | 8 | 2019-01-03T14:40:16.000Z | 2022-03-04T03:23:09.000Z | shub_workflow/utils/__init__.py | curita/shub-workflow | 5450da1502f8c300be242609dc6ae67bd3702079 | [
"BSD-3-Clause"
] | 10 | 2019-02-12T12:28:39.000Z | 2022-02-18T17:43:21.000Z | shub_workflow/utils/__init__.py | curita/shub-workflow | 5450da1502f8c300be242609dc6ae67bd3702079 | [
"BSD-3-Clause"
] | 8 | 2018-11-03T20:29:08.000Z | 2022-02-18T01:27:48.000Z | import logging
import os
from typing import Optional
from retrying import retry
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
def resolve_project_id(project_id=None) -> Optional[int]:
"""
Gets project id from following sources in following order of precedence:
- default parameter v... | 28.569767 | 118 | 0.708181 | import logging
import json
import os
from typing import Optional
from retrying import retry
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
def resolve_project_id(project_id=None) -> Optional[int]:
"""
Gets project id from following sources in following order of precedence:
- default... | 0 | 0 | 0 | 0 | 0 | 834 | 0 | -10 | 91 |
719e474631df8629a094702959a31661c8607c9f | 349 | py | Python | centralreport/cr/entities/webservices.py | haiyangd/CentralReport | 421447f31d07321f65198c5b5746baa16c9d9725 | [
"Apache-2.0"
] | 8 | 2015-08-17T20:25:12.000Z | 2019-03-04T04:42:31.000Z | centralreport/cr/entities/webservices.py | haiyangd/CentralReport | 421447f31d07321f65198c5b5746baa16c9d9725 | [
"Apache-2.0"
] | 3 | 2015-03-29T01:33:45.000Z | 2016-01-15T22:44:08.000Z | centralreport/cr/entities/webservices.py | haiyangd/CentralReport | 421447f31d07321f65198c5b5746baa16c9d9725 | [
"Apache-2.0"
] | 3 | 2016-08-06T19:49:42.000Z | 2018-03-28T09:42:58.000Z | # -*- coding: utf-8 -*-
"""
CentralReport - Webservices module
Contains all entities used with webservices.
https://github.com/CentralReport/
"""
| 16.619048 | 55 | 0.570201 | # -*- coding: utf-8 -*-
"""
CentralReport - Webservices module
Contains all entities used with webservices.
https://github.com/CentralReport/
"""
class Answer:
"""
This entity contains the result of a webservice
"""
def __init__(self):
self.code = 0
self.headers ... | 0 | 0 | 0 | 160 | 0 | 0 | 0 | 0 | 23 |
fa2bc6d2e6eec067fced03803a68cd7f14feebea | 3,001 | py | Python | openfl-workspace/keras_cnn_mnist/code/keras_cnn.py | nalinigans/federated-inference | 919be633ebe24525f5606fe60428e46344fb654f | [
"Apache-2.0"
] | null | null | null | openfl-workspace/keras_cnn_mnist/code/keras_cnn.py | nalinigans/federated-inference | 919be633ebe24525f5606fe60428e46344fb654f | [
"Apache-2.0"
] | null | null | null | openfl-workspace/keras_cnn_mnist/code/keras_cnn.py | nalinigans/federated-inference | 919be633ebe24525f5606fe60428e46344fb654f | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2020-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
"""You may copy this file as the starting point of your own model."""
| 32.268817 | 92 | 0.584805 | # Copyright (C) 2020-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
"""You may copy this file as the starting point of your own model."""
import tensorflow.keras as ke
import os.path
from tensorflow.keras import Sequential
from tensorflow.keras.layers import Conv2D, Flatten, Dense
from openfl.federated... | 0 | 0 | 0 | 2,633 | 0 | 0 | 0 | 79 | 135 |
4cbc7ecf383a11b61e7c715113558046bb0918f1 | 902 | py | Python | Python3/153.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 854 | 2018-11-09T08:06:16.000Z | 2022-03-31T06:05:53.000Z | Python3/153.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 29 | 2019-06-02T05:02:25.000Z | 2021-11-15T04:09:37.000Z | Python3/153.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 347 | 2018-12-23T01:57:37.000Z | 2022-03-12T14:51:21.000Z | __________________________________________________________________________________________________
sample 28 ms submission
__________________________________________________________________________________________________
sample 13016 kb submission
_______________________________________________________________________... | 36.08 | 98 | 0.644124 | __________________________________________________________________________________________________
sample 28 ms submission
class Solution:
def findMin(self, nums: List[int]) -> int:
left = 0
right = len(nums) - 1
while left < right:
mid = (left + right) // 2
... | 0 | 0 | 0 | 510 | 0 | 0 | 0 | 0 | 44 |
f78c1f45818b976cea5fcc85490e55bbf431a264 | 900 | py | Python | tests/snapshots/snap_test_definition_parser.py | mirumee/ariadne-graphql-modules | f95a48f428a49aa39d41ec91a2dac647b6869f86 | [
"BSD-3-Clause"
] | null | null | null | tests/snapshots/snap_test_definition_parser.py | mirumee/ariadne-graphql-modules | f95a48f428a49aa39d41ec91a2dac647b6869f86 | [
"BSD-3-Clause"
] | null | null | null | tests/snapshots/snap_test_definition_parser.py | mirumee/ariadne-graphql-modules | f95a48f428a49aa39d41ec91a2dac647b6869f86 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# snapshottest: v1 - https://goo.gl/zC4yUc
from __future__ import unicode_literals
from snapshottest import GenericRepr, Snapshot
snapshots = Snapshot()
snapshots['test_definition_parser_raises_error_schema_str_contains_multiple_types 1'] = GenericRepr("<ExceptionInfo ValueError('MyType clas... | 60 | 285 | 0.817778 | # -*- coding: utf-8 -*-
# snapshottest: v1 - https://goo.gl/zC4yUc
from __future__ import unicode_literals
from snapshottest import GenericRepr, Snapshot
snapshots = Snapshot()
snapshots['test_definition_parser_raises_error_schema_str_contains_multiple_types 1'] = GenericRepr("<ExceptionInfo ValueError('MyType clas... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f306580096564e00743b86848f93c6971401fe64 | 4,423 | py | Python | code/data_analysis.py | Jackylinelein/MLinPractice | b4bf560cc14b52a7676ed338a01e5aed4cab7d3a | [
"MIT"
] | 1 | 2021-10-04T07:31:34.000Z | 2021-10-04T07:31:34.000Z | code/data_analysis.py | Jackylinelein/MLinPractice | b4bf560cc14b52a7676ed338a01e5aed4cab7d3a | [
"MIT"
] | 2 | 2021-10-05T12:19:49.000Z | 2021-10-05T14:16:38.000Z | code/data_analysis.py | Jackylinelein/MLinPractice | b4bf560cc14b52a7676ed338a01e5aed4cab7d3a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 7 13:01:20 2021
@author: Hendrik Timm
"""
# plotting with matplotlib
# create graphs for every extracted feature
| 39.491071 | 118 | 0.494461 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 7 13:01:20 2021
@author: Hendrik Timm
"""
# plotting with matplotlib
import pickle
from matplotlib import pyplot as plt
import numpy as np
# create graphs for every extracted feature
def plot():
plot_str = "No"
plot_str = input("Do ... | 0 | 0 | 0 | 0 | 0 | 4,106 | 0 | 4 | 88 |
f692c27647947a0c2ee520a78b2fc624cbefe6b8 | 109 | py | Python | config.py | ZemlyakovDmitry/vaccine-gorzdrav-bot | 2021ee0ffef84a0955aa1fe5c3d71250edb97885 | [
"MIT"
] | null | null | null | config.py | ZemlyakovDmitry/vaccine-gorzdrav-bot | 2021ee0ffef84a0955aa1fe5c3d71250edb97885 | [
"MIT"
] | null | null | null | config.py | ZemlyakovDmitry/vaccine-gorzdrav-bot | 2021ee0ffef84a0955aa1fe5c3d71250edb97885 | [
"MIT"
] | null | null | null | lpu = "LPU"
speciality = "SPECIALLITY"
token = "TOKEN"
chat_id = "CHAT_NAME" # if u re planing to send
| 21.8 | 50 | 0.651376 | lpu = "LPU"
speciality = "SPECIALLITY"
token = "TOKEN"
chat_id = "CHAT_NAME" # if u re planing to send
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9ae91868ce8670a647081e0309878b37496c7def | 1,795 | py | Python | weakly-supvervized-temp/baseline/data_analysis.py | nileshkulkarni/vlr-project | 9393aeb5c7134662caf2951318e310692f5dfc51 | [
"MIT"
] | null | null | null | weakly-supvervized-temp/baseline/data_analysis.py | nileshkulkarni/vlr-project | 9393aeb5c7134662caf2951318e310692f5dfc51 | [
"MIT"
] | null | null | null | weakly-supvervized-temp/baseline/data_analysis.py | nileshkulkarni/vlr-project | 9393aeb5c7134662caf2951318e310692f5dfc51 | [
"MIT"
] | null | null | null | import torch
from baseline.utils.parser import get_opts
if __name__ == "__main__":
opts = get_opts()
main(opts)
| 26.397059 | 79 | 0.697493 | import torch
import torch.nn
import os.path as osp
from baseline.utils.parser import get_opts
from baseline.nnutils.stream_modules import ActionClassification
from baseline.data.ucf101 import UCF101Temporal, split
from baseline.logger import Logger
from tqdm import tqdm
import pdb
from tensorboardX import SummaryWriter... | 0 | 0 | 0 | 0 | 0 | 1,199 | 0 | 139 | 334 |
7baee6bc9e1d94ff7ccd0aa6e5c40df0e073f3a6 | 1,275 | py | Python | LED/welcome.py | longyuxi/2019-genas-china-smart-device | fbe21bb28fac8ee756b83848dbfd701664317fe6 | [
"MIT"
] | 2 | 2019-09-23T01:47:14.000Z | 2020-09-18T21:55:44.000Z | LED/welcome.py | longyuxi/2019-genas-china-smart-device | fbe21bb28fac8ee756b83848dbfd701664317fe6 | [
"MIT"
] | null | null | null | LED/welcome.py | longyuxi/2019-genas-china-smart-device | fbe21bb28fac8ee756b83848dbfd701664317fe6 | [
"MIT"
] | null | null | null | import RPi.GPIO as GPIO # Import GPIO Module
from time import sleep # Import sleep Module for timing
BUTTON_PIN = 21
LED_PIN = 20
GPIO.setmode(GPIO.BCM) # Configures pin numbering to Broadcom reference
GPIO.setwarnings(False) # Disable Warnings
GPIO.setup(LED_PIN, GPIO.OUT) #Set our GPIO pin to output
GPIO.outp... | 33.552632 | 107 | 0.65098 | import RPi.GPIO as GPIO # Import GPIO Module
from time import sleep # Import sleep Module for timing
BUTTON_PIN = 21
LED_PIN = 20
GPIO.setmode(GPIO.BCM) # Configures pin numbering to Broadcom reference
GPIO.setwarnings(False) # Disable Warnings
GPIO.setup(LED_PIN, GPIO.OUT) #Set our GPIO pin to output
GPIO.outp... | 0 | 0 | 0 | 0 | 0 | 577 | 0 | 0 | 23 |
c4f7a125dec4c2a39d52ca2a5b70b271d15ae08d | 19,965 | py | Python | tests/utils/test_task_group.py | yang040840219/airflow | c73d9e09cc650374e975ba287e9ed8ea59cde51a | [
"Apache-2.0"
] | 2 | 2020-10-23T18:55:03.000Z | 2021-07-13T04:45:49.000Z | tests/utils/test_task_group.py | yang040840219/airflow | c73d9e09cc650374e975ba287e9ed8ea59cde51a | [
"Apache-2.0"
] | 14 | 2019-12-03T02:54:42.000Z | 2020-02-27T16:08:10.000Z | tests/utils/test_task_group.py | yang040840219/airflow | c73d9e09cc650374e975ba287e9ed8ea59cde51a | [
"Apache-2.0"
] | 2 | 2020-10-23T18:55:05.000Z | 2022-02-16T21:53:10.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 35.524911 | 94 | 0.515753 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 0 | 178 | 0 | 0 | 0 | 7,011 | 0 | 12 | 275 |
7c582f53490ad6632ef4134d570f8bb6a3d1e257 | 4,632 | py | Python | aspen/network_engines/tornado_.py | marcusrbrown/aspen | 5229bef0d9c76ec1c990532e8d4f8e8a858d3724 | [
"MIT"
] | 1 | 2021-07-07T11:49:35.000Z | 2021-07-07T11:49:35.000Z | aspen/network_engines/tornado_.py | marcusrbrown/aspen | 5229bef0d9c76ec1c990532e8d4f8e8a858d3724 | [
"MIT"
] | null | null | null | aspen/network_engines/tornado_.py | marcusrbrown/aspen | 5229bef0d9c76ec1c990532e8d4f8e8a858d3724 | [
"MIT"
] | null | null | null | import tornado.ioloop
import tornado.httpserver
| 27.903614 | 78 | 0.604491 | import collections
import time
from aspen.network_engines import CooperativeEngine
from aspen.sockets import packet
from aspen.sockets.loop import Die
import tornado.ioloop
import tornado.httpserver
import tornado.wsgi
class TornadoBuffer(collections.deque):
"""Model a buffer of items.
There are two of thes... | 0 | 0 | 0 | 4,339 | 0 | 0 | 0 | 39 | 202 |
19d646ea28592ea79a40625b2731656f2fa3a9e0 | 20,542 | py | Python | keras_layers/keras_layer_AnchorBoxes.py | xuannianz/ssd_keras | 681e936b834b6a3786562ee8d22f7b07b409bd17 | [
"Apache-2.0"
] | 1 | 2019-10-30T06:53:48.000Z | 2019-10-30T06:53:48.000Z | keras_layers/keras_layer_AnchorBoxes.py | lylaaa/ssd_keras | 681e936b834b6a3786562ee8d22f7b07b409bd17 | [
"Apache-2.0"
] | null | null | null | keras_layers/keras_layer_AnchorBoxes.py | lylaaa/ssd_keras | 681e936b834b6a3786562ee8d22f7b07b409bd17 | [
"Apache-2.0"
] | 1 | 2019-11-17T07:02:26.000Z | 2019-11-17T07:02:26.000Z | """
A custom Keras layer to generate anchor boxes.
Copyright (C) 2018 Pierluigi Ferrari
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 requir... | 52.403061 | 120 | 0.616931 | """
A custom Keras layer to generate anchor boxes.
Copyright (C) 2018 Pierluigi Ferrari
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 requir... | 456 | 0 | 0 | 19,516 | 0 | 0 | 0 | 89 | 134 |
97e245ed5f521186c9e3a2d569108a49c82accc8 | 1,943 | py | Python | python/protectFlashblade/flashBladeProtectionStatus.py | ped998/scripts | 0dcaaf47f9676210e1c972a5d59d8d0de82a1d93 | [
"Apache-2.0"
] | null | null | null | python/protectFlashblade/flashBladeProtectionStatus.py | ped998/scripts | 0dcaaf47f9676210e1c972a5d59d8d0de82a1d93 | [
"Apache-2.0"
] | null | null | null | python/protectFlashblade/flashBladeProtectionStatus.py | ped998/scripts | 0dcaaf47f9676210e1c972a5d59d8d0de82a1d93 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Show FlashBlade Protection Status"""
# usage:
# ./flashBladeProtectionStatus.py -v mycluster \
# -u myuser \
# -d mydomain.net \
# -f flashblad01
# import pyhesity wrapper module
### command line ... | 33.5 | 108 | 0.683479 | #!/usr/bin/env python
"""Show FlashBlade Protection Status"""
# usage:
# ./flashBladeProtectionStatus.py -v mycluster \
# -u myuser \
# -d mydomain.net \
# -f flashblad01
# import pyhesity wrapper module
from pyhesity impo... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 22 |
7633f200fcfd7368b83bc146f6bff707f24c4998 | 505 | py | Python | fos/shader/shaderlib.py | fos/fos-legacy | db6047668781a0615abcebc7d55a7164f3105047 | [
"BSD-3-Clause"
] | 2 | 2016-08-03T10:33:08.000Z | 2021-06-23T18:50:14.000Z | fos/shader/shaderlib.py | fos/fos-legacy | db6047668781a0615abcebc7d55a7164f3105047 | [
"BSD-3-Clause"
] | null | null | null | fos/shader/shaderlib.py | fos/fos-legacy | db6047668781a0615abcebc7d55a7164f3105047 | [
"BSD-3-Clause"
] | null | null | null | """ Meaningful composition of shader programs exposed as a library """
__author__ = 'Stephan Gerhard'
import pyglet.gl as gl
# load the vary-line-width-shader
| 36.071429 | 99 | 0.69703 | """ Meaningful composition of shader programs exposed as a library """
__author__ = 'Stephan Gerhard'
from .shaders import Shader
from .lib import get_shader_code
import pyglet.gl as gl
# load the vary-line-width-shader
def get_vary_line_width_shader():
return Shader( [get_shader_code('propagatevertex130.vert')],... | 0 | 0 | 0 | 0 | 0 | 261 | 0 | 17 | 67 |
18dd335cf5cb8e93aa05da1e231e4638bd6752ac | 2,704 | py | Python | ems/migrations/0006_auto_20170924_2037.py | abhi20161997/Oasis-17 | 80618af478beb256502bf1b6c05e0a22068577c9 | [
"BSD-3-Clause"
] | null | null | null | ems/migrations/0006_auto_20170924_2037.py | abhi20161997/Oasis-17 | 80618af478beb256502bf1b6c05e0a22068577c9 | [
"BSD-3-Clause"
] | null | null | null | ems/migrations/0006_auto_20170924_2037.py | abhi20161997/Oasis-17 | 80618af478beb256502bf1b6c05e0a22068577c9 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-09-24 15:07
from __future__ import unicode_literals
| 25.509434 | 108 | 0.494453 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-09-24 15:07
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('ems', '0005_bitsian'),
]
operations = [
mi... | 0 | 0 | 0 | 2,492 | 0 | 0 | 0 | 30 | 68 |
befb9c12d9e5239ce20c5cc400ffd5ab90b3bd0d | 1,934 | py | Python | experimental/survey_of_surveys.py | TheMTank/arxiv-summariser | db4f1e42bcc9185e197a00a18e280a4a3011453c | [
"MIT"
] | 17 | 2018-11-26T23:06:20.000Z | 2022-01-18T21:43:17.000Z | experimental/survey_of_surveys.py | TheMTank/arxiv-summariser | db4f1e42bcc9185e197a00a18e280a4a3011453c | [
"MIT"
] | 3 | 2018-11-27T12:17:20.000Z | 2019-02-05T11:40:44.000Z | experimental/survey_of_surveys.py | TheMTank/arxiv-summariser | db4f1e42bcc9185e197a00a18e280a4a3011453c | [
"MIT"
] | 3 | 2019-03-06T10:14:08.000Z | 2020-01-21T17:26:20.000Z | import argparse
import re
import pickle
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split
# import stopwords
parser = argparse.ArgumentParser(description='')
parser.add_argument('--db-... | 32.233333 | 99 | 0.729576 | import argparse
import re
import pickle
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split
# import stopwords
parser = argparse.ArgumentParser(description='')
parser.add_argument('--db-... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e643d9f6daf265d5cae46719f9ebaa464934a8c2 | 3,979 | py | Python | finetuning_model.py | remstef/naacl_transfer_learning_tutorial | 909f00c2b69fe223f1c532945809e6290fa36b12 | [
"MIT"
] | 5 | 2019-05-08T09:51:49.000Z | 2020-12-18T03:42:25.000Z | finetuning_model.py | singleheart/naacl_transfer_learning | 68884a0842cac32c41273c9bc36260080b9d2148 | [
"MIT"
] | 1 | 2019-06-06T09:50:42.000Z | 2019-06-06T09:50:42.000Z | finetuning_model.py | singleheart/naacl_transfer_learning | 68884a0842cac32c41273c9bc36260080b9d2148 | [
"MIT"
] | 1 | 2020-11-13T13:45:21.000Z | 2020-11-13T13:45:21.000Z | import torch.nn as nn
| 50.367089 | 127 | 0.62101 | import importlib
import torch
import torch.nn as nn
from pretraining_model import Transformer, TransformerWithLMHead
class TransformerWithAdapters(Transformer):
def __init__(self, adapters_dim, embed_dim, hidden_dim, num_embeddings, num_max_positions, num_heads, num_layers, dropout):
""" Transformer with ... | 0 | 0 | 0 | 3,814 | 0 | 0 | 0 | 29 | 113 |
f7f8f3bfd951108aa64a2bda82e8cf60541c50a4 | 3,942 | py | Python | FER_osc.py | jaegonlee/fer | 628651d88568103f5b2b3e081d5c6b5dab39267d | [
"MIT"
] | null | null | null | FER_osc.py | jaegonlee/fer | 628651d88568103f5b2b3e081d5c6b5dab39267d | [
"MIT"
] | null | null | null | FER_osc.py | jaegonlee/fer | 628651d88568103f5b2b3e081d5c6b5dab39267d | [
"MIT"
] | null | null | null | #!/usr/local/bin/python3
import cv2
import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
from pythonosc import udp_client
#parser = argparse.ArgumentParser()
#parser.add_argument("source")
#parser.add_argument("fps")
#args = parser.parse_args()
cap = cv2.VideoCapture(0)#os.path.abspath(args.source) if not args.source == ... | 36.841121 | 112 | 0.637494 | #!/usr/local/bin/python3
from keras.models import model_from_json
import numpy as np
import cv2
import argparse
import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
import math
from pythonosc import udp_client
class FacialExpressionModel(object):
EMOTIONS_LIST = ["Angry", "Disgust", "Fear", "Happy", "Sad", "Surprise... | 0 | 0 | 0 | 649 | 0 | 2,016 | 0 | 0 | 158 |
84b66a37064604881c5102d6378ffcbfd4e2dbf0 | 3,077 | py | Python | scripts/tests/py_onnx/keras/export_scripts/lstm_keras_export.py | lauracanalini/eddl | c5efac642e8e1f99b31dfaaacd0a5a058b09923b | [
"MIT"
] | 30 | 2019-10-11T21:03:43.000Z | 2022-02-17T19:56:15.000Z | scripts/tests/py_onnx/keras/export_scripts/lstm_keras_export.py | lauracanalini/eddl | c5efac642e8e1f99b31dfaaacd0a5a058b09923b | [
"MIT"
] | 151 | 2019-10-16T06:47:23.000Z | 2022-03-07T15:15:58.000Z | scripts/tests/py_onnx/keras/export_scripts/lstm_keras_export.py | lauracanalini/eddl | c5efac642e8e1f99b31dfaaacd0a5a058b09923b | [
"MIT"
] | 20 | 2019-10-16T09:37:37.000Z | 2022-02-22T09:47:14.000Z | import argparse
import keras2onnx
from tensorflow.keras.preprocessing import sequence
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Embedding, Input
from tensorflow.keras.layers import LSTM
from tensorflow.keras.datasets import imdb
# Training settings
parser = argparse.Argu... | 41.026667 | 101 | 0.690933 | import os
import argparse
import keras2onnx
from tensorflow.keras.preprocessing import sequence
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Embedding, Input
from tensorflow.keras.layers import LSTM
from tensorflow.keras.datasets import imdb
# Training settings
parser = arg... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -12 | 22 |
46c760009b32acc461c93e6810212059ac4fd7de | 2,005 | py | Python | plugins/suspicious_constants/plugin.py | 4k4xs4pH1r3/flashmingo | bb905ff757805a5a832977d44991152c8aa8771a | [
"Apache-2.0"
] | 124 | 2019-04-15T17:32:11.000Z | 2021-09-11T21:41:29.000Z | plugins/suspicious_constants/plugin.py | 4k4xs4pH1r3/flashmingo | bb905ff757805a5a832977d44991152c8aa8771a | [
"Apache-2.0"
] | 3 | 2019-04-18T05:32:22.000Z | 2021-06-12T02:04:22.000Z | plugins/suspicious_constants/plugin.py | 4k4xs4pH1r3/flashmingo | bb905ff757805a5a832977d44991152c8aa8771a | [
"Apache-2.0"
] | 37 | 2019-04-16T01:22:54.000Z | 2021-07-31T21:03:25.000Z | # coding: utf-8
# Copyright(C) 2019 FireEye, Inc. All Rights Reserved.
#
# FLASHMINGO!
# This finds suspicious constants in the constant pool(s)
import logging
| 26.038961 | 77 | 0.608479 | # coding: utf-8
# Copyright(C) 2019 FireEye, Inc. All Rights Reserved.
#
# FLASHMINGO!
# This finds suspicious constants in the constant pool(s)
import os
import logging
import logging.handlers
class Plugin:
"""
All plugins work on a SWFObject passed
as an argument
"""
def __init__(self, swf=No... | 0 | 0 | 0 | 1,786 | 0 | 0 | 0 | -10 | 68 |
dc6d15ce816999763d04b32f5abd83ba6236a0f7 | 546 | py | Python | magz/lagrange1.py | bru32/magz | 541e0a5774d51251ce25bf326cdce0c615f347c3 | [
"MIT"
] | null | null | null | magz/lagrange1.py | bru32/magz | 541e0a5774d51251ce25bf326cdce0c615f347c3 | [
"MIT"
] | null | null | null | magz/lagrange1.py | bru32/magz | 541e0a5774d51251ce25bf326cdce0c615f347c3 | [
"MIT"
] | null | null | null | """
1D interpolation by Lagrange method.
Bruce Wernick
10 June 2021
"""
def lagrange1d(X, Y):
"1D Lagrange interpolation"
n = len(X)
return f
# ---------------------------------------------------------------------
if __name__ == '__main__':
x = [1,2,3,4,5]
y = [2,4,6,8,10]
fx = lagran... | 18.2 | 72 | 0.408425 | """
1D interpolation by Lagrange method.
Bruce Wernick
10 June 2021
"""
def lagrange1d(X, Y):
"1D Lagrange interpolation"
n = len(X)
def f(x):
s = 0.0
for i in range(n):
q = 1.0
for j in range(n):
if i == j: continue
q *= (x - X[j]) / (X[i] - X[j])
s += Y... | 0 | 0 | 0 | 0 | 0 | 171 | 0 | 0 | 25 |
af94ac9b2fa3ebdaa065476a938eec3047602959 | 1,698 | py | Python | mfw/crawler.py | leishufei/JS-Crack | 6a4a6c3b5dfee23ea9524da1e5521cece0098562 | [
"MIT"
] | 53 | 2021-04-02T08:20:15.000Z | 2022-03-25T06:51:50.000Z | mfw/crawler.py | wenxuefeng3930/JS-Crack-Records | 6a4a6c3b5dfee23ea9524da1e5521cece0098562 | [
"MIT"
] | 1 | 2021-11-15T05:36:24.000Z | 2021-11-15T05:36:24.000Z | mfw/crawler.py | wenxuefeng3930/JS-Crack-Records | 6a4a6c3b5dfee23ea9524da1e5521cece0098562 | [
"MIT"
] | 17 | 2021-04-06T01:49:41.000Z | 2022-03-29T15:13:54.000Z | #!usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 2021/2/5
# @Author : Shufei Lei
# @Software : PyCharm
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4144.2 Safari/537.36'
}
url = 'http://www.mafengwo.cn/i/21452824.html'
get_ht... | 26.123077 | 140 | 0.596584 | #!usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 2021/2/5
# @Author : Shufei Lei
# @Software : PyCharm
import hashlib
import requests
import execjs
import re
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4144.2 Safari/537.36'
}
de... | 0 | 0 | 0 | 0 | 0 | 1,223 | 0 | -33 | 180 |
9e89d30b44b07189ada456351e9b8c9da13fbe37 | 2,213 | py | Python | python/src/hsd/common.py | bhourahine/hsdparser | 766898c224fe0ed192e25d75e2e5c656407c8473 | [
"BSD-2-Clause"
] | null | null | null | python/src/hsd/common.py | bhourahine/hsdparser | 766898c224fe0ed192e25d75e2e5c656407c8473 | [
"BSD-2-Clause"
] | null | null | null | python/src/hsd/common.py | bhourahine/hsdparser | 766898c224fe0ed192e25d75e2e5c656407c8473 | [
"BSD-2-Clause"
] | null | null | null | HSDATTR_PROC = "processed"
HSDATTR_EQUAL = "equal"
HSDATTR_FILE = "file"
HSDATTR_LINE = "lines"
def unquote(txt):
"""Giving string without quotes if enclosed in those."""
if len(txt) >= 2 and (txt[0] in "\"'") and txt[-1] == txt[0]:
return txt[1:-1]
else:
return txt
def splitbycharset(... | 32.072464 | 78 | 0.668775 | HSDATTR_PROC = "processed"
HSDATTR_EQUAL = "equal"
HSDATTR_FILE = "file"
HSDATTR_LINE = "lines"
class HSDException(Exception):
"""Base class for exceptions in the HSD packages."""
pass
class HSDQueryError(HSDException):
"""Base class for errors detected by the HSDQuery object.
Attributes:
... | 0 | 0 | 0 | 951 | 0 | 0 | 0 | 0 | 206 |
ce9b658e8978a05af30c1fe0f27167faec4c473f | 93 | py | Python | git_stalk/__init__.py | aashutoshrathi/git-stalk-cli | 556b4873ca2aec1db43c7a190e4ee4add903c3f3 | [
"MIT"
] | 49 | 2018-06-01T18:47:22.000Z | 2020-10-12T12:56:16.000Z | git_stalk/__init__.py | aashutoshrathi/git-stalk-cli | 556b4873ca2aec1db43c7a190e4ee4add903c3f3 | [
"MIT"
] | 63 | 2018-06-01T18:49:23.000Z | 2020-09-25T23:12:52.000Z | git_stalk/__init__.py | aashutoshrathi/git-stalk-cli | 556b4873ca2aec1db43c7a190e4ee4add903c3f3 | [
"MIT"
] | 47 | 2018-06-06T12:37:15.000Z | 2020-03-17T18:12:41.000Z | __version__ = '1.6.0'
__author__ = 'Aashutosh Rathi <aashutoshrathi@gmail.com>'
__all__ = []
| 23.25 | 57 | 0.72043 | __version__ = '1.6.0'
__author__ = 'Aashutosh Rathi <aashutoshrathi@gmail.com>'
__all__ = []
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
63b4af9976d9e3a7e21f04f174376781c27379c3 | 502 | py | Python | software/perception/mfallon_sandbox/python/matchShapes.py | liangfok/oh-distro | eeee1d832164adce667e56667dafc64a8d7b8cee | [
"BSD-3-Clause"
] | 92 | 2016-01-14T21:03:50.000Z | 2021-12-01T17:57:46.000Z | software/perception/mfallon_sandbox/python/matchShapes.py | liangfok/oh-distro | eeee1d832164adce667e56667dafc64a8d7b8cee | [
"BSD-3-Clause"
] | 62 | 2016-01-16T18:08:14.000Z | 2016-03-24T15:16:28.000Z | software/perception/mfallon_sandbox/python/matchShapes.py | liangfok/oh-distro | eeee1d832164adce667e56667dafc64a8d7b8cee | [
"BSD-3-Clause"
] | 41 | 2016-01-14T21:26:58.000Z | 2022-03-28T03:10:39.000Z | # http://docs.opencv.org/trunk/doc/py_tutorials/py_imgproc/py_contours/py_contours_more_functions/py_contours_more_functions.html
import cv2
import numpy as np
img1 = cv2.imread('a.jpg',0)
img2 = cv2.imread('a.jpg',0)
ret, thresh = cv2.threshold(img1, 127, 255,0)
ret, thresh2 = cv2.threshold(img2, 127, 255,0)
contour... | 29.529412 | 129 | 0.760956 | # http://docs.opencv.org/trunk/doc/py_tutorials/py_imgproc/py_contours/py_contours_more_functions/py_contours_more_functions.html
import cv2
import numpy as np
img1 = cv2.imread('a.jpg',0)
img2 = cv2.imread('a.jpg',0)
ret, thresh = cv2.threshold(img1, 127, 255,0)
ret, thresh2 = cv2.threshold(img2, 127, 255,0)
contour... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
87a5a831556aefcaa4c8b4bcfe5a267413fb571a | 7,055 | py | Python | tests/test_mergeSTR/test_mergeSTR.py | richyanicky/TRTools | 6582912ad3fade6e905b78b08c991a08baca8649 | [
"MIT"
] | null | null | null | tests/test_mergeSTR/test_mergeSTR.py | richyanicky/TRTools | 6582912ad3fade6e905b78b08c991a08baca8649 | [
"MIT"
] | null | null | null | tests/test_mergeSTR/test_mergeSTR.py | richyanicky/TRTools | 6582912ad3fade6e905b78b08c991a08baca8649 | [
"MIT"
] | null | null | null | import os, sys
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), '..','..'))
TESTDIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "test_files")
COMMDIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "common")
DUMPDIR = os.path.join(COMMDIR, "dump")
VCFDIR = os.... | 35.631313 | 106 | 0.676967 | import argparse
import os, sys
import numpy as np
import pytest
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), '..','..'))
from mergeSTR import *
TESTDIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "test_files")
COMMDIR = os.path.join(os.path.dirname(os.path.abspath(__file_... | 0 | 0 | 0 | 181 | 0 | 4,840 | 0 | -16 | 336 |
aff464b48f2685ff86f5b7706c81eb8989162cf0 | 1,479 | py | Python | pilot/eventservice/esprocess/esmanager.py | anisyonk/pilot2 | f06cbf903e3f235d6fc504b54faa02006b95256d | [
"Apache-2.0"
] | 6 | 2018-05-09T12:08:51.000Z | 2021-12-22T06:45:11.000Z | pilot/eventservice/esprocess/esmanager.py | anisyonk/pilot2 | f06cbf903e3f235d6fc504b54faa02006b95256d | [
"Apache-2.0"
] | 133 | 2017-03-09T09:41:08.000Z | 2022-03-04T08:03:14.000Z | pilot/eventservice/esprocess/esmanager.py | anisyonk/pilot2 | f06cbf903e3f235d6fc504b54faa02006b95256d | [
"Apache-2.0"
] | 30 | 2017-01-17T09:29:02.000Z | 2022-03-03T21:27:33.000Z | #!/usr/bin/env python
# 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
#
# Authors:
# - Wen Guan, wen.guan@cern.ch, 2017
import logging
logger = lo... | 27.388889 | 78 | 0.657877 | #!/usr/bin/env python
# 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
#
# Authors:
# - Wen Guan, wen.guan@cern.ch, 2017
import logging
from pilot.... | 0 | 0 | 0 | 944 | 0 | 0 | 0 | 72 | 68 |
a79fbe9df49dcf4b912ee55b577fb517ca0ae760 | 3,649 | py | Python | Python/Canvas/LogWidget.py | yoann01/FabricUI | d4d24f25245b8ccd2d206aded2b6c5f2aca09155 | [
"BSD-3-Clause"
] | null | null | null | Python/Canvas/LogWidget.py | yoann01/FabricUI | d4d24f25245b8ccd2d206aded2b6c5f2aca09155 | [
"BSD-3-Clause"
] | null | null | null | Python/Canvas/LogWidget.py | yoann01/FabricUI | d4d24f25245b8ccd2d206aded2b6c5f2aca09155 | [
"BSD-3-Clause"
] | null | null | null | """
The LogWidget receives and saves logging output from the ScriptEditor.
"""
| 29.666667 | 81 | 0.642916 | """
The LogWidget receives and saves logging output from the ScriptEditor.
"""
from PySide import QtCore, QtGui
from FabricEngine.FabricUI import DFG, Actions
class AppendingTextWidget(QtGui.QTextEdit):
def __init__(self):
QtGui.QTextEdit.__init__(self)
self.setReadOnly(True)
self.prevCur... | 0 | 0 | 0 | 3,374 | 0 | 0 | 0 | 36 | 160 |
0a0e2d01bc07af337808eebccab3d04f8a9067af | 1,464 | py | Python | model/.ipynb_checkpoints/model-checkpoint.py | arnoldasjan/AirbnbPricePredictor | fae36ba25d3bb4163c69b1f4544270a1474b8d87 | [
"MIT"
] | null | null | null | model/.ipynb_checkpoints/model-checkpoint.py | arnoldasjan/AirbnbPricePredictor | fae36ba25d3bb4163c69b1f4544270a1474b8d87 | [
"MIT"
] | null | null | null | model/.ipynb_checkpoints/model-checkpoint.py | arnoldasjan/AirbnbPricePredictor | fae36ba25d3bb4163c69b1f4544270a1474b8d87 | [
"MIT"
] | null | null | null | import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_absolute_error
from sklearn.linear_model import Lasso
CATEGORICAL_FEATURES = ['city', 'country', 'apartment_type', 'bedrooms', 'baths', 'amenities', 'is_superhost']
data = pd.read_csv('airbnb_data.csv')
feature... | 40.666667 | 110 | 0.782787 | import pandas as pd
import numpy as np
from sklearn.preprocessing import OneHotEncoder
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_absolute_error
from sklearn.linear_model import ... | 0 | 0 | 0 | 0 | 0 | 387 | 0 | 78 | 111 |
0a05958af13d63a69624d83850d7a7a0bac43498 | 25,118 | py | Python | sdks/python/apache_beam/io/textio.py | Juta/beam | 1ba94354310ce1529195916344079f7fc90a25d1 | [
"Apache-2.0"
] | 4 | 2018-09-25T16:10:54.000Z | 2020-07-13T23:52:12.000Z | sdks/python/apache_beam/io/textio.py | Juta/beam | 1ba94354310ce1529195916344079f7fc90a25d1 | [
"Apache-2.0"
] | 41 | 2018-08-16T23:54:04.000Z | 2022-01-24T20:27:19.000Z | sdks/python/apache_beam/io/textio.py | Juta/beam | 1ba94354310ce1529195916344079f7fc90a25d1 | [
"Apache-2.0"
] | 2 | 2019-04-16T15:29:22.000Z | 2020-03-30T18:43:34.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 41.177049 | 97 | 0.697349 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 0 | 436 | 0 | 22,510 | 0 | 398 | 0 | 252 | 517 |
7923320b4ba1798c84a2c2297cf6c576554f4aee | 7,051 | py | Python | tests/test___init__.py | kade-robertson/config-better | c14638da3fe95a669a04db2602e1f6ea15591c36 | [
"MIT"
] | 1 | 2019-05-21T15:15:48.000Z | 2019-05-21T15:15:48.000Z | tests/test___init__.py | kade-robertson/config-better | c14638da3fe95a669a04db2602e1f6ea15591c36 | [
"MIT"
] | 8 | 2019-03-19T14:18:43.000Z | 2020-01-10T20:30:09.000Z | tests/test___init__.py | kade-robertson/config-better | c14638da3fe95a669a04db2602e1f6ea15591c36 | [
"MIT"
] | null | null | null | import unittest
if __name__ == '__main__':
unittest.main()
| 33.736842 | 85 | 0.665579 | import os
import shutil
import sys
import tempfile
import unittest
import configbetter
class TestMakedirs(unittest.TestCase):
@classmethod
def setUpClass(cls):
configbetter.sys.platform = sys.platform
cls.tempdir = tempfile.mkdtemp()
if sys.platform in ['linux', 'darwin']:
... | 0 | 3,218 | 0 | 3,522 | 0 | 0 | 0 | -39 | 280 |
bdca1a02efa1d9d3e62b35cade2f5f3f64bedbd3 | 499 | py | Python | menu/create_account.py | vlegoff/mud | 88c9b6f020148e3fc9f3a58c372a0907e89384ff | [
"BSD-3-Clause"
] | null | null | null | menu/create_account.py | vlegoff/mud | 88c9b6f020148e3fc9f3a58c372a0907e89384ff | [
"BSD-3-Clause"
] | null | null | null | menu/create_account.py | vlegoff/mud | 88c9b6f020148e3fc9f3a58c372a0907e89384ff | [
"BSD-3-Clause"
] | null | null | null | """
This module contains the 'create_account' node menu.
"""
def create_account(caller):
"""Create a new account.
This node simply prompts the user to enter a username.
The input is redirected to 'create_username'.
"""
text = "Enter your new account's name."
options = (
{
... | 20.791667 | 58 | 0.589178 | """
This module contains the 'create_account' node menu.
"""
from textwrap import dedent
def create_account(caller):
"""Create a new account.
This node simply prompts the user to enter a username.
The input is redirected to 'create_username'.
"""
text = "Enter your new account's name."
opt... | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 23 |
72b336222491d2716908ae84ae574e1e2421bc43 | 4,420 | py | Python | Day07/Day7_Prob2_Amplification_Feedback.py | guilhermebaos/AoC-2020-Python-Solution | 4d473e254b88bacd728338f94788d5592776c4ff | [
"MIT"
] | null | null | null | Day07/Day7_Prob2_Amplification_Feedback.py | guilhermebaos/AoC-2020-Python-Solution | 4d473e254b88bacd728338f94788d5592776c4ff | [
"MIT"
] | null | null | null | Day07/Day7_Prob2_Amplification_Feedback.py | guilhermebaos/AoC-2020-Python-Solution | 4d473e254b88bacd728338f94788d5592776c4ff | [
"MIT"
] | null | null | null | from IntCode import intcode_day7
memory_puzzle = [3, 8, 1001, 8, 10, 8, 105, 1, 0, 0, 21, 34, 47, 72, 93, 110, 191, 272, 353, 434, 99999, 3, 9, 102, 3, 9, 9, 1001, 9, 3, 9, 4, 9, 99, 3, 9, 102, 4, 9, 9, 1001, 9, 4, 9, 4, 9, 99, 3, 9, 101, 3, 9, 9, 1002, 9, 3, 9, 1001, 9, 2, 9, 1002, 9, 2, 9, 101, 4, 9, 9, 4, 9, 99, 3,... | 72.459016 | 1,761 | 0.479638 | from IntCode import intcode_day7
from time import sleep
memory_puzzle = [3, 8, 1001, 8, 10, 8, 105, 1, 0, 0, 21, 34, 47, 72, 93, 110, 191, 272, 353, 434, 99999, 3, 9, 102, 3, 9, 9, 1001, 9, 3, 9, 4, 9, 99, 3, 9, 102, 4, 9, 9, 1001, 9, 4, 9, 4, 9, 99, 3, 9, 101, 3, 9, 9, 1002, 9, 3, 9, 1001, 9, 2, 9, 1002, 9, 2, 9, 101... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 22 |
7b4a50239e715500cec44783d36cfa5729203f8d | 6,385 | py | Python | nodes.py | rpav/io_scene_consmodel | 3d7ff8a729f0f51f66829e0c664a2368295a9d8e | [
"BSD-2-Clause"
] | null | null | null | nodes.py | rpav/io_scene_consmodel | 3d7ff8a729f0f51f66829e0c664a2368295a9d8e | [
"BSD-2-Clause"
] | 1 | 2018-05-05T16:31:07.000Z | 2018-05-05T16:40:05.000Z | nodes.py | rpav/io_scene_consmodel | 3d7ff8a729f0f51f66829e0c664a2368295a9d8e | [
"BSD-2-Clause"
] | null | null | null | __all__ = ["make_node", "CM_Node"]
import bpy
import bmesh
import io_scene_consmodel.consmodel as consmodel
from io_scene_consmodel.util import (defencode)
# Nodes
# make_node
# Conspack regs
defencode(CM_Node, "node")
defencode(CM_Mesh, "mesh")
defencode(CM_Camera, "camera")
defencode(CM_LightPoint, "ligh... | 30.995146 | 120 | 0.568677 | __all__ = ["make_node", "CM_Node"]
import bpy
import bpy.types
import bpy_types
import bmesh
import bmesh.ops
import math
import mathutils
import pyconspack as cpk
from array import array
from pyconspack import Conspack
from mathutils import Matrix
import io_scene_consmodel.consmodel as consmodel
from io_scene_con... | 0 | 0 | 0 | 4,826 | 0 | 740 | 0 | 17 | 430 |
b7a4de2cb7220d8755bba2064bfcf5e1f8ac90f1 | 4,362 | py | Python | trame/assets/remote.py | Kitware/trame | 41c4d62e7a6f5dba41fd9305b314c87fa8ed7b6f | [
"Apache-2.0"
] | 42 | 2021-09-24T22:10:32.000Z | 2022-03-30T19:39:25.000Z | trame/assets/remote.py | Kitware/trame | 41c4d62e7a6f5dba41fd9305b314c87fa8ed7b6f | [
"Apache-2.0"
] | 31 | 2021-10-01T21:19:56.000Z | 2022-03-04T00:14:28.000Z | trame/assets/remote.py | Kitware/trame | 41c4d62e7a6f5dba41fd9305b314c87fa8ed7b6f | [
"Apache-2.0"
] | 7 | 2021-11-17T16:12:06.000Z | 2022-03-26T21:08:40.000Z |
__all__ = [
"AbstractRemoteFile",
"GoogleDriveFile",
"HttpFile",
]
| 30.71831 | 83 | 0.636864 | import os
from urllib.error import HTTPError
from urllib.request import urlretrieve
def download_file_from_google_drive(id, destination):
import requests
URL = "https://docs.google.com/uc"
session = requests.Session()
response = session.get(
URL, params={"id": id, "confirm": "t", "export": "... | 0 | 274 | 0 | 2,938 | 0 | 841 | 0 | 18 | 204 |
6941116b411cdfad70c28ec31c51954f694f69ef | 107 | py | Python | timus-online-judge/1068.py | aofleejay/coding-challenges | 2f29a173850fd544d3fbdc9c27369af792dc77fd | [
"MIT"
] | 1 | 2021-06-14T07:23:27.000Z | 2021-06-14T07:23:27.000Z | timus-online-judge/1068.py | aofleejay/coding-challenges | 2f29a173850fd544d3fbdc9c27369af792dc77fd | [
"MIT"
] | null | null | null | timus-online-judge/1068.py | aofleejay/coding-challenges | 2f29a173850fd544d3fbdc9c27369af792dc77fd | [
"MIT"
] | 1 | 2019-08-29T09:00:18.000Z | 2019-08-29T09:00:18.000Z | from sys import stdin
number = stdin.read()
print sum(range(min(int(number), 1), max(int(number), 1) + 1))
| 26.75 | 62 | 0.682243 | from sys import stdin
number = stdin.read()
print sum(range(min(int(number), 1), max(int(number), 1) + 1))
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |