hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bbc8b38a1aa611247709f106104e2e943fb0e7bb | 282 | py | Python | pykin/utils/mesh_utils.py | jdj2261/pykin | da952b8ec023382b8a324d1095b0cfd675c7452b | [
"MIT"
] | 14 | 2021-08-09T06:59:10.000Z | 2022-03-09T13:05:46.000Z | pykin/utils/mesh_utils.py | jdj2261/pykin | da952b8ec023382b8a324d1095b0cfd675c7452b | [
"MIT"
] | null | null | null | pykin/utils/mesh_utils.py | jdj2261/pykin | da952b8ec023382b8a324d1095b0cfd675c7452b | [
"MIT"
] | 4 | 2021-12-13T03:23:36.000Z | 2022-03-09T11:34:29.000Z | import sys, os
pykin_path = os.path.abspath(os.path.dirname(__file__)+"/../../" )
sys.path.append(pykin_path)
| 31.333333 | 66 | 0.712766 | import sys, os
pykin_path = os.path.abspath(os.path.dirname(__file__)+"/../../" )
sys.path.append(pykin_path)
def get_mesh_path(mesh_path, robot_name):
result_path = pykin_path + "/asset/urdf/" + robot_name +"/"
result_path = result_path + mesh_path
return result_path | 149 | 0 | 23 |
6bcaa7b3aa19a28e3ff196de1285bf96eb39458a | 703 | py | Python | LeetCode/0007.py | summertian4/Practice | 3328025f84669ebc9df6036e39ac98d0432adf8f | [
"MIT"
] | 2 | 2019-09-18T01:34:31.000Z | 2019-09-18T01:34:36.000Z | LeetCode/0007.py | summertian4/Practice | 3328025f84669ebc9df6036e39ac98d0432adf8f | [
"MIT"
] | null | null | null | LeetCode/0007.py | summertian4/Practice | 3328025f84669ebc9df6036e39ac98d0432adf8f | [
"MIT"
] | null | null | null | var x = x < 0 ? -x: x
var arr: [Int] = Array<Int>()
var result = 0
while true {
// 最后一位
let temp = x % 10
arr.append(temp)
x = x / 10
if x == 0 {
break
}
}
for (index, value) in arr.e... | 24.241379 | 75 | 0.415363 | class Solution {
func reverse(_ x: Int) -> Int {
let sign = x < 0 ? -1: 1
var x = x < 0 ? -x: x
var arr: [Int] = Array<Int>()
var result = 0
while true {
// 最后一位
let temp = x % 10
arr.append(temp)
x = x / 10
if x ==... | 0 | 64 | 22 |
9be7df6f7474ab0961eec64a862720dbadcace71 | 17,409 | py | Python | my_pybullet_envs/laikago_env_v4.py | jyf588/SimGAN | 23283d7b5629f1653567b2437bb28aac1cc17169 | [
"Apache-2.0"
] | 30 | 2021-06-16T23:28:58.000Z | 2022-03-23T17:20:58.000Z | my_pybullet_envs/laikago_env_v4.py | jyf588/SimGAN | 23283d7b5629f1653567b2437bb28aac1cc17169 | [
"Apache-2.0"
] | 1 | 2021-06-25T09:21:29.000Z | 2021-08-11T23:14:14.000Z | my_pybullet_envs/laikago_env_v4.py | jyf588/SimGAN | 23283d7b5629f1653567b2437bb28aac1cc17169 | [
"Apache-2.0"
] | 8 | 2021-06-19T12:51:50.000Z | 2021-12-23T08:31:10.000Z | # Copyright 2020 Google LLC and Stanford University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 40.392111 | 108 | 0.574473 | # Copyright 2020 Google LLC and Stanford University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 16,013 | 397 | 23 |
afa91199f0a53f11d7bdc9266405cc14c87b8d2e | 6,411 | py | Python | Contest/2019CUMCM/code/model_airline.py | iydon/homework | 253d4746528ef62d33eba1de0b90dcb17ec587ed | [
"MIT"
] | 8 | 2019-10-20T08:18:54.000Z | 2021-07-11T12:14:56.000Z | Contest/2019CUMCM/code/model_airline.py | iydon/homework | 253d4746528ef62d33eba1de0b90dcb17ec587ed | [
"MIT"
] | 2 | 2022-01-13T03:04:10.000Z | 2022-03-12T00:49:10.000Z | Contest/2019CUMCM/code/model_airline.py | iydon/homework | 253d4746528ef62d33eba1de0b90dcb17ec587ed | [
"MIT"
] | 2 | 2019-11-02T05:46:01.000Z | 2020-03-12T23:11:28.000Z | # -*- encode: utf-8 -*-
from typing import List, Tuple, Callable
import numpy as np
from models import Aircraft, Airport, City, Time
from settings import time_limit, time_limit, distance_to_weights
# Phantom class
if __name__ == '__main__':
from data import cities
airline = Airline(cities, time_limit, ... | 27.515021 | 97 | 0.519108 | # -*- encode: utf-8 -*-
from typing import List, Tuple, Callable
import numpy as np
from models import Aircraft, Airport, City, Time
from settings import time_limit, time_limit, distance_to_weights
# Phantom class
class Airline: pass
class Symmetric: pass
class Airline:
def __init__(self, cities:List[City], ti... | 0 | 5,980 | 90 |
6c05ac6238b169fb230cd4810727fed0baba80f5 | 1,032 | py | Python | setup.py | nokia-wroclaw/innovativeproject-django-sourcerer | 955f360e98826c736ae6b2072e304a26ca3fffb3 | [
"MIT"
] | 2 | 2020-03-11T10:54:43.000Z | 2020-05-22T11:05:53.000Z | setup.py | nokia-wroclaw/innovativeproject-django-sourcerer | 955f360e98826c736ae6b2072e304a26ca3fffb3 | [
"MIT"
] | 8 | 2020-03-31T14:15:44.000Z | 2021-09-22T18:42:44.000Z | setup.py | nokia-wroclaw/innovativeproject-django-sourcerer | 955f360e98826c736ae6b2072e304a26ca3fffb3 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name='django_sourcerer',
version='2.1',
author='Cem Arslan, Kadir Kocak, Ugur Dogus Hamarat, Cagatay Em, Farid Murmadov, Burak Karaca',
author_email="cmarslan06@gmail.com",
description="Django ap... | 33.290323 | 99 | 0.630814 | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name='django_sourcerer',
version='2.1',
author='Cem Arslan, Kadir Kocak, Ugur Dogus Hamarat, Cagatay Em, Farid Murmadov, Burak Karaca',
author_email="cmarslan06@gmail.com",
description="Django ap... | 0 | 0 | 0 |
43461cd5e70eb68bd540af320f66020a19b0538a | 5,187 | py | Python | stackimpact/reporters/cpu_reporter.py | cielo24/stackimpact-python | ac98f0c4d88ce31ae4baf54f36fb76f20cedf852 | [
"BSD-3-Clause"
] | null | null | null | stackimpact/reporters/cpu_reporter.py | cielo24/stackimpact-python | ac98f0c4d88ce31ae4baf54f36fb76f20cedf852 | [
"BSD-3-Clause"
] | null | null | null | stackimpact/reporters/cpu_reporter.py | cielo24/stackimpact-python | ac98f0c4d88ce31ae4baf54f36fb76f20cedf852 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division
import os
import sys
import time
import threading
import re
import signal
from ..runtime import min_version, runtime_info
from ..profiler_scheduler import ProfilerScheduler
from ..metric import Metric
from ..metric import Breakdown
from ..frame import Frame
| 27.737968 | 145 | 0.613071 | from __future__ import division
import os
import sys
import time
import threading
import re
import signal
from ..runtime import min_version, runtime_info
from ..profiler_scheduler import ProfilerScheduler
from ..metric import Metric
from ..metric import Breakdown
from ..frame import Frame
class CPUReporter:
SA... | 4,481 | 389 | 23 |
9f072760e795b01d4f2896bcd8e1d73470431328 | 8,845 | py | Python | survol/class_type_all.py | AugustinMascarelli/survol | 7a822900e82d1e6f016dba014af5741558b78f15 | [
"BSD-3-Clause"
] | null | null | null | survol/class_type_all.py | AugustinMascarelli/survol | 7a822900e82d1e6f016dba014af5741558b78f15 | [
"BSD-3-Clause"
] | null | null | null | survol/class_type_all.py | AugustinMascarelli/survol | 7a822900e82d1e6f016dba014af5741558b78f15 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
Generalised class: Displays data sources for a class
"""
import os
import sys
import lib_util
import lib_common
try:
import lib_wbem
wbemOk = True
except ImportError:
wbemOk = False
import lib_wmi
from lib_properties import pc
# Now, adds the base classes of this one, at least one one le... | 38.290043 | 157 | 0.758508 | #!/usr/bin/env python
"""
Generalised class: Displays data sources for a class
"""
import os
import sys
import lib_util
import lib_common
try:
import lib_wbem
wbemOk = True
except ImportError:
wbemOk = False
import lib_wmi
from lib_properties import pc
# Now, adds the base classes of this one, at least one one le... | 8,003 | 0 | 157 |
ea058d7fe6c4f36a7c2cc59a5c7433969c008b04 | 2,022 | py | Python | main.py | vlameiras/poe-trade-scraper | bffed681973045fb0e555fe5cfb0491bacb36b74 | [
"MIT"
] | 8 | 2017-08-23T09:11:22.000Z | 2021-12-10T10:28:32.000Z | main.py | vlameiras/poe-trade-scraper | bffed681973045fb0e555fe5cfb0491bacb36b74 | [
"MIT"
] | 1 | 2018-01-02T09:25:39.000Z | 2018-01-02T09:25:39.000Z | main.py | vlameiras/poe-trade-scraper | bffed681973045fb0e555fe5cfb0491bacb36b74 | [
"MIT"
] | 3 | 2018-01-01T14:36:29.000Z | 2020-01-26T22:31:41.000Z | import websocket
import threading
import time
import requests
from bs4 import BeautifulSoup
import pygame
import pyperclip
import settings
new_id = -1
poe_trade_url = None
if __name__ == "__main__":
poe_trade_url_ini = input("Please enter your poe.trade URL: ")
poe_trade_url_split = poe_trade_url_ini.split("... | 39.647059 | 308 | 0.602868 | import websocket
import threading
import time
import requests
from bs4 import BeautifulSoup
import pygame
import pyperclip
import settings
new_id = -1
poe_trade_url = None
def on_message(ws, message):
global new_id
global poe_trade_url
payload = {'id': new_id}
r = requests.post(settings.SEARCH_URL +... | 1,281 | 0 | 69 |
d28096553f4f5e1996a89c9a8ad796da77af7e82 | 6,325 | py | Python | lib/surface/storage/buckets/notifications/create.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/surface/storage/buckets/notifications/create.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/surface/storage/buckets/notifications/create.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | # -*- coding: utf-8 -*- #
# Copyright 2021 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 40.806452 | 100 | 0.66087 | # -*- coding: utf-8 -*- #
# Copyright 2021 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 2,798 | 0 | 49 |
6ae278c26882f05c348f1ec4016ef5b9ac08e441 | 1,751 | py | Python | manager/logger.py | PlatonaM/lopco-job-manager | 3286b1d6ac0c322ef525dcde6a5f026db0e5d2e3 | [
"Apache-2.0"
] | null | null | null | manager/logger.py | PlatonaM/lopco-job-manager | 3286b1d6ac0c322ef525dcde6a5f026db0e5d2e3 | [
"Apache-2.0"
] | null | null | null | manager/logger.py | PlatonaM/lopco-job-manager | 3286b1d6ac0c322ef525dcde6a5f026db0e5d2e3 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 InfAI (CC SES)
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... | 25.014286 | 75 | 0.728726 | """
Copyright 2020 InfAI (CC SES)
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... | 226 | 17 | 69 |
831480df538b5c1257edf6b57341639a13339728 | 173 | py | Python | boa3_test/test_sc/interop_test/contract/GasScriptHashCantAssign.py | hal0x2328/neo3-boa | 6825a3533384cb01660773050719402a9703065b | [
"Apache-2.0"
] | 25 | 2020-07-22T19:37:43.000Z | 2022-03-08T03:23:55.000Z | boa3_test/test_sc/interop_test/contract/GasScriptHashCantAssign.py | hal0x2328/neo3-boa | 6825a3533384cb01660773050719402a9703065b | [
"Apache-2.0"
] | 419 | 2020-04-23T17:48:14.000Z | 2022-03-31T13:17:45.000Z | boa3_test/test_sc/interop_test/contract/GasScriptHashCantAssign.py | hal0x2328/neo3-boa | 6825a3533384cb01660773050719402a9703065b | [
"Apache-2.0"
] | 15 | 2020-05-21T21:54:24.000Z | 2021-11-18T06:17:24.000Z | from boa3.builtin.interop.contract import GAS
from boa3.builtin.type import UInt160
| 19.222222 | 45 | 0.734104 | from boa3.builtin.interop.contract import GAS
from boa3.builtin.type import UInt160
def Main(example: UInt160) -> UInt160:
global GAS
GAS = example
return GAS
| 65 | 0 | 23 |
3d036d04b9c1f69c6e1283cf42a7ebda73420377 | 2,976 | py | Python | tests/sqpdfo_swap_in_Y_test.py | DLR-SC/sqpdfo | ae3213764fdd8d0d0a05bcc3d13be63d811a0a37 | [
"BSD-3-Clause"
] | 10 | 2020-03-03T21:56:01.000Z | 2022-03-29T08:36:01.000Z | tests/sqpdfo_swap_in_Y_test.py | DLR-SC/sqpdfo | ae3213764fdd8d0d0a05bcc3d13be63d811a0a37 | [
"BSD-3-Clause"
] | 6 | 2020-03-03T22:02:41.000Z | 2021-11-18T12:31:00.000Z | tests/sqpdfo_swap_in_Y_test.py | DLR-SC/sqpdfo | ae3213764fdd8d0d0a05bcc3d13be63d811a0a37 | [
"BSD-3-Clause"
] | 3 | 2021-02-17T14:43:30.000Z | 2022-03-05T08:46:48.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Nov 14 18:53:38 2014
% TESTS :
% Y = [ 0 1 0 2 1 0 ; 0 0 1 0 0.01 2 ]; ind_Y = [1 2 3 4 5 6];
% fY = [2 5 1 3 2 6];
% [QZ,RZ,xbase,scale] = bcdfo_build_QR_of_Y( Y, 0, 0, 1, 1, 1e15 );
% Z = QZ*RZ;
% [ QZ, RZ, Y, xbase, scale ] = sqpdfo_swap_in_Y( 1, 3, QZ, RZ, Y, ind_Y,... | 36.292683 | 126 | 0.540659 | # -*- coding: utf-8 -*-
"""
Created on Fri Nov 14 18:53:38 2014
% TESTS :
% Y = [ 0 1 0 2 1 0 ; 0 0 1 0 0.01 2 ]; ind_Y = [1 2 3 4 5 6];
% fY = [2 5 1 3 2 6];
% [QZ,RZ,xbase,scale] = bcdfo_build_QR_of_Y( Y, 0, 0, 1, 1, 1e15 );
% Z = QZ*RZ;
% [ QZ, RZ, Y, xbase, scale ] = sqpdfo_swap_in_Y( 1, 3, QZ, RZ, Y, ind_Y,... | 260 | 0 | 26 |
09e880a9992ededfaab7b1da096edc33e40dc3f1 | 317 | py | Python | vacation/users/migrations/0003_remove_user_gender.py | mash-up-kr/vacation-homework-backend | 21698b843e027f290c5289e4b663d158a8e67386 | [
"MIT"
] | null | null | null | vacation/users/migrations/0003_remove_user_gender.py | mash-up-kr/vacation-homework-backend | 21698b843e027f290c5289e4b663d158a8e67386 | [
"MIT"
] | 4 | 2020-06-05T18:24:33.000Z | 2021-09-08T00:01:00.000Z | vacation/users/migrations/0003_remove_user_gender.py | mash-up-kr/vacation-homework-backend | 21698b843e027f290c5289e4b663d158a8e67386 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.6 on 2018-06-30 15:59
from django.db import migrations
| 17.611111 | 47 | 0.577287 | # Generated by Django 2.0.6 on 2018-06-30 15:59
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('users', '0002_user_gender'),
]
operations = [
migrations.RemoveField(
model_name='user',
name='gender',
),
]
| 0 | 211 | 23 |
603b464d2e852e6e348b25c0234d6f9425151939 | 1,379 | py | Python | models/component/word_embeding.py | wengithz/t-wji | 482c5a435a72dbf88fdfab385f74d4f42f4afec1 | [
"MIT"
] | 246 | 2019-07-03T12:03:33.000Z | 2022-03-19T08:43:38.000Z | models/component/word_embeding.py | wengithz/t-wji | 482c5a435a72dbf88fdfab385f74d4f42f4afec1 | [
"MIT"
] | 3 | 2019-08-19T02:23:24.000Z | 2020-04-20T07:45:03.000Z | models/component/word_embeding.py | wengithz/t-wji | 482c5a435a72dbf88fdfab385f74d4f42f4afec1 | [
"MIT"
] | 70 | 2019-07-03T13:29:11.000Z | 2022-03-01T06:49:08.000Z | '''
Filename: word_embeding.py
Project: models
File Created: Sunday, 2nd December 2018 2:38:45 pm
Author: xiaofeng (sxf1052566766@163.com)
--------------------------
Last Modified: Sunday, 2nd December 2018 2:39:14 pm
Modified By: xiaofeng (sxf1052566766@163.com)
---------------------------
: 2018.06 - 2018 .
'''
imp... | 31.340909 | 86 | 0.686004 | '''
Filename: word_embeding.py
Project: models
File Created: Sunday, 2nd December 2018 2:38:45 pm
Author: xiaofeng (sxf1052566766@163.com)
--------------------------
Last Modified: Sunday, 2nd December 2018 2:39:14 pm
Modified By: xiaofeng (sxf1052566766@163.com)
---------------------------
: 2018.06 - 2018 .
'''
imp... | 231 | 0 | 26 |
3cff875996b3bcdf6d5415c896d96f0355772caf | 1,844 | py | Python | buttons.py | Acidburn0zzz/difio | 1485f657f099f6a8401ad7cfe155f524a8a9a422 | [
"Apache-2.0"
] | 4 | 2016-06-01T12:48:54.000Z | 2021-08-19T22:21:47.000Z | buttons.py | Acidburn0zzz/difio | 1485f657f099f6a8401ad7cfe155f524a8a9a422 | [
"Apache-2.0"
] | 3 | 2016-01-20T17:06:45.000Z | 2016-01-20T17:07:06.000Z | buttons.py | Acidburn0zzz/difio | 1485f657f099f6a8401ad7cfe155f524a8a9a422 | [
"Apache-2.0"
] | 2 | 2015-01-21T21:30:19.000Z | 2017-08-08T06:03:02.000Z | ################################################################################
#
# Originally based on http://djangosnippets.org/snippets/1016/
# with small modifications
#
################################################################################
import re
from django.contrib import admin
from django.con... | 36.156863 | 105 | 0.550976 | ################################################################################
#
# Originally based on http://djangosnippets.org/snippets/1016/
# with small modifications
#
################################################################################
import re
from django.contrib import admin
from django.con... | 1,177 | 0 | 81 |
50628d0ffe8f1b285b5e647d287ada17e06654dc | 3,956 | py | Python | cms/tests/placeholder.py | DrMeers/django-cms-2.0 | d563d912c99f0c138a66d99829d8d0133226894e | [
"BSD-3-Clause"
] | 4 | 2016-05-07T11:50:25.000Z | 2017-12-04T10:30:20.000Z | cms/tests/placeholder.py | DrMeers/django-cms-2.0 | d563d912c99f0c138a66d99829d8d0133226894e | [
"BSD-3-Clause"
] | 1 | 2015-06-08T08:27:11.000Z | 2015-06-08T10:40:27.000Z | cms/tests/placeholder.py | DrMeers/django-cms-2.0 | d563d912c99f0c138a66d99829d8d0133226894e | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.conf import settings
from cms.tests.base import CMSTestCase
from cms.utils.plugins import get_placeholders
from cms.exceptions import DuplicatePlaceholderWarning
import sys
import warnings
| 41.642105 | 161 | 0.674924 | # -*- coding: utf-8 -*-
from django.conf import settings
from cms.tests.base import CMSTestCase
from cms.utils.plugins import get_placeholders
from cms.exceptions import DuplicatePlaceholderWarning
import sys
import warnings
class _Warning(object):
def __init__(self, message, category, filename, lineno):
s... | 3,291 | 343 | 95 |
4faa38226dfbda6e0fa802c404b9b102b7bac67d | 1,071 | py | Python | src/mecab.py | chimerast/scdv-docker | c833c02f5f63ca9cc3e1ccc45b75e597fc5503a8 | [
"Apache-2.0"
] | null | null | null | src/mecab.py | chimerast/scdv-docker | c833c02f5f63ca9cc3e1ccc45b75e597fc5503a8 | [
"Apache-2.0"
] | null | null | null | src/mecab.py | chimerast/scdv-docker | c833c02f5f63ca9cc3e1ccc45b75e597fc5503a8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- Coding: utf-8 -*-
import subprocess
from subprocess import PIPE
| 24.340909 | 134 | 0.568627 | #!/usr/bin/env python3
# -*- Coding: utf-8 -*-
import subprocess
from subprocess import PIPE
class MeCab:
def __init__(self, command='mecab'):
try:
self.process = subprocess.Popen([command, '-b', '81920', '-F', '%t\t%f[6]\n'], stdin=PIPE, stdout=PIPE, universal_newlines=True)
self.stdin = self.proce... | 889 | -9 | 97 |
cdb0fe98f9840947e902a931457917ab07a33644 | 2,452 | py | Python | dashboard/app/helpers/helpers_mongodb.py | rodriguesfas/ipm | 596382123c3d45bde6410672692d1f59ec2d734a | [
"MIT"
] | null | null | null | dashboard/app/helpers/helpers_mongodb.py | rodriguesfas/ipm | 596382123c3d45bde6410672692d1f59ec2d734a | [
"MIT"
] | null | null | null | dashboard/app/helpers/helpers_mongodb.py | rodriguesfas/ipm | 596382123c3d45bde6410672692d1f59ec2d734a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from config import database
from pymongo import MongoClient
from mongoengine import *
| 27.863636 | 79 | 0.539152 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from config import database
from pymongo import MongoClient
from mongoengine import *
class ConnectMongoDB(object):
def __init__(self):
self.client = MongoClient(database.DB['hostname'], database.DB['port'])
self.db = self.client[database.DB['databa... | 2,070 | 8 | 239 |
5bd3c0b18eba7661b447a339dafcedcbb8ede1bd | 349 | py | Python | archive/nucleus_encoder/aux_src/make_img_list.py | peterdonnelly1/u24_lymphocyte | dff7ceed404c38582feb81aa9b8a55d80ada0f77 | [
"BSD-3-Clause"
] | 23 | 2018-08-23T03:58:37.000Z | 2022-02-23T05:04:54.000Z | archive/nucleus_encoder/aux_src/make_img_list.py | peterdonnelly1/u24_lymphocyte | dff7ceed404c38582feb81aa9b8a55d80ada0f77 | [
"BSD-3-Clause"
] | 8 | 2018-07-20T20:54:51.000Z | 2020-06-12T05:36:04.000Z | archive/nucleus_encoder/aux_src/make_img_list.py | peterdonnelly1/u24_lymphocyte | dff7ceed404c38582feb81aa9b8a55d80ada0f77 | [
"BSD-3-Clause"
] | 22 | 2018-05-21T23:57:20.000Z | 2022-02-21T00:48:32.000Z | import glob
folder = '/data03/shared/lehhou/lym_project/svs_tiles/TCGA-38-4629-01Z-00-DX1.d00cc280-5370-4b9f-9655-6c35deb94647.svs/';
outfile = folder + 'list.txt';
filevar = open(outfile, 'w');
filelist = [];
for filename in glob.glob(folder + '/*.png'):
name = filename[len(folder):-4];
filevar.write("%s\n... | 23.266667 | 121 | 0.676218 | import glob
folder = '/data03/shared/lehhou/lym_project/svs_tiles/TCGA-38-4629-01Z-00-DX1.d00cc280-5370-4b9f-9655-6c35deb94647.svs/';
outfile = folder + 'list.txt';
filevar = open(outfile, 'w');
filelist = [];
for filename in glob.glob(folder + '/*.png'):
name = filename[len(folder):-4];
filevar.write("%s\n... | 0 | 0 | 0 |
ef439acb79cc5b2c099076332fae80714cbee0b5 | 9,953 | py | Python | spotdl/metadata/providers/youtube.py | Sigill/spotify-downloader | f65f2f97a10e46b7528f8a1666be30eac6de8a73 | [
"MIT"
] | null | null | null | spotdl/metadata/providers/youtube.py | Sigill/spotify-downloader | f65f2f97a10e46b7528f8a1666be30eac6de8a73 | [
"MIT"
] | null | null | null | spotdl/metadata/providers/youtube.py | Sigill/spotify-downloader | f65f2f97a10e46b7528f8a1666be30eac6de8a73 | [
"MIT"
] | 1 | 2021-01-27T04:31:16.000Z | 2021-01-27T04:31:16.000Z | import pytube
from bs4 import BeautifulSoup
import urllib.request
import threading
from collections.abc import Sequence
from spotdl.metadata import StreamsBase
from spotdl.metadata import ProviderBase
from spotdl.metadata.exceptions import YouTubeMetadataNotFoundError
import spotdl.util
import spotdl.patch
spotdl.p... | 34.439446 | 95 | 0.589671 | import pytube
from bs4 import BeautifulSoup
import urllib.request
import threading
from collections.abc import Sequence
from spotdl.metadata import StreamsBase
from spotdl.metadata import ProviderBase
from spotdl.metadata.exceptions import YouTubeMetadataNotFoundError
import spotdl.util
import spotdl.patch
spotdl.p... | 6,820 | 2,200 | 414 |
49f9d7712dcdc05ba93f2647b7aa24930e8eb505 | 3,029 | py | Python | distribution/scripts/cloudformation/create-template.py | menuka94/performance-common | 93a412656baddc89d9643950b252b33e4b5473f4 | [
"Apache-2.0"
] | null | null | null | distribution/scripts/cloudformation/create-template.py | menuka94/performance-common | 93a412656baddc89d9643950b252b33e4b5473f4 | [
"Apache-2.0"
] | null | null | null | distribution/scripts/cloudformation/create-template.py | menuka94/performance-common | 93a412656baddc89d9643950b252b33e4b5473f4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2018, WSO2 Inc. (http://wso2.org) All Rights Reserved.
#
# WSO2 Inc. licenses this file to you 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 ... | 37.8625 | 92 | 0.648729 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2018, WSO2 Inc. (http://wso2.org) All Rights Reserved.
#
# WSO2 Inc. licenses this file to you 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 ... | 1,659 | 19 | 95 |
43c3b24d757b1797e1e2876663de7edbab7410d5 | 6,716 | py | Python | report/is_stock_move.py | tonygalmiche/is_plastigray | 10669dda26f5a8653371a52798f41fdc805c61f2 | [
"MIT"
] | 1 | 2018-12-29T08:34:25.000Z | 2018-12-29T08:34:25.000Z | report/is_stock_move.py | tonygalmiche/is_plastigray | 10669dda26f5a8653371a52798f41fdc805c61f2 | [
"MIT"
] | null | null | null | report/is_stock_move.py | tonygalmiche/is_plastigray | 10669dda26f5a8653371a52798f41fdc805c61f2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from openerp import tools
from openerp import models,fields,api
from openerp.tools.translate import _
import datetime
import pytz
| 48.316547 | 106 | 0.453395 | # -*- coding: utf-8 -*-
from openerp import tools
from openerp import models,fields,api
from openerp.tools.translate import _
import datetime
import pytz
class is_stock_move(models.Model):
_name='is.stock.move'
_order='date desc'
_auto = False
move_id = fields.Many2one('stoc... | 5,151 | 1,375 | 24 |
f4678d3f7a4d0345c9ea15387eb70169f82ab90a | 1,168 | py | Python | corehq/motech/const.py | shyamkumarlchauhan/commcare-hq | 99df931bcf56e9fbe15d8fcb0dc98b5a3957fb48 | [
"BSD-3-Clause"
] | null | null | null | corehq/motech/const.py | shyamkumarlchauhan/commcare-hq | 99df931bcf56e9fbe15d8fcb0dc98b5a3957fb48 | [
"BSD-3-Clause"
] | null | null | null | corehq/motech/const.py | shyamkumarlchauhan/commcare-hq | 99df931bcf56e9fbe15d8fcb0dc98b5a3957fb48 | [
"BSD-3-Clause"
] | null | null | null | BASIC_AUTH = "basic"
DIGEST_AUTH = "digest"
OAUTH1 = "oauth1"
BEARER_AUTH = "bearer"
PASSWORD_PLACEHOLDER = '*' * 16
CONNECT_TIMEOUT = 60
# If any remote service does not respond within 5 minutes, time out.
# (Some OpenMRS reports can take a long time. Cut them a little slack,
# but not too much.)
READ_TIMEOUT = 5 * ... | 25.955556 | 76 | 0.78339 | BASIC_AUTH = "basic"
DIGEST_AUTH = "digest"
OAUTH1 = "oauth1"
BEARER_AUTH = "bearer"
PASSWORD_PLACEHOLDER = '*' * 16
CONNECT_TIMEOUT = 60
# If any remote service does not respond within 5 minutes, time out.
# (Some OpenMRS reports can take a long time. Cut them a little slack,
# but not too much.)
READ_TIMEOUT = 5 * ... | 0 | 0 | 0 |
b2c0f702a792a12b6aa85cd23ca049cb59be36d1 | 300 | py | Python | exercicio74Corrigido.py | adrianomdantas/Exercicios-Python | ef5025a186615258aec0cf35ed839fe49577d983 | [
"MIT"
] | null | null | null | exercicio74Corrigido.py | adrianomdantas/Exercicios-Python | ef5025a186615258aec0cf35ed839fe49577d983 | [
"MIT"
] | null | null | null | exercicio74Corrigido.py | adrianomdantas/Exercicios-Python | ef5025a186615258aec0cf35ed839fe49577d983 | [
"MIT"
] | null | null | null | from random import randint
numeros = (randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10))
print('os numeros sorteados são: ', end='')
for n in numeros:
print(f'{n}', end=' ')
print(f'\no maior numero foi {max(numeros)}')
print(f'O menor numero foi {min(numeros)}')
| 27.272727 | 90 | 0.65 | from random import randint
numeros = (randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10))
print('os numeros sorteados são: ', end='')
for n in numeros:
print(f'{n}', end=' ')
print(f'\no maior numero foi {max(numeros)}')
print(f'O menor numero foi {min(numeros)}')
| 0 | 0 | 0 |
3ef1b744c3868ea130c204e25377d5aac59213f7 | 4,657 | py | Python | bracket/get_training_data.py | henry-li-06/march-madness-bracket | 17b4eb83128153a8406893547c70198114f82636 | [
"MIT"
] | null | null | null | bracket/get_training_data.py | henry-li-06/march-madness-bracket | 17b4eb83128153a8406893547c70198114f82636 | [
"MIT"
] | null | null | null | bracket/get_training_data.py | henry-li-06/march-madness-bracket | 17b4eb83128153a8406893547c70198114f82636 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import scrape_data
import csv
team_data = pd.read_csv('data/cbb19.csv')
team_data = team_data.drop(columns=['POSTSEASON', 'SEED'])
t = list(team_data['TEAM'])
all_games = scrape_data.all_games
winners = scrape_data.winners
name_mappings = {'UNC': 'North Carolina', 'Cita... | 50.075269 | 121 | 0.535538 | import numpy as np
import pandas as pd
import scrape_data
import csv
team_data = pd.read_csv('data/cbb19.csv')
team_data = team_data.drop(columns=['POSTSEASON', 'SEED'])
t = list(team_data['TEAM'])
all_games = scrape_data.all_games
winners = scrape_data.winners
name_mappings = {'UNC': 'North Carolina', 'Cita... | 0 | 0 | 0 |
59059b9c66827dca12ada6526a8b904010258d99 | 17,152 | py | Python | Alpha/calendarHelperFun.py | timchenggu123/BitTimeScheduler | 10a90d7a6189b8e17ee736c662f8226041bfd0c8 | [
"MIT"
] | 1 | 2019-01-23T16:40:52.000Z | 2019-01-23T16:40:52.000Z | Alpha/calendarHelperFun.py | timchenggu123/BitTimeScheduler | 10a90d7a6189b8e17ee736c662f8226041bfd0c8 | [
"MIT"
] | null | null | null | Alpha/calendarHelperFun.py | timchenggu123/BitTimeScheduler | 10a90d7a6189b8e17ee736c662f8226041bfd0c8 | [
"MIT"
] | null | null | null | import datetime, pytz
def getEventStartEnd(event):
'''returns start time & end time as datetime objects from an event struct'''
start_string = event['start'].get('dateTime',event['start'].get('date'))
start_time = str2time(start_string)
end_string = event['end'].get('dateTime',0)
... | 37.531729 | 194 | 0.626341 | import datetime, pytz
def str2time(string):
if len(string) > 10:
nchar = len(string)
string = string[0:nchar -6] # -6 to get ride of the -05:00 trailler
timeformat = ('%Y-%m-%dT%H:%M:%S')
dt = datetime.datetime.strptime(string, timeformat)
else:
timeformat... | 9,919 | 0 | 368 |
2e5ee35497095379e45d8e54fbc6320972173c3a | 771 | py | Python | backend/base/migrations/0005_cafe_num_reviews_cafe_rating_review_name.py | ivanbaug/cafe-wifi | 49b240c460d73f7f4602cb78e230bf12c160604d | [
"MIT"
] | null | null | null | backend/base/migrations/0005_cafe_num_reviews_cafe_rating_review_name.py | ivanbaug/cafe-wifi | 49b240c460d73f7f4602cb78e230bf12c160604d | [
"MIT"
] | null | null | null | backend/base/migrations/0005_cafe_num_reviews_cafe_rating_review_name.py | ivanbaug/cafe-wifi | 49b240c460d73f7f4602cb78e230bf12c160604d | [
"MIT"
] | null | null | null | # Generated by Django 4.0.2 on 2022-02-19 16:35
from django.db import migrations, models
| 26.586207 | 93 | 0.577173 | # Generated by Django 4.0.2 on 2022-02-19 16:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('base', '0004_alter_cafe_img_url'),
]
operations = [
migrations.AddField(
model_name='cafe',
name='num_reviews',
... | 0 | 657 | 23 |
bd00b88b455ab668abae3b2ddac0269677e5a2b3 | 6,003 | py | Python | api_doc/components/models/function.py | adrienbrunet/mixt | d725ec752ce430d135e993bc988bfdf2b8457c4b | [
"MIT"
] | 27 | 2018-06-04T19:11:42.000Z | 2022-02-23T22:46:39.000Z | api_doc/components/models/function.py | adrienbrunet/mixt | d725ec752ce430d135e993bc988bfdf2b8457c4b | [
"MIT"
] | 7 | 2018-06-09T15:27:51.000Z | 2021-03-11T20:00:35.000Z | api_doc/components/models/function.py | adrienbrunet/mixt | d725ec752ce430d135e993bc988bfdf2b8457c4b | [
"MIT"
] | 3 | 2018-07-29T10:20:02.000Z | 2021-11-18T19:55:07.000Z | # coding: mixt
from mixt import Element, NotProvided, Required, html
from mixt.contrib.css import css_vars
from ... import datatypes
from ..doc import DocPart, DocHeader
from ..generic import Details
from . import Code, DocString, NamedValue, UnnamedValue
</Details>
</if>
</Do... | 34.901163 | 124 | 0.463935 | # coding: mixt
from mixt import Element, NotProvided, Required, html
from mixt.contrib.css import css_vars
from ... import datatypes
from ..doc import DocPart, DocHeader
from ..generic import Details
from . import Code, DocString, NamedValue, UnnamedValue
class Function(Element):
class PropTypes:
id_p... | 4,854 | 801 | 23 |
52153a5e56328e72603ec68c59cbb35fba1107f2 | 1,697 | py | Python | aoc_cas/aoc2021/day17.py | TedCassirer/advent-of-code | fb87dfdbb48b44f864337750aa58a809dcf72392 | [
"MIT"
] | 1 | 2020-11-30T19:17:50.000Z | 2020-11-30T19:17:50.000Z | aoc_cas/aoc2021/day17.py | TedCassirer/advent-of-code | fb87dfdbb48b44f864337750aa58a809dcf72392 | [
"MIT"
] | null | null | null | aoc_cas/aoc2021/day17.py | TedCassirer/advent-of-code | fb87dfdbb48b44f864337750aa58a809dcf72392 | [
"MIT"
] | null | null | null | from math import sqrt, ceil
if __name__ == "__main__":
from aocd import get_data
data = get_data(year=2021, day=17)
print(part1(data))
print(part2(data))
| 22.932432 | 47 | 0.437242 | from math import sqrt, ceil
def getSquare(data):
_, coords = data.split(": ")
x, y = coords.split(", ")
y, x = y[2:], x[2:]
y2, y1 = [-int(n) for n in y.split("..")]
x1, x2 = map(int, x.split(".."))
return y1, x1, y2, x2
def trajectory(vy, vx):
y, x = 0, 0
yield y, x
while True:... | 1,403 | 0 | 115 |
2be8e7d6b997d8dd186e251e784db3b07f6ff9d5 | 4,992 | py | Python | posts/migrations/0001_initial.py | ant-willow/yatube-pub | a42e4dd7fd353c40ccbc314841a04e6144900bc3 | [
"MIT"
] | null | null | null | posts/migrations/0001_initial.py | ant-willow/yatube-pub | a42e4dd7fd353c40ccbc314841a04e6144900bc3 | [
"MIT"
] | null | null | null | posts/migrations/0001_initial.py | ant-willow/yatube-pub | a42e4dd7fd353c40ccbc314841a04e6144900bc3 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2020-11-14 23:01
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| 52.547368 | 181 | 0.604768 | # Generated by Django 2.2.6 on 2020-11-14 23:01
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 0 | 5,019 | 23 |
f2c5636f32094a0ea2b3748db2dc49208407d338 | 4,754 | py | Python | scripts/osfstorage/fix_download_counts.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | 1 | 2015-10-02T18:35:53.000Z | 2015-10-02T18:35:53.000Z | scripts/osfstorage/fix_download_counts.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | 13 | 2020-03-24T15:29:41.000Z | 2022-03-11T23:15:28.000Z | scripts/osfstorage/fix_download_counts.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import sys
import logging
from datetime import datetime
from framework.mongo import database
from website.app import init_app
from scripts import utils as script_utils
from framework.transactions.context import TokuTransaction
logger = logging.getLogger(__name__)
# 2015 Sept 1... | 36.852713 | 131 | 0.625578 | from __future__ import unicode_literals
import sys
import logging
from datetime import datetime
from framework.mongo import database
from website.app import init_app
from scripts import utils as script_utils
from framework.transactions.context import TokuTransaction
logger = logging.getLogger(__name__)
# 2015 Sept 1... | 3,737 | 0 | 69 |
5e73e37f9f9cb5a97a7e27512ed98bc9848c2f98 | 5,800 | py | Python | trustlab/consumers/lab_consumer.py | ValentinSiegert/aTLAS | a2e7521447f81add83a0c958d61846a1cbfbbe9c | [
"MIT"
] | null | null | null | trustlab/consumers/lab_consumer.py | ValentinSiegert/aTLAS | a2e7521447f81add83a0c958d61846a1cbfbbe9c | [
"MIT"
] | null | null | null | trustlab/consumers/lab_consumer.py | ValentinSiegert/aTLAS | a2e7521447f81add83a0c958d61846a1cbfbbe9c | [
"MIT"
] | null | null | null | import json
import trustlab.lab.config as config
import time
from trustlab.consumers.chunk_consumer import ChunkAsyncJsonWebsocketConsumer
from trustlab.models import *
from trustlab.serializers.scenario_serializer import ScenarioSerializer
from trustlab.lab.director import Director
class LabConsumer(ChunkAsyncJsonWe... | 46.774194 | 119 | 0.514655 | import json
import trustlab.lab.config as config
import time
from trustlab.consumers.chunk_consumer import ChunkAsyncJsonWebsocketConsumer
from trustlab.models import *
from trustlab.serializers.scenario_serializer import ScenarioSerializer
from trustlab.lab.director import Director
class LabConsumer(ChunkAsyncJsonWe... | 5,193 | 0 | 80 |
da023300272a3b0a819ca98ca66851e3312e328b | 74 | py | Python | telegapi/__init__.py | p0o0uya/telegapi | ba250d659e6a9fd7b3b252d88aefada5a3dc617e | [
"MIT"
] | null | null | null | telegapi/__init__.py | p0o0uya/telegapi | ba250d659e6a9fd7b3b252d88aefada5a3dc617e | [
"MIT"
] | null | null | null | telegapi/__init__.py | p0o0uya/telegapi | ba250d659e6a9fd7b3b252d88aefada5a3dc617e | [
"MIT"
] | null | null | null | from telegapi.reqs import reqs as reqs
from telegapi.telapi import telapi
| 24.666667 | 38 | 0.837838 | from telegapi.reqs import reqs as reqs
from telegapi.telapi import telapi
| 0 | 0 | 0 |
e52bc9e6bae8350ede8163a0814ef8dbef8ca8fe | 10,743 | py | Python | examples/core_examples/15d_gaussian.py | deepchatterjeeligo/bilby | 6532c63d0d970ad33478ae0b1c28d4c570b74047 | [
"MIT"
] | null | null | null | examples/core_examples/15d_gaussian.py | deepchatterjeeligo/bilby | 6532c63d0d970ad33478ae0b1c28d4c570b74047 | [
"MIT"
] | null | null | null | examples/core_examples/15d_gaussian.py | deepchatterjeeligo/bilby | 6532c63d0d970ad33478ae0b1c28d4c570b74047 | [
"MIT"
] | null | null | null | import bilby
import numpy as np
from bilby.core.likelihood import (
AnalyticalMultidimensionalBimodalCovariantGaussian,
AnalyticalMultidimensionalCovariantGaussian,
)
logger = bilby.core.utils.logger
cov = [
[
0.045991865933182365,
-0.005489748382557155,
-0.01025067223674548,
... | 27.75969 | 102 | 0.638648 | import bilby
import numpy as np
from bilby.core.likelihood import (
AnalyticalMultidimensionalBimodalCovariantGaussian,
AnalyticalMultidimensionalCovariantGaussian,
)
logger = bilby.core.utils.logger
cov = [
[
0.045991865933182365,
-0.005489748382557155,
-0.01025067223674548,
... | 0 | 0 | 0 |
d142eccada5f83c8232284acc025dd5dfbe3b8aa | 1,272 | py | Python | lib/descriptor.py | scott-zhou/pyjvm | 56b22a0fee77d1586bb3fda301896231aded0170 | [
"MIT"
] | 12 | 2017-01-17T13:47:30.000Z | 2022-02-10T07:01:55.000Z | lib/descriptor.py | scott-zhou/pyjvm | 56b22a0fee77d1586bb3fda301896231aded0170 | [
"MIT"
] | null | null | null | lib/descriptor.py | scott-zhou/pyjvm | 56b22a0fee77d1586bb3fda301896231aded0170 | [
"MIT"
] | 2 | 2018-02-24T07:56:02.000Z | 2018-07-11T03:49:35.000Z | import re
| 31.02439 | 81 | 0.568396 | import re
def parse_field_descriptor(field, void=False):
base_type = [
('B', 'byte'),
('C', 'char'),
('D', 'double'),
('F', 'float'),
('I', 'int'),
('J', 'long'),
('S', 'short'),
('Z', 'boolean'),
]
if void:
base_type.append(('V', 'vo... | 1,214 | 0 | 46 |
4ea48d247045e2133033239fb19305c97a5233b5 | 3,646 | py | Python | custom_components/promql/sensor.py | Adi146/home-assistant-promql | f4c302da407b816b0cc4bf3cc69c55552e0207f2 | [
"MIT"
] | null | null | null | custom_components/promql/sensor.py | Adi146/home-assistant-promql | f4c302da407b816b0cc4bf3cc69c55552e0207f2 | [
"MIT"
] | null | null | null | custom_components/promql/sensor.py | Adi146/home-assistant-promql | f4c302da407b816b0cc4bf3cc69c55552e0207f2 | [
"MIT"
] | null | null | null | from datetime import timedelta
import logging
from homeassistant.core import callback
from homeassistant.components.sensor import SensorEntity
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.update_coordinator import (
DataUpdateCoordinator,
)
from homeassistant.const import (
CO... | 26.808824 | 87 | 0.651947 | from datetime import timedelta
import logging
from homeassistant.core import callback
from homeassistant.components.sensor import SensorEntity
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.update_coordinator import (
DataUpdateCoordinator,
)
from homeassistant.const import (
CO... | 2,574 | 432 | 69 |
d89fafd2c0a2db24b2fef7f82022eb82d78c0982 | 451 | py | Python | spacy/tests/lang/da/test_exceptions.py | DEVESHTARASIA/spaCy | 4c5d2c80d5e273cdc2ed7be6eb378bb7fb3c0c31 | [
"MIT"
] | 2 | 2019-07-08T17:09:22.000Z | 2021-01-09T17:36:04.000Z | spacy/tests/lang/da/test_exceptions.py | DEVESHTARASIA/spaCy | 4c5d2c80d5e273cdc2ed7be6eb378bb7fb3c0c31 | [
"MIT"
] | null | null | null | spacy/tests/lang/da/test_exceptions.py | DEVESHTARASIA/spaCy | 4c5d2c80d5e273cdc2ed7be6eb378bb7fb3c0c31 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals
import pytest
@pytest.mark.parametrize('text', ["ca.", "m.a.o.", "Jan.", "Dec."])
| 28.1875 | 67 | 0.698448 | # coding: utf-8
from __future__ import unicode_literals
import pytest
@pytest.mark.parametrize('text', ["ca.", "m.a.o.", "Jan.", "Dec."])
def test_da_tokenizer_handles_abbr(da_tokenizer, text):
tokens = da_tokenizer(text)
assert len(tokens) == 1
def test_da_tokenizer_handles_exc_in_text(da_tokenizer):
te... | 266 | 0 | 45 |
fb9754315cd56c3ee0852233f95ab43b0772c530 | 642 | py | Python | 11 Object Oriented Programming/product.py | Himanshu44626748/Learn-Python | f3a4d997f2d29b146e5f7434f4801ae94bc3483f | [
"MIT"
] | 2 | 2020-03-16T14:57:44.000Z | 2020-11-29T07:45:54.000Z | 11 Object Oriented Programming/product.py | Himanshu44626748/Learn-Python | f3a4d997f2d29b146e5f7434f4801ae94bc3483f | [
"MIT"
] | null | null | null | 11 Object Oriented Programming/product.py | Himanshu44626748/Learn-Python | f3a4d997f2d29b146e5f7434f4801ae94bc3483f | [
"MIT"
] | 1 | 2020-08-13T07:59:02.000Z | 2020-08-13T07:59:02.000Z | '''This is my first class in python'''
p1 = Product()
p1.display()
# print(p1.name)
# print(p1.description)
# print(p1.price)
p2 = Product()
p2.display()
# print(p2.name)
# print(p2.description)
# print(p2.price) | 24.692308 | 167 | 0.629283 | '''This is my first class in python'''
class Product:
def __init__(self):
self.name = 'Dell Inspiron'
self.description = 'Laptop, i7, 8th Gen, 8 GB RAM, 512 GB SSD'
self.price = 91000
def display(self): # Added an Instance function to print, so that we don't ne... | 357 | -7 | 76 |
5e8ac64fbe70fe326a2767fef3d9300d1b292115 | 2,049 | py | Python | class_4/dungeon.py | goosemanjack/python_intro_class | ca4b2390f2b0bb037d94ed4516d98848b7cf97d6 | [
"MIT"
] | null | null | null | class_4/dungeon.py | goosemanjack/python_intro_class | ca4b2390f2b0bb037d94ed4516d98848b7cf97d6 | [
"MIT"
] | null | null | null | class_4/dungeon.py | goosemanjack/python_intro_class | ca4b2390f2b0bb037d94ed4516d98848b7cf97d6 | [
"MIT"
] | null | null | null | # Dungeon Crawler
import asciiart
import level1
import level2
import time # timer
import hero
#def test():
# print(asciiart.baby_dragon())
# print(asciiart.big_skull())
# print(asciiart.dragon())
# print(asciiart.samurai())
# print(asciiart.skull_cross())
# print(asciiart.warrior())
# print(as... | 19.893204 | 79 | 0.570522 | # Dungeon Crawler
import asciiart
import level1
import level2
import time # timer
import hero
#def test():
# print(asciiart.baby_dragon())
# print(asciiart.big_skull())
# print(asciiart.dragon())
# print(asciiart.samurai())
# print(asciiart.skull_cross())
# print(asciiart.warrior())
# print(as... | 1,600 | 0 | 46 |
935cbb30e7c351867221dc569f3fce1527a04ae9 | 214 | py | Python | setup.py | tzelleke/floodfill | ba11c990e9b2844fba1e5ec367c80571600d106c | [
"MIT"
] | 5 | 2016-10-08T02:46:30.000Z | 2021-08-30T12:43:53.000Z | setup.py | tzelleke/mepfinder | ba11c990e9b2844fba1e5ec367c80571600d106c | [
"MIT"
] | null | null | null | setup.py | tzelleke/mepfinder | ba11c990e9b2844fba1e5ec367c80571600d106c | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(
name='mepfinder',
version='0.1',
packages=['mepfinder'],
url='',
license='MIT',
author='Theodros Zelleke',
author_email='',
description=''
)
| 16.461538 | 32 | 0.602804 | from distutils.core import setup
setup(
name='mepfinder',
version='0.1',
packages=['mepfinder'],
url='',
license='MIT',
author='Theodros Zelleke',
author_email='',
description=''
)
| 0 | 0 | 0 |
9fe1c1e0ce7af6f205e8ffd160b033bde2928be9 | 5,162 | py | Python | pokemon_classifier.py | taritkandpal/Classifier-Comparison | c87b9a40ab5d296e667ac76510e23b0fbc48e4c4 | [
"MIT"
] | null | null | null | pokemon_classifier.py | taritkandpal/Classifier-Comparison | c87b9a40ab5d296e667ac76510e23b0fbc48e4c4 | [
"MIT"
] | null | null | null | pokemon_classifier.py | taritkandpal/Classifier-Comparison | c87b9a40ab5d296e667ac76510e23b0fbc48e4c4 | [
"MIT"
] | null | null | null |
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the dataset
dataset = pd.read_csv('pokemonchg.csv')
X = dataset.iloc[:, [19,20,21,22,23,25,28,35]].values
y = dataset.iloc[:, 40].values
# Splitting the dataset into the Training set and Test set
... | 31.47561 | 96 | 0.770632 |
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the dataset
dataset = pd.read_csv('pokemonchg.csv')
X = dataset.iloc[:, [19,20,21,22,23,25,28,35]].values
y = dataset.iloc[:, 40].values
# Splitting the dataset into the Training set and Test set
... | 0 | 0 | 0 |
fe3462cce33307011401ed3f20189c90a2576830 | 1,900 | py | Python | __init__.py | shrught/Create_LoginPage | 41f3b57bce558110754167fcc32d13b7c77bd1f6 | [
"MIT"
] | 25 | 2021-03-23T22:05:07.000Z | 2022-03-30T22:06:31.000Z | __init__.py | shrught/Create_LoginPage | 41f3b57bce558110754167fcc32d13b7c77bd1f6 | [
"MIT"
] | 6 | 2021-08-30T06:57:53.000Z | 2021-11-16T23:25:33.000Z | __init__.py | shrught/Create_LoginPage | 41f3b57bce558110754167fcc32d13b7c77bd1f6 | [
"MIT"
] | 32 | 2021-02-27T21:25:07.000Z | 2022-03-26T12:43:56.000Z | ########################################################################
################# Importing packages #######################
########################################################################
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
... | 57.575758 | 142 | 0.679474 | ########################################################################
################# Importing packages #######################
########################################################################
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
... | 1,484 | 0 | 22 |
92f3b0fb601c87aa8ac221a3e268cbca2e468dfa | 1,449 | py | Python | paddlenlp/ops/optimizer/__init__.py | holazzer/PaddleNLP | 14b6f897b875408c70cfd51230b4de8123e253ed | [
"Apache-2.0"
] | 1 | 2022-01-04T01:37:10.000Z | 2022-01-04T01:37:10.000Z | paddlenlp/ops/optimizer/__init__.py | holazzer/PaddleNLP | 14b6f897b875408c70cfd51230b4de8123e253ed | [
"Apache-2.0"
] | null | null | null | paddlenlp/ops/optimizer/__init__.py | holazzer/PaddleNLP | 14b6f897b875408c70cfd51230b4de8123e253ed | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 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 appli... | 29.571429 | 147 | 0.637681 | # Copyright (c) 2021 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 appli... | 577 | 0 | 23 |
0c3c499b54f5bd21c0622b78c59f6bfffa5106dd | 19,731 | py | Python | triangulation/myutils.py | mattjr/structured | 0cb4635af7602f2a243a9b739e5ed757424ab2a7 | [
"Apache-2.0"
] | 14 | 2015-01-11T02:53:04.000Z | 2021-11-25T17:31:22.000Z | triangulation/myutils.py | skair39/structured | 0cb4635af7602f2a243a9b739e5ed757424ab2a7 | [
"Apache-2.0"
] | null | null | null | triangulation/myutils.py | skair39/structured | 0cb4635af7602f2a243a9b739e5ed757424ab2a7 | [
"Apache-2.0"
] | 14 | 2015-07-21T04:47:52.000Z | 2020-03-12T12:31:25.000Z | ##################################################
# Copyright (c) INRIA (France) 2011, 2012, 2013
#
# This file is part of inria-mvs. You can redistribute it and/or
# modify it under the terms of the GNU General Public License.
#
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
# WARRANTY OF... | 29.016176 | 111 | 0.482743 | ##################################################
# Copyright (c) INRIA (France) 2011, 2012, 2013
#
# This file is part of inria-mvs. You can redistribute it and/or
# modify it under the terms of the GNU General Public License.
#
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
# WARRANTY OF... | 2,485 | 0 | 92 |
ebf94db1c4c91316cd7dab7c874067fd95792a17 | 48 | py | Python | src/meltano/__init__.py | Bjenhamin4Alfredolvchenki/meltano | b8d1d812f4051b6334986fc6b447d23c4d0d5043 | [
"MIT"
] | 8 | 2020-06-16T22:29:54.000Z | 2021-06-04T11:57:57.000Z | src/meltano/__init__.py | aroder/meltano | b8d1d812f4051b6334986fc6b447d23c4d0d5043 | [
"MIT"
] | 13 | 2021-03-10T19:44:58.000Z | 2022-02-27T05:31:12.000Z | src/meltano/__init__.py | aroder/meltano | b8d1d812f4051b6334986fc6b447d23c4d0d5043 | [
"MIT"
] | 2 | 2020-06-16T22:29:59.000Z | 2020-11-04T05:47:50.000Z | # Managed by bumpversion
__version__ = "1.33.0"
| 16 | 24 | 0.729167 | # Managed by bumpversion
__version__ = "1.33.0"
| 0 | 0 | 0 |
b0200b1d4f3beb0be0474deb39c5f85e8f743623 | 393 | py | Python | Chapter 2 - first neurons/layer-neurons-batch-data.py | benricok/pyNeural | 5fc5710359e3a8d16d9bbb83679854bb07a817ad | [
"MIT"
] | null | null | null | Chapter 2 - first neurons/layer-neurons-batch-data.py | benricok/pyNeural | 5fc5710359e3a8d16d9bbb83679854bb07a817ad | [
"MIT"
] | null | null | null | Chapter 2 - first neurons/layer-neurons-batch-data.py | benricok/pyNeural | 5fc5710359e3a8d16d9bbb83679854bb07a817ad | [
"MIT"
] | null | null | null | import numpy as np
inputs = [[1.0, 2.0, 3.0, 2.5],
[2.0, 5.0, -1.0, 2.0],
[-1.5, 2.7, 3.3, -0.8]]
weights = [[0.2, 0.8, -0.5, 1.0],
[0.5, -0.91, 0.26, -0.5],
[-0.26, -0.27, 0.17, 0.87]]
biases = [2.0, 3.0, 0.5]
outputs = np.dot(inputs, np.array(weights).T) + biases
print(out... | 21.833333 | 54 | 0.475827 | import numpy as np
inputs = [[1.0, 2.0, 3.0, 2.5],
[2.0, 5.0, -1.0, 2.0],
[-1.5, 2.7, 3.3, -0.8]]
weights = [[0.2, 0.8, -0.5, 1.0],
[0.5, -0.91, 0.26, -0.5],
[-0.26, -0.27, 0.17, 0.87]]
biases = [2.0, 3.0, 0.5]
outputs = np.dot(inputs, np.array(weights).T) + biases
print(out... | 0 | 0 | 0 |
6af2299e1cc21e04f6a15f4f77aa7af789e5fa58 | 10,794 | py | Python | src/pipelinex/extras/ops/ignite/handlers/flexible_checkpoint.py | MarchRaBBiT/pipelinex | ea8def32a71752b667f9f3522acba3fd79102fe1 | [
"Apache-2.0"
] | null | null | null | src/pipelinex/extras/ops/ignite/handlers/flexible_checkpoint.py | MarchRaBBiT/pipelinex | ea8def32a71752b667f9f3522acba3fd79102fe1 | [
"Apache-2.0"
] | null | null | null | src/pipelinex/extras/ops/ignite/handlers/flexible_checkpoint.py | MarchRaBBiT/pipelinex | ea8def32a71752b667f9f3522acba3fd79102fe1 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime, timedelta
import os
import tempfile
import torch
import logging
log = logging.getLogger(__name__)
__all__ = ["FlexibleModelCheckpoint"]
"""
Copied from https://github.com/pytorch/ignite/blob/v0.2.1/ignite/handlers/checkpoint.py
due to the change in ignite v0.3.0
"""
class ModelChec... | 38.007042 | 120 | 0.593756 | from datetime import datetime, timedelta
import os
import tempfile
import torch
import logging
log = logging.getLogger(__name__)
__all__ = ["FlexibleModelCheckpoint"]
"""
Copied from https://github.com/pytorch/ignite/blob/v0.2.1/ignite/handlers/checkpoint.py
due to the change in ignite v0.3.0
"""
class ModelChec... | 6,426 | 26 | 207 |
7a844f619e3efa74efdbb5c73abfff44bb6d9063 | 300 | py | Python | Python/Syntax/Exception.py | piovezan/SOpt | a5ec90796b7bdf98f0675457fc4bb99c8695bc40 | [
"MIT"
] | 148 | 2017-08-03T01:49:27.000Z | 2022-03-26T10:39:30.000Z | Python/Syntax/Exception.py | piovezan/SOpt | a5ec90796b7bdf98f0675457fc4bb99c8695bc40 | [
"MIT"
] | 3 | 2017-11-23T19:52:05.000Z | 2020-04-01T00:44:40.000Z | Python/Syntax/Exception.py | piovezan/SOpt | a5ec90796b7bdf98f0675457fc4bb99c8695bc40 | [
"MIT"
] | 59 | 2017-08-03T01:49:19.000Z | 2022-03-31T23:24:38.000Z | lista = [1, 2, 3]
try:
numero = int(input(f'Digite um número entre 0 e {len(lista)-1}: '))
print(lista[numero])
except ValueError:
print('Não foi digitado um número')
except IndexError:
print('O número digitado está fora da faixa aceita')
#https://pt.stackoverflow.com/q/451936/101
| 27.272727 | 71 | 0.683333 | lista = [1, 2, 3]
try:
numero = int(input(f'Digite um número entre 0 e {len(lista)-1}: '))
print(lista[numero])
except ValueError:
print('Não foi digitado um número')
except IndexError:
print('O número digitado está fora da faixa aceita')
#https://pt.stackoverflow.com/q/451936/101
| 0 | 0 | 0 |
ab0fe4af8c61239d35e953e82d97e659ca3bf28c | 2,164 | py | Python | mysite/teproj/middlewares/ip_middleware.py | talhamasood0000/django_ipcheck | f4d68e9c3575f02d6d2a29e7904ba3f162dfb451 | [
"Apache-2.0"
] | null | null | null | mysite/teproj/middlewares/ip_middleware.py | talhamasood0000/django_ipcheck | f4d68e9c3575f02d6d2a29e7904ba3f162dfb451 | [
"Apache-2.0"
] | null | null | null | mysite/teproj/middlewares/ip_middleware.py | talhamasood0000/django_ipcheck | f4d68e9c3575f02d6d2a29e7904ba3f162dfb451 | [
"Apache-2.0"
] | null | null | null | from urllib import response
from django.http import HttpResponse,HttpResponseForbidden, HttpResponseRedirect
from teproj.models import TestModel
from django.urls import reverse
from django.conf import settings
from django.core.cache import cache
from django.contrib.auth.models import Group
| 36.677966 | 106 | 0.589649 | from urllib import response
from django.http import HttpResponse,HttpResponseForbidden, HttpResponseRedirect
from teproj.models import TestModel
from django.urls import reverse
from django.conf import settings
from django.core.cache import cache
from django.contrib.auth.models import Group
class CustomMiddleware:
... | 1,748 | 2 | 107 |
9113a67adedf08f6968ed8efa95fec64627823e4 | 6,395 | py | Python | dynastyscraper.py | vizs/dynastyscraper | 7f5c5933aa7e8b467db58cc7afbe51e40e324cd3 | [
"BSD-2-Clause"
] | 1 | 2022-01-31T05:09:43.000Z | 2022-01-31T05:09:43.000Z | dynastyscraper.py | vizs/dynastyscraper | 7f5c5933aa7e8b467db58cc7afbe51e40e324cd3 | [
"BSD-2-Clause"
] | null | null | null | dynastyscraper.py | vizs/dynastyscraper | 7f5c5933aa7e8b467db58cc7afbe51e40e324cd3 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# Licensed under BSD 2-Clause License.
#
# This is a really crude script. This spits out shell-escaped wget
# commands to download the images of the chapters.
#
# Each image is downloaded into "VOLUME_CHAPTER/XXX.png" where VOLUME
# and CHAPTER are the volume and chapter names respectively. I... | 37.397661 | 144 | 0.606099 | #!/usr/bin/env python3
#
# Licensed under BSD 2-Clause License.
#
# This is a really crude script. This spits out shell-escaped wget
# commands to download the images of the chapters.
#
# Each image is downloaded into "VOLUME_CHAPTER/XXX.png" where VOLUME
# and CHAPTER are the volume and chapter names respectively. I... | 872 | 0 | 46 |
35344fdb50ad0e73db9563e4847d6313d8dfbe83 | 290 | py | Python | catalog/bindings/gmd/abstract_operation.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | catalog/bindings/gmd/abstract_operation.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | catalog/bindings/gmd/abstract_operation.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
from bindings.gmd.abstract_crstype import AbstractCoordinateOperationType
__NAMESPACE__ = "http://www.opengis.net/gml"
@dataclass
| 26.363636 | 73 | 0.796552 | from dataclasses import dataclass
from bindings.gmd.abstract_crstype import AbstractCoordinateOperationType
__NAMESPACE__ = "http://www.opengis.net/gml"
@dataclass
class AbstractOperation(AbstractCoordinateOperationType):
class Meta:
namespace = "http://www.opengis.net/gml"
| 0 | 101 | 22 |
1cc6c164dd77cefd83f6adae1de30b1677c4f0ec | 26 | py | Python | bassin/__init__.py | lionel42/bassin | 45258ac11ce6ec62075c88f6445eddad3d945585 | [
"MIT"
] | null | null | null | bassin/__init__.py | lionel42/bassin | 45258ac11ce6ec62075c88f6445eddad3d945585 | [
"MIT"
] | null | null | null | bassin/__init__.py | lionel42/bassin | 45258ac11ce6ec62075c88f6445eddad3d945585 | [
"MIT"
] | null | null | null | from .Bassin import Bassin | 26 | 26 | 0.846154 | from .Bassin import Bassin | 0 | 0 | 0 |
5a2267304bf02066ad57cb523a22e659defb90d7 | 117 | py | Python | sqlalchemy_solr/solrdbapi/api_globals.py | anjackson/sqlalchemy-solr | 56d46f90fdc522ad9113d8efde592d6a9868bd10 | [
"MIT"
] | null | null | null | sqlalchemy_solr/solrdbapi/api_globals.py | anjackson/sqlalchemy-solr | 56d46f90fdc522ad9113d8efde592d6a9868bd10 | [
"MIT"
] | null | null | null | sqlalchemy_solr/solrdbapi/api_globals.py | anjackson/sqlalchemy-solr | 56d46f90fdc522ad9113d8efde592d6a9868bd10 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Global variables
_HEADER = {"Content-Type": "application/json"}
_PAYLOAD = {"stmt": None}
| 19.5 | 46 | 0.632479 | # -*- coding: utf-8 -*-
# Global variables
_HEADER = {"Content-Type": "application/json"}
_PAYLOAD = {"stmt": None}
| 0 | 0 | 0 |
fa5bda6b980c9d6262d78c458162ba7b19e4ef12 | 3,762 | py | Python | zero_ilumi_agenda/zero_ilumi_agenda_core/views.py | ZeroILumi/Zero_ILumi_Agenda_Django | 1a34c12e92e233b0e3d96f34b78d235f88fc7124 | [
"MIT"
] | null | null | null | zero_ilumi_agenda/zero_ilumi_agenda_core/views.py | ZeroILumi/Zero_ILumi_Agenda_Django | 1a34c12e92e233b0e3d96f34b78d235f88fc7124 | [
"MIT"
] | null | null | null | zero_ilumi_agenda/zero_ilumi_agenda_core/views.py | ZeroILumi/Zero_ILumi_Agenda_Django | 1a34c12e92e233b0e3d96f34b78d235f88fc7124 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User
from django.shortcuts import render, redirect
from zero_ilumi_agenda_core.models import Evento_Agendado
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate, login, logout
from django.contrib import messages
from datetime impo... | 37.247525 | 105 | 0.661085 | from django.contrib.auth.models import User
from django.shortcuts import render, redirect
from zero_ilumi_agenda_core.models import Evento_Agendado
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate, login, logout
from django.contrib import messages
from datetime impo... | 2,906 | 0 | 179 |
7f5e0625c5594db764254be083cba073e7fbc7a6 | 4,616 | py | Python | AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GradientModifierNodes.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-09-13T00:01:12.000Z | 2021-09-13T00:01:12.000Z | AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GradientModifierNodes.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | null | null | null | AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GradientModifierNodes.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-07-20T11:07:25.000Z | 2021-07-20T11:07:25.000Z | """
Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
"""
C13767841 - All Gradient Modifier nodes can be added to a graph
C18055051 - All Gradient Modifier nodes can... | 50.173913 | 155 | 0.684575 | """
Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
"""
C13767841 - All Gradient Modifier nodes can be added to a graph
C18055051 - All Gradient Modifier nodes can... | 332 | 3,378 | 22 |
5b926d450579990c8f09b93cbc5ae4c06128ef8d | 802 | py | Python | models/stylegan2/op/setup.py | Norod/encoder4editing | 362ef1722f5082fda5f53aaa2c9562fbaedd5fd6 | [
"MIT"
] | 53 | 2021-01-22T08:52:02.000Z | 2022-03-30T13:58:57.000Z | GAN2Shape/stylegan2/stylegan2-pytorch/op/setup.py | alessioGalatolo/GAN-2D-to-3D | 088bd2c438c2419192733ddf6c322dff8db8e513 | [
"MIT"
] | null | null | null | GAN2Shape/stylegan2/stylegan2-pytorch/op/setup.py | alessioGalatolo/GAN-2D-to-3D | 088bd2c438c2419192733ddf6c322dff8db8e513 | [
"MIT"
] | 12 | 2021-02-03T09:04:02.000Z | 2022-02-10T12:34:40.000Z | from setuptools import setup
from torch.utils.cpp_extension import CUDAExtension, BuildExtension
from pathlib import Path
# Usage:
# python setup.py install (or python setup.py bdist_wheel)
# NB: Windows: run from VS2017 x64 Native Tool Command Prompt
rootdir = (Path(__file__).parent / '..' / 'op').resolve()
setup(
... | 24.30303 | 93 | 0.633416 | from setuptools import setup
from torch.utils.cpp_extension import CUDAExtension, BuildExtension
from pathlib import Path
# Usage:
# python setup.py install (or python setup.py bdist_wheel)
# NB: Windows: run from VS2017 x64 Native Tool Command Prompt
rootdir = (Path(__file__).parent / '..' / 'op').resolve()
setup(
... | 0 | 0 | 0 |
87c61571e70cdd66700ebb85bc4a82a19bc6aaf4 | 2,405 | py | Python | LoadGames.py | SeppPenner/LoadGamesFromPcGamesDownloadCom | 7dab270a1c1ff5db012bc26aacdafbd4cba1de74 | [
"MIT"
] | 6 | 2018-05-13T15:54:20.000Z | 2021-12-12T22:30:38.000Z | LoadGames.py | SeppPenner/LoadGamesFromPcGamesDownloadCom | 7dab270a1c1ff5db012bc26aacdafbd4cba1de74 | [
"MIT"
] | null | null | null | LoadGames.py | SeppPenner/LoadGamesFromPcGamesDownloadCom | 7dab270a1c1ff5db012bc26aacdafbd4cba1de74 | [
"MIT"
] | 3 | 2018-10-08T17:16:40.000Z | 2021-12-12T22:30:41.000Z | import requests
from bs4 import BeautifulSoup
import sys
import datetime
mainPageUrl = 'https://pcgames-download.com/'
mainFilePath = './loading/mainPage.html'
pagePath = './loading/'
def loadGameData():
"Loads computer games data"
print ('Loading number of pages')
response = requests.get(mainPageUrl)
with open(m... | 34.855072 | 79 | 0.722661 | import requests
from bs4 import BeautifulSoup
import sys
import datetime
mainPageUrl = 'https://pcgames-download.com/'
mainFilePath = './loading/mainPage.html'
pagePath = './loading/'
def loadGameData():
"Loads computer games data"
print ('Loading number of pages')
response = requests.get(mainPageUrl)
with open(m... | 0 | 0 | 0 |
1c20d53be87d3d3e6f7a2b8bd15d6a2ff185adbe | 2,024 | py | Python | test/student_t_repeated_measures.py | kozzion/tensealstat | 93314a8721ec6b1a2bea466aaeadb06cbf5a4f63 | [
"Apache-2.0"
] | 6 | 2020-12-17T16:05:24.000Z | 2021-12-28T13:26:31.000Z | test/student_t_repeated_measures.py | kozzion/tensealstat | 93314a8721ec6b1a2bea466aaeadb06cbf5a4f63 | [
"Apache-2.0"
] | null | null | null | test/student_t_repeated_measures.py | kozzion/tensealstat | 93314a8721ec6b1a2bea466aaeadb06cbf5a4f63 | [
"Apache-2.0"
] | null | null | null | import sys
import os
from scipy import stats
import tenseal as ts
import numpy as np
from scipy.stats import t
sys.path.append(os.path.abspath('../../tensealstat'))
from tensealstat.tools_context import ToolsContext as tc
from tensealstat.algebra.algebra_numpy import AlgebraNumpy
from tensealstat.algebra.algebra_tens... | 34.896552 | 109 | 0.784091 | import sys
import os
from scipy import stats
import tenseal as ts
import numpy as np
from scipy.stats import t
sys.path.append(os.path.abspath('../../tensealstat'))
from tensealstat.tools_context import ToolsContext as tc
from tensealstat.algebra.algebra_numpy import AlgebraNumpy
from tensealstat.algebra.algebra_tens... | 0 | 0 | 0 |
7f2d97874d60745759c0eb8586e473b807a5fc32 | 1,883 | py | Python | article/models.py | anush7/django-article-project | 2de595309acdcf509491596483521c1c2fa31b46 | [
"MIT"
] | null | null | null | article/models.py | anush7/django-article-project | 2de595309acdcf509491596483521c1c2fa31b46 | [
"MIT"
] | null | null | null | article/models.py | anush7/django-article-project | 2de595309acdcf509491596483521c1c2fa31b46 | [
"MIT"
] | null | null | null | import os
from django.db import models
from django.contrib.auth.models import User
from easy_thumbnails.fields import ThumbnailerImageField
import uuid
| 41.844444 | 95 | 0.765799 | import os
from django.db import models
from django.contrib.auth.models import User
from easy_thumbnails.fields import ThumbnailerImageField
class Tag(models.Model):
tag = models.CharField(max_length=150)
def __unicode__(self):
return self.tag
class ArticleCategory(models.Model):
name = models.C... | 199 | 1,436 | 91 |
d7e636d3d64063bcb97ad001385d2875f365c42a | 1,419 | py | Python | effective_python/metaclass_property/confirm_subclass.py | ftconan/python3 | eb63ba33960072f792ecce6db809866b38c402f8 | [
"MIT"
] | 1 | 2018-12-19T22:07:56.000Z | 2018-12-19T22:07:56.000Z | effective_python/metaclass_property/confirm_subclass.py | ftconan/python3 | eb63ba33960072f792ecce6db809866b38c402f8 | [
"MIT"
] | 12 | 2020-03-14T05:32:26.000Z | 2022-03-12T00:08:49.000Z | effective_python/metaclass_property/confirm_subclass.py | ftconan/python3 | eb63ba33960072f792ecce6db809866b38c402f8 | [
"MIT"
] | 1 | 2018-12-19T22:08:00.000Z | 2018-12-19T22:08:00.000Z | """
@author: magician
@file: confirm_subclass.py
@date: 2020/1/14
"""
class Meta(type):
"""
Meta
"""
class MyClass(object, metaclass=Meta):
"""
MyClass
"""
stuff = 3
class ValidatePolygon(type):
"""
ValidatePolygon
"""
def __new__(meta, name, bases, class_dict):
... | 18.192308 | 58 | 0.538407 | """
@author: magician
@file: confirm_subclass.py
@date: 2020/1/14
"""
class Meta(type):
"""
Meta
"""
def __new__(meta, name, bases, class_dict):
print(meta, name, bases, class_dict)
return type.__new__(meta, name, bases, class_dict)
class MyClass(object, metaclass=Meta):
"""... | 174 | 0 | 79 |
243cd76a122be32db8b6099cc8850f0875085453 | 2,309 | py | Python | Geometry/ForwardCommonData/python/testForwardXML_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 1 | 2021-11-30T16:24:46.000Z | 2021-11-30T16:24:46.000Z | Geometry/ForwardCommonData/python/testForwardXML_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 4 | 2021-11-29T13:57:56.000Z | 2022-03-29T06:28:36.000Z | Geometry/ForwardCommonData/python/testForwardXML_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 1 | 2022-02-27T06:12:26.000Z | 2022-02-27T06:12:26.000Z | import FWCore.ParameterSet.Config as cms
XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource",
geomXMLFiles = cms.vstring(
'Geometry/CMSCommonData/data/materials/2021/v3/materials.xml',
'Geometry/CMSCommonData/data/rotations.xml',
'Geometry/CMSCommonData/data/extend/v3/cmsexte... | 56.317073 | 82 | 0.728021 | import FWCore.ParameterSet.Config as cms
XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource",
geomXMLFiles = cms.vstring(
'Geometry/CMSCommonData/data/materials/2021/v3/materials.xml',
'Geometry/CMSCommonData/data/rotations.xml',
'Geometry/CMSCommonData/data/extend/v3/cmsexte... | 0 | 0 | 0 |
dbeafa580c18ce1f9935d21c5c0dd724455a6ada | 12,269 | py | Python | wbb/utils/dbfunctions.py | sppidy/WilliamButcherBot | 8cbd1593dd44a5384f7b1c4d630aa65271282e3e | [
"MIT"
] | null | null | null | wbb/utils/dbfunctions.py | sppidy/WilliamButcherBot | 8cbd1593dd44a5384f7b1c4d630aa65271282e3e | [
"MIT"
] | null | null | null | wbb/utils/dbfunctions.py | sppidy/WilliamButcherBot | 8cbd1593dd44a5384f7b1c4d630aa65271282e3e | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2021 TheHamkerCat
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, publish, ... | 24.735887 | 78 | 0.615291 | """
MIT License
Copyright (c) 2021 TheHamkerCat
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, publish, ... | 9,652 | 0 | 989 |
49de79cb6c84fe14e0275dff4c478a1045fd3ede | 1,308 | py | Python | explicalib/calibration/evaluation/diagrams/discrete_diagrams.py | euranova/estimating_eces | 9bfa81dd7a39ebe069c5b11b8e7a9bf9017e9350 | [
"MIT"
] | 2 | 2021-11-30T18:44:11.000Z | 2021-11-30T18:44:19.000Z | explicalib/calibration/evaluation/diagrams/discrete_diagrams.py | euranova/estimating_eces | 9bfa81dd7a39ebe069c5b11b8e7a9bf9017e9350 | [
"MIT"
] | null | null | null | explicalib/calibration/evaluation/diagrams/discrete_diagrams.py | euranova/estimating_eces | 9bfa81dd7a39ebe069c5b11b8e7a9bf9017e9350 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: nicolas.posocco
"""
from sklearn.calibration import calibration_curve
import numpy as np
| 39.636364 | 113 | 0.703364 | # -*- coding: utf-8 -*-
"""
@author: nicolas.posocco
"""
from sklearn.calibration import calibration_curve
import numpy as np
def reliability_diagram(label_of_interest, scores, n_bins):
# label_of_interest
assert type(label_of_interest) is np.ndarray, \
"label_of_interest should be an np.ndarray, not... | 1,157 | 0 | 23 |
12561c7b297f03c8a4ed8c22313832ae6dd69b64 | 815 | py | Python | src/aoikfiletypeasso/sac.py | AoiKuiyuyou/AoikWinFileTypeAsso | 294570f729660b7f374ec6c128c9644b8f0eace0 | [
"MIT"
] | 3 | 2016-09-24T16:01:05.000Z | 2020-06-16T07:40:14.000Z | src/aoikfiletypeasso/sac.py | AoiKuiyuyou/AoikFileTypeAsso | 294570f729660b7f374ec6c128c9644b8f0eace0 | [
"MIT"
] | null | null | null | src/aoikfiletypeasso/sac.py | AoiKuiyuyou/AoikFileTypeAsso | 294570f729660b7f374ec6c128c9644b8f0eace0 | [
"MIT"
] | null | null | null | # coding: utf-8
#
# File name "sac" means "SHCNE_ASSOCCHANGED" used at 4xc5k9H.
#
from __future__ import absolute_import
import sys
#/
if __name__ == '__main__':
sys.exit(main())
| 19.404762 | 89 | 0.650307 | # coding: utf-8
#
# File name "sac" means "SHCNE_ASSOCCHANGED" used at 4xc5k9H.
#
from __future__ import absolute_import
import sys
#/
def main():
#/
sys.stderr.write('#/ Send shell change notification, to make changes take effect.\n')
try:
import win32com.shell.shell as shell
import win... | 606 | 0 | 22 |
ccf3e84481404af3c4b3cd4070a56149409c72b0 | 326 | py | Python | ReadingGauges/ComputerSide/GrabberGaugesOutput_python3/ScriptRunGrabber.py | jerabaul29/PaddleAndUltrasonicGauges | 5c6ba80ddfd44190eb21d5c61979ac802a54cb99 | [
"MIT"
] | 2 | 2021-02-03T12:55:57.000Z | 2021-02-11T07:07:06.000Z | ReadingGauges/ComputerSide/GrabberGaugesOutput_python3/ScriptRunGrabber.py | jerabaul29/PaddleAndUltrasonicGauges | 5c6ba80ddfd44190eb21d5c61979ac802a54cb99 | [
"MIT"
] | null | null | null | ReadingGauges/ComputerSide/GrabberGaugesOutput_python3/ScriptRunGrabber.py | jerabaul29/PaddleAndUltrasonicGauges | 5c6ba80ddfd44190eb21d5c61979ac802a54cb99 | [
"MIT"
] | null | null | null | import Grabber
gauge_grabber = Grabber.grabb_serial_values()
gauge_grabber.init()
gauge_grabber.grabb(10)
gauge_grabber.convert_grabbed_to_numpy()
gauge_grabber.plot_grabbed_data()
gauge_grabber.clean_numpy_dict()
gauge_grabber.save_cleaned_dict_numpy('test_saving')
gauge_grabber.save_cleaned_dict_numpy_csv('test_sav... | 27.166667 | 56 | 0.868098 | import Grabber
gauge_grabber = Grabber.grabb_serial_values()
gauge_grabber.init()
gauge_grabber.grabb(10)
gauge_grabber.convert_grabbed_to_numpy()
gauge_grabber.plot_grabbed_data()
gauge_grabber.clean_numpy_dict()
gauge_grabber.save_cleaned_dict_numpy('test_saving')
gauge_grabber.save_cleaned_dict_numpy_csv('test_sav... | 0 | 0 | 0 |
cc20e3149a11c3be4fc61095e2693ba607d9e501 | 5,488 | py | Python | src/stdout.py | X-EcutiOnner/fileobj | 7e4120759450bbdd1eee4ec26c8a757a8af48093 | [
"BSD-2-Clause"
] | 17 | 2015-05-23T11:09:46.000Z | 2021-12-10T14:28:01.000Z | src/stdout.py | X-EcutiOnner/fileobj | 7e4120759450bbdd1eee4ec26c8a757a8af48093 | [
"BSD-2-Clause"
] | 3 | 2015-03-23T04:35:25.000Z | 2017-09-15T07:12:15.000Z | src/stdout.py | X-EcutiOnner/fileobj | 7e4120759450bbdd1eee4ec26c8a757a8af48093 | [
"BSD-2-Clause"
] | 2 | 2016-01-07T00:38:13.000Z | 2020-12-02T08:27:28.000Z | # Copyright (c) 2014, Tomohiro Kusumi
# 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... | 24.5 | 81 | 0.647959 | # Copyright (c) 2014, Tomohiro Kusumi
# 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... | 2,029 | 13 | 1,037 |
5f8e5d269900b982776e65a97bb854c3f10039cd | 834 | py | Python | User/set-namespace.py | rvock/Sublime-Text-Preferences | fbe408bc4740dee984d37336aa2888c8aaa0d74b | [
"MIT"
] | 1 | 2015-05-18T15:52:47.000Z | 2015-05-18T15:52:47.000Z | User/set-namespace.py | rvock/Sublime-Text-Preferences | fbe408bc4740dee984d37336aa2888c8aaa0d74b | [
"MIT"
] | null | null | null | User/set-namespace.py | rvock/Sublime-Text-Preferences | fbe408bc4740dee984d37336aa2888c8aaa0d74b | [
"MIT"
] | null | null | null | import sublime, sublime_plugin
import sys
import re
import os | 26.0625 | 86 | 0.673861 | import sublime, sublime_plugin
import sys
import re
import os
class SetNamespaceCommand(sublime_plugin.TextCommand):
def run(self, edit):
if self.view.settings().get('is_widget'):
return
namespace = os.path.dirname(self.view.file_name())
extensionName = re.sub(r'.*(?:typo3conf/ext|packages)/([^/]*)/.*', r... | 669 | 33 | 70 |
02283df57f4319a703ace0e80322454df4dd0614 | 3,493 | py | Python | software/permacam_processing/image_quality_process.py | lab11/Task2 | 3c3451599dd303cd1e2469e5b9e36e1b4ca49fa6 | [
"Apache-2.0"
] | 21 | 2018-08-29T18:58:26.000Z | 2022-01-12T09:08:04.000Z | software/permacam_processing/image_quality_process.py | lab11/permamote | 3c3451599dd303cd1e2469e5b9e36e1b4ca49fa6 | [
"Apache-2.0"
] | 9 | 2017-11-08T03:22:58.000Z | 2020-05-02T18:23:12.000Z | software/permacam_processing/image_quality_process.py | lab11/Task2 | 3c3451599dd303cd1e2469e5b9e36e1b4ca49fa6 | [
"Apache-2.0"
] | 8 | 2018-10-28T23:44:23.000Z | 2021-07-11T05:18:02.000Z | #!/usr/bin/env python3
import argparse
from glob import glob
from skimage import exposure
from PIL import Image
import colour
import numpy as np
import pandas as pd
import os
from colour_demosaicing import (
demosaicing_CFA_Bayer_bilinear,
demosaicing_CFA_Bayer_Malvar2004,
demosaicing_CFA_Bayer_Menon2007,... | 34.245098 | 121 | 0.604924 | #!/usr/bin/env python3
import argparse
from glob import glob
from skimage import exposure
from PIL import Image
import colour
import numpy as np
import pandas as pd
import os
from colour_demosaicing import (
demosaicing_CFA_Bayer_bilinear,
demosaicing_CFA_Bayer_Malvar2004,
demosaicing_CFA_Bayer_Menon2007,... | 0 | 0 | 0 |
fd261e8c4a8691fb747969570204d7a92c2cb98d | 2,307 | py | Python | Code/packages/migrations/0001_initial.py | praktianerJones/LSD | 8ca07bfcf53347dc466be0cae260387c90f0c2ed | [
"BSD-3-Clause"
] | 2 | 2021-12-15T21:58:43.000Z | 2021-12-15T22:17:26.000Z | Code/packages/migrations/0001_initial.py | praktianerJones/LSD | 8ca07bfcf53347dc466be0cae260387c90f0c2ed | [
"BSD-3-Clause"
] | null | null | null | Code/packages/migrations/0001_initial.py | praktianerJones/LSD | 8ca07bfcf53347dc466be0cae260387c90f0c2ed | [
"BSD-3-Clause"
] | 1 | 2021-12-19T17:02:02.000Z | 2021-12-19T17:02:02.000Z | # Generated by Django 2.1.7 on 2020-10-22 12:55
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
| 31.60274 | 82 | 0.397486 | # Generated by Django 2.1.7 on 2020-10-22 12:55
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AU... | 0 | 2,097 | 23 |
4765077027b875beb3bbe235bb22451c6aed58b9 | 2,655 | py | Python | src/website/misc/mail.py | wooyek/secure-share | b3b1dd6a03dc278e881e866a5554254523d33a81 | [
"MIT"
] | null | null | null | src/website/misc/mail.py | wooyek/secure-share | b3b1dd6a03dc278e881e866a5554254523d33a81 | [
"MIT"
] | 1 | 2020-05-01T10:53:25.000Z | 2020-05-01T10:53:25.000Z | src/website/misc/mail.py | wooyek/secure-share | b3b1dd6a03dc278e881e866a5554254523d33a81 | [
"MIT"
] | null | null | null | # coding=utf-8
# Copyright 2015 Brave Labs sp. z o.o.
# All rights reserved.
#
# This source code and all resulting intermediate files are CONFIDENTIAL and
# PROPRIETY TRADE SECRETS of Brave Labs sp. z o.o.
# Use is subject to license terms. See NOTICE file of this project for details.
import json
import logging
from s... | 34.480519 | 94 | 0.711864 | # coding=utf-8
# Copyright 2015 Brave Labs sp. z o.o.
# All rights reserved.
#
# This source code and all resulting intermediate files are CONFIDENTIAL and
# PROPRIETY TRADE SECRETS of Brave Labs sp. z o.o.
# Use is subject to license terms. See NOTICE file of this project for details.
import json
import logging
from s... | 0 | 0 | 0 |
e7588964b2c66c2e1a9c460176fbd519c621d0aa | 1,256 | py | Python | main.py | hiroyaiyori/MultiAgentQlearning | 9e5161edad6b9e83995f3bb70bb159047e2dab79 | [
"Apache-2.0"
] | null | null | null | main.py | hiroyaiyori/MultiAgentQlearning | 9e5161edad6b9e83995f3bb70bb159047e2dab79 | [
"Apache-2.0"
] | null | null | null | main.py | hiroyaiyori/MultiAgentQlearning | 9e5161edad6b9e83995f3bb70bb159047e2dab79 | [
"Apache-2.0"
] | null | null | null | import random
import matplotlib.pyplot as plt
from setting import *
from field import Field
from qvalue import Hunter
if __name__ == "__main__":
h0 = Hunter(0)
h1 = Hunter(1)
epi_itern_l = []
for i in range(EPISODE_N):
f = Field()
itern = 0
while True:
fin = qle... | 22.428571 | 62 | 0.610669 | import random
import matplotlib.pyplot as plt
from setting import *
from field import Field
from qvalue import Hunter
def qlearn_step(f: Field, h0: Hunter, h1: Hunter):
# move hunter0
m0 = h0.decide_movement(f)
pre_s0 = h0.h_recognize(f)
f.move_agent(0, m0)
# move hunter1
m1 = h1.decide_mov... | 613 | 0 | 23 |
4dd52bce4b143c4fbffd44bc3c50266b8901f019 | 4,976 | py | Python | rlpyt/runners/multigpu_sync.py | DilipA/rlpyt | edfd46484c56a47b4671006a16a642e6808da393 | [
"MIT"
] | null | null | null | rlpyt/runners/multigpu_sync.py | DilipA/rlpyt | edfd46484c56a47b4671006a16a642e6808da393 | [
"MIT"
] | null | null | null | rlpyt/runners/multigpu_sync.py | DilipA/rlpyt | edfd46484c56a47b4671006a16a642e6808da393 | [
"MIT"
] | 1 | 2020-06-23T14:13:40.000Z | 2020-06-23T14:13:40.000Z |
import multiprocessing as mp
import time
import torch.distributed
from rlpyt.runners.minibatch_rl import MinibatchRl
from rlpyt.runners.minibatch_rl_eval import MinibatchRlEval
from rlpyt.utils.seed import make_seed
from rlpyt.utils.collections import AttrDict
from rlpyt.utils.quick_args import save__init__args
###... | 28.434286 | 79 | 0.567725 |
import multiprocessing as mp
import time
import torch.distributed
from rlpyt.runners.minibatch_rl import MinibatchRl
from rlpyt.runners.minibatch_rl_eval import MinibatchRlEval
from rlpyt.utils.seed import make_seed
from rlpyt.utils.collections import AttrDict
from rlpyt.utils.quick_args import save__init__args
###... | 3,521 | 294 | 485 |
d85adc875950cf9304a2a13e89a8e00037af958b | 8,324 | py | Python | src/python/pants/backend/python/rules/python_test_runner.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/rules/python_test_runner.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | 1 | 2018-09-04T17:37:34.000Z | 2018-09-04T19:42:58.000Z | src/python/pants/backend/python/rules/python_test_runner.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os
from dataclasses import dataclass
from textwrap import dedent
from typing import Optional, Tuple
from pants.backend.python.rules.pex import Pex
from pants.backend.python.rules.p... | 38.359447 | 117 | 0.780995 | # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os
from dataclasses import dataclass
from textwrap import dedent
from typing import Optional, Tuple
from pants.backend.python.rules.pex import Pex
from pants.backend.python.rules.p... | 4,537 | 201 | 135 |
c133beede45af5e543c1fe1ec193fd97ed55895f | 479 | py | Python | tests/utils/string_test.py | medecau/sciencebeam-utils | 0253139f17c4208ccacdedf6d2c4eb2b062b7721 | [
"MIT"
] | 2 | 2019-07-17T14:53:07.000Z | 2021-09-15T04:47:47.000Z | tests/utils/string_test.py | medecau/sciencebeam-utils | 0253139f17c4208ccacdedf6d2c4eb2b062b7721 | [
"MIT"
] | 108 | 2018-07-24T15:20:54.000Z | 2022-03-28T16:57:39.000Z | tests/utils/string_test.py | medecau/sciencebeam-utils | 0253139f17c4208ccacdedf6d2c4eb2b062b7721 | [
"MIT"
] | 2 | 2020-02-07T10:58:48.000Z | 2021-09-01T10:15:32.000Z | from sciencebeam_utils.utils.string import (
parse_list
)
| 26.611111 | 61 | 0.670146 | from sciencebeam_utils.utils.string import (
parse_list
)
class TestParseList:
def test_should_return_empty_list_for_empty_string(self):
assert parse_list('') == []
def test_should_return_single_item(self):
assert parse_list('abc') == ['abc']
def test_should_return_multiple_items(sel... | 287 | -1 | 130 |
ac0722f5355939a163b27b591dc7ab3e9e9bd82a | 817 | py | Python | blog_config.py | misalabs/misalabs.com | f2c95f124f01a718c5bf9331457d75bae0e892bd | [
"MIT"
] | null | null | null | blog_config.py | misalabs/misalabs.com | f2c95f124f01a718c5bf9331457d75bae0e892bd | [
"MIT"
] | null | null | null | blog_config.py | misalabs/misalabs.com | f2c95f124f01a718c5bf9331457d75bae0e892bd | [
"MIT"
] | null | null | null | # coding: utf-8 -*-
# TITLE / SUBTITLE / AUTHOR
# The title, subtitle, and author of the blog
TITLE = "Misa Montes"
SUBTITLE = "blog"
AUTHOR = "Misa"
METADATA_TAGS = ['title', 'author']
# POSTS_PER_PAGE
# The number of posts that will appear on each page of index.html
POSTS_PER_PAGE = 3
# SUMMARY_DELIMITOR
# Used to ... | 29.178571 | 78 | 0.740514 | # coding: utf-8 -*-
# TITLE / SUBTITLE / AUTHOR
# The title, subtitle, and author of the blog
TITLE = "Misa Montes"
SUBTITLE = "blog"
AUTHOR = "Misa"
METADATA_TAGS = ['title', 'author']
# POSTS_PER_PAGE
# The number of posts that will appear on each page of index.html
POSTS_PER_PAGE = 3
# SUMMARY_DELIMITOR
# Used to ... | 0 | 0 | 0 |
ee0f794b0f5448c23e5ed4a42cf4a22fac9055fd | 509 | py | Python | tAPP/2/P2.py | ArvinZJC/UofG_PGT_PSD_Python | d90e9bb0b53b14c6b1d7e657c3c61e2792e0d9c4 | [
"MIT"
] | null | null | null | tAPP/2/P2.py | ArvinZJC/UofG_PGT_PSD_Python | d90e9bb0b53b14c6b1d7e657c3c61e2792e0d9c4 | [
"MIT"
] | null | null | null | tAPP/2/P2.py | ArvinZJC/UofG_PGT_PSD_Python | d90e9bb0b53b14c6b1d7e657c3c61e2792e0d9c4 | [
"MIT"
] | null | null | null | '''
Description: Problem 2 (rearrange the code)
Version: 1.0.2.20210118
Author: Arvin Zhao
Date: 2021-01-14 22:35:43
Last Editors: Arvin Zhao
LastEditTime: 2021-01-18 18:11:03
'''
line = input('Enter a string: ')
i = 0
is_palindrome = True
while i < len(line) / 2 and is_palindrome:
if line[i] != line[len(line) - ... | 20.36 | 43 | 0.646365 | '''
Description: Problem 2 (rearrange the code)
Version: 1.0.2.20210118
Author: Arvin Zhao
Date: 2021-01-14 22:35:43
Last Editors: Arvin Zhao
LastEditTime: 2021-01-18 18:11:03
'''
line = input('Enter a string: ')
i = 0
is_palindrome = True
while i < len(line) / 2 and is_palindrome:
if line[i] != line[len(line) - ... | 0 | 0 | 0 |
ed9616c041b5bba086b27dc907c55bb00c486b21 | 1,762 | py | Python | classes/buildings.py | AlbatrosCZ/RP-bot | f605550ebb9009a9846048da645db91e385d4f35 | [
"MIT"
] | null | null | null | classes/buildings.py | AlbatrosCZ/RP-bot | f605550ebb9009a9846048da645db91e385d4f35 | [
"MIT"
] | null | null | null | classes/buildings.py | AlbatrosCZ/RP-bot | f605550ebb9009a9846048da645db91e385d4f35 | [
"MIT"
] | null | null | null | """
name - jméno
pozition - pozice (x, y)
can_train - čísla pro trening jednotky (integer) - pokud je má jednotka alespoň jedno z těchto čísel může budova trénovat tuto jednotku (čím víc společných čísel tím kratší doba tréningu... | 46.368421 | 247 | 0.536322 | """
name - jméno
pozition - pozice (x, y)
can_train - čísla pro trening jednotky (integer) - pokud je má jednotka alespoň jedno z těchto čísel může budova trénovat tuto jednotku (čím víc společných čísel tím kratší doba tréningu... | 852 | -6 | 102 |
0dfa8249c34d3a763ad92b788a6d4f1a0321b4b8 | 1,870 | py | Python | Labs/Lab10/lab10a.py | tonysulfaro/CSE-231 | 0e3ff5422fe42624a90a17d7f33174346662a6fc | [
"MIT"
] | 2 | 2021-09-23T19:17:24.000Z | 2021-11-29T09:03:56.000Z | Labs/Lab10/lab10a.py | tonysulfaro/CSE-231 | 0e3ff5422fe42624a90a17d7f33174346662a6fc | [
"MIT"
] | null | null | null | Labs/Lab10/lab10a.py | tonysulfaro/CSE-231 | 0e3ff5422fe42624a90a17d7f33174346662a6fc | [
"MIT"
] | 1 | 2020-10-25T13:03:18.000Z | 2020-10-25T13:03:18.000Z | ##
## Demonstrate some of the operations of the Deck and Card classes
##
import cards
# Seed the random number generator to a specific value so every execution
# of the program uses the same sequence of random numbers (for testing).
import random
random.seed( 100 )
# Create a deck of cards
my_deck = cards.Deck()
... | 24.285714 | 85 | 0.665775 | ##
## Demonstrate some of the operations of the Deck and Card classes
##
import cards
# Seed the random number generator to a specific value so every execution
# of the program uses the same sequence of random numbers (for testing).
import random
random.seed( 100 )
# Create a deck of cards
my_deck = cards.Deck()
... | 829 | 0 | 23 |
bb993e3d8ef9c6f08b033e56942c9442d4a223c0 | 4,886 | py | Python | src/ur_online_control/ur_direct/structure.py | createchaos/ur_online_control_2 | 22b0ec6b7ffa2c74b55dd214e7b854bec9922ccb | [
"MIT"
] | null | null | null | src/ur_online_control/ur_direct/structure.py | createchaos/ur_online_control_2 | 22b0ec6b7ffa2c74b55dd214e7b854bec9922ccb | [
"MIT"
] | null | null | null | src/ur_online_control/ur_direct/structure.py | createchaos/ur_online_control_2 | 22b0ec6b7ffa2c74b55dd214e7b854bec9922ccb | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import os
import socket
from ur_online_control.ur_direct.mixins.airpick_mixins import AirpickMixins
__all__ = [
'URCommandScript'
]
class URCommandScript(AirpickMixins):
"""Class containing commands for the UR Robot system"""
def start(self):
"""To build the... | 35.926471 | 117 | 0.575931 | from __future__ import absolute_import
import os
import socket
from ur_online_control.ur_direct.mixins.airpick_mixins import AirpickMixins
__all__ = [
'URCommandScript'
]
class URCommandScript(AirpickMixins):
"""Class containing commands for the UR Robot system"""
def __init__(self, server_ip=None, serve... | 1,308 | 0 | 161 |
728f3b3c609ce6bb2af3cd08ab99688368ec0879 | 1,168 | py | Python | genemunge/data/cleanup.py | unlearnai/genemunge | a7dc07706ae2bf487a04fcda5623013c055030a3 | [
"CC-BY-4.0"
] | 21 | 2018-04-06T17:03:52.000Z | 2020-06-29T12:56:43.000Z | genemunge/data/cleanup.py | unlearnai/genemunge | a7dc07706ae2bf487a04fcda5623013c055030a3 | [
"CC-BY-4.0"
] | 5 | 2018-04-10T19:32:33.000Z | 2018-07-17T18:07:48.000Z | genemunge/data/cleanup.py | unlearnai/genemunge | a7dc07706ae2bf487a04fcda5623013c055030a3 | [
"CC-BY-4.0"
] | 5 | 2018-04-11T05:42:52.000Z | 2019-04-02T03:43:52.000Z | import os
import contextlib
filepath = os.path.dirname(os.path.abspath(__file__))
def remove_installed_data_files():
"""
Removes some of the files that are downloaded during install.
Args:
None
Returns:
None
"""
# remove the GO file
with contextlib.suppress(FileNotFound... | 29.2 | 77 | 0.697774 | import os
import contextlib
filepath = os.path.dirname(os.path.abspath(__file__))
def remove_installed_data_files():
"""
Removes some of the files that are downloaded during install.
Args:
None
Returns:
None
"""
# remove the GO file
with contextlib.suppress(FileNotFound... | 0 | 0 | 0 |
cbc363039e6a67e61d37d79f26466d4524013356 | 42 | py | Python | test/integration/ElseIfStart/else if start.py | HighSchoolHacking/GLS-Draft | 9e418b6290e7c8e3f2da87668784bdba1cde5a76 | [
"MIT"
] | 30 | 2019-10-29T12:47:50.000Z | 2022-02-12T06:41:39.000Z | test/integration/ElseIfStart/else if start.py | HighSchoolHacking/GLS-Draft | 9e418b6290e7c8e3f2da87668784bdba1cde5a76 | [
"MIT"
] | 247 | 2017-09-21T17:11:18.000Z | 2019-10-08T12:59:07.000Z | test/integration/ElseIfStart/else if start.py | HighSchoolHacking/GLS-Draft | 9e418b6290e7c8e3f2da87668784bdba1cde5a76 | [
"MIT"
] | 17 | 2017-10-01T16:53:20.000Z | 2018-11-28T07:20:35.000Z | #
if aaa:
# ...
elif bbb:
# ...
#
| 6 | 9 | 0.285714 | #
if aaa:
# ...
elif bbb:
# ...
#
| 0 | 0 | 0 |
8a6089511fc4904952eb4fa9eb272cd7236b50fa | 6,550 | py | Python | model/videoQA.py | MikeWangWZHL/StarterCode | e271c5dff2d9c4344c2fecd81bb0b5dfe2749cf2 | [
"MIT"
] | 63 | 2021-06-07T18:16:55.000Z | 2022-03-29T09:41:05.000Z | model/videoQA.py | MikeWangWZHL/StarterCode | e271c5dff2d9c4344c2fecd81bb0b5dfe2749cf2 | [
"MIT"
] | 16 | 2021-07-08T07:42:28.000Z | 2022-01-14T06:40:57.000Z | model/videoQA.py | MikeWangWZHL/StarterCode | e271c5dff2d9c4344c2fecd81bb0b5dfe2749cf2 | [
"MIT"
] | 5 | 2021-07-19T08:23:45.000Z | 2022-02-02T02:49:48.000Z | """
Copyright (c) Microsoft Corporation.
Licensed under the MIT license.
HERO for Video Question Answering Tasks, shared by:
1. TVQA
2. How2QA
3. VLEP
4. VIOLIN
copied/modified from HERO
(https://github.com/linjieli222/HERO)
"""
from collections import defaultdict
import copy
import torch
from torch import nn
from t... | 41.455696 | 81 | 0.563206 | """
Copyright (c) Microsoft Corporation.
Licensed under the MIT license.
HERO for Video Question Answering Tasks, shared by:
1. TVQA
2. How2QA
3. VLEP
4. VIOLIN
copied/modified from HERO
(https://github.com/linjieli222/HERO)
"""
from collections import defaultdict
import copy
import torch
from torch import nn
from t... | 4,380 | 1,696 | 23 |
a41809e1c5cdadc95d16313cf867c2d8f5f87176 | 24,261 | py | Python | cardgame_channels_app/tests.py | cyface/cardgame_channels | 22f2bef190ee20999eae27e6aa9ce138a78ae47f | [
"MIT"
] | null | null | null | cardgame_channels_app/tests.py | cyface/cardgame_channels | 22f2bef190ee20999eae27e6aa9ce138a78ae47f | [
"MIT"
] | null | null | null | cardgame_channels_app/tests.py | cyface/cardgame_channels | 22f2bef190ee20999eae27e6aa9ce138a78ae47f | [
"MIT"
] | null | null | null | import logging
from channels.test import ChannelTestCase, WSClient
from .game_logic import add_player_to_game
from .models import Player, Game, CardGamePlayer, Card
LOGGER = logging.getLogger("cardgame_channels_app")
| 61.420253 | 228 | 0.676765 | import logging
from channels.test import ChannelTestCase, WSClient
from .game_logic import add_player_to_game
from .models import Player, Game, CardGamePlayer, Card
LOGGER = logging.getLogger("cardgame_channels_app")
class GameModelTests(ChannelTestCase):
fixtures = ['test_card_data.json'] # 100 green and 100... | 23,465 | 528 | 46 |
dce07b739ca43d0c08ddf16db1417665536ad16a | 16,447 | py | Python | pyt_utilities.py | realtechsupport/return_to_bali | 6af3b8163ef583e9d9ad3fb5d381e62714ce8c6f | [
"CC-BY-4.0"
] | null | null | null | pyt_utilities.py | realtechsupport/return_to_bali | 6af3b8163ef583e9d9ad3fb5d381e62714ce8c6f | [
"CC-BY-4.0"
] | null | null | null | pyt_utilities.py | realtechsupport/return_to_bali | 6af3b8163ef583e9d9ad3fb5d381e62714ce8c6f | [
"CC-BY-4.0"
] | null | null | null | # pyt_utilities.py (python3)
# utilities for CNN training with pytorch; data preparation, training, evaluation
# added saving checkpoint
# FEB 2020 / 21
# sources:
# https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html#load-data
# https://pytorch.org/tutorials/beginner/finetuning_torchvision_models_t... | 42.830729 | 196 | 0.588436 | # pyt_utilities.py (python3)
# utilities for CNN training with pytorch; data preparation, training, evaluation
# added saving checkpoint
# FEB 2020 / 21
# sources:
# https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html#load-data
# https://pytorch.org/tutorials/beginner/finetuning_torchvision_models_t... | 11,897 | 13 | 251 |
ae1a7f1f3b28ebe4b6ed9d9b5a1557a03091f6d4 | 10,706 | py | Python | data_preperation/cricsheet/load_data.py | vv-varun/IPL-DataAnalysis | 936827aedcbc4f0a2204888210b3e20fcd46b0e6 | [
"MIT"
] | null | null | null | data_preperation/cricsheet/load_data.py | vv-varun/IPL-DataAnalysis | 936827aedcbc4f0a2204888210b3e20fcd46b0e6 | [
"MIT"
] | null | null | null | data_preperation/cricsheet/load_data.py | vv-varun/IPL-DataAnalysis | 936827aedcbc4f0a2204888210b3e20fcd46b0e6 | [
"MIT"
] | null | null | null | import mysql.connector
import yaml
from os import path, listdir
import shutil
import datetime
db_connection = mysql.connector.connect(
host="localhost",
port=3308,
user="root",
passwd="",
database="ipldata"
)
# Global Variable
player_data = {}
# Query Team details by name
# Add new player to DB.
# Get Pl... | 37.697183 | 153 | 0.621054 | import mysql.connector
import yaml
from os import path, listdir
import shutil
import datetime
db_connection = mysql.connector.connect(
host="localhost",
port=3308,
user="root",
passwd="",
database="ipldata"
)
# Global Variable
player_data = {}
# Query Team details by name
def queryTeamDetailsByName(team_na... | 9,642 | 0 | 177 |
a258ffb0adf5980dfb80e491c805881a5b484263 | 5,868 | py | Python | resources/mgltools_x86_64Linux2_1.5.6/MGLToolsPckgs/MolKit/groParser.py | J-E-J-S/aaRS-Pipeline | 43f59f28ab06e4b16328c3bc405cdddc6e69ac44 | [
"MIT"
] | 8 | 2021-12-14T21:30:01.000Z | 2022-02-14T11:30:03.000Z | resources/mgltools_x86_64Linux2_1.5.6/MGLToolsPckgs/MolKit/groParser.py | J-E-J-S/aaRS-Pipeline | 43f59f28ab06e4b16328c3bc405cdddc6e69ac44 | [
"MIT"
] | null | null | null | resources/mgltools_x86_64Linux2_1.5.6/MGLToolsPckgs/MolKit/groParser.py | J-E-J-S/aaRS-Pipeline | 43f59f28ab06e4b16328c3bc405cdddc6e69ac44 | [
"MIT"
] | 1 | 2021-11-04T21:48:14.000Z | 2021-11-04T21:48:14.000Z | #
#
#
#
#
#
#$Id: groParser.py,v 1.11 2006/12/15 19:53:29 annao Exp $
#
"""
Module Gromacs Parser.
"""
import os,types
from MolKit.moleculeParser import MoleculeParser
from MolKit.protein import Protein, Chain, ChainSet, Residue, ResidueSet, ProteinSet
from MolKit.molecule import Atom, AtomSet, Bond, BondSet, H... | 36 | 179 | 0.512781 | #
#
#
#
#
#
#$Id: groParser.py,v 1.11 2006/12/15 19:53:29 annao Exp $
#
"""
Module Gromacs Parser.
"""
import os,types
from MolKit.moleculeParser import MoleculeParser
from MolKit.protein import Protein, Chain, ChainSet, Residue, ResidueSet, ProteinSet
from MolKit.molecule import Atom, AtomSet, Bond, BondSet, H... | 4,734 | 559 | 23 |
cd271e097e85b39119ac5d57f5185c0f3eb0adae | 3,675 | py | Python | webiopi_0.7.1/python/webiopi/devices/bus.py | Masterkriz/rpi3-webiopi | 3c627a2769394a9cd5687e32fe779e9280c17e9b | [
"Apache-2.0"
] | 63 | 2016-09-01T13:10:59.000Z | 2021-04-28T16:00:22.000Z | webiopi_0.7.1/python/webiopi/devices/bus.py | Masterkriz/rpi3-webiopi | 3c627a2769394a9cd5687e32fe779e9280c17e9b | [
"Apache-2.0"
] | 56 | 2016-09-08T21:59:25.000Z | 2021-04-29T07:44:39.000Z | services/webiopi/src/python/webiopi/devices/bus.py | creative-workflow/pi-setup | d6d28cb8d34ef71b1e8ac95dd94099bfad08837a | [
"MIT"
] | 24 | 2016-10-30T03:20:02.000Z | 2021-04-28T15:03:07.000Z | # Copyright 2012-2013 Eric Ptak - trouch.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 31.144068 | 128 | 0.594558 | # Copyright 2012-2013 Eric Ptak - trouch.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 2,102 | -9 | 466 |
11ed4453dc35a54a0bce80fd61af7da083f6ed04 | 1,934 | py | Python | clover/core/report.py | taoyanli0808/clover | 54dc4000263ab9e8873f0d429a7fe48b11fb727a | [
"Apache-2.0"
] | 18 | 2019-07-01T04:49:33.000Z | 2022-03-11T03:15:09.000Z | clover/core/report.py | taoyanli0808/clover | 54dc4000263ab9e8873f0d429a7fe48b11fb727a | [
"Apache-2.0"
] | 64 | 2019-11-20T09:33:21.000Z | 2021-11-16T06:34:32.000Z | clover/core/report.py | taoyanli0808/clover | 54dc4000263ab9e8873f0d429a7fe48b11fb727a | [
"Apache-2.0"
] | 9 | 2019-10-18T08:28:26.000Z | 2020-05-25T15:38:12.000Z |
import datetime
from clover.common import get_system_info
from clover.common import friendly_datetime
from clover.report.service import ReportService
| 30.698413 | 98 | 0.520683 |
import datetime
from clover.common import get_system_info
from clover.common import friendly_datetime
from clover.report.service import ReportService
class Report(object):
def __init__(self, suite, trigger):
"""
"""
self.start = datetime.datetime.now()
self.end = datetime.dateti... | 0 | 1,758 | 23 |
6e330a1ef95d54ec31a0638b0d3c9eb66886cac5 | 2,027 | py | Python | server/asyncEvent.py | Orienfish/flsim | f87624dee904edd7830eb41f669574b4f6c81471 | [
"Apache-2.0"
] | null | null | null | server/asyncEvent.py | Orienfish/flsim | f87624dee904edd7830eb41f669574b4f6c81471 | [
"Apache-2.0"
] | null | null | null | server/asyncEvent.py | Orienfish/flsim | f87624dee904edd7830eb41f669574b4f6c81471 | [
"Apache-2.0"
] | 2 | 2021-10-21T03:43:50.000Z | 2022-03-26T19:19:44.000Z |
class asyncGwEvent(object):
"""Basic async event."""
class asyncClEvent(object):
"""Basic async event.""" | 36.196429 | 78 | 0.704489 |
class asyncGwEvent(object):
"""Basic async event."""
def __init__(self, clients, gateway, download_time):
# Pick the clients that are associated with the given gateway object
self.clients = [client for client in clients
if client.client_id in gateway.clients_id]
... | 1,535 | 0 | 376 |
0323291efc8d205fb0aa73cee0fb59b5fd6e516a | 345,898 | py | Python | 3algo/homo/1_2_7datap.py | allengrr/deadlock_project | 933878077c45a7df04daa087407bb2620c064617 | [
"MIT"
] | null | null | null | 3algo/homo/1_2_7datap.py | allengrr/deadlock_project | 933878077c45a7df04daa087407bb2620c064617 | [
"MIT"
] | null | null | null | 3algo/homo/1_2_7datap.py | allengrr/deadlock_project | 933878077c45a7df04daa087407bb2620c064617 | [
"MIT"
] | 1 | 2021-03-21T17:54:26.000Z | 2021-03-21T17:54:26.000Z |
wt1_2_7 = {'192.168.122.112': [6.0527, 8.4551, 7.8479, 7.6681, 7.4932, 6.4745, 6.4198, 8.2644, 10.7811, 10.3783, 9.9412, 9.5791, 9.2604, 9.4337, 9.2044, 8.9888, 8.8576, 8.6938, 8.5687, 8.4276, 8.3159, 8.203, 8.3446, 8.2226, 8.127, 8.0167, 7.9279, 7.8576, 7.9614, 7.9092, 7.8796, 7.8118, 7.747, 7.8486, 7.7813, 7.8853, 7... | 20,346.941176 | 322,402 | 0.621296 |
wt1_2_7 = {'192.168.122.112': [6.0527, 8.4551, 7.8479, 7.6681, 7.4932, 6.4745, 6.4198, 8.2644, 10.7811, 10.3783, 9.9412, 9.5791, 9.2604, 9.4337, 9.2044, 8.9888, 8.8576, 8.6938, 8.5687, 8.4276, 8.3159, 8.203, 8.3446, 8.2226, 8.127, 8.0167, 7.9279, 7.8576, 7.9614, 7.9092, 7.8796, 7.8118, 7.747, 7.8486, 7.7813, 7.8853, 7... | 0 | 0 | 0 |
2903eba819ddcc9c757b78bfe5e2c4b7a2171307 | 7,963 | py | Python | snc.py | hyungkwonko/steadiness-cohesiveness | a62b6796967f2b2e79c36fb2b103f7e4ee7aa0e8 | [
"MIT"
] | 13 | 2021-06-26T07:25:11.000Z | 2021-07-20T06:58:04.000Z | snc.py | hyungkwonko/steadiness-cohesiveness | a62b6796967f2b2e79c36fb2b103f7e4ee7aa0e8 | [
"MIT"
] | 6 | 2020-09-24T17:49:41.000Z | 2020-10-03T14:02:59.000Z | snc.py | jeonhyun97/fimif | 7964474da15c688a90a8ce9b9e648543ce5114a0 | [
"MIT"
] | 1 | 2021-07-01T18:08:36.000Z | 2021-07-01T18:08:36.000Z | import numpy as np
import random
import json
import hdbscan
import numba
import sys
from sklearn.neighbors import KDTree
from pyclustering.cluster.xmeans import xmeans
from helpers import distance_matrix as dm
from helpers import hparam_functions as hp
from helpers import visualization as vis
from concurrent.futures i... | 37.384977 | 110 | 0.571142 | import numpy as np
import random
import json
import hdbscan
import numba
import sys
from sklearn.neighbors import KDTree
from pyclustering.cluster.xmeans import xmeans
from helpers import distance_matrix as dm
from helpers import hparam_functions as hp
from helpers import visualization as vis
from concurrent.futures i... | 7,286 | -11 | 299 |
fa8d31d66b14a0e8182646257c68eb38f41cd82f | 3,517 | py | Python | lib/turkish_nltk/trnltk/morphology/contextful/likelihoodmetrics/contextlessdistribution/contextlessdistributioncalculator.py | myasiny/wordembed | d4df516a4ac6eed71d1cc6e085638e895c525de6 | [
"MIT"
] | null | null | null | lib/turkish_nltk/trnltk/morphology/contextful/likelihoodmetrics/contextlessdistribution/contextlessdistributioncalculator.py | myasiny/wordembed | d4df516a4ac6eed71d1cc6e085638e895c525de6 | [
"MIT"
] | null | null | null | lib/turkish_nltk/trnltk/morphology/contextful/likelihoodmetrics/contextlessdistribution/contextlessdistributioncalculator.py | myasiny/wordembed | d4df516a4ac6eed71d1cc6e085638e895c525de6 | [
"MIT"
] | null | null | null | """
Copyright 2012 Ali Ok (aliokATapacheDOTorg)
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... | 48.178082 | 147 | 0.76315 | """
Copyright 2012 Ali Ok (aliokATapacheDOTorg)
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... | 170 | 2,579 | 23 |
fafae2dfa03776e286db1f07addd2a723945b066 | 248 | py | Python | saf/nonlinear/flux.py | dmitry-kabanov/fickettmodel | 255b1e9cae1cfb7a6b914ad61a17288d52215cc4 | [
"MIT"
] | null | null | null | saf/nonlinear/flux.py | dmitry-kabanov/fickettmodel | 255b1e9cae1cfb7a6b914ad61a17288d52215cc4 | [
"MIT"
] | null | null | null | saf/nonlinear/flux.py | dmitry-kabanov/fickettmodel | 255b1e9cae1cfb7a6b914ad61a17288d52215cc4 | [
"MIT"
] | null | null | null | import numpy as np
| 19.076923 | 40 | 0.564516 | import numpy as np
class Flux(object):
def __init__(self, npoints):
"""TODO: Docstring for __init__.
:npoints: TODO
:returns: TODO
"""
self.u = np.zeros(npoints)
self.lamda = np.zeros(npoints)
| 0 | 206 | 23 |
6f99d3106f3bc1094a862c8c7aa78296741c8631 | 2,810 | py | Python | jaqs/data/basic/position.py | WestXu/JAQS | 3c9389afab518f188b8628af72297d750c07dfb1 | [
"Apache-2.0"
] | 602 | 2017-11-21T00:39:40.000Z | 2022-03-16T06:13:08.000Z | jaqs/data/basic/position.py | WestXu/JAQS | 3c9389afab518f188b8628af72297d750c07dfb1 | [
"Apache-2.0"
] | 63 | 2017-12-08T08:21:16.000Z | 2020-03-07T13:57:35.000Z | jaqs/data/basic/position.py | WestXu/JAQS | 3c9389afab518f188b8628af72297d750c07dfb1 | [
"Apache-2.0"
] | 365 | 2017-11-21T01:38:36.000Z | 2022-03-30T15:55:30.000Z | # encoding:utf-8
class Position(object):
"""
Basic position class.
Attributes
----------
symbol : str
List of securities.
side : str
("Long", "Short"). Positions of different sides will not be merged.
cost_price : float
Average cost price of current net position.
... | 23.813559 | 79 | 0.552313 | # encoding:utf-8
class Position(object):
"""
Basic position class.
Attributes
----------
symbol : str
List of securities.
side : str
("Long", "Short"). Positions of different sides will not be merged.
cost_price : float
Average cost price of current net position.
... | 1,054 | 0 | 226 |
7c155ca3ad86c8e2034ae70bd090f75f9ba1e72c | 10,758 | py | Python | conductor/conductor/controller/translator_svc.py | onap/optf-has | dd06e2675aedd7ae6344f2f51e70bbd468f36ce5 | [
"Apache-2.0"
] | 4 | 2019-02-14T19:18:09.000Z | 2019-10-21T17:17:59.000Z | conductor/conductor/controller/translator_svc.py | onap/optf-has | dd06e2675aedd7ae6344f2f51e70bbd468f36ce5 | [
"Apache-2.0"
] | null | null | null | conductor/conductor/controller/translator_svc.py | onap/optf-has | dd06e2675aedd7ae6344f2f51e70bbd468f36ce5 | [
"Apache-2.0"
] | 4 | 2019-05-09T07:05:54.000Z | 2020-11-20T05:56:47.000Z | #
# -------------------------------------------------------------------------
# Copyright (c) 2015-2017 AT&T Intellectual Property
# Copyright (C) 2020 Wipro Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You ma... | 39.844444 | 113 | 0.604109 | #
# -------------------------------------------------------------------------
# Copyright (c) 2015-2017 AT&T Intellectual Property
# Copyright (C) 2020 Wipro Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You ma... | 784 | 0 | 27 |
100224c5e87268947545ef064b470a911e6290c0 | 1,266 | py | Python | src/findenum.py | WOWZON3/RoseOnline | ec17901400fedb1a4705a8a8bb69925910c5b0cd | [
"Apache-2.0"
] | 1 | 2020-03-09T22:19:26.000Z | 2020-03-09T22:19:26.000Z | src/findenum.py | WOWZON3/RoseOnline | ec17901400fedb1a4705a8a8bb69925910c5b0cd | [
"Apache-2.0"
] | null | null | null | src/findenum.py | WOWZON3/RoseOnline | ec17901400fedb1a4705a8a8bb69925910c5b0cd | [
"Apache-2.0"
] | null | null | null | #!/bin/python3
enum = {}
previousValue = None
with open("rosecommon/include/epackettype.h", "r") as f:
for i in range(46):
f.readline()
for line in f:
if "};" in line:
break
name, value = parse(line)
if value:
enum[name] = value
while True:
value = i... | 25.32 | 56 | 0.50237 | #!/bin/python3
enum = {}
previousValue = None
def parse(line):
global previousValue
line = line.strip()
if len(line) == 0:
return None, None
id = line.find("//")
if id != -1:
line = line[:id]
line = line.strip()
line = line[:-1]
line = line.split("=")
line[0] = line... | 668 | 0 | 23 |
07f45e7eb5d042bbd5cc5645219b308998496484 | 15,270 | py | Python | addon_common/common/utils.py | senjacob/retopoflow | 7817bb7d68f98e5ae2c7835f28eeafe76367789e | [
"OML"
] | null | null | null | addon_common/common/utils.py | senjacob/retopoflow | 7817bb7d68f98e5ae2c7835f28eeafe76367789e | [
"OML"
] | null | null | null | addon_common/common/utils.py | senjacob/retopoflow | 7817bb7d68f98e5ae2c7835f28eeafe76367789e | [
"OML"
] | null | null | null | '''
Copyright (C) 2021 CG Cookie
http://cgcookie.com
hello@cgcookie.com
Created by Jonathan Denning, Jonathan Williamson
This program 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 ... | 33.123644 | 97 | 0.576228 | '''
Copyright (C) 2021 CG Cookie
http://cgcookie.com
hello@cgcookie.com
Created by Jonathan Denning, Jonathan Williamson
This program 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 ... | 11,736 | 69 | 977 |
9751201d5d87e45e65a5fb9c8931abc18fb84269 | 1,575 | py | Python | src/speech_distillation/custom_discriminator.py | AlonKellner/hifi-gan | e842836a0c879289c1848e922695ea1117715739 | [
"MIT"
] | null | null | null | src/speech_distillation/custom_discriminator.py | AlonKellner/hifi-gan | e842836a0c879289c1848e922695ea1117715739 | [
"MIT"
] | null | null | null | src/speech_distillation/custom_discriminator.py | AlonKellner/hifi-gan | e842836a0c879289c1848e922695ea1117715739 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as f
| 38.414634 | 105 | 0.645079 | import torch
import torch.nn as nn
import torch.nn.functional as f
class AllInOneDiscriminator(nn.Module):
def __init__(self, pre_model, blocks, post_model):
super(AllInOneDiscriminator, self).__init__()
self.pre_model = pre_model
self.blocks = blocks
self.post_model = po... | 1,311 | 28 | 162 |
1946612015dd895b8e3ea0ba5a88d89c172ea93a | 279 | py | Python | hrsalespipes/system/templatetags/custom_tags.py | hanztura/hrsalespipes | 77accf3132726ced05d84fa2a41891b841f310b8 | [
"Apache-2.0"
] | 3 | 2020-03-26T12:43:43.000Z | 2021-05-10T14:35:51.000Z | hrsalespipes/system/templatetags/custom_tags.py | hanztura/hrsalespipes | 77accf3132726ced05d84fa2a41891b841f310b8 | [
"Apache-2.0"
] | 5 | 2021-04-08T21:15:15.000Z | 2022-02-10T11:03:12.000Z | hrsalespipes/system/templatetags/custom_tags.py | hanztura/hrsalespipes | 77accf3132726ced05d84fa2a41891b841f310b8 | [
"Apache-2.0"
] | 1 | 2022-01-30T19:24:48.000Z | 2022-01-30T19:24:48.000Z | import json
from django import template
from django.utils.html import mark_safe
register = template.Library()
@register.simple_tag
| 21.461538 | 65 | 0.792115 | import json
from django import template
from django.utils.html import mark_safe
register = template.Library()
@register.simple_tag
def many_to_many_uuid_to_string(values):
values_in_json = json.dumps([str(value) for value in values])
return mark_safe(values_in_json)
| 122 | 0 | 22 |
9f2b74ad866744c30cd1f3b15f739ae2f576a5f0 | 1,874 | py | Python | organisations/factories.py | City-of-Helsinki/palvelutarjotin | 4ad67cbf4062832aba8080cb96ac785bdbbe9aa8 | [
"MIT"
] | 2 | 2020-11-10T16:31:26.000Z | 2021-02-19T10:33:27.000Z | organisations/factories.py | City-of-Helsinki/palvelutarjotin | 4ad67cbf4062832aba8080cb96ac785bdbbe9aa8 | [
"MIT"
] | 239 | 2020-04-23T07:36:17.000Z | 2022-03-15T08:38:38.000Z | organisations/factories.py | City-of-Helsinki/palvelutarjotin | 4ad67cbf4062832aba8080cb96ac785bdbbe9aa8 | [
"MIT"
] | null | null | null | import factory
from django.contrib.auth import get_user_model
from organisations.models import Organisation, OrganisationProposal, Person
| 28.830769 | 83 | 0.696905 | import factory
from django.contrib.auth import get_user_model
from organisations.models import Organisation, OrganisationProposal, Person
def fake_id_array():
from faker import Faker
fake = Faker()
return fake.pylist(3, True, "str")
class UserFactory(factory.django.DjangoModelFactory):
first_name =... | 382 | 1,234 | 115 |