hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
40ea8ef48a928fd6d21055d76899ad88cae9f033 | 219 | py | Python | transparentai_ui/app/models/modules/__init__.py | Nathanlauga/transparentai-ui | e15455d869099319c4ab60787890c2079af66b75 | [
"MIT"
] | 1 | 2020-06-18T08:53:46.000Z | 2020-06-18T08:53:46.000Z | transparentai_ui/app/models/modules/__init__.py | Nathanlauga/transparentai-ui | e15455d869099319c4ab60787890c2079af66b75 | [
"MIT"
] | null | null | null | transparentai_ui/app/models/modules/__init__.py | Nathanlauga/transparentai-ui | e15455d869099319c4ab60787890c2079af66b75 | [
"MIT"
] | 1 | 2021-11-23T22:59:54.000Z | 2021-11-23T22:59:54.000Z | from .pandas_profiling import ModulePandasProfiling
from .bias import ModuleBias
from .performance import ModulePerformance
from .interpretability import ModuleInterpretability
from .sustainable import ModuleSustainable | 43.8 | 52 | 0.890411 | from .pandas_profiling import ModulePandasProfiling
from .bias import ModuleBias
from .performance import ModulePerformance
from .interpretability import ModuleInterpretability
from .sustainable import ModuleSustainable | 0 | 0 | 0 |
f7394d7f4e15ee910ea725c70f43bd24a29bff59 | 638 | py | Python | niescraper/alarm.py | elKei24/niescraper | d26c2b6df7f1fa29633d6356023802e41c38721c | [
"MIT"
] | null | null | null | niescraper/alarm.py | elKei24/niescraper | d26c2b6df7f1fa29633d6356023802e41c38721c | [
"MIT"
] | null | null | null | niescraper/alarm.py | elKei24/niescraper | d26c2b6df7f1fa29633d6356023802e41c38721c | [
"MIT"
] | null | null | null | import asyncio
import importlib.resources
import aioconsole
from playsound import playsound
import niescraper.resources
| 25.52 | 83 | 0.749216 | import asyncio
import importlib.resources
import aioconsole
from playsound import playsound
import niescraper.resources
async def play_alarm():
with importlib.resources.path(niescraper.resources, 'alarm.mp3') as alarm_file:
while asyncio.get_running_loop().is_running():
playsound(alarm_file,... | 444 | 0 | 69 |
9fea2b873e177ec7678b8006a40ac7ca3d96746c | 2,691 | py | Python | Intermediate Machine Learning/Exercise 5.py | haoweii0215/Kaggle-Courses | 57974b2e6618b1125e030791320c649dda2fc783 | [
"MIT"
] | null | null | null | Intermediate Machine Learning/Exercise 5.py | haoweii0215/Kaggle-Courses | 57974b2e6618b1125e030791320c649dda2fc783 | [
"MIT"
] | null | null | null | Intermediate Machine Learning/Exercise 5.py | haoweii0215/Kaggle-Courses | 57974b2e6618b1125e030791320c649dda2fc783 | [
"MIT"
] | null | null | null | # Exercise 5 : Cross-Validation
## Set up code checking
import os
if not os.path.exists("../input/train.csv"):
os.symlink("../input/home-data-for-ml-course/train.csv", "../input/train.csv")
os.symlink("../input/home-data-for-ml-course/test.csv", "../input/test.csv")
from learntools.core import binder
binder.bi... | 43.403226 | 214 | 0.73913 | # Exercise 5 : Cross-Validation
## Set up code checking
import os
if not os.path.exists("../input/train.csv"):
os.symlink("../input/home-data-for-ml-course/train.csv", "../input/train.csv")
os.symlink("../input/home-data-for-ml-course/test.csv", "../input/test.csv")
from learntools.core import binder
binder.bi... | 282 | 0 | 22 |
a66eb3e3423ecbe7d1fa55c112056c2996c31103 | 7,210 | py | Python | modules/rig.py | Noorth34/barakaTools | c87361a284ab6b410f4957794d022cb07ea216ff | [
"CC0-1.0"
] | null | null | null | modules/rig.py | Noorth34/barakaTools | c87361a284ab6b410f4957794d022cb07ea216ff | [
"CC0-1.0"
] | null | null | null | modules/rig.py | Noorth34/barakaTools | c87361a284ab6b410f4957794d022cb07ea216ff | [
"CC0-1.0"
] | null | null | null | # coding:utf-8
# real mirror script
# 1) duplicate special ( world | input graph)
# 2) unparent offsets to world
# 3) create a null for each offset
# 4) match Translate each null on his respective offset
# 5) *(-1) translate X on each null
# 6) rotation 180° on Y and Z axis on each null
# 7) unparent offsets an... | 32.331839 | 123 | 0.697642 | # coding:utf-8
# real mirror script
# 1) duplicate special ( world | input graph)
# 2) unparent offsets to world
# 3) create a null for each offset
# 4) match Translate each null on his respective offset
# 5) *(-1) translate X on each null
# 6) rotation 180° on Y and Z axis on each null
# 7) unparent offsets an... | 1,550 | 0 | 69 |
2fdcf9b4a72c56e2caf1881dd37ca30b320f2f35 | 318 | py | Python | api/constants.py | Xavier-Cliquennois/ac-mediator | ce55b65ab7f4532fc11fbb2f994518c60240bfdc | [
"Apache-2.0"
] | 9 | 2016-11-17T08:04:01.000Z | 2020-09-10T05:58:36.000Z | api/constants.py | Xavier-Cliquennois/ac-mediator | ce55b65ab7f4532fc11fbb2f994518c60240bfdc | [
"Apache-2.0"
] | 23 | 2016-10-26T14:43:55.000Z | 2021-06-10T20:02:38.000Z | api/constants.py | Xavier-Cliquennois/ac-mediator | ce55b65ab7f4532fc11fbb2f994518c60240bfdc | [
"Apache-2.0"
] | 3 | 2018-03-03T12:07:28.000Z | 2020-08-02T12:54:31.000Z | QUERY_PARAM_QUERY = 'q'
QUERY_PARAM_SORT = 's'
QUERY_PARAM_FILTER = 'f'
QUERY_PARAM_SIZE = 'size'
QUERY_PARAM_PAGE = 'page'
QUERY_PARAM_FIELDS = 'fields'
QUERY_PARAM_OFFSET = 'offset'
QUERY_PARAM_INCLUDE = 'include'
QUERY_PARAM_EXCLUDE = 'exclude'
QUERY_PARAM_WAIT_UNTIL_COMPLETE = 'wuc'
QUERY_PARAM_FORMAT = 'format'
| 26.5 | 39 | 0.792453 | QUERY_PARAM_QUERY = 'q'
QUERY_PARAM_SORT = 's'
QUERY_PARAM_FILTER = 'f'
QUERY_PARAM_SIZE = 'size'
QUERY_PARAM_PAGE = 'page'
QUERY_PARAM_FIELDS = 'fields'
QUERY_PARAM_OFFSET = 'offset'
QUERY_PARAM_INCLUDE = 'include'
QUERY_PARAM_EXCLUDE = 'exclude'
QUERY_PARAM_WAIT_UNTIL_COMPLETE = 'wuc'
QUERY_PARAM_FORMAT = 'format'
| 0 | 0 | 0 |
5dad6baf371de22cb47baf42c155ab90f5fc6fbb | 780 | py | Python | read/views.py | MaryMbugua/Tusome | 4a6b8bf20644953977d91cda6ad299d12b93a934 | [
"MIT"
] | 1 | 2018-06-25T20:22:31.000Z | 2018-06-25T20:22:31.000Z | read/views.py | MaryMbugua/Tusome | 4a6b8bf20644953977d91cda6ad299d12b93a934 | [
"MIT"
] | null | null | null | read/views.py | MaryMbugua/Tusome | 4a6b8bf20644953977d91cda6ad299d12b93a934 | [
"MIT"
] | null | null | null | from django.shortcuts import render,redirect
from django.http import HttpResponse,Http404,HttpResponseRedirect
from django.contrib.auth.decorators import login_required
from .models import Enquiry,Vitabu
from .forms import EnquiryForm
# Create your views here. | 30 | 65 | 0.7 | from django.shortcuts import render,redirect
from django.http import HttpResponse,Http404,HttpResponseRedirect
from django.contrib.auth.decorators import login_required
from .models import Enquiry,Vitabu
from .forms import EnquiryForm
# Create your views here.
def welcome(request):
books = Vitabu.objects.all()
... | 451 | 0 | 68 |
049ab880e018f48145c50061ce27bad3fd3238f4 | 22,531 | py | Python | src/tests/test_namespace2projecttransfer.py | scraiber/scraiber-api | 010d0875ba0820e0ec7790d74df8a2955fac360e | [
"Apache-2.0"
] | 1 | 2022-03-29T06:41:41.000Z | 2022-03-29T06:41:41.000Z | src/tests/test_namespace2projecttransfer.py | scraiber/scraiber-api | 010d0875ba0820e0ec7790d74df8a2955fac360e | [
"Apache-2.0"
] | null | null | null | src/tests/test_namespace2projecttransfer.py | scraiber/scraiber-api | 010d0875ba0820e0ec7790d74df8a2955fac360e | [
"Apache-2.0"
] | null | null | null | import time
import uuid
from kubernetes import client, config
import os
from fastapi.testclient import TestClient
import json
from typing import List
from pydantic import EmailStr
from fastapi import HTTPException
from app.api.models.auth0 import Auth0User
from .helper_functions import (
generate_user,
genera... | 53.014118 | 130 | 0.712441 | import time
import uuid
from kubernetes import client, config
import os
from fastapi.testclient import TestClient
import json
from typing import List
from pydantic import EmailStr
from fastapi import HTTPException
from app.api.models.auth0 import Auth0User
from .helper_functions import (
generate_user,
genera... | 21,303 | 0 | 207 |
f03a8a84ca05fb06e5190a7a160fe0079e5c60e9 | 85 | py | Python | starry/_core/ops/limbdark/__init__.py | fbartolic/starry | d50576caf964ad925c490c9f3ffe1273ab155397 | [
"MIT"
] | 116 | 2018-02-23T19:47:15.000Z | 2022-02-21T04:43:46.000Z | starry/_core/ops/limbdark/__init__.py | fbartolic/starry | d50576caf964ad925c490c9f3ffe1273ab155397 | [
"MIT"
] | 224 | 2018-02-26T00:41:51.000Z | 2022-03-29T10:38:16.000Z | starry/_core/ops/limbdark/__init__.py | fbartolic/starry | d50576caf964ad925c490c9f3ffe1273ab155397 | [
"MIT"
] | 25 | 2018-02-26T18:14:36.000Z | 2021-11-30T01:00:56.000Z | # -*- coding: utf-8 -*-
from .limbdark import LimbDarkOp
from .get_cl import GetClOp
| 21.25 | 32 | 0.717647 | # -*- coding: utf-8 -*-
from .limbdark import LimbDarkOp
from .get_cl import GetClOp
| 0 | 0 | 0 |
22236c2ae2d83019f7983fe4b2e734a91069694e | 5,221 | py | Python | desicos/abaqus/imperfections/ti.py | saullocastro/desicos | 922db8ac4fb0fb4d09df18ce2a14011f207f6fa8 | [
"BSD-3-Clause"
] | 1 | 2020-10-22T22:15:24.000Z | 2020-10-22T22:15:24.000Z | desicos/abaqus/imperfections/ti.py | saullocastro/desicos | 922db8ac4fb0fb4d09df18ce2a14011f207f6fa8 | [
"BSD-3-Clause"
] | 1 | 2020-10-09T12:42:02.000Z | 2020-10-09T12:42:02.000Z | desicos/abaqus/imperfections/ti.py | saullocastro/desicos | 922db8ac4fb0fb4d09df18ce2a14011f207f6fa8 | [
"BSD-3-Clause"
] | 2 | 2020-07-14T07:45:31.000Z | 2020-12-29T00:22:41.000Z | from __future__ import absolute_import
import numpy as np
from desicos.abaqus.apply_imperfections import change_thickness_ABAQUS
from desicos.conecylDB import update_imps
class TI(object):
"""Thickness Imperfection
Assumes that a percentage variation of the laminate thickness can be
represented by the ... | 35.277027 | 78 | 0.581498 | from __future__ import absolute_import
import numpy as np
from desicos.abaqus.apply_imperfections import change_thickness_ABAQUS
from desicos.conecylDB import update_imps
class TI(object):
"""Thickness Imperfection
Assumes that a percentage variation of the laminate thickness can be
represented by the ... | 1,041 | 0 | 80 |
7bd1fe7f42a3682cdb3288d310d99445d1adcff0 | 727 | py | Python | mmtbx/command_line/development.aev.py | mphancock/cctbx_project | ec8a239c5bcee9c9b2d1c6c95dc3fff2580bbb85 | [
"BSD-3-Clause-LBNL"
] | null | null | null | mmtbx/command_line/development.aev.py | mphancock/cctbx_project | ec8a239c5bcee9c9b2d1c6c95dc3fff2580bbb85 | [
"BSD-3-Clause-LBNL"
] | 1 | 2020-05-26T17:46:17.000Z | 2020-05-26T17:55:19.000Z | mmtbx/command_line/development.aev.py | mphancock/cctbx_project | ec8a239c5bcee9c9b2d1c6c95dc3fff2580bbb85 | [
"BSD-3-Clause-LBNL"
] | 1 | 2022-02-08T10:11:07.000Z | 2022-02-08T10:11:07.000Z | from __future__ import absolute_import, division, print_function
# LIBTBX_SET_DISPATCHER_NAME mmtbx.development.aev
import sys
import time
import mmtbx
import iotbx.pdb
import mmtbx.model
from libtbx.utils import null_out
import mmtbx.atomic_environment_vectors as aev
if __name__ == '__main__':
main(*tuple(sys.argv[... | 26.925926 | 64 | 0.718019 | from __future__ import absolute_import, division, print_function
# LIBTBX_SET_DISPATCHER_NAME mmtbx.development.aev
import sys
import time
import mmtbx
import iotbx.pdb
import mmtbx.model
from libtbx.utils import null_out
import mmtbx.atomic_environment_vectors as aev
def main(filename, precision):
t0 = time.time()
... | 378 | 0 | 23 |
a2463c67d96d75c3ab770a2e0bf79ca1214b2471 | 589 | py | Python | messageque/test-client.py | yafraorg/pythonsamples | 8f61292c89b497d4067d2fb1873e5281877901f3 | [
"Apache-2.0"
] | null | null | null | messageque/test-client.py | yafraorg/pythonsamples | 8f61292c89b497d4067d2fb1873e5281877901f3 | [
"Apache-2.0"
] | 3 | 2021-06-08T21:19:19.000Z | 2022-03-12T00:24:22.000Z | messageque/test-client.py | yafraorg/pythonsamples | 8f61292c89b497d4067d2fb1873e5281877901f3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import pika
#credentials = pika.PlainCredentials('guest', 'guest')
#parameters = pika.ConnectionParameters('amqp.k8sd.pax.ch', 80, '/', credentials)
#parameters = pika.URLParameters('amqp://guest:guest@localhost:5672/%2F')
#connection = pika.BlockingConnection(parameters)
connection = pika.Block... | 29.45 | 81 | 0.694397 | #!/usr/bin/env python
import pika
#credentials = pika.PlainCredentials('guest', 'guest')
#parameters = pika.ConnectionParameters('amqp.k8sd.pax.ch', 80, '/', credentials)
#parameters = pika.URLParameters('amqp://guest:guest@localhost:5672/%2F')
#connection = pika.BlockingConnection(parameters)
connection = pika.Block... | 0 | 0 | 0 |
3629443222f0af2943cff48dbd1a24e656c4da71 | 648 | py | Python | advance/creat_table.py | naeimnb/pythonexersices | 94761d5a954c5f6a710baf4ea5f2be57f110c13e | [
"Apache-2.0"
] | null | null | null | advance/creat_table.py | naeimnb/pythonexersices | 94761d5a954c5f6a710baf4ea5f2be57f110c13e | [
"Apache-2.0"
] | null | null | null | advance/creat_table.py | naeimnb/pythonexersices | 94761d5a954c5f6a710baf4ea5f2be57f110c13e | [
"Apache-2.0"
] | null | null | null | import mysql.connector
from mysql.connector import errorcode
try:
con = mysql.connector.connect(user='niminimda', password='123456', host='127.0.01', database='test')
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("something is wrong with user or password... | 25.92 | 104 | 0.683642 | import mysql.connector
from mysql.connector import errorcode
def my_function():
query = "CREATE TABLE employee (Name nvarchar(20), Weight int, Height int)"
cursor = con.cursor()
cursor.execute(query)
cursor.close()
try:
con = mysql.connector.connect(user='niminimda', password='123456', host='127... | 148 | 0 | 23 |
15551d605e398d1d5310dd0fd20056331d6f635a | 4,042 | py | Python | BatchThread.py | benblackcake/srgan_t1 | 5724df5aff8901f8044d65d8d46ee37b6e2e08cd | [
"MIT"
] | null | null | null | BatchThread.py | benblackcake/srgan_t1 | 5724df5aff8901f8044d65d8d46ee37b6e2e08cd | [
"MIT"
] | 8 | 2020-09-26T00:46:21.000Z | 2022-03-12T00:17:59.000Z | BatchThread.py | benblackcake/srgan_t1 | 5724df5aff8901f8044d65d8d46ee37b6e2e08cd | [
"MIT"
] | null | null | null |
import numpy as np
# A simple generator wrapper, not sure if it's good for anything at all.
# With basic python threading
import threading
# from threading import Thread
import multiprocessing as mp
import time
try:
from queue import Queue
except ImportError:
from Queue import Queue
# ... or use multiprocess... | 32.079365 | 97 | 0.563582 |
import numpy as np
# A simple generator wrapper, not sure if it's good for anything at all.
# With basic python threading
import threading
# from threading import Thread
import multiprocessing as mp
import time
try:
from queue import Queue
except ImportError:
from Queue import Queue
# ... or use multiprocess... | 3,159 | 0 | 173 |
64687db7ce144774262e73c9d4fbce33876ba457 | 667 | py | Python | problem/01000~09999/01520/1520.py3.py | njw1204/BOJ-AC | 1de41685725ae4657a7ff94e413febd97a888567 | [
"MIT"
] | 1 | 2019-04-19T16:37:44.000Z | 2019-04-19T16:37:44.000Z | problem/01000~09999/01520/1520.py3.py | njw1204/BOJ-AC | 1de41685725ae4657a7ff94e413febd97a888567 | [
"MIT"
] | 1 | 2019-04-20T11:42:44.000Z | 2019-04-20T11:42:44.000Z | problem/01000~09999/01520/1520.py3.py | njw1204/BOJ-AC | 1de41685725ae4657a7ff94e413febd97a888567 | [
"MIT"
] | 3 | 2019-04-19T16:37:47.000Z | 2021-10-25T00:45:00.000Z | import sys
sys.setrecursionlimit(100000)
m,n=map(int,input().split())
dp=[[-1]*(n+2) for i in range(m+2)]
visit=[[False]*(n+2) for i in range(m+2)]
field=[0]*(m+2)
field[0]=[11111]*(n+2)
field[m+1]=[11111]*(n+2)
for i in range(1,m+1):
field[i]=[11111]
field[i].extend([*map(int,input().split())])
field[i].appe... | 19.617647 | 63 | 0.565217 | import sys
sys.setrecursionlimit(100000)
def DFS(i,j):
global m,n,dp,field,visit
if i==m and j==n: return 1
if dp[i][j]!=-1: return dp[i][j]
visit[i][j]=True
dp[i][j]=0
for di,dj in [[1,0],[-1,0],[0,1],[0,-1]]:
if field[i+di][j+dj]<field[i][j] and not visit[i+di][j+dj]:
dp[i][j]+=DFS(i+di,j+d... | 298 | 0 | 23 |
e391e62ba2fcd5966a5887e57e78f4387f40acc7 | 1,122 | py | Python | python/prime_number_check3.py | leewalter/coding | 2afd9dbfc1ecb94def35b953f4195a310d6953c9 | [
"Apache-2.0"
] | null | null | null | python/prime_number_check3.py | leewalter/coding | 2afd9dbfc1ecb94def35b953f4195a310d6953c9 | [
"Apache-2.0"
] | null | null | null | python/prime_number_check3.py | leewalter/coding | 2afd9dbfc1ecb94def35b953f4195a310d6953c9 | [
"Apache-2.0"
] | 1 | 2020-08-29T17:12:52.000Z | 2020-08-29T17:12:52.000Z | # ref https://www.youtube.com/watch?v=2p3kwF04xcA&index=24&list=PLi01XoE8jYohWFPpC17Z-wWhPOSuh8Er-
import math
import time
'''
for n in range(1,21):
print(n, is_prime_v2(n))
'''
t0 = time.time()
for n in range(1,1000000):
is_prime_v2(n)
t1 = time.time()
print("time required for 1000000 :", t1-t0)
#print("t... | 20.4 | 98 | 0.620321 | # ref https://www.youtube.com/watch?v=2p3kwF04xcA&index=24&list=PLi01XoE8jYohWFPpC17Z-wWhPOSuh8Er-
import math
import time
def is_prime_v2(n):
if n <= 0:
raise ("n must be a positive integer ! ")
return False
if n == 1:
return False
elif n == 2:
return True
elif n % ... | 455 | 0 | 23 |
074823aa33e6960d86e8b83e4a620c6fe06c32cf | 1,014 | py | Python | round/rpc/request.py | cybergarage/round-py | fb9404835ad1eb3f4b63eac92a8de2a3e60aa38a | [
"BSD-3-Clause"
] | null | null | null | round/rpc/request.py | cybergarage/round-py | fb9404835ad1eb3f4b63eac92a8de2a3e60aa38a | [
"BSD-3-Clause"
] | null | null | null | round/rpc/request.py | cybergarage/round-py | fb9404835ad1eb3f4b63eac92a8de2a3e60aa38a | [
"BSD-3-Clause"
] | null | null | null | #################################################################
#
# Round for Python
#
# Copyright (C) Satoshi Konno 2016
#
# This is licensed under BSD-style license, see file COPYING.
#
##################################################################
from __future__ import absolute_import
import json
from .. i... | 22.533333 | 67 | 0.58284 | #################################################################
#
# Round for Python
#
# Copyright (C) Satoshi Konno 2016
#
# This is licensed under BSD-style license, see file COPYING.
#
##################################################################
from __future__ import absolute_import
import json
from .. i... | 394 | 261 | 23 |
b14b7cdedd8f1fb33b998259010f68d2d3472946 | 5,081 | py | Python | scripts/ff_collect_pm_data.py | Czworldy/GP_traj | 96261f39a5a322092e3a6be98938bb4601f0f746 | [
"MIT"
] | 1 | 2021-06-08T06:09:55.000Z | 2021-06-08T06:09:55.000Z | scripts/ff_collect_pm_data.py | Czworldy/GP_traj | 96261f39a5a322092e3a6be98938bb4601f0f746 | [
"MIT"
] | null | null | null | scripts/ff_collect_pm_data.py | Czworldy/GP_traj | 96261f39a5a322092e3a6be98938bb4601f0f746 | [
"MIT"
] | null | null | null |
import os
import sys
from os.path import join, dirname
sys.path.insert(0, join(dirname(__file__), '..'))
import simulator
simulator.load('/home/wang/CARLA_0.9.9.4')
from simulator import config
import carla
import argparse
import time
from tqdm import tqdm
MAX_SPEED = 40
TRAJ_LENGTH = 25#25
vehicle_width = 2.0
longi... | 31.171779 | 112 | 0.678016 |
import os
import sys
from os.path import join, dirname
sys.path.insert(0, join(dirname(__file__), '..'))
import simulator
simulator.load('/home/wang/CARLA_0.9.9.4')
from simulator import config
import carla
import argparse
import time
from tqdm import tqdm
MAX_SPEED = 40
TRAJ_LENGTH = 25#25
vehicle_width = 2.0
longi... | 3,445 | -1 | 195 |
e528965623d652c281c15da441bcfaa1d1f342f4 | 1,199 | py | Python | recipes/Python/576873_Patch_extensibinaries_compiled_previous/recipe-576873.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/576873_Patch_extensibinaries_compiled_previous/recipe-576873.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/576873_Patch_extensibinaries_compiled_previous/recipe-576873.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | # -*- coding: Windows-1251 -*-
'''
find_dll_name.py
List all python dll names in DLL/PYD/etc file.
Author: Denis Barmenkov <denis.barmenkov@gmail.com>
Copyright: this code is free, but if you want to use it,
please keep this multiline comment along with source.
Thank you.
2009-08-09
'''
impo... | 18.446154 | 65 | 0.65221 | # -*- coding: Windows-1251 -*-
'''
find_dll_name.py
List all python dll names in DLL/PYD/etc file.
Author: Denis Barmenkov <denis.barmenkov@gmail.com>
Copyright: this code is free, but if you want to use it,
please keep this multiline comment along with source.
Thank you.
2009-08-09
'''
impo... | 0 | 0 | 0 |
5b27ddcccb0cb4ccd03ff118b4a52ef550bf32a2 | 678 | py | Python | sketch/sketchs.py | keshab97/100-days-of-ml | 2d995b151185ba9db4d01f34565d4e059d410e33 | [
"MIT"
] | 1 | 2019-12-03T18:36:55.000Z | 2019-12-03T18:36:55.000Z | sketch/sketchs.py | keshab97/100-days-of-ml | 2d995b151185ba9db4d01f34565d4e059d410e33 | [
"MIT"
] | null | null | null | sketch/sketchs.py | keshab97/100-days-of-ml | 2d995b151185ba9db4d01f34565d4e059d410e33 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Dec 8 08:21:19 2018
@author: alkesha
"""
import cv2
import numpy as np
#function to draw sketch
camera=cv2.VideoCapture(0)
while True:
ret,frame=camera.read()
cv2.imshow("sketch live",sketching(frame))
if cv2.waitKey(1)==ord('q'):
... | 23.37931 | 63 | 0.70059 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Dec 8 08:21:19 2018
@author: alkesha
"""
import cv2
import numpy as np
#function to draw sketch
def sketching(image):
grey_image= cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)
grey_blur=cv2.GaussianBlur(grey_image,(5,5),0)
#grey_blur=cv2.bilater... | 279 | 0 | 23 |
6272988d075e7579aa9fc785c1021ca88c2ac2ee | 10,047 | py | Python | pytoil/cli/new.py | FollowTheProcess/pytoil | b13acb14f015ae5399d7697bdc3e0e475dff03ec | [
"Apache-2.0"
] | 6 | 2021-05-08T20:31:03.000Z | 2022-03-08T01:25:43.000Z | pytoil/cli/new.py | FollowTheProcess/pytoil | b13acb14f015ae5399d7697bdc3e0e475dff03ec | [
"Apache-2.0"
] | 116 | 2021-07-08T11:21:22.000Z | 2022-03-30T14:04:51.000Z | pytoil/cli/new.py | FollowTheProcess/pytoil | b13acb14f015ae5399d7697bdc3e0e475dff03ec | [
"Apache-2.0"
] | null | null | null | """
The pytoil new command.
Author: Tom Fleet
Created: 25/06/2021
"""
from typing import List
import httpx
import typer
from cookiecutter.main import cookiecutter
from wasabi import msg
from pytoil.api import API
from pytoil.cli import utils
from pytoil.config import Config
from pytoil.environments import Conda, En... | 31.396875 | 87 | 0.640092 | """
The pytoil new command.
Author: Tom Fleet
Created: 25/06/2021
"""
from typing import List
import httpx
import typer
from cookiecutter.main import cookiecutter
from wasabi import msg
from pytoil.api import API
from pytoil.cli import utils
from pytoil.config import Config
from pytoil.environments import Conda, En... | 0 | 0 | 0 |
95e1a4d230cc4ecc6e1410bd9af1d4589b983194 | 4,467 | py | Python | fserver/path_util.py | Carrotor116/fserver | 86934023fb080088854b4bae7867ad3667561111 | [
"MIT"
] | 1 | 2020-08-06T01:25:14.000Z | 2020-08-06T01:25:14.000Z | fserver/path_util.py | Carrotor116/fserver | 86934023fb080088854b4bae7867ad3667561111 | [
"MIT"
] | 1 | 2020-07-26T09:27:01.000Z | 2020-07-26T09:27:01.000Z | fserver/path_util.py | Carrotor116/fserver | 86934023fb080088854b4bae7867ad3667561111 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import re
import sys
from werkzeug import utils
try:
from os import scandir
except:
from scandir import scandir
def parents_path(path):
"""
:param path:
:return: return parents_path which does not contain the end '/', that is remove the end '/'
"""
r... | 24.955307 | 100 | 0.596597 | # -*- coding: utf-8 -*-
import os
import re
import sys
from werkzeug import utils
try:
from os import scandir
except:
from scandir import scandir
def to_unicode_str(s):
if sys.version_info < (3, 4) and not isinstance(s, unicode):
if isinstance(s, str):
try:
s = s.dec... | 1,202 | 0 | 161 |
a2533bb28bfb5cd5a97367c29d9187aba0e778ce | 2,345 | py | Python | demo/framework.py | lechat/multiconf | c41cbe9ab3fb768a7d4dbd7b9f5d983b1306bde3 | [
"BSD-3-Clause"
] | null | null | null | demo/framework.py | lechat/multiconf | c41cbe9ab3fb768a7d4dbd7b9f5d983b1306bde3 | [
"BSD-3-Clause"
] | null | null | null | demo/framework.py | lechat/multiconf | c41cbe9ab3fb768a7d4dbd7b9f5d983b1306bde3 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2012 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
import sys
import os.path
from os.path import join as jp
here = os.path.dirname(__file__)
sys.path.append(jp(here, '../..'))
from multiconf import ConfigRoot, ConfigItem, ConfigBuilder
fro... | 41.140351 | 126 | 0.742004 | # Copyright (c) 2012 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
import sys
import os.path
from os.path import join as jp
here = os.path.dirname(__file__)
sys.path.append(jp(here, '../..'))
from multiconf import ConfigRoot, ConfigItem, ConfigBuilder
fro... | 909 | 30 | 223 |
de2e5d6d77fa2b68900522319a74e9122be0658d | 1,585 | py | Python | tests/fixtures/test_author_contributions/content_01_expected.py | elifesciences/elife-tools | ee345bf0e6703ef0f7e718355e85730abbdfd117 | [
"MIT"
] | 9 | 2015-04-16T08:13:31.000Z | 2020-05-18T14:03:06.000Z | tests/fixtures/test_author_contributions/content_01_expected.py | elifesciences/elife-tools | ee345bf0e6703ef0f7e718355e85730abbdfd117 | [
"MIT"
] | 310 | 2015-02-11T00:30:09.000Z | 2021-07-14T23:58:50.000Z | tests/fixtures/test_author_contributions/content_01_expected.py | elifesciences/elife-tools | ee345bf0e6703ef0f7e718355e85730abbdfd117 | [
"MIT"
] | 9 | 2015-02-04T01:21:28.000Z | 2021-06-15T12:50:47.000Z | expected = [
{
"id": "con1",
"text": "<p>RAA, Conception and design, Acquisition of data, Analysis and interpretation of data, Drafting or revising the article</p>",
"fn-type": "con",
},
{
"id": "con2",
"text": "<p>LWB, Conception and design, Acquisition of data, Anal... | 33.020833 | 144 | 0.529968 | expected = [
{
"id": "con1",
"text": "<p>RAA, Conception and design, Acquisition of data, Analysis and interpretation of data, Drafting or revising the article</p>",
"fn-type": "con",
},
{
"id": "con2",
"text": "<p>LWB, Conception and design, Acquisition of data, Anal... | 0 | 0 | 0 |
9948e1f94b91f2d4c8102e9952d01a6734aedda2 | 8,348 | py | Python | dev/BuildGraph.py | galadrielbriere/ClustOmics | af3d6aae878483f6401c06ef50a7eb78e1e76917 | [
"MIT"
] | 2 | 2021-05-16T18:16:03.000Z | 2021-06-02T07:28:44.000Z | dev/BuildGraph.py | galadrielbriere/ClustOmics | af3d6aae878483f6401c06ef50a7eb78e1e76917 | [
"MIT"
] | null | null | null | dev/BuildGraph.py | galadrielbriere/ClustOmics | af3d6aae878483f6401c06ef50a7eb78e1e76917 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 25 13:08:45 2019
@author: briere
"""
import logging
import argparse
import os
from neo4j import GraphDatabase
descr = ('This script instanciate a Neo4j graph database from the metadata '
'file and the various clustering results to integra... | 37.434978 | 98 | 0.583972 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 25 13:08:45 2019
@author: briere
"""
import logging
import argparse
import os
from neo4j import GraphDatabase
descr = ('This script instanciate a Neo4j graph database from the metadata '
'file and the various clustering results to integra... | 0 | 0 | 0 |
27899259a957b4d8938490e555c47e2ab24e0936 | 820 | py | Python | botTools/proximityFinder.py | LHGames-2018/Look-Ma-No-HandsEsclamation | 10454605a7c8bef42e2ced9b10e40b2a3a688747 | [
"MIT"
] | null | null | null | botTools/proximityFinder.py | LHGames-2018/Look-Ma-No-HandsEsclamation | 10454605a7c8bef42e2ced9b10e40b2a3a688747 | [
"MIT"
] | null | null | null | botTools/proximityFinder.py | LHGames-2018/Look-Ma-No-HandsEsclamation | 10454605a7c8bef42e2ced9b10e40b2a3a688747 | [
"MIT"
] | null | null | null | import math
from helper import Point
| 25.625 | 72 | 0.608537 | import math
from helper import Point
class ProximityFinder:
@staticmethod
def findClosestTile(playerPosition, tiles):
"""
Retourne la position de la tuile la plus proche du personnage
:param playerPosition: position du joueur
:param tiles: une liste des tuiles de meme type
... | 0 | 759 | 23 |
634f5d7e03d3f278d68ac61c4a16b596c7887d60 | 534 | py | Python | Requirement 5/code/old versions of code/ii.py | Dhaval-B-Patel/DIGITAL-SECURITY-PROJECT | 0195f121c272c5db20865641620cf6c652894d97 | [
"Unlicense"
] | null | null | null | Requirement 5/code/old versions of code/ii.py | Dhaval-B-Patel/DIGITAL-SECURITY-PROJECT | 0195f121c272c5db20865641620cf6c652894d97 | [
"Unlicense"
] | null | null | null | Requirement 5/code/old versions of code/ii.py | Dhaval-B-Patel/DIGITAL-SECURITY-PROJECT | 0195f121c272c5db20865641620cf6c652894d97 | [
"Unlicense"
] | null | null | null | from skimage import io
import matplotlib.pyplot as plt
import sys
image = io.imread(sys.argv[1])
_ = plt.hist(image.ravel(), bins = 256, color = 'orange', )
_ = plt.hist(image[:, :, 0].ravel(), bins = 256, color = 'red', alpha = 0.5)
_ = plt.hist(image[:, :, 1].ravel(), bins = 256, color = 'Green', alpha = 0.5)
_ = pl... | 41.076923 | 78 | 0.627341 | from skimage import io
import matplotlib.pyplot as plt
import sys
image = io.imread(sys.argv[1])
_ = plt.hist(image.ravel(), bins = 256, color = 'orange', )
_ = plt.hist(image[:, :, 0].ravel(), bins = 256, color = 'red', alpha = 0.5)
_ = plt.hist(image[:, :, 1].ravel(), bins = 256, color = 'Green', alpha = 0.5)
_ = pl... | 0 | 0 | 0 |
16c1ba6463e66a8c7b907f0b22be21daf693caf1 | 851 | py | Python | var/spack/repos/builtin/packages/r-jpeg/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/r-jpeg/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/r-jpeg/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RJpeg(RPackage):
"""Read and write JPEG images.
This package provides an easy and sim... | 35.458333 | 97 | 0.747356 | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RJpeg(RPackage):
"""Read and write JPEG images.
This package provides an easy and sim... | 0 | 0 | 0 |
1d74c94de683832fa6b065ee16fc011fa1418d9a | 4,072 | py | Python | data_utils.py | KnightZhang625/EANN_TensorFlow | 140bab46148924374fdc0b434dd58ee12f678642 | [
"Apache-2.0"
] | 1 | 2021-11-03T10:59:15.000Z | 2021-11-03T10:59:15.000Z | data_utils.py | KnightZhang625/EANN_TensorFlow | 140bab46148924374fdc0b434dd58ee12f678642 | [
"Apache-2.0"
] | null | null | null | data_utils.py | KnightZhang625/EANN_TensorFlow | 140bab46148924374fdc0b434dd58ee12f678642 | [
"Apache-2.0"
] | null | null | null | # coding:utf-8
# Produced by Jiaxin Zhang
# Start Data: 20_May_2020
# Data processing module.
#
# For GOD I Trust.
# 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/... | 32.83871 | 98 | 0.668959 | # coding:utf-8
# Produced by Jiaxin Zhang
# Start Data: 20_May_2020
# Data processing module.
#
# For GOD I Trust.
# 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/... | 2,371 | 0 | 159 |
4fb586103fe0edef0a4a7e8014f40d0dfc525a60 | 879 | py | Python | example/org2/csv2feather.py | public-tatsuya-noyori/meteorological_visualizer | 0566c74a1a0465f7a78ea57788a6f52357672d2c | [
"Apache-2.0"
] | 1 | 2021-01-05T09:44:30.000Z | 2021-01-05T09:44:30.000Z | example/org2/csv2feather.py | public-tatsuya-noyori/meteorological_visualizer | 0566c74a1a0465f7a78ea57788a6f52357672d2c | [
"Apache-2.0"
] | 11 | 2020-08-05T05:51:32.000Z | 2022-01-12T23:48:27.000Z | example/org2/csv2feather.py | public-tatsuya-noyori/meteorological_visualizer | 0566c74a1a0465f7a78ea57788a6f52357672d2c | [
"Apache-2.0"
] | 3 | 2020-08-04T23:26:49.000Z | 2020-08-14T07:01:06.000Z | #!/usr/bin/env python3
import os
import re
import sys
import pandas as pd
import pyarrow as pa
from pyarrow import csv, feather
in_file = sys.argv[1]
in_df = csv.read_csv(in_file).to_pandas()
if 'datetime' in in_df.columns.values.tolist():
in_df['datetime'] = pd.to_datetime(in_df.datetime, utc=True)
#out_file = re... | 43.95 | 206 | 0.724687 | #!/usr/bin/env python3
import os
import re
import sys
import pandas as pd
import pyarrow as pa
from pyarrow import csv, feather
in_file = sys.argv[1]
in_df = csv.read_csv(in_file).to_pandas()
if 'datetime' in in_df.columns.values.tolist():
in_df['datetime'] = pd.to_datetime(in_df.datetime, utc=True)
#out_file = re... | 0 | 0 | 0 |
95c237b16aac2282ed9e9b22d2258e0297ce9922 | 554 | py | Python | setup.py | Tatersic/Vnode | 8ec7009517f6ac9441ac9352e6dbc08e16cc3402 | [
"MIT"
] | null | null | null | setup.py | Tatersic/Vnode | 8ec7009517f6ac9441ac9352e6dbc08e16cc3402 | [
"MIT"
] | null | null | null | setup.py | Tatersic/Vnode | 8ec7009517f6ac9441ac9352e6dbc08e16cc3402 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name="Vnode",
version="0.1.0",
description="A fast wheel to build a node network.",
author="Tatersic&Ovizro",
author_email="Tatersic@qq.com",
maintainer="Ovizro",
maintainer_email="Ovizro@hypercol.com",
license="MIT",
url="https://github.com/Tate... | 24.086957 | 83 | 0.642599 | from setuptools import setup
setup(
name="Vnode",
version="0.1.0",
description="A fast wheel to build a node network.",
author="Tatersic&Ovizro",
author_email="Tatersic@qq.com",
maintainer="Ovizro",
maintainer_email="Ovizro@hypercol.com",
license="MIT",
url="https://github.com/Tate... | 0 | 0 | 0 |
96cfc389cb065e1c9dd412436628111f89e39294 | 4,563 | py | Python | brewmeister/controller/brewslave.py | brewpeople/brewmeister | 82a5402a3cd528892b13d2a8b7a58d6c15e4ae9f | [
"MIT"
] | 2 | 2018-12-30T17:55:54.000Z | 2022-03-03T20:24:57.000Z | brewmeister/controller/brewslave.py | brewpeople/brewmeister | 82a5402a3cd528892b13d2a8b7a58d6c15e4ae9f | [
"MIT"
] | null | null | null | brewmeister/controller/brewslave.py | brewpeople/brewmeister | 82a5402a3cd528892b13d2a8b7a58d6c15e4ae9f | [
"MIT"
] | null | null | null | import os
import re
import time
import struct
import serial
import threading
import crcmod
COMMAND_GET = struct.pack('B', 0xf0)
COMMAND_SET = struct.pack('B', 0xf1)
DS18B20 = struct.pack('B', 0xf1)
HEATER = struct.pack('B', 0xf2)
STIRRER = struct.pack('B', 0xf3)
# Contrary to crcmod's definition, brewslave expects... | 28.879747 | 91 | 0.586895 | import os
import re
import time
import struct
import serial
import threading
import crcmod
COMMAND_GET = struct.pack('B', 0xf0)
COMMAND_SET = struct.pack('B', 0xf1)
DS18B20 = struct.pack('B', 0xf1)
HEATER = struct.pack('B', 0xf2)
STIRRER = struct.pack('B', 0xf3)
# Contrary to crcmod's definition, brewslave expects... | 3,605 | 551 | 23 |
0a0c322c09dddecb6ae9edbae2255b2eba9732ab | 9,279 | py | Python | 5_fact_checking_models/baseline.py | olibchr/factChecker | 6affa8636884e1198eff8a9e360ad376f511e37d | [
"MIT"
] | 1 | 2018-06-23T20:40:41.000Z | 2018-06-23T20:40:41.000Z | 5_fact_checking_models/baseline.py | olibchr/factChecker | 6affa8636884e1198eff8a9e360ad376f511e37d | [
"MIT"
] | 1 | 2021-12-13T19:47:10.000Z | 2021-12-13T19:47:10.000Z | 5_fact_checking_models/baseline.py | olibchr/factChecker | 6affa8636884e1198eff8a9e360ad376f511e37d | [
"MIT"
] | null | null | null | import glob, os, sys, json, datetime
import pandas as pd
import numpy as np
sys.path.insert(0, os.path.dirname(__file__) + '../2_helpers')
import re, nltk
from dateutil import parser
from Fact import Fact
from User import User
from Transaction import Transaction
from decoder import decoder
from sklearn.model_selectio... | 40.519651 | 132 | 0.682186 | import glob, os, sys, json, datetime
import pandas as pd
import numpy as np
sys.path.insert(0, os.path.dirname(__file__) + '../2_helpers')
import re, nltk
from dateutil import parser
from Fact import Fact
from User import User
from Transaction import Transaction
from decoder import decoder
from sklearn.model_selectio... | 7,967 | 0 | 161 |
60a87abbd5f60963f9b1b9f17741e1be53d9ef5b | 2,842 | py | Python | pibootcmdline/edit.py | urbas/pibootcmdline | dcfbc6e6075f11e1aea928452acca59528902235 | [
"MIT"
] | 1 | 2017-10-24T23:19:06.000Z | 2017-10-24T23:19:06.000Z | pibootcmdline/edit.py | urbas/pibootcmdline | dcfbc6e6075f11e1aea928452acca59528902235 | [
"MIT"
] | 67 | 2017-11-15T23:20:13.000Z | 2019-03-13T14:57:59.000Z | pibootcmdline/edit.py | urbas/pibootcmdline | dcfbc6e6075f11e1aea928452acca59528902235 | [
"MIT"
] | null | null | null | from pibootcmdline.parse import parse_parameter, Parameter
def add_parameters(cmdline, *parameters):
"""
Parameters
----------
cmdline: list[Parameter]
parsed command line to which to add parameters.
*parameters: str
list of string parameters. For example: 'key=value' or 'key' or ... | 30.55914 | 118 | 0.674525 | from pibootcmdline.parse import parse_parameter, Parameter
def add_parameters(cmdline, *parameters):
"""
Parameters
----------
cmdline: list[Parameter]
parsed command line to which to add parameters.
*parameters: str
list of string parameters. For example: 'key=value' or 'key' or ... | 506 | 0 | 69 |
99d083833cac96b1bde1dff2f41c31a0e099602f | 2,975 | py | Python | crownstone_uart/core/uart/UartTypes.py | RicArch97/crownstone-lib-python-uart | c0aaf1415936e5e622aa6395fdac4f88ebcf82bf | [
"MIT"
] | null | null | null | crownstone_uart/core/uart/UartTypes.py | RicArch97/crownstone-lib-python-uart | c0aaf1415936e5e622aa6395fdac4f88ebcf82bf | [
"MIT"
] | null | null | null | crownstone_uart/core/uart/UartTypes.py | RicArch97/crownstone-lib-python-uart | c0aaf1415936e5e622aa6395fdac4f88ebcf82bf | [
"MIT"
] | null | null | null | from enum import IntEnum | 32.692308 | 41 | 0.526387 | from enum import IntEnum
class UartMessageType(IntEnum):
UART_MESSAGE = 0
ENCRYPTED_UART_MESSAGE = 128
class UartTxType(IntEnum):
HELLO = 0
SESSION_NONCE = 1
HEARTBEAT = 2
STATUS = 3
GET... | 0 | 2,882 | 69 |
23850c7a34a4aab5658c4264bf067ad13c196feb | 2,270 | py | Python | tumblog/models/post.py | lygaret-attic/django-tumblog | 46ad86d7daf7ca7468d7bd554407479e449207a9 | [
"BSD-3-Clause"
] | 1 | 2021-01-08T19:07:29.000Z | 2021-01-08T19:07:29.000Z | tumblog/models/post.py | lygaret-attic/django-tumblog | 46ad86d7daf7ca7468d7bd554407479e449207a9 | [
"BSD-3-Clause"
] | null | null | null | tumblog/models/post.py | lygaret-attic/django-tumblog | 46ad86d7daf7ca7468d7bd554407479e449207a9 | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
from django.db.models import permalink
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from datetime import datetime
from tagging.models import Tag
from tagging.fields import TagField
from autofields.fields import AutoSlugField
from t... | 33.880597 | 107 | 0.65859 | from django.db import models
from django.db.models import permalink
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from datetime import datetime
from tagging.models import Tag
from tagging.fields import TagField
from autofields.fields import AutoSlugField
from t... | 482 | 58 | 160 |
110b3a61385a3095d01b7a4cdffbe045d22cd55a | 3,215 | py | Python | mmcv/utils/helpers.py | manlinting/mmcv | ae9d3cc41054712ee54940d8657606afef4fc066 | [
"Apache-2.0"
] | 1 | 2019-09-25T12:26:05.000Z | 2019-09-25T12:26:05.000Z | mmcv/utils/helpers.py | manlinting/mmcv | ae9d3cc41054712ee54940d8657606afef4fc066 | [
"Apache-2.0"
] | null | null | null | mmcv/utils/helpers.py | manlinting/mmcv | ae9d3cc41054712ee54940d8657606afef4fc066 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
import functools
import torch
import torch.nn as nn
| 37.383721 | 80 | 0.566096 | #!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
import functools
import torch
import torch.nn as nn
def load_parameters(model, src_state_dict):
logging.info('Loading Parameters...')
... | 2,905 | 0 | 75 |
e1c0fc71aeebac769ec087623d2868867ad8deae | 3,497 | py | Python | app/checkers.py | chengyuhui/srvmon | 4d2c295f268e494d8b0e97cb63037e240b3db2ec | [
"MIT"
] | 1 | 2020-12-13T09:39:36.000Z | 2020-12-13T09:39:36.000Z | app/checkers.py | chengyuhui/srvmon | 4d2c295f268e494d8b0e97cb63037e240b3db2ec | [
"MIT"
] | null | null | null | app/checkers.py | chengyuhui/srvmon | 4d2c295f268e494d8b0e97cb63037e240b3db2ec | [
"MIT"
] | null | null | null | from app import app
import requests, sys, eventlet, socket
from datetime import datetime, timedelta
from .db import Server, Record, transaction, db
from .notify import notify_state_changed
from blinker import Namespace
def handle_active_http(server):
"""
Handler for Active HTTP checking
"""
config ... | 26.9 | 79 | 0.644838 | from app import app
import requests, sys, eventlet, socket
from datetime import datetime, timedelta
from .db import Server, Record, transaction, db
from .notify import notify_state_changed
from blinker import Namespace
def log_start(server):
app.logger.debug("Start checking [%s](%s)", server.label, server.id)
d... | 743 | 0 | 115 |
778192d1dd5ce7f3a6e52e024267de15e2f06d4c | 14,970 | py | Python | pkg_task6/scripts/ur5_moveit/ur5_moveit.py | 1arshan/Eyantra_Virgi-bot | 30ebe99fec6a0d4767fe94468b21bc00091bc527 | [
"MIT"
] | 1 | 2021-09-09T04:41:28.000Z | 2021-09-09T04:41:28.000Z | pkg_task6/scripts/ur5_moveit/ur5_moveit.py | 1arshan/Eyantra_Virgi-bot | 30ebe99fec6a0d4767fe94468b21bc00091bc527 | [
"MIT"
] | null | null | null | pkg_task6/scripts/ur5_moveit/ur5_moveit.py | 1arshan/Eyantra_Virgi-bot | 30ebe99fec6a0d4767fe94468b21bc00091bc527 | [
"MIT"
] | null | null | null | #! /usr/bin/env python2.7
"""
This file contain Ur5Moveit class to control bot and rviz planning scene.
"""
import rospy
import moveit_commander
import moveit_msgs.msg
import geometry_msgs.msg
import actionlib
from pkg_vb_sim.srv import conveyorBeltPowerMsg
import math
import sys
import copy
from std_srvs.srv import Em... | 38.48329 | 179 | 0.64676 | #! /usr/bin/env python2.7
"""
This file contain Ur5Moveit class to control bot and rviz planning scene.
"""
import rospy
import moveit_commander
import moveit_msgs.msg
import geometry_msgs.msg
import actionlib
from pkg_vb_sim.srv import conveyorBeltPowerMsg
import math
import sys
import copy
from std_srvs.srv import Em... | 169 | 0 | 53 |
8145aa16391086be18b4c1e44f2aca985e32f12d | 8,452 | py | Python | diligent/checks/nelson.py | stefanw/diligent-pandas | aaf74fc41bc9414e5e27f5a0e1b91d47613fdb38 | [
"MIT"
] | 3 | 2016-05-13T00:45:40.000Z | 2019-07-30T15:22:29.000Z | diligent/checks/nelson.py | stefanw/diligent-pandas | aaf74fc41bc9414e5e27f5a0e1b91d47613fdb38 | [
"MIT"
] | null | null | null | diligent/checks/nelson.py | stefanw/diligent-pandas | aaf74fc41bc9414e5e27f5a0e1b91d47613fdb38 | [
"MIT"
] | 1 | 2019-02-16T01:39:04.000Z | 2019-02-16T01:39:04.000Z | """
Implementation of the Nelson rules
https://en.wikipedia.org/wiki/Nelson_rules
"""
from collections import deque
import numpy as np
from ..diligent import registry
from ..utils import is_numeric
__all__ = ['nelson_rule_%d' % i for i in range(1, 9)]
@registry.register(name='Nelson Rule 1', tags='nelson')
@reg... | 31.303704 | 116 | 0.587317 | """
Implementation of the Nelson rules
https://en.wikipedia.org/wiki/Nelson_rules
"""
from collections import deque
import numpy as np
from ..diligent import registry
from ..utils import is_numeric
__all__ = ['nelson_rule_%d' % i for i in range(1, 9)]
@registry.register(name='Nelson Rule 1', tags='nelson')
def ne... | 7,508 | 0 | 222 |
907e0adfc0f120310bcbdc9d52f4a37f02b73a76 | 1,259 | py | Python | lib/coginvasion/holiday/HolidayManager.py | theclashingfritz/Cog-Invasion-Online-Dump | 2561abbacb3e2e288e06f3f04b935b5ed589c8f8 | [
"Apache-2.0"
] | 1 | 2020-03-12T16:44:10.000Z | 2020-03-12T16:44:10.000Z | lib/coginvasion/holiday/HolidayManager.py | theclashingfritz/Cog-Invasion-Online-Dump | 2561abbacb3e2e288e06f3f04b935b5ed589c8f8 | [
"Apache-2.0"
] | null | null | null | lib/coginvasion/holiday/HolidayManager.py | theclashingfritz/Cog-Invasion-Online-Dump | 2561abbacb3e2e288e06f3f04b935b5ed589c8f8 | [
"Apache-2.0"
] | null | null | null | # uncompyle6 version 3.2.4
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]
# Embedded file name: lib.coginvasion.holiday.HolidayManager
from panda3d.core import VirtualFileSystem, Filename
from direct.distributed.DistributedObjectGlo... | 34.972222 | 104 | 0.732327 | # uncompyle6 version 3.2.4
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]
# Embedded file name: lib.coginvasion.holiday.HolidayManager
from panda3d.core import VirtualFileSystem, Filename
from direct.distributed.DistributedObjectGlo... | 404 | 366 | 69 |
0d4bdc468aa1a1f9a81f77398ae0f99cd3a04ab0 | 4,525 | py | Python | discomll/tests/tests_classification.py | romanorac/discomll | a4703daffb2ba3c9f614bc3dbe45ae55884aea00 | [
"Apache-2.0"
] | 103 | 2015-01-02T23:45:18.000Z | 2021-01-23T14:25:52.000Z | discomll/tests/tests_classification.py | romanorac/discomll | a4703daffb2ba3c9f614bc3dbe45ae55884aea00 | [
"Apache-2.0"
] | null | null | null | discomll/tests/tests_classification.py | romanorac/discomll | a4703daffb2ba3c9f614bc3dbe45ae55884aea00 | [
"Apache-2.0"
] | 10 | 2015-01-02T23:48:12.000Z | 2017-11-25T15:55:34.000Z | import unittest
import numpy as np
import Orange
from disco.core import result_iterator
import datasets
if __name__ == '__main__':
unittest.main()
| 40.765766 | 119 | 0.699448 | import unittest
import numpy as np
import Orange
from disco.core import result_iterator
import datasets
class Tests_Classification(unittest.TestCase):
@classmethod
def setUpClass(self):
import chunk_testdata
from disco import ddfs
ddfs = ddfs.DDFS()
if not ddfs.exists("test:... | 4,170 | 176 | 23 |
8a2a0fe848a71d1e002a99358b587d9441c09903 | 7,400 | py | Python | smore/models/box.py | isabella232/smore | 02e5a89e84a805eed632eefbdecd957d95e202d4 | [
"Apache-2.0"
] | 78 | 2021-10-31T23:20:26.000Z | 2022-03-21T01:07:01.000Z | smore/models/box.py | google-research/smore | e4ba95a7466ef7d018987bce7688b77bf2ea7e4f | [
"Apache-2.0"
] | 4 | 2021-11-02T13:45:38.000Z | 2022-02-17T04:18:32.000Z | smore/models/box.py | pyg-team/smore | 02e5a89e84a805eed632eefbdecd957d95e202d4 | [
"Apache-2.0"
] | 15 | 2021-11-02T23:55:29.000Z | 2022-03-19T10:30:51.000Z | # Copyright 2021 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,... | 44.848485 | 160 | 0.69 | # Copyright 2021 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,... | 5,460 | 720 | 181 |
b5ba6ef777fde42cecd1a31dc630290cdbebe0ef | 2,343 | py | Python | Learning Correspondence of Synthetic Shapes/models.py | tbredbenner/unsupervised_learning_of_dense_shape_correspondence | 440643d633a6db3f947ac71a247c8083cb3aeadc | [
"MIT"
] | 84 | 2019-03-16T13:08:25.000Z | 2022-02-06T11:11:39.000Z | Learning Correspondence of Synthetic Shapes/models.py | tbredbenner/unsupervised_learning_of_dense_shape_correspondence | 440643d633a6db3f947ac71a247c8083cb3aeadc | [
"MIT"
] | 11 | 2019-09-14T02:54:29.000Z | 2022-01-13T01:42:29.000Z | Learning Correspondence of Synthetic Shapes/models.py | tbredbenner/unsupervised_learning_of_dense_shape_correspondence | 440643d633a6db3f947ac71a247c8083cb3aeadc | [
"MIT"
] | 20 | 2019-06-22T09:01:37.000Z | 2021-07-09T08:24:13.000Z | import tensorflow as tf
import numpy as np
from ops import *
flags = tf.app.flags
FLAGS = flags.FLAGS
def fmnet_model(phase, part_shot, model_shot, part_dist_map , model_dist_map, part2model_ind_gt, part_evecs, part_evecs_trans, model_evecs, model_evecs_trans):
"""Build FM-net model.
Args:
phase: train\test.
... | 38.409836 | 159 | 0.714469 | import tensorflow as tf
import numpy as np
from ops import *
flags = tf.app.flags
FLAGS = flags.FLAGS
def fmnet_model(phase, part_shot, model_shot, part_dist_map , model_dist_map, part2model_ind_gt, part_evecs, part_evecs_trans, model_evecs, model_evecs_trans):
"""Build FM-net model.
Args:
phase: train\test.
... | 0 | 0 | 0 |
be06dc1fd3e896347775ceb768b0220fa17cdd42 | 8,091 | py | Python | xcenternet/datasets/mcod_dataset.py | JuanchoWang/xcenternet | 1b6784bb3ff8bc44704a60fc6fd0b56dea190e29 | [
"Apache-2.0",
"MIT"
] | null | null | null | xcenternet/datasets/mcod_dataset.py | JuanchoWang/xcenternet | 1b6784bb3ff8bc44704a60fc6fd0b56dea190e29 | [
"Apache-2.0",
"MIT"
] | null | null | null | xcenternet/datasets/mcod_dataset.py | JuanchoWang/xcenternet | 1b6784bb3ff8bc44704a60fc6fd0b56dea190e29 | [
"Apache-2.0",
"MIT"
] | null | null | null | from random import shuffle
import tensorflow as tf
from xcenternet.datasets.dataset import Dataset
class TfExampleFields(object):
"""TF-example proto feature names
Holds the standard feature names to load from an Example proto
Attributes:
image_encoded: image encoded as string
image_format... | 47.87574 | 109 | 0.707082 | from random import shuffle
import tensorflow as tf
from xcenternet.datasets.dataset import Dataset
class McodDataset(Dataset):
def __init__(self, dataset_path_tr, dataset_path_te, init_lr):
self.features = {
TfExampleFields.height: tf.io.FixedLenFeature((), dtype=tf.int64, default_value=1),
... | 2,335 | 1,500 | 23 |
db00ae2ea98be4abf7a161b404049c4e77de3c0b | 2,389 | py | Python | python_examples/example_01_basics_for_direkt_requests.py | intinor/direkt_api_tutorial | ecbc0f7366d275666f0b174041c7d20314c1db3c | [
"MIT"
] | 1 | 2022-03-08T13:35:11.000Z | 2022-03-08T13:35:11.000Z | python_examples/example_01_basics_for_direkt_requests.py | intinor/direkt_api_tutorial | ecbc0f7366d275666f0b174041c7d20314c1db3c | [
"MIT"
] | null | null | null | python_examples/example_01_basics_for_direkt_requests.py | intinor/direkt_api_tutorial | ecbc0f7366d275666f0b174041c7d20314c1db3c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Intinor Direkt API Python tutorial
Example 1: Send a request to a Direkt unit using the "direkt" module
and obtain API information as a JSON string
"""
import sys
# The "direkt" module wraps the "requests" library with some convenient
# functionality for the Intinor Direkt API.
... | 32.283784 | 79 | 0.735036 | #!/usr/bin/env python3
"""Intinor Direkt API Python tutorial
Example 1: Send a request to a Direkt unit using the "direkt" module
and obtain API information as a JSON string
"""
import sys
# The "direkt" module wraps the "requests" library with some convenient
# functionality for the Intinor Direkt API.
... | 0 | 0 | 0 |
e18ab7550d94b330264c78c211546ae6cac394fd | 2,519 | py | Python | hproxy/spider/proxy_spider/mimvp_spider.py | yejianxin2015/hproxy | f40266bf7b06368d3ebfdce8d60385bcd4b93713 | [
"MIT"
] | null | null | null | hproxy/spider/proxy_spider/mimvp_spider.py | yejianxin2015/hproxy | f40266bf7b06368d3ebfdce8d60385bcd4b93713 | [
"MIT"
] | null | null | null | hproxy/spider/proxy_spider/mimvp_spider.py | yejianxin2015/hproxy | f40266bf7b06368d3ebfdce8d60385bcd4b93713 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Created by howie.hu at 08/04/2018.
"""
import asyncio
import time
from hproxy.database import DatabaseSetting
from hproxy.spider.base_spider import ProxySpider
from hproxy.spider.proxy_spider import MimvpItem
from hproxy.spider.proxy_tools import request_url_by_aiohttp, get_proxy_info
db_... | 29.988095 | 155 | 0.588329 | #!/usr/bin/env python
"""
Created by howie.hu at 08/04/2018.
"""
import asyncio
import time
from hproxy.database import DatabaseSetting
from hproxy.spider.base_spider import ProxySpider
from hproxy.spider.proxy_spider import MimvpItem
from hproxy.spider.proxy_tools import request_url_by_aiohttp, get_proxy_info
db_... | 0 | 0 | 0 |
7fef8222041c4acd1301c7154532629ffd87de23 | 562 | py | Python | server/src/util.py | Opportunity-Hack-2015-Arizona/Team1 | 49b432d1e1bfae90551967f796338cfb9da6a89d | [
"MIT"
] | 1 | 2015-10-11T05:33:44.000Z | 2015-10-11T05:33:44.000Z | server/src/util.py | Opportunity-Hack-2015-Arizona/Team1 | 49b432d1e1bfae90551967f796338cfb9da6a89d | [
"MIT"
] | null | null | null | server/src/util.py | Opportunity-Hack-2015-Arizona/Team1 | 49b432d1e1bfae90551967f796338cfb9da6a89d | [
"MIT"
] | null | null | null | from functools import wraps
from flask import request
| 24.434783 | 101 | 0.622776 | from functools import wraps
from flask import request
def authenticate(func):
@wraps(func)
def auth_call(*args, **kwargs):
if request.json: # TODO STEVE IMPLEMENT AUTH (Auth currently based on request.json existing)
return func(*args, **kwargs)
else:
return "Authentica... | 460 | 0 | 46 |
de03dc6cbce490d45e09e58f380fdbd937ffe590 | 1,966 | py | Python | releng/lib/__init__.py | imoisharma/emissary | 5346ccb06673827a6a2e51ddaf92925f60bd9de9 | [
"Apache-2.0"
] | null | null | null | releng/lib/__init__.py | imoisharma/emissary | 5346ccb06673827a6a2e51ddaf92925f60bd9de9 | [
"Apache-2.0"
] | null | null | null | releng/lib/__init__.py | imoisharma/emissary | 5346ccb06673827a6a2e51ddaf92925f60bd9de9 | [
"Apache-2.0"
] | 1 | 2021-03-04T10:23:33.000Z | 2021-03-04T10:23:33.000Z | #!/hint/python3
import re
import subprocess
from typing import Any, List
from os import getenv
import subprocess
from .gitutil import git_check_clean as git_check_clean # Stop mypy complaining about implicit reexport
from .uiutil import run_txtcapture
from .gitutil import git_add as git_add # Stop mypy complaining a... | 31.709677 | 104 | 0.639369 | #!/hint/python3
import re
import subprocess
from typing import Any, List
from os import getenv
import subprocess
from .gitutil import git_check_clean as git_check_clean # Stop mypy complaining about implicit reexport
from .uiutil import run_txtcapture
from .gitutil import git_add as git_add # Stop mypy complaining a... | 289 | 0 | 23 |
5e76824fe09b1da67ef92de0f20913bbf09df805 | 4,471 | py | Python | pioneer/core/STLSTM.py | TJUMMG/TGSR | 41a36c4fa1154bdc47bb48dbe97e8e8090294ce2 | [
"Apache-2.0"
] | null | null | null | pioneer/core/STLSTM.py | TJUMMG/TGSR | 41a36c4fa1154bdc47bb48dbe97e8e8090294ce2 | [
"Apache-2.0"
] | null | null | null | pioneer/core/STLSTM.py | TJUMMG/TGSR | 41a36c4fa1154bdc47bb48dbe97e8e8090294ce2 | [
"Apache-2.0"
] | 1 | 2022-02-24T23:40:44.000Z | 2022-02-24T23:40:44.000Z | import torch
import torch.nn as nn
if __name__ == '__main__':
batchsize =10
# stlstm_cell = STLSTMCell(4, 10)
# x = torch.randn([1, 4])
# h = torch.randn([1, 10])
# c = torch.randn([1, 10])
# m = torch.randn([1, 10])
#
# h_t, c_t, m_t = stlstm_cell(x, h, c, m)
stlstm = STLSTM(4, ... | 35.768 | 123 | 0.561619 | import torch
import torch.nn as nn
class STLSTMCell(nn.Module):
def __init__(self,input_size, hidden_size):
super(STLSTMCell, self).__init__()
self.conv_x = nn.Linear(input_size,hidden_size*7)
self.conv_h = nn.Linear(hidden_size,hidden_size*4)
self.conv_m = nn.Linear(hidden_size,hid... | 3,943 | 10 | 179 |
d4ccb23fa768b7c5845523c071cba747ce1fbe83 | 678 | py | Python | examples/simple.py | fabricio-aguiar/Flask-GoogleMaps | 57fbad142723dcae512c41a3b8a4a3e34aaa2c40 | [
"MIT"
] | null | null | null | examples/simple.py | fabricio-aguiar/Flask-GoogleMaps | 57fbad142723dcae512c41a3b8a4a3e34aaa2c40 | [
"MIT"
] | null | null | null | examples/simple.py | fabricio-aguiar/Flask-GoogleMaps | 57fbad142723dcae512c41a3b8a4a3e34aaa2c40 | [
"MIT"
] | null | null | null | from flask import Flask, render_template
from flask_googlemaps import GoogleMaps, Map, icons
from dynaconf import FlaskDynaconf
app = Flask(__name__)
GoogleMaps(app)
FlaskDynaconf(app)
@app.route("/")
if __name__ == "__main__":
app.run(port=5050)
| 22.6 | 75 | 0.623894 | from flask import Flask, render_template
from flask_googlemaps import GoogleMaps, Map, icons
from dynaconf import FlaskDynaconf
app = Flask(__name__)
GoogleMaps(app)
FlaskDynaconf(app)
@app.route("/")
def map_created_in_view():
gmap = Map(
identifier="gmap",
varname="gmap",
lat=37.4419,
... | 400 | 0 | 22 |
e08fef1717dba2d5e1844755508084fbe4b923d4 | 2,301 | py | Python | setup.py | deepanshs/csdmpy | bd4e138b10694491113b10177a89305697f1752c | [
"BSD-3-Clause"
] | 7 | 2021-07-07T09:55:20.000Z | 2022-01-22T06:34:17.000Z | setup.py | deepanshs/csdmpy | bd4e138b10694491113b10177a89305697f1752c | [
"BSD-3-Clause"
] | 16 | 2021-06-09T06:28:27.000Z | 2022-03-01T18:12:33.000Z | setup.py | deepanshs/csdmpy | bd4e138b10694491113b10177a89305697f1752c | [
"BSD-3-Clause"
] | 1 | 2020-01-03T17:04:16.000Z | 2020-01-03T17:04:16.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import find_packages
from setuptools import setup
# Load package veersion number.
with open("csdmpy/__init__.py", "r") as f:
for line in f.readlines():
if "__version__" in line:
before_keyword, keyword, after_keyword = lin... | 31.958333 | 79 | 0.649718 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import find_packages
from setuptools import setup
# Load package veersion number.
with open("csdmpy/__init__.py", "r") as f:
for line in f.readlines():
if "__version__" in line:
before_keyword, keyword, after_keyword = lin... | 0 | 0 | 0 |
c6e923edfcd10936710abd0a96247f4a5614f3a0 | 65 | py | Python | alerter/src/message_broker/rabbitmq/__init__.py | SimplyVC/panic | 2f5c327ea0d14b6a49dc8f4599a255048bc2ff6d | [
"Apache-2.0"
] | 41 | 2019-08-23T12:40:42.000Z | 2022-03-28T11:06:02.000Z | alerter/src/message_broker/rabbitmq/__init__.py | SimplyVC/panic | 2f5c327ea0d14b6a49dc8f4599a255048bc2ff6d | [
"Apache-2.0"
] | 147 | 2019-08-30T22:09:48.000Z | 2022-03-30T08:46:26.000Z | alerter/src/message_broker/rabbitmq/__init__.py | SimplyVC/panic | 2f5c327ea0d14b6a49dc8f4599a255048bc2ff6d | [
"Apache-2.0"
] | 3 | 2019-09-03T21:12:28.000Z | 2021-08-18T14:27:56.000Z | from src.message_broker.rabbitmq.rabbitmq_api import RabbitMQApi
| 32.5 | 64 | 0.892308 | from src.message_broker.rabbitmq.rabbitmq_api import RabbitMQApi
| 0 | 0 | 0 |
36f8c1feebe983d31c6dc6408a16ba23e194cf98 | 643 | py | Python | datamanager/processing_gribnc_data/driver.py | mr-atharva-kulkarni/Algorithms-for-Sea-Route-Optimizaiton | 48d90ad2445b60d2228ed0aac60e1acba773b345 | [
"MIT"
] | null | null | null | datamanager/processing_gribnc_data/driver.py | mr-atharva-kulkarni/Algorithms-for-Sea-Route-Optimizaiton | 48d90ad2445b60d2228ed0aac60e1acba773b345 | [
"MIT"
] | null | null | null | datamanager/processing_gribnc_data/driver.py | mr-atharva-kulkarni/Algorithms-for-Sea-Route-Optimizaiton | 48d90ad2445b60d2228ed0aac60e1acba773b345 | [
"MIT"
] | null | null | null | import geojson
import requests
fileName = input("Enter Filename:")
parameterName = input("Enter Parameter Name:")
parameterName = parameterName.lower().capitalize()
typeOfLevelName = input("Enter type of level:")
levelName = input("Enter level:")
levelVal = int(levelName)
foreCastHourName = input("Enter forecast hour:"... | 32.15 | 70 | 0.757387 | import geojson
import requests
fileName = input("Enter Filename:")
parameterName = input("Enter Parameter Name:")
parameterName = parameterName.lower().capitalize()
typeOfLevelName = input("Enter type of level:")
levelName = input("Enter level:")
levelVal = int(levelName)
foreCastHourName = input("Enter forecast hour:"... | 0 | 0 | 0 |
e688e699c0a8417169a2ba5399135c7797330ec6 | 3,180 | py | Python | Client/clientGameConnection.py | JarheadHME/Multiworld_Client | 7f264eb8631b9c1edd58bc31bb5bbbcfa3ec2314 | [
"MIT"
] | null | null | null | Client/clientGameConnection.py | JarheadHME/Multiworld_Client | 7f264eb8631b9c1edd58bc31bb5bbbcfa3ec2314 | [
"MIT"
] | null | null | null | Client/clientGameConnection.py | JarheadHME/Multiworld_Client | 7f264eb8631b9c1edd58bc31bb5bbbcfa3ec2314 | [
"MIT"
] | null | null | null | import asyncio
from asyncio import Task
from typing import List
from base_logger import logging
logger = logging.getLogger(__name__)
from Dolphin.dolphinGameHandler import DolphinGameHandler
from Model.itemDto import ItemDto
from util.abstractGameHandler import AbstractGameHandler
from PySide6.QtCore import Signal
| 37.857143 | 120 | 0.641509 | import asyncio
from asyncio import Task
from typing import List
from base_logger import logging
logger = logging.getLogger(__name__)
from Dolphin.dolphinGameHandler import DolphinGameHandler
from Model.itemDto import ItemDto
from util.abstractGameHandler import AbstractGameHandler
from PySide6.QtCore import Signal
... | 2,429 | 408 | 23 |
5dce291b545fd45c8302c3044c37326984355ce7 | 982 | py | Python | h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2odownload_csv.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 6,098 | 2015-05-22T02:46:12.000Z | 2022-03-31T16:54:51.000Z | h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2odownload_csv.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 2,517 | 2015-05-23T02:10:54.000Z | 2022-03-30T17:03:39.000Z | h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2odownload_csv.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 2,199 | 2015-05-22T04:09:55.000Z | 2022-03-28T22:20:45.000Z | from __future__ import print_function
import sys, os
sys.path.insert(1,"../../../")
from tests import pyunit_utils
import h2o
def h2odownload_csv():
"""
Python API test: h2o.download_csv(data, filename)
"""
training_data = h2o.import_file(pyunit_utils.locate("smalldata/logreg/benign.csv"))
try:
... | 36.37037 | 95 | 0.680244 | from __future__ import print_function
import sys, os
sys.path.insert(1,"../../../")
from tests import pyunit_utils
import h2o
def h2odownload_csv():
"""
Python API test: h2o.download_csv(data, filename)
"""
training_data = h2o.import_file(pyunit_utils.locate("smalldata/logreg/benign.csv"))
try:
... | 0 | 0 | 0 |
501133344b118a98f39410df479eb520956042e0 | 5,952 | py | Python | codes/models/archs/RCAN_arch.py | AyeshaSadiqa/thesis | 761eb0c37acd42707d52d4a6bfabe8ac566d8aa4 | [
"Apache-2.0"
] | 77 | 2021-08-14T04:43:49.000Z | 2022-03-08T13:41:10.000Z | codes/models/archs/RCAN_arch.py | AyeshaSadiqa/thesis | 761eb0c37acd42707d52d4a6bfabe8ac566d8aa4 | [
"Apache-2.0"
] | 8 | 2021-10-30T14:52:11.000Z | 2022-03-09T12:44:54.000Z | codes/models/archs/RCAN_arch.py | AyeshaSadiqa/thesis | 761eb0c37acd42707d52d4a6bfabe8ac566d8aa4 | [
"Apache-2.0"
] | 7 | 2021-08-22T00:47:44.000Z | 2022-03-08T10:25:54.000Z | import math
import torch
from torch import nn as nn
from models.archs.arch_util import make_layer
class Upsample(nn.Sequential):
"""Upsample module.
Args:
scale (int): Scale factor. Supported scales: 2^n and 3.
num_feat (int): Channel number of intermediate features.
"""
class ChannelAt... | 33.251397 | 78 | 0.573589 | import math
import torch
from torch import nn as nn
from models.archs.arch_util import make_layer
class Upsample(nn.Sequential):
"""Upsample module.
Args:
scale (int): Scale factor. Supported scales: 2^n and 3.
num_feat (int): Channel number of intermediate features.
"""
def __init__... | 3,167 | 0 | 243 |
c2181aeb8e9a201390010d5f8b9cbabbb2dca0d3 | 709 | py | Python | fasta_manipulation/fasta_to_genbank.py | olgatsiouri1996/biomisc | b4fdaf3dd49816b7ca9da1d200ab4443455ab784 | [
"MIT"
] | 2 | 2020-06-18T23:43:15.000Z | 2020-10-02T12:32:21.000Z | fasta_manipulation/fasta_to_genbank.py | olgatsiouri1996/biomisc | b4fdaf3dd49816b7ca9da1d200ab4443455ab784 | [
"MIT"
] | 1 | 2021-04-18T00:15:24.000Z | 2021-08-01T20:46:02.000Z | fasta_manipulation/fasta_to_genbank.py | olgatsiouri1996/biomisc | b4fdaf3dd49816b7ca9da1d200ab4443455ab784 | [
"MIT"
] | null | null | null | # python3
import argparse
from Bio import SeqIO
from Bio.Alphabet import generic_dna, generic_protein
# imput parameters
ap = argparse.ArgumentParser()
ap.add_argument("-fa","--fasta", required=True, help="input fasta file")
ap.add_argument("-gb", "--genbank", required=True, help="output genbank file")
args = vars(ap.p... | 27.269231 | 78 | 0.737659 | # python3
import argparse
from Bio import SeqIO
from Bio.Alphabet import generic_dna, generic_protein
# imput parameters
ap = argparse.ArgumentParser()
ap.add_argument("-fa","--fasta", required=True, help="input fasta file")
ap.add_argument("-gb", "--genbank", required=True, help="output genbank file")
args = vars(ap.p... | 0 | 0 | 0 |
3f2a837c7448ee33c18e813bdaf73a07903d0fe7 | 643 | py | Python | backend/blog.py | bbruceyuan/easy-blog | 742bd8d0c8f3d8af793c4e8f531daad410a46151 | [
"MIT"
] | 1 | 2018-08-01T10:51:54.000Z | 2018-08-01T10:51:54.000Z | backend/blog.py | hey-bruce/easy_blog | 742bd8d0c8f3d8af793c4e8f531daad410a46151 | [
"MIT"
] | 1 | 2019-07-20T07:14:25.000Z | 2019-07-20T07:14:25.000Z | backend/blog.py | bbruceyuan/easy-blog | 742bd8d0c8f3d8af793c4e8f531daad410a46151 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Created by BBruceyuan on 18-7-9.
from flask_script import Manager
from flask_script import Shell
from flask_migrate import Migrate, MigrateCommand
from flask import current_app
from app import create_app
from app import db
blog = create_app('develop')
manager = Manager(blog)
# with blog.app... | 20.09375 | 68 | 0.755832 | #!/usr/bin/env python
# Created by BBruceyuan on 18-7-9.
from flask_script import Manager
from flask_script import Shell
from flask_migrate import Migrate, MigrateCommand
from flask import current_app
from app import create_app
from app import db
blog = create_app('develop')
manager = Manager(blog)
# with blog.app... | 37 | 0 | 23 |
04bd0d40cfcfb96beef4e0573e3a0ec93949247b | 9,410 | py | Python | utils/network.py | dunknowcoding/DilatedCRF | 416ca017d280632353824902df2ea7c035acf1c5 | [
"Apache-2.0"
] | 1 | 2022-02-01T00:42:19.000Z | 2022-02-01T00:42:19.000Z | utils/network.py | dunknowcoding/DilatedCRF | 416ca017d280632353824902df2ea7c035acf1c5 | [
"Apache-2.0"
] | null | null | null | utils/network.py | dunknowcoding/DilatedCRF | 416ca017d280632353824902df2ea7c035acf1c5 | [
"Apache-2.0"
] | 1 | 2022-02-11T09:31:13.000Z | 2022-02-11T09:31:13.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
: Project - Dialted CRF
: Network frameworks and helpers
: Author - Xi Mo
: Institute - University of Kansas
: Date - 6/24/2021
: Last Update - 7/10/2021
: License: Apache 2.0
"""
import torch
import torch.nn as nn
import torch.nn.functional as ops
imp... | 44.386792 | 90 | 0.453454 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
: Project - Dialted CRF
: Network frameworks and helpers
: Author - Xi Mo
: Institute - University of Kansas
: Date - 6/24/2021
: Last Update - 7/10/2021
: License: Apache 2.0
"""
import torch
import torch.nn as nn
import torch.nn.functional as ops
imp... | 8,548 | 28 | 369 |
3ca35272338005ea0002852caf9dcad2fb40a023 | 6,977 | py | Python | backend/galvanalyser/database/__init__.py | Battery-Intelligence-Lab/galvanalyser | 3b7198df1caf015fcb802ba94df999aa36c08f4f | [
"BSD-2-Clause"
] | 13 | 2021-11-11T10:59:12.000Z | 2022-02-02T18:27:48.000Z | backend/galvanalyser/database/__init__.py | Battery-Intelligence-Lab/galvanalyser | 3b7198df1caf015fcb802ba94df999aa36c08f4f | [
"BSD-2-Clause"
] | 19 | 2021-11-11T14:20:53.000Z | 2022-02-16T09:49:27.000Z | backend/galvanalyser/database/__init__.py | Battery-Intelligence-Lab/galvanalyser | 3b7198df1caf015fcb802ba94df999aa36c08f4f | [
"BSD-2-Clause"
] | 1 | 2022-01-14T08:10:08.000Z | 2022-01-14T08:10:08.000Z | import psycopg2
from psycopg2 import sql
import string
import os
from .row import Row
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
Base = declarative_base()
from .harvester import (
HarvesterRow,
MonitoredPathRow,
)
| 27.908 | 84 | 0.570446 | import psycopg2
from psycopg2 import sql
import string
import os
from .row import Row
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
Base = declarative_base()
from .harvester import (
HarvesterRow,
MonitoredPathRow,
)
def create_harvester_user(config, harvester,... | 6,464 | 0 | 230 |
49b8740c785069cbca81ccdfb08e1ce33f77fee8 | 1,113 | py | Python | aztk/client/client.py | Geims83/aztk | 8f8e7b268bdbf82c3ae4ecdcd907077bd6fe69b6 | [
"MIT"
] | 161 | 2017-10-04T08:58:27.000Z | 2022-01-03T13:01:04.000Z | aztk/client/client.py | Geims83/aztk | 8f8e7b268bdbf82c3ae4ecdcd907077bd6fe69b6 | [
"MIT"
] | 400 | 2017-09-29T21:52:08.000Z | 2021-01-08T02:48:56.000Z | aztk/client/client.py | isabella232/aztk | 6e04372d19661ead6744387edab7beda16e3d928 | [
"MIT"
] | 74 | 2017-10-13T04:41:26.000Z | 2021-12-20T15:56:42.000Z | from aztk import models
from aztk.utils import azure_api
class CoreClient:
"""The base AZTK client that all other clients inherit from.
**This client should not be used directly. Only software specific clients
should be used.**
"""
| 33.727273 | 80 | 0.703504 | from aztk import models
from aztk.utils import azure_api
class CoreClient:
"""The base AZTK client that all other clients inherit from.
**This client should not be used directly. Only software specific clients
should be used.**
"""
def __init__(self):
self.secrets_configuration = None
... | 807 | 0 | 54 |
446d3c502edcc9e6f84b8f10397077cf54871c59 | 3,022 | py | Python | cogs/events/voice.py | disneyresidents/2rezi-bot | c7fbc46a0b6852d5795f3350baeac89fc1e5d519 | [
"MIT"
] | 9 | 2020-08-02T03:50:01.000Z | 2022-01-06T05:25:47.000Z | cogs/events/voice.py | disneyresidents/bot-cog | c7fbc46a0b6852d5795f3350baeac89fc1e5d519 | [
"MIT"
] | null | null | null | cogs/events/voice.py | disneyresidents/bot-cog | c7fbc46a0b6852d5795f3350baeac89fc1e5d519 | [
"MIT"
] | 3 | 2020-08-10T05:08:50.000Z | 2020-12-05T10:00:29.000Z | import asyncio
import re
import discord
from discord.ext import commands
| 38.253165 | 90 | 0.609199 | import asyncio
import re
import discord
from discord.ext import commands
class Voice(commands.Cog, name="voice"):
def __init__(self, bot):
self.bot = bot
@commands.Cog.listener()
async def on_voice_state_update(self, member, before, after):
if member.guild.id == 662503350633365515:
... | 3,101 | 347 | 46 |
6ac42f1ec378a9bba90c87d80cc37c6563ac1bc5 | 1,136 | py | Python | app/api/lists.py | palazzem/gello | 19fe9e4aa8de485dd829a87047ec64f89b5fa7ee | [
"Apache-2.0"
] | 44 | 2018-03-28T14:22:23.000Z | 2022-03-15T07:25:06.000Z | app/api/lists.py | palazzem/gello | 19fe9e4aa8de485dd829a87047ec64f89b5fa7ee | [
"Apache-2.0"
] | 44 | 2018-03-28T14:19:03.000Z | 2022-02-16T10:24:57.000Z | app/api/lists.py | palazzem/gello | 19fe9e4aa8de485dd829a87047ec64f89b5fa7ee | [
"Apache-2.0"
] | 12 | 2018-03-28T14:15:43.000Z | 2021-07-19T17:33:20.000Z | # -*- coding: utf-8 -*-
#
# Unless explicitly stated otherwise all files in this repository are licensed
# under the Apache 2 License.
#
# This product includes software developed at Datadog
# (https://www.datadoghq.com/).
#
# Copyright 2018 Datadog, Inc.
#
"""api/lists.py
Exposed lists for autocomplete.
"""
from f... | 23.183673 | 78 | 0.65493 | # -*- coding: utf-8 -*-
#
# Unless explicitly stated otherwise all files in this repository are licensed
# under the Apache 2 License.
#
# This product includes software developed at Datadog
# (https://www.datadoghq.com/).
#
# Copyright 2018 Datadog, Inc.
#
"""api/lists.py
Exposed lists for autocomplete.
"""
from f... | 616 | 0 | 22 |
9d6ed3a4d70d04463333dc2bacd3f64ffaa9050e | 1,181 | py | Python | src/lib/telegram/utils/helpers.py | thonkify/thonkify | 2cb4493d796746cb46c8519a100ef3ef128a761a | [
"MIT"
] | 17 | 2017-08-04T15:41:05.000Z | 2020-10-16T18:02:41.000Z | src/lib/telegram/utils/helpers.py | thonkify/thonkify | 2cb4493d796746cb46c8519a100ef3ef128a761a | [
"MIT"
] | 3 | 2017-08-04T23:37:37.000Z | 2017-08-04T23:38:34.000Z | src/lib/telegram/utils/helpers.py | thonkify/thonkify | 2cb4493d796746cb46c8519a100ef3ef128a761a | [
"MIT"
] | 3 | 2017-12-07T16:30:59.000Z | 2019-06-16T02:48:28.000Z | #!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2017
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
#... | 35.787879 | 71 | 0.733277 | #!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2017
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
#... | 0 | 0 | 0 |
45e1e2fa3701f2bf89181cfdbefd64dc0d1f878a | 4,347 | py | Python | neuralogic/core/constructs/atom.py | LukasZahradnik/PyNeurologic | 99025a92e86f772b139369acf75d08a3b506994d | [
"MIT"
] | null | null | null | neuralogic/core/constructs/atom.py | LukasZahradnik/PyNeurologic | 99025a92e86f772b139369acf75d08a3b506994d | [
"MIT"
] | null | null | null | neuralogic/core/constructs/atom.py | LukasZahradnik/PyNeurologic | 99025a92e86f772b139369acf75d08a3b506994d | [
"MIT"
] | null | null | null | from typing import Iterable, Union
from neuralogic.core.constructs.predicate import Predicate
from neuralogic.core.constructs import rule, factories
AtomType = Union["BaseAtom", "WeightedAtom"]
BodyAtomType = Union["BaseAtom", "WeightedAtom"]
Head = AtomType
Body = Union[Iterable[BodyAtomType], BodyAtomType]
| 31.273381 | 100 | 0.6294 | from typing import Iterable, Union
from neuralogic.core.constructs.predicate import Predicate
from neuralogic.core.constructs import rule, factories
AtomType = Union["BaseAtom", "WeightedAtom"]
BodyAtomType = Union["BaseAtom", "WeightedAtom"]
Head = AtomType
Body = Union[Iterable[BodyAtomType], BodyAtomType]
clas... | 3,339 | 377 | 315 |
49582d1081d0a7a36fa4b6ef69c3cd116e5a9b96 | 351 | py | Python | docs/_exts/setup.py | mihaimitrut/Sylius | 94f16e3adee4183f649ecc9d69faa1b6eb22116e | [
"MIT"
] | 86 | 2018-04-02T13:43:35.000Z | 2021-11-15T12:27:41.000Z | docs/_exts/setup.py | mihaimitrut/Sylius | 94f16e3adee4183f649ecc9d69faa1b6eb22116e | [
"MIT"
] | 82 | 2020-03-08T14:28:59.000Z | 2022-02-26T23:19:18.000Z | docs/_exts/setup.py | mihaimitrut/Sylius | 94f16e3adee4183f649ecc9d69faa1b6eb22116e | [
"MIT"
] | 29 | 2015-01-10T17:55:36.000Z | 2021-05-06T12:45:10.000Z | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name = 'sphinx-php',
version = '1.0',
author = 'Fabien Potencier',
author_email = 'fabien@symfony.com',
description = 'Sphinx Extensions for PHP and Symfony',
license = 'MIT',
packages = find_packages(),
install... | 23.4 | 58 | 0.632479 | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name = 'sphinx-php',
version = '1.0',
author = 'Fabien Potencier',
author_email = 'fabien@symfony.com',
description = 'Sphinx Extensions for PHP and Symfony',
license = 'MIT',
packages = find_packages(),
install... | 0 | 0 | 0 |
b49c63fd876909dbb64700ce718b1e23cbeb9695 | 2,587 | py | Python | SlowLoris DDos/slowloris.py | Marzooq13579/Hack-Gadgets | 4b9351c4465f3e01fb0390b1e86dfe7c26237a19 | [
"MIT"
] | 8 | 2019-02-17T20:11:46.000Z | 2019-10-18T06:27:16.000Z | SlowLoris DDos/slowloris.py | Marzooq13579/Hack-Gadgets | 4b9351c4465f3e01fb0390b1e86dfe7c26237a19 | [
"MIT"
] | null | null | null | SlowLoris DDos/slowloris.py | Marzooq13579/Hack-Gadgets | 4b9351c4465f3e01fb0390b1e86dfe7c26237a19 | [
"MIT"
] | 4 | 2019-02-17T23:00:18.000Z | 2019-10-18T06:27:14.000Z | import argparse
import logging
import random
import socket
import ssl
import sys
import time
lista_de_sockets = []
configuracao_agente = [
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36"
]
if __name__ == "__main__":
if len(sys.argv)> ... | 35.930556 | 127 | 0.625048 | import argparse
import logging
import random
import socket
import ssl
import sys
import time
lista_de_sockets = []
configuracao_agente = [
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36"
]
def iniciando_socket(ip,porta):
sock = socket... | 2,085 | 0 | 46 |
c3e165f84d82479663c332427c256f869f66e35c | 2,276 | py | Python | fileserver/membership/models.py | zsmith3/Photo-Manager-Server | 2b531159deadd1291d4a8e029a3cf375fb77156f | [
"MIT"
] | null | null | null | fileserver/membership/models.py | zsmith3/Photo-Manager-Server | 2b531159deadd1291d4a8e029a3cf375fb77156f | [
"MIT"
] | 10 | 2019-01-18T17:36:30.000Z | 2022-03-11T23:39:04.000Z | fileserver/membership/models.py | zsmith3/Photo-Manager-Server | 2b531159deadd1291d4a8e029a3cf375fb77156f | [
"MIT"
] | null | null | null | import secrets
from django.db import models
from django.contrib.auth.models import User, Group
# Authentication user group
models.signals.post_save.connect(create_auth_group, sender=Group)
# User configuration settings
models.signals.post_save.connect(create_user_config, sender=User)
| 31.178082 | 151 | 0.647627 | import secrets
from django.db import models
from django.contrib.auth.models import User, Group
# Authentication user group
class AuthGroup(models.Model):
group = models.OneToOneField(Group, related_name="auth", on_delete=models.CASCADE)
token = models.TextField(max_length=64, default=secrets.token_hex)
d... | 561 | 1,330 | 90 |
7d72b0f383f1e25fcaa936c3a2b83568c37e53fe | 261 | py | Python | src/DNAAnimProp.py | Toonerz/libdna | 9729a4cee7a43f869353b6ecc84ec02f071a6f30 | [
"MIT"
] | 1 | 2021-02-23T12:05:39.000Z | 2021-02-23T12:05:39.000Z | src/DNAAnimProp.py | Toonerz/libdna | 9729a4cee7a43f869353b6ecc84ec02f071a6f30 | [
"MIT"
] | null | null | null | src/DNAAnimProp.py | Toonerz/libdna | 9729a4cee7a43f869353b6ecc84ec02f071a6f30 | [
"MIT"
] | null | null | null | from pandac.PandaModules import *
from panda3d.core import *
from DNAProp import DNAProp | 18.642857 | 33 | 0.735632 | from pandac.PandaModules import *
from panda3d.core import *
from DNAProp import DNAProp
class DNAAnimProp(DNAProp):
def __init__(self):
DNAProp.__init__(self)
anim = ''
def setAnim(self, anim):
self.anim = anim
def getAnim(self):
return self.anim | 73 | 6 | 94 |
2428b80a981e2bd8c1b6521bbf88ed16a990c957 | 2,828 | py | Python | problem_2/problem_2.py | informramiz/problems-vs-algorithms | efa853e7d1c87a6f566faa19e7a46d5ba170b98a | [
"MIT"
] | null | null | null | problem_2/problem_2.py | informramiz/problems-vs-algorithms | efa853e7d1c87a6f566faa19e7a46d5ba170b98a | [
"MIT"
] | null | null | null | problem_2/problem_2.py | informramiz/problems-vs-algorithms | efa853e7d1c87a6f566faa19e7a46d5ba170b98a | [
"MIT"
] | null | null | null | """
Author: Ramiz Raja
Created on: 11/01/2020
Problem: Search in a Rotated Sorted Array
You are given a sorted array which is rotated at some random pivot point.
Example: [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]
You are given a target value to search. If found in the array return its index, otherwise return -1.
... | 31.076923 | 125 | 0.608204 | """
Author: Ramiz Raja
Created on: 11/01/2020
Problem: Search in a Rotated Sorted Array
You are given a sorted array which is rotated at some random pivot point.
Example: [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]
You are given a target value to search. If found in the array return its index, otherwise return -1.
... | 744 | 0 | 92 |
965488f514c2ae38817ebced1bc0719fbe793eaa | 1,518 | py | Python | naucse/freezer.py | torsava/naucse.python.cz | 7770a151f81860f422121135a75768dbfbf51a23 | [
"MIT"
] | null | null | null | naucse/freezer.py | torsava/naucse.python.cz | 7770a151f81860f422121135a75768dbfbf51a23 | [
"MIT"
] | null | null | null | naucse/freezer.py | torsava/naucse.python.cz | 7770a151f81860f422121135a75768dbfbf51a23 | [
"MIT"
] | null | null | null | import contextlib
from flask_frozen import UrlForLogger, Freezer
from naucse.utils.routes import absolute_urls_to_freeze
class AllLinksLogger(UrlForLogger):
""" AllLinksLogger primarily logs ``url_for`` calls, but yields urls from ``absolute_urls_to_freeze`` as well.
"""
def iter_calls(self):
... | 34.5 | 115 | 0.692358 | import contextlib
from flask_frozen import UrlForLogger, Freezer
from naucse.utils.routes import absolute_urls_to_freeze
class AllLinksLogger(UrlForLogger):
""" AllLinksLogger primarily logs ``url_for`` calls, but yields urls from ``absolute_urls_to_freeze`` as well.
"""
def iter_calls(self):
... | 148 | 8 | 50 |
4df80a732327deba391ee66fbd56177b587b60c7 | 188 | py | Python | consulting_reverse/ping_get_reverse.py | andradjp/tools | 4cb2123563518f8a029fa9d67e9e6eabd18aa863 | [
"MIT"
] | null | null | null | consulting_reverse/ping_get_reverse.py | andradjp/tools | 4cb2123563518f8a029fa9d67e9e6eabd18aa863 | [
"MIT"
] | null | null | null | consulting_reverse/ping_get_reverse.py | andradjp/tools | 4cb2123563518f8a029fa9d67e9e6eabd18aa863 | [
"MIT"
] | null | null | null | import ipaddress
import socket
range = ipaddress.IPv4Network('10.7.0.0/22')
for x in range:
try:
print(socket.gethostbyaddr(str(x))[0])
except socket.herror:
pass
| 18.8 | 46 | 0.659574 | import ipaddress
import socket
range = ipaddress.IPv4Network('10.7.0.0/22')
for x in range:
try:
print(socket.gethostbyaddr(str(x))[0])
except socket.herror:
pass
| 0 | 0 | 0 |
d0e75528430acec4c392c38b5859feb156cb5d4b | 325 | py | Python | docs/source/notebooks/01.py | JulianKarlBauer/orientation_averaging_mean_field | 75acb5ed58aa6a69cec7508d3d45865bbab3ed3c | [
"MIT"
] | null | null | null | docs/source/notebooks/01.py | JulianKarlBauer/orientation_averaging_mean_field | 75acb5ed58aa6a69cec7508d3d45865bbab3ed3c | [
"MIT"
] | null | null | null | docs/source/notebooks/01.py | JulianKarlBauer/orientation_averaging_mean_field | 75acb5ed58aa6a69cec7508d3d45865bbab3ed3c | [
"MIT"
] | null | null | null | # # Get points witin admissible parameter space
import planarfibers
import pandas as pd
pd.set_option('display.max_columns', 100)
pd.set_option('display.width', 1000)
df = planarfibers.discretization.get_points_on_slices(
radii=["0", "1/2", "9/10"],
la1s=["1/2", "4/6", "5/6", "1"],
numeric=False,
)
print... | 21.666667 | 54 | 0.683077 | # # Get points witin admissible parameter space
import planarfibers
import pandas as pd
pd.set_option('display.max_columns', 100)
pd.set_option('display.width', 1000)
df = planarfibers.discretization.get_points_on_slices(
radii=["0", "1/2", "9/10"],
la1s=["1/2", "4/6", "5/6", "1"],
numeric=False,
)
print... | 0 | 0 | 0 |
06decb392e619bb9bfe10a2d0ce6c1804c2c06e6 | 1,077 | py | Python | virtman/virtman/cmd/virtman.py | vmthunder/packages | e530e243007a0f403cad1b67a490ffb9687969c3 | [
"Apache-2.0"
] | 2 | 2015-03-15T11:12:53.000Z | 2018-10-12T03:05:52.000Z | virtman/virtman/cmd/virtman.py | vmthunder/packages | e530e243007a0f403cad1b67a490ffb9687969c3 | [
"Apache-2.0"
] | null | null | null | virtman/virtman/cmd/virtman.py | vmthunder/packages | e530e243007a0f403cad1b67a490ffb9687969c3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
import threading
import time
from oslo.config import cfg
from virtman import compute
from virtman.openstack.common import log as logging
#TODO: Auto determine host ip if not filled in conf file
CONF = cfg.CONF
if __name__ == '__main__':
CONF(sys.argv[1:], proje... | 26.925 | 85 | 0.601671 | #!/usr/bin/env python
import sys
import threading
import time
from oslo.config import cfg
from virtman import compute
from virtman.openstack.common import log as logging
#TODO: Auto determine host ip if not filled in conf file
CONF = cfg.CONF
def start():
cn = compute.Compute()
class He... | 588 | 0 | 25 |
1985c161fbb9d2809684a53e570e6a3feafe0a55 | 1,380 | py | Python | auger/utils/html.py | m-flak/auger | 5b58e549405bddcc6fc67867c0c151f415e01364 | [
"Apache-2.0"
] | 1 | 2021-05-22T07:47:58.000Z | 2021-05-22T07:47:58.000Z | auger/utils/html.py | m-flak/auger | 5b58e549405bddcc6fc67867c0c151f415e01364 | [
"Apache-2.0"
] | 1 | 2020-01-08T00:11:36.000Z | 2020-01-08T00:17:55.000Z | auger/utils/html.py | m-flak/auger | 5b58e549405bddcc6fc67867c0c151f415e01364 | [
"Apache-2.0"
] | null | null | null | import lxml.html
class QuickTag:
""" Callable to quickly create lxml element and access it.
"""
def __call__(self, as_element=True):
"""If `as_element` is `False`, return tuple of content, tag.
Otherwise, lxml.html.Element class is returned.
"""
if as_element:
r... | 30 | 75 | 0.673188 | import lxml.html
class QuickTag:
""" Callable to quickly create lxml element and access it.
"""
def __init__(self, content, tag):
self._tag = tag
self._content = content
self._element = lxml.html.Element(tag)
self._element.text = content
def __call__(self, as_element=Tr... | 152 | 0 | 26 |
8a7f0387ee1e5a8d71ef14387eec554a34d31620 | 6,789 | py | Python | django_filters/utils.py | timothyjlaurent/django-filter | 06b1a6d65a2b6eccaac91b8ebf17154f9206c7fe | [
"BSD-3-Clause"
] | null | null | null | django_filters/utils.py | timothyjlaurent/django-filter | 06b1a6d65a2b6eccaac91b8ebf17154f9206c7fe | [
"BSD-3-Clause"
] | 1 | 2021-03-26T00:33:06.000Z | 2021-03-26T00:33:06.000Z | django_filters/utils.py | timothyjlaurent/django-filter | 06b1a6d65a2b6eccaac91b8ebf17154f9206c7fe | [
"BSD-3-Clause"
] | null | null | null | import warnings
from django.conf import settings
from django.core.exceptions import FieldError
from django.db import models
from django.db.models.constants import LOOKUP_SEP
from django.db.models.expressions import Expression
from django.db.models.fields import FieldDoesNotExist
from django.db.models.fields.related im... | 29.517391 | 86 | 0.661953 | import warnings
from django.conf import settings
from django.core.exceptions import FieldError
from django.db import models
from django.db.models.constants import LOOKUP_SEP
from django.db.models.expressions import Expression
from django.db.models.fields import FieldDoesNotExist
from django.db.models.fields.related im... | 679 | 0 | 69 |
4917a993e949da8613ed9d7462ad21e579c8654e | 2,406 | py | Python | example_problems/tutorial/magic_index/services/eval_play1_server.py | romeorizzi/TALight | 2b694cb487f41dd0d36d7aa39f5c9c5a21bfc18e | [
"MIT"
] | 4 | 2021-06-27T13:27:24.000Z | 2022-03-24T10:46:28.000Z | example_problems/tutorial/magic_index/services/eval_play1_server.py | romeorizzi/TALight | 2b694cb487f41dd0d36d7aa39f5c9c5a21bfc18e | [
"MIT"
] | 1 | 2021-01-23T06:50:31.000Z | 2021-03-17T15:35:18.000Z | example_problems/tutorial/magic_index/services/eval_play1_server.py | romeorizzi/TALight | 2b694cb487f41dd0d36d7aa39f5c9c5a21bfc18e | [
"MIT"
] | 5 | 2021-04-01T15:21:57.000Z | 2022-01-29T15:07:38.000Z | #!/usr/bin/env python3
from sys import stderr, exit
import re
from TALinputs import TALinput
from multilanguage import Env, Lang, TALcolors
from magic_indexes_lib import *
# METADATA OF THIS TAL_SERVICE:
args_list = [
('config',str),
('moves',str),
('goal',str),
('feedback',str)
]
ENV =Env(args_list... | 33.887324 | 138 | 0.671654 | #!/usr/bin/env python3
from sys import stderr, exit
import re
from TALinputs import TALinput
from multilanguage import Env, Lang, TALcolors
from magic_indexes_lib import *
# METADATA OF THIS TAL_SERVICE:
args_list = [
('config',str),
('moves',str),
('goal',str),
('feedback',str)
]
ENV =Env(args_list... | 0 | 0 | 0 |
90ce9593ef75ba940c71128b9b153e7ed4868e38 | 6,715 | py | Python | src/ttkbootstrap/dialogs/colordropper.py | 745404527/ttkbootstrap | 692d780cf178dc2a3a7f55953f17899248f3fbae | [
"MIT"
] | 2 | 2022-01-23T01:48:38.000Z | 2022-01-24T00:30:58.000Z | src/ttkbootstrap/dialogs/colordropper.py | 745404527/ttkbootstrap | 692d780cf178dc2a3a7f55953f17899248f3fbae | [
"MIT"
] | null | null | null | src/ttkbootstrap/dialogs/colordropper.py | 745404527/ttkbootstrap | 692d780cf178dc2a3a7f55953f17899248f3fbae | [
"MIT"
] | 1 | 2022-03-19T08:47:08.000Z | 2022-03-19T08:47:08.000Z | """
NOTE: https://stackoverflow.com/questions/25467288/pils-imagegrab-is-capturing-at-the-wrong-resolution
!! This widget is not currently supported on Mac OS
"""
import tkinter as tk
import ttkbootstrap as ttk
from ttkbootstrap.constants import *
from ttkbootstrap import colorutils, utility
from PIL import Im... | 39.269006 | 106 | 0.639464 | """
NOTE: https://stackoverflow.com/questions/25467288/pils-imagegrab-is-capturing-at-the-wrong-resolution
!! This widget is not currently supported on Mac OS
"""
import tkinter as tk
import ttkbootstrap as ttk
from ttkbootstrap.constants import *
from ttkbootstrap import colorutils, utility
from PIL import Im... | 78 | 0 | 27 |
0d1ec9c67649b422c7054d5aa5bb72e17cf3a3f7 | 534 | py | Python | line.py | srnthsrdhrn/VehicleTrackingGUI | a18d890176de7547d557dfe7cc18dd37afa37411 | [
"MIT"
] | null | null | null | line.py | srnthsrdhrn/VehicleTrackingGUI | a18d890176de7547d557dfe7cc18dd37afa37411 | [
"MIT"
] | null | null | null | line.py | srnthsrdhrn/VehicleTrackingGUI | a18d890176de7547d557dfe7cc18dd37afa37411 | [
"MIT"
] | 1 | 2020-01-13T08:43:57.000Z | 2020-01-13T08:43:57.000Z | import numpy as np
import cv2
#from sort.py import rama
import time
cap = cv2.VideoCapture('Night.mp4')
fourcc = cv2.VideoWriter_fourcc(*'XVID')
out = cv2.VideoWriter('output.avi',fourcc, 20.0, (1280,720))
while(cap.isOpened()):
ret, frame = cap.read()
frame = cv2.line(frame, (100,360), (1200,360), (0,0,255), ... | 21.36 | 84 | 0.664794 | import numpy as np
import cv2
#from sort.py import rama
import time
cap = cv2.VideoCapture('Night.mp4')
fourcc = cv2.VideoWriter_fourcc(*'XVID')
out = cv2.VideoWriter('output.avi',fourcc, 20.0, (1280,720))
while(cap.isOpened()):
ret, frame = cap.read()
frame = cv2.line(frame, (100,360), (1200,360), (0,0,255), ... | 0 | 0 | 0 |
c89b8c23db95676e8374607bed0fe07672faee3d | 176 | py | Python | passwords_template.py | Leibniz-HBI/RADICES | 37ce6303c646b9683c5a9c3159489d290bb16ade | [
"MIT"
] | 13 | 2019-07-18T15:28:02.000Z | 2022-01-03T15:16:06.000Z | passwords_template.py | manilevian/RADICES | 23d119c9c648dc07be4f39dc070b447f89e192f3 | [
"MIT"
] | 23 | 2019-07-12T15:43:27.000Z | 2021-12-15T14:41:11.000Z | passwords_template.py | manilevian/RADICES | 23d119c9c648dc07be4f39dc070b447f89e192f3 | [
"MIT"
] | 2 | 2020-05-05T10:22:50.000Z | 2020-08-31T11:10:07.000Z | sparsetwittermysqlpw = "" # mySQL Database Password
# Details for Mailgun
email_to_notify = ""
mailgun_default_smtp_login = ""
mailgun_api_base_url = ""
mailgun_api_key = ""
| 22 | 52 | 0.761364 | sparsetwittermysqlpw = "" # mySQL Database Password
# Details for Mailgun
email_to_notify = ""
mailgun_default_smtp_login = ""
mailgun_api_base_url = ""
mailgun_api_key = ""
| 0 | 0 | 0 |
7258cf2245b83f3ff9ff88e231ad10c39f43c719 | 19,502 | py | Python | RasPi_Dev/ros_ws/devel/lib/python2.7/dist-packages/astra_camera/cfg/UVCCameraConfig.py | QianheYu/xtark_driver_dev | 1708888161cf20c0d1f45c99d0da4467d69c26c8 | [
"BSD-3-Clause"
] | 1 | 2022-03-11T03:31:15.000Z | 2022-03-11T03:31:15.000Z | RasPi_Dev/ros_ws/devel/lib/python2.7/dist-packages/astra_camera/cfg/UVCCameraConfig.py | bravetree/xtark_driver_dev | 1708888161cf20c0d1f45c99d0da4467d69c26c8 | [
"BSD-3-Clause"
] | null | null | null | RasPi_Dev/ros_ws/devel/lib/python2.7/dist-packages/astra_camera/cfg/UVCCameraConfig.py | bravetree/xtark_driver_dev | 1708888161cf20c0d1f45c99d0da4467d69c26c8 | [
"BSD-3-Clause"
] | null | null | null | ## *********************************************************
##
## File autogenerated for the libuvc_camera package
## by the dynamic_reconfigure package.
## Please do not edit.
##
## ********************************************************/
from dynamic_reconfigure.encoding import extract_params
inf = float('inf')
... | 336.241379 | 18,051 | 0.677879 | ## *********************************************************
##
## File autogenerated for the libuvc_camera package
## by the dynamic_reconfigure package.
## Please do not edit.
##
## ********************************************************/
from dynamic_reconfigure.encoding import extract_params
inf = float('inf')
... | 0 | 0 | 0 |
76262c3f52cb6bdee076ea934eea9911ec7e90fe | 16 | py | Python | trackhub/settings.py | mauranolab/trackhub | ef4bc46810c370dc9422c549c34fc70e17cf5e32 | [
"MIT"
] | 36 | 2015-01-02T10:12:54.000Z | 2021-09-13T14:17:03.000Z | trackhub/settings.py | daler/trackhub | 3127aa3eb263b71ff0bea47c84aaf42aef520816 | [
"MIT"
] | 21 | 2015-01-02T11:59:20.000Z | 2021-02-19T21:30:43.000Z | trackhub/settings.py | daler/trackhub | 3127aa3eb263b71ff0bea47c84aaf42aef520816 | [
"MIT"
] | 11 | 2015-04-15T10:13:38.000Z | 2020-10-30T11:43:57.000Z | VALIDATE = True
| 8 | 15 | 0.75 | VALIDATE = True
| 0 | 0 | 0 |
3141a149e0e147fb3f5268ae3e05948ad4da7719 | 4,760 | py | Python | log-in.py | NoNameGr/NoName | e437ada090612bb44de0524affb66348537eda56 | [
"MIT"
] | null | null | null | log-in.py | NoNameGr/NoName | e437ada090612bb44de0524affb66348537eda56 | [
"MIT"
] | null | null | null | log-in.py | NoNameGr/NoName | e437ada090612bb44de0524affb66348537eda56 | [
"MIT"
] | 2 | 2020-07-30T04:10:37.000Z | 2020-07-30T04:15:10.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'log-in.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui... | 44.485981 | 88 | 0.683193 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'log-in.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui... | 4,159 | 3 | 76 |
0f7be76eca4e901701b16ef946c1cad8131f3dd7 | 978 | py | Python | data_pipeline/tf_helper.py | drah/UGATIT | 69c7f6d9887407f21c900a8bdf952e65cdcbc8a6 | [
"Apache-2.0"
] | null | null | null | data_pipeline/tf_helper.py | drah/UGATIT | 69c7f6d9887407f21c900a8bdf952e65cdcbc8a6 | [
"Apache-2.0"
] | null | null | null | data_pipeline/tf_helper.py | drah/UGATIT | 69c7f6d9887407f21c900a8bdf952e65cdcbc8a6 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
| 27.942857 | 89 | 0.696319 | import tensorflow as tf
def read_image(image_path):
content = tf.read_file(image_path)
image = tf.image.decode_image(content)
return image
def resize_images(images, dest_hw):
images = tf.cast(images, tf.float32)
if images.shape.rank == 3:
images = tf.expand_dims(images, 0)
images = _resize_images_... | 861 | 0 | 92 |
fe7279ff6c2685a69f9f9d759391b1e8976cada1 | 5,846 | py | Python | workflow.py | f0xd3v1lsw1ld/photoworkflow | 22397e7a474798da5f207586fbabc9b869017ef0 | [
"MIT"
] | null | null | null | workflow.py | f0xd3v1lsw1ld/photoworkflow | 22397e7a474798da5f207586fbabc9b869017ef0 | [
"MIT"
] | null | null | null | workflow.py | f0xd3v1lsw1ld/photoworkflow | 22397e7a474798da5f207586fbabc9b869017ef0 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#######################################################################################################################################################################
#The MIT License (MIT)
#Copyright (c) Copyright 2016, f0xd3v1lsw1ld@gmail.com
#Permission is hereby granted, free of charge, to any p... | 40.317241 | 167 | 0.609819 | #!/usr/bin/python
#######################################################################################################################################################################
#The MIT License (MIT)
#Copyright (c) Copyright 2016, f0xd3v1lsw1ld@gmail.com
#Permission is hereby granted, free of charge, to any p... | 3,478 | 0 | 88 |
df0a868be33c72b8e8b4f9d52ceddcaad2ddc46b | 1,560 | py | Python | jacquard/buckets/tests/test_bucket.py | peteowlett/jacquard | 772fd633e521501688e0933482cba45f48c23ef9 | [
"MIT"
] | null | null | null | jacquard/buckets/tests/test_bucket.py | peteowlett/jacquard | 772fd633e521501688e0933482cba45f48c23ef9 | [
"MIT"
] | null | null | null | jacquard/buckets/tests/test_bucket.py | peteowlett/jacquard | 772fd633e521501688e0933482cba45f48c23ef9 | [
"MIT"
] | null | null | null | import pytest
from jacquard.odm import Session
from jacquard.buckets import Bucket
from jacquard.constraints import Constraints
from jacquard.buckets.utils import release
from jacquard.buckets.constants import NUM_BUCKETS
from jacquard.buckets.exceptions import NotEnoughBucketsException
@pytest.mark.parametrize('div... | 23.636364 | 75 | 0.608974 | import pytest
from jacquard.odm import Session
from jacquard.buckets import Bucket
from jacquard.constraints import Constraints
from jacquard.buckets.utils import release
from jacquard.buckets.constants import NUM_BUCKETS
from jacquard.buckets.exceptions import NotEnoughBucketsException
@pytest.mark.parametrize('div... | 1,082 | 0 | 91 |
70fd33e04f19b6b60b4eaaa62dc06de3503c2599 | 3,161 | py | Python | kuri_mbzirc_challenge_2_exploration/scripts/test_velodyne_box_detection.py | kuri-kustar/kuri_mbzirc_challenge_2 | 88ac9046ef7e7db20380dff068f6801e06b6cb33 | [
"BSD-3-Clause"
] | 1 | 2019-06-14T08:03:49.000Z | 2019-06-14T08:03:49.000Z | kuri_mbzirc_challenge_2_exploration/scripts/test_velodyne_box_detection.py | kucars/kuri_mbzirc_challenge_2 | 88ac9046ef7e7db20380dff068f6801e06b6cb33 | [
"BSD-3-Clause"
] | null | null | null | kuri_mbzirc_challenge_2_exploration/scripts/test_velodyne_box_detection.py | kucars/kuri_mbzirc_challenge_2 | 88ac9046ef7e7db20380dff068f6801e06b6cb33 | [
"BSD-3-Clause"
] | 3 | 2016-06-11T11:08:31.000Z | 2016-11-16T12:45:22.000Z | #!/usr/bin/env python
""" autonomous.py - Version 1.0 2016-10-12
General framework based on Patrick Goebel's nav_test.py
Initial version based on ccam-navigation by Chris Mobley
Autonomous movement added by Jonathan Hodges
Define waypoint destinations for a robot to move autonomously within
a map... | 29.820755 | 87 | 0.725087 | #!/usr/bin/env python
""" autonomous.py - Version 1.0 2016-10-12
General framework based on Patrick Goebel's nav_test.py
Initial version based on ccam-navigation by Chris Mobley
Autonomous movement added by Jonathan Hodges
Define waypoint destinations for a robot to move autonomously within
a map... | 1,647 | 2 | 98 |
454d529c8030916a7bfae3ca5b35bd22b8161c1c | 2,670 | py | Python | zhihu/zhcls/answer.py | githubao/xiao-awesome-zhihu | 120dd16c731ec610e68dc94eff923e878a71e00e | [
"Apache-2.0"
] | null | null | null | zhihu/zhcls/answer.py | githubao/xiao-awesome-zhihu | 120dd16c731ec610e68dc94eff923e878a71e00e | [
"Apache-2.0"
] | null | null | null | zhihu/zhcls/answer.py | githubao/xiao-awesome-zhihu | 120dd16c731ec610e68dc94eff923e878a71e00e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
@description: //TODO
@version: 1.0
@author: BaoQiang
@license: Apache Licence
@contact: mailbaoqiang@gmail.com
@site: http://www.github.com/githubao
@software: PyCharm
@file: answer.py
@time: 2016/10/5 22:54
"""
from .base import Base
from .normal import normal_attr
fro... | 18.93617 | 82 | 0.618352 | #!/usr/bin/env python
# encoding: utf-8
"""
@description: //TODO
@version: 1.0
@author: BaoQiang
@license: Apache Licence
@contact: mailbaoqiang@gmail.com
@site: http://www.github.com/githubao
@software: PyCharm
@file: answer.py
@time: 2016/10/5 22:54
"""
from .base import Base
from .normal import normal_attr
fro... | 457 | 1,724 | 23 |
6a1bff4e22e7ea16e28b819b64753e7e438ef141 | 698 | py | Python | app/src/main/python/mosca/m_identifica_bordas.py | ricardonascimentosoares/moscadochifreapp | 9dcc4b6e3603003b353477e80dacb87beaf130d5 | [
"MIT"
] | null | null | null | app/src/main/python/mosca/m_identifica_bordas.py | ricardonascimentosoares/moscadochifreapp | 9dcc4b6e3603003b353477e80dacb87beaf130d5 | [
"MIT"
] | null | null | null | app/src/main/python/mosca/m_identifica_bordas.py | ricardonascimentosoares/moscadochifreapp | 9dcc4b6e3603003b353477e80dacb87beaf130d5 | [
"MIT"
] | null | null | null | import cv2
import numpy as np | 24.928571 | 62 | 0.515759 | import cv2
import numpy as np
def identifica_bordas(img_bovino):
# Converte a imagem para tons de cinza
cinza = cv2.cvtColor(img_bovino, cv2.COLOR_BGR2GRAY)
# Suavização
blur = cv2.GaussianBlur(cinza, (41,41) ,0)
# Passa Alta
filtered = cinza - blur
filtered = filtered + 127 * np.ones(cin... | 648 | 0 | 23 |
27a094a65838f27768df614eb5bc4305fbc68db8 | 263 | py | Python | 4-24-18/songbase.py | Ian-Harland/misy350-s18-exercises | de40f7337dea8c9f5db6a182e585ff7549c11842 | [
"MIT"
] | null | null | null | 4-24-18/songbase.py | Ian-Harland/misy350-s18-exercises | de40f7337dea8c9f5db6a182e585ff7549c11842 | [
"MIT"
] | null | null | null | 4-24-18/songbase.py | Ian-Harland/misy350-s18-exercises | de40f7337dea8c9f5db6a182e585ff7549c11842 | [
"MIT"
] | null | null | null | from flask import Flask, redner_template
app = Flask(__name__)
@app.route('/')
@app.route('/users/<string:username>')
if __name__ == '__main__':
app.run()
| 17.533333 | 40 | 0.661597 | from flask import Flask, redner_template
app = Flask(__name__)
@app.route('/')
def index():
return "hello world"
@app.route('/users/<string:username>')
def users(username):
return "<h1>hello %s<h1>" % username
if __name__ == '__main__':
app.run()
| 56 | 0 | 44 |
50abdb5a768ae1f4298b857206805ec3843ad574 | 446 | py | Python | Medium/48. Majority Number III/Solution.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 12 | 2019-05-04T04:21:27.000Z | 2022-03-02T07:06:57.000Z | Medium/48. Majority Number III/Solution.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 1 | 2019-07-24T18:43:53.000Z | 2019-07-24T18:43:53.000Z | Medium/48. Majority Number III/Solution.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 10 | 2019-07-01T04:03:04.000Z | 2022-03-09T03:57:37.000Z | """
48. Majority Number III
"""
# O(n) time
# O(n) extra space
class Solution:
"""
@param nums: A list of integers
@param k: An integer
@return: The majority number
"""
| 18.583333 | 44 | 0.506726 | """
48. Majority Number III
"""
# O(n) time
# O(n) extra space
class Solution:
"""
@param nums: A list of integers
@param k: An integer
@return: The majority number
"""
def majorityNumber(self, nums, k):
# write your code here
limit = len(nums) / k
dict = {}
... | 225 | 0 | 26 |
5d2fb024a8e83d3340994406c5338ace00a56318 | 1,791 | py | Python | vibes/models.py | macymuhia/IP_vibes | f420caea2955ab574d7d93a2353ccfa5e5ed05d2 | [
"MIT"
] | null | null | null | vibes/models.py | macymuhia/IP_vibes | f420caea2955ab574d7d93a2353ccfa5e5ed05d2 | [
"MIT"
] | 9 | 2020-06-05T22:50:59.000Z | 2022-02-10T13:20:10.000Z | vibes/models.py | macymuhia/IP_vibes | f420caea2955ab574d7d93a2353ccfa5e5ed05d2 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
# Create your models here.
# def create_profile(sender, **kwargs):
# user = kwargs["instance"]
# if kwargs["created"]:
# user_profile = UserPro... | 34.442308 | 103 | 0.713009 | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
# Create your models here.
class UserProfile(models.Model):
user = models.OneToOneField(
User, related_name='profile', on_delete=models.CASCADE)
... | 212 | 1,043 | 68 |
0f711f166abfbfb1b3d26f87bcdde914d199d2d3 | 233 | py | Python | greenferries/utils.py | adipasquale/greenferries-admin | 12344992677b03d8139fe71f8710b5d118d073bf | [
"MIT"
] | 5 | 2020-02-18T00:29:20.000Z | 2020-12-16T12:35:07.000Z | greenferries/utils.py | adipasquale/greenferries-admin | 12344992677b03d8139fe71f8710b5d118d073bf | [
"MIT"
] | 38 | 2020-02-15T11:11:47.000Z | 2020-12-16T12:06:02.000Z | greenferries/utils.py | adipasquale/greenferries-admin | 12344992677b03d8139fe71f8710b5d118d073bf | [
"MIT"
] | null | null | null | import os
| 17.923077 | 60 | 0.609442 | import os
def run_sh(command):
res = os.system(command)
if res != 0:
print(f"Error while running `{command}`, aborting!")
exit(1)
def clean_file(filepath):
run_sh(f"touch {filepath} && rm {filepath}")
| 175 | 0 | 46 |
0a2c84469f7dd1d2124a639fff298d8ba6a8bbd8 | 38,164 | py | Python | src/transformers/models/layoutlmv2/tokenization_layoutlmv2_fast.py | xu-song/transformers | bf3b555d407585144fcdd08a26bc151e8c8f05ff | [
"Apache-2.0"
] | 3 | 2021-11-22T14:00:00.000Z | 2022-02-14T16:12:13.000Z | src/transformers/models/layoutlmv2/tokenization_layoutlmv2_fast.py | xu-song/transformers | bf3b555d407585144fcdd08a26bc151e8c8f05ff | [
"Apache-2.0"
] | 1 | 2021-12-01T21:38:47.000Z | 2021-12-01T21:38:47.000Z | src/transformers/models/layoutlmv2/tokenization_layoutlmv2_fast.py | xu-song/transformers | bf3b555d407585144fcdd08a26bc151e8c8f05ff | [
"Apache-2.0"
] | 2 | 2021-02-18T03:12:51.000Z | 2021-04-16T13:16:58.000Z | # coding=utf-8
# Copyright 2021 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 47.174289 | 132 | 0.626742 | # coding=utf-8
# Copyright 2021 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 13,647 | 0 | 165 |
0cc2be9029f380cb58334409d1c247b9e8a6d659 | 1,071 | py | Python | config_example.py | KellyHwong/bronya-bot | 7c7322aa8cd739dcd9af37c195c353221b3ab7f1 | [
"MIT"
] | null | null | null | config_example.py | KellyHwong/bronya-bot | 7c7322aa8cd739dcd9af37c195c353221b3ab7f1 | [
"MIT"
] | null | null | null | config_example.py | KellyHwong/bronya-bot | 7c7322aa8cd739dcd9af37c195c353221b3ab7f1 | [
"MIT"
] | null | null | null | import os
from nonebot.default_config import *
# bot profile
BOT_NAME = "布洛妮娅"
COMMAND_START = {'', '/', '!', '/', '!'}
# paths
PROJECT_BRONYA = os.path.dirname(os.path.abspath(__file__)) # 本文件所在目录
ASSETS = os.path.join(PROJECT_BRONYA, "assets")
DATA = os.path.join(PROJECT_BRONYA, "data")
# super users
... | 24.340909 | 71 | 0.547152 | import os
from nonebot.default_config import *
# bot profile
BOT_NAME = "布洛妮娅"
COMMAND_START = {'', '/', '!', '/', '!'}
# paths
PROJECT_BRONYA = os.path.dirname(os.path.abspath(__file__)) # 本文件所在目录
ASSETS = os.path.join(PROJECT_BRONYA, "assets")
DATA = os.path.join(PROJECT_BRONYA, "data")
# super users
... | 37 | 0 | 25 |
380f61b2464263e3c92644dd1d6befdfa1b377b4 | 78 | py | Python | graphpype/interfaces/plot_igraph/__init__.py | EtienneCmb/graphpype | f19fdcd8e98660625a53c733ff8e44d60c31bd68 | [
"BSD-3-Clause"
] | null | null | null | graphpype/interfaces/plot_igraph/__init__.py | EtienneCmb/graphpype | f19fdcd8e98660625a53c733ff8e44d60c31bd68 | [
"BSD-3-Clause"
] | null | null | null | graphpype/interfaces/plot_igraph/__init__.py | EtienneCmb/graphpype | f19fdcd8e98660625a53c733ff8e44d60c31bd68 | [
"BSD-3-Clause"
] | null | null | null | from .plots import (PlotIGraphModules,PlotIGraphCoclass,PlotIGraphConjCoclass) | 78 | 78 | 0.897436 | from .plots import (PlotIGraphModules,PlotIGraphCoclass,PlotIGraphConjCoclass) | 0 | 0 | 0 |
b383b24d7695ee83f7198c6a02d42d48db7c4110 | 378 | py | Python | test_classification.py | yas-sim/openvino_open_model_zoo_toolkit | 23b65130e7ecff96c19d9b7d74ac8407096b64fe | [
"Apache-2.0"
] | 11 | 2020-09-22T05:55:49.000Z | 2021-06-17T23:35:17.000Z | test_classification.py | yas-sim/openvino_open_model_zoo_toolkit | 23b65130e7ecff96c19d9b7d74ac8407096b64fe | [
"Apache-2.0"
] | null | null | null | test_classification.py | yas-sim/openvino_open_model_zoo_toolkit | 23b65130e7ecff96c19d9b7d74ac8407096b64fe | [
"Apache-2.0"
] | 1 | 2020-09-22T13:19:53.000Z | 2020-09-22T13:19:53.000Z | import cv2
import open_model_zoo_toolkit as omztk
omz = omztk.openvino_omz()
model = omz.imageClassifier()
img = cv2.imread('resources/car.png')
res = model.run(img)
print(res)
# Example: res = [[479, 'car wheel', 0.5016654], [817, 'sports car, sport car', 0.31316656], [436, 'beach wagon, station wagon, wagon, estate... | 34.363636 | 198 | 0.719577 | import cv2
import open_model_zoo_toolkit as omztk
omz = omztk.openvino_omz()
model = omz.imageClassifier()
img = cv2.imread('resources/car.png')
res = model.run(img)
print(res)
# Example: res = [[479, 'car wheel', 0.5016654], [817, 'sports car, sport car', 0.31316656], [436, 'beach wagon, station wagon, wagon, estate... | 0 | 0 | 0 |
b94711acefa35c5a95689bfe650fc1cfad0db15c | 618 | py | Python | week11/examples/metaclass.py | HackBulgaria/Programming-101-Python-2020-Spring | 443446028df7fe78fcdd6c37dada0b5cd8ed3c93 | [
"MIT"
] | 30 | 2020-01-22T17:22:43.000Z | 2022-01-26T08:28:57.000Z | week11/examples/metaclass.py | HackBulgaria/Programming-101-Python-2020-Spring | 443446028df7fe78fcdd6c37dada0b5cd8ed3c93 | [
"MIT"
] | 1 | 2020-01-21T19:50:47.000Z | 2020-03-18T16:18:31.000Z | week11/examples/metaclass.py | HackBulgaria/Programming-101-Python-2020-Spring | 443446028df7fe78fcdd6c37dada0b5cd8ed3c93 | [
"MIT"
] | 7 | 2019-11-28T15:59:16.000Z | 2020-12-05T08:39:02.000Z | from class_decorators import debugmethods
b = B()
b.m()
| 15.073171 | 59 | 0.587379 | from class_decorators import debugmethods
class mytype(type):
def __new__(cls, name, bases, clsdict):
def m(self):
print(self)
print('in m')
clsdict['m'] = m
clsobj = super().__new__(cls, name, bases, clsdict)
return clsobj
class mytype2(type):
def __... | 324 | 41 | 190 |
ca4d798bbea04611785a378457e19cba2d83a20b | 2,378 | py | Python | network/MySourceFiles/tests/test_talkbackbot.py | dstack4273/new-coder_tutorials | 658344fdeca6ab3957dfe6646e5ac9b75ce07c94 | [
"Zlib"
] | null | null | null | network/MySourceFiles/tests/test_talkbackbot.py | dstack4273/new-coder_tutorials | 658344fdeca6ab3957dfe6646e5ac9b75ce07c94 | [
"Zlib"
] | null | null | null | network/MySourceFiles/tests/test_talkbackbot.py | dstack4273/new-coder_tutorials | 658344fdeca6ab3957dfe6646e5ac9b75ce07c94 | [
"Zlib"
] | null | null | null | from twisted.test import proto_helpers
from twisted.trial import unittest
from talkback.bot import TalkBackBotFactory
QUOTE = "Nobody minds having what is too good for them. ~ Jane Austen"
class FakePicker(object):
"""
Always return the same quote.
"""
| 34.463768 | 81 | 0.62069 | from twisted.test import proto_helpers
from twisted.trial import unittest
from talkback.bot import TalkBackBotFactory
QUOTE = "Nobody minds having what is too good for them. ~ Jane Austen"
class FakePicker(object):
"""
Always return the same quote.
"""
def __init__(self, quote):
self._quote =... | 500 | 1,534 | 76 |
b349c7b11298b71add2f551a38fd6c57bb8cfcdf | 642 | py | Python | exercise-2-templates/server.py | agdonovan98/web-programming | 210cc49943630364a2a5b1363c658a264966f807 | [
"Unlicense"
] | null | null | null | exercise-2-templates/server.py | agdonovan98/web-programming | 210cc49943630364a2a5b1363c658a264966f807 | [
"Unlicense"
] | null | null | null | exercise-2-templates/server.py | agdonovan98/web-programming | 210cc49943630364a2a5b1363c658a264966f807 | [
"Unlicense"
] | null | null | null | from bottle import route, run, template, debug
# http://localhost:8068/
@route("/")
@route("/hello")
@route("/hello/<name>")
debug(True)
run(host="localhost", port=8068) | 19.454545 | 46 | 0.412773 | from bottle import route, run, template, debug
# http://localhost:8068/
@route("/")
def get_index():
return "Hello!"
@route("/hello")
@route("/hello/<name>")
def get_hello(name="Santa"):
data = {
"holiday":False,
'people':[
{
"name":"Santa",
"title"... | 425 | 0 | 44 |