blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 69 | license_type stringclasses 2
values | repo_name stringlengths 5 118 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 63 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 2.91k 686M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 213
values | src_encoding stringclasses 30
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 2 10.3M | extension stringclasses 246
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
219affeadc09cfc97eeb506de2fe49c9cd484bc3 | e977a6175fb72ee47abb1b8087d059817460f9fb | /control/urls.py | 6713fd31c07c18bb54ae9d598d04364782dc2248 | [] | no_license | sanbond/youtube | b0234e81456607e020aeb02256e831dd34dffc52 | b6a542c2f061659de536c16c9b806cd0e599c21b | refs/heads/master | 2021-01-12T06:40:41.782399 | 2013-01-24T08:30:11 | 2013-01-24T08:30:11 | 77,410,830 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 122 | py | from django.conf.urls.defaults import *
urlpatterns = patterns('control.views',
url(r'^$', 'index', name='index'),
)
| [
"[email protected]"
] | |
39382fd79e7090be05bd74fab26cc30b09251711 | fbaf479c2ebddeee35f548d516a7adade35f64d5 | /csp/finite_set.py | caf92867d0bea8e3448b42584307c58f363d593d | [] | no_license | modelcheckutp/CSP-Z3 | 7b93b30c4525acd3cbdbf1b628ef44990a3d1015 | 94fd3735c239209f54ab8ad7af6b57f0e5c66b56 | refs/heads/master | 2020-03-20T14:33:23.908921 | 2018-06-28T22:10:39 | 2018-06-28T22:10:39 | 137,487,969 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,439 | py | ##################################################################
# The finite set theory based on BitVec
# Kun Wei 17/05/2017
##################################################################
from z3 import *
class FSetDecl():
def __init__(self, l):
self.alphabet = l
self.size = len... | [
"[email protected]"
] | |
62de88d56a77477d8991a96a5087929d2d3d2770 | 55d6de252e61c4b60688ebd8b1f637807acc1e7c | /usl_recived_forigin_purchased/models/inharitstockpicking.py | 0eebab826a9be7c89947980bd5f2d26cbf056f25 | [] | no_license | mosadiqit/eerna_erp_uslbd | b707a1d49a4fce7c1543b63e0120e8f9b77b26ce | 73e3994a9e32df7809d244eb6592513162ab7853 | refs/heads/main | 2023-06-30T14:53:04.837197 | 2021-08-04T11:30:46 | 2021-08-04T11:30:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,242 | py | from odoo import models, fields, api, _
from odoo.exceptions import UserError, ValidationError
from odoo.osv.osv import osv
from odoo.tools.float_utils import float_compare, float_is_zero, float_round
class StockPickingInharit(models.Model):
_inherit = 'stock.picking'
@api.onchange('commercial_invoice')
... | [
"[email protected]"
] | |
75f85c94fa15463111f270dbb6aaaac6ab4a7186 | 257564cbf0f0482428e029c9129b1fb3688aabab | /personal/views.py | 1c21b7e7f6eea830ff4e12c8b18c508be2462b4e | [] | no_license | ash018/mysite | d3c1516c66a27057b90911ec641ad0344edf25cd | 635872b7870baf6ac70415d0607eecbfe20c0fdf | refs/heads/master | 2020-09-15T22:41:26.750365 | 2016-09-23T08:48:15 | 2016-09-23T08:48:15 | 67,899,564 | 0 | 0 | null | 2016-09-10T23:36:16 | 2016-09-10T23:28:08 | Python | UTF-8 | Python | false | false | 311 | py | from django.shortcuts import render
from django.http import HttpResponse
def index(request):
return render(request,'personal/home.html')
def contact(request):
return render(request,'personal/basic.html',{'content':['If you like to contact call me @ 01681355216 Or mail me @ [email protected]']})
| [
"[email protected]"
] | |
95ea3a56c120bb0d2c831b76684d982b54b6c5aa | 68bad4b3d92872bb5b77b4ee503e588d20511a27 | /python/core/test_scripts_MPI/my_population_collect_spikes_mpi.py | ff1caea364466e952b5219ea999cbb2671552f87 | [] | no_license | mickelindahl/bgmodel | 647be626a7311a8f08f3dfc897c6dd4466fc0a92 | 78e6f2b73bbcbecd0dba25caf99f835313c914ee | refs/heads/master | 2023-08-29T13:57:04.122115 | 2022-02-11T14:28:23 | 2022-02-11T14:28:23 | 17,148,386 | 7 | 3 | null | null | null | null | UTF-8 | Python | false | false | 677 | py | '''
Created on Sep 22, 2014
@author: mikael
'''
import numpy
import pickle
import sys
from toolbox.data_to_disk import mkdir
from toolbox.my_nest import collect_spikes_mpi
from toolbox.parallelization import comm
print sys.argv
fileName, =sys.argv[1:]
fileName+='data'
s,e=numpy.ones(2)*comm.rank(),numpy.ones(2)*comm... | [
"[email protected]"
] | |
82e143ab368a2df624d5ba0dd94ba697a8484a59 | 59e87634c67508bf7eba8c8b9845354aefa57bc7 | /DL/yolo/YOLOV1/py_cpu_nms.py | 2ddfa1b49d7699c559417a89c11064070d65ca39 | [] | no_license | Caohengrui/MLAndDL | 48729b94b2232e628b699cf8d0d4a6c6e81a36f5 | d0637f58f45e9c091cd90bbfe9c207223d0994f3 | refs/heads/master | 2023-03-16T01:06:03.316463 | 2020-04-14T07:44:15 | 2020-04-14T07:44:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,060 | py | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
import numpy as np
def py_cpu_nms(dets,scores, thresh):
"""Pure Py... | [
"[email protected]"
] | |
4813c7d7b4d892a34cc126da8ba1f3ffa6323048 | 43137cc9b223b0ca13c547f8557e3cbc50de55f2 | /day07_函数基础/05-全局变量和局部变量.py | cd7428d318ddb32e29f73435f7a4576e42eb34a1 | [] | no_license | WeiPromise/study | fe60e0e89d03f640d21d7cc19d96f12677c6c6ed | 0b61bcdb98e869e6cba0c942ff9ee69868d8bf12 | refs/heads/master | 2023-01-08T17:23:43.554984 | 2020-10-23T07:08:32 | 2020-10-23T07:08:32 | 286,971,568 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 854 | py | #!/usr/bin/env python3.5
# encoding: utf-8
# Created by leiwei on 2020/8/18 15:39
a = 100 # 全局变量,整个python文件都可以使用
word = 'hello'
def my_test():
x = 'hello' # 局部变量,只能在函数体内可以用
print('x = {}'.format(x))
a = 10 # 如果局部变量名和全局变量同名,会在函数内部又定义一个新的局部变量
print('函数内部a = {}'.format(a))
# 通过global 对变量进行申明,... | [
"[email protected]"
] | |
c64bb122fa1b142b05e8315ac85b8ea4cec85786 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /gaussiana/ch3_2019_03_08_14_00_41_432668.py | 4bdc1e00e92765b8d5b29e95dceff6a7256f3781 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 292 | py | import math
def calcula_gaussiana(x, mi, sigma):
if (sigma == 1 and x == 0 and mi == 0):
return 0
if (sigma == 0 or sigma == - math.sqrt(2*math.pi) or sigma == 1/math.sqrt(2*math.pi)):
return 0
return (1/sigma*math.sqrt(2*math.pi))**(-0.5((x - mi)/sigma)**2) | [
"[email protected]"
] | |
7349470c11f971143cef89c6ff43f9c2f26917ed | faf9e9119deece79c97587935518965d036ab889 | /mysql2sqlite.py | d9ad1f186af6825883182b2cb0ca3ba167571138 | [] | no_license | hahanonym/mysql2sqlite | 5092ceb99a2c7d71559caa5d385e4af5322c1eff | b37f1e2ff0d96ddf2d4623679c785328171eb6a1 | refs/heads/master | 2021-05-27T11:23:23.631364 | 2009-08-03T02:04:51 | 2009-08-03T02:04:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,492 | py |
from optparse import OptionParser
import re
import os
__doc__ = """
This is a script that will convert a MySQL schema generated by say MySQLWorkbench into a schema that can be used for sqlite.
"""
__author__ = 'Jimmy John'
__version__ = '1.0'
ignore_list = [
r'SET @.*?\=@@(?P... | [
"[email protected]"
] | |
9eeb1275039275399a55eee9a0ae55d20a3de792 | 61a02aba5dde7c29ec65a87eb8a20af12d6c2b47 | /python basic/3118_최단경로2.py | ccce1ec174e94a7de53db843f1c74aeaad387cdd | [] | no_license | hksoftcorn/OfficialDocs | 0b4d0e2a71707e06ba7516e34ad176ee02726587 | cfd87d26efad484657f9493dead350cf0611a3e8 | refs/heads/master | 2023-06-30T07:09:33.641869 | 2021-07-31T14:35:28 | 2021-07-31T14:35:28 | 374,389,403 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 573 | py | V, E = map(int, input().split())
G = [[] for _ in range(V + 1)]
for _ in range(E):
u, v, w = map(int, input().split())
G[u].append((v, w))
visited = [False] * (V + 1)
dist = [0xfffffff] * (V + 1)
dist[1] = 0
p = [0] * (V + 1)
for _ in range(V):
u, min_key = 1, 0xfffffff
for i in range(1, V+1):
... | [
"[email protected]"
] | |
ed64e352839fee277680c8be39d3058c38d029a5 | d570fc2e36f0842605ad6e9dda3cbd4910160a07 | /src/webdav/Resource.py | 5b3121865ca3ace9d66cf08ff6f649d0b1b59b89 | [
"ZPL-2.1"
] | permissive | zopefoundation/ZServer | 8540fc7c411a7857abf4034068f75f2f1c7ba98c | eb047c795a278c22ae77f5af4284411e4689025e | refs/heads/master | 2023-06-21T20:54:53.580461 | 2023-02-10T09:43:55 | 2023-02-10T09:43:55 | 65,092,325 | 6 | 9 | NOASSERTION | 2020-09-17T07:25:50 | 2016-08-06T16:47:48 | Python | UTF-8 | Python | false | false | 27,157 | py | ##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS I... | [
"[email protected]"
] | |
9866afdf799b0295565428d97fc68db05e20462b | c5631592cf0d4512f0c6807d1c65613decc8e9de | /python/assign25.py | 1d7c01df5c58be33fc625b507df0d7e41e0d24d5 | [] | no_license | Iswaria-A/ishu | f676b5926a087721519cf5f5a7ac62a28b050a7c | b6139b060c046dd7df66e34403d4dd9889c9aa63 | refs/heads/master | 2022-10-28T20:40:48.745638 | 2019-12-13T13:25:01 | 2019-12-13T13:25:01 | 227,839,123 | 0 | 2 | null | 2022-10-11T22:49:12 | 2019-12-13T12:48:43 | JavaScript | UTF-8 | Python | false | false | 72 | py | f=open("text.txt","r")
print(f.readline())
print(f.readline())
f.close() | [
"[email protected]"
] | |
6f4373a988fbcd023ca39c1755c9d361c3e7daff | 2fd14347b7f43864d8153bd1c6d79198302d21ea | /ex.002 root finding/nr_problem_case.py | 3d33bede021e71d689a6e8c5cd4a3b1edf781a2e | [] | no_license | family9od/ECAre | 0fe27ff290eaa702c754fedef8953260a67592fc | ea875ea14be9d99a5e4f2191382e6eedc702b557 | refs/heads/master | 2020-06-17T02:33:30.651909 | 2016-11-15T07:45:31 | 2016-11-15T07:45:31 | 75,047,845 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 791 | py | # -*- coding: utf8 -*-
# 2010112033 이상형 9/20
"""
1변수 방정식의 근을 찾느 방법 중 Newton-Raphson method 를 사용하여
어떤 함수 g(x) 의 근을 찾고자 함
아래 예는 newton_raphson method 를 사용하기 곤란한 경우임
"""
# 1 변수 방정식의 근을 찾는 함수를 모아둔 rootfinding 모듈을 불러들임
import rootfinding as rf
def g(x):
# 근을 구하고자 하는 함수
return x ** 3 - 2 * x + 2
def dgdx(x):
... | [
"CAD Client"
] | CAD Client |
278be94dc86a4923595fc1db156514e63a55f1c3 | 9abc2f4fbf1b31b5a56507437b4a8d9c3f3db7e6 | /deals/migrations/0001_initial.py | 4a8460e46f0e4b39cc2b66694382c60ac4a670ac | [] | no_license | odbalogun/ticketr | e9fe8461d66dabe395f0e1af8fbecc67dbb16e97 | 94f24c82f407f861f1614a151feb3fdd62b283e5 | refs/heads/master | 2022-11-30T22:40:30.931160 | 2019-08-09T14:34:38 | 2019-08-09T14:34:38 | 188,833,600 | 0 | 0 | null | 2022-11-22T03:50:30 | 2019-05-27T11:50:07 | Python | UTF-8 | Python | false | false | 3,263 | py | # Generated by Django 2.2.1 on 2019-05-06 23:17
import deals.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MO... | [
"[email protected]"
] | |
59bc931f4d9c594bffb4ae94dd353787b17253da | 260e5b8cf73e588004aa91465ca27c4640b2fefa | /home/apps.py | e8cb57208a4be72a0b90e48f75f3308efd2b76ea | [] | no_license | pankajganjale/ev_monitoring | 049ce52542d23f0f96d9bcf6830aa4a7dc0d57c4 | fabb0474b13fdcafb9d5c988c4183ea512b82e7e | refs/heads/master | 2023-08-11T02:06:59.051463 | 2021-09-18T21:10:48 | 2021-09-18T21:10:48 | 407,947,158 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 195 | py | from django.apps import AppConfig
class HomeConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'home'
verbose_name = 'Vehicle Monitoring Parameters'
| [
"[email protected]"
] | |
0e895adcd0cb0e4e2c255048f116fcc2ff22f71d | a7984f7540977663ed1f4adf0495ed7f1079494e | /leetcode/python/deleteNode/deleteNode.py | fef0c105112a287cdf8e0280f4b69a10a46280c8 | [] | no_license | gddh/practice | 79947e6e6d8b42b811797df0ad4197a4fd46a45b | 31329c671425aca8cb3209fab063c1cb71c79104 | refs/heads/master | 2020-03-11T06:21:39.055854 | 2019-10-27T01:32:36 | 2019-10-27T01:32:36 | 129,827,720 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 664 | py | class ListNode(object):
def __init__(self, x):
self.val = x
self.next = None
def add_to_end(self, x):
while self.next:
self = self.next
self.next = ListNode(x)
def print_lst(self):
while self:
print self.val, "-->",
self = self.ne... | [
"[email protected]"
] | |
ea8907a72872f8e0b774d3c2247d83298774e8e9 | 239ac24a9ae640e7fc103c06995c84259b1f175a | /BACKEND/flask_server/app.py | 162b02688d5e7ddeaac178d8b207abb17501d6ad | [] | no_license | Rahul140799/SIH2020 | 268838feb3708ba561a0d141e6326afb83e2aaeb | ce8c56b1813fcc7b0db152638147d02c052d0630 | refs/heads/master | 2023-04-15T20:19:18.611375 | 2021-04-11T13:36:00 | 2021-04-11T13:36:00 | 356,876,943 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,303 | py | from __future__ import print_function
from flask import Flask, request, jsonify
import random
import string
from flask_socketio import SocketIO
import sys
import spacy
from spacy.matcher import PhraseMatcher
import en_core_med7_lg
async_mode = None
med7 = en_core_med7_lg.load()
app = Flask(__name__)
app.config['SECRE... | [
"[email protected]"
] | |
f5b78e2ea8e7564fb714ce45ca0de4086e5ae6c9 | 95ce1fc4a3432230603ddbdfad73346d270a47b1 | /command_manager.py | ec80dbcbdf7e595ef31c4fb848e370deb6e3a262 | [] | no_license | mfontanini/shaplim-gui | e45620594a8139e95625629b0f1084a7fab73798 | d1663b3d8dcad4dbb860021cc09611b5c1255ece | refs/heads/master | 2021-01-19T13:00:02.808429 | 2014-05-31T13:57:03 | 2014-05-31T13:57:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,595 | py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be usefu... | [
"[email protected]"
] | |
7d5b09b7c1f6d62b3cf5a4410be34cf296b3c832 | d3f559c122f2c0fea41d26a558859ef5ede8799c | /model_7_copy.py | 3c6feab6fff4320d1ebf9455b698d5934d060197 | [] | no_license | yifengyiye/PythonModels | df05c47e2f9085ee5c3a45f18da3b5c976ed8876 | 086212b2ef9f58830816dd8313de39c974bfcb3e | refs/heads/master | 2020-12-11T07:25:49.430579 | 2016-08-16T09:28:22 | 2016-08-16T09:28:22 | 48,640,691 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 189 | py | # coding: utf-8
"""
题目:将一个列表的数据复制到另一个列表中。
程序分析:使用列表[:]。
"""
a = [1,3,4,5,67,7,8,5,23,2,24542,2]
b = a[:]
print b | [
"[email protected]"
] | |
68bef6e78561193cc324512fb5675481762ef02e | 5146e0cd99e28d6a0d96a3680783bf194d8c656d | /lesson_016/weathermaker.py | 4ee89f802ae9f2744c1ebab132620e5455da6898 | [] | no_license | Yuri-prog/python_base1 | 78e2e7cc07ecf4d0e58f265b3970189a02b278ee | 3c69d24b87839e726dc35faa52401ce2704fb05b | refs/heads/master | 2023-02-26T16:09:14.758918 | 2021-01-11T10:37:35 | 2021-01-11T10:37:35 | 332,156,808 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,734 | py | import datetime
import requests
from bs4 import BeautifulSoup
today = datetime.datetime.today()
class WeatherMaker:
def __init__(self):
self.table_date = None
self.list_of_values = []
def take_list(self):
response = requests.get('https://meteoinfo.ru/forecasts/russia/moscow-area/mos... | [
"[email protected]"
] | |
ac07a53e15aef0bb493402d8d4c3712a747239bb | 3a6cbe6940b657ac6b608ce93d8d41ffeb6b9e65 | /rocon_python_comms/src/rocon_python_comms/service_pair_server.py | 8263080327cd5dc872bcd1d3fefb91715b3bd6bf | [] | no_license | robotics-in-concert/rocon_tools | cdfc4ccfc04b79262fb151640966a33bd0b5f498 | 1f182537b26e8622eefaf6737d3b3d18b1741ca6 | refs/heads/devel | 2021-01-17T01:58:12.163878 | 2018-02-06T15:20:29 | 2018-02-06T15:20:29 | 15,774,638 | 7 | 22 | null | 2017-08-16T06:39:47 | 2014-01-09T18:02:42 | Python | UTF-8 | Python | false | false | 6,195 | py | #
# License: BSD
# https://raw.github.com/robotics-in-concert/rocon_tools/license/LICENSE
#
##############################################################################
# Description
##############################################################################
"""
.. module:: service_pair_server
:platform: Uni... | [
"[email protected]"
] | |
eed3459302eac577610e47a166c838188d062b0d | 005a061a37e90b1ae644461fffcaef86a5072314 | /class/Collaborateur.py | b5714b3c703a347637239732fbedbd9d32634f25 | [] | no_license | BadzeGit/pythonDEV | 26b79675bfb292911d594114688ddcc1cabcd94c | 2a911e2622d8d8b73866c028738883ebbfe2f6e7 | refs/heads/master | 2020-03-21T22:08:20.418923 | 2018-07-02T05:56:25 | 2018-07-02T05:56:25 | 138,686,115 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,724 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from Entreprise import *
class Collaborateur(Entreprise):
def __init__(self, nom, prenom, poste, mail, telephone, informationCollab, raisonSociale, informationEntrep):
# Importation de la classe mère Entreprise
Entreprise.__init__(self, raisonSociale, inf... | [
"[email protected]"
] | |
91cd1d09cb66c6229b75a0e0c63d9b431a60af9b | ad76d4e3dc9b66108e0b0190c62496dbb67db6ab | /protos/raft_pb2_grpc.py | 5b843b74e966ddb7e7704e2b0fd772778910408c | [] | no_license | mgurdal/aioraft | 5a298f4ba81e73b5d8edfbe3e076d5c197dbb42a | 26d60eb2299d1e949c40092361d87da529bac3fb | refs/heads/master | 2023-07-26T09:21:36.331754 | 2020-04-17T12:02:08 | 2020-04-17T12:02:08 | 250,050,432 | 0 | 0 | null | 2023-07-05T21:01:00 | 2020-03-25T17:49:55 | Python | UTF-8 | Python | false | false | 2,252 | py | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import protos.raft_pb2 as raft__pb2
class RaftServiceStub(object):
"""RaftService implements the raft pipelining receiver.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
... | [
"[email protected]"
] | |
cf1a7a73139f8b463f88a8519060ed3c679bf328 | 8a320a21c9e672cdc9ae778e62435a6d8531baaf | /lib/core.py | 820d5d2ac54d693906aeb9184c5de2dc3dff0710 | [
"MIT"
] | permissive | stuz32/aws-waf | d90f3ebeb27936e6b9c7f92c86a498d054f6c1d0 | 5628b6c44216f562174864a22df191759bbde24a | refs/heads/master | 2021-01-18T12:15:37.978816 | 2016-07-06T15:18:45 | 2016-07-06T15:18:45 | 62,712,889 | 0 | 0 | null | 2016-07-06T10:31:32 | 2016-07-06T10:31:32 | null | UTF-8 | Python | false | false | 11,416 | py | # standard libraries
import argparse
import os
import urllib2
# 3rd party libraries
import boto3
import boto3.session
# project libraries
import lib.deepsecurity as deepsecurity
def get_arg_parser(prog='ds-to-aws-waf.py', description=None, add_help=False):
"""
Create a standardized argument parser
"""
if not... | [
"[email protected]"
] | |
a58d95ff10c64a986aefc8c3385661c66f156099 | 217817a8a701131ba911a2b27ef134f6fa90bbd1 | /routes.py | f57d5b050953c12771227c43dbb5f9824fcf5544 | [] | no_license | anemitz/sent | da17c4af6b2104f0042e9eeb14f0321c5c1d7d3a | 9cbfe07187bc2287177c8ed3ff57f9785892317e | refs/heads/master | 2020-05-20T19:31:38.109379 | 2015-04-10T06:39:10 | 2015-04-10T06:39:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,721 | py | import os
from flask import Flask, render_template, redirect, request, g, jsonify, url_for, Response
from flask.ext.sqlalchemy import SQLAlchemy
from sqlalchemy import and_, update, between
import model
from model import session
from datetime import datetime, date, timedelta
import json
import pytz
app = Flask(__name... | [
"[email protected]"
] | |
2dc557642b309a0f561939be02ff6f63ec04e811 | b591df88857448bba648e5b714bcf24dcccfd4c2 | /fauxcaml/tests/test_type_duplication.py | 6cb05495cd033d9baec74a437198830cbac6e34a | [
"MIT"
] | permissive | eignnx/fauxcaml | 09192cd5944e3d3cfb596f40b2d977679224800c | 082625f5803d6f676c0d63b6ce45b03a6069d720 | refs/heads/master | 2021-06-10T19:53:43.026369 | 2021-04-20T18:25:56 | 2021-04-20T18:25:56 | 170,390,725 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,320 | py | import typing
from fauxcaml.semantics import check, typ
def test_generic_var_duplication():
checker = check.Checker()
T = checker.fresh_var()
assert checker.duplicate_type(T) != T
def test_non_generic_var_duplication():
checker = check.Checker()
T = checker.fresh_var(non_generic=True)
asser... | [
"[email protected]"
] | |
eab651e6fb48a6e0b2d57a0c83266c24ae522a42 | aaca13b7e6640fe190eae8686193326afcb425df | /Game/Pieces/King.py | 09b48b3a5fc88a21e2af593e9c0daa13c9248b09 | [
"MIT"
] | permissive | AhmedAlzubairi1/Chess | c497811b689d15095f087fffb8595fc218637ec1 | c56c2549bf13538d89b001357f658ae04e5f3f8d | refs/heads/master | 2023-02-07T06:05:52.796482 | 2020-12-23T04:24:37 | 2020-12-23T04:24:37 | 294,804,119 | 2 | 2 | MIT | 2020-12-04T02:57:06 | 2020-09-11T20:17:22 | Python | UTF-8 | Python | false | false | 1,829 | py | from .piece import Piece
class King(Piece):
def __init__(self, board, color, group, row, col, game):
"""This is an init for a king piece. It creates the piece
:param board: A 2d list representing a board state
:type board: [list]
:param color: A string that is either 'BLACK' or 'W... | [
"[email protected]"
] | |
0e235e6cd34ad3ee7438817040fdec91048ac6ba | 7ea6c77b6135368438647a591ac975bc292cc6d1 | /benchmark/helper.py | b6fd85951fb1ba6ea2c8bee050fa8779ee39392d | [] | no_license | bunjj/Advanced-Systems-Lab | a8c3f7135fd9932c3842b956c3cb5c30f113db41 | 322897a6c52b9882444facf703811b1ed994171a | refs/heads/master | 2023-08-16T11:40:18.112675 | 2021-10-01T14:23:49 | 2021-10-01T14:23:49 | 412,495,195 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,360 | py | def vector(vec = [0,0,0]):
v = {}
v["x"] = vec[0]
v["y"] = vec[1]
v["z"] = vec[2]
return v
def camera(fov= 30, position = [0,0,0], rotation=[0,0,0]):
cam = {}
cam["fov"] = fov
cam["position"] = vector(position)
cam["rotation"] = vector(rotation)
return cam
def pointlight(positio... | [
"[email protected]"
] | |
60683c2d38937f8deb20ebb916a8f5c41457bf7a | 1a597ec7f4a295e98aa231ad615dc5b03a17ef26 | /Regression/Random_Forest_Regression.py | ae87949dc47ed487ce7af60f70ba40ea46ca0218 | [] | no_license | GrismPatel/Machine_Learning_Python | 9039fdf946e2a24d6194f21b4308c38e381c2ec1 | f6e22600b052cffd00101a01f69127042005ef40 | refs/heads/master | 2021-01-20T15:54:31.055806 | 2018-01-30T01:47:40 | 2018-01-30T01:47:40 | 90,802,494 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 664 | py | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
dataset = pd.read_csv('Position_Salaries.csv')
x = dataset.iloc[:,1:2].values
y = dataset.iloc[:,2].values
from sklearn.ensemble import RandomForestRegressor
a = RandomForestRegressor(n_estimators = 300,random_state = 0)
a.fit(x,y)
y_... | [
"[email protected]"
] | |
e782b2c1446761dd990e12e9c4a8b49355234b7d | 4d2a2f58640d62c32515fc6c345c28e2b3c47b14 | /app/server.py | 7071ad0723596265f5c2021cfa16031b17c57e08 | [] | no_license | teamhide/fastapi-boilerplate | 3ae3912e6704d06d7a1188588b1186ee02ac85a4 | 21ecdc5267dfdbe52720834b84b74c12a67997e8 | refs/heads/master | 2023-05-02T20:54:41.676027 | 2022-12-21T11:31:29 | 2022-12-21T11:31:29 | 248,507,413 | 686 | 123 | null | 2023-04-24T09:21:46 | 2020-03-19T13:15:06 | Python | UTF-8 | Python | false | false | 2,506 | py | from typing import List
from fastapi import FastAPI, Request, Depends
from fastapi.middleware import Middleware
from fastapi.middleware.cors import CORSMiddleware
from fastapi.responses import JSONResponse
from api import router
from api.home.home import home_router
from core.config import config
from core.exceptions... | [
"[email protected]"
] | |
993c86a8e53dcca1a61c43c777025674007a7e5a | 2f646730fee2338c96ec832cb4c8c2b0cf38d57d | /proctor/filter_set.py | 6f611fdac9d1a7cc31ac52d2a654a47a7c61abad | [
"MIT"
] | permissive | jtallieu/proctor | 0d63927b64d0cfe59e863e5e1986bf25dc30e7d4 | 664e5faf8d2883cf6ca4d9ec2150c2e90a8f4468 | refs/heads/master | 2020-03-21T02:48:13.099928 | 2019-03-09T10:23:00 | 2019-03-09T10:23:00 | 138,020,255 | 0 | 0 | MIT | 2019-02-17T10:29:21 | 2018-06-20T10:57:31 | Python | UTF-8 | Python | false | false | 3,414 | py | import operator
class Filter(object):
"""
Filter class to filter on properties of a dict.
Arguments: property, op, value
Will type the existing value of the dictionary
property and attempt to coerce the compare value
to the property's value type.
"""
COMP_FUNCS = {
'like': l... | [
"[email protected]"
] | |
20f92f2a34229092dedc98eed07107c4c1f9838e | 02ac11f6e39459e3295751b3b0823f1325206603 | /compiler/compiler_benchmark.py | eb895b337c0ae39f46ca3d5a127a3277d076413c | [] | no_license | rum-yasuhiro/experiments_crosstalk_multitasking | c04ece332063daa55e9ceb1fa8e7f031f897cac8 | 387a8c2563058999d704924722ba9e99f44efdad | refs/heads/master | 2023-07-13T00:08:22.354670 | 2021-08-23T06:45:35 | 2021-08-23T06:45:35 | 290,391,781 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,754 | py | from qiskit import IBMQ, Aer
from experiments.compiler.execute import run_experiments
from experiments.error_info_converter import value_to_ratio
from experiments.utils import pickle_dump, pickle_load
class CompilerBenchmark:
def __init__(self, backend_name=None, fake_device=None, reservations=False):
IBM... | [
"[email protected]"
] | |
922d5e1fc8f30798c9af755861ec09cd9b964b77 | 14cc1ab99bc426bd7eff8bd4bea86f7ece176978 | /problems/longest_common_prefix_014/solution_2.py | b65080c14de621f90f034b158a388d21d63cdfea | [] | no_license | x1He/leetcode_practice | 95fc450dd1cff614866811fd0c3ce723241a19c8 | 40d541255196fcfe79ada00d08a91e416138f9b0 | refs/heads/master | 2020-04-09T06:39:51.456091 | 2019-07-15T00:48:36 | 2019-07-15T00:48:36 | 160,121,967 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 383 | py | class Solution:
def longestCommonPrefix(self, strs):
"""
:type strs: List[str]
:rtype: str
"""
if not strs:
return ""
else:
count = 0
for i in zip(*strs):
if len(set(i)) > 1:
return strs[0][:count... | [
"[email protected]"
] | |
b812740b37900b34544b586bf0a3e7b1acb08cd5 | e88db6bb162aa9273b06c9a4359ed954c5a76964 | /spider_selenium/views/MyWin.py | b29a4e19aaafd6efe1699aaee7c7380e1963f642 | [] | no_license | konghirt/spider_mys | 38544396fb5c0197fa047bd300e2b8d77fd5c188 | 2b4595173271bfce214b22e2af69b6bf1e8bb744 | refs/heads/master | 2023-02-04T00:38:28.512146 | 2020-12-19T10:06:36 | 2020-12-19T10:06:36 | 317,728,675 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,738 | py | import sys
import os
from PyQt5.QtWidgets import QMainWindow, QApplication, QFileDialog
from PyQt5.QtCore import pyqtSlot
from datetime import datetime
import time
import requests
import re
from views.MainWindow import Ui_MainWindow
from utils.mihoyoEnum import *
from script.spider_mihoyo import SpiderMihoyo
class Mai... | [
"[email protected]"
] | |
356dd57758e9dcb98c6585c8808c5cad720dc373 | 403d8ad07b39b785397c846ab7bb72a8edae9c3f | /Address.py | 68648c25c2d2a80dbab121c1a5c0325c75d48f40 | [] | no_license | AoiKujira/CNproject | cf9019c2b0eb2ebda180eb13830df9be80732ad2 | 3623c6bf89f803128cc17ec0d5a945f8580a90a7 | refs/heads/master | 2023-06-20T15:24:16.267782 | 2021-07-20T03:38:58 | 2021-07-20T03:38:58 | 386,186,470 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 158 | py | class Address:
def __init__(self, host: str, port: int, identifier: int):
self.host = host
self.port = port
self.id = identifier
| [
"[email protected]"
] | |
40df1841df3d2850f8c6be1e8b440414dad3967a | 5f439ed55b85615d9ded137b0b9f76d0ddfa7190 | /project6/s1.py | 8c413a6615259fc86cf0ba494cd77d60c3ec8838 | [] | no_license | OleksandrBieliakov/miw | 48e8c253e927cff2910d00c0837007cb50d2869a | a180d7341e7e41a563e22342098f492c939e0e94 | refs/heads/main | 2023-05-14T01:34:58.298264 | 2021-06-06T19:01:20 | 2021-06-06T19:01:20 | 347,735,555 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,187 | py | from keras import layers
from keras import models
model = models.Sequential()
model.add(layers.Conv2D(32, (3, 3), activation='relu', input_shape=(28, 28, 1)))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(64, (3, 3), activation='relu'))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(64... | [
"[email protected]"
] | |
d4003466ce2310a0e55df241b52060605e731742 | 95707c6481c8aa7be8326bd763132ab7d67c7229 | /solution/producers/models/producer.py | 5a74c19bff4c45dc5e8db26e3c8b970d82f54c8e | [] | no_license | yogesh17/Optimizing-Public-Transportation | 8a08e0005d7b107e66e5c3e7d32efb024ef7e81d | eeb4db4a9b7271d297e002222956accfa44fa593 | refs/heads/master | 2023-08-21T14:30:47.432196 | 2020-08-02T13:53:23 | 2020-08-02T13:53:23 | 284,468,813 | 0 | 0 | null | 2023-08-14T22:10:25 | 2020-08-02T13:38:48 | Python | UTF-8 | Python | false | false | 3,907 | py | """Producer base-class providing common utilites and functionality"""
import logging
import time
from confluent_kafka import avro
from confluent_kafka.admin import AdminClient, NewTopic
from confluent_kafka.avro import AvroProducer
logger = logging.getLogger(__name__)
SCHEMA_REGISTRY_URL = "http://localhost:8081"
BR... | [
"[email protected]"
] | |
9ae009652986c6b459f9d867a41a6f768070ebda | e28ce5cca66c56ee7446a46e18375430d0d404eb | /toys/12_go/gopy/go/location.py | 3b4f56c0d82834ba26f9afa924ca8d0bbcdfb3a8 | [
"MIT"
] | permissive | git4robot/PyKids | 4fb60c5b107527336d9e686a98988ba7a8354f31 | 866e45e13171322ad1892d604508cfee9f8086c8 | refs/heads/master | 2020-04-17T20:45:26.741363 | 2020-04-14T02:21:55 | 2020-04-14T02:21:55 | 166,919,523 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 665 | py | from go.utils import bold
class LocationError(Exception):
pass
class Location(object):
TYPES = {
'black': bold('*'),
'white': bold('o'),
'empty': '.',
}
def __init__(self, type):
if type not in self.TYPES:
raise LocationError('Type must be one of the foll... | [
"[email protected]"
] | |
4be1a74484158c614d1bc32607a891d1931f5e2c | 10f1620a694ba283ce64e16d40b77cf4b51e90a8 | /dataProcessor.py | 06d86d6c73f79801fecf2fad314c6a88d7c57db8 | [] | no_license | pandeyGCt/Reliablity-over-UDP | 429653b57a047c081f962b7639cbba0b3ebcaa7e | 1ab95ec21ccdc40c528a11ed7f587cbaf9dd4909 | refs/heads/main | 2023-06-07T19:29:06.340277 | 2021-06-28T16:37:33 | 2021-06-28T16:37:33 | 381,097,741 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,683 | py | '''
Saksham Pandey 2018A7PS0259H
Vanshaj Aggarwal 2018A7PS0309H
Arpit Adlakha 2018A7PS0250H
Surinder Singh Virk 2018A7PS0234H
Aditya Sharma 2018A7PS0315H
'''
import struct
import socket
from array import array
def myCheckSum(data):
if len(data) % 2:
data += b'\x00'
s = sum(array('H',data))
s = (s &... | [
"[email protected]"
] | |
25dd2d1ba4f36e6b14892f071c138d1675b53d69 | 241cfe341c3f661d95e78b628cb186f6d224401c | /models/order.py | 5e22ba0865fbe9ba3c0996c98f27f9ec5eb97984 | [] | no_license | gin0i/TradeServices | 8b559318eedacf71dbd665e917ea98442512fd15 | 9ef4bc4a1cb74b65f9dde1c70c7d80e903b4a719 | refs/heads/master | 2020-04-16T13:03:08.664071 | 2019-01-14T06:39:09 | 2019-01-14T06:39:09 | 165,608,566 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,043 | py | from sqlalchemy import Column, Integer, String, DateTime, Float, TIMESTAMP
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
from config import postgre
engine = create_engine('postgresql+psycopg2://'+postgre.user+':'+postgre.password+'@'+postgre.db, pool_recycle=3600)
Base = ... | [
"[email protected]"
] | |
3732f226a3b4b5005ef4762aeffa21e675e5ee05 | 7443848b72277645c3c0cc9e88e404961a41daf5 | /stream/rtsp_player.py | 0042aecddc4d0e7774e2ae43a0459c63f57def82 | [] | no_license | alborzjafari/RTSP_Player | f57e2329c0b5d183e5dcd346d0e7084da1dc8a01 | e3c5525c8562d544b47254c53c5a116f9f13d9a5 | refs/heads/main | 2023-03-05T10:21:16.098756 | 2021-02-13T21:25:33 | 2021-02-13T21:25:33 | 338,671,725 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,664 | py | import gi
gi.require_version('Gst', '1.0')
gi.require_version('GstVideo', '1.0')
from gi.repository import Gst, GstVideo, GstBase
Gst.init(None)
from . import utils
class RtspPlayer:
"""
Streams media from RTSP source.
This class can display media from the source and take snapshot.
"""
def __i... | [
"[email protected]"
] | |
1a2e459516d17e76c8e8efc32ea7d2d1db94e6e0 | 55b514a04ee65b5369e4b1ec4a7b5e14fb673e80 | /tests/project/views.py | 5b2b24761de964cf05b4dee8c22cf043ae149255 | [
"MIT"
] | permissive | maximilianhurl/bravado-django-test-client | 04bf8ad27f89f0cddeba18a5baaa0441604b0959 | f2c0eb21403bdda5906df3b5a84bc5b8b963ee51 | refs/heads/master | 2022-06-17T04:44:19.929932 | 2021-01-21T23:10:31 | 2021-01-21T23:10:31 | 171,361,600 | 3 | 0 | MIT | 2022-04-22T21:01:54 | 2019-02-18T21:53:32 | Python | UTF-8 | Python | false | false | 1,255 | py | from uuid import uuid4
from django.http import JsonResponse
from rest_framework.decorators import api_view
from rest_framework.response import Response
def get_params_view(request):
return JsonResponse({
"paramInt": int(request.GET.get('paramInt', None)),
"paramString": request.GET.get('paramStri... | [
"[email protected]"
] | |
09076400f64c690beed02e2cada86f7b9df12e19 | 4efe1c3417294a1b47da0827e1b7d071622874ef | /day12/solution.py | 33cb61ba888dfb4f694197efd20057f8df73dd16 | [] | no_license | kmamykin/adventofcode2019 | e73017d94904d8dccdd99f45a9ed37b04071cfc2 | 9815a62212df4885a2a7185abef298101eaa29f1 | refs/heads/master | 2020-09-25T03:45:11.854490 | 2020-01-05T08:27:24 | 2020-01-05T08:27:24 | 225,910,212 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,843 | py | import math
from dataclasses import dataclass
from enum import Enum
from itertools import combinations
from functools import reduce
from datetime import datetime
@dataclass
class Point3D:
x: int
y: int
z: int
def __add__(self, other):
return Point3D(self.x + other.x, self.y + other.y, self.z ... | [
"[email protected]"
] | |
75204bbfc5d050883078af710ce97469e69c1335 | a089fab4b0e363ba48bff57b3948c32172570e8f | /home_connect_sdk/models/__init__.py | 311a2dad6bac50ae69888c78797c9a6745803fa0 | [] | no_license | jeroenvdwaal/home-connect-sdk | ed2e44a01b72d64d17d41af8400eb2e42792232c | 3c0ab6791bb0e9df95154f8f177d889ebef0c749 | refs/heads/master | 2022-04-23T01:20:32.621570 | 2020-04-26T09:40:16 | 2020-04-26T09:40:16 | 255,988,008 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,060 | py | # coding: utf-8
# flake8: noqa
"""
Home Connect API
This API provides access to home appliances enabled by Home Connect (https://home-connect.com). Through the API programs can be started and stopped, or home appliances configured and monitored. For instance, you can start a cotton program on a washer and get... | [
"[email protected]"
] | |
e22da16a3630862721200de043c23202f838489d | e906fe8237e5b55b7bef1f7a87884c5924ccd8b1 | /contactmps/migrations/0024_committee.py | b8cb77c7198df94f7b6f8955173bff4743b0fb99 | [
"MIT"
] | permissive | OpenUpSA/contact-mps | ac9a88ef166769d6305e213f3d77191f385c962a | 63d7f86e1b6c9319a4d0344a6125cd22770f34c7 | refs/heads/master | 2022-12-11T07:22:20.942567 | 2020-01-15T13:11:59 | 2020-01-15T13:11:59 | 93,042,651 | 0 | 2 | MIT | 2022-12-08T02:08:08 | 2017-06-01T09:52:56 | JavaScript | UTF-8 | Python | false | false | 894 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2018-05-14 15:42
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contactmps', '0023_campaign_include_link_in_email'),
]
operations = [
migra... | [
"[email protected]"
] | |
8da660f070b07b415bccb53e3e24e567578e7032 | c7dd8ff40f2df2adf10a48e3a9de1009bdce228e | /findAndCopyScript.py | 70f3e6f54c758dcdbff038fd5396170a16e0c86e | [] | no_license | KateKapranova/Scripts | 1dec6a83beba56120c22b60c8e2b49e6ea4623f1 | 567b144af9eb202af82036b6fd08e4ed6e66cba6 | refs/heads/master | 2020-05-01T02:05:31.013713 | 2019-03-24T21:21:07 | 2019-03-24T21:21:07 | 177,210,335 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 658 | py | #script to iterate over files in subdirectories to find specific file names
#files satisfying the search query are copied into the destination folder
#for Windows OS
import os
from shutil import copy
directory="C:\\Users\\Kapranova\\Documents\\KDEF_and_AKDEF\\KDEF"
dst= "C:\\Users\\Kapranova\\Documents\\KDE... | [
"[email protected]"
] | |
6e912f44afec75e11cbc6a6f8420b0786814f200 | 4e0f96da38a9b08164c1798e1f959287a67a8e76 | /Graph_Testing/plot_noise_data.py | a4a99c0f4ac78e03fbb15e0337154149af64e61a | [] | no_license | dlevenstein/SOSpikingModel_Nest | 899c090e6ee64df6d7e269191b00df038a5ab4ae | abeed3f70b87249acb0fa250a90112d0b933eb25 | refs/heads/master | 2021-06-13T19:57:32.250912 | 2017-03-09T23:42:49 | 2017-03-09T23:42:49 | 67,539,355 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 939 | py | import csv
import matplotlib.pyplot as plt
import numpy
csv_file = open("Noise_Data.csv", "rb")
data = csv.reader(csv_file, delimiter=",")
mean_spike_list = []
for line in data:
line_data = []
for l in line:
line_data.append(numpy.float64(l))
mean_spike_list.append(line_data)
print(mean_spik... | [
"[email protected]"
] | |
cbda399e17220661d757ad64e8c6819db3fb5ed9 | c4bf0642b02a60b17a12c7daa97d54391ef9d752 | /drf_auth/settings.py | 7c9158ab8365930be49312cb978728007cecf85a | [
"MIT"
] | permissive | yurttav/django_rest_authentication | ce16855a3f7999109210addb995a0123f7dfff2e | f5f31ec9193dbba6d6419d5969127754f0d1a8e8 | refs/heads/main | 2023-07-01T11:51:59.980769 | 2021-08-12T16:58:17 | 2021-08-12T16:58:17 | 395,387,683 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,546 | py | """
Django settings for drf_auth project.
Generated by 'django-admin startproject' using Django 3.2.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from corshe... | [
"[email protected]"
] | |
da3610c3294ce12848a64eefb746c8bed8a6b374 | 5b9fe71c2efe0139205020b038f7d31b6a5ede87 | /lux/utils/debug_utils.py | 14ffa3a4d570fe5723c5243d4bc0143a0f6285ba | [
"Apache-2.0"
] | permissive | lux-org/lux | 7a7c8534eec5d2b2114b1a95e64497cf9b52871a | 972e5ec24991483370dda67de6bb1e354bcf8ca6 | refs/heads/master | 2023-08-21T04:05:51.279103 | 2023-07-04T23:34:35 | 2023-07-04T23:34:35 | 232,480,726 | 4,811 | 377 | Apache-2.0 | 2023-07-12T17:45:37 | 2020-01-08T04:53:29 | Python | UTF-8 | Python | false | false | 6,852 | py | import json
from pathlib import Path
import re
import subprocess
import typing as tp
import re
import subprocess
from typing import Optional
def show_versions(return_string: bool = False) -> Optional[str]:
"""
Prints the versions of the principal packages used by Lux for debugging purposes.
Parameters
... | [
"[email protected]"
] | |
3e865ff8ba54efeccf0945858bdb43e9be54a743 | 837762524db70b805fbf46f62a14be32e32dabd9 | /scripts/train.py | df35cdfb4e3c068ebba443e31d700f6c49358b2b | [
"Apache-2.0"
] | permissive | jordancaraballo/nga-deep-learning | 832e54afb978a84875d1c09a7c00055e698f2a7b | 752266ccc06efacdef2423214998ecfced7eafb7 | refs/heads/master | 2023-06-30T14:39:49.448265 | 2021-07-27T20:00:52 | 2021-07-27T20:00:52 | 343,627,410 | 23 | 4 | null | null | null | null | UTF-8 | Python | false | false | 5,992 | py | # --------------------------------------------------------------------------
# Preprocessing and dataset creation from NGA data. This assumes you provide
# a configuration file with required parameters and files.
# --------------------------------------------------------------------------
import os # sys... | [
"[email protected]"
] | |
29fd9997d18f422931eee8bd66197d7ff7608426 | 4ce7dffa293abec5127a1674df266f003fc92677 | /program-files/hauptfenster.py | f303236b96596989cb2e9e41533c75322443d1d5 | [] | no_license | kleintk/MeinTestRepo | ac2c723b97f6bf276ca051846c5ae31138fbe47c | 3df80f9cb446aa9420c8f160e43fe719f18375de | refs/heads/master | 2021-01-23T06:39:02.506774 | 2014-01-17T17:38:49 | 2014-01-17T17:38:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,187 | py | # -*- coding: utf-8 -*-
#gehoert zum programmAdressbuch.py
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import (QAction, QApplication, QFileDialog, QMainWindow, QMessageBox, QTextEdit) #hinzufuegen!--------------------
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWin... | [
"[email protected]"
] | |
419a6d2869390efda11068d061ee37ee55733dac | f9fcdc80c634d651bde314820c0d3286e5743f4f | /python/day5.py | e6f30b88af83f775f5a473b7632e9d26bad17306 | [] | no_license | TamTran72111/aoc-2020 | a5073a40f85f988f1f8d86ccbbde95f3059ad0d2 | 960889b52ef4f55f5773f1939b9c509e80928374 | refs/heads/main | 2023-02-16T21:07:08.657125 | 2020-12-25T15:50:03 | 2020-12-25T15:50:03 | 320,088,818 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 789 | py | from utilities import read_lines
binary_values = {
'F': '0',
'B': '1',
'L': '0',
'R': '1'
}
def convert_id(boarding_pass):
for key, value in binary_values.items():
boarding_pass = boarding_pass.replace(key, value)
row = int(boarding_pass[:7], 2)
col = int(boarding_pass[7:], 2)
... | [
"[email protected]"
] | |
f4d1e396f6b6423541a2c069f47460728dcacd1c | d9f065b24e5387ee71bd236e1dff298dfa02f60c | /nba/features.py | d8d34041a2ced3d6e09ee0f4f589e019e1a8e3b0 | [] | no_license | laimis/gamepredictions | 40972ca04f8161d7a6769bd99c06b0d1a9c06db3 | fb4bb312fa4160602b38336f1b3b0b8c03f88f9d | refs/heads/master | 2020-04-01T06:49:18.483387 | 2019-06-09T01:30:12 | 2019-06-09T01:30:12 | 152,965,209 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,368 | py | import nba.domain as domain
from typing import List
tracked_stats = ["wins", "scored", "allowed", "date", "fg%", "tp%", "ft%", "rebs", "assists", "turnovers", "streak"]
GAMES_TO_ROLL = 20
STREAK_NUMBER = 10
def get_label_column_names():
return ["year", "date", "counter", "away", "home", "home_win"]
def get_feature... | [
"[email protected]"
] | |
c275d436f6f6dec21e35cd80e4f9de92952b5921 | 325c97b94b84f54df18c0a770bbf90cb2cd87186 | /pc/gui/image_viewer.py | a5914c19088dcd8cdd1b0c858adc35e49a7797af | [] | no_license | alexbaraker/DroneGui | c289716e1a61ec1795017529148b8a7f1d1fcedb | 0945567dd0c0d4ed0d59cf0e492f039efa733246 | refs/heads/master | 2020-06-20T12:06:24.679541 | 2019-07-23T18:11:23 | 2019-07-23T18:11:23 | 197,117,217 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,563 | py | #######################################################################################################################################
# By: SupremeDrones Team; Alex Baraker, Dean, Kelsey, Hammad
# Date: 3/06/2019
# Info: Widget for displaying loaded image
########################################################... | [
"[email protected]"
] | |
b67056872a7437bd215bbd55010776a5e3c4c513 | 85a9ffeccb64f6159adbd164ff98edf4ac315e33 | /pysnmp-with-texts/DECHUB900-HRIP-MIB-V3-0.py | 4affb4dd03a0dfee8d6e74ef3a888a878b9e33bf | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | agustinhenze/mibs.snmplabs.com | 5d7d5d4da84424c5f5a1ed2752f5043ae00019fb | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | refs/heads/master | 2020-12-26T12:41:41.132395 | 2019-08-16T15:51:41 | 2019-08-16T15:53:57 | 237,512,469 | 0 | 0 | Apache-2.0 | 2020-01-31T20:41:36 | 2020-01-31T20:41:35 | null | UTF-8 | Python | false | false | 11,491 | py | #
# PySNMP MIB module DECHUB900-HRIP-MIB-V3-0 (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DECHUB900-HRIP-MIB-V3-0
# Produced by pysmi-0.3.4 at Wed May 1 12:37:38 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 ... | [
"[email protected]"
] | |
43897fd79e93876b6bb01c316ff69f8ac715aa83 | 4de0c6d3a820d7669fcef5fd035416cf85b35f23 | /ITcoach/爬虫课件/第三章:数据解析/6.xpath解析案例-58二手房.py | d01d163b95860803cf0863b3b681c3a5e230439b | [
"AFL-3.0"
] | permissive | ww35133634/chenxusheng | 5e1b7391a94387b73bcd7c4d12f1247b79be8016 | 666e0eb3aedde46342faf0d4030f5c72b10c9732 | refs/heads/master | 2022-11-12T03:46:47.953680 | 2020-07-02T20:50:56 | 2020-07-02T20:50:56 | 275,168,080 | 0 | 0 | AFL-3.0 | 2020-07-02T20:58:37 | 2020-06-26T13:54:48 | HTML | UTF-8 | Python | false | false | 800 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import requests
from lxml import etree
#需求:爬取58二手房中的房源信息
if __name__ == "__main__":
headers = {
'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36'
}
#爬取到页面源码数据
url ... | [
"[email protected]"
] | |
8fa3d155dfb3ad674ecdfb942b55ba95f138f59b | f1efa3f00d06a12e4bce5ac8742dbe45a82d8553 | /MarkovModel.py | 6d62ff7cd5d4793627aceef34b8fe720772324c0 | [] | no_license | kd536/HPM573S18_DESOBRY_HW10- | 655ac942f00ea221181e069ce0f4835a0472d8e2 | 9b9e643700b292e626f1b494767a50bbbe3f32b5 | refs/heads/master | 2020-03-11T11:55:17.486633 | 2018-04-18T03:46:57 | 2018-04-18T03:46:57 | 129,982,493 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,071 | py | import scr.SamplePathClasses as PathCls
import scr.StatisticalClasses as StatCls
import scr.RandomVariantGenerators as rndClasses
import ParameterClasses as P
import InputData as Data
# patient class simulates patient, patient monitor follows patient, cohort simulates a cohort,
# cohort outcome extracts info f... | [
"[email protected]"
] | |
81f7ea6ba42d4ee18d39650fa7de3474ed999af4 | f656bae2f0fbfe58a980612729b7a54dba7b9873 | /4. Información_celular.py | 0f5d1b0dd232c2ebad3d7871a9446fcbd3368c91 | [] | no_license | neamedina73/Ejercicios_java | a5715ed4deb638c0e0e700f02aee8bd7a24b596e | 427cf54d241945d15a1f05bfbffcdcb4431d86de | refs/heads/main | 2023-05-31T18:24:12.873844 | 2021-07-03T00:30:34 | 2021-07-03T00:30:34 | 382,456,483 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,146 | py | # -*- coding: utf-8 -*-
"""
Created on Wed Jun 9 09:39:41 2021
@author: Alejandro AJ
"""
class celular:
def __init__(self, marca, modelo, tamaño, color, peso):
self.marca = marca
self.modelo = modelo
self.tamaño = tamaño
self.color = color
self.peso = peso... | [
"[email protected]"
] | |
3652f4d252652605a8f6ef2c32218b505955d203 | 627094b5e463bd113f626450eaceb01dfa4ff5d5 | /test/client/test_link_control.py | 0e4014b88ba456056e0e54eef493cfb4f701e752 | [
"MIT"
] | permissive | DaleChen0351/python-udsoncan | 49eefcb299e2a4fabe0bf168905cc86ef43d6f62 | c495e872c69c4ea05e3b477d2a1088cb83167a17 | refs/heads/master | 2020-04-20T06:10:25.252315 | 2019-03-28T07:38:17 | 2019-03-28T07:38:17 | 168,675,483 | 0 | 0 | MIT | 2019-03-28T07:38:19 | 2019-02-01T09:42:02 | Python | UTF-8 | Python | false | false | 6,890 | py | from udsoncan.client import Client
from udsoncan import services, Baudrate
from udsoncan.exceptions import *
from test.ClientServerTest import ClientServerTest
class TestLinkContorl(ClientServerTest):
def __init__(self, *args, **kwargs):
ClientServerTest.__init__(self, *args, **kwargs)
def test_linkcontrol_verif... | [
"[email protected]"
] | |
8d838ad1b17dd0480a189e316ae027e1fd5cb5b4 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /LR98GCwLGYPSv8Afb_1.py | 51545319e53c872c2a1520d669972a99be80e25f | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 77 | py |
def pluralize(lst):
return {i+'s' if lst.count(i)>1 else i for i in lst}
| [
"[email protected]"
] | |
b622abf6e9bd923f0a07424838136f259defe243 | ffe56a49385b88136a9e8c3a1f90d441c93713a2 | /meiduo/meiduo/apps/orders/admin.py | 87b96ff227b5e90568f1cdaf094dcfe3dd95f2ff | [] | no_license | Jeffrry1828/Django | e51f5208531f006bf77d667db2ccffcb2ec02a03 | 995739ad6c1fba8053253087b2fd809f4d6487ec | refs/heads/master | 2022-10-09T03:40:08.076066 | 2020-06-06T14:53:17 | 2020-06-06T14:53:17 | 270,010,693 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 124 | py | from django.contrib import admin
from .models import OrderInfo
# Register your models here.
admin.site.register(OrderInfo)
| [
"[email protected]"
] | |
83abbe58f6fc2055852b647c54c5920e08777d4d | c214a3d6fbfddcb5473e4499b948e24c367f6746 | /Cesear.py | ef4797181e8b727e7ce883f4c4b52fded4e00460 | [] | no_license | kamouzougan/Cybersecurity | ff2d8df944e2f3513bd4dbd84a5e4e1612dac29e | c6b1a2c21753d1f1a07fb1a1ace3c64cbbe41205 | refs/heads/master | 2020-05-05T08:54:43.947649 | 2020-04-09T11:30:46 | 2020-04-09T11:30:46 | 179,883,232 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,497 | py | MAX_KEY_SIZE = 26
def getMode():
while True :
print("Do you wish to encrypt or decrypt a message?")
mode = input().lower()
if mode in 'encrypt e decrypt d'.split():
return mode
else :
print('Enter either "encrypt" or "e" or "decrypt" or "d".')
de... | [
"[email protected]"
] | |
54b9938a700d226aff9ff94b59ef75f55ad138e6 | 97dfcdff827fb2dd1d4cf60ebbc65bbffb0f3104 | /np2img.py | 16d9510521c141ed31e665e182b85404fad99150 | [] | no_license | erynet/NpyTool | 25e4fb8292b819979661780a9087c1bc3ab49135 | 255ba11a7a8a65418daa13aebb426e491b0ece73 | refs/heads/master | 2020-12-31T07:33:12.306949 | 2016-05-02T09:32:47 | 2016-05-02T09:32:47 | 56,485,952 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,401 | py | # -*- coding:utf-8 -*-
import sys, os
import multiprocessing
import imp
imp.reload(sys)
sys.setdefaultencoding("utf-8")
import time
import argparse
try:
import ujson as json
except ImportError:
import pip
pip.main(["install", "ujson==1.35"])
import ujson as json
from lib import CatParser, Log
c... | [
"[email protected]"
] | |
e13a56c1c1103c1f2e330d3e963d68ad05997a4f | eb0c5ccf942ab3b6b137b0e7dd531d2c96f83756 | /1_pop_randomly_connected.py | de68f467c7c7a95a8fe411b2a6e45760d103eaf0 | [
"MIT"
] | permissive | adrian-tymorek/NEURON_simulations_2019-01 | b336f4fa1c8ca83877a6214c7f45ea6c37bbe986 | 04de515d80b519e2e6f99ac7f0b7d4ec25c68c31 | refs/heads/master | 2020-12-10T15:58:55.673150 | 2020-01-14T01:31:27 | 2020-01-14T01:31:27 | 233,639,482 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,074 | py | import numpy as np
import random
import matplotlib.pyplot as plt
# For 3D plotting of cell positions
from mpl_toolkits.mplot3d import Axes3D
# Neuron-specific
from neuron import h, gui
from neuron.units import ms, mV
h.load_file('stdrun.hoc')
from populations import RandomPopulation
# In[]
# Create a population
exci... | [
"[email protected]"
] | |
69c2c24ee9deb0be24c47ae319d6c142d87078be | 33e8dd262bd52681eae5f79b9424a09733d1591c | /sandeep/Tutorial-1-Examples/Test-lint.py | 54c41561b4254ab4f571bf8aef73609e60579d34 | [] | no_license | pradeep122/LearnPython | 50e2dd1b5b4c300a0d8b60b8cdea53bc3426375f | 2cd5c4b0845bfa5f8daee778d69cb01ca077eee9 | refs/heads/master | 2020-03-19T00:07:07.973077 | 2019-05-18T17:51:47 | 2019-05-18T17:51:47 | 135,454,354 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 26 | py | print ("Hello World")
2 + | [
"[email protected]"
] | |
0972afda3f044c8377dad065401dd2eaa43d2c89 | 67977fcf332b3a05cf35ce618046f3add2b772e3 | /new_mysite/wsgi.py | a25b977e44ad23f8ba6e0b729dd82ddf3a58ba81 | [] | no_license | finafily526/web_demo_django | d164c055455217df360b973660649493574e1fa4 | 9ab0d9433410f70391363cf96a3259967fa45db7 | refs/heads/master | 2020-06-27T22:37:49.472230 | 2019-08-02T01:43:46 | 2019-08-02T01:43:46 | 200,071,124 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 398 | py | """
WSGI config for new_mysite project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_S... | [
"[email protected]"
] | |
e014ea574d48dbb9d13b76aa38053a9f2b22e8cd | 970cbdf412d89f97e0b9ddde096aac1b90b3b5f0 | /src/clustering/clustering/visualization.py | ed945cf9e918ef4efad69fc3a9d2b12f7c64a185 | [
"MIT"
] | permissive | stymy/pipelines | 8aa2e3df6dd3b8d201b2e681c82deaf708221db8 | 1aafbb2fdab118b7750199396402cffbbe5af763 | refs/heads/master | 2021-01-16T19:29:09.527595 | 2014-05-04T18:29:41 | 2014-05-04T18:29:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,667 | py | import surfer
from surfer import Brain
import numpy as np
import nibabel as nb
import nipype.interfaces.freesurfer as fs
#from variables import freesurferdir, resultsdir
import os
import glob
import sys
def annotation():
brain.add_annotation('aparc.a2009s', alpha = .2)
def roi():
brain.add_label('prefrontal', alpha ... | [
"[email protected]"
] | |
16d63d669283023944571a8eb1c81cf668615f6a | 42e81d00c7348b3cc5988f3176b80aa2289a780d | /BrightHorizon/BrightHorizon/wsgi.py | cdc98414ed4a95e3b040bc13fec02460581381f9 | [] | no_license | sysadmin777/BrightHorizon | 79e2d090889256a9dcace14dd113a65542290130 | aa8579ea73696eb43d3c836d0a2e00d8126810fd | refs/heads/main | 2023-05-25T12:15:07.677108 | 2023-05-19T14:36:43 | 2023-05-19T14:36:43 | 306,961,599 | 1 | 0 | null | 2020-10-27T15:34:22 | 2020-10-24T20:00:35 | CSS | UTF-8 | Python | false | false | 403 | py | """
WSGI config for BrightHorizon project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO... | [
"[email protected]"
] | |
d0b34b6a3131818d130e8b94fd6733dcbb2ddd3d | 95d9a8ed3ffba64c5e00cf0cc0eebf97c78c8f12 | /06.py | 5699632f559f42905c6467d08182b9ffc50f9009 | [] | no_license | SE6lab/SE6_lab | 0a50dfce3de4992f031ff9b75f35ac6db82a24c7 | 2c206fadefbc64e6fe42152cbd5f15f28d114898 | refs/heads/main | 2022-12-29T20:12:30.223653 | 2020-10-14T23:38:04 | 2020-10-14T23:38:04 | 304,121,984 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,828 | py | Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>>
def add(x, y):
return x + y
def subtract(x, y):
return x - y
def multiply(x, y):
return x * y
def divide(x, y):
return x / y
def fact... | [
"[email protected]"
] | |
cbd6add2f6254216315796e6424530a64d91520a | b1599f517e62c6651c930c28c430ac3ff7d52bb9 | /src/apps/competitions/migrations/0011_competition_competition_type.py | f2df235246d0498858215cdf50ce59fc6d625f57 | [
"Apache-2.0"
] | permissive | HunDeMingMingBaiBai/competitions-v2 | 4d9ef93f14a3bc43c582c67b62904c6bcf0c19fb | 745b56274ada40b78cda6e91dd762f2d547cd841 | refs/heads/develop | 2023-08-11T06:02:49.780503 | 2021-09-09T04:39:42 | 2021-09-09T04:39:42 | 377,348,778 | 0 | 0 | Apache-2.0 | 2021-06-16T02:32:30 | 2021-06-16T02:32:29 | null | UTF-8 | Python | false | false | 500 | py | # Generated by Django 2.2.10 on 2020-07-03 03:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('competitions', '0010_merge_20200217_2316'),
]
operations = [
migrations.AddField(
model_name='competition',
name='c... | [
"[email protected]"
] | |
6a05561304bd78df0efc71b62b3659469610fd24 | f38193df76e7f86ad4017ec62dd7c90ce92e9b91 | /_src/om2py3w/3wex0/diary-server.py | 20b7585eed6f3dee62bf2c7213284c338396cdce | [
"MIT"
] | permissive | isynch/OMOOC2py | dcf54f9d2012d018c3b280d28d65058e6ae1dc08 | cc7fafc106b56553306988d07f0a4ab61bc39201 | refs/heads/master | 2020-04-25T23:30:15.410512 | 2015-12-05T07:31:56 | 2015-12-05T07:31:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,220 | py | # -*- coding: utf-8 -*-
from datetime import datetime
import socket
import sys
HOST = '' # Symbolic name meaning all available interfaces
PORT = 1234 # Arbitary non-privileged port
# Datagram(udp) socket
try:
s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
print '创建中...'
except socket.error, msg:
print... | [
"[email protected]"
] | |
49f7dbbdfffd887a721bcc1a2ee1ced7e8de18d3 | 26bd175ffb3bd204db5bcb70eec2e3dfd55fbe9f | /exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/netvisor/pn_cpu_class.py | fadbed03e41b7d154a3530d1d8ce9f13d78ed446 | [
"MIT",
"GPL-3.0-only",
"GPL-3.0-or-later",
"CC0-1.0",
"GPL-1.0-or-later"
] | permissive | tr3ck3r/linklight | 37814ed19173d893cdff161355d70a1cf538239b | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | refs/heads/master | 2021-04-11T04:33:02.727318 | 2020-03-25T17:38:41 | 2020-03-25T17:38:41 | 248,992,437 | 0 | 0 | MIT | 2020-03-21T14:26:25 | 2020-03-21T14:26:25 | null | UTF-8 | Python | false | false | 5,894 | py | #!/usr/bin/python
# Copyright: (c) 2018, Pluribus Networks
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['... | [
"[email protected]"
] | |
223f0dbfc626e193372122515d1048c3da3e290b | 27d8ccd188636b18ea7542d9aa44e0662123793a | /crude/crude/wsgi.py | c6e230100a461ba0dd4de7bb5f94e41ecfaa94a8 | [] | no_license | KrishnaRauniyar/Django_CRUD_APP-Assignment_II- | c675e9bdf3b0abf1b37c84546a1361c1176e0554 | fda69ede41354c9380f11c0ee98ed83976554376 | refs/heads/master | 2022-11-24T11:42:17.808956 | 2020-07-24T16:37:53 | 2020-07-24T16:37:53 | 282,269,158 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 387 | py | """
WSGI config for crude project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTING... | [
"[email protected]"
] | |
56de2d510c239c7166bacb067023ccf1350afd5c | 6437af616b0752b24e1b62bc98d302b2e04a7c85 | /pagnition/supplier/direct.asda.com/pagination.py | bfbd6256239a5235efa713fa850d5363ea0ad07a | [] | no_license | kangqiwang/imageWebCrawler | 4c7ebc0c93fd52b27f08a0f79302885d95f53a6e | 76fe21802a5a03638e324e6d18fe5698a69aba70 | refs/heads/master | 2022-05-31T00:51:39.649907 | 2019-08-28T15:06:37 | 2019-08-28T15:06:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 391 | py | import pandas as pd
import numpy as np
import requests
def pagnition():
df=pd.read_csv("pagnition/input/direct_asda.csv",usecols=['url'])
tmpList=['url']
for url in df['url']:
if ',default,sc.html' in url:
tmpList.append(url+'?start=0&sz=500')
savedf=pd.Series(tmpList)
savedf.... | [
"[email protected]"
] | |
72111d9069d5463f365998e1f2428329f7f7f195 | a79ab025913ba5a96b11bd506d9915f4533f4029 | /golfProj/golf_app/templatetags/golf_extras.py | 0dd0f7aa73defb8cb95847a41ca1632adbae8a5b | [] | no_license | jflynn87/golf_game | 2533548b1b8313661216446ddfa7927b63717118 | a24f710fbc39d25cc93b5b4c5c4d6575ef38c6bb | refs/heads/master | 2022-07-11T00:27:46.765936 | 2019-04-17T03:07:45 | 2019-04-17T03:07:45 | 174,344,305 | 0 | 0 | null | 2022-07-06T20:01:36 | 2019-03-07T12:57:45 | Python | UTF-8 | Python | false | false | 1,733 | py | from django import template
from golf_app.models import Picks, mpScores, Field, Tournament, Group
from django.db.models import Count
register = template.Library()
@register.filter
def model_name(obj):
return obj._meta.verbose_name
@register.filter
def currency(dollars):
dollars = int(dollars)
return '$'... | [
"[email protected]"
] | |
04e63b41a7f0e2b684daa0deadb5d48becf59923 | 8fd2e5d53d7a91d35288ccefdb0c7ef00d927a0a | /book_06_Python黑帽子/Chapter03/网口嗅探多网段版(Bug).py | a690d64efc8c84b89fe615b495c918e4ec44349e | [] | no_license | atlasmao/Python-book-code | 03501f9ca2e81bc1f47464b3227c7f9cda0d387c | 03b6848a15a7e4c2ffebdc3528c24a8b101d9f41 | refs/heads/master | 2022-01-06T23:45:21.951307 | 2019-07-11T10:32:22 | 2019-07-11T10:32:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,745 | py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
import socket
import os
import struct
import threading
import time
from netaddr import IPNetwork, IPAddress
from ctypes import *
# 监听的主机
host = '10.0.76.1'
# 扫描的目标子网
subnet = '10.0.10.0/24'
subnet_list = []
host_up_num = 0
# 自定义的字符串, 我们将在 ICMP 响应中进行核对
magic_message = "... | [
"[email protected]"
] | |
30b09a780f82aae722e4f721ba42f220306bb21e | 3a95e89ce8ecb7434b1f00233ac468cd6d1d07e4 | /simulator.py | 2bfb65f001a423007fd06d60a48ebe91e4b25163 | [] | no_license | yinghuaman/simulator | cd24d5a38f1c096001a7aba4f51f4334a7776611 | 0cf0d7bf316f4bd99a29d3c0070b5a85428d0bae | refs/heads/master | 2020-03-27T01:31:01.870653 | 2018-08-22T14:12:55 | 2018-08-22T14:12:55 | 145,718,314 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,229 | py | import io
from io import StringIO
from tkinter import *
import time
import datetime
import pandas as pd
from tkinter import messagebox
import psycopg2
from sqlalchemy import create_engine
class my_GUI():
def __init__(self,master):
self.master = master
#GUI版面设计
def set_master(self):
... | [
"[email protected]"
] | |
3e73dfff7ea5a0792fd116a2aae63f1c1c8cf31a | 1499bf8983e04c0001289192d4a035278fe8a24d | /second_problem.py | cc417dea6ba8de8dc881805eb0da7d8030378d24 | [] | no_license | prachatos/e0226-assign1 | be4e19fe345de13f8c0106d5217ae407e38d4354 | aee3b625ffb13e650dc5e13717aab04fdbf81322 | refs/heads/master | 2020-03-27T19:25:56.362073 | 2018-09-24T17:18:57 | 2018-09-24T17:18:57 | 146,988,511 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,490 | py | import sys
import time
def write_list_to_file(f, l):
for i in range(0, len(l)):
f.write(l[i])
if i != len(l) - 1:
f.write('\n')
def gauss_jordan(aug, m, n):
steps = []
for i in range(m):
pivot = i, i
found_piv = False
for j in range(i, m):
... | [
"[email protected]"
] | |
f0fca8f69e4603da09b68522086637b899373e33 | f1a0f58220081ddc592ae98d6482f19030489495 | /hello.py | 8dd33ddccf910b7bc99e01a41a00475ba7f8060e | [] | no_license | evanmei87/hello_python | b4042ce6942fbe3e43888395b3fe1632530675b9 | 855ba20f5b55b407af0b7f130e0ab8565b3e87fd | refs/heads/master | 2020-03-23T21:18:43.320537 | 2018-07-27T02:10:46 | 2018-07-27T02:10:46 | 142,097,032 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 52 | py | msg = "Hello World"
print(msg)
msg += " i am a test" | [
"[email protected]"
] | |
81ffcc3453da33bcbaf9a58c38f84f2fbe306c8c | 030678c7ab9a410b1319527faf0f194c6eca2810 | /setup.py | 54752f842241a873247b6fb7bb46c30e62ec4061 | [] | no_license | r56jar/ChomikDownloader | 73bb7841fb796687b9c2299818b40b3a4e656123 | 2156f79100e7ff8b126b52a624be2b13d4ffb42d | refs/heads/master | 2021-08-15T21:46:24.721253 | 2017-11-18T11:11:59 | 2017-11-18T11:11:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 944 | py | from distutils.core import setup
import sys
import os
if sys.platform.startswith('win'):
import py2exe
setup(name='chomikDownloader',
version='0.1.2',
author='adam_gr',
author_email='adam_gr [at] gazeta.pl',
description='Downloads files from your account chomikuj.pl',
... | [
"[email protected]"
] | |
ac499025b4a3c16875c1014efa0d58f38731cd89 | 00b4275632eec48ced3f6aa10d74b3d0ed859bff | /seal_server.py | 139fd3aeb1a09147c5b8b5f2898321a9e5bb3b6f | [] | no_license | adityachivu/pyseal-project | 391393bd71d15464e68b550737c945c681fc0407 | 9e1d51ddffa899062e4828b4abe4d77a41d824d5 | refs/heads/master | 2020-03-21T03:24:18.015369 | 2018-07-18T20:46:23 | 2018-07-18T20:46:23 | 138,051,997 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 991 | py | import ahem
import ahem.cloud as cloud
import os
def main():
print("--------------------------PySEAL SERVER------------------------")
ahem.PORT = int(input("Enter port:"))
serversock = ahem.setup_server(ahem.PORT)
close_server = False
while(not close_server):
# process_multiply_request(... | [
"[email protected]"
] | |
daea7e74c85ec4d9426d39be68feb3c88fd5bd3c | ffe754438079fc6c45dfdc2eba04d479c20651d5 | /py_matrix_controller/matrix_controller/matrix_controller/udp_connection.py | 27d93a74c5e8398d6973af1df2a2a93c1c1560f5 | [] | no_license | kant/esp32-big-led-matrix-dmx-controller | d24a05f0ebe57e5465dfa40fa8005a62d85ea101 | 1d7d8ae120a5e4b4ca5ff7e1c397d1991e5252ca | refs/heads/master | 2022-12-21T05:27:10.070273 | 2020-09-28T17:49:53 | 2020-09-28T17:49:53 | 299,659,115 | 3 | 0 | null | 2020-09-29T15:28:52 | 2020-09-29T15:28:52 | null | UTF-8 | Python | false | false | 728 | py | import socket
class UdpConnection(object):
udp_socket: socket.socket = None
def open(self) -> None:
self.udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
self.udp_socket.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, True)
self.udp_socket.settimeo... | [
"[email protected]"
] | |
4842aac3c5c0f9ea83aff2d2aca4cf85d8a9c248 | 50a0e5b000fd348523b6268ef491cf93cdcf338c | /app/__init__.py | 6b9385c2cd94db0203cf2b7b995380fa9bcff22d | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | caltechlibrary/andor | 40aa391f946915cb4f395a187a123d35105db283 | d58a3e4ccd7cb5ccef939286655bf1b2e091b227 | refs/heads/master | 2020-06-18T22:16:21.836200 | 2019-11-20T21:53:39 | 2019-11-20T21:53:39 | 196,470,116 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 389 | py |
from flask import Flask
from app import config
app = Flask(__name__)
app.config.from_object(config.Config)
cfg = config.Config()
# Flask-login expects app.secret_key instead of config object
app.secret_key = cfg.SECRET_KEY
from flask_login import LoginManager
login_manager = LoginManager(app)
# Iniatialize the Flas... | [
"[email protected]"
] | |
089677bfcacaaf22eb438374c2a2c6465a2c88d4 | 28860c57c878da20b17e5991385bfa366f82c523 | /src/weight_calculation_module.py | d1d44644d86e318825911939c2fa54dda61fd6ab | [] | no_license | bloodteller123/Simple-Search-Engine | 92ac8d2c6fcd844b383a834d35f3babcb6b25083 | dcf29ade709b4a237af9cd0a9a84219bfce1b0a0 | refs/heads/master | 2021-08-28T10:13:45.264009 | 2021-08-24T17:21:02 | 2021-08-24T17:21:02 | 235,720,809 | 0 | 0 | null | 2020-04-09T19:03:33 | 2020-01-23T04:12:39 | HTML | UTF-8 | Python | false | false | 2,111 | py | import importlib
import os
import json
import math
import inverted_index_construction_module as iic
indexPath = '../output/index.json'
storagePath = '../output/storage.json'
reuterIndexPath = '../output/reuterIndex.json'
reuterStorage = '../output/reuterStorage.json'
termPath = '../output/terms.json'
UOtermPath = '../... | [
"[email protected]"
] | |
57dc9c658162ec54440e50d2e719cd887235fece | b7c87a88487cd7e232f3065a8a9d301503ab398c | /montyHall.py | 8277b45f5c547e6eee8719f26ab4eb5c99ff15a3 | [] | no_license | solean/monty-hall-simulation | 4cdd65918368cefe20a29625a17586ac8229e308 | f8f056a28b3b0d7edfe32ecec2fe1ba5b87bc8c6 | refs/heads/master | 2021-01-01T17:39:51.860585 | 2017-07-23T21:34:48 | 2017-07-23T21:34:48 | 98,126,665 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 792 | py | from __future__ import division
import random
def montyHall(toSwitch):
doors = [0, 0, 1]
random.shuffle(doors)
firstDoorIndex = random.randint(0, 2)
behindFirstDoor = doors[firstDoorIndex]
del doors[firstDoorIndex]
if doors[0] == 0:
del doors[0]
elif doors[1] == 0:
del doors[1]
if toSwitch:
... | [
"[email protected]"
] | |
97f91e9b062419f031a0bff0689df72f71c43dfe | ce8dc0f97e7431504e7e8cde94420dc0046dedde | /session6/intro3.py | 1e67036b74556e46b65bc39d96e6b198f7c58be2 | [] | no_license | zwwebob/zweebob | 7fa99a9296541ce3a96c0e6c4c99f00e59fa0c28 | c7ca9c6df9e3d19457ed137fa1a3ababdc92a07c | refs/heads/master | 2020-06-12T10:07:24.668589 | 2019-07-19T08:57:10 | 2019-07-19T08:57:10 | 194,267,087 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 106 | py | loop_count = 0
while loop_count<3:
print("Hi")
loop_count += 1
if loop_count>=3:
break | [
"[email protected]"
] | |
2b1d904b895cf46c158f71c1ef2c251adeb0ff84 | 670aefce9619eb112d54b48d57cf0972f4290d0e | /hello2/a.py | 930e790445a678df2c74bb2d16806c60d798dd2a | [] | no_license | TKNRK/cython_examples | 323ab79a3a146d6fe08588070963803fa764d0f6 | 7fcd260c344361d77dba185d36b68dfd764e14e5 | refs/heads/master | 2020-12-02T19:41:35.965733 | 2017-07-06T02:19:06 | 2017-07-06T02:19:06 | 96,376,592 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 109 | py | import pyximport; pyximport.install()
import hello
if __name__ == "__main__":
hello.say_hello_to("Reona")
| [
"[email protected]"
] | |
95e81629ec5b165d02943f34a71fc1f1080bcef5 | cfb4e8721137a096a23d151f2ff27240b218c34c | /mypower/matpower_ported/mp-opt-model/lib/@opt_model/solve.py | 4ebc7aba4174ad01cb668380102ca885eae9fb2c | [
"Apache-2.0"
] | permissive | suryo12/mypower | eaebe1d13f94c0b947a3c022a98bab936a23f5d3 | ee79dfffc057118d25f30ef85a45370dfdbab7d5 | refs/heads/master | 2022-11-25T16:30:02.643830 | 2020-08-02T13:16:20 | 2020-08-02T13:16:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 146 | py | def solve(*args,nout=5,oc=None):
if oc == None:
from .....oc_matpower import oc_matpower
oc = oc_matpower()
return oc.solve(*args,nout=nout)
| [
"[email protected]"
] | |
f6fb7103e473fba78d2bc7c0011a6cf60f1cc0aa | 2283d7ae2d8c6d2a13b5dbf9e13a395600fb7951 | /pointergen/decode.py | 0bbb7829b61e8fce9c0c38284c6fb72813298c86 | [] | no_license | nishanth01/summary_final | eebb3df6de939a2af955cb904b489d3d5e6a10e1 | b8d9413db87de1a0ce46085f1beae94cb976fa57 | refs/heads/master | 2020-03-25T23:25:00.052768 | 2018-08-11T09:47:53 | 2018-08-11T09:47:53 | 144,273,733 | 12 | 8 | null | null | null | null | UTF-8 | Python | false | false | 8,181 | py | import os
import time
import tensorflow as tf
import beam_search
import data
import json
import logging
import numpy as np
import util
from rouge import Rouge
SECS_UNTIL_NEW_CKPT = 60
def make_html_safe(s):
s.replace("<", "<")
s.replace(">", ">")
return s
def print_results(article, abstract, dec... | [
"[email protected] config --global user.name nisnair"
] | [email protected] config --global user.name nisnair |
edbdbbde6bd4ce846a29e086c5f9a3ae36597398 | eca4fae18c827272104a68ed9c25ab9f112f4f81 | /Data in More Complex Formats/Problem set/Processing All/process.py | 148ded280c9f3753ca3ee1e4c74029e137bb5149 | [] | no_license | gbengaoti/Data-Wrangling-with-MongoDB | a331f41344ce87a1693f07401aa63c8f332f5dfa | 932d86597bd18e1550a84200a995872e14199001 | refs/heads/master | 2021-05-13T14:19:14.892124 | 2018-01-09T15:41:46 | 2018-01-09T15:41:46 | 116,736,076 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,797 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Let's assume that you combined the code from the previous 2 exercises with code
from the lesson on how to build requests, and downloaded all the data locally.
The files are in a directory "data", named after the carrier and airport:
"{}-{}.html".format(carrier, airport)... | [
"[email protected]"
] | |
dfeaef8960d9c3c78351dc377c9805836cc90639 | 69cfe57220f789eb1d1966ed22c6823f0beeb8ce | /covid_venv/lib/python3.7/site-packages/dash_html_components/Pre.py | 46214932ac801cfab78d16fc03ee6f01f0cbd582 | [
"MIT"
] | permissive | paulsavala/Covid19-model | 664e31780ee1c8e4ef2115af2f41b27e832e5e50 | 41aa96d7c9abc117550f904af11815f507f0f0a0 | refs/heads/master | 2022-07-15T17:39:05.842619 | 2020-11-16T20:42:22 | 2020-11-16T20:42:22 | 252,545,888 | 2 | 0 | MIT | 2022-06-22T01:37:35 | 2020-04-02T19:19:25 | Python | UTF-8 | Python | false | false | 4,767 | py | # AUTO GENERATED FILE - DO NOT EDIT
from dash.development.base_component import Component, _explicitize_args
class Pre(Component):
"""A Pre component.
Pre is a wrapper for the <pre> HTML5 element.
For detailed attribute info see:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre
Keyword arguments:
-... | [
"[email protected]"
] | |
3c6dc99ca36a539efb2e696f6b57cbd205a83f8b | ae7ba9c83692cfcb39e95483d84610715930fe9e | /baidu/Paddle/paddle/trainer/tests/config_parser_test.py | 5ca874cec7914a20f79c2c7b1873c5bd04f60dca | [
"Apache-2.0"
] | permissive | xenron/sandbox-github-clone | 364721769ea0784fb82827b07196eaa32190126b | 5eccdd8631f8bad78eb88bb89144972dbabc109c | refs/heads/master | 2022-05-01T21:18:43.101664 | 2016-09-12T12:38:32 | 2016-09-12T12:38:32 | 65,951,766 | 5 | 7 | null | null | null | null | UTF-8 | Python | false | false | 1,002 | py | # Copyright (c) 2016 Baidu, Inc. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | [
"[email protected]"
] | |
60b60078954e230b5136cb098beb191fd321e8b0 | 53a7a00f76861a32e957e0345aced81be97c197d | /glavapp/apps.py | d8502b166523bf1139ae66a6e44cacec5877dab5 | [] | no_license | Dimas4/Question-answer-api | 970d540b4d5844161420d4c05bd3f21f64c3e7f0 | 4e9b6074d553e99f68d97aa354ba1cdeb2ec0bab | refs/heads/master | 2021-04-12T04:46:10.427189 | 2018-06-26T15:55:14 | 2018-06-26T15:55:14 | 125,857,009 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 89 | py | from django.apps import AppConfig
class GlavappConfig(AppConfig):
name = 'glavapp'
| [
"[email protected]"
] | |
ad754b71e5640b1150ff4d3331cbc5ee7159f940 | 423b80913a2d7109336cd60ccf6d50947883447d | /euler2.py | 54bb3979f789375378f2dcdc551c57a0f3262a27 | [] | no_license | kaborso/Project-Euler | 3545eef46ce50fb0db2cbd65a1552bbf1ee503ae | 292f8c2d616eb0e14d6c0e2b9279708299e5f43c | refs/heads/master | 2016-09-16T14:08:39.576198 | 2011-06-20T22:05:03 | 2011-06-20T22:05:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 183 | py | import sys
def sumfib(n):
sum = 0
a, b = 0, 1
while a < n:
if (b % 2 == 0):
sum += b
a, b = b, a + b
return sum
input = long(sys.argv[1])
print sumfib(input) | [
"[email protected]"
] | |
fbfbfee07add932f8ce722cef5cedc1a405cbe26 | 70d06fe2cc96b8e9a70ad93cdcd16506ecf4495c | /openleveldb/backend/connectorclient.py | e2de8157b0243c80a8f168c5ea6b522b49643289 | [
"BSD-3-Clause"
] | permissive | lucmos/openleveldb | 79a79e6b8e49c20c7ba2bff0b85227bf1dde2223 | b0061362e2b74aba47790f6164689b8d2fa87a5d | refs/heads/master | 2023-05-10T21:11:03.743619 | 2021-04-15T15:08:50 | 2021-04-15T16:27:22 | 234,050,110 | 6 | 0 | BSD-3-Clause | 2023-05-02T22:48:00 | 2020-01-15T09:55:28 | Python | UTF-8 | Python | false | false | 5,183 | py | """
Class that communicates with the server module to support dict-like behaviour,
with automatic serialization to bytes and deserialization from bytes provided
by the serialization module
"""
import pickle
from pathlib import Path
from typing import Any, Callable, Iterable, Optional, Union
import requests
from flas... | [
"[email protected]"
] | |
1c796999a547a72525bde4cbd37ec65d07970463 | 8272778a156da3c4ecca549aa6953031abeed11a | /exercises/exercise_10.py | adf2ef6521b3ab8eacaace2cd0e84bd070ba4b54 | [] | no_license | igorjm/python-playground | d8c4e58b69fdf5b0ca6065d765d4fbc23b9b67a1 | 04d273fba395085337931251beb623fadf1c1aee | refs/heads/master | 2023-03-26T17:29:31.998312 | 2019-10-21T19:47:56 | 2019-10-21T19:47:56 | 119,454,373 | 1 | 0 | null | 2021-03-19T23:26:39 | 2018-01-29T23:16:47 | HTML | UTF-8 | Python | false | false | 322 | py | #Please modify the code of the previous exercise so that instead of printing out the lines in the terminal,
#it prints out the length of each line.
#
#Expected output:
#
#4
#5
#6
#8
#10
#11
>>> file = open("fruits.txt", "r")
>>> content = file.readlines()
>>> file.close()
>>> for i in content:
>>> print(len(i) - ... | [
"[email protected]"
] | |
3e5877789ec26a238d9d774c1aafe05850e3ff29 | e1d00589e31e3c067db4bb1006d7a6fad454d374 | /53.py | 9dbb0282d3dd4813ec7cc75014bc4da7681bbcf4 | [] | no_license | bjornars/project-euler | e8944bfb897eea1dc523daf98091c8b3060f1452 | 5b664a610fecbb195698aff4304bb67fd3fb6d08 | refs/heads/master | 2021-01-18T15:16:47.939325 | 2012-09-24T15:08:15 | 2012-09-24T15:08:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 130 | py | import lib
coeffs = (lib.choose(n, k) for n in range(1,101) for k in range(1, n+1))
print sum(1 for n in coeffs if n >= 1000000)
| [
"[email protected]"
] | |
f5dda19da49217fca423a9a350dac6e89131454f | b21571488740a3fb54e4779d6e73c5acff80749c | /analysis/karp_rabin.py | ec57877972c5e3eedd84050c25cf357d253d372b | [] | no_license | nnkennard/review-discourse | 428b1c68cd716c8530c5713db864fdb1f8a99e29 | a7e8012cbd3a229b21cfcbfee55962b2ab140fca | refs/heads/master | 2022-12-12T14:40:16.197293 | 2021-05-24T16:28:00 | 2021-05-24T16:28:00 | 236,221,931 | 0 | 0 | null | 2022-12-08T10:55:54 | 2020-01-25T19:55:34 | Python | UTF-8 | Python | false | false | 3,557 | py | import json
import math
import sys
import openreview_lib as orl
from tqdm import tqdm
WINDOW = 7
Q = 2124749677 # Is this too big for Python int
def myhash(tokens):
tok_str = "".join(tokens)
hash_acc = 0
for i, ch in enumerate(reversed(tok_str)):
hash_acc += math.pow(2, i) * ord(ch)
return hash_acc ... | [
"[email protected]"
] | |
812652e5617f9a47aa6e3f5493cd2f65111596b4 | c3351062731885d604a39856b2f933144cac70bc | /tools/Sikuli/OpenDialogClickFolderSelect.sikuli/OpenDialogClickFolderSelect.py | 2786d858099aaf9188c804348c69087d2b935727 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | Pr-Mex/vanessa-automation | 4efb7924242b70d86f1ef34b48de638602a6d8f3 | e9fcb486384a3c96db8ee7218294550c78bf096c | refs/heads/develop | 2023-09-04T00:48:40.953195 | 2023-08-30T19:28:16 | 2023-08-30T19:28:16 | 133,170,708 | 395 | 356 | BSD-3-Clause | 2023-09-11T17:17:02 | 2018-05-12T17:55:53 | 1C Enterprise | UTF-8 | Python | false | false | 31 | py | click("Bb60pnanxm.png")
exit(0) | [
"[email protected]"
] | |
1f4e873eab2fcd41f293bcb80c7e8ae1e5eb4377 | 0019ea5621577ab9a9a694e3ef91d913e981a28e | /missing_data_complementor/__init__.py | 47ea50802fb334e4e0fffda9b4c61d9c2aa1527b | [] | no_license | sungc1/fake-news-framework_Py3 | 676710b3bf7b8feb4c237ffed7d1d280f4967890 | e3552b5bc2a30dbd52ad893ce8dd29aa2242f864 | refs/heads/main | 2023-01-19T23:42:13.294446 | 2020-12-01T18:38:31 | 2020-12-01T18:38:31 | 428,178,049 | 1 | 0 | null | 2021-11-15T08:18:23 | 2021-11-15T08:18:23 | null | UTF-8 | Python | false | false | 47 | py | #
# Created by Aviad on 03-Jun-16 11:40 AM.
# | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.