hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c34abec34bf7691a079a5f3bedd254cf3a0d57e
842
py
Python
main.py
AaronDewes/lnd-lnurl
8d641d9076ac2faca3244bafcd6c63e8574c1943
[ "MIT" ]
6
2021-12-05T17:29:00.000Z
2022-01-14T21:58:44.000Z
main.py
AaronDewes/lnd-lnurl
8d641d9076ac2faca3244bafcd6c63e8574c1943
[ "MIT" ]
4
2021-12-05T18:41:35.000Z
2022-02-10T12:10:00.000Z
main.py
AaronDewes/lnd-lnurl
8d641d9076ac2faca3244bafcd6c63e8574c1943
[ "MIT" ]
3
2021-12-05T17:29:52.000Z
2022-01-25T18:30:17.000Z
import argparse import sys import configparser from lndlnurl import LndLnurl config = configparser.ConfigParser() def main(): argument_parser = get_argument_parser() arguments = argument_parser.parse_args() try: with open(arguments.configfile) as f: config.read_file(f) except IOEr...
22.157895
50
0.643705
import argparse import sys import configparser from lndlnurl import LndLnurl config = configparser.ConfigParser() def main(): argument_parser = get_argument_parser() arguments = argument_parser.parse_args() try: with open(arguments.configfile) as f: config.read_file(f) except IOEr...
true
true
1c34abed7ed01b108334ab107f73a52326de0062
1,334
py
Python
src/__main__.py
gbmarc1/ExploranceAnonymizer
ff3616ef929269b5c8420266b3c32225cfa4b4a3
[ "MIT" ]
null
null
null
src/__main__.py
gbmarc1/ExploranceAnonymizer
ff3616ef929269b5c8420266b3c32225cfa4b4a3
[ "MIT" ]
null
null
null
src/__main__.py
gbmarc1/ExploranceAnonymizer
ff3616ef929269b5c8420266b3c32225cfa4b4a3
[ "MIT" ]
null
null
null
from argparse import ArgumentParser from pathlib import Path import pandas as pd import spacy from tqdm import tqdm def get_parser(): parser = ArgumentParser() parser.add_argument("--file", type=Path) return parser def replace_entities(text, ents): new_text = '' start = 0 for e in sorted(en...
25.169811
86
0.63943
from argparse import ArgumentParser from pathlib import Path import pandas as pd import spacy from tqdm import tqdm def get_parser(): parser = ArgumentParser() parser.add_argument("--file", type=Path) return parser def replace_entities(text, ents): new_text = '' start = 0 for e in sorted(en...
true
true
1c34abf6ef901b6d9bcbef4062f98bddec85587d
15,640
py
Python
scripts/slave/recipe_modules/archive/api.py
yjbanov/chromium_build
22e3872f14dbf367cd787caa638f3ac948eac7d7
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/recipe_modules/archive/api.py
yjbanov/chromium_build
22e3872f14dbf367cd787caa638f3ac948eac7d7
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/recipe_modules/archive/api.py
yjbanov/chromium_build
22e3872f14dbf367cd787caa638f3ac948eac7d7
[ "BSD-3-Clause" ]
1
2020-07-23T11:05:06.000Z
2020-07-23T11:05:06.000Z
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import re from recipe_engine import recipe_api # TODO(machenbach): Chromium specific data should move out of the archive # module, into e.g. the chromium ...
37.326969
79
0.670588
import re from recipe_engine import recipe_api EXCLUDED_FILES_ALL_PLATFORMS = [ '.landmines', '.ninja_deps', '.ninja_log', 'gen', 'obj', ] EXCLUDED_FILES = { 'win': set(EXCLUDED_FILES_ALL_PLATFORMS + [ 'cfinstaller_archive', 'installer_archive', 'lib', ]), 'mac': set(EXCLUDED_FILES_ALL_...
true
true
1c34acd2e5e79e60abec7fa52794f10ca1591c74
753
py
Python
textWindow.py
TitaniumHocker/Slip-Out
dffc5b99207ae025901284cfa1c9fefedc282e09
[ "MIT" ]
null
null
null
textWindow.py
TitaniumHocker/Slip-Out
dffc5b99207ae025901284cfa1c9fefedc282e09
[ "MIT" ]
null
null
null
textWindow.py
TitaniumHocker/Slip-Out
dffc5b99207ae025901284cfa1c9fefedc282e09
[ "MIT" ]
4
2019-05-16T22:57:20.000Z
2019-06-08T01:09:07.000Z
# -*- coding: utf-8 -*- from pygame.sprite import Sprite from pygame import Surface from pygame import image from pygame import display from pygame import SRCALPHA from pygame import Color class TextWindow(Sprite): def __init__(self, img): Sprite.__init__(self) self.surface = Surface((1280, 720),...
25.965517
53
0.645418
from pygame.sprite import Sprite from pygame import Surface from pygame import image from pygame import display from pygame import SRCALPHA from pygame import Color class TextWindow(Sprite): def __init__(self, img): Sprite.__init__(self) self.surface = Surface((1280, 720), SRCALPHA) self....
true
true
1c34acd4a569d395db08b152cb5f398552cf3fa5
1,956
py
Python
tests/functional/test_templates.py
ChrisLi0329/warehouse
0241ccb3f2974a235815b759065b0c8a9c326009
[ "Apache-2.0" ]
4
2017-12-07T17:45:12.000Z
2021-11-15T11:14:44.000Z
tests/functional/test_templates.py
ChrisLi0329/warehouse
0241ccb3f2974a235815b759065b0c8a9c326009
[ "Apache-2.0" ]
null
null
null
tests/functional/test_templates.py
ChrisLi0329/warehouse
0241ccb3f2974a235815b759065b0c8a9c326009
[ "Apache-2.0" ]
2
2017-12-07T17:45:15.000Z
2019-11-25T23:47:20.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
36.222222
77
0.665644
import os import warehouse from jinja2 import Environment, FileSystemLoader def test_templates_for_empty_titles(): dir_name = os.path.join(os.path.dirname(warehouse.__file__), 'templates') env = Environment( loader=FileSystemLoader(dir_name), extensions=[], cache_size=0, ) e...
true
true
1c34ad1a177fb2f1e3912e3283617e2717c429b1
508
py
Python
PSET6/mario_more.py
jimcs1/CS50-1
1ae26f14070718fb7d98afbb5416f97693b6ae68
[ "MIT" ]
5
2018-04-23T22:38:17.000Z
2020-09-10T20:54:30.000Z
PSET6/mario_more.py
jimcs1/CS50-1
1ae26f14070718fb7d98afbb5416f97693b6ae68
[ "MIT" ]
3
2017-02-12T13:52:30.000Z
2017-02-15T15:18:27.000Z
PSET6/mario_more.py
jimcs1/CS50-1
1ae26f14070718fb7d98afbb5416f97693b6ae68
[ "MIT" ]
11
2018-07-03T08:56:29.000Z
2022-02-02T14:23:55.000Z
#!/usr/bin/env python3 def main(): height = get_height() print__double_half_pyramid(height) def get_height(): while True: try: height = int(input("Height: ")) except ValueError: continue if 0 < height < 24: break return height def prin...
16.933333
80
0.55315
def main(): height = get_height() print__double_half_pyramid(height) def get_height(): while True: try: height = int(input("Height: ")) except ValueError: continue if 0 < height < 24: break return height def print__double_half_pyramid(...
true
true
1c34b01861f826daeba5ddd70b5dfe81126c4a1a
1,065
py
Python
python/09_queue/array_queue.py
shipan3452/algo
0494cc0d8f5daf108daf4358c4531a29279dd380
[ "Apache-2.0" ]
22,028
2018-09-27T05:55:19.000Z
2022-03-30T10:44:46.000Z
python/09_queue/array_queue.py
wangjing013/algo
b2c1228ff915287ad7ebeae4355fa26854ea1557
[ "Apache-2.0" ]
164
2018-10-06T15:11:08.000Z
2022-03-28T10:04:34.000Z
python/09_queue/array_queue.py
wangjing013/algo
b2c1228ff915287ad7ebeae4355fa26854ea1557
[ "Apache-2.0" ]
7,250
2018-09-30T00:45:25.000Z
2022-03-31T20:15:33.000Z
""" Queue based upon array 用数组实现的队列 Author: Wenru """ from typing import Optional class ArrayQueue: def __init__(self, capacity: int): self._items = [] self._capacity = capacity self._head = 0 self._tail = 0 def enqueue(self, item: str) -> bool: if se...
24.767442
78
0.514554
from typing import Optional class ArrayQueue: def __init__(self, capacity: int): self._items = [] self._capacity = capacity self._head = 0 self._tail = 0 def enqueue(self, item: str) -> bool: if self._tail == self._capacity: if self._head == 0: ...
true
true
1c34b0ec85debbe97a11b8bf53e0dd66861058ab
282
py
Python
app/errors.py
lawr3nc/artwork_prov
b6a61e586e28c3afafaa75bb4681bb723fcaaf36
[ "MIT" ]
null
null
null
app/errors.py
lawr3nc/artwork_prov
b6a61e586e28c3afafaa75bb4681bb723fcaaf36
[ "MIT" ]
null
null
null
app/errors.py
lawr3nc/artwork_prov
b6a61e586e28c3afafaa75bb4681bb723fcaaf36
[ "MIT" ]
null
null
null
from flask import render_template from app import app, db @app.errorhandler(404) def page_not_found(error): return render_template('404.html'), 404 @app.errorhandler(500) def internal_server_error(error): db.session.rollback() return render_template('500.html'), 500
21.692308
43
0.758865
from flask import render_template from app import app, db @app.errorhandler(404) def page_not_found(error): return render_template('404.html'), 404 @app.errorhandler(500) def internal_server_error(error): db.session.rollback() return render_template('500.html'), 500
true
true
1c34b0f1c3bffce28462e151e7a163199cb82efe
3,799
py
Python
route_66/model.py
Casper-Smet/turing-route-66
b797485586c3491ddbcd76367aff88b7672d8d9a
[ "MIT" ]
3
2019-12-03T09:47:02.000Z
2019-12-03T09:47:51.000Z
route_66/model.py
Casper-Smet/turing-route-66
b797485586c3491ddbcd76367aff88b7672d8d9a
[ "MIT" ]
null
null
null
route_66/model.py
Casper-Smet/turing-route-66
b797485586c3491ddbcd76367aff88b7672d8d9a
[ "MIT" ]
null
null
null
import numpy as np from mesa import Model from mesa.datacollection import DataCollector from mesa.space import SingleGrid from mesa.time import StagedActivation from route_66.agent import CarAgent, TrafficLight def get_average_velocity(model): """ Gets the total average velocity over all the agents :par...
31.139344
85
0.646486
import numpy as np from mesa import Model from mesa.datacollection import DataCollector from mesa.space import SingleGrid from mesa.time import StagedActivation from route_66.agent import CarAgent, TrafficLight def get_average_velocity(model): df = model.datacollector.get_agent_vars_dataframe() df.reset_inde...
true
true
1c34b127406f89dabe2bc19eed6d0ab68bc5c09a
25,008
py
Python
server/views_admin.py
sampsontan/virtual-clinic
5d8cbb199fb7ff1658c8d1245d8756da7d4e2d34
[ "MIT" ]
50
2019-02-04T12:33:49.000Z
2022-03-14T04:56:20.000Z
server/views_admin.py
sampsontan/virtual-clinic
5d8cbb199fb7ff1658c8d1245d8756da7d4e2d34
[ "MIT" ]
6
2020-05-23T09:34:21.000Z
2021-06-08T19:11:57.000Z
server/views_admin.py
sampsontan/virtual-clinic
5d8cbb199fb7ff1658c8d1245d8756da7d4e2d34
[ "MIT" ]
27
2018-04-04T03:16:00.000Z
2022-03-30T11:08:35.000Z
from csv import QUOTE_MINIMAL, writer import re import sqlite3 import sys from django.core.management import call_command from django.core import serializers from django.shortcuts import render,redirect from django.http import HttpResponseRedirect, HttpResponse from django.db.utils import IntegrityError from server.fo...
40.996721
191
0.636356
from csv import QUOTE_MINIMAL, writer import re import sqlite3 import sys from django.core.management import call_command from django.core import serializers from django.shortcuts import render,redirect from django.http import HttpResponseRedirect, HttpResponse from django.db.utils import IntegrityError from server.fo...
true
true
1c34b152f6690e26ed80dd650bad60f1f8282b89
3,838
py
Python
tests/test_create_wish.py
Zeebrow/wish
9a0efeb70e1646ed12cac03b2419cbeca10e3c1c
[ "MIT" ]
null
null
null
tests/test_create_wish.py
Zeebrow/wish
9a0efeb70e1646ed12cac03b2419cbeca10e3c1c
[ "MIT" ]
3
2021-09-26T11:33:24.000Z
2021-10-16T01:39:19.000Z
tests/test_create_wish.py
Zeebrow/wish
9a0efeb70e1646ed12cac03b2419cbeca10e3c1c
[ "MIT" ]
null
null
null
import unittest from random import randint import shutil from os.path import basename from os import PathLike from pathlib import Path from wishlist import Wish class TestCreateWish(unittest.TestCase): def gen_temp_wishlist(self, identifier: str): """ Generates a temporary wishlist (prj-skel d...
38
93
0.657634
import unittest from random import randint import shutil from os.path import basename from os import PathLike from pathlib import Path from wishlist import Wish class TestCreateWish(unittest.TestCase): def gen_temp_wishlist(self, identifier: str): tempdir_name = f"{identifier}_{randint(1000,9999)}_rep...
true
true
1c34b16a4fd6526b3ce139414ebb3d023c1737ec
761
py
Python
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/numtrees_100/rule_16.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/numtrees_100/rule_16.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/numtrees_100/rule_16.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
def findDecision(obj): #obj[0]: Driving_to, obj[1]: Passanger, obj[2]: Weather, obj[3]: Temperature, obj[4]: Time, obj[5]: Coupon, obj[6]: Coupon_validity, obj[7]: Gender, obj[8]: Age, obj[9]: Maritalstatus, obj[10]: Children, obj[11]: Education, obj[12]: Occupation, obj[13]: Income, obj[14]: Bar, obj[15]: Coffeehouse,...
58.538462
441
0.65703
def findDecision(obj): if obj[10]<=0: return 'True' elif obj[10]>0: if obj[7]>0: return 'False' elif obj[7]<=0: return 'True' else: return 'True' else: return 'False'
true
true
1c34b18830edf23d2222dc9e79344ee1793436e5
33,667
py
Python
sdk/python/pulumi_azure_nextgen/web/v20200901/list_web_app_auth_settings.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/web/v20200901/list_web_app_auth_settings.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/web/v20200901/list_web_app_auth_settings.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
51.715822
1,173
0.716221
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'ListWebAppAuthSettingsResult', 'AwaitableListWebAppAuthSettingsResult', 'list_web_app_auth_settings', ] @pulumi.output_type...
true
true
1c34b472a4717165764bc88060bf3b13180e200d
128
py
Python
examples/examples/urls.py
moccu/django-adminjournal
20501affd904026025841de07d4c9f12d9a64e1d
[ "MIT" ]
1
2019-11-25T23:03:14.000Z
2019-11-25T23:03:14.000Z
examples/examples/urls.py
moccu/django-adminjournal
20501affd904026025841de07d4c9f12d9a64e1d
[ "MIT" ]
2
2019-08-23T10:48:33.000Z
2021-06-10T21:03:42.000Z
examples/examples/urls.py
moccu/django-adminjournal
20501affd904026025841de07d4c9f12d9a64e1d
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import include, path urlpatterns = [ path('admin/', admin.site.urls), ]
16
37
0.71875
from django.contrib import admin from django.urls import include, path urlpatterns = [ path('admin/', admin.site.urls), ]
true
true
1c34b5c8e5475042fc481e1d8dbf825169c80fe4
23,511
py
Python
pandas/tests/scalar/timestamp/test_timestamp.py
Arghya-Banerjee/pandas
9a4fcea8de798938a434fcaf67a0aa5a46b76b5b
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2022-03-04T10:09:24.000Z
2022-03-04T10:09:24.000Z
pandas/tests/scalar/timestamp/test_timestamp.py
Arghya-Banerjee/pandas
9a4fcea8de798938a434fcaf67a0aa5a46b76b5b
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/scalar/timestamp/test_timestamp.py
Arghya-Banerjee/pandas
9a4fcea8de798938a434fcaf67a0aa5a46b76b5b
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
""" test the scalar Timestamp """ import calendar from datetime import ( datetime, timedelta, ) import locale import pickle import unicodedata from dateutil.tz import tzutc import numpy as np import pytest import pytz from pytz import ( timezone, utc, ) from pandas._libs.tslibs.timezones import ( ...
35.568835
88
0.59704
import calendar from datetime import ( datetime, timedelta, ) import locale import pickle import unicodedata from dateutil.tz import tzutc import numpy as np import pytest import pytz from pytz import ( timezone, utc, ) from pandas._libs.tslibs.timezones import ( dateutil_gettz as gettz, get_...
true
true
1c34b62e278a58f9d788040bddf7a3c887fc8d63
231
py
Python
NotIncluded/Depreciated/_Check_SystemOfEquation.py
MattArran/GEMMES
ed48ebef08fdf740ed28248c65ed7d8239ab19c4
[ "MIT" ]
4
2021-06-28T07:11:34.000Z
2022-01-11T13:43:17.000Z
NotIncluded/Depreciated/_Check_SystemOfEquation.py
DaluS/GEMMES
10d4a062004ce5b7fd26eb8c4937d940b7d097d5
[ "MIT" ]
167
2021-06-28T07:10:21.000Z
2022-03-18T17:30:40.000Z
NotIncluded/Depreciated/_Check_SystemOfEquation.py
MattArran/GEMMES
ed48ebef08fdf740ed28248c65ed7d8239ab19c4
[ "MIT" ]
3
2021-06-28T07:19:12.000Z
2022-03-03T02:44:15.000Z
# -*- coding: utf-8 -*- """ Created on Wed Jul 7 17:34:54 2021 @author: Paul Valcke """ """ FindTheRightOrderOfResolution(): FindParametersInModel(): CheckIfVariavblesArePrepared(): CheckIfParametersArePrepared(): """
14.4375
35
0.683983
true
true
1c34b6e1813f6fa08d384d75af43ab21cbe63c47
1,336
py
Python
run.py
quadraticmuffin/nd_maze
8f41d923d1839c0d6fb34c02f165b247f181743b
[ "MIT" ]
null
null
null
run.py
quadraticmuffin/nd_maze
8f41d923d1839c0d6fb34c02f165b247f181743b
[ "MIT" ]
null
null
null
run.py
quadraticmuffin/nd_maze
8f41d923d1839c0d6fb34c02f165b247f181743b
[ "MIT" ]
null
null
null
import numpy as np class NdMaze(): ''' ''' def __init__(self, nd, size, start=None): self.board = np.zeros(shape=[size]*nd) self.nd = nd self.size = size self.pos = start if start is None: self.pos = [0]*nd self.dimr = 0 self.dimc = 1 ...
25.692308
100
0.539671
import numpy as np class NdMaze(): def __init__(self, nd, size, start=None): self.board = np.zeros(shape=[size]*nd) self.nd = nd self.size = size self.pos = start if start is None: self.pos = [0]*nd self.dimr = 0 self.dimc = 1 def move(s...
true
true
1c34b7457ad8f2d9d0041328a63a00fffed3739b
53,584
py
Python
Python_Files/gw_driver.py
xyt556/HydroSAR
2142c300e4cf48065626832fdeb9c4aa472627dc
[ "MIT" ]
1
2022-03-01T08:46:46.000Z
2022-03-01T08:46:46.000Z
Python_Files/gw_driver.py
xyt556/HydroSAR
2142c300e4cf48065626832fdeb9c4aa472627dc
[ "MIT" ]
null
null
null
Python_Files/gw_driver.py
xyt556/HydroSAR
2142c300e4cf48065626832fdeb9c4aa472627dc
[ "MIT" ]
null
null
null
# Author: Sayantan Majumdar # Email: smxnv@mst.edu import pandas as pd from Python_Files.hydrolibs import rasterops as rops from Python_Files.hydrolibs import vectorops as vops from Python_Files.hydrolibs import data_download as dd from Python_Files.hydrolibs.sysops import makedirs, make_proper_dir_name, copy_files fr...
58.180239
120
0.659675
import pandas as pd from Python_Files.hydrolibs import rasterops as rops from Python_Files.hydrolibs import vectorops as vops from Python_Files.hydrolibs import data_download as dd from Python_Files.hydrolibs.sysops import makedirs, make_proper_dir_name, copy_files from Python_Files.hydrolibs import random_forest_regr...
true
true
1c34b8088b642cdd20af9135beb848737bb80eec
3,217
py
Python
src/programy/parser/template/nodes/condtype2.py
hiitsme123/python
e08309fe61fd5ed88cfb39e9f402613dd7e39269
[ "MIT" ]
5
2017-02-03T07:38:45.000Z
2022-01-06T11:29:29.000Z
src/programy/parser/template/nodes/condtype2.py
hiitsme123/python
e08309fe61fd5ed88cfb39e9f402613dd7e39269
[ "MIT" ]
8
2017-02-03T06:59:03.000Z
2017-04-28T14:23:46.000Z
src/programy/parser/template/nodes/condtype2.py
hiitsme123/python
e08309fe61fd5ed88cfb39e9f402613dd7e39269
[ "MIT" ]
8
2017-02-02T15:12:12.000Z
2017-04-02T13:35:03.000Z
""" Copyright (c) 2016 Keith Sterling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute,...
41.779221
126
0.639105
import logging from programy.parser.template.nodes.condchild import TemplateConditionNodeWithChildren class TemplateType2ConditionNode(TemplateConditionNodeWithChildren): def __init__(self, name, local=False): TemplateConditionNodeWithChildren.__init__(self) self.name = name self.local ...
true
true
1c34b80edbdc2a9c8bfd0ca9cd1d5e6a6c0a2f82
850
py
Python
prog/process_drug.py
clussier/DeepCDR
011f155c0ffb1abf61ae403bf3b9247398676ac7
[ "MIT" ]
45
2020-02-23T20:49:45.000Z
2022-03-09T09:19:31.000Z
prog/process_drug.py
clussier/DeepCDR
011f155c0ffb1abf61ae403bf3b9247398676ac7
[ "MIT" ]
null
null
null
prog/process_drug.py
clussier/DeepCDR
011f155c0ffb1abf61ae403bf3b9247398676ac7
[ "MIT" ]
11
2020-07-15T15:39:46.000Z
2022-01-28T19:16:43.000Z
#get drug features using Deepchem library import os import deepchem as dc from rdkit import Chem import numpy as np import hickle as hkl drug_smiles_file='../data/223drugs_pubchem_smiles.txt' save_dir='../data/GDSC/drug_graph_feat' pubchemid2smile = {item.split('\t')[0]:item.split('\t')[1].strip() for item in open(dr...
28.333333
114
0.768235
import os import deepchem as dc from rdkit import Chem import numpy as np import hickle as hkl drug_smiles_file='../data/223drugs_pubchem_smiles.txt' save_dir='../data/GDSC/drug_graph_feat' pubchemid2smile = {item.split('\t')[0]:item.split('\t')[1].strip() for item in open(drug_smiles_file).readlines()} if not os.pat...
true
true
1c34b840812f9fa777c8737d8869531bef0599d6
19,134
py
Python
test/functional/dip3-deterministicmns.py
lokalnode/LokalCoin
55572130202013aef57d310bdf8b1f0700ec2168
[ "MIT" ]
null
null
null
test/functional/dip3-deterministicmns.py
lokalnode/LokalCoin
55572130202013aef57d310bdf8b1f0700ec2168
[ "MIT" ]
null
null
null
test/functional/dip3-deterministicmns.py
lokalnode/LokalCoin
55572130202013aef57d310bdf8b1f0700ec2168
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2020 The Dash Core developers # Copyright (c) 2021 The Lokal Coin developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test deterministic masternodes # import sys from test_fr...
42.425721
199
0.621616
import sys from test_framework.blocktools import create_block, create_coinbase, get_masternode_payment from test_framework.mininode import CTransaction, ToHex, FromHex, CTxOut, COIN, CCbTx from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * class Masternode(object): p...
true
true
1c34b930ea02d98164f851ca88de83a3ba581616
4,415
py
Python
spotify_dl/spotify_dl.py
Harsh14901/spotify-dl
368bc4c842e496fa468160d5422add87c359f19d
[ "MIT" ]
null
null
null
spotify_dl/spotify_dl.py
Harsh14901/spotify-dl
368bc4c842e496fa468160d5422add87c359f19d
[ "MIT" ]
null
null
null
spotify_dl/spotify_dl.py
Harsh14901/spotify-dl
368bc4c842e496fa468160d5422add87c359f19d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import argparse from itertools import product import json import os import sys from logging import DEBUG from pathlib import Path, PurePath import spotipy from spotipy.oauth2 import SpotifyClientCredentials from constants import VERSION from models import db, Song from scaffold import log, chec...
36.791667
147
0.63171
import argparse from itertools import product import json import os import sys from logging import DEBUG from pathlib import Path, PurePath import spotipy from spotipy.oauth2 import SpotifyClientCredentials from constants import VERSION from models import db, Song from scaffold import log, check_for_tokens from spoti...
true
true
1c34ba5fd330238a1f0935eb0fc70d42440fb0ff
15,773
py
Python
rpython/memory/gctransform/shadowstack.py
m4sterchain/mesapy
ed546d59a21b36feb93e2309d5c6b75aa0ad95c9
[ "Apache-2.0", "OpenSSL" ]
381
2018-08-18T03:37:22.000Z
2022-02-06T23:57:36.000Z
rpython/memory/gctransform/shadowstack.py
m4sterchain/mesapy
ed546d59a21b36feb93e2309d5c6b75aa0ad95c9
[ "Apache-2.0", "OpenSSL" ]
16
2018-09-22T18:12:47.000Z
2022-02-22T20:03:59.000Z
rpython/memory/gctransform/shadowstack.py
m4sterchain/mesapy
ed546d59a21b36feb93e2309d5c6b75aa0ad95c9
[ "Apache-2.0", "OpenSSL" ]
30
2018-08-20T03:16:34.000Z
2022-01-12T17:39:22.000Z
from rpython.annotator import model as annmodel from rpython.rtyper.llannotation import SomePtr from rpython.rlib.debug import ll_assert from rpython.rlib.nonconst import NonConstant from rpython.rlib import rgc from rpython.rlib.objectmodel import specialize from rpython.rtyper import rmodel from rpython.rtyper.annlow...
41.949468
79
0.623153
from rpython.annotator import model as annmodel from rpython.rtyper.llannotation import SomePtr from rpython.rlib.debug import ll_assert from rpython.rlib.nonconst import NonConstant from rpython.rlib import rgc from rpython.rlib.objectmodel import specialize from rpython.rtyper import rmodel from rpython.rtyper.annlow...
true
true
1c34bb5490445702128bd5163553e4461749611f
774
py
Python
Python/7/RowWeights/test_row_weight.py
hwakabh/codewars
7afce5a7424d35abc55c350301ac134f2d3edd3d
[ "MIT" ]
null
null
null
Python/7/RowWeights/test_row_weight.py
hwakabh/codewars
7afce5a7424d35abc55c350301ac134f2d3edd3d
[ "MIT" ]
6
2020-02-21T17:01:59.000Z
2021-05-04T07:04:41.000Z
Python/7/RowWeights/test_row_weight.py
hwakabh/codewars
7afce5a7424d35abc55c350301ac134f2d3edd3d
[ "MIT" ]
null
null
null
from unittest import TestCase from unittest import main from row_weights import row_weights class TestRowWeights(TestCase): def test_row_weights(self): test_patterns = [ ([80], (80,0)), ([100,50], (100,50)), ([50,60,70,80], (120,140)), ([13,27,49], (62,27))...
27.642857
61
0.494832
from unittest import TestCase from unittest import main from row_weights import row_weights class TestRowWeights(TestCase): def test_row_weights(self): test_patterns = [ ([80], (80,0)), ([100,50], (100,50)), ([50,60,70,80], (120,140)), ([13,27,49], (62,27))...
true
true
1c34bc22a433fc208d0e12b536b1c70a65be1446
2,802
py
Python
anti_sybil/tests/test2.2.py
abramsymons/BrightID-AntiSybil
86161afe654f46475944ebdb3b5453a1723180d9
[ "ISC" ]
null
null
null
anti_sybil/tests/test2.2.py
abramsymons/BrightID-AntiSybil
86161afe654f46475944ebdb3b5453a1723180d9
[ "ISC" ]
null
null
null
anti_sybil/tests/test2.2.py
abramsymons/BrightID-AntiSybil
86161afe654f46475944ebdb3b5453a1723180d9
[ "ISC" ]
1
2020-03-28T05:05:19.000Z
2020-03-28T05:05:19.000Z
# Test if GroupSybilRank works better than SybilRank import sys sys.path.append('..') import os import copy import algorithms import graphs from utils import * OUTPUT_FOLDER = './outputs/tests2.2/' main_graph_params = { 'num_seed_groups': 0, 'max_known_ratio': 1, 'avg_known_ratio': .5, 'min_known_rat...
35.025
131
0.785867
import sys sys.path.append('..') import os import copy import algorithms import graphs from utils import * OUTPUT_FOLDER = './outputs/tests2.2/' main_graph_params = { 'num_seed_groups': 0, 'max_known_ratio': 1, 'avg_known_ratio': .5, 'min_known_ratio': .2, 'num_attacker_to_num_honest': .1, 'n...
true
true
1c34bd37fbb2b9caffb2adb5ac2f06077b9b84ba
152
py
Python
authlib/repo/provider/sqlite/__init__.py
jmrafael/Streamlit-Authentication
208e9d8f116d25d420f41b6d01c13f063052805b
[ "MIT" ]
25
2021-08-25T12:51:14.000Z
2022-03-29T22:56:21.000Z
authlib/repo/provider/sqlite/__init__.py
jmrafael/Streamlit-Authentication
208e9d8f116d25d420f41b6d01c13f063052805b
[ "MIT" ]
6
2021-09-09T23:09:51.000Z
2022-03-11T11:11:23.000Z
authlib/repo/provider/sqlite/__init__.py
jmrafael/Streamlit-Authentication
208e9d8f116d25d420f41b6d01c13f063052805b
[ "MIT" ]
7
2021-09-04T08:06:21.000Z
2022-03-07T23:40:02.000Z
from .. import base_provider, const, trace_activity, AppError, DatabaseError from .. import tnow_iso , tnow_iso_str, dt_from_str, dt_from_ts, dt_to_str
50.666667
76
0.809211
from .. import base_provider, const, trace_activity, AppError, DatabaseError from .. import tnow_iso , tnow_iso_str, dt_from_str, dt_from_ts, dt_to_str
true
true
1c34be80c60fd18a9c5653a8384deddadaa3addd
9,704
py
Python
docs/conf.py
anosillus/cookiecutter-poetry
11b2e238e0c2c61d0a7cc6e199787b1bd7e2f413
[ "MIT" ]
6
2021-01-07T15:39:49.000Z
2022-03-25T10:06:45.000Z
docs/conf.py
anosillus/cookiecutter-poetry
11b2e238e0c2c61d0a7cc6e199787b1bd7e2f413
[ "MIT" ]
16
2020-02-24T11:42:21.000Z
2021-08-31T14:22:21.000Z
docs/conf.py
anosillus/cookiecutter-poetry
11b2e238e0c2c61d0a7cc6e199787b1bd7e2f413
[ "MIT" ]
14
2020-05-17T15:59:01.000Z
2022-03-12T03:19:17.000Z
#!/usr/bin/env python3 # # cookiecutter-poetry documentation build configuration file, created by # sphinx-quickstart on Sun Dec 13 09:13:01 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated ...
32.13245
79
0.701979
import re from datetime import date extensions = [ "sphinx.ext.autodoc", "sphinx.ext.doctest", "sphinx.ext.todo", "sphinx.ext.coverage", "sphinx.ext.viewcode", ] templates_path = ["_templates"] source_suffix = ".rst" master_doc = "index" project = "cookiecutter-poetry" copyright = f"2019 {...
true
true
1c34bea001d0ca24b933ea842753d3ca852efb64
1,555
py
Python
main_app/urls.py
ncbentley/capstone
bbaa441f362f9ca203435724d07616dd4a43ab94
[ "PostgreSQL", "MIT" ]
null
null
null
main_app/urls.py
ncbentley/capstone
bbaa441f362f9ca203435724d07616dd4a43ab94
[ "PostgreSQL", "MIT" ]
7
2021-04-08T21:25:57.000Z
2022-03-12T00:42:19.000Z
main_app/urls.py
ncbentley/capstone
bbaa441f362f9ca203435724d07616dd4a43ab94
[ "PostgreSQL", "MIT" ]
null
null
null
from django.urls import path from . import views from django.contrib.staticfiles.storage import staticfiles_storage from django.views.generic.base import RedirectView urlpatterns = [ path('', views.home, name="home"), path('login/', views.login, name="login"), path('signup/', views.signup, name="signup"), ...
62.2
123
0.700965
from django.urls import path from . import views from django.contrib.staticfiles.storage import staticfiles_storage from django.views.generic.base import RedirectView urlpatterns = [ path('', views.home, name="home"), path('login/', views.login, name="login"), path('signup/', views.signup, name="signup"), ...
true
true
1c34bf3427f420a40915d8c91ffc86d15b8ccb54
6,077
py
Python
tarot_juicer/settings.py
abubakarA-Dot/tarot_juicer
dbc68f73d6ae3d73f50f4472a063b5363febc7b8
[ "MIT" ]
4
2020-02-27T00:11:01.000Z
2020-05-11T07:59:55.000Z
tarot_juicer/settings.py
abubakarA-Dot/tarot_juicer
dbc68f73d6ae3d73f50f4472a063b5363febc7b8
[ "MIT" ]
16
2019-12-20T06:57:54.000Z
2020-05-19T01:00:18.000Z
tarot_juicer/settings.py
abubakarA-Dot/tarot_juicer
dbc68f73d6ae3d73f50f4472a063b5363febc7b8
[ "MIT" ]
10
2019-12-25T23:38:33.000Z
2020-05-11T14:15:15.000Z
""" Django settings for tarot_juicer project. Generated by 'django-admin startproject' using Django 2.2.7. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ from dj...
30.847716
103
0.720421
from django.contrib.messages import constants as messages import os import django_heroku from decouple import config import dj_database_url from dotenv import load_dotenv from . import notification load_dotenv() BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DEFAULT_AUTO_FIELD='django.db.mode...
true
true
1c34c2de6d64e8d4f28b0beeb9cb750fec80460d
15,433
py
Python
2D/convert_raw_to_hdf5.py
basharbme/unet
32aba391c280a6d4f371d0bb19c2f60f6945da6d
[ "Apache-2.0" ]
1
2019-09-08T01:48:17.000Z
2019-09-08T01:48:17.000Z
2D/convert_raw_to_hdf5.py
motazsaad/unet
85117087c1cb73c81a8eea4e127fae7cb47b4fe1
[ "Apache-2.0" ]
null
null
null
2D/convert_raw_to_hdf5.py
motazsaad/unet
85117087c1cb73c81a8eea4e127fae7cb47b4fe1
[ "Apache-2.0" ]
2
2021-03-04T05:41:34.000Z
2021-08-25T00:25:29.000Z
#!/usr/bin/env python # # -*- coding: utf-8 -*- # # 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-2.0 # # ...
30.379921
80
0.671872
import os import nibabel as nib import numpy as np from tqdm import tqdm import h5py import json import argparse parser = argparse.ArgumentParser( description="Convert Decathlon raw Nifti data " "(http://medicaldecathlon.com) " "files to Numpy data files", add_help=True, formatter_class=argparse.ArgumentDefa...
true
true
1c34c4ccf9a41d12264f4a5d14ae65648867b3b4
5,589
py
Python
exercises/adaboost_scenario.py
anatfl/IML.HUJI
b4a01e04fff4181837780cc603446fd73defd349
[ "MIT" ]
null
null
null
exercises/adaboost_scenario.py
anatfl/IML.HUJI
b4a01e04fff4181837780cc603446fd73defd349
[ "MIT" ]
null
null
null
exercises/adaboost_scenario.py
anatfl/IML.HUJI
b4a01e04fff4181837780cc603446fd73defd349
[ "MIT" ]
null
null
null
import numpy as np from typing import Tuple from IMLearn.metalearners.adaboost import AdaBoost from IMLearn.learners.classifiers.decision_stump import DecisionStump from utils import * import plotly.graph_objects as go from plotly.subplots import make_subplots from IMLearn.metrics import accuracy def generate_data(n:...
39.359155
79
0.573985
import numpy as np from typing import Tuple from IMLearn.metalearners.adaboost import AdaBoost from IMLearn.learners.classifiers.decision_stump import DecisionStump from utils import * import plotly.graph_objects as go from plotly.subplots import make_subplots from IMLearn.metrics import accuracy def generate_data(n:...
true
true
1c34c5350cb8380f5333eb172ccfc98c80642e43
37,617
py
Python
networkx/classes/multidigraph.py
theaverageguy/networkx
b2b74b3ba028ef3788f796aa64b037c8ea446539
[ "BSD-3-Clause" ]
null
null
null
networkx/classes/multidigraph.py
theaverageguy/networkx
b2b74b3ba028ef3788f796aa64b037c8ea446539
[ "BSD-3-Clause" ]
null
null
null
networkx/classes/multidigraph.py
theaverageguy/networkx
b2b74b3ba028ef3788f796aa64b037c8ea446539
[ "BSD-3-Clause" ]
1
2020-09-11T06:41:14.000Z
2020-09-11T06:41:14.000Z
"""Base class for MultiDiGraph.""" # Copyright (C) 2004-2016 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. from copy import deepcopy import networkx as nx from networkx.classes.graph import Graph # for doc...
36.170192
90
0.554962
from copy import deepcopy import networkx as nx from networkx.classes.graph import Graph from networkx.classes.digraph import DiGraph from networkx.classes.multigraph import MultiGraph from networkx.exception import NetworkXError __author__ = """\n""".join(['Aric Hagberg (hagberg@lanl.gov)', ...
true
true
1c34c5bb98d299ddc609b34b925032366d6cf4dc
2,290
py
Python
ImageToAsciiApp/FileBrowser.py
MahirHamiAbrar/ImageToAsciiGui
1a8dd3e0d8ff6bd6617085072e7afd3456495344
[ "MIT" ]
null
null
null
ImageToAsciiApp/FileBrowser.py
MahirHamiAbrar/ImageToAsciiGui
1a8dd3e0d8ff6bd6617085072e7afd3456495344
[ "MIT" ]
null
null
null
ImageToAsciiApp/FileBrowser.py
MahirHamiAbrar/ImageToAsciiGui
1a8dd3e0d8ff6bd6617085072e7afd3456495344
[ "MIT" ]
null
null
null
from PyQt5.QtWidgets import * # image filters IMAGE_FILTERS = "JPG (*.jpg);;PNG (*.png);;JPEG (*.jpeg);;BPM (*.bmp);;CUR (*.cur);;GIF(*.gif);;Icons (*.ico);;PBM (" \ "*.pbm);;PGM (*.pgm);;PPM (*.ppm);;SVG (*.svg);;SVGZ (*.svgz);;TGA (*.tga);;TIF (*.tif);;TIFF (" \ "*.tiff);;WBMP (*...
41.636364
120
0.665502
from PyQt5.QtWidgets import * IMAGE_FILTERS = "JPG (*.jpg);;PNG (*.png);;JPEG (*.jpeg);;BPM (*.bmp);;CUR (*.cur);;GIF(*.gif);;Icons (*.ico);;PBM (" \ "*.pbm);;PGM (*.pgm);;PPM (*.ppm);;SVG (*.svg);;SVGZ (*.svgz);;TGA (*.tga);;TIF (*.tif);;TIFF (" \ "*.tiff);;WBMP (*.wbmp);;WEBP (*.w...
true
true
1c34c5be33658e4821abcaee6fc9cbc907dce4bb
506
py
Python
tests/multisig/test_wallet.py
forest-friends/vyper-common-contracts
c541634e3d0752801ed06b8cf6dc0a7c59555fdd
[ "MIT" ]
null
null
null
tests/multisig/test_wallet.py
forest-friends/vyper-common-contracts
c541634e3d0752801ed06b8cf6dc0a7c59555fdd
[ "MIT" ]
null
null
null
tests/multisig/test_wallet.py
forest-friends/vyper-common-contracts
c541634e3d0752801ed06b8cf6dc0a7c59555fdd
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import brownie import pytest from brownie.test import given, strategy def test_(ZERO_ADDRESS, multisig_wallet, erc20_token, neo, morpheus, trinity): erc20_token.transfer(multisig_wallet, 1_000, {'from': neo}) assert multisig_wallet.isSigner(neo, {'from': neo}) == True assert multisig_...
31.625
78
0.741107
import brownie import pytest from brownie.test import given, strategy def test_(ZERO_ADDRESS, multisig_wallet, erc20_token, neo, morpheus, trinity): erc20_token.transfer(multisig_wallet, 1_000, {'from': neo}) assert multisig_wallet.isSigner(neo, {'from': neo}) == True assert multisig_wallet.isSigner(mor...
true
true
1c34c672d99fd61ea3c34930f451006d82e22ba4
9,007
py
Python
sdk/eventhub/azure-eventhubs/tests/test_send.py
kushan2018/azure-sdk-for-python
08a9296207281f4e90e23cf7a30173863accc867
[ "MIT" ]
null
null
null
sdk/eventhub/azure-eventhubs/tests/test_send.py
kushan2018/azure-sdk-for-python
08a9296207281f4e90e23cf7a30173863accc867
[ "MIT" ]
1
2020-03-06T05:57:16.000Z
2020-03-06T05:57:16.000Z
sdk/eventhub/azure-eventhubs/tests/test_send.py
kushan2018/azure-sdk-for-python
08a9296207281f4e90e23cf7a30173863accc867
[ "MIT" ]
null
null
null
# -- coding: utf-8 -- #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-----------------------------------------------------------------...
33.483271
137
0.684135
import pytest import time import json import sys from azure.eventhub import EventData, EventHubClient, TransportType @pytest.mark.liveTest def test_send_with_partition_key(connstr_receivers): connection_str, receivers = connstr_receivers client = EventHubClient.from_connection_string(connection_str, network...
true
true
1c34c748d1c78ea2bed204132d183f09310b1607
2,501
py
Python
cms/plugins/text/managers.py
LUKKIEN/django-cms-2.0
0600cc1a3f3636a867faf0afe3719539fee36d69
[ "BSD-3-Clause" ]
1
2015-09-24T00:36:34.000Z
2015-09-24T00:36:34.000Z
cms/plugins/text/managers.py
alamierda09/django-cms-2.0
0aba7f465730ae9a975ea6fd0bf5cac1ba70022c
[ "BSD-3-Clause" ]
null
null
null
cms/plugins/text/managers.py
alamierda09/django-cms-2.0
0aba7f465730ae9a975ea6fd0bf5cac1ba70022c
[ "BSD-3-Clause" ]
null
null
null
from django.db import models from cms import settings class ContentManager(models.Manager): def sanitize(self, content): """ Sanitize the content to avoid XSS and so """ import html5lib from html5lib import sanitizer p = html5lib.HTMLParser(tokenizer=sanitizer.HTMLS...
36.779412
84
0.582167
from django.db import models from cms import settings class ContentManager(models.Manager): def sanitize(self, content): import html5lib from html5lib import sanitizer p = html5lib.HTMLParser(tokenizer=sanitizer.HTMLSanitizer) return p.parse(content).toxml()[19:-14] de...
true
true
1c34c7a45b0d20451d4f4140a98ded921a574d17
6,553
py
Python
toontown/safezone/Train.py
TopDeveloper-333/opentoontownsrc
b2d956d1a40f5e3d40fa33a9f01862137e018347
[ "BSD-3-Clause" ]
null
null
null
toontown/safezone/Train.py
TopDeveloper-333/opentoontownsrc
b2d956d1a40f5e3d40fa33a9f01862137e018347
[ "BSD-3-Clause" ]
null
null
null
toontown/safezone/Train.py
TopDeveloper-333/opentoontownsrc
b2d956d1a40f5e3d40fa33a9f01862137e018347
[ "BSD-3-Clause" ]
null
null
null
from pandac.PandaModules import * from direct.showbase.DirectObject import DirectObject from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import globalClockDelta from direct.distributed.ClockDelta import NetworkTimePrecision import random from direct.task.Task import Task from direct.direc...
40.202454
351
0.653746
from pandac.PandaModules import * from direct.showbase.DirectObject import DirectObject from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import globalClockDelta from direct.distributed.ClockDelta import NetworkTimePrecision import random from direct.task.Task import Task from direct.direc...
true
true
1c34c92caf91c8570e69cf420d1b129bb655d0c2
3,026
py
Python
meiduo_mall/apps/users/migrations/0001_initial.py
liusudo123/meiduo_project
3bf92fff56bf47777795cf9078ff285eb004b81f
[ "MIT" ]
null
null
null
meiduo_mall/apps/users/migrations/0001_initial.py
liusudo123/meiduo_project
3bf92fff56bf47777795cf9078ff285eb004b81f
[ "MIT" ]
null
null
null
meiduo_mall/apps/users/migrations/0001_initial.py
liusudo123/meiduo_project
3bf92fff56bf47777795cf9078ff285eb004b81f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2019-09-14 13:02 from __future__ import unicode_literals import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True ...
63.041667
329
0.66226
from __future__ import unicode_literals import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0008_alter_user_username_max_length'...
true
true
1c34c9b865395cd62782cc35121c5f483620250d
3,628
py
Python
Chapters/05.OptimalTransport/color_transfer.py
MichielStock/SelectedTopicsOptimization
20f6b37566d23cdde0ac6b765ffcc5ed72a11172
[ "MIT" ]
22
2017-03-21T14:01:10.000Z
2022-03-02T18:51:40.000Z
Chapters/05.OptimalTransport/color_transfer.py
ntienvu/SelectedTopicsOptimization
069659ca9754cc7fd884b654a06157cc7da6f963
[ "MIT" ]
2
2018-03-22T09:54:01.000Z
2018-05-30T16:16:53.000Z
Chapters/05.OptimalTransport/color_transfer.py
ntienvu/SelectedTopicsOptimization
069659ca9754cc7fd884b654a06157cc7da6f963
[ "MIT" ]
18
2018-01-21T15:23:51.000Z
2022-02-05T20:12:03.000Z
""" Created on Sunday 28 January 2018 Last update: Sunday 11 March 2018 @author: Michiel Stock michielfmstock@gmail.com Module for transfering the color between two images """ from optimal_transport import compute_optimal_transport import numpy as np from skimage import io from sklearn.cluster import MiniBatchKMeans...
32.392857
80
0.681367
from optimal_transport import compute_optimal_transport import numpy as np from skimage import io from sklearn.cluster import MiniBatchKMeans as KMeans from sklearn.preprocessing import StandardScaler from collections import Counter from sklearn.metrics.pairwise import pairwise_distances import matplotlib.pyplot as pl...
true
true
1c34c9fa5fe1b95f7e9cd0f18647a64aab0822d1
5,032
py
Python
python/language_pairs.py
Software-Engineering-Group-4-Maamy/chat-bot
bd3635324367a8edb72c73eba35d08231f440a50
[ "MIT" ]
1
2022-02-26T23:25:11.000Z
2022-02-26T23:25:11.000Z
python/language_pairs.py
Software-Engineering-Group-4-Maamy/chat-bot
bd3635324367a8edb72c73eba35d08231f440a50
[ "MIT" ]
2
2022-02-25T21:29:40.000Z
2022-02-26T20:07:02.000Z
python/language_pairs.py
Software-Engineering-Group-4-Maamy/chat-bot
bd3635324367a8edb72c73eba35d08231f440a50
[ "MIT" ]
2
2022-02-11T21:05:26.000Z
2022-03-03T00:27:03.000Z
"""All the input and responses that the chatbot can receive and give""" pairs = [ [ r"my name is (.*)|my name|(.*) my name|my name (.*)", ["Hello, how are you feeling today?", ] ], [ r"i am a bit concern about this recent stock market fiasco|concerned stock market|(.*) conce...
36.729927
147
0.534181
pairs = [ [ r"my name is (.*)|my name|(.*) my name|my name (.*)", ["Hello, how are you feeling today?", ] ], [ r"i am a bit concern about this recent stock market fiasco|concerned stock market|(.*) concerned stock market|concerned stock market (.*)", ["Do not be alar...
true
true
1c34ca8e9b8d28b4024fe490f6d49900ca62b44a
1,875
py
Python
2021/day4.py
omad/adventofcode
685be8f6c12f192093654a6f822ed535a7687314
[ "Apache-2.0" ]
null
null
null
2021/day4.py
omad/adventofcode
685be8f6c12f192093654a6f822ed535a7687314
[ "Apache-2.0" ]
null
null
null
2021/day4.py
omad/adventofcode
685be8f6c12f192093654a6f822ed535a7687314
[ "Apache-2.0" ]
null
null
null
data = """\ 7,4,9,5,11,17,23,2,0,14,21,24,10,16,13,6,15,25,12,22,18,20,8,19,3,26,1 22 13 17 11 0 8 2 23 4 24 21 9 14 16 7 6 10 3 18 5 1 12 20 15 19 3 15 0 2 22 9 18 13 17 5 19 8 7 25 23 20 11 10 24 4 14 21 16 12 6 14 21 17 24 4 10 16 15 9 19 18 8 23 26 20 22 11 13 6 5 2 0 12 3 7 """ fr...
22.865854
70
0.532267
data = """\ 7,4,9,5,11,17,23,2,0,14,21,24,10,16,13,6,15,25,12,22,18,20,8,19,3,26,1 22 13 17 11 0 8 2 23 4 24 21 9 14 16 7 6 10 3 18 5 1 12 20 15 19 3 15 0 2 22 9 18 13 17 5 19 8 7 25 23 20 11 10 24 4 14 21 16 12 6 14 21 17 24 4 10 16 15 9 19 18 8 23 26 20 22 11 13 6 5 2 0 12 3 7 """ fr...
true
true
1c34cb237ef74e7ad54998c960c93a7fdffe5213
464
py
Python
examples/datasets/plot_mauna_loa.py
ltiao/scribbles
9f30ea92ee348154568a7791751634d1feaba774
[ "MIT" ]
1
2020-03-01T04:36:36.000Z
2020-03-01T04:36:36.000Z
examples/datasets/plot_mauna_loa.py
ltiao/scribbles
9f30ea92ee348154568a7791751634d1feaba774
[ "MIT" ]
3
2020-01-02T19:09:40.000Z
2020-01-02T19:11:02.000Z
examples/datasets/plot_mauna_loa.py
ltiao/scribbles
9f30ea92ee348154568a7791751634d1feaba774
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Mauna Loa Atmospheric Carbon Dioxide ==================================== Hello world """ # sphinx_gallery_thumbnail_number = 1 import seaborn as sns from scribbles.datasets import mauna_loa_load_dataframe # %% data = mauna_loa_load_dataframe(base_dir="../../datasets") g = sns.relplot(...
22.095238
59
0.62931
import seaborn as sns from scribbles.datasets import mauna_loa_load_dataframe data = mauna_loa_load_dataframe(base_dir="../../datasets") g = sns.relplot(x='date', y='average', kind="line", data=data, height=5, aspect=1.5, alpha=0.8) g.set_ylabels(r"average $\mathrm{CO}_2$ (ppm)")
true
true
1c34cb446d62086842a777d8d83eb336a2392db7
8,795
py
Python
src/models/semseg.py
hrdipto/COVID19-L3-Net
7450defa1276da8684caadb1631bd6850efb51cb
[ "Apache-2.0" ]
38
2020-05-12T21:26:45.000Z
2022-03-18T02:36:28.000Z
src/models/semseg.py
UBC-CIC/vgh-covid-19-ct-model
3ae2bba16c2ab0d96650e790dc2e6b896c377183
[ "Apache-2.0" ]
5
2020-05-14T07:45:14.000Z
2021-09-04T20:43:26.000Z
src/models/semseg.py
UBC-CIC/vgh-covid-19-ct-model
3ae2bba16c2ab0d96650e790dc2e6b896c377183
[ "Apache-2.0" ]
9
2020-05-14T12:02:03.000Z
2021-06-25T21:21:59.000Z
import torch import torch.nn.functional as F import torchvision from torchvision import transforms import os import tqdm import pylab as plt import numpy as np import scipy.sparse as sps from collections.abc import Sequence import time from src import utils as ut from sklearn.metrics import confusion_matrix import skim...
34.490196
101
0.579648
import torch import torch.nn.functional as F import torchvision from torchvision import transforms import os import tqdm import pylab as plt import numpy as np import scipy.sparse as sps from collections.abc import Sequence import time from src import utils as ut from sklearn.metrics import confusion_matrix import skim...
true
true
1c34cb8e2bd8167a9cdbac34f2eaaeef897cbeb7
388
py
Python
toontown/town/TTStreet.py
TheFamiliarScoot/open-toontown
678313033174ea7d08e5c2823bd7b473701ff547
[ "BSD-3-Clause" ]
99
2019-11-02T22:25:00.000Z
2022-02-03T03:48:00.000Z
toontown/town/TTStreet.py
TheFamiliarScoot/open-toontown
678313033174ea7d08e5c2823bd7b473701ff547
[ "BSD-3-Clause" ]
42
2019-11-03T05:31:08.000Z
2022-03-16T22:50:32.000Z
toontown/town/TTStreet.py
TheFamiliarScoot/open-toontown
678313033174ea7d08e5c2823bd7b473701ff547
[ "BSD-3-Clause" ]
57
2019-11-03T07:47:37.000Z
2022-03-22T00:41:49.000Z
from . import Street class TTStreet(Street.Street): def __init__(self, loader, parentFSM, doneEvent): Street.Street.__init__(self, loader, parentFSM, doneEvent) def load(self): Street.Street.load(self) def unload(self): Street.Street.unload(self) def doRequestLeave(self, req...
24.25
66
0.680412
from . import Street class TTStreet(Street.Street): def __init__(self, loader, parentFSM, doneEvent): Street.Street.__init__(self, loader, parentFSM, doneEvent) def load(self): Street.Street.load(self) def unload(self): Street.Street.unload(self) def doRequestLeave(self, req...
true
true
1c34cc223bf419de2c83c0b3f2d4778cddf99416
15,003
py
Python
lib/sqlalchemy/orm/base.py
lelit/sqlalchemy
55f930ef3d4e60bed02a2dad16e331fe42cfd12b
[ "MIT" ]
null
null
null
lib/sqlalchemy/orm/base.py
lelit/sqlalchemy
55f930ef3d4e60bed02a2dad16e331fe42cfd12b
[ "MIT" ]
null
null
null
lib/sqlalchemy/orm/base.py
lelit/sqlalchemy
55f930ef3d4e60bed02a2dad16e331fe42cfd12b
[ "MIT" ]
null
null
null
# orm/base.py # Copyright (C) 2005-2019 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Constants and rudimental functions used throughout the ORM. """ import operator fr...
26.274956
79
0.680264
import operator from . import exc from .. import exc as sa_exc from .. import inspection from .. import util from ..sql import expression PASSIVE_NO_RESULT = util.symbol( "PASSIVE_NO_RESULT", """Symbol returned by a loader callable or other attribute/history retrieval operation when a value could not b...
true
true
1c34ceeb7a442ca69c61d8058ac79407b2094fbd
2,951
py
Python
.travis-pre-run.py
PaulGregor/evelink
dc1ca05725bf81c7f066cf4abcb51ab503759aaa
[ "MIT" ]
null
null
null
.travis-pre-run.py
PaulGregor/evelink
dc1ca05725bf81c7f066cf4abcb51ab503759aaa
[ "MIT" ]
null
null
null
.travis-pre-run.py
PaulGregor/evelink
dc1ca05725bf81c7f066cf4abcb51ab503759aaa
[ "MIT" ]
1
2019-12-11T10:31:09.000Z
2019-12-11T10:31:09.000Z
#!/usr/bin/env python # # Download and extract the last Google App Engine SDK. # import argparse import logging import os import re import sys import urllib import urllib2 from xml.etree import ElementTree as ET from zipfile import ZipFile GAE_FEED_URL = 'https://code.google.com/feeds/p/googleappengine/downloads/b...
27.839623
88
0.624873
import argparse import logging import os import re import sys import urllib import urllib2 from xml.etree import ElementTree as ET from zipfile import ZipFile GAE_FEED_URL = 'https://code.google.com/feeds/p/googleappengine/downloads/basic' SDK_PATTERN = r'http://googleappengine.googlecode.com/files/google_appengine_...
true
true
1c34d05d5d36ccf8a7f171a2d3292af74ed9be9f
1,140
bzl
Python
sdk/bazel/base/common/build_defs/package_info.bzl
OpenTrustGroup/scripts
31ca2ca5bae055113c6f92a2eb75b0c7528902b3
[ "BSD-3-Clause" ]
49
2018-12-20T00:35:06.000Z
2021-12-30T22:40:05.000Z
build_defs/package_info.bzl
gxbllm/Fuchsia-SDK
869668003f20d560a40802c7d820ef0fefba0462
[ "BSD-3-Clause" ]
null
null
null
build_defs/package_info.bzl
gxbllm/Fuchsia-SDK
869668003f20d560a40802c7d820ef0fefba0462
[ "BSD-3-Clause" ]
21
2019-01-03T11:06:10.000Z
2021-08-06T00:55:50.000Z
# Copyright 2018 The Fuchsia Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Some utilities to declare and aggregate package contents. """ PackageLocalInfo = provider( fields = { "mappings": "list of (package dest, sou...
30
80
0.672807
PackageLocalInfo = provider( fields = { "mappings": "list of (package dest, source) pairs", }, ) PackageGeneratedInfo = provider( fields = { "mappings": "list of (package dest, source) pairs", }, ) PackageAggregateInfo = provider( fields = { "contents": "depset of (packag...
true
true
1c34d062cc2c268b11c9bdab083cd46cb4cdf8a3
284
py
Python
projectamber/amberapp/migrations/0002_delete_order.py
AIexBondar/my_works
0ba56e64bffb2e89d760861264c73417bc9f14fa
[ "Apache-2.0" ]
null
null
null
projectamber/amberapp/migrations/0002_delete_order.py
AIexBondar/my_works
0ba56e64bffb2e89d760861264c73417bc9f14fa
[ "Apache-2.0" ]
null
null
null
projectamber/amberapp/migrations/0002_delete_order.py
AIexBondar/my_works
0ba56e64bffb2e89d760861264c73417bc9f14fa
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.0.6 on 2020-05-29 17:28 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('amberapp', '0001_initial'), ] operations = [ migrations.DeleteModel( name='Order', ), ]
16.705882
47
0.588028
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('amberapp', '0001_initial'), ] operations = [ migrations.DeleteModel( name='Order', ), ]
true
true
1c34d10e4992ef19bbf760081e0661f2f5b585d7
1,557
py
Python
leetcode/933.number-of-recent-calls.py
geemaple/algorithm
68bc5032e1ee52c22ef2f2e608053484c487af54
[ "MIT" ]
177
2017-08-21T08:57:43.000Z
2020-06-22T03:44:22.000Z
leetcode/933.number-of-recent-calls.py
geemaple/algorithm
68bc5032e1ee52c22ef2f2e608053484c487af54
[ "MIT" ]
2
2018-09-06T13:39:12.000Z
2019-06-03T02:54:45.000Z
leetcode/933.number-of-recent-calls.py
geemaple/algorithm
68bc5032e1ee52c22ef2f2e608053484c487af54
[ "MIT" ]
23
2017-08-23T06:01:28.000Z
2020-04-20T03:17:36.000Z
# # [969] Number of Recent Calls # # https://leetcode.com/problems/number-of-recent-calls/description/ # # algorithms # Easy (59.00%) # Total Accepted: 37.2K # Total Submissions: 52.8K # Testcase Example: '["RecentCounter","ping","ping","ping","ping"]\n[[],[1],[100],[3001],[3002]]' # # Write a class RecentCounter t...
22.242857
98
0.619782
import collections class RecentCounter(object): def __init__(self): self.queue = collections.deque() def ping(self, t): self.queue.append(t) while self.queue[0] < t - 3000: self.queue.popleft() return len(self.queue)
true
true
1c34d1ec56167ffacc5442ad9ae1e5b20e005a87
6,097
py
Python
tests/unit/api/test_query.py
amenezes/discovery-client
9c41456d1cc14f4aab34628ad4e13423e00bc4be
[ "Apache-2.0" ]
2
2019-07-18T22:43:49.000Z
2020-03-09T03:27:41.000Z
tests/unit/api/test_query.py
amenezes/discovery-client
9c41456d1cc14f4aab34628ad4e13423e00bc4be
[ "Apache-2.0" ]
20
2019-02-27T19:08:03.000Z
2021-06-22T16:47:32.000Z
tests/unit/api/test_query.py
amenezes/discovery-client
9c41456d1cc14f4aab34628ad4e13423e00bc4be
[ "Apache-2.0" ]
null
null
null
import pytest from discovery import api def sample_payload(): return { "Name": "my-query", "Session": "adf4238a-882b-9ddc-4a9d-5b6758e4159e", "Token": "", "Service": { "Service": "redis", "Failover": {"NearestN": 3, "Datacenters": ["dc1", "dc2"]}, ...
32.089474
82
0.507627
import pytest from discovery import api def sample_payload(): return { "Name": "my-query", "Session": "adf4238a-882b-9ddc-4a9d-5b6758e4159e", "Token": "", "Service": { "Service": "redis", "Failover": {"NearestN": 3, "Datacenters": ["dc1", "dc2"]}, ...
true
true
1c34d24a7ccafb22e1865bc1b32325f00e7e88a9
4,243
py
Python
src/main/run_work.py
ta-assistant/Admin-CLI
1c03ede0e09d8ddc270646937aa7af463c55f1f5
[ "MIT" ]
1
2021-07-22T15:43:02.000Z
2021-07-22T15:43:02.000Z
src/main/run_work.py
ta-assistant/Admin-CLI
1c03ede0e09d8ddc270646937aa7af463c55f1f5
[ "MIT" ]
28
2021-05-15T08:18:21.000Z
2021-08-02T06:12:30.000Z
src/main/run_work.py
ta-assistant/TA-CLI
1c03ede0e09d8ddc270646937aa7af463c55f1f5
[ "MIT" ]
null
null
null
import os import json # import pandas as pd from datetime import datetime from src.main.pre_work import Work from lib.file_management.extract import unzipfile from src.main.student_data import StudentData from lib.file_management.configeditor import ConfigEditor from lib.function_network.func_network import CallApi fro...
31.664179
130
0.651897
import os import json from datetime import datetime from src.main.pre_work import Work from lib.file_management.extract import unzipfile from src.main.student_data import StudentData from lib.file_management.configeditor import ConfigEditor from lib.function_network.func_network import CallApi from lib.file_management....
true
true
1c34d32afeb26bdca540b86539fcbc303eed4360
3,224
py
Python
examples/aiohttp-echo/app.py
naotokuwa/line-bot-sdk-python
5ce92703031d60e8b662ccc370699e09bd57999f
[ "Apache-2.0" ]
1,563
2016-10-14T04:32:49.000Z
2022-03-31T06:34:17.000Z
examples/aiohttp-echo/app.py
naotokuwa/line-bot-sdk-python
5ce92703031d60e8b662ccc370699e09bd57999f
[ "Apache-2.0" ]
265
2016-10-15T08:25:51.000Z
2022-03-31T02:07:15.000Z
examples/aiohttp-echo/app.py
naotokuwa/line-bot-sdk-python
5ce92703031d60e8b662ccc370699e09bd57999f
[ "Apache-2.0" ]
999
2016-10-15T07:47:55.000Z
2022-03-29T05:15:12.000Z
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
30.415094
80
0.702543
import os import sys from argparse import ArgumentParser import asyncio import aiohttp from aiohttp import web import logging from aiohttp.web_runner import TCPSite from linebot import ( AsyncLineBotApi, WebhookParser ) from linebot.aiohttp_async_http_client import AiohttpAsyncHttpClient from linebot.exceptio...
true
true
1c34d36382b3db437c481582c544481af1042439
393
py
Python
dtinyurl/wsgi.py
kawww/linkipfs
d9cd3109522d6c63e32a6b86edfe31546cca694a
[ "MIT" ]
21
2019-06-16T08:58:00.000Z
2022-01-24T02:36:55.000Z
dtinyurl/wsgi.py
kawww/linkipfs
d9cd3109522d6c63e32a6b86edfe31546cca694a
[ "MIT" ]
5
2019-08-24T01:55:14.000Z
2021-06-10T21:26:40.000Z
dtinyurl/wsgi.py
kawww/linkipfs
d9cd3109522d6c63e32a6b86edfe31546cca694a
[ "MIT" ]
11
2019-06-16T08:58:33.000Z
2021-10-06T03:50:28.000Z
""" WSGI config for dtinyurl project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETT...
23.117647
78
0.78626
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dtinyurl.settings') application = get_wsgi_application()
true
true
1c34d45292a58e17b560f9af3b64e2dde13af5cc
1,180
py
Python
ps1-fractals/p5-sierpinski-random/sierpinski.py
slhshamloo/comp-phys
04d6759e0eb9d7e16e2781417d389bc15e22b01b
[ "MIT" ]
null
null
null
ps1-fractals/p5-sierpinski-random/sierpinski.py
slhshamloo/comp-phys
04d6759e0eb9d7e16e2781417d389bc15e22b01b
[ "MIT" ]
null
null
null
ps1-fractals/p5-sierpinski-random/sierpinski.py
slhshamloo/comp-phys
04d6759e0eb9d7e16e2781417d389bc15e22b01b
[ "MIT" ]
null
null
null
from numpy import ndarray from fractal import fractal_random_scalerot def sierpinski_random(range_x: tuple[float, float], range_y: tuple[float, float], steps: int = 10, samples: int=10000 ) -> tuple[ndarray, ndarray]: """Generates the points of a s...
39.333333
76
0.616102
from numpy import ndarray from fractal import fractal_random_scalerot def sierpinski_random(range_x: tuple[float, float], range_y: tuple[float, float], steps: int = 10, samples: int=10000 ) -> tuple[ndarray, ndarray]: return fractal_random_scalerot...
true
true
1c34d472e7497f77c5212b1ae5ceefbc7855012c
409
py
Python
django_tgbot/types/pollanswer.py
purwowd/django-tgbot
6712ad2e9986c0961ad402a1d2e37be39e2f5fb4
[ "MIT" ]
52
2020-04-05T11:06:21.000Z
2022-03-21T05:29:15.000Z
django_tgbot/types/pollanswer.py
armanexplorer/django-tgbot
e89f34b6a25beb9473c9e162ec8c161c14cd4cd6
[ "MIT" ]
11
2020-09-02T00:24:13.000Z
2022-03-22T06:09:36.000Z
django_tgbot/types/pollanswer.py
armanexplorer/django-tgbot
e89f34b6a25beb9473c9e162ec8c161c14cd4cd6
[ "MIT" ]
14
2020-09-01T23:31:54.000Z
2022-01-30T07:03:52.000Z
from . import BasicType class PollAnswer(BasicType): fields = { 'poll_id': str, 'option_ids': { 'class': int, 'array': True }, } def __init__(self, obj=None): super(PollAnswer, self).__init__(obj) def get_user(self): return getattr(self...
17.041667
45
0.552567
from . import BasicType class PollAnswer(BasicType): fields = { 'poll_id': str, 'option_ids': { 'class': int, 'array': True }, } def __init__(self, obj=None): super(PollAnswer, self).__init__(obj) def get_user(self): return getattr(self...
true
true
1c34d4bcd55d7bb1e7174aa0d6409ab0baded1c4
737
py
Python
django_redis_prometheus/cache/backends/filebased.py
Zagrebelin/django-redis-prometheus
971a81f1cab91d62bca6223feb32506a764c246b
[ "Apache-2.0" ]
null
null
null
django_redis_prometheus/cache/backends/filebased.py
Zagrebelin/django-redis-prometheus
971a81f1cab91d62bca6223feb32506a764c246b
[ "Apache-2.0" ]
null
null
null
django_redis_prometheus/cache/backends/filebased.py
Zagrebelin/django-redis-prometheus
971a81f1cab91d62bca6223feb32506a764c246b
[ "Apache-2.0" ]
1
2021-12-27T09:56:59.000Z
2021-12-27T09:56:59.000Z
from django.core.cache.backends import filebased from django_redis_prometheus.cache.metrics import ( django_cache_get_total, django_cache_hits_total, django_cache_misses_total) class FileBasedCache(filebased.FileBasedCache): """Inherit filebased cache to add metrics about hit/miss ratio""" def get(self, ...
40.944444
79
0.720488
from django.core.cache.backends import filebased from django_redis_prometheus.cache.metrics import ( django_cache_get_total, django_cache_hits_total, django_cache_misses_total) class FileBasedCache(filebased.FileBasedCache): def get(self, key, default=None, version=None): django_cache_get_total.label...
true
true
1c34db27bfb6729e6ad1f4da9b23cb1c70234a26
9,244
py
Python
indra/util/__init__.py
zebulon2/indra
7727ddcab52ad8012eb6592635bfa114e904bd48
[ "BSD-2-Clause" ]
136
2016-02-11T22:06:37.000Z
2022-03-31T17:26:20.000Z
indra/util/__init__.py
zebulon2/indra
7727ddcab52ad8012eb6592635bfa114e904bd48
[ "BSD-2-Clause" ]
748
2016-02-03T16:27:56.000Z
2022-03-09T14:27:54.000Z
indra/util/__init__.py
zebulon2/indra
7727ddcab52ad8012eb6592635bfa114e904bd48
[ "BSD-2-Clause" ]
56
2015-08-28T14:03:44.000Z
2022-02-04T06:15:55.000Z
import sys import csv import gzip import zlib import logging from io import BytesIO from functools import wraps from datetime import datetime import xml.etree.ElementTree as ET try: # Python 3 from itertools import zip_longest except ImportError: # Python 2 from itertools import izip_longest as zip_longest ...
35.968872
82
0.589247
import sys import csv import gzip import zlib import logging from io import BytesIO from functools import wraps from datetime import datetime import xml.etree.ElementTree as ET try: from itertools import zip_longest except ImportError: from itertools import izip_longest as zip_longest if sys.version_info[0]...
true
true
1c34dca3680ee63727932c6dfd78eef663f1094f
3,405
py
Python
src/streamlink/plugins/vk.py
kyldery/streamlink
ef36240408c194a543557fb31e4535b0426ec153
[ "BSD-2-Clause" ]
1
2022-02-25T20:14:03.000Z
2022-02-25T20:14:03.000Z
src/streamlink/plugins/vk.py
kyldery/streamlink
ef36240408c194a543557fb31e4535b0426ec153
[ "BSD-2-Clause" ]
null
null
null
src/streamlink/plugins/vk.py
kyldery/streamlink
ef36240408c194a543557fb31e4535b0426ec153
[ "BSD-2-Clause" ]
12
2022-01-30T23:34:18.000Z
2022-03-26T17:09:43.000Z
""" $description Russian live streaming and video hosting social platform. $url vk.com $type live, vod """ import logging import re from urllib.parse import parse_qsl, unquote, urlparse from streamlink.exceptions import NoStreamsError from streamlink.plugin import Plugin, PluginError, pluginmatcher from streamlink.pl...
31.238532
121
0.536564
import logging import re from urllib.parse import parse_qsl, unquote, urlparse from streamlink.exceptions import NoStreamsError from streamlink.plugin import Plugin, PluginError, pluginmatcher from streamlink.plugin.api import validate from streamlink.stream.dash import DASHStream from streamlink.stream.hls import HL...
true
true
1c34dd7b506455c31f7c2a55853c832f54a3c189
1,367
py
Python
src/transit_processor.py
ebuka-o/TransitTime
e70f7717d4bfc94d9388326f3e85b29a1495e5b8
[ "MIT" ]
null
null
null
src/transit_processor.py
ebuka-o/TransitTime
e70f7717d4bfc94d9388326f3e85b29a1495e5b8
[ "MIT" ]
null
null
null
src/transit_processor.py
ebuka-o/TransitTime
e70f7717d4bfc94d9388326f3e85b29a1495e5b8
[ "MIT" ]
null
null
null
import sys, getopt from data_manager import DataManager def print_welcome_messaage(): welcome_message =""" ****************************************************************** Welcome to TransitTime! ************************************************...
29.085106
90
0.514996
import sys, getopt from data_manager import DataManager def print_welcome_messaage(): welcome_message =""" ****************************************************************** Welcome to TransitTime! ************************************************...
true
true
1c34de3969c41b53bd7ad03958021791317136dd
150
py
Python
Exam_18_04_2021/exam-skeleton/project/deliveries/food.py
Beshkov/OOP
297edadb3e7801dfeee5752a20aae6aead8da610
[ "MIT" ]
1
2021-05-24T17:51:53.000Z
2021-05-24T17:51:53.000Z
Exam_18_04_2021/exam-skeleton/project/deliveries/food.py
Beshkov/Python_OOP
297edadb3e7801dfeee5752a20aae6aead8da610
[ "MIT" ]
null
null
null
Exam_18_04_2021/exam-skeleton/project/deliveries/food.py
Beshkov/Python_OOP
297edadb3e7801dfeee5752a20aae6aead8da610
[ "MIT" ]
null
null
null
from project.deliveries.product import Product class Food(Product): def __init__(self, name): super().__init__(name=name, quantity=15)
18.75
48
0.713333
from project.deliveries.product import Product class Food(Product): def __init__(self, name): super().__init__(name=name, quantity=15)
true
true
1c34dfb573fdfd4135ba26acd6db46609bd93a4d
2,880
py
Python
src/fuzzingtool/decorators/plugin_meta.py
NESCAU-UFLA/FuzzingTool
d0dbe3ee4c17ec8ee72423bf7fabce6849e01807
[ "MIT" ]
131
2020-12-14T18:45:29.000Z
2022-03-31T03:00:21.000Z
src/fuzzingtool/decorators/plugin_meta.py
NESCAU-UFLA/FuzzingTool
d0dbe3ee4c17ec8ee72423bf7fabce6849e01807
[ "MIT" ]
51
2020-12-14T16:02:38.000Z
2022-03-31T18:47:12.000Z
src/fuzzingtool/decorators/plugin_meta.py
NESCAU-UFLA/FuzzingTool
d0dbe3ee4c17ec8ee72423bf7fabce6849e01807
[ "MIT" ]
38
2020-12-14T21:12:18.000Z
2022-03-29T18:23:20.000Z
# Copyright (c) 2020 - present Vitor Oriel <https://github.com/VitorOriel> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to ...
53.333333
133
0.703819
from ..core.plugins.Plugin import Plugin def plugin_meta(cls: Plugin) -> Plugin: metadata = ['__author__', '__params__', '__desc__', '__type__', '__version__'] classAttr = vars(cls) for meta in metadata: if meta not in classAttr: raise Exception(f"Metadata {meta} not specified in plugi...
true
true
1c34e0bcadb37d98a4ac283247272dc992b6ee22
2,203
py
Python
todoapi/todoapi/settings.py
bogdan-cornianu/beginning-drf
b1c6efb85bf23b24f5afe90d819e57fa9ac2c1be
[ "MIT" ]
null
null
null
todoapi/todoapi/settings.py
bogdan-cornianu/beginning-drf
b1c6efb85bf23b24f5afe90d819e57fa9ac2c1be
[ "MIT" ]
null
null
null
todoapi/todoapi/settings.py
bogdan-cornianu/beginning-drf
b1c6efb85bf23b24f5afe90d819e57fa9ac2c1be
[ "MIT" ]
null
null
null
""" Django settings for a project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import o...
23.945652
71
0.731276
import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = 'pc3g2p43$7v+rf#x7%8tyt)fxsl&i=&hd2k-enz8+drzdcbd6f' DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
1c34e1595e8822543910764580daaf03bcfeb67a
60,852
py
Python
pathlib_mate/pathlib2.py
MacHu-GWU/pathlib_mate-project
5b8f5441e681730d02209211cce7f46986147418
[ "MIT" ]
9
2017-09-07T21:21:43.000Z
2020-10-11T09:47:24.000Z
pathlib_mate/pathlib2.py
MacHu-GWU/pathlib_mate-project
5b8f5441e681730d02209211cce7f46986147418
[ "MIT" ]
2
2018-10-16T14:30:26.000Z
2020-12-05T02:40:46.000Z
pathlib_mate/pathlib2.py
MacHu-GWU/pathlib_mate-project
5b8f5441e681730d02209211cce7f46986147418
[ "MIT" ]
2
2017-09-05T14:06:01.000Z
2021-06-29T15:31:13.000Z
# Copyright (c) 2014-2017 Matthias C. M. Troffaes # Copyright (c) 2012-2014 Antoine Pitrou and contributors # Distributed under the terms of the MIT License. # VERSION 2.5.3 # for python2 type hint try: import typing except: # pragma: no cover pass import ctypes import fnmatch import functools import io impo...
32.471718
79
0.559784
try: import typing except: pass import ctypes import fnmatch import functools import io import ntpath import os import posixpath import re import sys from errno import EEXIST, EPERM, EACCES from errno import EINVAL, ENOENT, ENOTDIR, EBADF from operator import attrgetter from stat import ( S_ISDIR, S_ISLN...
true
true
1c34e1be03260481dd35813ec70a53e1ca6f7892
14,217
py
Python
src/fleetctrl/PoolingIRSOnly.py
TUM-VT/FleetPy
596bcec9fbd2fe52206079641d549bf028d2879d
[ "MIT" ]
19
2021-12-11T17:17:00.000Z
2022-03-24T07:27:06.000Z
src/fleetctrl/PoolingIRSOnly.py
TUM-VT/FleetPy
596bcec9fbd2fe52206079641d549bf028d2879d
[ "MIT" ]
null
null
null
src/fleetctrl/PoolingIRSOnly.py
TUM-VT/FleetPy
596bcec9fbd2fe52206079641d549bf028d2879d
[ "MIT" ]
1
2021-12-21T11:20:39.000Z
2021-12-21T11:20:39.000Z
import logging import time from src.simulation.Offers import TravellerOffer from src.fleetctrl.FleetControlBase import FleetControlBase from src.fleetctrl.planning.PlanRequest import PlanRequest from src.fleetctrl.pooling.objectives import return_pooling_objective_function from src.fleetctrl.pooling.immediate.insertio...
48.688356
120
0.676866
import logging import time from src.simulation.Offers import TravellerOffer from src.fleetctrl.FleetControlBase import FleetControlBase from src.fleetctrl.planning.PlanRequest import PlanRequest from src.fleetctrl.pooling.objectives import return_pooling_objective_function from src.fleetctrl.pooling.immediate.insertio...
true
true
1c34e2071a5e6fa4e09f6128585cb488e46b16c0
32,325
py
Python
bert4keras/layers.py
EthanChen1234/bert4keras
149b8abe4f5696f7762f49547533873b935f85b9
[ "Apache-2.0" ]
null
null
null
bert4keras/layers.py
EthanChen1234/bert4keras
149b8abe4f5696f7762f49547533873b935f85b9
[ "Apache-2.0" ]
null
null
null
bert4keras/layers.py
EthanChen1234/bert4keras
149b8abe4f5696f7762f49547533873b935f85b9
[ "Apache-2.0" ]
null
null
null
#! -*- coding: utf-8 -*- # 自定义层 import numpy as np import tensorflow as tf from bert4keras.backend import keras, K from bert4keras.backend import sequence_masking from bert4keras.backend import recompute_grad from keras import initializers, activations from keras.layers import * def integerize_shape(func): """装饰...
33.990536
80
0.578623
import numpy as np import tensorflow as tf from bert4keras.backend import keras, K from bert4keras.backend import sequence_masking from bert4keras.backend import recompute_grad from keras import initializers, activations from keras.layers import * def integerize_shape(func): def convert(item): if hasattr...
true
true
1c34e66df50c012089ad360f1221b541925a79a1
2,194
py
Python
aoc2018/d08-1.py
jbudynek/advent-of-code
16ab71b110e9766b445bce3d3172b11d421b2f75
[ "CC0-1.0" ]
null
null
null
aoc2018/d08-1.py
jbudynek/advent-of-code
16ab71b110e9766b445bce3d3172b11d421b2f75
[ "CC0-1.0" ]
null
null
null
aoc2018/d08-1.py
jbudynek/advent-of-code
16ab71b110e9766b445bce3d3172b11d421b2f75
[ "CC0-1.0" ]
null
null
null
# coding: utf-8 import numpy as np import re import copy import sys import networkx as nx #import matplotlib.pyplot as plt #import operator #from collections import defaultdict from collections import Counter import time node_to_metadata = {} def parse_node(idx, iii, tree, cur_node, DBG=True): th...
24.931818
130
0.618961
import numpy as np import re import copy import sys import networkx as nx from collections import Counter import time node_to_metadata = {} def parse_node(idx, iii, tree, cur_node, DBG=True): this_node_name = cur_node cur_node = chr(ord(cur_node) + 1) tree.add_node(this_node_name) nb_c...
true
true
1c34e6a7c51538aa31a661dca1ae6805023e4aef
2,525
py
Python
problem_visual3.py
ligongzzz/MCM2020_Code
7e5e6f9a6b09b3eb7e21774535c977ba6e974d79
[ "MIT" ]
null
null
null
problem_visual3.py
ligongzzz/MCM2020_Code
7e5e6f9a6b09b3eb7e21774535c977ba6e974d79
[ "MIT" ]
null
null
null
problem_visual3.py
ligongzzz/MCM2020_Code
7e5e6f9a6b09b3eb7e21774535c977ba6e974d79
[ "MIT" ]
null
null
null
# Plays of the season. import numpy as np import cv2 import csv import matplotlib.pyplot as plt import matlab.engine plt.rc('font', family='Times New Roman') # Read the csv file. csv_reader = csv.reader(open('./data/passingevents.csv')) # The first match.(First match and self passing only.) passing_list = [row for r...
24.278846
79
0.610693
import numpy as np import cv2 import csv import matplotlib.pyplot as plt import matlab.engine plt.rc('font', family='Times New Roman') csv_reader = csv.reader(open('./data/passingevents.csv')) passing_list = [row for row in csv_reader if row[1] == 'Huskies'] for p in passing_list: if p[4] == '2H': p[5] =...
true
true
1c34e6fe8f5ecd00504b6dfac72ae815c3fd51fe
10,991
py
Python
pg_fts/migrations.py
dvdmgl/django-pg-fts
38e2353dc1eec3ecbd10f6c8624c30ebd779cf8a
[ "BSD-2-Clause-FreeBSD" ]
22
2015-01-06T08:17:28.000Z
2021-10-03T11:41:22.000Z
pg_fts/migrations.py
dvdmgl/django-pg-fts
38e2353dc1eec3ecbd10f6c8624c30ebd779cf8a
[ "BSD-2-Clause-FreeBSD" ]
8
2015-01-06T09:21:56.000Z
2019-01-19T17:57:16.000Z
pg_fts/migrations.py
dvdmgl/django-pg-fts
38e2353dc1eec3ecbd10f6c8624c30ebd779cf8a
[ "BSD-2-Clause-FreeBSD" ]
19
2015-01-24T10:09:35.000Z
2019-05-15T18:15:55.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db.migrations.operations.base import Operation from pg_fts.fields import TSVectorField __all__ = ('CreateFTSIndexOperation', 'CreateFTSTriggerOperation', 'DeleteFTSIndexOperation', 'DeleteFTSTriggerOperation', 'UpdateVec...
32.137427
93
0.628332
from __future__ import unicode_literals from django.db.migrations.operations.base import Operation from pg_fts.fields import TSVectorField __all__ = ('CreateFTSIndexOperation', 'CreateFTSTriggerOperation', 'DeleteFTSIndexOperation', 'DeleteFTSTriggerOperation', 'UpdateVectorOperation') class ...
true
true
1c34e76a1364264b17273e5cfd2e40e011e851d5
3,041
py
Python
python-flask/app.py
PujithaKurakula/BreastCancer-android-python-ml-app
ae1cd5b683a13e72169eda400322b3e17bb48bd9
[ "Apache-2.0" ]
null
null
null
python-flask/app.py
PujithaKurakula/BreastCancer-android-python-ml-app
ae1cd5b683a13e72169eda400322b3e17bb48bd9
[ "Apache-2.0" ]
null
null
null
python-flask/app.py
PujithaKurakula/BreastCancer-android-python-ml-app
ae1cd5b683a13e72169eda400322b3e17bb48bd9
[ "Apache-2.0" ]
null
null
null
import numpy as np import pandas as pd from flask import Flask, request, render_template import pickle app = Flask(__name__) model = pickle.load(open('model.pkl', 'rb')) @app.route('/') def home(): return render_template('h.html') @app.route('/detect') def detect(): return render_template('index.html') ...
39.493506
515
0.750082
import numpy as np import pandas as pd from flask import Flask, request, render_template import pickle app = Flask(__name__) model = pickle.load(open('model.pkl', 'rb')) @app.route('/') def home(): return render_template('h.html') @app.route('/detect') def detect(): return render_template('index.html') ...
true
true
1c34e95615ee7ca2019d86635649ccddde55a195
12,777
py
Python
PPO.py
jacob-heglund/ece598-xmase
7345b713fbb6d4f84c795cd52778312058cd80f8
[ "Apache-2.0" ]
null
null
null
PPO.py
jacob-heglund/ece598-xmase
7345b713fbb6d4f84c795cd52778312058cd80f8
[ "Apache-2.0" ]
null
null
null
PPO.py
jacob-heglund/ece598-xmase
7345b713fbb6d4f84c795cd52778312058cd80f8
[ "Apache-2.0" ]
null
null
null
from numpy.core.fromnumeric import trace import torch import torch.nn as nn from torch.distributions import MultivariateNormal from torch.distributions import Categorical import pdb ################################## set device ################################## print("===============================================...
39.680124
210
0.543633
from numpy.core.fromnumeric import trace import torch import torch.nn as nn from torch.distributions import MultivariateNormal from torch.distributions import Categorical import pdb print("============================================================================================") device = torch.device('cpu') if...
true
true
1c34eaa5ee0c570dfabd14d25e63956b1f1316de
327
py
Python
Codility_10.py
Bartoshko/codility-python-training
5ac53e85948692c8e6c44090e68b93136b263f9c
[ "MIT" ]
null
null
null
Codility_10.py
Bartoshko/codility-python-training
5ac53e85948692c8e6c44090e68b93136b263f9c
[ "MIT" ]
null
null
null
Codility_10.py
Bartoshko/codility-python-training
5ac53e85948692c8e6c44090e68b93136b263f9c
[ "MIT" ]
null
null
null
# works 100% arr_0 = [0,1,0,1,1] arr_1 = [0,1,0,1,0,1,0,1,0,1] def solution(A): increment = 0 counter = 0 value = 0 for i in A: if i == 0: increment += 1 if i == 1: value += increment counter += increment if counter > 1000000000: return -1 return counter print(solution(arr_0)) print(solution(...
14.863636
29
0.608563
arr_0 = [0,1,0,1,1] arr_1 = [0,1,0,1,0,1,0,1,0,1] def solution(A): increment = 0 counter = 0 value = 0 for i in A: if i == 0: increment += 1 if i == 1: value += increment counter += increment if counter > 1000000000: return -1 return counter print(solution(arr_0)) print(solution(arr_1))
true
true
1c34eb0121879b126de166589387ff58843cec09
9,734
py
Python
adlibre_tms/apps/saasu_client/models/items.py
adlibre/Adlibre-TMS
4c8de1e4448203fb267d38ec0f4ec9e64d58a21d
[ "BSD-3-Clause" ]
26
2015-01-06T11:09:18.000Z
2022-03-16T06:20:53.000Z
adlibre_tms/apps/saasu_client/models/items.py
adlibre/Adlibre-TMS
4c8de1e4448203fb267d38ec0f4ec9e64d58a21d
[ "BSD-3-Clause" ]
4
2015-02-26T11:00:35.000Z
2020-06-05T18:02:02.000Z
adlibre_tms/apps/saasu_client/models/items.py
adlibre/Adlibre-TMS
4c8de1e4448203fb267d38ec0f4ec9e64d58a21d
[ "BSD-3-Clause" ]
16
2015-02-08T05:24:38.000Z
2021-06-13T14:45:30.000Z
# -*- coding: utf-8 -*- import xml_models from saasu_client import DEFAULT_GET_URL from saasu_client.models.base import BaseModel, CollectionField __all__ = ['InventoryItem', 'FullInventoryItemList'] class InventoryItem(BaseModel): """ Inventory Item Entity """ __model__ = 'InventoryItem' # Required ...
62.8
134
0.771625
import xml_models from saasu_client import DEFAULT_GET_URL from saasu_client.models.base import BaseModel, CollectionField __all__ = ['InventoryItem', 'FullInventoryItemList'] class InventoryItem(BaseModel): __model__ = 'InventoryItem' uid = xml_models.IntField(xpath="/inventoryItemResponse/inventory...
true
true
1c34eb4801c8e897558782c5062336dabefbfe82
1,240
py
Python
pipeline/processing/data.py
UNDP-Data/sids-data-pipeline
16953bfe25bc4425f699937a83f5ed0c8755197a
[ "MIT" ]
null
null
null
pipeline/processing/data.py
UNDP-Data/sids-data-pipeline
16953bfe25bc4425f699937a83f5ed0c8755197a
[ "MIT" ]
null
null
null
pipeline/processing/data.py
UNDP-Data/sids-data-pipeline
16953bfe25bc4425f699937a83f5ed0c8755197a
[ "MIT" ]
null
null
null
from .config import download_path from .utils import cwd, logging, read_csv, download_file logger = logging.getLogger(__name__) def get_rows(data_type, input_ext, tmp_ext): rows = read_csv(cwd / f'../inputs/{data_type}.csv') for row in rows: blob_path = download_path / f"{data_type}/{row['id']}.{inpu...
34.444444
75
0.662097
from .config import download_path from .utils import cwd, logging, read_csv, download_file logger = logging.getLogger(__name__) def get_rows(data_type, input_ext, tmp_ext): rows = read_csv(cwd / f'../inputs/{data_type}.csv') for row in rows: blob_path = download_path / f"{data_type}/{row['id']}.{inpu...
true
true
1c34eb7196851f652877086b511994be5ae8037e
9,307
py
Python
tests/test_data/test_datasets/test_s3dis_dataset.py
jhkim-spa/CVNet
126a3155f414bf47e9e4f6fec121420fd378ea21
[ "Apache-2.0" ]
1
2021-10-20T05:21:21.000Z
2021-10-20T05:21:21.000Z
tests/test_data/test_datasets/test_s3dis_dataset.py
jhkim-spa/CVNet
126a3155f414bf47e9e4f6fec121420fd378ea21
[ "Apache-2.0" ]
null
null
null
tests/test_data/test_datasets/test_s3dis_dataset.py
jhkim-spa/CVNet
126a3155f414bf47e9e4f6fec121420fd378ea21
[ "Apache-2.0" ]
1
2022-02-16T07:25:55.000Z
2022-02-16T07:25:55.000Z
import numpy as np import pytest import torch from mmdet3d.datasets import S3DISSegDataset def test_seg_getitem(): np.random.seed(0) root_path = './tests/data/s3dis/' ann_file = './tests/data/s3dis/s3dis_infos.pkl' class_names = ('ceiling', 'floor', 'wall', 'beam', 'column', 'window', ...
37.987755
79
0.578812
import numpy as np import pytest import torch from mmdet3d.datasets import S3DISSegDataset def test_seg_getitem(): np.random.seed(0) root_path = './tests/data/s3dis/' ann_file = './tests/data/s3dis/s3dis_infos.pkl' class_names = ('ceiling', 'floor', 'wall', 'beam', 'column', 'window', ...
true
true
1c34ebab0150fa1f9681a77d86d7978fddaa546e
23,218
py
Python
test/functional/test_framework/mininode.py
deeponion/deeponion2
2dc92ed83f5639b528e0c1279bdd214bb92ef286
[ "MIT" ]
569
2017-07-26T23:14:31.000Z
2022-01-13T20:29:04.000Z
test/functional/test_framework/mininode.py
cpyberry/deeponion
448b4a1ea7c90294d9ace03ea5a9648fb9b1107e
[ "MIT" ]
155
2017-07-17T15:40:36.000Z
2021-12-07T07:59:33.000Z
test/functional/test_framework/mininode.py
cpyberry/deeponion
448b4a1ea7c90294d9ace03ea5a9648fb9b1107e
[ "MIT" ]
214
2017-07-17T15:36:08.000Z
2021-11-04T23:38:37.000Z
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """DeepOnion P2...
39.352542
182
0.644974
import asyncio from collections import defaultdict from io import BytesIO import logging import struct import sys import threading from test_framework.messages import ( CBlockHeader, MIN_VERSION_SUPPORTED, msg_addr, msg_block, MSG_BLOCK, msg_blocktxn, msg_cmpctblock, msg_feefilter, ...
true
true
1c34ec5b0922266c3e466c89dc031fd7d675e72f
412
py
Python
migrations/versions/0302a_merge.py
cds-snc/notifier-api
90b385ec49efbaee7e607516fc7d9f08991af813
[ "MIT" ]
41
2019-11-28T16:58:41.000Z
2022-01-28T21:11:16.000Z
migrations/versions/0302a_merge.py
cds-snc/notification-api
b1c1064f291eb860b494c3fa65ac256ad70bf47c
[ "MIT" ]
1,083
2019-07-08T12:57:24.000Z
2022-03-08T18:53:40.000Z
migrations/versions/0302a_merge.py
cds-snc/notifier-api
90b385ec49efbaee7e607516fc7d9f08991af813
[ "MIT" ]
9
2020-01-24T19:56:43.000Z
2022-01-27T21:36:53.000Z
""" Revision ID: 0302a_merge Revises: 0301c_update_golive_template, 0302_add_org_id_to_services Create Date: 2019-07-29 16:18:27.467361 """ # revision identifiers, used by Alembic. revision = "0302a_merge" down_revision = ("0301c_update_golive_template", "0302_add_org_id_to_services") branch_labels = None import sq...
17.166667
79
0.771845
revision = "0302a_merge" down_revision = ("0301c_update_golive_template", "0302_add_org_id_to_services") branch_labels = None import sqlalchemy as sa from alembic import op def upgrade(): pass def downgrade(): pass
true
true
1c34ec9156ccc0bddc9813d98d2ba5a9fbc1cc96
423
py
Python
user-management-api/user_management_project/asgi.py
washimimizuku/django-tutorials
4f0e3836778dd3ea5403ef713e2f6777e44eae8d
[ "MIT" ]
null
null
null
user-management-api/user_management_project/asgi.py
washimimizuku/django-tutorials
4f0e3836778dd3ea5403ef713e2f6777e44eae8d
[ "MIT" ]
null
null
null
user-management-api/user_management_project/asgi.py
washimimizuku/django-tutorials
4f0e3836778dd3ea5403ef713e2f6777e44eae8d
[ "MIT" ]
null
null
null
""" ASGI config for user_management_project project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefau...
24.882353
83
0.801418
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'user_management_project.settings') application = get_asgi_application()
true
true
1c34ed8262045aa8f685164bd58552086bd69fb1
348
py
Python
virtualscreening/vina/spark/pdb_io.py
rodrigofaccioli/drugdesign
de15880af361a010729b1f4fbc8a75a2b36688a6
[ "Apache-2.0" ]
3
2015-01-19T20:12:59.000Z
2019-02-21T18:43:04.000Z
virtualscreening/vina/spark/pdb_io.py
rodrigofaccioli/drugdesign
de15880af361a010729b1f4fbc8a75a2b36688a6
[ "Apache-2.0" ]
22
2015-01-05T16:48:54.000Z
2017-01-21T16:36:10.000Z
virtualscreening/vina/spark/pdb_io.py
rodrigofaccioli/drugdesign
de15880af361a010729b1f4fbc8a75a2b36688a6
[ "Apache-2.0" ]
11
2015-03-03T13:32:24.000Z
2020-04-03T11:22:24.000Z
def adding_chain_atom_line(atom_line,chain="Z"): returned_line = "" for i in range(0,len(atom_line)): #it means column 22 if i == 21: returned_line += chain returned_line += atom_line[i] return returned_line def replace_chain_atom_line(atom_line,chain_ref="d",new_chain="Z"): return str(atom_line).re...
26.769231
67
0.732759
def adding_chain_atom_line(atom_line,chain="Z"): returned_line = "" for i in range(0,len(atom_line)): if i == 21: returned_line += chain returned_line += atom_line[i] return returned_line def replace_chain_atom_line(atom_line,chain_ref="d",new_chain="Z"): return str(atom_line).replace(chain_ref,new_...
true
true
1c34ef0c08d81ab26cc421a11e492e66257f386a
265
py
Python
openapi_core/validation/datatypes.py
Yarn-e/openapi-core
fda9fbd3bc1c0879818e00445e1ad0731f80b065
[ "BSD-3-Clause" ]
160
2017-11-20T13:39:04.000Z
2022-03-31T14:48:27.000Z
openapi_core/validation/datatypes.py
Yarn-e/openapi-core
fda9fbd3bc1c0879818e00445e1ad0731f80b065
[ "BSD-3-Clause" ]
384
2017-09-21T12:42:31.000Z
2022-03-21T17:21:05.000Z
openapi_core/validation/datatypes.py
Yarn-e/openapi-core
fda9fbd3bc1c0879818e00445e1ad0731f80b065
[ "BSD-3-Clause" ]
100
2017-11-21T08:07:01.000Z
2022-01-20T20:32:52.000Z
"""OpenAPI core validation datatypes module""" from dataclasses import dataclass from typing import List @dataclass class BaseValidationResult: errors: List[Exception] def raise_for_errors(self): for error in self.errors: raise error
20.384615
46
0.724528
from dataclasses import dataclass from typing import List @dataclass class BaseValidationResult: errors: List[Exception] def raise_for_errors(self): for error in self.errors: raise error
true
true
1c34ef485e743b17c67738c34003630dbdd389ce
13,757
py
Python
modules/py/pkgs/QNLP/proc/DisCoCat.py
ICHEC/QNLP
2966c7f71e6979c7ddef62520c3749cf6473fabe
[ "Apache-2.0" ]
29
2020-04-13T04:40:35.000Z
2021-12-17T11:21:35.000Z
modules/py/pkgs/QNLP/proc/DisCoCat.py
ICHEC/QNLP
2966c7f71e6979c7ddef62520c3749cf6473fabe
[ "Apache-2.0" ]
6
2020-03-12T17:40:00.000Z
2021-01-20T12:15:08.000Z
modules/py/pkgs/QNLP/proc/DisCoCat.py
ICHEC/QNLP
2966c7f71e6979c7ddef62520c3749cf6473fabe
[ "Apache-2.0" ]
9
2020-09-28T05:00:30.000Z
2022-03-04T02:11:49.000Z
############################################################################### import sqlite3 import os from typing import Dict, Tuple import QNLP.proc.process_corpus as pc import numpy as np from QNLP.io.qnlp_db import qnlp_db as qnlp_db ##############################################################################...
46.010033
458
0.535873
import sqlite3 import os from typing import Dict, Tuple import QNLP.proc.process_corpus as pc import numpy as np from QNLP.io.qnlp_db import qnlp_db as qnlp_db class qdb_mixin(qnlp_db): def create_table_discocat(self, table_name="qnlp"): cr_tbl = """CREATE TABLE {}( id INTEGER PRIMARY...
true
true
1c34efaf717edb20399b7bb104621e96df0873ca
2,239
py
Python
scrapers/seamus/scraper.py
nprapps/graeae
b38cdd3de74fb239fdcc92619e92bcfb0818bda3
[ "MIT" ]
5
2015-06-10T15:37:46.000Z
2015-10-12T15:28:37.000Z
scrapers/seamus/scraper.py
nprapps/graeae
b38cdd3de74fb239fdcc92619e92bcfb0818bda3
[ "MIT" ]
175
2015-04-14T20:14:57.000Z
2015-07-13T13:50:45.000Z
scrapers/seamus/scraper.py
nprapps/graeae
b38cdd3de74fb239fdcc92619e92bcfb0818bda3
[ "MIT" ]
3
2015-08-27T14:34:09.000Z
2021-02-23T11:03:40.000Z
#!/usr/bin/env python from datetime import datetime import logging import os import requests from pyquery import PyQuery from app_config import get_secrets from models import Story SECRETS = get_secrets() SEAMUS_API_PAGE_SIZE = 20 logging.basicConfig() logger = logging.getLogger(__name__) logger.setLevel(logging.I...
25.735632
90
0.571684
from datetime import datetime import logging import os import requests from pyquery import PyQuery from app_config import get_secrets from models import Story SECRETS = get_secrets() SEAMUS_API_PAGE_SIZE = 20 logging.basicConfig() logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) class SeamusScra...
true
true
1c34f00f6f6deff2422988c51a4cdf2397490bc5
1,021
py
Python
lab6/Q6_1_1.py
kommunium/dip-lab
2c8e08a994fb34b87da55da48a7b72b7c13d9c81
[ "MIT" ]
null
null
null
lab6/Q6_1_1.py
kommunium/dip-lab
2c8e08a994fb34b87da55da48a7b72b7c13d9c81
[ "MIT" ]
null
null
null
lab6/Q6_1_1.py
kommunium/dip-lab
2c8e08a994fb34b87da55da48a7b72b7c13d9c81
[ "MIT" ]
null
null
null
import numpy as np from PIL import Image from matplotlib import pyplot as plt # %% Q6_1_1 max filter Q6_1_1 = np.asarray(Image.open("Q6_1_1.tiff")) def max_filter(img_raw, n: int): m = (n - 1) // 2 row, col = img_raw.shape img_pad = np.pad(img_raw, m) img_out = np.array([img_pad[i:i + n, j:j + n].max...
26.868421
55
0.665034
import numpy as np from PIL import Image from matplotlib import pyplot as plt Q6_1_1 = np.asarray(Image.open("Q6_1_1.tiff")) def max_filter(img_raw, n: int): m = (n - 1) // 2 row, col = img_raw.shape img_pad = np.pad(img_raw, m) img_out = np.array([img_pad[i:i + n, j:j + n].max() ...
true
true
1c34f054cc39f409c990152fefa119a2bf2c71cb
995
py
Python
learning/katas/python/Common Transforms/Aggregation/Count/task.py
charithe/beam
f085cb500730cf0c67c467ac55f92b3c59f52b39
[ "Apache-2.0" ]
35
2016-09-22T22:53:14.000Z
2020-02-13T15:12:21.000Z
learning/katas/python/Common Transforms/Aggregation/Count/task.py
charithe/beam
f085cb500730cf0c67c467ac55f92b3c59f52b39
[ "Apache-2.0" ]
71
2018-05-23T22:20:02.000Z
2019-04-30T15:37:46.000Z
learning/katas/python/Common Transforms/Aggregation/Count/task.py
charithe/beam
f085cb500730cf0c67c467ac55f92b3c59f52b39
[ "Apache-2.0" ]
88
2016-11-27T02:16:11.000Z
2020-02-28T05:10:26.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); y...
35.535714
76
0.739698
import apache_beam as beam from log_elements import LogElements p = beam.Pipeline() (p | beam.Create(range(1, 11)) | beam.combiners.Count.Globally() | LogElements()) p.run()
true
true
1c34f08aae1ab12bac8cb59e8a8cd37e3fd4e4aa
199
py
Python
src/ArtificialConduction/ArtificialConductionPolicyInst.cc.py
jmikeowen/Spheral
3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4
[ "BSD-Source-Code", "BSD-3-Clause-LBNL", "FSFAP" ]
22
2018-07-31T21:38:22.000Z
2020-06-29T08:58:33.000Z
src/ArtificialConduction/ArtificialConductionPolicyInst.cc.py
jmikeowen/Spheral
3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4
[ "BSD-Source-Code", "BSD-3-Clause-LBNL", "FSFAP" ]
41
2020-09-28T23:14:27.000Z
2022-03-28T17:01:33.000Z
src/ArtificialConduction/ArtificialConductionPolicyInst.cc.py
jmikeowen/Spheral
3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4
[ "BSD-Source-Code", "BSD-3-Clause-LBNL", "FSFAP" ]
7
2019-12-01T07:00:06.000Z
2020-09-15T21:12:39.000Z
text = """ #include "ArtificialConduction/ArtificialConductionPolicy.cc" #include "Geometry/Dimension.hh" namespace Spheral { template class ArtificialConductionPolicy< Dim< %(ndim)s > >; } """
22.111111
65
0.743719
text = """ #include "ArtificialConduction/ArtificialConductionPolicy.cc" #include "Geometry/Dimension.hh" namespace Spheral { template class ArtificialConductionPolicy< Dim< %(ndim)s > >; } """
true
true
1c34f0e97ac6368ed1711029606b4e87c6a3c764
18
py
Python
opsdroid/testing/mockmodules/skills/skill/skilltest/mock.py
JiahnChoi/opsdroid.kr
0893456b0f9f6c70edf7c330a7593d87450538cc
[ "Apache-2.0" ]
712
2016-08-09T21:30:07.000Z
2022-03-24T09:38:21.000Z
opsdroid/testing/mockmodules/skills/skill/skilltest/mock.py
JiahnChoi/opsdroid.kr
0893456b0f9f6c70edf7c330a7593d87450538cc
[ "Apache-2.0" ]
1,767
2016-07-27T13:01:25.000Z
2022-03-29T04:25:10.000Z
opsdroid/testing/mockmodules/skills/skill/skilltest/mock.py
JiahnChoi/opsdroid.kr
0893456b0f9f6c70edf7c330a7593d87450538cc
[ "Apache-2.0" ]
536
2016-07-31T14:23:41.000Z
2022-03-22T17:35:15.000Z
"""Mock skill."""
9
17
0.5
true
true
1c34f167c66b512c11d05e984e2da8670df79f29
1,960
py
Python
pyclesperanto_prototype/_tier3/_mode_of_proximal_neighbors_map.py
elsandal/pyclesperanto_prototype
7bda828813b86b44b63d73d5e8f466d9769cded1
[ "BSD-3-Clause" ]
64
2020-03-18T12:11:22.000Z
2022-03-31T08:19:18.000Z
pyclesperanto_prototype/_tier3/_mode_of_proximal_neighbors_map.py
elsandal/pyclesperanto_prototype
7bda828813b86b44b63d73d5e8f466d9769cded1
[ "BSD-3-Clause" ]
148
2020-05-14T06:14:11.000Z
2022-03-26T15:02:31.000Z
pyclesperanto_prototype/_tier3/_mode_of_proximal_neighbors_map.py
elsandal/pyclesperanto_prototype
7bda828813b86b44b63d73d5e8f466d9769cded1
[ "BSD-3-Clause" ]
16
2020-05-31T00:53:44.000Z
2022-03-23T13:20:57.000Z
from .._tier0 import execute from .._tier0 import plugin_function from .._tier0 import Image import numpy as np @plugin_function(categories=['combine', 'neighbor', 'map', 'in assistant']) def mode_of_proximal_neighbors_map(parametric_map : Image, label_map : Image, parametric_map_destination : Image = None, min_distan...
39.2
196
0.760204
from .._tier0 import execute from .._tier0 import plugin_function from .._tier0 import Image import numpy as np @plugin_function(categories=['combine', 'neighbor', 'map', 'in assistant']) def mode_of_proximal_neighbors_map(parametric_map : Image, label_map : Image, parametric_map_destination : Image = None, min_distan...
true
true
1c34f23b14017b4111a937164abe1270b2fd4ee1
1,822
py
Python
py/DirectShape.Transform.py
mathematicalmichael/SpringNodes
3ff4034b6e57ee6efa55c963e1819f3d30a2c4ab
[ "MIT" ]
51
2015-09-25T09:30:57.000Z
2022-01-19T14:16:44.000Z
py/DirectShape.Transform.py
sabeelcoder/SpringNodes
e21a24965474d54369e74d23c06f8c42a7b926b5
[ "MIT" ]
66
2015-09-30T02:43:32.000Z
2022-03-31T02:26:52.000Z
py/DirectShape.Transform.py
sabeelcoder/SpringNodes
e21a24965474d54369e74d23c06f8c42a7b926b5
[ "MIT" ]
48
2015-11-19T01:34:47.000Z
2022-02-25T17:26:48.000Z
#Copyright(c) 2016, Dimitar Venkov # @5devene, dimitar.ven@gmail.com import clr clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager doc = DocumentManager.Instance.CurrentDBDocument app = DocumentManager....
30.881356
108
0.791438
import clr clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager doc = DocumentManager.Instance.CurrentDBDocument app = DocumentManager.Instance.CurrentUIApplication.Application isRvt2017 = int(app.Version...
true
true
1c34f34beeb4ca12cb5aba811339a1c44f064b3e
1,938
py
Python
Utilities/BootstrapMean/BootstrapMean.py
wavefancy/BIDMC-PYTHON
97c7d3e1bec19dd7fea34d4ecebbdf2af2b1faed
[ "MIT" ]
null
null
null
Utilities/BootstrapMean/BootstrapMean.py
wavefancy/BIDMC-PYTHON
97c7d3e1bec19dd7fea34d4ecebbdf2af2b1faed
[ "MIT" ]
null
null
null
Utilities/BootstrapMean/BootstrapMean.py
wavefancy/BIDMC-PYTHON
97c7d3e1bec19dd7fea34d4ecebbdf2af2b1faed
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Bootstrap values to estimate confidence interval for mean. @Author: wavefancy@gmail.com Usage: BootstrapMean.py -n times -c confidence BootstrapMean.py -h | --help | -v | --version | -f | --format Notes: 1. Read content from stdin, and output resul...
28.5
117
0.592879
import sys from docopt import docopt from signal import signal, SIGPIPE, SIG_DFL signal(SIGPIPE,SIG_DFL) if __name__ == '__main__': args = docopt(__doc__, version='1.0') ntimes = 100 confidence = [] if args['-n']: ntimes = int(args['-n']) if args['-c']: confidence = [float(x)...
true
true
1c34f35af8b61be42feaa3545d57c4cef1af40d0
454
py
Python
plugins/ledger/cmdline.py
nxsofsys/electrum-zcl
3675fa2f871a4e944fc875a4653f95d9b38b9e29
[ "MIT" ]
1
2021-04-04T20:40:29.000Z
2021-04-04T20:40:29.000Z
plugins/ledger/cmdline.py
nxsofsys/electrum-zcl
3675fa2f871a4e944fc875a4653f95d9b38b9e29
[ "MIT" ]
null
null
null
plugins/ledger/cmdline.py
nxsofsys/electrum-zcl
3675fa2f871a4e944fc875a4653f95d9b38b9e29
[ "MIT" ]
null
null
null
from legder import LedgerPlugin from electrum_vtc.util import print_msg class BTChipCmdLineHandler: def stop(self): pass def show_message(self, msg): print_msg(msg) def prompt_auth(self, msg): import getpass print_msg(msg) response = getpass.getpass('') if ...
21.619048
39
0.645374
from legder import LedgerPlugin from electrum_vtc.util import print_msg class BTChipCmdLineHandler: def stop(self): pass def show_message(self, msg): print_msg(msg) def prompt_auth(self, msg): import getpass print_msg(msg) response = getpass.getpass('') if ...
true
true
1c34f3b0be47bed7d917fc9a5adf536d78f30809
634
py
Python
app/models/domain/rwmodel.py
StanislavRud/api-realword-app-test
9a49f299b02cec26d237f3bc4b363c8b93520b7b
[ "MIT" ]
1,875
2019-03-27T14:26:20.000Z
2022-03-31T14:52:50.000Z
app/models/domain/rwmodel.py
StanislavRud/api-realword-app-test
9a49f299b02cec26d237f3bc4b363c8b93520b7b
[ "MIT" ]
232
2019-04-11T11:05:48.000Z
2022-03-05T10:23:50.000Z
app/models/domain/rwmodel.py
StanislavRud/api-realword-app-test
9a49f299b02cec26d237f3bc4b363c8b93520b7b
[ "MIT" ]
433
2019-04-11T01:48:59.000Z
2022-03-31T10:33:42.000Z
import datetime from pydantic import BaseConfig, BaseModel def convert_datetime_to_realworld(dt: datetime.datetime) -> str: return dt.replace(tzinfo=datetime.timezone.utc).isoformat().replace("+00:00", "Z") def convert_field_to_camel_case(string: str) -> str: return "".join( word if index == 0 else...
28.818182
86
0.722397
import datetime from pydantic import BaseConfig, BaseModel def convert_datetime_to_realworld(dt: datetime.datetime) -> str: return dt.replace(tzinfo=datetime.timezone.utc).isoformat().replace("+00:00", "Z") def convert_field_to_camel_case(string: str) -> str: return "".join( word if index == 0 else...
true
true
1c34f3f80eecf4e930c3ce750c5a552fb38cecad
3,809
py
Python
src/transformers/tokenization_distilbert.py
dmlap/transformers
79588e6fdb5af8add092fc27dd695ea1ebc68b18
[ "Apache-2.0" ]
647
2020-10-27T01:35:35.000Z
2022-03-29T12:59:11.000Z
src/transformers/tokenization_distilbert.py
hmason/transformers
ab90353f1abfd15f8d21f99395658d060679a08c
[ "Apache-2.0" ]
30
2020-06-07T12:28:07.000Z
2022-03-20T05:26:03.000Z
src/transformers/tokenization_distilbert.py
hmason/transformers
ab90353f1abfd15f8d21f99395658d060679a08c
[ "Apache-2.0" ]
48
2020-07-15T09:45:46.000Z
2022-03-01T07:27:59.000Z
# coding=utf-8 # Copyright 2018 The HuggingFace Inc. team. # # 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...
41.402174
139
0.757942
import logging from .tokenization_bert import BertTokenizer, BertTokenizerFast logger = logging.getLogger(__name__) VOCAB_FILES_NAMES = {"vocab_file": "vocab.txt"} PRETRAINED_VOCAB_FILES_MAP = { "vocab_file": { "distilbert-base-uncased": "https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-...
true
true
1c34f46b2bd79018cc6279a1ed2396587cb5a3b9
24,065
py
Python
quantstats/_plotting/core.py
danilodsp/quantstats
67a647baeba756c57d87bc7028f55d4dee8702b4
[ "Apache-2.0" ]
1
2019-09-03T11:06:16.000Z
2019-09-03T11:06:16.000Z
quantstats/_plotting/core.py
danilodsp/quantstats
67a647baeba756c57d87bc7028f55d4dee8702b4
[ "Apache-2.0" ]
null
null
null
quantstats/_plotting/core.py
danilodsp/quantstats
67a647baeba756c57d87bc7028f55d4dee8702b4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Quantreturns: Portfolio analytics for quants # https://github.com/ranaroussi/quantreturns # # Copyright 2019 Ran Aroussi # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obta...
30.308564
78
0.564471
import matplotlib.pyplot as _plt try: _plt.rcParams["font.family"] = "Arial" except Exception: pass import matplotlib.dates as _mdates from matplotlib.ticker import ( FormatStrFormatter as _FormatStrFormatter, FuncFormatter as _FuncFormatter ) import pandas as _pd import numpy as _np import seaborn a...
true
true
1c34f495a5af2eb1cfba1648b37b88a451fb5063
2,597
py
Python
tests/__init__.py
Kinto/kinto-pusher
9cad48b33a55d64f69cabf7d4c7eab15145e4a74
[ "Apache-2.0" ]
8
2016-06-07T09:49:52.000Z
2018-08-01T11:06:45.000Z
tests/__init__.py
Kinto/kinto-pusher
9cad48b33a55d64f69cabf7d4c7eab15145e4a74
[ "Apache-2.0" ]
12
2016-05-20T16:41:10.000Z
2020-03-31T18:20:02.000Z
tests/__init__.py
Kinto/kinto-pusher
9cad48b33a55d64f69cabf7d4c7eab15145e4a74
[ "Apache-2.0" ]
5
2016-05-26T12:54:44.000Z
2019-04-17T22:31:31.000Z
import kinto.core import webtest from kinto.core.utils import random_bytes_hex from pyramid.config import Configurator def get_request_class(prefix): class PrefixedRequestClass(webtest.app.TestRequest): @classmethod def blank(cls, path, *args, **kwargs): path = "/%s%s" % (prefix, path...
35.575342
73
0.663843
import kinto.core import webtest from kinto.core.utils import random_bytes_hex from pyramid.config import Configurator def get_request_class(prefix): class PrefixedRequestClass(webtest.app.TestRequest): @classmethod def blank(cls, path, *args, **kwargs): path = "/%s%s" % (prefix, path...
true
true
1c34f4fd314bfea96ecf0e4939d2eff0afa450f9
471
py
Python
roundup.py
lpig/some_tools
4c7e9ee95bef2c230a2a6bd2fdca7dc19ea3e1dc
[ "MIT" ]
2
2020-03-23T11:02:37.000Z
2020-04-17T08:02:35.000Z
roundup.py
lpig/some_tools
4c7e9ee95bef2c230a2a6bd2fdca7dc19ea3e1dc
[ "MIT" ]
null
null
null
roundup.py
lpig/some_tools
4c7e9ee95bef2c230a2a6bd2fdca7dc19ea3e1dc
[ "MIT" ]
null
null
null
import math def roundup_int(x: int, num_digits: int) -> int: """ round up like excel roundup 向上取证方法,暂时只支持整数 **One**:: >>> num = roundup_int(123,-1) >>> num 130 """ if num_digits > 0: raise TypeError(f'is over 0! digit:{num_digits}') num_digits = abs(num_di...
21.409091
75
0.577495
import math def roundup_int(x: int, num_digits: int) -> int: if num_digits > 0: raise TypeError(f'is over 0! digit:{num_digits}') num_digits = abs(num_digits) _num_digits = 1 * math.pow(10, num_digits) _num = x if x % _num_digits == 0 else x + _num_digits - x % _num_digits return int(_num...
true
true
1c34f52b43551b4ecb53a18ee47a50477a3bac98
933
py
Python
main.py
NicksonYap/T-1000
e1f82f9e72cb5407bb01a83daa278c51b2e30c2a
[ "MIT" ]
null
null
null
main.py
NicksonYap/T-1000
e1f82f9e72cb5407bb01a83daa278c51b2e30c2a
[ "MIT" ]
null
null
null
main.py
NicksonYap/T-1000
e1f82f9e72cb5407bb01a83daa278c51b2e30c2a
[ "MIT" ]
null
null
null
if __name__ == '__main__': from utils import loading loading() from core_main import Nostradamus env = Nostradamus(assets=['XRP','BCH','LTC','BNB'], currency='BTC', granularity='day', datapoints=600) env.train(timesteps=1e6, ...
31.1
104
0.392283
if __name__ == '__main__': from utils import loading loading() from core_main import Nostradamus env = Nostradamus(assets=['XRP','BCH','LTC','BNB'], currency='BTC', granularity='day', datapoints=600) env.train(timesteps=1e6, ...
true
true
1c34f53fb3ea558447b8a363a8aeb941c702c8c5
557
py
Python
src/ap_games/ap_typing.py
aplatkouski/tic-tac-toe
d5dc8f5c1f75226989326163a18505e6d88a8f49
[ "MIT" ]
null
null
null
src/ap_games/ap_typing.py
aplatkouski/tic-tac-toe
d5dc8f5c1f75226989326163a18505e6d88a8f49
[ "MIT" ]
null
null
null
src/ap_games/ap_typing.py
aplatkouski/tic-tac-toe
d5dc8f5c1f75226989326163a18505e6d88a8f49
[ "MIT" ]
1
2020-08-25T12:51:53.000Z
2020-08-25T12:51:53.000Z
from __future__ import annotations from typing import Dict from typing import Literal from typing import Tuple from ap_games.ap_collections import Cell from ap_games.ap_collections import Coordinate from ap_games.ap_collections import Node Mark = Literal['X', 'O', ' ', ''] Empty = Literal[' '] PlayerMark = Literal['...
25.318182
67
0.723519
from __future__ import annotations from typing import Dict from typing import Literal from typing import Tuple from ap_games.ap_collections import Cell from ap_games.ap_collections import Coordinate from ap_games.ap_collections import Node Mark = Literal['X', 'O', ' ', ''] Empty = Literal[' '] PlayerMark = Literal['...
true
true
1c34f59d7b3d2551889648884bb963a9eb45ca7f
3,726
py
Python
examples/08_tfRecord.py
csehong/stanford-tensorflow-tutorials
fd93ff0568914724f2b9e97920eb8d6138efc52c
[ "MIT" ]
1
2020-11-24T09:35:19.000Z
2020-11-24T09:35:19.000Z
examples/08_tfRecord.py
csehong/stanford-tensorflow-tutorials
fd93ff0568914724f2b9e97920eb8d6138efc52c
[ "MIT" ]
null
null
null
examples/08_tfRecord.py
csehong/stanford-tensorflow-tutorials
fd93ff0568914724f2b9e97920eb8d6138efc52c
[ "MIT" ]
null
null
null
""" Examples to demonstrate how to write an image file to a TFRecord, and how to read a TFRecord file using TFRecordReader. Author: Chip Huyen Prepared for the class CS 20SI: "TensorFlow for Deep Learning Research" cs20si.stanford.edu """ import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import sys sys.path.append('..'...
36.174757
91
0.685185
import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import sys sys.path.append('..') from PIL import Image import numpy as np import matplotlib.pyplot as plt import tensorflow as tf IMAGE_PATH = 'data/' def _int64_feature(value): return tf.train.Feature(int64_list=tf.train.Int64List(value=[value])) def _bytes_featu...
true
true
1c34f636c13ffeacfc990b9129d8526b74bf2b7b
4,681
py
Python
tothc/managers.py
kennydo/tweets-of-the-highest-caliber
5f9d61ded2b4d9e0e65af0524321eac448c79a68
[ "MIT" ]
null
null
null
tothc/managers.py
kennydo/tweets-of-the-highest-caliber
5f9d61ded2b4d9e0e65af0524321eac448c79a68
[ "MIT" ]
null
null
null
tothc/managers.py
kennydo/tweets-of-the-highest-caliber
5f9d61ded2b4d9e0e65af0524321eac448c79a68
[ "MIT" ]
null
null
null
import datetime import logging from typing import List from databases.core import Connection from tothc import models log = logging.getLogger(__name__) class TwitterSubscriptionManager: @classmethod async def subscribe( cls, connection: Connection, *, user_id: int, ...
32.506944
107
0.553514
import datetime import logging from typing import List from databases.core import Connection from tothc import models log = logging.getLogger(__name__) class TwitterSubscriptionManager: @classmethod async def subscribe( cls, connection: Connection, *, user_id: int, ...
true
true
1c34f6884d500d11e54c5e32765f323a948b2fef
1,180
py
Python
release/stubs.min/Autodesk/Revit/DB/__init___parts/DataExchangeMessageSeverity.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/Autodesk/Revit/DB/__init___parts/DataExchangeMessageSeverity.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/Autodesk/Revit/DB/__init___parts/DataExchangeMessageSeverity.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
class DataExchangeMessageSeverity(Enum, IComparable, IFormattable, IConvertible): """ Error levels for DataExchangeLog enum DataExchangeMessageSeverity,values: Error (2),FatalError (3),Info (0),Warning (1) """ def __eq__(self, *args): """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__e...
24.583333
221
0.574576
class DataExchangeMessageSeverity(Enum, IComparable, IFormattable, IConvertible): def __eq__(self, *args): pass def __format__(self, *args): pass def __ge__(self, *args): pass def __gt__(self, *args): pass def __init__(self, *args): pass ...
true
true
1c34f713dedfef8b5b8a0e3a156db7d83a3fba3b
36,760
py
Python
lib/tests/test_bitcoin.py
D3m0nKingx/electrum-ganja
be204713107626f3e334e9fd5974c044a9f2ffb6
[ "MIT" ]
null
null
null
lib/tests/test_bitcoin.py
D3m0nKingx/electrum-ganja
be204713107626f3e334e9fd5974c044a9f2ffb6
[ "MIT" ]
null
null
null
lib/tests/test_bitcoin.py
D3m0nKingx/electrum-ganja
be204713107626f3e334e9fd5974c044a9f2ffb6
[ "MIT" ]
null
null
null
import base64 import unittest import sys from lib import bitcoin from lib.bitcoin import ( public_key_to_p2pkh, bip32_root, bip32_public_derivation, bip32_private_derivation, Hash, address_from_private_key, is_address, is_private_key, xpub_from_xprv, is_new_seed, is_old_seed, var_int, op_push, addr...
52.664756
1,378
0.707671
import base64 import unittest import sys from lib import bitcoin from lib.bitcoin import ( public_key_to_p2pkh, bip32_root, bip32_public_derivation, bip32_private_derivation, Hash, address_from_private_key, is_address, is_private_key, xpub_from_xprv, is_new_seed, is_old_seed, var_int, op_push, addr...
true
true