hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c23f67bbb2c88515467d0f722288cb265da6fed1 | 3,729 | py | Python | matlab2python/withinSkull.py | rogermsarmento/Level-Set-Parzen-brain | 0710cc5077567c3021345db9b611d6b2c5fa6666 | [
"MIT"
] | null | null | null | matlab2python/withinSkull.py | rogermsarmento/Level-Set-Parzen-brain | 0710cc5077567c3021345db9b611d6b2c5fa6666 | [
"MIT"
] | null | null | null | matlab2python/withinSkull.py | rogermsarmento/Level-Set-Parzen-brain | 0710cc5077567c3021345db9b611d6b2c5fa6666 | [
"MIT"
] | 1 | 2020-10-01T23:47:52.000Z | 2020-10-01T23:47:52.000Z | def withinSkull(imgOrig, flag):
"""
fuzzy c-mean image segmentation with weighted
:param imgOrig: grayscale image
:param flag:
:param count_debug:
:return: imgUtil: 2d array
Multiplicao de imgOrig e skull,
:return: skullInside: 2d array
Parte interior do cerebro
:return: ... | 38.84375 | 73 | 0.498257 | def withinSkull(imgOrig, flag):
"""
fuzzy c-mean image segmentation with weighted
:param imgOrig: grayscale image
:param flag:
:param count_debug:
:return: imgUtil: 2d array
Multiplicao de imgOrig e skull,
:return: skullInside: 2d array
Parte interior do cerebro
:return: ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 26 |
91dfe23e6417b508c4d479a8e3334d5f400486ea | 11,704 | py | Python | backend/benefit/calculator/tests/test_handler_excel_examples.py | City-of-Helsinki/kesaseteli | 964f801c2dba72c4105b6e436b12b821b199d6d2 | [
"MIT"
] | 2 | 2021-05-10T09:28:35.000Z | 2021-05-17T12:15:34.000Z | backend/benefit/calculator/tests/test_handler_excel_examples.py | City-of-Helsinki/yjdh | 1c07576b456d2be9c3171363450ed46de2c1bbcb | [
"MIT"
] | 931 | 2021-05-21T15:24:35.000Z | 2022-03-31T20:07:40.000Z | backend/benefit/calculator/tests/test_handler_excel_examples.py | City-of-Helsinki/yjdh | 1c07576b456d2be9c3171363450ed46de2c1bbcb | [
"MIT"
] | 6 | 2021-07-06T11:07:02.000Z | 2022-02-07T12:42:21.000Z |
MAX_TEST_ROW = 100
FIRST_TEST_COLUMN = 3
MAX_TEST_COLUMN = 50 # large enough number that all test columns are included
# unique object
sentinel = object()
SHEETS_TO_TEST = [
("Palkan Helsinki-lis", SalaryBenefitExcelTest),
("Tyllistmisen Helsinki-lis", EmployeeBenefitExcelTest),
("Palkkatuettu ... | 36.575 | 96 | 0.645933 | import datetime
import os
from applications.enums import ApplicationStatus, BenefitType
from applications.tests.factories import ApplicationFactory
from calculator.models import Calculation, STATE_AID_MAX_PERCENTAGE_CHOICES
from calculator.tests.factories import PaySubsidyFactory, TrainingCompensationFactory
from comm... | 22 | 0 | 0 | 9,031 | 0 | 1,619 | 0 | 267 | 413 |
3afa9b716bfbe31404dc4373f609aa17e1c9fc5a | 2,610 | py | Python | tests/test_function.py | pwwang/dpipe | 4efafbb1b13f8a70cc692943473d716b66e9e947 | [
"MIT"
] | null | null | null | tests/test_function.py | pwwang/dpipe | 4efafbb1b13f8a70cc692943473d716b66e9e947 | [
"MIT"
] | null | null | null | tests/test_function.py | pwwang/dpipe | 4efafbb1b13f8a70cc692943473d716b66e9e947 | [
"MIT"
] | null | null | null | from pipda.context import Context
def test_expr_func(f):
"""Test that we can use expr as a function"""
fun = Function(f.attr.get_data, (), {}, False)
out = fun._pipda_eval(
f, context=Context.EVAL.value
)._pipda_eval(
Data(3), context=Context.EVAL.value
)
assert isinstan... | 25.841584 | 120 | 0.620307 | import pytest
from pipda import register_verb, register_func
from pipda.function import *
from pipda.context import Context, ContextEval
from pipda.symbolic import ReferenceAttr, Symbolic
from . import f, identity, identity2, iden, iden2, add2
def test_function_repr(identity):
fun = Function(identity, (), {})
... | 0 | 256 | 0 | 218 | 0 | 1,407 | 0 | 100 | 276 |
81d41dccf1a7caeed628daf991a9c46c189d9e2b | 2,819 | py | Python | tebetebe/OSMDataset.py | geoDavey/tebetebe | bbb262fab9ce2adfcc7ce40da58c163986812f06 | [
"MIT"
] | 6 | 2019-09-23T10:45:51.000Z | 2020-05-25T01:47:44.000Z | tebetebe/OSMDataset.py | geoDavey/tebetebe | bbb262fab9ce2adfcc7ce40da58c163986812f06 | [
"MIT"
] | null | null | null | tebetebe/OSMDataset.py | geoDavey/tebetebe | bbb262fab9ce2adfcc7ce40da58c163986812f06 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
| 29.673684 | 113 | 0.592054 | #!/usr/bin/env python3
import overpass
import hashlib
import logging
from pathlib import Path
from .utils import hash_
from . import defaults
class OSMDataset():
'''
OSM data file from which a route network will be extracted
Parameters
----------
osm_path:
Path to *.osm{.pbf} dataset
... | 0 | 1,771 | 0 | 880 | 0 | 0 | 0 | -13 | 158 |
c4d1f2b547126d2d7ed165c7c2a2323a98fce41f | 549 | py | Python | white-head-mountain/pcdn/getFrequency.py | jiangwenfan/pythonScripts | c9004944f162af575e111522f98d4de4f59885e6 | [
"Apache-2.0"
] | null | null | null | white-head-mountain/pcdn/getFrequency.py | jiangwenfan/pythonScripts | c9004944f162af575e111522f98d4de4f59885e6 | [
"Apache-2.0"
] | null | null | null | white-head-mountain/pcdn/getFrequency.py | jiangwenfan/pythonScripts | c9004944f162af575e111522f98d4de4f59885e6 | [
"Apache-2.0"
] | null | null | null |
#demo
#getFrequency("183.131.179.4\n183.131.179.5\n183.131.179.6")
| 28.894737 | 127 | 0.624772 | import os
import subprocess
def getFrequency(ips):
#获取频繁掉线的账号
cmd1="echo \""+ips+"\" > /home/jwf/pfdx/ips"
os.system(cmd1)
#os.system("cat /home/jwf/pfdx/ips")
cmd2="cd /home/jwf/pfdx/ && bash /home/jwf/pfdx/exe.sh|grep -v -E \"[WARNING]|频繁掉线账号如下:|172.31|-#-#|没有频繁掉线账号|down_times\""
#... | 129 | 0 | 0 | 0 | 0 | 381 | 0 | -16 | 70 |
13bc69a1a195bc36cdcd4655139b11e5204d6bbd | 2,579 | py | Python | test/unit/test_cli_methods.py | rprabhat/curator | b0c7ad652a0141799cc499c43c4b9fa56328b4ff | [
"Apache-2.0"
] | 1 | 2017-08-19T08:11:15.000Z | 2017-08-19T08:11:15.000Z | test/unit/test_cli_methods.py | rprabhat/curator | b0c7ad652a0141799cc499c43c4b9fa56328b4ff | [
"Apache-2.0"
] | null | null | null | test/unit/test_cli_methods.py | rprabhat/curator | b0c7ad652a0141799cc499c43c4b9fa56328b4ff | [
"Apache-2.0"
] | null | null | null | # Get test variables and constants from a single source
from . import testvars as testvars
| 38.492537 | 72 | 0.682435 | import sys
import logging
from unittest import TestCase
from mock import Mock, patch, mock_open
import elasticsearch
import curator
from curator import _version as __version__
from . import CLITestCase
# Get test variables and constants from a single source
from . import testvars as testvars
class TestCLI_A(TestCase):... | 0 | 0 | 0 | 2,240 | 0 | 0 | 0 | 26 | 222 |
1f42d25d4c96a9876a1963d3f370fb82cfe85de2 | 712 | py | Python | MCA/Data Structures/Array_sort.py | muhammadmuzzammil1998/CollegeStuff | 618cec9ebfbfd29a2d1e5a182b90cfb36b38a906 | [
"MIT"
] | 3 | 2018-03-13T12:34:51.000Z | 2018-10-02T18:54:22.000Z | MCA/Data Structures/Array_sort.py | muhammadmuzzammil1998/CollegeStuff | 618cec9ebfbfd29a2d1e5a182b90cfb36b38a906 | [
"MIT"
] | null | null | null | MCA/Data Structures/Array_sort.py | muhammadmuzzammil1998/CollegeStuff | 618cec9ebfbfd29a2d1e5a182b90cfb36b38a906 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
array = []
print("Array: ", array)
print("1. Enter array")
print("2. Sort array")
while True:
print("Array: ", array)
inp = input("Your choice: ")
if inp == "1":
insert(array, input(" Enter element: "))
elif inp == "2":
... | 21.575758 | 63 | 0.498596 | def sort(array):
length = len(array)
for i in range(length - 1):
for j in range(0, length - i - 1):
if array[j] > array[j + 1]:
array[j], array[j + 1] = array[j + 1], array[j]
return array
def insert(array, data):
array.append(data)
def dump(array):
for el in ... | 0 | 0 | 0 | 0 | 0 | 296 | 0 | 0 | 68 |
6e6fdabb47f15fcaf87f20594ece2c09f96eddc6 | 2,447 | py | Python | year2020/day20/test_solver.py | Sebaestschjin/advent-of-code | 5fd708efa355483fc0ccddf7548b62682662bcc8 | [
"MIT"
] | null | null | null | year2020/day20/test_solver.py | Sebaestschjin/advent-of-code | 5fd708efa355483fc0ccddf7548b62682662bcc8 | [
"MIT"
] | null | null | null | year2020/day20/test_solver.py | Sebaestschjin/advent-of-code | 5fd708efa355483fc0ccddf7548b62682662bcc8 | [
"MIT"
] | null | null | null |
import year2020.day20.reader as reader
import year2020.day20.solver as solver
| 35.985294 | 107 | 0.638741 | import pytest
from assertpy import assert_that
from common.grid import Direction
import year2020.day20.reader as reader
import year2020.day20.solver as solver
def test_get_borders():
tiles = reader.read(filename='in_test')
tile = tiles[2311]
result = solver.get_borders(tile)
assert_that(result).is_e... | 0 | 226 | 0 | 0 | 0 | 1,892 | 0 | 15 | 228 |
8d987a795a2c5a4f15b34a3b7ee4ccda64e5c38e | 511 | py | Python | code/my_utils/t_format.py | naivety77/SAIL | 452c63cd8b80dd29921fa166ebbc3b3943c1d3c9 | [
"MIT"
] | 8 | 2022-02-21T08:59:22.000Z | 2022-02-28T02:14:39.000Z | code/my_utils/t_format.py | naivety77/SAIL | 452c63cd8b80dd29921fa166ebbc3b3943c1d3c9 | [
"MIT"
] | null | null | null | code/my_utils/t_format.py | naivety77/SAIL | 452c63cd8b80dd29921fa166ebbc3b3943c1d3c9 | [
"MIT"
] | null | null | null | from colorama import init
init(autoreset=True)
p_color = "yellow"
| 23.227273 | 37 | 0.585127 | from colorama import init
from termcolor import cprint, colored
init(autoreset=True)
p_color = "yellow"
def t_format(text, text_length=0):
if text_length==0:
return "%-10s" % text
if text_length==0.5:
return "%-15s" % text
elif text_length==1:
return "%-20s" % text
elif text_l... | 0 | 0 | 0 | 0 | 0 | 383 | 0 | 16 | 45 |
39c421368ce6603bd66b74881b75228e94cd0c46 | 6,627 | py | Python | tests/test_query.py | vmware/pyloginsight | 679aa1814c5622807d05324a9a19a3da1af0c326 | [
"Apache-2.0"
] | 16 | 2016-11-28T08:59:57.000Z | 2020-05-14T21:46:26.000Z | tests/test_query.py | vmware/pyloginsight | 679aa1814c5622807d05324a9a19a3da1af0c326 | [
"Apache-2.0"
] | 16 | 2016-11-02T17:36:40.000Z | 2017-12-28T20:51:40.000Z | tests/test_query.py | vmware/pyloginsight | 679aa1814c5622807d05324a9a19a3da1af0c326 | [
"Apache-2.0"
] | 10 | 2017-06-28T08:30:18.000Z | 2020-04-21T00:33:59.000Z | # -*- coding: utf-8 -*-
from __future__ import print_function
import pytest
import collections
import uuid
from pyloginsight.exceptions import TransportError
from pyloginsight.query import Constraint
from pyloginsight import operator
from pyloginsight.models import Event
from datetime import datetime
import pytz
impor... | 35.629032 | 135 | 0.693074 | # -*- coding: utf-8 -*-
from __future__ import print_function
import pytest
import warnings
import collections
import uuid
from pyloginsight.exceptions import TransportError
from pyloginsight.query import Constraint, Parameter
from pyloginsight import operator
from pyloginsight.models import Event
from pyloginsight.in... | 0 | 0 | 0 | 0 | 0 | 3,006 | 0 | 57 | 319 |
29b4bd0e2db0b440cc7b66c80b4c23a4b59a5164 | 3,360 | py | Python | model/two_input_model.py | michal-choinski/sequential_moral_dilemmas | c6364672b996f04e4c791e20fd8b96eb5cf15b91 | [
"MIT"
] | 1 | 2021-04-21T10:08:10.000Z | 2021-04-21T10:08:10.000Z | model/two_input_model.py | michal-choinski/sequential_moral_dilemmas | c6364672b996f04e4c791e20fd8b96eb5cf15b91 | [
"MIT"
] | null | null | null | model/two_input_model.py | michal-choinski/sequential_moral_dilemmas | c6364672b996f04e4c791e20fd8b96eb5cf15b91 | [
"MIT"
] | null | null | null | from ray.rllib.utils.framework import try_import_tf
tf1, tf, tfv = try_import_tf()
| 37.752809 | 111 | 0.633631 | from ray.rllib.agents.dqn.distributional_q_tf_model import DistributionalQTFModel
from ray.rllib.models.tf.misc import normc_initializer
from ray.rllib.models.preprocessors import get_preprocessor
from ray.rllib.models.utils import get_activation_fn
from ray.rllib.utils.framework import try_import_tf
tf1, tf, tfv = t... | 0 | 0 | 0 | 3,002 | 0 | 0 | 0 | 162 | 111 |
6d82318342ad02023020e1cb35ca781a732ae8da | 2,034 | py | Python | tutorials/migrations/0025_auto_20200406_1743.py | ericrobskyhuntley/vialab.mit.edu | 1318d03b8eeb106c1662052e1caa53290e206ae7 | [
"MIT"
] | null | null | null | tutorials/migrations/0025_auto_20200406_1743.py | ericrobskyhuntley/vialab.mit.edu | 1318d03b8eeb106c1662052e1caa53290e206ae7 | [
"MIT"
] | null | null | null | tutorials/migrations/0025_auto_20200406_1743.py | ericrobskyhuntley/vialab.mit.edu | 1318d03b8eeb106c1662052e1caa53290e206ae7 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-04-06 21:43
| 32.285714 | 172 | 0.581121 | # Generated by Django 3.0.4 on 2020-04-06 21:43
from django.db import migrations, models
import django.db.models.deletion
import martor.models
class Migration(migrations.Migration):
dependencies = [
('reading', '0012_auto_20200401_1514'),
('tutorials', '0024_auto_20200401_1804'),
]
oper... | 0 | 0 | 0 | 1,866 | 0 | 0 | 0 | 29 | 90 |
63c15dae923db138cb02ce645d3ed481eaff8549 | 230 | py | Python | triangle.py | ahmadf21-meet/meet2019y1lab4 | 4079bdd82447c959777231625d35d5015c78dce2 | [
"MIT"
] | null | null | null | triangle.py | ahmadf21-meet/meet2019y1lab4 | 4079bdd82447c959777231625d35d5015c78dce2 | [
"MIT"
] | null | null | null | triangle.py | ahmadf21-meet/meet2019y1lab4 | 4079bdd82447c959777231625d35d5015c78dce2 | [
"MIT"
] | null | null | null | import turtle
turtle.pensize(5)
turtle.color('blue')
turtle.shape('blank')
turtle.bgcolor('green')
turtle.penup()
turtle.goto(-500,0)
turtle.pendown()
turtle.goto(500,0)
turtle.goto(0,400)
turtle.goto(-500,0)
turtle.mainloop()
| 15.333333 | 23 | 0.734783 | import turtle
turtle.pensize(5)
turtle.color('blue')
turtle.shape('blank')
turtle.bgcolor('green')
turtle.penup()
turtle.goto(-500,0)
turtle.pendown()
turtle.goto(500,0)
turtle.goto(0,400)
turtle.goto(-500,0)
turtle.mainloop()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d8f7bf2ae1269e8a5ad02fe477f2ac19e45a6748 | 564 | py | Python | geomat/stein/migrations/0002_auto_20151111_1513.py | mimischi/django-geomat | 8c5bc4c9ba9759b58b52ddf339ccaec40ec5f6ea | [
"BSD-3-Clause"
] | 3 | 2017-01-13T15:53:39.000Z | 2017-05-05T11:57:55.000Z | geomat/stein/migrations/0002_auto_20151111_1513.py | mimischi/django-geomat | 8c5bc4c9ba9759b58b52ddf339ccaec40ec5f6ea | [
"BSD-3-Clause"
] | 233 | 2016-11-05T15:19:48.000Z | 2021-09-07T23:33:47.000Z | geomat/stein/migrations/0002_auto_20151111_1513.py | GeoMatDigital/django-geomat | 8c5bc4c9ba9759b58b52ddf339ccaec40ec5f6ea | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
| 28.2 | 251 | 0.574468 | # -*- coding: utf-8 -*-
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('stein', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='mineraltype',
name='crystal_system',
field=models.... | 0 | 0 | 0 | 473 | 0 | 0 | 0 | 19 | 46 |
4d7341411bbdd7841edea243923235e03436cbbd | 2,370 | py | Python | djangular_cli/terminal/cli.py | forafekt/djangular-cli | 1b31685fd3f6fdb003ab4e5b37c472bb441a4075 | [
"MIT"
] | 1 | 2020-08-18T19:45:22.000Z | 2020-08-18T19:45:22.000Z | djangular_cli/terminal/cli.py | forafekt/djangular-cli | 1b31685fd3f6fdb003ab4e5b37c472bb441a4075 | [
"MIT"
] | null | null | null | djangular_cli/terminal/cli.py | forafekt/djangular-cli | 1b31685fd3f6fdb003ab4e5b37c472bb441a4075 | [
"MIT"
] | null | null | null | """""
Main Client.
"""""
from __future__ import print_function, unicode_literals
if __name__ == '__main__':
client()
| 27.241379 | 81 | 0.566245 | """""
Main Client.
"""""
from __future__ import print_function, unicode_literals
from djangular_cli.terminal.prompt import prompt
from djangular_cli.config.style.color_style import style
from djangular_cli.config.style.widget import widget
from djangular_cli.generate.create import cmd_angular, cmd_env, cmd_django
from... | 0 | 0 | 0 | 0 | 0 | 1,876 | 0 | 214 | 156 |
e5c2dcd7e600787354a2f46d238af617b555c235 | 5,858 | py | Python | download_all_versions.py | youyanggu/download-all-versions-file | 4aa89b82d8e7a6caa8ab7c598c6950dffd350fc8 | [
"MIT"
] | null | null | null | download_all_versions.py | youyanggu/download-all-versions-file | 4aa89b82d8e7a6caa8ab7c598c6950dffd350fc8 | [
"MIT"
] | null | null | null | download_all_versions.py | youyanggu/download-all-versions-file | 4aa89b82d8e7a6caa8ab7c598c6950dffd350fc8 | [
"MIT"
] | null | null | null | """
Downloads all versions of a file in a GitHub repository.
"""
import argparse
import datetime
import json
import os
import requests
def str_to_date(date_str, fmt='%Y-%m-%d'):
"""Convert string date to date object."""
return datetime.datetime.strptime(date_str, fmt).date()
def str_to_datetime(date_str,... | 33.666667 | 167 | 0.629225 | """
Downloads all versions of a file in a GitHub repository.
"""
import argparse
import datetime
import json
import os
import requests
def str_to_date(date_str, fmt='%Y-%m-%d'):
"""Convert string date to date object."""
return datetime.datetime.strptime(date_str, fmt).date()
def str_to_datetime(date_str,... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fe60992723004bf69476c304634ab6ae52c92033 | 24,188 | py | Python | harvester_odt/pat_geocatalogo/converter.py | opendatatrentino/opendata-harvester | 7cdff57e02cad22e35c4b19d15df7bbec730cc47 | [
"BSD-2-Clause"
] | 1 | 2021-04-05T16:39:29.000Z | 2021-04-05T16:39:29.000Z | harvester_odt/pat_geocatalogo/converter.py | opendatatrentino/opendata-harvester | 7cdff57e02cad22e35c4b19d15df7bbec730cc47 | [
"BSD-2-Clause"
] | null | null | null | harvester_odt/pat_geocatalogo/converter.py | opendatatrentino/opendata-harvester | 7cdff57e02cad22e35c4b19d15df7bbec730cc47 | [
"BSD-2-Clause"
] | 1 | 2015-01-14T16:58:46.000Z | 2015-01-14T16:58:46.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
from .tags_map import TAGS_MAP
logger = logging.getLogger(__name__)
ORG_SIAT = 'pat-sistema-informativo-ambiente-e-territorio'
ORG_CATASTO = 'pat-s-catasto'
LICENSES_MAP = {
1: 'cc-zero',
2: 'cc-by',
}
ORGANIZATIONS = {
ORG... | 38.393651 | 90 | 0.598851 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import logging
import lxml.etree
from harvester.ext.converter.base import ConverterPluginBase
from harvester.utils import slugify, XPathHelper, flatten_dict, report_progress
from .tags_map import TAGS_MAP
from .constants import LINKED_... | 19 | 0 | 0 | 2,320 | 0 | 19,167 | 0 | 120 | 301 |
23a3072783daff5cd06957934efb48e5d4fc34a8 | 296 | py | Python | debug1.py | Dany503/SeminarioPython | 8958e8cdc5f05c42f9f71117e20a13f7d87cd004 | [
"Apache-2.0"
] | null | null | null | debug1.py | Dany503/SeminarioPython | 8958e8cdc5f05c42f9f71117e20a13f7d87cd004 | [
"Apache-2.0"
] | null | null | null | debug1.py | Dany503/SeminarioPython | 8958e8cdc5f05c42f9f71117e20a13f7d87cd004 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Seminario Python
Debug 1
Primer script en el que vamos a utilizar las herramientas
de depuracin de Spyder
@author: D. G. Reina
"""
#%%
j = int()
for i in range(10):
print i
j = j + i # aadir un break point en esta linea
| 13.454545 | 58 | 0.564189 | # -*- coding: utf-8 -*-
"""
Seminario Python
Debug 1
Primer script en el que vamos a utilizar las herramientas
de depuración de Spyder
@author: D. G. Reina
"""
#%%
j = int()
for i in range(10):
print i
j = j + i # añadir un break point en esta linea
| 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
45b4e3394c655b494733849ff9226965536da5d0 | 3,781 | py | Python | hosts/task.py | luo1fly/AntiMagic | 84e986aaef68e8a0b1ab3ec4ce04c2121053d928 | [
"Apache-2.0"
] | 8 | 2017-06-01T09:41:49.000Z | 2021-08-04T01:51:06.000Z | hosts/task.py | luo1fly/AntiMagic | 84e986aaef68e8a0b1ab3ec4ce04c2121053d928 | [
"Apache-2.0"
] | 1 | 2017-08-07T01:32:15.000Z | 2017-08-07T01:32:15.000Z | hosts/task.py | luo1fly/AntiMagic | 84e986aaef68e8a0b1ab3ec4ce04c2121053d928 | [
"Apache-2.0"
] | 7 | 2016-11-13T14:40:13.000Z | 2019-01-21T06:32:32.000Z | #!/usr/bin/env python
# Name: task.py
# Time:8/11/16 10:23 AM
# Author:luo1fly
# from django.utils.datastructures import MultiValueDictKeyError
# import your modules above
| 31.508333 | 93 | 0.578947 | #!/usr/bin/env python
# Name: task.py
# Time:8/11/16 10:23 AM
# Author:luo1fly
from django.db import transaction
from hosts import models
import subprocess
from AntiMagic import settings
import os
import json
# from django.utils.datastructures import MultiValueDictKeyError
# import your modules above
class Task(obje... | 213 | 2,517 | 0 | 864 | 0 | 0 | 0 | -2 | 156 |
fe9fff878661163dc5341bfa68933c0064eebb18 | 7,628 | py | Python | NanoleafAuroraEffectChanger/NAEC_StreamlabsSystem.py | CyberHumi/Chatbot-Scripts | f99742d76f721109c43eac7c03fc3f20a9ba18bc | [
"MIT"
] | 6 | 2018-11-08T12:54:04.000Z | 2020-07-31T02:44:44.000Z | NanoleafAuroraEffectChanger/NAEC_StreamlabsSystem.py | CyberHumi/Chatbot-Scripts | f99742d76f721109c43eac7c03fc3f20a9ba18bc | [
"MIT"
] | 3 | 2018-12-09T17:46:20.000Z | 2019-03-20T23:22:43.000Z | NanoleafAuroraEffectChanger/NAEC_StreamlabsSystem.py | CyberHumi/Chatbot-Scripts | f99742d76f721109c43eac7c03fc3f20a9ba18bc | [
"MIT"
] | null | null | null | #---------------------------------------
# Import Libraries
#---------------------------------------
import clr
clr.AddReference("IronPython.SQLite.dll")
clr.AddReference("IronPython.Modules.dll")
#---------------------------------------
# [Required] Script Information
#---------------------------------... | 41.010753 | 271 | 0.57892 | #---------------------------------------
# Import Libraries
#---------------------------------------
import clr
clr.AddReference("IronPython.SQLite.dll")
clr.AddReference("IronPython.Modules.dll")
import os
import json
import codecs
#---------------------------------------
# [Required] Script Informat... | 0 | 0 | 0 | 0 | 0 | 6,010 | 0 | -30 | 334 |
15c03683ff4a2232a059e82991a7d6f5cde5fe5c | 1,874 | py | Python | PyBank/main.py | swbrummund/HW.03_Python-Challenge | 02a6ed2a84a41752caf06575e911372ae389a61b | [
"ADSL"
] | null | null | null | PyBank/main.py | swbrummund/HW.03_Python-Challenge | 02a6ed2a84a41752caf06575e911372ae389a61b | [
"ADSL"
] | null | null | null | PyBank/main.py | swbrummund/HW.03_Python-Challenge | 02a6ed2a84a41752caf06575e911372ae389a61b | [
"ADSL"
] | null | null | null | import os
import csv
csv_path = os.path.join("budget_data.csv")
with open(csv_path, newline="") as csv_file:
csv_reader = csv.reader(csv_file, delimiter=",")
#print(csv_file)
next(csv_reader,None)
PyBank(csv_reader) | 26.027778 | 67 | 0.624867 | import os
import csv
csv_path = os.path.join("budget_data.csv")
def PyBank(Budget):
Month = 0
Month_List = []
Profit_Losses = []
Change_List = []
#Count the number of months
for row in csv_reader:
Month += 1
#Add Profit/Losses to a list
Profit_Losses.append(fl... | 0 | 0 | 0 | 0 | 0 | 1,615 | 0 | 0 | 23 |
1596d3f914af12b65c96905bb9f643eeb4bc0c16 | 894 | py | Python | 90-99/92_Reverse Linked List II.py | yanchdh/LeetCode | ec60364082ad246390cf3292090d23f1c7dd08b4 | [
"BSD-2-Clause"
] | 2 | 2018-01-12T08:45:08.000Z | 2018-01-15T13:29:56.000Z | 90-99/92_Reverse Linked List II.py | yanchdh/LeetCode | ec60364082ad246390cf3292090d23f1c7dd08b4 | [
"BSD-2-Clause"
] | null | null | null | 90-99/92_Reverse Linked List II.py | yanchdh/LeetCode | ec60364082ad246390cf3292090d23f1c7dd08b4 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding:utf-8 -*-
# https://leetcode.com/problems/reverse-linked-list-ii/description/
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
| 22.923077 | 67 | 0.457494 | # -*- coding:utf-8 -*-
# https://leetcode.com/problems/reverse-linked-list-ii/description/
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def reverseBetween(self, head, m, n):
"""
... | 0 | 0 | 0 | 621 | 0 | 0 | 0 | 0 | 23 |
7a261f4e4e5c72ecd0ff711619414fa685f72f61 | 2,402 | py | Python | models/RNN_models.py | caokyhieu/DELAFO | 1c84e5f4ef9690e453973b57d1f0feb194a55a8c | [
"MIT"
] | 17 | 2020-05-04T08:54:14.000Z | 2022-03-28T08:43:09.000Z | models/RNN_models.py | caokyhieu/DELAFO | 1c84e5f4ef9690e453973b57d1f0feb194a55a8c | [
"MIT"
] | 2 | 2020-11-03T01:07:24.000Z | 2021-08-06T16:56:18.000Z | models/RNN_models.py | caokyhieu/DELAFO | 1c84e5f4ef9690e453973b57d1f0feb194a55a8c | [
"MIT"
] | 10 | 2020-06-11T15:59:32.000Z | 2022-03-22T14:00:04.000Z | from keras.layers import BatchNormalization
| 34.811594 | 118 | 0.694421 | from keras.layers import Input, Activation, Dense,Flatten, BatchNormalization, Add, Conv2D, MaxPooling2D
from keras.layers import AveragePooling2D,Permute,Reshape,LSTM,Lambda,GRU,Bidirectional,BatchNormalization,Concatenate
from keras import regularizers
from keras.optimizers import Adam
from utils import sharpe_ratio_... | 0 | 0 | 0 | 0 | 0 | 1,961 | 0 | 219 | 178 |
427287dae76e578d941ced36e839c2653a8745ae | 7,257 | py | Python | genomics_data_index/storage/io/mutation/NucleotideSampleData.py | apetkau/genomics-data-index | d0cc119fd57b8cbd701affb1c84450cf7832fa01 | [
"Apache-2.0"
] | 12 | 2021-05-03T20:56:05.000Z | 2022-01-04T14:52:19.000Z | genomics_data_index/storage/io/mutation/NucleotideSampleData.py | apetkau/thesis-index | 6c96e9ed75d8e661437effe62a939727a0b473fc | [
"Apache-2.0"
] | 30 | 2021-04-26T23:03:40.000Z | 2022-02-25T18:41:14.000Z | genomics_data_index/storage/io/mutation/NucleotideSampleData.py | apetkau/genomics-data-index | d0cc119fd57b8cbd701affb1c84450cf7832fa01 | [
"Apache-2.0"
] | null | null | null | import logging
logger = logging.getLogger(__name__)
| 49.705479 | 122 | 0.68899 | import logging
import shutil
from pathlib import Path
from typing import Tuple, Optional
import pandas as pd
from genomics_data_index.storage.MaskedGenomicRegions import MaskedGenomicRegions
from genomics_data_index.storage.io.SampleData import SampleData
from genomics_data_index.storage.io.mutation.VariationFile imp... | 0 | 0 | 0 | 6,626 | 0 | 0 | 0 | 332 | 245 |
b6b15c6bdba88093055e99ba191dca473645816c | 1,121 | py | Python | src/render/voxel_renderer.py | kanairen/VoxelViewer | 57f9c0d0117816e643091334a6bc5b44b7825c41 | [
"MIT"
] | 1 | 2017-12-25T02:49:02.000Z | 2017-12-25T02:49:02.000Z | src/render/voxel_renderer.py | kanairen/VoxelViewer | 57f9c0d0117816e643091334a6bc5b44b7825c41 | [
"MIT"
] | null | null | null | src/render/voxel_renderer.py | kanairen/VoxelViewer | 57f9c0d0117816e643091334a6bc5b44b7825c41 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
"""
voxel_renderer.py
VoxelVoxelRenderer
"""
| 22.42 | 69 | 0.589652 | #!/usr/bin/env python
# coding: utf-8
"""
voxel_renderer.py
Voxel描画用オブジェクトVoxelRendererを包含するモジュール
"""
import warnings
from OpenGL import GL
from abstract_renderer import AbstractRenderer
from src.model.voxel import Voxel
from src.render.object import cube
class VoxelRenderer(AbstractRenderer):
"""
OpenGL... | 183 | 0 | 0 | 794 | 0 | 0 | 0 | 44 | 134 |
c1456ec499ac43bdbff1d279eeef88cbf2de5dc2 | 4,685 | py | Python | compare_versions/compare_versions/tests/test_compare_versions.py | carlos-ferras/code-challenge | 14f8366dc98b49db9aa49a47282d15ff372d16c7 | [
"MIT"
] | 1 | 2019-05-06T21:05:12.000Z | 2019-05-06T21:05:12.000Z | compare_versions/compare_versions/tests/test_compare_versions.py | carlos-ferras/code-challenge | 14f8366dc98b49db9aa49a47282d15ff372d16c7 | [
"MIT"
] | 1 | 2019-05-06T16:52:01.000Z | 2019-05-06T16:52:01.000Z | compare_versions/compare_versions/tests/test_compare_versions.py | carlos-ferras/code-challenge | 14f8366dc98b49db9aa49a47282d15ff372d16c7 | [
"MIT"
] | 4 | 2019-05-06T16:50:24.000Z | 2020-03-09T03:43:17.000Z | import unittest
if __name__ == '__main__':
unittest.main(verbosity=2)
| 38.089431 | 120 | 0.621345 | import unittest
from ..compare_versions import compare_versions
class TestCompareVersions(unittest.TestCase):
def test_versions_same_length_first_bigger_case1(self):
self.assertGreater(
compare_versions('1.2.1', '1.2.0'),
0,
"Should return a positive number if first ve... | 0 | 0 | 0 | 4,536 | 0 | 0 | 0 | 26 | 46 |
38bcdf57fe6bcff687abc1b18f52ea850dcbc201 | 1,647 | py | Python | dataupdate.py | NamanMathur77/Personal-web-scapper | 2423b94c290bf3e781404e098d904c331b9a1dce | [
"MIT"
] | null | null | null | dataupdate.py | NamanMathur77/Personal-web-scapper | 2423b94c290bf3e781404e098d904c331b9a1dce | [
"MIT"
] | null | null | null | dataupdate.py | NamanMathur77/Personal-web-scapper | 2423b94c290bf3e781404e098d904c331b9a1dce | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import bs4
import requests
from firebase import firebase
firebase=firebase.FirebaseApplication('https://sample1-ae95d.firebaseio.com/')
firebase.delete('/image',None)
res=requests.get('https://indianexpress.com/section/sports/')
soup=bs4.BeautifulSoup(res.text,'lxml')
title=soup.select('.title')... | 42.230769 | 129 | 0.574985 | # -*- coding: utf-8 -*-
import bs4
import requests
import re
from firebase import firebase
firebase=firebase.FirebaseApplication('https://sample1-ae95d.firebaseio.com/')
firebase.delete('/image',None)
res=requests.get('https://indianexpress.com/section/sports/')
soup=bs4.BeautifulSoup(res.text,'lxml')
title=soup.select... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -12 | 22 |
f9040e3890858769765c81c66598dc0904559f5a | 363 | py | Python | PythonExercicio/ex080.py | fotavio16/PycharmProjects | f5be49db941de69159ec543e8a6dde61f9f94d86 | [
"MIT"
] | null | null | null | PythonExercicio/ex080.py | fotavio16/PycharmProjects | f5be49db941de69159ec543e8a6dde61f9f94d86 | [
"MIT"
] | null | null | null | PythonExercicio/ex080.py | fotavio16/PycharmProjects | f5be49db941de69159ec543e8a6dde61f9f94d86 | [
"MIT"
] | null | null | null | valores = []
for i in range(5):
print(f'vakores = {valores}.')
num = int(input(f'Digite um valor para a Posio {i}: '))
fim = True
for p, v in enumerate(valores):
if v > num:
valores.insert(p, num)
fim = False
break
if fim:
valores.append(num)
prin... | 24.2 | 61 | 0.5427 | valores = []
for i in range(5):
print(f'vakores = {valores}.')
num = int(input(f'Digite um valor para a Posição {i}: '))
fim = True
for p, v in enumerate(valores):
if v > num:
valores.insert(p, num)
fim = False
break
if fim:
valores.append(num)
pr... | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
43f25517a3b9f01e9b5e8b2a486adf7107d2ce1f | 7,844 | py | Python | retron5.py | euan-forrester/retron5 | e095d4354399b3fa5e460041dc5aa522c9546380 | [
"MIT"
] | 5 | 2019-09-13T19:04:36.000Z | 2021-12-12T07:46:23.000Z | retron5.py | euan-forrester/retron5 | e095d4354399b3fa5e460041dc5aa522c9546380 | [
"MIT"
] | null | null | null | retron5.py | euan-forrester/retron5 | e095d4354399b3fa5e460041dc5aa522c9546380 | [
"MIT"
] | 2 | 2019-09-13T19:04:37.000Z | 2020-10-21T02:17:06.000Z | #!/usr/bin/env python3
import sys
import argparse
import os
import logging
"""
The Retron5 data format is:
typedef struct
{
uint32_t magic;
uint16_t fmtVer;
uint16_t flags;
uint32_t origSize;
uint32_t packed_size;
uint32_t data_offset;
uint32_t crc32;
uint8_t data[0];
} t_retronDataHdr;
"""
... | 42.172043 | 419 | 0.720423 | #!/usr/bin/env python3
import sys
import struct
from typing import NamedTuple
import argparse
import zlib
import os
import logging
"""
The Retron5 data format is:
typedef struct
{
uint32_t magic;
uint16_t fmtVer;
uint16_t flags;
uint32_t origSize;
uint32_t packed_size;
uint32_t data_offset;
uint... | 0 | 5,435 | 0 | 542 | 0 | 0 | 0 | -10 | 112 |
6616d1728eb01fea12675909827c797c783ebb66 | 708 | py | Python | python/day01.py | VenomPaco/advent-of-code-2021 | bc1ace7472685a96ed5270d4bb91665c989d8122 | [
"MIT"
] | null | null | null | python/day01.py | VenomPaco/advent-of-code-2021 | bc1ace7472685a96ed5270d4bb91665c989d8122 | [
"MIT"
] | null | null | null | python/day01.py | VenomPaco/advent-of-code-2021 | bc1ace7472685a96ed5270d4bb91665c989d8122 | [
"MIT"
] | null | null | null |
# Complexity: O(n)
# Complexity: O(n)
f = open('../data/day01.txt', 'r')
depths = list(map(int, f.readlines()))
f.close()
print(count_increases(depths))
print(count_increases_sliding_window(depths))
| 22.125 | 69 | 0.627119 |
# Complexity: O(n)
def count_increases(depths):
increases = 0
for i, j in zip(depths, depths[1:]):
if j > i:
increases += 1
return increases
# Complexity: O(n)
def count_increases_sliding_window(depths):
increases = 0
previous_window = sum(depths[:2])
for i in range(... | 0 | 0 | 0 | 0 | 0 | 460 | 0 | 0 | 44 |
af602a86f4f65df27ac9848d58b968180b63fece | 2,240 | py | Python | jackal/scripts/secretsdump.py | mwgielen/jackal | 7fe62732eb5194b7246215d5277fb37c398097bf | [
"MIT"
] | 10 | 2018-01-17T20:11:30.000Z | 2022-02-20T21:31:37.000Z | jackal/scripts/secretsdump.py | mwgielen/jackal | 7fe62732eb5194b7246215d5277fb37c398097bf | [
"MIT"
] | null | null | null | jackal/scripts/secretsdump.py | mwgielen/jackal | 7fe62732eb5194b7246215d5277fb37c398097bf | [
"MIT"
] | 1 | 2018-06-21T16:47:16.000Z | 2018-06-21T16:47:16.000Z |
if __name__ == '__main__':
import_secretsdump()
| 30.27027 | 108 | 0.60625 | from jackal import Credential, CredentialSearch, UserSearch
from jackal.utils import print_error, print_notification, print_success
import argparse
import re
import os
def parse_file(filename):
cs = CredentialSearch()
us = UserSearch()
print_notification("Processing {}".format(filename))
if not os.path... | 0 | 0 | 0 | 0 | 0 | 1,971 | 0 | 58 | 156 |
829e0e73a8a6de32f13251ec8f7676ecfa2f2b06 | 22,290 | py | Python | inf_narco_app.py | Stanford-STAGES/stanford-stages | 819a32d0edba23917f867436c0dd32347af31515 | [
"CC-BY-4.0"
] | 51 | 2018-08-08T14:39:23.000Z | 2022-03-13T07:57:19.000Z | inf_narco_app.py | Stanford-STAGES/stanford-stages | 819a32d0edba23917f867436c0dd32347af31515 | [
"CC-BY-4.0"
] | 30 | 2019-04-12T10:15:21.000Z | 2022-02-10T13:27:28.000Z | inf_narco_app.py | Stanford-STAGES/stanford-stages | 819a32d0edba23917f867436c0dd32347af31515 | [
"CC-BY-4.0"
] | 23 | 2018-11-08T06:30:44.000Z | 2022-03-22T03:52:42.000Z | # -*- coding: utf-8 -*-
"""
@author: jens
@modifier: informaton
inf_narco_biomarker --> inf_narco_app
"""
import json # for command line interface input and output.
import sys, warnings
import logging
# from asyncore import file_dispatcher
# from typing import Any, Union
# For hypnodensity plotting ...
... | 44.138614 | 177 | 0.64114 | # -*- coding: utf-8 -*-
"""
@author: jens
@modifier: informaton
inf_narco_biomarker --> inf_narco_app
"""
import json # for command line interface input and output.
import os, sys, warnings
from pathlib import Path
import logging
# from asyncore import file_dispatcher
# from typing import Any, Union
import gpflow as... | 12 | 0 | 0 | 5,021 | 0 | 14,931 | 0 | 68 | 459 |
51e13dcfff18b51380a556bde9cc22e7fa26a3a1 | 793 | py | Python | tickets/throttles.py | samul-1/sai_training | 34d459a0e1e0b71bcfe8b37e46d47ab3ea600d9f | [
"MIT"
] | 2 | 2021-11-16T16:48:48.000Z | 2022-02-20T18:40:16.000Z | tickets/throttles.py | samul-1/sai_training | 34d459a0e1e0b71bcfe8b37e46d47ab3ea600d9f | [
"MIT"
] | null | null | null | tickets/throttles.py | samul-1/sai_training | 34d459a0e1e0b71bcfe8b37e46d47ab3ea600d9f | [
"MIT"
] | 1 | 2021-11-17T09:44:19.000Z | 2021-11-17T09:44:19.000Z |
# def parse_rate(self, rate):
# """
# returns a tuple: <allowed number of requests>, <period of time in seconds>
# which is fixed to allow 1 request every 30 seconds
# """
# return (1, 60 * 60) # one request per hour
| 30.5 | 85 | 0.625473 | from rest_framework.throttling import AnonRateThrottle, UserRateThrottle
class AnonTicketSubmissionThrottle(AnonRateThrottle):
scope = "burst"
rate = "1/hour"
# def parse_rate(self, rate):
# """
# returns a tuple: <allowed number of requests>, <period of time in seconds>
# which i... | 0 | 0 | 0 | 407 | 0 | 0 | 0 | 51 | 68 |
dd3f9e1164fb4d951d21a7e61d8b015b23e76003 | 166 | py | Python | dephell_markers/_marker/__init__.py | dephell/dephell_markers | ae52bd16009549975ddaed5f2c174b4e3c32c029 | [
"MIT"
] | 2 | 2019-06-10T19:42:07.000Z | 2019-09-04T05:13:42.000Z | dephell_markers/_marker/__init__.py | dephell/dephell_markers | ae52bd16009549975ddaed5f2c174b4e3c32c029 | [
"MIT"
] | 5 | 2019-10-08T12:12:52.000Z | 2020-12-17T11:34:54.000Z | dephell_markers/_marker/__init__.py | dephell/dephell_markers | ae52bd16009549975ddaed5f2c174b4e3c32c029 | [
"MIT"
] | 3 | 2019-06-10T19:42:20.000Z | 2019-10-08T12:54:12.000Z | # app
from ._base import BaseMarker
from ._string import StringMarker
from ._version import VersionMarker
__all__ = ['BaseMarker', 'StringMarker', 'VersionMarker']
| 20.75 | 57 | 0.783133 | # app
from ._base import BaseMarker
from ._string import StringMarker
from ._version import VersionMarker
__all__ = ['BaseMarker', 'StringMarker', 'VersionMarker']
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
56b243e6257673b9f73bc533c3cebb24a0a2f1c1 | 7,547 | py | Python | client/campaign_message_configuration.py | True-Demon/king-phisher-plugins | bafdba6f069b85d7b45d531fdc100d50fbb9628e | [
"BSD-3-Clause"
] | null | null | null | client/campaign_message_configuration.py | True-Demon/king-phisher-plugins | bafdba6f069b85d7b45d531fdc100d50fbb9628e | [
"BSD-3-Clause"
] | null | null | null | client/campaign_message_configuration.py | True-Demon/king-phisher-plugins | bafdba6f069b85d7b45d531fdc100d50fbb9628e | [
"BSD-3-Clause"
] | null | null | null |
import king_phisher.find as find
import king_phisher.serializers as serializers
import king_phisher.client.plugins as plugins
import king_phisher.client.gui_utilities as gui_utilities
def is_managed_key(key):
"""
Return True for configuration keys which should be managed by this
plugin. This is to let keys for oth... | 33.843049 | 101 | 0.751954 | import datetime
import os
import king_phisher.find as find
import king_phisher.serializers as serializers
import king_phisher.client.plugins as plugins
import king_phisher.client.gui_utilities as gui_utilities
def is_managed_key(key):
"""
Return True for configuration keys which should be managed by this
plugin. T... | 0 | 167 | 0 | 6,644 | 0 | 0 | 0 | -18 | 67 |
dabd9d0a04b627fe7b7302d7ea5b16ad704cbda3 | 3,080 | py | Python | paraview-proxy.py | oetiker/httpaio-reverse-proxy | 0e5654d4a2eb0fede2e7e0866d7f9eaf355384ff | [
"MIT"
] | 3 | 2020-03-28T14:46:57.000Z | 2021-02-08T23:07:11.000Z | paraview-proxy.py | oetiker/httpaio-reverse-proxy | 0e5654d4a2eb0fede2e7e0866d7f9eaf355384ff | [
"MIT"
] | null | null | null | paraview-proxy.py | oetiker/httpaio-reverse-proxy | 0e5654d4a2eb0fede2e7e0866d7f9eaf355384ff | [
"MIT"
] | 3 | 2020-03-29T00:03:46.000Z | 2020-05-14T08:28:32.000Z | #!/usr/bin/env python3.6
# this is code is not thought to be used directly, but rather as a basis for understanding how
# to implement a webproxy with websocket support in python
from aiohttp import web
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
baseUrl = 'http://0.0... | 35 | 129 | 0.625974 | #!/usr/bin/env python3.6
# this is code is not thought to be used directly, but rather as a basis for understanding how
# to implement a webproxy with websocket support in python
from aiohttp import web
from aiohttp import client
import aiohttp
import asyncio
import logging
import pprint
import re
import string
loggi... | 0 | 0 | 2,489 | 0 | 0 | 0 | 0 | -37 | 155 |
63afbffa3812d8d58c870925f7641104cb7c03d0 | 755 | py | Python | modules/notification/telegram_x.py | webclinic017/xtraderbacktest | a184b3f4382c29b3abde955db0cd91ac27cad664 | [
"Apache-2.0"
] | 10 | 2021-08-12T04:12:39.000Z | 2022-02-14T10:31:27.000Z | modules/notification/telegram_x.py | webclinic017/xtraderbacktest | a184b3f4382c29b3abde955db0cd91ac27cad664 | [
"Apache-2.0"
] | null | null | null | modules/notification/telegram_x.py | webclinic017/xtraderbacktest | a184b3f4382c29b3abde955db0cd91ac27cad664 | [
"Apache-2.0"
] | 2 | 2021-10-02T23:58:41.000Z | 2021-10-04T03:08:53.000Z | import os
import sys
sys.path.append(os.path.join(os.getcwd().split('xtraderbacktest')[0],'xtraderbacktest'))
import modules.other.sys_conf_loader as sys_conf_loader
telegram_conf = sys_conf_loader.get_sys_conf()["notification"]["telegram"]
chat_id = telegram_conf["chat_id"]
token = telegram_conf["token"]
bot = None
... | 26.034483 | 88 | 0.683444 | import os
import sys
sys.path.append(os.path.join(os.getcwd().split('xtraderbacktest')[0],'xtraderbacktest'))
import modules.other.sys_conf_loader as sys_conf_loader
import telegram
import json
telegram_conf = sys_conf_loader.get_sys_conf()["notification"]["telegram"]
chat_id = telegram_conf["chat_id"]
token = teleg... | 0 | 0 | 0 | 0 | 0 | 300 | 0 | -16 | 68 |
f8d68780e95f7db4e9198dc4ee0a159994810643 | 7,257 | py | Python | src/steps/preprocessing/text.py | marrrcin/open-solution-mapping-challenge | 7375b189c4cdfed6e5400b8cb088d0259e9a6cc8 | [
"MIT"
] | null | null | null | src/steps/preprocessing/text.py | marrrcin/open-solution-mapping-challenge | 7375b189c4cdfed6e5400b8cb088d0259e9a6cc8 | [
"MIT"
] | null | null | null | src/steps/preprocessing/text.py | marrrcin/open-solution-mapping-challenge | 7375b189c4cdfed6e5400b8cb088d0259e9a6cc8 | [
"MIT"
] | null | null | null | import json
import nltk
from nltk.corpus import stopwords
from nltk.stem.wordnet import WordNetLemmatizer
from nltk.tokenize import TweetTokenizer
lem = WordNetLemmatizer()
tokenizer = TweetTokenizer()
nltk.download('wordnet')
nltk.download('stopwords')
eng_stopwords = set(stopwords.words("english"))
with open('steps... | 29.864198 | 105 | 0.596665 | import json
import re
import string
import nltk
import numpy as np
import pandas as pd
from nltk.corpus import stopwords
from nltk.stem.wordnet import WordNetLemmatizer
from nltk.tokenize import TweetTokenizer
import joblib
from ..base import BaseTransformer
lem = WordNetLemmatizer()
tokenizer = TweetTokenizer()
nlt... | 0 | 0 | 0 | 6,158 | 0 | 313 | 0 | -20 | 409 |
f4f1c9b976811ce72ab446f5162bdb2f479d5456 | 4,247 | py | Python | examples/hsctf_8_regulus_calendula/server.py | y011d4/factor-from-random-known-bits | ee9ade6f5a21618e701ffacba320670abd069434 | [
"Apache-2.0",
"MIT"
] | 1 | 2022-02-27T00:45:00.000Z | 2022-02-27T00:45:00.000Z | examples/hsctf_8_regulus_calendula/server.py | y011d4/factor-from-random-known-bits | ee9ade6f5a21618e701ffacba320670abd069434 | [
"Apache-2.0",
"MIT"
] | null | null | null | examples/hsctf_8_regulus_calendula/server.py | y011d4/factor-from-random-known-bits | ee9ade6f5a21618e701ffacba320670abd069434 | [
"Apache-2.0",
"MIT"
] | null | null | null | import random
import sympy
flag = open("flag.txt", "rb").read()
print("Loading... this may take a while.")
# p, q = getPrime(4096), getPrime(4096)
p = 102642548981141015493956433085512691029405462432759406839359933030415996409379664151375192231481255402006457489149067391259607262016871499540364383506189618879075622338... | 60.671429 | 1,238 | 0.783847 | from collections import Counter
from Crypto.Util.number import *
import sys
import random
import sympy
flag = open("flag.txt", "rb").read()
print("Loading... this may take a while.")
# p, q = getPrime(4096), getPrime(4096)
p = 10264254898114101549395643308551269102940546243275940683935993303041599640937966415137519223... | 0 | 0 | 0 | 0 | 0 | 1,387 | 0 | 10 | 89 |
8cc54414530a81f24469d61f392e9e712c1e3561 | 7,182 | py | Python | apps/bing.py | zhiiker/donbot | 2d8e125ade0d535444ab8b6cd010a2e06ad1f13a | [
"MIT"
] | 43 | 2018-10-14T17:43:23.000Z | 2020-07-23T07:05:18.000Z | apps/bing.py | zhiiker/donbot | 2d8e125ade0d535444ab8b6cd010a2e06ad1f13a | [
"MIT"
] | null | null | null | apps/bing.py | zhiiker/donbot | 2d8e125ade0d535444ab8b6cd010a2e06ad1f13a | [
"MIT"
] | 34 | 2018-10-14T17:47:10.000Z | 2021-12-09T03:49:51.000Z | from pathlib import Path
from settings import MESS_DIR
BING_KEYWORD_DIR = Path(MESS_DIR, 'bingkeywords')
if not BING_KEYWORD_DIR.exists():
BING_KEYWORD_DIR.mkdir()
| 36.272727 | 110 | 0.478836 | import json
import random
import time
from pathlib import Path
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from apps.seletask import SeleTask
from se... | 0 | 0 | 0 | 6,679 | 0 | 0 | 0 | 132 | 201 |
271aafb542280917b75b7610c32adb250398ec8a | 15,342 | py | Python | random_walk.py | hongwilliam/Random-Walk-Down-Wall-Street | 986c773308eb238f41243554631e135232c8fa5a | [
"MIT"
] | 2 | 2020-08-17T03:31:09.000Z | 2020-08-27T01:26:53.000Z | random_walk.py | AaronBinChen/Random-Walk-Down-Wall-Street | 986c773308eb238f41243554631e135232c8fa5a | [
"MIT"
] | null | null | null | random_walk.py | AaronBinChen/Random-Walk-Down-Wall-Street | 986c773308eb238f41243554631e135232c8fa5a | [
"MIT"
] | 2 | 2020-08-17T03:31:19.000Z | 2020-08-28T19:28:08.000Z | #Members: William Hong, Daniel Han, Aaron Chen, Farhan Azad
# Libraries that are required for function performance
import cgitb
cgitb.enable()
import numpy as np
import pandas as pd
import pandas_datareader as pdr
import matplotlib.pyplot as plt
from datetime import datetime
import sys
# Functions Created in Other Fi... | 55.789091 | 285 | 0.670512 | #Members: William Hong, Daniel Han, Aaron Chen, Farhan Azad
# Libraries that are required for function performance
import cgitb
cgitb.enable()
import numpy as np
import pandas as pd
import scipy.stats
import pandas_datareader as pdr
import matplotlib.pyplot as plt
from datetime import datetime, timedelta
import sys
fr... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 110 |
7596f3906d823a0e87227ed5f7433cd6aa07eff1 | 176 | py | Python | reset-downtime.py | axsauze/bigdatadarwin | 76320a1ba1b0e6efd50ca150699b34175c474856 | [
"Apache-2.0"
] | 1 | 2015-09-21T16:15:11.000Z | 2015-09-21T16:15:11.000Z | reset-downtime.py | axsauze/bigdatadarwin | 76320a1ba1b0e6efd50ca150699b34175c474856 | [
"Apache-2.0"
] | 15 | 2015-09-19T20:19:18.000Z | 2015-10-10T05:36:23.000Z | reset-downtime.py | HackPartners/bigdatadarwin | 76320a1ba1b0e6efd50ca150699b34175c474856 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import pickle
import datetime
if __name__ == "__main__":
with open("downtime.pickle", "wb") as f:
pickle.dump(datetime.datetime.now(), f)
| 17.6 | 47 | 0.664773 | #!/usr/bin/env python3
import pickle
import datetime
if __name__ == "__main__":
with open("downtime.pickle", "wb") as f:
pickle.dump(datetime.datetime.now(), f)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e68268e0749245e48819eb939b7495830a1d4907 | 2,727 | py | Python | test/operator_payloads.py | DS-POC/operator-service | f99d10f36c694f3ebdc0c10a9b3021bc4bd5a238 | [
"Apache-2.0"
] | 3 | 2021-10-04T09:23:39.000Z | 2022-02-26T21:20:21.000Z | test/operator_payloads.py | DS-POC/operator-service | f99d10f36c694f3ebdc0c10a9b3021bc4bd5a238 | [
"Apache-2.0"
] | null | null | null | test/operator_payloads.py | DS-POC/operator-service | f99d10f36c694f3ebdc0c10a9b3021bc4bd5a238 | [
"Apache-2.0"
] | null | null | null | from copy import deepcopy
VALID_COMPUTE_BODY = {
'agreementId': '0x0',
'owner': '0xC41808BBef371AD5CFc76466dDF9dEe228d2BdAA',
'providerSignature': 'sig',
'workflow': {
'stages': [
{
'algorithm': {
'container': {
'entrypoint... | 40.102941 | 117 | 0.50165 | from copy import deepcopy
VALID_COMPUTE_BODY = {
'agreementId': '0x0',
'owner': '0xC41808BBef371AD5CFc76466dDF9dEe228d2BdAA',
'providerSignature': 'sig',
'workflow': {
'stages': [
{
'algorithm': {
'container': {
'entrypoint... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
86bc269549ae8a7a11f6f79b5f23962502f7e133 | 5,853 | py | Python | schematizer/views/sources.py | Yelp/schematizer | 035845d27945a05db475f00eb76f59e8825dbaa4 | [
"Apache-2.0"
] | 86 | 2016-11-17T17:39:13.000Z | 2021-06-01T15:19:05.000Z | schematizer/views/sources.py | tomzhang/schematizer | 035845d27945a05db475f00eb76f59e8825dbaa4 | [
"Apache-2.0"
] | 2 | 2016-12-01T20:57:43.000Z | 2021-09-28T09:26:25.000Z | schematizer/views/sources.py | tomzhang/schematizer | 035845d27945a05db475f00eb76f59e8825dbaa4 | [
"Apache-2.0"
] | 26 | 2016-11-29T22:38:11.000Z | 2021-03-02T19:44:17.000Z | # -*- coding: utf-8 -*-
# Copyright 2016 Yelp 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 ag... | 33.83237 | 77 | 0.762173 | # -*- coding: utf-8 -*-
# Copyright 2016 Yelp 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 ag... | 0 | 4,551 | 0 | 0 | 0 | 0 | 0 | 233 | 384 |
af89649a434c900c5e523164f85cc4723e33accc | 386 | py | Python | calculator/test_calculator.py | Dikaeinstein/calculator_ci_cd | e256b8faa4deb904efc63f9c969242b53fd93f1e | [
"MIT"
] | null | null | null | calculator/test_calculator.py | Dikaeinstein/calculator_ci_cd | e256b8faa4deb904efc63f9c969242b53fd93f1e | [
"MIT"
] | null | null | null | calculator/test_calculator.py | Dikaeinstein/calculator_ci_cd | e256b8faa4deb904efc63f9c969242b53fd93f1e | [
"MIT"
] | null | null | null | """
Unit tests for the calculator library
"""
| 19.3 | 45 | 0.645078 | """
Unit tests for the calculator library
"""
import calculator
class TestCalculator:
def test_addition(self):
assert 5 == calculator.add(2, 3)
def test_subtraction(self):
assert 2 == calculator.subtract(5, 3)
def test_multiply(self):
assert 4 == calculator.multiply(2, 2)
d... | 0 | 0 | 0 | 297 | 0 | 0 | 0 | -4 | 46 |
01b5ad7941200d5f949287f89c15f8665ca42c08 | 4,865 | py | Python | Test/SteadyState/test_steadystate.py | vigsterkr/netket | 1e187ae2b9d2aa3f2e53b09fe743e50763d04c9a | [
"Apache-2.0"
] | null | null | null | Test/SteadyState/test_steadystate.py | vigsterkr/netket | 1e187ae2b9d2aa3f2e53b09fe743e50763d04c9a | [
"Apache-2.0"
] | null | null | null | Test/SteadyState/test_steadystate.py | vigsterkr/netket | 1e187ae2b9d2aa3f2e53b09fe743e50763d04c9a | [
"Apache-2.0"
] | null | null | null |
SEED = 3141592
L = 4
sx = [[0, 1], [1, 0]]
sy = [[0, -1j], [1j, 0]]
sz = [[1, 0], [0, -1]]
sigmam = [[0, 0], [1, 0]]
| 27.642045 | 92 | 0.595272 | import json
from pytest import approx
import netket as nk
import numpy as np
import shutil
import tempfile
SEED = 3141592
L = 4
sx = [[0, 1], [1, 0]]
sy = [[0, -1j], [1j, 0]]
sz = [[1, 0], [0, -1]]
sigmam = [[0, 0], [1, 0]]
def _setup_ss(**kwargs):
nk.utils.seed(SEED)
g = nk.graph.Hypercube(length=L, n_di... | 2 | 0 | 0 | 0 | 0 | 4,469 | 0 | -25 | 293 |
c60d0e950801f7bcf9822d44a413be41f36ceb01 | 19,725 | py | Python | manage.py | open-contracting/infrastructure | 95a796311091b4a20110123f778103e78ad0beb0 | [
"Apache-2.0"
] | 5 | 2018-11-07T14:12:16.000Z | 2021-03-15T18:16:29.000Z | manage.py | open-contracting/infrastructure | 95a796311091b4a20110123f778103e78ad0beb0 | [
"Apache-2.0"
] | 263 | 2018-09-20T15:18:54.000Z | 2022-03-17T21:04:30.000Z | manage.py | open-contracting/infrastructure | 95a796311091b4a20110123f778103e78ad0beb0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import csv
import json
import re
import sys
import warnings
from collections import OrderedDict
from copy import deepcopy
from io import StringIO
from pathlib import Path
import click
import requests
from ocdsextensionregistry import ProfileBuilder
from ocdskit.schema import add_validation_proper... | 41.790254 | 833 | 0.631939 | #!/usr/bin/env python
import csv
import json
import re
import sys
import warnings
from collections import OrderedDict
from copy import deepcopy
from io import StringIO
from pathlib import Path
import click
import requests
from ocdsextensionregistry import ProfileBuilder
from ocdskit.schema import add_validation_proper... | 0 | 14,127 | 0 | 0 | 0 | 2,071 | 0 | 0 | 211 |
ede4fb6441819f4099c2ba4f82fe553971b5c8d6 | 3,928 | py | Python | utils/get_data.py | rzarcone/CAEs | f8ceb20705307f3376bf0b65f818a7a912eb66b1 | [
"BSD-2-Clause"
] | 4 | 2018-11-08T00:09:13.000Z | 2019-03-04T07:12:27.000Z | utils/get_data.py | rzarcone/CAEs | f8ceb20705307f3376bf0b65f818a7a912eb66b1 | [
"BSD-2-Clause"
] | null | null | null | utils/get_data.py | rzarcone/CAEs | f8ceb20705307f3376bf0b65f818a7a912eb66b1 | [
"BSD-2-Clause"
] | 2 | 2017-09-21T19:38:44.000Z | 2018-03-22T13:24:09.000Z | """Write functions to import memristor data."""
import numpy as np
import pandas as pd
from Jesse_Funcs import blahut
def get_raw_data(path):
"""
Load raw data from a path.
Parameters
----------
path : str
Absolute path to the data.
Returns
-------
Vs : np.array, shape (len(d... | 25.179487 | 84 | 0.61278 | """Write functions to import memristor data."""
import numpy as np
import pandas as pd
from Jesse_Funcs import blahut
def get_raw_data(path):
"""
Load raw data from a path.
Parameters
----------
path : str
Absolute path to the data.
Returns
-------
Vs : np.array, shape (len(d... | 0 | 0 | 0 | 0 | 0 | 188 | 0 | 0 | 46 |
a95f2e33f40195939328eb42da1b753853f8fd14 | 790 | py | Python | meditor/scilib/scilexerdefault.py | liuyug/meditor | 7e55c6c861117f4bb73bbd066641ad08fb2775e3 | [
"MIT"
] | 14 | 2017-10-19T08:17:16.000Z | 2021-08-07T06:40:24.000Z | meditor/scilib/scilexerdefault.py | liuyug/meditor | 7e55c6c861117f4bb73bbd066641ad08fb2775e3 | [
"MIT"
] | 1 | 2017-11-02T17:42:59.000Z | 2017-12-13T06:57:28.000Z | meditor/scilib/scilexerdefault.py | liuyug/meditor | 7e55c6c861117f4bb73bbd066641ad08fb2775e3 | [
"MIT"
] | 1 | 2019-02-16T01:53:22.000Z | 2019-02-16T01:53:22.000Z | import logging
logger = logging.getLogger(__name__)
| 23.235294 | 60 | 0.61519 | import logging
from PyQt5 import Qsci
from PyQt5.QtGui import QColor, QFont
logger = logging.getLogger(__name__)
class QsciLexerDefault(Qsci.QsciLexerCustom):
styles = {
"Default": 0,
}
def __init__(self, parent=None):
super(QsciLexerDefault, self).__init__(parent)
self.setDefau... | 0 | 0 | 0 | 651 | 0 | 0 | 0 | 17 | 68 |
f5c36adb0c5b6c2a5795888bda898ff7de5ebfb7 | 13,192 | py | Python | resultbox/variable.py | pythoro/resultbox | 1d30a1ef08cfaff3c11f5c7b67bfb6a2e9f62c0a | [
"MIT"
] | null | null | null | resultbox/variable.py | pythoro/resultbox | 1d30a1ef08cfaff3c11f5c7b67bfb6a2e9f62c0a | [
"MIT"
] | null | null | null | resultbox/variable.py | pythoro/resultbox | 1d30a1ef08cfaff3c11f5c7b67bfb6a2e9f62c0a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Sep 1 14:27:27 2019
@author: Reuben
Variables help resultbox know how to interpret and display data. Sometimes,
variables have different components, like x, y, and z coordinates. They
often have units, such as meters.
The idea is that we define a variable just once. Whene... | 34 | 79 | 0.553138 | # -*- coding: utf-8 -*-
"""
Created on Sun Sep 1 14:27:27 2019
@author: Reuben
Variables help resultbox know how to interpret and display data. Sometimes,
variables have different components, like x, y, and z coordinates. They
often have units, such as meters.
The idea is that we define a variable just once. Whene... | 0 | 878 | 0 | 10,026 | 0 | 0 | 0 | 10 | 144 |
e5bcbbc81f6274825f969748674191c670c5a917 | 7,704 | pyw | Python | Folder Locker & Hider/application.pyw | elishahyousaf/Awesome-Python-Scripts | d516584517de2d94de60852f73d8f1831524fa19 | [
"MIT"
] | 1,026 | 2018-10-02T18:51:12.000Z | 2022-03-31T13:45:14.000Z | Folder Locker & Hider/application.pyw | elishahyousaf/Awesome-Python-Scripts | d516584517de2d94de60852f73d8f1831524fa19 | [
"MIT"
] | 164 | 2018-10-02T18:37:40.000Z | 2021-11-18T13:29:54.000Z | Folder Locker & Hider/application.pyw | elishahyousaf/Awesome-Python-Scripts | d516584517de2d94de60852f73d8f1831524fa19 | [
"MIT"
] | 521 | 2018-10-02T18:15:40.000Z | 2022-03-26T12:10:15.000Z |
import os
import tkinter as tk
from tkinter import PhotoImage
cwd = os.getcwd()
if not os.path.exists('files/'):
os.mkdir('files')
if __name__ == '__main__':
root = tk.Tk()
root.geometry('400x305')
root.title('Folder Locker/Unlocker')
root.resizable(0,0)
lock_icon = PhotoImage(file='icons/lock.png').subsample... | 34.547085 | 93 | 0.705867 | import locker
import os
import tkinter as tk
from tkinter import PhotoImage
from tkinter import messagebox
from tkinter import filedialog
cwd = os.getcwd()
if not os.path.exists('files/'):
os.mkdir('files')
class Application(tk.Frame):
def __init__(self, master):
super().__init__(master=master)
self.master = m... | 0 | 0 | 0 | 7,053 | 0 | 0 | 0 | 10 | 89 |
5a637a8b480113c5d1b02832a4a19e2117ebed19 | 657 | py | Python | dpp/docker/github_config.py | YishTish/avid-covider-pipelines | 2e04952b4491d69614280d6fc2ecf4ccf439f4ff | [
"MIT"
] | 109 | 2016-09-01T08:41:55.000Z | 2021-11-10T10:08:35.000Z | dpp/docker/github_config.py | YishTish/avid-covider-pipelines | 2e04952b4491d69614280d6fc2ecf4ccf439f4ff | [
"MIT"
] | 144 | 2016-08-30T16:26:50.000Z | 2021-04-18T09:06:12.000Z | dpp/docker/github_config.py | YishTish/avid-covider-pipelines | 2e04952b4491d69614280d6fc2ecf4ccf439f4ff | [
"MIT"
] | 34 | 2016-09-05T12:46:53.000Z | 2022-03-05T01:53:49.000Z | import yaml
import os
if __name__ == "__main__":
repos = os.environ.get('DPP_GITHUB_REPOSITORIES')
if repos is not None:
repos = repos.split(';')
config = {}
for repo in repos:
repo = repo.split(':')
if len(repo) > 1:
repo, path = repo
... | 27.375 | 65 | 0.473364 | import yaml
import os
if __name__ == "__main__":
repos = os.environ.get('DPP_GITHUB_REPOSITORIES')
if repos is not None:
repos = repos.split(';')
config = {}
for repo in repos:
repo = repo.split(':')
if len(repo) > 1:
repo, path = repo
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e01ef1fc1701cedc9cbb460282d7fdf3fa0eb901 | 692 | gyp | Python | gyp/ktx.gyp | AsdMonio/rr-external_skia | 3839e72932bcef2f26a4f8826bb92b195f6cc396 | [
"Apache-2.0"
] | 27 | 2016-04-27T01:02:03.000Z | 2021-12-13T08:53:19.000Z | gyp/ktx.gyp | AsdMonio/rr-external_skia | 3839e72932bcef2f26a4f8826bb92b195f6cc396 | [
"Apache-2.0"
] | 2 | 2017-03-09T09:00:50.000Z | 2017-09-21T15:48:20.000Z | gyp/ktx.gyp | AsdMonio/rr-external_skia | 3839e72932bcef2f26a4f8826bb92b195f6cc396 | [
"Apache-2.0"
] | 20 | 2017-01-09T01:07:17.000Z | 2020-08-19T06:46:45.000Z | # Copyright 2015 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'skia_warnings_as_errors': 0,
},
'targets': [
{
'target_name': 'libSkKTX',
'type': 'static_library',
'include_dirs' : [
'../third_party/ktx'... | 19.771429 | 72 | 0.517341 | # Copyright 2015 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'skia_warnings_as_errors': 0,
},
'targets': [
{
'target_name': 'libSkKTX',
'type': 'static_library',
'include_dirs' : [
'../third_party/ktx'... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a97a537ff9e716c75df452132c84f5beba371fa5 | 330 | py | Python | UserPreferencePredictor/TrainDataMaker/DataWriter/data_writer.py | YuMurata/UserPreferencePredictor | bb7c725147b65a9a0c0a40b2f3cafc105db5bc89 | [
"MIT"
] | null | null | null | UserPreferencePredictor/TrainDataMaker/DataWriter/data_writer.py | YuMurata/UserPreferencePredictor | bb7c725147b65a9a0c0a40b2f3cafc105db5bc89 | [
"MIT"
] | null | null | null | UserPreferencePredictor/TrainDataMaker/DataWriter/data_writer.py | YuMurata/UserPreferencePredictor | bb7c725147b65a9a0c0a40b2f3cafc105db5bc89 | [
"MIT"
] | null | null | null | from UserPreferencePredictor.TrainDataMaker import Player
import typing
PlayerList = typing.List[Player]
| 20.625 | 57 | 0.790909 | from abc import ABCMeta, abstractclassmethod
from UserPreferencePredictor.TrainDataMaker import Player
import typing
PlayerList = typing.List[Player]
class DataWriterException(Exception):
pass
class DataWriter(metaclass=ABCMeta):
@abstractclassmethod
def write(self, scored_player_list: PlayerList):
... | 0 | 65 | 0 | 40 | 0 | 0 | 0 | 23 | 94 |
08e324a60f5c8d3b7fc9c6a0e97e96330d04f164 | 1,786 | py | Python | Algoritmi Grafuri/dag_shortest_path.py | ParaschivAlex/FMI-Thangs | 26d8a13b08344744ee6ab56f088dd4adb665980e | [
"MIT"
] | null | null | null | Algoritmi Grafuri/dag_shortest_path.py | ParaschivAlex/FMI-Thangs | 26d8a13b08344744ee6ab56f088dd4adb665980e | [
"MIT"
] | null | null | null | Algoritmi Grafuri/dag_shortest_path.py | ParaschivAlex/FMI-Thangs | 26d8a13b08344744ee6ab56f088dd4adb665980e | [
"MIT"
] | null | null | null | # Sortarea topologica returneaza o ordonare a nodurilor in asa fel incat niciun nod din lista nu are muchie catre
# un nod care e inaintea lui in lista. Sortarea Topologica merge doar pe grafuri aciclice orientate (DAG - directed acyclic graph)
# Pentru fiecare nod i care are muchie care alt nod j, gasim i inainte ... | 27.476923 | 131 | 0.557671 | # Sortarea topologica returneaza o ordonare a nodurilor in asa fel incat niciun nod din lista nu are muchie catre
# un nod care e inaintea lui in lista. Sortarea Topologica merge doar pe grafuri aciclice orientate (DAG - directed acyclic graph)
# Pentru fiecare nod i care are muchie care alt nod j, gasim i inainte ... | 0 | 0 | 0 | 0 | 0 | 963 | 0 | 0 | 75 |
a1ad55aa2a8bd4a3eda6c90cc91aff6207987c2d | 4,055 | py | Python | tests/integration_tests/dashboards/filter_sets/get_api_tests.py | delorenzosoftware/superset | 5403f1ec163a52623f34f459d89f20e4e190371d | [
"Apache-2.0"
] | 18,621 | 2017-06-19T09:57:44.000Z | 2021-01-05T06:28:21.000Z | tests/integration_tests/dashboards/filter_sets/get_api_tests.py | delorenzosoftware/superset | 5403f1ec163a52623f34f459d89f20e4e190371d | [
"Apache-2.0"
] | 9,043 | 2017-07-05T16:10:48.000Z | 2021-01-05T17:58:01.000Z | tests/integration_tests/dashboards/filter_sets/get_api_tests.py | delorenzosoftware/superset | 5403f1ec163a52623f34f459d89f20e4e190371d | [
"Apache-2.0"
] | 5,527 | 2017-07-06T01:39:43.000Z | 2021-01-05T06:01:11.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 30.954198 | 77 | 0.680641 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 0 | 0 | 0 | 2,721 | 0 | 0 | 0 | 317 | 143 |
cbeafe95d3ed74946c8a703d9eab1e5c23566127 | 823 | py | Python | advanced_python/1_type_hints/example3.py | antoniomdk/seminars_and_talks | afff402cf3c7fb6ff27b422242327099cd41a756 | [
"MIT"
] | 1 | 2021-08-02T08:46:25.000Z | 2021-08-02T08:46:25.000Z | advanced_python/1_type_hints/example3.py | antoniomdk/seminars_and_talks | afff402cf3c7fb6ff27b422242327099cd41a756 | [
"MIT"
] | 1 | 2021-09-02T10:07:49.000Z | 2021-09-02T10:07:49.000Z | advanced_python/1_type_hints/example3.py | antoniomdk/seminars_and_talks | afff402cf3c7fb6ff27b422242327099cd41a756 | [
"MIT"
] | null | null | null |
# =========== Aliases and TypeVar ==========
T = TypeVar('T', int, float)
Matrix = List[List[T]]
# =========== Structural Typing ==========
generic([['0']])
generic([[0]])
generic(((0,),))
| 19.139535 | 91 | 0.618469 | from typing import *
from functools import reduce
# =========== Aliases and TypeVar ==========
T = TypeVar('T', int, float)
Matrix = List[List[T]]
def my_function(m: Matrix[int]) -> int:
return reduce(lambda acc, x: acc + sum(x), m, initial=0)
def my_function_failed(m: int) -> int:
return reduce(lambda ... | 0 | 0 | 0 | 3 | 0 | 430 | 0 | 6 | 182 |
4e65cd5605835bf361e9e032ed6eb3109bc6bbab | 74 | py | Python | Codes/Day-001/03.Input/main.py | MdGhulamAzadAnsari/100-Days-of-Code | 8ff993b2e3f7aecefde28cb443355e5fb4d6fbc6 | [
"MIT"
] | 3 | 2021-01-15T15:49:20.000Z | 2021-03-17T03:17:41.000Z | Codes/Day-001/03.Input/main.py | MdGhulamAzadAnsari/100-Days-of-Code | 8ff993b2e3f7aecefde28cb443355e5fb4d6fbc6 | [
"MIT"
] | 2 | 2021-06-10T18:28:21.000Z | 2021-09-28T08:26:47.000Z | codes/Day-001/03.Input/main.py | GhulamAzad/100-Days-of-Code | 9533d80a6bc6ce70123126615f0671f979573a67 | [
"MIT"
] | null | null | null | #Write your code below this line
print(len(input("What is your Name?"))) | 37 | 39 | 0.716216 | #Write your code below this line 👇
print(len(input("What is your Name?"))) | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
570e392a0f6ba027a26e61f31950808e20fa3234 | 2,558 | py | Python | pysmapi/interfaces/Metadata_Get.py | lllucius/pysmapi | c0d802edb58e835e4d48cb9c28ccfccfe5b5c686 | [
"Apache-2.0"
] | null | null | null | pysmapi/interfaces/Metadata_Get.py | lllucius/pysmapi | c0d802edb58e835e4d48cb9c28ccfccfe5b5c686 | [
"Apache-2.0"
] | null | null | null | pysmapi/interfaces/Metadata_Get.py | lllucius/pysmapi | c0d802edb58e835e4d48cb9c28ccfccfe5b5c686 | [
"Apache-2.0"
] | null | null | null |
# Copyright 2018-2019 Leland Lucius
#
# 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 wr... | 29.402299 | 74 | 0.625098 |
# Copyright 2018-2019 Leland Lucius
#
# 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 wr... | 0 | 308 | 0 | 1,600 | 0 | 0 | 0 | -2 | 69 |
de7c7fd8f035fa0d73546bd24603198705ca3ec3 | 1,791 | py | Python | cryptography.py | emmadunbar/Cryptography | 4b1c1910eabbcd63cace44ceae13ce4589134c47 | [
"MIT"
] | null | null | null | cryptography.py | emmadunbar/Cryptography | 4b1c1910eabbcd63cace44ceae13ce4589134c47 | [
"MIT"
] | null | null | null | cryptography.py | emmadunbar/Cryptography | 4b1c1910eabbcd63cace44ceae13ce4589134c47 | [
"MIT"
] | null | null | null | """
cryptography.py
Author: Emma Dunbar
Credit: Geoff Dunbar, Learn Python
Assignment:
Write and submit a program that encrypts and decrypts user data.
See the detailed requirements at https://github.com/HHS-IntroProgramming/Cryptography/blob/master/README.md
"""
associations = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJK... | 26.731343 | 107 | 0.489671 | """
cryptography.py
Author: Emma Dunbar
Credit: Geoff Dunbar, Learn Python
Assignment:
Write and submit a program that encrypts and decrypts user data.
See the detailed requirements at https://github.com/HHS-IntroProgramming/Cryptography/blob/master/README.md
"""
associations = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJK... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7be0d362ed6876007bc572d663b95d8a0db72e9d | 1,267 | py | Python | priority_heap.py | vaspatrik/data-warehouses-and-data-mining-technologies | 2b7159d27fd8a054497a81a0718998755ad9203b | [
"MIT"
] | null | null | null | priority_heap.py | vaspatrik/data-warehouses-and-data-mining-technologies | 2b7159d27fd8a054497a81a0718998755ad9203b | [
"MIT"
] | null | null | null | priority_heap.py | vaspatrik/data-warehouses-and-data-mining-technologies | 2b7159d27fd8a054497a81a0718998755ad9203b | [
"MIT"
] | null | null | null |
REMOVED = '<removed-element>' # placeholder for a removed element
| 31.675 | 81 | 0.607735 | import itertools
from heapq import heappush, heappop
REMOVED = '<removed-element>' # placeholder for a removed element
class UpdatablePriorityQueue:
def __init__(this):
this.pq = [] # list of entries arranged in a heap
this.entry_finder = {} # mapping of... | 0 | 0 | 0 | 1,117 | 0 | 0 | 0 | 9 | 67 |
0b6c3f75ac09c6c951b9a3a5029944a0a5e689a2 | 3,007 | py | Python | 18cse201_assg-2_numpy_lib.py | ShreesantShubhamMeher07/DMDW-LAB | 60a2038a73bb1a79a08d48b08831c39dcee6e2a2 | [
"Apache-2.0"
] | null | null | null | 18cse201_assg-2_numpy_lib.py | ShreesantShubhamMeher07/DMDW-LAB | 60a2038a73bb1a79a08d48b08831c39dcee6e2a2 | [
"Apache-2.0"
] | null | null | null | 18cse201_assg-2_numpy_lib.py | ShreesantShubhamMeher07/DMDW-LAB | 60a2038a73bb1a79a08d48b08831c39dcee6e2a2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[9]:
import numpy as np
arr = np.array([[1,2,3],[4,5,6]])
print(arr)
# In[11]:
import numpy as np
arr = np.array([[1,2,3],[4,5,6]])
print("Array is of type: ", type(arr))
print("No. of dimensions: ", arr.nd... | 14.051402 | 64 | 0.513801 | #!/usr/bin/env python
# coding: utf-8
# In[9]:
import numpy as np
arr = np.array([[1,2,3],[4,5,6]])
print(arr)
# In[11]:
import numpy as np
arr = np.array([[1,2,3],[4,5,6]])
print("Array is of type: ", type(arr))
print("No. of dimensions: ", arr.nd... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7ef7ee327c9764aa6363f945d52f0c4858f81037 | 9,302 | py | Python | torequests/aiohttp_dummy.py | ClericPy/torequests | 23923fe567b0031a624a388b242779b6793e887f | [
"MIT"
] | 27 | 2015-11-15T10:59:27.000Z | 2021-12-30T14:12:06.000Z | torequests/aiohttp_dummy.py | ClericPy/torequests | 23923fe567b0031a624a388b242779b6793e887f | [
"MIT"
] | 29 | 2015-11-15T12:47:22.000Z | 2020-03-23T09:28:56.000Z | torequests/aiohttp_dummy.py | ClericPy/torequests | 23923fe567b0031a624a388b242779b6793e887f | [
"MIT"
] | 5 | 2016-02-23T07:38:32.000Z | 2021-02-25T14:58:00.000Z | # -*- coding: utf-8 -*-
| 39.415254 | 155 | 0.450118 | # -*- coding: utf-8 -*-
from asyncio import TimeoutError, get_event_loop
from concurrent.futures._base import Error
from inspect import isawaitable
from typing import Callable, Optional, Union
from aiohttp import ClientError, ClientSession
from ._py3_patch import (NewResponse, NotSet, _ensure_can_be_await,
... | 0 | 124 | 7,194 | 1,536 | 0 | 0 | 0 | 243 | 180 |
7059f7fbfc329a9c2a6b3f77f1be0cad5d20b355 | 1,436 | py | Python | python_code/easy/1299_Replace_Elements_with_Greatest_Element_on_Right_Side_easy/solution.py | timshenkao/interview_coding_exercises | c531fa5e0c09faef976539275589e957fcb88393 | [
"Apache-2.0"
] | null | null | null | python_code/easy/1299_Replace_Elements_with_Greatest_Element_on_Right_Side_easy/solution.py | timshenkao/interview_coding_exercises | c531fa5e0c09faef976539275589e957fcb88393 | [
"Apache-2.0"
] | null | null | null | python_code/easy/1299_Replace_Elements_with_Greatest_Element_on_Right_Side_easy/solution.py | timshenkao/interview_coding_exercises | c531fa5e0c09faef976539275589e957fcb88393 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 - present, Timur Shenkao
# 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 appl... | 35.02439 | 116 | 0.660864 | # Copyright (c) 2021 - present, Timur Shenkao
# 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 appl... | 0 | 0 | 0 | 352 | 0 | 0 | 0 | 2 | 46 |
0f315c35681b9cfe0a38b378c13199a5902f2322 | 2,638 | py | Python | surface/_item.py | internetimagery/semantic | b0302d09a9fdd3abe770d04002e3733b36097a60 | [
"MIT"
] | 1 | 2019-09-25T08:22:29.000Z | 2019-09-25T08:22:29.000Z | surface/_item.py | internetimagery/semantic | b0302d09a9fdd3abe770d04002e3733b36097a60 | [
"MIT"
] | 3 | 2019-08-21T00:17:30.000Z | 2019-08-22T10:27:27.000Z | surface/_item.py | internetimagery/semantic | b0302d09a9fdd3abe770d04002e3733b36097a60 | [
"MIT"
] | null | null | null | """ Wrap items in an immutable, simplified interface """
if False: # type checking
I = TypeVar("I", bound="Item")
| 31.035294 | 72 | 0.515921 | """ Wrap items in an immutable, simplified interface """
if False: # type checking
from typing import *
I = TypeVar("I", bound="Item")
import collections
class Item(collections.Mapping):
""" Wrap objects in a consistent traversal interface. """
__slots__ = ("__item", "__parent", "__visitors", "__... | 0 | 718 | 0 | 1,730 | 0 | 0 | 0 | -4 | 72 |
b2980856730739362ef2f2e8e618689596a10fcf | 1,609 | py | Python | NASA SPACEAPPS CHALLENGE/Solution/Software part/Astronomical Data and Python Libraries/Astropy/astropy-1.1.2/astropy/io/ascii/__init__.py | sahirsharma/Martian | 062e9b47849512863c16713811f347ad7e121b56 | [
"MIT"
] | null | null | null | NASA SPACEAPPS CHALLENGE/Solution/Software part/Astronomical Data and Python Libraries/Astropy/astropy-1.1.2/astropy/io/ascii/__init__.py | sahirsharma/Martian | 062e9b47849512863c16713811f347ad7e121b56 | [
"MIT"
] | null | null | null | NASA SPACEAPPS CHALLENGE/Solution/Software part/Astronomical Data and Python Libraries/Astropy/astropy-1.1.2/astropy/io/ascii/__init__.py | sahirsharma/Martian | 062e9b47849512863c16713811f347ad7e121b56 | [
"MIT"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
""" An extensible ASCII table reader and writer.
"""
from __future__ import absolute_import, division, print_function
| 34.978261 | 80 | 0.56184 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
""" An extensible ASCII table reader and writer.
"""
from __future__ import absolute_import, division, print_function
from .core import (InconsistentTableError,
ParameterError,
NoType, StrType, NumType, FloatType, I... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,137 | 288 |
78785e8d5611cdc15c3ab6de0766b9a451d3491d | 33 | py | Python | code/sample_4-2-19.py | KoyanagiHitoshi/AtCoder-Python-Introduction | 6d014e333a873f545b4d32d438e57cf428b10b96 | [
"MIT"
] | 1 | 2022-03-29T13:50:12.000Z | 2022-03-29T13:50:12.000Z | code/sample_4-2-19.py | KoyanagiHitoshi/AtCoder-Python-Introduction | 6d014e333a873f545b4d32d438e57cf428b10b96 | [
"MIT"
] | null | null | null | code/sample_4-2-19.py | KoyanagiHitoshi/AtCoder-Python-Introduction | 6d014e333a873f545b4d32d438e57cf428b10b96 | [
"MIT"
] | null | null | null | x = "123435"
print(x.count("3"))
| 11 | 19 | 0.575758 | x = "123435"
print(x.count("3"))
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ffa5b3dd4d0c407b527cdc81887e7b1ade7dd35c | 27,906 | py | Python | lib/netmap.py | looran/netmap | 5831d25bac1d18eabaa73bd23b2cd63c00a50f7a | [
"0BSD"
] | null | null | null | lib/netmap.py | looran/netmap | 5831d25bac1d18eabaa73bd23b2cd63c00a50f7a | [
"0BSD"
] | null | null | null | lib/netmap.py | looran/netmap | 5831d25bac1d18eabaa73bd23b2cd63c00a50f7a | [
"0BSD"
] | null | null | null |
PROGRAM_VERSION = '0.1'
PROGRAM_HEADER = 'netmap v%s' % PROGRAM_VERSION
| 48.447917 | 169 | 0.567226 | import re
import time
import pprint
import logging
import contextlib
import multiprocessing
from pathlib import Path
from logging import info, debug, warning
from collections import defaultdict, Counter
from iproute2_parse import Iproute2_parse
from netstat_parse import Netstat_parse
from system_files_parse import Sys... | 0 | 212 | 0 | 26,982 | 0 | 0 | 0 | 125 | 514 |
8a381e046f24cf509d11a678c89e605adbabe613 | 2,488 | py | Python | gensim_nmf.py | fuCtor/dynamic-nmf | f272d8ddc31d148c41b1a9d360ab0f86387b1b92 | [
"Apache-2.0"
] | null | null | null | gensim_nmf.py | fuCtor/dynamic-nmf | f272d8ddc31d148c41b1a9d360ab0f86387b1b92 | [
"Apache-2.0"
] | null | null | null | gensim_nmf.py | fuCtor/dynamic-nmf | f272d8ddc31d148c41b1a9d360ab0f86387b1b92 | [
"Apache-2.0"
] | null | null | null | import text.util
(X,terms,doc_ids,tfids, docs) = text.util.load_corpus( "data/month3.pkl" )
from gensim.corpora.dictionary import Dictionary
from gensim.models.nmf import Nmf
from prettytable import PrettyTable
import itertools
import networkx as nx
import matplotlib.pyplot as plt
x = PrettyTable()
common_dicti... | 36.588235 | 122 | 0.698955 | import text.util
(X,terms,doc_ids,tfids, docs) = text.util.load_corpus( "data/month3.pkl" )
from gensim.corpora.dictionary import Dictionary
from gensim.models.nmf import Nmf
from gensim.models import CoherenceModel
from prettytable import PrettyTable
import itertools
import networkx as nx
import matplotlib.pyplot as... | 0 | 0 | 0 | 0 | 0 | 336 | 0 | 19 | 67 |
593a2fbfea686cdd8fa7f0a7697b05929c945247 | 365 | py | Python | ch02/ans16.py | upura/nlp100v2020 | 37d4d208d5d527d163356793b630f36eb7595779 | [
"MIT"
] | 66 | 2020-04-07T13:27:45.000Z | 2022-01-10T10:43:08.000Z | ch02/ans16.py | upura/nlp100v2020 | 37d4d208d5d527d163356793b630f36eb7595779 | [
"MIT"
] | 2 | 2021-04-30T21:11:02.000Z | 2022-01-13T02:33:08.000Z | ch02/ans16.py | upura/nlp100v2020 | 37d4d208d5d527d163356793b630f36eb7595779 | [
"MIT"
] | 12 | 2020-04-10T16:26:10.000Z | 2022-02-06T06:17:22.000Z | import sys
import pandas as pd
if len(sys.argv) == 1:
print('Set arg n, like "python ch02/ans15.py 5"')
else:
n = int(sys.argv[1])
df = pd.read_csv('ch02/popular-names.txt', sep='\t', header=None)
nrow = -(-len(df) // n)
for i in range(n):
df.loc[nrow * i:nrow * (i + 1)].to_csv(f'ch02/ans... | 26.071429 | 101 | 0.583562 | import sys
import pandas as pd
if len(sys.argv) == 1:
print('Set arg n, like "python ch02/ans15.py 5"')
else:
n = int(sys.argv[1])
df = pd.read_csv('ch02/popular-names.txt', sep='\t', header=None)
nrow = -(-len(df) // n)
for i in range(n):
df.loc[nrow * i:nrow * (i + 1)].to_csv(f'ch02/ans... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6d4ead0a1921bfb7d870507da0a55ecdbc7c15ac | 2,500 | py | Python | inputs/inputs.py | VikParuchuri/political-positions | 7c92276995a8b28e2b0beb90b5eec8226c0db397 | [
"Apache-2.0"
] | 12 | 2015-02-17T16:37:21.000Z | 2022-01-27T16:48:07.000Z | inputs/inputs.py | VikParuchuri/political-positions | 7c92276995a8b28e2b0beb90b5eec8226c0db397 | [
"Apache-2.0"
] | null | null | null | inputs/inputs.py | VikParuchuri/political-positions | 7c92276995a8b28e2b0beb90b5eec8226c0db397 | [
"Apache-2.0"
] | 9 | 2015-02-17T17:13:53.000Z | 2022-01-19T13:36:51.000Z | from __future__ import division
import logging
import json
import subprocess
log = logging.getLogger(__name__) | 32.051282 | 103 | 0.5744 | from __future__ import division
import csv
from percept.conf.base import settings
from percept.utils.input import DataFormats
from percept.tests.framework import CSVInputTester
from percept.datahandlers.inputs import BaseInput
from percept.utils.models import get_namespace
import os
from itertools import chain
import l... | 0 | 0 | 0 | 1,875 | 0 | 48 | 0 | 67 | 399 |
2c499b54bd81c2cc2917f880844ba1d7d3745612 | 6,131 | py | Python | gnuradio-3.7.13.4/gr-wxgui/python/wxgui/const_window.py | v1259397/cosmic-gnuradio | 64c149520ac6a7d44179c3f4a38f38add45dd5dc | [
"BSD-3-Clause"
] | 1 | 2021-03-09T07:32:37.000Z | 2021-03-09T07:32:37.000Z | gnuradio-3.7.13.4/gr-wxgui/python/wxgui/const_window.py | v1259397/cosmic-gnuradio | 64c149520ac6a7d44179c3f4a38f38add45dd5dc | [
"BSD-3-Clause"
] | null | null | null | gnuradio-3.7.13.4/gr-wxgui/python/wxgui/const_window.py | v1259397/cosmic-gnuradio | 64c149520ac6a7d44179c3f4a38f38add45dd5dc | [
"BSD-3-Clause"
] | null | null | null | #
# Copyright 2008 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
#... | 28.919811 | 90 | 0.686185 | #
# Copyright 2008 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
#... | 0 | 0 | 0 | 4,183 | 0 | 0 | 0 | -61 | 220 |
9cba2fb961ba5fdb53a6af9cfead22e108f3ed51 | 5,142 | py | Python | olivine/SanCarlos/SanCarlos_baselines.py | EFerriss/olivine | 78cb3c7664d4dce284cf5096775cdf1e40463f91 | [
"MIT"
] | 1 | 2020-03-06T23:32:25.000Z | 2020-03-06T23:32:25.000Z | olivine/SanCarlos/SanCarlos_baselines.py | EFerriss/olivine | 78cb3c7664d4dce284cf5096775cdf1e40463f91 | [
"MIT"
] | null | null | null | olivine/SanCarlos/SanCarlos_baselines.py | EFerriss/olivine | 78cb3c7664d4dce284cf5096775cdf1e40463f91 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 10 14:08:02 2017
@author: Elizabeth
"""
from olivine.SanCarlos import SanCarlos_spectra as SC
from pynams import styles
import olivine
high_ending = olivine.high_ending
low_ending = olivine.low_ending
#%% Range of 3 baselines for initial concentration estimates from SC... | 35.958042 | 78 | 0.768961 | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 10 14:08:02 2017
@author: Elizabeth
"""
from olivine.SanCarlos import SanCarlos_spectra as SC
from pynams import styles
import olivine
high_ending = olivine.high_ending
low_ending = olivine.low_ending
#%% Range of 3 baselines for initial concentration estimates from SC... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
05a151c54670029ca3fff97301df3662170eee7f | 1,180 | py | Python | iv/Arrays/noble_integer.py | iamsuman/iv | bf68d3fd45455b6041e74b09272f69503bf7a8ac | [
"MIT"
] | 2 | 2020-09-19T22:28:15.000Z | 2020-10-03T01:44:53.000Z | iv/Arrays/noble_integer.py | iamsuman/iv | bf68d3fd45455b6041e74b09272f69503bf7a8ac | [
"MIT"
] | null | null | null | iv/Arrays/noble_integer.py | iamsuman/iv | bf68d3fd45455b6041e74b09272f69503bf7a8ac | [
"MIT"
] | 1 | 2020-10-03T01:43:30.000Z | 2020-10-03T01:43:30.000Z |
if __name__ == '__main__':
main()
| 20 | 85 | 0.349153 | class Noble():
"""
Time Limit Exceeded. Your submission didn't complete in the allocated time limit.
"""
def noble_integer(self, A):
"""
"""
# A = [3, 2, 1, 3]
noble = -1
for i in set(A):
# print(i)
n = 0
for j in A:
... | 0 | 0 | 0 | 1,034 | 0 | 58 | 0 | 0 | 45 |
3d96a4b1756ccb7e3d9aeca7e25203806dfbe1b6 | 14,961 | py | Python | educate/serviceweb/api.py | fndos/Control-de-Visitas-Web | a5b7d954e327e4e1a2979f3cf539a2f70fd325d6 | [
"MIT"
] | null | null | null | educate/serviceweb/api.py | fndos/Control-de-Visitas-Web | a5b7d954e327e4e1a2979f3cf539a2f70fd325d6 | [
"MIT"
] | null | null | null | educate/serviceweb/api.py | fndos/Control-de-Visitas-Web | a5b7d954e327e4e1a2979f3cf539a2f70fd325d6 | [
"MIT"
] | null | null | null | ### ServiceWeb
############
#from django.contrib.auth.hashers import make_password, HASHERS
### Models
################################################################################
### ANDROID
################################################################################
| 37.4025 | 190 | 0.591605 | ### ServiceWeb
from tastypie.resources import ModelResource, ALL, ALL_WITH_RELATIONS
from tastypie import fields
from tastypie.authentication import ApiKeyAuthentication
from tastypie.authorization import Authorization
from tastypie.serializers import Serializer
############
from django.contrib.auth.models import User... | 0 | 0 | 0 | 13,930 | 0 | 0 | 0 | 287 | 449 |
8ad467606f8a323c525048a23a7ea573c1c8eadd | 580 | py | Python | rummage/lib/gui/controls/list_box.py | RobbiNespu/Rummage | f2240fcbd3941ff4d31621a7460c65b13a0140d4 | [
"MIT"
] | null | null | null | rummage/lib/gui/controls/list_box.py | RobbiNespu/Rummage | f2240fcbd3941ff4d31621a7460c65b13a0140d4 | [
"MIT"
] | null | null | null | rummage/lib/gui/controls/list_box.py | RobbiNespu/Rummage | f2240fcbd3941ff4d31621a7460c65b13a0140d4 | [
"MIT"
] | null | null | null | """ListBox workaround.
WxFormBuilder on macOS currently freezes up when using a ListBox.
So to sidestep this issue, we will use a custom control, that is
actually just a ListBox. This way it doesn't try to render a live
preview of a ListBox and put us in an endless cycle of pain.
Not sure how ListBox behaves on other... | 29 | 68 | 0.734483 | """ListBox workaround.
WxFormBuilder on macOS currently freezes up when using a ListBox.
So to sidestep this issue, we will use a custom control, that is
actually just a ListBox. This way it doesn't try to render a live
preview of a ListBox and put us in an endless cycle of pain.
Not sure how ListBox behaves on other... | 0 | 0 | 0 | 170 | 0 | 0 | 0 | -12 | 45 |
b95d1d46887c6fa5f612cd468ac4cea7c5716deb | 3,363 | py | Python | experiments/test_CARSn.py | salomonw/mixed-traffic-amod-route-rebalance | 7f1edeb195a7bfab835e596ad84deead2957943e | [
"MIT"
] | 1 | 2022-03-07T16:15:56.000Z | 2022-03-07T16:15:56.000Z | experiments/test_CARSn.py | salomonw/mixed-traffic-amod-route-rebalance | 7f1edeb195a7bfab835e596ad84deead2957943e | [
"MIT"
] | null | null | null | experiments/test_CARSn.py | salomonw/mixed-traffic-amod-route-rebalance | 7f1edeb195a7bfab835e596ad84deead2957943e | [
"MIT"
] | null | null | null | import src.tnet as tnet
import src.CARS as cars
import numpy as np
from matplotlib import rc
import matplotlib.pyplot as plt
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
#rc('text', usetex=True)
netFile, gFile, fcoeffs, tstamp, dir_out = tnet.get_network_parameters('EMA', experiment_name='EMA_penRat... | 42.0375 | 150 | 0.702646 | import src.tnet as tnet
import src.CARS as cars
import numpy as np
import copy
from src.utils import *
import matplotlib as mpl
from matplotlib import rc
import matplotlib.pyplot as plt
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
#rc('text', usetex=True)
netFile, gFile, fcoeffs, tstamp, dir_out = t... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -5 | 66 |
7c48707b2bba506ba72011b6d2764acbd42e196f | 3,391 | py | Python | bot.py | TotalDiscord/EcchiBot | 344ff9586d63f19287b7252d38a55d969731fdae | [
"MIT"
] | 1 | 2021-02-23T15:15:11.000Z | 2021-02-23T15:15:11.000Z | bot.py | TotalDiscord/EcchiBot | 344ff9586d63f19287b7252d38a55d969731fdae | [
"MIT"
] | null | null | null | bot.py | TotalDiscord/EcchiBot | 344ff9586d63f19287b7252d38a55d969731fdae | [
"MIT"
] | 1 | 2021-02-23T15:15:16.000Z | 2021-02-23T15:15:16.000Z | import os
import logging
import json
from discord.ext import commands
from os import path
#Logging
logger = logging.getLogger('discord')
logger.setLevel(logging.INFO)
handler = logging.FileHandler(filename='logs.log', encoding='utf-8', mode='w')
handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name... | 32.295238 | 143 | 0.634326 | import os
import discord
import time
import logging
import json
from discord.ext import commands
from discord import Game, Embed, Color, Status, ChannelType
from random import randint, sample
from discord.ext.commands import cooldown
from os import path
#Logging
logger = logging.getLogger('discord')
logger.setLevel(l... | 0 | 1,688 | 0 | 0 | 0 | 0 | 0 | 54 | 155 |
a8a5220464bb4f8c4c343a691b06286271fa7733 | 2,729 | py | Python | maelstrom9/application.py | Fantoccini/maelstrom9 | dbb6a9a94d6f0609d25c3a5221b5148710a1deab | [
"Apache-2.0"
] | null | null | null | maelstrom9/application.py | Fantoccini/maelstrom9 | dbb6a9a94d6f0609d25c3a5221b5148710a1deab | [
"Apache-2.0"
] | null | null | null | maelstrom9/application.py | Fantoccini/maelstrom9 | dbb6a9a94d6f0609d25c3a5221b5148710a1deab | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
from flask import Flask
application = Flask(__name__)
REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379")
API_ROOT = 'https://bbs.net9.org:8080'
application.secret_key = os.urandom(24)
if __name__ == '__main__':
application.debug = True
application.run()
| 34.1125 | 95 | 0.629535 | #!/usr/bin/env python
import os
import urllib
import requests
import json
import redis
import uuid
from flask import Flask, g, request, redirect, url_for, render_template, jsonify, make_response
application = Flask(__name__)
REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379")
API_ROOT = 'https://bbs.net9.org... | 0 | 2,185 | 0 | 0 | 0 | 0 | 0 | 29 | 202 |
b1faf0242736c62b8e6b3beecf10035c92ae51f2 | 2,579 | py | Python | build_database.py | jsubercaze/iot-tweet-search-engine | 731fe1aed1da40cab7cb183210ff3fe1e6491097 | [
"Apache-2.0"
] | null | null | null | build_database.py | jsubercaze/iot-tweet-search-engine | 731fe1aed1da40cab7cb183210ff3fe1e6491097 | [
"Apache-2.0"
] | 4 | 2019-02-08T13:39:39.000Z | 2019-03-18T13:00:02.000Z | build_database.py | masterdcups/iot-tweet-search-engine | 731fe1aed1da40cab7cb183210ff3fe1e6491097 | [
"Apache-2.0"
] | null | null | null | import os
from dateutil import parser as date_parser
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from definitions import ROOT_DIR
from parser import Parser
engine_addr = 'postgresql+psycopg2://postgres:password@/iot_tweet?host=/... | 29.988372 | 118 | 0.732454 | import os
from dateutil import parser as date_parser
from sqlalchemy import Column, Text, Integer, DateTime, ARRAY, Float, func
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from definitions import ROOT_DIR
from parser import Parse... | 0 | 0 | 0 | 953 | 0 | 0 | 0 | 53 | 45 |
ed87df5a9d542f79b8f08f919fc77b48c79e9e15 | 3,818 | py | Python | tests/pandas/test_makes_up.py | LudvigOlsen/utipy | c287f7eed15b3591118bba49ecdfc2b2605f59a0 | [
"MIT"
] | null | null | null | tests/pandas/test_makes_up.py | LudvigOlsen/utipy | c287f7eed15b3591118bba49ecdfc2b2605f59a0 | [
"MIT"
] | 1 | 2022-02-16T15:24:33.000Z | 2022-02-16T15:24:33.000Z | tests/pandas/test_makes_up.py | LudvigOlsen/utipy | c287f7eed15b3591118bba49ecdfc2b2605f59a0 | [
"MIT"
] | null | null | null | # Testing pandas.makes_up
| 40.617021 | 64 | 0.617339 | # Testing pandas.makes_up
import utipy as ut
import numpy as np
import pandas as pd
def test_makes_up_Series():
x0 = pd.Series([0, 0, 0, 0, 0])
xNaN = pd.Series([np.nan, np.nan, np.nan, np.nan, np.nan])
xinf = pd.Series([np.inf, np.inf, np.inf, np.inf, np.inf])
x6 = pd.Series([1, 2, 3, 4, 5, 6, 6, 6... | 0 | 0 | 0 | 0 | 0 | 3,661 | 0 | -8 | 136 |
20c3bb413eb4ae43c69cc1d26b1c06bd410b13d8 | 1,692 | py | Python | data/states/getkey.py | harryninja/Ping-Pong-Doen-a | eabc052872544f1acf53be67415d5fd2e233bc5d | [
"Unlicense"
] | null | null | null | data/states/getkey.py | harryninja/Ping-Pong-Doen-a | eabc052872544f1acf53be67415d5fd2e233bc5d | [
"Unlicense"
] | null | null | null | data/states/getkey.py | harryninja/Ping-Pong-Doen-a | eabc052872544f1acf53be67415d5fd2e233bc5d | [
"Unlicense"
] | null | null | null |
from .. import tools
'''este codigo vai auxiliar nas aes do menu'''
| 33.176471 | 151 | 0.589835 |
import pygame as pg
from .. import tools
'''este codigo vai auxiliar nas ações do menu'''
class GetKey(tools.States):
def __init__(self, screen_rect):
tools.States.__init__(self)
self.screen_rect = screen_rect
self.options = ['Back']
self.next_list = ['MENU']
self.title, se... | 4 | 0 | 0 | 1,578 | 0 | 0 | 0 | -2 | 45 |
7ea5bac33157901c6b8078807718cba7c6c5c2ab | 215 | py | Python | twitterAPI/twitterLogin.py | GHOSCHT/Django-Twitter | 93898c373d2b566ef0c5391be0e4bf44247aff4f | [
"MIT"
] | 1 | 2020-06-12T08:43:13.000Z | 2020-06-12T08:43:13.000Z | twitterAPI/twitterLogin.py | GHOSCHT/Django-Twitter | 93898c373d2b566ef0c5391be0e4bf44247aff4f | [
"MIT"
] | 2 | 2021-06-05T07:17:37.000Z | 2021-06-10T19:21:32.000Z | twitterAPI/twitterLogin.py | GHOSCHT/Django-Twitter | 93898c373d2b566ef0c5391be0e4bf44247aff4f | [
"MIT"
] | 1 | 2020-06-11T09:45:34.000Z | 2020-06-11T09:45:34.000Z | import os
consumer_key = os.environ.get("consumer_key")
consumer_secret = os.environ.get("consumer_secret")
access_token = os.environ.get("access_token")
access_token_secret = os.environ.get("access_token_secret")
| 30.714286 | 59 | 0.8 | import os
consumer_key = os.environ.get("consumer_key")
consumer_secret = os.environ.get("consumer_secret")
access_token = os.environ.get("access_token")
access_token_secret = os.environ.get("access_token_secret")
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bf2ad67c543488e58afea974bf2863ae480a309f | 249 | py | Python | custom_user/cust_user/user/api/urls.py | SameerGurjar/Cutomized-User-Authentication | 6063c0e9e6d5d3f07c17ab7b7358bdb8cb554012 | [
"MIT"
] | null | null | null | custom_user/cust_user/user/api/urls.py | SameerGurjar/Cutomized-User-Authentication | 6063c0e9e6d5d3f07c17ab7b7358bdb8cb554012 | [
"MIT"
] | null | null | null | custom_user/cust_user/user/api/urls.py | SameerGurjar/Cutomized-User-Authentication | 6063c0e9e6d5d3f07c17ab7b7358bdb8cb554012 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from .views import UserRegisterAPIView, UserLoginAPIView
urlpatterns = [
url(r'^register/$', UserRegisterAPIView.as_view(), name='register'),
url(r'^login/$', UserLoginAPIView.as_view(), name='login'),
] | 31.125 | 71 | 0.718876 | from django.conf.urls import url
from .views import UserRegisterAPIView, UserLoginAPIView
urlpatterns = [
url(r'^register/$', UserRegisterAPIView.as_view(), name='register'),
url(r'^login/$', UserLoginAPIView.as_view(), name='login'),
] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c305af1d791a9b313536c57a03c49122393cc531 | 2,361 | py | Python | app/api/v1/user.py | sillyCod/eggdemo | a57eace6ae48cd17b9c9a3a19406dc1cc26fba65 | [
"MIT"
] | null | null | null | app/api/v1/user.py | sillyCod/eggdemo | a57eace6ae48cd17b9c9a3a19406dc1cc26fba65 | [
"MIT"
] | 3 | 2020-06-16T07:31:03.000Z | 2020-06-16T09:54:44.000Z | app/api/v1/user.py | sillyCod/eggdemo | a57eace6ae48cd17b9c9a3a19406dc1cc26fba65 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
"""
@file: user
@time: 2020/6/17 0:48
"""
from flask_restful import Api
from flask.blueprints import Blueprint
user_bp = Blueprint("egg_user", __name__, url_prefix="/api/v1/user")
user_api = Api(user_bp)
| 22.273585 | 95 | 0.675985 | # -*- coding:utf-8 -*-
"""
@file: user
@time: 2020/6/17 0:48
"""
from flask_restful import Api
from app.libs.lin_response import Resource
from flask.blueprints import Blueprint
from flask import request
from flask import make_response, jsonify
from app.ops.membership import get_membership_list
from app.ops.user impor... | 6 | 1,475 | 0 | 141 | 0 | 0 | 0 | 169 | 338 |
91f981dcfc86e37ef8f12d2975fc69b8310a35d4 | 456 | py | Python | scuole/districts/admin.py | texastribune/scuole | 8ab316ee50ef0d8e71b94b50dc889d10c6e83412 | [
"MIT"
] | 1 | 2019-03-12T04:30:02.000Z | 2019-03-12T04:30:02.000Z | scuole/districts/admin.py | texastribune/scuole | 8ab316ee50ef0d8e71b94b50dc889d10c6e83412 | [
"MIT"
] | 616 | 2017-08-18T21:15:39.000Z | 2022-03-25T11:17:10.000Z | scuole/districts/admin.py | texastribune/scuole | 8ab316ee50ef0d8e71b94b50dc889d10c6e83412 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
| 22.8 | 56 | 0.765351 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.contrib import admin
from scuole.core.admin import ReadOnlyAdmin
from .models import District, DistrictStats
@admin.register(District)
class DistrictAdmin(ReadOnlyAdmin):
search_fields = ('name', 'tea_id')
@admin.reg... | 0 | 203 | 0 | 0 | 0 | 0 | 0 | 55 | 115 |
e29136dc0db13192753ad7e4be2fd856b11cd4d6 | 1,084 | py | Python | src/oidcservice/oauth2/client_credentials/__init__.py | IdentityPython/oiccli | 98b9b1e4926936cdec5a5d4d00da278ba673c741 | [
"Apache-2.0"
] | 3 | 2019-01-22T17:57:34.000Z | 2019-09-12T02:53:59.000Z | src/oidcservice/oauth2/client_credentials/__init__.py | IdentityPython/oidcservice | 98b9b1e4926936cdec5a5d4d00da278ba673c741 | [
"Apache-2.0"
] | 5 | 2019-08-08T12:17:19.000Z | 2019-12-02T07:08:32.000Z | src/oidcservice/oauth2/client_credentials/__init__.py | IdentityPython/oidcservice | 98b9b1e4926936cdec5a5d4d00da278ba673c741 | [
"Apache-2.0"
] | 4 | 2018-06-22T07:09:56.000Z | 2020-01-10T03:49:26.000Z | # import inspect
# import sys
# from glob import glob
# from os.path import basename, dirname, join
#
# from oidcservice.service import Service
#
#
# def factory(req_name, **kwargs):
# pwd = dirname(__file__)
# if pwd not in sys.path:
# sys.path.insert(0, pwd)
# for x in glob(join(pwd, '*.py')):
# ... | 36.133333 | 71 | 0.509225 | # import inspect
# import sys
# from glob import glob
# from os.path import basename, dirname, join
#
# from oidcservice.service import Service
#
#
# def factory(req_name, **kwargs):
# pwd = dirname(__file__)
# if pwd not in sys.path:
# sys.path.insert(0, pwd)
# for x in glob(join(pwd, '*.py')):
# ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c497569b7d98d9e24f4a1dc239f149154aeda8eb | 1,823 | py | Python | Game/Sudoku.py | anchitmulye/Sudoku-pygame | 55aaf692dd4063a015b67d0b53a2284c78451987 | [
"MIT"
] | 3 | 2018-07-18T05:18:20.000Z | 2020-11-03T19:44:39.000Z | Game/Sudoku.py | anchitmulye/Sudoku-pygame | 55aaf692dd4063a015b67d0b53a2284c78451987 | [
"MIT"
] | null | null | null | Game/Sudoku.py | anchitmulye/Sudoku-pygame | 55aaf692dd4063a015b67d0b53a2284c78451987 | [
"MIT"
] | 4 | 2019-06-11T05:48:48.000Z | 2022-01-26T14:08:37.000Z |
Sudoku().start()
| 22.506173 | 94 | 0.590784 | import pygame
from Game.Scenes import *
from Game.Shared import *
class Sudoku:
def __init__(self):
self.__score = 0
self.__time = ''
self.__run = 0
pygame.init()
pygame.mixer.init()
pygame.display.set_caption("Sudoku by Artelligence Machine")
self.__clo... | 0 | 0 | 0 | 1,713 | 0 | 0 | 0 | 0 | 90 |
909c560098ed820cbde07d272c74e2c80f733116 | 1,443 | py | Python | syzygy/build/timestamp.py | dandv/syzygy | 2444520c8e6e0b45b2f45b680d878d60b9636f45 | [
"Apache-2.0"
] | null | null | null | syzygy/build/timestamp.py | dandv/syzygy | 2444520c8e6e0b45b2f45b680d878d60b9636f45 | [
"Apache-2.0"
] | null | null | null | syzygy/build/timestamp.py | dandv/syzygy | 2444520c8e6e0b45b2f45b680d878d60b9636f45 | [
"Apache-2.0"
] | null | null | null | #!python
# Copyright 2012 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... | 29.44898 | 77 | 0.70201 | #!python
# Copyright 2012 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... | 0 | 0 | 0 | 0 | 0 | 569 | 0 | -24 | 113 |
7bfef29754c7df712fa67754fff570d212c73ba3 | 558 | py | Python | viz-data-gen-script/convertToCSV.py | harshfatepuria/Evaluation-of-Content-Analysis-on-TREC-Polat-DD-Dataset | 6204fb4028b47226bb1ae4fbfedd10a553a8e3dc | [
"Apache-2.0"
] | null | null | null | viz-data-gen-script/convertToCSV.py | harshfatepuria/Evaluation-of-Content-Analysis-on-TREC-Polat-DD-Dataset | 6204fb4028b47226bb1ae4fbfedd10a553a8e3dc | [
"Apache-2.0"
] | null | null | null | viz-data-gen-script/convertToCSV.py | harshfatepuria/Evaluation-of-Content-Analysis-on-TREC-Polat-DD-Dataset | 6204fb4028b47226bb1ae4fbfedd10a553a8e3dc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
output_file=open('/Users/harshfatepuria/Documents/Github/Evaluation-of-Content-Analysis-on-TREC-Polat-DD-Dataset/result/5-SizeSummary/sizeRatioSummary123.csv','w')
output_file.write("State,Solr Index Size,Actual File Size\n")
with open("/Users/harshfatepuria/Documents/Github/Evaluation-of-Cont... | 50.727273 | 163 | 0.752688 | # -*- coding: utf-8 -*-
output_file=open('/Users/harshfatepuria/Documents/Github/Evaluation-of-Content-Analysis-on-TREC-Polat-DD-Dataset/result/5-SizeSummary/sizeRatioSummary123.csv','w')
output_file.write("State,Solr Index Size,Actual File Size\n")
with open("/Users/harshfatepuria/Documents/Github/Evaluation-of-Cont... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
321992959920f50575652adaa2967e7c4d7e3c75 | 5,622 | py | Python | main.py | ccss17/nonogram | bba75c981a74947b987438cee067ae4da5c91d74 | [
"MIT"
] | 3 | 2020-06-26T00:36:52.000Z | 2020-10-26T11:34:09.000Z | main.py | ccss17/nonogram | bba75c981a74947b987438cee067ae4da5c91d74 | [
"MIT"
] | null | null | null | main.py | ccss17/nonogram | bba75c981a74947b987438cee067ae4da5c91d74 | [
"MIT"
] | 1 | 2021-11-02T15:34:04.000Z | 2021-11-02T15:34:04.000Z | import sys
'''
?????
oxoox
oxxoo
xoxoo
.
.
'''
# n . m
# 3 . 2
'''
(oo) () ()
() (oo) ()
() () (oo)
(o) (o) ()
(o) () (o)
() (o) (o)
'''
# 3 . 3
'''
(ooo) () ()
() (ooo) ()
() () (ooo)
(oo) (o) ()
(oo) () (o)
() (oo) (o)
(o) (oo) ()
(o) () (oo)
() (o) (oo)
m/2 ( 3/2)
.
'''
'''
m ... | 19.386207 | 122 | 0.486837 | from nonogram import *
from patterns import *
from multiprocessing import *
from time import time
from pprint import pprint
import sys
import itertools as it
'''
?????
oxoox
oxxoo
xoxoo
키 값이 이미 두여있는지 확인한다.
가장 처음 키값을 둔다.
'''
# n 개의 자리. m 개의 공
# 3 개의 자리. 2 개의 공
'''
(oo) () ()
() (oo) ()
() () (oo)
(o) (o) ()
(o) ()... | 1,797 | 0 | 0 | 0 | 0 | 2,026 | 0 | 15 | 224 |
4a4010a986633c09e2625c4aef5d3c94ae22b43b | 1,262 | py | Python | labscripts/restconf/restconf_native_config.py | gliverm/devnet-study-group | 28aecef8207cfeb8f10dc375c22e5ec953d6762b | [
"MIT"
] | 1 | 2020-07-30T15:23:55.000Z | 2020-07-30T15:23:55.000Z | labscripts/restconf/restconf_native_config.py | gliverm/devnet-study-group | 28aecef8207cfeb8f10dc375c22e5ec953d6762b | [
"MIT"
] | null | null | null | labscripts/restconf/restconf_native_config.py | gliverm/devnet-study-group | 28aecef8207cfeb8f10dc375c22e5ec953d6762b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import requests
hostname = 'r1.lab.local'
user = 'wwt'
password = 'WWTwwt1!'
# Suppress SSL certificate verification errors
# Using self-signed certificates in lab and therefore will otherwise report verbos
# SSL validation errors
requests.packages.urllib3.disable_warnings()
restc... | 29.348837 | 84 | 0.684628 | #!/usr/bin/env python
import json
import requests
from pprint import pprint
hostname = 'r1.lab.local'
user = 'wwt'
password = 'WWTwwt1!'
# Suppress SSL certificate verification errors
# Using self-signed certificates in lab and therefore will otherwise report verbos
# SSL validation errors
requests.p... | 0 | 0 | 0 | 0 | 0 | 581 | 0 | -6 | 74 |
7175c21371fa6f04d01eaf06447abbb84fc3b5d0 | 2,349 | py | Python | assignment1/cs231n/classifiers/linear_svm.py | rahul1990gupta/bcs231n | 5b28c277ef365722a435d33004a8b88a92894176 | [
"MIT"
] | null | null | null | assignment1/cs231n/classifiers/linear_svm.py | rahul1990gupta/bcs231n | 5b28c277ef365722a435d33004a8b88a92894176 | [
"MIT"
] | null | null | null | assignment1/cs231n/classifiers/linear_svm.py | rahul1990gupta/bcs231n | 5b28c277ef365722a435d33004a8b88a92894176 | [
"MIT"
] | null | null | null | import numpy as np
from past.builtins import xrange
def svm_loss_naive(W, X, y, reg):
"""
Structured SVM loss function, naive implementation (with loops).
Inputs have dimension D, there are C classes, and we operate on minibatches
of N examples.
Inputs:
- W: A numpy array of shape (D, C) containing weigh... | 27.964286 | 77 | 0.657727 | import numpy as np
from random import shuffle
from past.builtins import xrange
def svm_loss_naive(W, X, y, reg):
"""
Structured SVM loss function, naive implementation (with loops).
Inputs have dimension D, there are C classes, and we operate on minibatches
of N examples.
Inputs:
- W: A numpy array of sh... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 22 |
96cafa9dd0a2a57534c6c23637f5ae5f285b9ac4 | 4,007 | py | Python | utils/checks.py | ClicksMinutePer/gone-pear-shaped | 8d2d525d23dfa9876d1ebadee06e32d611764a06 | [
"Apache-2.0"
] | 1 | 2021-02-12T03:42:26.000Z | 2021-02-12T03:42:26.000Z | utils/checks.py | ClicksMinutePer/gone-pear-shaped | 8d2d525d23dfa9876d1ebadee06e32d611764a06 | [
"Apache-2.0"
] | null | null | null | utils/checks.py | ClicksMinutePer/gone-pear-shaped | 8d2d525d23dfa9876d1ebadee06e32d611764a06 | [
"Apache-2.0"
] | 2 | 2021-09-27T18:28:03.000Z | 2021-09-27T18:33:36.000Z |
# Define commonly used functions. We use a single underscore ('_') to let people know that we shouldn't access this
# outside of this module but still allow it
# Define the checks
def bypass_check(
predicate, **parameters
): # If the user is a bot mod this check will allow them to skip the check if it fa... | 32.844262 | 115 | 0.556776 | import asyncio
import discord
from discord.ext import commands
# Define commonly used functions. We use a single underscore ('_') to let people know that we shouldn't access this
# outside of this module but still allow it
def bot_mod(ctx):
mod_users = []
mod_roles = [760896658862243911]
if ctx.author is... | 0 | 0 | 1,904 | 0 | 0 | 1,427 | 0 | -3 | 208 |
afed4d0be70066fef3ee0a98edfea1b0d620264b | 2,998 | py | Python | scripts/price.py | katabase/soldMss | 72915d768103d787dc3de8cd1b3548d734ac948d | [
"CC-BY-4.0"
] | null | null | null | scripts/price.py | katabase/soldMss | 72915d768103d787dc3de8cd1b3548d734ac948d | [
"CC-BY-4.0"
] | null | null | null | scripts/price.py | katabase/soldMss | 72915d768103d787dc3de8cd1b3548d734ac948d | [
"CC-BY-4.0"
] | null | null | null | import json
import csv
from operator import itemgetter
def get_price(dict):
"""
This function is used to get the price of a manuscript.
"""
price = dict["price"]
return price
def get_all_prices(file):
"""
This function is used to produce a list of all prices.
:param file: a json file containing the mss
:ret... | 25.40678 | 95 | 0.679119 | import json
import csv
from operator import itemgetter
def get_price(dict):
"""
This function is used to get the price of a manuscript.
"""
price = dict["price"]
return price
def get_all_prices(file):
"""
This function is used to produce a list of all prices.
:param file: a json file containing the mss
:ret... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7f4d55c8b55dbefe6066325fd7356c4367e904ce | 794 | py | Python | filters/inline_file.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 9 | 2016-01-29T18:05:29.000Z | 2021-10-06T04:21:55.000Z | filters/inline_file.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 9 | 2015-04-06T19:03:32.000Z | 2019-05-28T13:34:55.000Z | filters/inline_file.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 18 | 2015-04-06T17:42:31.000Z | 2021-10-06T04:26:29.000Z | from mimetypes import MimeTypes
mime = MimeTypes()
| 25.612903 | 88 | 0.634761 |
import base64
import urllib
from mimetypes import MimeTypes
from jinja2 import contextfilter
mime = MimeTypes()
@contextfilter
def inline_file(context, path, mime_type=None):
if mime_type is None:
mime_type = mime.guess_type(path)[0]
if mime_type is None:
raise Valu... | 0 | 642 | 0 | 0 | 0 | 0 | 0 | -5 | 98 |
fc8d54b72de90c56e788c6febc83da5cf5e356cf | 8,458 | py | Python | tests/conftest.py | mbercx/aiida-pseudo | 070bdfa37d30674e1f83bf6d14987aa977426d92 | [
"MIT"
] | null | null | null | tests/conftest.py | mbercx/aiida-pseudo | 070bdfa37d30674e1f83bf6d14987aa977426d92 | [
"MIT"
] | null | null | null | tests/conftest.py | mbercx/aiida-pseudo | 070bdfa37d30674e1f83bf6d14987aa977426d92 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# pylint: disable=redefined-outer-name,unused-argument
"""Configuration and fixtures for unit test suite."""
pytest_plugins = ['aiida.manage.tests.pytest_fixtures'] # pylint: disable=invalid-name
| 35.838983 | 120 | 0.68113 | # -*- coding: utf-8 -*-
# pylint: disable=redefined-outer-name,unused-argument
"""Configuration and fixtures for unit test suite."""
import io
import os
import re
import shutil
import click
import pytest
from aiida.plugins import DataFactory
from aiida_pseudo.data.pseudo import PseudoPotentialData
from aiida_pseudo.... | 0 | 7,703 | 0 | 0 | 0 | 0 | 0 | 44 | 477 |
85211c22d337926513d54fa19606cf369ce113b3 | 1,237 | py | Python | alipay/aop/api/response/AlipayFundAgreementQuotaModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayFundAgreementQuotaModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayFundAgreementQuotaModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
| 37.484848 | 111 | 0.721908 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.QuotaModifyDetail import QuotaModifyDetail
class AlipayFundAgreementQuotaModifyResponse(AlipayResponse):
def __init__(self):
super(AlipayFundAgreementQuo... | 0 | 481 | 0 | 537 | 0 | 0 | 0 | 82 | 90 |
9009f9f4d3b55232ee1a13567690aae8da5a9aac | 614 | py | Python | basic/mydatastruct/list_more.py | fplust/python3-cookbook | 0eaca2e3631bb69deaf466c32023bbb2093513da | [
"Apache-2.0"
] | null | null | null | basic/mydatastruct/list_more.py | fplust/python3-cookbook | 0eaca2e3631bb69deaf466c32023bbb2093513da | [
"Apache-2.0"
] | null | null | null | basic/mydatastruct/list_more.py | fplust/python3-cookbook | 0eaca2e3631bb69deaf466c32023bbb2093513da | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
Topic: list
Desc :
"""
def transpose_list():
""""""
matrix = [[1, 2, 3, 4],[5, 6, 7, 8],[9, 10, 11, 12],]
result = zip(*matrix)
print(type(result))
for z in result: print(z)
# zip
result = list(result)
print(result)
if __name_... | 18.058824 | 57 | 0.558632 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
Topic: list数据结构
Desc :
"""
def list_methods():
alist = [1, 2, 3, 4]
# 结论就是讲某个数组插入数组alist的位置i上,执行alist[i:i]=[...]
alist[4:4] = [9, 10, 11, 12]
# 删除某个或者某字段的list,请使用del
del alist[1:3]
# 情况list
del alist[:]
print(alist)
def transp... | 207 | 0 | 0 | 0 | 0 | 163 | 0 | 0 | 23 |
bb936443c8fb9cb3d86b99a9dda754107fc241ac | 7,997 | py | Python | api/test/api/responders_test/resource/test_inventory.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | api/test/api/responders_test/resource/test_inventory.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | api/test/api/responders_test/resource/test_inventory.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
... | 48.762195 | 85 | 0.421408 | ###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
... | 0 | 5,173 | 0 | 1,886 | 0 | 0 | 0 | 105 | 112 |