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
0e86bb35579ae55e6b4845a4183b318b0e4e0293
2,273
py
Python
Python Programming Advanced/Lambda functions-111.py
vipmunot/Data-Analysis-using-Python
34586d8cbbc336508c4a7a68abe14944f1096252
[ "MIT" ]
null
null
null
Python Programming Advanced/Lambda functions-111.py
vipmunot/Data-Analysis-using-Python
34586d8cbbc336508c4a7a68abe14944f1096252
[ "MIT" ]
null
null
null
Python Programming Advanced/Lambda functions-111.py
vipmunot/Data-Analysis-using-Python
34586d8cbbc336508c4a7a68abe14944f1096252
[ "MIT" ]
null
null
null
## 1. String Manipulation ## hello = "hello world"[0:5] foo = "some string" password = "password" print(foo[5:11]) # Your code goes here fifth = password[4] last_four = password[len(password)-4:] ## 2. Omitting starting or ending indices ## hello = "hello world"[:5] foo = "some string" print(foo[5:]) my_string = ...
22.959596
95
0.679278
## 1. String Manipulation ## hello = "hello world"[0:5] foo = "some string" password = "password" print(foo[5:11]) # Your code goes here fifth = password[4] last_four = password[len(password)-4:] ## 2. Omitting starting or ending indices ## hello = "hello world"[:5] foo = "some string" print(foo[5:]) my_string = ...
216
0
67
db2bc3453a59daa35b5ac0ac34e041d4da948c7d
3,434
py
Python
cogs/moderation.py
Termed/AlphaWolf
3d204e3986aa96052f81769f2016a56968656bef
[ "MIT" ]
1
2020-08-26T11:25:41.000Z
2020-08-26T11:25:41.000Z
cogs/moderation.py
Termed/alphawolf
3d204e3986aa96052f81769f2016a56968656bef
[ "MIT" ]
null
null
null
cogs/moderation.py
Termed/alphawolf
3d204e3986aa96052f81769f2016a56968656bef
[ "MIT" ]
null
null
null
import discord from discord.ext import commands from discord.utils import get from discord.ext.commands import has_permissions, MissingPermissions class Moderation(commands.Cog): """ Moderation commands for discord """ @commands.command(help='Kicks people from the server') @commands.has_permissions(kick_...
51.253731
138
0.653174
import discord from discord.ext import commands from discord.utils import get from discord.ext.commands import has_permissions, MissingPermissions class Moderation(commands.Cog): """ Moderation commands for discord """ def __init__(self, bot): self.bot = bot @commands.command(help='Kicks people ...
2,822
0
128
167f00a31ad041b0803343ed27abb9b05a784302
1,018
py
Python
misc/count_tags.py
kxxt/taichi
15f39b79c258080f1e34fcbdc29646d9ced0a4fe
[ "MIT" ]
11,699
2020-01-09T03:02:46.000Z
2022-03-31T20:59:08.000Z
misc/count_tags.py
kxxt/taichi
15f39b79c258080f1e34fcbdc29646d9ced0a4fe
[ "MIT" ]
3,589
2020-01-09T03:18:25.000Z
2022-03-31T19:06:42.000Z
misc/count_tags.py
kxxt/taichi
15f39b79c258080f1e34fcbdc29646d9ced0a4fe
[ "MIT" ]
1,391
2020-01-09T03:02:54.000Z
2022-03-31T08:44:29.000Z
import os import sys from git import Repo commits = list(Repo('.').iter_commits('master')) authors = {} notable = {} changelog = {} for i, c in enumerate(commits): s = c.summary tags = [] while s[0] == '[': r = s.find(']') tag = s[1:r] tags.append(tag) s = s[r + 1:] ...
19.960784
63
0.524558
import os import sys from git import Repo commits = list(Repo('.').iter_commits('master')) authors = {} notable = {} changelog = {} for i, c in enumerate(commits): s = c.summary tags = [] while s[0] == '[': r = s.find(']') tag = s[1:r] tags.append(tag) s = s[r + 1:] ...
221
0
23
ce46e68bfdd8312ac30c4c78fa9111dd69d532f5
145,663
py
Python
evermotion_dataset/_dataset_config.py
akx/ml-hypersim
9bf9a55e1189fe92147dc64386b244c07195e3b7
[ "AML" ]
2
2021-04-19T09:18:32.000Z
2021-08-25T15:02:51.000Z
evermotion_dataset/_dataset_config.py
lingjie0206/ml-hypersim
2408fbafe580246108585f9c46780dc62f284cfc
[ "AML" ]
null
null
null
evermotion_dataset/_dataset_config.py
lingjie0206/ml-hypersim
2408fbafe580246108585f9c46780dc62f284cfc
[ "AML" ]
1
2020-12-20T08:06:38.000Z
2020-12-20T08:06:38.000Z
# do not import pylab, because this file may need to be loaded from Python environments that don't necessarily have access to pylab # from pylab import * import os scenes = [] # # Archinteriors volumes 00-09 # scenes.append({"name": "ai_001_001", "archive_file": "AI1_001.rar", "asset_fil...
206.90767
280
0.558062
# do not import pylab, because this file may need to be loaded from Python environments that don't necessarily have access to pylab # from pylab import * import os scenes = [] # # Archinteriors volumes 00-09 # scenes.append({"name": "ai_001_001", "archive_file": "AI1_001.rar", "asset_fil...
0
0
0
a4ab0611baac1f8c650c351abe6d91f27e0b3686
9,529
py
Python
source/multi_translation.py
wasiahmad/SumGenToBT
84cc82a23c3207811a6b17dfd408570e94009c29
[ "MIT" ]
1
2022-02-25T11:19:35.000Z
2022-02-25T11:19:35.000Z
source/multi_translation.py
wasiahmad/SumGenToBT
84cc82a23c3207811a6b17dfd408570e94009c29
[ "MIT" ]
null
null
null
source/multi_translation.py
wasiahmad/SumGenToBT
84cc82a23c3207811a6b17dfd408570e94009c29
[ "MIT" ]
null
null
null
import json import logging from argparse import Namespace import numpy as np from fairseq import metrics, search, utils from fairseq.data import encoders from fairseq.tasks import register_task from fairseq.tasks.translation_multi_simple_epoch import TranslationMultiSimpleEpochTask from fairseq.sequence_generator impo...
47.173267
97
0.579809
import json import logging from argparse import Namespace import numpy as np from fairseq import metrics, search, utils from fairseq.data import encoders from fairseq.tasks import register_task from fairseq.tasks.translation_multi_simple_epoch import TranslationMultiSimpleEpochTask from fairseq.sequence_generator impo...
6,939
0
162
636d3e6970a2911262446ae2f61a792877d42005
722
py
Python
timemachines/skatertools/tuning/hyperplot.py
iklasky/timemachines
1820fa9453d31d4daaeff75274a935c7455febe3
[ "MIT" ]
253
2021-01-08T17:33:30.000Z
2022-03-21T17:32:36.000Z
timemachines/skatertools/tuning/hyperplot.py
iklasky/timemachines
1820fa9453d31d4daaeff75274a935c7455febe3
[ "MIT" ]
65
2021-01-20T16:43:35.000Z
2022-03-30T19:07:22.000Z
timemachines/skatertools/tuning/hyperplot.py
iklasky/timemachines
1820fa9453d31d4daaeff75274a935c7455febe3
[ "MIT" ]
28
2021-02-04T14:58:30.000Z
2022-01-17T04:35:17.000Z
import numpy as np import matplotlib.pyplot as plt # TODO def mesh2d_(f,*args): """ Plot function taking len 2 vector as single argument f(xs) """ mesh2d(g,*args) def mesh2d(f,*args): """ Plot function taking two arguments f(x,y) """ fig = plt.figure() ax = fig.add_sub...
21.878788
81
0.569252
import numpy as np import matplotlib.pyplot as plt # TODO def mesh2d_(f,*args): """ Plot function taking len 2 vector as single argument f(xs) """ def g(x,y,*args): return f(np.array([x,y]),*args) mesh2d(g,*args) def mesh2d(f,*args): """ Plot function taking two arguments ...
36
0
26
83e083ead9f4bb85eafd7a1d3b57bc0124b38b95
5,004
py
Python
pyhdl/parts/logic4.py
ycwn/pyhdl
6440cc40193b789e281eb10f12580f2b6df17d1a
[ "MIT" ]
null
null
null
pyhdl/parts/logic4.py
ycwn/pyhdl
6440cc40193b789e281eb10f12580f2b6df17d1a
[ "MIT" ]
null
null
null
pyhdl/parts/logic4.py
ycwn/pyhdl
6440cc40193b789e281eb10f12580f2b6df17d1a
[ "MIT" ]
null
null
null
from pyhdl.core import * from pyhdl.parts.logic import * @module("NOT4", [ "B4" ], [ "B4" ]) @module("AND4", [ "B4", "B4" ], [ "B4" ]) @module("AND4S", [ "B4", "N" ], [ "B4" ]) @module("OR4", [ "B4", "B4" ], [ "B4" ]) @module("XOR4", [ "B4", "B4" ], [ "B4" ]) @module("XOR4S", [ "B4", "N" ], [...
20.763485
123
0.520384
from pyhdl.core import * from pyhdl.parts.logic import * @module("NOT4", [ "B4" ], [ "B4" ]) def not4(a, x): return [ not1(aa, xx) for aa, xx in zip(a.nets, x.nets) ] @module("AND4", [ "B4", "B4" ], [ "B4" ]) def and4(a, b, x): return [ and1(aa, bb, xx) for aa, bb, xx in zip(a.nets, b.nets, x.nets) ] ...
3,219
0
506
74ef960b68aa3ee63dede0d921c360b162415b73
8,151
py
Python
scripts/pipeline.py
STASYA00/CityMorph
18b8273a1ae0a4e8f234850d0c98640a2483ab04
[ "MIT" ]
null
null
null
scripts/pipeline.py
STASYA00/CityMorph
18b8273a1ae0a4e8f234850d0c98640a2483ab04
[ "MIT" ]
null
null
null
scripts/pipeline.py
STASYA00/CityMorph
18b8273a1ae0a4e8f234850d0c98640a2483ab04
[ "MIT" ]
null
null
null
import argparse import geopandas as gpd import pandas as pd from shapely.geometry import MultiPolygon import sys import textwrap sys.path.append('scripts/') from config import METRICS, CANVAS, PROCESS_METRICS from grid import Grid, CellCalculator from metrics import Metric, CMetric, ClusterNumberMetric, MinimumCluster...
29.857143
94
0.692921
import argparse import geopandas as gpd import pandas as pd from shapely.geometry import MultiPolygon import sys import textwrap sys.path.append('scripts/') from config import METRICS, CANVAS, PROCESS_METRICS from grid import Grid, CellCalculator from metrics import Metric, CMetric, ClusterNumberMetric, MinimumCluster...
4,311
2
566
1cad68406ab352b9da46d7ef8c52b734eba3b9fe
1,149
py
Python
report_generator/tools/data_linewidth_plot.py
Valts-M/openvslam-1
12e1778511eb30af4a5ea9153824fe8dc1460996
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
null
null
null
report_generator/tools/data_linewidth_plot.py
Valts-M/openvslam-1
12e1778511eb30af4a5ea9153824fe8dc1460996
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
null
null
null
report_generator/tools/data_linewidth_plot.py
Valts-M/openvslam-1
12e1778511eb30af4a5ea9153824fe8dc1460996
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
null
null
null
import matplotlib.pyplot as plt
37.064516
78
0.596171
import matplotlib.pyplot as plt class data_linewidth_plot(): def __init__(self, x, y, **kwargs): self.ax = kwargs.pop("ax", plt.gca()) self.fig = self.ax.get_figure() self.lw_data = kwargs.pop("linewidth", 1) self.lw = 1 self.fig.canvas.draw() self.ppd = 72./self.fi...
1,008
7
103
418d0b0ea38c4e1b4bf7c1794137c506f0d9cef0
1,206
py
Python
django_pg/utils/types.py
OlgaBorisova/django-pgfields
fc21efc116d017f1bf75c88fa3502cc23f8923b3
[ "BSD-3-Clause" ]
1
2015-03-26T09:34:32.000Z
2015-03-26T09:34:32.000Z
django_pg/utils/types.py
elbaschid/django-pgfields
37915b92349c392ed4980d255225e991be3463d6
[ "BSD-3-Clause" ]
null
null
null
django_pg/utils/types.py
elbaschid/django-pgfields
37915b92349c392ed4980d255225e991be3463d6
[ "BSD-3-Clause" ]
1
2018-10-23T21:31:29.000Z
2018-10-23T21:31:29.000Z
from __future__ import absolute_import, unicode_literals # Taken from the following StackOverflow answer: # http://stackoverflow.com/a/3703727/199176 SELECT_TYPES_SQL = """ SELECT n.nspname as schema, t.typname as type FROM pg_type t LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace W...
30.923077
75
0.645937
from __future__ import absolute_import, unicode_literals # Taken from the following StackOverflow answer: # http://stackoverflow.com/a/3703727/199176 SELECT_TYPES_SQL = """ SELECT n.nspname as schema, t.typname as type FROM pg_type t LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace W...
0
0
0
4956f2255452d92bc1fa7da246df20da8b567d3c
4,093
py
Python
bath_fitting/SDR_fitting.py
Forgotten/BathFitting
21918b007268ca50460ef09b2bea1d8f880c17af
[ "MIT" ]
null
null
null
bath_fitting/SDR_fitting.py
Forgotten/BathFitting
21918b007268ca50460ef09b2bea1d8f880c17af
[ "MIT" ]
null
null
null
bath_fitting/SDR_fitting.py
Forgotten/BathFitting
21918b007268ca50460ef09b2bea1d8f880c17af
[ "MIT" ]
null
null
null
import cvxpy as cp import numpy as np import mosek
35.903509
78
0.53335
import cvxpy as cp import numpy as np import mosek def delta_eval(poles, z, X): # compute \sum \frac{X_j}{z_i - \lambda_j } # output = K = poles.shape[0] L = X[0].shape[0] assert X[0].shape[1] == L diff = 1/(np.reshape(z, (-1, 1, 1, 1)) - np.reshape(poles, (1, K, 1, 1))) X_array = np.a...
3,947
-8
100
36ed4f804e7a5a401d8cba82007181d48fabe4e7
2,909
py
Python
twder/api.py
kenit/twder
9169f6af2a150e09d980568e15f813211f71fe8a
[ "MIT" ]
null
null
null
twder/api.py
kenit/twder
9169f6af2a150e09d980568e15f813211f71fe8a
[ "MIT" ]
null
null
null
twder/api.py
kenit/twder
9169f6af2a150e09d980568e15f813211f71fe8a
[ "MIT" ]
null
null
null
from re import match from io import BytesIO from lxml import etree from urllib import request __CURRENT_QUOTE_URL = "http://rate.bot.com.tw/xrt?Lang=zh-TW" __HISTORY_QUOTE_URL_PATTERN = "http://rate.bot.com.tw/xrt/quote/{range}/{currency}" __NAME_DICT = {} def now_all(): """取得目前所有幣別的牌告匯率 :rtype: dict "...
23.650407
88
0.625645
from re import match from io import BytesIO from lxml import etree from urllib import request __CURRENT_QUOTE_URL = "http://rate.bot.com.tw/xrt?Lang=zh-TW" __HISTORY_QUOTE_URL_PATTERN = "http://rate.bot.com.tw/xrt/quote/{range}/{currency}" __NAME_DICT = {} def __parse_tree(url): contents = request.urlopen(url).r...
658
0
46
0df083d0d22b89cb0d0b55987105259b56d27408
819
py
Python
preprocess.py
microbo-ru/sber_zvuk
bc81b98ed968fc5dfb8bfc64098754a216890256
[ "MIT" ]
1
2021-10-31T08:56:00.000Z
2021-10-31T08:56:00.000Z
preprocess.py
microbo-ru/sber_zvuk
bc81b98ed968fc5dfb8bfc64098754a216890256
[ "MIT" ]
11
2021-10-30T12:23:41.000Z
2021-10-31T14:14:26.000Z
preprocess.py
microbo-ru/sber_zvuk
bc81b98ed968fc5dfb8bfc64098754a216890256
[ "MIT" ]
null
null
null
from moviepy.editor import * import os # split("D:/Загрузки/hackathon_part_1.mp4", "D:/datasets/")
24.818182
79
0.732601
from moviepy.editor import * import os def split(video_path, save_path): original_video = VideoFileClip(video_path) audio_clip = original_video.audio audio_clip.write_audiofile( os.path.join(save_path, "extracted_audio.wav"), codec='pcm_s16le') audio_clip.close() muted_video = o...
671
0
46
ac747ae69c9cc8973936876daf8baeae5d77a9d6
961
py
Python
python/kyu-6/stop-spinning-words/stop_gninnips_my_sdrow.py
ledwindra/codewars
0552669a69e801cfe5f9a3696a4d98be63a96951
[ "WTFPL" ]
1
2020-11-13T16:55:04.000Z
2020-11-13T16:55:04.000Z
python/kyu-6/stop-spinning-words/stop_gninnips_my_sdrow.py
ledwindra/codewars
0552669a69e801cfe5f9a3696a4d98be63a96951
[ "WTFPL" ]
1
2020-01-28T15:48:17.000Z
2020-01-28T15:48:17.000Z
python/kyu-6/stop-spinning-words/stop_gninnips_my_sdrow.py
ledwindra/codewars
0552669a69e801cfe5f9a3696a4d98be63a96951
[ "WTFPL" ]
null
null
null
def spin_words(sentence=None): """ Description: Write a function that takes in a string of one or more words, and returns the same string, but with all five or more letter words reversed (Just like the name of this Kata). Strings passed in will consist of only letters and spaces. Spaces will ...
33.137931
117
0.636837
def spin_words(sentence=None): """ Description: Write a function that takes in a string of one or more words, and returns the same string, but with all five or more letter words reversed (Just like the name of this Kata). Strings passed in will consist of only letters and spaces. Spaces will ...
0
0
0
7692241d716c49819bb92a649836684c9879bfda
12,196
py
Python
libraries/galaxy/adapter.py
mainulhossain/phenowl
b187db737d501d679c8f3c140cc90bd84f5c2093
[ "MIT" ]
null
null
null
libraries/galaxy/adapter.py
mainulhossain/phenowl
b187db737d501d679c8f3c140cc90bd84f5c2093
[ "MIT" ]
null
null
null
libraries/galaxy/adapter.py
mainulhossain/phenowl
b187db737d501d679c8f3c140cc90bd84f5c2093
[ "MIT" ]
null
null
null
from bioblend.galaxy import GalaxyInstance from bioblend.galaxy.histories import HistoryClient from bioblend.galaxy.libraries import LibraryClient from bioblend.galaxy.tools import ToolClient from bioblend.galaxy.datasets import DatasetClient from bioblend.galaxy.jobs import JobsClient from urllib.parse import urlpars...
31.191816
146
0.602001
from bioblend.galaxy import GalaxyInstance from bioblend.galaxy.histories import HistoryClient from bioblend.galaxy.libraries import LibraryClient from bioblend.galaxy.tools import ToolClient from bioblend.galaxy.datasets import DatasetClient from bioblend.galaxy.jobs import JobsClient from urllib.parse import urlpars...
8,367
0
1,082
8e73c495873dcd76ae405e957e60f389cf05d699
5,530
py
Python
src/modules/go_pwdb/test_cli.py
woza/exobrain
cd2f651de1190078a7bfdd6bd199377108b105d0
[ "MIT" ]
null
null
null
src/modules/go_pwdb/test_cli.py
woza/exobrain
cd2f651de1190078a7bfdd6bd199377108b105d0
[ "MIT" ]
null
null
null
src/modules/go_pwdb/test_cli.py
woza/exobrain
cd2f651de1190078a7bfdd6bd199377108b105d0
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import struct import time import argparse import ssl import socket import sys import os from concurrent.futures import ProcessPoolExecutor class Server: ''' This class represents a remote server implementing the exobrain protocol It performs the UI and Display roles of said protocol, to...
31.420455
101
0.590235
#!/usr/bin/python3 import struct import time import argparse import ssl import socket import sys import os from concurrent.futures import ProcessPoolExecutor class TestFail (Exception): pass def get_all( src, todo ): ret = src.recv(todo) while len(ret) < todo: chunk = src.recv(todo-len(ret)) ...
3,788
15
223
ab1589fdb33dfd7a795e75dae9a2fcefbce12c1d
133,284
py
Python
src/oci/mysql/db_system_client.py
CentroidChef/oci-python-sdk
fa406e27a52b40c70e220c20f52dfe2abe6236a3
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/mysql/db_system_client.py
CentroidChef/oci-python-sdk
fa406e27a52b40c70e220c20f52dfe2abe6236a3
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/mysql/db_system_client.py
CentroidChef/oci-python-sdk
fa406e27a52b40c70e220c20f52dfe2abe6236a3
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
49.382734
261
0.652231
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
0
0
0
e013976ab32de05a13bbb45298616c4488163076
986
py
Python
cookiecutter/operators/json.py
insight-infrastructure/cookiecutter
5e77a6f59786759cf1b469e7bd827b6d340a31c6
[ "BSD-3-Clause" ]
8
2020-06-15T18:49:24.000Z
2021-04-15T10:34:24.000Z
cookiecutter/operators/json.py
insight-infrastructure/cookiecutter
5e77a6f59786759cf1b469e7bd827b6d340a31c6
[ "BSD-3-Clause" ]
19
2020-06-28T16:03:56.000Z
2020-10-07T15:52:06.000Z
cookiecutter/operators/json.py
insight-infrastructure/nukikata
5e77a6f59786759cf1b469e7bd827b6d340a31c6
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Operator plugin that inherits a base class and is made available through `type`.""" from __future__ import unicode_literals from __future__ import print_function import logging import json from typing import Dict from cookiecutter.operators import BaseOperator logger = logging.getLogger(_...
23.47619
86
0.649087
# -*- coding: utf-8 -*- """Operator plugin that inherits a base class and is made available through `type`.""" from __future__ import unicode_literals from __future__ import print_function import logging import json from typing import Dict from cookiecutter.operators import BaseOperator logger = logging.getLogger(_...
235
0
27
9d71b34d0fc7e90b90e7eaec71dd1935fac5864b
1,080
py
Python
Klines_BollBrand/requestData.py
xiwen-hk/HBInterviewQuestion
f099011fdb8ef9d0c4bfebbdf645908655d245f6
[ "MIT" ]
null
null
null
Klines_BollBrand/requestData.py
xiwen-hk/HBInterviewQuestion
f099011fdb8ef9d0c4bfebbdf645908655d245f6
[ "MIT" ]
null
null
null
Klines_BollBrand/requestData.py
xiwen-hk/HBInterviewQuestion
f099011fdb8ef9d0c4bfebbdf645908655d245f6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun May 17 22:02:56 2020 @author: cuixiwen """ #Import essential packages import requests import pandas as pd import time import datetime from datetime import timedelta #def a function to using huobi API to get history Kline data and return a dataframe #...
27
97
0.662037
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun May 17 22:02:56 2020 @author: cuixiwen """ #Import essential packages import requests import pandas as pd import time import datetime from datetime import timedelta #def a function to using huobi API to get history Kline data and return a dataframe de...
699
0
44
be8631a96244cdd4ef0b3543cb79e29eed3ae439
3,696
py
Python
rllab/torch/algos/training_algo.py
NeurIPSPaperSubmission7934/code_submission
713fce673e8e3ba30b559d4eebe6d3e4891069ed
[ "Apache-2.0" ]
null
null
null
rllab/torch/algos/training_algo.py
NeurIPSPaperSubmission7934/code_submission
713fce673e8e3ba30b559d4eebe6d3e4891069ed
[ "Apache-2.0" ]
null
null
null
rllab/torch/algos/training_algo.py
NeurIPSPaperSubmission7934/code_submission
713fce673e8e3ba30b559d4eebe6d3e4891069ed
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 Copyright holder of the paper Generative Adversarial Model Learning # submitted to NeurIPS 2019 for review # All rights reserved. import rllab.misc.logger as logger from rllab.torch.sampler.torchSampler import TorchBaseSampler from rllab.sampler import parallel_sampler from rllab.algos.base import...
34.542056
143
0.657197
# Copyright (c) 2018 Copyright holder of the paper Generative Adversarial Model Learning # submitted to NeurIPS 2019 for review # All rights reserved. import rllab.misc.logger as logger from rllab.torch.sampler.torchSampler import TorchBaseSampler from rllab.sampler import parallel_sampler from rllab.algos.base import...
2,659
425
45
3e96ecd6c391e744b22d8d2fe8c14570ae0410be
1,174
py
Python
ga_auth/views.py
wolfskaempf/ga_statistics
9fdfd0b4300f5d8541fd7ce4b643592fab6b7a1e
[ "MIT" ]
3
2015-05-11T19:37:08.000Z
2015-07-12T13:01:36.000Z
ga_auth/views.py
wolfskaempf/ga_statistics
9fdfd0b4300f5d8541fd7ce4b643592fab6b7a1e
[ "MIT" ]
18
2015-05-06T21:14:14.000Z
2015-08-29T18:24:43.000Z
ga_auth/views.py
wolfskaempf/ga_statistics
9fdfd0b4300f5d8541fd7ce4b643592fab6b7a1e
[ "MIT" ]
1
2020-11-04T08:44:13.000Z
2020-11-04T08:44:13.000Z
from django.shortcuts import render, HttpResponseRedirect from .forms import LoginForm from django.contrib.auth import get_user_model, authenticate, login, logout # Create your views here.
29.35
134
0.639693
from django.shortcuts import render, HttpResponseRedirect from .forms import LoginForm from django.contrib.auth import get_user_model, authenticate, login, logout # Create your views here. def ga_login(request): # This view is shown, when a user tries to view the submit form, but isn't logged in. After they log in,...
935
0
46
0cf45031af64b35a0904285c9ca6e8aaf01a82f3
21,097
py
Python
elecsus/libs/SAFittingRoutine.py
alifeee/ElecSus
b21a48eb65df81887960a4d7308c02aef2eae53c
[ "Apache-2.0" ]
null
null
null
elecsus/libs/SAFittingRoutine.py
alifeee/ElecSus
b21a48eb65df81887960a4d7308c02aef2eae53c
[ "Apache-2.0" ]
null
null
null
elecsus/libs/SAFittingRoutine.py
alifeee/ElecSus
b21a48eb65df81887960a4d7308c02aef2eae53c
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 M. A. Zentile, J. Keaveney, L. Weller, D. Whiting, # C. S. Adams and I. G. Hughes. # 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...
31.724812
153
0.684552
# Copyright 2014 M. A. Zentile, J. Keaveney, L. Weller, D. Whiting, # C. S. Adams and I. G. Hughes. # 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...
1,988
0
24
7c1aa037f0c5afaf73a4eb52a446d1ff66ae93e1
1,508
py
Python
tests/test_order.py
kevinddchen/Cirq-PrimeFactorization
9104a60b983b345595c8016205dd0dd616483eaa
[ "MIT" ]
null
null
null
tests/test_order.py
kevinddchen/Cirq-PrimeFactorization
9104a60b983b345595c8016205dd0dd616483eaa
[ "MIT" ]
null
null
null
tests/test_order.py
kevinddchen/Cirq-PrimeFactorization
9104a60b983b345595c8016205dd0dd616483eaa
[ "MIT" ]
null
null
null
import pytest import numpy as np from factor import OrderFinder, QuantumOrderFinder, FakeQuantumOrderFinder TEST_RNG = np.random.default_rng(seed=2022) TEST_N_TRIALS = 3
30.77551
74
0.653846
import pytest import numpy as np from factor import OrderFinder, QuantumOrderFinder, FakeQuantumOrderFinder TEST_RNG = np.random.default_rng(seed=2022) TEST_N_TRIALS = 3 def test_order_finder(): assert OrderFinder(1, 5).find() == 1 assert OrderFinder(2, 5).find() == 4 assert OrderFinder(3, 5).find() == ...
1,240
0
92
c7a6ec470e816815e95dee90c4bf8f3d02fcc3fe
9,616
py
Python
backends/ebpf/targets/target.py
anasyrmia/p4c-1
2bf2f615fdaaf4efed1f2f8ab0b3f3261cface60
[ "Apache-2.0" ]
487
2016-12-22T03:33:27.000Z
2022-03-29T06:36:45.000Z
backends/ebpf/targets/target.py
anasyrmia/p4c-1
2bf2f615fdaaf4efed1f2f8ab0b3f3261cface60
[ "Apache-2.0" ]
2,114
2016-12-18T11:36:27.000Z
2022-03-31T22:33:23.000Z
backends/ebpf/targets/target.py
anasyrmia/p4c-1
2bf2f615fdaaf4efed1f2f8ab0b3f3261cface60
[ "Apache-2.0" ]
456
2016-12-20T14:01:11.000Z
2022-03-30T19:26:05.000Z
#!/usr/bin/env python3 # Copyright 2013-present Barefoot Networks, Inc. # Copyright 2018 VMware, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
42.737778
78
0.579867
#!/usr/bin/env python3 # Copyright 2013-present Barefoot Networks, Inc. # Copyright 2018 VMware, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
820
0
54
aa54d1e8896fd31ccdac3a9f30ba585bb9aa814b
1,275
py
Python
test/test_unit/test_ga4gh/test_refget/test_http/test_request.py
ga4gh/refget-cloud
c39a65acba9818414789f004cced487562012bf0
[ "Apache-2.0" ]
null
null
null
test/test_unit/test_ga4gh/test_refget/test_http/test_request.py
ga4gh/refget-cloud
c39a65acba9818414789f004cced487562012bf0
[ "Apache-2.0" ]
3
2021-04-30T21:12:42.000Z
2021-06-02T02:11:45.000Z
test/test_unit/test_ga4gh/test_refget/test_http/test_request.py
ga4gh/refget-cloud
c39a65acba9818414789f004cced487562012bf0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Unit tests for Request class""" import pytest from ga4gh.refget.http.request import Request testdata_header = [ ("Content-Type", "appliciation/json"), ("Content-Type", "text/plain"), ("Range", "bytes=25-100") ] testdata_path = [ ("seqid", "ga4gh:SQ.HKyMuwwEWbdUDXfk5o1EGxGeq...
26.5625
66
0.681569
# -*- coding: utf-8 -*- """Unit tests for Request class""" import pytest from ga4gh.refget.http.request import Request testdata_header = [ ("Content-Type", "appliciation/json"), ("Content-Type", "text/plain"), ("Range", "bytes=25-100") ] testdata_path = [ ("seqid", "ga4gh:SQ.HKyMuwwEWbdUDXfk5o1EGxGeq...
510
0
66
c39cbfb35cbb81f80c8ba9503c670ff99a1790f8
1,580
py
Python
tcflib/examples/remote_tcf_converter.py
SeNeReKo/TCFlib
6a0611296ec7b05557bc99f290adc71034d702b0
[ "MIT" ]
7
2015-07-07T15:39:11.000Z
2019-10-25T05:29:50.000Z
tcflib/examples/remote_tcf_converter.py
SeNeReKo/TCFlib
6a0611296ec7b05557bc99f290adc71034d702b0
[ "MIT" ]
null
null
null
tcflib/examples/remote_tcf_converter.py
SeNeReKo/TCFlib
6a0611296ec7b05557bc99f290adc71034d702b0
[ "MIT" ]
1
2019-11-12T12:28:02.000Z
2019-11-12T12:28:02.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (c) 2013 Frederik Elwert <frederik.elwert@web.de> # # 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...
35.909091
81
0.739241
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (c) 2013 Frederik Elwert <frederik.elwert@web.de> # # 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...
0
211
23
16032043050794d9fb77058b3d5f365bf88b43e2
1,742
py
Python
legacy/arbitrage_monitor_btc_huobi_coinbase.py
szhu3210/Arbitrage-trader
d2af5670f7285084f70e36a48c95e796d1fd2d37
[ "Apache-2.0" ]
6
2019-04-03T22:33:39.000Z
2021-05-07T12:00:00.000Z
legacy/arbitrage_monitor_btc_huobi_coinbase.py
szhu3210/Arbitrage-trader
d2af5670f7285084f70e36a48c95e796d1fd2d37
[ "Apache-2.0" ]
2
2019-04-03T22:57:41.000Z
2019-04-26T07:13:12.000Z
legacy/arbitrage_monitor_btc_huobi_coinbase.py
szhu3210/Arbitrage-trader
d2af5670f7285084f70e36a48c95e796d1fd2d37
[ "Apache-2.0" ]
1
2019-04-28T07:23:32.000Z
2019-04-28T07:23:32.000Z
from coinbase.wallet.client import Client import huobi_main_monitor import time import email_client if __name__ == '__main__': main()
37.06383
152
0.616533
from coinbase.wallet.client import Client import huobi_main_monitor import time import email_client class Arbitrage_BTC(): def calculate_premium(self): # get coinbase price coinbase_monitor = Client(api_key='admin', api_secret='admin') coinbase_price = float(coinbase_monitor.get_buy_price...
1,530
1
73
e6bd0e6ba07a1db5e64fb178b03cc54f9993ae13
597
py
Python
encounterapp/migrations/0026_modifydelete_author.py
AbhiyantrikTechnology/DentalHub-Backend
89802b3e7671ffe8b3d287a998c3c4f375b58f03
[ "MIT" ]
1
2021-04-03T19:57:32.000Z
2021-04-03T19:57:32.000Z
encounterapp/migrations/0026_modifydelete_author.py
AbhiyantrikTechnology/DentalHub-Backend
89802b3e7671ffe8b3d287a998c3c4f375b58f03
[ "MIT" ]
null
null
null
encounterapp/migrations/0026_modifydelete_author.py
AbhiyantrikTechnology/DentalHub-Backend
89802b3e7671ffe8b3d287a998c3c4f375b58f03
[ "MIT" ]
null
null
null
# Generated by Django 2.1 on 2020-07-20 05:20 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
27.136364
121
0.683417
# Generated by Django 2.1 on 2020-07-20 05:20 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('encounterapp', '0025_auto_...
0
419
23
ea47a621af640924e385d8a6f97e0fd4427bf647
159
py
Python
helm-generator/generator.py
djmoran64/aether-bootstrap
138b9bab2f1a71a8ee44a8540bfa69a6bce77fed
[ "Apache-2.0" ]
null
null
null
helm-generator/generator.py
djmoran64/aether-bootstrap
138b9bab2f1a71a8ee44a8540bfa69a6bce77fed
[ "Apache-2.0" ]
null
null
null
helm-generator/generator.py
djmoran64/aether-bootstrap
138b9bab2f1a71a8ee44a8540bfa69a6bce77fed
[ "Apache-2.0" ]
1
2020-09-11T11:03:42.000Z
2020-09-11T11:03:42.000Z
#!/usr/bin/env python3 import helm_generator.generator as gen import sys if __name__ == '__main__': sys.exit(main())
13.25
38
0.679245
#!/usr/bin/env python3 import helm_generator.generator as gen import sys def main(): return gen.main() if __name__ == '__main__': sys.exit(main())
12
0
23
658336373402dd6d42a43d8188df0108b2ded4b5
1,513
py
Python
internals.py
Adityakadali/Internal-marks-caliculator
ca0d9b9229c7639990184659886a52143d7becf5
[ "Unlicense" ]
null
null
null
internals.py
Adityakadali/Internal-marks-caliculator
ca0d9b9229c7639990184659886a52143d7becf5
[ "Unlicense" ]
null
null
null
internals.py
Adityakadali/Internal-marks-caliculator
ca0d9b9229c7639990184659886a52143d7becf5
[ "Unlicense" ]
null
null
null
from appJar import gui app = gui('Internal marks caliculator') app.setBg('#8b9dc3') app.addLabel('lb1','Enter your marks') app.addLabelNumericEntry('class test 1') app.addLabelNumericEntry('class test 2') app.addLabelNumericEntry('class test 3') app.addLabelNumericEntry('class test 4') app.addLabelNumericEntry('mid 1'...
37.825
113
0.744878
from appJar import gui app = gui('Internal marks caliculator') app.setBg('#8b9dc3') app.addLabel('lb1','Enter your marks') app.addLabelNumericEntry('class test 1') app.addLabelNumericEntry('class test 2') app.addLabelNumericEntry('class test 3') app.addLabelNumericEntry('class test 4') app.addLabelNumericEntry('mid 1'...
1,065
0
23
ff6a716f8022718e402608333424016a6b1889c3
992
py
Python
week1/quiz1.py
pkoarmy/Learning-Python
79067de3c09240d26939ca23ec98e96304660e7c
[ "MIT" ]
null
null
null
week1/quiz1.py
pkoarmy/Learning-Python
79067de3c09240d26939ca23ec98e96304660e7c
[ "MIT" ]
null
null
null
week1/quiz1.py
pkoarmy/Learning-Python
79067de3c09240d26939ca23ec98e96304660e7c
[ "MIT" ]
null
null
null
# # quiz # # what is a result of following Python code a = "5" b = "6" print( a + b ) # # 1. 11 # # 2. 5 # # 3. 6 # # 4. 56 # # 5. compile error a=2 b=2 if (a > 5 and b < 3): print("heheh") else: print("hohoho") a=2 b=2 if (a > 5 or b < 3): print("heheh") else: print("hohoho") # ## Please code 'xx...
15.5
67
0.565524
# # quiz # # what is a result of following Python code a = "5" b = "6" print( a + b ) # # 1. 11 # # 2. 5 # # 3. 6 # # 4. 56 # # 5. compile error a=2 b=2 if (a > 5 and b < 3): print("heheh") else: print("hohoho") a=2 b=2 if (a > 5 or b < 3): print("heheh") else: print("hohoho") # ## Please code 'xx...
0
0
0
86514d78fd0ebfe9d94358f5e3304cc1781844d7
352
py
Python
test_receiver.py
tana/oscosc
f8706b7b457a8df028e137b738a8d1b23c358191
[ "MIT" ]
null
null
null
test_receiver.py
tana/oscosc
f8706b7b457a8df028e137b738a8d1b23c358191
[ "MIT" ]
null
null
null
test_receiver.py
tana/oscosc
f8706b7b457a8df028e137b738a8d1b23c358191
[ "MIT" ]
null
null
null
import time import receiver if __name__ == '__main__': recv = receiver.Receiver() recv.start_thread(12345) try: print('Press Ctrl-C to stop') while True: while recv.available(): msgs = recv.get() print(msgs) time.sleep(1 / 60) fina...
22
37
0.534091
import time import receiver if __name__ == '__main__': recv = receiver.Receiver() recv.start_thread(12345) try: print('Press Ctrl-C to stop') while True: while recv.available(): msgs = recv.get() print(msgs) time.sleep(1 / 60) fina...
0
0
0
e44d5fc91228b09ac97094af538e86e4af6d3285
10,943
py
Python
tests/test_request_handler.py
dineshrajpurohit/slack_ttt
2005c1dc4182e5ad4bab6c2360905307eb2bba22
[ "MIT" ]
null
null
null
tests/test_request_handler.py
dineshrajpurohit/slack_ttt
2005c1dc4182e5ad4bab6c2360905307eb2bba22
[ "MIT" ]
1
2021-06-01T22:17:37.000Z
2021-06-01T22:17:37.000Z
tests/test_request_handler.py
dineshrajpurohit/slack_ttt
2005c1dc4182e5ad4bab6c2360905307eb2bba22
[ "MIT" ]
null
null
null
import unittest from slack_ttt.native.dynamo_db import DynamoDB from slack_ttt.request_handler import RequestHandler # NEW GAME USE CASES # GAME ACCEPT USE CASES # GAME DECLINE USE CASES # DISPLAY BOARD TEST CASES # GAME MOVES TEST CASES # GAME COMPLETION TEST CASES # GAME ENDING TEST...
40.52963
101
0.538792
import unittest from slack_ttt.native.dynamo_db import DynamoDB from slack_ttt.request_handler import RequestHandler class RequestHandlerTest(unittest.TestCase): def setUp(self): self.ddb = DynamoDB() self.ddb.initialize_db() params = {'channel_id': ['TESTCHANNEL'], 'user...
9,847
23
698
7f6654eda735eecc1fc819b8203c3420a8a1e665
4,732
py
Python
tools/convert_models/mobilenetv2_to_mmcls.py
YuxinZou/mmclassification
2037260ea6c98a3b115e97727e1151a1c2c32f7a
[ "Apache-2.0" ]
1,190
2020-07-10T01:16:01.000Z
2022-03-31T09:48:38.000Z
tools/convert_models/mobilenetv2_to_mmcls.py
YuxinZou/mmclassification
2037260ea6c98a3b115e97727e1151a1c2c32f7a
[ "Apache-2.0" ]
702
2020-07-13T13:31:33.000Z
2022-03-31T06:48:04.000Z
tools/convert_models/mobilenetv2_to_mmcls.py
YuxinZou/mmclassification
2037260ea6c98a3b115e97727e1151a1c2c32f7a
[ "Apache-2.0" ]
502
2020-07-10T02:40:55.000Z
2022-03-31T02:07:09.000Z
# Copyright (c) OpenMMLab. All rights reserved. import argparse from collections import OrderedDict import torch def convert(src, dst): """Convert keys in torchvision pretrained MobileNetV2 models to mmcls style.""" # load pytorch model blobs = torch.load(src, map_location='cpu') # convert ...
34.794118
75
0.624683
# Copyright (c) OpenMMLab. All rights reserved. import argparse from collections import OrderedDict import torch def convert_conv1(model_key, model_weight, state_dict, converted_names): if model_key.find('features.0.0') >= 0: new_key = model_key.replace('features.0.0', 'backbone.conv1.conv') else: ...
3,490
0
115
8da8bfed687cea8b9cc13ee4429d5fbcb567ae72
16,846
py
Python
converters/sol1_converter.py
NSO-developer/nfvo-converter-tosca-sol6
2c43900b0e96927e23c668a4c67e09d0b13f55d7
[ "Apache-2.0" ]
9
2019-06-03T07:50:37.000Z
2021-03-26T00:25:19.000Z
converters/sol1_converter.py
NSO-developer/nfvo-converter-tosca-sol6
2c43900b0e96927e23c668a4c67e09d0b13f55d7
[ "Apache-2.0" ]
null
null
null
converters/sol1_converter.py
NSO-developer/nfvo-converter-tosca-sol6
2c43900b0e96927e23c668a4c67e09d0b13f55d7
[ "Apache-2.0" ]
4
2020-03-06T16:16:28.000Z
2020-09-30T06:13:56.000Z
from keys.sol6_keys import * from converters.sol1_flags import * from keys.sol6_keys import V2MapBase from mapping_v2 import * import logging log = logging.getLogger(__name__)
44.803191
144
0.611955
from keys.sol6_keys import * from converters.sol1_flags import * from keys.sol6_keys import V2MapBase from mapping_v2 import * import logging log = logging.getLogger(__name__) class Sol1Converter: def __init__(self, sol6_vnf, parsed_dict, variables): self.sol6_vnfd = sol6_vnf["data"]["etsi-nfv-descriptor...
10,389
6,257
23
ad6a27acd521f31524775bf5b2a8fa7c51263734
547
py
Python
aws_api_mock/VpcSecurityGroup_Data_Generator.py
danilocgsilva/aws-data-mock
07e0013f04bccb8c756a8911acd047813cf176f9
[ "MIT" ]
null
null
null
aws_api_mock/VpcSecurityGroup_Data_Generator.py
danilocgsilva/aws-data-mock
07e0013f04bccb8c756a8911acd047813cf176f9
[ "MIT" ]
null
null
null
aws_api_mock/VpcSecurityGroup_Data_Generator.py
danilocgsilva/aws-data-mock
07e0013f04bccb8c756a8911acd047813cf176f9
[ "MIT" ]
null
null
null
from aws_api_mock.Entity_Generator_Command_Interface import Entity_Generator_Command_Interface from aws_api_mock.aws_data_helpers import get_exadecimal_sample
30.388889
94
0.720293
from aws_api_mock.Entity_Generator_Command_Interface import Entity_Generator_Command_Interface from aws_api_mock.aws_data_helpers import get_exadecimal_sample class VpcSecurityGroup_Data_Generator(Entity_Generator_Command_Interface): def __init__(self): self.group_id = "sg-" + get_exadecimal_sample(11) ...
231
53
104
ba89997ed3d4d4b47cd0e0c2e69535fe43114f5e
2,351
py
Python
Back-End/IA/worker.py
PoCInnovation/Koic
eca53b53b7242c1e83213ef9408366ca0a346358
[ "MIT" ]
13
2021-09-15T13:23:33.000Z
2022-01-14T14:52:42.000Z
Back-End/IA/worker.py
PoCInnovation/Koic
eca53b53b7242c1e83213ef9408366ca0a346358
[ "MIT" ]
null
null
null
Back-End/IA/worker.py
PoCInnovation/Koic
eca53b53b7242c1e83213ef9408366ca0a346358
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import io import sys import cv2 import os import json import asyncio import aiohttp import numpy as np from PIL import Image from ai import Detector from json import JSONEncoder from datetime import datetime, date from kafka import KafkaConsumer #Override the default method if __name__ == "...
33.112676
111
0.60655
#!/usr/bin/env python3 import io import sys import cv2 import os import json import asyncio import aiohttp import numpy as np from PIL import Image from ai import Detector from json import JSONEncoder from datetime import datetime, date from kafka import KafkaConsumer class DateTimeEncoder(JSONEncoder): #Override...
1,637
6
178
072e3cdc4c91a6339e8907af6182bfd780d9d1bb
15,876
py
Python
mljob/job.py
krishnanlab/geneplexus_app
bcb6b7e7b80963f9e7c2824c385f762056ebf8c1
[ "BSD-3-Clause" ]
null
null
null
mljob/job.py
krishnanlab/geneplexus_app
bcb6b7e7b80963f9e7c2824c385f762056ebf8c1
[ "BSD-3-Clause" ]
17
2022-03-08T18:57:32.000Z
2022-03-22T17:47:59.000Z
mljob/job.py
krishnanlab/geneplexus_app
bcb6b7e7b80963f9e7c2824c385f762056ebf8c1
[ "BSD-3-Clause" ]
null
null
null
# jobs.py Class to work with submitted LogicApp jobs import os,json, sys, requests from datetime import datetime from slugify import slugify class Jobs(): """ system for managing running jobs Usage: from mljob.job import Jobs # in app init, put the class inside the app app.jobs = Jobs # set th...
41.129534
195
0.617599
# jobs.py Class to work with submitted LogicApp jobs import os,json, sys, requests from datetime import datetime from slugify import slugify class Jobs(): """ system for managing running jobs Usage: from mljob.job import Jobs # in app init, put the class inside the app app.jobs = Jobs # set th...
455
0
107
5635c67eed6599ecaf7ed7fab9b59738b1d54849
1,594
py
Python
main/migrations/0001_initial.py
mhartley/popkids
30add65ebc4d6fd0c3f6a1ce51bef18817d35093
[ "MIT" ]
null
null
null
main/migrations/0001_initial.py
mhartley/popkids
30add65ebc4d6fd0c3f6a1ce51bef18817d35093
[ "MIT" ]
null
null
null
main/migrations/0001_initial.py
mhartley/popkids
30add65ebc4d6fd0c3f6a1ce51bef18817d35093
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-11-04 20:19 from __future__ import unicode_literals from django.db import migrations, models
37.069767
114
0.562735
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-11-04 20:19 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Events...
0
1,415
23
75c3d0d7c6c2d9bf798bfa14296b91935cd02d93
367
py
Python
index.py
rludlow/nbdev_demo
469c74b24683adc78e8b7f4bcbd3238d5fb638aa
[ "Apache-2.0" ]
null
null
null
index.py
rludlow/nbdev_demo
469c74b24683adc78e8b7f4bcbd3238d5fb638aa
[ "Apache-2.0" ]
null
null
null
index.py
rludlow/nbdev_demo
469c74b24683adc78e8b7f4bcbd3238d5fb638aa
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[2]: #hide from nbdev_demo.core import * # # nbdev_demo # # > Just my little demo. # This file will become your README and also the index of your documentation. # ## Install # `pip install nbdev_demo` # ## How to use # Fill me in please! Don't forget code examples: ...
10.194444
77
0.643052
#!/usr/bin/env python # coding: utf-8 # In[2]: #hide from nbdev_demo.core import * # # nbdev_demo # # > Just my little demo. # This file will become your README and also the index of your documentation. # ## Install # `pip install nbdev_demo` # ## How to use # Fill me in please! Don't forget code examples: ...
0
0
0
6a198f01bffb2edb30f57dbe984f8e8f1c833f19
16,112
py
Python
IAM/make_job_queries.py
mzz235711/IAM
e42c2b766442b666224b107b671eeab65f9b8efd
[ "Apache-2.0" ]
null
null
null
IAM/make_job_queries.py
mzz235711/IAM
e42c2b766442b666224b107b671eeab65f9b8efd
[ "Apache-2.0" ]
null
null
null
IAM/make_job_queries.py
mzz235711/IAM
e42c2b766442b666224b107b671eeab65f9b8efd
[ "Apache-2.0" ]
null
null
null
"""Generates new queries on the JOB-light schema. For each JOB-light join template, repeat #queries per template: - sample a tuple from this inner join result via factorized_sampler - sample #filters, and columns to put these filters on - query literals: use this tuple's values - sample ops: {>=, <=, =} fo...
37.64486
115
0.581678
"""Generates new queries on the JOB-light schema. For each JOB-light join template, repeat #queries per template: - sample a tuple from this inner join result via factorized_sampler - sample #filters, and columns to put these filters on - query literals: use this tuple's values - sample ops: {>=, <=, =} fo...
5,606
0
92
d7d810fd529ba41d4857933b4383a5e6e8fa4cb9
719
py
Python
selecv/figures/figure2.py
meyer-lab/cell-selective-ligands
cdcd645b7b44292aebb061b3ae9920268e8d20c8
[ "MIT" ]
null
null
null
selecv/figures/figure2.py
meyer-lab/cell-selective-ligands
cdcd645b7b44292aebb061b3ae9920268e8d20c8
[ "MIT" ]
62
2020-09-17T14:44:30.000Z
2022-03-12T01:07:42.000Z
selecv/figures/figure2.py
meyer-lab/cell-selective-ligands
cdcd645b7b44292aebb061b3ae9920268e8d20c8
[ "MIT" ]
null
null
null
""" Figure 2: Quick look into mostly valency """ import numpy as np from .figureCommon import subplotLabel, setFontSize, getSetup, popCompare from .figureS2 import vieqPlot ligConc = np.array([1e-8]) KxStarP = 1e-10 affinity = 1e8 # 7
24.793103
128
0.61057
""" Figure 2: Quick look into mostly valency """ import numpy as np from .figureCommon import subplotLabel, setFontSize, getSetup, popCompare from .figureS2 import vieqPlot ligConc = np.array([1e-8]) KxStarP = 1e-10 affinity = 1e8 # 7 def makeFigure(): # Get list of axis objects ax, f = getSetup((9, 6), (2,...
458
0
23
bf3d6e253c7a43d399877516e3a72e09668d29bd
5,035
py
Python
python/pipelines/pipelines_stack.py
mrpackethead/cdkpipeline-pattern
d2bcebf06d3b9d68157342f9226185e94076d25c
[ "Apache-2.0" ]
null
null
null
python/pipelines/pipelines_stack.py
mrpackethead/cdkpipeline-pattern
d2bcebf06d3b9d68157342f9226185e94076d25c
[ "Apache-2.0" ]
null
null
null
python/pipelines/pipelines_stack.py
mrpackethead/cdkpipeline-pattern
d2bcebf06d3b9d68157342f9226185e94076d25c
[ "Apache-2.0" ]
1
2021-01-22T12:16:07.000Z
2021-01-22T12:16:07.000Z
from aws_cdk import( core, aws_codepipeline as codepipeline, aws_codepipeline_actions as cpactions, aws_codecommit as codecommit, aws_s3 as s3, aws_iam as iam, aws_codebuild as codebuild, pipelines ) import json
38.730769
140
0.590268
from aws_cdk import( core, aws_codepipeline as codepipeline, aws_codepipeline_actions as cpactions, aws_codecommit as codecommit, aws_s3 as s3, aws_iam as iam, aws_codebuild as codebuild, pipelines ) import json class MultiStagePipeline(core.Construct): def __init__(self, scope: core.Construct, ...
4,725
20
50
07d97e2de8d83a7782f65b73586cf306c1bbaeca
9,465
py
Python
tests/jarutil.py
sokoslee/jvm.py
5d5442bad2506880fc6af5a17933f9f241bbc487
[ "Apache-2.0" ]
null
null
null
tests/jarutil.py
sokoslee/jvm.py
5d5442bad2506880fc6af5a17933f9f241bbc487
[ "Apache-2.0" ]
null
null
null
tests/jarutil.py
sokoslee/jvm.py
5d5442bad2506880fc6af5a17933f9f241bbc487
[ "Apache-2.0" ]
null
null
null
# This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be usefu...
41.331878
185
0.65177
# This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be usefu...
7,370
7
616
6a6599c3ec24ddb0a291f5fcbc7886a532a05587
5,959
py
Python
thapbi_pict/ena_submit.py
HuttonICS/thapbi-pict
fde07d192d9ecf011c75fffe3c180d3b72e17e06
[ "MIT" ]
6
2019-06-17T07:39:02.000Z
2021-11-19T18:42:17.000Z
thapbi_pict/ena_submit.py
HuttonICS/thapbi-pict
fde07d192d9ecf011c75fffe3c180d3b72e17e06
[ "MIT" ]
244
2018-10-24T13:35:51.000Z
2022-03-10T14:13:28.000Z
thapbi_pict/ena_submit.py
HuttonICS/thapbi-pict
fde07d192d9ecf011c75fffe3c180d3b72e17e06
[ "MIT" ]
1
2018-10-24T12:15:36.000Z
2018-10-24T12:15:36.000Z
# Copyright 2019-2020 by Peter Cock, The James Hutton Institute. # All rights reserved. # This file is part of the THAPBI Phytophthora ITS1 Classifier Tool (PICT), # and is released under the "MIT License Agreement". Please see the LICENSE # file that should have been included as part of this package. """Code for sampl...
31.86631
88
0.624266
# Copyright 2019-2020 by Peter Cock, The James Hutton Institute. # All rights reserved. # This file is part of the THAPBI Phytophthora ITS1 Classifier Tool (PICT), # and is released under the "MIT License Agreement". Please see the LICENSE # file that should have been included as part of this package. """Code for sampl...
0
0
0
44badcfc20c623263aad993b4fde7c366018b4bc
3,647
py
Python
poly_features_class.py
ThomIves/MachineLearningModulePurePy
25ecc668e0883dc651edbda47618a1fb8c33cc07
[ "Unlicense" ]
4
2019-10-31T09:10:53.000Z
2021-04-05T07:15:02.000Z
poly_features_class.py
ThomIves/MachineLearningModulePurePy
25ecc668e0883dc651edbda47618a1fb8c33cc07
[ "Unlicense" ]
null
null
null
poly_features_class.py
ThomIves/MachineLearningModulePurePy
25ecc668e0883dc651edbda47618a1fb8c33cc07
[ "Unlicense" ]
2
2020-08-30T08:07:45.000Z
2021-04-04T03:00:07.000Z
# PolynomialFeatures(degree=2, interaction_only=False, include_bias=True) import sys X = [[1, 2], [3, 4], [5, 6]] my_poly = PolynomialTools(order=2) #, interactions_only=True, include_bias=False) my_poly.fit(X) # print(len(my_poly.__powers_lists)) # print(my_poly.__powers_lists) print(my_poly.get_features_names(['...
29.650407
82
0.552783
# PolynomialFeatures(degree=2, interaction_only=False, include_bias=True) import sys class PolynomialTools: def __init__(self, order=2, interactions_only=False, include_bias=True): self.order = order self.interactions_only = interactions_only self.include_bias = include_bias def __red...
2,828
1
239
bcc0b3dca23353f17fb352cc2b5e3809af37ddaf
935
py
Python
src/horaha/utils.py
micahjsmith/horaha
c50d602417aa88a5ec9b92e58a16983fc5b02451
[ "MIT" ]
null
null
null
src/horaha/utils.py
micahjsmith/horaha
c50d602417aa88a5ec9b92e58a16983fc5b02451
[ "MIT" ]
null
null
null
src/horaha/utils.py
micahjsmith/horaha
c50d602417aa88a5ec9b92e58a16983fc5b02451
[ "MIT" ]
null
null
null
import pathlib import pickle import numpy as np import scipy.stats from horaha import PROJECT_ROOT
21.25
67
0.642781
import pathlib import pickle import numpy as np import scipy.stats from horaha import PROJECT_ROOT def load_monk_data(root_fp=None): if root_fp is None: root_fp = PROJECT_ROOT data_fp = pathlib.Path(root_fp).joinpath('data', 'sampson.txt') data = np.loadtxt(str(data_fp)) return data def lo...
747
0
92
fe3ffeaab8a13d5daab2f557f0be077c97ad07c6
1,035
py
Python
xrypto/exchanges/okcoin/HttpMD5Util.py
AlphaPerfect/Xrypto
fcb7b3b79c1f5ec0393d1795bcfa6556fd3e0dd9
[ "Unlicense" ]
10
2018-03-24T23:14:13.000Z
2020-04-22T15:56:05.000Z
xrypto/exchanges/okcoin/HttpMD5Util.py
a04512/crypto-raven
e8ebba319f8f04314b4c21d6bc4c8901bf358281
[ "Unlicense" ]
null
null
null
xrypto/exchanges/okcoin/HttpMD5Util.py
a04512/crypto-raven
e8ebba319f8f04314b4c21d6bc4c8901bf358281
[ "Unlicense" ]
10
2020-01-29T05:43:33.000Z
2021-12-13T07:02:39.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- #用于进行http请求,以及MD5加密,生成签名的工具类 import http.client import urllib import json import hashlib import time import requests from urllib.parse import urljoin from urllib.parse import urlencode
24.069767
68
0.642512
#!/usr/bin/python # -*- coding: utf-8 -*- #用于进行http请求,以及MD5加密,生成签名的工具类 import http.client import urllib import json import hashlib import time import requests from urllib.parse import urljoin from urllib.parse import urlencode def buildMySign(params,secretKey): sign = '' for key in sorted(params.keys()): ...
736
0
69
8a89389db25e2d8f144e067b503f136c1328d53e
7,720
py
Python
sheepdog/utils/transforms/__init__.py
fantix/sheepdog
dccfffa959591f66398b568b6ecb8bf4bcc0f7a6
[ "Apache-2.0" ]
null
null
null
sheepdog/utils/transforms/__init__.py
fantix/sheepdog
dccfffa959591f66398b568b6ecb8bf4bcc0f7a6
[ "Apache-2.0" ]
null
null
null
sheepdog/utils/transforms/__init__.py
fantix/sheepdog
dccfffa959591f66398b568b6ecb8bf4bcc0f7a6
[ "Apache-2.0" ]
null
null
null
""" TODO """ import csv import StringIO from flask import current_app from psqlgraph import Node from sheepdog.errors import UserError from sheepdog.utils.transforms.bcr_xml_to_json import ( BcrXmlToJsonParser, BcrClinicalXmlToJsonParser, ) def parse_bool_from_string(value): """ Return a boolean gi...
28.913858
87
0.570855
""" TODO """ import csv import StringIO from flask import current_app from psqlgraph import Node from sheepdog.errors import UserError from sheepdog.utils.transforms.bcr_xml_to_json import ( BcrXmlToJsonParser, BcrClinicalXmlToJsonParser, ) def parse_bool_from_string(value): """ Return a boolean gi...
475
48
125
7dc67d9c3c4c8b7c96f4ad7c72770854d17424b3
4,710
py
Python
run_main.py
obrua/douyu-qianghongbao
793cb913537c6136252d92af921395a6b55e79b4
[ "MIT" ]
3
2019-12-20T15:01:16.000Z
2021-12-23T06:37:31.000Z
run_main.py
obrua/douyu-qianghongbao
793cb913537c6136252d92af921395a6b55e79b4
[ "MIT" ]
null
null
null
run_main.py
obrua/douyu-qianghongbao
793cb913537c6136252d92af921395a6b55e79b4
[ "MIT" ]
null
null
null
import sys import os import signal import requests import json import queue import time import threading import ntplib from threading import Thread from gethongbao import verControl, HongBao, QiangHongBao, get_cookie, update_cookie from basemodule.logger import logger from douyu_login import utils as login_utils from ...
33.642857
102
0.618047
import sys import os import signal import requests import json import queue import time import threading import ntplib from threading import Thread from gethongbao import verControl, HongBao, QiangHongBao, get_cookie, update_cookie from basemodule.logger import logger from douyu_login import utils as login_utils from ...
86
0
23
ecf4f83dfa69c135fec4bd6061973d432baca49c
1,122
py
Python
tests/test_retina_sampling.py
hanl00/cythonised-retina
39dc72d54ca1f5dc6569831b0f1052839cb6feb2
[ "MIT" ]
1
2021-12-29T07:59:34.000Z
2021-12-29T07:59:34.000Z
tests/test_retina_sampling.py
hanl00/software-retina
39dc72d54ca1f5dc6569831b0f1052839cb6feb2
[ "MIT" ]
null
null
null
tests/test_retina_sampling.py
hanl00/software-retina
39dc72d54ca1f5dc6569831b0f1052839cb6feb2
[ "MIT" ]
null
null
null
import cv2 import numpy as np import skimage.io from src.software_retina.retina import *
32.057143
88
0.745989
import cv2 import numpy as np import skimage.io from src.software_retina.retina import * def test_sample_grayscale(): node_attributes_5k = np.load('data/5k/5k_rf_node_attributes.pkl', allow_pickle=True) coefficients_5k = np.load('data/5k/5k_rf_coefficients.pkl', allow_pickle=True) R = Retina(node_attribu...
986
0
46
edeefc19437c41efb18d22ba83ed2340535c2f55
507
py
Python
controlstructure/multiplelist.py
smanisha92/python101
797a80459ce9b2345cd51c614072f0ee633d3159
[ "MIT" ]
null
null
null
controlstructure/multiplelist.py
smanisha92/python101
797a80459ce9b2345cd51c614072f0ee633d3159
[ "MIT" ]
null
null
null
controlstructure/multiplelist.py
smanisha92/python101
797a80459ce9b2345cd51c614072f0ee633d3159
[ "MIT" ]
null
null
null
""" Iterating multiple lists at the same time """ l1 = [1,2,3] l2 = [6,7,8,10,20,30] for a,b in zip(l1, l2): if (a < b): print(a) else: print(b) print("____ LEARNING RANGE BUILT IN FUNCTION ____") """ Built in function Creates a sequence of numbers but does not save them in memory very useful f...
19.5
62
0.631164
""" Iterating multiple lists at the same time """ l1 = [1,2,3] l2 = [6,7,8,10,20,30] for a,b in zip(l1, l2): if (a < b): print(a) else: print(b) print("____ LEARNING RANGE BUILT IN FUNCTION ____") """ Built in function Creates a sequence of numbers but does not save them in memory very useful f...
0
0
0
8a27a6a9d67b5aa59fcba0ca4b16eb4caf47bc09
8,580
py
Python
Python/Number Guess Game.py
aastha01chauhan/Hacktoberfest
b58042f9f4d2991b0d151e351c9b2d52e779169c
[ "MIT" ]
77
2020-10-01T01:37:10.000Z
2021-09-30T08:44:44.000Z
Python/Number Guess Game.py
aastha01chauhan/Hacktoberfest
b58042f9f4d2991b0d151e351c9b2d52e779169c
[ "MIT" ]
399
2020-09-30T18:48:08.000Z
2021-04-17T00:16:21.000Z
Python/Number Guess Game.py
aastha01chauhan/Hacktoberfest
b58042f9f4d2991b0d151e351c9b2d52e779169c
[ "MIT" ]
470
2020-09-30T18:53:00.000Z
2021-09-09T10:15:55.000Z
#made by atul narayan. this game is for 4 players. choice = input('How many players? (1,2 or 3):') if choice not in range (1,4): print("enter valid number of players") if choice in ('1'): player1 = str(input("Enter Your Name:")) if choice == '1': print('welcome', '' ,player1) ...
31.895911
99
0.409907
#made by atul narayan. this game is for 4 players. choice = input('How many players? (1,2 or 3):') if choice not in range (1,4): print("enter valid number of players") if choice in ('1'): player1 = str(input("Enter Your Name:")) if choice == '1': print('welcome', '' ,player1) ...
0
0
0
58c6d46866bfb45986db751778ab80a4c0ddb14b
350
py
Python
api/migrations/0009_remove_presentationproposal_proposal_agreed_at.py
pythonkr/pyconkr-api
077e122a0af37122c5b424870cf91b8fca91a9f5
[ "Apache-2.0" ]
25
2018-12-09T07:56:16.000Z
2020-12-24T08:20:41.000Z
api/migrations/0009_remove_presentationproposal_proposal_agreed_at.py
mingrammer/pyconkr-api
3c9fc70ed26008a50d3b4c296a4da84a8f93babb
[ "Apache-2.0" ]
100
2018-12-13T02:01:42.000Z
2022-03-11T23:40:25.000Z
api/migrations/0009_remove_presentationproposal_proposal_agreed_at.py
mingrammer/pyconkr-api
3c9fc70ed26008a50d3b4c296a4da84a8f93babb
[ "Apache-2.0" ]
8
2019-01-05T05:02:27.000Z
2019-08-09T08:14:49.000Z
# Generated by Django 2.1.5 on 2019-03-16 09:29 from django.db import migrations
19.444444
47
0.617143
# Generated by Django 2.1.5 on 2019-03-16 09:29 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('api', '0008_auto_20190316_1540'), ] operations = [ migrations.RemoveField( model_name='presentationproposal', name='proposal...
0
244
23
a125f5defbe8dfc407b8f09b4df443c757f6e52d
13,633
py
Python
buzsaki_lab_to_nwb/watson/watsonnwbconverter.py
ben-dichter-consulting/buzsaki-lab-to-nwb
3a3dca679834c78769b2189abf1c063a1eebe0b6
[ "BSD-3-Clause" ]
null
null
null
buzsaki_lab_to_nwb/watson/watsonnwbconverter.py
ben-dichter-consulting/buzsaki-lab-to-nwb
3a3dca679834c78769b2189abf1c063a1eebe0b6
[ "BSD-3-Clause" ]
1
2019-11-04T18:55:13.000Z
2019-11-04T18:55:13.000Z
buzsaki_lab_to_nwb/watson/watsonnwbconverter.py
ben-dichter-consulting/buzsaki-lab-to-nwb
3a3dca679834c78769b2189abf1c063a1eebe0b6
[ "BSD-3-Clause" ]
null
null
null
"""Authors: Cody Baker and Ben Dichter.""" import spikeextractors as se from nwb_conversion_tools import NWBConverter, neuroscopedatainterface from .watsonlfpdatainterface import WatsonLFPInterface from .watsonbehaviordatainterface import WatsonBehaviorInterface from .watsonnorecording import WatsonNoRecording from .wa...
47.667832
118
0.557031
"""Authors: Cody Baker and Ben Dichter.""" import spikeextractors as se from nwb_conversion_tools import NWBConverter, neuroscopedatainterface from .watsonlfpdatainterface import WatsonLFPInterface from .watsonbehaviordatainterface import WatsonBehaviorInterface from .watsonnorecording import WatsonNoRecording from .wa...
12,398
625
23
374fc3ded7b192964692000f2826603ab40f6295
18,255
py
Python
classification/abstentionloss.py
eabarnes1010/controlled_abstention_networks
4519ff710d2562a25045d0a2bdd26b3b6a98fa32
[ "MIT" ]
8
2021-04-23T03:06:03.000Z
2022-01-03T08:36:32.000Z
classification/abstentionloss.py
eabarnes1010/controlled_abstention_networks
4519ff710d2562a25045d0a2bdd26b3b6a98fa32
[ "MIT" ]
null
null
null
classification/abstentionloss.py
eabarnes1010/controlled_abstention_networks
4519ff710d2562a25045d0a2bdd26b3b6a98fa32
[ "MIT" ]
4
2021-06-23T17:48:33.000Z
2022-01-02T04:10:37.000Z
"""Abstention loss function classes and associated alpha updater classes for classification. loss function classes --------------------- * DACLoss(tf.keras.losses.Loss): Modified k-class cross-entropy per-sample loss with spinup, as defined by Sunil Thulasidasan. * NotWrongLoss(tf.keras.losses.Loss): Abst...
34.378531
115
0.579458
"""Abstention loss function classes and associated alpha updater classes for classification. loss function classes --------------------- * DACLoss(tf.keras.losses.Loss): Modified k-class cross-entropy per-sample loss with spinup, as defined by Sunil Thulasidasan. * NotWrongLoss(tf.keras.losses.Loss): Abst...
8,587
35
607
3d16d17e54222f006e32cd6b9e6ca323e3738f03
465
py
Python
mmseg/core/evaluation/__init__.py
weiyx16/mmsegmentation
6d35d76195f173fbc6b119a7d7815e67d78024c6
[ "Apache-2.0" ]
103
2022-02-20T17:12:54.000Z
2022-03-30T07:09:48.000Z
mmseg/core/evaluation/__init__.py
weiyx16/mmsegmentation
6d35d76195f173fbc6b119a7d7815e67d78024c6
[ "Apache-2.0" ]
13
2022-02-15T20:05:18.000Z
2022-02-15T20:05:21.000Z
mmseg/core/evaluation/__init__.py
weiyx16/mmsegmentation
6d35d76195f173fbc6b119a7d7815e67d78024c6
[ "Apache-2.0" ]
17
2022-02-22T06:29:50.000Z
2022-03-30T05:03:06.000Z
# Copyright (c) OpenMMLab. All rights reserved. from .class_names import get_classes, get_palette from .eval_hooks import DistEvalHook, EvalHook from .metrics import (eval_metrics, intersect_and_union, mean_dice, mean_fscore, mean_iou, pre_eval_to_metrics) __all__ = [ 'EvalHook', 'DistEvalHoo...
38.75
72
0.733333
# Copyright (c) OpenMMLab. All rights reserved. from .class_names import get_classes, get_palette from .eval_hooks import DistEvalHook, EvalHook from .metrics import (eval_metrics, intersect_and_union, mean_dice, mean_fscore, mean_iou, pre_eval_to_metrics) __all__ = [ 'EvalHook', 'DistEvalHoo...
0
0
0
a92e8200ad4f10b5dd0a238b4c6d5ad4ac0f56cb
1,889
py
Python
barf/arch/x86/translators/__init__.py
Cyb3rDo/barf-project
df7359b7689f3282cdf900358bf2519d7f6c1da4
[ "BSD-2-Clause" ]
1
2018-12-14T13:41:37.000Z
2018-12-14T13:41:37.000Z
barf/arch/x86/translators/__init__.py
Cyb3rDo/barf-project
df7359b7689f3282cdf900358bf2519d7f6c1da4
[ "BSD-2-Clause" ]
null
null
null
barf/arch/x86/translators/__init__.py
Cyb3rDo/barf-project
df7359b7689f3282cdf900358bf2519d7f6c1da4
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky # 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 condit...
41.977778
80
0.800953
# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky # 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 condit...
0
0
0
477c33d210ea7fe5e3a15e8e3164b3c0794bfc70
10,643
py
Python
infoset/utils/configuration.py
clayton-colovore/infoset-ng
b0404fdda9e805effc16cebc9caef5f86b6bfe33
[ "Apache-2.0" ]
null
null
null
infoset/utils/configuration.py
clayton-colovore/infoset-ng
b0404fdda9e805effc16cebc9caef5f86b6bfe33
[ "Apache-2.0" ]
null
null
null
infoset/utils/configuration.py
clayton-colovore/infoset-ng
b0404fdda9e805effc16cebc9caef5f86b6bfe33
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """infoset classes that manage various configurations.""" import os.path import os # Import project libraries from infoset.utils import general from infoset.utils import log class Config(object): """Class gathers all configuration information.""" def __init__(self): """Functi...
21.286
97
0.532181
#!/usr/bin/env python3 """infoset classes that manage various configurations.""" import os.path import os # Import project libraries from infoset.utils import general from infoset.utils import log class Config(object): """Class gathers all configuration information.""" def __init__(self): """Functi...
0
0
0
0fbe13f1ba652baf17db53a896344842a42cac9a
1,526
py
Python
zscOutlinerColorMarker/__init__.py
ZishChen-rig/zscOutlinerColorMarker
21eb3075eab7f7860c82b1eb3f2aa7825fff6d45
[ "MIT" ]
null
null
null
zscOutlinerColorMarker/__init__.py
ZishChen-rig/zscOutlinerColorMarker
21eb3075eab7f7860c82b1eb3f2aa7825fff6d45
[ "MIT" ]
null
null
null
zscOutlinerColorMarker/__init__.py
ZishChen-rig/zscOutlinerColorMarker
21eb3075eab7f7860c82b1eb3f2aa7825fff6d45
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: UTF-8 -*- import maya.cmds as cmds
28.259259
96
0.529489
#!/usr/bin/python # -*- coding: UTF-8 -*- import maya.cmds as cmds def info(): ret = cmds.confirmDialog( t='Tool Information', icn='information', m=''' <br> <table border=".1" width="500"> <tr> <td><p align="right"><font size=\'5\' color=\'#0B1013\'>tool_name : </font></p></td> ...
1,419
0
25
9d98fd62f98891fea3227b9c5a0c7ae97e1287fa
158,901
py
Python
all/emojitations/data/sw.py
idleberg/sublime-emojitations
b2b4e8ce2c33ed0f6b8d6db6085e21da4e8d895b
[ "MIT" ]
6
2016-08-31T14:42:36.000Z
2021-09-05T23:55:47.000Z
all/emojitations/data/sw.py
idleberg/sublime-emojitations
b2b4e8ce2c33ed0f6b8d6db6085e21da4e8d895b
[ "MIT" ]
1
2016-10-20T10:52:06.000Z
2016-10-20T18:47:19.000Z
all/emojitations/data/sw.py
idleberg/sublime-emojitations
b2b4e8ce2c33ed0f6b8d6db6085e21da4e8d895b
[ "MIT" ]
5
2016-08-31T14:48:11.000Z
2021-09-05T23:55:33.000Z
from emojitations.emojitypes import EmojiAnnotations emoji = [ EmojiAnnotations(emoji='😀', codepoints=(128512,), name='sura inayokenua', slug='sura_inayokenua', annotations=frozenset({'kenua', 'uso'})), EmojiAnnotations(emoji='😁', codepoints=(128513,), name='uso uliokenua na macho yanayotabasamu', slug='uso_uliok...
164.323681
300
0.723274
from emojitations.emojitypes import EmojiAnnotations emoji = [ EmojiAnnotations(emoji='😀', codepoints=(128512,), name='sura inayokenua', slug='sura_inayokenua', annotations=frozenset({'kenua', 'uso'})), EmojiAnnotations(emoji='😁', codepoints=(128513,), name='uso uliokenua na macho yanayotabasamu', slug='uso_uliok...
0
0
0
2d2f9acf7120fb3634a638c8876a4b89c953a077
1,151
py
Python
dev/Gems/CloudGemMetric/v1/AWS/common-code/MetricUtils/sensitivity.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
8
2019-10-07T16:33:47.000Z
2020-12-07T03:59:58.000Z
dev/Gems/CloudGemMetric/v1/AWS/common-code/MetricUtils/sensitivity.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
null
null
null
dev/Gems/CloudGemMetric/v1/AWS/common-code/MetricUtils/sensitivity.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
5
2020-08-27T20:44:18.000Z
2021-08-21T22:54:11.000Z
from io import BytesIO from abc import ABCMeta, abstractmethod import metric_constant as c import os import gzip import zlib import base64 import sqs import enum_type SENSITIVITY_TYPE = enum_type.create(NONE="Insensitive", ENCRYPT="Sensitive") """ Encrypt S3 files (0) or leave unencrypted (1) """
22.134615
76
0.690704
from io import BytesIO from abc import ABCMeta, abstractmethod import metric_constant as c import os import gzip import zlib import base64 import sqs import enum_type def checksum(data): return zlib.crc32(data) def b64encode(data): return base64.b64encode(data) def b64decode(data): return base64.b64decod...
411
272
160
f2618e3174076b533e87baf41a733a81cbaa0778
756
py
Python
01_Language/05_Python/tests/db/test_mysql.py
cliff363825/TwentyFour
09df59bd5d275e66463e343647f46027397d1233
[ "MIT" ]
3
2020-06-28T07:42:51.000Z
2021-01-15T10:32:11.000Z
01_Language/05_Python/tests/db/test_mysql.py
cliff363825/TwentyFour
09df59bd5d275e66463e343647f46027397d1233
[ "MIT" ]
9
2021-03-10T22:45:40.000Z
2022-02-27T06:53:20.000Z
01_Language/05_Python/tests/db/test_mysql.py
cliff363825/TwentyFour
09df59bd5d275e66463e343647f46027397d1233
[ "MIT" ]
1
2021-01-15T10:51:24.000Z
2021-01-15T10:51:24.000Z
# coding: utf-8 # 安装Mysql驱动 # pip install mysql-connector-python --allow-external mysql-connector-python # pip install mysql-connector # 导入Mysql驱动 import mysql.connector # 创建数据库连接 conn = mysql.connector.connect(host='192.168.1.64', user='root', password='root', database='test') # 创建游标 cursor = conn.cursor() # 创建user...
22.235294
98
0.715608
# coding: utf-8 # 安装Mysql驱动 # pip install mysql-connector-python --allow-external mysql-connector-python # pip install mysql-connector # 导入Mysql驱动 import mysql.connector # 创建数据库连接 conn = mysql.connector.connect(host='192.168.1.64', user='root', password='root', database='test') # 创建游标 cursor = conn.cursor() # 创建user...
0
0
0
c41242cabbc1d9f4ebb1f328be8bec281136d4b8
2,244
py
Python
src/client_connection.py
philipholler/RocoCup_Soccer_P6
7b9addf665cb5b3a8d501b1ff9c064d501cf5aba
[ "Unlicense" ]
5
2020-09-09T08:37:30.000Z
2021-02-04T14:00:50.000Z
src/client_connection.py
philipholler/RocoCup_Soccer_P6
7b9addf665cb5b3a8d501b1ff9c064d501cf5aba
[ "Unlicense" ]
null
null
null
src/client_connection.py
philipholler/RocoCup_Soccer_P6
7b9addf665cb5b3a8d501b1ff9c064d501cf5aba
[ "Unlicense" ]
1
2021-02-04T14:34:07.000Z
2021-02-04T14:34:07.000Z
import select import socket import threading import queue import time """ This class is used by both player, trainer, coach and fake monitor for connecting to the server. """
30.739726
96
0.562834
import select import socket import threading import queue import time """ This class is used by both player, trainer, coach and fake monitor for connecting to the server. """ class Connection(threading.Thread): def __init__(self, UDP_IP, UDP_PORT, think, should_print=False): super().__init__() se...
1,843
14
212
7cf7ca5d1c4f08ec23d732b19690a970aab5acf3
1,514
py
Python
app/cnnLstm/testBug.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
null
null
null
app/cnnLstm/testBug.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
null
null
null
app/cnnLstm/testBug.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
2
2021-04-04T02:45:59.000Z
2022-03-19T09:41:39.000Z
import hydroDL import os from hydroDL.data import dbCsv from hydroDL.model import rnn, crit, train from hydroDL import post from hydroDL import utils import numpy as np rootDB = hydroDL.pathSMAP['DB_L3_NA'] nEpoch = 100 outFolder = os.path.join(hydroDL.pathSMAP['outTest'], 'cnnCond') ty1 = [20150402, 20160401] ty2 = [...
32.913043
79
0.7107
import hydroDL import os from hydroDL.data import dbCsv from hydroDL.model import rnn, crit, train from hydroDL import post from hydroDL import utils import numpy as np rootDB = hydroDL.pathSMAP['DB_L3_NA'] nEpoch = 100 outFolder = os.path.join(hydroDL.pathSMAP['outTest'], 'cnnCond') ty1 = [20150402, 20160401] ty2 = [...
0
0
0
5a0ef45a7fe3715ecfa7bc5baff0d7c8355b52ae
1,179
py
Python
app/blog/admin.py
elevoro/pyweb1
35ba9fba2f28edd32b418ca29668cbf69872e97b
[ "Apache-2.0" ]
null
null
null
app/blog/admin.py
elevoro/pyweb1
35ba9fba2f28edd32b418ca29668cbf69872e97b
[ "Apache-2.0" ]
null
null
null
app/blog/admin.py
elevoro/pyweb1
35ba9fba2f28edd32b418ca29668cbf69872e97b
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from .models import Note # Меняем формат вывода даты и времени только для РУССКОЙ локализации # Для всего сайта надо поместить этот код в `settings.py` from django.conf.locale.ru import formats as ru_formats ru_formats.DATETIME_FORMAT = "d.m.Y H:i:s" @admin.register(Note)
36.84375
115
0.691264
from django.contrib import admin from .models import Note # Меняем формат вывода даты и времени только для РУССКОЙ локализации # Для всего сайта надо поместить этот код в `settings.py` from django.conf.locale.ru import formats as ru_formats ru_formats.DATETIME_FORMAT = "d.m.Y H:i:s" @admin.register(Note) class Note...
435
594
22
67929bcb29fbc0523a0c076792aecb9aeece7a43
3,856
py
Python
tests/test_wrapper.py
It4innovations/quake
a57f37e5c871e0c7c00b84aef638b925ef96690a
[ "MIT" ]
1
2021-03-26T14:23:44.000Z
2021-03-26T14:23:44.000Z
tests/test_wrapper.py
It4innovations/quake
a57f37e5c871e0c7c00b84aef638b925ef96690a
[ "MIT" ]
null
null
null
tests/test_wrapper.py
It4innovations/quake
a57f37e5c871e0c7c00b84aef638b925ef96690a
[ "MIT" ]
null
null
null
import pytest import quake.client as quake @quake.mpi_task(n_processes=1) @quake.mpi_task(n_processes=1) @quake.mpi_task(n_processes=1) @quake.mpi_task(n_processes=4) @quake.mpi_task(n_processes=4) @quake.arg("a", layout="scatter") @quake.mpi_task(n_processes=8) @quake.mpi_task(n_processes=2)
24.405063
84
0.6486
import pytest import quake.client as quake @quake.mpi_task(n_processes=1) def my_const(): return 12 @quake.mpi_task(n_processes=1) def my_sum(a, b): return a + b @quake.mpi_task(n_processes=1) def my_sum_c(a, b): return a + b @quake.mpi_task(n_processes=4) def my_const4(): return 12 + quake.job...
3,273
0
269
c736e148c03c91a537b9ec7316e96d6a76ff42e0
2,535
py
Python
custom_model_runner/datarobot_drum/resource/components/Python/python_fit/python_fit.py
Embodimentgeniuslm3/datarobot-user-models
9453482896c6cc27468d829ad037a6f164d3c5a3
[ "Apache-2.0" ]
null
null
null
custom_model_runner/datarobot_drum/resource/components/Python/python_fit/python_fit.py
Embodimentgeniuslm3/datarobot-user-models
9453482896c6cc27468d829ad037a6f164d3c5a3
[ "Apache-2.0" ]
9
2021-11-10T20:16:41.000Z
2022-03-12T00:59:05.000Z
custom_model_runner/datarobot_drum/resource/components/Python/python_fit/python_fit.py
Embodimentgeniuslm3/datarobot-user-models
9453482896c6cc27468d829ad037a6f164d3c5a3
[ "Apache-2.0" ]
1
2021-06-17T22:05:33.000Z
2021-06-17T22:05:33.000Z
import logging import sys import os from mlpiper.components.connectable_component import ConnectableComponent from datarobot_drum.drum.common import LOGGER_NAME_PREFIX from datarobot_drum.drum.model_adapter import PythonModelAdapter from datarobot_drum.drum.utils import shared_fit_preprocessing, make_sure_artifact_is...
37.279412
91
0.69783
import logging import sys import os from mlpiper.components.connectable_component import ConnectableComponent from datarobot_drum.drum.common import LOGGER_NAME_PREFIX from datarobot_drum.drum.model_adapter import PythonModelAdapter from datarobot_drum.drum.utils import shared_fit_preprocessing, make_sure_artifact_is...
2,022
17
103
c998f8f32240614a2c3222fbad5a62541cfa2e76
1,952
py
Python
unn/models/networks/fp16_helper.py
zongdaoming/TinyTransformer
8e64f8816117048c388b4b20e3a56760ce149fe3
[ "Apache-2.0" ]
2
2021-08-08T11:23:14.000Z
2021-09-16T04:05:23.000Z
unn/models/networks/fp16_helper.py
zongdaoming/TinyTransformer
8e64f8816117048c388b4b20e3a56760ce149fe3
[ "Apache-2.0" ]
1
2021-08-08T11:25:47.000Z
2021-08-08T11:26:15.000Z
unn/models/networks/fp16_helper.py
zongdaoming/TinyTransformer
8e64f8816117048c388b4b20e3a56760ce149fe3
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn import linklink as link from unn.utils.bn_helper import GroupSyncBatchNorm, FrozenBatchNorm2d from unn.utils.dist_helper import get_world_size def op32_wrapper(func): """Wrapper forward whose input are all tensors and can only handle float""" return forward def setup_fp16(): ...
35.490909
81
0.67418
import torch import torch.nn import linklink as link from unn.utils.bn_helper import GroupSyncBatchNorm, FrozenBatchNorm2d from unn.utils.dist_helper import get_world_size def op32_wrapper(func): """Wrapper forward whose input are all tensors and can only handle float""" def forward(self, *args, **kwargs): ...
1,279
0
96
8987825f748c9dd8a438ddeb4923d4e8cff294e9
1,906
py
Python
observations/r/gaba.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
199
2017-07-24T01:34:27.000Z
2022-01-29T00:50:55.000Z
observations/r/gaba.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
46
2017-09-05T19:27:20.000Z
2019-01-07T09:47:26.000Z
observations/r/gaba.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
45
2017-07-26T00:10:44.000Z
2022-03-16T20:44:59.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import csv import numpy as np import os import sys from observations.util import maybe_download_and_extract def gaba(path): """Effect of pentazocine on post-operative pain (average ...
25.413333
73
0.681007
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import csv import numpy as np import os import sys from observations.util import maybe_download_and_extract def gaba(path): """Effect of pentazocine on post-operative pain (average ...
0
0
0
8287189c30775c4d9b66e3f0985dad3603167dd7
2,462
py
Python
mars/tensor/special/tests/test_special_execute.py
sighingnow/mars
c7897fbd144d230fff5edabc1494fb3ff44aa0d2
[ "Apache-2.0" ]
null
null
null
mars/tensor/special/tests/test_special_execute.py
sighingnow/mars
c7897fbd144d230fff5edabc1494fb3ff44aa0d2
[ "Apache-2.0" ]
null
null
null
mars/tensor/special/tests/test_special_execute.py
sighingnow/mars
c7897fbd144d230fff5edabc1494fb3ff44aa0d2
[ "Apache-2.0" ]
null
null
null
# Copyright 1999-2018 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
28.964706
77
0.669781
# Copyright 1999-2018 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
1,379
9
102
2cd5958ed1f77aa7768edd9a4bd6bd70956aeb7e
528
py
Python
Python/divide-array-in-sets-of-k-consecutive-numbers.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
Python/divide-array-in-sets-of-k-consecutive-numbers.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
Python/divide-array-in-sets-of-k-consecutive-numbers.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
# Time: O(nlogn) # Space: O(n) import collections
22
41
0.456439
# Time: O(nlogn) # Space: O(n) import collections class Solution(object): def isPossibleDivide(self, nums, k): """ :type nums: List[int] :type k: int :rtype: bool """ count = collections.Counter(nums) for num in sorted(count.keys()): c = count[...
0
452
23
9d916852ce53c80e378a61f478e6308f882067c2
516
py
Python
offthedialbot/__init__.py
yamiacat/rw-offthedialbot
0bdba20ea438dffca85683a45c24c1305b72268c
[ "MIT" ]
null
null
null
offthedialbot/__init__.py
yamiacat/rw-offthedialbot
0bdba20ea438dffca85683a45c24c1305b72268c
[ "MIT" ]
null
null
null
offthedialbot/__init__.py
yamiacat/rw-offthedialbot
0bdba20ea438dffca85683a45c24c1305b72268c
[ "MIT" ]
null
null
null
"""Holds client subclass of discord.ext.Bot, and registeres commands.""" from discord.ext import commands as ext from offthedialbot.commands import register_commands client = Client(command_prefix='$') register_commands(client)
23.454545
73
0.680233
"""Holds client subclass of discord.ext.Bot, and registeres commands.""" from discord.ext import commands as ext from offthedialbot.commands import register_commands class Client(ext.Bot): def __init__(self, **kwargs): super().__init__(**kwargs) async def on_ready(self): print...
160
1
112
5559d3f86ff66192128d84f8cd4cee7f32026421
27,256
py
Python
src/baseline.py
matejklemen/slovene-coreference-resolution
3dc19c03dcef244c4cc4f6e0415915455014964d
[ "MIT" ]
2
2020-05-15T07:21:59.000Z
2020-05-25T14:36:21.000Z
src/baseline.py
matejklemen/slovene-coreference-resolution
3dc19c03dcef244c4cc4f6e0415915455014964d
[ "MIT" ]
1
2021-12-12T21:27:24.000Z
2021-12-12T21:27:24.000Z
src/baseline.py
matejklemen/slovene-coreference-resolution
3dc19c03dcef244c4cc4f6e0415915455014964d
[ "MIT" ]
1
2021-07-09T09:33:39.000Z
2021-07-09T09:33:39.000Z
import argparse import json import logging import os import time from collections import Counter from copy import deepcopy from sklearn.model_selection import KFold import metrics import numpy as np import torch import torch.nn as nn import torch.optim as optim from pyjarowinkler import distance as jwdistance from ut...
43.890499
136
0.624119
import argparse import json import logging import os import time from collections import Counter from copy import deepcopy from sklearn.model_selection import KFold import metrics import numpy as np import torch import torch.nn as nn import torch.optim as optim from pyjarowinkler import distance as jwdistance from ut...
8,024
12,575
248
f473a73d978683dc8eedbf299e1169c3f6ddf7bd
9,945
py
Python
pysrc/chipmodel.py
yulyugin/xed
428d882e14f4ed3039f8a496ce15727b22d36bc4
[ "Apache-2.0" ]
4
2021-01-10T22:25:31.000Z
2022-01-11T16:55:25.000Z
pysrc/chipmodel.py
yulyugin/xed
428d882e14f4ed3039f8a496ce15727b22d36bc4
[ "Apache-2.0" ]
2
2021-01-11T11:23:47.000Z
2021-05-12T05:26:30.000Z
pysrc/chipmodel.py
yulyugin/xed
428d882e14f4ed3039f8a496ce15727b22d36bc4
[ "Apache-2.0" ]
2
2020-10-02T03:07:50.000Z
2021-12-29T14:42:25.000Z
#!/usr/bin/env python # -*- python -*- #BEGIN_LEGAL # #Copyright (c) 2019 Intel Corporation # # 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...
32.606557
108
0.550025
#!/usr/bin/env python # -*- python -*- #BEGIN_LEGAL # #Copyright (c) 2019 Intel Corporation # # 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...
6,947
0
295
b646fccf7c215d14cbcbb9a6a298c2c788f2bbc2
6,658
py
Python
scripts/algorithm.py
mzramna/MagicMagnet-Python
840edbb8af88d029c5a59024d0d35b2e2640aa96
[ "MIT" ]
4
2020-07-19T21:06:24.000Z
2020-10-17T15:10:10.000Z
scripts/algorithm.py
mzramna/MagicMagnet-Python
840edbb8af88d029c5a59024d0d35b2e2640aa96
[ "MIT" ]
1
2021-03-31T20:03:45.000Z
2021-03-31T20:03:45.000Z
scripts/algorithm.py
mzramna/MagicMagnet-Python
840edbb8af88d029c5a59024d0d35b2e2640aa96
[ "MIT" ]
null
null
null
import json import os import urllib.parse import PySimpleGUI as sg import requests from bs4 import BeautifulSoup, SoupStrainer
47.899281
220
0.534695
import json import os import urllib.parse import PySimpleGUI as sg import requests from bs4 import BeautifulSoup, SoupStrainer class MagicMagnet(): def __init__(self,debug=True,search_param_json="search_parameters.json"): self.links = {'foundLinks': 0} self.debug=debug self.search_params =...
6,347
-1
184
9aad83d1690d096a194457d33ff8763d7215e54c
5,582
py
Python
dataset_generation/complete_dataset.py
inzva/fake-academic-paper-generation
294fb4f218ea1d04c705f0649fa715f09122bf8a
[ "MIT" ]
48
2019-03-27T09:36:38.000Z
2022-03-12T17:26:15.000Z
dataset_generation/complete_dataset.py
inzva/fake-academic-paper-generation
294fb4f218ea1d04c705f0649fa715f09122bf8a
[ "MIT" ]
3
2019-05-29T14:41:54.000Z
2022-01-31T08:13:11.000Z
dataset_generation/complete_dataset.py
inzva/fake-academic-paper-generation
294fb4f218ea1d04c705f0649fa715f09122bf8a
[ "MIT" ]
11
2019-03-27T23:01:04.000Z
2021-12-22T02:49:53.000Z
import urllib.request import shutil import os import tarfile import random import glob from TexSoup import TexSoup def import_resolve(tex, path): """Resolve all imports and update the parse tree. Reads from a tex file and once finished, writes to a tex file. """ soup = TexSoup(tex) dir_path = os....
34.45679
114
0.636869
import urllib.request import shutil import os import tarfile import random import glob from TexSoup import TexSoup def import_resolve(tex, path): """Resolve all imports and update the parse tree. Reads from a tex file and once finished, writes to a tex file. """ soup = TexSoup(tex) dir_path = os....
0
0
0
83a84cea668e3969d4b8309e6347b88e0dabf9bf
1,123
py
Python
setup.py
plechoss/mobilipy
3bf54fe11defe186228af99d01de82bf11f0b590
[ "MIT" ]
null
null
null
setup.py
plechoss/mobilipy
3bf54fe11defe186228af99d01de82bf11f0b590
[ "MIT" ]
null
null
null
setup.py
plechoss/mobilipy
3bf54fe11defe186228af99d01de82bf11f0b590
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages VERSION = '0.1.11' DESCRIPTION = 'A mobility analysis package developed at the Swiss Data Science Center' with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() # Setting up setup( # the name must match the folder name 'sdscmob' ...
36.225806
86
0.620659
from setuptools import setup, find_packages VERSION = '0.1.11' DESCRIPTION = 'A mobility analysis package developed at the Swiss Data Science Center' with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() # Setting up setup( # the name must match the folder name 'sdscmob' ...
0
0
0
3d2a8ff32e8b426f13ca531209da3986ea8f7272
7,995
py
Python
conary/conaryclient/newtrove.py
sassoftware/conary
d418968acd5e11ee17ed6d91ca395ea10a040222
[ "Apache-2.0" ]
43
2015-03-31T01:37:10.000Z
2021-11-14T16:26:48.000Z
conary/conaryclient/newtrove.py
sassoftware/conary
d418968acd5e11ee17ed6d91ca395ea10a040222
[ "Apache-2.0" ]
9
2015-06-10T16:39:41.000Z
2020-01-27T16:35:01.000Z
conary/conaryclient/newtrove.py
sassoftware/conary
d418968acd5e11ee17ed6d91ca395ea10a040222
[ "Apache-2.0" ]
9
2015-04-07T08:12:37.000Z
2020-01-26T09:54:18.000Z
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
43.216216
111
0.606754
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
4,847
2,226
23
160d40bb2e34088d43b3735484560278b33c2aae
472
py
Python
Circumference.py
WOLF2503/Python-Program
12d74b7e1df3a8fe34aabc6c757c71da40e1b309
[ "CC0-1.0" ]
null
null
null
Circumference.py
WOLF2503/Python-Program
12d74b7e1df3a8fe34aabc6c757c71da40e1b309
[ "CC0-1.0" ]
null
null
null
Circumference.py
WOLF2503/Python-Program
12d74b7e1df3a8fe34aabc6c757c71da40e1b309
[ "CC0-1.0" ]
null
null
null
radius = int(input("Please Enter Radius of the Circle: ")) Rate = int(input("Please Enter Rate of Fencing: ")) #now calculating the area of circle area = 3.146 * 3.146 * radius print("The Area of the Circle is ", area) #now calculating the circumference circumference = 3.146 * 2 * radius print("The Circumference...
39.333333
60
0.720339
radius = int(input("Please Enter Radius of the Circle: ")) Rate = int(input("Please Enter Rate of Fencing: ")) #now calculating the area of circle area = 3.146 * 3.146 * radius print("The Area of the Circle is ", area) #now calculating the circumference circumference = 3.146 * 2 * radius print("The Circumference...
0
0
0
fdc74bce46c7eaadd41b6418caf80613b864ad4d
3,820
py
Python
tools/main_variableslist_example.py
alpavlenko/EvoGuess
19bc54e75cd959e445becda16fa6f488f0fb2367
[ "MIT" ]
null
null
null
tools/main_variableslist_example.py
alpavlenko/EvoGuess
19bc54e75cd959e445becda16fa6f488f0fb2367
[ "MIT" ]
null
null
null
tools/main_variableslist_example.py
alpavlenko/EvoGuess
19bc54e75cd959e445becda16fa6f488f0fb2367
[ "MIT" ]
null
null
null
import json from util import build from output import Output from method import Method from executor import Executor from function import Function from instance import Instance from algorithm import Algorithm if __name__ == '__main__': args = json.dumps({ 'algorithm': { 'mu': 1, 'lmbda': 1, ...
34.414414
120
0.421728
import json from util import build from output import Output from method import Method from executor import Executor from function import Function from instance import Instance from algorithm import Algorithm if __name__ == '__main__': args = json.dumps({ 'algorithm': { 'mu': 1, 'lmbda': 1, ...
0
0
0
55c59da0ac219a0cb5c2d7658dacfc7ae2cac9dd
2,269
py
Python
onlinecourse/admin.py
pedruntu/IBM_PROJ_01
e5148c4547c4ef8c1a924e4e323f0a83a472a053
[ "Apache-2.0" ]
null
null
null
onlinecourse/admin.py
pedruntu/IBM_PROJ_01
e5148c4547c4ef8c1a924e4e323f0a83a472a053
[ "Apache-2.0" ]
null
null
null
onlinecourse/admin.py
pedruntu/IBM_PROJ_01
e5148c4547c4ef8c1a924e4e323f0a83a472a053
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin # <HINT> Import any new Models here from .models import Course, Enrollment, Lesson, Instructor, Learner from .models import Question, Choice,Submission, Answer # <HINT> Register QuestionInline and ChoiceInline classes here # Register your models here. # <HINT> Register Questio...
25.784091
67
0.72543
from django.contrib import admin # <HINT> Import any new Models here from .models import Course, Enrollment, Lesson, Instructor, Learner from .models import Question, Choice,Submission, Answer # <HINT> Register QuestionInline and ChoiceInline classes here class QuestionInline(admin.StackedInline): model = Question...
0
1,145
273
2b7318bcc2e9795bc5458f0adc423fa43b6155e5
1,505
py
Python
bookmark_merger.py
nmogadas/bookmark-merger
50b6b82f550dfb4c357764e94b5182f03cd0ba92
[ "MIT" ]
7
2016-10-29T02:17:15.000Z
2018-09-12T06:07:28.000Z
bookmark_merger.py
nmogadas/bookmark-merger
50b6b82f550dfb4c357764e94b5182f03cd0ba92
[ "MIT" ]
1
2016-08-30T20:35:07.000Z
2017-03-07T21:57:28.000Z
bookmark_merger.py
nmogadas/bookmark-merger
50b6b82f550dfb4c357764e94b5182f03cd0ba92
[ "MIT" ]
null
null
null
import io from bookmark_helper import * first_file_name = input('Enter first file name, including extension: ') second_file_name = input('Enter second file name, including extension: ') first_file = open(first_file_name, 'r') second_file = open(second_file_name, 'r') first_file_header = first_file.readline() sec...
27.363636
85
0.769435
import io from bookmark_helper import * first_file_name = input('Enter first file name, including extension: ') second_file_name = input('Enter second file name, including extension: ') first_file = open(first_file_name, 'r') second_file = open(second_file_name, 'r') first_file_header = first_file.readline() sec...
0
0
0
a80a06f8f88de3f79fabf5f0d416292682580724
1,831
py
Python
scripts/feature_def_gen/get_clinical_schema.py
isb-cgc/ISB-CGC-Webapp
52ed5366ee295e938108a4687bad551a8dee6b34
[ "Apache-2.0" ]
13
2016-01-14T02:43:10.000Z
2020-11-25T20:43:05.000Z
scripts/feature_def_gen/get_clinical_schema.py
isb-cgc/ISB-CGC-Webapp
52ed5366ee295e938108a4687bad551a8dee6b34
[ "Apache-2.0" ]
84
2015-11-20T02:03:33.000Z
2021-10-14T19:24:24.000Z
scripts/feature_def_gen/get_clinical_schema.py
isb-cgc/ISB-CGC-Webapp
52ed5366ee295e938108a4687bad551a8dee6b34
[ "Apache-2.0" ]
5
2015-11-25T19:29:53.000Z
2019-09-04T17:37:52.000Z
# # Copyright 2015-2019, Institute for Systems Biology # # 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 ...
31.033898
96
0.719825
# # Copyright 2015-2019, Institute for Systems Biology # # 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 ...
888
0
46
8eac257f2a4c0ac94b08f5a35eeb0d35a25a384c
7,033
py
Python
aioredis_wrapper/lock.py
waves-trading/aioredis_wrapper
fb466103b23b684f3ef8c42e2e02d06088f94ea0
[ "MIT" ]
null
null
null
aioredis_wrapper/lock.py
waves-trading/aioredis_wrapper
fb466103b23b684f3ef8c42e2e02d06088f94ea0
[ "MIT" ]
null
null
null
aioredis_wrapper/lock.py
waves-trading/aioredis_wrapper
fb466103b23b684f3ef8c42e2e02d06088f94ea0
[ "MIT" ]
null
null
null
"""""" import asyncio import hashlib from typing import Optional from uuid import uuid4 from .redis import RedisConnection class LockException(BaseLockException): """""" pass class ReleaseLockException(BaseLockException): """""" pass class Lock(object): """""" def __init__(self, lock_ke...
32.864486
131
0.55069
"""""" import asyncio import hashlib from typing import Optional from uuid import uuid4 from .redis import RedisConnection class BaseLockException(Exception): pass class LockException(BaseLockException): """""" pass class ReleaseLockException(BaseLockException): """""" pass class Lock(objec...
744
23
310
fc3742797df3a5149ce9eae3b0a0b3b013c9c4b9
166
py
Python
tests/test_nameless.py
ionelmc/python-nameless
e81c19668e08650e4be951f4c563ac50511e1657
[ "BSD-2-Clause" ]
121
2015-01-19T15:29:16.000Z
2022-03-10T10:36:22.000Z
tests/test_nameless.py
Smirenost/python-nameless
838e1f0d90c9a33abba820ffd05beb39b2ef6763
[ "BSD-2-Clause" ]
5
2020-09-04T17:11:13.000Z
2020-11-27T13:00:27.000Z
tests/test_nameless.py
Smirenost/python-nameless
838e1f0d90c9a33abba820ffd05beb39b2ef6763
[ "BSD-2-Clause" ]
48
2015-01-05T13:34:51.000Z
2022-03-08T17:09:33.000Z
from nameless import longest from nameless.cli import main
13.833333
51
0.644578
from nameless import longest from nameless.cli import main def test_main(): main([]) def test_longest(): assert longest([b'a', b'bc', b'abc']) == b'abc'
58
0
46
f0f906b997ae0ec79516c62debe0e83199d4753b
5,507
py
Python
pythia/tasks/captioning/youcookII/get_pythia_caption_and_vsepp_score.py
ascott02/pythia
bcccd4868d6c4a4a8d32ac92a674689551df7267
[ "BSD-3-Clause" ]
null
null
null
pythia/tasks/captioning/youcookII/get_pythia_caption_and_vsepp_score.py
ascott02/pythia
bcccd4868d6c4a4a8d32ac92a674689551df7267
[ "BSD-3-Clause" ]
null
null
null
pythia/tasks/captioning/youcookII/get_pythia_caption_and_vsepp_score.py
ascott02/pythia
bcccd4868d6c4a4a8d32ac92a674689551df7267
[ "BSD-3-Clause" ]
null
null
null
import argparse import glob import json import os import numpy as np import requests import sys # python get_pythia_caption_and_vsepp_score.py -o youcookII_pythia_json_files -i youcookII_json_files from pythia.utils.text_utils import tokenize # annotations_file = "/home/ascott/data/youcookII/YouCookII/annotations/yo...
32.017442
117
0.563102
import argparse import glob import json import os import numpy as np import requests import sys # python get_pythia_caption_and_vsepp_score.py -o youcookII_pythia_json_files -i youcookII_json_files from pythia.utils.text_utils import tokenize # annotations_file = "/home/ascott/data/youcookII/YouCookII/annotations/yo...
3,928
0
188
c517b206c63f705d8c7effc9daae26aad8115d7e
2,273
py
Python
recover_corrupt.py
martengooz/github-scraper
c6a04df030d7a0657fa71e30bc6f32f3f076ff84
[ "MIT" ]
1
2019-04-22T18:12:58.000Z
2019-04-22T18:12:58.000Z
recover_corrupt.py
martengooz/github-scraper
c6a04df030d7a0657fa71e30bc6f32f3f076ff84
[ "MIT" ]
null
null
null
recover_corrupt.py
martengooz/github-scraper
c6a04df030d7a0657fa71e30bc6f32f3f076ff84
[ "MIT" ]
null
null
null
import requests import pause import json import time import datetime import re import grequests import sys import os page = "hej" baseurl = "https://api.github.com/" # Get token f = open("token","r") username = f.readline() token = f.readline().rstrip('\n') f.close() #read data with open('reposfinal') as data_file:...
21.855769
99
0.638803
import requests import pause import json import time import datetime import re import grequests import sys import os page = "hej" baseurl = "https://api.github.com/" # Get token f = open("token","r") username = f.readline() token = f.readline().rstrip('\n') f.close() #read data with open('reposfinal') as data_file:...
724
0
92
b29e59dcf341465d7df28b746e29d072ce597d51
4,871
py
Python
lib/methods/git.py
factorial-io/fabalicious
56672b0007dd00aa80c2cc2d1f5138211bcd4c22
[ "MIT" ]
13
2015-06-25T16:49:55.000Z
2019-06-02T08:06:43.000Z
lib/methods/git.py
factorial-io/fabalicious
56672b0007dd00aa80c2cc2d1f5138211bcd4c22
[ "MIT" ]
50
2015-03-04T22:09:48.000Z
2019-03-02T15:55:53.000Z
lib/methods/git.py
factorial-io/fabalicious
56672b0007dd00aa80c2cc2d1f5138211bcd4c22
[ "MIT" ]
4
2015-03-02T15:51:10.000Z
2017-10-23T10:06:47.000Z
import logging log = logging.getLogger('fabric.fabalicious.git') from base import BaseMethod from fabric.api import * from lib.utils import validate_dict from lib.configuration import data_merge from lib import configuration
30.829114
88
0.628413
import logging log = logging.getLogger('fabric.fabalicious.git') from base import BaseMethod from fabric.api import * from lib.utils import validate_dict from lib.configuration import data_merge from lib import configuration class GitMethod(BaseMethod): @staticmethod def supports(methodName): return methodNam...
4,204
418
23
258a0b8db6764285a0c6f49457db77dc3abbe76d
25,801
py
Python
src/python_pachyderm/proto/transaction/transaction_pb2.py
barretthinson/python-pachyderm
82cea22d1105d70833a5522ccac750ca521694ff
[ "Apache-2.0" ]
null
null
null
src/python_pachyderm/proto/transaction/transaction_pb2.py
barretthinson/python-pachyderm
82cea22d1105d70833a5522ccac750ca521694ff
[ "Apache-2.0" ]
null
null
null
src/python_pachyderm/proto/transaction/transaction_pb2.py
barretthinson/python-pachyderm
82cea22d1105d70833a5522ccac750ca521694ff
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: client/transaction/transaction.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbo...
39.270928
2,898
0.78028
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: client/transaction/transaction.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbo...
0
0
0
1a57298f8d0d839864edae5c723d90da3ba076d9
1,246
py
Python
util/CountMarks.py
ransalmo/data-augmentation-scripts
d4f298c31b60cbc65ca2bee0f352497cd4cb0091
[ "MIT" ]
null
null
null
util/CountMarks.py
ransalmo/data-augmentation-scripts
d4f298c31b60cbc65ca2bee0f352497cd4cb0091
[ "MIT" ]
null
null
null
util/CountMarks.py
ransalmo/data-augmentation-scripts
d4f298c31b60cbc65ca2bee0f352497cd4cb0091
[ "MIT" ]
null
null
null
# coding=utf-8 import os import xml.etree.ElementTree as ET import matplotlib.pyplot as plt path = os.path.join(os.getcwd(), 'images', 'annotations') if not os.path.exists(path): raise ValueError('The images\\annotations firectory does not exist') else: files = os.listdir(path) results = {} files =...
31.948718
86
0.629213
# coding=utf-8 import os import xml.etree.ElementTree as ET import matplotlib.pyplot as plt path = os.path.join(os.getcwd(), 'images', 'annotations') if not os.path.exists(path): raise ValueError('The images\\annotations firectory does not exist') else: files = os.listdir(path) results = {} files =...
0
0
0
ce6425f52fc9c8a084ede5b68e6569dfad7dd6b9
12,801
py
Python
DataExtractor/extractor.py
FabianGroeger96/cnn-number-detection
82c34255f45e0d65f9d64e3a291dccf9e3a0a0ae
[ "MIT" ]
52
2019-04-15T09:44:04.000Z
2022-03-22T19:55:31.000Z
DataExtractor/extractor.py
FabianGroeger96/cnn-number-detection
82c34255f45e0d65f9d64e3a291dccf9e3a0a0ae
[ "MIT" ]
12
2019-10-23T15:47:45.000Z
2022-01-13T15:38:54.000Z
DataExtractor/extractor.py
FabianGroeger96/cnn-number-detection
82c34255f45e0d65f9d64e3a291dccf9e3a0a0ae
[ "MIT" ]
13
2020-01-26T09:45:33.000Z
2022-01-10T21:58:28.000Z
import logging import os import cv2 import numpy as np import pickle import constants import random from natsort import natsorted from tqdm import tqdm from Isolator.isolator import Isolator from tensorflow.python.keras.preprocessing.image import ImageDataGenerator from tensorflow.python.keras.preprocessing.image impor...
41.970492
120
0.587298
import logging import os import cv2 import numpy as np import pickle import constants import random from natsort import natsorted from tqdm import tqdm from Isolator.isolator import Isolator from tensorflow.python.keras.preprocessing.image import ImageDataGenerator from tensorflow.python.keras.preprocessing.image impor...
12,099
-5
347
0da309cbe4087be8f99284b0e3aa9a56529cdbf0
14,306
py
Python
app/views.py
JeremyLG/submission
5fb39a002a30b3f290ef99203682fe459b2b2e90
[ "MIT" ]
null
null
null
app/views.py
JeremyLG/submission
5fb39a002a30b3f290ef99203682fe459b2b2e90
[ "MIT" ]
null
null
null
app/views.py
JeremyLG/submission
5fb39a002a30b3f290ef99203682fe459b2b2e90
[ "MIT" ]
null
null
null
import os import io from datetime import datetime, timedelta import uuid from flask import flash, render_template, request, redirect, url_for, jsonify, send_from_directory, abort from flask_admin.contrib.sqla import ModelView from flask_admin.form.upload import FileUploadField from flask_admin import AdminIndexView im...
34.977995
231
0.604781
import os import io from datetime import datetime, timedelta import uuid from flask import flash, render_template, request, redirect, url_for, jsonify, send_from_directory, abort from flask_admin.contrib.sqla import ModelView from flask_admin.form.upload import FileUploadField from flask_admin import AdminIndexView im...
9,368
1,614
362
3d272e9deb2dafc37efa25f42e73420260739be8
9,696
py
Python
test_suite/gatt_server/test_descriptor_instantiation.py
AGlass0fMilk/mbed-os-bluetooth-integration-testsuite
0fbcfcc84b27ec82505192bf181abb1df024c53c
[ "Apache-2.0" ]
null
null
null
test_suite/gatt_server/test_descriptor_instantiation.py
AGlass0fMilk/mbed-os-bluetooth-integration-testsuite
0fbcfcc84b27ec82505192bf181abb1df024c53c
[ "Apache-2.0" ]
null
null
null
test_suite/gatt_server/test_descriptor_instantiation.py
AGlass0fMilk/mbed-os-bluetooth-integration-testsuite
0fbcfcc84b27ec82505192bf181abb1df024c53c
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2009-2020 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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 ...
45.308411
119
0.707715
# Copyright (c) 2009-2020 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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 ...
7,913
0
44
930e25677fea5ad0eade9badb8cdf47a5077dc8c
312
py
Python
USACOClassLiveTest/src/sortfile2.py
javaarchive/USACOClass2020
4ae563014b9b2da3e1361e175d38e72308a8da89
[ "MIT" ]
null
null
null
USACOClassLiveTest/src/sortfile2.py
javaarchive/USACOClass2020
4ae563014b9b2da3e1361e175d38e72308a8da89
[ "MIT" ]
null
null
null
USACOClassLiveTest/src/sortfile2.py
javaarchive/USACOClass2020
4ae563014b9b2da3e1361e175d38e72308a8da89
[ "MIT" ]
null
null
null
import sys filename = sys.argv[1] outfile = sys.argv[2] lines = open(filename, "r").readlines() lines = sorted(lines, key = sortByFirstNumber) ofile = open(outfile, "w") for num in lines: ofile.write(str(num))
26
46
0.660256
import sys filename = sys.argv[1] outfile = sys.argv[2] lines = open(filename, "r").readlines() def sortByFirstNumber(line): #print(line.split(" ")) return int((line.split(" "))[0]) lines = sorted(lines, key = sortByFirstNumber) ofile = open(outfile, "w") for num in lines: ofile.write(str(num))
72
0
22
e633a0c107f41549f52e2010e6c986439a8fd72d
1,414
py
Python
tests/integration_tests/examples/test_example_05.py
zincware/ZnTrack
7767e133720a75ccb289a5b19d7960584e9dc74f
[ "Apache-2.0" ]
16
2021-12-08T15:35:22.000Z
2022-03-29T09:43:31.000Z
tests/integration_tests/examples/test_example_05.py
zincware/ZnTrack
7767e133720a75ccb289a5b19d7960584e9dc74f
[ "Apache-2.0" ]
108
2021-10-20T08:00:57.000Z
2022-03-30T14:52:30.000Z
tests/integration_tests/examples/test_example_05.py
zincware/ZnTrack
7767e133720a75ccb289a5b19d7960584e9dc74f
[ "Apache-2.0" ]
2
2021-11-18T07:41:52.000Z
2022-03-17T15:39:56.000Z
import os import shutil import numpy as np from zntrack import Node, ZnTrackProject, zn class ComputeA(Node): """Node stage A""" inp = zn.params() out = zn.outs() def test_stage_addition(tmp_path): """Check that the dvc repro works""" shutil.copy(__file__, tmp_path) os.chdir(tmp_path) ...
25.25
81
0.676803
import os import shutil import numpy as np from zntrack import Node, ZnTrackProject, zn class ComputeA(Node): """Node stage A""" inp = zn.params() out = zn.outs() def __init__(self, inp=None, **kwargs): super().__init__(**kwargs) self.inp = inp def run(self): self.out ...
110
0
54
a09b489df8345745bfdae0f9a7db5e3f9833ad8b
2,855
py
Python
django_graphene_starter/starter/types.py
ngshiheng/django-graphene-starter
81151b0dc30ed6d1d493be611e930c749044941d
[ "MIT" ]
9
2021-01-14T02:53:02.000Z
2021-12-29T21:39:37.000Z
django_graphene_starter/starter/types.py
ngshiheng/django-graphene-starter
81151b0dc30ed6d1d493be611e930c749044941d
[ "MIT" ]
20
2021-01-28T00:49:06.000Z
2022-01-14T19:04:27.000Z
django_graphene_starter/starter/types.py
ngshiheng/django-graphene-starter
81151b0dc30ed6d1d493be611e930c749044941d
[ "MIT" ]
2
2021-10-12T19:24:52.000Z
2021-12-29T21:39:53.000Z
from django.db.models.query import QuerySet from graphene import Field, Int from graphene.relay import Connection, Node from graphene_django import DjangoConnectionField, DjangoObjectType from graphene_django.filter import DjangoFilterConnectionField from graphql.execution.base import ResolveInfo from promise.promise i...
39.109589
185
0.751313
from django.db.models.query import QuerySet from graphene import Field, Int from graphene.relay import Connection, Node from graphene_django import DjangoConnectionField, DjangoObjectType from graphene_django.filter import DjangoFilterConnectionField from graphql.execution.base import ResolveInfo from promise.promise i...
702
1,601
92
e89cddba8042c5368642bc54ed311bb5f9329048
5,525
py
Python
backtester/metrics/metrics_logger.py
mhawry/auquantoolbox
f88b052d04baa81575b6886f829bca71d9425196
[ "Apache-2.0" ]
91
2020-07-31T13:57:49.000Z
2022-01-21T14:16:47.000Z
backtester/metrics/metrics_logger.py
mhawry/auquantoolbox
f88b052d04baa81575b6886f829bca71d9425196
[ "Apache-2.0" ]
3
2021-02-26T14:43:10.000Z
2022-01-12T14:58:01.000Z
backtester/metrics/metrics_logger.py
mhawry/auquantoolbox
f88b052d04baa81575b6886f829bca71d9425196
[ "Apache-2.0" ]
30
2020-07-30T13:48:00.000Z
2022-03-09T14:20:36.000Z
import numpy as np import pandas as pd from pandas.tseries.offsets import BDay from functools import partial from pandas.tseries.frequencies import to_offset from backtester.plotter import generateGraph from backtester.state_writer import StateWriter from tensorboardX import SummaryWriter from datetime import datetime ...
47.62931
154
0.788235
import numpy as np import pandas as pd from pandas.tseries.offsets import BDay from functools import partial from pandas.tseries.frequencies import to_offset from backtester.plotter import generateGraph from backtester.state_writer import StateWriter from tensorboardX import SummaryWriter from datetime import datetime ...
3,782
1,340
23
71539a53e83018e0f6ad81e8e39223cfb8fe96f8
237
py
Python
planning_system/cli/survey/__init__.py
jehboyes/planning_system
a415f1408ef344732498d2ffb111dfd187b9b50f
[ "MIT" ]
null
null
null
planning_system/cli/survey/__init__.py
jehboyes/planning_system
a415f1408ef344732498d2ffb111dfd187b9b50f
[ "MIT" ]
null
null
null
planning_system/cli/survey/__init__.py
jehboyes/planning_system
a415f1408ef344732498d2ffb111dfd187b9b50f
[ "MIT" ]
null
null
null
import click from planning_system.cli import add_subcommands @click.group() @click.pass_obj def survey(config): """ Survey - related commands. """ pass add_subcommands(survey, __file__, __package__)
13.166667
47
0.662447
import click from planning_system.cli import add_subcommands @click.group() @click.pass_obj def survey(config): """ Survey - related commands. """ pass add_subcommands(survey, __file__, __package__)
0
0
0
6e4fee9bb134392e79ded54c330867c26c238309
1,156
py
Python
bin/configlookup.py
prabhatpankaj/hipaa-cloudformation
6eb7d89aa65e619c24e21aad8ca313ba087af73d
[ "Apache-2.0" ]
6
2017-09-19T21:04:21.000Z
2020-08-11T14:23:56.000Z
bin/configlookup.py
oralhealthsolutions/hipaa-cloudformation
6eb7d89aa65e619c24e21aad8ca313ba087af73d
[ "Apache-2.0" ]
null
null
null
bin/configlookup.py
oralhealthsolutions/hipaa-cloudformation
6eb7d89aa65e619c24e21aad8ca313ba087af73d
[ "Apache-2.0" ]
7
2017-09-07T14:57:25.000Z
2021-01-18T05:29:15.000Z
#!/usr/bin/env python3 """Get the data at path from the provided file. Copyright Notice ---------------- Copyright (C) HealthTensor, Inc - All Rights Reserved Unauthorized copying of this file, via any medium is strictly prohibited Proprietary and confidential """ import sys import yaml if __name__ == '__main_...
28.195122
74
0.660035
#!/usr/bin/env python3 """Get the data at path from the provided file. Copyright Notice ---------------- Copyright (C) HealthTensor, Inc - All Rights Reserved Unauthorized copying of this file, via any medium is strictly prohibited Proprietary and confidential """ import sys import yaml def get_data_at_path(dat...
122
0
23