repo_name stringlengths 7 111 | __id__ int64 16.6k 19,705B | blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 5 151 | content_id stringlengths 40 40 | detected_licenses list | license_type stringclasses 2
values | repo_url stringlengths 26 130 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 42 | visit_date timestamp[ns] | revision_date timestamp[ns] | committer_date timestamp[ns] | github_id int64 14.6k 687M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 12
values | gha_fork bool 2
classes | gha_event_created_at timestamp[ns] | gha_created_at timestamp[ns] | gha_updated_at timestamp[ns] | gha_pushed_at timestamp[ns] | gha_size int64 0 10.2M ⌀ | gha_stargazers_count int32 0 178k ⌀ | gha_forks_count int32 0 88.9k ⌀ | gha_open_issues_count int32 0 2.72k ⌀ | gha_language stringlengths 1 16 ⌀ | gha_archived bool 1
class | gha_disabled bool 1
class | content stringlengths 10 2.95M | src_encoding stringclasses 5
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 10 2.95M | extension stringclasses 19
values | num_repo_files int64 1 202k | filename stringlengths 4 112 | num_lang_files int64 1 202k | alphanum_fraction float64 0.26 0.89 | alpha_fraction float64 0.2 0.89 | hex_fraction float64 0 0.09 | num_lines int32 1 93.6k | avg_line_length float64 4.57 103 | max_line_length int64 7 931 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ktc312/tw_perm_data_analysis_web | 7,713,761,303,201 | 67d9ad40a14eb246eaca883e3ad02fe49595c8fe | 253b9c42bffbcd7b0c3fe3880e0370359b1aedb0 | /tw_perm_data_analysis/data_cleaning.py | 66b1805450a4a4d2a979043efb4ed7b39c1132ff | [
"MIT"
] | permissive | https://github.com/ktc312/tw_perm_data_analysis_web | 40c78bf1511f98da07054ae8c6287a53da1e0c73 | 98302d45afb0d47b230a603279699351739ba34c | refs/heads/master | 2021-01-13T01:07:52.923291 | 2017-03-02T22:17:12 | 2017-03-02T22:17:12 | 81,408,337 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # __author__ = 'ktc312'
import pandas as pd
import numpy as np
import os
data_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'tw_perm_data_analysis/')
# Read the CSV file (cities)
ny_cities_df = pd.read_csv(data_path + 'data/NY_cities.csv', names='c', dtype=str)
ny_cities = []
for x ... | UTF-8 | Python | false | false | 4,610 | py | 73 | data_cleaning.py | 10 | 0.572234 | 0.552278 | 0 | 137 | 32.649635 | 111 |
paoladuran0618/PythonPractices | 8,083,128,497,233 | 5a6e81ba848920b3575f1a1e23fd3abec9c011ee | d5aa3dbe3133ebed014033b1d98d006259b29ccd | /control-de-flujo/ejercicio6.py | afbb153618d94ba8943b13399ccf173d5d4f7aeb | [] | no_license | https://github.com/paoladuran0618/PythonPractices | b5f82df3e033bd6c2100619f01c85adb0426870c | 66693e71f911d76a39dd7947d11389847d386873 | refs/heads/master | 2023-05-25T07:19:10.788523 | 2021-01-17T22:04:46 | 2021-01-17T22:04:46 | 282,688,247 | 0 | 0 | null | false | 2023-05-23T00:56:55 | 2020-07-26T16:23:38 | 2021-01-17T22:07:17 | 2023-05-23T00:56:54 | 10,772 | 0 | 0 | 1 | Python | false | false | """
Utilizando la función range() y la conversión a listas
genera las siguientes listas dinámicamente:
Todos los números del 0 al 10 [0, 1, 2, ..., 10]
Todos los números del -10 al 0 [-10, -9, -8, ..., 0]
Todos los números pares del 0 al 20 [0, 2, 4, ..., 20]
Todos los números impares entre -20 y 0 [-19, -17, -15, ..... | UTF-8 | Python | false | false | 570 | py | 23 | ejercicio6.py | 22 | 0.602496 | 0.491979 | 0 | 20 | 27.1 | 64 |
DhawalRank-zz/LibApp | 11,596,411,723,025 | 23a33b094e34811bf3d4b4481a1f9ed435bdb256 | 40298fa8620011276a2d77d8af430c5d5fcf7dee | /app/views.py | 8ffa2c98d9a64d6b98ba2cf5c451b1668c21bb3e | [] | no_license | https://github.com/DhawalRank-zz/LibApp | 5df0e734114f874bef9adf5d8aaf0bfa7484cb9a | db0711e3accb5b0209fb93f73803c23c3b713a7e | refs/heads/master | 2021-09-26T17:44:49.839768 | 2016-06-29T18:29:12 | 2016-06-29T18:29:12 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
from random import randint
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required, user_passes_test
from django.shortcuts import render, get_object_or_404, get_list_or_404
from django.views.decorators.csrf import csrf_protect
from django.http impo... | UTF-8 | Python | false | false | 11,879 | py | 16 | views.py | 13 | 0.622527 | 0.618318 | 0 | 278 | 41.730216 | 117 |
yoshi112da/Instacart | 4,131,758,572,789 | 40893191ab08b38b9313de6e1ace88dc0480c118 | 19dfc947c052ea113306b3ae4bf1e2e1a069f0a9 | /appendix/317_.py | fca9453ca0ed2da4cc209cbfd01b81264c1595e6 | [
"MIT"
] | permissive | https://github.com/yoshi112da/Instacart | 25bd6035bb1c764ec25c6e011949a71f122084f5 | 2cb49dc95a2ce3f1cbd3fccb54ce15b624a5d503 | refs/heads/master | 2023-04-26T12:21:28.709941 | 2023-04-16T02:08:23 | 2023-04-16T02:08:23 | 579,041,637 | 0 | 0 | MIT | true | 2022-12-16T14:09:39 | 2022-12-16T14:09:38 | 2022-12-08T09:42:11 | 2018-05-07T06:51:15 | 4,687 | 0 | 0 | 0 | null | false | false | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 18 12:55:38 2017
@author: konodera
https://twitter.com/jeremystan/status/911357665481080832
6/ most novel feature:
binary user by product purchase sequence ->
decimal -> XGBoost learns non-trivial sequence patterns
"""
import pandas as... | UTF-8 | Python | false | false | 3,743 | py | 74 | 317_.py | 58 | 0.456051 | 0.407694 | 0 | 135 | 26.718519 | 103 |
huang8228541/upload_look_photo_system | 2,181,843,402,255 | 50892cd7c2dcf88e23348ecc3809e0fe5dbbce4f | 357fb20ace48919be3512b819cdf969cbaa8429b | /established_photo_v1.0/create_db.py | a6e6fb5edeaa348dd083d5918b9035041193df9e | [] | no_license | https://github.com/huang8228541/upload_look_photo_system | 823fe5b9eed8806ba883d78951a7c3f9a9f80386 | 8b1690665b1a295f0b80aa045838a81de61f1044 | refs/heads/master | 2021-09-19T11:39:43.506868 | 2018-07-27T13:09:46 | 2018-07-27T13:09:46 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
实现持久层:
本引用需要两个表。分别存放用户信息和相片信息。
用户信息主要保存:用户名,密码等信息。
相片信息,则保存相片的标题,相片对应的文件名,以及该相片的属主
等。
因此,用户表和相片表有主从表关联关系,一个用户可以对应于多个相片。
'''
import pymysql
class CreateMysqlTable(object):
def __init__(self):
#连接数据库,
self.db=pymysql.connect("localhost","root","new_password","manager_user")
#创建游标
... | UTF-8 | Python | false | false | 1,921 | py | 7 | create_db.py | 4 | 0.466832 | 0.460632 | 0 | 64 | 24.203125 | 81 |
ulicar/sentry-cli | 4,535,485,477,519 | a1b0645dad451cfa8b4dbb5203abf24ff6924320 | 9f071beeeab8adb28e2c8bbf77c2af7b2a66f506 | /sentry/client.py | 2f24f61c51432bd0224e0418dbb60d1f9828394b | [
"MIT"
] | permissive | https://github.com/ulicar/sentry-cli | b23714cf4a2265bdbf97f2f95bfd301b67a50f3d | c95a77f8b74ced7c41dc8ab61fd31fdf64c08880 | refs/heads/master | 2021-05-02T13:45:57.346689 | 2016-11-02T19:33:03 | 2016-11-02T19:33:03 | 72,670,663 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
import requests
class Client(object):
def __init__(self, token, domain, debug=False):
assert isinstance(token, str)
assert isinstance(domain, str)
self.token = token
self.domain = domain
self.debug = debug
def _do_query(self, resource):
base... | UTF-8 | Python | false | false | 1,528 | py | 4 | client.py | 3 | 0.631545 | 0.63089 | 0 | 46 | 32.195652 | 97 |
jasonshih/googleads-python-legacy-lib | 18,305,150,623,495 | 1bc99012d5c3b1c149a83dfde3acad2602fe625c | 93f47ba04fc18c4e537f0a48fe6232e2a89a4d30 | /tests/adspygoogle/dfa/v1_18/dfa_logger_unittest.py | 02825a198a2779854fd758cf3143ca4abf1f023f | [
"Apache-2.0"
] | permissive | https://github.com/jasonshih/googleads-python-legacy-lib | c56dc52a1dab28b9de461fd5db0fcd6020b84a04 | 510fad41ecf986fe15258af64b90f99a96dc5548 | refs/heads/master | 2021-04-30T22:12:12.900275 | 2015-03-06T15:35:21 | 2015-03-06T15:35:21 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | UTF-8 | Python | false | false | 2,579 | py | 76 | dfa_logger_unittest.py | 60 | 0.688639 | 0.670027 | 0 | 79 | 31.64557 | 79 |
kristinyanah/backendrepo | 1,039,382,099,143 | fe07d1bcbd17c03eadbfab36a1ca5bf335fabc11 | e3f34e3fe9783c3e6405b128d0cf1a6be79a7ec8 | /models/cnn_gnn/code/preprocess_data.py | c83dc99f62f5d17c315dc85bd6e778fdd90f3a58 | [
"Apache-2.0"
] | permissive | https://github.com/kristinyanah/backendrepo | e1586e93afbc35b3c99d96b533c96de7da3d25ea | 251fd350dbde04bf0428da1e5ee2128acc6c5d10 | refs/heads/master | 2020-05-24T12:47:34.003108 | 2019-05-19T09:50:09 | 2019-05-19T09:50:09 | 187,275,140 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from collections import defaultdict
import os
import pickle
import sys
import numpy as np
from rdkit import Chem
def load_dictionary(file_name):
with open(file_name, 'rb') as f:
d = pickle.load(f)
dictionary = defaultdict(lambda: len(d))
dictionary.update(d)
return dictionary
def create_a... | UTF-8 | Python | false | false | 6,305 | py | 18 | preprocess_data.py | 8 | 0.591594 | 0.58636 | 0 | 182 | 33.642857 | 123 |
Rlogarisation/NihaoPython | 790,274,031,418 | 0a235366197728375ac4358e6c8596b13af10fe0 | cb0119df748ac0d83f9f6ce1c82910e1e9232fe2 | /lab03/lab03_timetable/timetable_test.py | 74f2c9e4616d0447c0e8c95c88aa91e7c31bde2c | [] | no_license | https://github.com/Rlogarisation/NihaoPython | 3bf7cb37fea068695e0f483ab426bd75d4e68482 | 6a302ba548a110378a3460cb46e93607d4e58f48 | refs/heads/main | 2023-05-13T18:19:13.256740 | 2021-05-20T05:03:15 | 2021-05-20T05:03:15 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from timetable import timetable
from datetime import date, time, datetime
import datetime
def test_for_timetable():
assert(timetable([date(2019,9,27)], [time(14,10)]) == [datetime.datetime(2019, 9, 27, 14, 10)])
assert(timetable([date(2019,9,27), date(2019,9,30)], [time(14,10), time(10,30)]) == [datetime.datet... | UTF-8 | Python | false | false | 471 | py | 39 | timetable_test.py | 35 | 0.673036 | 0.4862 | 0 | 7 | 65.714286 | 249 |
npolshakova/nnet | 1,254,130,459,556 | 7a85a63c1a12d63969b768991fc858fd5d1e0271 | d711f546a22d6942e74f0def14ce819f20b3ffff | /stencil/generate_data.py | 12a3d8330e5ce3ed212f96c6813798b6b949eb6f | [] | no_license | https://github.com/npolshakova/nnet | dda50dab3e1e35b3e262c5ca5f4453604a0bbfca | 4a9b8e96a179059b1b01d96a227a8d1db8eff60c | refs/heads/master | 2021-10-27T15:26:42.174227 | 2019-04-18T00:43:00 | 2019-04-18T00:43:00 | 181,326,965 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import random
def generate_data():
X = [[1 if np.random.normal() > 0 else 0, 1 if np.random.normal() > 0 else 0] for ix in range(100)]
Y = [1 if c[0] != c[1] else 0 for c in X]
return np.array(X),np.array(Y)
| UTF-8 | Python | false | false | 240 | py | 3 | generate_data.py | 2 | 0.608333 | 0.554167 | 0 | 7 | 33.285714 | 103 |
nuxeo-cps/zope2--PortalTransforms | 15,539,191,721,312 | bc685dda6bef446eedc8f1804ff2ae2a24943c05 | ae5a60fb7105533eb46a7113b709f49f9525b419 | /zope/MimeTypesTool.py | a0f347c7f0e4f4feac59700b25fd149a85e73956 | [
"BSD-3-Clause"
] | permissive | https://github.com/nuxeo-cps/zope2--PortalTransforms | 61cab5a168c254a5850bcb0fb182b064ce1ba78f | 753f67202b016d0b07edd3bc65fd827cb39e50db | refs/heads/main | 2023-01-30T03:53:56.400774 | 2012-01-21T21:23:51 | 2012-01-21T21:23:51 | 317,994,731 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from OFS.Folder import Folder
try:
from Products.CMFCore.permissions import ManagePortal
except ImportError: # BBB: CMF 1.4
from Products.CMFCore.CMFCorePermissions import ManagePortal
from Products.CMFCore.ActionProviderBase import ActionProviderBase
from Products.CMFCore.TypesTool import FactoryTypeInformati... | UTF-8 | Python | false | false | 3,955 | py | 60 | MimeTypesTool.py | 43 | 0.694817 | 0.692035 | 0 | 101 | 38.158416 | 93 |
rrada/playground | 10,943,576,691,955 | ec80876e136a1c328ed32ec88a8dac6521c15f02 | 41c72c519a40354fb84b6dfcb73d5f9506354ee5 | /controlserver/server.py | 08af23ca62c03fbcbd3237dce3fd2ab8f0c0e718 | [] | no_license | https://github.com/rrada/playground | c8f1b96a645ac9b49014aa1b158a73f09c7aaadd | fdabe925d1829dd9182d9daafe5a0dd4b041bec2 | refs/heads/main | 2023-02-18T08:03:20.791161 | 2021-01-20T19:25:11 | 2021-01-20T19:25:11 | 331,373,273 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import sys
import socket
import struct
import time
import signal
import argparse
from threading import Thread, get_ident
from socketserver import (
BaseServer,
BaseRequestHandler,
UDPServer,
UnixStreamServer,
StreamRequestHandler,
ThreadingMixIn,
)
from enum import IntEnum
from cmd i... | UTF-8 | Python | false | false | 5,333 | py | 4 | server.py | 2 | 0.600225 | 0.591037 | 0 | 181 | 28.469613 | 127 |
zahrafali/comp5107 | 6,786,048,354,761 | e6ce4222cbe4a10e335ee145203e253b016bc5cd | 8578e5a5a6f32c2e56f554ced60ad7287aebdf71 | /Project/testing.py | 651e07e05757ced82501efb3d7e4c68a968eb47e | [] | no_license | https://github.com/zahrafali/comp5107 | 334bdb17d8119823e3e73023121369ef03bf145d | b64f631d8e8dca32ba30e57ceceae2c9a2b65862 | refs/heads/master | 2022-03-01T21:57:47.055407 | 2018-04-24T04:36:00 | 2018-04-24T04:36:00 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import helper as h
import numpy as np
import max_likelihood as ml
import bayesian_method as bl
import parzen_window as pz
import ho_kashyab as hk
import k_nn as kn
import fishers_disc as fd
def test_classifier(class1_test_points, class2_test_points, x1_ml_estimated_cov, x2_ml_estimated_cov,
x1_ml_... | UTF-8 | Python | false | false | 20,142 | py | 31 | testing.py | 15 | 0.566528 | 0.527008 | 0 | 440 | 44.777273 | 151 |
irfankhan309/Dealer_2 | 13,082,470,409,108 | a0d1dbb6642769f52bad32653c9b039b425eaece | feb3431bf792d2e7ea17bd89b9feb8750dcf286f | /Dealer/DealerApp/models.py | 7e53f28209751f62b99c51799035606576bb1672 | [] | no_license | https://github.com/irfankhan309/Dealer_2 | 6275f964bccc04c71732bb0260e8e5f343f597b6 | 3cc9ad9097f12e75ed5f6ada05af1c6fed8a1fbd | refs/heads/master | 2020-05-01T01:54:05.318100 | 2019-03-22T20:37:04 | 2019-03-22T20:37:04 | 177,205,879 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.db import models
# Create your models here.
class PostEnquiry(models.Model):
Name=models.CharField(max_length=40)
uploaded_at=models.DateTimeField(auto_now_add=True)
Vehicle=models.CharField(max_length=40)
BIKE_Model=models.CharField(max_length=35)
Color=models.CharField(max_length=35)... | UTF-8 | Python | false | false | 622 | py | 14 | models.py | 8 | 0.750804 | 0.720257 | 0 | 18 | 33.555556 | 60 |
pallabpain/programming-problems | 18,700,287,638,832 | 4308118e33091f57987b99e49804590fc2502871 | b71bb819113600c76d5c22f9660c8243b532ab87 | /longest_common_substring.py | a428e086fc7c59a84d1cbd85e24d9a6561f54fb7 | [] | no_license | https://github.com/pallabpain/programming-problems | be4cb18018e0d7772b6e1d75f4c598c6ed3a3caf | 1ffe0633bc0ae131e03350d8e5a16ad0bed5a223 | refs/heads/master | 2021-07-06T16:25:32.004406 | 2020-08-11T18:54:44 | 2020-08-11T18:54:44 | 163,048,031 | 0 | 0 | null | false | 2020-08-11T18:56:19 | 2018-12-25T05:12:51 | 2020-02-03T10:38:35 | 2020-08-11T18:55:54 | 5 | 0 | 0 | 0 | Python | false | false | from pprint import pprint
def longest_common_substring(A, B):
len_A = len(A)
len_B = len(B)
dp = [[0 for _ in range(len_B + 1)] for _ in range(len_A + 1)]
max_length = 0
for i in range(len_A + 1):
for j in range(len_B + 1):
if i == 0 or j == 0:
dp[i][j] = 0
... | UTF-8 | Python | false | false | 778 | py | 7 | longest_common_substring.py | 5 | 0.473008 | 0.451157 | 0 | 28 | 26.785714 | 66 |
s14004/tek | 2,121,713,872,632 | dc2f2a6b6f18a6fc44374ac96e16ceef5839bc33 | 99c2ac6f6e631b32222eca717515fb7844619546 | /a/Animal.py | b0d09be3840f78bef8c65b256d290df781628bd1 | [] | no_license | https://github.com/s14004/tek | f9388e0ffe3dde2eb2d07f1e3911a57ea1848ad9 | ae8ffa3597152696d47c6b1095389da696cd58bc | refs/heads/master | 2021-01-10T21:50:45.639530 | 2015-06-26T04:40:10 | 2015-06-26T04:40:10 | 37,701,963 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Animal:
def __init__(self, name, voice):
self.name = name
self.voice = voice
def say(self):
print(self.voice)
class Dog(Animal):
pass
if __name__ == '__main__':
puppy = Dog(name='shima', voice='nyan!')
puppy.say() | UTF-8 | Python | false | false | 267 | py | 6 | Animal.py | 6 | 0.535581 | 0.535581 | 0 | 15 | 16.866667 | 44 |
Best1s/python_re | 15,341,623,216,068 | f7d811839f98410cf439b468cf1d39db7457e6b2 | cec0cdfbd057c2d2ba153aa6f163adb250565e9a | /python_web_spider/web_spider/data_Spider/random_ip.py | a6cf60215e6fd4c9e64193346e3b5efc350833e0 | [] | no_license | https://github.com/Best1s/python_re | 91117cd5b1f896c2b2f3987f1625663aa1952354 | abd526743c67a1bf72ddce39a0268b8e9fe15d26 | refs/heads/master | 2020-05-05T13:37:41.428881 | 2020-02-25T03:41:00 | 2020-02-25T03:41:00 | 180,086,606 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import random
def random_ip():
ip = str(random.randint(0,255)) + '.' + str(random.randint(0,255)) + '.' \
+ str(random.randint(0,255)) + '.' + str(random.randint(0,255)) + '\n'
return ip
def write_ip1(num):
n = 1
with open ('ip1','w+') as ip1:
while True:
ip1.write(random_ip())
n += 1
... | UTF-8 | Python | false | false | 617 | py | 120 | random_ip.py | 91 | 0.518639 | 0.463533 | 0 | 27 | 21.222222 | 77 |
uncharted-distil/simon | 15,264,313,778,932 | 50ed987345c7ac65707b8278b43ece4c810dd7ce | dc42c2638262502ce0cbc003d8cc6e8298ef5fac | /Simon/dev/graphutils/getFromDatalake.py | a92350ee7370e8ff5d287bd28d1c1a386f3741f8 | [
"MIT"
] | permissive | https://github.com/uncharted-distil/simon | 0d8722e7e031135571cdd09b7d8ffec844142ce8 | 26e4e54e6de455bde8ee1a24634d060e1ec7babb | refs/heads/master | 2021-12-01T11:33:42.697819 | 2021-03-25T03:47:59 | 2021-03-25T03:47:59 | 261,869,244 | 0 | 1 | MIT | true | 2021-03-25T03:47:59 | 2020-05-06T20:18:04 | 2021-01-27T14:53:30 | 2021-03-25T03:47:59 | 391,589 | 0 | 1 | 1 | null | false | false | import azure_utils.client as client
import graphutils.printSample as printSample
import graphutils.getConnection as gc
import graphutils.insertColumnDatasetJoin as insert
import pandas
import sys
import random
import pyodbc
def graphDoesntContainFile(filename,cnxn):
cursor = cnxn.cursor()
cursor.execute("SELECT to... | UTF-8 | Python | false | false | 1,696 | py | 50 | getFromDatalake.py | 27 | 0.706958 | 0.700472 | 0 | 63 | 25.936508 | 126 |
loloxwg/PythonExperiments | 10,934,986,780,085 | 3172b0d39c3b58d71dfb6cf01bda9a4bb3565b8e | d86c072cccd474a9e63498b7c143d30860a10852 | /experiment1/hello.py | 626ba563268a33d2253debb624392bc73d576000 | [] | no_license | https://github.com/loloxwg/PythonExperiments | 4003b95346f1ba85075d72006e1010377730efbb | 1812d377ca7f5211c890e8cc9e6b5e9102729d05 | refs/heads/main | 2023-02-15T23:16:05.740507 | 2020-12-29T09:12:46 | 2020-12-29T09:12:46 | 307,132,580 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
print("123.456\n"
"hello\n"
"who do you think i am?\n"
"'nice guy'\n"
"On,yes,i am a\n"
"nice guy")
| UTF-8 | Python | false | false | 131 | py | 102 | hello.py | 90 | 0.458015 | 0.412214 | 0 | 6 | 20.666667 | 32 |
panggggg/TDD | 1,752,346,668,382 | 5273cb4934621bd8f1a58f311a8f122236541f40 | 66bf25e702479199d357a2e4c827087220153c3a | /fizzbuzz.py | 63c034c6243f374b4d381ac6c784fbde89802e03 | [] | no_license | https://github.com/panggggg/TDD | 0e797b9380a46722c398d6344690c583d889bbb0 | 8803ced7b0df80acd58b65437f4d525b0231865e | refs/heads/master | 2023-08-11T22:35:02.995309 | 2021-09-27T09:05:24 | 2021-09-27T09:05:24 | 371,554,987 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # หาร3ลงตัว -> fizz , หาร5ลงตัว -> buzz ถ้าไม่ใช่ return ตัวเลข
# 3, 6, 9 -> fizz
# 5, 10, 20 -> buzz
# 15, 30, 45 -> fizzbuzz
# 1, 2, 4 -> number
def fizzbuzz(num):
result = get_result_buzz(num, str(num))
if is_divide_by_three(num):
result = "fizz"
result += get_result_buzz(num, "")
ret... | UTF-8 | Python | false | false | 990 | py | 19 | fizzbuzz.py | 16 | 0.501078 | 0.46444 | 0 | 50 | 17.56 | 63 |
mart00n/introto6.00 | 893,353,221,773 | a41d84af340805ab52607c710494320d8a0026ec | 776367ad388fc3452b2da5f70d1792d3b584e710 | /ps1/ps1c_redo.py | 0809cc4679588814ab38da85179410d5c8ef317e | [] | no_license | https://github.com/mart00n/introto6.00 | e3bc0f72ff47ca53e3180fc6234ebac3adc589d5 | ea0e828d063a94bf521bb0db471144bcb9e25d07 | refs/heads/master | 2021-01-10T07:17:24.702867 | 2017-02-12T17:44:15 | 2017-02-12T17:44:15 | 36,614,728 | 0 | 1 | null | false | 2017-01-29T16:26:50 | 2015-05-31T17:49:35 | 2017-01-14T21:52:17 | 2017-01-29T16:26:50 | 420 | 0 | 1 | 0 | Python | null | null | # mart00n
# 10/09/2016
eps = 0.01
bal = float(input('Enter balance: '))
intrate = float(input('Enter your annual interest rate: '))
monthrate = intrate / 12.0
low = bal / 12.0
hi = (bal * (1.0 + monthrate) ** 12.0) / 12.0
loopbal = bal
payment = (hi - low) / 2.0
while abs(loopbal) >= eps:
for i in range(1,13):
... | UTF-8 | Python | false | false | 689 | py | 12 | ps1c_redo.py | 12 | 0.560232 | 0.503628 | 0 | 27 | 24.444444 | 70 |
chaitanyanettem/code-challenges | 4,690,104,327,768 | 0b1c06bed49552be156e20c45dcec21f56f9c3a8 | 15303640ce88b6610367bab723ddb89c764b58d0 | /clever/authorization.py | fa5364180f974d699f829d521321aa094be0a006 | [] | no_license | https://github.com/chaitanyanettem/code-challenges | 693f862577b968d9f077b3dc248517d308df9143 | 13d4029c1f293e96c47f085e2659eda884dde1fa | refs/heads/master | 2021-05-16T02:56:41.772970 | 2014-05-01T13:56:03 | 2014-05-01T13:56:03 | 15,516,277 | 1 | 4 | null | false | 2017-01-25T06:52:44 | 2013-12-29T22:49:12 | 2014-05-01T13:56:14 | 2014-05-01T13:56:19 | 148 | 0 | 1 | 1 | C | null | null | header = {'Authorization' : 'Bearer DEMO_TOKEN'}
base_url = 'https://api.clever.com'
rel_uri = '/v1.1/sections' | UTF-8 | Python | false | false | 111 | py | 5 | authorization.py | 2 | 0.675676 | 0.657658 | 0 | 3 | 36.333333 | 48 |
whitney-mitchell/python--family-dictionary | 7,421,703,523,367 | 1755cd675b948ec7e45d1bd8e62ef843a50ba303 | e2cb86ba1d62c126663ac2c189cc3634d570407e | /family_dict.py | 17da2ef17a29b0977ff8c0b7b63799676c2a5202 | [] | no_license | https://github.com/whitney-mitchell/python--family-dictionary | 96baca8bacec144b4b35073fc95135e57701435e | 5856e5658c9911b75e01cd4033554bb334bc2cc2 | refs/heads/master | 2021-01-20T18:29:00.136635 | 2016-07-08T19:51:40 | 2016-07-08T19:51:40 | 62,907,458 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Define a dictionary that contains information about several members of your family.
my_family = { 'cat': { 'name': 'Georgia', 'age': 13 },
'mother': { 'name': 'Mary', 'age': 66 },
'boyfriend': { 'name': 'Jesse', 'age': 30 }
}
# Using a dictionary comprehension, produce output that looks like the f... | UTF-8 | Python | false | false | 805 | py | 1 | family_dict.py | 1 | 0.64472 | 0.631056 | 0 | 20 | 39.25 | 117 |
bernardoduran95/Coursera | 13,443,247,667,288 | ffef7a245ee1b16bf89de3c8975f844694fa644a | bcfe4be80262c90ab27c492ec931ed0dbcc156af | /Dados (2).py | 7665b18a1d84b5b307cedb9c0c5ef7d8fc7e3b06 | [] | no_license | https://github.com/bernardoduran95/Coursera | d000cf4afb302b39ae687fb705aaddfd9073b1b1 | f98c666166755d7fcbe35e4bc272b11d97ef44b0 | refs/heads/main | 2023-08-19T11:22:57.482284 | 2021-09-02T15:11:25 | 2021-09-02T15:11:25 | 402,456,923 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import random
respuesta = input("Desea lanzar los dados?(si/no): ")
suma = 0
while respuesta == 'si' or respuesta == 'SI':
n1 = random.randint(1,6)
n2 = random.randint(1,6)
suma = n1 + n2
print("Lanzamiento N°1: ", n1)
print("Lanzamiento N°2: ", n2)
print("La suma de los lanzamie... | UTF-8 | Python | false | false | 450 | py | 4 | Dados (2).py | 3 | 0.587054 | 0.558036 | 0 | 18 | 22.777778 | 59 |
underdogYnino/mysite | 7,249,904,819,678 | 5176b3d8a0b55c604e1f0ba2e2905b919e92eef4 | 26bd16e3c3a4386a7a7ebc598d01957746d71528 | /upload/migrations/0003_auto_20201129_1341.py | 69afd3420a0e1fe88a5894abb451e6cc120f9c09 | [] | no_license | https://github.com/underdogYnino/mysite | d035afe7e51db065f6ecb23416b37ae1fba7c0bc | 9aa75c4444388c11ae3579d2d201445bef079f03 | refs/heads/main | 2023-01-31T13:26:25.258192 | 2020-12-13T09:02:12 | 2020-12-13T09:02:12 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.1.3 on 2020-11-29 05:41
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('upload', '0002_auto_20201129_1338'),
]
operations = [
migrations.RenameModel(
old_name='upload_images',
new_name='uploadImag... | UTF-8 | Python | false | false | 341 | py | 19 | 0003_auto_20201129_1341.py | 8 | 0.589443 | 0.498534 | 0 | 17 | 19.058824 | 47 |
bawigga/opencv_sandbox | 10,788,957,866,828 | 4486c306d901bffc9eae6d50dd70d61eeb8492c7 | be5ba307a5715b2e48344f65954ec7168ac7f138 | /facial_detection/detect.py | dd176cb112482430073e9a4f32e05c0403e87de2 | [] | no_license | https://github.com/bawigga/opencv_sandbox | 8887aee94bcc9e08c4f654e65d6b4799b9b98055 | a760746d60d4c5220f6ba41a5a96aac1c3f95e8c | refs/heads/master | 2016-09-05T13:30:18.415066 | 2015-05-14T04:57:13 | 2015-05-14T04:57:13 | 35,590,900 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import numpy as np
import cv2
cascadeFile = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'haarcascade_frontalface_default.xml')
faceCascade = cv2.CascadeClassifier(cascadeFile)
cam = cv2.VideoCapture(0)
cam.set(3,640)
cam.set(4,480)
while(cam.isOpened()):
ret, frame = cam.read()
if ret=... | UTF-8 | Python | false | false | 878 | py | 1 | detect.py | 1 | 0.585421 | 0.546697 | 0 | 36 | 23.416667 | 110 |
aschmid/bats_pitch_implementation | 16,295,105,935,166 | b20a949b29ccf8b9946a37dd32fcbcff1b5b766f | e124852138d1125f342867007a944c82d49eff95 | /bats_pitch_web/utils.py | 2165ce74b8a442455e461561c50c7f05bd955855 | [] | no_license | https://github.com/aschmid/bats_pitch_implementation | 08f7129fdda0402bf6fd601a5f332767ea59364b | 785af065d18dde8b8534b63a81bd3774883b5d2b | refs/heads/master | 2021-01-21T23:23:26.838571 | 2017-01-29T23:19:30 | 2017-01-29T23:19:30 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from collections import OrderedDict
from bats_pitch.message_types import KNOWN_MESSAGE_TYPES
from bats_pitch.message_types.validator import get_message_type
__author__ = 'Dominic Dumrauf'
UNRECOGNIZED_LINES = 'Unrecognized Lines'
TOTAL_MESSAGES = 'Number of Lines'
def _get_line(l):
"""
Removes a leading 'S'... | UTF-8 | Python | false | false | 1,689 | py | 55 | utils.py | 48 | 0.649497 | 0.645352 | 0 | 54 | 30.277778 | 81 |
openstack/murano | 309,237,693,125 | 54857b19632f3bd5fc58210cff32103bf2167345 | b26f8032f3ffb23a5d8cb7e9d470d718fd505870 | /murano/tests/unit/dsl/test_gc.py | 92573244bc75f854785fd97e5417f74b67de4c86 | [
"Apache-2.0"
] | permissive | https://github.com/openstack/murano | e678ced3a52056317447aa90c7b3ae0d78d59a06 | c898a310afbc27f12190446ef75d8b0bd12115eb | refs/heads/master | 2023-08-29T11:52:02.745223 | 2023-05-09T04:19:01 | 2023-05-09T04:19:01 | 9,971,852 | 94 | 63 | Apache-2.0 | false | 2021-02-07T06:04:46 | 2013-05-10T01:10:31 | 2021-02-07T03:32:23 | 2021-02-07T03:32:49 | 19,347 | 105 | 64 | 0 | Python | false | false | # Copyright (c) 2016 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | UTF-8 | Python | false | false | 3,830 | py | 674 | test_gc.py | 262 | 0.602611 | 0.596084 | 0 | 107 | 34.794393 | 78 |
chahushui/zhihu-monitor | 14,044,543,094,147 | 996dd6a6a11d3e6a5e9da6e5583c1d1c52296c16 | b6419a3ddacdf528bce5382da315b48ca75af8fd | /api/app/resources/crawler.py | 742c8e60effe9ac0c463da397c470cbff2ce9f23 | [] | no_license | https://github.com/chahushui/zhihu-monitor | ca168237475f301ef18d0067dcfeaab6e414b574 | 35b1c7fc89a37ba19ecf5dc334d245c97e1ebd70 | refs/heads/master | 2023-03-31T20:52:12.726175 | 2021-03-21T07:48:53 | 2021-03-21T07:48:53 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# encoding: utf-8
import datetime
from copy import deepcopy
from app.crawler.crawler_task import update_data
from app.extensions import scheduler
from flask_restful import reqparse
from app.resources import BaseResource
class Crawler(BaseResource):
def __init__(self):
super(Crawler, ... | UTF-8 | Python | false | false | 936 | py | 32 | crawler.py | 20 | 0.66849 | 0.66302 | 0 | 27 | 32.851852 | 96 |
jumbokh/pyclass | 4,569,845,250,075 | ea614bd0ea875f5ea7ae3edd0559146fa6ece8b7 | 9fc768c541145c1996f2bdb8a5d62d523f24215f | /code/HomeWork/ch5/H_5_5.py | 90325c1d4155513c8efa8323fdad423ca6361f65 | [] | no_license | https://github.com/jumbokh/pyclass | 3b624101a8e43361458130047b87865852f72734 | bf2d5bcca4fff87cb695c8cec17fa2b1bbdf2ce5 | refs/heads/master | 2022-12-25T12:15:38.262468 | 2020-09-26T09:08:46 | 2020-09-26T09:08:46 | 283,708,159 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # H_5_5.py 功能:輸入頭和腳的數量,並判斷出有多少馴鹿及聖誕老人
# 輸入頭及腳的數量
head = int(input('請輸入頭的數量 : '))
foot = int(input('請輸入腳的數量 : '))
# 計算馴鹿和聖誕老人的數量
reindeer = (foot/2) - head
Santa = head - reindeer
# 將結果顯示出來
print('聖誕老人有 : %d 位' %(Santa))
print('馴鹿有 : %d 隻' %(reindeer)) | UTF-8 | Python | false | false | 403 | py | 194 | H_5_5.py | 181 | 0.649402 | 0.63745 | 0 | 10 | 24.2 | 37 |
zcmail/vbpp | 2,671,469,673,086 | d239cbb458a9d6a8278f224680ef2d2f1fb3ea7a | 401aae1a063e98e2c98ba366e1a17f36f2bedb5c | /tests/test_Gtilde.py | ae5f30574a76717f8bceee28d1b490f3c1a29ed7 | [
"Apache-2.0"
] | permissive | https://github.com/zcmail/vbpp | 66df32f2d6268a16e8033c7a7b6871ffa9040296 | 00668f3b84b62a9ecf1f580630e8bb59df38ba87 | refs/heads/master | 2022-04-20T01:44:59.946539 | 2020-01-08T16:51:02 | 2020-01-08T16:51:02 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import pytest
import tensorflow as tf
from vbpp.Gtilde import np_Gtilde_lookup, tf_Gtilde_lookup
class Data:
z = - np.concatenate([np.random.randn(101)**2,
10**np.random.uniform(0, 11, 1000),
np.r_[0.0, 0.001, 1.0, 1.001, 1.01, 10.0, 11.0]])
... | UTF-8 | Python | false | false | 1,628 | py | 5 | test_Gtilde.py | 5 | 0.617322 | 0.58231 | 0 | 48 | 32.916667 | 86 |
x1001000/BERT_NLU | 11,759,620,495,374 | da9677807e382ee419dc740b6bbca672cf8dd9b2 | e17fa313bbc98b82fa9166635d2c6b29f7cafae1 | /BERT_run_classifier.py | cdc7d0d251eb23ecde5467d89b88a2a9ef5de34a | [] | no_license | https://github.com/x1001000/BERT_NLU | 2c09c212fa829176f13864f81b01bd448bc07066 | d6e5769d7493730657d4434faaabbf3cd25703e1 | refs/heads/master | 2020-11-28T11:44:15.802489 | 2019-11-06T06:00:14 | 2019-11-06T06:00:14 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #run_classifier.py
class C(DataProcessor):
"""Processor for Demo data set."""
def __init__(self):
self.labels = set()
def get_train_examples(self, data_dir):
"""See base class."""
return self._create_examples(
self._read_tsv(os.path.join(data_dir, "train.tsv")), "... | UTF-8 | Python | false | false | 2,427 | py | 1 | BERT_run_classifier.py | 1 | 0.609806 | 0.597445 | 0 | 88 | 26.568182 | 81 |
HsOjo/PyJSONEditor | 19,301,583,038,442 | eb2c13c7a8d87f6f61cebe4ddfa10eceab952aac | 5b3090dece7d3d276922f53bfba18fdff3a5ba12 | /app/config.py | 78537a503e7bcc7c1423585e4736732f3ec285c5 | [
"MIT"
] | permissive | https://github.com/HsOjo/PyJSONEditor | 338978b36a545982bec7285ba1de9aa5704f39b0 | c2cf5398fa569ba0575048f3deebbf23028a61a1 | refs/heads/master | 2020-06-30T00:35:40.215143 | 2019-10-15T11:27:01 | 2019-10-15T11:27:01 | 200,668,517 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from app.base.config import ConfigBase
class Config(ConfigBase):
_protect_fields = [
'baidu_app_id',
'baidu_key',
]
baidu_app_id = ''
baidu_key = ''
| UTF-8 | Python | false | false | 183 | py | 12 | config.py | 10 | 0.562842 | 0.562842 | 0 | 10 | 17.3 | 38 |
siddharthcurious/Pythonic3-Feel | 10,222,022,200,262 | a9767ff8584097a72971d1e8644b417eb926a01d | 78d23de227a4c9f2ee6eb422e379b913c06dfcb8 | /LeetCode/846.py | 384d03f6466286d2c3fad09a5cdd6413b61dcffb | [] | no_license | https://github.com/siddharthcurious/Pythonic3-Feel | df145293a3f1a7627d08c4bedd7e22dfed9892c0 | 898b402b7a65073d58c280589342fc8c156a5cb1 | refs/heads/master | 2020-03-25T05:07:42.372477 | 2019-09-12T06:26:45 | 2019-09-12T06:26:45 | 143,430,534 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from collections import Counter
class Solution:
def isNStraightHand(self, hand, W):
"""
:type hand: List[int]
:type W: int
:rtype: bool
"""
L = len(hand)
if L%W != 0:
return False
counter = Counter(hand)
while counter:
... | UTF-8 | Python | false | false | 746 | py | 360 | 846.py | 343 | 0.41689 | 0.399464 | 0 | 33 | 21.636364 | 41 |
Saket-mangalam/ESwingGolf | 10,127,532,925,612 | 1c3cdba7454e74f22e5bef994c6eda258dbcac10 | bd1958595f8524b423beb3dbde0f3b93cdd1f790 | /Testset/matcher.py | ea9460d11d68af1a3b639c91e8abd796bbb83539 | [] | no_license | https://github.com/Saket-mangalam/ESwingGolf | 0d42a35e1248c9e8748b39aa93e2327519c2ef4d | 2f48d314431be498d7f29594b35dacd62071e823 | refs/heads/master | 2020-04-13T03:05:40.834055 | 2019-03-19T02:55:37 | 2019-03-19T02:55:37 | 162,921,387 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | ''' author: saket'''
import os
import utils
import time
import cv2
import numpy as np
import torch
from get_args import get_args
from datetime import datetime
from tqdm import tqdm
from process_functions import *
# different file names
left_image_suffix = "im0.png"
left_gt_suffix = "disp0GT.pfm"
right_image_suffix = "... | UTF-8 | Python | false | false | 6,405 | py | 19 | matcher.py | 15 | 0.58548 | 0.578767 | 0 | 150 | 41.706667 | 121 |
EmuKit/emukit | 11,347,303,604,540 | f9abdcec8a95b6c4d26dcf18ba0c92700746d3f2 | 3a9865cfc313b461727358ea427bab898e0c3bf1 | /tests/emukit/bayesian_optimization/test_mean_plugin_expected_improvement.py | 47d4fbba96c500cbcc93a8662b4dbf20ee16ca3e | [
"Apache-2.0"
] | permissive | https://github.com/EmuKit/emukit | 12df214366a989e85a03ead695ad36569fbf1f38 | 22e11c216840427d2d0766bddad25a0606e606bc | refs/heads/main | 2023-08-28T15:04:44.776523 | 2023-08-23T13:28:23 | 2023-08-23T13:28:23 | 147,290,595 | 274 | 66 | Apache-2.0 | false | 2023-08-23T13:28:25 | 2018-09-04T05:01:34 | 2023-08-15T06:35:23 | 2023-08-23T13:28:24 | 17,626 | 530 | 124 | 42 | Python | false | false | from unittest.mock import MagicMock
import numpy as np
import pytest
from emukit.bayesian_optimization.acquisitions.expected_improvement import (
ExpectedImprovement,
MeanPluginExpectedImprovement,
)
from emukit.core.interfaces import IModel, IModelWithNoise
from emukit.model_wrappers import GPyModelWrapper
... | UTF-8 | Python | false | false | 2,897 | py | 331 | test_mean_plugin_expected_improvement.py | 252 | 0.679213 | 0.648481 | 0 | 98 | 28.55102 | 111 |
mbusc1/Python-Projects | 9,749,575,798,908 | eb3776d3bb10a533b7ec11a83f63817290ba77f5 | 876c0fcfcc6201ab36e3eefe61feac5053acd642 | /program3/pcollections.py | 56955da32323255b3b3f103885bd97ffd5323daf | [] | no_license | https://github.com/mbusc1/Python-Projects | 10ca8b6c229681007ff9af84fcdf6b964213deff | 0d28b8f3f1d82fdce958172b84a06c384c0d5d7b | refs/heads/master | 2021-01-09T04:27:57.604419 | 2020-02-21T23:17:03 | 2020-02-21T23:17:03 | 242,245,375 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Submitter: mbuscemi(Buscemi, Matthew)
# Partner : wbuscemi(Buscemi, William)
# We certify that we worked cooperatively on this programming
# assignment, according to the rules for pair programming
import re, traceback, keyword
def pnamedtuple(type_name, field_names, mutable=False, defaults={}):
def show_lis... | UTF-8 | Python | false | false | 5,797 | py | 35 | pcollections.py | 22 | 0.574263 | 0.573055 | 0 | 160 | 35.23125 | 154 |
ignaciovillaverde/PythonInterpreter | 17,016,660,448,112 | c5a1cb6a2f39cf02c0a3394156a40f469afda692 | a7bf5a72c3565b2ecc48d2277f69c2e4c3b48dbe | /test/integrationTest/programs/if_else.py | 106d93faa34cb0fa16fc0931bd37d98ba7057d3e | [] | no_license | https://github.com/ignaciovillaverde/PythonInterpreter | 862a5ee1895487df20682746fbf7b3218fefe317 | 3a9c8b19d889d19dd6f10bda48772b7b38f075b3 | refs/heads/master | 2016-08-08T01:40:44.926259 | 2015-07-18T01:30:21 | 2015-07-18T01:30:21 | 37,035,841 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | a = "hola"
if a == "hola":
print "Correcto"
else:
print "Incorrecto"
a = 4
if a <= 4:
a = 5
print a
else:
print "Incorrecto"
a = "a"
b = "b"
if (a > b):
print "Incoreecto"
else:
print "Correcto"
if -4:
print "Correcto"
else:
print "Incoreecto"
| UTF-8 | Python | false | false | 253 | py | 74 | if_else.py | 67 | 0.600791 | 0.58498 | 0 | 21 | 11.047619 | 19 |
zrbruce/PythonCFD | 3,968,549,804,567 | cbdb3bbeea0670561e99cf23e5c588edd3e6061d | 0805f521d48e9a05138de022a320bf525b6377c7 | /Step5 - 2D Linear Convection.py | f34caa257717a27c3fb93e8b2c92bcf04da70e54 | [] | no_license | https://github.com/zrbruce/PythonCFD | 61a0ed80f3cc9c9a008979fcf5f6dd728eb6d814 | 6ecdb1a7ca73bda5c5cd281d7078fbe957c722e1 | refs/heads/master | 2021-06-03T19:34:43.474115 | 2016-03-12T19:16:54 | 2016-03-12T19:16:54 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #2D linear convection
from mpl_toolkits.mplot3d import Axes3D
import numpy
from matplotlib import pyplot
nx = 81
ny = 81
nt = 100
c = 1
dx = 2/(nx-1)
dy = 2/(ny-1)
sigma = 0.2
dt = sigma*dx
x = numpy.linspace(0,2,nx)
y = numpy.linspace(0,2,ny)
u = numpy.ones((ny,nx)) #create a 1xn vector of 1's
un = numpy.ones((ny... | UTF-8 | Python | false | false | 885 | py | 9 | Step5 - 2D Linear Convection.py | 8 | 0.544633 | 0.472316 | 0 | 40 | 21.15 | 99 |
anselus/server | 7,189,775,277,692 | 2e62bc9be1f73e54357d430e717d5d88b0f3c007 | 4290c4d9b75c12982b4e1fc1f9308998dece15fd | /utils/genkeypair.py | d0833ac780fc93607d610b62e4d98a5c9aef8ba2 | [] | no_license | https://github.com/anselus/server | 18f1a8ac78a6e0c662fb0531f4612317eb7e4780 | 6ea909ab0602205a176d09b82f4bc4891ac2990d | refs/heads/master | 2020-08-11T10:10:04.258015 | 2020-07-13T17:56:38 | 2020-07-13T17:56:38 | 214,547,219 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
import nacl.public
import nacl.secret
import nacl.utils
from os import path
import sys
def encode_file(file_name):
keypair = nacl.public.PrivateKey.generate()
pub_name = file_name + '.pub'
if path.exists(pub_name):
response = input("%s exists. Overwrite? [y/N]: " % pub_name)
if not res... | UTF-8 | Python | false | false | 839 | py | 10 | genkeypair.py | 6 | 0.644815 | 0.638856 | 0 | 35 | 22.942857 | 62 |
dStass/programming_challenges | 17,016,660,452,789 | 85e52f706f0e6fbbe0657933c1e12d389528f57a | c9849593c53060bec8fbcea6275c0ba8e68ac968 | /HackerRank/wendy_and_bob/string_divisibility.py | 1cf58fd80be008e5dc4bb887d7bbc00140b7cc5e | [] | no_license | https://github.com/dStass/programming_challenges | f6e21ad42f71f05656a5966af24749539ab436bb | e17097c1808e418fc28d8ee627b23340e381df58 | refs/heads/master | 2023-04-30T13:55:38.589234 | 2022-08-21T12:43:39 | 2022-08-21T12:43:39 | 203,951,732 | 0 | 0 | null | false | 2023-04-21T20:43:42 | 2019-08-23T07:55:39 | 2022-08-21T12:43:45 | 2023-04-21T20:43:42 | 5,513 | 0 | 0 | 4 | Python | false | false | def findSmallestDivisor(s, t):
divisible = isDivisible(s, t)
if not divisible:
return -1
for i in range(1, len(t) + 1):
divisor = t[:i]
if isDivisible(s, divisor):
return len(divisor)
return len(t)
def isDivisible(s, t):
s_split = s.split(t)
divisible =... | UTF-8 | Python | false | false | 544 | py | 119 | string_divisibility.py | 118 | 0.544118 | 0.536765 | 0 | 26 | 19.961538 | 35 |
ianagpawa/json_builder | 8,048,768,730,645 | 973efe0983c0dd45ab18b7c4a2217752b366fb51 | 646af1afd978c13858b576ad2d3e34a63a9e8866 | /Project.py | 195e4dc6e918a613dab0d23a312e5292c119fb8a | [] | no_license | https://github.com/ianagpawa/json_builder | 2c1d490f6d71f09204f55140cf28e45ee440de39 | 270e3e80072deb8063e0bf8b0ee14d3f18d4e545 | refs/heads/master | 2020-04-26T16:13:25.100980 | 2019-03-05T03:19:03 | 2019-03-05T03:19:03 | 173,671,391 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Project:
def __init__(self, title, summary, description, link, github, tech, name, date):
self.title = title
self.summary = summary
self.description = description
self.link = link
self.github = github
self.tech = tech
self.name = name
self.date =... | UTF-8 | Python | false | false | 654 | py | 7 | Project.py | 5 | 0.507645 | 0.507645 | 0 | 23 | 27.478261 | 84 |
schifzt/statistics_ML | 14,456,859,919,098 | 75f5a2d77cb7b75e9755ad3f7c122c9dd75bb4a0 | 11049c6f1a1b9bc223856fad6eefa2f5f4085463 | /exact-sparse-recovery/create_input.py | 42e5c49b98ecc7f0104a3c9cfb73f4e30770b592 | [] | no_license | https://github.com/schifzt/statistics_ML | 77341c32b5961ba959e98e34c74d22cca3b3fc77 | 2c61b0fdbbd785c8ecc4d666d24f94eb7c445f91 | refs/heads/master | 2023-03-03T19:16:09.337416 | 2023-02-17T15:48:27 | 2023-02-17T15:48:27 | 200,043,161 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
# -------------------------------------------------------------------------
# (rho, alpha)がrho < alphaを満たすならば、L0ノルム最小化により再構成可能
rho = 0.3 # sparsity parameter
alpha = 0.3 # dim_measurement / dim_signal
dim_signal = 100
dim_measurement = int(alpha*dim_signal)
is_integer = False
# -----------------... | UTF-8 | Python | false | false | 1,945 | py | 18 | create_input.py | 16 | 0.509742 | 0.491838 | 0 | 73 | 25.013699 | 91 |
AK-1121/code_extraction | 12,781,822,702,167 | 4520798c8511e0e147216c5a61eb2225bb1567a3 | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_8536.py | cc151469c0821398d71d450da621e1753f8907f5 | [] | no_license | https://github.com/AK-1121/code_extraction | cc812b6832b112e3ffcc2bb7eb4237fd85c88c01 | 5297a4a3aab3bb37efa24a89636935da04a1f8b6 | refs/heads/master | 2020-05-23T08:04:11.789141 | 2015-10-22T19:19:40 | 2015-10-22T19:19:40 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Python: Check if one dictionary is a subset of another larger dictionary
all(item in superset.items() for item in subset.items())
| UTF-8 | Python | false | false | 132 | py | 29,367 | python_8536.py | 29,367 | 0.772727 | 0.772727 | 0 | 2 | 65 | 74 |
cdbethune/goat-d3m-wrapper | 8,031,588,857,069 | e6c11f1b90767de9a69a3c134384d242763277b1 | 964ee35103d97cb09c3c35e70f5f7d73a6929cdf | /GoatD3MWrapper/reverse.py | 4811336ecff2ed7db6a6d667f992e178f3f019b0 | [
"MIT"
] | permissive | https://github.com/cdbethune/goat-d3m-wrapper | a4d1aa9423d1eda6f123f67a9a0d4b4636cc6d0e | 7e033a555cd1db3e3b029fdfa476c4f8f0db78c9 | refs/heads/master | 2020-04-07T17:20:44.211660 | 2019-11-22T16:47:13 | 2019-11-22T16:47:13 | 158,566,061 | 0 | 0 | null | true | 2018-11-21T15:07:43 | 2018-11-21T15:07:43 | 2018-10-30T00:57:58 | 2018-10-30T00:57:56 | 81 | 0 | 0 | 0 | null | false | null | import os
import sys
import subprocess
import collections
import pandas as pd
import requests
import time
import typing
from json import JSONDecoder
from typing import List, Tuple
from d3m.primitive_interfaces.transformer import TransformerPrimitiveBase
from d3m.primitive_interfaces.base import CallResult
from d3m imp... | UTF-8 | Python | false | false | 12,163 | py | 4 | reverse.py | 4 | 0.603963 | 0.59015 | 0 | 256 | 46.511719 | 134 |
hyh-sherry/python-challenge | 12,197,707,159,202 | 1176755564806ca77b20bd9b50ed3c6f8a3b3b94 | 12d8399723ff086e57152c41faf54df151adc2d8 | /PyPoll/main.py | 99d70837bf70841649ca6e0f40a43957f42d25b6 | [] | no_license | https://github.com/hyh-sherry/python-challenge | 222de41f783aea42ed10904b6d6d081d40f81018 | 623b94d6e176c80bee7b6d996d7586c5f39a830e | refs/heads/master | 2020-06-01T15:04:40.403887 | 2019-06-12T02:56:46 | 2019-06-12T02:56:46 | 190,826,652 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #Create a Python script that analyzes the votes and calculates each of the following:
#The total number of votes cast
#A complete list of candidates who received votes
#The percentage of votes each candidate won
#The total number of votes each candidate won
#The winner of the election based on popular vote.
import os... | UTF-8 | Python | false | false | 3,209 | py | 2 | main.py | 2 | 0.555002 | 0.54129 | 0 | 84 | 37.214286 | 102 |
chati757/python-learning-space | 15,822,659,545,412 | ebde30fdb3bd051881397dbadb360ff1a5d12d51 | 47128c6ff1277eedf851670d33f7a288fdfe2246 | /selenium/chrome.py | 7cd84bf4f18849bf1475ec1e23dda9d08bbe4465 | [] | no_license | https://github.com/chati757/python-learning-space | 5de7f11a931cf95bc076473da543331b773c07fb | bc33749254d12a47523007fa9a32668b8dc12a24 | refs/heads/master | 2023-08-13T19:19:52.271788 | 2023-07-26T14:09:58 | 2023-07-26T14:09:58 | 83,208,590 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from selenium import webdriver
import time
from selenium.webdriver.remote.remote_connection import LOGGER, logging
LOGGER.setLevel(logging.WARNING)
'''
https://chromedriver.chromium.org/downloads
โหลดมาแล้วสร้างที่อยู่สักที พร้อมกับ set path env (system level) ในที่นี้ Ex.C:\chrome_webdriver\chromedriver.exe
ทดสอบ run... | UTF-8 | Python | false | false | 937 | py | 387 | chrome.py | 312 | 0.779172 | 0.776662 | 0 | 20 | 38.9 | 113 |
jorgemarpa/HiTS-local | 12,240,656,797,639 | 6364fbb4dfaff7a5a03b0d54d9cf7906bbd7bb0d | 69e0d1fd511b0c15d7009bdc1f71ec4eb0e7e8fc | /download_sdss_spec.py | f51d7ed81a0345fd7362119d8205a2bdeafffca0 | [] | no_license | https://github.com/jorgemarpa/HiTS-local | a46773b12246ea6be08b2ec76fa5415d4f1125dd | a6e5baefa08ac093af8a0d2baa5263c7aad17ff4 | refs/heads/master | 2019-01-01T02:56:49.699492 | 2018-11-01T01:18:09 | 2018-11-01T01:18:09 | 45,215,511 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pyfits
import numpy as np
import urllib
import astropy
import astropy.cosmology
import astropy.units as u
import sdss_reader
import os
import pylab
import sys
from astroquery.irsa_dust import IrsaDust
import astropy.coordinates as coord
import astropy.units as u
if len(sys.argv)<3:
id0=0
id1=1000
... | UTF-8 | Python | false | false | 10,414 | py | 32 | download_sdss_spec.py | 1 | 0.589015 | 0.553006 | 0 | 327 | 30.834862 | 264 |
mjsphdev/my_expenses | 3,092,376,493,772 | c34ac04d01fb59a1e7d13a6144ac76ff9736e58e | 36c4fd01715ee2b495f0540e4a91709e513f407c | /main/migrations/0002_billspayments_month.py | 99e9d0b33cf45f59d817f8ad2bf9fc0a78755a33 | [] | no_license | https://github.com/mjsphdev/my_expenses | 41f72f8f1cb240d039a769814e2259798c83421a | 4b2b7485a9eaa8c7460aba3ff7c34121e27c3346 | refs/heads/main | 2023-07-23T04:52:18.517589 | 2021-08-18T03:53:46 | 2021-08-18T03:53:46 | 396,293,312 | 0 | 0 | null | false | 2021-08-18T03:53:47 | 2021-08-15T09:21:23 | 2021-08-15T09:28:23 | 2021-08-18T03:53:46 | 6,709 | 0 | 0 | 0 | CSS | false | false | # Generated by Django 3.2.5 on 2021-08-05 03:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='billspayments',
name='month',
... | UTF-8 | Python | false | false | 407 | py | 30 | 0002_billspayments_month.py | 18 | 0.589681 | 0.525799 | 0 | 18 | 21.611111 | 81 |
TeraMatrix/unmp-m2m | 1,425,929,154,651 | 53482ddfe33154db27edff41fbd3f8e8ad407965 | 384daeb81f238ef6a3b09e66a8f77ffab653a1d2 | /htdocs/advanced_status_controller.py | d46a17131d0a9cff0aea6cc2f6e097adc59011ba | [] | no_license | https://github.com/TeraMatrix/unmp-m2m | a446fae084ffdfc9b1c210eac3a93cc5b2eeb23f | a962173a503e19d60dd56a67d0b7c12c9a55bf35 | refs/heads/master | 2021-05-01T10:46:46.721522 | 2014-06-04T23:47:19 | 2014-06-04T23:47:19 | 19,937,512 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python2.6
from datetime import datetime
from datetime import timedelta
from json import JSONEncoder
from advanced_status_bll import AdvancedStatusBll
from advanced_status_view import AdvancedStatusView
# from common_controller import *
# from nms_config import *
# from odu_controller import *
global bll_ob... | UTF-8 | Python | false | false | 7,833 | py | 167 | advanced_status_controller.py | 110 | 0.594281 | 0.587642 | 0 | 230 | 33.056522 | 115 |
ParthasarathySubburaj/Algorithms-Data-Structures-specilization | 8,632,884,310,488 | 226aeacde2239209028d4eca85f14c68864ac04e | 45f843360039a162d6b7daad963bc0accdbcb2c3 | /Algorithmic_Tool_Box/week6_dynamic_programming2/knapsack.py | 9b557113111f7bd3d99c2f1a240b0baee7554715 | [] | no_license | https://github.com/ParthasarathySubburaj/Algorithms-Data-Structures-specilization | b41c4fd07d34e56f2d98f28867eeed23761da7a4 | 78794fbb3c2b907ea91a188d44d3424ea77395e5 | refs/heads/master | 2022-04-12T19:35:11.173645 | 2020-03-15T15:26:30 | 2020-03-15T15:26:30 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Uses python3
import sys
import numpy as np
def optimal_weight(W, w):
# write your code here
matrix = np.full((W+1, len(w)+1),0, dtype=int)
for i in range(1, len(w)+1):
for weight in range(1, W+1):
matrix[weight, i] = matrix[weight, i-1]
if w[i-1] <= weight:
... | UTF-8 | Python | false | false | 622 | py | 24 | knapsack.py | 23 | 0.517685 | 0.496785 | 0 | 20 | 30.1 | 61 |
prerna-khanna/torchtuples | 283,467,865,834 | 58dcdb4744f9f2e26ac9328557b93bcd7ba8e794 | fd7803084ffa8258244605c42140f85fec6d5d2a | /torchtuples/testing.py | c04cee2ad48344f96912ebb3f5134ace3585b4f9 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | https://github.com/prerna-khanna/torchtuples | c1ab42f30f2b120fec840165f0b59119e7f7d41c | 1e02f1f8ed4f4758796e3d77573af321a7e5ca09 | refs/heads/master | 2020-06-28T23:45:39.255464 | 2019-08-03T13:03:29 | 2019-08-03T13:03:29 | 200,374,627 | 0 | 0 | BSD-2-Clause | true | 2019-08-03T12:45:30 | 2019-08-03T12:45:29 | 2019-07-16T10:47:45 | 2019-07-15T14:26:50 | 420 | 0 | 0 | 0 | null | false | false | import numpy as np
import torch
from torchtuples.tupletree import TupleTree, tuplefy
def assert_tupletree_equal(a, b, check_dtypes=True):
assert type(a) == type(b) == TupleTree, 'Not TupleTree'
assert a.numerate() == b.numerate(), 'Not same structure'
assert a.types() == b.types(), 'Not same types'
i... | UTF-8 | Python | false | false | 696 | py | 20 | testing.py | 14 | 0.591954 | 0.591954 | 0 | 19 | 35.684211 | 85 |
cambridge-cares/TheWorldAvatar | 15,238,543,982,211 | 50958c249efc596666e92ba575a073f7b0bd042b | 65c84146c9f3871f54fe51ab437bd14927ade706 | /Agents/AirQualityAgent/agent/dataretrieval/readings.py | 01dc52d7df55298bec0c16644cdf777bc1c94123 | [
"MIT"
] | permissive | https://github.com/cambridge-cares/TheWorldAvatar | 3a227c629acb10b9be7effe58696aef48b27dd21 | 01a7d108754e0249d8d3b5b75708345c399c1ee9 | refs/heads/main | 2023-08-21T11:05:09.147655 | 2023-08-18T07:46:57 | 2023-08-18T07:46:57 | 345,141,689 | 57 | 26 | MIT | false | 2023-09-13T14:16:57 | 2021-03-06T16:33:07 | 2023-09-13T10:16:00 | 2023-09-13T14:16:57 | 433,486 | 48 | 19 | 149 | Java | false | false | ################################################
# Authors: Markus Hofmeister (mh807@cam.ac.uk) #
# Date: 05 Apr 2022 #
################################################
# The purpose of this module is to provide functions to retrieve
# readings data from KG
import re
import datetime as... | UTF-8 | Python | false | false | 9,087 | py | 9,300 | readings.py | 4,926 | 0.60394 | 0.598767 | 0 | 193 | 46.082902 | 119 |
HugheHuang/core-python-applications-programming-3rd-edition- | 3,779,571,222,707 | f3052ebb556f12a9468c7834e90c7fc594231e2a | 749ac3de7856dba11693181061fe9d9cc1c5d840 | /CH2/tsUclnt.py | 35f4e49a5c7b47a8e452f6bd029b826049de373c | [] | no_license | https://github.com/HugheHuang/core-python-applications-programming-3rd-edition- | 08a238901b948f3335543dd72741b927b35b49f1 | 2b54fbcbf01d9f36d2e1e18cc40d7be3f13a7557 | refs/heads/master | 2021-01-20T02:53:14.628435 | 2017-04-26T09:19:47 | 2017-04-26T09:19:47 | 89,461,688 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__title__ = tsUclnt.py
__author__ = Hughe
__time__ = 2017-04-22 22:36
"""
from socket import *
HOST='localhost'
PORT=21567
BUFSIZ=1024
ADDR=(HOST,PORT)
udpClnSock=socket(AF_INET,SOCK_DGRAM)
while True:
data=raw_input('> ')
if not data:
... | UTF-8 | Python | false | false | 520 | py | 22 | tsUclnt.py | 19 | 0.576923 | 0.534615 | 0 | 30 | 15.4 | 41 |
mavrick202/troposphere | 9,955,734,223,007 | a207d72df7a67b9585a3b2c8d11a99d4b4123e0d | 8ee47a223b9e245fc6744802278d42b8a7062716 | /troposphere/dlm.py | a3a95083b810b5138e2ff2f04b7d1b5dc8f36701 | [
"BSD-2-Clause",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | https://github.com/mavrick202/troposphere | 14693be8920b3d4ac6e7c098c1f6f1674485e7c8 | 4eb213162cd8018fe0f82dc9597cc306ade49b04 | refs/heads/master | 2020-11-25T10:42:36.993519 | 2019-12-08T22:32:03 | 2019-12-08T22:32:03 | 228,624,641 | 1 | 8 | BSD-2-Clause | true | 2019-12-17T13:38:51 | 2019-12-17T13:38:50 | 2019-12-17T08:04:10 | 2019-12-11T15:17:58 | 2,299 | 0 | 0 | 0 | null | false | false | # Copyright (c) 2015, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from . import AWSObject, AWSProperty, Tags
from .validators import (integer, boolean)
VALID_STATES = ('ENABLED', 'DISABLED')
VALID_RESOURCE_TYPES = ('VOLUME')
VALID_INTERVALS = (2, 3, 4, 6, 8, 12, 24)
VALID_I... | UTF-8 | Python | false | false | 2,296 | py | 220 | dlm.py | 199 | 0.601916 | 0.596254 | 0 | 90 | 24.511111 | 62 |
WooWan/Koala-Algorithm | 17,016,660,458,356 | d142ca42e8225e318d7c743ebc4a76378fbd95bd | 44335d7e1b2d40298ecac50a4192adfe7a518552 | /study/week2/team1/BOJ_2156_우창완.py | ed1356b0e454c1c0a35c7f9bde36a7f88d0014c9 | [] | no_license | https://github.com/WooWan/Koala-Algorithm | d9ffb96cf68b32eb976f28a02a61014cd691ac97 | 65d8c38e80edb56a976824d28f5afd4cc9cbff0b | refs/heads/master | 2023-04-21T05:02:17.853995 | 2021-05-26T05:33:25 | 2021-05-26T05:33:25 | 345,525,519 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
n= int(input())
arr=[0]*(n+3)
dp=[-1]*(n+3)
for i in range(n):
arr[i]=int(sys.stdin.readline())
dp[0]=arr[0]
dp[1]=arr[1]+arr[0]
dp[2]= max(arr[0]+arr[1],arr[0]+arr[2],arr[1]+arr[2])
for i in range(3,n):
dp[i]=max(dp[i-1], arr[i]+dp[i-2], arr[i]+arr[i-1]+dp[i-3])
print(dp[n-1])
| UTF-8 | Python | false | false | 295 | py | 62 | BOJ_2156_우창완.py | 62 | 0.559322 | 0.484746 | 0 | 15 | 18.666667 | 60 |
s0217391/DifferentProjects | 18,004,502,927,859 | 7256fec4de81f1042fa3535723bb5a6a1517d079 | bc167f434158921bcf2c678155c5cdfec1c9b0c9 | /PI_code/simulator/behaviourGeneration/group/behav150.py | eef84581a8f638db5a280805c63202488c2e68a2 | [] | no_license | https://github.com/s0217391/DifferentProjects | 6450efc89c64ecd21b86c705737e89e5c69433a6 | 7f4da153660817b6cbf72d2e823aa29c0c2f95a9 | refs/heads/master | 2021-01-17T02:58:46.219240 | 2015-05-26T22:45:46 | 2015-05-26T22:45:46 | 34,995,164 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
import sys
def compute(prey, otherHunter, dist):
temp0 = otherHunter[0] * prey[0]
temp1 = min( dist , prey[0] )
temp1 = otherHunter[0] - otherHunter[1]
temp1 = prey[1] - otherHunter[0]
return [ otherHunter[0] , dist ]
| UTF-8 | Python | false | false | 242 | py | 969 | behav150.py | 924 | 0.669421 | 0.619835 | 0 | 9 | 25.888889 | 40 |
huhaiqng/YWSystemB | 16,217,796,520,125 | 15721fa6cd33abd41f5f84af091b2425cd1c948b | 23f754a39b996ad3e50e539ac1ea88217545df8b | /app/models/project_rabbitmq.py | bf5dc53a46fe71f5976f087c5dcfdae106856856 | [] | no_license | https://github.com/huhaiqng/YWSystemB | 576b0310cfe49086eaafb99eaa83042621d6fab5 | cf601fe4b97e96187e66a084a7e43a0cd259e92f | refs/heads/master | 2022-12-11T06:19:46.025055 | 2021-04-27T07:48:46 | 2021-04-27T07:48:46 | 245,122,835 | 0 | 0 | null | false | 2022-12-08T11:57:56 | 2020-03-05T09:40:26 | 2021-04-27T07:49:06 | 2022-12-08T11:57:54 | 1,386 | 0 | 0 | 11 | Python | false | false | from django.db import models
from django.utils import timezone
from .instance_rabbitmq import RabbitmqInstance
from .project import Project
# Rabbitmq
class ProjectRabbitmq(models.Model):
instance = models.ForeignKey(RabbitmqInstance, on_delete=models.PROTECT, blank=True)
env = models.CharField('环境', max_leng... | UTF-8 | Python | false | false | 615 | py | 136 | project_rabbitmq.py | 132 | 0.762226 | 0.747049 | 0 | 14 | 41.357143 | 88 |
mrjeffstevenson3/mmimproc | 17,085,379,943,650 | 9839d30e1ad89a0874c8ee1ad93577d8adcb3f57 | b83de7b1c7fa7cecd5cdc63554902f4b5746fceb | /mmimproc/qt1/spdft.py | e3e33b5ff05299570141fcabb26f871522af32a1 | [] | no_license | https://github.com/mrjeffstevenson3/mmimproc | 195c2d660e041c68ea9b9db524c444ee111291e0 | 1aed4b1ce0ef5606a702af02b341ce3291a86283 | refs/heads/master | 2021-11-27T12:21:59.356889 | 2021-09-15T20:06:11 | 2021-09-15T20:06:11 | 171,966,939 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Python interface to spdft.m
"""
from StringIO import StringIO
import matlab.engine
from matlab import double as mdouble
from mmimproc.utils import getnetworkdataroot, mmimproc_dir
def fit(X, Y):
"""
:param X: multi dim
:param Y: flip angle
:return:
"""
Xm = mdouble(X.tolist())
Ym = mdo... | UTF-8 | Python | false | false | 788 | py | 461 | spdft.py | 264 | 0.639594 | 0.63198 | 0 | 31 | 24.387097 | 73 |
JetBrains/intellij-community | 2,851,858,319,832 | aaed8a7f5bc98d0a9128be52cc5161529a706a20 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/inspections/PyTypeCheckerInspection/NewTypeAsParameter.py | 6f4d22f037cbd040e55262dc3170ea7dd6e22ff6 | [
"Apache-2.0"
] | permissive | https://github.com/JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | false | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | 2023-09-12T03:37:30 | 2023-09-12T06:46:46 | 4,523,919 | 15,754 | 4,972 | 237 | null | false | false | from typing import NewType
UserId = NewType("UserId", int)
def get_user(user: UserId) -> str:
pass
get_user(UserId(5))
get_user(<warning descr="Expected type 'UserId', got 'LiteralString' instead">"John"</warning>)
get_user(<warning descr="Expected type 'UserId', got 'int' instead">4</warning>) | UTF-8 | Python | false | false | 303 | py | 127,182 | NewTypeAsParameter.py | 70,394 | 0.709571 | 0.70297 | 0 | 11 | 26.636364 | 95 |
jameskschull/phylo | 12,987,981,137,939 | d6ca812f1833f5d49528020bd5529c14b0f899a3 | c85f3f1cadebefde31c7efa4a76c545a2ab65ce5 | /scripts/compare_to_query.py | fc26223e6aab01af52701621e48552bb005d8b11 | [] | no_license | https://github.com/jameskschull/phylo | 4e0e33ab893cab530da0483a39f1dd48801333fe | f2e6f5a3a85dfcecbcdfafad34aed419ba073602 | refs/heads/master | 2021-07-21T18:56:55.615258 | 2018-10-01T03:10:39 | 2018-10-01T03:10:39 | 132,056,354 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Given a file containing query insertions/deletions (hg38 reference), compares
# to provided query and writes results to file.
# There are two cases:
# 1. infile contains mm10 or canFam3 deletions. In this case, we search canFam3 or mm10
# (respectively), writing to the outfile any loci that are not deleted in the o... | UTF-8 | Python | false | false | 13,443 | py | 11 | compare_to_query.py | 10 | 0.655508 | 0.639366 | 0 | 461 | 28.16269 | 196 |
Henriquefalconi/PROCESSAMENTO-DE-IMAGENS | 18,408,229,848,126 | 5279297ce24b16de4ae3b178dc01049013c1786a | 2ebfea87e5970229db5de52b6a0709b9fc9877bc | /Processamento de Imagens/P2.py | 005ffd0c3c279cff419e40fb4bb21a991ee78d41 | [] | no_license | https://github.com/Henriquefalconi/PROCESSAMENTO-DE-IMAGENS | dd7714780a050441a59f2d3273ba7b11dc40a5fd | 7c93b802cce64d40f7d918e40f66b211dcf3d697 | refs/heads/master | 2020-08-06T09:26:44.015825 | 2019-10-05T18:13:50 | 2019-10-05T18:13:50 | 212,923,686 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cv2
im = cv2.imread('MULHERES.jpg')
cv2.imshow('imagem',im)
cv2.waitKey(0)
cv2.destroyAllWindows()
| UTF-8 | Python | false | false | 107 | py | 9 | P2.py | 9 | 0.738318 | 0.682243 | 0 | 6 | 16.833333 | 31 |
Guaxinim5573/audacious-player | 6,476,810,688,582 | ac997210f727cef75ca4f791476f27407d53411c | 9d3123cd4ca0f38f55488e8446681ea0dd018948 | /audtool/__init__.py | 38005601c897e3e947cdabb62140e650a9ec4e7f | [
"MIT"
] | permissive | https://github.com/Guaxinim5573/audacious-player | deffdef48b7feae495ab3cf0b07c45e79504358c | 7bcd2afdd91bb18a41fb70500aaf76eaa17da837 | refs/heads/master | 2023-01-03T13:13:03.176366 | 2020-10-28T03:09:17 | 2020-10-28T03:09:17 | 307,890,542 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import subprocess
import logging
logger = logging.getLogger(__name__)
# Run a command line command and returns stdout
def _run(command):
result = subprocess.run(command, check=True, stdout=subprocess.PIPE, text=True)
result.stdout = result.stdout[:-1]
return result.stdout
def is_playing():
result = subprocess.ru... | UTF-8 | Python | false | false | 1,473 | py | 7 | __init__.py | 4 | 0.684997 | 0.68296 | 0 | 55 | 25.8 | 91 |
Ruitongliu224/590-CODES | 14,302,241,100,897 | 2046c75646b8815c5bd9312b415cca94765e5116 | 834b826a2dda410e43e7e16315508ee26775dbed | /LECTURE-CODES/WEEK8/WIKI/02-wiki-topic-search.py | 8081e5ca4c44cee1f77d2dccc061f9d8a0cc10e6 | [] | no_license | https://github.com/Ruitongliu224/590-CODES | 92249ed7ad995bc3b8ccdc07167bc3ba776ce7e6 | 43f581664888efcaa8495c27e6d150da5abfe33e | refs/heads/main | 2023-08-28T04:17:53.995551 | 2021-11-06T18:09:36 | 2021-11-06T18:09:36 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
# conda install -c conda-forge wikipedia
# conda install -c conda-forge wordcloud
# pip install wikipedia_sections
import wikipedia
# see https://meta.wikimedia.org/wiki/List_of_Wikipedias
# for langages prefixes
# wikipedia.set_lang('es') #es=spanish en=english
#--------------------------
# USER INPUTS
#-------... | UTF-8 | Python | false | false | 2,714 | py | 45 | 02-wiki-topic-search.py | 38 | 0.595431 | 0.588799 | 0 | 112 | 23.232143 | 133 |
jxylon/BCD2017 | 5,437,428,631,162 | 672b61e4e3c15e47ba7a6072ce17c0eda683d6a6 | e9d3c8966aa8414d4103e5d9a9e54494d4d59bd3 | /read.py | ab7c70108da8b42ddd31a103bca093de3994bcaa | [] | no_license | https://github.com/jxylon/BCD2017 | 5561f1def4314275805beb6be31c0ee35e2a1931 | af5a278d3247ab423857e2dc4a2fe57d6cf32abb | refs/heads/master | 2021-05-16T07:33:10.797171 | 2019-07-25T12:27:44 | 2019-07-25T12:27:44 | 103,833,773 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # 读取文件内容
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from itertools import chain
def read_file(i):
# 文件名
fn = ['dsjtzs_txfz_training_sample', 'dsjtzs_txfz_test_sample', 'dsjtzs_txfz_training', 'dsjtzs_txfz_test1']
index_name = ['a1', 'a2', 'a3', 'a4']
# 读取文件
... | UTF-8 | Python | false | false | 1,859 | py | 4 | read.py | 3 | 0.466935 | 0.433583 | 0 | 67 | 23.985075 | 112 |
nordic-institute/X-Road-tests | 10,402,410,834,385 | ad7832dc33fcc15f59f201346fdd1f3e027da101 | c01a58ecd6614128e3c29a70e3e768b220a2a4a2 | /common/xrd-ui-tests-python/tests/xroad_member_access_229/xroad_member_access.py | c35f0be1594007630296e01e9291ccc1a3b05a4d | [
"MIT"
] | permissive | https://github.com/nordic-institute/X-Road-tests | 772a6d7485606c1f10b61a1260b8fb66111bf0be | e030661a0ad8ceab74dd8122b751e88025a3474a | refs/heads/develop | 2021-06-03T01:38:20.542859 | 2019-03-18T12:16:18 | 2019-03-18T12:16:18 | 125,643,677 | 2 | 3 | MIT | false | 2018-06-14T15:09:21 | 2018-03-17T15:36:32 | 2018-06-12T17:53:11 | 2018-06-14T15:09:21 | 11,233 | 0 | 0 | 0 | Python | false | null | # coding=utf-8
from view_models import clients_table_vm, popups
from helpers import xroad, soaptestclient
from tests.xroad_add_to_acl_218 import add_to_acl
# These faults are checked when we need the result to be unsuccessful. Otherwise the checking function returns True.
faults_unsuccessful = ['Server.ServerProxy.Ac... | UTF-8 | Python | false | false | 5,722 | py | 383 | xroad_member_access.py | 329 | 0.62618 | 0.611325 | 0 | 114 | 49.192982 | 127 |
DrCrow89/meine_python_uebungen | 9,311,489,105,618 | bc2a47c851ea5a8923e2c7a3a4fec708c79b05d5 | 564154d8bf9899495f8e92727f7279906894382c | /EinstiegInPython/u_modul.py | a759aaf8a9a83e9b1125e21ef589d3862e2297ae | [] | no_license | https://github.com/DrCrow89/meine_python_uebungen | 2d690fe5862ba83466e8e8f81ca63248f81bb50d | 0a07585451ecd3ab3d9798912cae62d8fac21639 | refs/heads/master | 2020-04-17T09:44:58.400529 | 2019-05-21T21:56:22 | 2019-05-21T21:56:22 | 166,471,684 | 0 | 0 | null | false | 2019-05-21T21:56:23 | 2019-01-18T20:58:29 | 2019-05-19T08:15:45 | 2019-05-21T21:56:22 | 758 | 0 | 0 | 0 | Python | false | false | import u_modul_finanz
# Ausgabe
print("Es ergibt sich ein Steuerbetrag von", u_modul_finanz.steuer(1800), "Euro")
print("Es ergibt sich ein Steuerbetrag von", u_modul_finanz.steuer(2200), "Euro")
print("Es ergibt sich ein Steuerbetrag von", u_modul_finanz.steuer(2500), "Euro")
print("Es ergibt sich ein Steuerbetrag von... | UTF-8 | Python | false | false | 360 | py | 42 | u_modul.py | 37 | 0.747222 | 0.702778 | 0 | 6 | 59 | 81 |
Cookinne/Mario | 6,004,364,316,507 | c6ce4873f37862ccf294668725d097b5020ded4a | 27c2fe12518a9f487b7fd5495439709a3c14507a | /Mario.py | 664a7eadece3078f51c0397bdf2be9cf8791d301 | [] | no_license | https://github.com/Cookinne/Mario | 75f522ad249cbedc28d5bbea84850bc3d3c8b63b | 89f614a31443cbfdb682f9f2a32f2f0528d56946 | refs/heads/master | 2022-03-27T08:46:44.159792 | 2019-12-23T05:25:58 | 2019-12-23T05:25:58 | 229,912,230 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import sys
import api.analyze
from api.ip import ipAnalysis
from lib.data import config
from core.webserver import webserver
def check_env():
config['ip'] = ipAnalysis.get_local_ip()
def start():
if get_mod() == "python":
results = api.analyze.analyze_suricata(
"files/suricata/... | UTF-8 | Python | false | false | 585 | py | 10 | Mario.py | 6 | 0.591453 | 0.589744 | 0 | 31 | 17.870968 | 64 |
Grap3fruit22/ChessEngine | 876,173,360,772 | 5475a0a73bd18568e540dcab76fabe540ed77f1c | 2bf3fff514709e93c2491989c2babc31f537655e | /BFTestBasic.py | 09385ac313a8244e47c677ad27e60d0b6154ee8a | [] | no_license | https://github.com/Grap3fruit22/ChessEngine | ff1132b34f188b9bf8e910d97ebb8f93bfbc29f4 | bc60792a153d4a9cdcf860824e539e67de8f510a | refs/heads/master | 2020-05-05T03:25:35.791516 | 2019-05-07T17:07:55 | 2019-05-07T17:07:55 | 179,671,641 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 15 17:38:15 2019
@author: 44775
"""
import chess
import chess.syzygy
import chess.polyglot
#import pdb; pdb.set_trace()
global totalNodes
totalNodes = 0
from ChessCore import calcMinimaxMoveBF
def CalcBranchFact(Quantity):
"""Calculates the ave... | UTF-8 | Python | false | false | 2,172 | py | 16 | BFTestBasic.py | 15 | 0.515654 | 0.498158 | 0 | 73 | 27.780822 | 113 |
madclumsil33t/atat | 12,343,736,016,828 | f62445c6588936f817e170307cd931948ad0f2bb | 9ba33919959f8cdb722682296e94c7ddad8e9410 | /script/reset_database.py | dd815d095498a37ceb922dcca1ba7a7f08b8c981 | [
"MIT"
] | permissive | https://github.com/madclumsil33t/atat | 59657549a9fa9561ec640e64035987d0c6c21a5c | 290b4adc58791e95dac73ad17ec6645f55307609 | refs/heads/main | 2023-04-02T16:37:03.567866 | 2020-12-18T21:26:58 | 2020-12-18T21:26:58 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# Add root application dir to the python path
import os
import sys
parent_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
sys.path.append(parent_dir)
import sqlalchemy
from alembic import config as alembic_config
from seed_roles import seed_roles
from atat.database import d... | UTF-8 | Python | false | false | 901 | py | 479 | reset_database.py | 298 | 0.664817 | 0.664817 | 0 | 41 | 20.97561 | 75 |
Anirudh-Muthukumar/Leetcode-Solutions | 13,194,139,559,015 | ab7d55d939a1a28df1d60479e365a353f38c6d8f | e5afe031dcf0e7d11f95d3c39b4d750b7a8cc8de | /More Problems/First Unique Number.py | 28da1f3fe7e0cb200fab020b43199905c7ba588c | [] | no_license | https://github.com/Anirudh-Muthukumar/Leetcode-Solutions | f172695297ac72a94d0a0313e8df08511e3991ba | 5904949fcfab9a842ba2269f68f25d7bd0149a55 | refs/heads/August | 2023-04-01T08:32:40.682661 | 2021-01-12T13:44:22 | 2021-01-12T13:44:22 | 247,761,302 | 0 | 0 | null | false | 2021-01-12T13:55:49 | 2020-03-16T16:15:48 | 2021-01-12T13:44:33 | 2021-01-12T13:55:49 | 1,184 | 0 | 0 | 0 | Python | false | false | class Node:
def __init__(self, val):
self.value = val
self.prev = None
self.next = None
class FirstUnique:
def __init__(self, A):
self.queue = set()
self.cache = {} # mapping {value: Node}
self.size = 0
self.head = Node(float('-inf')) # pointer to first... | UTF-8 | Python | false | false | 2,486 | py | 504 | First Unique Number.py | 502 | 0.501609 | 0.498793 | 0 | 87 | 27.586207 | 79 |
drmckinney75/SDEV140 | 8,761,733,318,212 | 87c23c4d8c498f18f0c33760584dc21b200c4282 | 297b5da85847639cb827a2e8e4cac1518e660d1f | /M02_Assn1_Ex12_Mckinney_David.py | 1b7245c6e4b4d2934866525d03e9587b8f39a958 | [] | no_license | https://github.com/drmckinney75/SDEV140 | 6067389eb9ec66598e0bc3b604af53e41e49264d | 109a14e6da003f31e3318e8e9c7f292fa0976f18 | refs/heads/main | 2023-03-18T17:02:32.055366 | 2021-03-17T04:53:05 | 2021-03-17T04:53:05 | 348,164,807 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # David Ryan McKinney
# SDEV140 M02_Assn1 Ex12
# 1/26/2021 11am
# V1.0
# Software Volume Discount Calculator
# quantityOrdered (int) quantity of software ordered
# discountDec (float) discount percent as decimal
# discountAmt (float) discount amount in $USD
# softwareCost (int) cost of software package
# tot... | UTF-8 | Python | false | false | 1,533 | py | 26 | M02_Assn1_Ex12_Mckinney_David.py | 24 | 0.737769 | 0.705153 | 0 | 45 | 32.066667 | 100 |
snakemake/snakemake | 19,335,942,806,812 | d89d662c5fe6a95a1e82f90ac9e6f91097b464ca | dacdebab897f9287f37a2e85c5705a926ddd36aa | /tests/test_groupid_expand/Snakefile | 0d30974de9b2ba40e45b2c62421c02a0116b85b9 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | https://github.com/snakemake/snakemake | 5d4528193d87786d7b372ca7653ece302ff46965 | 27b224ed12448df8aebc7d1ff8f25e3bf7622232 | refs/heads/main | 2023-09-02T08:37:04.323976 | 2023-08-11T10:02:34 | 2023-08-11T10:02:34 | 212,840,200 | 1,941 | 536 | MIT | false | 2023-09-11T09:51:44 | 2019-10-04T14:58:11 | 2023-09-09T18:40:58 | 2023-09-11T09:51:43 | 92,176 | 1,914 | 467 | 879 | HTML | false | false | shell.executable("bash")
rule all:
input:
expand("bar{i}.txt", i=range(3)),
rule grouplocal:
output:
"foo.{groupid}.txt",
group:
"foo"
shell:
"echo {wildcards.groupid} > {output}"
def get_input(wildcards, groupid):
return f"foo.{groupid}.txt"
rule consumer:
... | UTF-8 | Python | false | false | 448 | 675 | Snakefile | 474 | 0.522321 | 0.520089 | 0 | 30 | 13.933333 | 45 | |
orangedeer/Airbnb | 14,843,407,013,760 | d8540b4f9bd3ecc8d462dfdc04d13fe8aa5668d6 | 357bad603e85d3b22d7d7b996e640803b6fa7595 | /3-crawler/listing/listing/spiders/listing.py | 821f44513f024123c8a864b4171018dd2e3d6312 | [] | no_license | https://github.com/orangedeer/Airbnb | 2750c83aac6ed6b92146c629b5874ee5af1e3196 | 6c34497785ab59c2945bd6ba4e499d6eff0c203a | refs/heads/master | 2018-12-20T14:29:41.629522 | 2018-03-05T02:34:43 | 2018-03-05T02:34:43 | 84,370,170 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date :
# @Author :
# @Usage :
from lxml import etree
import scrapy
import urllib2
import json
import re
import time
import requests
import os
import sys
reload(sys)
sys.setdefaultencoding('utf8')
class Listing(scrapy.Spider):
name = 'listing'
path = '/Users/CJW... | UTF-8 | Python | false | false | 10,392 | py | 44 | listing.py | 44 | 0.672943 | 0.666667 | 0 | 232 | 43.637931 | 431 |
Michael-py/coding_challenges | 18,794,776,915,149 | 14eed64d024b4cf6bd077676d5e07057600da0b3 | 74db2f30b62f6524c716fc3bc301b4177ec96876 | /occur.py | be2b9cb8f3c85bfa22fad698568ce1e86aa6b2d2 | [] | no_license | https://github.com/Michael-py/coding_challenges | a2e8015f2e936b2e356b8ff0f3e089fbff549140 | fe5b343552fc510ef2eb4511f295767a64f455a2 | refs/heads/main | 2023-05-03T17:58:06.087414 | 2021-05-17T09:29:54 | 2021-05-17T09:29:54 | 368,127,866 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | counts = 0
def occur(s, t, count=0):
global counts
if len(s) == 1 and s[0] == t:
count += 1
for i in range(len(s)):
if s[i] == t:
count+=1
else:
counts += 1
occur(s[i+1:], t, count)
return count
print(occur("propylleucineglycogen", "i"))
print(counts) | UTF-8 | Python | false | false | 279 | py | 24 | occur.py | 23 | 0.569892 | 0.541219 | 0 | 23 | 11.173913 | 42 |
infoaed/ckanext-harvest | 8,813,272,922,447 | 7ffc8fdd6dd5cda11727227c4c20bb467a53f595 | 474b190ecb13b3385544925e67fe7b219ac265d0 | /ckanext/harvest/plugin.py | 8521bb1848235fc18b016cf5843bdfb05a2afd52 | [] | no_license | https://github.com/infoaed/ckanext-harvest | e959c27879b14d6e884aec9591b1b643dc8168b6 | 52c9fc67a53c0ef27af0f386448a8954a61dbe61 | refs/heads/look_feel_est | 2021-01-12T07:18:19.031748 | 2017-01-06T11:35:06 | 2017-01-06T11:35:06 | 76,940,794 | 0 | 0 | null | true | 2016-12-20T09:04:24 | 2016-12-20T09:04:24 | 2015-02-25T20:26:35 | 2015-02-25T20:49:30 | 1,086 | 0 | 0 | 0 | null | null | null | import os
from logging import getLogger
from pylons import config
from genshi.input import HTML
from genshi.filters import Transformer
import ckan.lib.helpers as h
from ckan.plugins import implements, SingletonPlugin
from ckan.plugins import IRoutes, IConfigurer
from ckan.plugins import IConfigurable, IActions, IAut... | UTF-8 | Python | false | false | 3,060 | py | 28 | plugin.py | 20 | 0.647059 | 0.646732 | 0 | 95 | 31.210526 | 90 |
unhyperbolic/SnapRepr | 9,019,431,357,823 | 5d40e311b7fa34ef5771b38606585d5bc8d7ca17 | 48b062ce35ab2917f2e23fb62df5e91107ad3a3e | /src/bin/SnapReprMagmaSl3NeumannZagier.py | 604675b8e1bcc303d0f4fca37c7062322a6815cb | [] | no_license | https://github.com/unhyperbolic/SnapRepr | 8e7deedd293e4b8f2835058221400cb395c6ec8c | 27cd01f86244c76a1c2881feeda14a480715f2e6 | refs/heads/master | 2020-12-25T17:28:19.781929 | 2016-08-16T06:09:23 | 2016-08-16T06:09:23 | 2,908,257 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
import os
import sys
this_path, this_file = os.path.split(sys.argv[0])
abs_path = os.path.abspath(this_path)
base_path, this_dir = os.path.split(abs_path)
sys.path.append(base_path)
try:
from manifold import sl3NeumannZagierType
from manifold.triangulation import read_triangulation_from_fil... | UTF-8 | Python | false | false | 1,440 | py | 50 | SnapReprMagmaSl3NeumannZagier.py | 47 | 0.655556 | 0.649306 | 0 | 52 | 26.692308 | 77 |
MaxSac/cubic_interpolation | 7,172,595,416,070 | df528fe1aa05e58fed98bef9bbdca88d0d76d249 | 1d9a7cc16d67c3e3e166ed26907c71e276ed70f9 | /conanfile.py | 63258a512b9c36dcf76b8c13bd3621617c44f818 | [
"MIT"
] | permissive | https://github.com/MaxSac/cubic_interpolation | 4c2d58394be5e96c66872bfe73f7199ab8d8240e | d8ba7a19f06afa010747750bdb1c34fd9f811ba5 | refs/heads/main | 2023-08-22T14:45:31.505342 | 2022-12-01T02:55:25 | 2022-12-01T02:55:25 | 310,883,494 | 2 | 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | from conans import ConanFile, CMake, tools
from conans.errors import ConanInvalidConfiguration
import os
required_conan_version = ">=1.32.0"
class CubicInterpolationConan(ConanFile):
name = "cubicinterpolation"
homepage = "https://github.com/MaxSac/cubic_interpolation"
license = "MIT"
url = "https://... | UTF-8 | Python | false | false | 3,657 | py | 7 | conanfile.py | 1 | 0.618266 | 0.61061 | 0 | 101 | 35.207921 | 170 |
goggle/aur | 19,602,230,772,238 | e8d4af1700381168fa497877531a1d841f23ab06 | d823c59cf74fef1d3f3f7be338e7a1c3084c958b | /scripts/generate_readme.py | be914fb22be2840f58c3da30771a43b333aa4da9 | [
"MIT"
] | permissive | https://github.com/goggle/aur | 134966dd0f097d8ff3948418fd6820c10336c08a | c6f13640d64032094ed1143a81b63fd1a20a61d3 | refs/heads/master | 2023-08-30T20:02:40.130499 | 2023-08-30T01:39:34 | 2023-08-30T01:39:34 | 112,211,050 | 0 | 0 | MIT | false | 2023-09-04T13:13:38 | 2017-11-27T15:07:41 | 2022-04-12T00:35:49 | 2023-09-04T13:13:36 | 146 | 0 | 0 | 1 | Shell | false | false | #!/usr/bin/env python
import argparse
import io
import os
import re
import sys
AUR_USER = 'aexl'
# Prefer to show links to the development repository instead
# to e.g. PyPI
PROJECT_LINKS = {
'kodi-addon-checker': 'https://github.com/xbmc/addon-check',
'python-kodistubs': 'https://github.com/romanvm/Kodistubs... | UTF-8 | Python | false | false | 3,012 | py | 10 | generate_readme.py | 6 | 0.554781 | 0.552457 | 0 | 103 | 28.242718 | 79 |
Lazy-LZY/droidlet | 12,884,901,903,076 | 353bde026a5e38a461dcb0ad0aa13365afe181f5 | 7c3742e2aa0f97b7f9e9250e8fdf852aa153ea38 | /droidlet/tools/hitl/utils/hitl_logging.py | 85a7bdd8ff4d4e625d829b5a588a568b3acf70e2 | [
"MIT"
] | permissive | https://github.com/Lazy-LZY/droidlet | c811d37a053f79f88e6d214ff1fc74687c40d353 | 0a01a7fa7a7c65b2f9a3aebf5e79040940daf9d2 | refs/heads/main | 2023-07-08T17:37:43.190410 | 2023-02-01T19:34:23 | 2023-02-01T19:34:23 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Copyright (c) Facebook, Inc. and its affiliates.
The hitl_logging.py include a HitlLogging class for logging in HiTL module.
"""
from datetime import datetime, timezone
import logging
import os
import inspect
HITL_TMP_DIR = (
os.environ["HITL_TMP_DIR"] if os.getenv("HITL_TMP_DIR") else f"{os.path.expanduser(... | UTF-8 | Python | false | false | 2,596 | py | 1,005 | hitl_logging.py | 752 | 0.644453 | 0.643683 | 0 | 83 | 30.277108 | 118 |
karafede/WRF_Chem | 6,313,601,930,717 | 4f129425a08e7c57ba685fc9aff96c64f30de14a | 1c5840724994dcb2451eb6a4cc9632e4a658da20 | /WRFChem_new_postproc/sendMail.py | f63e0068b9539d8c0d5a64ad086756a292b3f4b1 | [] | no_license | https://github.com/karafede/WRF_Chem | a4714fa276ffd060c9732bc2de638b2d9455dd7d | 2e51daaa5bbf30672e99938b3cad623292e6fb47 | refs/heads/master | 2020-12-14T10:34:47.803226 | 2020-01-12T07:56:16 | 2020-01-12T07:56:16 | 95,371,002 | 12 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
import os ; import sys ; import smtplib ; import mimetypes ;
from smtplib import SMTP
from smtplib import SMTPException
from email.mime.multipart import MIMEMultipart ;
from email import encoders
from email.message import Message ;
from email.mime.image import MIMEImage
from email.mime.text ... | UTF-8 | Python | false | false | 1,817 | py | 45 | sendMail.py | 40 | 0.585581 | 0.578426 | 0 | 52 | 32.942308 | 118 |
CamiloAguilar/openpose-tda-action-recognition | 12,850,542,197,742 | 3c5f70e5c4607e4013e60cba53f7be330bba6db2 | 40d081db87258dc9c7dd2452f9c665df48f4aab0 | /live_prediction.py | 324eda953a7253ae9368a00808ea9c089f86e303 | [] | no_license | https://github.com/CamiloAguilar/openpose-tda-action-recognition | dc1d62503d650f7beb5083596dfaae1dc6471df6 | 0e95ca353335acdb2f9e15958c59a1074d705441 | refs/heads/master | 2020-06-23T02:06:14.042757 | 2018-08-31T11:59:25 | 2018-08-31T11:59:25 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import argparse
from sklearn.externals import joblib
import copy
from time import time
import numpy as np
import logging
import os
from shutil import copyfile
from action_recognition.tracker import Tracker, TrackVisualiser
from action_recognition.detector import CaffeOpenpose
from action_recognition.analysis import Po... | UTF-8 | Python | false | false | 8,845 | py | 67 | live_prediction.py | 52 | 0.658112 | 0.650763 | 0 | 217 | 39.760369 | 101 |
dr-dos-ok/Code_Jam_Webscraper | 9,285,719,302,576 | 0d8d360946f0197ea13043df01396035d73f0870 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_145/611.py | 3a95e997fc1e04e0f164fe490791c54600cc2dce | [] | no_license | https://github.com/dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | __author__ = 'j0hnny'
if __name__ == '__main__':
results = []
with open('A-small-attempt2.in', 'r') as input:
cases = int(input.readline())
for case in range(cases):
(P, Q) = input.readline().split('/')
P = int(P)
Q = int(Q)
print P,... | UTF-8 | Python | false | false | 1,101 | py | 60,747 | 611.py | 60,742 | 0.321526 | 0.309718 | 0 | 42 | 24.261905 | 51 |
niemasd/tools | 6,004,364,300,037 | ea2b3138b2c2189abee29ad6c1752fac8f8b071b | bb8ea165bfdbe0f79c89c3e0ca6d3f9c66c9c247 | /hamming.py | 3b94b16d38e0dec182efc0d0b9ffe8c65ec5c455 | [] | no_license | https://github.com/niemasd/tools | 3ace96922893131db77063ce960bec133c94ada6 | 6c411987c810a28cbddb9e6bf37ed87c87e235b4 | refs/heads/master | 2023-07-10T18:56:32.538450 | 2023-06-27T21:24:56 | 2023-06-27T21:24:56 | 71,021,185 | 14 | 8 | null | null | null | null | null | null | null | null | null | null | null | null | null | #! /usr/bin/env python3
'''
Niema Moshiri 2017
Compute all pairwise Hamming distances from a given multiple sequence alignment
'''
import argparse
from sys import stdin,stdout
from common import hamming,readFASTA
# parse arguments
def parseArgs():
parser = argparse.ArgumentParser(description=__doc__, formatter_cl... | UTF-8 | Python | false | false | 1,340 | py | 50 | hamming.py | 47 | 0.686567 | 0.681343 | 0 | 35 | 37.285714 | 134 |
PauloVitorRocha/TPPE-Trab1 | 16,140,487,131,022 | bb1ec2ddb7f9c3329e497227b20062e2bfda9268 | 4ac845992c77391a97fe024dafac9a1323787fa1 | /src/decision_node.py | 9da36461eb6ac7b41a2751d488b0c461c856cb49 | [] | no_license | https://github.com/PauloVitorRocha/TPPE-Trab1 | d2fb7b41bba87ea0686fa363dc5b4dabdd7e41d1 | c239f96a54bac4ef7519506d1c10a39e77d3648d | refs/heads/main | 2023-03-31T01:35:19.980234 | 2021-04-04T22:34:51 | 2021-04-04T22:34:51 | 352,805,525 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from transitions import ActivityTransitions
class DecisionStream():
def __init__(self):
self.transitions = []
self.merge_node = None
self.final_node = None
self.activity_node = []
self.elements = []
def read_activity(self):
act_name = input("Nome da atividade: ... | UTF-8 | Python | false | false | 1,936 | py | 8 | decision_node.py | 5 | 0.542872 | 0.53564 | 0 | 54 | 34.537037 | 96 |
Paccy10/ampersand_app_api | 2,534,030,743,499 | f751ca7c76142bd084c4708abfc74786c6d31a31 | 24f505c2617b766c20244b38883a5e9784b7e250 | /api/models/station.py | 03e7d587fe718caefec2b4ac4639e2e628744569 | [] | no_license | https://github.com/Paccy10/ampersand_app_api | 5fce3edf4b0b137e8b6d1e46bacf2e40d677cc5b | 7945e0f92408a9754de43cc398b587018df81c6c | refs/heads/develop | 2022-12-19T04:58:43.027383 | 2020-10-01T11:19:13 | 2020-10-01T11:19:13 | 299,681,483 | 0 | 1 | null | false | 2020-10-01T11:19:14 | 2020-09-29T16:54:52 | 2020-09-30T11:05:26 | 2020-10-01T11:19:14 | 50 | 0 | 0 | 0 | Python | false | false | """ Module for Station Model """
from config.db import db
from .base import BaseModel
class Station(BaseModel):
""" Station Model class """
__tablename__ = 'stations'
location = db.Column(db.String(250), nullable=False, unique=True)
number_of_batteries = db.Column(
db.Integer, nullable=Fals... | UTF-8 | Python | false | false | 336 | py | 25 | station.py | 22 | 0.672619 | 0.66369 | 0 | 14 | 23 | 69 |
tkcroat/SC | 15,101,105,035,591 | a5ffce0017924344df4e4cb12bee447017a99896 | 6e8bb755c0ea46670a7fb8f5dda8c10d9c308d4c | /SC_messaging_main.py | 6220ca6ef305f9c77ed51646e8d2088705dd91bd | [
"MIT"
] | permissive | https://github.com/tkcroat/SC | 2e3c120f000fdea249b185b127734f4c8a0b577a | 4c2c7663298cbd454ff7aba535b689b44b48a7d1 | refs/heads/master | 2021-07-17T17:03:25.214498 | 2020-08-25T16:36:12 | 2020-08-25T16:36:12 | 204,846,677 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Feb 1 17:41:41 2017
@author: tkc
"""
import pandas as pd
import os, sys
if 'C:\\Users\\tkc\\Documents\\Python_Scripts\\SC' not in sys.path:
sys.path.append('C:\\Users\\tkc\\Documents\\Python_Scripts\\SC')
print ('SC folder added')
import pkg.SC_signup_functions as SC... | UTF-8 | Python | false | false | 5,097 | py | 27 | SC_messaging_main.py | 25 | 0.757504 | 0.736512 | 0 | 113 | 44.097345 | 126 |
cristina-cojocaru/syntax-project-with-SpaCy | 9,526,237,468,881 | cb3a647891db1321bd39f1c8998238e220437a52 | fce81535e93d68ab6a07880df3611c682fc65b4a | /Syntax_work.py | 49fecde55a93bacdb15300911e22d346a5b38593 | [] | no_license | https://github.com/cristina-cojocaru/syntax-project-with-SpaCy | cee00732a5e95c65b15869fe3c449f93695fdb66 | 3abea86d5f89399b4723869311a7944960a05952 | refs/heads/master | 2022-11-27T17:18:07.951962 | 2020-08-12T12:56:09 | 2020-08-12T12:56:09 | 286,997,264 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
import spacy
import sys
from collections import Counter
nlp_fr = spacy.load('fr')
class Textfile:
def __init__(self, name, encoding="utf-8"):
self._name = name
self._encoding = encoding
self._content = ""
def read(self):
try:
f = open(self._name, ... | UTF-8 | Python | false | false | 3,148 | py | 3 | Syntax_work.py | 1 | 0.495697 | 0.490915 | 0 | 89 | 33.224719 | 109 |
stwobe/dropboxcopy01 | 15,650,860,844,275 | 2a6d485821ab8b84ac77d71dca9bb8e7bfdce660 | 0f46ff5c2cc972dc6636fc3a3b90dd42e732bced | /1Python/Python3/11_Scripts_2016/fishies.py | baeb3455ccfc30617a930cf74f1c8b4086b8a32c | [] | no_license | https://github.com/stwobe/dropboxcopy01 | a01b93397d38c42545f7d5b62385ddf16c9645dd | 12eab06f1004d00198536ac15c3d112bd3b5da7d | refs/heads/master | 2021-01-13T13:56:45.594145 | 2019-01-15T23:21:11 | 2019-01-15T23:21:11 | 72,943,249 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #title: fishies.py
#author: Steve Roberts
#date: Sunday February 21st 2016
#usage: Run this script and it will print stuff...with a value of
#alternative usage -
import time
def fish(x):
time.sleep(0.7)
print("\n" * 600)
time.sleep(0.9)
print ("Fishy wishers!!!!!\n" * x)
print("")
time.sleep(0.6)
print(x)
tim... | UTF-8 | Python | false | false | 859 | py | 139 | fishies.py | 129 | 0.718277 | 0.688009 | 0 | 31 | 26.548387 | 81 |
declangallen/AWS_admin | 2,731,599,222,630 | 1c6756cbd34dc0754253222c3f27744cfc0b2d07 | 35f47325babc9b267fc5999aabd1ab614eb2baf2 | /upload_to_S3.py | 180c6c7f21250c4b2bf35712a3b1a329fec07fa5 | [] | no_license | https://github.com/declangallen/AWS_admin | 1e183d507780c0ceab4e8e9ad001c4e4259b721a | 00db2c125b65590e6e2c711fad1ff78b7952b266 | refs/heads/master | 2020-08-14T13:47:50.337219 | 2019-10-15T01:36:59 | 2019-10-15T01:36:59 | 215,179,639 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import boto3
import os
import uuid
s3_client = boto3.client('s3')
s3_resource = boto3.resource('s3')
# s3_resource.create_bucket(Bucket='dgallens3testpython1',
# CreateBucketConfiguration={
# 'LocationConstraint': 'eu-west-1'})
def create_bucket_name(bucket_pre... | UTF-8 | Python | false | false | 1,492 | py | 3 | upload_to_S3.py | 2 | 0.688338 | 0.66756 | 0 | 44 | 32.931818 | 74 |
Nebula1084/crowd | 4,526,895,540,850 | 6b624821f67b16f9921675970717af972dae474d | 0aad0d91502da270b40224fcfaa96d8fbc972736 | /loader/word2vec.py | f5470bd326d6f8df58dc8f8c5432416184b83147 | [] | no_license | https://github.com/Nebula1084/crowd | 5836b247db0d4821e06940befddbeaa1010dd1fb | 12c52c2edbc92b009f30c3011bccc9b67f899b4b | refs/heads/master | 2021-05-01T10:03:23.797342 | 2018-03-12T04:34:15 | 2018-03-12T04:34:15 | 121,073,744 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import gc
import os
import pickle
import gensim
import numpy as np
class Word2Vec(object):
def __init__(self, path, embed_size):
self.path = path
self.word2vec = None
self.embeddings = None
self.vocabulary_word2index = None
self.vocabulary_index2word = None
self.em... | UTF-8 | Python | false | false | 3,444 | py | 21 | word2vec.py | 15 | 0.606562 | 0.593496 | 0 | 81 | 41.518519 | 95 |
rymate1234/Gnome-IRC | 14,774,687,507,077 | df8da40fc07b40d9762dfc906f9530f649ebaf2c | eedce303b54ba9c7db482b36b9da7aa4312a799a | /gnomeirc/MainWindow.py | aa291b909e8ba18a4e2bb80e17127d7c46cd04f1 | [
"MIT"
] | permissive | https://github.com/rymate1234/Gnome-IRC | a9b65cfb39435fcdf58aafe050ca6e6fcc99e51f | 5f6269b5cd414f8a6e122099f4496949d183f219 | refs/heads/master | 2021-01-17T16:59:49.332087 | 2015-06-21T11:10:06 | 2015-06-21T11:10:06 | 30,494,811 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python2
from twisted.internet import gtk3reactor
from gnomeirc import Utils
from gnomeirc.ChannelDialog import ChannelDialog
from gnomeirc.GtkChannelListBoxItem import GtkChannelListBoxItem, GtkChannelCloseButton
from twisted.internet import defer
from gnomeirc.TabCompletionEntry import TabCompleti... | UTF-8 | Python | false | false | 18,482 | py | 13 | MainWindow.py | 8 | 0.598474 | 0.595174 | 0 | 529 | 32.941399 | 111 |
fahad-gcet/tasks_api | 11,836,929,877,769 | dc7fc2d7ab494cc363b1b403763ada06635dc8ba | 324a59acbd10605e5200f1e858c5aa699843ce66 | /api/views.py | d48aa4aa65f8cd764e4269c1850e81e4c325dc03 | [] | no_license | https://github.com/fahad-gcet/tasks_api | 0a0c7abcdb9a4c407515eeb66d771232c72e46d7 | 307b2548f014d002b4c7c574d35ba8f403b10073 | refs/heads/master | 2021-06-27T03:52:48.401495 | 2017-09-19T11:09:51 | 2017-09-19T11:09:51 | 104,043,206 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView
from api.models import Task
from api.serializers import TaskSerializer
from api.permissions import IsOwnerOrReadOnly
class TaskMixin:
queryset = Task.objects.all()
serializer_class = TaskSerializer
permission_classes = (Is... | UTF-8 | Python | false | false | 558 | py | 2 | views.py | 2 | 0.78853 | 0.78853 | 0 | 19 | 28.421053 | 83 |
bryanm92s/Python | 17,995,912,985,600 | 2011b2ccb19860c71cc006909b41aab8831e7fd3 | 19d63b7769f02d3f94cb8b8c3e77361bdbc518e9 | /Ejercicios en python 1/Tiemposolmar_5.py | ee3278b34890f7279d43437bb50f87a8e6def841 | [] | no_license | https://github.com/bryanm92s/Python | ff964de7deb535ee34387900835f1b3d7bc935d3 | 8c8aee7399a448e6b38e704ddc19160a7b252de5 | refs/heads/master | 2022-04-14T07:23:59.015588 | 2020-04-12T20:21:52 | 2020-04-12T20:21:52 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
CALCULAR CANTIDAD DE SEGUNDOS QUE LE TOMA A LA LUZ VIAJAR DEL SOL A MARTE
'''
print ("CALCULAR CANTIDAD DE SEGUNDOS QUE LE TOMA A LA LUZ VIAJAR DEL SOL A MARTE")
veloc_luz= 300000
dist_marte=227940000
# dist_tierra= 150000000
segun_minutos=60
#tiempo_s =dist_marte/veloc_luz
tiempo_s ... | UTF-8 | Python | false | false | 600 | py | 24 | Tiemposolmar_5.py | 24 | 0.7 | 0.656667 | 0 | 19 | 30.631579 | 112 |
MasoniteFramework/core | 7,662,221,692,642 | 8a2d5c6274d4222e18d0b5fae952f03dcf3b2c3b | ae645d5694ac7dbb49d4c6dfc6dd98ef82b1fafa | /masonite/testing/TestCase.py | 8c9f32a912eda447cfec00a3565d1e816c93a187 | [
"MIT"
] | permissive | https://github.com/MasoniteFramework/core | 39d541286aa707423c4f7ddc464092b4d530c6f7 | 235ee98a20f7359b0201aa4d2b2e7cf7b6c36f8b | refs/heads/2.2 | 2021-05-13T13:38:20.286037 | 2019-11-29T14:28:32 | 2019-11-29T14:28:32 | 116,712,367 | 97 | 101 | MIT | false | 2023-08-02T01:36:52 | 2018-01-08T18:23:39 | 2023-05-23T19:12:38 | 2020-03-03T07:25:33 | 4,545 | 84 | 55 | 6 | Python | false | false | import io
import json
import sys
import unittest
from contextlib import contextmanager
from urllib.parse import urlencode
from masonite import env
from masonite.exceptions import RouteNotFoundException
from masonite.helpers.migrations import Migrations
from masonite.helpers.routes import create_matchurl, flatten_route... | UTF-8 | Python | false | false | 10,408 | py | 274 | TestCase.py | 238 | 0.620388 | 0.61962 | 0 | 326 | 30.92638 | 99 |
ibell/achp | 12,317,966,249,364 | 669da02540b90f70dac527ae3fa4d0ce22096608 | 3859ee7a1694f30c69e4cb4ee392f3e197b23aaa | /src/Compressor.py | 1ea0a6e5a2d98b1772525ca57663885f8434916e | [] | no_license | https://github.com/ibell/achp | 71467905986ae5f0c7dcab0b2ca98bfd0aa30977 | 1003d16c651447d0068173e6d3186ebae9672bb1 | refs/heads/master | 2016-08-02T21:40:56.971781 | 2013-10-26T23:33:45 | 2013-10-26T23:33:45 | 12,282,085 | 8 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.11
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2,6,0):
def swig_import_helper():
from... | UTF-8 | Python | false | false | 15,784 | py | 13 | Compressor.py | 9 | 0.687532 | 0.685251 | 0 | 264 | 57.772727 | 141 |
ox-it/moxie | 14,723,147,899,793 | dede27f101dbe8ce7c3d49dc852628f03ab85cd1 | 6f3bf2bb9c8cb90e32a2514765fae3ee06bde405 | /moxie/tests/test_authentication_hmac.py | 0651a23f2e4e6932f187e370717c0efa8932ba2c | [
"Apache-2.0"
] | permissive | https://github.com/ox-it/moxie | cf298ed6d4107ae1e6ab96f41655fa48e7ce97c1 | cc234a4170358c62b86d9fdb7760949b33a81937 | refs/heads/master | 2020-03-03T00:18:37.056387 | 2019-06-14T14:30:15 | 2019-06-14T14:30:15 | 5,481,115 | 2 | 2 | Apache-2.0 | false | 2020-07-01T07:41:30 | 2012-08-20T12:49:13 | 2020-06-30T12:38:12 | 2020-07-01T07:41:29 | 1,735 | 13 | 2 | 1 | Python | false | false | import unittest
from moxie import create_app
from moxie.core.views import accepts
from moxie.authentication import HMACView
class DummyUser(object):
def __init__(self, secret_key):
self.secret_key = secret_key
self.name = 'Dave'
class TestAuthenticatedView(HMACView):
def handle_request(sel... | UTF-8 | Python | false | false | 1,995 | py | 139 | test_authentication_hmac.py | 74 | 0.574937 | 0.555388 | 0 | 63 | 30.666667 | 85 |
alvinr/data-modeling | 6,786,048,366,191 | aa9136c95fa51d7f7d56658425e758d2077d6739 | a8738df3536e25ebbbe134df19d74ec69c323769 | /redis/faceting/all.py | 3cab02d1ad2f908f6d0eaf7e667e6e4a64a82fdf | [] | no_license | https://github.com/alvinr/data-modeling | 3c53ef8b15d540d8bd5866f0acdbdf6986916f39 | 54e7a39f73393e9f75acaa6df7af94d4fafda618 | refs/heads/master | 2021-09-08T03:52:36.916432 | 2021-08-25T17:35:52 | 2021-08-25T17:35:52 | 64,255,246 | 2 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | from redis import StrictRedis
import os
import hashlib
import json
redis = StrictRedis(host=os.environ.get("REDIS_HOST", "localhost"),
port=os.environ.get("REDIS_PORT", 6379),
db=0)
redis.flushall()
def create_event(product):
p = redis.pipeline()
p.sadd("reserve_seating:" ... | UTF-8 | Python | false | false | 2,651 | py | 29 | all.py | 13 | 0.582045 | 0.56092 | 0 | 87 | 29.45977 | 85 |
Anonymous20XXcodes/KS-GNN | 3,487,513,461,134 | ddbe55c91c52fe384bb193173b62f03c96c37e28 | 4dafc6f337728f711480c6609d32d64bbb06aa8c | /utils.py | b473690b4c043f699ac2b5790c989b29f08b70fa | [] | no_license | https://github.com/Anonymous20XXcodes/KS-GNN | de1c1d03b628c96e6bbeac3e5a8fcbf10c68baaf | b608b304551f1640cefe6e98dd9a5111f9b2dbe8 | refs/heads/main | 2023-02-28T17:25:21.381610 | 2021-02-09T09:26:50 | 2021-02-09T09:26:50 | 336,988,084 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import scipy.sparse as sp
from scipy.sparse import lil_matrix
import torch
from torch_geometric.nn import MessagePassing
from torch_geometric.utils import add_self_loops, degree, to_undirected
import os
import pandas as pd
args_list = ['dataset','alpha','beta','gamma','sigma','kw','t... | UTF-8 | Python | false | false | 2,503 | py | 134 | utils.py | 5 | 0.63324 | 0.622853 | 0 | 103 | 22.271845 | 131 |
adrian13579/CoolInterpreter | 3,959,959,855,950 | 2c9cf81e228ca7bffbc98eecbdd1457db52b681a | f47383f90e794416e12d34d4c15b354a0cc4d271 | /cmp/parsers/shift_reduce_parser.py | 42fd5a8403dc21350f69d05ce2b64c418a0806cd | [] | no_license | https://github.com/adrian13579/CoolInterpreter | ecff721c7c92e0e5d9cc5f7f2bf4855abcc54d36 | 154bd734a9111a1510e5591ed9d79844c72496a5 | refs/heads/master | 2023-03-07T02:00:18.532393 | 2021-02-18T23:09:10 | 2021-02-18T23:09:10 | 262,991,104 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class ShiftReduceParser:
SHIFT = 'SHIFT'
REDUCE = 'REDUCE'
OK = 'OK'
def __init__(self, G, verbose=False):
self.G = G
self.verbose = verbose
self.action = {}
self.goto = {}
self._build_parsing_table()
def _build_parsing_table(self):
raise NotImplemen... | UTF-8 | Python | false | false | 1,618 | py | 28 | shift_reduce_parser.py | 19 | 0.509889 | 0.504944 | 0 | 49 | 32.020408 | 83 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.