hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6208cb2a2c64c71c60c631414ac312652b301b34 | 21,926 | py | Python | kirbyClass.py | mattuff/KirbyCalculus | f2a2d2839cd5a658e5e82430619f43dfa6a65502 | [
"MIT"
] | 1 | 2022-03-11T07:45:02.000Z | 2022-03-11T07:45:02.000Z | kirbyClass.py | mattuff/KirbyCalculus | f2a2d2839cd5a658e5e82430619f43dfa6a65502 | [
"MIT"
] | null | null | null | kirbyClass.py | mattuff/KirbyCalculus | f2a2d2839cd5a658e5e82430619f43dfa6a65502 | [
"MIT"
] | null | null | null | from crossingClass import *
from joinClass import *
from strandClass import *
from componentClass import *
class Kirby:
def __init__(self,crossings,joins):
self.crossings=crossings
self.joins=joins
strands=[] #makes list of strands
for c in crossings:
for i in range(4):
... | 32.434911 | 144 | 0.528505 | 21,817 | 0.995029 | 0 | 0 | 0 | 0 | 0 | 0 | 4,554 | 0.207699 |
62098ed13ce2805c2274aa650c177f0c748ff79f | 401 | py | Python | projects/migrations/0017_project_status_isvalidated.py | joatuapp/joatu-django | 5626d03ba89c55650ff5bff2e706ca0883ae3b9c | [
"MIT"
] | 10 | 2018-05-13T18:01:57.000Z | 2018-12-23T17:11:14.000Z | projects/migrations/0017_project_status_isvalidated.py | moileretour/joatu | 9d18cb58b4280235688e269be6fd2d34b77ccead | [
"MIT"
] | 88 | 2018-05-04T15:33:46.000Z | 2022-03-08T21:09:21.000Z | projects/migrations/0017_project_status_isvalidated.py | joatuapp/joatu-django | 5626d03ba89c55650ff5bff2e706ca0883ae3b9c | [
"MIT"
] | 7 | 2018-05-08T16:05:06.000Z | 2018-09-13T05:49:05.000Z | # Generated by Django 2.0.3 on 2018-03-26 01:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('projects', '0016_auto_20180325_2116'),
]
operations = [
migrations.AddField(
model_name='project_status',
name='isVa... | 21.105263 | 53 | 0.613466 | 308 | 0.76808 | 0 | 0 | 0 | 0 | 0 | 0 | 111 | 0.276808 |
6209f7fa8b911f0682b7e6cecc7dc9fe96d9e302 | 1,177 | py | Python | ps1/ps1_3.py | collin-li/mitx-6.00.1x | 7fb111586c6b82e205e86fadfb4d91d09de46808 | [
"MIT"
] | null | null | null | ps1/ps1_3.py | collin-li/mitx-6.00.1x | 7fb111586c6b82e205e86fadfb4d91d09de46808 | [
"MIT"
] | 1 | 2017-02-06T02:46:08.000Z | 2017-02-06T02:46:08.000Z | ps1/ps1_3.py | collin-li/mitx-6.00.1x | 7fb111586c6b82e205e86fadfb4d91d09de46808 | [
"MIT"
] | null | null | null | # PROBLEM
#
# Assume s is a string of lower case characters.
#
# Write a program that prints the longest substring of s in which the letters
# occur in alphabetical order. For example, if s = 'azcbobobegghakl', then your
# program should print:
#
# 'Longest substring in alphabetical order is: beggh'
#
# In case of ti... | 26.155556 | 80 | 0.626168 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 643 | 0.546304 |
620afd69fe7804f73854cad5c0dd48effc58af61 | 992 | py | Python | bib2web/mandatory_fields.py | Juvawa/bib2web | 8d6c2244e46eefee1a519f8b3b656a143aa8bd9e | [
"MIT"
] | null | null | null | bib2web/mandatory_fields.py | Juvawa/bib2web | 8d6c2244e46eefee1a519f8b3b656a143aa8bd9e | [
"MIT"
] | null | null | null | bib2web/mandatory_fields.py | Juvawa/bib2web | 8d6c2244e46eefee1a519f8b3b656a143aa8bd9e | [
"MIT"
] | null | null | null | mandatory = \
{
'article' : ['ENTRYTYPE', 'ID', 'author', 'title', 'journal', 'year', 'volume'],
'book' : ['ENTRYTYPE', 'ID', 'title', 'publisher', 'year'],
'booklet' : ['ENTRYTYPE', 'ID', 'title', 'year'],
'conference' : ['ENTRYTYPE', 'ID', 'author', 'title', 'booktitle', 'publisher', 'year'],
'inbook' : ['... | 58.352941 | 91 | 0.563508 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 730 | 0.735887 |
620c76cdf8b6c6cb6855109a069ebc57b866672e | 6,809 | py | Python | trainAndTest/processOneFold_sm.py | rsanchezgarc/BIPSPI | e155fee0836084ea02bc9919c58817d26a4a13e5 | [
"Apache-2.0"
] | 5 | 2020-01-21T21:11:49.000Z | 2022-02-06T19:55:28.000Z | trainAndTest/processOneFold_sm.py | rsanchezgarc/BIPSPI | e155fee0836084ea02bc9919c58817d26a4a13e5 | [
"Apache-2.0"
] | null | null | null | trainAndTest/processOneFold_sm.py | rsanchezgarc/BIPSPI | e155fee0836084ea02bc9919c58817d26a4a13e5 | [
"Apache-2.0"
] | 3 | 2018-05-25T14:57:36.000Z | 2022-01-27T12:53:41.000Z | from __future__ import print_function
import itertools
import sys, os
import inspect
import numpy as np
from joblib import load as joblib_load
from .resultsManager import ResultsManager
#from .classifiers.randomForest import trainMethod, predictMethod
from .classifiers.xgBoost import trainMethod, predictMethod
def ... | 46.636986 | 122 | 0.697606 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,225 | 0.473638 |
620d0e354faec7f287cbe008e0fab6e397c53f56 | 7,289 | py | Python | manila_tempest_tests/tests/api/admin/test_snapshot_export_locations_negative.py | openstack/manila-tempest-plugin | 9c4a97b150e15b814acd4feb4da858a0eeff881e | [
"Apache-2.0"
] | 9 | 2017-10-31T10:36:34.000Z | 2020-10-07T01:31:38.000Z | manila_tempest_tests/tests/api/admin/test_snapshot_export_locations_negative.py | openstack/manila-tempest-plugin | 9c4a97b150e15b814acd4feb4da858a0eeff881e | [
"Apache-2.0"
] | null | null | null | manila_tempest_tests/tests/api/admin/test_snapshot_export_locations_negative.py | openstack/manila-tempest-plugin | 9c4a97b150e15b814acd4feb4da858a0eeff881e | [
"Apache-2.0"
] | 4 | 2018-07-19T13:55:51.000Z | 2021-11-05T17:50:27.000Z | # Copyright (c) 2017 Hitachi Data Systems, 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
#
# U... | 41.651429 | 79 | 0.69255 | 6,384 | 0.87584 | 0 | 0 | 6,163 | 0.845521 | 0 | 0 | 1,580 | 0.216765 |
620d308ec14780c98f6cbb15fbaefde43dfb9edb | 6,614 | py | Python | gateway/spvtable.py | trinity-project/trinity | 081eba1d4294a3bed33ba18c3f7b862b8803ee22 | [
"MIT"
] | 60 | 2018-01-12T07:33:15.000Z | 2021-12-28T23:06:28.000Z | gateway/spvtable.py | trinity-project/trinity | 081eba1d4294a3bed33ba18c3f7b862b8803ee22 | [
"MIT"
] | 13 | 2018-01-23T00:14:35.000Z | 2020-04-23T00:03:31.000Z | gateway/spvtable.py | trinity-project/trinity | 081eba1d4294a3bed33ba18c3f7b862b8803ee22 | [
"MIT"
] | 13 | 2018-01-05T07:27:29.000Z | 2021-01-06T16:45:05.000Z | """Author: Trinity Core Team
MIT License
Copyright (c) 2018 Trinity
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use,... | 29.659193 | 91 | 0.580738 | 5,169 | 0.781524 | 0 | 0 | 477 | 0.07212 | 0 | 0 | 2,662 | 0.40248 |
620eed4cbd2619972703ee779c16c8a7ab6c7ba9 | 54 | py | Python | src/apps/startposes/models/__init__.py | sanderland/katago-server | 6414fab080d007c05068a06ff4f25907b92848bd | [
"MIT"
] | 27 | 2020-05-03T11:01:27.000Z | 2022-03-17T05:33:10.000Z | src/apps/startposes/models/__init__.py | sanderland/katago-server | 6414fab080d007c05068a06ff4f25907b92848bd | [
"MIT"
] | 54 | 2020-05-09T01:18:41.000Z | 2022-01-22T10:31:15.000Z | src/apps/startposes/models/__init__.py | sanderland/katago-server | 6414fab080d007c05068a06ff4f25907b92848bd | [
"MIT"
] | 9 | 2020-09-29T11:31:32.000Z | 2022-03-09T01:37:50.000Z | from .startpos import StartPos, StartPosCumWeightOnly
| 27 | 53 | 0.87037 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
620fe82f37b4b5c4aa7773e3305715688885bc0e | 8,342 | py | Python | python/chronos/test/bigdl/chronos/autots/test_tspipeline.py | joan726/BigDL | 2432f420418c8ccf02325f8677c94f291e112053 | [
"Apache-2.0"
] | 3 | 2021-07-14T01:28:47.000Z | 2022-03-02T01:16:32.000Z | python/chronos/test/bigdl/chronos/autots/test_tspipeline.py | liangs6212/BigDL | 3c89ff7e8bbdc713110536c18099506811cd2b3a | [
"Apache-2.0"
] | null | null | null | python/chronos/test/bigdl/chronos/autots/test_tspipeline.py | liangs6212/BigDL | 3c89ff7e8bbdc713110536c18099506811cd2b3a | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 44.849462 | 90 | 0.532846 | 6,335 | 0.75941 | 0 | 0 | 0 | 0 | 0 | 0 | 1,259 | 0.150923 |
62112ee54eed681ca29c3d8ae3b4bec88531086a | 42,076 | py | Python | src/app/QKeithleySweep.py | mwchalmers/QKeithleyControl | 94e85cd8bc42d54f2cef4d0cfdb3ee4b62bcba41 | [
"MIT"
] | 6 | 2020-06-18T18:42:24.000Z | 2022-01-26T06:21:13.000Z | src/app/QKeithleySweep.py | mwchalmers/QKeithleyControl | 94e85cd8bc42d54f2cef4d0cfdb3ee4b62bcba41 | [
"MIT"
] | 1 | 2021-12-23T11:12:17.000Z | 2021-12-23T11:12:17.000Z | src/app/QKeithleySweep.py | mwchalmers/QKeithleyControl | 94e85cd8bc42d54f2cef4d0cfdb3ee4b62bcba41 | [
"MIT"
] | 3 | 2019-12-24T20:43:23.000Z | 2021-08-29T13:48:17.000Z | # ---------------------------------------------------------------------------------
# QKeithleySweep -> QVisaApplication
# Copyright (C) 2019 Michael Winters
# github: https://github.com/mesoic
# email: [email protected]
# ---------------------------------------------------------------------------------
#
# Per... | 30.824908 | 197 | 0.696811 | 39,964 | 0.949783 | 0 | 0 | 0 | 0 | 0 | 0 | 13,823 | 0.328517 |
62130b375ece64a9c0e907cb577ca9c4c8cd327e | 1,620 | py | Python | tests/fields/test_render.py | jpsca/pforms | 77c9da93e5224e79bb147aa873f28951e972bb21 | [
"MIT"
] | 2 | 2020-09-30T22:41:00.000Z | 2020-12-04T16:47:17.000Z | tests/fields/test_render.py | jpsca/hyperform | d5c450ad8684a853fed26f8c2606877151125a9e | [
"MIT"
] | 2 | 2021-11-18T18:01:28.000Z | 2021-11-18T18:03:29.000Z | tests/fields/test_render.py | jpsca/hyperform | d5c450ad8684a853fed26f8c2606877151125a9e | [
"MIT"
] | null | null | null | import proper_forms.fields as f
def test_render_attrs():
field = f.Text()
attrs = {
"id": "text1",
"classes": "myclass",
"data_id": 1,
"checked": True,
"ignore": False,
}
assert (
str(field.render_attrs(**attrs))
== 'class="myclass" data-id="1" i... | 24.179104 | 75 | 0.588889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 395 | 0.243827 |
621340935801ad4caf2565122ba09adde8da7eaf | 30,832 | py | Python | gerber.py | BetaPollux/gerbex | aeb013da642135d28d809ddb07febc129219d297 | [
"MIT"
] | null | null | null | gerber.py | BetaPollux/gerbex | aeb013da642135d28d809ddb07febc129219d297 | [
"MIT"
] | null | null | null | gerber.py | BetaPollux/gerbex | aeb013da642135d28d809ddb07febc129219d297 | [
"MIT"
] | 1 | 2021-12-05T14:44:26.000Z | 2021-12-05T14:44:26.000Z | #!/usr/bin/python3
# RS-274X per standard Revision 2021.02
import re
import copy
import numpy as np
import vertices
# TODO replace all vertices with outline class
# Meant for extracting substrings only
# Cast to int or float will catch invalid strings
RE_INT = r'[+-]?[0-9]+'
RE_DEC = r'[+-]?[0-9\.]+?'
EXPOSURE_ON... | 35.196347 | 95 | 0.570025 | 30,390 | 0.985664 | 0 | 0 | 1,168 | 0.037883 | 0 | 0 | 4,384 | 0.14219 |
621341c710939a44f425e8019b3137c8dfb8ad3f | 3,558 | py | Python | angrmanagement/ui/menus/disasm_insn_context_menu.py | yuzeming/angr-management | 173d3ffa02146956e5f0c9c8862da56988fa67b2 | [
"BSD-2-Clause"
] | 474 | 2015-08-10T17:47:15.000Z | 2022-03-31T21:10:55.000Z | angrmanagement/ui/menus/disasm_insn_context_menu.py | yuzeming/angr-management | 173d3ffa02146956e5f0c9c8862da56988fa67b2 | [
"BSD-2-Clause"
] | 355 | 2015-08-17T09:35:53.000Z | 2022-03-31T21:29:52.000Z | angrmanagement/ui/menus/disasm_insn_context_menu.py | yuzeming/angr-management | 173d3ffa02146956e5f0c9c8862da56988fa67b2 | [
"BSD-2-Clause"
] | 95 | 2015-08-11T14:36:12.000Z | 2022-03-31T23:01:01.000Z | from functools import partial
from typing import Callable
from typing import TYPE_CHECKING
from ...config import Conf
from .menu import Menu, MenuEntry, MenuSeparator
if TYPE_CHECKING:
from ...ui.views.disassembly_view import DisassemblyView
class DisasmInsnContextMenu(Menu):
"""
Dissembly Instruction's ... | 36.306122 | 114 | 0.666948 | 3,308 | 0.929736 | 0 | 0 | 85 | 0.02389 | 0 | 0 | 537 | 0.150927 |
621428e35c36b4c6fb3b8e653cb6dee70e33f859 | 2,787 | py | Python | src/panoptes/pocs/base.py | sarumanplaysguitar/POCS | b6c50cb70b8f3fc2147e975e5cd3cd953956da8d | [
"MIT"
] | null | null | null | src/panoptes/pocs/base.py | sarumanplaysguitar/POCS | b6c50cb70b8f3fc2147e975e5cd3cd953956da8d | [
"MIT"
] | null | null | null | src/panoptes/pocs/base.py | sarumanplaysguitar/POCS | b6c50cb70b8f3fc2147e975e5cd3cd953956da8d | [
"MIT"
] | null | null | null | from requests.exceptions import ConnectionError
from panoptes.pocs import __version__
from panoptes.utils.database import PanDB
from panoptes.utils.config import client
from panoptes.pocs.utils.logger import get_logger
from panoptes.pocs import hardware
# Global database.
PAN_DB_OBJ = None
class PanBase(object):
... | 35.278481 | 97 | 0.642985 | 2,491 | 0.893793 | 0 | 0 | 0 | 0 | 0 | 0 | 1,224 | 0.439182 |
62148220d3b68cf5b490d8e272125fd66f2e326e | 12,455 | py | Python | src/metarl/envs/multi_env_wrapper.py | icml2020submission6857/metarl | 9b66cefa2b6bcb6a38096d629ce8853b47c7171d | [
"MIT"
] | 2 | 2020-03-15T14:35:15.000Z | 2021-02-15T16:38:00.000Z | src/metarl/envs/multi_env_wrapper.py | icml2020submission6857/metarl | 9b66cefa2b6bcb6a38096d629ce8853b47c7171d | [
"MIT"
] | null | null | null | src/metarl/envs/multi_env_wrapper.py | icml2020submission6857/metarl | 9b66cefa2b6bcb6a38096d629ce8853b47c7171d | [
"MIT"
] | 1 | 2020-02-24T03:04:23.000Z | 2020-02-24T03:04:23.000Z | """A wrapper env that handles multiple tasks from different envs.
Useful while training multi-task reinforcement learning algorithms.
It provides observations augmented with one-hot representation of tasks.
"""
import random
import akro
import gym
import numpy as np
def round_robin_strategy(num_tasks, last_task=No... | 29.305882 | 111 | 0.607226 | 5,159 | 0.414211 | 0 | 0 | 1,602 | 0.128623 | 0 | 0 | 8,656 | 0.694982 |
6214cfd0d71589122131f56a39aa2ef13d007862 | 773 | py | Python | MyNewHandTracking.py | Hai-Hoang-88/HandTracking | c35cf442c4305a48ac1182570c266df4d3b877dd | [
"Unlicense"
] | null | null | null | MyNewHandTracking.py | Hai-Hoang-88/HandTracking | c35cf442c4305a48ac1182570c266df4d3b877dd | [
"Unlicense"
] | null | null | null | MyNewHandTracking.py | Hai-Hoang-88/HandTracking | c35cf442c4305a48ac1182570c266df4d3b877dd | [
"Unlicense"
] | null | null | null | import cv2
import mediapipe as mp
import time
import HandTracking_module as htm
# initiate time
pTime = 0
cTime = 0
cap = cv2.VideoCapture(0) # 0 is internal camera, while 1 is external camera
detector = htm.handDetector()
while True:
success, img = cap.read()
img = detector.findHands(img) # get ... | 27.607143 | 91 | 0.619664 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 187 | 0.241915 |
62170b104a1052dcd0eae68ee028a14da9c51172 | 2,113 | py | Python | exercises/en/solution_07_23.py | hfboyce/MCL-DSCI-571-machine-learning | 25757369491ac547daa94ff1143ca7389d433a6e | [
"MIT"
] | 1 | 2020-09-12T15:40:11.000Z | 2020-09-12T15:40:11.000Z | exercises/en/solution_07_23.py | hfboyce/MCL-DSCI-571-machine-learning | 25757369491ac547daa94ff1143ca7389d433a6e | [
"MIT"
] | 13 | 2020-10-02T16:48:24.000Z | 2020-12-09T18:58:21.000Z | exercises/en/solution_07_23.py | hfboyce/MCL-DSCI-571-machine-learning | 25757369491ac547daa94ff1143ca7389d433a6e | [
"MIT"
] | 2 | 2020-10-28T19:43:42.000Z | 2021-03-30T22:57:47.000Z | import numpy as np
import pandas as pd
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
from sklearn.model_selection import train_test_split, cross_validate
from sklearn.preprocessing import OneHotEncoder, StandardScaler, OrdinalEncoder
from sklearn.impute import SimpleImputer
from sklearn... | 37.732143 | 107 | 0.681496 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 546 | 0.2584 |
6217c3865432b1a663db3913c183c3b2bdd9e8cf | 53 | py | Python | src/algorithm/__init__.py | ShogoAkiyama/metaworld.pytorch | 6b08163d2c0d73b6d1d9b4b513d18f0a308e92c4 | [
"MIT"
] | null | null | null | src/algorithm/__init__.py | ShogoAkiyama/metaworld.pytorch | 6b08163d2c0d73b6d1d9b4b513d18f0a308e92c4 | [
"MIT"
] | null | null | null | src/algorithm/__init__.py | ShogoAkiyama/metaworld.pytorch | 6b08163d2c0d73b6d1d9b4b513d18f0a308e92c4 | [
"MIT"
] | null | null | null | from .sac import SAC
from .eval import EvalAlgorithm
| 17.666667 | 31 | 0.811321 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6218792313b28bf05b712a8e421f24aaaa0f9100 | 8,110 | py | Python | Parallel_POD/online_svd_parallel.py | Romit-Maulik/Tutorials-Demos-Practice | a58ddc819f24a16f7059e63d7f201fc2cd23e03a | [
"MIT"
] | 8 | 2020-09-02T14:46:07.000Z | 2021-11-29T15:27:05.000Z | Parallel_POD/online_svd_parallel.py | omersan/Practice | 77eecdc2a202e6b333123cfd92e7db6dc0eea021 | [
"MIT"
] | 18 | 2020-11-13T18:49:33.000Z | 2022-03-12T00:54:43.000Z | Parallel_POD/online_svd_parallel.py | omersan/Practice | 77eecdc2a202e6b333123cfd92e7db6dc0eea021 | [
"MIT"
] | 5 | 2019-09-25T23:57:00.000Z | 2021-04-18T08:15:34.000Z | import numpy as np
np.random.seed(10)
import matplotlib.pyplot as plt
from mpi4py import MPI
# For shared memory deployment: `export OPENBLAS_NUM_THREADS=1`
# Method of snapshots
def generate_right_vectors(A):
'''
A - Snapshot matrix - shape: NxS
returns V - truncated right singular vectors
'''
ne... | 30.954198 | 108 | 0.569667 | 5,904 | 0.72799 | 0 | 0 | 0 | 0 | 0 | 0 | 1,750 | 0.215783 |
62190035d82be78029e09978dd1bef9d1d34feb6 | 12,887 | py | Python | joboffers/models.py | Devecoop/pyarweb | ee42f0aa871569cc30a6a678dcdc43293d38c0bb | [
"Apache-2.0"
] | 1 | 2022-01-14T18:38:25.000Z | 2022-01-14T18:38:25.000Z | joboffers/models.py | Devecoop/pyarweb | ee42f0aa871569cc30a6a678dcdc43293d38c0bb | [
"Apache-2.0"
] | 37 | 2022-01-17T14:41:51.000Z | 2022-02-16T13:50:05.000Z | joboffers/models.py | Devecoop/pyarweb | ee42f0aa871569cc30a6a678dcdc43293d38c0bb | [
"Apache-2.0"
] | null | null | null | import html
import json
import re
from datetime import date
from autoslug import AutoSlugField
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.core.validators import MinLengthValidator
from django.db.models.aggregates import Count
from django.db import models
fr... | 32.298246 | 96 | 0.632575 | 12,204 | 0.945827 | 0 | 0 | 2,714 | 0.210339 | 0 | 0 | 3,583 | 0.277687 |
621946fa869b479764d5f279c948e790f062b5f0 | 32,670 | py | Python | lib/networks/ResNet101_HICO.py | zhihou7/VCL | 1bc21ec64d3bae15b8bac524cfa4beeaf08f2c48 | [
"MIT"
] | 29 | 2020-07-28T03:11:21.000Z | 2022-03-09T04:37:47.000Z | lib/networks/ResNet101_HICO.py | zhihou7/VCL | 1bc21ec64d3bae15b8bac524cfa4beeaf08f2c48 | [
"MIT"
] | 8 | 2020-08-19T06:40:42.000Z | 2022-03-07T03:48:57.000Z | lib/networks/ResNet101_HICO.py | zhihou7/VCL | 1bc21ec64d3bae15b8bac524cfa4beeaf08f2c48 | [
"MIT"
] | 7 | 2020-07-20T09:05:17.000Z | 2021-11-26T13:04:25.000Z | # --------------------------------------------------------
# Tensorflow VCL
# Licensed under The MIT License [see LICENSE for details]
# Written by Zhi Hou, based on code from Transferable-Interactiveness-Network, Chen Gao, Zheqi he and Xinlei Chen
# --------------------------------------------------------
from __futu... | 52.949757 | 158 | 0.589654 | 30,682 | 0.939149 | 0 | 0 | 0 | 0 | 0 | 0 | 2,619 | 0.080165 |
621b663ff688adbcc08ffd8203aafeded181974f | 7,738 | py | Python | nova_powervm/tests/virt/powervm/test_mgmt.py | openstack/nova-powervm | 376d9493e2a10313068508daf9054d7ecf6d121f | [
"Apache-2.0"
] | 24 | 2015-10-18T02:55:20.000Z | 2021-11-17T11:43:51.000Z | nova_powervm/tests/virt/powervm/test_mgmt.py | openstack/nova-powervm | 376d9493e2a10313068508daf9054d7ecf6d121f | [
"Apache-2.0"
] | null | null | null | nova_powervm/tests/virt/powervm/test_mgmt.py | openstack/nova-powervm | 376d9493e2a10313068508daf9054d7ecf6d121f | [
"Apache-2.0"
] | 12 | 2015-10-26T17:38:05.000Z | 2021-07-21T12:45:19.000Z | # Copyright 2015, 2017 IBM Corp.
#
# 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 require... | 40.093264 | 79 | 0.652106 | 6,790 | 0.877488 | 0 | 0 | 6,370 | 0.82321 | 0 | 0 | 2,016 | 0.260532 |
621e1832f00c1f8797826395cfb9b871267408f4 | 960 | py | Python | tools.py | fairuzap97/psgan | 18d49d3d9e6dcb66e019764141fc855d04e4b25b | [
"MIT"
] | 29 | 2018-02-16T09:56:08.000Z | 2022-01-27T16:22:40.000Z | tools.py | fairuzap97/psgan | 18d49d3d9e6dcb66e019764141fc855d04e4b25b | [
"MIT"
] | null | null | null | tools.py | fairuzap97/psgan | 18d49d3d9e6dcb66e019764141fc855d04e4b25b | [
"MIT"
] | 16 | 2018-09-24T21:16:25.000Z | 2021-09-26T09:22:07.000Z | # -*- coding: utf-8 -*-
import sys, os
from time import time
def create_dir(folder):
'''
creates a folder, if necessary
'''
if not os.path.exists(folder):
os.makedirs(folder)
class TimePrint(object):
'''
Simple convenience class to print who long it takes between successive calls to ... | 24.615385 | 145 | 0.591667 | 692 | 0.720833 | 0 | 0 | 201 | 0.209375 | 0 | 0 | 498 | 0.51875 |
621e26224a5b7df57e76176ccf102f633408ef39 | 290 | py | Python | models/catch_event.py | THM-MA/XSDATA-waypoint | dd94442f9d6677c525bf3ebb03c15fec52fa1079 | [
"MIT"
] | null | null | null | models/catch_event.py | THM-MA/XSDATA-waypoint | dd94442f9d6677c525bf3ebb03c15fec52fa1079 | [
"MIT"
] | null | null | null | models/catch_event.py | THM-MA/XSDATA-waypoint | dd94442f9d6677c525bf3ebb03c15fec52fa1079 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from .t_catch_event import TCatchEvent
__NAMESPACE__ = "http://www.omg.org/spec/BPMN/20100524/MODEL"
@dataclass
class CatchEvent(TCatchEvent):
class Meta:
name = "catchEvent"
namespace = "http://www.omg.org/spec/BPMN/20100524/MODEL"
| 24.166667 | 65 | 0.731034 | 140 | 0.482759 | 0 | 0 | 151 | 0.52069 | 0 | 0 | 102 | 0.351724 |
621f31f3e4ecd411a063519956fdcb002c6f41f7 | 1,305 | py | Python | jarviscli/plugins/advice_giver.py | hugofpaiva/Jarvis | 8c7bec950fa2850cba635e2dfcb45e3e8107fbf2 | [
"MIT"
] | null | null | null | jarviscli/plugins/advice_giver.py | hugofpaiva/Jarvis | 8c7bec950fa2850cba635e2dfcb45e3e8107fbf2 | [
"MIT"
] | null | null | null | jarviscli/plugins/advice_giver.py | hugofpaiva/Jarvis | 8c7bec950fa2850cba635e2dfcb45e3e8107fbf2 | [
"MIT"
] | null | null | null | import random
from plugin import plugin
ANSWERS = [
"No",
"Yes",
"You Can Do It!",
"I Cant Help You",
"Sorry To hear That, But You Must Forget :(",
"Keep It Up!",
"Nice",
"Dont Do It Ever Again",
"I Like It, Good Job",
"I Am Not Certain",
"Too Bad For You, Try To Find Something Else To Do And Enj... | 27.765957 | 65 | 0.556322 | 0 | 0 | 0 | 0 | 749 | 0.573946 | 0 | 0 | 631 | 0.483525 |
621f442528eb038457c4f4d99ef47c676a11ad6e | 3,204 | py | Python | PaddleRec/text_matching_on_quora/models/sse.py | suytingwan/models | ccdbfe77d071cc19b55fb9f4b738912e35d982ef | [
"Apache-2.0"
] | 5 | 2021-09-28T13:28:01.000Z | 2021-12-21T07:25:44.000Z | PaddleRec/text_matching_on_quora/models/sse.py | suytingwan/models | ccdbfe77d071cc19b55fb9f4b738912e35d982ef | [
"Apache-2.0"
] | 2 | 2019-06-26T03:21:49.000Z | 2019-09-19T09:43:42.000Z | PaddleRec/text_matching_on_quora/models/sse.py | suytingwan/models | ccdbfe77d071cc19b55fb9f4b738912e35d982ef | [
"Apache-2.0"
] | 3 | 2019-10-31T07:18:49.000Z | 2020-01-13T03:18:39.000Z | # Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 39.073171 | 79 | 0.5902 | 2,479 | 0.77372 | 0 | 0 | 0 | 0 | 0 | 0 | 862 | 0.269039 |
622058c389457c7cd876a630d6f12b0ece1a7dc1 | 1,342 | py | Python | pelicanconf.py | ChrisAD/attack-website | 222c03f17ea13375753b7323cc7327430974890b | [
"Apache-2.0"
] | 9 | 2020-05-05T22:23:53.000Z | 2021-10-15T18:13:17.000Z | pelicanconf.py | ChrisAD/attack-website | 222c03f17ea13375753b7323cc7327430974890b | [
"Apache-2.0"
] | null | null | null | pelicanconf.py | ChrisAD/attack-website | 222c03f17ea13375753b7323cc7327430974890b | [
"Apache-2.0"
] | 2 | 2020-05-19T05:38:02.000Z | 2021-01-27T12:12:34.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
import json
import uuid
import sys
# import plugins
PLUGIN_PATHS = ['plugins']
PLUGINS = ['assets']
AUTHOR = 'MITRE'
SITENAME = 'ATT&CK'
SITEURL = ''
PATH = 'content'
TIMEZONE = 'America/New_York'
DEFAULT_LANG = 'en'
THEME = '... | 23.137931 | 77 | 0.698957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 557 | 0.415052 |
62219b03355dbbadf9063de4f0e77f3db6e7d6b9 | 1,810 | py | Python | playbooks/roles/configure-vlan-for-ucsm-baremetal/configure_vlan_on_ucsm_bm.py | CiscoSystems/project-config-third-party | 4f9ca3048d8701db673eaf13714f2b7f529a1831 | [
"Apache-2.0"
] | 2 | 2017-09-19T15:52:22.000Z | 2017-10-30T11:19:05.000Z | playbooks/roles/configure-vlan-for-ucsm-baremetal/configure_vlan_on_ucsm_bm.py | CiscoSystems/project-config-third-party | 4f9ca3048d8701db673eaf13714f2b7f529a1831 | [
"Apache-2.0"
] | 24 | 2017-10-31T11:36:04.000Z | 2018-11-30T17:19:50.000Z | playbooks/roles/configure-vlan-for-ucsm-baremetal/configure_vlan_on_ucsm_bm.py | CiscoSystems/project-config-third-party | 4f9ca3048d8701db673eaf13714f2b7f529a1831 | [
"Apache-2.0"
] | 4 | 2017-09-18T16:02:34.000Z | 2018-05-24T14:58:16.000Z | import argparse
from ucsmsdk.ucshandle import UcsHandle
from ucsmsdk.mometa.vnic.VnicEtherIf import VnicEtherIf
from ucsmsdk.mometa.fabric.FabricVlan import FabricVlan
parser = argparse.ArgumentParser()
parser.add_argument('ucsm_ip')
parser.add_argument('username')
parser.add_argument('password')
parser.add_argument('... | 33.518519 | 77 | 0.674033 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 460 | 0.254144 |
6221a46e082c35a5b882386742c5234fe505e8f6 | 9,529 | py | Python | test/propagation_warn_only_test.py | lechat/jenkinsflow | 87396069dda4f0681829e5d4e264e4f09ae34131 | [
"BSD-3-Clause"
] | null | null | null | test/propagation_warn_only_test.py | lechat/jenkinsflow | 87396069dda4f0681829e5d4e264e4f09ae34131 | [
"BSD-3-Clause"
] | null | null | null | test/propagation_warn_only_test.py | lechat/jenkinsflow | 87396069dda4f0681829e5d4e264e4f09ae34131 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from pytest import raises
from jenkinsflow.flow import serial, parallel, FailedChildJobException, FailedChildJobsException, Propagation, BuildResult
from .framework import api_selec... | 50.68617 | 149 | 0.683702 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 720 | 0.075559 |
6221e9086b65f59966870eca97102d109aabb9a1 | 3,458 | py | Python | RestPy/ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/interface/dhcpv4discoveredinfo/dhcpv4discoveredinfo.py | ralfjon/IxNetwork | c0c834fbc465af69c12fd6b7cee4628baba7fff1 | [
"MIT"
] | null | null | null | RestPy/ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/interface/dhcpv4discoveredinfo/dhcpv4discoveredinfo.py | ralfjon/IxNetwork | c0c834fbc465af69c12fd6b7cee4628baba7fff1 | [
"MIT"
] | null | null | null | RestPy/ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/interface/dhcpv4discoveredinfo/dhcpv4discoveredinfo.py | ralfjon/IxNetwork | c0c834fbc465af69c12fd6b7cee4628baba7fff1 | [
"MIT"
] | null | null | null |
# Copyright 1997 - 2018 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, p... | 34.58 | 217 | 0.738577 | 2,245 | 0.649219 | 0 | 0 | 1,687 | 0.487854 | 0 | 0 | 2,669 | 0.771833 |
62232ec4709e08c7148a5e26f3dac3505151c613 | 17,678 | py | Python | ThreeBotPackages/radicaleserver/radicale/config.py | jimbertools/jumpscaleX_threebot | 9909aa270a1f5d04350c440ad787d755b905c456 | [
"Apache-2.0"
] | null | null | null | ThreeBotPackages/radicaleserver/radicale/config.py | jimbertools/jumpscaleX_threebot | 9909aa270a1f5d04350c440ad787d755b905c456 | [
"Apache-2.0"
] | null | null | null | ThreeBotPackages/radicaleserver/radicale/config.py | jimbertools/jumpscaleX_threebot | 9909aa270a1f5d04350c440ad787d755b905c456 | [
"Apache-2.0"
] | null | null | null | # This file is part of Radicale Server - Calendar Server
# Copyright © 2008-2017 Guillaume Ayoub
# Copyright © 2008 Nicolas Kandel
# Copyright © 2008 Pascal Halter
# Copyright © 2017-2019 Unrud <[email protected]>
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU G... | 37.060797 | 119 | 0.461195 | 5,557 | 0.314274 | 0 | 0 | 0 | 0 | 0 | 0 | 5,448 | 0.30811 |
6224e1d3f02d7b9dda37a271e14789ceeccd2dd5 | 574 | py | Python | code_hashers/attendant.py | ksajan/iis-ms-del | 6339f639d674fedb88454b43dcd64493be2a4558 | [
"MIT"
] | 2 | 2019-12-24T13:32:22.000Z | 2019-12-26T11:26:08.000Z | code_hashers/attendant.py | ksajan/iis-ms-del | 6339f639d674fedb88454b43dcd64493be2a4558 | [
"MIT"
] | 1 | 2019-12-26T07:53:34.000Z | 2019-12-26T07:53:34.000Z | code_hashers/attendant.py | ksajan/iis-ms-del | 6339f639d674fedb88454b43dcd64493be2a4558 | [
"MIT"
] | 35 | 2019-12-22T05:05:43.000Z | 2019-12-22T07:16:56.000Z | class ParkingLot:
def __init__(self, username, latitude, longitude, totalSpace, costHour):
self.username = username
self.latitude = latitude
self.longitude = longitude
self.totalSpace = totalSpace
self.availableSpace = totalSpace
self.costHour = costHour
def getS... | 24.956522 | 76 | 0.651568 | 546 | 0.95122 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.038328 |
6225f21abac38a02faf447c54384fc07ed6ded92 | 10,105 | py | Python | release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/AnalyticalModelStick.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 182 | 2017-06-27T02:26:15.000Z | 2022-03-30T18:53:43.000Z | release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/AnalyticalModelStick.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 28 | 2017-06-27T13:38:23.000Z | 2022-03-15T11:19:44.000Z | release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/AnalyticalModelStick.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 67 | 2017-06-28T09:43:59.000Z | 2022-03-20T21:17:10.000Z | class AnalyticalModelStick(AnalyticalModel,IDisposable):
"""
An element that represents a stick in the structural analytical model.
Could be one of beam,brace or column type.
"""
def Dispose(self):
""" Dispose(self: Element,A_0: bool) """
pass
def GetAlignmentMethod(self,selector):
"""
GetA... | 25.012376 | 215 | 0.705492 | 10,103 | 0.999802 | 0 | 0 | 0 | 0 | 0 | 0 | 8,895 | 0.880257 |
622711071eb4006f1628d4e6d3019ab6f40c0b83 | 1,773 | py | Python | projects/nano_det/net/header.py | yunshangyue71/mycodes | 54b876004c32d38d9c0363fd292d745fee8dff3c | [
"Apache-2.0"
] | null | null | null | projects/nano_det/net/header.py | yunshangyue71/mycodes | 54b876004c32d38d9c0363fd292d745fee8dff3c | [
"Apache-2.0"
] | null | null | null | projects/nano_det/net/header.py | yunshangyue71/mycodes | 54b876004c32d38d9c0363fd292d745fee8dff3c | [
"Apache-2.0"
] | null | null | null | import torch
from torch import nn
from net.init_net import xavier_init
from net.basic_cnn import DWConvBnReluPool
"""
DW-DW-PW
"""
class Head(nn.Module):
def __init__(self,reg_max = 8, #defalut =8个bbox,用于分布, general focal loss format
inChannels = 96, #
clsOutChannels = 7):
... | 30.050847 | 96 | 0.5815 | 1,106 | 0.620303 | 0 | 0 | 0 | 0 | 0 | 0 | 390 | 0.218732 |
622719ea6c5735ec54aa9dbdf7b5a6d8d0c52ce7 | 1,115 | py | Python | hard-gists/1191457/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 21 | 2019-07-08T08:26:45.000Z | 2022-01-24T23:53:25.000Z | hard-gists/1191457/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 5 | 2019-06-15T14:47:47.000Z | 2022-02-26T05:02:56.000Z | hard-gists/1191457/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 17 | 2019-05-16T03:50:34.000Z | 2021-01-14T14:35:12.000Z | #!/usr/bin/env python
import urllib
import sys
import json
from mwlib import parser
from mwlib.refine import compat
if __name__ == "__main__":
params = urllib.urlencode({
"format": "json",
"action": "query",
"prop": "revisions",
"rvprop": "content",
"titles": "ISO_3166-1",
"rvsection": "4",
})
wc = urll... | 22.755102 | 75 | 0.625112 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 279 | 0.250224 |
6228f1664df5b9ec6866831755970b61d71b6d58 | 3,058 | py | Python | ECC_main/platform/slack.py | dongh9508/ECC-main | 904110b70ba3e459d92c6d21a5ad1693b4ee726a | [
"MIT"
] | 2 | 2019-01-23T00:04:18.000Z | 2019-02-01T10:09:15.000Z | ECC_main/platform/slack.py | dongh9508/ECC-main | 904110b70ba3e459d92c6d21a5ad1693b4ee726a | [
"MIT"
] | 26 | 2018-07-11T07:59:46.000Z | 2021-02-08T20:21:46.000Z | ECC_main/platform/slack.py | dongh9508/ECC-main | 904110b70ba3e459d92c6d21a5ad1693b4ee726a | [
"MIT"
] | 2 | 2018-08-31T14:08:19.000Z | 2018-08-31T15:14:29.000Z | from .platformBase import PlatformBase
from django.http import HttpResponse, JsonResponse
from ECC_main.baseRequest import BaseRequest
import ECC_main.settings
import threading
import requests
class Slack(PlatformBase):
def slash_command(request, func):
token = request.POST['token']
if ECC_m... | 35.149425 | 95 | 0.624591 | 2,863 | 0.936233 | 0 | 0 | 0 | 0 | 0 | 0 | 195 | 0.063767 |
62291b009a583ae54f27aedb9899f9e284646d88 | 598 | py | Python | Classes/ex17.py | oDallas/PythomBR | 7d3b3bcefe05ce483f6aa664bbc4962a1e0fd285 | [
"MIT"
] | 1 | 2019-06-02T18:59:18.000Z | 2019-06-02T18:59:18.000Z | Classes/ex17.py | oDallas/PythonBR | 7d3b3bcefe05ce483f6aa664bbc4962a1e0fd285 | [
"MIT"
] | null | null | null | Classes/ex17.py | oDallas/PythonBR | 7d3b3bcefe05ce483f6aa664bbc4962a1e0fd285 | [
"MIT"
] | null | null | null | """"
Crie uma Fazenda de Bichinhos instanciando vários objetos bichinho e mantendo o controle deles através de uma lista.
Imite o funcionamento do programa básico, mas ao invés de exigis que o usuário tome conta de um único bichinho,
exija que ele tome conta da fazenda inteira. Cada opção do menu deveria permitir que o... | 59.8 | 119 | 0.797659 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 609 | 0.995098 |
6229642233706b071d8517f87c02f6fac096a7c6 | 10,468 | py | Python | train.py | Thanh-Hoo/Custom_train_PanNet | aa50df0e32991d35112f3de6627baea963f0827a | [
"MIT"
] | null | null | null | train.py | Thanh-Hoo/Custom_train_PanNet | aa50df0e32991d35112f3de6627baea963f0827a | [
"MIT"
] | null | null | null | train.py | Thanh-Hoo/Custom_train_PanNet | aa50df0e32991d35112f3de6627baea963f0827a | [
"MIT"
] | null | null | null | '''
THis is the main training code.
'''
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0" # set GPU id at the very begining
import argparse
import random
import math
import numpy as np
import torch
import torch.nn.parallel
import torch.optim as optim
import torch.utils.data
import torch.nn.functional as F
from torch.m... | 40.261538 | 154 | 0.545472 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,674 | 0.159916 |
6229671a08873684c79e48db6345c98847757965 | 3,070 | py | Python | bioprocs/scripts/chipseq/pPeakToRegPotential.py | pwwang/biopipen | d53b78aa192fd56a5da457463b099b2aa833b284 | [
"MIT"
] | 2 | 2021-09-10T00:17:52.000Z | 2021-10-10T09:53:09.000Z | bioprocs/scripts/chipseq/pPeakToRegPotential.py | pwwang/biopipen | d53b78aa192fd56a5da457463b099b2aa833b284 | [
"MIT"
] | 1 | 2021-12-02T07:54:09.000Z | 2021-12-02T07:54:09.000Z | bioprocs/scripts/chipseq/pPeakToRegPotential.py | pwwang/biopipen | d53b78aa192fd56a5da457463b099b2aa833b284 | [
"MIT"
] | 2 | 2021-09-10T00:17:54.000Z | 2021-10-10T09:56:40.000Z | import math, gzip
peakfile = "{{peakfile}}"
genefile = "{{genefile}}"
arg_inst = {{args.signal | repr}}
arg_gf = "{{args.genefmt}}"
arg_pf = "{{args.peakfmt}}"
arg_wd = int({{args.window | repr}})
d0 = arg_wd / 2
assert (isinstance(arg_inst, bool))
assert (arg_gf in ['ucsc', 'bed', 'ucsc+gz', 'bed+gz'])
as... | 29.238095 | 76 | 0.587948 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 264 | 0.085993 |
622a87127bb1d17eed572fa385184b37ffbcf8bc | 1,549 | py | Python | parsifal/reviews/migrations/0014_auto_20150710_1445.py | michelav/parsifal | 6633699ad64fd354ddef27f8802a76b7ec7c4ef8 | [
"MIT"
] | 1 | 2020-11-12T08:36:41.000Z | 2020-11-12T08:36:41.000Z | parsifal/reviews/migrations/0014_auto_20150710_1445.py | michelav/parsifal | 6633699ad64fd354ddef27f8802a76b7ec7c4ef8 | [
"MIT"
] | 7 | 2019-11-06T12:44:12.000Z | 2022-01-13T01:48:22.000Z | parsifal/reviews/migrations/0014_auto_20150710_1445.py | michelav/parsifal | 6633699ad64fd354ddef27f8802a76b7ec7c4ef8 | [
"MIT"
] | 3 | 2019-10-05T04:16:59.000Z | 2021-04-20T05:00:50.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('library', '0011_auto_20150706_0957'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
... | 37.780488 | 164 | 0.586185 | 1,407 | 0.908328 | 0 | 0 | 0 | 0 | 0 | 0 | 331 | 0.213686 |
622afea05f222949c88d139d2a220b387b5d925a | 58,968 | py | Python | lua_protobuf/generator.py | JoJo2nd/lua-protobuf | f3fc8d451d4b43152e28a9a1eaa98aa744dcd0f5 | [
"Apache-2.0"
] | null | null | null | lua_protobuf/generator.py | JoJo2nd/lua-protobuf | f3fc8d451d4b43152e28a9a1eaa98aa744dcd0f5 | [
"Apache-2.0"
] | null | null | null | lua_protobuf/generator.py | JoJo2nd/lua-protobuf | f3fc8d451d4b43152e28a9a1eaa98aa744dcd0f5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 Gregory Szorc
#
# 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 w... | 38.692913 | 171 | 0.633734 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 33,205 | 0.563102 |
622c20a0f1ed0a0cb3f5825e401509f63208a68b | 6,303 | py | Python | autoimpute/AutoImpute.py | milescsmith/AutoImpute | b327283f6fe4efc9528052218ad7dbf094c8962c | [
"MIT"
] | null | null | null | autoimpute/AutoImpute.py | milescsmith/AutoImpute | b327283f6fe4efc9528052218ad7dbf094c8962c | [
"MIT"
] | null | null | null | autoimpute/AutoImpute.py | milescsmith/AutoImpute | b327283f6fe4efc9528052218ad7dbf094c8962c | [
"MIT"
] | null | null | null | import os
import numpy as np
import scipy.io
import tensorflow as tf
from sklearn.metrics import mean_absolute_error, mean_squared_error
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
def autoimpute(data: str, debug: bool = True, debug_display_step: int = 1,
hidden_units: int = 2000, lambda_val: int = 1, initial_learning... | 38.668712 | 245 | 0.712201 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,671 | 0.423766 |
622e6af5c7a24d6c89c506a8003134f044a4178c | 6,358 | py | Python | began/train.py | imironhead/ml_gan | f6c3bbb8de9d487cbf8ff821117768ffed04278e | [
"MIT"
] | 8 | 2017-06-11T05:03:30.000Z | 2019-02-13T14:16:47.000Z | began/train.py | imironhead/ml_gan | f6c3bbb8de9d487cbf8ff821117768ffed04278e | [
"MIT"
] | null | null | null | began/train.py | imironhead/ml_gan | f6c3bbb8de9d487cbf8ff821117768ffed04278e | [
"MIT"
] | null | null | null | """
"""
import began
import glob
import os
import tensorflow as tf
FLAGS = tf.app.flags.FLAGS
def sanity_check():
"""
"""
if not os.path.isdir(FLAGS.portraits_dir_path):
raise Exception('invalid portraits directory')
def build_dataset_reader():
"""
"""
paths_png_wildcards = os.path... | 27.764192 | 79 | 0.619063 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,377 | 0.216578 |
622f35e7c59c0030afa33973573d5f2d9c50a69c | 2,771 | py | Python | custom/abt/reports/tests/test_fixture_utils.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 471 | 2015-01-10T02:55:01.000Z | 2022-03-29T18:07:18.000Z | custom/abt/reports/tests/test_fixture_utils.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 14,354 | 2015-01-01T07:38:23.000Z | 2022-03-31T20:55:14.000Z | custom/abt/reports/tests/test_fixture_utils.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 175 | 2015-01-06T07:16:47.000Z | 2022-03-29T13:27:01.000Z | import doctest
from nose.tools import assert_equal, assert_true
from corehq.apps.fixtures.models import (
FieldList,
FixtureDataItem,
FixtureItemField,
)
from custom.abt.reports import fixture_utils
from custom.abt.reports.fixture_utils import (
dict_values_in,
fixture_data_item_to_dict,
)
def t... | 26.644231 | 59 | 0.512811 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 348 | 0.125586 |
622f4213fd755d69fc4b1a99782a6a2eaed6ce0c | 1,223 | py | Python | test/test_edit_contact.py | Lenchik13/Testing | fce156bfb639773056745ab1be19a840770739d4 | [
"Apache-2.0"
] | null | null | null | test/test_edit_contact.py | Lenchik13/Testing | fce156bfb639773056745ab1be19a840770739d4 | [
"Apache-2.0"
] | null | null | null | test/test_edit_contact.py | Lenchik13/Testing | fce156bfb639773056745ab1be19a840770739d4 | [
"Apache-2.0"
] | null | null | null | from model.contact import Contact
import random
def test_edit_contact(app, db, check_ui):
app.open_home_page()
if app.contact.count() == 0:
app.contact.create(Contact(firstname="Contact", lastname="", nickname="",
address="", company="", home="",
... | 42.172414 | 123 | 0.611611 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.058054 |
622f91861f9e766601a659b3e6368f910237afb0 | 159 | py | Python | Source Codes Testing/list1.py | urstrulykkr/Python | 098ed5d391f0e62d4950ca80cc57a032c65d1637 | [
"MIT"
] | null | null | null | Source Codes Testing/list1.py | urstrulykkr/Python | 098ed5d391f0e62d4950ca80cc57a032c65d1637 | [
"MIT"
] | null | null | null | Source Codes Testing/list1.py | urstrulykkr/Python | 098ed5d391f0e62d4950ca80cc57a032c65d1637 | [
"MIT"
] | null | null | null | lst1=list()
lst1.append('K')
lst1.append('A')
lst2=['U', 'S', 'H', 'I', 'K']
print(lst1+lst2)
print(lst2[0] +lst2[1]+lst1[1])
for i in lst1+lst2:
print(i)
| 14.454545 | 32 | 0.578616 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.132075 |
6231b011e60ef30120a9f211ba32d24a861eec6c | 17,825 | py | Python | sintel_GANs/flow_cgan_sintel_ssim_uv.py | tanlinc/opticalFlowGAN | f568e531265029f2f25f223ee92e1f53c0bb52f6 | [
"MIT"
] | 1 | 2018-07-24T05:40:44.000Z | 2018-07-24T05:40:44.000Z | sintel_GANs/flow_cgan_sintel_ssim_uv.py | tanlinc/opticalFlowGAN | f568e531265029f2f25f223ee92e1f53c0bb52f6 | [
"MIT"
] | null | null | null | sintel_GANs/flow_cgan_sintel_ssim_uv.py | tanlinc/opticalFlowGAN | f568e531265029f2f25f223ee92e1f53c0bb52f6 | [
"MIT"
] | null | null | null | import os, sys
sys.path.append(os.getcwd())
import time
import numpy as np
import tensorflow as tf
import tflib as lib
import tflib.ops.linear
import tflib.ops.conv2d
import tflib.ops.batchnorm
import tflib.ops.deconv2d
import tflib.save_images
import tflib.plot
import tflib.flow_handler as fh
import tflib.SINTELdata... | 52.272727 | 176 | 0.675792 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,136 | 0.344236 |
6232533ff943a823cead2f8d5e39f9cced275e1a | 872 | py | Python | Development/Scripts/sobel_edge_regular.py | simonsimon006/tensorflow-wavelets | 21a095bf0048ae2488ca5ae4961d2cbfe94263a9 | [
"MIT"
] | null | null | null | Development/Scripts/sobel_edge_regular.py | simonsimon006/tensorflow-wavelets | 21a095bf0048ae2488ca5ae4961d2cbfe94263a9 | [
"MIT"
] | 1 | 2021-11-11T14:47:43.000Z | 2021-11-11T14:52:51.000Z | Development/Scripts/sobel_edge_regular.py | simonsimon006/tensorflow-wavelets | 21a095bf0048ae2488ca5ae4961d2cbfe94263a9 | [
"MIT"
] | 1 | 2021-11-11T12:18:21.000Z | 2021-11-11T12:18:21.000Z | import cv2
# Read the original image
img = cv2.imread('../input/LennaGrey.png', 1)
# Display original image
cv2.imshow('Original', img)
cv2.waitKey(0)
# Convert to graycsale
img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
# Blur the image for better edge detection
img_blur = cv2.GaussianBlur(img_gray, (3,3), 0)
# S... | 36.333333 | 113 | 0.738532 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.423165 |
6232c87d0d4107ba98750270bdd408dd5d0b9dfa | 1,389 | py | Python | src/python/pants/backend/terraform/target_types.py | danxmoran/pants | 7fafd7d789747c9e6a266847a0ccce92c3fa0754 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/terraform/target_types.py | danxmoran/pants | 7fafd7d789747c9e6a266847a0ccce92c3fa0754 | [
"Apache-2.0"
] | 22 | 2022-01-27T09:59:50.000Z | 2022-03-30T07:06:49.000Z | src/python/pants/backend/terraform/target_types.py | danxmoran/pants | 7fafd7d789747c9e6a266847a0ccce92c3fa0754 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
from dataclasses import dataclass
from pants.engine.rules import collect_rules
from pants.engine.target import (
COMMON_TARGET_FIELDS,
Dependen... | 26.711538 | 92 | 0.735781 | 844 | 0.607631 | 0 | 0 | 153 | 0.110151 | 0 | 0 | 463 | 0.333333 |
623385600c5a7bc996eaff731400e30ab4f95471 | 4,462 | py | Python | src/mdns_client/util.py | bgamari/micropython-mdns | b1a9473cd5200e97ee578be4c623bbd610f46b6c | [
"MIT"
] | 22 | 2021-01-06T02:52:35.000Z | 2022-03-18T00:28:01.000Z | src/mdns_client/util.py | bgamari/micropython-mdns | b1a9473cd5200e97ee578be4c623bbd610f46b6c | [
"MIT"
] | 3 | 2021-04-19T15:44:09.000Z | 2021-08-31T19:17:24.000Z | src/mdns_client/util.py | bgamari/micropython-mdns | b1a9473cd5200e97ee578be4c623bbd610f46b6c | [
"MIT"
] | 5 | 2021-03-10T10:24:46.000Z | 2021-10-11T15:57:24.000Z | import struct
import uasyncio
from mdns_client.constants import REPEAT_TYPE_FLAG, TYPE_CNAME, TYPE_MX, TYPE_NS, TYPE_PTR, TYPE_SOA, TYPE_SRV
def dotted_ip_to_bytes(ip: str) -> bytes:
"""
Convert a dotted IPv4 address string into four bytes, with
some sanity checks
"""
ip_ints = [int(i) for i in ... | 29.163399 | 110 | 0.64814 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.026221 | 947 | 0.212237 |
6235e26627f5dd8b3c591b34af122e6dd4fe2d7f | 1,029 | py | Python | algorithms/selection_sort.py | maneeshd/Algorithms-and-DataStructures | 5c50de586657f0135edaa2e624dfe2648c9c4eef | [
"MIT"
] | null | null | null | algorithms/selection_sort.py | maneeshd/Algorithms-and-DataStructures | 5c50de586657f0135edaa2e624dfe2648c9c4eef | [
"MIT"
] | null | null | null | algorithms/selection_sort.py | maneeshd/Algorithms-and-DataStructures | 5c50de586657f0135edaa2e624dfe2648c9c4eef | [
"MIT"
] | null | null | null | """
@author: Maneesh D
@date: 11-Jul-17
@intepreter: Python 3.6
Worst Case Analysis: Selection Sort -> O(n^2)
"""
from timeit import Timer, default_timer
from random import shuffle
ARR = list()
def selection_sort(data):
"""Selection sort implementation"""
for i in range(len(data)):
min_pos = i
... | 23.386364 | 71 | 0.595724 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 374 | 0.36346 |
623654c971708305dfa901f1772fac7478631021 | 917 | py | Python | image_repo/migrations/0002_auto_20210505_1448.py | elena-kolomeets/Django-Repo | f326b058dc70562a6815248df1b7550c0b634a73 | [
"MIT"
] | null | null | null | image_repo/migrations/0002_auto_20210505_1448.py | elena-kolomeets/Django-Repo | f326b058dc70562a6815248df1b7550c0b634a73 | [
"MIT"
] | null | null | null | image_repo/migrations/0002_auto_20210505_1448.py | elena-kolomeets/Django-Repo | f326b058dc70562a6815248df1b7550c0b634a73 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-05-05 12:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('image_repo', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='image',
name='colors',
f... | 26.970588 | 75 | 0.555071 | 826 | 0.900763 | 0 | 0 | 0 | 0 | 0 | 0 | 142 | 0.154853 |
6236a853e217ec41f065c4c8899eb05e1e528ac1 | 21,375 | py | Python | ToricLearning/ising.py | danielfreeman11/thermal-toric-code | 3718f1b16737dfae09443466f6cfb65036faaa89 | [
"MIT"
] | 6 | 2017-11-15T00:54:13.000Z | 2021-11-21T02:08:21.000Z | ToricLearning/ising.py | danielfreeman11/thermal-toric-code | 3718f1b16737dfae09443466f6cfb65036faaa89 | [
"MIT"
] | null | null | null | ToricLearning/ising.py | danielfreeman11/thermal-toric-code | 3718f1b16737dfae09443466f6cfb65036faaa89 | [
"MIT"
] | null | null | null | """
Ising model one-shot dynamics simulation.
From C. Daniel Freeman (2016 http://arxiv.org/abs/1603.05005)
"""
import logging
import math
import gym
from gym import spaces
from gym.utils import seeding
import numpy as np
#import isingutils.py
import random
from random import choice
import copy
import sys
from compil... | 34.364952 | 215 | 0.705076 | 20,971 | 0.981099 | 0 | 0 | 0 | 0 | 0 | 0 | 5,290 | 0.247485 |
62379999fae8c7604ac402164b9ffd7d1051d067 | 41,940 | py | Python | pkg/vtreat/vtreat_impl.py | sthagen/pyvtreat | 01cd9a70a6e1af779057fea90a9a43c2822cceb2 | [
"BSD-3-Clause"
] | 1 | 2019-12-23T19:53:27.000Z | 2019-12-23T19:53:27.000Z | pkg/vtreat/vtreat_impl.py | sthagen/pyvtreat | 01cd9a70a6e1af779057fea90a9a43c2822cceb2 | [
"BSD-3-Clause"
] | null | null | null | pkg/vtreat/vtreat_impl.py | sthagen/pyvtreat | 01cd9a70a6e1af779057fea90a9a43c2822cceb2 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Jul 20 12:07:57 2019
@author: johnmount
"""
from abc import ABC
import math
import pprint
import warnings
import numpy
import pandas
import vtreat.util
import vtreat.transform
def ready_data_frame(d):
orig_type = type(d)
if orig_type == numpy.ndarray:
d =... | 38.869323 | 115 | 0.612375 | 11,028 | 0.262947 | 0 | 0 | 0 | 0 | 0 | 0 | 6,418 | 0.153028 |
62383bc8933f1f4eaa948064e8b702400552ae83 | 428 | py | Python | resqs/core/urls.py | UMass-Rescue/moto | 3aa52aca28c622be9708da5fd31a8c8b92801634 | [
"Apache-2.0"
] | null | null | null | resqs/core/urls.py | UMass-Rescue/moto | 3aa52aca28c622be9708da5fd31a8c8b92801634 | [
"Apache-2.0"
] | null | null | null | resqs/core/urls.py | UMass-Rescue/moto | 3aa52aca28c622be9708da5fd31a8c8b92801634 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
from .responses import MotoAPIResponse
url_bases = ["https?://motoapi.amazonaws.com"]
response_instance = MotoAPIResponse()
url_paths = {
"{0}/resqs-api/$": response_instance.dashboard,
"{0}/resqs-api/data.json": response_instance.model_data,
"{0}/resqs-api/reset":... | 30.571429 | 70 | 0.752336 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 121 | 0.28271 |
6238442b97ca6a6ef8a0ad9749bdaae56317f29d | 1,305 | py | Python | hammer/tracker.py | mizerlou/hammer | 353f176bffff4a6b7726361cdafb986fe2302f19 | [
"Apache-2.0"
] | 1 | 2016-06-06T20:22:13.000Z | 2016-06-06T20:22:13.000Z | hammer/tracker.py | mizerlou/hammer | 353f176bffff4a6b7726361cdafb986fe2302f19 | [
"Apache-2.0"
] | null | null | null | hammer/tracker.py | mizerlou/hammer | 353f176bffff4a6b7726361cdafb986fe2302f19 | [
"Apache-2.0"
] | null | null | null | import anydbm, os.path, time, bsddb, sys
class MessageTracker:
def __init__(self, tracker_file):
flag = (os.path.exists(tracker_file) and "w") or "c"
#self.tracker = anydbm.open(tracker_file, flag)
self.tracker = bsddb.hashopen(tracker_file, flag)
def close(self):
self.... | 27.1875 | 68 | 0.514943 | 1,262 | 0.96705 | 0 | 0 | 0 | 0 | 0 | 0 | 242 | 0.185441 |
623beafade5cf281facce9b0ef0d77606bd2dfcb | 1,353 | py | Python | code/glove_bot.py | AmanPriyanshu/Bavardez | 221980add10a8bea69db4d3357660d27a8d6cdb3 | [
"MIT"
] | 1 | 2021-12-28T13:16:17.000Z | 2021-12-28T13:16:17.000Z | glove_bot.py | AmanPriyanshu/Bavardez | 221980add10a8bea69db4d3357660d27a8d6cdb3 | [
"MIT"
] | null | null | null | glove_bot.py | AmanPriyanshu/Bavardez | 221980add10a8bea69db4d3357660d27a8d6cdb3 | [
"MIT"
] | null | null | null | import random
import torch
import pandas as pd
import numpy as np
from glove_model import get_model
from intent_initializer import read_all_intents, read_all_responses
from GloVe_helper import GloVeLoader
PATH = './config/'
BOT_NAME = 'Bavardez'
def load_bot():
model_details = torch.load(PATH+'model_details_GloVe.pt... | 27.06 | 107 | 0.725795 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 286 | 0.211382 |
623c5e03f30d1e94a196a72edaa4010032eb29e4 | 984 | py | Python | tests/coworks/biz/test_biz_ms.py | sidneyarcidiacono/coworks | 7f51b83e8699ced991d16a5a43ad19e569b6e814 | [
"MIT"
] | null | null | null | tests/coworks/biz/test_biz_ms.py | sidneyarcidiacono/coworks | 7f51b83e8699ced991d16a5a43ad19e569b6e814 | [
"MIT"
] | null | null | null | tests/coworks/biz/test_biz_ms.py | sidneyarcidiacono/coworks | 7f51b83e8699ced991d16a5a43ad19e569b6e814 | [
"MIT"
] | null | null | null | import pytest
import requests
from tests.coworks.biz.biz_ms import BizMS
from tests.coworks.tech.test_ms import SimpleMS
class TestClass:
def atest_ms(self, local_server_factory):
tech = SimpleMS()
with pytest.raises(Exception) as pytest_wrapped_e:
@tech.schedule('rate(1 hour)', nam... | 30.75 | 85 | 0.642276 | 859 | 0.872967 | 0 | 0 | 379 | 0.385163 | 0 | 0 | 119 | 0.120935 |
623d0484a6ad38e8b613031601faa989033dfbd4 | 1,030 | py | Python | d3rlpy/iterators/random_iterator.py | YangRui2015/d3rlpy | da778b2a2b0afbafe25395296baecd0d4d0cd0d5 | [
"MIT"
] | 1 | 2021-05-08T06:21:05.000Z | 2021-05-08T06:21:05.000Z | d3rlpy/iterators/random_iterator.py | YangRui2015/d3rlpy | da778b2a2b0afbafe25395296baecd0d4d0cd0d5 | [
"MIT"
] | null | null | null | d3rlpy/iterators/random_iterator.py | YangRui2015/d3rlpy | da778b2a2b0afbafe25395296baecd0d4d0cd0d5 | [
"MIT"
] | null | null | null | from typing import List, cast
import numpy as np
from ..dataset import Episode, Transition
from .base import TransitionIterator
class RandomIterator(TransitionIterator):
_n_samples_per_epoch: int
_index: int
def __init__(
self,
episodes: List[Episode],
batch_size: int,
... | 26.410256 | 76 | 0.635922 | 897 | 0.870874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
623e6cd0ebfab7a2fa9506ea275e7ff09e80964a | 420 | py | Python | src/logger.py | Electronya/rc-mission-operator | 2e1571a68df9df82629ebc4eebb248c055fe6066 | [
"MIT"
] | null | null | null | src/logger.py | Electronya/rc-mission-operator | 2e1571a68df9df82629ebc4eebb248c055fe6066 | [
"MIT"
] | 8 | 2021-09-02T23:58:28.000Z | 2021-11-20T22:49:16.000Z | src/logger.py | Electronya/rc-mission-operator | 2e1571a68df9df82629ebc4eebb248c055fe6066 | [
"MIT"
] | null | null | null | import logging
import os
def initLogger() -> object:
"""
Initialize the logger.
"""
logger_level = logging.INFO
if 'APP_ENV' in os.environ:
if os.environ['APP_ENV'] == 'dev':
logger_level = logging.DEBUG
logging.basicConfig(level=logger_level,
form... | 21 | 59 | 0.552381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 111 | 0.264286 |
623e9fa11082a891b75c31694bc78e3fc6fdef29 | 392 | py | Python | Photo.py | cpt-majkel/hashhash | 5bac15097d8fe84d5c23611fd15ceda727999a41 | [
"MIT"
] | null | null | null | Photo.py | cpt-majkel/hashhash | 5bac15097d8fe84d5c23611fd15ceda727999a41 | [
"MIT"
] | null | null | null | Photo.py | cpt-majkel/hashhash | 5bac15097d8fe84d5c23611fd15ceda727999a41 | [
"MIT"
] | null | null | null | class Photo(object):
def __init__(self, photo_id: int, orientation: str, number_of_tags: int, tags: set):
self.id = photo_id
self.orientation = orientation
self.number_of_tags = number_of_tags
self.tags = tags
self.is_vertical = orientation == 'V'
self.is_horizontal =... | 32.666667 | 88 | 0.635204 | 391 | 0.997449 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.015306 |
623f19da861cce44fb9bf0964c673c92b5ac9b2f | 713 | py | Python | learn_big_data_on_aws/config.py | MacHu-GWU/learn_big_data_on_aws-project | 0db78c35a1712fdd905763fd299663982e44601c | [
"MIT"
] | null | null | null | learn_big_data_on_aws/config.py | MacHu-GWU/learn_big_data_on_aws-project | 0db78c35a1712fdd905763fd299663982e44601c | [
"MIT"
] | null | null | null | learn_big_data_on_aws/config.py | MacHu-GWU/learn_big_data_on_aws-project | 0db78c35a1712fdd905763fd299663982e44601c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from s3pathlib import S3Path
class Config:
aws_profile = "aws_data_lab_sanhe"
aws_region = "us-east-2"
# where you store data, artifacts
bucket = "aws-data-lab-sanhe-for-everything-us-east-2"
# s3 folder for data lake
dataset_prefix = "poc/2022-02-26-learn_big_data_on_... | 24.586207 | 67 | 0.695652 | 635 | 0.890603 | 0 | 0 | 216 | 0.302945 | 0 | 0 | 282 | 0.395512 |
623f3e0f81181826dc28972fa527ecf69b25e1f9 | 15,091 | py | Python | tests/test_plotter_utils.py | natter1/GEDFReader | 360454c80d7aef375d3d5a825e51073ab8bc3d98 | [
"MIT"
] | null | null | null | tests/test_plotter_utils.py | natter1/GEDFReader | 360454c80d7aef375d3d5a825e51073ab8bc3d98 | [
"MIT"
] | 2 | 2021-05-03T22:04:17.000Z | 2021-05-04T10:33:32.000Z | tests/test_plotter_utils.py | natter1/gdef_reader | 360454c80d7aef375d3d5a825e51073ab8bc3d98 | [
"MIT"
] | null | null | null | """
This file contains tests for plotter_utils.py.
@author: Nathanael Jöhrmann
"""
import matplotlib.pyplot as plt
import numpy as np
import pytest
from matplotlib.figure import Figure
from gdef_reporter.plotter_styles import get_plotter_style_histogram
from gdef_reporter.plotter_utils import plot_to_ax, create_plot,... | 49.316993 | 120 | 0.673514 | 14,406 | 0.953724 | 0 | 0 | 0 | 0 | 0 | 0 | 2,861 | 0.189407 |
62407f44181f5ecd79d5e3e000c96c7ee62ec644 | 3,590 | py | Python | eahub/profiles/tests/test_tags_api.py | walambert/eahub.org | 21b6111b2626e4739c249d0881d16fbc818094cb | [
"MIT"
] | 36 | 2019-02-22T23:07:14.000Z | 2022-02-10T13:24:27.000Z | eahub/profiles/tests/test_tags_api.py | walambert/eahub.org | 21b6111b2626e4739c249d0881d16fbc818094cb | [
"MIT"
] | 717 | 2019-02-21T22:07:55.000Z | 2022-02-26T15:17:49.000Z | eahub/profiles/tests/test_tags_api.py | walambert/eahub.org | 21b6111b2626e4739c249d0881d16fbc818094cb | [
"MIT"
] | 19 | 2019-04-14T14:37:56.000Z | 2022-02-14T22:05:16.000Z | from typing import Tuple
from rest_framework.test import APITestCase
from eahub.profiles.models import Profile, ProfileTag, ProfileTagTypeEnum
from eahub.tests.cases import EAHubTestCase
class TagsApiTestCase(EAHubTestCase, APITestCase):
def test_creation(self):
profile, _, _, _ = self._generate_tags()
... | 40.795455 | 77 | 0.659331 | 3,398 | 0.946518 | 0 | 0 | 0 | 0 | 0 | 0 | 405 | 0.112813 |
62416172cffe17c94f2ee1ae5b11d654511779a9 | 279 | py | Python | Task1/chapter14.py | shkhaider2015/AI_Lab_Task | 642a0d5e30515dac6972da194741b829cdc63f30 | [
"Unlicense"
] | null | null | null | Task1/chapter14.py | shkhaider2015/AI_Lab_Task | 642a0d5e30515dac6972da194741b829cdc63f30 | [
"Unlicense"
] | null | null | null | Task1/chapter14.py | shkhaider2015/AI_Lab_Task | 642a0d5e30515dac6972da194741b829cdc63f30 | [
"Unlicense"
] | null | null | null | # addition will takes place after multiplication and addition
num1 = 1 + 4 * 3 / 2;
# same as 5 * 3 /2
num2 = (1 + 4) * 3 / 2;
# same as 1+12/2
num3 = 1 + (4 * 3) / 2;
print("python follow precedence rules");
# this should produce 7.5
print(num1);
print(num2);
print(num3); | 18.6 | 61 | 0.620072 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 154 | 0.551971 |
6242dfa1c761870f2a85f43957247c13b7b53277 | 173 | py | Python | cosypose/simulator/__init__.py | ompugao/cosypose | 4e471c16f19d5ee632668cd52eaa57b562f287d6 | [
"MIT"
] | 202 | 2020-08-19T19:28:03.000Z | 2022-03-29T07:10:47.000Z | cosypose/simulator/__init__.py | ompugao/cosypose | 4e471c16f19d5ee632668cd52eaa57b562f287d6 | [
"MIT"
] | 66 | 2020-08-24T09:28:05.000Z | 2022-03-31T07:11:06.000Z | cosypose/simulator/__init__.py | ompugao/cosypose | 4e471c16f19d5ee632668cd52eaa57b562f287d6 | [
"MIT"
] | 66 | 2020-08-19T19:28:05.000Z | 2022-03-18T20:47:55.000Z | from .body import Body
from .camera import Camera
from .base_scene import BaseScene
from .caching import BodyCache, TextureCache
from .textures import apply_random_textures
| 28.833333 | 44 | 0.843931 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
62434c56ee7f47b918c8fe7743e7266baa6b6971 | 2,186 | py | Python | python/scorecard/Config.py | opme/SurgeonScorecard | 788f63fd4f906b27435d18565675553c7b738830 | [
"Apache-2.0"
] | 6 | 2016-11-25T02:01:54.000Z | 2021-08-01T21:54:46.000Z | python/scorecard/Config.py | opme/SurgeonScorecard | 788f63fd4f906b27435d18565675553c7b738830 | [
"Apache-2.0"
] | null | null | null | python/scorecard/Config.py | opme/SurgeonScorecard | 788f63fd4f906b27435d18565675553c7b738830 | [
"Apache-2.0"
] | 2 | 2018-02-20T15:13:25.000Z | 2020-02-16T07:56:06.000Z | import os
import sys
import configparser
class Config:
def __init__(self):
pass
#
# a simple function to read an array of configuration files into a config object
#
def read_config(self, cfg_files):
if(cfg_files != None):
config = configparser.RawConfigParser()
#... | 39.745455 | 96 | 0.515554 | 2,142 | 0.979872 | 0 | 0 | 0 | 0 | 0 | 0 | 910 | 0.416285 |
624457e04a90c3819a6cdb9b28bb79d1ea2ace26 | 726 | py | Python | message_passing_nn/utils/loss_function/loss_functions.py | mathisi-ai/message-passing-neural-network | d6e27fcf05d06268a461e5f9d9cf81b7e3a5dc09 | [
"MIT"
] | null | null | null | message_passing_nn/utils/loss_function/loss_functions.py | mathisi-ai/message-passing-neural-network | d6e27fcf05d06268a461e5f9d9cf81b7e3a5dc09 | [
"MIT"
] | 1 | 2020-12-13T10:37:03.000Z | 2020-12-13T10:37:03.000Z | message_passing_nn/utils/loss_function/loss_functions.py | mathisi-ai/message-passing-neural-network | d6e27fcf05d06268a461e5f9d9cf81b7e3a5dc09 | [
"MIT"
] | null | null | null | from torch import nn
loss_functions = {
"MSE": nn.MSELoss,
"MSEPenalty": nn.MSELoss,
"L1": nn.L1Loss,
"CrossEntropy": nn.CrossEntropyLoss,
"CTC": nn.CTCLoss,
"NLL": nn.NLLLoss,
"PoissonNLL": nn.PoissonNLLLoss,
"KLDiv": nn.KLDivLoss,
"BCE": nn.BCELoss,
"BCEWithLogits": nn.BCEWith... | 30.25 | 56 | 0.69697 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.305785 |
6244eae08f282f33089c904acc046111406cab02 | 234 | py | Python | ex15.py | phyupyarko/python-exercises | f231ca8c8c1f2614bb166cc72ce45860eff88c1d | [
"MIT"
] | null | null | null | ex15.py | phyupyarko/python-exercises | f231ca8c8c1f2614bb166cc72ce45860eff88c1d | [
"MIT"
] | null | null | null | ex15.py | phyupyarko/python-exercises | f231ca8c8c1f2614bb166cc72ce45860eff88c1d | [
"MIT"
] | null | null | null | from sys import argv
script, filename=argv
txt = open(filename)
print(f"Here's your file {filename}:")
print(txt.read())
print("Type the filename again:")
file_again = input("> ")
txt_again = open (file_again)
print(txt_again.read())
| 23.4 | 38 | 0.726496 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.260684 |
624637a865a05ff1c7e0a5862f34089e64e6bb76 | 4,042 | py | Python | samples/vsphere/vcenter/setup/datacenter.py | restapicoding/VMware-SDK | edc387a76227be1ad7c03e5eeaf603351574f70c | [
"MIT"
] | 589 | 2017-03-09T19:01:22.000Z | 2022-03-23T08:18:32.000Z | samples/vsphere/vcenter/setup/datacenter.py | restapicoding/VMware-SDK | edc387a76227be1ad7c03e5eeaf603351574f70c | [
"MIT"
] | 244 | 2017-03-09T19:37:36.000Z | 2022-03-29T07:14:21.000Z | samples/vsphere/vcenter/setup/datacenter.py | restapicoding/VMware-SDK | edc387a76227be1ad7c03e5eeaf603351574f70c | [
"MIT"
] | 304 | 2017-03-09T19:15:01.000Z | 2022-03-31T04:26:59.000Z | """
* *******************************************************
* Copyright (c) VMware, Inc. 2016-2018. All Rights Reserved.
* SPDX-License-Identifier: MIT
* *******************************************************
*
* DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, WHET... | 36.414414 | 93 | 0.700643 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,353 | 0.334735 |
6247004e81f0b5ed0a8cf58645c7483019728044 | 2,622 | py | Python | chesstab/samples/chessboard.py | RogerMarsh/chesstab | 01d375dc6bf025b621612a84513e55c4640a78ad | [
"BSD-3-Clause"
] | null | null | null | chesstab/samples/chessboard.py | RogerMarsh/chesstab | 01d375dc6bf025b621612a84513e55c4640a78ad | [
"BSD-3-Clause"
] | null | null | null | chesstab/samples/chessboard.py | RogerMarsh/chesstab | 01d375dc6bf025b621612a84513e55c4640a78ad | [
"BSD-3-Clause"
] | null | null | null | # chessboard.py
# Copyright 2008 Roger Marsh
# Licence: See LICENCE (BSD licence)
"""Demonstrate chess board class and methods to draw position on board."""
if __name__ == "__main__":
import tkinter
from pgn_read.core.piece import Piece
from pgn_read.core.constants import (
FEN_WHITE_KING,
... | 33.615385 | 74 | 0.561022 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 452 | 0.172387 |
62491889c9281d49192c898e726bfd3b2dfb6e77 | 731 | py | Python | fruit.py | mattjraives/citrus | dd3cd916b59c932aa490058c4a2c5fc347e89e3c | [
"MIT"
] | null | null | null | fruit.py | mattjraives/citrus | dd3cd916b59c932aa490058c4a2c5fc347e89e3c | [
"MIT"
] | null | null | null | fruit.py | mattjraives/citrus | dd3cd916b59c932aa490058c4a2c5fc347e89e3c | [
"MIT"
] | null | null | null | class Fruit:
def __init__(self,name,parents):
self.name = name
self.parents = parents
self.children = []
self.family = []
self.siblings = []
self.node = None ## Link to node object in graph
def find_children(self,basket): # basket is a list of Fruit objects
for fruit in basket:
if ... | 33.227273 | 69 | 0.645691 | 730 | 0.998632 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.090287 |
624ae61e4b1438e943cbf012e0b99192c749fb82 | 3,694 | py | Python | Pandas/8_GroupingAndAggregating .py | ErfanRasti/PythonCodes | 5e4569b760b60c9303d5cc68650a2448c9065b6d | [
"MIT"
] | 1 | 2021-10-01T09:59:22.000Z | 2021-10-01T09:59:22.000Z | Pandas/8_GroupingAndAggregating .py | ErfanRasti/PythonCodes | 5e4569b760b60c9303d5cc68650a2448c9065b6d | [
"MIT"
] | null | null | null | Pandas/8_GroupingAndAggregating .py | ErfanRasti/PythonCodes | 5e4569b760b60c9303d5cc68650a2448c9065b6d | [
"MIT"
] | null | null | null | # %%
"""
Let's get familiar with Grouping and Aggregating.
Aggregating means combining multiple pieces of data into a single result.
Mean, median or the mod are aggregating functions.
"""
import pandas as pd
# %%
df = pd.read_csv(
"developer_survey_2019/survey_results_public.csv", index_col="Respondent")... | 25.475862 | 79 | 0.666486 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,127 | 0.575799 |
624cbb34ddb09a80deca0b22d3e463f92b89210a | 13,077 | py | Python | code/cantera_tools.py | goldmanm/RMG_isotopes_paper_data | 234bd5266de71d6ec9179cb3a7ff490cb56ef91a | [
"MIT"
] | null | null | null | code/cantera_tools.py | goldmanm/RMG_isotopes_paper_data | 234bd5266de71d6ec9179cb3a7ff490cb56ef91a | [
"MIT"
] | null | null | null | code/cantera_tools.py | goldmanm/RMG_isotopes_paper_data | 234bd5266de71d6ec9179cb3a7ff490cb56ef91a | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import re
import warnings
import copy
import cantera as ct
def run_simulation(solution, times, conditions=None,
condition_type = 'adiabatic-constant-volume',
output_species = True,
output_reactions = True,
... | 44.030303 | 261 | 0.640132 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,599 | 0.428156 |
624d1459e0b41f6ddd69ef8b0b14aebd60ee00c3 | 4,495 | py | Python | chariquisitor.py | strycore/chariquisitor | 539dcbf5e051222371e747547a8b1e8805db4366 | [
"WTFPL"
] | 1 | 2017-09-26T09:59:54.000Z | 2017-09-26T09:59:54.000Z | chariquisitor.py | strycore/chariquisitor | 539dcbf5e051222371e747547a8b1e8805db4366 | [
"WTFPL"
] | null | null | null | chariquisitor.py | strycore/chariquisitor | 539dcbf5e051222371e747547a8b1e8805db4366 | [
"WTFPL"
] | null | null | null | import json
from collections import defaultdict
SEGMENTS = ['workings', 'shinies', 'controls', 'fun']
REVIEWERS = ['venn', 'jordan', 'pedro']
def iter_charis():
with open('charis.json') as charis_file:
charis = json.load(charis_file)
for chari in charis:
if not chari['name']:
co... | 34.844961 | 115 | 0.588877 | 0 | 0 | 526 | 0.117019 | 0 | 0 | 0 | 0 | 718 | 0.159733 |
624d23bb02f0a1700a789fe03a84f9cdb053398e | 2,970 | py | Python | dense_main.py | Ale-Ba2lero/CNN-FromScratch | 8337db42f3aa0eae878a2724f382039c27498d70 | [
"MIT"
] | 1 | 2021-09-17T17:06:16.000Z | 2021-09-17T17:06:16.000Z | dense_main.py | Ale-Ba2lero/CNN-FromScratch | 8337db42f3aa0eae878a2724f382039c27498d70 | [
"MIT"
] | null | null | null | dense_main.py | Ale-Ba2lero/CNN-FromScratch | 8337db42f3aa0eae878a2724f382039c27498d70 | [
"MIT"
] | null | null | null | import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import minmax_scale
import matplotlib.pyplot as plt
from model.loss import CategoricalCrossEntropy
from model.layers.dense import Dense
from model.layers.relu import LeakyReLU
from model.layers.softmax import Softmax
fro... | 31.595745 | 105 | 0.596633 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,094 | 0.36835 |
624dc465ea933ab310312f6e6dd327e58c7d9b64 | 3,156 | py | Python | Tools/Scripts/webkitpy/common/interrupt_debugging.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/common/interrupt_debugging.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/common/interrupt_debugging.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2019 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | 36.697674 | 131 | 0.701521 | 667 | 0.211343 | 0 | 0 | 0 | 0 | 0 | 0 | 1,469 | 0.465463 |
624ded040b53f88852fd60dd292b8fb6fb23b421 | 1,164 | py | Python | django_watermark_images/items/migrations/0001_initial.py | abarto/django-watermark-images | 5f01c8f0da7359c4d96650029d5beb70938fbe47 | [
"MIT"
] | 11 | 2016-12-05T01:12:46.000Z | 2021-05-05T21:41:14.000Z | django_watermark_images/items/migrations/0001_initial.py | abarto/django-watermark-images | 5f01c8f0da7359c4d96650029d5beb70938fbe47 | [
"MIT"
] | 1 | 2020-11-30T13:26:06.000Z | 2020-12-05T11:44:59.000Z | django_watermark_images/items/migrations/0001_initial.py | abarto/django-watermark-images | 5f01c8f0da7359c4d96650029d5beb70938fbe47 | [
"MIT"
] | 3 | 2017-02-07T03:36:42.000Z | 2020-08-10T00:16:04.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-09-10 16:15
from __future__ import unicode_literals
from django.db import migrations, models
import django_extensions.db.fields
import items.models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
... | 35.272727 | 124 | 0.630584 | 953 | 0.818729 | 0 | 0 | 0 | 0 | 0 | 0 | 194 | 0.166667 |
62508c428e962c8534fc320110d894864b15ebbe | 11,380 | py | Python | cadnano/views/documentwindow.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | 1 | 2022-03-27T14:37:32.000Z | 2022-03-27T14:37:32.000Z | cadnano/views/documentwindow.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | null | null | null | cadnano/views/documentwindow.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | 1 | 2021-01-22T02:29:38.000Z | 2021-01-22T02:29:38.000Z | from PyQt5.QtCore import Qt
from PyQt5.QtCore import QSettings
from PyQt5.QtCore import QPoint, QSize
from PyQt5.QtWidgets import QGraphicsScene
from PyQt5.QtWidgets import QMainWindow
from PyQt5.QtWidgets import QGraphicsItem
from PyQt5.QtWidgets import QAction, QApplication, QWidget
from cadnano import app
from cad... | 39.79021 | 102 | 0.675747 | 10,319 | 0.906766 | 0 | 0 | 0 | 0 | 0 | 0 | 2,307 | 0.202724 |
6250a79068b77c4892032d50b57910bd5cac5d15 | 42,245 | py | Python | uhd_restpy/testplatform/sessions/ixnetwork/topology/ospfv3_c029fd7cd4a9e9897b7b4e4547458751.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | uhd_restpy/testplatform/sessions/ixnetwork/topology/ospfv3_c029fd7cd4a9e9897b7b4e4547458751.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | uhd_restpy/testplatform/sessions/ixnetwork/topology/ospfv3_c029fd7cd4a9e9897b7b4e4547458751.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify,... | 41.951341 | 565 | 0.639981 | 41,059 | 0.971926 | 0 | 0 | 15,942 | 0.37737 | 0 | 0 | 28,734 | 0.680175 |
6251e5f75335276f9c6c9626a85c2811646b3967 | 1,970 | py | Python | train/loss/mss_loss.py | jdasam/ddsp-pytorch | cefa59881331e0f76eb073317a311c867e331ac2 | [
"MIT"
] | 88 | 2020-02-26T16:37:53.000Z | 2022-03-16T23:27:17.000Z | train/loss/mss_loss.py | hihunjin/my_ddsp-pytorch | 2f7f9222b20ba34b3976a8f78c8efa696b4665c5 | [
"MIT"
] | 3 | 2020-07-25T05:03:17.000Z | 2022-03-23T17:37:38.000Z | train/loss/mss_loss.py | hihunjin/my_ddsp-pytorch | 2f7f9222b20ba34b3976a8f78c8efa696b4665c5 | [
"MIT"
] | 17 | 2020-06-03T09:11:10.000Z | 2021-11-25T10:24:25.000Z | """
Implementation of Multi-Scale Spectral Loss as described in DDSP,
which is originally suggested in NSF (Wang et al., 2019)
"""
import torch
import torch.nn as nn
import torchaudio
import torch.nn.functional as F
class SSSLoss(nn.Module):
"""
Single-scale Spectral Loss.
"""
def __init__(self, n... | 28.142857 | 99 | 0.618274 | 1,745 | 0.885787 | 0 | 0 | 0 | 0 | 0 | 0 | 515 | 0.261421 |
6255b36ebec98e609bf24f715546b55d46c7815b | 8,889 | py | Python | tests/test_triton_server.py | jishminor/model_analyzer | 8593a473bcc923f90a892cffe59fa9980b55c27f | [
"Apache-2.0"
] | null | null | null | tests/test_triton_server.py | jishminor/model_analyzer | 8593a473bcc923f90a892cffe59fa9980b55c27f | [
"Apache-2.0"
] | null | null | null | tests/test_triton_server.py | jishminor/model_analyzer | 8593a473bcc923f90a892cffe59fa9980b55c27f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020-2021, NVIDIA CORPORATION. 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 a... | 38.986842 | 79 | 0.673304 | 7,414 | 0.834065 | 0 | 0 | 0 | 0 | 0 | 0 | 2,449 | 0.275509 |
625618420b8b42e1290ca8d84b7cf2668f7fc56c | 5,490 | py | Python | modules/help_urls/help_urls.py | xochilt/cousebuilder | 50c524ad1406b77288efdc616812877e0c85aeb5 | [
"Apache-2.0"
] | null | null | null | modules/help_urls/help_urls.py | xochilt/cousebuilder | 50c524ad1406b77288efdc616812877e0c85aeb5 | [
"Apache-2.0"
] | null | null | null | modules/help_urls/help_urls.py | xochilt/cousebuilder | 50c524ad1406b77288efdc616812877e0c85aeb5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 31.193182 | 79 | 0.67541 | 2,368 | 0.43133 | 0 | 0 | 1,477 | 0.269035 | 0 | 0 | 2,678 | 0.487796 |
625670c4163cea1c3e5232cab52845847be981b8 | 4,584 | py | Python | imm/samplers/noncollapsed.py | tscholak/imm | cbf588800ddb3b3b57843d85a92d881f43fd5702 | [
"Apache-2.0"
] | 9 | 2016-02-15T00:40:18.000Z | 2020-05-14T10:22:53.000Z | imm/samplers/noncollapsed.py | tscholak/imm | cbf588800ddb3b3b57843d85a92d881f43fd5702 | [
"Apache-2.0"
] | null | null | null | imm/samplers/noncollapsed.py | tscholak/imm | cbf588800ddb3b3b57843d85a92d881f43fd5702 | [
"Apache-2.0"
] | 2 | 2016-01-29T17:46:42.000Z | 2020-11-18T04:57:20.000Z | # -*- coding: utf-8 -*-
"""
Non-collapsed samplers.
"""
import numpy as np
from .generic import (GenericGibbsSampler, GenericRGMSSampler,
GenericSAMSSampler, GenericSliceSampler)
from ..models import (CollapsedConjugateGaussianMixture,
ConjugateGaussianMixture, NonconjugateGaussianMixture)
from ..mod... | 34.208955 | 77 | 0.662522 | 4,236 | 0.924084 | 0 | 0 | 0 | 0 | 0 | 0 | 3,553 | 0.775087 |
62578dce0eabf4b8ae7fad7a5b39c7aa9bac6caa | 393 | py | Python | api/urls.py | Emmastro/medmer-api | c17366a92506b6ac1bdedc85ad0c29c3d2b36b5d | [
"Apache-2.0"
] | null | null | null | api/urls.py | Emmastro/medmer-api | c17366a92506b6ac1bdedc85ad0c29c3d2b36b5d | [
"Apache-2.0"
] | 1 | 2021-07-12T06:32:14.000Z | 2021-07-12T06:32:14.000Z | api/urls.py | Emmastro/medmer | c17366a92506b6ac1bdedc85ad0c29c3d2b36b5d | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('accounts/', include('django.contrib.auth.urls')),
path('', include('home.urls')),
path('admin/', admin.site.urls),
path('registration/medic', include('medic.urls')),
path('registration/patient', include('pa... | 32.75 | 59 | 0.676845 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 159 | 0.40458 |
6258836d166a8d6c1882a706cc1e2bf3153eda25 | 55 | py | Python | src/evolvepy/integrations/__init__.py | EltonCN/evolvepy | 4489264d6c03ea4f3c23ea665fdf12fe4ead1ccc | [
"MIT"
] | 1 | 2022-01-13T21:11:53.000Z | 2022-01-13T21:11:53.000Z | src/evolvepy/integrations/__init__.py | EltonCN/evolvepy | 4489264d6c03ea4f3c23ea665fdf12fe4ead1ccc | [
"MIT"
] | null | null | null | src/evolvepy/integrations/__init__.py | EltonCN/evolvepy | 4489264d6c03ea4f3c23ea665fdf12fe4ead1ccc | [
"MIT"
] | null | null | null | '''
EvolvePy's integrations with other modules.
''' | 18.333333 | 47 | 0.672727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 1 |
62588608a3f5e4881c91b92770889c28b45edea4 | 587 | py | Python | subdomain.py | ouldevloper/subDomainFinder | 3b888e8267d8b89401a468d2622edd6716a88293 | [
"MIT"
] | null | null | null | subdomain.py | ouldevloper/subDomainFinder | 3b888e8267d8b89401a468d2622edd6716a88293 | [
"MIT"
] | null | null | null | subdomain.py | ouldevloper/subDomainFinder | 3b888e8267d8b89401a468d2622edd6716a88293 | [
"MIT"
] | null | null | null | import requests
import re
url=input("Enter Url [ex: example.com]: ")
def getSubDomain(url):
url=url.replace("www.","").replace("https://","").replace("http://","")
pattern = "[\w]{1,256}\.[a-zA-Z0-9()]{1,6}"
_l = re.compile(pattern)
if _l.match(url):
response = requests.get(f"https://sonar.omn... | 34.529412 | 95 | 0.524702 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 176 | 0.29983 |
62592611062846e8ddc9453d08b3f9cc749f88fa | 129 | py | Python | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/20.03-File-handling.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/20.03-File-handling.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/20.03-File-handling.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | file = open("text.txt", "r")
file2 = open("text2.txt", "w")
for data in file:
file2.write(data)
file.close()
file2.close()
| 14.333333 | 30 | 0.620155 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.209302 |
625a19aeeb78d1a163e46b551accd53b6ef2d20c | 532 | py | Python | torch2trt/__init__.py | SnowMasaya/torch2trt | d526b2473805f9b9a704a201bef3ce5be25d284f | [
"MIT"
] | 2 | 2020-07-10T06:26:03.000Z | 2020-07-10T07:38:08.000Z | torch2trt/__init__.py | SnowMasaya/torch2trt | d526b2473805f9b9a704a201bef3ce5be25d284f | [
"MIT"
] | 1 | 2020-02-16T09:43:35.000Z | 2020-02-16T09:43:35.000Z | torch2trt/__init__.py | SnowMasaya/torch2trt | d526b2473805f9b9a704a201bef3ce5be25d284f | [
"MIT"
] | 1 | 2019-10-14T01:11:23.000Z | 2019-10-14T01:11:23.000Z | from .torch2trt import *
from .converters import *
import tensorrt as trt
def load_plugins():
import os
import ctypes
ctypes.CDLL(os.path.join(os.path.dirname(__file__), 'libtorch2trt.so'))
registry = trt.get_plugin_registry()
torch2trt_creators = [c for c in registry.plugin_creator_list if c... | 24.181818 | 103 | 0.716165 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.073308 |
625bb84667ccfd99b5f46c321c52127e25ca0ad0 | 4,614 | py | Python | ediel-parser/lib/cli/com.py | sun-labs/ediclue | 22836afc3eca6eebd800cf5d843166656ceaeaae | [
"MIT"
] | 3 | 2020-05-30T09:15:40.000Z | 2021-11-17T20:06:27.000Z | ediel-parser/lib/cli/com.py | sun-labs/ediclue | 22836afc3eca6eebd800cf5d843166656ceaeaae | [
"MIT"
] | null | null | null | ediel-parser/lib/cli/com.py | sun-labs/ediclue | 22836afc3eca6eebd800cf5d843166656ceaeaae | [
"MIT"
] | 1 | 2020-12-25T16:37:13.000Z | 2020-12-25T16:37:13.000Z | import os
from lib.EDICommunicator import EDICommunicator
from lib.EDIParser import EDIParser
import lib.cli.tools as tools
from types import SimpleNamespace
def set_args(subparsers):
parser = subparsers.add_parser('com', description='communication between EDI systems')
parser.add_argument('--send-to')
par... | 39.435897 | 117 | 0.657781 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 840 | 0.182055 |
625c8a42b10a793670359b3599bb4463084222aa | 154 | py | Python | 04_working_with_list/4_2_animals.py | simonhoch/python_basics | 4ecf12c074e641e3cdeb0a6690846eb9133f96af | [
"MIT"
] | null | null | null | 04_working_with_list/4_2_animals.py | simonhoch/python_basics | 4ecf12c074e641e3cdeb0a6690846eb9133f96af | [
"MIT"
] | null | null | null | 04_working_with_list/4_2_animals.py | simonhoch/python_basics | 4ecf12c074e641e3cdeb0a6690846eb9133f96af | [
"MIT"
] | null | null | null | animals = ['cat', 'dog', 'pig']
for animal in animals :
print (animal + 'would make a great pet.')
print ('All of those animals would makea great pet')
| 30.8 | 53 | 0.668831 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 85 | 0.551948 |
625d706044520dc3362905ca933c2db2e59ae151 | 145 | py | Python | backend/mytutorials/telegrambot/urls.py | mahmoodDehghan/MyTests | a67693e14eda2257490f295909d17b6f3f962543 | [
"MIT"
] | null | null | null | backend/mytutorials/telegrambot/urls.py | mahmoodDehghan/MyTests | a67693e14eda2257490f295909d17b6f3f962543 | [
"MIT"
] | null | null | null | backend/mytutorials/telegrambot/urls.py | mahmoodDehghan/MyTests | a67693e14eda2257490f295909d17b6f3f962543 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import start_bot, end_bot
urlpatterns = [
path('startbot/', start_bot),
path('endbot/', end_bot),
] | 20.714286 | 37 | 0.717241 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 0.137931 |
62602e529718a96dbd2a4603b293f7ef9ea48276 | 420 | py | Python | tests/performance/cte-arm/tests/csvm_ijcnn1.py | alexbarcelo/dislib | 989f81f235ae30b17410a8d805df258c7d931b38 | [
"Apache-2.0"
] | 36 | 2018-10-22T19:21:14.000Z | 2022-03-22T12:10:01.000Z | tests/performance/cte-arm/tests/csvm_ijcnn1.py | alexbarcelo/dislib | 989f81f235ae30b17410a8d805df258c7d931b38 | [
"Apache-2.0"
] | 329 | 2018-11-22T18:04:57.000Z | 2022-03-18T01:26:55.000Z | tests/performance/cte-arm/tests/csvm_ijcnn1.py | alexbarcelo/dislib | 989f81f235ae30b17410a8d805df258c7d931b38 | [
"Apache-2.0"
] | 21 | 2019-01-10T11:46:39.000Z | 2022-03-17T12:59:45.000Z | import performance
import dislib as ds
from dislib.classification import CascadeSVM
def main():
x_ij, y_ij = ds.load_svmlight_file(
"/fefs/scratch/bsc19/bsc19029/PERFORMANCE/datasets/train",
block_size=(5000, 22), n_features=22, store_sparse=True)
csvm = CascadeSVM(c=10000, gamma=0.01)
... | 22.105263 | 66 | 0.697619 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 0.192857 |
6261861dfa046a0934777f8f23b5ec284278ef51 | 1,115 | py | Python | py_connect/exceptions.py | iparaskev/py_connect | 43476cddfb25130d058fcf59928454f867af8feb | [
"BSD-3-Clause"
] | 5 | 2021-03-19T07:05:50.000Z | 2021-03-31T22:53:52.000Z | py_connect/exceptions.py | iparaskev/py_connect | 43476cddfb25130d058fcf59928454f867af8feb | [
"BSD-3-Clause"
] | null | null | null | py_connect/exceptions.py | iparaskev/py_connect | 43476cddfb25130d058fcf59928454f867af8feb | [
"BSD-3-Clause"
] | null | null | null | """Exceptions of the library"""
class PyConnectError(Exception):
"""Base class for all exceptions in py_connect."""
class InvalidPowerCombination(PyConnectError):
"""Connection of different power pins."""
class MaxConnectionsError(PyConnectError):
"""Interface has exceeded it's max connections limit."... | 24.23913 | 67 | 0.744395 | 1,050 | 0.941704 | 0 | 0 | 0 | 0 | 0 | 0 | 579 | 0.519283 |
6261f7a9c9b18a89ffbec87fba08c79cb2839e13 | 1,151 | py | Python | code/glucocheck/homepage/migrations/0007_auto_20210315_1807.py | kmcgreg5/Glucocheck | 4ab4ada7f967ae41c1241c94523d14e693e05dd4 | [
"FSFAP"
] | null | null | null | code/glucocheck/homepage/migrations/0007_auto_20210315_1807.py | kmcgreg5/Glucocheck | 4ab4ada7f967ae41c1241c94523d14e693e05dd4 | [
"FSFAP"
] | null | null | null | code/glucocheck/homepage/migrations/0007_auto_20210315_1807.py | kmcgreg5/Glucocheck | 4ab4ada7f967ae41c1241c94523d14e693e05dd4 | [
"FSFAP"
] | null | null | null | # Generated by Django 3.1.7 on 2021-03-15 22:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('homepage', '0006_carbohydrate_glucose_insulin_recordingcategory'),
]
operations = [
migrations.RenameField(
model_name='carbohyd... | 34.878788 | 338 | 0.600348 | 1,058 | 0.919201 | 0 | 0 | 0 | 0 | 0 | 0 | 458 | 0.397915 |
6262bae7dfc3df2c02ba7e5efae6983d3daa02cb | 1,826 | py | Python | models/SnapshotTeam.py | Fa1c0n35/RootTheBoxs | 4f2a9886c8eedca3039604b93929c8c09866115e | [
"Apache-2.0"
] | 1 | 2019-06-29T08:40:54.000Z | 2019-06-29T08:40:54.000Z | models/SnapshotTeam.py | Fa1c0n35/RootTheBoxs | 4f2a9886c8eedca3039604b93929c8c09866115e | [
"Apache-2.0"
] | null | null | null | models/SnapshotTeam.py | Fa1c0n35/RootTheBoxs | 4f2a9886c8eedca3039604b93929c8c09866115e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mar 11, 2012
@author: moloch
Copyright 2012 Root the Box
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/licen... | 29.451613 | 83 | 0.7092 | 839 | 0.459474 | 0 | 0 | 244 | 0.133625 | 0 | 0 | 864 | 0.473165 |
6263cf2679c6dfa1a07724e0812c51922a103bc9 | 2,544 | py | Python | src/train.py | DanCh11/virtual-assistant | b6601f20bd851864f4a76dd4c73c8c5266a0014f | [
"MIT"
] | null | null | null | src/train.py | DanCh11/virtual-assistant | b6601f20bd851864f4a76dd4c73c8c5266a0014f | [
"MIT"
] | null | null | null | src/train.py | DanCh11/virtual-assistant | b6601f20bd851864f4a76dd4c73c8c5266a0014f | [
"MIT"
] | null | null | null | import json
import numpy as np
import torch
import torch.nn as nn
from torch.utils.data import Dataset, DataLoader
from model import NeuralNetwork
from nltk_utils import stem, tokenize, bag_of_words
with open('./data/data.json', 'r') as f:
data = json.load(f)
all_words = []
tags = []
xy = []
for intent... | 22.315789 | 94 | 0.66195 | 340 | 0.133648 | 0 | 0 | 0 | 0 | 0 | 0 | 313 | 0.123035 |
62643e087525aca4ccc614812b7bfd674336652f | 411 | py | Python | pythonexercicios/ex101-funcvotacao.py | marroni1103/exercicios-pyton | 734162cc4b63ed30d754a6efe4c5622baaa1a50b | [
"MIT"
] | null | null | null | pythonexercicios/ex101-funcvotacao.py | marroni1103/exercicios-pyton | 734162cc4b63ed30d754a6efe4c5622baaa1a50b | [
"MIT"
] | null | null | null | pythonexercicios/ex101-funcvotacao.py | marroni1103/exercicios-pyton | 734162cc4b63ed30d754a6efe4c5622baaa1a50b | [
"MIT"
] | null | null | null | def voto(num):
from datetime import date
anoatual = date.today().year
idade = anoatual - num
if idade < 16:
return f"Com {idade} anos: NÃO VOTA"
elif 16 <= idade < 18 or idade > 65:
return f'Com {idade} anos: VOTO OPCIONAL'
else:
return f"Com {idade} anos: VOTO OBRIGATORI... | 25.6875 | 52 | 0.610706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.317191 |
62665baa3c795d7ea68ea728720da3de2371a899 | 4,289 | py | Python | map_objects/tile.py | matteobarbieri/libtcod-tutorial | 2be59978483d1c754b736a0fe96c9554e9ba8547 | [
"MIT"
] | 1 | 2019-03-09T14:20:51.000Z | 2019-03-09T14:20:51.000Z | map_objects/tile.py | matteobarbieri/libtcod-tutorial | 2be59978483d1c754b736a0fe96c9554e9ba8547 | [
"MIT"
] | null | null | null | map_objects/tile.py | matteobarbieri/libtcod-tutorial | 2be59978483d1c754b736a0fe96c9554e9ba8547 | [
"MIT"
] | null | null | null | import random
import libtcodpy as libtcod
GRAY_PALETTE = [
# libtcod.Color(242, 242, 242),
libtcod.Color(204, 204, 204),
libtcod.Color(165, 165, 165),
libtcod.Color(127, 127, 127),
libtcod.Color(89, 89, 89),
]
class Tile:
"""
A tile on a map. It may or may not be blocked, and may or may ... | 24.508571 | 75 | 0.569597 | 3,458 | 0.806249 | 0 | 0 | 456 | 0.106318 | 0 | 0 | 1,453 | 0.338774 |
62668c6700d6f2b1513772cf655859cb23f0af9f | 16,717 | py | Python | src/mrnet/utils/reaction.py | hpatel1567/mrnet | b9989b63ba7aa39cfaf484e78d872ba2cc2d2a20 | [
"BSD-3-Clause-LBNL"
] | 9 | 2020-11-06T23:02:29.000Z | 2021-04-28T01:49:34.000Z | src/mrnet/utils/reaction.py | hpatel1567/mrnet | b9989b63ba7aa39cfaf484e78d872ba2cc2d2a20 | [
"BSD-3-Clause-LBNL"
] | 118 | 2020-11-09T06:49:10.000Z | 2021-07-05T01:16:32.000Z | src/mrnet/utils/reaction.py | hpatel1567/mrnet | b9989b63ba7aa39cfaf484e78d872ba2cc2d2a20 | [
"BSD-3-Clause-LBNL"
] | 8 | 2020-11-06T23:02:36.000Z | 2021-04-20T00:39:52.000Z | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from collections import defaultdict
from typing import Dict, List, Optional, Tuple, Union
import numpy as np
from mip import BINARY, CBC, MINIMIZE, Model, xsum
from mrnet.core.mol_entry import MoleculeEntry
_... | 38.166667 | 90 | 0.664413 | 125 | 0.007476 | 0 | 0 | 0 | 0 | 0 | 0 | 9,461 | 0.565815 |