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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
82fa0a041eb29566dcaf99ae0b138d182da6c4b2 | 7,264 | py | Python | Model.py | microstrongruan/Google-News-Sum | 498bbf03f74af062a18dccc9f9f9214e98aeff70 | [
"MIT"
] | null | null | null | Model.py | microstrongruan/Google-News-Sum | 498bbf03f74af062a18dccc9f9f9214e98aeff70 | [
"MIT"
] | null | null | null | Model.py | microstrongruan/Google-News-Sum | 498bbf03f74af062a18dccc9f9f9214e98aeff70 | [
"MIT"
] | null | null | null | import tensorflow as tf
model = Model()
import numpy as np
with tf.Session() as sess:
for i in range(10):
sess.run(tf.global_variables_initializer())
_1, _2 = sess.run([model.train_op, model.mean_loss], feed_dict={
model.encoder_input: np.random.randint(0, 100, [10, 20]),
mo... | 45.118012 | 116 | 0.640969 | import tensorflow as tf
import pickle
from LstmUnit import LstmUnit
from OutputUnit import OutputUnit
class Model(object):
def __init__(self):
self.batch_size = 10
self.num_hidden = 133
self.emb_size = 199
self.source_vocab = 2000
self.target_vocab = 2000
self.grad_c... | 0 | 0 | 0 | 6,602 | 0 | 0 | 0 | 12 | 89 |
db25f91a097d58c966af1b9eff22b9e765700c97 | 12,807 | py | Python | autoprocess/utils/xdsio.py | michel4j/auto-process | 9c011cef3cdc2fc55df31f9cac88c3e1074aa366 | [
"BSD-3-Clause"
] | null | null | null | autoprocess/utils/xdsio.py | michel4j/auto-process | 9c011cef3cdc2fc55df31f9cac88c3e1074aa366 | [
"BSD-3-Clause"
] | null | null | null | autoprocess/utils/xdsio.py | michel4j/auto-process | 9c011cef3cdc2fc55df31f9cac88c3e1074aa366 | [
"BSD-3-Clause"
] | null | null | null | """
Input/Output routines for XDS and file conversion utilities
"""
import os
import numpy
import multiprocessing
from autoprocess.utils import misc
DEFAULT_DELPHI = 8
if os.environ.get('DPS_NODES'):
HOSTS = {
x.split(':')[0]: int(x.split(':')[1]) for x in os.environ['DPS_NODES'].split()
}
else:
... | 38.344311 | 136 | 0.596393 | """
Input/Output routines for XDS and file conversion utilities
"""
import os
import numpy
import multiprocessing
from autoprocess.utils import misc
DEFAULT_DELPHI = 8
if os.environ.get('DPS_NODES'):
HOSTS = {
x.split(':')[0]: int(x.split(':')[1]) for x in os.environ['DPS_NODES'].split()
}
else:
... | 0 | 0 | 0 | 0 | 0 | 558 | 0 | 0 | 46 |
00c729a004103fc887f583f5b1f988c531c16fb2 | 1,212 | py | Python | joannas_vc_test.py | alagithub/Mattis-et-al.-2022 | 7a938275789b56f274eb78b04bb8efbfd30d7105 | [
"MIT"
] | null | null | null | joannas_vc_test.py | alagithub/Mattis-et-al.-2022 | 7a938275789b56f274eb78b04bb8efbfd30d7105 | [
"MIT"
] | null | null | null | joannas_vc_test.py | alagithub/Mattis-et-al.-2022 | 7a938275789b56f274eb78b04bb8efbfd30d7105 | [
"MIT"
] | 2 | 2022-01-16T15:27:25.000Z | 2022-01-18T07:47:32.000Z | import os
from pyabf import ABF
from analyze_abf import VCTestData
import numpy as np
ABF_LOCATION = r'C:\Users\mattisj\Desktop\9-Patching\GC juvenile Scn1a\VC test'
VC_TEST_OUTPUT_FILE = r'C:\Users\mattisj\Desktop\9-Patching\GC juvenile Scn1a\VC test GC juvenile Scn1a.csv'
if os.path.isdir(ABF_LOCATION):
abf_fil... | 35.647059 | 108 | 0.747525 | import os
from pyabf import ABF
from analyze_abf import VCTestData
import numpy as np
ABF_LOCATION = r'C:\Users\mattisj\Desktop\9-Patching\GC juvenile Scn1a\VC test'
VC_TEST_OUTPUT_FILE = r'C:\Users\mattisj\Desktop\9-Patching\GC juvenile Scn1a\VC test GC juvenile Scn1a.csv'
if os.path.isdir(ABF_LOCATION):
abf_fil... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b37e85fca017fa8ed8de31f1a14234d705e40176 | 21 | py | Python | .history/my_classes/FirstClassFunctions/MapFilterZipList_20210706140211.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/FirstClassFunctions/MapFilterZipList_20210706140211.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/FirstClassFunctions/MapFilterZipList_20210706140211.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | """Map Filter Zip """ | 21 | 21 | 0.571429 | """Map Filter Zip """ | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f958b925ae899413aa39d4957103809a107e3c0d | 71 | py | Python | Arknights/click_location/__init__.py | boatliuz/ArknightsAutoHelper | 2dd260b59b4734301dabb1b6793bba05a716517c | [
"MIT"
] | null | null | null | Arknights/click_location/__init__.py | boatliuz/ArknightsAutoHelper | 2dd260b59b4734301dabb1b6793bba05a716517c | [
"MIT"
] | null | null | null | Arknights/click_location/__init__.py | boatliuz/ArknightsAutoHelper | 2dd260b59b4734301dabb1b6793bba05a716517c | [
"MIT"
] | null | null | null | # coding: utf-8
| 17.75 | 53 | 0.802817 | # coding: utf-8
from Arknights.click_location.click_location import *
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 23 |
4828785f5daf752c30998b7182958b20db797008 | 2,319 | py | Python | cpu/jax/longest_common_subsequence.py | HiroakiMikami/benchmarks-of-deep-learning-libraries | a0ff9e50829321d3d6fa0ced3eb8fcc0ab4ea3a5 | [
"MIT"
] | null | null | null | cpu/jax/longest_common_subsequence.py | HiroakiMikami/benchmarks-of-deep-learning-libraries | a0ff9e50829321d3d6fa0ced3eb8fcc0ab4ea3a5 | [
"MIT"
] | null | null | null | cpu/jax/longest_common_subsequence.py | HiroakiMikami/benchmarks-of-deep-learning-libraries | a0ff9e50829321d3d6fa0ced3eb8fcc0ab4ea3a5 | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
main()
| 29.730769 | 89 | 0.579991 | import argparse
import json
import os
import time
import numpy as np
import jax.numpy as jnp
from jax import jit
from jax.lax import cond, fori_loop
def _length_of_longest_common_subsequence(str0: jnp.array, str1: jnp.array) -> jnp.array:
N = len(str0)
M = len(str1)
table = jnp.zeros(shape=(N + 1, M + 1)... | 0 | 0 | 0 | 0 | 0 | 2,081 | 0 | -27 | 223 |
f0f13a9d49c5b84521aa3e00bdcabe0c494853a7 | 7,535 | py | Python | python/paddle/fluid/tests/unittests/dist_save_load.py | ysh329/Paddle | 50ad9046c9a440564d104eaa354eb9df83a35678 | [
"Apache-2.0"
] | 1 | 2019-09-05T07:32:44.000Z | 2019-09-05T07:32:44.000Z | python/paddle/fluid/tests/unittests/dist_save_load.py | ysh329/Paddle | 50ad9046c9a440564d104eaa354eb9df83a35678 | [
"Apache-2.0"
] | 1 | 2019-05-26T14:23:24.000Z | 2019-05-26T14:23:51.000Z | python/paddle/fluid/tests/unittests/dist_save_load.py | ysh329/Paddle | 50ad9046c9a440564d104eaa354eb9df83a35678 | [
"Apache-2.0"
] | 1 | 2019-07-19T06:47:23.000Z | 2019-07-19T06:47:23.000Z | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 36.225962 | 96 | 0.586065 | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 0 | 0 | 0 | 6,243 | 0 | 0 | 0 | -10 | 377 |
8f2846168e0d2ea4e7e4f55bc21b078cd54f9482 | 980 | py | Python | color_classification_image.py | Ademboussetha/Person-Tracking | 729d9d39e54b45c8d6b27ed7e44dcec5f1564d16 | [
"MIT"
] | null | null | null | color_classification_image.py | Ademboussetha/Person-Tracking | 729d9d39e54b45c8d6b27ed7e44dcec5f1564d16 | [
"MIT"
] | null | null | null | color_classification_image.py | Ademboussetha/Person-Tracking | 729d9d39e54b45c8d6b27ed7e44dcec5f1564d16 | [
"MIT"
] | null | null | null | """
Developed by : Adem Boussetha
Email : ademboussetha@gmail.com
"""
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
global color | 29.69697 | 82 | 0.723469 | """
Developed by : Adem Boussetha
Email : ademboussetha@gmail.com
"""
#!/usr/bin/python
# -*- coding: utf-8 -*-
import cv2
from color_recognition_api import color_histogram_feature_extraction
from color_recognition_api import knn_classifier
import os
import os.path
import sys
global color
def getColor(imageinput):
... | 0 | 0 | 0 | 0 | 0 | 666 | 0 | 45 | 133 |
82a405414909b6dea1917ce2fcb6e6a022f2567d | 875 | py | Python | Backend/src/contract/migrations/0011_auto_20200519_1534.py | Valle1806/EnergyCorp | aba09105eedcb7dc694b201e50953e19e4e2936b | [
"MIT"
] | 1 | 2021-01-21T08:30:57.000Z | 2021-01-21T08:30:57.000Z | Backend/src/contract/migrations/0011_auto_20200519_1534.py | ChristianTaborda/Energycorp | 2447b5af211501450177b0b60852dcb31d6ca12d | [
"MIT"
] | null | null | null | Backend/src/contract/migrations/0011_auto_20200519_1534.py | ChristianTaborda/Energycorp | 2447b5af211501450177b0b60852dcb31d6ca12d | [
"MIT"
] | null | null | null | # Generated by Django 3.0.3 on 2020-05-19 15:34
| 27.34375 | 95 | 0.587429 | # Generated by Django 3.0.3 on 2020-05-19 15:34
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contract', '0010_auto_20200519_0155'),
]
operations = [
migrations.AddField(
model_name='invoice',
n... | 0 | 0 | 0 | 745 | 0 | 0 | 0 | 13 | 68 |
1128bb86ee87028a66987f7f624b7ef0d0dabbe5 | 974 | py | Python | setup.py | frogrammer/databricks-workspace-cleaner | 4658bdab8fa9bac3669dc7e06093b535cead50ff | [
"Apache-2.0"
] | null | null | null | setup.py | frogrammer/databricks-workspace-cleaner | 4658bdab8fa9bac3669dc7e06093b535cead50ff | [
"Apache-2.0"
] | null | null | null | setup.py | frogrammer/databricks-workspace-cleaner | 4658bdab8fa9bac3669dc7e06093b535cead50ff | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
from os import path
from cli import __version__
# https://packaging.python.org/guides/making-a-pypi-friendly-readme/
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md')) as f:
long_description = f.read()
setup(
nam... | 30.4375 | 80 | 0.697125 | from setuptools import setup, find_packages
from os import path
from cli import __version__
# https://packaging.python.org/guides/making-a-pypi-friendly-readme/
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md')) as f:
long_description = f.read()
setup(
nam... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cdd6f82a38246541f973d940552f26a43941067a | 1,524 | py | Python | brewgorithm/neural/beer2vec/demo.py | ZXVentures/brewgorithm_devkit | f207e0526cf75ab957dad1b4e9129237cc2236e0 | [
"MIT"
] | 1 | 2018-03-13T15:18:23.000Z | 2018-03-13T15:18:23.000Z | brewgorithm/neural/beer2vec/demo.py | ZXVentures/brewgorithm_devkit | f207e0526cf75ab957dad1b4e9129237cc2236e0 | [
"MIT"
] | null | null | null | brewgorithm/neural/beer2vec/demo.py | ZXVentures/brewgorithm_devkit | f207e0526cf75ab957dad1b4e9129237cc2236e0 | [
"MIT"
] | 1 | 2020-10-08T18:57:32.000Z | 2020-10-08T18:57:32.000Z |
if __name__ == "__main__":
run_demo()
| 35.44186 | 121 | 0.672572 | import numpy as np
from sklearn.metrics.pairwise import cosine_similarity
from .load import get_beer2vec
from .access_ext import beer_emb, word_weighter
def run_demo():
beer_labels = get_beer2vec()
beer_vectors = [beer['vector'] for beer in beer_labels]
while True:
text = input("Positive sentence: ")
... | 0 | 0 | 0 | 0 | 0 | 1,303 | 0 | 65 | 112 |
7000d619966974609cd47da90f2c0d6dbfe50725 | 45 | py | Python | src/mlscratch/arch/__init__.py | aicroe/mlscratch | 59100ea2a83fc8cd8ae617b686f6981d62073528 | [
"MIT"
] | null | null | null | src/mlscratch/arch/__init__.py | aicroe/mlscratch | 59100ea2a83fc8cd8ae617b686f6981d62073528 | [
"MIT"
] | 5 | 2019-10-16T03:15:19.000Z | 2019-12-14T19:38:43.000Z | src/mlscratch/arch/__init__.py | aicroe/mlscratch | 59100ea2a83fc8cd8ae617b686f6981d62073528 | [
"MIT"
] | null | null | null | """Arch's package."""
| 15 | 22 | 0.666667 | """Arch's package."""
from .arch import Arch
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 22 |
d0ba0c5bb8774036bcf5c7538b265ccbcb5df44e | 8,832 | py | Python | maps/migrations/0001_squashed_0011_auto_20161228_1520.py | ugoertz/django-familio | b3db5e508d98bedb32855e102c14218080b4dc01 | [
"BSD-3-Clause"
] | 3 | 2017-04-25T10:41:19.000Z | 2020-10-31T15:08:18.000Z | maps/migrations/0001_squashed_0011_auto_20161228_1520.py | ugoertz/django-familio | b3db5e508d98bedb32855e102c14218080b4dc01 | [
"BSD-3-Clause"
] | 2 | 2019-11-02T20:58:31.000Z | 2020-02-08T17:53:14.000Z | maps/migrations/0001_squashed_0011_auto_20161228_1520.py | ugoertz/django-familio | b3db5e508d98bedb32855e102c14218080b4dc01 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-30 20:11
from __future__ import unicode_literals
import django.contrib.gis.db.models.fields
import django.contrib.sites.managers
import django.db.models.deletion
| 46.240838 | 407 | 0.586957 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-30 20:11
from __future__ import unicode_literals
import django.contrib.gis.db.models.fields
import django.contrib.sites.managers
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager
import filebrowser.f... | 0 | 0 | 0 | 8,459 | 0 | 0 | 0 | 34 | 111 |
eb8daa7163e7ae2ccdf87838ad1461d2879b1f75 | 717 | py | Python | tests/test_evolutionary_forest.py | zhenlingcn/EvolutionaryForest | 0228dfed46401efd0d87ec37a527f127cd3bad78 | [
"BSD-3-Clause"
] | 25 | 2021-05-22T12:37:11.000Z | 2022-02-23T07:28:22.000Z | tests/test_evolutionary_forest.py | zhenlingcn/EvolutionaryForest | 0228dfed46401efd0d87ec37a527f127cd3bad78 | [
"BSD-3-Clause"
] | 26 | 2021-05-24T06:50:43.000Z | 2022-02-07T08:35:47.000Z | tests/test_evolutionary_forest.py | zhenlingcn/EvolutionaryForest | 0228dfed46401efd0d87ec37a527f127cd3bad78 | [
"BSD-3-Clause"
] | 4 | 2021-06-08T12:36:51.000Z | 2021-12-31T05:17:17.000Z | #!/usr/bin/env python
"""Tests for `evolutionary_forest` package."""
| 35.85 | 118 | 0.728033 | #!/usr/bin/env python
"""Tests for `evolutionary_forest` package."""
from numpy.testing import assert_almost_equal
from sklearn.datasets import make_regression
from sklearn.metrics import mean_squared_error
from evolutionary_forest.forest import EvolutionaryForestRegressor
def test_simple_data():
X, y = make_r... | 0 | 0 | 0 | 0 | 0 | 416 | 0 | 117 | 113 |
d1701d0e8a556c6fcf3a14d67d1959acc4711cec | 6,343 | py | Python | train_predict.py | yihshe/CIL_Road_Segmentation | 8133484ddace1e3ec25b96e9c890d8815133a1fc | [
"MIT"
] | 3 | 2021-11-16T10:12:04.000Z | 2021-11-22T01:45:58.000Z | train_predict.py | yihshe/CIL_Road_Segmentation | 8133484ddace1e3ec25b96e9c890d8815133a1fc | [
"MIT"
] | null | null | null | train_predict.py | yihshe/CIL_Road_Segmentation | 8133484ddace1e3ec25b96e9c890d8815133a1fc | [
"MIT"
] | 2 | 2021-11-16T10:12:55.000Z | 2021-11-21T08:33:00.000Z | #!/usr/bin/env python3
import numpy as np
np.random.seed(1)
import random
random.seed(1)
import os
import glob
import re
import skimage.io as io
import tensorflow as tf
tf.set_random_seed(1)
from tensorflow.keras.callbacks import ReduceLROnPlateau, ModelCheckpoint, EarlyStopping
from data import build_train_val, tra... | 38.91411 | 139 | 0.682169 | #!/usr/bin/env python3
import numpy as np
np.random.seed(1)
import random
random.seed(1)
import os
import glob
import re
import skimage.io as io
import tensorflow as tf
from tensorflow.keras.losses import binary_crossentropy
tf.set_random_seed(1)
from tensorflow.keras.callbacks import ReduceLROnPlateau, ModelCheckpoi... | 0 | 0 | 0 | 0 | 0 | 173 | 0 | 47 | 45 |
860c7d4dcb4df0c0e5a0feacec48196e91a016f8 | 4,038 | py | Python | homeassistant/components/ombi/__init__.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 3 | 2020-05-18T10:18:16.000Z | 2020-12-08T11:27:55.000Z | homeassistant/components/ombi/__init__.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 3 | 2018-01-23T20:41:55.000Z | 2018-01-23T20:42:12.000Z | homeassistant/components/ombi/__init__.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 6 | 2020-04-10T06:21:11.000Z | 2021-07-01T08:53:38.000Z | """Support for Ombi."""
import logging
import pyombi
import voluptuous as vol
from homeassistant.const import (CONF_API_KEY, CONF_HOST, CONF_PORT, CONF_SSL, CONF_USERNAME)
import homeassistant.helpers.config_validation as cv
from .const import (ATTR_NAME, ATTR_SEASON, CONF_URLBASE, DEFAULT_PORT, DEFAULT_SEASON, DEFA... | 26.92 | 86 | 0.616147 | """Support for Ombi."""
import logging
import pyombi
import voluptuous as vol
from homeassistant.const import (
CONF_API_KEY,
CONF_HOST,
CONF_PORT,
CONF_SSL,
CONF_USERNAME,
)
import homeassistant.helpers.config_validation as cv
from .const import (
ATTR_NAME,
ATTR_SEASON,
CONF_URLBASE... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0 |
9c89fe83e9025be71bfceb5b61bde27d5106c302 | 3,180 | py | Python | aiven_mysql_migrate/main.py | aiven/aiven-mysql-migrate | 88e2a12836cfcc4859652ec382eba41fdad43b03 | [
"Apache-2.0"
] | 7 | 2021-02-09T10:48:37.000Z | 2022-02-18T00:12:17.000Z | aiven_mysql_migrate/main.py | aiven/aiven-mysql-migrate | 88e2a12836cfcc4859652ec382eba41fdad43b03 | [
"Apache-2.0"
] | 4 | 2021-08-05T10:47:02.000Z | 2022-02-10T13:43:56.000Z | aiven_mysql_migrate/main.py | aiven/aiven-mysql-migrate | 88e2a12836cfcc4859652ec382eba41fdad43b03 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/
from aiven_mysql_migrate import config
from aiven_mysql_migrate.migration import MySQLMigrateMethod, MySQLMigration
import logging
LOGGER = logging.getLogger(__name__)
def main(args=None, *, app="mysql_migrate"):
"""Migrate MySQL database from so... | 37.857143 | 117 | 0.713522 | # Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/
from aiven_mysql_migrate import config
from aiven_mysql_migrate.migration import MySQLMigrateMethod, MySQLMigration
import logging
LOGGER = logging.getLogger(__name__)
def setup_logging(*, debug=False):
log_format = "%(asctime)s\t%(name)s\t%(level... | 0 | 0 | 0 | 0 | 0 | 199 | 0 | 0 | 23 |
1e947bc2f08b8d59380343fda354c8cc133a71c3 | 2,066 | py | Python | Content_SMH.py | anthonyeden/SMH.com.au-Command-Line-Interface | 60b2ea978c5003d89c8e6f53e5102028b8f9b07b | [
"MIT"
] | null | null | null | Content_SMH.py | anthonyeden/SMH.com.au-Command-Line-Interface | 60b2ea978c5003d89c8e6f53e5102028b8f9b07b | [
"MIT"
] | null | null | null | Content_SMH.py | anthonyeden/SMH.com.au-Command-Line-Interface | 60b2ea978c5003d89c8e6f53e5102028b8f9b07b | [
"MIT"
] | null | null | null | ##################################################
# Basic HTML fetching and parsing for SMH.com.au #
##################################################
| 27.184211 | 118 | 0.53243 | ##################################################
# Basic HTML fetching and parsing for SMH.com.au #
##################################################
import urllib2
from bs4 import BeautifulSoup
def fetchArticleIndex():
opener = urllib2.build_opener()
opener.addheaders = [('User-agent', 'SMH-Termina... | 0 | 0 | 0 | 0 | 0 | 1,818 | 0 | 1 | 91 |
3b2e7ae71cfe2e8fe096ca8367381bbc0e2df941 | 399 | py | Python | ABC/abc151-abc200/abc155/c.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 2 | 2020-06-12T09:54:23.000Z | 2021-05-04T01:34:07.000Z | ABC/abc151-abc200/abc155/c.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 961 | 2020-06-23T07:26:22.000Z | 2022-03-31T21:34:52.000Z | ABC/abc151-abc200/abc155/c.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
if __name__ == '__main__':
main()
| 17.347826 | 36 | 0.493734 | # -*- coding: utf-8 -*-
def main():
from collections import Counter
n = int(input())
s = [input() for _ in range(n)]
c = Counter(s)
max_value = max(c.values())
ans = list()
for key, value in c.items():
if value == max_value:
ans.append(key)
for a ... | 0 | 0 | 0 | 0 | 0 | 303 | 0 | 0 | 25 |
73498c49f12e4e5e3a30b7cac8793500e6ca895d | 467 | py | Python | PythonExe/ex066.py | ScnMatheus/my-python-projects | 9cc3511dd6e25d9b16429347598c105f15bd6916 | [
"MIT"
] | null | null | null | PythonExe/ex066.py | ScnMatheus/my-python-projects | 9cc3511dd6e25d9b16429347598c105f15bd6916 | [
"MIT"
] | null | null | null | PythonExe/ex066.py | ScnMatheus/my-python-projects | 9cc3511dd6e25d9b16429347598c105f15bd6916 | [
"MIT"
] | null | null | null | #Crie um programa que leia varios numerios inteiros
#so ira parar quando digitar o valor 999, que a condio final
#mostre quantos numeros foram digitados, e qual foi a soma entre eles.
soma = quantidade = 0
while True:
n1 = int(input('Digite um nmero: [999] PARA PARAR'))
if n1 != 999:
soma = soma + n1
... | 38.916667 | 84 | 0.685225 | #Crie um programa que leia varios numerios inteiros
#so ira parar quando digitar o valor 999, que é a condição final
#mostre quantos numeros foram digitados, e qual foi a soma entre eles.
soma = quantidade = 0
while True:
n1 = int(input('Digite um número: [999] PARA PARAR'))
if n1 != 999:
soma = soma + ... | 10 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
700a1dfb43d6c4c7598f8e1afca9f0b3d432ea93 | 409 | py | Python | setup.py | thecubic/objection | 4937f4b577847c1c00987bc0f9e820bdad3c4c53 | [
"Apache-2.0"
] | 1 | 2021-12-10T20:14:56.000Z | 2021-12-10T20:14:56.000Z | setup.py | thecubic/objection | 4937f4b577847c1c00987bc0f9e820bdad3c4c53 | [
"Apache-2.0"
] | null | null | null | setup.py | thecubic/objection | 4937f4b577847c1c00987bc0f9e820bdad3c4c53 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from distutils.core import setup
setup(
name="objection",
version="1.0",
description="AndroidAPS preference editor",
author="Dave Carlson",
author_email="thecubic@thecubic.net",
url="https://github.com/thecubic/objection/",
packages=["objection"],
scripts=["object... | 27.266667 | 106 | 0.687042 | #!/usr/bin/env python
from distutils.core import setup
setup(
name="objection",
version="1.0",
description="AndroidAPS preference editor",
author="Dave Carlson",
author_email="thecubic@thecubic.net",
url="https://github.com/thecubic/objection/",
packages=["objection"],
scripts=["object... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9aea2ea6f2d471c9eddc93f20e4efea59ebf26d1 | 570 | py | Python | Hackerrank/CountingValley.py | venkyvt7/CompetitiveCodingSolutions | 1813ae388c301a4a2c234eacdcabb135295806a1 | [
"MIT"
] | null | null | null | Hackerrank/CountingValley.py | venkyvt7/CompetitiveCodingSolutions | 1813ae388c301a4a2c234eacdcabb135295806a1 | [
"MIT"
] | null | null | null | Hackerrank/CountingValley.py | venkyvt7/CompetitiveCodingSolutions | 1813ae388c301a4a2c234eacdcabb135295806a1 | [
"MIT"
] | 1 | 2020-10-03T09:53:37.000Z | 2020-10-03T09:53:37.000Z | #!/bin/python3
import os
# Complete the countingValleys function below.
if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')
n = int(input())
s = input()
result = countingValleys(n, s)
fptr.write(str(result) + '\n')
fptr.close()
| 15.833333 | 47 | 0.533333 | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the countingValleys function below.
def countingValleys(n, s):
level = 0
counter = 0
for x in s:
if level == 0 and x == 'D':
counter +=1
if x == 'D':
level -=1
if x == 'U':
... | 0 | 0 | 0 | 0 | 0 | 221 | 0 | -41 | 111 |
f9306d6410bbc35b8eecc7622623781c97cc4bd2 | 1,665 | py | Python | app/co2_chart/co2_chart.py | Ayshnoor/GA_CO2_forecasting | 9dbac5c0c421ba400f0d273951c62493b4a63405 | [
"BSD-4-Clause-UC"
] | 1 | 2022-03-30T21:04:59.000Z | 2022-03-30T21:04:59.000Z | app/co2_chart/co2_chart.py | Ayshnoor/GA_CO2_forecasting | 9dbac5c0c421ba400f0d273951c62493b4a63405 | [
"BSD-4-Clause-UC"
] | null | null | null | app/co2_chart/co2_chart.py | Ayshnoor/GA_CO2_forecasting | 9dbac5c0c421ba400f0d273951c62493b4a63405 | [
"BSD-4-Clause-UC"
] | null | null | null | import plotly.offline as offline
| 36.195652 | 122 | 0.536937 | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import plotly
import plotly.offline as offline
from plotly.graph_objs import *
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
def CO2_graph():
df_CO2 = pd.read_csv('data/CO2_Emissions_to_Plot.csv')
df_CO2.dro... | 0 | 0 | 0 | 0 | 0 | 1,414 | 0 | 63 | 155 |
01ffc4be0fce4607c1290ac16da0c365bcdab95b | 472 | py | Python | api/tests/integration/tests/formats/incorrect_smiles.py | tsingdao-Tp/Indigo | b2d73faebb6a450e9b3d34fed553fad4f9d0012f | [
"Apache-2.0"
] | 204 | 2015-11-06T21:34:34.000Z | 2022-03-30T16:17:01.000Z | api/tests/integration/tests/formats/incorrect_smiles.py | tsingdao-Tp/Indigo | b2d73faebb6a450e9b3d34fed553fad4f9d0012f | [
"Apache-2.0"
] | 509 | 2015-11-05T13:54:43.000Z | 2022-03-30T22:15:30.000Z | api/tests/integration/tests/formats/incorrect_smiles.py | tsingdao-Tp/Indigo | b2d73faebb6a450e9b3d34fed553fad4f9d0012f | [
"Apache-2.0"
] | 89 | 2015-11-17T08:22:54.000Z | 2022-03-17T04:26:28.000Z | import os
import sys
sys.path.append(os.path.normpath(os.path.join(os.path.abspath(__file__), '..', '..', '..', "common")))
indigo = Indigo()
loadSMILES('O[C@H](N)C |&1:0|')
loadSMILES('O[C@H](N)C |o1:0|')
loadSMILES('O[C@H](N)C |a:3|')
| 26.222222 | 102 | 0.603814 | import os
import sys
sys.path.append(os.path.normpath(os.path.join(os.path.abspath(__file__), '..', '..', '..', "common")))
from env_indigo import *
indigo = Indigo()
def loadSMILES (smiles):
try:
mol = indigo.loadMolecule(smiles)
print(smiles + ' : OK')
except IndigoException as e:
pr... | 0 | 0 | 0 | 0 | 0 | 175 | 0 | 3 | 45 |
9c68d5ee138c6568a61ac981cf3a5e8869c32d45 | 3,863 | py | Python | docs/conf.py | Minyus/smalldict | 51262bf5c45e7457690eba26060a71b57aa3f2a7 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | Minyus/smalldict | 51262bf5c45e7457690eba26060a71b57aa3f2a7 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | Minyus/smalldict | 51262bf5c45e7457690eba26060a71b57aa3f2a7 | [
"Apache-2.0"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 31.663934 | 81 | 0.674346 | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 0 | 0 | 0 | 0 | 0 | 544 | 0 | 27 | 115 |
14a4833a5052b371f1f81fdcfd690da01364e9d6 | 2,630 | py | Python | 24. MachineLearning_Projects/2. Movie-Rating-Prediction/DataPreprocessor.py | sgeek28/Data-Science | ea0bfd6eeb78f534ab89fc9d4c306adb0087e07e | [
"MIT"
] | null | null | null | 24. MachineLearning_Projects/2. Movie-Rating-Prediction/DataPreprocessor.py | sgeek28/Data-Science | ea0bfd6eeb78f534ab89fc9d4c306adb0087e07e | [
"MIT"
] | null | null | null | 24. MachineLearning_Projects/2. Movie-Rating-Prediction/DataPreprocessor.py | sgeek28/Data-Science | ea0bfd6eeb78f534ab89fc9d4c306adb0087e07e | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import (Imputer, LabelEncoder, StandardScaler)
from sklearn.feature_selection import RFE
from sklearn.ensemble import RandomForestClass... | 31.309524 | 96 | 0.760456 | from __future__ import absolute_import, division, print_function
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import (Imputer, LabelEncoder,StandardScaler)
from sklearn import metrics
from sklearn.feature_selection import RFE
from sklearn.ensemb... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 22 |
cbb3e796210e04f4f92983ed61582f03d5e0252a | 2,352 | py | Python | pyscf/prop/nsr/rks.py | pavanell/pyscf | c0d19e499685e95dbf4c879539ad3a3ceb6934e2 | [
"Apache-2.0"
] | 4 | 2021-03-01T03:46:02.000Z | 2022-03-14T05:34:33.000Z | pyscf/prop/nsr/rks.py | pavanell/pyscf | c0d19e499685e95dbf4c879539ad3a3ceb6934e2 | [
"Apache-2.0"
] | 36 | 2018-08-22T19:44:03.000Z | 2020-05-09T10:02:36.000Z | pyscf/prop/nsr/rks.py | pavanell/pyscf | c0d19e499685e95dbf4c879539ad3a3ceb6934e2 | [
"Apache-2.0"
] | 4 | 2018-02-14T16:28:28.000Z | 2019-08-12T16:40:30.000Z | #!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. 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
#
# U... | 28 | 74 | 0.607143 | #!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. 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
#
# U... | 0 | 0 | 0 | 116 | 0 | 0 | 0 | 40 | 68 |
6d86532dda06fc12ba1312d48c88d955e7a6cb00 | 60,819 | py | Python | src/redfish/ris/rmc.py | skunkie/python-ilorest-library | 3904c539e8ec8973c98bcbff5fb6a659d095c41f | [
"Apache-2.0"
] | null | null | null | src/redfish/ris/rmc.py | skunkie/python-ilorest-library | 3904c539e8ec8973c98bcbff5fb6a659d095c41f | [
"Apache-2.0"
] | null | null | null | src/redfish/ris/rmc.py | skunkie/python-ilorest-library | 3904c539e8ec8973c98bcbff5fb6a659d095c41f | [
"Apache-2.0"
] | null | null | null | ###
# Copyright 2019 Hewlett Packard Enterprise, 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 ... | 43.380171 | 101 | 0.575445 | ###
# Copyright 2019 Hewlett Packard Enterprise, 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 ... | 0 | 1,188 | 0 | 57,699 | 0 | 0 | 0 | 611 | 399 |
7829ce8effc93ca5a9a970bb68a619b0b759143e | 4,799 | py | Python | cs15211/SmallestSubtreewithalltheDeepestNodes.py | JulyKikuAkita/PythonPrac | 0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c | [
"Apache-2.0"
] | 1 | 2021-07-05T01:53:30.000Z | 2021-07-05T01:53:30.000Z | cs15211/SmallestSubtreewithalltheDeepestNodes.py | JulyKikuAkita/PythonPrac | 0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c | [
"Apache-2.0"
] | null | null | null | cs15211/SmallestSubtreewithalltheDeepestNodes.py | JulyKikuAkita/PythonPrac | 0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c | [
"Apache-2.0"
] | 1 | 2018-01-08T07:14:08.000Z | 2018-01-08T07:14:08.000Z | __source__ = 'https://leetcode.com/problems/smallest-subtree-with-all-the-deepest-nodes/'
# Time: O(N)
# Space: O(N)
#
# Description: Leetcode # 865. Smallest Subtree with all the Deepest Nodes
#
# Given a binary tree rooted at root, the depth of each node is the shortest distance to the root.
#
# A node is deepest if... | 30.373418 | 100 | 0.600959 | __source__ = 'https://leetcode.com/problems/smallest-subtree-with-all-the-deepest-nodes/'
# Time: O(N)
# Space: O(N)
#
# Description: Leetcode # 865. Smallest Subtree with all the Deepest Nodes
#
# Given a binary tree rooted at root, the depth of each node is the shortest distance to the root.
#
# A node is deepest if... | 0 | 0 | 0 | 910 | 0 | 0 | 0 | 0 | 45 |
92eca9792e56b2e4b65f8809292639465bab0b19 | 13,314 | py | Python | glue_vispy_viewers/isosurface/multi_iso_visual.py | jzuhone/glue-vispy-viewers | d940705f4ba95f8d7a9a74d37fb68c71080b490a | [
"BSD-2-Clause"
] | null | null | null | glue_vispy_viewers/isosurface/multi_iso_visual.py | jzuhone/glue-vispy-viewers | d940705f4ba95f8d7a9a74d37fb68c71080b490a | [
"BSD-2-Clause"
] | null | null | null | glue_vispy_viewers/isosurface/multi_iso_visual.py | jzuhone/glue-vispy-viewers | d940705f4ba95f8d7a9a74d37fb68c71080b490a | [
"BSD-2-Clause"
] | 1 | 2017-09-29T01:24:47.000Z | 2017-09-29T01:24:47.000Z | # This file implements a MultiIsoVisual class that can be used to show
# multiple layers of isosurface simultaneously. It is derived from the original
# VolumeVisual class in vispy.visuals.volume, which is releaed under a BSD license
# included here:
#
# =================================================================... | 37.086351 | 99 | 0.626108 | # This file implements a MultiIsoVisual class that can be used to show
# multiple layers of isosurface simultaneously. It is derived from the original
# VolumeVisual class in vispy.visuals.volume, which is releaed under a BSD license
# included here:
#
# =================================================================... | 0 | 257 | 0 | 2,729 | 0 | 0 | 0 | 141 | 113 |
161d98dd7e893f42ba3e669d74b4559ac9418ef4 | 8,168 | py | Python | picoCTF-shell/hacksport/status.py | jingjiey/picoCTF | 45112c52b33a44305e3c8210cf7c23a0b1d695ea | [
"MIT"
] | null | null | null | picoCTF-shell/hacksport/status.py | jingjiey/picoCTF | 45112c52b33a44305e3c8210cf7c23a0b1d695ea | [
"MIT"
] | null | null | null | picoCTF-shell/hacksport/status.py | jingjiey/picoCTF | 45112c52b33a44305e3c8210cf7c23a0b1d695ea | [
"MIT"
] | null | null | null | import json
import logging
import os
import shutil
from os.path import join
from shell_manager.bundle import get_bundle, get_bundle_root
from shell_manager.util import (BUNDLE_ROOT, DEPLOYED_ROOT, get_problem, get_problem_root, HACKSPORTS_ROOT, PROBLEM_ROOT, STAGING_ROOT)
logger = logging.getLogger(__name__)
def get... | 33.203252 | 95 | 0.57407 | import json
import logging
import os
import shutil
import socket
from os.path import join
from hacksport.operations import execute
from shell_manager.bundle import get_bundle, get_bundle_root
from shell_manager.util import (BUNDLE_ROOT, DEPLOYED_ROOT, get_problem,
get_problem_root, HACK... | 0 | 0 | 0 | 0 | 0 | 2,792 | 0 | 75 | 180 |
753ccafba73ef8222766f7e2ae01fcad16ec398d | 146 | py | Python | src/my_blog/blog/views.py | qoraraf/django-project-ar | 01e90fd3c35da8238899f2a03ce759545c8c38d4 | [
"bzip2-1.0.6"
] | null | null | null | src/my_blog/blog/views.py | qoraraf/django-project-ar | 01e90fd3c35da8238899f2a03ce759545c8c38d4 | [
"bzip2-1.0.6"
] | null | null | null | src/my_blog/blog/views.py | qoraraf/django-project-ar | 01e90fd3c35da8238899f2a03ce759545c8c38d4 | [
"bzip2-1.0.6"
] | null | null | null |
# Create your views here.
| 24.333333 | 63 | 0.719178 | from django.shortcuts import render
# Create your views here.
def home(request):
return render(request, 'blog/index.html',{'title':'Home' })
| 0 | 0 | 0 | 0 | 0 | 61 | 0 | 14 | 44 |
c5401f9d394057390e43429e9777f208ca0b2f97 | 8,214 | py | Python | Management software-yule8/dataBase.py | Afdrif-K/py | f685370236f211b9c09b8593c823dfc9a43d42ce | [
"MIT"
] | null | null | null | Management software-yule8/dataBase.py | Afdrif-K/py | f685370236f211b9c09b8593c823dfc9a43d42ce | [
"MIT"
] | null | null | null | Management software-yule8/dataBase.py | Afdrif-K/py | f685370236f211b9c09b8593c823dfc9a43d42ce | [
"MIT"
] | null | null | null | #encoding=utf-8
| 39.490385 | 338 | 0.462503 | #encoding=utf-8
import pymysql
from time import sleep
import datetime
import tkinter.messagebox
class mysql:
def __init__(self, username='root', passname='12345678', ip='localhost', datebasename='yule'):
"""
:param username: 连接数据库的用户名
:param passname: 连接数据库的密码
:param ip... | 1,251 | 0 | 0 | 7,673 | 0 | 0 | 0 | -8 | 116 |
b2e08fa4ae20d22d80a4fb4be21852caff8d7afa | 6,148 | py | Python | notebooks/plots.py | igorfratel/MAC0460-1 | 07b6b93d30684724b0e183d6efe25e89496b04e4 | [
"MIT"
] | null | null | null | notebooks/plots.py | igorfratel/MAC0460-1 | 07b6b93d30684724b0e183d6efe25e89496b04e4 | [
"MIT"
] | 1 | 2018-09-16T16:31:36.000Z | 2018-09-16T16:31:36.000Z | SecondAssigment/plots.py | PaiZuZe/MAC0460-machineLearning | 98031412d8835afad0fde318b5c57a613bfb4fc8 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
def plot_points_regression(x,
y,
title,
xlabel,
ylabel,
prediction=None,
legend=False,
... | 33.232432 | 86 | 0.519356 | import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
def plot_points_regression(x,
y,
title,
xlabel,
ylabel,
prediction=None,
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 22 |
4c469f05b737e95be7e425137efa749b31865311 | 692 | py | Python | jinete/storers/formatters/hashcode.py | PhilippeGalvan/jinete | b7b22f8265935bc41b42ad8c4bf7464dc21ab424 | [
"MIT"
] | null | null | null | jinete/storers/formatters/hashcode.py | PhilippeGalvan/jinete | b7b22f8265935bc41b42ad8c4bf7464dc21ab424 | [
"MIT"
] | null | null | null | jinete/storers/formatters/hashcode.py | PhilippeGalvan/jinete | b7b22f8265935bc41b42ad8c4bf7464dc21ab424 | [
"MIT"
] | null | null | null | from __future__ import annotations
| 30.086957 | 76 | 0.654624 | from __future__ import annotations
from .abc import StorerFormatter
class HashCodeStorerFormatter(StorerFormatter):
def __init__(self, remove_empty_routes: bool = True, *args, **kwargs):
kwargs['remove_empty_routes'] = remove_empty_routes
super().__init__(
*args, **kwargs,
)
... | 0 | 162 | 0 | 437 | 0 | 0 | 0 | 11 | 46 |
44e43d6f5653859b69eac5563e3ed3a41076c04e | 1,296 | py | Python | sanic_crudvue/crud/__init__.py | truexin1292/SanicCRUD-vue | 0601f9ee6785542dbf72ae7ecacbf12a0bd271ae | [
"MIT"
] | 393 | 2017-06-16T13:39:29.000Z | 2022-03-17T04:18:10.000Z | sanic_crudvue/crud/__init__.py | truexin1292/SanicCRUD-vue | 0601f9ee6785542dbf72ae7ecacbf12a0bd271ae | [
"MIT"
] | 34 | 2017-05-23T01:44:25.000Z | 2020-08-13T03:56:50.000Z | sanic_crudvue/crud/__init__.py | truexin1292/SanicCRUD-vue | 0601f9ee6785542dbf72ae7ecacbf12a0bd271ae | [
"MIT"
] | 117 | 2017-06-19T02:56:05.000Z | 2021-12-21T01:15:06.000Z | from .views import crud_bp
from .models import db, ShanghaiPersonInfo
__all__ = ['crud_bp', 'db', 'ShanghaiPersonInfo']
LOGO = """
_______________
/ \\
| Gotta go fast! |
| _________________/
|/
... | 38.117647 | 77 | 0.19213 | from .views import crud_bp
from .models import db, ShanghaiPersonInfo
__all__ = ['crud_bp', 'db', 'ShanghaiPersonInfo']
LOGO = """
▄▄▄▄▄
▀▀▀██████▄▄▄ _______________
▄▄▄▄▄ █████████▄ / \\
▀▀▀▀█████▌ ▀▐▄ ▀▐█ | Gotta go fast! |
▀▀███... | 1,113 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9a3315026b9579852128cf0dfa98198d9887a185 | 308 | py | Python | decode.py | rezwanshubh/translator_en_et | 4529acfae78064a594025dd92d443e2cc4470743 | [
"MIT"
] | null | null | null | decode.py | rezwanshubh/translator_en_et | 4529acfae78064a594025dd92d443e2cc4470743 | [
"MIT"
] | null | null | null | decode.py | rezwanshubh/translator_en_et | 4529acfae78064a594025dd92d443e2cc4470743 | [
"MIT"
] | null | null | null | import sentencepiece as spm
from gtts import gTTS
sp = spm.SentencePieceProcessor()
sp.Load("./dataset/sp.et.model")
message = open("pred.txt", "r", encoding="utf8").read()
message_decoded = sp.DecodePieces(message.split())
print(message_decoded)
tts = gTTS(message_decoded, lang='et')
tts.save('et.mp3')
| 23.692308 | 55 | 0.737013 | import sentencepiece as spm
from gtts import gTTS
sp = spm.SentencePieceProcessor()
sp.Load("./dataset/sp.et.model")
message = open("pred.txt", "r", encoding="utf8").read()
message_decoded = sp.DecodePieces(message.split())
print(message_decoded)
tts = gTTS(message_decoded, lang='et')
tts.save('et.mp3')
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8be1d6c697fe29070becb6e1bd44fa5e6587a9c3 | 4,370 | py | Python | happy/HappyDNS.py | yunhanw-google/happy | d482f1eeb188a03e3bcd1aefe54424fb2589c9e9 | [
"Apache-2.0"
] | 42 | 2017-09-20T07:09:59.000Z | 2021-11-08T12:08:30.000Z | happy/HappyDNS.py | yunhanw-google/happy | d482f1eeb188a03e3bcd1aefe54424fb2589c9e9 | [
"Apache-2.0"
] | 30 | 2018-06-16T14:48:14.000Z | 2020-10-13T04:02:35.000Z | happy/HappyDNS.py | yunhanw-google/happy | d482f1eeb188a03e3bcd1aefe54424fb2589c9e9 | [
"Apache-2.0"
] | 17 | 2017-09-20T10:37:56.000Z | 2021-02-09T06:27:44.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2016-2017 Nest Labs, 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/lice... | 27.484277 | 77 | 0.575286 | #!/usr/bin/env python3
#
# Copyright (c) 2016-2017 Nest Labs, 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/lice... | 0 | 0 | 0 | 3,207 | 0 | 18 | 0 | 21 | 179 |
0e80fc5d90b31441212d57a7e16ffb6bee0b7994 | 6,428 | py | Python | ios_device/util/utils.py | Itaybre/py-ios-device | d1fe5d0dc6b5288ac9a5e65b49d08e924ff9901e | [
"MIT"
] | null | null | null | ios_device/util/utils.py | Itaybre/py-ios-device | d1fe5d0dc6b5288ac9a5e65b49d08e924ff9901e | [
"MIT"
] | null | null | null | ios_device/util/utils.py | Itaybre/py-ios-device | d1fe5d0dc6b5288ac9a5e65b49d08e924ff9901e | [
"MIT"
] | null | null | null | """
Utils
"""
__all__ = ['DictAttrProperty', 'DictAttrFieldNotFoundError']
_NotSet = object()
| 39.195122 | 120 | 0.628967 | """
Utils
"""
from ios_device.util.service_info import MyServiceInfo
__all__ = ['DictAttrProperty', 'DictAttrFieldNotFoundError']
import socket
import struct
import threading
from zeroconf import Zeroconf, ServiceBrowser, ServiceInfo
_NotSet = object()
class cached_property(object):
def __init__(self, func):
... | 0 | 0 | 0 | 5,137 | 0 | 914 | 0 | 49 | 227 |
f4b5530760837db610da0a77ea931d9c304e6baa | 5,320 | py | Python | mailing/migrations/0003_auto_20170213_1640.py | salazarpardo/redinnovacion | 3f7c13af0af1887112a0492aea7782871fba0129 | [
"CC-BY-3.0"
] | null | null | null | mailing/migrations/0003_auto_20170213_1640.py | salazarpardo/redinnovacion | 3f7c13af0af1887112a0492aea7782871fba0129 | [
"CC-BY-3.0"
] | null | null | null | mailing/migrations/0003_auto_20170213_1640.py | salazarpardo/redinnovacion | 3f7c13af0af1887112a0492aea7782871fba0129 | [
"CC-BY-3.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
| 41.889764 | 150 | 0.568421 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import mailing.models
import ckeditor_uploader.fields
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL... | 0 | 0 | 0 | 5,103 | 0 | 0 | 0 | 40 | 112 |
988f931e36ed51ef5241d50ca86574206eb243b0 | 1,065 | py | Python | distruct/tests/test_Distructure.py | KIT-MBS/distruct | c8633f4c90bbac8669efae43bda765dfa8b7348a | [
"MIT"
] | 2 | 2019-07-23T23:32:42.000Z | 2021-07-19T11:08:00.000Z | distruct/tests/test_Distructure.py | KIT-MBS/distruct | c8633f4c90bbac8669efae43bda765dfa8b7348a | [
"MIT"
] | 1 | 2020-12-21T20:11:38.000Z | 2021-01-18T18:28:32.000Z | distruct/tests/test_Distructure.py | KIT-MBS/distruct | c8633f4c90bbac8669efae43bda765dfa8b7348a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#####################################
#
# Filename : test_Distructure.py
#
# Projectname : diSTruct
#
# Author : Oskar Taubert
#
# Creation Date : Mon 11 Jun 2018 04:04:59 PM CEST
#
# Last Modified : Thu 28 Mar 2019 11:14:02 AM CET
#
#####################################
from distruct import conf... | 20.882353 | 65 | 0.6 | #!/usr/bin/env python3
#####################################
#
# Filename : test_Distructure.py
#
# Projectname : diSTruct
#
# Author : Oskar Taubert
#
# Creation Date : Mon 11 Jun 2018 04:04:59 PM CEST
#
# Last Modified : Thu 28 Mar 2019 11:14:02 AM CET
#
#####################################
from Bio import SeqIO
fr... | 0 | 0 | 0 | 0 | 0 | 525 | 0 | 29 | 91 |
24682ec490e9b96e8887c35ef87b3b218632a56a | 969 | py | Python | tests/tests_frankDataset.py | gcramerb/TransferLearning-Sensors | 44d7847d28ac8ae66e74bd458c612f76a1725946 | [
"MIT"
] | null | null | null | tests/tests_frankDataset.py | gcramerb/TransferLearning-Sensors | 44d7847d28ac8ae66e74bd458c612f76a1725946 | [
"MIT"
] | null | null | null | tests/tests_frankDataset.py | gcramerb/TransferLearning-Sensors | 44d7847d28ac8ae66e74bd458c612f76a1725946 | [
"MIT"
] | null | null | null | import sys
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('--debug', action='store_true')
args = parser.parse_args()
if args.debug:
import pydevd_pycharm
pydevd_pycharm.settrace('172.22.100.3', port=22, stdoutToServer=True, stderrToServer... | 32.3 | 107 | 0.769866 | from Dataset import Datasets
import numpy as np
import csv, sys, glob, os
import pandas as pd
from enum import Enum
from Dataset.Ucihar import UCIHAR,SignalsUCIHAR
from Dataset.Dsads import DSADS ,SignalsDsads
from Dataset.Uschad import USCHAD,SignalsUschad
from Dataset.Pamap2 import PAMAP2,SignalsPAMAP2
from Process... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 157 | 222 |
f822b0f7c6adb8dccad24143541d43823b7800d5 | 4,355 | py | Python | chebi/inchi-ref-from-chebi.py | rwst/wikidata-molbio | 198587fda16f81cf241c398650f79594c07cbdee | [
"CC0-1.0"
] | 2 | 2021-05-16T09:42:59.000Z | 2022-03-14T11:17:15.000Z | chebi/inchi-ref-from-chebi.py | rwst/wikidata-molbio | 198587fda16f81cf241c398650f79594c07cbdee | [
"CC0-1.0"
] | null | null | null | chebi/inchi-ref-from-chebi.py | rwst/wikidata-molbio | 198587fda16f81cf241c398650f79594c07cbdee | [
"CC0-1.0"
] | 1 | 2021-05-16T09:54:14.000Z | 2021-05-16T09:54:14.000Z |
import os, json, argparse, sys
import pronto
"""
Check all existing ChEBI items have their InChi keys and the current ChEBI
release as source.
"""
script = os.path.basename(sys.argv[0])[:-3]
write_line_to._hdl = {}
# Initiate the parser
parser = argparse.ArgumentParser()
parser.add_argument("-r", "--release-date", ... | 27.916667 | 98 | 0.574971 |
import os, json, argparse, sys, datetime, time
import pronto, six
"""
Check all existing ChEBI items have their InChi keys and the current ChEBI
release as source.
"""
script = os.path.basename(sys.argv[0])[:-3]
def write_line_to(name, string):
f = write_line_to._hdl.get(name)
if f is None:
f = open(... | 0 | 0 | 0 | 0 | 0 | 602 | 0 | 21 | 123 |
0ff32409c5e774ae8889fc901ad44667a327295d | 232 | py | Python | ksink/html.py | sitebolts/ksink | ecb3cfc3bc4d8306101e4a09011e43650fb60cb4 | [
"MIT"
] | 1 | 2021-04-07T17:14:17.000Z | 2021-04-07T17:14:17.000Z | ksink/html.py | sitebolts/ksink | ecb3cfc3bc4d8306101e4a09011e43650fb60cb4 | [
"MIT"
] | null | null | null | ksink/html.py | sitebolts/ksink | ecb3cfc3bc4d8306101e4a09011e43650fb60cb4 | [
"MIT"
] | null | null | null | #Sanitize HTML output
#Example: htmlspecialchars('I love the <b> tag') == 'I love the <b> tag'
| 46.4 | 102 | 0.607759 | #Sanitize HTML output
#Example: htmlspecialchars('I love the <b> tag') == 'I love the <b> tag'
def htmlspecialchars(text):
return text.replace("&", "&").replace('"', """).replace("<", "<").replace(">", ">")
| 0 | 0 | 0 | 0 | 0 | 109 | 0 | 0 | 22 |
76f76a9d3ff89958230f4a6f6feb8b023efdfd7d | 4,978 | py | Python | imagespace_weapons/server/__init__.py | amirhosf/image_space | f935ad0db2e575473e089ebb2d6a8b74b0353323 | [
"Apache-2.0"
] | null | null | null | imagespace_weapons/server/__init__.py | amirhosf/image_space | f935ad0db2e575473e089ebb2d6a8b74b0353323 | [
"Apache-2.0"
] | null | null | null | imagespace_weapons/server/__init__.py | amirhosf/image_space | f935ad0db2e575473e089ebb2d6a8b74b0353323 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware Inc.
#
# Licensed under the Apache License, Version 2.0 ( the "License" );
# you may not use this file except in compliance with the License.
# You may obtain a copy of ... | 34.811189 | 90 | 0.597228 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware Inc.
#
# Licensed under the Apache License, Version 2.0 ( the "License" );
# you may not use this file except in compliance with the License.
# You may obtain a copy of ... | 0 | 1,623 | 0 | 361 | 0 | 995 | 0 | 46 | 247 |
c1ef0b98ca81329022bdfc1e47eececa148dfa46 | 340 | py | Python | src/core/search_index.py | atul94/similarity-search-service | 5e1f915f82f4ec74145cf1ef4d9a3021d46818ea | [
"Apache-2.0"
] | null | null | null | src/core/search_index.py | atul94/similarity-search-service | 5e1f915f82f4ec74145cf1ef4d9a3021d46818ea | [
"Apache-2.0"
] | null | null | null | src/core/search_index.py | atul94/similarity-search-service | 5e1f915f82f4ec74145cf1ef4d9a3021d46818ea | [
"Apache-2.0"
] | null | null | null | """ Define the abstract class for Search Index"""
| 22.666667 | 104 | 0.691176 | """ Define the abstract class for Search Index"""
class SearchIndex:
"""Search Index handles creation of various search index, getting values, destroying search index"""
def create_search_index(self):
pass
def clear_search_index(self):
pass
def get_similar_vectors(self, query_vec, t... | 0 | 0 | 0 | 266 | 0 | 0 | 0 | 0 | 23 |
560a336a1800ba309203dfbbb84e7783721fd041 | 26,887 | py | Python | data_loader.py | PAI-SmallIsAllYourNeed/Mixup-AMP | 55ba0ebd9573d0a0f7aaa225f07b280900fb2431 | [
"MIT"
] | 5 | 2021-09-13T02:59:57.000Z | 2021-09-20T03:20:08.000Z | data_loader.py | PAI-SmallIsAllYourNeed/Mixup-AMP | 55ba0ebd9573d0a0f7aaa225f07b280900fb2431 | [
"MIT"
] | null | null | null | data_loader.py | PAI-SmallIsAllYourNeed/Mixup-AMP | 55ba0ebd9573d0a0f7aaa225f07b280900fb2431 | [
"MIT"
] | null | null | null |
def _convert_examples_to_features(examples, label_list, max_seq_length,
tokenizer, output_mode):
"""Loads a data file into a list of `InputBatch`s."""
label_map = {label: i for i, label in enumerate(label_list)}
features = []
for (ex_index, example) in e... | 34.648196 | 111 | 0.568379 | import csv
import random
import re
import sys
import tqdm
import numpy as np
import torch
from torch.utils.data import TensorDataset
from transformers.tokenization_bert import BertTokenizer
def load_glove_txt(file_path="glove.840B.300d.txt"):
results = {}
num_file = sum([1 for i in open(file_path, "r", encodi... | 6 | 0 | 0 | 9,901 | 0 | 12,714 | 0 | -8 | 681 |
65cafdb65b9ed7cb49e3240a7dd50f0a8d1b6d87 | 2,482 | py | Python | main.py | UrMBCMRabbont/Covid_prediction_ML | 8103daacf82a4816a9cbd9705ce8a0914149dd0d | [
"MIT"
] | null | null | null | main.py | UrMBCMRabbont/Covid_prediction_ML | 8103daacf82a4816a9cbd9705ce8a0914149dd0d | [
"MIT"
] | null | null | null | main.py | UrMBCMRabbont/Covid_prediction_ML | 8103daacf82a4816a9cbd9705ce8a0914149dd0d | [
"MIT"
] | null | null | null | import numpy as np
import torch
import torch.nn as nn
from torch.utils.data import DataLoader
import pandas as pd
from MyModule import MyModel
from MyDataset import MyDataset
lr = 0.001
batch_size = 10
epochs = 30
device = "cpu"
result = pd.read_csv("covid.train.csv")
keys = list(result.columns.values)
#turn in... | 23.196262 | 89 | 0.658743 | import numpy as np
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
from torch.utils.data import Dataset, DataLoader
import pandas as pd
import os
from MyModule import MyModel
from MyDataset import MyDataset
lr = 0.001
batch_size = 10
epochs = 30
device = "cpu"
result = pd.read_csv("covid.train.csv"... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 44 |
64ce1f2667a0dac2ea1861b7b66cd3ed80e120b5 | 2,758 | py | Python | openprocurement/audit/api/tests/base.py | ProzorroUKR/openprocurement.audit.api | a17836e29bca28d9151c091e1d2e42de9f70b949 | [
"Apache-2.0"
] | 1 | 2018-05-21T08:14:55.000Z | 2018-05-21T08:14:55.000Z | openprocurement/audit/api/tests/base.py | ProzorroUKR/openprocurement.audit.api | a17836e29bca28d9151c091e1d2e42de9f70b949 | [
"Apache-2.0"
] | 59 | 2018-05-18T02:09:47.000Z | 2019-05-29T12:10:06.000Z | openprocurement/audit/api/tests/base.py | ProzorroUKR/openprocurement.audit.api | a17836e29bca28d9151c091e1d2e42de9f70b949 | [
"Apache-2.0"
] | 1 | 2020-06-15T11:04:25.000Z | 2020-06-15T11:04:25.000Z | # -*- coding: utf-8 -*-
from types import FunctionType
COUCHBD_NAME_SETTING = 'couchdb.db_name'
def snitch(func):
"""
This method is used to add test function to TestCase classes.
snitch method gets test function and returns a copy of this function
with 'test_' prefix at the beginning (to... | 30.988764 | 93 | 0.683466 | # -*- coding: utf-8 -*-
import os
import unittest
from types import FunctionType
import webtest
from paste.deploy.loadwsgi import loadapp
from openprocurement.audit.api.constants import VERSION
from openprocurement.audit.api.design import sync_design
COUCHBD_NAME_SETTING = 'couchdb.db_name'
def snitch(func):
"... | 0 | 427 | 0 | 1,310 | 0 | 0 | 0 | 64 | 230 |
8cc1a636ce154ac0b30f8dc4f9148e794cbee7d4 | 569 | py | Python | shot_detector/filters/dsl/filter_tuple.py | w495/shot_detector | 617ff45c9c3c96bbd9a975aef15f1b2697282b9c | [
"BSD-3-Clause"
] | 18 | 2015-09-27T21:34:18.000Z | 2022-03-24T12:14:51.000Z | shot_detector/filters/dsl/filter_tuple.py | w495/shot_detector | 617ff45c9c3c96bbd9a975aef15f1b2697282b9c | [
"BSD-3-Clause"
] | 6 | 2021-03-18T21:21:35.000Z | 2022-03-11T23:32:55.000Z | shot_detector/filters/dsl/filter_tuple.py | w495/shot_detector | 617ff45c9c3c96bbd9a975aef15f1b2697282b9c | [
"BSD-3-Clause"
] | 3 | 2017-09-14T20:53:26.000Z | 2021-12-18T19:18:18.000Z | # -*- coding: utf8 -*-
"""
This is part of shot detector.
Produced by w495 at 2017.05.04 04:18:27
"""
from __future__ import absolute_import, division, print_function
| 20.321429 | 64 | 0.622144 | # -*- coding: utf8 -*-
"""
This is part of shot detector.
Produced by w495 at 2017.05.04 04:18:27
"""
from __future__ import absolute_import, division, print_function
from .filter_operator import FilterOperator
class FilterTuple(FilterOperator):
"""
...
"""
def reduce_with_op_func(self,... | 0 | 0 | 0 | 324 | 0 | 0 | 0 | 22 | 46 |
0545c1def3b56d917ea1307e094448e3467ec2d9 | 2,997 | py | Python | scraper.py | jhamrick/cogsci-proceedings-analysis | c3c8b0abd8b9ce639f6de0aea52aec46c2c8abca | [
"MIT"
] | null | null | null | scraper.py | jhamrick/cogsci-proceedings-analysis | c3c8b0abd8b9ce639f6de0aea52aec46c2c8abca | [
"MIT"
] | null | null | null | scraper.py | jhamrick/cogsci-proceedings-analysis | c3c8b0abd8b9ce639f6de0aea52aec46c2c8abca | [
"MIT"
] | 1 | 2020-05-11T10:38:38.000Z | 2020-05-11T10:38:38.000Z |
if __name__ == "__main__":
pathname = "cogsci_proceedings_raw.csv"
papers = get_papers()
papers.to_csv(pathname, encoding='utf-8')
| 26.06087 | 69 | 0.561895 | import urllib2
import pandas as pd
from bs4 import BeautifulSoup, element
def load_html(url):
response = urllib2.urlopen(url)
html = response.read().replace(" ", "")
return html
def get_papers_table(year):
url = "https://mindmodeling.org/cogsci{}/".format(year)
soup = BeautifulSoup(load_htm... | 0 | 0 | 0 | 0 | 0 | 2,682 | 0 | 8 | 158 |
dbd9e6ba1b71ff55185c2c579288b26c93d77ff8 | 2,393 | py | Python | netbox/circuits/tables.py | BrnoPCmaniak/netbox | 7b517abdb68a6324950dfd0375861163c7bfff00 | [
"Apache-2.0"
] | null | null | null | netbox/circuits/tables.py | BrnoPCmaniak/netbox | 7b517abdb68a6324950dfd0375861163c7bfff00 | [
"Apache-2.0"
] | null | null | null | netbox/circuits/tables.py | BrnoPCmaniak/netbox | 7b517abdb68a6324950dfd0375861163c7bfff00 | [
"Apache-2.0"
] | null | null | null |
CIRCUITTYPE_ACTIONS = """
<a href="{% url 'circuits:circuittype_changelog' slug=record.slug %}" class="btn btn-default btn-xs" title="Changelog">
<i class="fa fa-history"></i>
</a>
{% if perms.circuit.change_circuittype %}
<a href="{% url 'circuits:circuittype_edit' slug=record.slug %}?return_url={{ request.pa... | 28.831325 | 119 | 0.672378 | import django_tables2 as tables
from django_tables2.utils import Accessor
from tenancy.tables import COL_TENANT
from utilities.tables import BaseTable, ToggleColumn
from .models import Circuit, CircuitType, Provider
CIRCUITTYPE_ACTIONS = """
<a href="{% url 'circuits:circuittype_changelog' slug=record.slug %}" class=... | 0 | 0 | 0 | 1,461 | 0 | 0 | 0 | 106 | 203 |
a3f5c6f18f6506d05b910d0cae6b785bbb12ef0d | 1,608 | py | Python | core/entities/paintballgun.py | TheArchives/Nexus | 5482def8b50562fdbae980cda9b1708bfad8bffb | [
"BSD-2-Clause"
] | 1 | 2021-04-06T18:54:31.000Z | 2021-04-06T18:54:31.000Z | core/entities/paintballgun.py | TheArchives/Nexus | 5482def8b50562fdbae980cda9b1708bfad8bffb | [
"BSD-2-Clause"
] | null | null | null | core/entities/paintballgun.py | TheArchives/Nexus | 5482def8b50562fdbae980cda9b1708bfad8bffb | [
"BSD-2-Clause"
] | 1 | 2021-12-20T18:11:25.000Z | 2021-12-20T18:11:25.000Z | # The Nexus software is licensed under the BSD 2-Clause license.
#
# You should have recieved a copy of this license with the software.
# If you did not, you can find one at the following link.
#
# http://opensource.org/licenses/bsd-license.php
if world.blockstore.raw_blocks[world.blockstore.get_offset(x,y+1,z)] != '... | 50.25 | 152 | 0.626866 | # The Nexus software is licensed under the BSD 2-Clause license.
#
# You should have recieved a copy of this license with the software.
# If you did not, you can find one at the following link.
#
# http://opensource.org/licenses/bsd-license.php
if world.blockstore.raw_blocks[world.blockstore.get_offset(x,y+1,z)] != '... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2764d602a3d2bfe05b03c87ea1896beeeb95d1a7 | 985 | py | Python | code/sets_with_a_given_least_common_multiple/sol_590.py | bhavinjawade/project-euler-solutions | 56bf6a282730ed4b9b875fa081cf4509d9939d98 | [
"Apache-2.0"
] | 2 | 2020-07-16T08:16:32.000Z | 2020-10-01T07:16:48.000Z | code/sets_with_a_given_least_common_multiple/sol_590.py | Psingh12354/project-euler-solutions | 56bf6a282730ed4b9b875fa081cf4509d9939d98 | [
"Apache-2.0"
] | null | null | null | code/sets_with_a_given_least_common_multiple/sol_590.py | Psingh12354/project-euler-solutions | 56bf6a282730ed4b9b875fa081cf4509d9939d98 | [
"Apache-2.0"
] | 1 | 2021-05-07T18:06:08.000Z | 2021-05-07T18:06:08.000Z |
# -*- coding: utf-8 -*-
'''
File name: code\sets_with_a_given_least_common_multiple\sol_590.py
Author: Vaidic Joshi
Date created: Oct 20, 2018
Python Version: 3.x
'''
# Solution to Project Euler Problem #590 :: Sets with a given Least Common Multiple
#
# For more information see:
# https://projecteul... | 24.625 | 128 | 0.671066 |
# -*- coding: utf-8 -*-
'''
File name: code\sets_with_a_given_least_common_multiple\sol_590.py
Author: Vaidic Joshi
Date created: Oct 20, 2018
Python Version: 3.x
'''
# Solution to Project Euler Problem #590 :: Sets with a given Least Common Multiple
#
# For more information see:
# https://projecteul... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b16cbc4f436f336fab55b5a32175ff8a722ade95 | 543 | py | Python | tests/test_ext_duration.py | supyrow/sphinx | 680417a10df7e5c35c0ff65979bd22906b9a5f1e | [
"BSD-2-Clause"
] | 1 | 2022-01-25T17:11:03.000Z | 2022-01-25T17:11:03.000Z | tests/test_ext_duration.py | supyrow/sphinx | 680417a10df7e5c35c0ff65979bd22906b9a5f1e | [
"BSD-2-Clause"
] | 4 | 2022-01-23T07:54:28.000Z | 2022-03-02T14:35:14.000Z | tests/test_ext_duration.py | supyrow/sphinx | 680417a10df7e5c35c0ff65979bd22906b9a5f1e | [
"BSD-2-Clause"
] | null | null | null | """
test_ext_duration
~~~~~~~~~~~~~~~~~
Test sphinx.ext.duration extension.
:copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
| 23.608696 | 74 | 0.639042 | """
test_ext_duration
~~~~~~~~~~~~~~~~~
Test sphinx.ext.duration extension.
:copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import pytest
@pytest.mark.sphinx('dummy', testroot='basic',
confoverrides={'ex... | 0 | 286 | 0 | 0 | 0 | 0 | 0 | -20 | 69 |
bec806cc985bc42f3d5dfc7367b1b10442fda53a | 4,692 | py | Python | racer-rl.py | webdizz/self-driving-car-pytorch | 491cdc54221df079d558bd95aade0608dfd8d3df | [
"Apache-2.0"
] | 7 | 2017-12-28T02:03:42.000Z | 2020-11-02T12:12:49.000Z | racer-rl.py | webdizz/self-driving-car-pytorch | 491cdc54221df079d558bd95aade0608dfd8d3df | [
"Apache-2.0"
] | null | null | null | racer-rl.py | webdizz/self-driving-car-pytorch | 491cdc54221df079d558bd95aade0608dfd8d3df | [
"Apache-2.0"
] | 1 | 2021-08-04T06:08:17.000Z | 2021-08-04T06:08:17.000Z | import argparse
import logging
import gym
from itertools import count
import torch.nn as nn
import torch.optim as optim
import torch.autograd as autograd
parser = argparse.ArgumentParser(description='PyTorch REINFORCE example')
parser.add_argument('--gamma', type=float, default=0.99, metavar='G',
... | 34.248175 | 116 | 0.620205 | import argparse
import logging
import gym
import universe
import numpy as np
from itertools import count
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch.autograd as autograd
from torch.autograd import Variable
from reframe import resize_frame
parser = arg... | 0 | 0 | 0 | 1,039 | 0 | 1,774 | 0 | 17 | 204 |
605e64f1de9a893be5fe7eb7977eada43e7f4212 | 1,348 | py | Python | tools/validators/instance_validator/validate/field_translation.py | ljulliar/digitalbuildings | 5b5be8db9e00d967911065f5247a8d39512e6504 | [
"Apache-2.0"
] | 1 | 2021-01-02T19:02:52.000Z | 2021-01-02T19:02:52.000Z | tools/validators/instance_validator/validate/field_translation.py | ljulliar/digitalbuildings | 5b5be8db9e00d967911065f5247a8d39512e6504 | [
"Apache-2.0"
] | 1 | 2021-01-06T18:45:30.000Z | 2021-01-06T18:45:30.000Z | tools/validators/instance_validator/validate/field_translation.py | ljulliar/digitalbuildings | 5b5be8db9e00d967911065f5247a8d39512e6504 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | 40.848485 | 75 | 0.75816 | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | 0 | 0 | 0 | 660 | 0 | 0 | 0 | 0 | 22 |
9d40404e9db5c16df45100f0445a0ce6f009524b | 4,854 | py | Python | BitTorrent-5.2.2/torrentinfo-console.py | jpabb7/p2pScrapper | 0fd57049606864223eb45f956a58adda1231af88 | [
"MIT"
] | 4 | 2016-04-26T03:43:54.000Z | 2016-11-17T08:09:04.000Z | BitTorrent-5.2.2/torrentinfo-console.py | jpabb7/p2pScrapper | 0fd57049606864223eb45f956a58adda1231af88 | [
"MIT"
] | 17 | 2015-01-05T21:06:22.000Z | 2015-12-07T20:45:44.000Z | BitTorrent-5.2.2/torrentinfo-console.py | jpabb7/p2pScrapper | 0fd57049606864223eb45f956a58adda1231af88 | [
"MIT"
] | 7 | 2015-07-28T09:17:17.000Z | 2021-11-07T02:29:41.000Z | #!/usr/bin/env python
# The contents of this file are subject to the BitTorrent Open Source License
# Version 1.1 (the License). You may not copy or use this file, in either
# source code or executable form, except in compliance with the License. You
# may obtain a copy of the License at http://www.bittorrent.com/li... | 37.627907 | 78 | 0.561393 | #!/usr/bin/env python
# The contents of this file are subject to the BitTorrent Open Source License
# Version 1.1 (the License). You may not copy or use this file, in either
# source code or executable form, except in compliance with the License. You
# may obtain a copy of the License at http://www.bittorrent.com/li... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -4 | 88 |
787a606c676269a99903652bf8012db39d6d96ef | 330 | py | Python | website/article/migrations/0005_remove_article_preface.py | Bigpop/Vue3-Django-drf | 899fca9fed3a7d51a0e39a5ac4ec2103596eedef | [
"MIT"
] | 1 | 2021-12-10T14:11:06.000Z | 2021-12-10T14:11:06.000Z | article/migrations/0005_remove_article_preface.py | Bigpop/django-blog-template | 96f015024521c3d7c2d0ff409202940d7ffbfcec | [
"MIT"
] | null | null | null | article/migrations/0005_remove_article_preface.py | Bigpop/django-blog-template | 96f015024521c3d7c2d0ff409202940d7ffbfcec | [
"MIT"
] | null | null | null | # Generated by Django 2.2.1 on 2021-10-24 19:38
| 18.333333 | 47 | 0.593939 | # Generated by Django 2.2.1 on 2021-10-24 19:38
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('article', '0004_auto_20211024_1742'),
]
operations = [
migrations.RemoveField(
model_name='article',
name='preface',
... | 0 | 0 | 0 | 224 | 0 | 0 | 0 | 11 | 46 |
8211211687538c1d6495ab9d1a7d5b510fb89062 | 559 | py | Python | core/tasks.py | SM2015/orchid | 41ec024a6faaa52a7568f4430b52173a3eb98667 | [
"MIT"
] | null | null | null | core/tasks.py | SM2015/orchid | 41ec024a6faaa52a7568f4430b52173a3eb98667 | [
"MIT"
] | null | null | null | core/tasks.py | SM2015/orchid | 41ec024a6faaa52a7568f4430b52173a3eb98667 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import logging
logging.basicConfig() | 19.964286 | 47 | 0.781753 | from __future__ import absolute_import
from celery import shared_task
from actstream import action
import core.models as cm
import time
@shared_task
def experimental(numbers):
print "experiment occuring"
time.sleep(30)
return True
@shared_task
def update_cache():
print "updating cache"
time.sleep... | 0 | 158 | 0 | 0 | 0 | 0 | 0 | 124 | 202 |
98ec5f88ad934bdc52d219f4b0d284b21a48a09b | 352 | py | Python | paint.py | SeanLi-OI/ICM-2019-Code | 5b63cccfd67e4ee1730d5937d9e0697a33b25f9b | [
"MIT"
] | 1 | 2019-01-25T07:48:47.000Z | 2019-01-25T07:48:47.000Z | paint.py | SeanLi-OI/ICM-2019-Code | 5b63cccfd67e4ee1730d5937d9e0697a33b25f9b | [
"MIT"
] | null | null | null | paint.py | SeanLi-OI/ICM-2019-Code | 5b63cccfd67e4ee1730d5937d9e0697a33b25f9b | [
"MIT"
] | null | null | null | import numpy as np
import pylab as pl
times=np.arange(3,6,0.01) #timesx050,01
fun=lambda x:(x-5.4)**2+24.24#np.cos(20*x)*np.exp(-pl.absolute(x)) #funxxy
pl.plot(times,fun(times)) #
pl.xlabel("time period length") #x
pl.ylabel("evacuation time") #y
#pl.title("damped oscillation") #
pl.show() #
| 32 | 92 | 0.704545 | import numpy as np
import pylab as pl
times=np.arange(3,6,0.01) #times为x的值,0为起点,5为终点,0,01为步长
fun=lambda x:(x-5.4)**2+24.24#np.cos(20*x)*np.exp(-pl.absolute(x)) #fun为关于x的函数,也就是对应于x的y的值
pl.plot(times,fun(times)) #画图
pl.xlabel("time period length") #x轴的标记
pl.ylabel("evacuation time") #y轴的标记
#pl.title("damped oscill... | 144 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3fe73d595a0bfe5f700a289b6e5dd9a5fe782ac2 | 30,016 | py | Python | code/synchronization/osgameclones_synchronization.py | pazkero/opensourcegames | 6cde84b7a1fc893338174a66c142ff423f87e9ea | [
"CC0-1.0"
] | null | null | null | code/synchronization/osgameclones_synchronization.py | pazkero/opensourcegames | 6cde84b7a1fc893338174a66c142ff423f87e9ea | [
"CC0-1.0"
] | null | null | null | code/synchronization/osgameclones_synchronization.py | pazkero/opensourcegames | 6cde84b7a1fc893338174a66c142ff423f87e9ea | [
"CC0-1.0"
] | null | null | null | """
osgameclones has the following fields:
'updated', 'video', 'repo', 'license', 'originals', 'status', 'multiplayer', 'info', 'lang', 'feed', 'content', 'images', 'url', 'name', 'framework', 'type', 'development'
mandatory fields are: 'name', 'license', 'type', 'originals'
possible values:
osgc-development: active... | 50.447059 | 313 | 0.578025 | """
osgameclones has the following fields:
'updated', 'video', 'repo', 'license', 'originals', 'status', 'multiplayer', 'info', 'lang', 'feed', 'content', 'images', 'url', 'name', 'framework', 'type', 'development'
mandatory fields are: 'name', 'license', 'type', 'originals'
possible values:
osgc-development: activ... | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
138d146e97f7b4623f8fd3deecf15906b9477507 | 152 | py | Python | cryocon/debugging_file.py | AlexanderPollak/Cryocon-Control | 1f112f99ed94e0605de0af043e90e90fcebb78b7 | [
"MIT"
] | null | null | null | cryocon/debugging_file.py | AlexanderPollak/Cryocon-Control | 1f112f99ed94e0605de0af043e90e90fcebb78b7 | [
"MIT"
] | null | null | null | cryocon/debugging_file.py | AlexanderPollak/Cryocon-Control | 1f112f99ed94e0605de0af043e90e90fcebb78b7 | [
"MIT"
] | null | null | null | from connection import com
h = com()
print h.open()
print h.sensor.compressor_motor_temperature()
print h.sensor.compressor_supply_temperature() | 12.666667 | 46 | 0.776316 | from connection import com
h = com()
print h.open()
print h.sensor.compressor_motor_temperature()
print h.sensor.compressor_supply_temperature() | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
ffcee6681f954873f29f7c1887e34bd41b2f176b | 4,243 | py | Python | improved_permissions/getters.py | gabrielbiasi/django-improved-permissions | 9cf6d0ddb8a4dcfa2e58d3adbf1357e56a64ce71 | [
"MIT"
] | 12 | 2018-03-22T00:30:32.000Z | 2021-04-24T16:26:08.000Z | improved_permissions/getters.py | s-sys/django-improved-permissions | 9cf6d0ddb8a4dcfa2e58d3adbf1357e56a64ce71 | [
"MIT"
] | 27 | 2018-03-18T00:43:37.000Z | 2020-06-05T18:09:18.000Z | improved_permissions/getters.py | gabrielbiasi/django-improved-permissions | 9cf6d0ddb8a4dcfa2e58d3adbf1357e56a64ce71 | [
"MIT"
] | 2 | 2018-03-28T17:54:43.000Z | 2021-01-11T21:17:08.000Z | """getters functions"""
from django.contrib.auth import get_user_model
from django.contrib.contenttypes.models import ContentType
from improved_permissions.exceptions import NotAllowed
from improved_permissions.models import UserRole
from improved_permissions.utils import check_my_model, get_roleclass
def get_user(r... | 28.47651 | 70 | 0.666745 | """getters functions"""
from django.contrib.auth import get_user_model
from django.contrib.contenttypes.models import ContentType
from improved_permissions.exceptions import NotAllowed
from improved_permissions.models import UserRole
from improved_permissions.utils import check_my_model, get_roleclass
def get_user(r... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
be44a5302268fad641a68236ca9c12b8e9613542 | 1,301 | py | Python | retangulo3.py | abnermuxah/opengl-escala-translacao-rotacao-python | ad3b90c40a346afaa8bbf72696d0a8d4027eb14d | [
"MIT"
] | null | null | null | retangulo3.py | abnermuxah/opengl-escala-translacao-rotacao-python | ad3b90c40a346afaa8bbf72696d0a8d4027eb14d | [
"MIT"
] | null | null | null | retangulo3.py | abnermuxah/opengl-escala-translacao-rotacao-python | ad3b90c40a346afaa8bbf72696d0a8d4027eb14d | [
"MIT"
] | null | null | null | scale = 1
transx = transy = 1
rota = 1
if __name__ == "__main__":
glutInit()
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB)
glutInitWindowSize(800, 600)
glutCreateWindow('Window')
glClearColor(0.2,0.2,0.2,0)
glutKeyboardFunc(keyboard)
glutDisplayFunc(draw1)
glutMainLoop()
| 21.327869 | 64 | 0.564181 | from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
scale = 1
transx = transy = 1
rota = 1
def draw1():
glClear(GL_COLOR_BUFFER_BIT)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
gluOrtho2D(10,-10,10,-10)
glScale(scale,scale,0)
glTranslate(transx, transy, 0)
glRotate(r... | 0 | 0 | 0 | 0 | 0 | 880 | 0 | 9 | 110 |
98e11a561720e47c6164c567df85d15c7a842bc1 | 5,367 | py | Python | src/pybiblia/pybiblia.py | dennislwm/pybiblia | 0212a419065668fee79ee2b085074e75cc26d375 | [
"MIT"
] | null | null | null | src/pybiblia/pybiblia.py | dennislwm/pybiblia | 0212a419065668fee79ee2b085074e75cc26d375 | [
"MIT"
] | null | null | null | src/pybiblia/pybiblia.py | dennislwm/pybiblia | 0212a419065668fee79ee2b085074e75cc26d375 | [
"MIT"
] | null | null | null | #------------
# Web request
#------------
# Html parser
#-----------------
# Standard library
"""--------+---------+---------+---------+---------+---------+---------+---------+---------|
| M A I N C L A S S |
|----------+---------+---------+-------... | 37.795775 | 107 | 0.422582 | #------------
# Web request
import requests
#------------
# Html parser
from bs4 import BeautifulSoup
import lxml
#-----------------
# Standard library
import json
import re
"""--------+---------+---------+---------+---------+---------+---------+---------+---------|
| M A I N C L A... | 0 | 0 | 0 | 4,891 | 0 | 0 | 0 | -30 | 132 |
d5ccf4bc57cf4385e299e90637d5820859589af2 | 1,794 | bzl | Python | packages/typescript/test/ts_project/swc/tests.bzl | jakebiesinger-storyhealth/rules_nodejs | 8df86ccb799e4f9f3c4b26174f09b58a89ef3639 | [
"Apache-2.0"
] | 1 | 2020-03-29T21:45:58.000Z | 2020-03-29T21:45:58.000Z | packages/typescript/test/ts_project/swc/tests.bzl | jakebiesinger-storyhealth/rules_nodejs | 8df86ccb799e4f9f3c4b26174f09b58a89ef3639 | [
"Apache-2.0"
] | null | null | null | packages/typescript/test/ts_project/swc/tests.bzl | jakebiesinger-storyhealth/rules_nodejs | 8df86ccb799e4f9f3c4b26174f09b58a89ef3639 | [
"Apache-2.0"
] | 1 | 2022-02-02T20:42:16.000Z | 2022-02-02T20:42:16.000Z | "Unit tests for starlark API of ts_project with custom transpiler"
load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest")
load("@rules_nodejs//nodejs:providers.bzl", "DeclarationInfo", "JSModuleInfo")
transitive_declarations_test = unittest.make(_impl0, attrs = {
"lib": attr.label(default = "transpile_wit... | 32.618182 | 84 | 0.709588 | "Unit tests for starlark API of ts_project with custom transpiler"
load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest")
load("@rules_nodejs//nodejs:providers.bzl", "DeclarationInfo", "JSModuleInfo")
def _impl0(ctx):
env = unittest.begin(ctx)
decls = []
for decl in ctx.attr.lib[DeclarationInfo].... | 0 | 0 | 0 | 0 | 0 | 883 | 0 | 0 | 92 |
e06c15017cf5dda18851749ed8d0487668672756 | 1,647 | py | Python | faceR/util/image_helper.py | hritools/faceR | 8f701ea68515927163d5904d58262d1b480a9a97 | [
"MIT"
] | null | null | null | faceR/util/image_helper.py | hritools/faceR | 8f701ea68515927163d5904d58262d1b480a9a97 | [
"MIT"
] | null | null | null | faceR/util/image_helper.py | hritools/faceR | 8f701ea68515927163d5904d58262d1b480a9a97 | [
"MIT"
] | null | null | null |
import numpy as np
from PIL import ImageFont, ImageDraw, Image
def threadsafe_generator(f):
"""
A decorator that takes a generator function and makes it thread-safe.
"""
return g
def redraw_frame(image, names, aligned):
"""
Adds names and bounding boxes to the frame
"""
i = 0
... | 27.45 | 104 | 0.581664 | import threading
import numpy as np
from PIL import ImageFont, ImageDraw, Image
class ThreadsafeIter:
"""
Takes an iterator/generator and makes it thread-safe by
serializing call to the `next` method of given iterator/generator.
"""
def __init__(self, it):
self.it = it
self.lock ... | 0 | 0 | 0 | 362 | 0 | 38 | 0 | -5 | 72 |
d9e1c1da43fb9929e7fbc48da94113ad0810002e | 4,543 | py | Python | model-optimizer/mo/moc_frontend/pipeline.py | evgeniya-egupova/openvino | 4b8d6c59e3444ecdc549bfdf357d19d625479b89 | [
"Apache-2.0"
] | null | null | null | model-optimizer/mo/moc_frontend/pipeline.py | evgeniya-egupova/openvino | 4b8d6c59e3444ecdc549bfdf357d19d625479b89 | [
"Apache-2.0"
] | 8 | 2021-12-02T20:59:44.000Z | 2022-02-21T13:17:56.000Z | model-optimizer/mo/moc_frontend/pipeline.py | rkazants/openvino | a9a583eb42d43322b39b95b164b5b22c4f341111 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import argparse
import logging as log
from typing import List
from mo.moc_frontend.extractor import fe_user_data_repack
from mo.middle.passes.infer import validate_batch_in_shape
from openvino.runtime import Dimension, PartialShape ... | 45.43 | 108 | 0.690293 | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import argparse
import logging as log
from typing import List
from mo.moc_frontend.extractor import fe_user_data_repack
from mo.middle.passes.infer import validate_batch_in_shape
from openvino.runtime import Dimension, PartialShape ... | 0 | 0 | 0 | 0 | 0 | 99 | 0 | 0 | 27 |
a59cd73a8d6f0d3c33127fe3d4a8247ce65ddc58 | 1,308 | py | Python | serial_formatter.py | Varigarble/serial-number-format-validator | 5094db55e360288c0572b5f7e22ae46b06f853b8 | [
"Apache-2.0"
] | 2 | 2021-08-12T11:48:17.000Z | 2021-12-23T08:26:58.000Z | serial_formatter.py | Varigarble/serial-number-format-validator | 5094db55e360288c0572b5f7e22ae46b06f853b8 | [
"Apache-2.0"
] | null | null | null | serial_formatter.py | Varigarble/serial-number-format-validator | 5094db55e360288c0572b5f7e22ae46b06f853b8 | [
"Apache-2.0"
] | null | null | null | import re
# RegEx search strings for certain software vendors
oauth_sn = re.compile(r'\b(\d{3}-\d{8}\b)')
oauth_key = re.compile(r'\b([a-zA-Z]|\d)\d([a-zA-Z]|\d)[a-zA-Z]\d\b')
abalo_sn = re.compile(r'(\b(\d{4}-){5}\d{4}\b)')
serial_number_restrictions = {'OAuthDex': oauth_sn, 'Abalobadiah': abalo_sn}
product_key_res... | 31.142857 | 80 | 0.62156 | import re
# RegEx search strings for certain software vendors
oauth_sn = re.compile(r'\b(\d{3}-\d{8}\b)')
oauth_key = re.compile(r'\b([a-zA-Z]|\d)\d([a-zA-Z]|\d)[a-zA-Z]\d\b')
abalo_sn = re.compile(r'(\b(\d{4}-){5}\d{4}\b)')
serial_number_restrictions = {'OAuthDex': oauth_sn, 'Abalobadiah': abalo_sn}
product_key_res... | 0 | 0 | 0 | 0 | 0 | 904 | 0 | 0 | 46 |
8b470a14e790b32a2b6bdc88c022ec8cf05ebd54 | 942 | py | Python | setup.py | FurkanArslan/rl_algorithms | f6c61e02e181510c212a6ef7b4598338205e4bf7 | [
"MIT"
] | null | null | null | setup.py | FurkanArslan/rl_algorithms | f6c61e02e181510c212a6ef7b4598338205e4bf7 | [
"MIT"
] | null | null | null | setup.py | FurkanArslan/rl_algorithms | f6c61e02e181510c212a6ef7b4598338205e4bf7 | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
# pylint: disable=line-too-long
setup(
name="rl_algorithms",
version="0.0.1",
author="medipixel",
author_email="kh.kim@medipixel.io",
description="RL algorithms which a... | 33.642857 | 77 | 0.679406 | from setuptools import find_packages, setup
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
# pylint: disable=line-too-long
setup(
name="rl_algorithms",
version="0.0.1",
author="medipixel",
author_email="kh.kim@medipixel.io",
description="RL algorithms which a... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cdf8c230470c81450b07eb39261afa6cd9a012f9 | 3,324 | py | Python | data/generate_individual_data_and_bipartite_graph.py | pedroramaciotti/linate | 93cfb2df47e63ca63f8224d577e6c704f3e3caf1 | [
"MIT"
] | null | null | null | data/generate_individual_data_and_bipartite_graph.py | pedroramaciotti/linate | 93cfb2df47e63ca63f8224d577e6c704f3e3caf1 | [
"MIT"
] | null | null | null | data/generate_individual_data_and_bipartite_graph.py | pedroramaciotti/linate | 93cfb2df47e63ca63f8224d577e6c704f3e3caf1 | [
"MIT"
] | null | null | null | # generate grouped data and a bipartite social graph
if __name__ == "__main__":
main()
| 46.166667 | 104 | 0.659446 | # generate grouped data and a bipartite social graph
import synthetic_data_generation as gen
import numpy as np
def main():
random_state = None # for random number generation
N_referential = 100
N_followers = 1000
######################################################
# Generating synthetic da... | 0 | 0 | 0 | 0 | 0 | 3,148 | 0 | 15 | 69 |
526a6f91cb5c0993a1c213ca1ac56302d861751e | 20,096 | py | Python | train_oneshot.py | submission6378/OneshotCLIP | 794ae95c734387bb7829c142bcb822bcb2504c05 | [
"MIT"
] | 40 | 2022-03-14T00:58:32.000Z | 2022-03-30T22:46:32.000Z | train_oneshot.py | submission6378/OneshotCLIP | 794ae95c734387bb7829c142bcb822bcb2504c05 | [
"MIT"
] | 2 | 2022-03-18T14:13:12.000Z | 2022-03-25T21:48:32.000Z | train_oneshot.py | submission6378/OneshotCLIP | 794ae95c734387bb7829c142bcb822bcb2504c05 | [
"MIT"
] | 1 | 2022-03-29T21:09:49.000Z | 2022-03-29T21:09:49.000Z | import argparse
import random
import os
import torch
from torch import nn, optim
from torch.utils import data
from torchvision import transforms
from model import Generator, Extra
from model import Patch_Discriminator as Discriminator
from dataset import MultiResolutionDataset
import clip
if __name__ == "_... | 32.783034 | 131 | 0.606738 | import argparse
import math
import random
import os
import sys
import numpy as np
import torch
from torch import nn, autograd, optim
from torch.nn import functional as F
from torch.utils import data
import torch.distributed as dist
from torchvision import transforms, utils
from tqdm import tqdm
from copy import deepcop... | 0 | 0 | 0 | 0 | 144 | 13,107 | 0 | 136 | 599 |
c5e4a21db9a6d400be4b311ab8fe03b850a8dacb | 451 | py | Python | cluster/elbow.py | ansin218/reddit-comments-data-analysis | bf2c3980d36000c895b71337997ea15b03cce7ec | [
"MIT"
] | 7 | 2018-04-23T06:29:35.000Z | 2021-06-09T13:55:26.000Z | cluster/elbow.py | ansin218/reddit-comments-data-analysis | bf2c3980d36000c895b71337997ea15b03cce7ec | [
"MIT"
] | null | null | null | cluster/elbow.py | ansin218/reddit-comments-data-analysis | bf2c3980d36000c895b71337997ea15b03cce7ec | [
"MIT"
] | null | null | null | import execnet
import cPickle as pickle
from collections import Counter
import numpy as np
from sklearn.cluster import MiniBatchKMeans
from scipy.spatial.distance import cdist, pdist
from sklearn import cluster, metrics
from time import time
if __name__ == '__channelexec__':
while 1:
X = pickle.load(open("/med... | 28.1875 | 66 | 0.778271 | import execnet
import cPickle as pickle
from collections import Counter
import numpy as np
from sklearn.cluster import MiniBatchKMeans
from scipy.spatial.distance import cdist, pdist
from sklearn import cluster, metrics
from time import time
if __name__ == '__channelexec__':
while 1:
X = pickle.load(open("/med... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2b159df2338e7bb96c6aa3df4857c05df7967f5a | 280 | py | Python | pynode/src/launcher.py | Joseph-Davies/VCE-algorithmics-project-2 | a8f43866ac76116f96266e6c52df72bdd09c5452 | [
"MIT"
] | null | null | null | pynode/src/launcher.py | Joseph-Davies/VCE-algorithmics-project-2 | a8f43866ac76116f96266e6c52df72bdd09c5452 | [
"MIT"
] | null | null | null | pynode/src/launcher.py | Joseph-Davies/VCE-algorithmics-project-2 | a8f43866ac76116f96266e6c52df72bdd09c5452 | [
"MIT"
] | null | null | null | # Copyright (c) 2017 Alex Socha
# http://www.alexsocha.com/pynode
| 23.333333 | 39 | 0.746429 | # Copyright (c) 2017 Alex Socha
# http://www.alexsocha.com/pynode
from pynode.src import communicate
def set_run_function(func):
communicate.set_run_function(func)
def begin_pynode(run_func=None):
set_run_function(run_func)
communicate.open_connection()
| 0 | 0 | 0 | 0 | 0 | 124 | 0 | 13 | 75 |
bf8928f0a8023f29a859730ef059bf8360f7c010 | 1,027 | py | Python | nobel_physics_prizes/src/data/jsonl_utils.py | covuworie/nobel-physics-prizes | f89a32cd6eb9bbc9119a231bffee89b177ae847a | [
"MIT"
] | 3 | 2019-08-21T05:35:42.000Z | 2020-10-08T21:28:51.000Z | nobel_physics_prizes/src/data/jsonl_utils.py | covuworie/nobel-physics-prizes | f89a32cd6eb9bbc9119a231bffee89b177ae847a | [
"MIT"
] | 139 | 2018-09-01T23:15:59.000Z | 2021-02-02T22:01:39.000Z | nobel_physics_prizes/src/data/jsonl_utils.py | covuworie/nobel-physics-prizes | f89a32cd6eb9bbc9119a231bffee89b177ae847a | [
"MIT"
] | null | null | null | import gzip
import jsonlines
import os
import shutil
def read_jsonl(file):
"""Read a JSON lines file into a list of JSON dicts.
Args:
file (file object): An existing file object to be read from.
The file can either be a json lines file (extension `.jsonl`)
or a gzip file (exte... | 25.04878 | 74 | 0.61149 | import gzip
import jsonlines
import os
import shutil
def read_jsonl(file):
"""Read a JSON lines file into a list of JSON dicts.
Args:
file (file object): An existing file object to be read from.
The file can either be a json lines file (extension `.jsonl`)
or a gzip file (exte... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
93a86e417e7fbb23a5a509048e6f50ebaaf3c42a | 399 | py | Python | test/testNet/testHttp/testHttpServer/testChunckFileServer/test_http_chunk_download.py | wangsun1983/Obotcha | 2464e53599305703f5150df72bf73579a39d8ef4 | [
"MIT"
] | 27 | 2019-04-27T00:51:22.000Z | 2022-03-30T04:05:44.000Z | test/testNet/testHttp/testHttpServer/testChunckFileServer/test_http_chunk_download.py | wangsun1983/Obotcha | 2464e53599305703f5150df72bf73579a39d8ef4 | [
"MIT"
] | 9 | 2020-05-03T12:17:50.000Z | 2021-10-15T02:18:47.000Z | test/testNet/testHttp/testHttpServer/testChunckFileServer/test_http_chunk_download.py | wangsun1983/Obotcha | 2464e53599305703f5150df72bf73579a39d8ef4 | [
"MIT"
] | 1 | 2019-04-16T01:45:36.000Z | 2019-04-16T01:45:36.000Z | import requests
import os
count = 1
#while 1:
count = 0
while count < 32:
r = requests.get("http://127.0.0.1:1123/index")
filename = "./tmp/"+str(count)
with open(os.path.join(os.path.dirname(os.path.abspath("__file__")),filename),"wb") as f:
f.write(r.content)
count = count + 1
r.close()
... | 21 | 93 | 0.661654 | import socket
import threading
import time
import http.client
import requests
import os
count = 1
#while 1:
count = 0
while count < 32:
r = requests.get("http://127.0.0.1:1123/index")
filename = "./tmp/"+str(count)
with open(os.path.join(os.path.dirname(os.path.abspath("__file__")),filename),"wb") as f:
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -26 | 88 |
c3181f8e4f937fc6bff699c9c7fa3cbc405e817b | 242 | py | Python | day22/initial_states.py | UpwardTrajectory/advent_2020 | b19a37bb40ed43deddfaab4a4e68f2ca6ac43a90 | [
"MIT"
] | null | null | null | day22/initial_states.py | UpwardTrajectory/advent_2020 | b19a37bb40ed43deddfaab4a4e68f2ca6ac43a90 | [
"MIT"
] | null | null | null | day22/initial_states.py | UpwardTrajectory/advent_2020 | b19a37bb40ed43deddfaab4a4e68f2ca6ac43a90 | [
"MIT"
] | null | null | null | sample = """Player 1:
9
2
6
3
1
Player 2:
5
8
4
7
10"""
starting_decks = """Player 1:
3
42
4
25
14
36
32
18
33
10
35
50
16
31
34
46
9
6
41
7
15
45
30
27
49
Player 2:
8
11
47
21
17
39
29
43
23
28
13
22
5
20
44
38
26
37
2
24
48
12
19
1
40""" | 3.61194 | 29 | 0.619835 | sample = """Player 1:
9
2
6
3
1
Player 2:
5
8
4
7
10"""
starting_decks = """Player 1:
3
42
4
25
14
36
32
18
33
10
35
50
16
31
34
46
9
6
41
7
15
45
30
27
49
Player 2:
8
11
47
21
17
39
29
43
23
28
13
22
5
20
44
38
26
37
2
24
48
12
19
1
40""" | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
130226bc53b1f964977451f23705f080b7d3819d | 5,028 | py | Python | pynYNAB/ClientFactory.py | rienafairefr/pynYNAB | d5fc0749618409c6bb01cc2b93832cc59d780eaa | [
"MIT"
] | 82 | 2017-02-21T11:07:24.000Z | 2022-03-20T21:56:17.000Z | pynYNAB/ClientFactory.py | rienafairefr/pynYNAB | d5fc0749618409c6bb01cc2b93832cc59d780eaa | [
"MIT"
] | 37 | 2017-02-19T10:28:03.000Z | 2021-01-23T07:44:06.000Z | pynYNAB/ClientFactory.py | rienafairefr/pynYNAB | d5fc0749618409c6bb01cc2b93832cc59d780eaa | [
"MIT"
] | 13 | 2017-03-07T10:08:59.000Z | 2018-05-11T04:53:25.000Z | import logging
LOG = logging.getLogger(__name__)
| 37.804511 | 117 | 0.623906 | import logging
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from pynYNAB.ObjClient import RootObjClient
from pynYNAB.connection import nYnabConnection
from pynYNAB.exceptions import NoBudgetNameException, BudgetNotFound, NoCredentialsException
from pynYNAB.schema import Base, Catalog, ... | 0 | 747 | 0 | 3,670 | 0 | 129 | 0 | 178 | 249 |
d4418acb135b8e4931cf533f2aefa8033bbd0a2a | 56 | py | Python | examples/_tests_scripts/rl_exploration.py | rhololkeolke/catalyst-rl | ec18ff4a58b6d00652f772231db8de86debb4b3d | [
"Apache-2.0"
] | 46 | 2020-03-27T20:12:32.000Z | 2021-11-21T19:08:51.000Z | examples/_tests_scripts/rl_exploration.py | rhololkeolke/catalyst-rl | ec18ff4a58b6d00652f772231db8de86debb4b3d | [
"Apache-2.0"
] | 2 | 2020-04-06T10:43:04.000Z | 2020-07-01T18:26:10.000Z | examples/_tests_scripts/rl_exploration.py | rhololkeolke/catalyst-rl | ec18ff4a58b6d00652f772231db8de86debb4b3d | [
"Apache-2.0"
] | 5 | 2020-04-17T14:09:53.000Z | 2021-05-10T08:58:29.000Z | # flake8: noqa
| 18.666667 | 40 | 0.785714 | # flake8: noqa
from catalyst_rl.rl.exploration import *
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 22 |
0bebf03ba78b09b4523704205133903765366852 | 5,542 | py | Python | Web/cardio_training.py | apratimshukla6/PharmaCat | 1755155220cceb85febd9a142f12387ff522c604 | [
"Apache-2.0"
] | 15 | 2019-12-19T09:57:09.000Z | 2022-02-25T09:13:17.000Z | Web/cardio_training.py | PharmaCat/Application | e050cf5812f0ea860c6359868bb532d49d3236cc | [
"Apache-2.0"
] | 6 | 2020-03-24T17:45:14.000Z | 2022-03-12T00:02:07.000Z | Web/cardio_training.py | Codebotics/PharmaCat | e050cf5812f0ea860c6359868bb532d49d3236cc | [
"Apache-2.0"
] | 6 | 2020-06-02T03:12:30.000Z | 2022-03-09T08:35:52.000Z | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import scipy.stats as stats
import pickle
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
df = mydata = pd.read_csv("Data/cardio_train.csv", sep=";")
df.drop('id', inplace=True, axis=1)
df.h... | 34.209877 | 127 | 0.726092 | import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
from matplotlib import pyplot as plt
import tensorflow as tf
from tensorflow.keras.optimizers import RMSprop,Nadam,Adadelta,Adam
from tensorflow.keras.layers import BatchNormalization,LeakyReLU
from tensorflow.ker... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 238 | 325 |
0527e43d0a11798ec1b9ca3415088abef19f6910 | 218 | py | Python | angryProfessor.py | LuisAngelHM/python | a9b9db0e561c4e675c462ee3a30c3326c00b7aa2 | [
"MIT"
] | null | null | null | angryProfessor.py | LuisAngelHM/python | a9b9db0e561c4e675c462ee3a30c3326c00b7aa2 | [
"MIT"
] | null | null | null | angryProfessor.py | LuisAngelHM/python | a9b9db0e561c4e675c462ee3a30c3326c00b7aa2 | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
k = 2
a = [0, -1, 2, 1]
print(angryProfessor(k,a)) | 21.8 | 37 | 0.53211 | def angryProfessor(k, a):
students = [i for i in a if i<=0]
if len(students) >= k:
return "NO"
return "YES"
if __name__ == "__main__":
k = 2
a = [0, -1, 2, 1]
print(angryProfessor(k,a)) | 0 | 0 | 0 | 0 | 0 | 106 | 0 | 0 | 22 |
d30127931a17a6cbcff5d69611f7d42247f2117d | 433 | py | Python | multiaddr/codecs/__init__.py | alexander255/py-multiaddr-1 | 8df4450a91549e1e041059e7f57934c84f6bc477 | [
"Apache-2.0",
"MIT"
] | 25 | 2018-07-26T01:53:32.000Z | 2022-03-08T21:28:43.000Z | multiaddr/codecs/__init__.py | alexander255/py-multiaddr-1 | 8df4450a91549e1e041059e7f57934c84f6bc477 | [
"Apache-2.0",
"MIT"
] | 40 | 2018-11-29T11:32:44.000Z | 2022-03-05T19:08:47.000Z | multiaddr/codecs/__init__.py | alexander255/py-multiaddr-1 | 8df4450a91549e1e041059e7f57934c84f6bc477 | [
"Apache-2.0",
"MIT"
] | 13 | 2018-03-24T08:16:09.000Z | 2021-05-19T11:13:26.000Z |
# These are special sizes
LENGTH_PREFIXED_VAR_SIZE = -1
CODEC_CACHE = {}
| 18.826087 | 90 | 0.678984 | import importlib
# These are special sizes
LENGTH_PREFIXED_VAR_SIZE = -1
class NoneCodec:
SIZE = 0
IS_PATH = False
CODEC_CACHE = {}
def codec_by_name(name):
if name is None: # Special “do nothing – expect nothing” pseudo-codec
return NoneCodec
codec = CODEC_CACHE.get(name)
if not co... | 9 | 0 | 0 | 28 | 0 | 260 | 0 | -5 | 68 |
2e93ab1e413e894d0f4343091089e5f72e512f82 | 2,360 | py | Python | handwritten/users/serializers/users.py | SWAT-Handwriten-Recognition/Backend | b351f0050806eef3b698ca534040d7c8a336f032 | [
"MIT"
] | null | null | null | handwritten/users/serializers/users.py | SWAT-Handwriten-Recognition/Backend | b351f0050806eef3b698ca534040d7c8a336f032 | [
"MIT"
] | 8 | 2020-11-19T19:57:55.000Z | 2020-11-24T04:37:28.000Z | handwritten/users/serializers/users.py | SWAT-Handwritten-Recognition/Backend | b351f0050806eef3b698ca534040d7c8a336f032 | [
"MIT"
] | null | null | null | """Users Serializers"""
#Django
# Django REST Framework
#Models | 34.705882 | 80 | 0.677119 | """Users Serializers"""
#Django
from django.contrib.auth import authenticate, password_validation
# Django REST Framework
from rest_framework import serializers
from rest_framework.authtoken.models import Token
from rest_framework.validators import UniqueValidator
#Models
from handwritten.users.models import User
cla... | 0 | 0 | 0 | 1,976 | 0 | 0 | 0 | 141 | 179 |
e0c0c9b660240875c17e0e26caf9cc40af1f4712 | 763 | py | Python | vessel/vessel.py | cgiacofei/pybrew | 40062f9b6ccb96ca3cbbb9784434dd9281a9caba | [
"MIT"
] | null | null | null | vessel/vessel.py | cgiacofei/pybrew | 40062f9b6ccb96ca3cbbb9784434dd9281a9caba | [
"MIT"
] | null | null | null | vessel/vessel.py | cgiacofei/pybrew | 40062f9b6ccb96ca3cbbb9784434dd9281a9caba | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
test = Vessel('dat')
for i in range(10):
print(float(test.read_data()))
| 20.078947 | 66 | 0.571429 |
class Vessel(object):
"""Dummy class to return pre-generated data
"""
def __init__(self, dat_file='dat', duty=0):
self.dfile = dat_file
self.line_num = 0
self.duty = duty
def read_temp(self):
temp = open(self.dfile)
temp_lines = temp.readlines()
temp_ou... | 0 | 0 | 0 | 622 | 0 | 0 | 0 | 0 | 23 |
6a9b543f3ef7f943b81b4dce76f0b580d3dc66b5 | 619 | py | Python | lib/SampleService/core/storage/errors.py | zhlu9890/sample_service_updated | f7bb992952cff12e090b2e329e6f12193846ab4b | [
"MIT"
] | null | null | null | lib/SampleService/core/storage/errors.py | zhlu9890/sample_service_updated | f7bb992952cff12e090b2e329e6f12193846ab4b | [
"MIT"
] | 65 | 2020-04-06T21:12:10.000Z | 2022-03-24T19:24:01.000Z | lib/SampleService/core/storage/errors.py | zhlu9890/sample_service_updated | f7bb992952cff12e090b2e329e6f12193846ab4b | [
"MIT"
] | 8 | 2020-04-21T17:31:23.000Z | 2021-12-15T19:43:01.000Z | """
Exceptions for storage events.
"""
| 25.791667 | 93 | 0.720517 | """
Exceptions for storage events.
"""
class SampleStorageError(Exception):
"""
Superclass of all storage related exceptions. Denotes a general storage error.
"""
class StorageInitError(SampleStorageError):
"""
Denotes an error during initialization of the storage system.
"""
class OwnerCh... | 0 | 0 | 0 | 508 | 0 | 0 | 0 | 0 | 69 |
a1f88d8df37cbf391b167205f7bd6b1143c0b541 | 408 | py | Python | aoc02b.py | alekseismyshliaev/aoc2020 | b95273b37c790d7895efa0c5d179fecacf74e4b1 | [
"MIT"
] | null | null | null | aoc02b.py | alekseismyshliaev/aoc2020 | b95273b37c790d7895efa0c5d179fecacf74e4b1 | [
"MIT"
] | null | null | null | aoc02b.py | alekseismyshliaev/aoc2020 | b95273b37c790d7895efa0c5d179fecacf74e4b1 | [
"MIT"
] | null | null | null | import re
import sys
PASSWORD_RE = re.compile('(\d+)-(\d+) (\w): (\w+)')
if __name__ == '__main__':
correct_count = 0
for line in sys.stdin:
pos1, pos2, letter, password = PASSWORD_RE.match(line).groups()
pos1 = int(pos1) - 1
pos2 = int(pos2) - 1
if (letter == password[pos1]... | 22.666667 | 71 | 0.568627 | import re
import sys
PASSWORD_RE = re.compile('(\d+)-(\d+) (\w): (\w+)')
if __name__ == '__main__':
correct_count = 0
for line in sys.stdin:
pos1, pos2, letter, password = PASSWORD_RE.match(line).groups()
pos1 = int(pos1) - 1
pos2 = int(pos2) - 1
if (letter == password[pos1]... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
21053f68b03aeb3a96c7edce9030b007ae84273c | 8,216 | py | Python | ipchange/moxa/moxa.py | cowanml/ipchange | 622bdfb456de1b02a604ab71c5a6c66e5a840679 | [
"BSD-3-Clause"
] | null | null | null | ipchange/moxa/moxa.py | cowanml/ipchange | 622bdfb456de1b02a604ab71c5a6c66e5a840679 | [
"BSD-3-Clause"
] | 2 | 2020-10-08T16:53:27.000Z | 2021-01-07T15:31:47.000Z | ipchange/moxa/moxa.py | cowanml/ipchange | 622bdfb456de1b02a604ab71c5a6c66e5a840679 | [
"BSD-3-Clause"
] | 2 | 2021-01-05T14:29:17.000Z | 2021-02-08T17:05:30.000Z |
_ascii = ('01234567890123456789012345678901 '
'!"#$%&\'()*+,-./0123456789:;<=>?@'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`'
'abcdefghijklmnopqrstuvwxyz{|}~')
| 29.031802 | 77 | 0.554649 | import hashlib
import lxml.html
import os
import pickle
import requests
import sys
_ascii = ('01234567890123456789012345678901 '
'!"#$%&\'()*+,-./0123456789:;<=>?@'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`'
'abcdefghijklmnopqrstuvwxyz{|}~')
class MoxaHTTP_2_2:
def __init__(self, addr, ve... | 0 | 0 | 0 | 7,925 | 0 | 0 | 0 | -49 | 155 |
b48b2b5de10145ed53352a644ede3af68f86ca65 | 914 | py | Python | biggan/paddorch/paddorch/nn/init/__init__.py | zzz2010/Contrib | d351d83da718145cef9f6c98598f7fedc027efe5 | [
"Apache-2.0"
] | 20 | 2020-03-13T13:40:32.000Z | 2022-03-10T07:31:48.000Z | biggan/paddorch/paddorch/nn/init/__init__.py | zzz2010/Contrib | d351d83da718145cef9f6c98598f7fedc027efe5 | [
"Apache-2.0"
] | 34 | 2020-02-20T11:04:58.000Z | 2022-03-12T00:54:26.000Z | biggan/paddorch/paddorch/nn/init/__init__.py | zzz2010/Contrib | d351d83da718145cef9f6c98598f7fedc027efe5 | [
"Apache-2.0"
] | 41 | 2020-02-14T09:34:39.000Z | 2022-03-10T07:31:42.000Z | import paddle.fluid as fluid
import paddorch.cuda
import paddorch.nn
| 26.114286 | 79 | 0.690372 | import paddle.fluid as fluid
import paddle
import paddorch.cuda
import paddorch.nn
import os
import paddorch.nn.functional
from paddle.fluid import dygraph
import numpy as np
def constant_(x, val):
x=fluid.layers.fill_constant(x.shape,x.dtype,val,out=x)
return x
def normal_(x,m=0,std=1):
y=fluid.layers.r... | 0 | 0 | 0 | 0 | 0 | 646 | 0 | -4 | 202 |
71d45a843ae14c0f9e958df6ba02e6fb94943714 | 1,512 | py | Python | stockbot/provider/__init__.py | Habbie/stockbot | 648e70604828d0ed762c243b4eb83122fd393b4d | [
"Apache-2.0"
] | null | null | null | stockbot/provider/__init__.py | Habbie/stockbot | 648e70604828d0ed762c243b4eb83122fd393b4d | [
"Apache-2.0"
] | 16 | 2017-10-12T09:10:28.000Z | 2021-05-20T20:30:15.000Z | stockbot/provider/__init__.py | Habbie/stockbot | 648e70604828d0ed762c243b4eb83122fd393b4d | [
"Apache-2.0"
] | 1 | 2021-06-18T18:23:36.000Z | 2021-06-18T18:23:36.000Z | import logging
LOGGER = logging.getLogger(__name__)
| 30.24 | 94 | 0.690476 | import logging
from .ibindex import IbIndexQueryService
from .nasdaq import NasdaqIndexScraper, NasdaqCompany
from .google import StockDomain, GoogleFinanceQueryService
from .bloomberg import BloombergQueryService
from .avanza import AvanzaQueryService
from .ig import IGQueryService
from .yahoo import YahooQueryService... | 0 | 0 | 0 | 1,014 | 0 | 0 | 0 | 175 | 267 |
509e80cbad75adb52be840fc0c6a2da8da1729e6 | 660 | py | Python | tests/generate_data.py | huangshunliang/toad--scorerisk | f64ec16ece314706b0e74799be98149ad1317110 | [
"MIT"
] | 2 | 2019-12-26T14:10:41.000Z | 2019-12-26T14:10:43.000Z | tests/generate_data.py | zhangwen118/toad | 1cbed4d7f697dd806112a885d191cb455f31598c | [
"MIT"
] | 2 | 2019-09-27T06:26:52.000Z | 2020-03-04T11:48:51.000Z | tests/generate_data.py | zhangwen118/toad | 1cbed4d7f697dd806112a885d191cb455f31598c | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
np.random.seed(1)
LENGTH = 500
A = np.random.rand(LENGTH)
A[np.random.choice(LENGTH, 20, replace = False)] = np.nan
B = np.random.randint(100, size = LENGTH)
C = A + np.random.normal(0, 0.2, LENGTH)
D = A + np.random.normal(0, 0.1, LENGTH)
E = np.random.rand(LENGTH)
E[np.rand... | 18.333333 | 58 | 0.612121 | import numpy as np
import pandas as pd
np.random.seed(1)
LENGTH = 500
A = np.random.rand(LENGTH)
A[np.random.choice(LENGTH, 20, replace = False)] = np.nan
B = np.random.randint(100, size = LENGTH)
C = A + np.random.normal(0, 0.2, LENGTH)
D = A + np.random.normal(0, 0.1, LENGTH)
E = np.random.rand(LENGTH)
E[np.rand... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6ce5592beb3c4a24deaeda6b6f367b984e9a4053 | 960 | py | Python | src/cogs/utils/emote.py | Rishiraj0100/Credo | bd9523c54632c727fc98d571c61ea72b5401ed3a | [
"MIT"
] | 5 | 2021-05-30T07:07:24.000Z | 2021-06-15T06:25:45.000Z | src/cogs/utils/emote.py | Rishiraj0100/Credo | bd9523c54632c727fc98d571c61ea72b5401ed3a | [
"MIT"
] | 2 | 2021-07-22T02:47:49.000Z | 2021-08-06T15:37:29.000Z | src/cogs/utils/emote.py | Rishiraj0100/Credo | bd9523c54632c727fc98d571c61ea72b5401ed3a | [
"MIT"
] | 4 | 2021-08-03T06:08:55.000Z | 2021-11-07T11:54:08.000Z | xmark = '<:xmark:820320509211574284>'
tick = '<:tick:820320509564551178>'
voice_channel = '<:Voice_channels:820162682883014667> '
text_channel = '<:Text_Channel:820162682970832897>'
error = '<:error:820162683147911169>'
questionmark = '<:questionmark:820319249867866143>'
info = '<:info:820332723121684530>'
youtube = '<... | 30.967742 | 63 | 0.68125 | xmark = '<:xmark:820320509211574284>'
tick = '<:tick:820320509564551178>'
voice_channel = '<:Voice_channels:820162682883014667> '
text_channel = '<:Text_Channel:820162682970832897>'
error = '<:error:820162683147911169>'
questionmark = '<:questionmark:820319249867866143>'
info = '<:info:820332723121684530>'
youtube = '<... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1b9d7f5391a7b71fe3a5414b9a3eb32bc64fe4f3 | 8,852 | py | Python | composer/loggers/wandb_logger.py | growlix/composer | 27418a3c65dca26d90ac09c6ae67cbd5d0202ccf | [
"Apache-2.0"
] | null | null | null | composer/loggers/wandb_logger.py | growlix/composer | 27418a3c65dca26d90ac09c6ae67cbd5d0202ccf | [
"Apache-2.0"
] | null | null | null | composer/loggers/wandb_logger.py | growlix/composer | 27418a3c65dca26d90ac09c6ae67cbd5d0202ccf | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 MosaicML Composer authors
# SPDX-License-Identifier: Apache-2.0
"""Log to `Weights and Biases <https://wandb.ai/>`_."""
from __future__ import annotations
__all__ = ["WandBLogger"]
| 40.054299 | 120 | 0.610484 | # Copyright 2022 MosaicML Composer authors
# SPDX-License-Identifier: Apache-2.0
"""Log to `Weights and Biases <https://wandb.ai/>`_."""
from __future__ import annotations
import atexit
import os
import pathlib
import re
import sys
import tempfile
import warnings
from typing import Any, Dict, List, Optional
from co... | 3 | 0 | 0 | 8,226 | 0 | 0 | 0 | 112 | 311 |
94e5f69617a1ca11a83e8d4741118d4189653887 | 738 | py | Python | src/main.py | SimpleHomeAssistant/voiceControl | 86934d2b32e510c6be665155e6e723a6fa3b35a8 | [
"MIT"
] | null | null | null | src/main.py | SimpleHomeAssistant/voiceControl | 86934d2b32e510c6be665155e6e723a6fa3b35a8 | [
"MIT"
] | null | null | null | src/main.py | SimpleHomeAssistant/voiceControl | 86934d2b32e510c6be665155e6e723a6fa3b35a8 | [
"MIT"
] | null | null | null | import config
from controlClient import ControlClient
from recognizer import Recognizer
import logging
client=ControlClient(config.mqtt_broker_address,config.mqtt_broker_port,config.mqtt_voice_topic)
recognizer=Recognizer(config.model_directory)
logger = logging.getLogger(__name__)
if __name__ == "__main__":
mai... | 29.52 | 96 | 0.799458 | import config
from controlClient import ControlClient
from recognizer import Recognizer
from voiceListener import VoiceListener
import logging
client=ControlClient(config.mqtt_broker_address,config.mqtt_broker_port,config.mqtt_voice_topic)
recognizer=Recognizer(config.model_directory)
logger = logging.getLogger(__nam... | 0 | 0 | 0 | 0 | 0 | 329 | 0 | 18 | 68 |
00dc3dfbfc229f35854a9523d606d9671d6c8f9b | 1,034 | py | Python | ickafka/input.py | davegallant/ickafka | b0cdd0959738a2b0ac19ce6292227b309f159f2f | [
"Apache-2.0"
] | null | null | null | ickafka/input.py | davegallant/ickafka | b0cdd0959738a2b0ac19ce6292227b309f159f2f | [
"Apache-2.0"
] | 1 | 2020-09-25T10:19:29.000Z | 2020-09-28T10:17:58.000Z | ickafka/input.py | davegallant/ickafka | b0cdd0959738a2b0ac19ce6292227b309f159f2f | [
"Apache-2.0"
] | null | null | null | """Parsing of CLI input (args)."""
import argparse
from ickafka.__version__ import VERSION
def get_args():
"""Parse args"""
parser = argparse.ArgumentParser(description="Consume from kafka")
parser.add_argument(
"-s", "--server", help="kafka broker ip or hostname", default="localhost"... | 31.333333 | 84 | 0.603482 | """Parsing of CLI input (args)."""
import argparse
from ickafka.__version__ import VERSION
def get_args():
"""Parse args"""
parser = argparse.ArgumentParser(description="Consume from kafka")
parser.add_argument(
"-s", "--server", help="kafka broker ip or hostname", default="localhost"... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f8441ff2acec0be82540f451b4db9f06cf23144f | 238 | py | Python | parsing/serialized_objects/ship_status.py | Lukas-Dresel/InBetweenUs | 855d8d773ff136c3a1884744057b2b21972f6a9d | [
"MIT"
] | 3 | 2020-10-20T19:45:23.000Z | 2021-07-30T15:19:02.000Z | parsing/serialized_objects/ship_status.py | Lukas-Dresel/InBetweenUs | 855d8d773ff136c3a1884744057b2b21972f6a9d | [
"MIT"
] | null | null | null | parsing/serialized_objects/ship_status.py | Lukas-Dresel/InBetweenUs | 855d8d773ff136c3a1884744057b2b21972f6a9d | [
"MIT"
] | null | null | null |
from ..common import debug_field, DirtyBits
ShipStatus_Partial = Struct(
"DirtyBits" / DirtyBits,
"NumSystems" / VarInt,
"Systems" / debug_field(Byte[this.NumSystems]),
)
ShipStatus_Full = Struct(
) | 18.307692 | 51 | 0.714286 | from construct import *
from ..common import debug_field, DirtyBits
ShipStatus_Partial = Struct(
"DirtyBits" / DirtyBits,
"NumSystems" / VarInt,
"Systems" / debug_field(Byte[this.NumSystems]),
)
ShipStatus_Full = Struct(
) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 22 |
ecc68f73a5048e7d5f5bfef6d31793b6978651c4 | 3,085 | py | Python | PfamScripts/adda/lib/Logger.py | ankitskvmdam/rfam-website | 5b200ab64fa7c70778c991f239b8ddb11dce4ed5 | [
"Apache-2.0"
] | 6 | 2017-01-25T12:53:23.000Z | 2021-03-17T04:52:35.000Z | PfamScripts/adda/lib/Logger.py | ankitskvmdam/rfam-website | 5b200ab64fa7c70778c991f239b8ddb11dce4ed5 | [
"Apache-2.0"
] | 50 | 2015-11-06T10:31:46.000Z | 2021-12-03T16:17:28.000Z | PfamScripts/adda/lib/Logger.py | ankitskvmdam/rfam-website | 5b200ab64fa7c70778c991f239b8ddb11dce4ed5 | [
"Apache-2.0"
] | 2 | 2019-05-30T00:10:26.000Z | 2021-04-12T09:42:17.000Z | import logging
def initPool(queue, level):
"""
This causes the logging module to be initialized with the necessary info
in pool threads to work correctly.
"""
logging.getLogger('').addHandler(MultiProcessingLogHandler(logging.StreamHandler(), queue, child=True))
logging.getLogger('').setLevel(l... | 33.901099 | 114 | 0.623339 | import multiprocessing, logging, sys, re, os, StringIO, threading, time, Queue, collections
from logging import Logger
class MultiProcessingLogHandler(logging.Handler):
"""taken from http://stackoverflow.com/questions/641420/how-should-i-log-while-using-multiprocessing-in-python
added counting of log message... | 0 | 0 | 0 | 2,412 | 0 | 195 | 0 | 82 | 69 |
6790da8780a4bd5180e85e7c831ec3443501d3c8 | 166 | py | Python | pymagnitude/third_party/allennlp/version.py | tpeng/magnitude | aec98628b5547773ca8c4114ec6d1ad51e21b230 | [
"MIT"
] | 1,520 | 2018-03-01T13:37:49.000Z | 2022-03-25T11:40:20.000Z | pymagnitude/third_party/allennlp/version.py | tpeng/magnitude | aec98628b5547773ca8c4114ec6d1ad51e21b230 | [
"MIT"
] | 87 | 2018-03-03T15:12:50.000Z | 2022-02-21T15:24:12.000Z | pymagnitude/third_party/allennlp/version.py | tpeng/magnitude | aec98628b5547773ca8c4114ec6d1ad51e21b230 | [
"MIT"
] | 121 | 2018-03-03T08:40:53.000Z | 2022-03-16T05:19:38.000Z | _MAJOR = u"0"
_MINOR = u"6"
_REVISION = u"1-unreleased"
VERSION_SHORT = u"{0}.{1}".format(_MAJOR, _MINOR)
VERSION = u"{0}.{1}.{2}".format(_MAJOR, _MINOR, _REVISION)
| 23.714286 | 58 | 0.656627 | _MAJOR = u"0"
_MINOR = u"6"
_REVISION = u"1-unreleased"
VERSION_SHORT = u"{0}.{1}".format(_MAJOR, _MINOR)
VERSION = u"{0}.{1}.{2}".format(_MAJOR, _MINOR, _REVISION)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
562774cec7b70f916b0e0c33892bd6be50f93b60 | 4,197 | py | Python | bokeh/models/glyph.py | teresafds/bokeh | 95b2a74ff463cfabdf9e3390951fa380166e6691 | [
"BSD-3-Clause"
] | null | null | null | bokeh/models/glyph.py | teresafds/bokeh | 95b2a74ff463cfabdf9e3390951fa380166e6691 | [
"BSD-3-Clause"
] | null | null | null | bokeh/models/glyph.py | teresafds/bokeh | 95b2a74ff463cfabdf9e3390951fa380166e6691 | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 29.145833 | 78 | 0.470098 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 0 | 1,927 | 0 | 0 | 0 | 0 | 0 | 54 | 249 |
d96440ea215c7d0e93a8f64b5fbcc2c7774c5a77 | 950 | py | Python | Scripts/Miscellaneous/Car Detection/car_detection_vid.py | ShivangiPatel102/Python_and_the_Web | 6d3b55aef20feeda3cfff941d7bbdc26cbcc70d2 | [
"MIT"
] | 437 | 2020-09-24T13:57:39.000Z | 2022-03-30T12:45:56.000Z | Scripts/Miscellaneous/Car Detection/car_detection_vid.py | ShivangiPatel102/Python_and_the_Web | 6d3b55aef20feeda3cfff941d7bbdc26cbcc70d2 | [
"MIT"
] | 355 | 2020-09-24T13:53:16.000Z | 2022-03-27T04:20:40.000Z | Scripts/Miscellaneous/Car Detection/car_detection_vid.py | ShivangiPatel102/Python_and_the_Web | 6d3b55aef20feeda3cfff941d7bbdc26cbcc70d2 | [
"MIT"
] | 315 | 2020-09-24T18:41:19.000Z | 2022-03-07T05:53:01.000Z | # IMPORTS
import cv2
# Read the video file
cap = cv2.VideoCapture("./Data/cars.avi")
# PROPids of the video frame
frame_width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
frame_height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
# FourCC Codec to identify the video file format
fourcc = cv2.VideoWriter_fourcc(*"XVID")
saved... | 23.75 | 68 | 0.691579 | # IMPORTS
import cv2
# Read the video file
cap = cv2.VideoCapture("./Data/cars.avi")
# PROPids of the video frame
frame_width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
frame_height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
# FourCC Codec to identify the video file format
fourcc = cv2.VideoWriter_fourcc(*"XVID")
saved... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |