hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | 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 125 | 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 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
50130c0336ac4ecad32bf1cfe47a0d7871688d46 | 28,590 | py | Python | sequential_tracing/source/source/library_tools/LibraryTools.py | ZhuangLab/Chromatin_Analysis_2020_cell | ecc0d3e92e8b9cb0dcf970c29440f91404055da6 | [
"MIT"
] | 19 | 2020-08-20T15:05:10.000Z | 2021-08-17T19:31:07.000Z | sequential_tracing/source/source/library_tools/LibraryTools.py | zhengpuas47/Chromatin_Tracing_Analysis | 850f6e068798408662aa40d20719e038a20176be | [
"MIT"
] | 1 | 2020-12-07T12:48:49.000Z | 2020-12-17T06:45:57.000Z | sequential_tracing/source/library_tools/LibraryTools.py | ZhuangLab/Chromatin_Analysis_2020_cell | ecc0d3e92e8b9cb0dcf970c29440f91404055da6 | [
"MIT"
] | 4 | 2020-08-21T07:39:25.000Z | 2021-03-10T08:10:43.000Z | import numpy as np
import os
import pickle
def seqrc(string):
"returns the reverse complement of a sequence"
dic_rc = constant_key_dict({'a':'t','c':'g','g':'c','t':'a','A':'T','C':'G','G':'C','T':'A'})
string_rc = "".join([dic_rc[c] for c in string][::-1])
return string_rc
def getFastaWeb(chrom,pos1,po... | 43.782542 | 216 | 0.591815 | import numpy as np
import os
import pickle
class constant_key_dict (dict):
def __missing__ (self, key):
return key
def seqrc(string):
"returns the reverse complement of a sequence"
dic_rc = constant_key_dict({'a':'t','c':'g','g':'c','t':'a','A':'T','C':'G','G':'C','T':'A'})
string_rc = "".join([... | 16,707 | 58 | 1,026 |
9c74bc304474a90f922e3ba5e1d7784293623014 | 9,738 | py | Python | plaso/storage/sqlite/merge_reader.py | infosecjosh/plaso | 7b5fc33591c60e89afc231a451449d40e02d8985 | [
"Apache-2.0"
] | null | null | null | plaso/storage/sqlite/merge_reader.py | infosecjosh/plaso | 7b5fc33591c60e89afc231a451449d40e02d8985 | [
"Apache-2.0"
] | null | null | null | plaso/storage/sqlite/merge_reader.py | infosecjosh/plaso | 7b5fc33591c60e89afc231a451449d40e02d8985 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Merge reader for SQLite storage files."""
from __future__ import unicode_literals
import os
import sqlite3
import zlib
from plaso.containers import errors
from plaso.containers import event_sources
from plaso.containers import events
from plaso.containers import reports
from plaso.containe... | 33.235495 | 80 | 0.728692 | # -*- coding: utf-8 -*-
"""Merge reader for SQLite storage files."""
from __future__ import unicode_literals
import os
import sqlite3
import zlib
from plaso.containers import errors
from plaso.containers import event_sources
from plaso.containers import events
from plaso.containers import reports
from plaso.containe... | 0 | 0 | 0 |
b85bd517170fb2c46c50b357f62819dc54489c92 | 3,744 | py | Python | tests/utest/test_utils.py | josflorap/robotframework-tidy | 9d4e1ccc6a50c415187468305235830f80f3373b | [
"Apache-2.0"
] | null | null | null | tests/utest/test_utils.py | josflorap/robotframework-tidy | 9d4e1ccc6a50c415187468305235830f80f3373b | [
"Apache-2.0"
] | null | null | null | tests/utest/test_utils.py | josflorap/robotframework-tidy | 9d4e1ccc6a50c415187468305235830f80f3373b | [
"Apache-2.0"
] | null | null | null | import os
from pathlib import Path
import pytest
from robotidy.app import Robotidy
from robotidy.utils import decorate_diff_with_color, split_args_from_name_or_path, GlobalFormattingConfig
@pytest.fixture
| 34.348624 | 116 | 0.560096 | import os
from pathlib import Path
import pytest
from robotidy.app import Robotidy
from robotidy.utils import decorate_diff_with_color, split_args_from_name_or_path, GlobalFormattingConfig
@pytest.fixture
def app():
formatting_config = GlobalFormattingConfig(
space_count=4,
line_sep="auto",
... | 2,032 | 1,457 | 45 |
eb2a1467c4234db8a4875a5a94aa28520f59d682 | 1,113 | py | Python | Cinema/migrations/0011_auto_20210614_1505.py | jmv21/oficial_project | 1098dde46a80cff312a25f30ed0e560ce2c21e2b | [
"MIT"
] | null | null | null | Cinema/migrations/0011_auto_20210614_1505.py | jmv21/oficial_project | 1098dde46a80cff312a25f30ed0e560ce2c21e2b | [
"MIT"
] | null | null | null | Cinema/migrations/0011_auto_20210614_1505.py | jmv21/oficial_project | 1098dde46a80cff312a25f30ed0e560ce2c21e2b | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-06-14 21:05
from django.db import migrations, models
| 29.289474 | 121 | 0.583109 | # Generated by Django 3.2 on 2021-06-14 21:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Cinema', '0010_merge_0009_auto_20210611_1256_0009_auto_20210611_1549'),
]
operations = [
migrations.RemoveField(
model_name='purch... | 0 | 1,001 | 23 |
0adf3b85c88c62deb19c2d6d5e8cf6f50a3e171b | 435 | py | Python | tests/basics/comprehension1.py | geowor01/micropython | 7fb13eeef4a85f21cae36f1d502bcc53880e1815 | [
"MIT"
] | 7 | 2019-10-18T13:41:39.000Z | 2022-03-15T17:27:57.000Z | tests/basics/comprehension1.py | geowor01/micropython | 7fb13eeef4a85f21cae36f1d502bcc53880e1815 | [
"MIT"
] | null | null | null | tests/basics/comprehension1.py | geowor01/micropython | 7fb13eeef4a85f21cae36f1d502bcc53880e1815 | [
"MIT"
] | 2 | 2020-06-23T09:10:15.000Z | 2020-12-22T06:42:14.000Z |
f()
print("PASS") | 20.714286 | 55 | 0.528736 | def f():
# list comprehension
print([a + 1 for a in range(5)])
print([(a, b) for a in range(3) for b in range(2)])
print([a * 2 for a in range(7) if a > 3])
print([a for a in [1, 3, 5]])
print([a for a in [a for a in range(4)]])
# dict comprehension
d = {a : 2 * a for a in range(5)}
... | 394 | 0 | 22 |
c7ea3b6ca37492c99d8961d4b45945fe7a2bbafc | 8,679 | py | Python | tensorflow_compression/python/distributions/round_adapters.py | SamuelMarks/compression | e5c0dcf2d4846a030abc5f91f75863b204357c35 | [
"Apache-2.0"
] | 1 | 2020-12-30T04:33:36.000Z | 2020-12-30T04:33:36.000Z | tensorflow_compression/python/distributions/round_adapters.py | wwxn/compression | 734ff910119bd24bbfdb08b6f6da906c789a57a1 | [
"Apache-2.0"
] | null | null | null | tensorflow_compression/python/distributions/round_adapters.py | wwxn/compression | 734ff910119bd24bbfdb08b6f6da906c789a57a1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 30.996429 | 80 | 0.686024 | # Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 3,252 | 0 | 674 |
f3002145209ee8b737ec2f4d286e4a38f0f7d345 | 262 | py | Python | src/dal_jal/views.py | pandabuilder/django-autocomplete-light | 41f699aadaa6214acd5d947b717394b1237a7223 | [
"MIT"
] | null | null | null | src/dal_jal/views.py | pandabuilder/django-autocomplete-light | 41f699aadaa6214acd5d947b717394b1237a7223 | [
"MIT"
] | null | null | null | src/dal_jal/views.py | pandabuilder/django-autocomplete-light | 41f699aadaa6214acd5d947b717394b1237a7223 | [
"MIT"
] | null | null | null |
from django.views import generic
class JalQuerySetView(generic.ListView):
"""View mixin to render a JSON response for Select2."""
def render_to_response(self, context):
"""Return a JSON response in Select2 format."""
return 'hello !'
| 23.818182 | 59 | 0.687023 |
from django.views import generic
class JalQuerySetView(generic.ListView):
"""View mixin to render a JSON response for Select2."""
def render_to_response(self, context):
"""Return a JSON response in Select2 format."""
return 'hello !'
| 0 | 0 | 0 |
620fcc7b4276e841a11ec20ede451a0949a8feb1 | 714 | py | Python | problems/A/TelephoneNumber.py | deveshbajpai19/CodeForces | 707b374f03012ec68054841f791d48b33ae4ef1b | [
"MIT"
] | 55 | 2016-06-19T05:45:15.000Z | 2022-03-31T15:18:53.000Z | problems/A/TelephoneNumber.py | farhadcu/CodeForces-2 | 707b374f03012ec68054841f791d48b33ae4ef1b | [
"MIT"
] | null | null | null | problems/A/TelephoneNumber.py | farhadcu/CodeForces-2 | 707b374f03012ec68054841f791d48b33ae4ef1b | [
"MIT"
] | 25 | 2016-07-29T13:03:15.000Z | 2021-09-17T01:45:45.000Z | __author__ = 'Devesh Bajpai'
'''
https://codeforces.com/problemset/problem/1167/A
Solution: From the first occurrence of 8 in the given string s, we should have at least 10 characters. Say that 8 exists
on ith index. Then n - 1 - i + 1 = n - i would give the length of the longest string starting with 8. That should b... | 23.032258 | 120 | 0.602241 | __author__ = 'Devesh Bajpai'
'''
https://codeforces.com/problemset/problem/1167/A
Solution: From the first occurrence of 8 in the given string s, we should have at least 10 characters. Say that 8 exists
on ith index. Then n - 1 - i + 1 = n - i would give the length of the longest string starting with 8. That should b... | 123 | 0 | 23 |
5de25e56d03ec7529b49111e303f4cbcadddf004 | 1,952 | py | Python | designate-8.0.0/designate/backend/impl_powerdns/migrate_repo/versions/009_cascade_domain_deletes.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | null | null | null | designate-8.0.0/designate/backend/impl_powerdns/migrate_repo/versions/009_cascade_domain_deletes.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | designate-8.0.0/designate/backend/impl_powerdns/migrate_repo/versions/009_cascade_domain_deletes.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Author: Kiall Mac Innes <kiall@hpe.com>
#
# 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/... | 30.5 | 75 | 0.717213 | # Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Author: Kiall Mac Innes <kiall@hpe.com>
#
# 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/... | 1,134 | 0 | 46 |
eb12d1bb6f9cb70a43876fd387a56d535b88ed8e | 463 | py | Python | paginas/migrations/0004_publicacao_upload.py | DSheridanmt/Safety-Life | 522578858f8e063e14d0274de008c345ef2c0a75 | [
"MIT"
] | null | null | null | paginas/migrations/0004_publicacao_upload.py | DSheridanmt/Safety-Life | 522578858f8e063e14d0274de008c345ef2c0a75 | [
"MIT"
] | null | null | null | paginas/migrations/0004_publicacao_upload.py | DSheridanmt/Safety-Life | 522578858f8e063e14d0274de008c345ef2c0a75 | [
"MIT"
] | null | null | null | # Generated by Django 4.0 on 2022-03-08 23:22
from django.db import migrations, models
| 23.15 | 72 | 0.62203 | # Generated by Django 4.0 on 2022-03-08 23:22
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('paginas', '0003_remove_publicacao_data_atualizacao_and_more'),
]
operations = [
migrations.AddField(
model_name='publicacao',
... | 0 | 351 | 23 |
9f8596434453fada0ce44edab6fb4e92888b37c4 | 1,198 | py | Python | .github/workflows/patch-asyncio.py | jwj019/SimpleITK-Notebooks | ade3741c3fa807a35b239f68b83f39c5f67e099f | [
"Apache-2.0"
] | 657 | 2015-02-20T13:50:28.000Z | 2022-03-31T11:42:22.000Z | .github/workflows/patch-asyncio.py | jwj019/SimpleITK-Notebooks | ade3741c3fa807a35b239f68b83f39c5f67e099f | [
"Apache-2.0"
] | 100 | 2015-02-19T18:53:06.000Z | 2022-03-29T15:20:39.000Z | .github/workflows/patch-asyncio.py | jwj019/SimpleITK-Notebooks | ade3741c3fa807a35b239f68b83f39c5f67e099f | [
"Apache-2.0"
] | 313 | 2015-01-29T20:23:36.000Z | 2022-03-23T06:34:21.000Z | from __future__ import print_function
import fileinput
import asyncio
asyncLib = asyncio.__file__
lineNum = 0
# This script is used to address an issue on Windows with asyncio in the Tornado web server.
# See links below for more information
# https://github.com/tornadoweb/tornado/issues/2608
# https://www.tornadoweb... | 35.235294 | 96 | 0.651085 | from __future__ import print_function
import fileinput
import asyncio
asyncLib = asyncio.__file__
lineNum = 0
# This script is used to address an issue on Windows with asyncio in the Tornado web server.
# See links below for more information
# https://github.com/tornadoweb/tornado/issues/2608
# https://www.tornadoweb... | 0 | 0 | 0 |
599ae95603603736cbe31f2844356305a075fb9d | 629 | py | Python | wordhell/Part_1/wordhell.py | gcp825/code_challenges | 97de884260f23f1e69d4867d52507a1be01e8824 | [
"MIT"
] | null | null | null | wordhell/Part_1/wordhell.py | gcp825/code_challenges | 97de884260f23f1e69d4867d52507a1be01e8824 | [
"MIT"
] | null | null | null | wordhell/Part_1/wordhell.py | gcp825/code_challenges | 97de884260f23f1e69d4867d52507a1be01e8824 | [
"MIT"
] | null | null | null | from collections import Counter
| 34.944444 | 126 | 0.586645 | from collections import Counter
def get_result(guess,answer):
guess, answer, colours = (guess.upper(), answer.upper(), [])
letters = list(zip(guess[:len(answer)],answer))[::-1]
greyout = [g for g,x in Counter(guess).items() for a,y in Counter(answer).items() for z in range(x-y) if g == a and x > y]
... | 570 | 0 | 23 |
74ce5869c1273641db819c7df939bc619b77d924 | 1,130 | py | Python | pancan_fusion/fusion_outliers/abundance_calculations.py | ding-lab/griffin-fusion | cb2970f448dd3f50c678fcb755daa8f0b5a005a2 | [
"MIT"
] | 4 | 2019-09-02T15:03:22.000Z | 2021-12-03T19:28:50.000Z | pancan_fusion/fusion_outliers/abundance_calculations.py | ding-lab/griffin-fusion | cb2970f448dd3f50c678fcb755daa8f0b5a005a2 | [
"MIT"
] | null | null | null | pancan_fusion/fusion_outliers/abundance_calculations.py | ding-lab/griffin-fusion | cb2970f448dd3f50c678fcb755daa8f0b5a005a2 | [
"MIT"
] | 2 | 2020-09-15T02:37:22.000Z | 2020-09-29T09:24:27.000Z | import sys
import numpy
ensg_gene = open(sys.argv[1], 'r')
abun_file = open(sys.argv[2], 'r')
output_file = open(sys.argv[3],'w')
#set up ensg dict
ensg_dict = {}
gene_dict = {}
gene_list = []
for line in ensg_gene:
ensg, gene = line.strip().split()
ensg_dict[ ensg ] = gene
if gene not in gene_dict:
gene_di... | 26.904762 | 119 | 0.658407 | import sys
import numpy
ensg_gene = open(sys.argv[1], 'r')
abun_file = open(sys.argv[2], 'r')
output_file = open(sys.argv[3],'w')
#set up ensg dict
ensg_dict = {}
gene_dict = {}
gene_list = []
for line in ensg_gene:
ensg, gene = line.strip().split()
ensg_dict[ ensg ] = gene
if gene not in gene_dict:
gene_di... | 0 | 0 | 0 |
06149c92025f132045f0478d86818f166b5de67f | 4,250 | py | Python | src/silx/io/test/test_write_to_h5.py | tifuchs/silx | 4b8b9e58ecd6fd4ca0ae80f2e74b956b26bcc3f7 | [
"CC0-1.0",
"MIT"
] | 94 | 2016-03-04T17:25:53.000Z | 2022-03-18T18:05:23.000Z | src/silx/io/test/test_write_to_h5.py | tifuchs/silx | 4b8b9e58ecd6fd4ca0ae80f2e74b956b26bcc3f7 | [
"CC0-1.0",
"MIT"
] | 2,841 | 2016-01-21T09:06:49.000Z | 2022-03-18T14:53:56.000Z | src/silx/io/test/test_write_to_h5.py | t20100/silx | 035cb286dd46f3f0cb3f819a3cfb6ce253c9933b | [
"CC0-1.0",
"MIT"
] | 71 | 2015-09-30T08:35:35.000Z | 2022-03-16T07:16:28.000Z | # coding: utf-8
# /*##########################################################################
# Copyright (C) 2021 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# i... | 35.714286 | 86 | 0.624941 | # coding: utf-8
# /*##########################################################################
# Copyright (C) 2021 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# i... | 256 | 0 | 27 |
3dd8ff67b12a905723423a8663578b8f649a0421 | 2,044 | py | Python | robot/waffles_display.py | rsthomp/wafflesazoo | 57a2542b6bd61036efa3fff8839909f774e1dd67 | [
"MIT"
] | null | null | null | robot/waffles_display.py | rsthomp/wafflesazoo | 57a2542b6bd61036efa3fff8839909f774e1dd67 | [
"MIT"
] | null | null | null | robot/waffles_display.py | rsthomp/wafflesazoo | 57a2542b6bd61036efa3fff8839909f774e1dd67 | [
"MIT"
] | null | null | null | import pygame
import os
import time
import random
import requests
from rx import Observable, Observer
from rx.concurrency import ThreadPoolScheduler
from waffles_feels import waffles_feels
from waffles_commands import WafflesCMD
from waffles_pos import five_second_timer
print('0')
#Updates the actual displayed image... | 24.926829 | 102 | 0.728474 | import pygame
import os
import time
import random
import requests
from rx import Observable, Observer
from rx.concurrency import ThreadPoolScheduler
from waffles_feels import waffles_feels
from waffles_commands import WafflesCMD
from waffles_pos import five_second_timer
print('0')
#Updates the actual displayed image... | 795 | 9 | 115 |
fd0600b8353e414fc31968043f51d0d27fbf8f12 | 22,203 | py | Python | pm/models/situ_social_activity_family.py | aosojnik/pipeline-manager-features-models | e5232f1c1b2073253a1c505dc9fff0d3d839dd6c | [
"MIT"
] | null | null | null | pm/models/situ_social_activity_family.py | aosojnik/pipeline-manager-features-models | e5232f1c1b2073253a1c505dc9fff0d3d839dd6c | [
"MIT"
] | null | null | null | pm/models/situ_social_activity_family.py | aosojnik/pipeline-manager-features-models | e5232f1c1b2073253a1c505dc9fff0d3d839dd6c | [
"MIT"
] | null | null | null | ##################################################################################
##########--this is an autogenerated python model definition for proDEX--#########
##--original file: Family_Assessment_v05_forprodex.dxi --##
##################################################################################
from .lib.... | 112.705584 | 209 | 0.85511 | ##################################################################################
##########--this is an autogenerated python model definition for proDEX--#########
##--original file: Family_Assessment_v05_forprodex.dxi --##
##################################################################################
from .lib.... | 0 | 0 | 0 |
73203aca3d16bb92f993919016b4a09e053e902b | 1,119 | py | Python | chapter 3 - stacks and queues/3.2.py | anuraagdjain/cracking_the_coding_interview | 09083b4c464f41d5752c7ca3d27ab7c992793619 | [
"MIT"
] | null | null | null | chapter 3 - stacks and queues/3.2.py | anuraagdjain/cracking_the_coding_interview | 09083b4c464f41d5752c7ca3d27ab7c992793619 | [
"MIT"
] | null | null | null | chapter 3 - stacks and queues/3.2.py | anuraagdjain/cracking_the_coding_interview | 09083b4c464f41d5752c7ca3d27ab7c992793619 | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
s = MinStack()
s.add(5)
s.add(-3)
s.add(1)
s.add(6)
s.add(-1)
print(s.pop())
print(s.get_min())
s.add(-10)
s.pop()
| 18.966102 | 61 | 0.526363 | class Node:
def __init__(self, data):
self.data = data
self.next = None
class Stack:
def __init__(self):
self.top = None
def add(self, data):
node = Node(data)
node.next = self.top
self.top = node
def pop(self):
item = self.top.data
sel... | 623 | -25 | 335 |
86eadf6b705f0089cbbe547b10a749f347fbf86f | 1,755 | py | Python | Moving-to-Melbourne---Housing-Again!/code.py | ANanade/ga-learner-dsmp-repo | ba5c06d039cfba6222998fccaca88e629c4bc3b8 | [
"MIT"
] | null | null | null | Moving-to-Melbourne---Housing-Again!/code.py | ANanade/ga-learner-dsmp-repo | ba5c06d039cfba6222998fccaca88e629c4bc3b8 | [
"MIT"
] | null | null | null | Moving-to-Melbourne---Housing-Again!/code.py | ANanade/ga-learner-dsmp-repo | ba5c06d039cfba6222998fccaca88e629c4bc3b8 | [
"MIT"
] | null | null | null | # --------------
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
# path- variable storing file path
df = pd.read_csv(path)
df.columns[range(5)]
X = df.drop(['Price'], axis = 1)
y= df.Price
X_train,X_test,y_train,y_test = train_test_split(X , y , test_size = 0.3, r... | 21.9375 | 92 | 0.707692 | # --------------
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
# path- variable storing file path
df = pd.read_csv(path)
df.columns[range(5)]
X = df.drop(['Price'], axis = 1)
y= df.Price
X_train,X_test,y_train,y_test = train_test_split(X , y , test_size = 0.3, r... | 0 | 0 | 0 |
0c177cb946bb0bcc84e16ee3f15e953374a97fbd | 8,918 | py | Python | Quadrotor_velocity_control.py | Ryan906k9/quadrotor_velocity_control | 7e3f28d94c931d277394a8591a5925583642586c | [
"MIT"
] | null | null | null | Quadrotor_velocity_control.py | Ryan906k9/quadrotor_velocity_control | 7e3f28d94c931d277394a8591a5925583642586c | [
"MIT"
] | null | null | null | Quadrotor_velocity_control.py | Ryan906k9/quadrotor_velocity_control | 7e3f28d94c931d277394a8591a5925583642586c | [
"MIT"
] | null | null | null | import numpy as np
import parl
from parl.utils import logger
from parl.utils import action_mapping # 将神经网络输出映射到对应的 实际动作取值范围 内
from parl.utils import ReplayMemory # 经验回放
from rlschool import make_env # 使用 RLSchool 创建飞行器环境
from parl.algorithms import DDPG
import paddle.fluid as fluid
import parl
from parl import la... | 32.429091 | 86 | 0.591837 | import numpy as np
import parl
from parl.utils import logger
from parl.utils import action_mapping # 将神经网络输出映射到对应的 实际动作取值范围 内
from parl.utils import ReplayMemory # 经验回放
from rlschool import make_env # 使用 RLSchool 创建飞行器环境
from parl.algorithms import DDPG
class QuadrotorAgent(parl.Agent):
def __init__(self, algo... | 6,123 | 41 | 457 |
eb88fdadfb290aecfda1d0c370c0cbc8e4c3bdc2 | 3,189 | py | Python | addons/rest_api/controllers/redisdb.py | Prescrypto/odooku | a6647e0e22bb5d41a2f025852df736a5c657a038 | [
"Apache-2.0"
] | null | null | null | addons/rest_api/controllers/redisdb.py | Prescrypto/odooku | a6647e0e22bb5d41a2f025852df736a5c657a038 | [
"Apache-2.0"
] | 9 | 2017-09-07T18:42:16.000Z | 2021-03-18T05:58:58.000Z | addons/rest_api/controllers/redisdb.py | Prescrypto/odooku | a6647e0e22bb5d41a2f025852df736a5c657a038 | [
"Apache-2.0"
] | 1 | 2018-10-16T20:45:10.000Z | 2018-10-16T20:45:10.000Z | # -*- coding: utf-8 -*-
import redis
import logging
try:
import simplejson as json
except ImportError:
import json
_logger = logging.getLogger(__name__)
| 34.290323 | 83 | 0.56789 | # -*- coding: utf-8 -*-
import redis
import logging
try:
import simplejson as json
except ImportError:
import json
_logger = logging.getLogger(__name__)
class RedisTokenStore(object):
def __init__(self, host='localhost', port=6379, db=0, password=None):
self.rs = redis.StrictRedis(host=host,... | 2,741 | 9 | 271 |
421f011ca77258f909f26458d6c8149223833f62 | 19,490 | py | Python | model_multi_classifier.py | mbarbetti/lymphoma-classification | e1ec25302270388a4215d840b0c2925b043e1716 | [
"MIT"
] | null | null | null | model_multi_classifier.py | mbarbetti/lymphoma-classification | e1ec25302270388a4215d840b0c2925b043e1716 | [
"MIT"
] | null | null | null | model_multi_classifier.py | mbarbetti/lymphoma-classification | e1ec25302270388a4215d840b0c2925b043e1716 | [
"MIT"
] | null | null | null | import os
import pickle
import numpy as np
from tqdm import tqdm
from argparse import ArgumentParser
import optuna
optuna.logging.set_verbosity ( optuna.logging.ERROR ) # silence Optuna during trials study
import warnings
warnings.filterwarnings ( "ignore", category = RuntimeWarning )
from sklearn.model_selec... | 45.115741 | 172 | 0.579682 | import os
import pickle
import numpy as np
from tqdm import tqdm
from argparse import ArgumentParser
import optuna
optuna.logging.set_verbosity ( optuna.logging.ERROR ) # silence Optuna during trials study
import warnings
warnings.filterwarnings ( "ignore", category = RuntimeWarning )
from sklearn.model_selec... | 3,795 | 0 | 125 |
bfa57a625f2be19d4a30738c7fd3f863a0804ed1 | 6,048 | py | Python | Leak #5 - Lost In Translation/windows/Resources/Ops/PyScripts/windows/eventlogs.py | bidhata/EquationGroupLeaks | 1ff4bc115cb2bd5bf2ed6bf769af44392926830c | [
"Unlicense"
] | 9 | 2019-11-22T04:58:40.000Z | 2022-02-26T16:47:28.000Z | Python.Fuzzbunch/Resources/Ops/PyScripts/windows/eventlogs.py | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | null | null | null | Python.Fuzzbunch/Resources/Ops/PyScripts/windows/eventlogs.py | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | 8 | 2017-09-27T10:31:18.000Z | 2022-01-08T10:30:46.000Z |
import dsz, dsz.cmd, dsz.control
import ops, ops.pprint
import ops.data
import traceback, sys
from optparse import OptionParser
if (__name__ == '__main__'):
usage = 'python windows\\eventloqs.py [Options]\n-m, --monitor \n Runs in monitor mode, defaults to false\n-i, --interval [timeinterval]\n Interval betw... | 52.137931 | 408 | 0.581019 |
import dsz, dsz.cmd, dsz.control
import ops, ops.pprint
import ops.data
import traceback, sys
from optparse import OptionParser
def monitorlogs(interval=300, classic=False, logname='', target=None, filters=[]):
logquerycmd = 'eventlogquery '
if classic:
logquerycmd += ' -classic '
elif (logname !=... | 4,593 | 0 | 92 |
f01b4e41f742d0c8d1d8141475e3f06a6e34955a | 15 | py | Python | src/quiltz/testsupport/version.py | qwaneu/quiltz-testsupport | d28df8657818fae75208ed0cf50d417955e92ba4 | [
"MIT"
] | null | null | null | src/quiltz/testsupport/version.py | qwaneu/quiltz-testsupport | d28df8657818fae75208ed0cf50d417955e92ba4 | [
"MIT"
] | null | null | null | src/quiltz/testsupport/version.py | qwaneu/quiltz-testsupport | d28df8657818fae75208ed0cf50d417955e92ba4 | [
"MIT"
] | null | null | null | version="0.2.1" | 15 | 15 | 0.666667 | version="0.2.1" | 0 | 0 | 0 |
e68c325abae9f0d6f6a4ce2e2488f4c69bba4a5f | 733 | py | Python | src/oscar/management/commands/oscar_send_alerts.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/management/commands/oscar_send_alerts.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/management/commands/oscar_send_alerts.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | import logging
from django.core.management.base import BaseCommand
from django.utils.translation import ugettext_lazy as _
from oscar.apps.customer.alerts import utils
logger = logging.getLogger(__name__)
class Command(BaseCommand):
"""
Check stock records of products for availability and send ... | 28.192308 | 73 | 0.665757 | import logging
from django.core.management.base import BaseCommand
from django.utils.translation import ugettext_lazy as _
from oscar.apps.customer.alerts import utils
logger = logging.getLogger(__name__)
class Command(BaseCommand):
"""
Check stock records of products for availability and send ... | 0 | 0 | 0 |
2ee02461bd282a5d55728439acfafc1cef05a08c | 4,175 | py | Python | conda_smithy/tests/test_lint_recipe.py | janschulz/conda-smithy | 7474c0cd668c7141f7aa936cf5603dae3f76697e | [
"BSD-3-Clause"
] | null | null | null | conda_smithy/tests/test_lint_recipe.py | janschulz/conda-smithy | 7474c0cd668c7141f7aa936cf5603dae3f76697e | [
"BSD-3-Clause"
] | null | null | null | conda_smithy/tests/test_lint_recipe.py | janschulz/conda-smithy | 7474c0cd668c7141f7aa936cf5603dae3f76697e | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
from collections import OrderedDict
import os
import shutil
import subprocess
import tempfile
import textwrap
import unittest
import conda_smithy.lint_recipe as linter
if __name__ == '__main__':
unittest.main()
| 35.381356 | 122 | 0.582754 | from __future__ import print_function
from collections import OrderedDict
import os
import shutil
import subprocess
import tempfile
import textwrap
import unittest
import conda_smithy.lint_recipe as linter
class Test_linter(unittest.TestCase):
def test_bad_order(self):
meta = OrderedDict([['package', []]... | 3,562 | 40 | 315 |
9c9ab098a56dd8c3910188c0bdf3b72a68d8d56c | 1,732 | py | Python | scripts/split_fasta.py | EnvGen/toolbox | a644560d989316fffd72c696e60c95ed713f6236 | [
"MIT"
] | 5 | 2018-07-02T06:34:09.000Z | 2021-06-09T00:32:45.000Z | scripts/split_fasta.py | EnvGen/toolbox | a644560d989316fffd72c696e60c95ed713f6236 | [
"MIT"
] | 5 | 2016-09-23T08:52:53.000Z | 2019-12-19T08:49:11.000Z | scripts/split_fasta.py | EnvGen/toolbox | a644560d989316fffd72c696e60c95ed713f6236 | [
"MIT"
] | 1 | 2020-04-28T18:45:56.000Z | 2020-04-28T18:45:56.000Z | #!/usr/bin/env python
"""A script to split a fasta file into multiple smaller files.
Output files will be <original>.xx.fasta
"""
from __future__ import print_function
import argparse
import sys
import os
import re
from os.path import join as ospj
if __name__ == "__main__":
parser = argparse.ArgumentParser(descr... | 27.935484 | 122 | 0.64261 | #!/usr/bin/env python
"""A script to split a fasta file into multiple smaller files.
Output files will be <original>.xx.fasta
"""
from __future__ import print_function
import argparse
import sys
import os
import re
from os.path import join as ospj
def header(row):
regex = re.compile("^>")
return regex.findall... | 965 | 0 | 69 |
6f9a31ec57f043ee015bf879c14c27a2999e8772 | 3,122 | py | Python | database.py | luontonurkka/fetcher | 439d3531b13dcf296c75c1a637dce4e7a7cf8b91 | [
"MIT"
] | null | null | null | database.py | luontonurkka/fetcher | 439d3531b13dcf296c75c1a637dce4e7a7cf8b91 | [
"MIT"
] | null | null | null | database.py | luontonurkka/fetcher | 439d3531b13dcf296c75c1a637dce4e7a7cf8b91 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import dataset,codecs, Names, sqlite3
"""
Under MIT-Licence, 2016 Perttu Rautaniemi
"""
def createtables():
"""
Opening the database and tables, create tables if they dont exist
"""
conn = sqlite3.connect('LuontonurkkaDB.db')
conn.execute('''CREATE TABLE `grid` (
`id... | 29.17757 | 118 | 0.584241 | # -*- coding: utf-8 -*-
import dataset,codecs, Names, sqlite3
"""
Under MIT-Licence, 2016 Perttu Rautaniemi
"""
def createtables():
"""
Opening the database and tables, create tables if they dont exist
"""
conn = sqlite3.connect('LuontonurkkaDB.db')
conn.execute('''CREATE TABLE `grid` (
`id... | 1,855 | 0 | 22 |
f3ec3f1a6c80881e00dc45f2e1504d19fe743b75 | 2,316 | py | Python | pyHMI/SimGas.py | sourceperl/pyHMI | 61f2742181372a2cff24b6dec5af920dddc210c9 | [
"MIT"
] | null | null | null | pyHMI/SimGas.py | sourceperl/pyHMI | 61f2742181372a2cff24b6dec5af920dddc210c9 | [
"MIT"
] | null | null | null | pyHMI/SimGas.py | sourceperl/pyHMI | 61f2742181372a2cff24b6dec5af920dddc210c9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import math
import threading
import time
| 25.450549 | 96 | 0.58247 | # -*- coding: utf-8 -*-
import math
import threading
import time
class GasPipe:
def __init__(self, init_volume=50000, water_volume=10000):
# private
self._add_flow = 0
self._sub_flow = 0
self._stock_vol = init_volume
self._water_vol = water_volume
self._th_lock = t... | 1,743 | 435 | 69 |
1726a03adf8587073f3c1e5389d9c4e0f67a2d4e | 309 | py | Python | pesto-cli/pesto/ws/features/converter/primitive_converter.py | CS-SI/pesto | 654a961d1064049578050d4c96e6f68f6a6dd770 | [
"Apache-2.0"
] | 25 | 2020-05-19T16:22:52.000Z | 2022-01-06T13:31:19.000Z | pesto-cli/pesto/ws/features/converter/primitive_converter.py | CS-SI/pesto | 654a961d1064049578050d4c96e6f68f6a6dd770 | [
"Apache-2.0"
] | 5 | 2020-10-12T09:30:20.000Z | 2021-12-13T12:49:06.000Z | pesto-cli/pesto/ws/features/converter/primitive_converter.py | CS-SI/pesto | 654a961d1064049578050d4c96e6f68f6a6dd770 | [
"Apache-2.0"
] | 5 | 2020-06-19T16:05:13.000Z | 2021-03-11T11:51:19.000Z | from typing import Any, Tuple
from pesto.ws.core.match_apply import MatchApply, Json
| 23.769231 | 54 | 0.68932 | from typing import Any, Tuple
from pesto.ws.core.match_apply import MatchApply, Json
class PrimitiveConverter(MatchApply):
def match(self, schema: Json):
return schema.get("type") is not None
def convert(self, data: Tuple[Any, Json]):
payload, schema = data
return payload
| 130 | 16 | 76 |
48fa43f09fe1d7615ba3f343f7811f7cce4dd04f | 826 | py | Python | jp.atcoder/abc132/abc132_d/8438043.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-09T03:06:25.000Z | 2022-02-09T03:06:25.000Z | jp.atcoder/abc132/abc132_d/8438043.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-05T22:53:18.000Z | 2022-02-09T01:29:30.000Z | jp.atcoder/abc132/abc132_d/8438043.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | null | null | null | # 2019-11-15 00:35:39(JST)
import operator as op
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
from functools import reduce
# from scipy.misc import comb # float
... | 24.294118 | 63 | 0.576271 | # 2019-11-15 00:35:39(JST)
import operator as op
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
from functools import reduce
# from scipy.misc import comb # float
... | 396 | 0 | 49 |
104707e6e38cc8779cbfe5282a7d811bf41b5daa | 1,107 | py | Python | dstream_excel/dstream/workbook/functions.py | nickderobertis/datastream-excel-downloader-py | 3407decdf27da117758ce5ecc538d9f65c6ad5f6 | [
"MIT"
] | 1 | 2019-10-14T10:36:18.000Z | 2019-10-14T10:36:18.000Z | dstream_excel/dstream/workbook/functions.py | whoopnip/datastream-excel-downloader-py | 3407decdf27da117758ce5ecc538d9f65c6ad5f6 | [
"MIT"
] | 4 | 2020-03-24T17:45:15.000Z | 2021-06-02T00:20:24.000Z | dstream_excel/dstream/workbook/functions.py | whoopnip/datastream-excel-downloader-py | 3407decdf27da117758ce5ecc538d9f65c6ad5f6 | [
"MIT"
] | null | null | null | from typing import Sequence, Union
| 50.318182 | 111 | 0.71635 | from typing import Sequence, Union
class DatastreamExcelFunction:
def __init__(self, symbols: Union[Sequence[str], str]):
self.symbols = symbols
def time_series(self, variables: Sequence[str], begin='-2Y', end='', freq='D'):
return _datastream_excel_function(self.symbols, variables, begin=begi... | 937 | 9 | 126 |
d81256ff57e194d818c4e9bf8f9c6e8d5d916041 | 5,596 | py | Python | gperc/cli.py | yashbonde/general-perceivers | 3cc6d8fd7fd1da852cf8aef796c385eaa69f984f | [
"MIT"
] | 4 | 2021-11-02T08:18:06.000Z | 2021-12-25T13:45:06.000Z | gperc/cli.py | sanjibansg/general-perceivers | 9b881637e017ea1a4d7131042634c9a2fcd8211f | [
"MIT"
] | 1 | 2021-10-30T12:32:49.000Z | 2021-10-30T12:32:49.000Z | gperc/cli.py | sanjibansg/general-perceivers | 9b881637e017ea1a4d7131042634c9a2fcd8211f | [
"MIT"
] | 2 | 2021-10-18T04:25:40.000Z | 2021-11-21T11:33:38.000Z | r"""
CLI
===
**DO NOT USE (WIP)**
This module contains the command line interface for gperc. Is this really needed? I am not sure.
But having something along the lines of CLI means that running orchestration jobs would be possible.
Add code to your github actions by loading data from one place, dispatch this for trai... | 36.575163 | 181 | 0.649571 | r"""
CLI
===
**DO NOT USE (WIP)**
This module contains the command line interface for gperc. Is this really needed? I am not sure.
But having something along the lines of CLI means that running orchestration jobs would be possible.
Add code to your github actions by loading data from one place, dispatch this for trai... | 0 | 3,177 | 46 |
1573d07b69f4d4df39e2799dd0eac8a72e2063a9 | 7,725 | py | Python | andes_addon/minipmu.py | CURENT/andes_addon | 5b71b3558b8f147ba463a686b4ee2d1ea3ed22eb | [
"BSD-3-Clause"
] | null | null | null | andes_addon/minipmu.py | CURENT/andes_addon | 5b71b3558b8f147ba463a686b4ee2d1ea3ed22eb | [
"BSD-3-Clause"
] | null | null | null | andes_addon/minipmu.py | CURENT/andes_addon | 5b71b3558b8f147ba463a686b4ee2d1ea3ed22eb | [
"BSD-3-Clause"
] | null | null | null | """Python module to request PMU data from a running ANDES
"""
import logging
import time
from .dime import Dime
from numpy import array, ndarray, zeros
from pypmu import Pmu
from pypmu.frame import ConfigFrame2, HeaderFrame
if __name__ == "__main__":
mini = MiniPMU(
name='TestPMU',
dime_addre... | 32.322176 | 85 | 0.529968 | """Python module to request PMU data from a running ANDES
"""
import logging
import time
from .dime import Dime
from numpy import array, ndarray, zeros
from pypmu import Pmu
from pypmu.frame import ConfigFrame2, HeaderFrame
def get_logger(name):
logger = logging.getLogger(name)
if not logger.handlers:
... | 1,423 | 5,855 | 46 |
0782dbc58a1f55d81bf13d773d0b85b00e6f8a04 | 39 | py | Python | Chapter 03/Chap03_Example3.23.py | Anancha/Programming-Techniques-using-Python | e80c329d2a27383909d358741a5cab03cb22fd8b | [
"MIT"
] | null | null | null | Chapter 03/Chap03_Example3.23.py | Anancha/Programming-Techniques-using-Python | e80c329d2a27383909d358741a5cab03cb22fd8b | [
"MIT"
] | null | null | null | Chapter 03/Chap03_Example3.23.py | Anancha/Programming-Techniques-using-Python | e80c329d2a27383909d358741a5cab03cb22fd8b | [
"MIT"
] | null | null | null | print("St-1")
print(2/0)
print("St-2")
| 9.75 | 13 | 0.589744 | print("St-1")
print(2/0)
print("St-2")
| 0 | 0 | 0 |
0d493834c464fab7f0a570e486b60c358231f079 | 2,563 | py | Python | data_loader/datasets.py | mhd53/ssd-from-torch | 1ae6eaab87afd6ef243b2fe444cbb5b15a12cfc7 | [
"MIT"
] | null | null | null | data_loader/datasets.py | mhd53/ssd-from-torch | 1ae6eaab87afd6ef243b2fe444cbb5b15a12cfc7 | [
"MIT"
] | null | null | null | data_loader/datasets.py | mhd53/ssd-from-torch | 1ae6eaab87afd6ef243b2fe444cbb5b15a12cfc7 | [
"MIT"
] | null | null | null | import torch
from torch.utils.data import Dataset
import json
import os
from PIL import Image
from utils.trms_util import transform
class PascalVOCDataset(Dataset):
"""
A Dataset class to be used in a DataLoader to create batches.
"""
def __init__(self, data_folder, split="TEST", keep_difficult=Fals... | 29.802326 | 104 | 0.610613 | import torch
from torch.utils.data import Dataset
import json
import os
from PIL import Image
from utils.trms_util import transform
class PascalVOCDataset(Dataset):
"""
A Dataset class to be used in a DataLoader to create batches.
"""
def __init__(self, data_folder, split="TEST", keep_difficult=Fals... | 638 | 0 | 54 |
43476669c0e07b4881c73f91b2a4e194e94da549 | 921 | py | Python | setup.py | Neuroglycerin/neukrill-net-tools | 133c68403128e6fcea6d6c8c8326b45443ef7f4e | [
"MIT"
] | null | null | null | setup.py | Neuroglycerin/neukrill-net-tools | 133c68403128e6fcea6d6c8c8326b45443ef7f4e | [
"MIT"
] | null | null | null | setup.py | Neuroglycerin/neukrill-net-tools | 133c68403128e6fcea6d6c8c8326b45443ef7f4e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from distutils.core import setup
from setuptools.command.test import test as TestCommand
setup(name='neukrill-net',
version='1.0',
description='Neukrill-net NDSB tools',
author='neuroglycerin',
author_email='root@finlaymagui.re',
packages=['neukrill_net'],
tes... | 29.709677 | 55 | 0.543974 | #!/usr/bin/env python
from distutils.core import setup
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest... | 165 | 5 | 75 |
82773881e1cd78cba0c3ed8588b4d786447d5b82 | 459 | py | Python | tensornetwork/contractors/custom_path_solvers/__init__.py | khanhgithead/TensorNetwork | e12580f1749493dbe05f474d2fecdec4eaba73c5 | [
"Apache-2.0"
] | 1,681 | 2019-04-30T21:07:24.000Z | 2022-03-31T14:51:19.000Z | tensornetwork/contractors/custom_path_solvers/__init__.py | khanhgithead/TensorNetwork | e12580f1749493dbe05f474d2fecdec4eaba73c5 | [
"Apache-2.0"
] | 671 | 2019-05-04T22:01:20.000Z | 2022-03-31T16:02:55.000Z | tensornetwork/contractors/custom_path_solvers/__init__.py | khanhgithead/TensorNetwork | e12580f1749493dbe05f474d2fecdec4eaba73c5 | [
"Apache-2.0"
] | 394 | 2019-04-29T03:24:26.000Z | 2022-03-11T14:16:21.000Z | from tensornetwork.contractors.custom_path_solvers import pathsolvers
from tensornetwork.contractors.custom_path_solvers import nconinterface
#pylint: disable=line-too-long
from tensornetwork.contractors.custom_path_solvers.pathsolvers import greedy_cost_solve, greedy_size_solve, full_solve_complete
#pylint: disable=li... | 65.571429 | 127 | 0.891068 | from tensornetwork.contractors.custom_path_solvers import pathsolvers
from tensornetwork.contractors.custom_path_solvers import nconinterface
#pylint: disable=line-too-long
from tensornetwork.contractors.custom_path_solvers.pathsolvers import greedy_cost_solve, greedy_size_solve, full_solve_complete
#pylint: disable=li... | 0 | 0 | 0 |
33fa392b08f1093fd3a75a7d5b57799fd25b8e44 | 412 | py | Python | filter_plugins/apiserver_proxy.py | ochinchina/KubeClus | 2a90e33cd0334c0ff3136c955ed44333ecb5cc98 | [
"MIT"
] | null | null | null | filter_plugins/apiserver_proxy.py | ochinchina/KubeClus | 2a90e33cd0334c0ff3136c955ed44333ecb5cc98 | [
"MIT"
] | null | null | null | filter_plugins/apiserver_proxy.py | ochinchina/KubeClus | 2a90e33cd0334c0ff3136c955ed44333ecb5cc98 | [
"MIT"
] | null | null | null | #!/usr/bin/python2
import os
import yaml
| 29.428571 | 84 | 0.68932 | #!/usr/bin/python2
import os
import yaml
class FilterModule:
def filters(self):
return { "change_apiserver_proxy": self.change_apiserver_proxy}
def change_apiserver_proxy( self, kubelet_conf, new_apiserver):
conf = yaml.load( kubelet_conf )
conf['clusters'][0]['cluster']['server'] = "... | 296 | -2 | 76 |
5bbaaad6e83dfa532f4a5797627fc5ede61dd075 | 40 | py | Python | core/apps/core/models/__init__.py | jlebunetel/agile | 63b6d6be55eb0ba33b6815e62478ff216576b3b7 | [
"MIT"
] | null | null | null | core/apps/core/models/__init__.py | jlebunetel/agile | 63b6d6be55eb0ba33b6815e62478ff216576b3b7 | [
"MIT"
] | 1 | 2021-05-07T16:27:07.000Z | 2021-05-07T16:27:07.000Z | core/apps/core/models/__init__.py | jlebunetel/agile | 63b6d6be55eb0ba33b6815e62478ff216576b3b7 | [
"MIT"
] | null | null | null | from .base import *
from .site import *
| 13.333333 | 19 | 0.7 | from .base import *
from .site import *
| 0 | 0 | 0 |
3dc7b4c968696b2f37879db6704389aaa60185c0 | 2,775 | py | Python | np_autoencoder.py | nirajjayantbolt/cs224u | b0321d4db5f2f6310081565d9ff74976aeb94b91 | [
"Apache-2.0"
] | 1 | 2022-02-07T21:41:10.000Z | 2022-02-07T21:41:10.000Z | np_autoencoder.py | nirajjayantbolt/cs224u | b0321d4db5f2f6310081565d9ff74976aeb94b91 | [
"Apache-2.0"
] | 1 | 2020-02-23T05:11:20.000Z | 2020-02-23T05:11:20.000Z | np_autoencoder.py | nirajjayantbolt/cs224u | b0321d4db5f2f6310081565d9ff74976aeb94b91 | [
"Apache-2.0"
] | 1 | 2020-05-04T01:50:08.000Z | 2020-05-04T01:50:08.000Z | import numpy as np
from np_model_base import NNModelBase
import pandas as pd
__author__ = "Christopher Potts"
__version__ = "CS224u, Stanford, Spring 2020"
if __name__ == '__main__':
simple_example()
| 28.030303 | 74 | 0.625946 | import numpy as np
from np_model_base import NNModelBase
import pandas as pd
__author__ = "Christopher Potts"
__version__ = "CS224u, Stanford, Spring 2020"
class Autoencoder(NNModelBase):
def __init__(self, **kwargs):
super(Autoencoder, self).__init__(**kwargs)
def prepare_output_data(self, y):
... | 2,161 | 360 | 46 |
882146e24e886e028f11c2822c6ccc4856613a95 | 1,087 | py | Python | admin/migrations/0002_auto_20180227_1101.py | rodlukas/UP-admin | 08f36de0773f39c6222da82016bf1384af2cce18 | [
"MIT"
] | 4 | 2019-07-19T17:39:04.000Z | 2022-03-22T21:02:15.000Z | admin/migrations/0002_auto_20180227_1101.py | rodlukas/UP-admin | 08f36de0773f39c6222da82016bf1384af2cce18 | [
"MIT"
] | 53 | 2019-08-04T14:25:40.000Z | 2022-03-26T20:30:55.000Z | admin/migrations/0002_auto_20180227_1101.py | rodlukas/UP-admin | 08f36de0773f39c6222da82016bf1384af2cce18 | [
"MIT"
] | 3 | 2020-03-09T07:11:03.000Z | 2020-09-11T01:22:50.000Z | # Generated by Django 2.0.2 on 2018-02-27 10:01
from django.db import migrations, models
| 41.807692 | 98 | 0.680773 | # Generated by Django 2.0.2 on 2018-02-27 10:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("admin", "0001_initial")]
operations = [
migrations.RenameField(
model_name="attendance", old_name="attendancestateid", new_name="attendancest... | 0 | 973 | 23 |
912d668287be2cf55d3d6ac5fce530b7e78ab4c0 | 9,910 | py | Python | test.py | Sanjana7395/face_segmentation | cc06c6adf639c9ce1a3c64608ff9190dbf25a5ce | [
"MIT"
] | 22 | 2020-08-23T21:27:31.000Z | 2022-03-03T09:11:34.000Z | test.py | Sanjana7395/face_segmentation | cc06c6adf639c9ce1a3c64608ff9190dbf25a5ce | [
"MIT"
] | 7 | 2020-07-17T08:35:41.000Z | 2021-09-07T11:35:23.000Z | test.py | Sanjana7395/face_segmentation | cc06c6adf639c9ce1a3c64608ff9190dbf25a5ce | [
"MIT"
] | 10 | 2020-07-17T08:56:51.000Z | 2022-03-29T08:53:48.000Z | import os
import numpy as np
import cv2
import argparse
from sklearn.metrics import confusion_matrix
import matplotlib.pyplot as plt
import seaborn as sns
from tensorflow.keras import Input
from model import u_net
from preprocessing.preprocess_utils import display
from experiments import lip_hair_color
def make_confu... | 34.65035 | 79 | 0.560343 | import os
import numpy as np
import cv2
import argparse
from sklearn.metrics import confusion_matrix
import matplotlib.pyplot as plt
import seaborn as sns
from tensorflow.keras import Input
from model import u_net
from preprocessing.preprocess_utils import display
from experiments import lip_hair_color
def make_confu... | 0 | 0 | 0 |
45c7e65d5a58484022e55ea62f4b70c3fa489a01 | 475 | py | Python | girder_rnascope/tilesource/tiff.py | abcsFrederick/RNAScope | 9cb049f9c64f52e49afddfb32a286c90223bad78 | [
"Apache-2.0"
] | null | null | null | girder_rnascope/tilesource/tiff.py | abcsFrederick/RNAScope | 9cb049f9c64f52e49afddfb32a286c90223bad78 | [
"Apache-2.0"
] | 8 | 2019-09-25T14:07:14.000Z | 2019-10-01T16:45:08.000Z | girder_rnascope/tilesource/tiff.py | cj-abcs/RNAScope | 9cb049f9c64f52e49afddfb32a286c90223bad78 | [
"Apache-2.0"
] | null | null | null | import large_image_source_tiff as tiff
# from large_image.tilesource.base import GirderTileSource
from large_image_source_tiff import girder_source
from .tiff_reader import TiledTiffDirectory
tiff.TiledTiffDirectory = TiledTiffDirectory
| 27.941176 | 83 | 0.821053 | import large_image_source_tiff as tiff
# from large_image.tilesource.base import GirderTileSource
from large_image_source_tiff import girder_source
from .tiff_reader import TiledTiffDirectory
tiff.TiledTiffDirectory = TiledTiffDirectory
class TiffFileTileSource(tiff.TiffFileTileSource):
cacheName = 'tilesource'
... | 0 | 189 | 46 |
a324ee7a3459d4ec211befb07ccbe404786243a9 | 907 | py | Python | scraper/storage_spiders/songvunet.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | null | null | null | scraper/storage_spiders/songvunet.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 10 | 2020-02-11T23:34:28.000Z | 2022-03-11T23:16:12.000Z | scraper/storage_spiders/songvunet.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 3 | 2018-08-05T14:54:25.000Z | 2021-06-07T01:49:59.000Z | # Auto generated by generator.py. Delete this line if you make modification.
from scrapy.spiders import Rule
from scrapy.linkextractors import LinkExtractor
XPATH = {
'name' : "//div[@class='header_layer_2']/h1",
'price' : "//input[@name='price']/@value",
'category' : "//div[@class='thanh_dinh_huong']/a",
... | 33.592593 | 83 | 0.62183 | # Auto generated by generator.py. Delete this line if you make modification.
from scrapy.spiders import Rule
from scrapy.linkextractors import LinkExtractor
XPATH = {
'name' : "//div[@class='header_layer_2']/h1",
'price' : "//input[@name='price']/@value",
'category' : "//div[@class='thanh_dinh_huong']/a",
... | 0 | 0 | 0 |
ac9be7a8b5a5c2a234164185c4e23dd581187a69 | 447 | py | Python | cpdb/data/migrations/0107_remove_area_line_area_from_allegation.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 25 | 2018-07-20T22:31:40.000Z | 2021-07-15T16:58:41.000Z | cpdb/data/migrations/0107_remove_area_line_area_from_allegation.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 13 | 2018-06-18T23:08:47.000Z | 2022-02-10T07:38:25.000Z | cpdb/data/migrations/0107_remove_area_line_area_from_allegation.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 6 | 2018-05-17T21:59:43.000Z | 2020-11-17T00:30:26.000Z | # Generated by Django 2.1.3 on 2019-01-08 04:17
from django.db import migrations
| 20.318182 | 52 | 0.574944 | # Generated by Django 2.1.3 on 2019-01-08 04:17
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('data', '0106_add_field_police_witnesses'),
]
operations = [
migrations.RemoveField(
model_name='allegation',
name='areas',
... | 0 | 341 | 23 |
69cc2165b44440845ddc93cd30a1945f73e4c1f1 | 2,262 | py | Python | regularization/train_xgb.py | Fenkail/Deep_learning_basics | a395b5a78e9a742b7fbcf0bf9fe8a0f7022499a5 | [
"Apache-2.0"
] | null | null | null | regularization/train_xgb.py | Fenkail/Deep_learning_basics | a395b5a78e9a742b7fbcf0bf9fe8a0f7022499a5 | [
"Apache-2.0"
] | null | null | null | regularization/train_xgb.py | Fenkail/Deep_learning_basics | a395b5a78e9a742b7fbcf0bf9fe8a0f7022499a5 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import time
import xgboost as xgb
from sklearn.model_selection import KFold
from regularization.score import myFeval
from sklearn.metrics import mean_squared_error
from regularization.data_process import data_process
s = time.time()
X_train, y_train, X_test, train_len, test_len = data_process()
prin... | 34.8 | 106 | 0.631742 | import numpy as np
import time
import xgboost as xgb
from sklearn.model_selection import KFold
from regularization.score import myFeval
from sklearn.metrics import mean_squared_error
from regularization.data_process import data_process
s = time.time()
X_train, y_train, X_test, train_len, test_len = data_process()
prin... | 0 | 0 | 0 |
d16be71e287d71b716337ff7bcc9cf3256561c20 | 5,259 | py | Python | server/apps/utils/objects/tests.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null | server/apps/utils/objects/tests.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null | server/apps/utils/objects/tests.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null | from django.test import TestCase
from apps.datablock.models import DataBlock
from apps.fleet.models import Fleet
from apps.physicaldevice.models import Device
from apps.stream.models import StreamId, StreamVariable
from ..test_util import TestMixin
from .utils import *
from .utils import _get_real_slug
| 37.564286 | 115 | 0.659631 | from django.test import TestCase
from apps.datablock.models import DataBlock
from apps.fleet.models import Fleet
from apps.physicaldevice.models import Device
from apps.stream.models import StreamId, StreamVariable
from ..test_util import TestMixin
from .utils import *
from .utils import _get_real_slug
class Object... | 4,527 | 24 | 401 |
834f9c87021cb2bb5137640f7ebb950dc0ac0eee | 798 | py | Python | system_tests/test_app_engine.py | yhuang/google-auth-library-python | ccf2e502e0b15633956c007fae92e2404a6418ad | [
"Apache-2.0"
] | 1 | 2020-05-27T15:48:51.000Z | 2020-05-27T15:48:51.000Z | system_tests/test_app_engine.py | yhuang/google-auth-library-python | ccf2e502e0b15633956c007fae92e2404a6418ad | [
"Apache-2.0"
] | null | null | null | system_tests/test_app_engine.py | yhuang/google-auth-library-python | ccf2e502e0b15633956c007fae92e2404a6418ad | [
"Apache-2.0"
] | 1 | 2019-11-11T18:39:46.000Z | 2019-11-11T18:39:46.000Z | # Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 34.695652 | 74 | 0.756892 | # Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 144 | 0 | 23 |
c600576e5860966b3254155c8bab3c8a148fd251 | 180 | py | Python | 2d.py | tcstewar/ik2017 | 582156a9e3f888f2d1a5e27024e08ef97652e57c | [
"MIT"
] | 5 | 2017-03-13T15:29:18.000Z | 2017-03-14T14:54:54.000Z | comm.py | tcstewar/ik2017 | 582156a9e3f888f2d1a5e27024e08ef97652e57c | [
"MIT"
] | null | null | null | comm.py | tcstewar/ik2017 | 582156a9e3f888f2d1a5e27024e08ef97652e57c | [
"MIT"
] | null | null | null | import nengo
model = nengo.Network()
with model:
a = nengo.Ensemble(n_neurons=100, dimensions=2, radius=1)
stim = nengo.Node([0,0])
nengo.Connection(stim, a) | 20 | 61 | 0.644444 | import nengo
model = nengo.Network()
with model:
a = nengo.Ensemble(n_neurons=100, dimensions=2, radius=1)
stim = nengo.Node([0,0])
nengo.Connection(stim, a) | 0 | 0 | 0 |
766d111951c2d783a6fb6d8bc5c9611421ae0867 | 1,428 | py | Python | exec/12-2.py | MasazI/python-r-stan-bayesian-model-2 | 288876b31b6c3d74d523babc475d4794cd29680a | [
"MIT"
] | 25 | 2020-07-11T11:07:28.000Z | 2022-03-06T01:12:45.000Z | exec/12-2.py | MasazI/python-r-stan-bayesian-model-2 | 288876b31b6c3d74d523babc475d4794cd29680a | [
"MIT"
] | null | null | null | exec/12-2.py | MasazI/python-r-stan-bayesian-model-2 | 288876b31b6c3d74d523babc475d4794cd29680a | [
"MIT"
] | 1 | 2021-05-06T08:48:55.000Z | 2021-05-06T08:48:55.000Z | # 時系列予測の問題に季節項を導入する
# 時系列データは、目的変数を観測値の要素の和に分解するのが定石
# Own Library
import mcmc_tools
import analysis_data as ad
import seaborn as sns
import matplotlib.pyplot as plt
if __name__ == '__main__':
spm = SPM('data-ss2.txt', '../model/model12-2')
spm.describe()
spm.observe_ts()
stan_data = spm.create_d... | 24.62069 | 89 | 0.587535 | # 時系列予測の問題に季節項を導入する
# 時系列データは、目的変数を観測値の要素の和に分解するのが定石
# Own Library
import mcmc_tools
import analysis_data as ad
import seaborn as sns
import matplotlib.pyplot as plt
class SPM(ad.AnalysisData):
def observe_ts(self):
sns.lineplot(x=self.data['X'], y=self.data['Y'])
plt.show()
plt.close()
... | 737 | 6 | 130 |
27588fd5f14b8212df3a99af54f72d43a28cfd8f | 16,055 | py | Python | legacy/ScopTester.py | 861934367/cgat | 77fdc2f819320110ed56b5b61968468f73dfc5cb | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 87 | 2015-01-01T03:48:19.000Z | 2021-11-23T16:23:24.000Z | legacy/ScopTester.py | 861934367/cgat | 77fdc2f819320110ed56b5b61968468f73dfc5cb | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 189 | 2015-01-06T15:53:11.000Z | 2019-05-31T13:19:45.000Z | legacy/ScopTester.py | CGATOxford/cgat | 326aad4694bdfae8ddc194171bb5d73911243947 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 56 | 2015-01-13T02:18:50.000Z | 2022-01-05T10:00:59.000Z | ################################################################################
#
# MRC FGU Computational Genomics Group
#
# $Id$
#
# Copyright (C) 2009 Andreas Heger
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as publish... | 36.823394 | 120 | 0.482903 | ################################################################################
#
# MRC FGU Computational Genomics Group
#
# $Id$
#
# Copyright (C) 2009 Andreas Heger
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as publish... | 4,470 | 4,071 | 299 |
9d68468167a5ad6a7cbcf83c2e4439a5b61db798 | 3,045 | py | Python | tests/cookie_jar_test.py | p/webracer | 3eb40b520bbf884c4458482fc3a05a9a9632d026 | [
"BSD-2-Clause"
] | null | null | null | tests/cookie_jar_test.py | p/webracer | 3eb40b520bbf884c4458482fc3a05a9a9632d026 | [
"BSD-2-Clause"
] | null | null | null | tests/cookie_jar_test.py | p/webracer | 3eb40b520bbf884c4458482fc3a05a9a9632d026 | [
"BSD-2-Clause"
] | 1 | 2019-04-13T07:43:28.000Z | 2019-04-13T07:43:28.000Z | import webracer
import nose.plugins.attrib
from . import utils
from .apps import kitchen_sink_app
utils.app_runner_setup(__name__, kitchen_sink_app.app, 8056)
base_config = dict(host='localhost', port=8056)
@nose.plugins.attrib.attr('client')
| 34.213483 | 68 | 0.639409 | import webracer
import nose.plugins.attrib
from . import utils
from .apps import kitchen_sink_app
utils.app_runner_setup(__name__, kitchen_sink_app.app, 8056)
base_config = dict(host='localhost', port=8056)
@nose.plugins.attrib.attr('client')
class AgentWithoutCookieJarTest(webracer.WebTestCase):
def test_reques... | 1,031 | 1,746 | 22 |
485e7adc798133d68d09418c1fa6da75a642fe2f | 1,221 | py | Python | examinations/models.py | CASDON-MYSTERY/studentapp | 0fd942e963a10a02a6c9f358dd362cfd646eecc3 | [
"MIT"
] | null | null | null | examinations/models.py | CASDON-MYSTERY/studentapp | 0fd942e963a10a02a6c9f358dd362cfd646eecc3 | [
"MIT"
] | null | null | null | examinations/models.py | CASDON-MYSTERY/studentapp | 0fd942e963a10a02a6c9f358dd362cfd646eecc3 | [
"MIT"
] | null | null | null | from django.db import models
from lectures.models import Day
# Create your models here.
| 33 | 98 | 0.701065 | from django.db import models
from lectures.models import Day
# Create your models here.
class Exam_day_and_venue(models.Model):
day = models.ForeignKey(Day, on_delete=models.CASCADE,related_name="examination_day")
starting_time = models.TimeField("startin_time", auto_now=False, auto_now_add=False)
closin... | 68 | 1,017 | 46 |
3d05df3acb44863b17295456c5d0343654bc478b | 17,059 | py | Python | tests/unit/test_webhooks.py | sharma7n/braintree_python | 34c36bddca7aa55512ee5129175eedcfc6d1fb30 | [
"MIT"
] | null | null | null | tests/unit/test_webhooks.py | sharma7n/braintree_python | 34c36bddca7aa55512ee5129175eedcfc6d1fb30 | [
"MIT"
] | null | null | null | tests/unit/test_webhooks.py | sharma7n/braintree_python | 34c36bddca7aa55512ee5129175eedcfc6d1fb30 | [
"MIT"
] | null | null | null | from tests.test_helper import *
from datetime import date
from braintree.dispute import Dispute
| 50.620178 | 145 | 0.743479 | from tests.test_helper import *
from datetime import date
from braintree.dispute import Dispute
class TestWebhooks(unittest.TestCase):
def test_sample_notification_builds_a_parsable_notification(self):
sample_notification = WebhookTesting.sample_notification(
WebhookNotification.Kind.Subscripti... | 16,214 | 726 | 23 |
cbb70d43a8d3ff65154e3094134aa202598e0698 | 520 | py | Python | chapter_1/update_db_classes.py | bimri/programming_python | ba52ccd18b9b4e6c5387bf4032f381ae816b5e77 | [
"MIT"
] | null | null | null | chapter_1/update_db_classes.py | bimri/programming_python | ba52ccd18b9b4e6c5387bf4032f381ae816b5e77 | [
"MIT"
] | null | null | null | chapter_1/update_db_classes.py | bimri/programming_python | ba52ccd18b9b4e6c5387bf4032f381ae816b5e77 | [
"MIT"
] | null | null | null | "Step 3: Stepping Up to OOP"
'Adding Persistence'
# Notice how we still fetch, update, and
# reassign to keys to update the shelve.
import shelve
db = shelve.open('class-shelve')
sue = db['sue']
sue.giveRaise(.25)
db['sue'] = sue
tom = db['tom']
tom.giveRaise(.20)
db['tom'] = tom
db.close()
'''
class instance... | 20 | 89 | 0.717308 | "Step 3: Stepping Up to OOP"
'Adding Persistence'
# Notice how we still fetch, update, and
# reassign to keys to update the shelve.
import shelve
db = shelve.open('class-shelve')
sue = db['sue']
sue.giveRaise(.25)
db['sue'] = sue
tom = db['tom']
tom.giveRaise(.20)
db['tom'] = tom
db.close()
'''
class instance... | 0 | 0 | 0 |
0a881db586e6a52a9d7f7a3a1b1799f27a90fb26 | 2,315 | py | Python | src/wat/read_annotations.py | luiscarlosgph/keypoint-annotation-tool | 390a328b5d0d02587a1d12784b7ef70363966036 | [
"MIT"
] | 6 | 2021-01-29T18:17:37.000Z | 2022-03-08T22:17:26.000Z | src/wat/read_annotations.py | luiscarlosgph/keypoint-annotation-tool | 390a328b5d0d02587a1d12784b7ef70363966036 | [
"MIT"
] | null | null | null | src/wat/read_annotations.py | luiscarlosgph/keypoint-annotation-tool | 390a328b5d0d02587a1d12784b7ef70363966036 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# Exemplary script to read the annotations generated by the web application
# in this repo.
#
# @author: Luis Carlos Garcia-Peraza Herrera (luiscarlos.gph@gmail.com).
# @date : 20 Jan 2021.
import argparse
import json
import cv2
import numpy as np
import os
# My imports
import wat.common
def pa... | 30.866667 | 85 | 0.67689 | #!/usr/bin/python
#
# Exemplary script to read the annotations generated by the web application
# in this repo.
#
# @author: Luis Carlos Garcia-Peraza Herrera (luiscarlos.gph@gmail.com).
# @date : 20 Jan 2021.
import argparse
import json
import cv2
import numpy as np
import os
# My imports
import wat.common
def pa... | 1,341 | 0 | 69 |
85dc97c10a3b03dac2ae07effad2e7b455ad2038 | 2,802 | py | Python | loaner/web_app/backend/api/loaner_endpoints.py | McDiesel/loaner | dcf5fa640ee9059a814650fa4432fa1116df78e9 | [
"Apache-2.0"
] | null | null | null | loaner/web_app/backend/api/loaner_endpoints.py | McDiesel/loaner | dcf5fa640ee9059a814650fa4432fa1116df78e9 | [
"Apache-2.0"
] | null | null | null | loaner/web_app/backend/api/loaner_endpoints.py | McDiesel/loaner | dcf5fa640ee9059a814650fa4432fa1116df78e9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 30.791209 | 80 | 0.729479 | # Copyright 2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 0 | 0 | 0 |
f7f108f68a198ca04eb13f738f69699895622019 | 4,088 | py | Python | DQM/SiPixelPhase1Track/python/SiPixelPhase1RecHits_cfi.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | 1 | 2019-03-09T19:47:49.000Z | 2019-03-09T19:47:49.000Z | DQM/SiPixelPhase1Track/python/SiPixelPhase1RecHits_cfi.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | DQM/SiPixelPhase1Track/python/SiPixelPhase1RecHits_cfi.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | 1 | 2019-03-19T13:44:54.000Z | 2019-03-19T13:44:54.000Z | import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
from DQM.SiPixelPhase1Common.HistogramManager_cfi import *
import DQM.SiPixelPhase1Common.TriggerEventFlag_cfi as trigger
SiPixelPhase1RecHitsNRecHits = DefaultHistoTrack.clone(
name = "rechits",
title = "RecHits",
... | 30.281481 | 88 | 0.668297 | import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
from DQM.SiPixelPhase1Common.HistogramManager_cfi import *
import DQM.SiPixelPhase1Common.TriggerEventFlag_cfi as trigger
SiPixelPhase1RecHitsNRecHits = DefaultHistoTrack.clone(
name = "rechits",
title = "RecHits",
... | 0 | 0 | 0 |
632451821cd68317df541d0fbb2c8499a34ac64b | 1,624 | py | Python | add_doi_minting_date.py | caltechlibrary/caltechdata_api | 69a986642942379a12fac64cbba4c08c4ae29cc3 | [
"BSD-3-Clause"
] | 7 | 2018-03-07T17:24:22.000Z | 2022-02-01T20:01:30.000Z | add_doi_minting_date.py | caltechlibrary/caltechdata_api | 69a986642942379a12fac64cbba4c08c4ae29cc3 | [
"BSD-3-Clause"
] | 7 | 2018-05-18T23:49:17.000Z | 2021-07-22T23:40:26.000Z | add_doi_minting_date.py | caltechlibrary/caltechdata_api | 69a986642942379a12fac64cbba4c08c4ae29cc3 | [
"BSD-3-Clause"
] | null | null | null | import os, requests
from progressbar import progressbar
from caltechdata_api import get_metadata, caltechdata_edit
def get_datacite_dates(prefix):
"""Get sumbitted date for DataCite DOIs with specific prefix"""
doi_dates = {}
doi_urls = {}
url = (
"https://api.datacite.org/dois?query=prefix:"
... | 34.553191 | 85 | 0.580665 | import os, requests
from progressbar import progressbar
from caltechdata_api import get_metadata, caltechdata_edit
def get_datacite_dates(prefix):
"""Get sumbitted date for DataCite DOIs with specific prefix"""
doi_dates = {}
doi_urls = {}
url = (
"https://api.datacite.org/dois?query=prefix:"
... | 0 | 0 | 0 |
66f88e14c1a7455191b654ac531447a4e5aaf53c | 2,217 | py | Python | tests/behave/test_positive.py | valentinDruzhinin/CategoryMappingApp | 8d9bd64d0284c0024a851592e9e9d2bc06606557 | [
"MIT"
] | null | null | null | tests/behave/test_positive.py | valentinDruzhinin/CategoryMappingApp | 8d9bd64d0284c0024a851592e9e9d2bc06606557 | [
"MIT"
] | null | null | null | tests/behave/test_positive.py | valentinDruzhinin/CategoryMappingApp | 8d9bd64d0284c0024a851592e9e9d2bc06606557 | [
"MIT"
] | null | null | null | import json
from app import Category
| 27.37037 | 70 | 0.583672 | import json
from app import Category
def test_user_behaviour(client):
mock_category = Category(name='Men', mapping='Men clothes')
# categories endpoint
categories_url = '/categories'
response = client.get(categories_url)
assert '200 OK' == response.status
assert [] == response.json
resp... | 2,156 | 0 | 23 |
80440041b109c31bfaff3f15a0eeac9320c0e9ea | 457 | py | Python | lecture_02/114_transformation_between_frames.py | farzanehesk/COMPAS-II-FS2022 | 857eb40000f0532d0c04689331eadefd38dce6b7 | [
"MIT"
] | 11 | 2022-01-24T15:07:15.000Z | 2022-03-29T12:58:05.000Z | lecture_02/114_transformation_between_frames.py | farzanehesk/COMPAS-II-FS2022 | 857eb40000f0532d0c04689331eadefd38dce6b7 | [
"MIT"
] | 4 | 2022-03-16T06:06:45.000Z | 2022-03-29T22:59:11.000Z | lecture_02/114_transformation_between_frames.py | farzanehesk/COMPAS-II-FS2022 | 857eb40000f0532d0c04689331eadefd38dce6b7 | [
"MIT"
] | 20 | 2022-03-02T10:36:41.000Z | 2022-03-09T00:12:33.000Z | """Transformation between two frames.
"""
from compas.geometry import Frame
from compas.geometry import Point
from compas.geometry import Transformation
F1 = Frame.worldXY()
F2 = Frame([1.5, 1, 0], [0.68, 0.68, 0.27], [-0.67, 0.73, -0.15])
P = Point(2, 2, 2) # local point in F1
# transformation between 2 frames F1, ... | 28.5625 | 65 | 0.719912 | """Transformation between two frames.
"""
from compas.geometry import Frame
from compas.geometry import Point
from compas.geometry import Transformation
F1 = Frame.worldXY()
F2 = Frame([1.5, 1, 0], [0.68, 0.68, 0.27], [-0.67, 0.73, -0.15])
P = Point(2, 2, 2) # local point in F1
# transformation between 2 frames F1, ... | 0 | 0 | 0 |
d741996533bed2e2caf9549d319c0dd2a1c3bfb2 | 1,201 | py | Python | Firewall/sttsotpt.py | d4rkl0rd3r3b05/Firewall | 1721d19846e4dbb98f5ac38ff3722b6f6fd17afc | [
"MIT"
] | 2 | 2015-05-12T22:11:19.000Z | 2019-04-02T01:36:03.000Z | Firewall/sttsotpt.py | d4rkl0rd3r3b05/Firewall | 1721d19846e4dbb98f5ac38ff3722b6f6fd17afc | [
"MIT"
] | 1 | 2021-08-10T06:59:53.000Z | 2021-08-10T06:59:53.000Z | Firewall/sttsotpt.py | d4rkl0rd3r3b05/Firewall | 1721d19846e4dbb98f5ac38ff3722b6f6fd17afc | [
"MIT"
] | 3 | 2015-08-18T08:45:02.000Z | 2021-08-10T07:00:18.000Z | import os
| 27.930233 | 100 | 0.586178 | import os
def prtcl():
result=os.popen('netstat -anut |grep -iv "active" |grep -iv "proto"|awk \'{print $1}\'',"r").read()
return result
def src():
result=os.popen(' netstat -anut |grep -iv "active" |grep -iv "proto"\
| awk \'{print $4}\' | cut -d: -f1 | sed -e \'/^$/d\'',"r").read()
return result
def srcpt()... | 1,000 | 0 | 186 |
f37916b8764d66a84758a1a7bc5c2d1b6e728743 | 6,168 | py | Python | mmdet/models/detectors/siamese_rpn_v2.py | ArthurWish/mmdetection | bd4c5b04e9d880f7a38131f17d3b43e4a3630c4f | [
"Apache-2.0"
] | null | null | null | mmdet/models/detectors/siamese_rpn_v2.py | ArthurWish/mmdetection | bd4c5b04e9d880f7a38131f17d3b43e4a3630c4f | [
"Apache-2.0"
] | null | null | null | mmdet/models/detectors/siamese_rpn_v2.py | ArthurWish/mmdetection | bd4c5b04e9d880f7a38131f17d3b43e4a3630c4f | [
"Apache-2.0"
] | null | null | null | import torch
from torch import nn
from torchvision import transforms
from .faster_rcnn import FasterRCNN
from ..builder import DETECTORS
from PIL import Image
import numpy as np
@DETECTORS.register_module()
| 39.037975 | 148 | 0.530318 | import torch
from torch import nn
from torchvision import transforms
from .faster_rcnn import FasterRCNN
from ..builder import DETECTORS
from PIL import Image
import numpy as np
@DETECTORS.register_module()
class SiameseRPNV2(FasterRCNN):
def __init__(self,
backbone,
rpn_head,
... | 5,763 | 10 | 187 |
6885620e6742d218394dec3d59818cd86ca65791 | 641 | py | Python | instaapp/urls.py | Michellemukami/insta-clone | 423aa3d2aacac82372a611f8f51ba487889a2f9d | [
"MIT"
] | null | null | null | instaapp/urls.py | Michellemukami/insta-clone | 423aa3d2aacac82372a611f8f51ba487889a2f9d | [
"MIT"
] | 4 | 2020-06-05T22:37:15.000Z | 2021-09-08T01:15:10.000Z | instaapp/urls.py | Michellemukami/insta-clone | 423aa3d2aacac82372a611f8f51ba487889a2f9d | [
"MIT"
] | null | null | null | from django.conf.urls import url
from . import views
from django.conf import settings
from django.conf.urls.static import static
urlpatterns=[
url('^$',views.login_page,name = 'come'),
url(r'^new/profile$', views.profile, name='profile'),
url(r'^user/', views.user, name='user'),
url(r'^search/', v... | 30.52381 | 81 | 0.678627 | from django.conf.urls import url
from . import views
from django.conf import settings
from django.conf.urls.static import static
urlpatterns=[
url('^$',views.login_page,name = 'come'),
url(r'^new/profile$', views.profile, name='profile'),
url(r'^user/', views.user, name='user'),
url(r'^search/', v... | 0 | 0 | 0 |
5c78fbb9c800452caf6342bc4bd90b168a90e6ef | 19,090 | py | Python | autonomous_exploration/autonomous_exploration/autonomousExploration.py | antonikaras/thesis_ros2 | 36673cd8a4161b1cf4045e8bdda36275a2a337ce | [
"BSD-2-Clause"
] | 1 | 2021-06-27T02:01:22.000Z | 2021-06-27T02:01:22.000Z | autonomous_exploration/autonomous_exploration/autonomousExploration.py | antonikaras/thesis_ros2 | 36673cd8a4161b1cf4045e8bdda36275a2a337ce | [
"BSD-2-Clause"
] | 1 | 2021-09-30T01:56:04.000Z | 2021-09-30T10:26:13.000Z | autonomous_exploration/autonomous_exploration/autonomousExploration.py | antonikaras/thesis_ros2 | 36673cd8a4161b1cf4045e8bdda36275a2a337ce | [
"BSD-2-Clause"
] | 1 | 2021-09-30T01:52:28.000Z | 2021-09-30T01:52:28.000Z | # Import ROS2 libraries
import rclpy
from rclpy.node import Node
from rclpy.action import ActionClient, ActionServer, GoalResponse, CancelResponse
from rclpy.qos import QoSProfile
from rclpy.callback_groups import ReentrantCallbackGroup
from rclpy.executors import MultiThreadedExecutor
# Import message files
from geom... | 40.274262 | 195 | 0.582556 | # Import ROS2 libraries
import rclpy
from rclpy.node import Node
from rclpy.action import ActionClient, ActionServer, GoalResponse, CancelResponse
from rclpy.qos import QoSProfile
from rclpy.callback_groups import ReentrantCallbackGroup
from rclpy.executors import MultiThreadedExecutor
# Import message files
from geom... | 6,291 | 11,879 | 45 |
36812059fa58166e6ee951d9dfb976bcdcdb394d | 2,773 | py | Python | loggers/progress_interface.py | kefir/snakee | a17734d4b2d7dfd3e6c7b195baa128fbc84d197b | [
"MIT"
] | null | null | null | loggers/progress_interface.py | kefir/snakee | a17734d4b2d7dfd3e6c7b195baa128fbc84d197b | [
"MIT"
] | null | null | null | loggers/progress_interface.py | kefir/snakee | a17734d4b2d7dfd3e6c7b195baa128fbc84d197b | [
"MIT"
] | 2 | 2021-04-10T19:22:15.000Z | 2022-03-08T19:37:56.000Z | from abc import ABC, abstractmethod
from enum import Enum
from typing import Optional, Union, Iterable, NoReturn
try: # Assume we're a sub-module in a package.
from utils import arguments as arg
from base.abstract.tree_item import TreeInterface
from loggers.extended_logger_interface import ExtendedLoggerI... | 27.186275 | 107 | 0.653083 | from abc import ABC, abstractmethod
from enum import Enum
from typing import Optional, Union, Iterable, NoReturn
try: # Assume we're a sub-module in a package.
from utils import arguments as arg
from base.abstract.tree_item import TreeInterface
from loggers.extended_logger_interface import ExtendedLoggerI... | 1,191 | 873 | 46 |
06147a362cae90b4d400fabd85cb0b31d1338c1b | 1,240 | py | Python | CLASSIC PUZZLE - MEDIUM/mayan-calculation.py | martincourtois/CodinGame | 4df9c8af5cb9c513880dd086da9bf3f201bd56ed | [
"Unlicense"
] | null | null | null | CLASSIC PUZZLE - MEDIUM/mayan-calculation.py | martincourtois/CodinGame | 4df9c8af5cb9c513880dd086da9bf3f201bd56ed | [
"Unlicense"
] | null | null | null | CLASSIC PUZZLE - MEDIUM/mayan-calculation.py | martincourtois/CodinGame | 4df9c8af5cb9c513880dd086da9bf3f201bd56ed | [
"Unlicense"
] | null | null | null | import sys
import math
BASE=20
Sym2Base={}
Base2Sym={}
l, h = [int(i) for i in input().split()]
for i in range(h):
numeral=input()
for j in range(BASE):
idx=l*j
STR=numeral[idx:idx+l]
if j in Base2Sym:
Base2Sym[j]+=[STR]
else:
Base2Sym[j]=[STR]
for key,... | 18.507463 | 55 | 0.537097 | import sys
import math
BASE=20
Sym2Base={}
Base2Sym={}
l, h = [int(i) for i in input().split()]
for i in range(h):
numeral=input()
for j in range(BASE):
idx=l*j
STR=numeral[idx:idx+l]
if j in Base2Sym:
Base2Sym[j]+=[STR]
else:
Base2Sym[j]=[STR]
for key,... | 0 | 0 | 0 |
a197e2de1fc9100ea53ed671c6bed2bbd3b2ff67 | 5,551 | py | Python | main.py | vutienhung260798/keras-retinanet | 73e167cf0bd76563f1171699697343cf9945f53b | [
"Apache-2.0"
] | null | null | null | main.py | vutienhung260798/keras-retinanet | 73e167cf0bd76563f1171699697343cf9945f53b | [
"Apache-2.0"
] | 4 | 2020-01-28T22:22:00.000Z | 2022-02-09T23:36:54.000Z | main.py | vutienhung260798/keras-retinanet | 73e167cf0bd76563f1171699697343cf9945f53b | [
"Apache-2.0"
] | null | null | null | import os
import shutil
import zipfile
import urllib
import xml.etree.ElementTree as ET
import numpy as np
import csv
import pandas
# from google.colab import drive
# from google.colab import files
# %matplotlib inline
# # automatically reload modules when they have changed
# %reload_ext autoreload
# %autoreload 2
# ... | 33.239521 | 194 | 0.652495 | import os
import shutil
import zipfile
import urllib
import xml.etree.ElementTree as ET
import numpy as np
import csv
import pandas
# from google.colab import drive
# from google.colab import files
# %matplotlib inline
# # automatically reload modules when they have changed
# %reload_ext autoreload
# %autoreload 2
# ... | 4,378 | 0 | 92 |
43ee1d4b0f5fd09b8583052db30dee40c388a21c | 2,489 | py | Python | Chapter06/descriptors_pythonic_2.py | TranQuangDuc/Clean-Code-in-Python | 3c4b4a2fde2ccf28d2e0ec5002b2e1921704164e | [
"MIT"
] | 402 | 2018-08-19T03:09:40.000Z | 2022-03-30T08:10:26.000Z | Chapter06/descriptors_pythonic_2.py | TranQuangDuc/Clean-Code-in-Python | 3c4b4a2fde2ccf28d2e0ec5002b2e1921704164e | [
"MIT"
] | 3 | 2019-01-29T20:36:28.000Z | 2022-03-02T02:16:23.000Z | Chapter06/descriptors_pythonic_2.py | TranQuangDuc/Clean-Code-in-Python | 3c4b4a2fde2ccf28d2e0ec5002b2e1921704164e | [
"MIT"
] | 140 | 2018-09-16T05:47:46.000Z | 2022-03-31T03:20:30.000Z | """Clean Code in Python - Chapter 6: Descriptors
> A Pythonic Implementation
"""
class HistoryTracedAttribute:
"""Trace the values of this attribute into another one given by the name at
``trace_attribute_name``.
"""
def _needs_to_track_change(self, instance, value) -> bool:
"""Determine if... | 28.94186 | 79 | 0.648855 | """Clean Code in Python - Chapter 6: Descriptors
> A Pythonic Implementation
"""
class HistoryTracedAttribute:
"""Trace the values of this attribute into another one given by the name at
``trace_attribute_name``.
"""
def __init__(self, trace_attribute_name: str) -> None:
self.trace_attribut... | 765 | 0 | 189 |
71250c279386af28fe56d8a22bdf0dd78d63e5ee | 2,621 | py | Python | pypi_portal/tasks/pypi.py | SiddharthSudhakar/Flask-prod-app-structure | 4213201ab007ec7b10bdb44c4c8acc6dd3dc59ca | [
"MIT"
] | 565 | 2015-01-08T15:04:14.000Z | 2022-03-20T16:43:28.000Z | pypi_portal/tasks/pypi.py | rams502/Flask-Large-Application-Example | f536c3dee4050634cf4dfe77a6bb116040e6cf14 | [
"MIT"
] | 4 | 2015-11-30T08:28:08.000Z | 2016-12-09T08:54:26.000Z | pypi_portal/tasks/pypi.py | rams502/Flask-Large-Application-Example | f536c3dee4050634cf4dfe77a6bb116040e6cf14 | [
"MIT"
] | 138 | 2015-02-16T23:03:18.000Z | 2021-11-04T01:17:40.000Z | """Retrieve data from PyPI."""
from distutils.version import LooseVersion
from logging import getLogger
import xmlrpclib
from flask.ext.celery import single_instance
from pypi_portal.extensions import celery, db, redis
from pypi_portal.models.pypi import Package
from pypi_portal.models.redis import POLL_SIMPLE_THROT... | 40.323077 | 120 | 0.695155 | """Retrieve data from PyPI."""
from distutils.version import LooseVersion
from logging import getLogger
import xmlrpclib
from flask.ext.celery import single_instance
from pypi_portal.extensions import celery, db, redis
from pypi_portal.models.pypi import Package
from pypi_portal.models.redis import POLL_SIMPLE_THROT... | 0 | 0 | 0 |
4cce00aa5de582f5670857de07c52a8bef04a856 | 2,546 | py | Python | quex/output/core/state_machine_coder.py | Liby99/quex | 45f3d21d5df3307376e175cca2d8473e26cb5622 | [
"MIT"
] | null | null | null | quex/output/core/state_machine_coder.py | Liby99/quex | 45f3d21d5df3307376e175cca2d8473e26cb5622 | [
"MIT"
] | 1 | 2022-01-31T18:08:44.000Z | 2022-01-31T18:08:44.000Z | quex/output/core/state_machine_coder.py | raccoonmonk/quex | 20ffe451df9fd49bdc216ce45b8263fa228670e5 | [
"MIT"
] | null | null | null | # Project Quex (http://quex.sourceforge.net); License: MIT;
# (C) 2005-2020 Frank-Rene Schaefer;
#_______________________________________________________________________________
import quex.output.core.state.core as state_coder
import quex.output.core.state.entry as entry
import quex.output.core.mega_... | 38 | 88 | 0.706991 | # Project Quex (http://quex.sourceforge.net); License: MIT;
# (C) 2005-2020 Frank-Rene Schaefer;
#_______________________________________________________________________________
import quex.output.core.state.core as state_coder
import quex.output.core.state.entry as entry
import quex.output.core.mega_... | 575 | 0 | 46 |
0ca4b19554d9dc9108e289b3ba59d1f5db6441a4 | 21,179 | py | Python | script/BuildConsolidatedFeaturesFile.py | smenon8/AnimalPhotoBias | 0b97a8a6d51ad749b4338febdee9d67b80dc3853 | [
"BSD-3-Clause"
] | 2 | 2017-02-12T02:33:12.000Z | 2021-06-21T09:03:34.000Z | script/BuildConsolidatedFeaturesFile.py | smenon8/AnimalWildlifeEstimator | 0b97a8a6d51ad749b4338febdee9d67b80dc3853 | [
"BSD-3-Clause"
] | 14 | 2016-08-31T03:05:44.000Z | 2017-06-02T17:37:29.000Z | script/BuildConsolidatedFeaturesFile.py | smenon8/AnimalPhotoBias | 0b97a8a6d51ad749b4338febdee9d67b80dc3853 | [
"BSD-3-Clause"
] | 1 | 2016-04-29T20:33:45.000Z | 2016-04-29T20:33:45.000Z | # python-3
# coding: utf-8
'''
Script Name: BuildConsolidatedFeaturesFile.py
Created date : Sunday, 27th March
Author : Sreejith Menon
Description :
buildFeatureFl(input file,output file)
Reads from a csv file (taken as a parameter) containing a list of image GIDs.
Extracts the below features from the IBEIS datas... | 41.855731 | 161 | 0.656074 | # python-3
# coding: utf-8
'''
Script Name: BuildConsolidatedFeaturesFile.py
Created date : Sunday, 27th March
Author : Sreejith Menon
Description :
buildFeatureFl(input file,output file)
Reads from a csv file (taken as a parameter) containing a list of image GIDs.
Extracts the below features from the IBEIS datas... | 15,081 | 0 | 298 |
8e03e376e99bc71cbaabe97c09cb6c6de66197ff | 18,642 | py | Python | component/FileBrowser.py | timothyhalim/nuke-welcome-screen | 563c91c535d8914892fa7c1f8bf29851b8397eb3 | [
"Unlicense"
] | 3 | 2021-04-12T19:17:19.000Z | 2022-03-03T18:23:45.000Z | component/FileBrowser.py | timothyhalim/welcome-screen | 563c91c535d8914892fa7c1f8bf29851b8397eb3 | [
"Unlicense"
] | null | null | null | component/FileBrowser.py | timothyhalim/welcome-screen | 563c91c535d8914892fa7c1f8bf29851b8397eb3 | [
"Unlicense"
] | null | null | null | # TODO
import subprocess
import sys
import os
import re
from glob import glob
try:
from PySide2.QtWidgets import *
from PySide2.QtGui import *
from PySide2.QtCore import *
except:
from PySide.QtGui import *
from PySide.QtCore import * | 35.508571 | 118 | 0.564639 | # TODO
import subprocess
import sys
import os
import re
from glob import glob
try:
from PySide2.QtWidgets import *
from PySide2.QtGui import *
from PySide2.QtCore import *
except:
from PySide.QtGui import *
from PySide.QtCore import *
def getDrives():
platform = sys.platform
if p... | 16,763 | 1,468 | 146 |
f3167a11f305bd52e84dacb04f8a81a811d44393 | 8,784 | py | Python | NightlyTests/tensorflow/test_adaround.py | aaronkjones/aimet | 08feb34573281f87c53301935652a02f8d573858 | [
"BSD-3-Clause"
] | null | null | null | NightlyTests/tensorflow/test_adaround.py | aaronkjones/aimet | 08feb34573281f87c53301935652a02f8d573858 | [
"BSD-3-Clause"
] | null | null | null | NightlyTests/tensorflow/test_adaround.py | aaronkjones/aimet | 08feb34573281f87c53301935652a02f8d573858 | [
"BSD-3-Clause"
] | null | null | null | # /usr/bin/env python3.6
# -*- mode: python -*-
# =============================================================================
# @@-COPYRIGHT-START-@@
#
# Copyright (c) 2021, Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification,... | 44.588832 | 118 | 0.677026 | # /usr/bin/env python3.6
# -*- mode: python -*-
# =============================================================================
# @@-COPYRIGHT-START-@@
#
# Copyright (c) 2021, Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification,... | 0 | 0 | 0 |
61205a6832b5abb6004146fd516d3addbef0ffaf | 1,888 | py | Python | test/test_7.py | rgooler/AOC2019 | f761881240a5fe8711f730887f0f5033ea287e3d | [
"Apache-2.0"
] | null | null | null | test/test_7.py | rgooler/AOC2019 | f761881240a5fe8711f730887f0f5033ea287e3d | [
"Apache-2.0"
] | null | null | null | test/test_7.py | rgooler/AOC2019 | f761881240a5fe8711f730887f0f5033ea287e3d | [
"Apache-2.0"
] | null | null | null | import unittest
import logging
logging.basicConfig(level=logging.CRITICAL)
from aoc2019 import Amplifier
| 40.170213 | 191 | 0.603284 | import unittest
import logging
logging.basicConfig(level=logging.CRITICAL)
from aoc2019 import Amplifier
class Day7(unittest.TestCase):
def test_part1_a(self):
phase_sequence = [4,3,2,1,0]
code = [3,15,3,16,1002,16,10,16,1,16,15,15,4,15,99,0,0]
chall = Amplifier(code=code, enable_l... | 1,604 | 9 | 167 |
7012f9d95fc65ac47f73e994b77273ec96e31638 | 2,015 | py | Python | crawling scripts/uber_eats.py | kulten/Restaurant-search-engine | ba9d90c5f97f3360757aa7e60d4e9a349943dab9 | [
"MIT"
] | null | null | null | crawling scripts/uber_eats.py | kulten/Restaurant-search-engine | ba9d90c5f97f3360757aa7e60d4e9a349943dab9 | [
"MIT"
] | null | null | null | crawling scripts/uber_eats.py | kulten/Restaurant-search-engine | ba9d90c5f97f3360757aa7e60d4e9a349943dab9 | [
"MIT"
] | null | null | null | import time
from selenium import webdriver
import json
from crawlpack.helpers import id_gen, connect
chrome_options = webdriver.ChromeOptions()
chrome_options.add_experimental_option( "prefs",{'profile.managed_default_content_settings.javascript': 2})
driver = webdriver.Chrome(chrome_options=chrome_options)
conn, cu... | 51.666667 | 272 | 0.665509 | import time
from selenium import webdriver
import json
from crawlpack.helpers import id_gen, connect
chrome_options = webdriver.ChromeOptions()
chrome_options.add_experimental_option( "prefs",{'profile.managed_default_content_settings.javascript': 2})
driver = webdriver.Chrome(chrome_options=chrome_options)
conn, cu... | 0 | 0 | 0 |
081ece9169ae9f097b481614b641bcbc937f7ad6 | 64 | py | Python | evision_model/models/__init__.py | jiafeng5513/BinocularNet | c26262cef69f99f9db832ec5610cc03bf50aed88 | [
"MIT"
] | 21 | 2019-07-23T06:42:08.000Z | 2021-09-26T12:14:13.000Z | evision_model/models/__init__.py | jiafeng5513/BinocularNet | c26262cef69f99f9db832ec5610cc03bf50aed88 | [
"MIT"
] | 1 | 2021-09-26T13:33:40.000Z | 2021-09-26T13:33:40.000Z | evision_model/models/__init__.py | jiafeng5513/BinocularNet | c26262cef69f99f9db832ec5610cc03bf50aed88 | [
"MIT"
] | 6 | 2019-10-04T02:55:55.000Z | 2022-02-12T03:36:44.000Z | from .DepthNet import DepthNet
from .MotionNet import MotionNet
| 21.333333 | 32 | 0.84375 | from .DepthNet import DepthNet
from .MotionNet import MotionNet
| 0 | 0 | 0 |
1404028406d10381b34041ce381700c4c5e64506 | 990 | py | Python | phiimages/tests.py | denn-is-njeruh/Instaclone | a2f3c36822c419bfeadc56adccce00ce77e1d16e | [
"MIT"
] | null | null | null | phiimages/tests.py | denn-is-njeruh/Instaclone | a2f3c36822c419bfeadc56adccce00ce77e1d16e | [
"MIT"
] | null | null | null | phiimages/tests.py | denn-is-njeruh/Instaclone | a2f3c36822c419bfeadc56adccce00ce77e1d16e | [
"MIT"
] | null | null | null | from django.test import TestCase
from .models import Image, Profile
# Create your tests here.
| 35.357143 | 192 | 0.713131 | from django.test import TestCase
from .models import Image, Profile
# Create your tests here.
class TestProfileClass(TestCase):
def setUp(self):
self.new_profile = Profile(name = 'the_phi', profile_photo = 'image.jpg', bio = 'Dedicated coder')
def test_instance(self):
self.assertTrue(isinstance(self.new... | 705 | 22 | 168 |
a8224b54c25f0f4161bab881ff1dc019d12d9b80 | 9,052 | py | Python | pysnmp/NBS-SIGLANE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/NBS-SIGLANE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/NBS-SIGLANE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module NBS-SIGLANE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NBS-SIGLANE-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:07:45 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27... | 127.492958 | 1,253 | 0.773089 | #
# PySNMP MIB module NBS-SIGLANE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NBS-SIGLANE-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:07:45 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27... | 0 | 0 | 0 |
a36bc46d294cc96d17322dd9c9fdb9fa7f5bb8a7 | 685 | py | Python | server/djangoapp/admin.py | AbdKenn/agfzb-CloudAppDevelopment_Capstone | 78512461254dc398a1f55fa198b68de5a6731b2b | [
"Apache-2.0"
] | null | null | null | server/djangoapp/admin.py | AbdKenn/agfzb-CloudAppDevelopment_Capstone | 78512461254dc398a1f55fa198b68de5a6731b2b | [
"Apache-2.0"
] | null | null | null | server/djangoapp/admin.py | AbdKenn/agfzb-CloudAppDevelopment_Capstone | 78512461254dc398a1f55fa198b68de5a6731b2b | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import CarMake, CarModel
# Register your models here.
#admin.site.register(CarMake)
#admin.site.register(CarModel)
# CarModelInline class
# CarModelAdmin class
# CarMakeAdmin class with CarModelInline
# Register models here
admin.site.register(CarModel)
admin.site.r... | 25.37037 | 49 | 0.738686 | from django.contrib import admin
from .models import CarMake, CarModel
# Register your models here.
#admin.site.register(CarMake)
#admin.site.register(CarModel)
# CarModelInline class
class CarModelInline(admin.StackedInline):
model = CarModel
#extra = 5
# CarModelAdmin class
class CarModelAdmin(admin.M... | 0 | 268 | 66 |
355d02ea714772075a1790c26bb4c418bc4e9aad | 1,402 | py | Python | semantic_segmentation/configs/_base_/models/upernet_convnext.py | ParikhKadam/ConvNeXt | d1fa8f6fef0a165b27399986cc2bdacc92777e40 | [
"MIT"
] | 3,453 | 2022-01-11T01:49:27.000Z | 2022-03-31T12:35:56.000Z | semantic_segmentation/configs/_base_/models/upernet_convnext.py | ParikhKadam/ConvNeXt | d1fa8f6fef0a165b27399986cc2bdacc92777e40 | [
"MIT"
] | 80 | 2022-01-11T10:03:13.000Z | 2022-03-31T05:22:48.000Z | semantic_segmentation/configs/_base_/models/upernet_convnext.py | ParikhKadam/ConvNeXt | d1fa8f6fef0a165b27399986cc2bdacc92777e40 | [
"MIT"
] | 398 | 2022-01-11T02:42:28.000Z | 2022-03-31T06:30:47.000Z | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
norm_cfg = dict(type='SyncBN', requires_grad=True)
model = dict(
type='EncoderDecoder',
pretrained=None,
bac... | 28.04 | 74 | 0.598431 | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
norm_cfg = dict(type='SyncBN', requires_grad=True)
model = dict(
type='EncoderDecoder',
pretrained=None,
bac... | 0 | 0 | 0 |
e6cdd09d28b8d706c93874dff659d7ce8d79506b | 1,695 | py | Python | tests/python/twitter/common/quantity/test_parsing.py | zhouyijiaren/commons | 10df6fb63547baa9047782aa7ad4edf354914b10 | [
"Apache-2.0"
] | 1,143 | 2015-01-05T04:19:24.000Z | 2019-12-11T12:02:23.000Z | tests/python/twitter/common/quantity/test_parsing.py | zhouyijiaren/commons | 10df6fb63547baa9047782aa7ad4edf354914b10 | [
"Apache-2.0"
] | 144 | 2015-01-06T05:05:07.000Z | 2019-12-12T18:02:37.000Z | tests/python/twitter/common/quantity/test_parsing.py | zhouyijiaren/commons | 10df6fb63547baa9047782aa7ad4edf354914b10 | [
"Apache-2.0"
] | 426 | 2015-01-08T08:33:41.000Z | 2019-12-09T13:15:40.000Z | # ==================================================================================================
# Copyright 2011 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | 43.461538 | 100 | 0.60118 | # ==================================================================================================
# Copyright 2011 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | 612 | 0 | 46 |
f394b02017f0e1636d2d430576fb8fa5688a4a89 | 79 | py | Python | src/__init__.py | Tauseef-Hilal/iCODE-BOT | dd4efa9084c35d238f1170ff3af69eeeb055abec | [
"MIT"
] | 1 | 2022-03-31T15:31:10.000Z | 2022-03-31T15:31:10.000Z | src/__init__.py | Tauseef-Hilal/iCODE-BOT | dd4efa9084c35d238f1170ff3af69eeeb055abec | [
"MIT"
] | null | null | null | src/__init__.py | Tauseef-Hilal/iCODE-BOT | dd4efa9084c35d238f1170ff3af69eeeb055abec | [
"MIT"
] | null | null | null | __author__ = "Tauseef Hilal Tantary"
__title__ = "iCODE-BOT"
__version__ = 1.0
| 19.75 | 36 | 0.746835 | __author__ = "Tauseef Hilal Tantary"
__title__ = "iCODE-BOT"
__version__ = 1.0
| 0 | 0 | 0 |
230d2beb84eb1c772ee30285ed46a43c88b22a1f | 2,656 | py | Python | sdk/python/pulumi_gcp/sql/database_instance.py | vrutkovs/pulumi-gcp | ced632feea265d95a38c7ae02826deaae77fb358 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_gcp/sql/database_instance.py | vrutkovs/pulumi-gcp | ced632feea265d95a38c7ae02826deaae77fb358 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_gcp/sql/database_instance.py | vrutkovs/pulumi-gcp | ced632feea265d95a38c7ae02826deaae77fb358 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import pulumi
import pulumi.runtime
from .. import utilities, tables
class DatabaseInstance(pulumi.CustomResource):
"""
Create... | 40.242424 | 183 | 0.691642 | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import pulumi
import pulumi.runtime
from .. import utilities, tables
class DatabaseInstance(pulumi.CustomResource):
"""
Create... | 175 | 0 | 54 |
3948742f2a5abc4ef05a2d984c85454b2d48e44f | 4,121 | py | Python | backend/apps/account/models.py | codelieche/erp | 96861ff63a63a93918fbd5181ffb2646446d0eec | [
"MIT"
] | null | null | null | backend/apps/account/models.py | codelieche/erp | 96861ff63a63a93918fbd5181ffb2646446d0eec | [
"MIT"
] | 29 | 2020-06-05T19:57:11.000Z | 2022-02-26T13:42:36.000Z | backend/apps/account/models.py | codelieche/erp | 96861ff63a63a93918fbd5181ffb2646446d0eec | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractUser
from django.contrib.auth import get_user_model
# Create your models here.
class UserProfile(AbstractUser):
"""
自定义的用户Model
拓展字段gender, nick_name, mobile, qq
"""
GENDER_CHOICES = (
('male', "男"),
('fe... | 35.834783 | 94 | 0.677263 | from django.db import models
from django.contrib.auth.models import AbstractUser
from django.contrib.auth import get_user_model
# Create your models here.
class UserProfile(AbstractUser):
"""
自定义的用户Model
拓展字段gender, nick_name, mobile, qq
"""
GENDER_CHOICES = (
('male', "男"),
('fe... | 1,036 | 213 | 270 |
e885c149f86640e0c03b693520964b9ee91d4c2c | 929 | py | Python | record/list/migrations/0008_userorder.py | Brayton-Han/Brayton-s-Record | 67cb6f7b17d8cb2c5f428079afb091f12b015f5c | [
"MIT"
] | null | null | null | record/list/migrations/0008_userorder.py | Brayton-Han/Brayton-s-Record | 67cb6f7b17d8cb2c5f428079afb091f12b015f5c | [
"MIT"
] | null | null | null | record/list/migrations/0008_userorder.py | Brayton-Han/Brayton-s-Record | 67cb6f7b17d8cb2c5f428079afb091f12b015f5c | [
"MIT"
] | null | null | null | # Generated by Django 3.2.3 on 2021-06-09 13:27
from django.db import migrations, models
| 29.967742 | 77 | 0.482239 | # Generated by Django 3.2.3 on 2021-06-09 13:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('list', '0007_delete_userorder'),
]
operations = [
migrations.CreateModel(
name='userorder',
fields=[
... | 0 | 813 | 25 |
da8f7395117236400bc244fab6d42b66306497f6 | 1,857 | py | Python | NN_PyTorch/12_RNN_regression.py | zhengxuanyu/NNByPytorch | f90b807a44234a48f914e03e45c9691f17eb3189 | [
"MIT"
] | 4 | 2019-03-17T07:51:20.000Z | 2020-02-18T20:39:16.000Z | NN_PyTorch/12_RNN_regression.py | zhengxuanyu/NNByPytorch | f90b807a44234a48f914e03e45c9691f17eb3189 | [
"MIT"
] | null | null | null | NN_PyTorch/12_RNN_regression.py | zhengxuanyu/NNByPytorch | f90b807a44234a48f914e03e45c9691f17eb3189 | [
"MIT"
] | null | null | null | import torch
from torch import nn
import numpy as np
import matplotlib.pyplot as plt
# hyper parameters
TIME_STEP = 10
INPUT_SIZE = 1
LR = 0.02
steps = np.linspace(0, np.pi * 2, 100, dtype=np.float32)
x_np = np.sin(steps)
y_np = np.cos(steps)
plt.plot(steps, y_np, 'r-', label='target (cos)')
plt.plot(... | 24.434211 | 65 | 0.584276 | import torch
from torch import nn
import numpy as np
import matplotlib.pyplot as plt
# hyper parameters
TIME_STEP = 10
INPUT_SIZE = 1
LR = 0.02
steps = np.linspace(0, np.pi * 2, 100, dtype=np.float32)
x_np = np.sin(steps)
y_np = np.cos(steps)
plt.plot(steps, y_np, 'r-', label='target (cos)')
plt.plot(... | 468 | 0 | 81 |
93243cb4b1ceea3e29fdf0c8924e9e481b0b1ddc | 1,478 | py | Python | deploy/create_dummy_notes.py | nonlinearfunction/gatsby-garden | ef8e60cf47300bcf709f20fb06ca4aa6f64c8a1c | [
"MIT"
] | null | null | null | deploy/create_dummy_notes.py | nonlinearfunction/gatsby-garden | ef8e60cf47300bcf709f20fb06ca4aa6f64c8a1c | [
"MIT"
] | null | null | null | deploy/create_dummy_notes.py | nonlinearfunction/gatsby-garden | ef8e60cf47300bcf709f20fb06ca4aa6f64c8a1c | [
"MIT"
] | 3 | 2022-02-22T22:38:47.000Z | 2022-02-25T15:17:49.000Z | import os
import re
import collections
NOTES_DIR = '/home/dave/nonlinearfunction/gatsby-garden/_notes'
md_files = [fname for fname in os.listdir(NOTES_DIR) if fname.endswith('.md')]
existing_notes = [fname[:-3] for fname in md_files]
refs = collections.defaultdict(int)
linked_notes = set()
for filename in md_files:... | 32.844444 | 78 | 0.592693 | import os
import re
import collections
NOTES_DIR = '/home/dave/nonlinearfunction/gatsby-garden/_notes'
md_files = [fname for fname in os.listdir(NOTES_DIR) if fname.endswith('.md')]
existing_notes = [fname[:-3] for fname in md_files]
refs = collections.defaultdict(int)
linked_notes = set()
for filename in md_files:... | 0 | 0 | 0 |
4ce6830e171dd240815c8a7847226c9f8a729bc9 | 1,517 | py | Python | web_app/end2end/pyteserract_engine.py | ikhovryak/PyTorchHackathon | 7a75edeccaee15ff142f9561c1c98fe49ca81e8c | [
"MIT"
] | 1 | 2020-07-28T15:41:36.000Z | 2020-07-28T15:41:36.000Z | web_app/end2end/pyteserract_engine.py | ikhovryak/PyTorchHackathon | 7a75edeccaee15ff142f9561c1c98fe49ca81e8c | [
"MIT"
] | null | null | null | web_app/end2end/pyteserract_engine.py | ikhovryak/PyTorchHackathon | 7a75edeccaee15ff142f9561c1c98fe49ca81e8c | [
"MIT"
] | 1 | 2020-08-25T04:03:48.000Z | 2020-08-25T04:03:48.000Z | import pytesseract
import numpy as np
import cv2
| 26.614035 | 109 | 0.55768 | import pytesseract
import numpy as np
import cv2
def recognize(img, bboxes):
(origH, origW) = img.shape[:2]
results = []
pytesseract.pytesseract.tesseract_cmd = 'C://Users//Samuel//AppData//Local//Tesseract-OCR//tesseract.exe'
for idx, ([l, t], [r, t], [r, b], [l, b]) in enumerate(bboxes):
... | 1,438 | 0 | 23 |
8b4cc94a2766ab4f206771288749309a5b6b6ba4 | 769 | py | Python | miepy/vsh/__init__.py | johnaparker/MiePy | 5c5bb5a07c8ab79e9e2a9fc79fb9779e690147be | [
"MIT"
] | 3 | 2016-05-30T06:45:29.000Z | 2017-08-30T19:58:56.000Z | miepy/vsh/__init__.py | johnaparker/MiePy | 5c5bb5a07c8ab79e9e2a9fc79fb9779e690147be | [
"MIT"
] | null | null | null | miepy/vsh/__init__.py | johnaparker/MiePy | 5c5bb5a07c8ab79e9e2a9fc79fb9779e690147be | [
"MIT"
] | 5 | 2016-12-13T02:05:31.000Z | 2018-03-23T07:11:30.000Z | from . import special
from . import old_special
from .mode_indices import rmax_to_lmax, lmax_to_rmax, mode_indices
from .vsh_functions import (Emn, vsh_mode, get_zn, VSH, vsh_normalization_values,
get_zn_far, VSH_far, vsh_normalization_values_far)
from .vsh_translation import vsh_translati... | 54.928571 | 82 | 0.775033 | from . import special
from . import old_special
from .mode_indices import rmax_to_lmax, lmax_to_rmax, mode_indices
from .vsh_functions import (Emn, vsh_mode, get_zn, VSH, vsh_normalization_values,
get_zn_far, VSH_far, vsh_normalization_values_far)
from .vsh_translation import vsh_translati... | 0 | 0 | 0 |
0d16a7557165a155627b2b9afddb27bfca31e839 | 7,136 | py | Python | configs/functions.py | jordimas/spacy | 744783b56513f6d51baa40f3a4ccdac4a7b7533e | [
"MIT"
] | 13 | 2021-05-20T18:51:48.000Z | 2021-11-07T08:17:59.000Z | configs/functions.py | projecte-aina/spacy | 9996d385a036551c7ba0b20d1f0be976bf9c9c02 | [
"MIT"
] | 3 | 2021-05-20T17:52:01.000Z | 2021-06-22T20:10:24.000Z | configs/functions.py | projecte-aina/spacy | 9996d385a036551c7ba0b20d1f0be976bf9c9c02 | [
"MIT"
] | 2 | 2021-06-19T16:37:12.000Z | 2021-07-28T15:41:22.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 14 10:10:32 2021
@author: carlos.rodriguez1@bsc.es asier.gutierrez@bsc.es carme.armentano@bsc.es
"""
import spacy
import os
import json
from typing import List, Tuple, Optional
from thinc.api import Model
from spacy.pipeline import Lemmatizer
from ... | 39.208791 | 134 | 0.565022 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 14 10:10:32 2021
@author: carlos.rodriguez1@bsc.es asier.gutierrez@bsc.es carme.armentano@bsc.es
"""
import spacy
import os
import json
from typing import List, Tuple, Optional
from thinc.api import Model
from spacy.pipeline import Lemmatizer
from ... | 5,884 | 0 | 119 |
112fa1db8bb60617eed4f20b4464c5f9ef683ed2 | 389 | py | Python | algovenv/lib/python3.8/site-packages/algosdk/abi/reference.py | jakobrichert/RichDAO | fa4934fb4fb9673aa529c4c1ec072b39a6974030 | [
"MIT"
] | null | null | null | algovenv/lib/python3.8/site-packages/algosdk/abi/reference.py | jakobrichert/RichDAO | fa4934fb4fb9673aa529c4c1ec072b39a6974030 | [
"MIT"
] | null | null | null | algovenv/lib/python3.8/site-packages/algosdk/abi/reference.py | jakobrichert/RichDAO | fa4934fb4fb9673aa529c4c1ec072b39a6974030 | [
"MIT"
] | 2 | 2022-03-21T13:13:50.000Z | 2022-03-24T15:09:59.000Z | from typing import Any
| 18.52381 | 42 | 0.66838 | from typing import Any
class ABIReferenceType:
# Account reference type
ACCOUNT = "account"
# Application reference type
APPLICATION = "application"
# Asset reference type
ASSET = "asset"
def is_abi_reference_type(t: Any) -> bool:
return t in (
ABIReferenceType.ACCOUNT,
... | 149 | 169 | 46 |
02f3a1ffa6d264785465aa55ffbca59961bdd325 | 5,918 | py | Python | BLU.py | AdroitAdorKhan/EnergizedBlu | 6c48bf9f1a91b37ff07086692a8afc92818d60fe | [
"MIT"
] | null | null | null | BLU.py | AdroitAdorKhan/EnergizedBlu | 6c48bf9f1a91b37ff07086692a8afc92818d60fe | [
"MIT"
] | null | null | null | BLU.py | AdroitAdorKhan/EnergizedBlu | 6c48bf9f1a91b37ff07086692a8afc92818d60fe | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Energized Blu
import urllib.request
import datetime
import os
import time
File = 'energized/blu'
List = []
# Thanks to all maintainers of hosts lists.
Sources = [
'https://raw.githubusercontent.com/AdroitAdorKhan/Energized/master/EnergizedHosts/EnergizedHosts',
'https:... | 65.755556 | 932 | 0.723893 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Energized Blu
import urllib.request
import datetime
import os
import time
File = 'energized/blu'
List = []
# Thanks to all maintainers of hosts lists.
Sources = [
'https://raw.githubusercontent.com/AdroitAdorKhan/Energized/master/EnergizedHosts/EnergizedHosts',
'https:... | 0 | 0 | 0 |
76b4ca5d35739f772e19658316215cfc154e9849 | 1,804 | py | Python | rain_notice.py | NekoSarada1101/secretary-slack-bot | fba66ad8227ce71af32c756971bf10e2517267ea | [
"MIT"
] | null | null | null | rain_notice.py | NekoSarada1101/secretary-slack-bot | fba66ad8227ce71af32c756971bf10e2517267ea | [
"MIT"
] | 12 | 2021-02-13T10:28:51.000Z | 2021-02-28T03:24:14.000Z | rain_notice.py | NekoSarada1101/secretary-slack-bot | fba66ad8227ce71af32c756971bf10e2517267ea | [
"MIT"
] | null | null | null | import json
import requests
from settings import *
if __name__ == "__main__":
post_rain_notice()
| 33.407407 | 96 | 0.675721 | import json
import requests
from settings import *
def post_rain_notice():
weather_data = fetch_hourly_weather_data() # type: dict
payload = create_rain_notice_payload(weather_data) # type: json
if payload is not None:
response = requests.post(SLACK_WEBHOOK_URL, payload)
print(response)
... | 1,995 | 0 | 69 |
283b6cc570cf7a896902cda895d5564271cab7a7 | 8,526 | py | Python | src/redrawing/components/pipeline.py | ReDrawing/redrawing | 20743f0c8d64d9d2e15cefa840423c9698c74653 | [
"MIT"
] | 1 | 2021-04-20T00:00:15.000Z | 2021-04-20T00:00:15.000Z | src/redrawing/components/pipeline.py | ReDrawing/redrawing | 20743f0c8d64d9d2e15cefa840423c9698c74653 | [
"MIT"
] | null | null | null | src/redrawing/components/pipeline.py | ReDrawing/redrawing | 20743f0c8d64d9d2e15cefa840423c9698c74653 | [
"MIT"
] | 1 | 2021-07-18T03:57:01.000Z | 2021-07-18T03:57:01.000Z | from collections import deque
from abc import ABC, abstractmethod
from multiprocessing import Queue as MQueue
from multiprocessing import Process
from redrawing.components.stage import Stage
class Queue(ABC):
'''!
Generic queue for communication between stages.
'''
@abstractmethod
def get... | 23.105691 | 98 | 0.521229 | from collections import deque
from abc import ABC, abstractmethod
from multiprocessing import Queue as MQueue
from multiprocessing import Process
from redrawing.components.stage import Stage
class Queue(ABC):
'''!
Generic queue for communication between stages.
'''
def __init__(self, max_size):
... | 997 | 0 | 269 |
4a3c1abfc423f8d49d93f8f5e11b9a9e20bf58b5 | 15,365 | py | Python | contrib/script/py/pybase/pyopmo.py | michaelweiss092/LillyMol | a2b7d1d8a07ef338c754a0a2e3b2624aac694cc9 | [
"Apache-2.0"
] | 53 | 2018-06-01T13:16:15.000Z | 2022-02-23T21:04:28.000Z | contrib/script/py/pybase/pyopmo.py | michaelweiss092/LillyMol | a2b7d1d8a07ef338c754a0a2e3b2624aac694cc9 | [
"Apache-2.0"
] | 19 | 2018-08-14T13:43:18.000Z | 2021-09-24T12:53:11.000Z | contrib/script/py/pybase/pyopmo.py | michaelweiss092/LillyMol | a2b7d1d8a07ef338c754a0a2e3b2624aac694cc9 | [
"Apache-2.0"
] | 19 | 2018-10-23T19:41:01.000Z | 2022-02-17T08:14:00.000Z | """
Contains Python "bindings" to molecule object and Python functions
utilizing molecule object key functionalities
The intent is to provide a Pythonic interface to mo utilities and, thus,
enable easy/consistent use of mo from within python programs.
Testing:
$ python <path-to-location>/pymo.py
"""
import os
import ... | 37.844828 | 177 | 0.589391 | """
Contains Python "bindings" to molecule object and Python functions
utilizing molecule object key functionalities
The intent is to provide a Pythonic interface to mo utilities and, thus,
enable easy/consistent use of mo from within python programs.
Testing:
$ python <path-to-location>/pymo.py
"""
import os
import ... | 5,828 | 0 | 135 |
0154cd266d10abdb84725065fd8a7273dbc5e6fd | 5,068 | py | Python | tests/component/records/pandas/test_prep_for_csv.py | ellyteitsworth/records-mover | 21cd56efc2d23cfff04ec1fdf582e5229546c418 | [
"Apache-2.0"
] | null | null | null | tests/component/records/pandas/test_prep_for_csv.py | ellyteitsworth/records-mover | 21cd56efc2d23cfff04ec1fdf582e5229546c418 | [
"Apache-2.0"
] | null | null | null | tests/component/records/pandas/test_prep_for_csv.py | ellyteitsworth/records-mover | 21cd56efc2d23cfff04ec1fdf582e5229546c418 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
# import pytz
import unittest
from records_mover.records.pandas import prep_df_for_csv_output
from records_mover.records.schema import RecordsSchema
from records_mover.records import DelimitedRecordsFormat, ProcessingInstructions
| 41.203252 | 88 | 0.474743 | import pandas as pd
# import pytz
import unittest
from records_mover.records.pandas import prep_df_for_csv_output
from records_mover.records.schema import RecordsSchema
from records_mover.records import DelimitedRecordsFormat, ProcessingInstructions
class TestPrepForCsv(unittest.TestCase):
def test_prep_df_for_cs... | 4,722 | 19 | 76 |
c9ccdca949047698e5e603d5b345ed50a3281268 | 7,103 | py | Python | pytorch/New_Tuts/sequential_tasks.py | DanielMabadeje/Artificial-Intelligence-Deep-Learning-Machine-Learning-Tutorials | 7adab3877fc1d3f1d5f57e6c1743dae8f76f72c5 | [
"Apache-2.0"
] | 3,266 | 2017-08-06T16:51:46.000Z | 2022-03-30T07:34:24.000Z | pytorch/New_Tuts/sequential_tasks.py | hashDanChibueze/Artificial-Intelligence-Deep-Learning-Machine-Learning-Tutorials | bef2c415d154a052c00e99a05f0870af7a5819ac | [
"Apache-2.0"
] | 150 | 2017-08-28T14:59:36.000Z | 2022-03-11T23:21:35.000Z | pytorch/New_Tuts/sequential_tasks.py | hashDanChibueze/Artificial-Intelligence-Deep-Learning-Machine-Learning-Tutorials | bef2c415d154a052c00e99a05f0870af7a5819ac | [
"Apache-2.0"
] | 1,449 | 2017-08-06T17:40:59.000Z | 2022-03-31T12:03:24.000Z | import numpy as np
from tensorflow.python.keras.utils import Sequence, to_categorical
from tensorflow.python.keras.preprocessing.sequence import pad_sequences
class TemporalOrderExp6aSequence(Sequence):
"""
From Hochreiter&Schmidhuber(1997):
The goal is to classify sequences. Elements and targets ar... | 36.055838 | 94 | 0.602562 | import numpy as np
from tensorflow.python.keras.utils import Sequence, to_categorical
from tensorflow.python.keras.preprocessing.sequence import pad_sequences
class EchoData(Sequence):
def __init__(self, series_length=40000, batch_size=32,
echo_step=3, truncated_length=10, seed=None):
s... | 5,189 | 4 | 481 |
22da4ef049b9e8ecbc5351dab4a7e240d8f2b253 | 7,087 | py | Python | pilanimate/__init__.py | jetstream0/PilAnimate | 077eaec0bfc5119c64f08d7ad21e3451b1c39d29 | [
"MIT"
] | null | null | null | pilanimate/__init__.py | jetstream0/PilAnimate | 077eaec0bfc5119c64f08d7ad21e3451b1c39d29 | [
"MIT"
] | null | null | null | pilanimate/__init__.py | jetstream0/PilAnimate | 077eaec0bfc5119c64f08d7ad21e3451b1c39d29 | [
"MIT"
] | null | null | null | #pilaniamte version 0.4.1
from PIL import Image, ImageDraw, ImageOps, ImageFilter, ImageEnhance, ImageColor, ImageFont, ImageSequence
import cv2
import numpy
from time import sleep
import os, math
#functions that draw stuff on
#translation functions
#transparency functions
#UNTESTED
#transform
#color ... | 40.039548 | 248 | 0.686609 | #pilaniamte version 0.4.1
from PIL import Image, ImageDraw, ImageOps, ImageFilter, ImageEnhance, ImageColor, ImageFont, ImageSequence
import cv2
import numpy
from time import sleep
import os, math
class Animation:
def __init__(self, layer_num, size=(1600,900), fps=25, mode="RGBA", color=0):
self.layers = []
... | 5,772 | -14 | 790 |
830c2187d7207e6add4a2133b9f662799d8fb3a2 | 5,938 | py | Python | examples/alternatives_comparision.py | fossabot/IneqPy | f9329d465a922fcacdefd14858350ee40bc5b803 | [
"MIT"
] | 21 | 2018-06-22T07:56:40.000Z | 2022-03-13T12:28:10.000Z | examples/alternatives_comparision.py | fossabot/IneqPy | f9329d465a922fcacdefd14858350ee40bc5b803 | [
"MIT"
] | 29 | 2017-08-11T20:07:42.000Z | 2022-02-21T18:43:28.000Z | examples/alternatives_comparision.py | fossabot/IneqPy | f9329d465a922fcacdefd14858350ee40bc5b803 | [
"MIT"
] | 12 | 2017-05-21T15:30:48.000Z | 2022-03-02T14:40:24.000Z | import numpy as np
from pygsl import statistics as gsl_stat
from scipy import stats as sp_stat
import ineqpy as ineq
from ineqpy import _statistics as ineq_stat
# Generate random data
x, w = ineq.utils.generate_data_to_test((60,90))
# Replicating weights
x_rep, w_rep = ineq.utils.repeat_data_from_weighted(x, w)
svy =... | 24.436214 | 77 | 0.625126 | import numpy as np
from pygsl import statistics as gsl_stat
from scipy import stats as sp_stat
import ineqpy as ineq
from ineqpy import _statistics as ineq_stat
# Generate random data
x, w = ineq.utils.generate_data_to_test((60,90))
# Replicating weights
x_rep, w_rep = ineq.utils.repeat_data_from_weighted(x, w)
svy =... | 0 | 0 | 0 |