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
1c2ec0f20aafdc10453e7ffdfe838dced43ab3ef
50,440
py
Python
wagtail/admin/views/pages.py
kjartansverrisson/wagtail
d202195333e11faf5e1c42fc9a154cbe88d5e689
[ "BSD-3-Clause" ]
null
null
null
wagtail/admin/views/pages.py
kjartansverrisson/wagtail
d202195333e11faf5e1c42fc9a154cbe88d5e689
[ "BSD-3-Clause" ]
2
2020-05-01T06:02:28.000Z
2020-09-24T09:27:08.000Z
wagtail/admin/views/pages.py
kjartansverrisson/wagtail
d202195333e11faf5e1c42fc9a154cbe88d5e689
[ "BSD-3-Clause" ]
1
2020-03-09T08:05:56.000Z
2020-03-09T08:05:56.000Z
from time import time from django.contrib.contenttypes.models import ContentType from django.core.exceptions import PermissionDenied from django.core.paginator import Paginator from django.db import transaction from django.db.models import Count from django.http import Http404, HttpResponse, JsonResponse from django.h...
38.979907
195
0.628886
from time import time from django.contrib.contenttypes.models import ContentType from django.core.exceptions import PermissionDenied from django.core.paginator import Paginator from django.db import transaction from django.db.models import Count from django.http import Http404, HttpResponse, JsonResponse from django.h...
true
true
1c2ec2a5a869df996ee9bf32ef07179dc62555f2
2,633
py
Python
src/test/parser/template/node_tests/test_base.py
narnikgamarnikus/program-y
777b9a8a75ec787c037de9f11a8527875ff450b1
[ "MIT" ]
null
null
null
src/test/parser/template/node_tests/test_base.py
narnikgamarnikus/program-y
777b9a8a75ec787c037de9f11a8527875ff450b1
[ "MIT" ]
null
null
null
src/test/parser/template/node_tests/test_base.py
narnikgamarnikus/program-y
777b9a8a75ec787c037de9f11a8527875ff450b1
[ "MIT" ]
null
null
null
import xml.etree.ElementTree as ET from programy.parser.template.nodes.base import TemplateNode from programy.parser.template.nodes.word import TemplateWordNode from programy.parser.template.nodes.id import TemplateIdNode from programy.parser.template.nodes.srai import TemplateSRAINode from test.parser.template.base ...
40.507692
118
0.64793
import xml.etree.ElementTree as ET from programy.parser.template.nodes.base import TemplateNode from programy.parser.template.nodes.word import TemplateWordNode from programy.parser.template.nodes.id import TemplateIdNode from programy.parser.template.nodes.srai import TemplateSRAINode from test.parser.template.base ...
true
true
1c2ec2a610c90310555eabd176019815f61ca306
422
py
Python
pollster/urls.py
Timoh97/eVote-Intell
20044a41b41a5437eebc6c704592c0b0bf85d92a
[ "MIT" ]
null
null
null
pollster/urls.py
Timoh97/eVote-Intell
20044a41b41a5437eebc6c704592c0b0bf85d92a
[ "MIT" ]
null
null
null
pollster/urls.py
Timoh97/eVote-Intell
20044a41b41a5437eebc6c704592c0b0bf85d92a
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import include, path from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('', include('pages.urls')), path('polls/', include('polls.urls')), path('admin/', admin.site.urls), path('', include('users.urls')), ]...
26.375
80
0.71327
from django.contrib import admin from django.urls import include, path from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('', include('pages.urls')), path('polls/', include('polls.urls')), path('admin/', admin.site.urls), path('', include('users.urls')), ]...
true
true
1c2ec34f43ca0917576c97710652026196d402a3
445
py
Python
helpers.py
pawangeek/Innovacer-Intern
1b3e239a63244670b72a2c0c0513d75c0d95cd86
[ "MIT" ]
null
null
null
helpers.py
pawangeek/Innovacer-Intern
1b3e239a63244670b72a2c0c0513d75c0d95cd86
[ "MIT" ]
1
2021-06-02T00:45:03.000Z
2021-06-02T00:45:03.000Z
helpers.py
pawangeek/Innovacer-Intern
1b3e239a63244670b72a2c0c0513d75c0d95cd86
[ "MIT" ]
null
null
null
from twilio.rest import Client import smtplib def sendmail(message,sender,receiver,password): s = smtplib.SMTP('smtp.gmail.com', 587) s.starttls() s.login(sender, password) s.sendmail(sender, receiver, message) s.quit() def sendmsg(message,receiver): account_sid = '' auth_token = '' c...
26.176471
84
0.703371
from twilio.rest import Client import smtplib def sendmail(message,sender,receiver,password): s = smtplib.SMTP('smtp.gmail.com', 587) s.starttls() s.login(sender, password) s.sendmail(sender, receiver, message) s.quit() def sendmsg(message,receiver): account_sid = '' auth_token = '' c...
true
true
1c2ec438c82f5d97cc085888116ae9b52dc90aef
3,927
py
Python
videos-master/_2018/eop/chapter1/million_flips.py
samsmusa/My-manim-master
a79266ea21fbb7e84d0133030146549f381c31cb
[ "MIT" ]
5
2021-03-18T02:28:07.000Z
2021-04-10T03:40:24.000Z
videos-master/_2018/eop/chapter1/million_flips.py
samsmusa/My-manim-master
a79266ea21fbb7e84d0133030146549f381c31cb
[ "MIT" ]
null
null
null
videos-master/_2018/eop/chapter1/million_flips.py
samsmusa/My-manim-master
a79266ea21fbb7e84d0133030146549f381c31cb
[ "MIT" ]
1
2022-02-16T03:22:47.000Z
2022-02-16T03:22:47.000Z
from manim_imports_ext import * from _2018.eop.reusable_imports import * class MillionFlips(Scene): def construct(self): title = TexText("1{,}000{,}000 flips") title.to_edge(UP) self.add(title) small_wait_time = 1.0 / 15 # Um... n_flips_label = TexText("\\# Flips: ") ...
33
76
0.569646
from manim_imports_ext import * from _2018.eop.reusable_imports import * class MillionFlips(Scene): def construct(self): title = TexText("1{,}000{,}000 flips") title.to_edge(UP) self.add(title) small_wait_time = 1.0 / 15 n_flips_label = TexText("\\# Flips: ") n_...
true
true
1c2ec67d2fe3ccd4f635ade02be7acc0755fd5d1
1,381
py
Python
node-client/CasperLabs.py
wimel/CasperLabs
40be04ada8c718eebf765519f25b86d381276bd4
[ "Apache-2.0" ]
null
null
null
node-client/CasperLabs.py
wimel/CasperLabs
40be04ada8c718eebf765519f25b86d381276bd4
[ "Apache-2.0" ]
null
null
null
node-client/CasperLabs.py
wimel/CasperLabs
40be04ada8c718eebf765519f25b86d381276bd4
[ "Apache-2.0" ]
null
null
null
'''CasperLabs node client Usage: python CasperLabs.py contract1.rho python CasperLabs.py -c 'new x in { x!(1 + 1) }' We assume the CasperLabs node is running and that it is listening on port 5000. Double-check that you see this message in the logs: Server started, listening on 50000 The output should be somet...
25.574074
73
0.642288
from __future__ import print_function import repl_pb2 import repl_pb2_grpc def main(argv, stdout, insecure_channel, host='127.0.0.1', port=50000): channel = insecure_channel('%s:%s' % (host, port)) replCh = repl_pb2_grpc.ReplStub(channel) if '-c' in argv: line = argv[-1] ...
true
true
1c2ec69d36b4278d011acfe99a84032bb18b7934
5,259
py
Python
maskrcnn_benchmark/data/datasets/coco.py
Iamal1/maskrcnn-benchmark
d53c1986e72c6a647179f5bf0e060db1160a1a42
[ "MIT" ]
null
null
null
maskrcnn_benchmark/data/datasets/coco.py
Iamal1/maskrcnn-benchmark
d53c1986e72c6a647179f5bf0e060db1160a1a42
[ "MIT" ]
null
null
null
maskrcnn_benchmark/data/datasets/coco.py
Iamal1/maskrcnn-benchmark
d53c1986e72c6a647179f5bf0e060db1160a1a42
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import torch import torchvision from maskrcnn_benchmark.structures.bounding_box import BoxList from maskrcnn_benchmark.structures.segmentation_mask import SegmentationMask from maskrcnn_benchmark.structures.keypoint import PersonKeypoints from to...
36.520833
113
0.630728
import torch import torchvision from maskrcnn_benchmark.structures.bounding_box import BoxList from maskrcnn_benchmark.structures.segmentation_mask import SegmentationMask from maskrcnn_benchmark.structures.keypoint import PersonKeypoints from torch.distributions.beta import Beta from PIL import Image import logging...
true
true
1c2ec7b68935225eff86132b336f0e0e3d582fbb
518
py
Python
tests/extension/thread_/stream_ringbuffer_stall/test_thread_stream_ringbuffer_stall.py
jesseclin/veriloggen
a645f2c53f04e5b88213eef17779d212192ea2b5
[ "Apache-2.0" ]
232
2015-09-01T16:07:48.000Z
2022-03-28T14:53:28.000Z
tests/extension/thread_/stream_ringbuffer_stall/test_thread_stream_ringbuffer_stall.py
jesseclin/veriloggen
a645f2c53f04e5b88213eef17779d212192ea2b5
[ "Apache-2.0" ]
34
2015-08-21T09:13:03.000Z
2022-03-21T23:52:44.000Z
tests/extension/thread_/stream_ringbuffer_stall/test_thread_stream_ringbuffer_stall.py
jesseclin/veriloggen
a645f2c53f04e5b88213eef17779d212192ea2b5
[ "Apache-2.0" ]
46
2015-09-24T14:39:57.000Z
2022-02-23T21:59:56.000Z
from __future__ import absolute_import from __future__ import print_function import os import veriloggen import thread_stream_ringbuffer_stall def test(request): veriloggen.reset() simtype = request.config.getoption('--sim') rslt = thread_stream_ringbuffer_stall.run(filename=None, simtype=simtype, ...
27.263158
114
0.69112
from __future__ import absolute_import from __future__ import print_function import os import veriloggen import thread_stream_ringbuffer_stall def test(request): veriloggen.reset() simtype = request.config.getoption('--sim') rslt = thread_stream_ringbuffer_stall.run(filename=None, simtype=simtype, ...
true
true
1c2eca595410e26023ed5a93ba28e9991119cccd
12,483
py
Python
2021/Problem 24.py
christopherliu/advent-of-code
d18b54c538e7af608ba2efd92bf469b28ad5fe98
[ "MIT" ]
null
null
null
2021/Problem 24.py
christopherliu/advent-of-code
d18b54c538e7af608ba2efd92bf469b28ad5fe98
[ "MIT" ]
null
null
null
2021/Problem 24.py
christopherliu/advent-of-code
d18b54c538e7af608ba2efd92bf469b28ad5fe98
[ "MIT" ]
null
null
null
import itertools from dataclasses import dataclass @dataclass class Instruction: name: "str" = None argA: "str" = None argB: "str" = None class MONAD(): def __init__(self, instructions): self.instructions = instructions def reset(self): self.variables = { "w": 0, ...
54.991189
250
0.621325
import itertools from dataclasses import dataclass @dataclass class Instruction: name: "str" = None argA: "str" = None argB: "str" = None class MONAD(): def __init__(self, instructions): self.instructions = instructions def reset(self): self.variables = { "w": 0, ...
true
true
1c2eca9be52290e0ec2122ab12558d3900b0af13
145
py
Python
functions/cmd_print.py
morozoffnor/govnoed_grisha_rewritten
6a34336cede03a081954479f998d5a8162e1a31d
[ "Apache-2.0" ]
null
null
null
functions/cmd_print.py
morozoffnor/govnoed_grisha_rewritten
6a34336cede03a081954479f998d5a8162e1a31d
[ "Apache-2.0" ]
null
null
null
functions/cmd_print.py
morozoffnor/govnoed_grisha_rewritten
6a34336cede03a081954479f998d5a8162e1a31d
[ "Apache-2.0" ]
null
null
null
async def cmd_print(type, msg): if type == 'debug': print('[DEBUG] ' + msg) elif type == 'error': print('[ERROR] ' + msg)
29
31
0.510345
async def cmd_print(type, msg): if type == 'debug': print('[DEBUG] ' + msg) elif type == 'error': print('[ERROR] ' + msg)
true
true
1c2ecbe1f6b05a7858b30f9647bf59ee17958586
6,952
py
Python
robonomics_liability/src/robonomics_liability/LiabilityExecutionsPersistence.py
Vourhey/robonomics_comm
1b7c6dc85985909cb925d82b1081ec556423029e
[ "BSD-3-Clause" ]
16
2017-11-15T15:20:34.000Z
2021-08-05T03:08:13.000Z
robonomics_liability/src/robonomics_liability/LiabilityExecutionsPersistence.py
aang1985/robonomics_comm
4f7a339e01cbd00fc0f51405c77d89d6ae5e0d7d
[ "BSD-3-Clause" ]
80
2018-02-08T22:44:41.000Z
2021-07-15T10:12:09.000Z
robonomics_liability/src/robonomics_liability/LiabilityExecutionsPersistence.py
aang1985/robonomics_comm
4f7a339e01cbd00fc0f51405c77d89d6ae5e0d7d
[ "BSD-3-Clause" ]
13
2018-02-08T14:22:26.000Z
2021-11-20T00:29:14.000Z
import rospy import shelve import time from threading import Lock, Timer from robonomics_liability.msg import Liability, LiabilityExecutionTimestamp from robonomics_liability.srv import PersistenceContainsLiability, PersistenceContainsLiabilityResponse, PersistenceLiabilityTimestamp, PersistenceLiabilityTimestampRespon...
49.657143
173
0.710875
import rospy import shelve import time from threading import Lock, Timer from robonomics_liability.msg import Liability, LiabilityExecutionTimestamp from robonomics_liability.srv import PersistenceContainsLiability, PersistenceContainsLiabilityResponse, PersistenceLiabilityTimestamp, PersistenceLiabilityTimestampRespon...
true
true
1c2ecd001c90904790561e0bd820cdd3c213c213
3,282
py
Python
frameworks/Python/fastapi/app.py
tommilligan/FrameworkBenchmarks
a5bad622429f14f13d872589d7054aefaa75002d
[ "BSD-3-Clause" ]
5,300
2015-01-02T08:04:20.000Z
2022-03-31T10:08:33.000Z
frameworks/Python/fastapi/app.py
tommilligan/FrameworkBenchmarks
a5bad622429f14f13d872589d7054aefaa75002d
[ "BSD-3-Clause" ]
3,075
2015-01-01T05:11:45.000Z
2022-03-31T23:56:33.000Z
frameworks/Python/fastapi/app.py
tommilligan/FrameworkBenchmarks
a5bad622429f14f13d872589d7054aefaa75002d
[ "BSD-3-Clause" ]
2,151
2015-01-02T14:16:09.000Z
2022-03-30T00:15:26.000Z
import asyncio import asyncpg import os import jinja2 from fastapi import FastAPI from starlette.responses import HTMLResponse, UJSONResponse, PlainTextResponse from random import randint from operator import itemgetter from urllib.parse import parse_qs READ_ROW_SQL = 'SELECT "randomnumber", "id" FROM "world" WHERE i...
27.579832
83
0.704144
import asyncio import asyncpg import os import jinja2 from fastapi import FastAPI from starlette.responses import HTMLResponse, UJSONResponse, PlainTextResponse from random import randint from operator import itemgetter from urllib.parse import parse_qs READ_ROW_SQL = 'SELECT "randomnumber", "id" FROM "world" WHERE i...
true
true
1c2ecd7374ac4b43cc0c12a94a556e95164106a8
190
py
Python
tests/test_train.py
hugobb/sgda
69dcda47bb2c5b76d46ead32eb46ab5fb5e5e6d3
[ "MIT" ]
1
2022-02-16T04:20:02.000Z
2022-02-16T04:20:02.000Z
tests/test_train.py
hugobb/sgda
69dcda47bb2c5b76d46ead32eb46ab5fb5e5e6d3
[ "MIT" ]
null
null
null
tests/test_train.py
hugobb/sgda
69dcda47bb2c5b76d46ead32eb46ab5fb5e5e6d3
[ "MIT" ]
null
null
null
import unittest from gamesopt.train import train, TrainConfig class TestOptimizer(unittest.TestCase): def test_sgda(self): config = TrainConfig(num_iter=2) train(config)
27.142857
45
0.736842
import unittest from gamesopt.train import train, TrainConfig class TestOptimizer(unittest.TestCase): def test_sgda(self): config = TrainConfig(num_iter=2) train(config)
true
true
1c2ecdc1af37318f9cd7610ded59ac8671542db2
1,589
py
Python
cinema/mainapp/models.py
Floou/cinema
83a921ff802abaa632c336db4f9e5f4ca2907199
[ "Apache-2.0" ]
null
null
null
cinema/mainapp/models.py
Floou/cinema
83a921ff802abaa632c336db4f9e5f4ca2907199
[ "Apache-2.0" ]
null
null
null
cinema/mainapp/models.py
Floou/cinema
83a921ff802abaa632c336db4f9e5f4ca2907199
[ "Apache-2.0" ]
null
null
null
from django.db import models, transaction, DatabaseError from authapp.models import UserProfile class Film(models.Model): title = models.CharField(max_length=128, unique=True) description = models.TextField() # image = models.ImageField(upload_to='') audience = models.ManyToManyField('authapp.UserProf...
30.557692
85
0.670233
from django.db import models, transaction, DatabaseError from authapp.models import UserProfile class Film(models.Model): title = models.CharField(max_length=128, unique=True) description = models.TextField() audience = models.ManyToManyField('authapp.UserProfile', related_name='audience') is_act...
true
true
1c2eceafcca534e953adf57c5c2827527a921f25
3,936
py
Python
data/scripts/make_aga_db.py
flovo/goratings
50b5443b73daae64306e256205eabee8f4815c65
[ "MIT" ]
13
2020-07-02T16:43:12.000Z
2021-12-12T00:12:48.000Z
data/scripts/make_aga_db.py
flovo/goratings
50b5443b73daae64306e256205eabee8f4815c65
[ "MIT" ]
13
2020-07-05T10:06:42.000Z
2022-02-27T10:03:24.000Z
data/scripts/make_aga_db.py
flovo/goratings
50b5443b73daae64306e256205eabee8f4815c65
[ "MIT" ]
2
2020-07-04T11:19:37.000Z
2021-01-15T16:46:32.000Z
#!/usr/bin/env pypy3 import csv import gzip import json import sqlite3 import sys from collections import defaultdict from math import isnan from dateutil import parser AGA_OFFSET = 2000000000 """ SELECT 0 `Game_ID`, 1 `Tournament_Code`, 2 `Game_Date`, 3 `Round`, 4 `Pin_Player_1`, 5 `Color_1`, 6 `Rank_1`, 7 ...
18.222222
113
0.559705
import csv import gzip import json import sqlite3 import sys from collections import defaultdict from math import isnan from dateutil import parser AGA_OFFSET = 2000000000 conn = sqlite3.connect("aga-data.db") c = conn.cursor() c.execute("DROP TABLE IF EXISTS game_records") c.execute( """ CREATE TABLE IF...
true
true
1c2ed0aa04526ddcb2922cc6b0d30d24707b557f
1,396
py
Python
ciphers/transposition_cipher.py
KirilBangachev/Python
7ad45a46e02edda86a45969de8768f26ef44b306
[ "MIT" ]
6
2019-03-30T14:09:34.000Z
2020-07-26T02:45:22.000Z
ciphers/transposition_cipher.py
KirilBangachev/Python
7ad45a46e02edda86a45969de8768f26ef44b306
[ "MIT" ]
1
2019-09-01T06:43:06.000Z
2019-09-01T06:44:55.000Z
ciphers/transposition_cipher.py
KirilBangachev/Python
7ad45a46e02edda86a45969de8768f26ef44b306
[ "MIT" ]
7
2018-11-26T05:48:16.000Z
2021-05-15T17:12:08.000Z
import math def main(): message = input('Enter message: ') key = int(input('Enter key [2-%s]: ' % (len(message) - 1))) mode = input('Encryption/Decryption [e/d]: ') if mode.lower().startswith('e'): text = encryptMessage(key, message) elif mode.lower().startswith('d'): text = decryp...
25.851852
90
0.567335
import math def main(): message = input('Enter message: ') key = int(input('Enter key [2-%s]: ' % (len(message) - 1))) mode = input('Encryption/Decryption [e/d]: ') if mode.lower().startswith('e'): text = encryptMessage(key, message) elif mode.lower().startswith('d'): text = decryp...
true
true
1c2ed0f7dd19b2b52848f7ccb350aac69ffa9104
1,606
py
Python
tests/menu_test_9.py
sourcery-ai-bot/Qprompt
baa4810d7a2db450c659983179ff051706b6dadd
[ "MIT" ]
49
2017-01-20T04:57:27.000Z
2022-01-11T17:35:45.000Z
tests/menu_test_9.py
sourcery-ai-bot/Qprompt
baa4810d7a2db450c659983179ff051706b6dadd
[ "MIT" ]
14
2016-02-19T05:53:12.000Z
2020-01-11T16:08:16.000Z
tests/menu_test_9.py
sourcery-ai-bot/Qprompt
baa4810d7a2db450c659983179ff051706b6dadd
[ "MIT" ]
7
2018-06-16T14:30:26.000Z
2020-06-03T23:28:14.000Z
"""Tests menu 'result' option return.""" ##==============================================================# ## SECTION: Imports # ##==============================================================# from testlib import * from qprompt import Menu ##============================...
26.766667
65
0.339352
lf.menu.main(loop=True) self.assertEqual(2, TOTAL) def inc(): global TOTAL TOTAL += 1 def dec(): global TOTAL TOTAL -= 1
true
true
1c2ed11906e34fdfd3a4357898cc9db0b3e19171
11,105
py
Python
octavia/amphorae/backends/agent/api_server/plug.py
zjchao/octavia
e07031fa78604568c6e2112cb4cb147661bc57d7
[ "Apache-2.0" ]
null
null
null
octavia/amphorae/backends/agent/api_server/plug.py
zjchao/octavia
e07031fa78604568c6e2112cb4cb147661bc57d7
[ "Apache-2.0" ]
null
null
null
octavia/amphorae/backends/agent/api_server/plug.py
zjchao/octavia
e07031fa78604568c6e2112cb4cb147661bc57d7
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Hewlett-Packard Development Company, L.P. # Copyright 2016 Rackspace # # 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...
41.12963
79
0.622242
import ipaddress import os import socket import stat import subprocess import jinja2 from oslo_config import cfg from oslo_log import log as logging import pyroute2 import six import webob from werkzeug import exceptions import netifaces from octavia.common import constants as consts CONF = cfg.CONF ...
true
true
1c2ed1198a770c6d0b0fcfb644dd93fa1250cc4c
1,382
py
Python
imgdata.py
DrNH4CK3R/Img-Forensic
223c0fe37735a30b18b626e894a5aff384a60e37
[ "MIT" ]
1
2021-09-23T05:38:32.000Z
2021-09-23T05:38:32.000Z
imgdata.py
DrNH4CK3R/Img-Forensic
223c0fe37735a30b18b626e894a5aff384a60e37
[ "MIT" ]
null
null
null
imgdata.py
DrNH4CK3R/Img-Forensic
223c0fe37735a30b18b626e894a5aff384a60e37
[ "MIT" ]
null
null
null
from PIL import Image from PIL.ExifTags import TAGS import os import sys import time lgreen = '\033[92m' cyan = '\033[96m' bold = '\033[01m' red = '\033[31m' os.system("clear") print(bold+red+""" ___ ____ _ |_ _|_ __ ___ __ _ | _ \ __ _| |_ __ _ | || '_ ` ...
21.59375
69
0.471056
from PIL import Image from PIL.ExifTags import TAGS import os import sys import time lgreen = '\033[92m' cyan = '\033[96m' bold = '\033[01m' red = '\033[31m' os.system("clear") print(bold+red+""" ___ ____ _ |_ _|_ __ ___ __ _ | _ \ __ _| |_ __ _ | || '_ ` ...
true
true
1c2ed220c9c1e6a8dc2d7c4db9055675dd77049b
4,607
py
Python
django/contrib/auth/management/__init__.py
kkoralsky/django
924af638e4d4fb8eb46a19ac0cafcb2e83480cf3
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
django/contrib/auth/management/__init__.py
kkoralsky/django
924af638e4d4fb8eb46a19ac0cafcb2e83480cf3
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
django/contrib/auth/management/__init__.py
kkoralsky/django
924af638e4d4fb8eb46a19ac0cafcb2e83480cf3
[ "PSF-2.0", "BSD-3-Clause" ]
1
2020-02-06T10:31:51.000Z
2020-02-06T10:31:51.000Z
""" Creates permissions for all installed apps that need permissions. """ import getpass import unicodedata from django.apps import apps as global_apps from django.contrib.auth import get_permission_codename from django.core import exceptions from django.db import DEFAULT_DB_ALIAS, router def _get_all_permissions(op...
32.443662
118
0.666594
import getpass import unicodedata from django.apps import apps as global_apps from django.contrib.auth import get_permission_codename from django.core import exceptions from django.db import DEFAULT_DB_ALIAS, router def _get_all_permissions(opts): builtin = _get_builtin_permissions(opts) custom = list(opts.p...
true
true
1c2ed251c6ebe0f19446db9655fb31fc40f8030c
2,927
py
Python
ci/create_codewind_index.py
josiemundi/stacks
e9e90a93d17a2719e9f26ee7cac05abe697fddd7
[ "Apache-2.0" ]
96
2019-06-19T14:47:05.000Z
2022-02-20T09:31:14.000Z
ci/create_codewind_index.py
josiemundi/stacks
e9e90a93d17a2719e9f26ee7cac05abe697fddd7
[ "Apache-2.0" ]
591
2019-06-24T20:49:42.000Z
2022-02-20T12:26:28.000Z
ci/create_codewind_index.py
josiemundi/stacks
e9e90a93d17a2719e9f26ee7cac05abe697fddd7
[ "Apache-2.0" ]
127
2019-06-21T10:02:15.000Z
2021-08-10T11:55:18.000Z
#!/usr/bin/env python3 import yaml import json import os import fnmatch from collections import OrderedDict import argparse from argparse import ArgumentDefaultsHelpFormatter parser = argparse.ArgumentParser(formatter_class=ArgumentDefaultsHelpFormatter) parser.add_argument("-n", "--namePrefix", help="Display name p...
41.814286
143
0.460198
import yaml import json import os import fnmatch from collections import OrderedDict import argparse from argparse import ArgumentDefaultsHelpFormatter parser = argparse.ArgumentParser(formatter_class=ArgumentDefaultsHelpFormatter) parser.add_argument("-n", "--namePrefix", help="Display name prefix.", default="Apps...
true
true
1c2ed2577fc97422b4a279da2c5778ffedaef873
2,333
py
Python
PAMT.py
PuffinDev/PAMT
a398e049c40920e58cebc0c502f1e7020aa82d04
[ "MIT" ]
null
null
null
PAMT.py
PuffinDev/PAMT
a398e049c40920e58cebc0c502f1e7020aa82d04
[ "MIT" ]
null
null
null
PAMT.py
PuffinDev/PAMT
a398e049c40920e58cebc0c502f1e7020aa82d04
[ "MIT" ]
null
null
null
import sys import os import time import json import fnmatch from progress.bar import Bar # Python Anti-Malware Toolkit root = "/" #'/' for linux 'C:\' for windows patterns = ['*.py', '*.sh'] matching_files = [] dangerous_files = [] bad_content = b'rm -rf' #Files that contain this text will be blacklisted banner =...
25.922222
104
0.520789
import sys import os import time import json import fnmatch from progress.bar import Bar root = "/" patterns = ['*.py', '*.sh'] matching_files = [] dangerous_files = [] bad_content = b'rm -rf' banner = \ '\u001b[34;1m' + """ ------------------------------- | __ \ /\ | \/ |__ __| | |__) / \ | \ / | ...
true
true
1c2ed25db044f12f0682b55f85596a61dca543f5
8,696
py
Python
src/ebay_rest/api/sell_account/models/fulfillment_policy_response.py
matecsaj/ebay_rest
dd23236f39e05636eff222f99df1e3699ce47d4a
[ "MIT" ]
3
2021-12-12T04:28:03.000Z
2022-03-10T03:29:18.000Z
src/ebay_rest/api/sell_account/models/fulfillment_policy_response.py
jdavv/ebay_rest
20fc88c6aefdae9ab90f9c1330e79abddcd750cd
[ "MIT" ]
33
2021-06-16T20:44:36.000Z
2022-03-30T14:55:06.000Z
src/ebay_rest/api/sell_account/models/fulfillment_policy_response.py
jdavv/ebay_rest
20fc88c6aefdae9ab90f9c1330e79abddcd750cd
[ "MIT" ]
7
2021-06-03T09:30:23.000Z
2022-03-08T19:51:33.000Z
# coding: utf-8 """ Account API The <b>Account API</b> gives sellers the ability to configure their eBay seller accounts, including the seller's policies (seller-defined custom policies and eBay business policies), opt in and out of eBay seller programs, configure sales tax tables, and get account information...
30.946619
479
0.598436
import pprint import re import six class FulfillmentPolicyResponse(object): swagger_types = { 'fulfillment_policies': 'list[FulfillmentPolicy]', 'href': 'str', 'limit': 'int', 'next': 'str', 'offset': 'int', 'prev': 'str', 'total': 'int' } attr...
true
true
1c2ed28d9edb990dad0e6868305d0ddaf594099a
846
py
Python
02.translate-bots/kakao_bot.1.py
TTEarth/chatbothon
091ab78e8fce3dd942cf4e829f198f70a835380f
[ "Apache-2.0" ]
1
2018-11-25T01:46:30.000Z
2018-11-25T01:46:30.000Z
02.translate-bots/kakao_bot.1.py
TTEarth/chatbothon
091ab78e8fce3dd942cf4e829f198f70a835380f
[ "Apache-2.0" ]
null
null
null
02.translate-bots/kakao_bot.1.py
TTEarth/chatbothon
091ab78e8fce3dd942cf4e829f198f70a835380f
[ "Apache-2.0" ]
2
2018-11-18T02:49:16.000Z
2018-11-25T03:05:17.000Z
# -*- coding: utf-8 -*- from flask import Flask from flask import request from flask import jsonify from flask import json from googletrans import Translator app = Flask(__name__) @app.route("/keyboard") def keyboard(): return jsonify(type="text") @app.route("/message", methods=["POST"]) def message(): data...
22.864865
67
0.635934
from flask import Flask from flask import request from flask import jsonify from flask import json from googletrans import Translator app = Flask(__name__) @app.route("/keyboard") def keyboard(): return jsonify(type="text") @app.route("/message", methods=["POST"]) def message(): data = json.loads(request.d...
true
true
1c2ed813675282f66b63170ef08fc72abf9aefb4
53,809
py
Python
tensorflow/python/keras/callbacks.py
takafreak/tensorflow
b85cb440e257a367fb70f8321ddaa669d1bd9fae
[ "Apache-2.0" ]
2
2020-12-06T02:26:32.000Z
2021-08-20T03:40:32.000Z
tensorflow/python/keras/callbacks.py
takafreak/tensorflow
b85cb440e257a367fb70f8321ddaa669d1bd9fae
[ "Apache-2.0" ]
null
null
null
tensorflow/python/keras/callbacks.py
takafreak/tensorflow
b85cb440e257a367fb70f8321ddaa669d1bd9fae
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
34.648422
80
0.657344
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import copy import csv import io import json import os import time import numpy as np import six from tensorflow.python.data.ops import iterator_ops from tensorflow.python.ea...
true
true
1c2ed867e0956d8de08780e0ee8cf45c04524811
4,788
py
Python
opsgenie_swagger/models/list_user_forwarding_rules_response.py
Logicworks/opsgenie-python-sdk
244c4c40ddcc25e70df5ba4425ab8d7c8da59c18
[ "Apache-2.0" ]
null
null
null
opsgenie_swagger/models/list_user_forwarding_rules_response.py
Logicworks/opsgenie-python-sdk
244c4c40ddcc25e70df5ba4425ab8d7c8da59c18
[ "Apache-2.0" ]
null
null
null
opsgenie_swagger/models/list_user_forwarding_rules_response.py
Logicworks/opsgenie-python-sdk
244c4c40ddcc25e70df5ba4425ab8d7c8da59c18
[ "Apache-2.0" ]
1
2020-11-07T11:27:13.000Z
2020-11-07T11:27:13.000Z
# coding: utf-8 """ OpsGenie REST API OpsGenie OpenAPI Specification # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from opsgenie_swagger.models.base_response import BaseResponse ...
28.164706
96
0.591061
import pprint import re import six from opsgenie_swagger.models.base_response import BaseResponse from opsgenie_swagger.models.forwarding_rule import ForwardingRule class ListUserForwardingRulesResponse(object): swagger_types = { 'request_id': 'str', 'took': 'float', 'data': '...
true
true
1c2ed9606f75c5dc16def840ff41f8e1d5d88501
26,633
py
Python
train_acne.py
wenh06/yolov4_acne_torch
8eda65ff6805ec313de39c74aea12a774657f3ff
[ "Apache-2.0" ]
null
null
null
train_acne.py
wenh06/yolov4_acne_torch
8eda65ff6805ec313de39c74aea12a774657f3ff
[ "Apache-2.0" ]
null
null
null
train_acne.py
wenh06/yolov4_acne_torch
8eda65ff6805ec313de39c74aea12a774657f3ff
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' train acne detector using the enhanced ACNE04 dataset More reference: [1] https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html ''' import time import logging import os, sys import argparse from collections import deque import datetime import cv2 from tqdm import tqdm import...
40.475684
274
0.578943
import time import logging import os, sys import argparse from collections import deque import datetime import cv2 from tqdm import tqdm import numpy as np import torch import torch.nn as nn from torch.utils.data import DataLoader from torch import optim from torch.nn import functional as F from tensorboardX import S...
true
true
1c2ed974fbbbbb2a48514a7e2f63e0a2bfa50dd4
5,532
py
Python
mayan/apps/events/apps.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
2
2021-09-12T19:41:19.000Z
2021-09-12T19:41:20.000Z
mayan/apps/events/apps.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
37
2021-09-13T01:00:12.000Z
2021-10-02T03:54:30.000Z
mayan/apps/events/apps.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
1
2021-09-22T13:17:30.000Z
2021-09-22T13:17:30.000Z
from django.apps import apps from django.db import models from django.utils.translation import ugettext_lazy as _ from mayan.apps.acls.classes import ModelPermission from mayan.apps.common.apps import MayanAppConfig from mayan.apps.common.menus import ( menu_object, menu_secondary, menu_tools, menu_topbar, ...
37.378378
80
0.618764
from django.apps import apps from django.db import models from django.utils.translation import ugettext_lazy as _ from mayan.apps.acls.classes import ModelPermission from mayan.apps.common.apps import MayanAppConfig from mayan.apps.common.menus import ( menu_object, menu_secondary, menu_tools, menu_topbar, ...
true
true
1c2edb084a5b7ee65534fb4e2d94be0da9da3cb1
3,772
py
Python
neutron/tests/unit/plugins/ml2/drivers/openvswitch/mech_driver/test_mech_openvswitch.py
freyes/neutron
197c222acb0390728106a083d1663f2c06427518
[ "Apache-2.0" ]
null
null
null
neutron/tests/unit/plugins/ml2/drivers/openvswitch/mech_driver/test_mech_openvswitch.py
freyes/neutron
197c222acb0390728106a083d1663f2c06427518
[ "Apache-2.0" ]
null
null
null
neutron/tests/unit/plugins/ml2/drivers/openvswitch/mech_driver/test_mech_openvswitch.py
freyes/neutron
197c222acb0390728106a083d1663f2c06427518
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
36.621359
78
0.66702
from neutron_lib import constants from oslo_config import cfg from neutron.extensions import portbindings from neutron.plugins.ml2.drivers.openvswitch.mech_driver \ import mech_openvswitch from neutron.tests.unit.plugins.ml2 import _test_mech_agent as base class OpenvswitchMechanismBaseTestCase(ba...
true
true
1c2edb8e78463062d4857c48a4c77384850b37df
660
py
Python
myblog/migrations/0001_initial.py
dahn510/MySite
5c2c0ccaf84e5f1e121742cd18a953cfb86f282d
[ "Apache-2.0" ]
null
null
null
myblog/migrations/0001_initial.py
dahn510/MySite
5c2c0ccaf84e5f1e121742cd18a953cfb86f282d
[ "Apache-2.0" ]
null
null
null
myblog/migrations/0001_initial.py
dahn510/MySite
5c2c0ccaf84e5f1e121742cd18a953cfb86f282d
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2.5 on 2021-08-30 07:08 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='BlogPost', fields=[ ...
26.4
117
0.592424
from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='BlogPost', fields=[ ('id', models.BigAutoField(auto_created=T...
true
true
1c2edf1fee0d85ae37227aad5c672476c5e53e16
1,807
py
Python
_project/pullup/migrations/0005_auto_20181017_0710.py
SucheG/cayman-pullup.cz
a03bb58d5ff3ef3dba431bd4e900e6b3649c48f8
[ "CC0-1.0" ]
null
null
null
_project/pullup/migrations/0005_auto_20181017_0710.py
SucheG/cayman-pullup.cz
a03bb58d5ff3ef3dba431bd4e900e6b3649c48f8
[ "CC0-1.0" ]
null
null
null
_project/pullup/migrations/0005_auto_20181017_0710.py
SucheG/cayman-pullup.cz
a03bb58d5ff3ef3dba431bd4e900e6b3649c48f8
[ "CC0-1.0" ]
1
2018-10-08T16:56:40.000Z
2018-10-08T16:56:40.000Z
# Generated by Django 2.1 on 2018-10-17 05:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pullup', '0004_auto_20181013_2129'), ] operations = [ migrations.AlterField( model_name='cvik', name='popis', ...
30.627119
103
0.55451
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pullup', '0004_auto_20181013_2129'), ] operations = [ migrations.AlterField( model_name='cvik', name='popis', field=models.CharField(blank=True, max_le...
true
true
1c2edf4d52e16f95da9865d8966cfbe46406c474
1,469
py
Python
openstack_dashboard/test/integration_tests/tests/test_keypair.py
maofutian/horizon
dab92e7d2f576caea8f81c8e22a516fb45633794
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/test/integration_tests/tests/test_keypair.py
maofutian/horizon
dab92e7d2f576caea8f81c8e22a516fb45633794
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/test/integration_tests/tests/test_keypair.py
maofutian/horizon
dab92e7d2f576caea8f81c8e22a516fb45633794
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Hewlett-Packard Development Company, L.P # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2....
40.805556
78
0.750851
import random from openstack_dashboard.test.integration_tests import helpers class TestKeypair(helpers.TestCase): KEYPAIR_NAME = 'horizonkeypair' + str(random.randint(0, 1000)) def test_keypair(self): accesssecurity_page = self.home_pg.go_to_accesssecurity_page() keypair_page ...
true
true
1c2ee0a267c36a7162841471d07e86b2c2ec3724
890
py
Python
alumno/migrations/0027_auto_20180822_2035.py
saulmestanza/Solicitudes
080f396025f75f21065251bd2af3f696d293ba3a
[ "Apache-2.0" ]
2
2018-08-17T20:32:20.000Z
2019-05-24T15:38:43.000Z
alumno/migrations/0027_auto_20180822_2035.py
saulmestanza/Solicitudes
080f396025f75f21065251bd2af3f696d293ba3a
[ "Apache-2.0" ]
null
null
null
alumno/migrations/0027_auto_20180822_2035.py
saulmestanza/Solicitudes
080f396025f75f21065251bd2af3f696d293ba3a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2018-08-22 20:35 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('alumno', '0026_auto_20180822_2028'), ] operations = [ migrations.AddField(...
34.230769
272
0.619101
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('alumno', '0026_auto_20180822_2028'), ] operations = [ migrations.AddField( model_name='procesoalumno', name='is_ok', ...
true
true
1c2ee25f38f6e94291b0701ca56f2e66b052b814
760
py
Python
pari/article/rich_text_filter.py
theju/pari
318a4ffba08362e78253ded100a63f5b5c6eadf9
[ "BSD-3-Clause" ]
null
null
null
pari/article/rich_text_filter.py
theju/pari
318a4ffba08362e78253ded100a63f5b5c6eadf9
[ "BSD-3-Clause" ]
null
null
null
pari/article/rich_text_filter.py
theju/pari
318a4ffba08362e78253ded100a63f5b5c6eadf9
[ "BSD-3-Clause" ]
null
null
null
import os from lxml import html from mezzanine.conf import settings from pari.article.templatetags import article_tags def article_content_filter(content): html_content = html.fromstring(content) images = html_content.cssselect('img') for image in images: image_source = image.attrib['src'] ...
36.190476
138
0.701316
import os from lxml import html from mezzanine.conf import settings from pari.article.templatetags import article_tags def article_content_filter(content): html_content = html.fromstring(content) images = html_content.cssselect('img') for image in images: image_source = image.attrib['src'] ...
true
true
1c2ee300834393447e84078d49feb8c57b8a59bd
830
py
Python
app/analysis/validation_cluster.py
ayushmaskey/log_analysis
c777f48117ec8e14845aa8d2deccc7f974ca232a
[ "MIT" ]
null
null
null
app/analysis/validation_cluster.py
ayushmaskey/log_analysis
c777f48117ec8e14845aa8d2deccc7f974ca232a
[ "MIT" ]
null
null
null
app/analysis/validation_cluster.py
ayushmaskey/log_analysis
c777f48117ec8e14845aa8d2deccc7f974ca232a
[ "MIT" ]
null
null
null
import pandas as pd import matplotlib.pyplot as plt from matplotlib import style style.use("ggplot") from csv_to_pandas import csv_into_dict_of_data from wavelet_transformation import csv_into_wavelet_transformed_dict_of_dataframe from training_cluster import reorganize_data def get_validation_dataset(df): column_l...
21.842105
81
0.773494
import pandas as pd import matplotlib.pyplot as plt from matplotlib import style style.use("ggplot") from csv_to_pandas import csv_into_dict_of_data from wavelet_transformation import csv_into_wavelet_transformed_dict_of_dataframe from training_cluster import reorganize_data def get_validation_dataset(df): column_l...
true
true
1c2ee3d2606b49529f7b9264442bbf83e899ef4b
649
py
Python
detection/configs/lit/retinanet_lit_ti_fpn_1x_coco.py
MonashAI/LIT
ec0f1f5aad2cb95b1cdaff33fa13927650214e3d
[ "Apache-2.0" ]
22
2021-06-07T06:50:52.000Z
2021-08-17T06:43:08.000Z
detection/configs/lit/retinanet_lit_ti_fpn_1x_coco.py
zip-group/LIT
f076db8ab1aa15026ec2b2c018836c9b7aca8f63
[ "Apache-2.0" ]
3
2022-01-05T03:38:45.000Z
2022-03-10T08:30:04.000Z
detection/configs/lit/retinanet_lit_ti_fpn_1x_coco.py
zip-group/LIT
f076db8ab1aa15026ec2b2c018836c9b7aca8f63
[ "Apache-2.0" ]
5
2021-06-10T01:05:32.000Z
2021-08-07T10:07:40.000Z
_base_ = [ '../_base_/models/retinanet_fpn_lit_ti.py', '../_base_/datasets/coco_detection.py', '../_base_/default_runtime.py' ] model = dict( pretrained='pretrained/lit_ti.pth', neck=dict( type='FPN', in_channels=[64, 128, 320, 512], out_channels=256, start_level=1, ...
24.961538
62
0.640986
_base_ = [ '../_base_/models/retinanet_fpn_lit_ti.py', '../_base_/datasets/coco_detection.py', '../_base_/default_runtime.py' ] model = dict( pretrained='pretrained/lit_ti.pth', neck=dict( type='FPN', in_channels=[64, 128, 320, 512], out_channels=256, start_level=1, ...
true
true
1c2ee3d7b80f2d1f8891c87acc7d7425cc975d13
2,902
py
Python
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/QueryDeviceEventDataRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/QueryDeviceEventDataRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/QueryDeviceEventDataRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
31.543478
79
0.754652
from aliyunsdkcore.request import RpcRequest from aliyunsdkiot.endpoint import endpoint_data class QueryDeviceEventDataRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Iot', '2018-01-20', 'QueryDeviceEventData','iot') self.set_method('POST') if hasattr(self, "endpoint_map...
true
true
1c2ee45118f224be9f3980dfcd157435795988ae
11,863
py
Python
pcdet/datasets/augmentor/data_augmentor.py
xiangruhuang/OpenPCDet
d82d9594a0629ffed0c457aedc304e0805e93221
[ "Apache-2.0" ]
null
null
null
pcdet/datasets/augmentor/data_augmentor.py
xiangruhuang/OpenPCDet
d82d9594a0629ffed0c457aedc304e0805e93221
[ "Apache-2.0" ]
null
null
null
pcdet/datasets/augmentor/data_augmentor.py
xiangruhuang/OpenPCDet
d82d9594a0629ffed0c457aedc304e0805e93221
[ "Apache-2.0" ]
null
null
null
from functools import partial import numpy as np from ...utils import common_utils from . import augmentor_utils, database_sampler, semantic_sampler, semantic_seg_sampler class DataAugmentor(object): def __init__(self, root_path, augmentor_configs, class_names, logger=None): self.root_path = root_path ...
41.479021
113
0.601956
from functools import partial import numpy as np from ...utils import common_utils from . import augmentor_utils, database_sampler, semantic_sampler, semantic_seg_sampler class DataAugmentor(object): def __init__(self, root_path, augmentor_configs, class_names, logger=None): self.root_path = root_path ...
true
true
1c2ee4726c1c1699a6bb0c73e2dd9b9878fac668
7,562
py
Python
lib/python3.8/site-packages/ansible_collections/cisco/nxos/plugins/modules/nxos_udld.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/cisco/nxos/plugins/modules/nxos_udld.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/cisco/nxos/plugins/modules/nxos_udld.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
28.216418
88
0.648109
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = """ module: nxos_udld extends_documentation_fragment: - cisco.nxos.nxos short_description: Manages UDLD global configuration params. description: - Manages UDLD global configuration params. version_...
true
true
1c2ee5d85db0b66a1aff18c7ef35bafdbba2899c
5,309
py
Python
transformer.py
maremun/mix-attend-break-sticks
db8221447fb993194641ba781e85005180f55421
[ "MIT" ]
null
null
null
transformer.py
maremun/mix-attend-break-sticks
db8221447fb993194641ba781e85005180f55421
[ "MIT" ]
null
null
null
transformer.py
maremun/mix-attend-break-sticks
db8221447fb993194641ba781e85005180f55421
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from modules import Linear, PosEncoding from layers import DecoderLayer import const device = torch.device("cuda" if torch.cuda.is_available() else "cpu") def proj_prob_simplex(inputs): # project updated weights onto a probability simplex # see https://arxiv.org/pdf/1101....
40.838462
98
0.650782
import torch import torch.nn as nn from modules import Linear, PosEncoding from layers import DecoderLayer import const device = torch.device("cuda" if torch.cuda.is_available() else "cpu") def proj_prob_simplex(inputs): sorted_inputs, sorted_idx = torch.sort(inputs.view(-1), descending=True) dim...
true
true
1c2ee79c50e5332807a24a1c5c70089c0090c76c
91
py
Python
loadCSVdata.py
christostsekouronas/academyposttestanalysis
913a0c13ad0482927a323b2fb3a97a8e2ca26517
[ "MIT" ]
null
null
null
loadCSVdata.py
christostsekouronas/academyposttestanalysis
913a0c13ad0482927a323b2fb3a97a8e2ca26517
[ "MIT" ]
null
null
null
loadCSVdata.py
christostsekouronas/academyposttestanalysis
913a0c13ad0482927a323b2fb3a97a8e2ca26517
[ "MIT" ]
null
null
null
import pandas as pd def loadTest(filepath): df = pd.read_csv(filepath) return df
13
30
0.692308
import pandas as pd def loadTest(filepath): df = pd.read_csv(filepath) return df
true
true
1c2ee820ca300e6484368fbe2c84cdbd5011a1de
16,352
py
Python
socrata/sources.py
sbuss/socrata-py
cc909cf988cb027c75c948261ef622c1e7d93f89
[ "Apache-2.0" ]
null
null
null
socrata/sources.py
sbuss/socrata-py
cc909cf988cb027c75c948261ef622c1e7d93f89
[ "Apache-2.0" ]
null
null
null
socrata/sources.py
sbuss/socrata-py
cc909cf988cb027c75c948261ef622c1e7d93f89
[ "Apache-2.0" ]
null
null
null
import json import io import webbrowser import types from time import sleep from socrata.http import post, put, patch, get, noop, UnexpectedResponseException from socrata.resource import Resource, Collection, ChildResourceSpec from socrata.input_schema import InputSchema from socrata.builders.parse_options import Parse...
30.621723
126
0.561705
import json import io import webbrowser import types from time import sleep from socrata.http import post, put, patch, get, noop, UnexpectedResponseException from socrata.resource import Resource, Collection, ChildResourceSpec from socrata.input_schema import InputSchema from socrata.builders.parse_options import Parse...
true
true
1c2ee82a4987c9c1f21543e89621500bb82375ac
1,686
py
Python
pycom_wpa2enterprise/pycom_eduroam/main.py
AidanTek/Fab-Cre8_IoT
3d358a484aea2e2a50d6dbef443e9a2757ef9ab8
[ "MIT" ]
null
null
null
pycom_wpa2enterprise/pycom_eduroam/main.py
AidanTek/Fab-Cre8_IoT
3d358a484aea2e2a50d6dbef443e9a2757ef9ab8
[ "MIT" ]
null
null
null
pycom_wpa2enterprise/pycom_eduroam/main.py
AidanTek/Fab-Cre8_IoT
3d358a484aea2e2a50d6dbef443e9a2757ef9ab8
[ "MIT" ]
null
null
null
import machine import ubinascii from network import WLAN from time import sleep import socket # import urllib.urequest # Network SSID = 'eduroam' # Network Name User = 'fablab@cardiffmet.ac.uk' Password = 'Fa6La6!' # Network password deviceID = 'LoPy4Test' certPath = '/flash/cert/pfencehaca.cer' # WiFi init: station ...
24.085714
106
0.619217
import machine import ubinascii from network import WLAN from time import sleep import socket SSID = 'eduroam' User = 'fablab@cardiffmet.ac.uk' Password = 'Fa6La6!' deviceID = 'LoPy4Test' certPath = '/flash/cert/pfencehaca.cer' station = WLAN(mode=WLAN.STA) def WiFiConnect(): station.connect(ssid=SSID,...
true
true
1c2ee9c5427419198923611955b780899e8542f4
657
py
Python
appengine_config.py
dhermes/google-auth-on-gae
c1679def9f045761364c878259b6f269f361db21
[ "Apache-2.0" ]
null
null
null
appengine_config.py
dhermes/google-auth-on-gae
c1679def9f045761364c878259b6f269f361db21
[ "Apache-2.0" ]
null
null
null
appengine_config.py
dhermes/google-auth-on-gae
c1679def9f045761364c878259b6f269f361db21
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
34.578947
74
0.762557
from google.appengine.ext import vendor vendor.add('lib')
true
true
1c2eeb7cba3beb1dfcbc46aa03ae33a079d25fe3
26,780
py
Python
atomate/vasp/workflows/tests/test_vasp_workflows.py
rwoodsrobinson/atomate
231566fd16e0b89637efc60ad2bf35417f03164a
[ "BSD-3-Clause-LBNL" ]
3
2021-08-02T09:19:20.000Z
2022-03-28T17:37:47.000Z
atomate/vasp/workflows/tests/test_vasp_workflows.py
rwoodsrobinson/atomate
231566fd16e0b89637efc60ad2bf35417f03164a
[ "BSD-3-Clause-LBNL" ]
null
null
null
atomate/vasp/workflows/tests/test_vasp_workflows.py
rwoodsrobinson/atomate
231566fd16e0b89637efc60ad2bf35417f03164a
[ "BSD-3-Clause-LBNL" ]
1
2021-07-27T06:12:56.000Z
2021-07-27T06:12:56.000Z
# coding: utf-8 import json import os import unittest import zlib import gridfs from pymongo import DESCENDING from fireworks import FWorker from fireworks.core.rocket_launcher import rapidfire from atomate.vasp.powerups import use_custodian, add_namefile, use_fake_vasp, add_trackers, add_bandgap_check, use_potcar...
43.973727
153
0.606983
import json import os import unittest import zlib import gridfs from pymongo import DESCENDING from fireworks import FWorker from fireworks.core.rocket_launcher import rapidfire from atomate.vasp.powerups import use_custodian, add_namefile, use_fake_vasp, add_trackers, add_bandgap_check, use_potcar_spec from atom...
true
true
1c2eebecf3748d6fc1074e03462bcc4d87ea5db7
6,599
py
Python
crawling/crawling_py/jungangilbo.py
ossteam8/oss8_proj
341ba45ed47d633665f9a8337cd8df7227cb16c2
[ "MIT" ]
3
2021-06-08T08:38:13.000Z
2021-06-08T08:38:58.000Z
crawling/crawling_py/jungangilbo.py
ossteam8/K-news_keyword
341ba45ed47d633665f9a8337cd8df7227cb16c2
[ "MIT" ]
15
2021-06-04T16:33:34.000Z
2021-06-06T10:05:17.000Z
crawling/crawling_py/jungangilbo.py
ossteam8/oss8_proj
341ba45ed47d633665f9a8337cd8df7227cb16c2
[ "MIT" ]
null
null
null
import re from goose3 import Goose from goose3.text import StopWordsKorean from bs4 import BeautifulSoup from datetime import datetime from dateutil.relativedelta import relativedelta from urllib.request import Request, urlopen class Jungang_crawling: def __init__(self): self.categories = ['정치','경제','사회'] ...
36.458564
99
0.499167
import re from goose3 import Goose from goose3.text import StopWordsKorean from bs4 import BeautifulSoup from datetime import datetime from dateutil.relativedelta import relativedelta from urllib.request import Request, urlopen class Jungang_crawling: def __init__(self): self.categories = ['정치','경제','사회'] ...
true
true
1c2eec932eef4602e4643852719061196d05fb90
3,993
py
Python
meshgraphnets/cloth_model.py
juliandwain/deepmind-research
eca5fe66ad770027f4dd758d3a659cd8261bace5
[ "Apache-2.0" ]
null
null
null
meshgraphnets/cloth_model.py
juliandwain/deepmind-research
eca5fe66ad770027f4dd758d3a659cd8261bace5
[ "Apache-2.0" ]
null
null
null
meshgraphnets/cloth_model.py
juliandwain/deepmind-research
eca5fe66ad770027f4dd758d3a659cd8261bace5
[ "Apache-2.0" ]
null
null
null
# Lint as: python3 # pylint: disable=g-bad-file-header # Copyright 2020 DeepMind Technologies Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.a...
39.93
79
0.699725
import sonnet as snt import tensorflow.compat.v1 as tf import common import core_model import normalization class Model(snt.AbstractModule): def __init__(self, learned_model, name='Model'): super(Model, self).__init__(name=name) with self._enter_variable_scope(): self._learned_model ...
true
true
1c2eecb12f118abb6490f29e8567d6fc8180197e
1,622
py
Python
36. tkinter basics 1 - Intro.py
JatinR05/Python-3-basics-series
e4b3d8056e2074602c9ed0cd201676484dd0d179
[ "MIT" ]
41
2015-05-12T12:49:35.000Z
2021-07-13T11:07:09.000Z
36. tkinter basics 1 - Intro.py
JatinR05/Python-3-basics-series
e4b3d8056e2074602c9ed0cd201676484dd0d179
[ "MIT" ]
null
null
null
36. tkinter basics 1 - Intro.py
JatinR05/Python-3-basics-series
e4b3d8056e2074602c9ed0cd201676484dd0d179
[ "MIT" ]
37
2016-10-13T04:02:09.000Z
2021-12-16T18:28:27.000Z
''' Hello and welcome to a basic intro to TKinter, which is the Python binding to TK, which is a toolkit that works around the Tcl language. The tkinter module purpose to to generate GUIs, like windows. Python is not very popularly used for this purpose, but it is more than capable of being used ''' # Simple enough...
27.033333
80
0.673243
from tkinter import * class Window(Frame): def __init__(self, master=None): Frame.__init__(self, master) self.master = master #self.init_window() #Creation of init_window #def init_window(self...
true
true
1c2eecf1ee9a695c0785654a2597cefd3865d1b2
36,206
py
Python
maraboupy/MarabouNetworkONNX.py
noyahoch/Marabou
03eb551498287e5372d462e3c2ad4fcc3210a5fa
[ "BSD-3-Clause" ]
null
null
null
maraboupy/MarabouNetworkONNX.py
noyahoch/Marabou
03eb551498287e5372d462e3c2ad4fcc3210a5fa
[ "BSD-3-Clause" ]
null
null
null
maraboupy/MarabouNetworkONNX.py
noyahoch/Marabou
03eb551498287e5372d462e3c2ad4fcc3210a5fa
[ "BSD-3-Clause" ]
null
null
null
''' /* ******************* */ /*! \file MarabouNetworkONNX.py ** \verbatim ** Top contributors (to current version): ** Kyle Julian ** This file is part of the Marabou project. ** Copyright (c) 2017-2019 by the authors listed in the file AUTHORS ** in the t...
44.42454
131
0.587996
import numpy as np import onnx import onnxruntime from onnx import numpy_helper from onnx.helper import get_attribute_value from maraboupy import MarabouUtils from maraboupy import MarabouNetwork from onnx import TensorProto class MarabouNetworkONNX(MarabouNetwork.MarabouNetwork): def __init__(self, filename, inp...
true
true
1c2eed504e370d1e47ed2225ee6c0c10dfed73e2
7,601
py
Python
app/pre_demultiplexing_data_api.py
imperial-genomics-facility/IGFPortal
0a61ecbfc1ac71775ad12d7cf13d09512ad71380
[ "Apache-2.0" ]
null
null
null
app/pre_demultiplexing_data_api.py
imperial-genomics-facility/IGFPortal
0a61ecbfc1ac71775ad12d7cf13d09512ad71380
[ "Apache-2.0" ]
null
null
null
app/pre_demultiplexing_data_api.py
imperial-genomics-facility/IGFPortal
0a61ecbfc1ac71775ad12d7cf13d09512ad71380
[ "Apache-2.0" ]
null
null
null
import json, logging from flask_appbuilder import ModelRestApi from flask import request from flask_appbuilder.api import expose from flask_appbuilder.models.sqla.interface import SQLAInterface from flask_appbuilder.security.decorators import protect from . import db from .models import PreDeMultiplexingData """ P...
41.535519
92
0.63689
import json, logging from flask_appbuilder import ModelRestApi from flask import request from flask_appbuilder.api import expose from flask_appbuilder.models.sqla.interface import SQLAInterface from flask_appbuilder.security.decorators import protect from . import db from .models import PreDeMultiplexingData def searc...
true
true
1c2eef133d6fc75b858afe9960a2cac36a14f3f5
101
py
Python
networking_mrv/__init__.py
iljatab/ml2-mech
336873605f41769213d2895441cc7a1bd78fe6c0
[ "Apache-1.1" ]
null
null
null
networking_mrv/__init__.py
iljatab/ml2-mech
336873605f41769213d2895441cc7a1bd78fe6c0
[ "Apache-1.1" ]
null
null
null
networking_mrv/__init__.py
iljatab/ml2-mech
336873605f41769213d2895441cc7a1bd78fe6c0
[ "Apache-1.1" ]
null
null
null
import pbr.version __version__ = pbr.version.VersionInfo( 'networking_mrv').version_string()
12.625
38
0.752475
import pbr.version __version__ = pbr.version.VersionInfo( 'networking_mrv').version_string()
true
true
1c2ef06b5cec4cd98c295ed3006362984d2b223c
12,565
py
Python
caproto/_status.py
mrakitin/caproto
ad49ffbe1a69ddc63cac9ec7f1a3468a4965e465
[ "BSD-3-Clause" ]
12
2019-05-25T14:26:25.000Z
2022-01-24T09:10:18.000Z
caproto/_status.py
mrakitin/caproto
ad49ffbe1a69ddc63cac9ec7f1a3468a4965e465
[ "BSD-3-Clause" ]
333
2017-06-22T03:10:15.000Z
2019-05-07T16:37:20.000Z
caproto/_status.py
mrakitin/caproto
ad49ffbe1a69ddc63cac9ec7f1a3468a4965e465
[ "BSD-3-Clause" ]
17
2019-07-03T18:17:22.000Z
2022-03-22T00:24:20.000Z
# Represent each CA Status Code as a namedtuple encapulating associated numeric # codes and human-readable attributes. # The CAStatus Enum maps each name (like 'ECA_NORMAL') to a CAStatusCode # instance. from enum import IntEnum, Enum from collections import namedtuple __all__ = ('CAStatus', 'CASeverity') CAStatus...
41.196721
79
0.669001
from enum import IntEnum, Enum from collections import namedtuple __all__ = ('CAStatus', 'CASeverity') CAStatusCode = namedtuple('CAStatusCode', 'name code code_with_severity severity success ' 'defunct description') class CASeverity(IntEnum): INFO = 3 ...
true
true
1c2ef098e30d95886546c9711570c82a2094e371
3,318
py
Python
todo_drf/settings.py
stifferdoroskevich/DRF_TODO_APP
7c2747970f30765edc730d96aad43ef6e2a9abbb
[ "MIT" ]
null
null
null
todo_drf/settings.py
stifferdoroskevich/DRF_TODO_APP
7c2747970f30765edc730d96aad43ef6e2a9abbb
[ "MIT" ]
null
null
null
todo_drf/settings.py
stifferdoroskevich/DRF_TODO_APP
7c2747970f30765edc730d96aad43ef6e2a9abbb
[ "MIT" ]
null
null
null
""" Django settings for todo_drf project. Generated by 'django-admin startproject' using Django 3.2.3. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ from pathli...
25.72093
91
0.699216
from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent with open('/home/stiffer/projects/KEYS/django_secret_key.txt') as f: SECRET_KEY = f.read().strip() DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.aut...
true
true
1c2ef1d5f17d3fdb3154cd74cc4dcbb56149efa8
316
py
Python
python/JournalTimeStamp.Description.py
BIMpraxis/Journalysis
af0c042b28d01ba5e44dafc2bbe9556434e897b8
[ "MIT" ]
26
2017-11-23T19:30:03.000Z
2022-02-09T10:35:10.000Z
python/JournalTimeStamp.Description.py
BIMpraxis/Journalysis
af0c042b28d01ba5e44dafc2bbe9556434e897b8
[ "MIT" ]
51
2017-11-16T15:02:32.000Z
2022-03-01T13:51:58.000Z
python/JournalTimeStamp.Description.py
BIMpraxis/Journalysis
af0c042b28d01ba5e44dafc2bbe9556434e897b8
[ "MIT" ]
9
2017-11-20T09:20:01.000Z
2021-09-15T13:08:30.000Z
import clr def process_input(func, input): if isinstance(input, list): return [func(x) for x in input] else: return func(input) def journalTimeStampDescription(input): if input.__repr__() == 'JournalTimeStamp': return input.Description else: return None OUT = process_input(journalTimeStampDescription,IN[0])
28.727273
68
0.772152
import clr def process_input(func, input): if isinstance(input, list): return [func(x) for x in input] else: return func(input) def journalTimeStampDescription(input): if input.__repr__() == 'JournalTimeStamp': return input.Description else: return None OUT = process_input(journalTimeStampDescription,IN[0])
true
true
1c2ef1f58935801850349dc48593c76787ad4780
5,370
py
Python
pgAdmin/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_get_dictionaries.py
WeilerWebServices/PostgreSQL
ae594ed077bebbad1be3c1d95c38b7c2c2683e8c
[ "PostgreSQL" ]
null
null
null
pgAdmin/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_get_dictionaries.py
WeilerWebServices/PostgreSQL
ae594ed077bebbad1be3c1d95c38b7c2c2683e8c
[ "PostgreSQL" ]
null
null
null
pgAdmin/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_get_dictionaries.py
WeilerWebServices/PostgreSQL
ae594ed077bebbad1be3c1d95c38b7c2c2683e8c
[ "PostgreSQL" ]
null
null
null
########################################################################## # # pgAdmin 4 - PostgreSQL Tools # # Copyright (C) 2013 - 2020, The pgAdmin Development Team # This software is released under the PostgreSQL Licence # ########################################################################## import uuid from...
44.016393
79
0.613035
true
true
1c2ef31514c7d509ea3f4e1e79f2a7291f35bc8b
4,174
py
Python
nuitka/utils/Download.py
pkulev/Nuitka
e7b246ad0dcdef16398cecf1013cb7a03a6fe721
[ "Apache-2.0" ]
1
2021-05-25T12:48:28.000Z
2021-05-25T12:48:28.000Z
nuitka/utils/Download.py
pkulev/Nuitka
e7b246ad0dcdef16398cecf1013cb7a03a6fe721
[ "Apache-2.0" ]
null
null
null
nuitka/utils/Download.py
pkulev/Nuitka
e7b246ad0dcdef16398cecf1013cb7a03a6fe721
[ "Apache-2.0" ]
null
null
null
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
30.246377
93
0.629612
import os from nuitka import Tracing from nuitka.__past__ import ( raw_input, urlretrieve, ) from nuitka.utils import Utils from .AppDirs import getAppDir from .FileOperations import addFileExecutablePermission, deleteFile, makePath def getCachedDownload( url, binary, flatten...
true
true
1c2ef394b50092493cbc4ba243d5fe0be602a15b
790
py
Python
applications/StructuralMechanicsApplication/python_scripts/auxiliar_methods_solvers.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
778
2017-01-27T16:29:17.000Z
2022-03-30T03:01:51.000Z
applications/StructuralMechanicsApplication/python_scripts/auxiliar_methods_solvers.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
6,634
2017-01-15T22:56:13.000Z
2022-03-31T15:03:36.000Z
applications/StructuralMechanicsApplication/python_scripts/auxiliar_methods_solvers.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
224
2017-02-07T14:12:49.000Z
2022-03-06T23:09:34.000Z
# Importing the Kratos Library import KratosMultiphysics as KM def GetBDFIntegrationOrder(scheme_type): if scheme_type == "backward_euler": order = 1 else: if scheme_type == "bdf": raise Exception('Wrong input for scheme type: "bdf"! Please append the order to the bdf-scheme, e.g. ...
41.578947
252
0.682278
import KratosMultiphysics as KM def GetBDFIntegrationOrder(scheme_type): if scheme_type == "backward_euler": order = 1 else: if scheme_type == "bdf": raise Exception('Wrong input for scheme type: "bdf"! Please append the order to the bdf-scheme, e.g. "bdf2"') orde...
true
true
1c2ef4f00c256d8050804727ce8a2fb3e0de9f5d
16,989
py
Python
src/utsc/core/_vendor/bluecat_libraries/address_manager/api/models.py
utsc-networking/utsc-tools
d5bc10cf825f1be46999d5a42da62cc0df456f0c
[ "MIT" ]
null
null
null
src/utsc/core/_vendor/bluecat_libraries/address_manager/api/models.py
utsc-networking/utsc-tools
d5bc10cf825f1be46999d5a42da62cc0df456f0c
[ "MIT" ]
null
null
null
src/utsc/core/_vendor/bluecat_libraries/address_manager/api/models.py
utsc-networking/utsc-tools
d5bc10cf825f1be46999d5a42da62cc0df456f0c
[ "MIT" ]
null
null
null
# Copyright 2021 BlueCat Networks (USA) Inc. and its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. """Models representing all Address Manager object types supported in the API.""" import copy import json from .serializat...
40.643541
147
0.647949
import copy import json from .serialization import ( deserialize_joined_key_value_pairs, serialize_joined_key_value_pairs, serialize_joined_values, serialize_possible_list, deserialize_possible_list, ) class APIEntity(dict): @staticmethod def to_raw_model(data: dict) -> dict: ...
true
true
1c2ef4f5f308b647a88f60219f1a73c6c1f9e275
8,111
py
Python
tests/app/main/helpers/validation/test_g7_declaration.py
uk-gov-mirror/alphagov.digitalmarketplace-supplier-frontend
cf9d06cffe95c436f056cc9c967e9ef8a25381a4
[ "MIT" ]
7
2015-11-21T20:43:37.000Z
2020-07-22T13:20:18.000Z
tests/app/main/helpers/validation/test_g7_declaration.py
uk-gov-mirror/alphagov.digitalmarketplace-supplier-frontend
cf9d06cffe95c436f056cc9c967e9ef8a25381a4
[ "MIT" ]
783
2015-04-07T16:34:57.000Z
2021-07-27T12:13:02.000Z
tests/app/main/helpers/validation/test_g7_declaration.py
uk-gov-mirror/alphagov.digitalmarketplace-supplier-frontend
cf9d06cffe95c436f056cc9c967e9ef8a25381a4
[ "MIT" ]
20
2015-06-13T15:37:23.000Z
2021-04-10T18:02:09.000Z
# -*- coding: utf-8 -*- from app.main.helpers.validation import G7Validator, get_validator from app.main import content_loader FULL_G7_SUBMISSION = { "PR1": True, "PR2": True, "PR3": True, "PR4": True, "PR5": True, "SQ1-1i-i": True, "SQ2-1abcd": True, "SQ2-1e": True, "SQ2-1f": True...
30.264925
101
0.635063
from app.main.helpers.validation import G7Validator, get_validator from app.main import content_loader FULL_G7_SUBMISSION = { "PR1": True, "PR2": True, "PR3": True, "PR4": True, "PR5": True, "SQ1-1i-i": True, "SQ2-1abcd": True, "SQ2-1e": True, "SQ2-1f": True, "SQ2-1ghijklmn": ...
true
true
1c2ef6dccb38beef35f29ad77ea7c53c573111c8
9,323
py
Python
armi/reactor/assemblyLists.py
MattGreav/test
f6bc7dcefd8b498b71fb92808ee70496f2206231
[ "Apache-2.0" ]
null
null
null
armi/reactor/assemblyLists.py
MattGreav/test
f6bc7dcefd8b498b71fb92808ee70496f2206231
[ "Apache-2.0" ]
null
null
null
armi/reactor/assemblyLists.py
MattGreav/test
f6bc7dcefd8b498b71fb92808ee70496f2206231
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 TerraPower, LLC # # 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 writi...
35.448669
118
0.602059
import abc import itertools from armi import runLog from armi.utils import units from armi.reactor import grids from armi.reactor import composites from armi.reactor.flags import Flags class AutoFiller(abc.ABC): def getNextLocation(self, a) -> grids.LocationBase: def assemblyAdded(self, a): ...
true
true
1c2ef76024d7b737707cdc6ecf0cee5754fa74c3
2,400
py
Python
14/recipe.py
Keilan/advent-of-code-2018
3f3b4952c3633df4008e734da15e219fa67ec635
[ "MIT" ]
null
null
null
14/recipe.py
Keilan/advent-of-code-2018
3f3b4952c3633df4008e734da15e219fa67ec635
[ "MIT" ]
null
null
null
14/recipe.py
Keilan/advent-of-code-2018
3f3b4952c3633df4008e734da15e219fa67ec635
[ "MIT" ]
null
null
null
def perform_attempt(scoreboard, index1, index2): # Get new scores combined = scoreboard[index1] + scoreboard[index2] score1 = combined // 10 score2 = combined % 10 # Update scoreboard scores_added = [] if score1 != 0: scores_added.append(score1) scores_added.append(score2) s...
28.235294
91
0.619583
def perform_attempt(scoreboard, index1, index2): combined = scoreboard[index1] + scoreboard[index2] score1 = combined // 10 score2 = combined % 10 scores_added = [] if score1 != 0: scores_added.append(score1) scores_added.append(score2) scoreboard.extend(scores_added) ...
true
true
1c2ef7a70c702537518d5a8441086e69cd29de52
1,875
py
Python
parser/team27/G-27/execution/function/trigonometric/asin.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
35
2020-12-07T03:11:43.000Z
2021-04-15T17:38:16.000Z
parser/team27/G-27/execution/function/trigonometric/asin.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
47
2020-12-09T01:29:09.000Z
2021-01-13T05:37:50.000Z
parser/team27/G-27/execution/function/trigonometric/asin.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
556
2020-12-07T03:13:31.000Z
2021-06-17T17:41:10.000Z
from execution.abstract.function import * from execution.symbol.typ import * from libraries.trigonometric_functions import asin class Asin(Function): def __init__(self, input, row, column): Function.__init__(self,row,column) self.input = input def execute(self, environment): #input...
52.083333
193
0.5632
from execution.abstract.function import * from execution.symbol.typ import * from libraries.trigonometric_functions import asin class Asin(Function): def __init__(self, input, row, column): Function.__init__(self,row,column) self.input = input def execute(self, environment): ...
true
true
1c2ef813d7f16c4fe3c34d616adbed3c7bba2819
18,954
py
Python
google/ads/googleads/v8/services/services/product_bidding_category_constant_service/client.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
285
2018-10-05T16:47:58.000Z
2022-03-31T00:58:39.000Z
google/ads/googleads/v8/services/services/product_bidding_category_constant_service/client.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
425
2018-09-10T13:32:41.000Z
2022-03-31T14:50:05.000Z
google/ads/googleads/v8/services/services/product_bidding_category_constant_service/client.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
369
2018-11-28T07:01:00.000Z
2022-03-28T09:53:22.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
41.565789
196
0.647937
from collections import OrderedDict from distutils import util import os import re from typing import Dict, Optional, Sequence, Tuple, Type, Union from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions from google.api_core import ga...
true
true
1c2ef81485b97a49069d91271d4f6e8e453305b3
1,961
py
Python
capstone/capdb/tests/test_versioning.py
jcushman/capstone
ef3ced77f69aabe14c89ab67003a6e88736bf777
[ "MIT" ]
null
null
null
capstone/capdb/tests/test_versioning.py
jcushman/capstone
ef3ced77f69aabe14c89ab67003a6e88736bf777
[ "MIT" ]
4
2021-09-02T20:54:31.000Z
2022-02-27T14:04:06.000Z
capstone/capdb/tests/test_versioning.py
jcushman/capstone
ef3ced77f69aabe14c89ab67003a6e88736bf777
[ "MIT" ]
null
null
null
from copy import deepcopy import pytest from django.db import transaction from scripts.helpers import parse_xml, serialize_xml @pytest.mark.parametrize('versioned_fixture_name', [ 'volume_xml', 'case_xml', 'page_xml' ]) @pytest.mark.django_db(transaction=True) def test_versioning(versioned_fixture_name,...
37
91
0.760836
from copy import deepcopy import pytest from django.db import transaction from scripts.helpers import parse_xml, serialize_xml @pytest.mark.parametrize('versioned_fixture_name', [ 'volume_xml', 'case_xml', 'page_xml' ]) @pytest.mark.django_db(transaction=True) def test_versioning(versioned_fixture_name,...
true
true
1c2ef995372fc9c30e32044a35e8087c8c35d3f7
3,507
py
Python
tests-deprecating/milvus_benchmark/milvus_benchmark/metrics/models/metric.py
CyberFlameGO/milvus
c6ebae89598c4198fa44ea02f8a60219b21fbffd
[ "Apache-2.0" ]
10,504
2019-09-16T12:20:11.000Z
2022-03-31T15:07:56.000Z
tests-deprecating/milvus_benchmark/milvus_benchmark/metrics/models/metric.py
CyberFlameGO/milvus
c6ebae89598c4198fa44ea02f8a60219b21fbffd
[ "Apache-2.0" ]
13,389
2019-09-16T06:49:53.000Z
2022-03-31T18:01:24.000Z
tests-deprecating/milvus_benchmark/milvus_benchmark/metrics/models/metric.py
CyberFlameGO/milvus
c6ebae89598c4198fa44ea02f8a60219b21fbffd
[ "Apache-2.0" ]
1,792
2019-09-18T04:27:42.000Z
2022-03-31T14:37:20.000Z
import time import datetime import json import hashlib from .env import Env from .server import Server from .hardware import Hardware class Metric(object): """ A template for reporting data: { "_id" : ObjectId("6126865855aba6fb8e742f05"), "_version" : "0.1", "_type" : "case", ...
26.770992
64
0.437411
import time import datetime import json import hashlib from .env import Env from .server import Server from .hardware import Hardware class Metric(object): def __init__(self): self._version = '0.1' self._type = 'metric' self.run_id = None self.mode = None self.server = Serv...
true
true
1c2ef9b593c702ed9b0441bcdae7e77d0db8f9b9
16,106
py
Python
jax_md/space.py
pmistani/jax-md
125c6922c1bc09df33d6a9934f50ea1321e02e73
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jax_md/space.py
pmistani/jax-md
125c6922c1bc09df33d6a9934f50ea1321e02e73
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jax_md/space.py
pmistani/jax-md
125c6922c1bc09df33d6a9934f50ea1321e02e73
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # 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, ...
35.870824
103
0.688191
from typing import Callable, Union, Tuple, Any, Optional from jax.abstract_arrays import ShapedArray from jax import eval_shape from jax import vmap from jax import custom_jvp import jax import jax.numpy as jnp from jax_md.util import Array from jax_md.util import f32 from jax_md.util import f64 fro...
true
true
1c2efae827fb9292634f95c87c7625ff9d6887a5
9,423
py
Python
src/datadog_api_client/v1/model/notebook_update_cell.py
rchenzheng/datadog-api-client-python
2e86ac098c6f0c7fdd90ed218224587c0f8eafef
[ "Apache-2.0" ]
null
null
null
src/datadog_api_client/v1/model/notebook_update_cell.py
rchenzheng/datadog-api-client-python
2e86ac098c6f0c7fdd90ed218224587c0f8eafef
[ "Apache-2.0" ]
null
null
null
src/datadog_api_client/v1/model/notebook_update_cell.py
rchenzheng/datadog-api-client-python
2e86ac098c6f0c7fdd90ed218224587c0f8eafef
[ "Apache-2.0" ]
null
null
null
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2019-Present Datadog, Inc. import re # noqa: F401 import sys # noqa: F401 from datadog_api_client.v1.model_uti...
40.969565
119
0.609148
import re import sys from datadog_api_client.v1.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_i...
true
true
1c2efb5426c722d309f0b0ac145a4d76849b91f0
3,310
py
Python
infra/bots/recipes/sync_and_compile.py
mohad12211/skia
042a53aa094715e031ebad4da072524ace316744
[ "BSD-3-Clause" ]
3
2019-03-07T17:01:23.000Z
2021-07-03T22:01:36.000Z
infra/bots/recipes/sync_and_compile.py
mohad12211/skia
042a53aa094715e031ebad4da072524ace316744
[ "BSD-3-Clause" ]
2
2021-09-10T03:50:52.000Z
2021-09-10T07:10:19.000Z
infra/bots/recipes/sync_and_compile.py
mohad12211/skia
042a53aa094715e031ebad4da072524ace316744
[ "BSD-3-Clause" ]
14
2015-07-17T17:23:53.000Z
2020-07-06T21:06:57.000Z
# Copyright 2016 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. # Recipe module for Skia Swarming compile. DEPS = [ 'build', 'checkout', 'recipe_engine/context', 'recipe_engine/file', 'recipe_engine/json', ...
27.131148
73
0.667976
DEPS = [ 'build', 'checkout', 'recipe_engine/context', 'recipe_engine/file', 'recipe_engine/json', 'recipe_engine/path', 'recipe_engine/platform', 'recipe_engine/properties', 'recipe_engine/python', 'recipe_engine/step', 'run', 'vars', ] def RunSteps(api): api.vars.setup() bot_...
true
true
1c2efb9c64196093b7fed95dedf803456c33d37b
522
py
Python
src/flash/demo_lcd.py
gr4viton/esp_fun
28f74ce50c16555705ecee97336ae28c7fd86704
[ "MIT" ]
1
2020-02-23T22:28:32.000Z
2020-02-23T22:28:32.000Z
src/flash/demo_lcd.py
gr4viton/esp_fun
28f74ce50c16555705ecee97336ae28c7fd86704
[ "MIT" ]
null
null
null
src/flash/demo_lcd.py
gr4viton/esp_fun
28f74ce50c16555705ecee97336ae28c7fd86704
[ "MIT" ]
null
null
null
import time import machine from .esp8266_i2c_lcd import I2cLcd i2c = machine.I2C(-1, machine.Pin(5), machine.Pin(4), freq=400000) lcd = I2cLcd(i2c, 63, 2, 16) lcd.clear() ls = ['Eat', 'Sleep', 'Rave', 'Repeat'] i = 1 while True: if i % 2: index = int(i / 2) % 4 txt = ls[index] lcd.putstr(...
18.642857
66
0.538314
import time import machine from .esp8266_i2c_lcd import I2cLcd i2c = machine.I2C(-1, machine.Pin(5), machine.Pin(4), freq=400000) lcd = I2cLcd(i2c, 63, 2, 16) lcd.clear() ls = ['Eat', 'Sleep', 'Rave', 'Repeat'] i = 1 while True: if i % 2: index = int(i / 2) % 4 txt = ls[index] lcd.putstr(...
true
true
1c2efcf844b577545dbab2aa4f2ce84e15c4ed03
1,754
py
Python
leetcode/easy/logger-rate-limiter.py
vtemian/interviews-prep
ddef96b5ecc699a590376a892a804c143fe18034
[ "Apache-2.0" ]
8
2019-05-14T12:50:29.000Z
2022-03-01T09:08:27.000Z
leetcode/easy/logger-rate-limiter.py
vtemian/interviews-prep
ddef96b5ecc699a590376a892a804c143fe18034
[ "Apache-2.0" ]
46
2019-03-24T20:59:29.000Z
2019-04-09T16:28:43.000Z
leetcode/easy/logger-rate-limiter.py
vtemian/interviews-prep
ddef96b5ecc699a590376a892a804c143fe18034
[ "Apache-2.0" ]
1
2022-01-28T12:46:29.000Z
2022-01-28T12:46:29.000Z
""" Design a logger system that receive stream of messages along with its timestamps, each message should be printed if and only if it is not printed in the last 10 seconds. Given a message and a timestamp (in seconds granularity), return true if the message should be printed in the given timestamp, otherwise returns ...
29.728814
102
0.704105
class Logger: def __init__(self): self.store = {} def shouldPrintMessage(self, timestamp, message): last_log = self.store.get(message) if last_log is None or timestamp - last_log >= 10: self.store[message] = timestamp return True return False
true
true
1c2efd68e4e2211b4edeea61fbb1535efeada2c3
1,726
py
Python
configs/cityscapes256.py
TimK1998/SemanticSynthesisForScoreBasedModels
b575ab646dd5a599d173b44a3585429082d0620d
[ "Apache-2.0" ]
null
null
null
configs/cityscapes256.py
TimK1998/SemanticSynthesisForScoreBasedModels
b575ab646dd5a599d173b44a3585429082d0620d
[ "Apache-2.0" ]
null
null
null
configs/cityscapes256.py
TimK1998/SemanticSynthesisForScoreBasedModels
b575ab646dd5a599d173b44a3585429082d0620d
[ "Apache-2.0" ]
null
null
null
import ml_collections import torch def get_default_configs(): config = ml_collections.ConfigDict() # training config.training = training = ml_collections.ConfigDict() config.training.batch_size = 8 training.epochs = 2000 # Time in epochs training.checkpoint_save_freq = 50 training.s...
26.151515
96
0.680185
import ml_collections import torch def get_default_configs(): config = ml_collections.ConfigDict() config.training = training = ml_collections.ConfigDict() config.training.batch_size = 8 training.epochs = 2000 training.checkpoint_save_freq = 50 training.sampling_freq = 25 ...
true
true
1c2efdac056e4002d95567fded27a1c73c74ebec
653
py
Python
src/settlers/urls.py
dakrauth/django-settlers
3754296ee979a95fbd5885964cc0c1bfe301a3a0
[ "MIT" ]
null
null
null
src/settlers/urls.py
dakrauth/django-settlers
3754296ee979a95fbd5885964cc0c1bfe301a3a0
[ "MIT" ]
null
null
null
src/settlers/urls.py
dakrauth/django-settlers
3754296ee979a95fbd5885964cc0c1bfe301a3a0
[ "MIT" ]
null
null
null
from django.urls import path from . import views app_name = 'settlers' urlpatterns = [ path('', views.ListingView.as_view(), name='listing'), path('api/<int:pk>/', views.api, name='api'), path('demo/', views.GameDemoView.as_view(), name='demo'), path('random/', views.RandomView.as_view(), name='rand...
34.368421
69
0.646248
from django.urls import path from . import views app_name = 'settlers' urlpatterns = [ path('', views.ListingView.as_view(), name='listing'), path('api/<int:pk>/', views.api, name='api'), path('demo/', views.GameDemoView.as_view(), name='demo'), path('random/', views.RandomView.as_view(), name='rand...
true
true
1c2efdf299dfd0aeabb652193373d0ccc20decac
773
py
Python
django_comments_xtd/urls.py
lyoniionly/django-comments-xtd
bc62a7359b9b460185e0fe4a7a1958bc9ef5599c
[ "BSD-2-Clause" ]
null
null
null
django_comments_xtd/urls.py
lyoniionly/django-comments-xtd
bc62a7359b9b460185e0fe4a7a1958bc9ef5599c
[ "BSD-2-Clause" ]
null
null
null
django_comments_xtd/urls.py
lyoniionly/django-comments-xtd
bc62a7359b9b460185e0fe4a7a1958bc9ef5599c
[ "BSD-2-Clause" ]
null
null
null
#-*- coding: utf-8 -*- from django import VERSION as DJANGO_VERSION if DJANGO_VERSION[0:2] < (1, 4): from django.conf.urls.defaults import include, patterns, url else: from django.conf.urls import include, patterns, url from django.views import generic from django_comments_xtd import views, models from djang...
30.92
83
0.668823
from django import VERSION as DJANGO_VERSION if DJANGO_VERSION[0:2] < (1, 4): from django.conf.urls.defaults import include, patterns, url else: from django.conf.urls import include, patterns, url from django.views import generic from django_comments_xtd import views, models from django_comments_xtd.conf im...
true
true
1c2efee9b1418b6bb88e9e69777335068e1783f5
1,012
py
Python
model.py
qfuggett/people-manager-flask
97511e14c26a90df5b3dc2117c504c7572532761
[ "Unlicense" ]
null
null
null
model.py
qfuggett/people-manager-flask
97511e14c26a90df5b3dc2117c504c7572532761
[ "Unlicense" ]
null
null
null
model.py
qfuggett/people-manager-flask
97511e14c26a90df5b3dc2117c504c7572532761
[ "Unlicense" ]
null
null
null
from flask_sqlalchemy import SQLAlchemy import datetime db = SQLAlchemy() class User(db.Model): __tablename__ = "users" user_id = db.Column(db.Integer, primary_key=True, autoincrement=True) name = db.Column(db.String, nullable=False) email = db.Column(db.String, nullable=False) birthday = db.Co...
28.914286
132
0.699605
from flask_sqlalchemy import SQLAlchemy import datetime db = SQLAlchemy() class User(db.Model): __tablename__ = "users" user_id = db.Column(db.Integer, primary_key=True, autoincrement=True) name = db.Column(db.String, nullable=False) email = db.Column(db.String, nullable=False) birthday = db.Co...
true
true
1c2eff32b3ed455e7d06f354d6a40def7e71a731
2,722
py
Python
redash/handlers/favorites.py
frextrite/redash
74beed80d20d858b51b5560e7984b20d5d2c874e
[ "BSD-2-Clause" ]
8
2019-05-05T10:33:43.000Z
2021-07-14T11:21:52.000Z
redash/handlers/favorites.py
frextrite/redash
74beed80d20d858b51b5560e7984b20d5d2c874e
[ "BSD-2-Clause" ]
10
2017-10-17T09:17:53.000Z
2019-12-05T07:13:41.000Z
redash/handlers/favorites.py
tradingfoe/redash-clone
94065b8dce0e27f6f40a7adc2b99e078b03115b3
[ "BSD-2-Clause" ]
15
2019-06-29T13:58:00.000Z
2022-02-27T14:57:03.000Z
from flask import request from sqlalchemy.exc import IntegrityError from redash import models from redash.handlers.base import (BaseResource, get_object_or_404, paginate) from redash.permissions import require_access, view_only class QueryFavoriteResource(BaseResource): def post...
34.455696
125
0.621234
from flask import request from sqlalchemy.exc import IntegrityError from redash import models from redash.handlers.base import (BaseResource, get_object_or_404, paginate) from redash.permissions import require_access, view_only class QueryFavoriteResource(BaseResource): def post...
true
true
1c2eff74b8846d1e08285bd192df1f547ecba4fe
5,323
py
Python
userbot/modules/misc.py
ronaldyganteng/NightCore
81c2172996248bb8b4c016222a418e405865e989
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/misc.py
ronaldyganteng/NightCore
81c2172996248bb8b4c016222a418e405865e989
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/misc.py
ronaldyganteng/NightCore
81c2172996248bb8b4c016222a418e405865e989
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # # You can find misc modules, which dont fit in anything xD """ Userbot module for other small commands. """ import io ...
36.458904
167
0.642871
import io import sys from os import execl from random import randint from time import sleep from userbot import BOTLOG, BOTLOG_CHATID, CMD_HELP, bot from userbot.events import register from userbot.utils import time_formatter @register(outgoing=True, pattern=r"^\.random") async def randomise(items): itemo...
true
true
1c2effdc4ff98d786d5290890c85cc3aad50030c
5,913
py
Python
Visualizaion/hands_association.py
DanLuoNEU/CLASP2
262fb1f151c14bfe3b1c452cdf65187d8caa10bd
[ "MIT" ]
1
2019-11-17T21:38:54.000Z
2019-11-17T21:38:54.000Z
Visualizaion/hands_association.py
DanLuoNEU/CLASP2
262fb1f151c14bfe3b1c452cdf65187d8caa10bd
[ "MIT" ]
null
null
null
Visualizaion/hands_association.py
DanLuoNEU/CLASP2
262fb1f151c14bfe3b1c452cdf65187d8caa10bd
[ "MIT" ]
null
null
null
# Build up association between hands and persons ID, # depending on IOU between skeleton and person bounding boxes # Intersection part reference: https://github.com/amdegroot/ssd.pytorch/blob/master/layers/box_utils.py#L48 # Points to improve: # 1. same hands for two persons using IOU, they should be unique # Dan, ...
39.684564
116
0.562659
nd_dims(b_b[:,:2], 0),num_a,axis=0) max_xy_a = np.repeat(np.expand_dims(b_a[:,2:], 1),num_b,axis=1) max_xy_b = np.repeat(np.expand_dims(b_b[:,2:], 0),num_a,axis=0) min_xy = np.maximum(min_xy_a, min_xy_b) max_xy = np.minimum(max_xy_a, max_xy_b) inter_xy = np.clip((max_xy - min_xy), 0, np.inf)...
true
true
1c2f00d423ac28a4cc888bde6820527261a6f12c
541
py
Python
app/core/migrations/0005_auto_20210404_0300.py
matelanbo/recipe-app-api
c050b0a0dc430484c6ca91588048eae0ab5c647b
[ "MIT" ]
null
null
null
app/core/migrations/0005_auto_20210404_0300.py
matelanbo/recipe-app-api
c050b0a0dc430484c6ca91588048eae0ab5c647b
[ "MIT" ]
null
null
null
app/core/migrations/0005_auto_20210404_0300.py
matelanbo/recipe-app-api
c050b0a0dc430484c6ca91588048eae0ab5c647b
[ "MIT" ]
null
null
null
# Generated by Django 2.1.15 on 2021-04-04 03:00 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0004_recipe'), ] operations = [ migrations.RenameField( model_name='recipe', old_name='time_miniutes', ...
22.541667
63
0.573013
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0004_recipe'), ] operations = [ migrations.RenameField( model_name='recipe', old_name='time_miniutes', new_name='time_minutes', ), ...
true
true
1c2f01fcf53219c692092a28ca321bd5e3ab2dd1
5,227
py
Python
webStorm-APICloud/python_tools/Lib/sched.py
zzr925028429/androidyianyan
8967fdba92473e8e65ee222515dfc54cdae5bb0b
[ "MIT" ]
null
null
null
webStorm-APICloud/python_tools/Lib/sched.py
zzr925028429/androidyianyan
8967fdba92473e8e65ee222515dfc54cdae5bb0b
[ "MIT" ]
null
null
null
webStorm-APICloud/python_tools/Lib/sched.py
zzr925028429/androidyianyan
8967fdba92473e8e65ee222515dfc54cdae5bb0b
[ "MIT" ]
null
null
null
"""A generally useful event scheduler class. Each instance of this class manages its own queue. No multi-threading is implied; you are supposed to hack that yourself, or use a single instance per application. Each instance is parametrized with two functions, one that is supposed to return the current time, one...
38.718519
79
0.647599
import heapq from collections import namedtuple __all__ = ["scheduler"] Event = namedtuple('Event', 'time, priority, action, argument') class scheduler: def __init__(self, timefunc, delayfunc): self._queue = [] self.timefunc = timefunc self.delayfunc = delayfunc ...
true
true
1c2f02aed167f8a57906e18c482a7a0d68e37add
24,267
py
Python
torch/ao/quantization/_dbr/auto_trace.py
xiaohanhuang/pytorch
a31aea8eaa99a5ff72b5d002c206cd68d5467a5e
[ "Intel" ]
null
null
null
torch/ao/quantization/_dbr/auto_trace.py
xiaohanhuang/pytorch
a31aea8eaa99a5ff72b5d002c206cd68d5467a5e
[ "Intel" ]
null
null
null
torch/ao/quantization/_dbr/auto_trace.py
xiaohanhuang/pytorch
a31aea8eaa99a5ff72b5d002c206cd68d5467a5e
[ "Intel" ]
1
2021-12-07T12:36:25.000Z
2021-12-07T12:36:25.000Z
import logging from typing import Tuple, Any, List, Dict import torch from torch.fx.node import map_aggregate from .quantization_state import ( AutoQuantizationState, ) from .utils import ( trace_with_inputs, is_leaf, HookType, get_torch_function_hook_type, get_module_hook_type, ) from .model_...
43.411449
117
0.576915
import logging from typing import Tuple, Any, List, Dict import torch from torch.fx.node import map_aggregate from .quantization_state import ( AutoQuantizationState, ) from .utils import ( trace_with_inputs, is_leaf, HookType, get_torch_function_hook_type, get_module_hook_type, ) from .model_...
true
true
1c2f02b3852faad8ec8d5d7b16940faac3b83676
6,172
py
Python
backend/corpora/lambdas/api/v1/dataset.py
chanzuckerberg/single-cell-data-portal
d8901ef978ad96de75510d5eb0e459a4790197ea
[ "MIT" ]
7
2021-09-17T23:44:31.000Z
2022-03-25T22:36:07.000Z
backend/corpora/lambdas/api/v1/dataset.py
chanzuckerberg/single-cell-data-portal
d8901ef978ad96de75510d5eb0e459a4790197ea
[ "MIT" ]
784
2021-08-18T23:38:09.000Z
2022-03-31T21:18:54.000Z
backend/corpora/lambdas/api/v1/dataset.py
chanzuckerberg/single-cell-data-portal
d8901ef978ad96de75510d5eb0e459a4790197ea
[ "MIT" ]
2
2021-09-07T19:04:17.000Z
2021-12-23T21:51:36.000Z
from flask import make_response, jsonify, g from ....common.corpora_orm import CollectionVisibility, DatasetArtifactFileType from ....common.entities import Dataset, Collection from ....common.entities.geneset import GenesetDatasetLink from ....api_server.db import dbconnect from ....common.utils.exceptions import ( ...
33.912088
119
0.700907
from flask import make_response, jsonify, g from ....common.corpora_orm import CollectionVisibility, DatasetArtifactFileType from ....common.entities import Dataset, Collection from ....common.entities.geneset import GenesetDatasetLink from ....api_server.db import dbconnect from ....common.utils.exceptions import ( ...
true
true
1c2f034d6dfba5b487fa562eb6a82da3b9d57793
78,620
py
Python
mesonbuild/modules/gnome.py
megatux/meson
047db1c64cd5b7ef070f73e1d580e36236ac9613
[ "Apache-2.0" ]
null
null
null
mesonbuild/modules/gnome.py
megatux/meson
047db1c64cd5b7ef070f73e1d580e36236ac9613
[ "Apache-2.0" ]
null
null
null
mesonbuild/modules/gnome.py
megatux/meson
047db1c64cd5b7ef070f73e1d580e36236ac9613
[ "Apache-2.0" ]
null
null
null
# Copyright 2015-2016 The Meson development 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 law or agree...
47.049671
133
0.578008
import os import copy import subprocess from .. import build from .. import mlog from .. import mesonlib from .. import compilers from .. import interpreter from . import GResourceTarget, GResourceHeaderTarget, GirTarget, TypelibTarget, VapiTarget from . import get_include_args from . import ExtensionMo...
true
true
1c2f0461dae88461ed47418747b251fbcdf88be2
9,502
py
Python
src/python/turicreate/toolkits/drawing_classifier/_tf_drawing_classifier.py
Bpowers4/turicreate
73dad213cc1c4f74337b905baea2b3a1e5a0266c
[ "BSD-3-Clause" ]
1
2021-04-23T10:51:03.000Z
2021-04-23T10:51:03.000Z
src/python/turicreate/toolkits/drawing_classifier/_tf_drawing_classifier.py
Bpowers4/turicreate
73dad213cc1c4f74337b905baea2b3a1e5a0266c
[ "BSD-3-Clause" ]
null
null
null
src/python/turicreate/toolkits/drawing_classifier/_tf_drawing_classifier.py
Bpowers4/turicreate
73dad213cc1c4f74337b905baea2b3a1e5a0266c
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright © 2019 Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can # be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from __future__ import print_function as _ from __future__ import division as _ from...
36.40613
93
0.561461
from __future__ import print_function as _ from __future__ import division as _ from __future__ import absolute_import as _ import numpy as _np from .._tf_model import TensorFlowModel import turicreate.toolkits._tf_utils as _utils import tensorflow.compat.v1 as _tf _tf.disable_v2_behavior() class DrawingClas...
true
true
1c2f0489ad7d51f38cba2c7890b7280416dbc116
1,226
py
Python
WebMirror/management/rss_parser_funcs/feed_parse_extractArsbltranslationsWordpressCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
193
2016-08-02T22:04:35.000Z
2022-03-09T20:45:41.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractArsbltranslationsWordpressCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
533
2016-08-23T20:48:23.000Z
2022-03-28T15:55:13.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractArsbltranslationsWordpressCom.py
rrosajp/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
19
2015-08-13T18:01:08.000Z
2021-07-12T17:13:09.000Z
def extractArsbltranslationsWordpressCom(item): ''' Parser for 'arsbltranslations.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('Picked up a Strange Knight', '...
49.04
130
0.533442
def extractArsbltranslationsWordpressCom(item): vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('Picked up a Strange Knight', 'Picked up a Strange Knight', ...
true
true
1c2f04d4a3524b401bdca8931931a853e81bf11f
201
py
Python
app/common/config.py
hust-sh/hookhub
b6a26f167d4294200e1cce0886a8c89976b687ec
[ "MIT" ]
1
2017-11-30T13:16:43.000Z
2017-11-30T13:16:43.000Z
app/common/config.py
hust-sh/hookhub
b6a26f167d4294200e1cce0886a8c89976b687ec
[ "MIT" ]
1
2017-12-02T10:10:24.000Z
2017-12-02T10:59:13.000Z
app/common/config.py
hust-sh/hookhub
b6a26f167d4294200e1cce0886a8c89976b687ec
[ "MIT" ]
null
null
null
# coding: utf-8 REDIS_URL = 'redis://redis:6379/0' REDIS_CONF = { 'url': REDIS_URL, 'socket_timeout': 0.5, } WEBHOOK_TYPES = ['jira', 'jenkins'] LOG_DIR = '/var/log' HOST = '120.78.197.57'
14.357143
35
0.61194
REDIS_URL = 'redis://redis:6379/0' REDIS_CONF = { 'url': REDIS_URL, 'socket_timeout': 0.5, } WEBHOOK_TYPES = ['jira', 'jenkins'] LOG_DIR = '/var/log' HOST = '120.78.197.57'
true
true
1c2f050463c4c33d9a85f97da89b550b5898c0e3
8,755
py
Python
vta/config/vta_config.py
robo-corg/incubator-tvm
4ddfdb4b15d05a5bf85a984837967d004efee5dd
[ "Apache-2.0" ]
286
2020-06-23T06:40:44.000Z
2022-03-30T01:27:49.000Z
vta/config/vta_config.py
robo-corg/incubator-tvm
4ddfdb4b15d05a5bf85a984837967d004efee5dd
[ "Apache-2.0" ]
10
2020-07-31T03:26:59.000Z
2021-12-27T15:00:54.000Z
vta/config/vta_config.py
robo-corg/incubator-tvm
4ddfdb4b15d05a5bf85a984837967d004efee5dd
[ "Apache-2.0" ]
30
2020-07-17T01:04:14.000Z
2021-12-27T14:05:19.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.738938
90
0.632895
import os import sys import json import argparse def get_pkg_config(cfg): curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__))) proj_root = os.path.abspath(os.path.join(curr_path, "../../")) pkg_config_py = os.path.join(proj_root, "vta/python/vta/pkg_config.py") lib...
true
true
1c2f07d075b36f8c68d7d495bde8a0466b55974d
1,730
py
Python
import_broadbands.py
alphagov/land-availability-import
58fd2c698eda18702ae680da3d3b9f3fea2865d1
[ "MIT" ]
null
null
null
import_broadbands.py
alphagov/land-availability-import
58fd2c698eda18702ae680da3d3b9f3fea2865d1
[ "MIT" ]
9
2017-02-20T15:14:42.000Z
2017-07-10T10:35:45.000Z
import_broadbands.py
alphagov/land-availability-import
58fd2c698eda18702ae680da3d3b9f3fea2865d1
[ "MIT" ]
2
2019-08-29T11:51:53.000Z
2021-04-10T19:55:55.000Z
from importers import CSVImportCommand import requests import click class BroadbandImportCommand(CSVImportCommand): def clean_column(self, column): clean = column.replace('<', '').replace('N/A', '') if clean == '': return '0' else: return clean def process_ro...
31.454545
71
0.602312
from importers import CSVImportCommand import requests import click class BroadbandImportCommand(CSVImportCommand): def clean_column(self, column): clean = column.replace('<', '').replace('N/A', '') if clean == '': return '0' else: return clean def process_ro...
true
true
1c2f07fc053ad9c2110a8a00d9b348350b3331c4
1,168
py
Python
packages/athena/setup.py
sebastianvillarroel/soda-sql
d672d94945ad5200cb47e05fe1b04706c2e84cc5
[ "Apache-2.0" ]
null
null
null
packages/athena/setup.py
sebastianvillarroel/soda-sql
d672d94945ad5200cb47e05fe1b04706c2e84cc5
[ "Apache-2.0" ]
null
null
null
packages/athena/setup.py
sebastianvillarroel/soda-sql
d672d94945ad5200cb47e05fe1b04706c2e84cc5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import sys from setuptools import setup, find_namespace_packages if sys.version_info < (3, 7): print('Error: Soda SQL requires at least Python 3.7') print('Error: Please upgrade your Python version to 3.7 or later') sys.exit(1) package_name = "soda-sql-athena" package_version = '2.1....
31.567568
82
0.666096
import sys from setuptools import setup, find_namespace_packages if sys.version_info < (3, 7): print('Error: Soda SQL requires at least Python 3.7') print('Error: Please upgrade your Python version to 3.7 or later') sys.exit(1) package_name = "soda-sql-athena" package_version = '2.1.1' description = "So...
true
true
1c2f0938a84af2f6d37e5903711c69fdc485b9d9
2,492
py
Python
scripts/env/set-eth.py
DryptoBZX/contractsV2
3ee0b7669902ff6b9422440289ddc52f679e636b
[ "Apache-2.0" ]
null
null
null
scripts/env/set-eth.py
DryptoBZX/contractsV2
3ee0b7669902ff6b9422440289ddc52f679e636b
[ "Apache-2.0" ]
null
null
null
scripts/env/set-eth.py
DryptoBZX/contractsV2
3ee0b7669902ff6b9422440289ddc52f679e636b
[ "Apache-2.0" ]
null
null
null
from brownie import * BZX = Contract.from_abi("BZX", "0xD8Ee69652E4e4838f2531732a46d1f7F584F0b7f", interface.IBZx.abi) TOKEN_REGISTRY = Contract.from_abi("TOKEN_REGISTRY", "0xf0E474592B455579Fe580D610b846BdBb529C6F7", TokenRegistry.abi) list = TOKEN_REGISTRY.getTokens(0, 50) for l in list: iTokenTemp = Contract.f...
55.377778
134
0.808989
from brownie import * BZX = Contract.from_abi("BZX", "0xD8Ee69652E4e4838f2531732a46d1f7F584F0b7f", interface.IBZx.abi) TOKEN_REGISTRY = Contract.from_abi("TOKEN_REGISTRY", "0xf0E474592B455579Fe580D610b846BdBb529C6F7", TokenRegistry.abi) list = TOKEN_REGISTRY.getTokens(0, 50) for l in list: iTokenTemp = Contract.f...
true
true
1c2f09974650f574525787d83f9085cdfdfec390
22,929
py
Python
src/ensae_teaching_cs/helpers/colorsdef.py
Jerome-maker/ensae_teaching_cs
43ea044361ee60c00c85aea354a7b25c21c0fd07
[ "MIT" ]
73
2015-05-12T13:12:11.000Z
2021-12-21T11:44:29.000Z
src/ensae_teaching_cs/helpers/colorsdef.py
Jerome-maker/ensae_teaching_cs
43ea044361ee60c00c85aea354a7b25c21c0fd07
[ "MIT" ]
90
2015-06-23T11:11:35.000Z
2021-03-31T22:09:15.000Z
src/ensae_teaching_cs/helpers/colorsdef.py
Jerome-maker/ensae_teaching_cs
43ea044361ee60c00c85aea354a7b25c21c0fd07
[ "MIT" ]
65
2015-01-13T08:23:55.000Z
2022-02-11T22:42:07.000Z
""" @file @brief Definition of colors """ colors_definition = [ ('Alice blue', '#f0f8ff'), ('Alizarin crimson', '#e32636'), ('Almond', '#efdecd'), ('Amaranth', '#e52b50'), ('Amber', '#ffbf00'), ('American rose', '#ff033e'), ('Amethyst', '#9966cc'), ('Green', '#a4c639'), ('Antique br...
30.694779
43
0.493829
colors_definition = [ ('Alice blue', '#f0f8ff'), ('Alizarin crimson', '#e32636'), ('Almond', '#efdecd'), ('Amaranth', '#e52b50'), ('Amber', '#ffbf00'), ('American rose', '#ff033e'), ('Amethyst', '#9966cc'), ('Green', '#a4c639'), ('Antique brass', '#cd9575'), ('Antique fuchsia', ...
true
true
1c2f0a29fb656dcac8d987417053888e961ea568
801
py
Python
evora/server/ftp_server.py
ejgl/ScienceCamera
c81542bb0605423961110fa6d79d64fa69356a98
[ "0BSD" ]
4
2017-08-29T22:41:00.000Z
2021-01-21T00:22:35.000Z
evora/server/ftp_server.py
ejgl/ScienceCamera
c81542bb0605423961110fa6d79d64fa69356a98
[ "0BSD" ]
40
2016-04-11T23:47:24.000Z
2021-09-26T15:34:17.000Z
evora/server/ftp_server.py
ejgl/ScienceCamera
c81542bb0605423961110fa6d79d64fa69356a98
[ "0BSD" ]
6
2016-05-27T22:49:17.000Z
2021-08-19T22:46:11.000Z
#!/usr/bin/env python2 from __future__ import absolute_import, division, print_function from os.path import isdir from twisted.cred.checkers import AllowAnonymousAccess from twisted.cred.portal import Portal from twisted.internet import reactor # ftp server imports from twisted.protocols.ftp import FTPFactory, FTPReal...
29.666667
88
0.761548
from __future__ import absolute_import, division, print_function from os.path import isdir from twisted.cred.checkers import AllowAnonymousAccess from twisted.cred.portal import Portal from twisted.internet import reactor from twisted.protocols.ftp import FTPFactory, FTPRealm from evora.common import netconsts d...
true
true
1c2f0b44319be3c44e399c947d7a1c55056cb317
529
py
Python
django_dropbox_csv_export/satisfaction_ratings/tests/test_models.py
zkan/django-dropbox-csv-export
5e77c539d84acf59d6f1dc1ffe3515b13fc34565
[ "MIT" ]
null
null
null
django_dropbox_csv_export/satisfaction_ratings/tests/test_models.py
zkan/django-dropbox-csv-export
5e77c539d84acf59d6f1dc1ffe3515b13fc34565
[ "MIT" ]
null
null
null
django_dropbox_csv_export/satisfaction_ratings/tests/test_models.py
zkan/django-dropbox-csv-export
5e77c539d84acf59d6f1dc1ffe3515b13fc34565
[ "MIT" ]
null
null
null
from django.test import TestCase from ..models import SatisfactionRating class SatisfactionRatingTest(TestCase): def test_save_satisfaction_rating(self): satisfaction_rating = SatisfactionRating() satisfaction_rating.customer_name = 'Pronto' satisfaction_rating.score = 9 satisfact...
31.117647
69
0.750473
from django.test import TestCase from ..models import SatisfactionRating class SatisfactionRatingTest(TestCase): def test_save_satisfaction_rating(self): satisfaction_rating = SatisfactionRating() satisfaction_rating.customer_name = 'Pronto' satisfaction_rating.score = 9 satisfact...
true
true
1c2f0b4fcfb1e4565793074e7760ec4d5fe26d08
3,678
py
Python
model/graph_models/object_descriptor.py
Nik-V9/AirObject
5937e64531f08449e81d2c90e3c6643727efbaf0
[ "BSD-3-Clause" ]
9
2022-03-15T17:28:48.000Z
2022-03-29T12:32:28.000Z
model/graph_models/object_descriptor.py
Nik-V9/AirObject
5937e64531f08449e81d2c90e3c6643727efbaf0
[ "BSD-3-Clause" ]
1
2022-03-29T06:03:14.000Z
2022-03-29T13:38:29.000Z
model/graph_models/object_descriptor.py
Nik-V9/AirObject
5937e64531f08449e81d2c90e3c6643727efbaf0
[ "BSD-3-Clause" ]
1
2022-03-15T19:34:06.000Z
2022-03-15T19:34:06.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import torch import torch.nn as nn from model.graph_models.attention import GraphAtten class ObjectDescriptor(nn.Module): def __init__(self, config): super(ObjectDescriptor, self).__init__() points_encoder_dims = config['points_encoder_dims'] descriptor_dim...
32.263158
108
0.694671
import torch import torch.nn as nn from model.graph_models.attention import GraphAtten class ObjectDescriptor(nn.Module): def __init__(self, config): super(ObjectDescriptor, self).__init__() points_encoder_dims = config['points_encoder_dims'] descriptor_dim = config['descriptor_dim'] nhid = confi...
true
true
1c2f0d28c1df042f6c7b367df5e9614a27ecf277
702
py
Python
game/tichu/team.py
lukaspestalozzi/Master_Semester_Project
4e71d4034ae3f5e7efa0864b48c6fd4d876fef4e
[ "MIT" ]
null
null
null
game/tichu/team.py
lukaspestalozzi/Master_Semester_Project
4e71d4034ae3f5e7efa0864b48c6fd4d876fef4e
[ "MIT" ]
null
null
null
game/tichu/team.py
lukaspestalozzi/Master_Semester_Project
4e71d4034ae3f5e7efa0864b48c6fd4d876fef4e
[ "MIT" ]
null
null
null
from collections import namedtuple from game.tichu.tichuplayers import TichuPlayer from game.utils import check_isinstance class Team(namedtuple("T", ["player1", "player2"])): def __init__(self, player1, player2): check_isinstance(player1, TichuPlayer) check_isinstance(player2, TichuPlayer) ...
26
80
0.68661
from collections import namedtuple from game.tichu.tichuplayers import TichuPlayer from game.utils import check_isinstance class Team(namedtuple("T", ["player1", "player2"])): def __init__(self, player1, player2): check_isinstance(player1, TichuPlayer) check_isinstance(player2, TichuPlayer) ...
true
true
1c2f0d7ec6b403d64e71162ea6a400ae30342e6d
23,524
py
Python
tests/test_app_routers_share_tokens_GET.py
BoostryJP/ibet-Prime
924e7f8da4f8feea0a572e8b5532e09bcdf2dc99
[ "Apache-2.0" ]
2
2021-08-19T12:35:25.000Z
2022-02-16T04:13:38.000Z
tests/test_app_routers_share_tokens_GET.py
BoostryJP/ibet-Prime
924e7f8da4f8feea0a572e8b5532e09bcdf2dc99
[ "Apache-2.0" ]
46
2021-09-02T03:22:05.000Z
2022-03-31T09:20:00.000Z
tests/test_app_routers_share_tokens_GET.py
BoostryJP/ibet-Prime
924e7f8da4f8feea0a572e8b5532e09bcdf2dc99
[ "Apache-2.0" ]
1
2021-11-17T23:18:27.000Z
2021-11-17T23:18:27.000Z
""" Copyright BOOSTRY Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
41.054101
107
0.622641
from unittest import mock from unittest.mock import call from pytz import timezone from config import TZ from app.model.blockchain import IbetShareContract from app.model.db import ( Token, TokenType, AdditionalTokenInfo ) from tests.account_config import config_eth_account class TestAppRoutersShareToken...
true
true
1c2f0dbf99f70aa7e0c4f0b9b609c5c57eaed13a
97
py
Python
bloggingapp/apps.py
mr-shubhamsinghal/blog
1dc24e0d52ce7432f10faad5a2823190d3f924d8
[ "MIT" ]
null
null
null
bloggingapp/apps.py
mr-shubhamsinghal/blog
1dc24e0d52ce7432f10faad5a2823190d3f924d8
[ "MIT" ]
null
null
null
bloggingapp/apps.py
mr-shubhamsinghal/blog
1dc24e0d52ce7432f10faad5a2823190d3f924d8
[ "MIT" ]
null
null
null
from django.apps import AppConfig class BloggingappConfig(AppConfig): name = 'bloggingapp'
16.166667
35
0.773196
from django.apps import AppConfig class BloggingappConfig(AppConfig): name = 'bloggingapp'
true
true
1c2f0dbffd87af73f94a2a3f241c3730a7a594e1
78,244
py
Python
ISAFlaserResults/code/csvClean.py
dgbirm/elo_sailor
0978eac23e9334eee8cab3225840f82fbc153194
[ "MIT" ]
2
2020-08-12T17:34:53.000Z
2021-02-19T15:13:06.000Z
ISAFlaserResults/code/csvClean.py
dgbirm/elo_sailor
0978eac23e9334eee8cab3225840f82fbc153194
[ "MIT" ]
null
null
null
ISAFlaserResults/code/csvClean.py
dgbirm/elo_sailor
0978eac23e9334eee8cab3225840f82fbc153194
[ "MIT" ]
null
null
null
#Scrap code for cleaning the CSV files so that we can read them easier import csv import sys import pandas as pd import numpy as np import os import re from selenium import webdriver from time import sleep from text_unidecode import unidecode from tabulate import tabulate sys.path.append('/home/daniel/Desktop/elo_sa...
213.19891
67,521
0.453121
import csv import sys import pandas as pd import numpy as np import os import re from selenium import webdriver from time import sleep from text_unidecode import unidecode from tabulate import tabulate sys.path.append('/home/daniel/Desktop/elo_sailor/Glicko2approach') from SailingGlicko2 import * from Scrape import...
true
true
1c2f0de6e086382425de3ac8164941b1a7edefa0
266
py
Python
hackerrank/Algorithms/Tower Breakers, Revisited!/test.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
4
2020-07-24T01:59:50.000Z
2021-07-24T15:14:08.000Z
hackerrank/Algorithms/Tower Breakers, Revisited!/test.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
hackerrank/Algorithms/Tower Breakers, Revisited!/test.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
import unittest import solution class TestQ(unittest.TestCase): def test_case_0(self): self.assertEqual(solution.towerBreakers([1, 2]), 1) self.assertEqual(solution.towerBreakers([1, 2, 3]), 2) if __name__ == '__main__': unittest.main()
19
62
0.680451
import unittest import solution class TestQ(unittest.TestCase): def test_case_0(self): self.assertEqual(solution.towerBreakers([1, 2]), 1) self.assertEqual(solution.towerBreakers([1, 2, 3]), 2) if __name__ == '__main__': unittest.main()
true
true
1c2f0ff2032887fc139b15fb0d61839cb7f204ba
13,023
py
Python
game2.py
calthecoder/zealous-fibula
b1c3fb3426ec6711a474948f7d820289e1039fca
[ "MIT" ]
null
null
null
game2.py
calthecoder/zealous-fibula
b1c3fb3426ec6711a474948f7d820289e1039fca
[ "MIT" ]
null
null
null
game2.py
calthecoder/zealous-fibula
b1c3fb3426ec6711a474948f7d820289e1039fca
[ "MIT" ]
null
null
null
""" Beta 0.0.9 - attack() class function does not work; returns None Beta 0.1.0 - Fixed Issue 0.0.9. Working but missing a few things Beta 0.1.1 - Renamed self.sees() to self.act(); added a passive function self.act() to Item Beta 0.1.2 - Renamed namelist to enemylist and added itemlist Beta 0.2.1 - Added items to pick...
34.452381
134
0.646088
import player, sys, random from enemies import * from world import * from items import * from interactives import * k8 = mixer.Sound('resources/Shadows of Angmar.ogg') strack9 = mixer.Sound('resources/The Creeping Gloom.ogg') strack10 = mixer.Sound('resources/The Ice Bay.ogg') strack11 = mixer.Sound('resources/Th...
true
true
1c2f10bfd88983bb0563efeb649c2e699009e717
7,933
py
Python
sagemaker-debugger/pytorch_iterative_model_pruning/model_resnet.py
jerrypeng7773/amazon-sagemaker-examples
c5ddecce1f739a345465b9a38b064983a129141d
[ "Apache-2.0" ]
2,610
2020-10-01T14:14:53.000Z
2022-03-31T18:02:31.000Z
sagemaker-debugger/pytorch_iterative_model_pruning/model_resnet.py
jerrypeng7773/amazon-sagemaker-examples
c5ddecce1f739a345465b9a38b064983a129141d
[ "Apache-2.0" ]
1,959
2020-09-30T20:22:42.000Z
2022-03-31T23:58:37.000Z
sagemaker-debugger/pytorch_iterative_model_pruning/model_resnet.py
jerrypeng7773/amazon-sagemaker-examples
c5ddecce1f739a345465b9a38b064983a129141d
[ "Apache-2.0" ]
2,052
2020-09-30T22:11:46.000Z
2022-03-31T23:02:51.000Z
import numpy as np import smdebug import torch import torch.nn as nn import torchvision from smdebug import modes from torchvision import models # list of ordered tensor names activation_outputs = [ #'relu_ReLU_output_0', "layer1.0.relu_0_output_0", "layer1.1.relu_0_output_0", "layer2.0.relu_0_output_0...
40.065657
105
0.571411
import numpy as np import smdebug import torch import torch.nn as nn import torchvision from smdebug import modes from torchvision import models activation_outputs = [ "layer1.0.relu_0_output_0", "layer1.1.relu_0_output_0", "layer2.0.relu_0_output_0", "layer2.1.relu_0_output_0", "layer3.0.rel...
true
true