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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cash2one/xai | 9,156,870,323,949 | c979052f95892a654509fe328e07ca46ddad9e1b | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_territories.py | 9e1e0edc9aacaed34bdd028bb27f1809b997f02c | [
"MIT"
] | permissive | https://github.com/cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
#calss header
class _TERRITORIES():
def __init__(self,):
self.name = "TERRITORIES"
self.definitions = territory
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['territory']
| UTF-8 | Python | false | false | 236 | py | 37,275 | _territories.py | 37,266 | 0.622881 | 0.622881 | 0 | 13 | 17 | 30 |
dangq/glandore | 14,663,018,393,479 | 90ef5d51d831148f7ec3e718145614ae6b3f18c5 | 3b39969f832d283a2833064a3d7736cbb15bd44b | /owl.py | 3fc63b58447bb33a871ab793ffc0f91b69b4c049 | [] | no_license | https://github.com/dangq/glandore | 070a9cee252ed57da2a5ef5d7a118051417c9627 | aaf015c343118a260d38927907c719dbd7c49e64 | refs/heads/master | 2021-01-01T05:27:50.511297 | 2016-04-16T08:03:33 | 2016-04-16T08:03:33 | 56,372,475 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from rdflib import ConjunctiveGraph, Namespace, exceptions
from rdflib import URIRef, RDFS, RDF, BNode
import OWL
class OntoInspector(object):
"""Class that includes methods for querying an RDFS/OWL ontology"""
def __init__(self, uri, language=""):
super(OntoInspector, self).__init__()
sel... | UTF-8 | Python | false | false | 1,163 | py | 5 | owl.py | 3 | 0.567498 | 0.566638 | 0 | 46 | 24.304348 | 99 |
minhax/Autonomous-Farming-Robot-Station | 14,920,716,434,182 | 6c24593875306af8e5b195767206865c0a7090c6 | 817f5401a8f6a2ecf4fcc073c88fd83661afbdb1 | /src/Tests/launchRobot.py | 3128f6eb834736f896fcd2ee3e1068fb2f787152 | [] | no_license | https://github.com/minhax/Autonomous-Farming-Robot-Station | 741a49df30e571f161672b60415700cc2764a27e | e2b8ae9cc8e505c85bd03019a20ad21edb784892 | refs/heads/master | 2020-04-30T17:31:40.753651 | 2019-03-07T07:57:01 | 2019-03-07T07:57:01 | 176,982,434 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Messages exchange test
from src.Robot.IA_Robot.src.Scheduler.Scheduler import *
from src.Robot.Navigation_Robot.src.Navigation.NavigationController import *
from Common.Parser.parser import Parser
from src.Robot.IA_Robot.src.Weeding.WeedingController import *
from CommunicationManager.Robot.Robot_CommunicationManager... | UTF-8 | Python | false | false | 2,381 | py | 37 | launchRobot.py | 30 | 0.730785 | 0.721966 | 0 | 52 | 44.807692 | 135 |
scmbuildrelease/gitfusionsrc | 14,027,363,204,181 | 34b4d33e0904cef8a3259978f4d49e4fb6dce24b | 292557f00ce989624fc62b5c236f1ecf9d9fb350 | /libexec/profiler_merge.py | a9bcfa003f34e7a8e9050b5b71deb0d05525edb2 | [] | no_license | https://github.com/scmbuildrelease/gitfusionsrc | eb2f4b92f193656ea827c693f0feb63f4d944859 | cf73a2d4facb41009db941a87429cb66ea821ada | refs/heads/master | 2020-04-01T22:12:30.631312 | 2018-10-18T22:50:52 | 2018-10-18T22:50:52 | 153,696,211 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #! /usr/bin/env python3.3
"""Merge two cProfiler runs into a tab-separated textfile you can read in
a spreadsheet.
"""
from collections import defaultdict
import copy
import logging
import re
import p4gf_util
# pylint: disable = line-too-long
# Some day we'll support Python 3.4 and get its s... | UTF-8 | Python | false | false | 23,377 | py | 132 | profiler_merge.py | 131 | 0.526115 | 0.510673 | 0 | 635 | 35.814173 | 156 |
zeyuyuyu/HCI-Bake-off-2 | 4,037,269,271,960 | c4ca5b181702e30d2be5f7fb224462bae1203d84 | ff246438806c73e3b9e988dd01f92247ba426ffe | /209_bakeoff_2/gesture_source/imageClassification.py | 4485df2e3cf929584c12dd2de8832087f4c885e8 | [] | no_license | https://github.com/zeyuyuyu/HCI-Bake-off-2 | a42c6fb12f02b074e11cda1d9af79759218ed4e2 | ad35efd2d44a27cc60ca8101139c56e2eba2447e | refs/heads/master | 2020-09-30T06:08:31.154137 | 2019-12-10T00:10:39 | 2019-12-10T00:10:39 | 227,223,786 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import tensorflow as tf
#MNIST dataset from keras
mnist = tf.keras.datasets.mnist
#tuples that have image in x and value in y.
(x_train, y_train), (x_test, y_test) = mnist.load_data()
#reduces to 0-1 from 0-255
#this may not have much of a change on the output
x_train = tf.keras.utils.normalize(x_train, axis=1)
x_te... | UTF-8 | Python | false | false | 949 | py | 5 | imageClassification.py | 2 | 0.72392 | 0.701791 | 0 | 29 | 31.758621 | 82 |
eric9687/Image_Classification_Competiton | 6,682,969,141,714 | 3765d7b634edd390fa6866189981b420e11d019f | 3c0b68400b224fab5af175c1670e6ad905cbe577 | /T2024/p1-image-classifier/train.py | 04bb81396d714a6302d553c7fb60a0b79bd2bdd9 | [] | no_license | https://github.com/eric9687/Image_Classification_Competiton | 7d3d0194cf1d4783b6c1654669b80ffcc6a3918a | cc6c9354550aa8979e18e214ffaeffe74c0789bf | refs/heads/main | 2023-07-18T05:23:13.646079 | 2021-09-04T08:06:29 | 2021-09-04T08:06:29 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Library
from ast import Str
from itertools import accumulate
import os
from logging import critical
import numpy as np
import pandas as pd
import random
from PIL import Image
from pandas.core.frame import DataFrame
from scipy.sparse.construct import rand
import torch
from torch import nn
import torch.nn.functional a... | UTF-8 | Python | false | false | 9,204 | py | 88 | train.py | 50 | 0.534317 | 0.518142 | 0 | 281 | 31.558719 | 124 |
pradgap/MachineLearning | 5,446,018,538,795 | 72f513a266c1ce2132f0fcf7e3e4b81a780febc7 | a413fb6da5910da9a3202f99c9cc584dca7cf2f2 | /Spark/KMeansClustering.py | 8710eedfb8e61425fe67a27a723e8db33c025a64 | [] | no_license | https://github.com/pradgap/MachineLearning | b96a5770201f96edc11e62d3b3b36d62eb672e30 | 216042a01452c0198245e85d3dbb85267936dd65 | refs/heads/master | 2021-01-11T12:27:44.517074 | 2017-01-02T00:17:18 | 2017-01-02T00:17:18 | 76,627,969 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
from numpy import array
from math import sqrt
from pyspark import SparkConf, SparkContext
from pyspark.mllib.clustering import KMeans, KMeansModel
def main(sc):
rawRdd=sc.textFile('network_PCA_15Features2.csv')
# print rdd.count()
# rddTrain, rddTest= rdd.randomSplit([.8,.2])
# print 'Done... | UTF-8 | Python | false | false | 1,410 | py | 5 | KMeansClustering.py | 4 | 0.687943 | 0.671631 | 0 | 40 | 34.25 | 94 |
PLUSLEE/_Python_exercises | 7,447,473,315,135 | 1c422da4c943c00b6109c7c9415be6fe4ac7f7b1 | d064eb4007ed7c2600e5af7cd125999cab9d1946 | /Process-oriented Programming面向过程/_04_loop_code.py | 8524ff08cbe4ee00da256c517e3dd2e9028be263 | [] | no_license | https://github.com/PLUSLEE/_Python_exercises | 5361f5df425c1eae07bcd6a81864bb4c7d3ed1c3 | a74008b7f60bb114b94f4c51fe45f039c4aa915f | refs/heads/master | 2021-04-03T08:24:47.838485 | 2018-04-05T15:08:04 | 2018-04-05T15:08:04 | 124,406,076 | 1 | 0 | null | false | 2018-03-09T09:18:41 | 2018-03-08T14:52:56 | 2018-03-08T14:53:07 | 2018-03-09T09:17:46 | 7 | 0 | 0 | 1 | Python | false | null | #-*-coding:utf-8-*-
print(1+2+3)
#for...in循环,依次把list或者tuple中的每一个元素迭代出来
classmate = ["Lee",'CFF','LZ']
for name in classmate:
print(name)
#输出1-10之和
sum = 0
for x in[1,2,3,4,5,6,7,8,9,10]:
sum = sum + x
print(sum)
#rang()函数可以自动生成序列数,然后通过list()函数将序列数转化为list
#生成的数字不包含本身,包含最开的0
ls = list(range(10))
for x in ls:
... | UTF-8 | Python | false | false | 1,000 | py | 30 | _04_loop_code.py | 27 | 0.544959 | 0.491826 | 0 | 52 | 13.115385 | 56 |
MihaZelnik/meepleAPI | 10,411,000,754,422 | 32a9a624ce79e2163fcfe672407077fa539b3d0b | 3aca0a94e0b599f562362d6aad07e0a8589e0d43 | /meeple/apps/utils/analytics.py | 3bb16af9c6416dd027ea4bbb12f470251102b93a | [
"BSD-3-Clause"
] | permissive | https://github.com/MihaZelnik/meepleAPI | ec0ae9ed0822c53fc3587247b773134b0786a023 | 60f364cd7959a91335167d7da674b35d80dcef49 | refs/heads/master | 2018-01-07T11:17:38.926135 | 2015-05-14T17:12:49 | 2015-05-14T17:12:49 | 34,412,845 | 1 | 1 | null | false | 2015-05-26T19:43:07 | 2015-04-22T20:02:29 | 2015-05-01T23:07:04 | 2015-05-26T19:43:07 | 1,921 | 1 | 1 | 1 | Python | null | null | from django.conf import settings
import keen
import logging
def keen_hit(type, resource, request):
if not settings.KEEN_DEBUG:
ip = request.META.get('REMOTE_ADDR')
user_agent = request.META.get('HTTP_USER_AGENT')
try:
keen.add_event(
"api_hit",
... | UTF-8 | Python | false | false | 629 | py | 68 | analytics.py | 41 | 0.467409 | 0.467409 | 0 | 23 | 26.347826 | 58 |
hitzjd/Balance-Simulate | 16,088,947,514,793 | 4952cf07c79cf23bcfb86e19e1302314aded4808 | 918b8b356abdaed27ee2dc1ad45503e32d8d8080 | /twisted/test/test_defgen.py | c5011bbbea19fe1132fc01079629d571aa2d0f39 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | https://github.com/hitzjd/Balance-Simulate | 683c7b424195131e4ec5691e930e0ed909631d0d | 22f06f34b0e4dbbf887f2075823dcdf4429e4b8e | refs/heads/master | 2020-03-12T09:51:50.704283 | 2018-04-22T11:27:18 | 2018-04-22T11:27:18 | 130,561,072 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from __future__ import generators, nested_scopes
from twisted.internet import reactor
from twisted.trial import unittest, util
from twisted.internet.defer import waitForDeferred, deferredGenerator, Deferred
from twisted.internet import defer
def getThing():
d = Deferred()
reactor.callLater(0, d.callback, "h... | UTF-8 | Python | false | false | 3,906 | py | 20 | test_defgen.py | 17 | 0.602663 | 0.597286 | 0 | 136 | 27.713235 | 90 |
DamienOConnell/MIT-600.1x | 14,121,852,477,581 | f7307100ceb6d56234408aee7effd1b6fcdaa66e | 793de7bd510c0b6509f1413353d912bc8ef9bfb0 | /Week_1/turn_right.py | a9f8363183b462165d1f14c8f83ccd334c6f2067 | [] | no_license | https://github.com/DamienOConnell/MIT-600.1x | eb24490bb5148348d4b092db5a776a41ec1c6819 | 319d45bbbea991b9342c99874d8aad1dd6dc5d38 | refs/heads/master | 2020-06-06T03:37:19.904231 | 2019-12-15T04:40:17 | 2019-12-15T04:40:17 | 192,628,180 | 0 | 0 | null | false | 2019-10-21T09:25:54 | 2019-06-19T00:05:07 | 2019-06-19T00:12:07 | 2019-10-21T09:25:52 | 524 | 0 | 0 | 0 | Python | false | false | #!/usr/bin/env python3
x = input("You are in the Lost Forest, turn right, or left?")
while x == "right":
x = input("You are in the Lost Forest, turn right, or left?")
print ("You have exited the Lost Forest!")
| UTF-8 | Python | false | false | 215 | py | 62 | turn_right.py | 57 | 0.660465 | 0.655814 | 0 | 6 | 34.833333 | 65 |
haru-mingshi052/Melanoma-Classification | 15,375,982,964,497 | 908fa0d56e78c72475f12c37b71e23c081189d51 | 87bd53e35056e738402c6d4210615f32e57c35ad | /pytorch/data_processing/dataset.py | b9298af01e663fe5cfaab0f9b33e73de3a54f618 | [] | no_license | https://github.com/haru-mingshi052/Melanoma-Classification | 5124b58d02d175f99c3caa197ce7bb32fa7f9759 | 7be4bd197b01b4fad54c3e8023e50547b0a9329f | refs/heads/master | 2023-04-08T12:51:52.781132 | 2021-04-19T12:47:16 | 2021-04-19T12:47:16 | 354,457,578 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import os
import cv2
from torch.utils.data import Dataset
"""
pytorchのデータセットを作成する関数
"""
#================================
# Melanoma Dataset
#================================
class MelanomaDataset(Dataset):
def __init__(self, df, imfolder, train, transforms, meta_features):
... | UTF-8 | Python | false | false | 1,037 | py | 28 | dataset.py | 24 | 0.53221 | 0.528246 | 0 | 38 | 24.605263 | 91 |
ErlingLie/Text_prediction | 9,998,683,892,378 | 62621bb929aa5d2f15e41511d73393e834456794 | 79013dd2eaac23538c79ac4e91c0d6af5d3546f8 | /utils.py | d89e416442424e384a947f8b5e1315277c9289bf | [
"MIT"
] | permissive | https://github.com/ErlingLie/Text_prediction | a9e677f23374abe26c6f63aa865da5cc03189eff | 2dd9b6f3a59037b8cbd56a5d0a7c4da63091e49b | refs/heads/master | 2021-04-04T14:24:58.509734 | 2020-03-19T14:03:30 | 2020-03-19T14:03:30 | 248,464,297 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import torch
import matplotlib.pyplot as plt
import numpy as np
import pathlib
np.random.seed(0)
torch.manual_seed(0)
# Allow torch/cudnn to optimize/analyze the input/output shape of convolutions
# To optimize forward/backward pass.
# This will increase model throughput for fixed input shape to the network
to... | UTF-8 | Python | false | false | 2,901 | py | 11 | utils.py | 2 | 0.654257 | 0.653223 | 0 | 79 | 34.721519 | 103 |
felixnego/Test | 9,603,546,874,795 | 89656c93cd8a649e5fbcbb9d39436ee5dc01604d | 3b70ed98ed4a657fce1f3f8c9cacb077b8b89462 | /Desktop/coding/udemy_python/helloworld/iteration.py | a2d3b74b375062434eeb30a4b0f45a8778cad2f4 | [] | no_license | https://github.com/felixnego/Test | 24eed4ad1411c76987f3054144a9f56e39fea0de | 64bfaecc7c3eaade55b13f571f8c96a5bcc9690a | refs/heads/master | 2018-02-12T21:34:19.697229 | 2017-09-24T19:46:28 | 2017-09-24T19:46:28 | 24,300,407 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | string = "1234567890"
for char in string:
print(char)
my_iterator = iter(string) # this is what the for loop is doing behind the scenes
print(my_iterator)
print(next(my_iterator)) # prints the first element of the string
print(next(my_iterator))
# the for loop creates the iterator and keeps using nex... | UTF-8 | Python | false | false | 1,001 | py | 57 | iteration.py | 54 | 0.723277 | 0.706294 | 0 | 30 | 32.366667 | 86 |
AgnieszkaFalenska/IMSnPars | 16,209,206,622,570 | 48efaa53be5fa5146b02e97dee16ba52b7552912 | 60377d9a9cae6d26e61cd5fa63148f20ed4852e5 | /imsnpars/tests/asswap_tests.py | da06968684259aa2c17c802a6922a9a7a06e2cdb | [
"Apache-2.0"
] | permissive | https://github.com/AgnieszkaFalenska/IMSnPars | 726ae2cc21e6a3dd024924eaf4599c8a6fbcf240 | e2180db93309157b3e3929a5e5c14751df49aff9 | refs/heads/master | 2021-06-30T07:16:43.462206 | 2020-12-14T20:57:25 | 2020-12-14T20:57:25 | 201,456,673 | 5 | 5 | Apache-2.0 | false | 2020-12-14T20:57:26 | 2019-08-09T11:42:39 | 2020-12-02T22:00:43 | 2020-12-14T20:57:26 | 11,933 | 2 | 2 | 4 | Python | false | false | #!/usr/bin/env python
# coding=utf-8
'''
Created on 21.08.2017
@author: falensaa
'''
import unittest
from nparser.trans.tsystem.asswap import ArcStandardWithSwap as ASWS, MPCBuilder
from nparser.trans.tsystem.asswap import ArcStandardWithSwapEagerOracle, ArcStandardWithSwapLazyOracle
from nparser.trans.tsystem impor... | UTF-8 | Python | false | false | 5,042 | py | 63 | asswap_tests.py | 55 | 0.650337 | 0.640222 | 0 | 124 | 39.580645 | 222 |
ankuraut/ANKIT_HOTEL_YOYO | 8,443,905,751,236 | 160d05bb8a9228838ffe0e6667ea135dd3ddb34f | 3b67c6507b8f532cfdce77b03244b5ff0e518a5a | /HOTEL/yoyo/views.py | 2d301058c79560cc1e01300f2ab659620f24c9a2 | [] | no_license | https://github.com/ankuraut/ANKIT_HOTEL_YOYO | d6aac1575500c4804170b280c271d6706b997da9 | a66522d36649c01a12dad63e8df0918ac897c9a3 | refs/heads/master | 2023-06-29T04:59:09.410355 | 2021-07-17T05:40:25 | 2021-07-17T05:40:25 | 294,930,636 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.shortcuts import render , HttpResponse
from django.views.generic import ListView, FormView, View #pre-defined
from .models import Room, Booking
from .forms import AvailableForm
from yoyo.functions.available import check_availability
# Create your views here.
class RoomListView(request):
room = Room.obj... | UTF-8 | Python | false | false | 3,606 | py | 18 | views.py | 9 | 0.56711 | 0.565169 | 0 | 108 | 32.351852 | 78 |
dongjinhai/ssrmgmt | 18,305,150,631,955 | 11474607a6f3023afff2c74b6370d629350853f9 | e55a5f0234519686d551dd7b6e2a91123585dc7b | /ssrmgmt/settings/production.py | d58fc59d2e734261ab05ae803a537d4c82caf579 | [
"MIT"
] | permissive | https://github.com/dongjinhai/ssrmgmt | 51ea2ee4b19a81a51c5df96db2b2858b5aeb6065 | a41e595aec503dcb191a20ea8d58233bbb8f2db0 | refs/heads/master | 2021-10-08T10:13:25.312650 | 2018-11-19T01:22:44 | 2018-11-19T01:22:44 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from .base import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
ALLOWED_HOSTS = ['*']
# Database
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'ssrmgmt',
'USER':... | UTF-8 | Python | false | false | 1,743 | py | 40 | production.py | 20 | 0.632047 | 0.611869 | 0 | 73 | 22.082192 | 65 |
abeja-inc/abeja-platform-cli | 18,605,798,366,803 | 2133aacc834490d7239dca7a6888b02b8cbd0073 | 28c9b66a45d17435c72fc3e97d77932ae20e9c9a | /abejacli/model/__init__.py | 239cc629d949e787b36f88330bc6863e3bf370fa | [
"Apache-2.0"
] | permissive | https://github.com/abeja-inc/abeja-platform-cli | cf2fa497b435ebe598a13126635af481f8c77a80 | cd4909a7a4f7898524a543f541544260d0952571 | refs/heads/develop | 2023-09-01T11:01:38.450596 | 2023-07-18T02:46:03 | 2023-07-18T02:46:03 | 253,412,424 | 3 | 1 | Apache-2.0 | false | 2023-07-18T02:16:16 | 2020-04-06T06:22:32 | 2023-06-26T04:52:48 | 2023-07-18T02:16:14 | 369 | 3 | 0 | 3 | Python | false | false | import hashlib
def md5file(filename):
with open(filename, "rb") as f:
content = f.read()
return md5digest(content)
def md5digest(content: bytes) -> str:
return hashlib.md5(content).hexdigest()
| UTF-8 | Python | false | false | 217 | py | 89 | __init__.py | 78 | 0.668203 | 0.64977 | 0 | 11 | 18.727273 | 43 |
ctc316/algorithm-python | 8,040,178,791,282 | a31911ea86d44d61cc517f4a99207af7bb33fdf2 | 4111ca5a73a22174f189361bef654c3f91c3b7ed | /Lintcode/G_Practice/Tag_Hash/627. Longest Palindrome.py | 0a1e23fdb1ef3689d9879c25a6da7e69d8171140 | [
"MIT"
] | permissive | https://github.com/ctc316/algorithm-python | 58b541b654509ecf4e9eb8deebfcbdf785699cc4 | ac4580d55e05e93e407c6156c9bb801808027d60 | refs/heads/master | 2020-03-16T06:09:50.130146 | 2019-08-02T02:50:49 | 2019-08-02T02:50:49 | 132,548,222 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution:
"""
@param s: a string which consists of lowercase or uppercase letters
@return: the length of the longest palindromes that can be built
"""
def longestPalindrome(self, s):
counts = {}
for ch in s:
if ch not in counts:
counts[ch] = 1
... | UTF-8 | Python | false | false | 641 | py | 581 | 627. Longest Palindrome.py | 580 | 0.455538 | 0.444618 | 0 | 26 | 23.692308 | 71 |
SharmaSapan/self-organizing-feature-maps-clustering | 10,565,619,573,419 | fb0223881c232f2b7b5a43d1989518f674082817 | 0bcefa895e98f81a211ae46463569cb4e206d40a | /main.py | f2eaf30c413d4da454a4d84aa3365cf1021b18cd | [] | no_license | https://github.com/SharmaSapan/self-organizing-feature-maps-clustering | 33fffc4488cc781398a86a239606f6ed3ce38823 | 2021c6a6022193895f4d12c72499f09aae34f1dc | refs/heads/master | 2023-07-10T06:03:03.935236 | 2021-08-05T04:02:38 | 2021-08-05T04:02:38 | 392,794,625 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import math
import random
import os
# pillow image handling library
from PIL import Image
import imageio # to create gif in part 1
import numpy as np # to show image in part 2
# Pixel class to store pixel object and its properties.
class Pixel:
x = 0 # x-coordinate of pixel
y = 0 # y-coordinate of pixel
... | UTF-8 | Python | false | false | 19,529 | py | 2 | main.py | 1 | 0.594091 | 0.583645 | 0 | 356 | 53.859551 | 212 |
benkopolis/kmeanstriangleclustering | 14,851,996,944,478 | 9d512b0cc8d4bca0a029a466b02525f429d5886b | 366e2cdd40f6afef727cf24f71c70e555410fef5 | /app/configs.py | b51147275d50497d1b5a81eb54e94c76273f7961 | [] | no_license | https://github.com/benkopolis/kmeanstriangleclustering | 20a1060040074dfd28125c8b87b2d387e6bf65f5 | 8714d70f1a3e6542d44cfe16e29ce97de64622ff | refs/heads/master | 2020-12-24T13:17:10.643581 | 2017-03-22T20:31:07 | 2017-03-22T20:31:07 | 32,231,248 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | from getfiles import get_fileid, get_filename
class Config:
"""
Basic class for config
"""
def __init__(self, pipe_name, inputid, outputid):
self.pipe_name = pipe_name
self.input_id = inputid
self.output_id = outputid
def to_string(self):
"""
Converts to com... | UTF-8 | Python | false | false | 4,063 | py | 201 | configs.py | 173 | 0.537042 | 0.536795 | 0 | 128 | 30.734375 | 95 |
robo-monk/jolenejs | 4,088,808,872,311 | e1bbcf73133bcada1f7f58efb2a74dc500c9e45d | b78dca0ad948d6e2ec11435f951b71774d7d1781 | /.pnpm/scripts/build | 0d6ff8fb563070a97a1c0dc306803a150aaa7d1b | [] | no_license | https://github.com/robo-monk/jolenejs | ca4d81cba39ad5eaa8eb4df78ccb6b9a35fb4714 | 89d1525cbd45d039ac3ada31e075a6a21438fed0 | refs/heads/master | 2023-04-07T12:25:10.240284 | 2021-04-15T11:40:45 | 2021-04-15T11:40:45 | 358,022,840 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/local/bin/python3
from script import *
package_manager = pkg_manager
c = spawn(f"Bundling with {package_manager}...")
shell(f"{package_manager} run build")
c.done() | UTF-8 | Python | false | false | 176 | 7 | build | 5 | 0.704545 | 0.698864 | 0 | 10 | 16.7 | 48 | |
Inspector007/EmployeeManagementSystem | 2,731,599,226,576 | 793f8ab08f7c8c2eba80896e42879cc0133029fc | a2898e8922d11c4ac04847373969eea12cfa0a68 | /restapi/serializers.py | 53c0ec5e773cc4188abadc348b8f51aca7497202 | [] | no_license | https://github.com/Inspector007/EmployeeManagementSystem | 39c043116782e713fe5e48157637ff08bb617b7f | 25cab900d988775af298d39c1c53fb4497b87c7d | refs/heads/master | 2020-06-11T08:02:10.174968 | 2018-11-26T05:23:27 | 2018-11-26T05:23:27 | 75,727,730 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.contrib.auth.models import User, Group
from rest_framework import serializers
from empapp.models import Employee
class EmployeeSerializers(serializers.ModelSerializer):
class Meta:
model = Employee
fields = ('empName', 'empEmail', 'empPan')
class EmployeeUserSerializer(serializers.Hyp... | UTF-8 | Python | false | false | 582 | py | 12 | serializers.py | 7 | 0.707904 | 0.707904 | 0 | 20 | 28.15 | 70 |
vijay033/LegoMaker | 13,048,110,680,502 | 36fcecc1503eb30911e360bfdbe2a85c282e7389 | a9356a0ac1afd3f7237e3ec8ec780bfde58947a4 | /LEGOMAKER/server.py | 39f06cc4b9334399cf3359d68bd515323d55d201 | [] | no_license | https://github.com/vijay033/LegoMaker | 8f632820357be1e8c4d1d631535d9c571fe73886 | 8c53ec91f6968caa85a0d14f1c4075e7ccf06ff0 | refs/heads/master | 2022-09-12T12:48:04.161362 | 2020-06-01T01:18:02 | 2020-06-01T01:18:02 | 261,515,585 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import zerorpc
from image import Image
import os
import glob
from color_generator import Color_Generator
from filters import *
IP = 'tcp://0.0.0.0'
PORT = '4000'
class MosaicServer(object):
"""
Creates a server for generating Mosaics as a service, using zerorpc.
"""
def __init__(self... | UTF-8 | Python | false | false | 1,553 | py | 21 | server.py | 6 | 0.591114 | 0.577592 | 0 | 51 | 28.45098 | 95 |
fzk466569/python_tkinter | 3,848,290,718,181 | 7531f25e4ce9c2e2086453aa9da2993cba5cdeec | 4ad0cfa350552458df8a0270038ed436bd1d06f4 | /util/__init__.py | 5a82d334e231f4dc227935d589427c494c15d429 | [] | no_license | https://github.com/fzk466569/python_tkinter | 4b2e505f91bc4f73d632bb4fe029bd3a3b07c590 | 8c63ac171d171cd13c7891426841279f2ef53262 | refs/heads/master | 2021-01-21T11:26:38.127214 | 2017-08-31T13:15:27 | 2017-08-31T13:15:27 | 102,001,271 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# @Time : 2017/5/3 15:31
import hashlib
def md5(str):
m = hashlib.md5()
m.update(str)
return m.hexdigest()
if __name__ == '__main__':
print(md5('111'.encode('utf-8'))) | UTF-8 | Python | false | false | 231 | py | 53 | __init__.py | 53 | 0.545455 | 0.467532 | 0 | 13 | 16.846154 | 37 |
iskandr/parakeet | 9,517,647,549,805 | ddbe0f30b12a73f335bc7e82536554524ba8ff98 | edf31957838a65e989d5eb5e8118254ac2413fc8 | /parakeet/analysis/offset_analysis.py | b6b163fb97b451bba47f1caf75776778a1152030 | [
"BSD-3-Clause"
] | permissive | https://github.com/iskandr/parakeet | e35814f9030b9e8508a7049b62f94eee5b8c5296 | d9089f999cc4a417d121970b2a447d5e524a3d3b | refs/heads/master | 2021-07-18T19:03:05.666898 | 2019-03-13T17:20:20 | 2019-03-13T17:20:20 | 5,889,813 | 69 | 7 | NOASSERTION | false | 2021-07-17T21:43:03 | 2012-09-20T16:54:18 | 2021-07-15T15:01:11 | 2019-03-13T17:20:21 | 8,168 | 232 | 13 | 1 | Python | false | false | from .. import prims
from .. syntax import Var, PrimCall, Const
from syntax_visitor import SyntaxVisitor
class OffsetAnalysis(SyntaxVisitor):
"""Determine static offset relationships between variables"""
def __init__(self):
# map from variable 'x' to list of variable offset pairs
# [ ('y', 4), ('z', -... | UTF-8 | Python | false | false | 2,299 | py | 321 | offset_analysis.py | 315 | 0.555894 | 0.552849 | 0 | 77 | 28.844156 | 63 |
kaifsadri/AdventOfCode2020 | 6,665,789,289,553 | 4bd37e01ad88bd4ef3229ed13e586827bbfad934 | a7fde19cd8fd33552bebfa945bed9e6d557ccea6 | /03_1.py | 4cfa4f57cd88e652fc058c7cd0852c5c92ae5c55 | [] | no_license | https://github.com/kaifsadri/AdventOfCode2020 | cfe4667bc6f781c459190887ba107d0b9e4e3be6 | e9cab48f5841c029d3984616ac0ac2f61a14f1b4 | refs/heads/main | 2023-02-04T11:07:24.918261 | 2020-12-27T01:22:52 | 2020-12-27T01:22:52 | 318,400,525 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | L = open("input_03.txt").readlines()
right = 3
down = 1
x, y = 0, 0
l = len(L[0]) - 1
result = 0
while y < len(L):
if "#" == L[y][x % l]:
result += 1
x += right
y += down
print(f"Answer is: {result}") | UTF-8 | Python | false | false | 224 | py | 41 | 03_1.py | 41 | 0.477679 | 0.433036 | 0 | 16 | 13.0625 | 36 |
OnabanjoTitus/Python | 8,744,553,438,789 | 3b26131a34ea9298655d5133668b6bde1c688ffd | 79a19dcb0b3485416b5a216a0c762756d744c6eb | /chapter3Exercises/Palindromes.py | abc184c51c26cbfc1c2f433c11609af0d837d863 | [] | no_license | https://github.com/OnabanjoTitus/Python | a18b51395428c6f8fcd0a6009256f253efea38a0 | 6e1fbd2e73d0af0da8503ae10d8afad810127468 | refs/heads/main | 2023-04-19T03:09:31.033037 | 2021-04-25T22:02:43 | 2021-04-25T22:02:43 | 330,201,801 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import SeparatingTheDigitsInAnInteger
if SeparatingTheDigitsInAnInteger.number1 == SeparatingTheDigitsInAnInteger.number8 and \
SeparatingTheDigitsInAnInteger.number3 == SeparatingTheDigitsInAnInteger.number7:
print(SeparatingTheDigitsInAnInteger.number, "Is a palindrome")
else:
print(SeparatingThe... | UTF-8 | Python | false | false | 368 | py | 35 | Palindromes.py | 35 | 0.826087 | 0.815217 | 0 | 6 | 59.666667 | 89 |
jannotti/special-a-sudoku | 16,123,307,230,174 | 493d1443f237f793c4f941e10953f7ec3ae44e58 | 8c66216bf7ca7a05c1535142e400cf6962df7288 | /check.py | 0b6d17ba069357cc338d6121b1b74263a6f03e85 | [] | no_license | https://github.com/jannotti/special-a-sudoku | 2376b53f6cf31d98a4698c4f50ae3df66995afa2 | 35026f31a8b447fd1301667afbde7661c92be30b | refs/heads/master | 2020-03-23T09:53:16.340741 | 2018-08-17T12:14:54 | 2018-08-17T12:14:54 | 141,413,199 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def digits(s):
d=[]
for ch in s:
if ch.isdigit():
d.append(int(ch))
else:
d.append(None)
return d
def board(d):
for row in range(9):
a = d[row*9:(row+1)*9]
b.append(string_int(a))
return b
def row_ok (digits,r):
for row in range(9):
mylist = []
for k in b:
... | UTF-8 | Python | false | false | 967 | py | 19 | check.py | 10 | 0.475698 | 0.44364 | 0 | 44 | 20.977273 | 51 |
tjslezak/pyform | 14,568,529,082,874 | d462b8f7ba848756bbefb7eab25856d485fe2107 | d3ac994d49db9a6f44fe91d427362f7f7fd02329 | /outline_analysis/read_tps_outlines.py | 23975e2a4668c2fdc05d3fe877b08e84ef6021ea | [
"BSD-3-Clause"
] | permissive | https://github.com/tjslezak/pyform | 8794e9e1e3ceae804a02a89eef9233fe4154c91c | 4741f29b506e13817b3f959385f8c998ba6af6a9 | refs/heads/master | 2021-09-07T00:04:55.560534 | 2018-02-13T21:31:49 | 2018-02-13T21:31:49 | 103,463,758 | 0 | 1 | BSD-3-Clause | false | 2018-02-13T21:31:50 | 2017-09-13T23:59:02 | 2017-10-10T01:40:05 | 2018-02-13T21:31:50 | 4 | 0 | 1 | 0 | Python | false | null | import pandas as pd
import numpy as np
def pyTPStoDict(tpsPath):
tpsFile = open(tpsPath, 'r')
tpsDict = {'id':[], 'image':[], 'x':[], 'y':[], 'lm':[], 'scale': []}
numLand = 0
for line in tpsFile:
if line[0] == 'L':
numLand = int(line.split('=')[1])
temp = [int(line.spli... | UTF-8 | Python | false | false | 1,380 | py | 8 | read_tps_outlines.py | 3 | 0.523188 | 0.513768 | 0 | 39 | 34.384615 | 84 |
lishaohsuai/FSK_communication | 10,290,741,676,956 | 0a4dc529d5cb7a9d2a2d27d9cca8264a1b523382 | 7b552713e527b73e66d21f3d0fb129a56a2ee55e | /source/test_audio.py | a62731c5e99a553752bc8f4fa6291860b24d778d | [] | no_license | https://github.com/lishaohsuai/FSK_communication | 4591594686063447a9d6042281755a927560c861 | c3929cc4c8cf2147413494b7f3b42e64ff810f97 | refs/heads/master | 2020-12-02T22:20:39.788698 | 2017-07-03T14:20:28 | 2017-07-03T14:20:28 | 96,117,647 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*-coding='utf-8'
import wave
from pyaudio import PyAudio,paInt16
from source import decode
class audio_test:
def __init__(self):
self.framerate=48000
self.NUM_SAMPLES=2000#9600#
self.channels=1
self.sampwidth = 2
self.TIME = 8
self.chunk = 1024
self.stream ... | UTF-8 | Python | false | false | 3,490 | py | 8 | test_audio.py | 8 | 0.535798 | 0.512031 | 0 | 110 | 29.963636 | 81 |
asnani04/Efficient-Facial-Feature-Learning-with-Wide-Ensemble-based-Convolutional-Neural-Networks | 1,692,217,149,799 | e406fcd1a13235b7f09de5ba3e38411f218d708d | 3c91be419db18ead1f45f824e209418319eda249 | /model/screen/fer_demo.py | 33d9407c091ea9c44814efb811b6ed904ccebc7e | [
"MIT"
] | permissive | https://github.com/asnani04/Efficient-Facial-Feature-Learning-with-Wide-Ensemble-based-Convolutional-Neural-Networks | 0c37845ef7b9df2334bfdd141a373d87784dfa8d | 0b77fdbc4264210ad3f7ab99deb033d5d81bb1cd | refs/heads/master | 2022-11-10T20:29:50.282212 | 2020-06-22T23:09:56 | 2020-06-22T23:09:56 | 272,285,864 | 0 | 1 | MIT | true | 2020-06-14T21:24:44 | 2020-06-14T21:24:43 | 2020-05-16T21:18:33 | 2020-06-06T04:03:26 | 116,932 | 0 | 0 | 0 | null | false | false | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
GUI of the facial expression recognition (FER) demo
"""
__author__ = "Henrique Siqueira"
__email__ = "siqueira.hc@outlook.com"
__license__ = "MIT license"
__version__ = "1.0"
# External Libraries
import numpy as np
import cv2
# Modules
from model.utils import uimage... | UTF-8 | Python | false | false | 22,090 | py | 17 | fer_demo.py | 15 | 0.515844 | 0.488411 | 0 | 466 | 46.403433 | 243 |
goodok/sympy | 3,229,815,412,790 | b8f2cb5959aefc41ec35ab0a8f2b51d9b23757bf | 270547cf06736356d7a6cdabd22a8395edaa8b59 | /sympy/polys/tests/test_partfrac.py | 4f4093373196f1c887bfb381e3b09574f3e9679c | [
"BSD-3-Clause"
] | permissive | https://github.com/goodok/sympy | f56fcc4a862ad3d4c5c09ad792ac576dc8f74594 | de84ed2139125a755ea7b6ba91d945d9fbbe5ed9 | refs/heads/master | 2021-01-16T18:50:41.860305 | 2012-03-20T22:40:49 | 2012-03-20T22:40:49 | 1,414,177 | 3 | 0 | null | true | 2013-01-18T08:19:10 | 2011-02-26T09:19:37 | 2012-12-25T06:38:07 | 2012-05-10T17:51:55 | 180 | null | 0 | 2 | Python | null | null | """Tests for algorithms for partial fraction decomposition of rational
functions. """
from sympy.polys.partfrac import (
apart_undetermined_coeffs,
apart_full_decomposition,
apart,
)
from sympy import S, Poly, E, pi, I, Matrix, Eq, RootSum, Lambda, factor, together
from sympy.utilities.pytest import raise... | UTF-8 | Python | false | false | 3,066 | py | 212 | test_partfrac.py | 157 | 0.458252 | 0.403131 | 0 | 97 | 30.608247 | 119 |
arozans/idenface | 3,427,383,907,518 | 608fe16ce7dd258db1337f7683189d416db31cd1 | 604005d7d1d5473e5c92ae93bd9e606a47e796dc | /test/data/tfrecord/conftest.py | e2bd4ea97c50d9cc83298ca77ffd8e79f60a363e | [] | no_license | https://github.com/arozans/idenface | 278fe98c0360efdd73c617e7728fba27b35a2eda | fd3cdd0d1e112634a35b5f571d1acedf518ff3dc | refs/heads/master | 2020-04-30T12:10:48.018092 | 2019-07-09T20:54:24 | 2019-07-09T20:54:24 | 176,820,147 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import pytest
from src.utils import utils, consts
from testing_utils import tf_helpers
tol = 1.e-2
@pytest.fixture()
def thor_image_path(patched_home_dir):
import urllib.request
thor_path = patched_home_dir / "downloaded/thor_is_here.png"
thor_path.parent.mkdir()
image_address = '... | UTF-8 | Python | false | false | 1,893 | py | 91 | conftest.py | 89 | 0.708399 | 0.700475 | 0 | 41 | 45.170732 | 108 |
kinggodhj/assignment | 2,336,462,254,927 | fad9187fd562a1d7b64414a709cb4e3cde088d36 | d54efcf18d2860adc7980bda3b7c77f74014b830 | /test_custom.py | 6b753f1570dfbc48f5114ab694cf4426c2cfdaab | [] | no_license | https://github.com/kinggodhj/assignment | 30717d149f7f74ee653659a8b27699f76ac29ba5 | e8791f32080341a4cd318325ed13ca19234f7ee0 | refs/heads/master | 2023-05-28T00:19:21.986520 | 2021-06-09T15:01:05 | 2021-06-09T15:01:05 | 373,506,264 | 0 | 0 | null | false | 2021-06-07T12:12:26 | 2021-06-03T12:52:40 | 2021-06-07T10:04:17 | 2021-06-07T12:12:25 | 311,548 | 0 | 0 | 0 | Python | false | false | import sys
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
from torch.utils.tensorboard import SummaryWriter
import math
from nltk.translate.bleu_score import sentence_bleu
import time
import pdb
from model_custom import Seq2SeqTran... | UTF-8 | Python | false | false | 4,417 | py | 16 | test_custom.py | 6 | 0.616482 | 0.607426 | 0 | 135 | 30.718519 | 138 |
cjkpl/python-webpack-boilerplate | 1,425,929,164,511 | 1afddc3cd0160d690921cffb501fcf3a16fa2878 | f4b42f433d201aada16858e7bd99be771d2026f6 | /tests/tests_django/es6_scss/test_npm_commands.py | 044db33b57f894dae53c66340c52930d2e22bb3e | [] | no_license | https://github.com/cjkpl/python-webpack-boilerplate | 24517d0efc85e5d2b66c2b25f17b40bebde4102c | 322210e308df7ea3a9d9cef1fe2809916dc28ff8 | refs/heads/master | 2023-06-01T08:06:02.835579 | 2021-06-19T03:56:33 | 2021-06-19T03:56:33 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import re
def test_npm(npm_project_path, npm_build_commands):
js_path = npm_project_path / "build" / "js"
js_files = list(js_path.glob("*.*"))
js_files = [js_file.name for js_file in js_files]
assert len(js_files) > 0
js_files = ", ".join(js_files)
assert re.findall(r"app[.\w]*?.js", js_files)... | UTF-8 | Python | false | false | 971 | py | 34 | test_npm_commands.py | 15 | 0.609681 | 0.605561 | 0 | 27 | 34.962963 | 57 |
rryanburton/django-movies | 18,253,611,027,729 | 1a0296eeba97d5987e0df96f1e2ab0d034aa60b2 | 98618afe8b9d012fb95c0a145cf403a5756883aa | /movieratings/movieapp/migrations/0003_auto_20151012_0502.py | cb9f0f246799eac172d95d42f7c12eac513b7224 | [] | no_license | https://github.com/rryanburton/django-movies | 0dfa371046c0ac1be999266ca4cb7dbc2773b636 | 8ec346d71a45042a345acbd3e4cb3bd0d0105cf9 | refs/heads/master | 2021-01-10T04:25:44.271106 | 2015-10-15T04:33:13 | 2015-10-15T04:33:13 | 43,751,023 | 0 | 0 | null | false | 2015-10-15T04:33:13 | 2015-10-06T13:04:54 | 2015-10-06T21:10:58 | 2015-10-15T04:33:13 | 236 | 0 | 0 | 0 | Python | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('movieapp', '0002_auto_20151010_0205'),
... | UTF-8 | Python | false | false | 697 | py | 15 | 0003_auto_20151012_0502.py | 7 | 0.601148 | 0.576758 | 0 | 26 | 25.807692 | 115 |
andreeaeliade/socks_project | 12,025,908,452,189 | e7e7ea473f2b632cc1027a2fdda4b292b56f6509 | c0955a5d2c52a602668f2f74872c6edb19e50cba | /deployments.py | 6f50d450cfbf26d8b904601842e7428ace454c2c | [] | no_license | https://github.com/andreeaeliade/socks_project | 61a62eaeade2feaddc40d3df8b2b14d25217ec4a | d963f2ee6de1aa9f7eb71f8b8a0c207ad5051b3e | refs/heads/main | 2023-04-19T11:13:41.704838 | 2021-05-12T12:46:48 | 2021-05-12T12:46:48 | 366,696,826 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from kubernetes import client, config
from kubernetes.client import configuration
import sys
def main():
contexts, active_context = config.list_kube_config_contexts()
if not contexts:
print("Cannot find any context in kube-config file.")
return
config.load_kube_config(context=active_context["name"])
... | UTF-8 | Python | false | false | 1,252 | py | 3 | deployments.py | 1 | 0.67492 | 0.666134 | 0 | 32 | 37.1875 | 156 |
Kylep342/hello-world | 3,427,383,924,441 | 622098b962bb592dd515dbdba4856a6ef28a84f0 | 0546019a6142812753685a196b96d32866bce038 | /Think_Python/ch9_exercises/odometer_check.py | ae09acc48e65b80f2d90860d7f102727fc1769e1 | [] | no_license | https://github.com/Kylep342/hello-world | e29e62a1c06fb4022ebf371e00b51ad136bc90ba | 867f4e1cec62b124ab4965476cf7027945e3bf9b | refs/heads/master | 2017-12-01T03:19:06.105636 | 2017-08-20T15:15:56 | 2017-08-20T15:15:56 | 60,642,144 | 0 | 0 | null | false | 2017-08-13T05:49:30 | 2016-06-07T19:55:05 | 2016-06-07T19:55:05 | 2017-08-13T05:49:30 | 1 | 0 | 0 | 0 | null | null | null | def is_palindrome(i, start, length):
s = str(i)[start:start + length]
return s[::-1] == s
def odometer_check(i):
return (is_palindrome(i, 2, 4) and
is_palindrome(i + 1, 1, 5) and
is_palindrome(i + 2, 1, 4) and
is_palindrome(i + 3, 0, 6))
def check_all():
i = 100000
while i... | UTF-8 | Python | false | false | 410 | py | 19 | odometer_check.py | 18 | 0.521951 | 0.460976 | 0 | 19 | 20.578947 | 38 |
daanwierstra/pybrain | 618,475,302,135 | ef172456c93547442655c77ea952107008d6a3b3 | 08058cfaeeac83bc5aab8174e8722b93b72f40b3 | /pybrain/rl/agents/egreedy.py | a9a866fdfa910933eab2e828d2d0da06d7ae3a25 | [
"BSD-3-Clause"
] | permissive | https://github.com/daanwierstra/pybrain | 032e1d5cd3e74d380fdc55a8850d3744d2804a73 | d5d223879831b44b1512b082480e93b612927035 | refs/heads/master | 2021-01-18T19:04:41.513439 | 2009-10-13T13:17:26 | 2009-10-13T13:17:26 | 289,777 | 3 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | from learning import LearningAgent
from scipy import random, array
class EpsilonGreedyAgent(LearningAgent):
def __init__(self, module, learner):
LearningAgent.__init__(self, module, learner)
self.epsilon = 0.5
self.epsilondecay = 0.9999
def getAction(self):
""... | UTF-8 | Python | false | false | 752 | py | 150 | egreedy.py | 142 | 0.603723 | 0.594415 | 0 | 24 | 29.916667 | 100 |
narthollis/SysStat | 13,176,959,674,728 | fb04ef966f72cf2503161ea4f9b757e4e2fc7f49 | 9d8bcb7e5c8788b5136abf9ada46a3ee9685eb4d | /monitor/dispatcher.py | a57d6195fdecbfd46f2a4c746f6b84cad3b85968 | [] | no_license | https://github.com/narthollis/SysStat | 36ea0ef6953dcfaafa3f7dbb5c81a3c4d6310b15 | f9d2ae107d25b8474bdd5c256b967130fa167621 | refs/heads/master | 2021-01-01T08:56:44.045247 | 2011-09-05T15:07:11 | 2011-09-05T15:07:11 | 2,327,443 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import hashlib
from configparser import NoOptionError
from socketserver import StreamRequestHandler
from datetime import datetime
class Dispatcher(StreamRequestHandler):
def log(self, msg):
print("%s %s" % (datetime.now().isoformat(), msg))
def boundry(self, item):
data = "%s-%s-%s" % (datetime.now(), sel... | UTF-8 | Python | false | false | 3,459 | py | 16 | dispatcher.py | 13 | 0.555363 | 0.54987 | 0 | 103 | 32.582524 | 79 |
ajaygalagali/codes_python_for_everybody_coursera | 13,804,024,893,082 | ea93328dd83846ca5dc786e95a9556a2e3ce2f9d | d51383bf37f5af1593b9fd8c3a72284ed03067c1 | /Access Web Data/urllibLearn.py | fd3a8aeee1db7e6ec7c4b099c8349cfca3f798fe | [] | no_license | https://github.com/ajaygalagali/codes_python_for_everybody_coursera | dd47bf172418b8eb896cc849c901b345b5fb1a2c | 6549f98c5174b3004f50024261ba9f68a28e6787 | refs/heads/master | 2022-11-07T15:27:31.739403 | 2020-06-27T02:53:00 | 2020-06-27T02:53:00 | 273,063,806 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import urllib.error,urllib.request,urllib.parse
import re
fhand = urllib.request.urlopen('https://www.quora.com')
numList = list()
for line in fhand:
tempList = re.findall('https://(w.+")+',line.decode())
if tempList.__sizeof__() < 1:
continue
for i in tempList:
numList.append(i)
for i in n... | UTF-8 | Python | false | false | 407 | py | 24 | urllibLearn.py | 22 | 0.648649 | 0.646192 | 0 | 15 | 26.066667 | 63 |
hacktoon/dale | 10,393,820,895,991 | 67452336c8d9246c352ab2447b6177a67d2d4f58 | 4ba448fe3437076ea4a6f2e932344c5521a54a52 | /dale/exceptions/__init__.py | 8a4b410edca3c7f03c6f5a66ee465ad83cd79633 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | https://github.com/hacktoon/dale | 2f2284b5532b5c64cd904bc2571bb5365b714e6e | 5b8e82ba82a6238a4ca8aed554330d7b430ab2f3 | refs/heads/master | 2018-12-11T11:55:53.232910 | 2018-12-02T22:12:44 | 2018-12-02T22:12:44 | 111,252,562 | 7 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class BaseError(Exception):
pass
class LexingError(BaseError):
def __init__(self, index=None):
super().__init__("Invalid syntax")
self.index = index
class ParsingError(BaseError):
def __init__(self):
super().__init__()
class UnexpectedTokenError(LexingError):
def __init__(s... | UTF-8 | Python | false | false | 1,202 | py | 26 | __init__.py | 15 | 0.616473 | 0.614809 | 0 | 42 | 27.619048 | 77 |
Jackil-R/datacamp-python-data-engineer-track | 7,997,229,122,468 | 37c426ee5cf55ce75f80532361ceefdc8a96f325 | 0cdca7d5e466597acb809418802aafe4036c175e | /10.Object-Oriented Programming in Python/Ch3-Integrating with Standard Python.py | adf2fa1590b8caa777ab2e50b1d987765daa1158 | [] | no_license | https://github.com/Jackil-R/datacamp-python-data-engineer-track | 313566e463d9d5d714b654eac3e39ddb857d2170 | 8f58fe443dab91555b66264fa8e4557bec29fdbe | refs/heads/master | 2023-02-19T18:47:41.439883 | 2021-01-19T23:00:00 | 2021-01-19T23:00:00 | 325,276,762 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Chapter 3 Integrating with Standard Python
# Operator overloading: comparison
print("=========================================================")
# Overloading equality
print("=========================================================")
# Checking class equality
print("=========================================... | UTF-8 | Python | false | false | 1,123 | py | 113 | Ch3-Integrating with Standard Python.py | 27 | 0.308994 | 0.308103 | 0 | 56 | 19.071429 | 66 |
jennyslu/trivia_app | 4,449,586,126,143 | f6134b1577c53be1b789edae9fff64650f05fc1a | 8f0d19080adff48b2a8cb2685a680e681fd592ed | /backend/flaskr/models.py | f5ca4baeac109c041824611d82a74332c65cfce8 | [] | no_license | https://github.com/jennyslu/trivia_app | b73566e12f2624adc957562a6cfa2c088666792b | ef74c0d03645fedc5b36f0abcce08a84b9093255 | refs/heads/master | 2021-07-04T06:57:46.156879 | 2020-08-21T05:10:08 | 2020-08-21T05:10:08 | 235,240,781 | 0 | 0 | null | false | 2021-05-06T19:52:25 | 2020-01-21T02:34:35 | 2020-08-21T05:10:27 | 2021-05-06T19:52:25 | 202 | 0 | 0 | 2 | JavaScript | false | false | from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import Column, Integer, String
db = SQLAlchemy()
def setup_db(app):
"""
Bind flask application and SQLAlchemy service together.
"""
db.app = app
db.init_app(app)
db.create_all()
class Question(db.Model):
__tablename__ = 'questions'... | UTF-8 | Python | false | false | 1,729 | py | 19 | models.py | 14 | 0.598612 | 0.598612 | 0 | 66 | 25.19697 | 76 |
gulshalla/algorithms | 14,302,241,126,102 | f3e0c4593d31a1881886a8d6eca86291e653548e | 025f7d55e2f1c31249a639c14b19ab605292ed30 | /algorithms/math/happy_numbers.py | d572aac5e0a4f7529da6fd2d4ef16987cf46b31f | [
"MIT"
] | permissive | https://github.com/gulshalla/algorithms | 98ed9724552419c599f37ed8cc25467274e0be98 | 6ef4866fa4b5a9e5a440ddbc3a620307bd522e11 | refs/heads/master | 2020-04-27T03:09:31.135352 | 2019-12-17T07:11:49 | 2019-12-17T07:11:49 | 174,016,906 | 2 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
Write an algorithm to determine if a number is "happy".
A happy number is a number defined by the following process: Starting with
any positive integer, replace the number by the sum of the squares of its digits, and repeat
the process until the number equals 1 (where it will stay), or it loops endlessly in a cy... | UTF-8 | Python | false | false | 1,071 | py | 471 | happy_numbers.py | 470 | 0.545285 | 0.505135 | 0 | 44 | 22.772727 | 93 |
AccentDesign/django-sagepaypi | 4,483,945,873,743 | cf55c3d308e58d2c1c38129b40f9f6178b90e611 | 85169df1604bc381d694946e821e11c97bbd8773 | /tests/test_gateway.py | 2bce927e9356c6522898a4a6d3b0f6cfe677745c | [
"MIT"
] | permissive | https://github.com/AccentDesign/django-sagepaypi | dbf62c569d37201a2c76e4b253cb9e6b6a7dc62b | afb419b25f9819f4a7d09a12a3bb3ac4cd4745c6 | refs/heads/master | 2020-04-21T19:42:35.571754 | 2019-12-11T16:54:49 | 2019-12-11T16:54:49 | 169,816,952 | 0 | 2 | MIT | false | 2019-03-06T15:03:22 | 2019-02-09T00:32:13 | 2019-02-11T12:59:04 | 2019-03-06T15:03:22 | 75 | 0 | 0 | 0 | CSS | false | null | import dateutil
import mock
from django.test import override_settings
from sagepaypi.gateway import default_gateway, SagepayGateway
from tests.mocks import MockResponse
from tests.test_case import AppTestCase
def mocked_gone_response(*args, **kwargs):
return MockResponse({}, 500)
def mocked_success_requests(*a... | UTF-8 | Python | false | false | 5,390 | py | 65 | test_gateway.py | 44 | 0.619666 | 0.602412 | 0 | 151 | 34.695364 | 105 |
AChris07/slackwolf-gm | 10,127,532,933,496 | cd5220b66fcff8d8a95e4d2c66e72b4061b29e91 | a2ef94e2f1836f4e598d267118d64cb9c5ead755 | /slackwolf/api/dao/user_dao.py | f0359fec0d204de71abf4b7c6199a3caf92b8215 | [] | no_license | https://github.com/AChris07/slackwolf-gm | adf608267177c09518527cde18116297db03aaed | fdcd9d169fa8037953972e2c4baa50cffd90627f | refs/heads/master | 2022-12-11T16:32:20.897198 | 2020-07-16T03:22:01 | 2020-07-16T03:22:01 | 81,918,278 | 0 | 0 | null | false | 2022-12-08T11:03:42 | 2017-02-14T07:33:29 | 2020-07-16T04:07:00 | 2022-12-08T11:03:41 | 13,276 | 0 | 0 | 4 | Python | false | false | from typing import List
from .team_dao import TeamDao
import slackwolf.db as db
from slackwolf.db.entities.team import Team
from slackwolf.db.entities.user import User
class UserDao:
"""User DAO Interface object"""
def __init__(self):
self.__session = db.session
def find(self, id: int) -> User:... | UTF-8 | Python | false | false | 1,679 | py | 32 | user_dao.py | 31 | 0.536629 | 0.536629 | 0 | 54 | 30.092593 | 64 |
aslemen/morepo | 13,408,887,919,752 | df3b06b2f01cd17bc3413a9a4dd6a7b159e0a30c | 9aa095ce1ceed0b7a78e6879d912e73f384db59d | /morepo/inputters/morep_json.py | d3d9b0ac9ce0356854d9256b0f2e86bc39708a1a | [
"MIT"
] | permissive | https://github.com/aslemen/morepo | 235d2cfeeb25b83b5ae3f6c07ea907112c92f94c | 1c7e8d114da471ea250604b7a53e92d192c8349a | refs/heads/master | 2020-03-08T03:58:54.916251 | 2018-08-06T10:48:45 | 2018-08-06T10:48:45 | 127,907,877 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import json
import glob
import typing
import numbers
import packaging.version as vers
import morepo.objects as objs
import morepo.dbio as dbio
import morepo.filters.WTL as wtl
import BTrees.OOBTree as oob
import persistent.list as pl
import persistent.dict as pd
def extract_from_stream(stream) -> typing.List[dict]:... | UTF-8 | Python | false | false | 3,015 | py | 19 | morep_json.py | 17 | 0.641128 | 0.640464 | 0 | 106 | 27.433962 | 110 |
MichaelPinatton/301Redirect-Screaming-Frog | 12,429,635,383,512 | 06f908642017f55b578426577a230bb72f9cdc64 | ca07a979c321925146c0eb392bc3977fcbaf7f33 | /app.py | ec0234796d12e102b561cdb190b71f389bf68d31 | [] | no_license | https://github.com/MichaelPinatton/301Redirect-Screaming-Frog | 70269ca51dae0aa045a820444c93372d796f02ff | a0186581607cfed40ac84a3a89de0df879c1427a | refs/heads/master | 2023-05-09T05:00:35.169818 | 2021-04-19T16:24:55 | 2021-04-19T16:24:55 | 359,112,211 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pandas as pd
import streamlit as st
import os
import base64
from io import BytesIO
import xlsxwriter
st.set_page_config(
page_title="Correspondance des Redirections 301 - Screaming Frog", page_icon="🐶",
)
#Import CSV
st.title('Correspondance des Redirections 301 - Screaming Frog')
st.markdown('')
st.mark... | UTF-8 | Python | false | false | 3,174 | py | 2 | app.py | 1 | 0.657343 | 0.62206 | 0 | 90 | 33.966667 | 171 |
drankincms/boostedhiggs | 12,506,944,801,630 | 2db5c7ce584016ec81335ca1b4c54b1504973c5f | f2f26e263da6d3cfe66e78fc326744ac512ff7f9 | /test/make_trig_eff.py | 09df428f726353c7dcc86335b8d4299995de8bc6 | [] | no_license | https://github.com/drankincms/boostedhiggs | 64b231a18abd49eee82630501df1ae815d58569f | 31d15d7dc165c3eb081793d79a3770973b7abc21 | refs/heads/dev | 2023-06-25T18:04:01.088815 | 2021-10-26T15:36:13 | 2021-10-26T15:36:13 | 227,409,855 | 0 | 4 | null | true | 2022-04-15T17:41:58 | 2019-12-11T16:22:26 | 2021-10-26T15:36:27 | 2022-04-15T17:41:58 | 24,813 | 0 | 3 | 0 | Python | false | false | from __future__ import print_function, division
import gzip
import json
import os
import uproot
import matplotlib.pyplot as plt
import numpy as np
from coffea import hist
from coffea.util import load, save
import pickle
import gzip
import math
import argparse
#import processmap
#from hists_map import *
plt.rcParam... | UTF-8 | Python | false | false | 18,869 | py | 48 | make_trig_eff.py | 35 | 0.551699 | 0.524193 | 0 | 395 | 46.76962 | 256 |
davidb-github/daily-journal-server | 16,758,962,399,061 | 4ee5345bbd9ec4457448b9255961a3ed20ed5158 | bccfb63ca0aff929497df545c96276a02f00c8c0 | /entries/request.py | a617992ee83d7df019794302b2d00912a6f2b775 | [] | no_license | https://github.com/davidb-github/daily-journal-server | b945b6b1098bfeb650b7c70b9fd5914fe27c70ed | 1d0007128c6fb51e962958e3869bd493f733e327 | refs/heads/main | 2023-02-18T09:16:26.219635 | 2021-01-20T15:24:25 | 2021-01-20T15:24:25 | 331,330,411 | 0 | 0 | null | false | 2021-01-20T15:24:26 | 2021-01-20T14:25:36 | 2021-01-20T14:25:54 | 2021-01-20T15:24:26 | 0 | 0 | 0 | 0 | Python | false | false | import sqlite3
import json
from models import Entry
def get_all_entries():
#open a connection to db
with sqlite3.connect("./dailyjournal.db") as conn:
# setup row and cursor
conn.row_factory = sqlite3.Row
db_cursor = conn.cursor()
# select query
db_cursor.execute("""
... | UTF-8 | Python | false | false | 982 | py | 5 | request.py | 5 | 0.547862 | 0.544807 | 0 | 39 | 24.205128 | 65 |
SanjoyPator1/ImageProcessingSkillsTrackDataCamp | 1,211,180,829,294 | 2f3bc01f7492b8beac490c54f041d938eaeee22a | 3deb8547395318885455a1094bf32291ee84c5fd | /C03_Image_Processing_With_Keras/04EvaluatingClassifier.py | a1afe2e78050897ca272388b0a33f5051fa6af6c | [] | no_license | https://github.com/SanjoyPator1/ImageProcessingSkillsTrackDataCamp | 1978520dae29e89533d840af81e2252711f51bc0 | a6b7eb1b9ad193336ea02b81619de0b437940744 | refs/heads/master | 2022-12-28T12:44:30.096203 | 2020-10-04T16:15:02 | 2020-10-04T16:15:02 | 298,842,849 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
test_labels = array([[0., 0., 1.],
[0., 1., 0.],
[0., 0., 1.],
[0., 1., 0.],
[0., 0., 1.],
[0., 0., 1.],
[0., 0., 1.],
[0., 1., 0.]])
predictions = array([[0., 0., 1.],
[0., 1., 0.],
[0., 0., 1.],
[1., 0., 0.],
[0., 0., 1.],
[1., 0.,... | UTF-8 | Python | false | false | 623 | py | 41 | 04EvaluatingClassifier.py | 38 | 0.449438 | 0.372392 | 0 | 28 | 21.214286 | 56 |
FychanTW/automation_PO | 1,889,785,611,360 | aa8595df23a014f247ddc720381b69a1ff3964be | 370913383bb160539819c02bb2bd918548867ac4 | /src/AboutWindow_GUI.py | a630dcf74a2a6537b39af464415d1f7a69727645 | [] | no_license | https://github.com/FychanTW/automation_PO | c6f6beb13641cb736a47851e834eaee2b7fc9f4f | 314081aa3354f67d7117e6be3648d0cef72b2e69 | refs/heads/main | 2023-08-23T13:36:39.685594 | 2021-10-31T09:46:48 | 2021-10-31T09:46:48 | 418,862,024 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'AboutWindow.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, ... | UTF-8 | Python | false | false | 3,038 | py | 13 | AboutWindow_GUI.py | 9 | 0.686307 | 0.659645 | 0 | 64 | 46.46875 | 212 |
dflemin3/diskpy | 18,107,582,123,213 | 9e48ae227baaf9aa1d0e6a12b1bd79d13469fc76 | 919d9f3f071238fe5b64aa217f54a896bcd8ac85 | /diskpy/clumps/simclumps/_simclumps.py | 633bb7126bf09a9d68978a40761f6bf392e44bd0 | [
"MIT"
] | permissive | https://github.com/dflemin3/diskpy | 5a54d0216db93adeae79ab60cb88a091af7b5073 | 9a89562f6dda0b904439872136a04b90ea5cbc4e | refs/heads/master | 2021-01-18T08:47:37.442028 | 2015-11-04T21:14:04 | 2015-11-04T21:14:04 | 40,382,686 | 1 | 0 | null | true | 2015-11-04T21:04:34 | 2015-08-07T22:03:12 | 2015-08-07T22:03:13 | 2015-11-04T21:04:34 | 4,716 | 0 | 0 | 0 | Python | null | null | # -*- coding: utf-8 -*-
"""
Defines all the data classes for storing, managing, organizing, and accessing
clumps.
Created on Thu May 7 21:38:26 2015
@author: ibackus
"""
import pynbody as pb
SimArray = pb.array.SimArray
SimSnap = pb.snapshot.SimSnap
import numpy as np
from warnings import warn
def newSimgroup(sim... | UTF-8 | Python | false | false | 17,119 | py | 35 | _simclumps.py | 33 | 0.491734 | 0.484841 | 0 | 661 | 24.900151 | 80 |
myracheng/treehacks19 | 17,549,236,408,152 | 14136fe5c094bccac9bb60496b08ceaab45c8685 | af4c325a5a20cb054f22723af9a693cdf8cda3e5 | /mysite/env/lib/python3.6/io.py | c3e531188f9c386d17f05fb666c54deb8ae9d757 | [] | no_license | https://github.com/myracheng/treehacks19 | aff1d6356f480dfdc4ca75f286fbcbd29c110a35 | 9e2d9195f749415eddcfabaceed0f9d911b12c7e | refs/heads/master | 2020-07-04T11:07:02.833157 | 2019-02-17T19:24:08 | 2019-02-17T19:24:08 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | /Users/gracelu/anaconda3/lib/python3.6/io.py | UTF-8 | Python | true | false | 44 | py | 324 | io.py | 205 | 0.818182 | 0.75 | 0 | 1 | 44 | 44 |
ravikrranjan/learning-python | 13,194,139,574,102 | a409c32fcd83e4afe42ace8c7a3cae07bfbb047e | 1caff4eaf08d96c7a6f594499ec8664fc1b8cfe8 | /while_loop.py | 634945566842fa44487282a24dcf4ab08294fdb5 | [] | no_license | https://github.com/ravikrranjan/learning-python | f94598454e0a58a6fcce79fb3eea75402e2eac4a | 17d7628f12cec87913d79914d5c8b40b409bd371 | refs/heads/master | 2021-05-17T02:19:54.391310 | 2020-05-19T16:48:09 | 2020-05-19T16:48:09 | 250,573,197 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
number = 8
guess = int(input("I'm thinking a number between zero to ten, Can I gusess ? "))
while True:
if guess == number:
break
else:
guess = int(input('Nope, Try agian :'))
print("You gussed it, I was thinking about", number)
| UTF-8 | Python | false | false | 257 | py | 38 | while_loop.py | 34 | 0.614786 | 0.610895 | 0 | 10 | 24.5 | 80 |
akumar01/uoicorr | 8,254,927,176,621 | d1ea846d44a15a9899e50e052a3f2350e2f4208f | 30ebe031cc175c544f261333ee393bafa48ddef6 | /uoicorr_exp4.py | 9db85ed77ebcb5f47a22d8eda0b3d64ecf618345 | [] | no_license | https://github.com/akumar01/uoicorr | 7709cc8e62341c6b2c216f344f4279f4df7fde3e | b2b62dab3284f7bb5740131704e9331226328097 | refs/heads/master | 2020-04-08T13:06:08.288014 | 2019-05-01T23:06:04 | 2019-05-01T23:06:04 | 159,375,575 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import argparse
import numpy as np
import h5py
import time
from scipy.linalg import block_diag
from sklearn.metrics import r2_score
from sklearn.linear_model import ElasticNetCV
from PyUoI.UoI_Lasso import UoI_Lasso
### parse arguments ###
parser = argparse.ArgumentParser()
parser.add_argument('--n_features', type=... | UTF-8 | Python | false | false | 3,992 | py | 77 | uoicorr_exp4.py | 35 | 0.687625 | 0.664579 | 0 | 126 | 30.690476 | 94 |
asteen27/netbox-bgp | 12,360,915,880,310 | 42ef12455beb3e3c5544f5e26d1936b730bfe18d | 2055463aab9d8272cfcfa3b6831b77e9b4893cd4 | /netbox_bgp/migrations/0009_netbox_bgp.py | 83f70cb73972f71b016566dba1c237772f1e8eda | [
"Apache-2.0"
] | permissive | https://github.com/asteen27/netbox-bgp | b22421f9f0c7e90e2979c95897981ad4a2034261 | 8ee7a80484fe008408bbdc83a3da4bf2f2e50c8b | refs/heads/main | 2023-07-12T22:13:36.617871 | 2021-08-16T18:41:55 | 2021-08-16T18:41:55 | 396,925,486 | 0 | 0 | Apache-2.0 | true | 2021-08-16T18:40:42 | 2021-08-16T18:40:42 | 2021-08-13T17:51:29 | 2021-07-16T06:40:50 | 2,889 | 0 | 0 | 0 | null | false | false | # Generated by Django 3.1.3 on 2021-04-21 05:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('netbox_bgp', '0008_netbox_bgp'),
]
operations = [
migrations.AlterField(
model_name='bgpsession',
name='peer_group',... | UTF-8 | Python | false | false | 422 | py | 24 | 0009_netbox_bgp.py | 23 | 0.604265 | 0.559242 | 0 | 18 | 22.444444 | 83 |
mcdaviddj/eyeExtend-Connect | 6,691,559,053,529 | 7d3bdffbe6fef3638631de9096e0ee38ff40a8c7 | e37acaf3732f937c2f9be7c26a2a3ce58ef0d962 | /AzureAD/AzureAD 1.0.0/aad_test.py | b5128ceb2e3c9bb4812808da3d842e6c8a974622 | [
"MIT"
] | permissive | https://github.com/mcdaviddj/eyeExtend-Connect | 3d76546841a90a5390fa76d5a2148377226dbb3a | e1638210dda134ac481e763cc7c5b50241180089 | refs/heads/encode_session_id | 2023-08-01T05:58:31.313912 | 2021-09-28T16:33:23 | 2021-09-28T16:33:23 | 411,360,942 | 1 | 0 | null | false | 2021-09-28T16:37:33 | 2021-09-28T16:34:42 | 2021-09-28T16:35:28 | 2021-09-28T16:35:35 | 0 | 0 | 0 | 1 | Python | false | false | '''
Copyright © 2020 Forescout Technologies, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... | UTF-8 | Python | false | false | 2,720 | py | 236 | aad_test.py | 147 | 0.718279 | 0.708349 | 0 | 54 | 49.37037 | 117 |
CellarDoorMedia/Lockr-CA | 8,005,819,086,899 | f4451e8744396d4d358c9490d079f21a682a44ac | d801b8de0e905ed668c49dd18022f705bf6a4032 | /script/uuid | 55327b037f8ea5411ea6512fef58b234a564d4cd | [] | no_license | https://github.com/CellarDoorMedia/Lockr-CA | 3c50ed383e4ef38c062669a8a8f85499331de1d5 | 5dfc2067ba01fd37a67c3875dd46694bd4235428 | refs/heads/master | 2021-01-24T23:57:19.890919 | 2016-05-19T21:10:21 | 2016-05-19T21:10:21 | 59,155,939 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python2
import uuid
print str(uuid.uuid4())
| UTF-8 | Python | false | false | 62 | 5 | uuid | 3 | 0.693548 | 0.66129 | 0 | 5 | 11.2 | 23 | |
wsljmlin/spider | 3,831,110,868,976 | 05fec7cc8efb429f3fe49221afb3d5882549b88d | 5b9e7e8ff630bf73a30b80a452b2753f9b1b1904 | /spiderManager/route/spider.py | 75a720cb829e7c2afb51d299c1d976dc485ba20f | [] | no_license | https://github.com/wsljmlin/spider | b6fe9727de6c39145bae7e11349a5f98f057f5d0 | 63e1e938050b9399c4363f4a54d8f15d56e6368d | refs/heads/master | 2021-01-22T20:00:22.165610 | 2017-03-17T05:33:37 | 2017-03-17T05:33:37 | 85,274,543 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
#encoding=UTF-8
import sys
import os
import time
import re
import types
import json
from bs4 import BeautifulSoup
from flask import Blueprint
from flask import render_template
from flask import request
from model.loginVerify import requireLogin
from flask_wtf import Form
from wtforms... | UTF-8 | Python | false | false | 11,859 | py | 130 | spider.py | 65 | 0.584367 | 0.579249 | 0 | 282 | 38.882979 | 199 |
nestorwheelock/stripe-python | 5,437,428,615,225 | f83ba02da02e8dcbaedf2e116cb424263e049e09 | 1b0fb627d3412dc8dedb6246e5d71ea30831f737 | /tests/api_resources/test_invoice.py | aebf317cbe406b4eecfe7cf348d35f9ec0cf28a4 | [
"MIT"
] | permissive | https://github.com/nestorwheelock/stripe-python | ee00f8b01d325b935ef548fbd8a536900cd808c9 | 2be8e47a1e24f1394038d478b7e17b3962bb1b92 | refs/heads/master | 2020-03-22T00:33:22.087701 | 2018-06-29T09:50:33 | 2018-06-29T09:50:33 | 139,252,114 | 1 | 0 | null | true | 2018-06-30T13:34:21 | 2018-06-30T13:34:21 | 2018-06-30T01:49:43 | 2018-06-29T11:59:20 | 1,672 | 0 | 0 | 0 | null | false | null | from __future__ import absolute_import, division, print_function
import stripe
from tests.helper import StripeTestCase
TEST_RESOURCE_ID = 'in_123'
class InvoiceTest(StripeTestCase):
def test_is_listable(self):
resources = stripe.Invoice.list()
self.assert_requested(
'get',
... | UTF-8 | Python | false | false | 2,669 | py | 37 | test_invoice.py | 35 | 0.536905 | 0.530161 | 0 | 93 | 27.698925 | 64 |
chenbiningbo/programming_learning | 19,207,093,759,066 | 0fae41a0235ed99eb360c0e59f6d3cb82d3c38f7 | d42a65c149b004228fd72586a0f79b17b0545e92 | /MIT_learning/session5_dataanlysis_panda/Problem/problem5_cus_demo.py | 87bcc29738347533f5cbd3fc01f9d5b85cec2ef7 | [] | no_license | https://github.com/chenbiningbo/programming_learning | 34a642823c6bc8d54c4b912fa51a4ad6e9f23c15 | 2cfb2ca509d7d1ccc4779be4d7a35625010cb98a | refs/heads/master | 2020-12-27T12:51:05.640281 | 2020-02-18T14:02:40 | 2020-02-18T14:02:40 | 237,903,158 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Problem 5
'''
HSBD Bank has hired Mario, a data analyst, to do some data analysis to help the company
to better understand the customers' demographic characteristics. The upper management
has some questions, and Mario must find the answer by analyzing the data available.
To start, please run the cell below to get th... | UTF-8 | Python | false | false | 2,535 | py | 93 | problem5_cus_demo.py | 66 | 0.663511 | 0.641026 | 0 | 59 | 41.983051 | 125 |
jpinzonc/Senators_votes | 16,131,897,209,217 | 2d5ac1aafd5106b3e98cbf5ec0c3d3276ed62278 | 4117b0d34ef77835367b2770a14c3b4c36ec4bba | /map_app/senate_env/lib/python3.6/codecs.py | ae5990c6674c2dda50c20c778f0c34cd21531ea1 | [] | no_license | https://github.com/jpinzonc/Senators_votes | e10d7f00a07edf84295152e607cd048f27556b71 | 4d62a92ad0327443df408b43c4676b6e9ca7ca46 | refs/heads/master | 2022-07-10T11:01:14.439674 | 2019-05-25T01:24:50 | 2019-05-25T01:24:50 | 97,988,403 | 0 | 0 | null | false | 2022-06-21T21:12:52 | 2017-07-21T21:37:17 | 2019-05-25T01:24:57 | 2022-06-21T21:12:51 | 40,702 | 0 | 0 | 6 | Python | false | false | /Users/jpinzon/anaconda3/lib/python3.6/codecs.py | UTF-8 | Python | false | false | 48 | py | 129 | codecs.py | 53 | 0.833333 | 0.770833 | 0 | 1 | 48 | 48 |
snehananth/bookstore | 8,031,588,892,159 | 9f6c25a0175c41ca21068c1efae4ededb2687fc5 | 28c5a2b3734ed2bf66da598a0bd6343b2b5a0d5e | /book/urls.py | 40b286489f45f3cd71bad147b63e10800338cbdc | [] | no_license | https://github.com/snehananth/bookstore | 703095bc41b9101174e6d5b39b9d2f45a4535337 | 6c6992c97925f7c182754700287e21d31e0ca954 | refs/heads/master | 2021-08-08T15:07:37.208864 | 2017-11-10T15:18:40 | 2017-11-10T15:18:40 | 110,231,419 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.conf.urls import url
from .views import BookDetail,BookListView
urlpatterns = [
url(r'^book/$', BookListView.as_view()),
url(r'^bookupdate/(?P<id>[0-9]+)/$', BookDetail.as_view()),
] | UTF-8 | Python | false | false | 203 | py | 15 | urls.py | 15 | 0.669951 | 0.660099 | 0 | 7 | 28.142857 | 63 |
active-sludge/TodoLoo | 14,877,766,716,685 | f60b27a78ca7f55f115e1d213ee90c891d1bde48 | b251ab344b3e3ba81ffb44b4a14992257ff370bb | /todo/tests.py | b244f6b8171f62c44a58b2ef3d2c802c0c2e7e43 | [] | no_license | https://github.com/active-sludge/TodoLoo | 62201b2082e43c61431d1abf0c0c04f5267dfec4 | 68800dc75019dc257640dd9f75fbfa2c708effea | refs/heads/main | 2023-08-23T07:52:01.034397 | 2021-10-12T13:59:30 | 2021-10-12T13:59:30 | 410,530,396 | 0 | 0 | null | false | 2021-10-12T13:57:54 | 2021-09-26T11:16:02 | 2021-10-12T13:52:11 | 2021-10-12T13:54:22 | 1,460 | 0 | 0 | 1 | JavaScript | false | false | from django.test import TestCase, Client
from django.contrib.auth.models import User
from todo.models import Article, Todo
from django.urls import reverse
c = Client()
class ViewTestsCase(TestCase):
def setUp(self):
self.credentials = {
'username': 'testuser',
'password': 'secre... | UTF-8 | Python | false | false | 3,228 | py | 11 | tests.py | 7 | 0.61772 | 0.60223 | 0 | 108 | 28.888889 | 84 |
OpenITI/openiti | 16,415,365,026,211 | 2fc32f57df61f30be6925c27e4fc4655a98d2242 | 1b62a2c48dec8449bf146ec2a572bb58994873c5 | /build/lib/openiti/release/collect_openITI_version.py | a5d3ade23442fa95185b33985387fe962c340123 | [
"MIT"
] | permissive | https://github.com/OpenITI/openiti | 32bac70f87e85623d9f3463edfbb32986fe7b33e | 5ebec640c634ef57569d7ef4e1dc0dd1b188dcb3 | refs/heads/master | 2023-03-15T21:26:56.600717 | 2023-03-08T12:00:02 | 2023-03-08T12:00:02 | 224,496,178 | 10 | 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Copies all data from the XXXXAH directories to a single directory in order to publish a version of OpenITI.
import os
import shutil
import sys
import re
def copy_ah_data(source_dir, dest_dir):
# All XXXXAH direcortories
ah_dirs = os.listdir(source_dir)
for ad in ah_dirs:
# Get the path to the "... | UTF-8 | Python | false | false | 3,331 | py | 84 | collect_openITI_version.py | 59 | 0.47193 | 0.469228 | 0 | 71 | 45.901408 | 109 |
dagamargit/ejemplos-tkinter | 5,841,155,526,624 | 5635fec7a5380de3b7508475649f392c0606f4e6 | 97738198d0eda1baa0e0f8fa961564bc72112723 | /ej20_canvas_id_tags.py | adaa44945af83edb21903c8001b7ecf20f3b774a | [] | no_license | https://github.com/dagamargit/ejemplos-tkinter | 2eaf4b56097d1c4b2e37080393df2907e9620cb8 | 64cb99b8df3ad32c1bfd0ce81bae8496edc66415 | refs/heads/master | 2021-07-17T05:24:22.434180 | 2021-02-20T17:28:02 | 2021-02-20T17:28:02 | 239,290,374 | 2 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import tkinter as tk
from tkinter import ttk
class Aplicacion:
def __init__(self):
self.ventana1=tk.Tk()
self.crear_botones()
self.canvas1=tk.Canvas(self.ventana1, width=600, height=400, background="black")
self.canvas1.grid(column=0, row=1)
self.linea=self.canvas1.create_li... | UTF-8 | Python | false | false | 2,143 | py | 50 | ej20_canvas_id_tags.py | 49 | 0.66978 | 0.60766 | 0 | 47 | 44.574468 | 114 |
sidyvan/autoescola | 12,919,261,669,247 | 345fcfb40b0eb094417799f99ddbbc85cb10e669 | f7e076242848e48285670c248f4106a3348a1ca9 | /autoescolaweb/cliente/migrations/0002_auto_20170224_1734.py | 720c8966aceedbfe24731720923b25fd56a25c2b | [] | no_license | https://github.com/sidyvan/autoescola | 181e3a2b49a99004f4351490651354a26a9af671 | f5370a2a6a3b1ab6ab07a5a617f1985f300c02c0 | refs/heads/master | 2017-08-03T20:07:23.948264 | 2017-03-11T16:40:08 | 2017-03-11T16:40:08 | 81,997,520 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-24 20:34
from __future__ import unicode_literals
import cliente.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cliente', '0001_initial'),
]
operations = [
migration... | UTF-8 | Python | false | false | 745 | py | 20 | 0002_auto_20170224_1734.py | 11 | 0.612081 | 0.583893 | 0 | 26 | 27.653846 | 113 |
mabuix/stock_ver2 | 6,992,206,769,478 | cffb9d2e71759a9d0793b85ab2da39f644bb2a52 | 4d6b32ecc1e9d10de309e56c3c896baafb66bed7 | /stock_app/stock_crawl/stock_crawl/spiders/fundamentals_crawl.py | 5633a3efb6f32ab83883ed517f4e52dd4e10653c | [] | no_license | https://github.com/mabuix/stock_ver2 | 4a6a45e740ade05ad86fc92a5af65543e9e1999e | 32daf879b10fea82c5a8c710afa870a5af3a5ee0 | refs/heads/master | 2020-04-07T11:23:40.781615 | 2018-03-07T08:59:24 | 2018-03-07T08:59:24 | 124,207,025 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
import os
# ItemのFundamentalsクラスをインポート.
from stock_crawl.items import Fundamentals
class FundamentalsCrawlSpider(CrawlSpider):
# Spiderの名前.
name = 'fundamentals_crawl'
# クロール対象とするドメインのリスト.
allowed_domains = [... | UTF-8 | Python | false | false | 2,057 | py | 16 | fundamentals_crawl.py | 13 | 0.651435 | 0.650264 | 0 | 45 | 36.955556 | 135 |
lmeribal/portfolio | 14,740,327,762,669 | 57bb63c9a628b92098c648050ad9dd5d4e84e44a | e992b23dbf791e2b1fa562dc5b5cf678e54419cd | /infopole/teensComments/Татарстан/Облако тегов.py | ec61374d94d68417b6694ab3e6559b9178694eb2 | [] | no_license | https://github.com/lmeribal/portfolio | 4815ceaf508dd1cc0597f42403c92fcbc4c5f991 | 1adb77d5c6a5f1a52881180fe7fdae9f8db250b6 | refs/heads/master | 2022-03-21T16:45:03.301439 | 2019-10-28T21:17:54 | 2019-10-28T21:17:54 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import matplotlib.pyplot as plt
import re
from wordcloud import WordCloud, STOPWORDS
import pandas as pd
text = []
f = open('post.txt','r')
for line in f:
line.replace('на ','')
line.replace('ты ','')
line.replace('как ','')
line.replace('анон','')
line.replace('Анон','')
line.replace('админ... | UTF-8 | Python | false | false | 8,481 | py | 69 | Облако тегов.py | 25 | 0.50864 | 0.50838 | 0 | 234 | 31.897436 | 78 |
krishchow/CtCi | 4,200,478,035,378 | 0a09a98aed433f49745cb2030e5220db4a27eef3 | 171a946e13cdbc08cfb9925449b85d2bea9ffa5b | /continSum.py | c05daea228b373f6df16efe1333335b1dd11013d | [] | no_license | https://github.com/krishchow/CtCi | cf48b5153afda67d5b3216163188f0d13e00c6ca | 139085f467d32804fbc623dc64b0bee9927eeac7 | refs/heads/master | 2020-07-10T20:05:56.613454 | 2019-09-24T05:49:32 | 2019-09-24T05:49:32 | 204,357,953 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def continousSum(array: list):
current,maximum=float('-inf'),float('-inf')
for i in array:
current = max(i, current+i)
maximum = max(maximum, current)
return maximum
assert continousSum([-2, -3, 4, -1, -2, 1, 5, -3]) == 7 | UTF-8 | Python | false | false | 250 | py | 12 | continSum.py | 11 | 0.592 | 0.556 | 0 | 8 | 30.375 | 55 |
enolfc/os-cloud-ur | 19,061,064,879,295 | b63ecc179866ab735680c7f298ac3c353e52a23c | 4d3f79abd81128155b47041b58bc61155141031c | /ceilometer2ur/__init__.py | 21d267bcdbd4bfd9dfd2097ea02b40d9701b6099 | [] | no_license | https://github.com/enolfc/os-cloud-ur | 192288704bb1ca49052a7adaad30f07022535bd6 | 68b8de95454b083cc86e23d441a88c0ba10f81bd | refs/heads/master | 2016-03-06T02:59:36.255348 | 2014-01-21T12:33:47 | 2014-01-21T12:33:47 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Copyright 2014 Spanish National Research Council
#
# 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 agre... | UTF-8 | Python | false | false | 1,036 | py | 7 | __init__.py | 6 | 0.694015 | 0.686293 | 0 | 22 | 46.090909 | 75 |
explosion/spaCy | 128,849,065,873 | c916b3e2b5e980f926fb2cd0e6bbf00aa952145d | 55f6a9b8f90ae308a90739fd8f77f4e7cd10ff19 | /spacy/lang/fa/examples.py | 9c6fb0345e3251d690f234c5e68b39275da27d40 | [
"MIT"
] | permissive | https://github.com/explosion/spaCy | cce07ee403aa398de7ba8941a2c11d22aea68021 | 3e4264899c3b12f8eabc5cd700146177a34824d0 | refs/heads/master | 2023-08-31T07:18:13.598768 | 2023-08-30T09:58:14 | 2023-08-30T09:58:14 | 21,467,110 | 26,348 | 4,983 | MIT | false | 2023-09-13T17:56:22 | 2014-07-03T15:15:40 | 2023-09-13T17:12:06 | 2023-09-13T17:56:22 | 201,927 | 27,077 | 4,242 | 92 | Python | false | false | """
Example sentences to test spaCy and its language models.
>>> from spacy.lang.fa.examples import sentences
>>> docs = nlp.pipe(sentences)
"""
sentences = [
"این یک جمله نمونه می باشد.",
"قرار ما، امروز ساعت ۲:۳۰ بعدازظهر هست!",
"دیروز علی به من ۲۰۰۰.۱﷼ پول نقد داد.",
"چطور میتوان از تهران به کاشا... | UTF-8 | Python | false | false | 515 | py | 1,102 | examples.py | 784 | 0.649867 | 0.623342 | 0 | 15 | 24.133333 | 56 |
litex-hub/fpga_101 | 7,060,926,281,947 | 8a2d4e2c8f8572ee5ed1f6b7daa1ea03988eb606 | badff67fdb081297cec78d8bb3383d19c3a0c439 | /lab001/solutions/s004.py | f0f9e0476fbcd91db03e75ae5fdfa88e5ade7cc7 | [
"BSD-2-Clause"
] | permissive | https://github.com/litex-hub/fpga_101 | 67635edb6a8b84e2bbf3f0972130e06981f5ea50 | 1e9c8d270e5c9d91c601b6a68a5466941340b964 | refs/heads/master | 2022-12-12T20:27:22.612261 | 2022-12-02T07:45:41 | 2022-12-02T07:45:41 | 128,534,747 | 285 | 50 | BSD-2-Clause | false | 2022-03-28T14:33:53 | 2018-04-07T14:13:01 | 2022-03-28T11:05:07 | 2022-03-28T14:33:51 | 3,669 | 246 | 37 | 2 | Python | false | false | #!/usr/bin/env python3
from migen import *
from litex.build.generic_platform import *
from litex.build.xilinx import XilinxPlatform
# IOs ----------------------------------------------------------------------------------------------
_io = [
("user_led", 0, Pins("H17"), IOStandard("LVCMOS33")),
("user_led",... | UTF-8 | Python | false | false | 3,535 | py | 31 | s004.py | 25 | 0.519378 | 0.461103 | 0 | 88 | 39.159091 | 100 |
zzq5271137/learn_python | 4,509,715,668,538 | 992c46e091ea4de4bca88e9f86e1b3e204a32b4e | b01b437d3a80251aa3e36edd67b8ecdb90ec0e28 | /15-虚拟环境/02-virtualenvwrapper_intro.py | 6bb56bcf64eb5a41f14fb9afd5ffd011be4333c2 | [] | no_license | https://github.com/zzq5271137/learn_python | e8ddce04c7022542bad25d8d18d4863246fe7842 | 2ebca15948568e761d46b5152e8de3fa82720dba | refs/heads/master | 2023-04-23T09:14:38.853949 | 2021-05-02T17:29:11 | 2021-05-02T17:29:11 | 271,830,802 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
virtualenvwrapper介绍
"""
"""
virtualenvwrapper这个软件可以让我们管理虚拟环境变得简单, 不用再跑到某个目录下通过virtualenv来创建虚拟环境,
也不用再跑到某个虚拟环境的具体目录下去启动虚拟环境;
安装virtualenvwrapper:
1. Linux:
pip install virtualenvwrapper
2. Windows:
pip install virtualenvwrapper-win
virtualenvwrapper的基本使用:
1. 创建虚拟环境:
执行"mkvirtualenv 虚拟环境的名字"命令;
执行这个命令后... | UTF-8 | Python | false | false | 2,649 | py | 174 | 02-virtualenvwrapper_intro.py | 169 | 0.79418 | 0.780696 | 0 | 45 | 30.311111 | 73 |
jperkelens/pants | 12,807,592,510,630 | 1e496e72bcfacdd7a43f7dff2f8aeab2a944bdad | f6d08f2ac89f0dae24c39d9c827484cfb8aefcea | /tests/python/pants_test/logging/native_engine_logging_integration_test.py | 7ab1487800ba906f3668368810130c589601b37b | [
"Apache-2.0"
] | permissive | https://github.com/jperkelens/pants | 51f26f395a645655e9bdf89b666dee61823a1ba7 | b7ad997b5ef9175cc5e22e36574d8590bc8da120 | refs/heads/master | 2020-12-23T02:44:53.078141 | 2020-08-22T15:55:07 | 2020-08-22T15:55:07 | 237,007,066 | 0 | 0 | Apache-2.0 | true | 2020-01-29T14:51:12 | 2020-01-29T14:51:11 | 2020-01-29T07:52:26 | 2020-01-29T07:52:23 | 100,831 | 0 | 0 | 0 | null | false | false | # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pants.testutil.pants_integration_test import PantsIntegrationTest, read_pantsd_log
from pants_test.pantsd.pantsd_integration_test_base import PantsDaemonIntegrationTestBase
class Na... | UTF-8 | Python | false | false | 1,534 | py | 36 | native_engine_logging_integration_test.py | 33 | 0.685789 | 0.677314 | 0 | 35 | 42.828571 | 97 |
Baobao211195/python-tutorial | 944,892,805,692 | 5a2dfd29b7e292602614c1124d265adad324c4ef | 53a7643811aa67c201821c41dcfae24a738e3709 | /Clazz/compare_static_method_class_method.py | 246075c154c8e7411b3b3057c293defc906b2640 | [] | no_license | https://github.com/Baobao211195/python-tutorial | 50f39cc4c68c22cbb3cea011a37277785911fa10 | 1a15bbdbaafe5c01d773a24241b67a5f4a454ceb | refs/heads/master | 2023-03-15T17:22:13.258356 | 2020-01-05T14:47:53 | 2020-01-05T14:47:53 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
class A(object):
def foo(self, x):
print("executing foo(%s, %s)" % (self, x))
@classmethod
def class_foo(cls, x):
print("executing class_foo(%s, %s)" % (cls, x))
@staticmethod
def static_foo(x):
print("executing static_foo(%s)" % x)
if __name__ ==... | UTF-8 | Python | false | false | 805 | py | 166 | compare_static_method_class_method.py | 150 | 0.513043 | 0.504348 | 0 | 36 | 21.361111 | 55 |
biocore/empress | 2,276,332,669,204 | 62f952fa742167ad721ac5e33e4c4f88c903c2e5 | c91e506d4a251dc9c9354804284f4b540d942c70 | /empress/_plot_utils.py | 57ed8c5d4ac0a46bfe930fab27391602000c691b | [
"MIT",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"CC0-1.0",
"BSD-3-Clause"
] | permissive | https://github.com/biocore/empress | 76d3cef31683457a4a6a79f76e83d37b3dc2b0cc | cc3975a71c931f2d356856fb5ee9669b3f83f150 | refs/heads/master | 2022-06-29T00:30:28.364512 | 2022-05-23T14:38:45 | 2022-05-23T14:38:45 | 111,137,123 | 48 | 31 | BSD-3-Clause | false | 2022-08-22T23:00:54 | 2017-11-17T18:25:37 | 2022-05-23T14:48:50 | 2022-05-31T01:56:17 | 48,032 | 33 | 29 | 144 | JavaScript | false | false | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2020, empress development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | UTF-8 | Python | false | false | 3,088 | py | 74 | _plot_utils.py | 59 | 0.629858 | 0.618523 | 0 | 107 | 27.859813 | 79 |
elitumgroup/erp-maeq-v11 | 14,413,910,295,012 | 0ffb38ccfddba485872104798ff0cf1161ee1afb | 71ca130e51f181aae025e15efd004c0f89237ef2 | /eliterp_purchases/__manifest__.py | 795329a72cd53c8fdf7a5a1e77e01b7d822eaa4b | [] | no_license | https://github.com/elitumgroup/erp-maeq-v11 | cf0e2f91926b4a3350802b16ca018299f6f6a6b0 | 8e0243818968a63d8212c08f75ce431bcf33346c | refs/heads/master | 2021-06-04T19:23:02.576851 | 2021-01-04T15:53:48 | 2021-01-04T15:53:48 | 157,874,880 | 2 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018 Elitumdevelop S.A, Ing. Mario Rangel
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
'name': "Módulo de Compras",
'summary': "Compras.",
'author': "Ing. Mario Rangel, Elitumgroup S.A",
'website': "http://www.elitumgroup.com",
'category... | UTF-8 | Python | false | false | 1,039 | py | 242 | __manifest__.py | 102 | 0.550096 | 0.540462 | 0 | 38 | 26.315789 | 68 |
jinghaoxu/yimiauto | 18,854,906,447,477 | 33e1be344618e66eaa7c20fcc5cc8cdc72fff5a4 | 32c87a4358ad4dd3c10259d648199d608ff8dbd3 | /YimiDjango/view_all/page.py | 78ce3dc24feb36f719ab54b48ea5b8080282586d | [] | no_license | https://github.com/jinghaoxu/yimiauto | baef5a5686b2965704f27aaed531fee3d4920ab2 | 4a3f969ba5c30117f38b83dc7ab10d0c76de8547 | refs/heads/master | 2021-09-10T04:38:17.346926 | 2018-03-21T01:46:28 | 2018-03-21T01:54:13 | 126,105,151 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.shortcuts import render_to_response
"""
返回页面
"""
# 首页
def index(request):
return render_to_response('index.html')
# 用例集
def suite(request):
return render_to_response('suite.html')
# 用例
def case(request):
try:
suiteid = request.GET.get('suiteid')
except:
suiteid = False... | UTF-8 | Python | false | false | 798 | py | 46 | page.py | 37 | 0.659151 | 0.659151 | 0 | 43 | 16.534884 | 88 |
mrdutta27/Liquid-Helium-Simulations-Summer-2015 | 16,758,962,394,972 | d4e87fe07af26ca4040d0e80b0f0b3738f30b1bb | 36b0a4ee431ad6a2dfd2df046564d3ec620a18f9 | /simulation_data/Wavenumber_Z0/Old Data/bad data/color scatter.py | e59aaa11e6da7d3ea1e4263047b244d3e5475648 | [] | no_license | https://github.com/mrdutta27/Liquid-Helium-Simulations-Summer-2015 | a1db6be533936fd0d8f0a0e2ea05bd9919d5f6ac | 78af9633a9f719c91f3f571bb28093a0f25f4cab | refs/heads/master | 2021-01-10T06:47:57.499277 | 2015-08-13T21:31:24 | 2015-08-13T21:38:14 | 35,980,761 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
import csv
import matplotlib.pyplot as plt
import pylab as p
import numpy as np
data = csv.reader(open(r'C:\Users\Suryabrata\Dropbox\Yale\Summer 2015\McKinsey Research\SimulationData\Wavenumber\Particle Sim\bolometer\all_bolometer.csv', 'rb'), delimiter=",", quotechar='|')
#Prompt Signal Rate ... | UTF-8 | Python | false | false | 1,082 | py | 11,117 | color scatter.py | 15 | 0.671904 | 0.644177 | 0 | 36 | 29.083333 | 193 |
Code-Institute-Submissions/Poster-Panda | 10,574,209,531,249 | 90defe9a257d71cf354ebb0a3b96bb186de1ae46 | 3c4327089fae4e666d1ff2e7f3656a88c2f096d9 | /wishlist/views.py | 0dcd7de7fa89031d84d8f7836b0dc55fcfeebdc7 | [] | no_license | https://github.com/Code-Institute-Submissions/Poster-Panda | 42ff970ba19d55aeb62638923bdc673db590e2b2 | 773f734afd9370916b3f4875c9f404c37eb69000 | refs/heads/master | 2023-07-07T16:05:44.815209 | 2021-08-09T08:53:12 | 2021-08-09T08:53:12 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.shortcuts import render, redirect, reverse, get_object_or_404
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from products.models import Product
from profiles.models import UserProfile
from wishlist.models import Wishlist, WishlistItem
@login_required
def v... | UTF-8 | Python | false | false | 1,646 | py | 23 | views.py | 7 | 0.669502 | 0.665857 | 0 | 49 | 32.591837 | 73 |
lukeprotag/PathBench | 12,498,354,866,001 | 877fed493c881625f4519622801f10713d0f3114 | 67cf4d424f84bda5a43123bf086b6be83eb52850 | /src/ros/advanced/ros.py | bd0d5243a8db0f31dfba1e0eb564de48e16cfaf3 | [
"BSD-3-Clause"
] | permissive | https://github.com/lukeprotag/PathBench | 2811df430261b34c78c408c5fcd8d39287d9ac62 | 101e67674efdfa8e27e1cf7787dac9fdf99552fe | refs/heads/master | 2023-07-08T13:18:33.103635 | 2021-07-30T16:55:49 | 2021-07-30T16:55:49 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import sys
import argparse
from typing import Optional
from nptyping import NDArray
import numpy as np
import cv2 as cv
import rospy
from nav_msgs.msg import OccupancyGrid, Odometry
from geometry_msgs.msg import Twist, PoseWithCovariance
# Add PathBench/src to system path for module imports
sys.path.insert... | UTF-8 | Python | false | false | 13,960 | py | 20 | ros.py | 13 | 0.602722 | 0.592335 | 0 | 368 | 36.934783 | 156 |
AndreiErofeev/RaifHack_by_Crystal | 670,014,913,925 | 3dc480f758b00a73b054441e971ee033b4f3bc31 | 4108281fd9bae04ac72c7802f8d8d5724ed920d5 | /model/predict.py | 74e58dcd1a7897b51df4f7148fa4396f6722d03b | [] | no_license | https://github.com/AndreiErofeev/RaifHack_by_Crystal | feec90a26efbf1becf45945cc1c30d057b2313a1 | 16feaf13bb196ab0e03cee4b4de6cc0e28e78a18 | refs/heads/main | 2023-08-07T19:37:40.584910 | 2021-10-03T00:34:42 | 2021-10-03T00:34:42 | 409,711,320 | 0 | 0 | null | false | 2021-10-04T12:01:28 | 2021-09-23T18:59:15 | 2021-10-03T00:37:41 | 2021-10-04T12:01:27 | 294 | 0 | 0 | 1 | Python | false | false | import xgboost as xgb
import pandas as pd
import numpy as np
import pickle
from .featuretransforming import floor_cleaning, feature_transformer
def predict(data_test, modelname = 'model.pkl', outname = '../submit.csv'):
data_test = floor_cleaning(data_test)
features = ['id', 'floor', 'city', 'lat', 'lng', 'r... | UTF-8 | Python | false | false | 1,382 | py | 10 | predict.py | 8 | 0.638929 | 0.622287 | 0 | 30 | 45.1 | 113 |
davidbrouillette/KDigitalPortland-PingPong | 10,909,216,978,794 | 6d991bf44defef112e02d02bb3f008f531e018dd | 230f4e4f33c712a011f5b812815130d48131e9da | /v1/python/textObject.py | 6a04efe120891df0a9d7b28953971a502c4dc3a8 | [] | no_license | https://github.com/davidbrouillette/KDigitalPortland-PingPong | f04b091ba6f04896e475f90457271c73adff6e76 | 5501d68497ba56e095dc464945e19cbf9b798ec3 | refs/heads/master | 2020-03-26T12:18:35.974989 | 2018-08-16T20:30:43 | 2018-08-16T20:30:43 | 144,885,972 | 1 | 0 | null | false | 2018-08-16T20:30:44 | 2018-08-15T17:57:41 | 2018-08-16T20:17:32 | 2018-08-16T20:30:44 | 25 | 1 | 1 | 0 | Python | false | null | import pygame
class TextObject:
def __init__(self, id, text, x, y, fontSize=50):
self.id = id
self.pos = (x,y)
self.text = text
self.color = (255,117,73)
self.font = pygame.font.SysFont("lato", fontSize, True)
self.bounds = self.getSurface(self.text)
def... | UTF-8 | Python | false | false | 726 | py | 31 | textObject.py | 27 | 0.589532 | 0.571625 | 0 | 22 | 31.909091 | 65 |
orange-eng/internship | 7,275,674,638,480 | 298fd91c4c11b07213690053948e4442d60c37b1 | f0adf5afb93b7f0a67802e876a02e898cd92a172 | /Tencent/Filters/video_cut copy.py | fd2353be2ae4592acb231e86512b91ed688e2de3 | [
"Apache-2.0"
] | permissive | https://github.com/orange-eng/internship | 9a2f746b3d50673038481392100d375f6eec82d3 | c8c566df453d3a4bdf692338f74916ae15792fa1 | refs/heads/main | 2023-07-18T11:46:36.659858 | 2021-08-31T09:39:10 | 2021-08-31T09:39:10 | 358,230,295 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
import cv2
import numpy as np
cap = cv2.VideoCapture(0)
# Check if camera opened successfully
if (cap.isOpened()== False):
print("Error opening video stream or file")
frameNum = 0
# Read until video is completed
while(cap.isOpened()):
# Capture frame-by-frame
ret, frame = cap.read()
frameNum += 1
if r... | UTF-8 | Python | false | false | 1,459 | py | 172 | video_cut copy.py | 135 | 0.635739 | 0.602062 | 0 | 49 | 28.653061 | 86 |
UdeS-CoBIUS/G4Conservation | 8,727,373,590,338 | fd16382579dfee6cf7aceeb2a3cc1a19f38d047a | 9dd4d6da5bb878d6d67e6d6a632e23d566183175 | /scripts/review/pG4AnnotationCentro.py | 9fc03e08cd61524fd912b5fe5aae733faa53290a | [] | no_license | https://github.com/UdeS-CoBIUS/G4Conservation | 3b6dd072ef99cbb5b91af4ac30a8500fcc8433d0 | 386fb776d7aa4f0055bb4b6a2aeeca23948973ee | refs/heads/master | 2023-08-24T20:30:03.671649 | 2021-10-13T14:31:40 | 2021-10-13T14:31:40 | 375,058,383 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-:v
import os
import argparse
import pandas as pd
from pprint import pprint
"""
Copyright:
Copyright Universite of Sherbrooke, departement of biochemistry and
departement of computation.
Date:
Jully 2020
Description:
This script reads all ouput files from G4RNA Scree... | UTF-8 | Python | false | false | 9,025 | py | 94 | pG4AnnotationCentro.py | 36 | 0.701496 | 0.678449 | 0 | 262 | 33.446565 | 142 |
ShenghuiXue/django | 11,905,649,354,783 | 0629fa0847b5093dce354f97c315e19809e9d40a | a9d06b567bea638123b03ca3685cad0c40414fb9 | /python_basics/list.py | d5ca141479e53300ef031421bfaac030cbd9fef7 | [] | no_license | https://github.com/ShenghuiXue/django | a1cc3f198c0dd83e555525478ebd43713ad89ae0 | 53dc175f5d00f6ddb4eb7a42807ce31e6b444327 | refs/heads/master | 2020-03-22T10:05:57.723645 | 2018-07-05T17:35:28 | 2018-07-05T17:35:28 | 139,880,798 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | matrix = [[1,2,3],[4,5,6],[7,8,9]]
# list comprehesion
first_col = [row[0] for row in matrix]
print (first_col)
| UTF-8 | Python | false | false | 113 | py | 6 | list.py | 5 | 0.619469 | 0.530973 | 0 | 5 | 21.6 | 38 |
hkristen/datacube-core | 6,390,911,382,554 | 14afff4feacc4db0669bec61820343c02f2f42eb | 8cb57b10a3ccfdf55c4eb2cc2136dcee5750524c | /datacube/index/_datasets.py | a42f6049050535b6b45372d4c5c10ffabb8a0dcc | [
"Apache-2.0"
] | permissive | https://github.com/hkristen/datacube-core | bc88f0f84f9199887d02068dca7d895e4207bbf6 | 7c1563c086a71c6bea9349af2439459f61a35a94 | refs/heads/develop | 2021-01-23T00:20:12.579584 | 2017-03-29T08:10:35 | 2017-03-29T08:10:35 | 85,717,021 | 0 | 1 | null | true | 2017-03-21T15:12:29 | 2017-03-21T15:12:29 | 2017-03-20T05:47:58 | 2017-03-21T05:10:49 | 34,192 | 0 | 0 | 0 | null | null | null | # coding=utf-8
"""
API for dataset indexing, access and search.
"""
from __future__ import absolute_import
import logging
import warnings
from collections import namedtuple
from uuid import UUID
from cachetools.func import lru_cache
from datacube import compat
from datacube.index.fields import Field
from datacube.mo... | UTF-8 | Python | false | false | 46,500 | py | 23 | _datasets.py | 14 | 0.592988 | 0.592428 | 0 | 1,172 | 38.667235 | 120 |
achacha/AOS | 3,693,671,898,419 | 1542a46418102dcb78c5525d8703f5f205599d9e | 23553b6bcf0a278776f0a651b24a3c6a22a702f9 | /ALibrary/call_gather_headers.py | 36f0b093c53062952ffa51be7745b19e4dcf99f9 | [] | no_license | https://github.com/achacha/AOS | 24ace04a4228de4d0295379d84cb936c2a33511b | bea07af94f23982d4fceb10a9cf70a7e5467355f | refs/heads/master | 2020-05-17T12:20:35.667655 | 2016-02-10T13:33:43 | 2016-02-10T13:33:43 | 3,578,772 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
import os,sys;
BASE_ALIBRARY_PATH=os.path.dirname(os.path.abspath(sys.argv[0]));
#print("BASE_ALIBRARY_PATH="+BASE_ALIBRARY_PATH);
BASE_ENV_PATH=os.path.normpath(os.path.join(BASE_ALIBRARY_PATH,"..","_devtools","bin"));
params="";
for param in sys.argv[1:]:
params = params + param + " ";
os... | UTF-8 | Python | false | false | 414 | py | 731 | call_gather_headers.py | 615 | 0.678744 | 0.673913 | 0 | 13 | 30.230769 | 88 |
Buor/python-codewars-solutions | 13,572,096,682,866 | 8cd91cd6248b089a01989e083a87e0315fe52cfd | dc37b0ba02bcb195a71988563ec461e3181c2811 | /kyu6/highest_scoring_word.py | 8d93350d8363e3c15810408987507896764aef92 | [] | no_license | https://github.com/Buor/python-codewars-solutions | 08506a24791adea4be8cb7c4479e40ffd604975f | 965218cf18ed132aa2b2f570e165fae79b73e4f0 | refs/heads/master | 2023-08-13T02:01:29.151321 | 2021-09-10T11:36:21 | 2021-09-10T11:36:21 | 402,838,622 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # https://www.codewars.com/kata/57eb8fcdf670e99d9b000272
from functools import reduce
high = lambda x: max(x.split(" "), key=lambda y: reduce(lambda z, q: z + q, map(lambda w: ord(w), y)) - len(y) * 96) | UTF-8 | Python | false | false | 202 | py | 10 | highest_scoring_word.py | 10 | 0.688119 | 0.60396 | 0 | 3 | 66.666667 | 116 |
dgretton/pyhamilton | 2,920,577,794,780 | bd766a7e7e29e47a9ca663e8f494bb897cb293b1 | e08bb81a0018d234cc78f365cc4aa64409ef5425 | /examples/96_head_pickup_eject.py | b1d50d806989a3d22f93361b77276e46843d800e | [
"MIT"
] | permissive | https://github.com/dgretton/pyhamilton | d3b9ffcdbcd8c50f412d27ef5710e6e1dd3c5265 | 4688977308789876ab8163af6f704aa118ab39bd | refs/heads/master | 2023-08-07T16:19:42.086216 | 2023-07-24T17:51:16 | 2023-07-24T17:51:16 | 134,626,220 | 134 | 35 | MIT | false | 2023-05-20T14:50:02 | 2018-05-23T21:14:49 | 2023-05-05T15:22:55 | 2023-05-20T14:50:01 | 66,642 | 116 | 28 | 2 | Python | false | false | import os
from pyhamilton import (HamiltonInterface, LayoutManager, ResourceType, Tip96,
INITIALIZE, PICKUP96, EJECT96)
layfile = os.path.abspath(os.path.join('.', '96_head_pickup_eject.lay'))
lmgr = LayoutManager(layfile)
tip_name_from_line = lambda line: LayoutManager.layline_first_field(line)
tip_name_conditio... | UTF-8 | Python | false | false | 1,257 | py | 46 | 96_head_pickup_eject.py | 30 | 0.693715 | 0.680191 | 0 | 24 | 51.375 | 101 |
AayushDangol123/rasa-chatbot | 515,396,081,820 | d484feb6c4927ebe475a2e59c4e4b45389cfd59d | ad0ffa148f9379878efee7574b194f8e4a9a12bf | /actions.py | 11e1e45e2ba4ab2f5f87478a5ce6e1df264e0415 | [] | no_license | https://github.com/AayushDangol123/rasa-chatbot | a127b5c1a6e11668a5989c0a88b70a8b7a8618f1 | 02c905150e7a0142b6c02539db97f4d05e9cfeea | refs/heads/main | 2023-03-12T15:34:07.685193 | 2021-03-05T07:23:32 | 2021-03-05T07:23:32 | 344,373,849 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # This files contains your custom actions which can be used to run
# custom Python code.
#
# See this guide on how to implement these action:
# https://rasa.com/docs/rasa/custom-actions
# This is a simple example for a custom action which utters "Hello World!"
# from typing import Any, Text, Dict, List
#
# from rasa... | UTF-8 | Python | false | false | 1,881 | py | 5 | actions.py | 1 | 0.629984 | 0.629452 | 0 | 56 | 32.589286 | 84 |
yicheng-li/yc | 5,463,198,444,978 | 5e3acc44d5dda53a40d768df6ed662a84acde3e6 | d20a2832be223b98a869f97813f5e22f6889abc5 | /new_hg_new/train_parsing_vgg.py | 80bb2d18aea5448597ed2edbf9a38dd05ae57caf | [] | no_license | https://github.com/yicheng-li/yc | c66e9743ad446bc0addba4ea2cc0f637a8137049 | a45092e4d13f6e50d9bd8b66383c5a595aa37b61 | refs/heads/master | 2018-02-07T09:37:54.435081 | 2017-08-08T02:49:34 | 2017-08-08T02:49:34 | 95,753,149 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from __future__ import print_function
import argparse
from datetime import datetime
import os
import sys
import time
import tensorflow as tf
import numpy as np
os.environ["CUDA_VISIBLE_DEVICES"]="0"
from utils import *
from vgg16 import vggnet
### parameters setting
RANDOM_SEED = 1234
N_CLASSES = 20
INPUT_SIZE = (321,... | UTF-8 | Python | false | false | 4,514 | py | 29 | train_parsing_vgg.py | 15 | 0.659504 | 0.645326 | 0 | 124 | 35.403226 | 125 |
zx490336534/Spider_Basics | 8,847,632,635,216 | 340b873584086a2097a680291f56a87b91dd8e6b | 15c07658420771267db5f56b295064beaa79db46 | /06-requests/正式课/requests_test.py | 277c0251274ce070d7defaadbdd55ce11a2b67af | [] | no_license | https://github.com/zx490336534/Spider_Basics | 4dab606d7b72fa3eb1eb0b5467f12d523b029c93 | aa3f723b8887c33af73dbf2bbad70d059a584201 | refs/heads/master | 2021-05-12T09:41:08.877423 | 2018-02-05T12:24:36 | 2018-02-05T12:24:36 | 117,328,894 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import requests
import urllib3
from requests.cookies import RequestsCookieJar
urllib3.disable_warnings()
#基础用法
# url = 'https://httpbin.org'
# r = requests.get(url)
# print(r.text)
#提交get参数
# payload = {'key1':'value1','key2':'value2'}
# r = requests.get('https://httpbin.org/get',params=payload)
# print(r.text)
#等... | UTF-8 | Python | false | false | 2,987 | py | 39 | requests_test.py | 29 | 0.663261 | 0.629588 | 0 | 131 | 19.183206 | 124 |
epan626/python_exam | 4,355,096,844,449 | b7d3a99158346fe31ae01b6771340e3c5e83bf96 | f10d59dfbb6b8c316b83493ea41f440dbc43b9e1 | /python_exam/apps/products/migrations/0004_auto_20161216_2011.py | 6cae56cd97ce63be63afb2248d073eeda6ba0576 | [] | no_license | https://github.com/epan626/python_exam | ca929e6984a07fceaa852d56cd833c42de61282d | 7e64c378402673cead7c07333dbaced749b44230 | refs/heads/master | 2021-01-12T08:47:10.636861 | 2016-12-16T22:13:37 | 2016-12-16T22:13:37 | 76,689,026 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-16 20:11
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0003_product_user'),
]
operations = [
migrations.AlterField(
... | UTF-8 | Python | false | false | 500 | py | 10 | 0004_auto_20161216_2011.py | 5 | 0.612 | 0.568 | 0 | 20 | 24 | 105 |
LuisPerez64/Prac | 15,066,745,309,594 | 0aef95ec83b6557730f1209e040987b26a2f30f1 | 0734ea587e68ff5fc5068514ba63492a0cd0cbc7 | /python/implementations/data_structures/core/default_dict.py | d39a2ab2cfc8dcaa4db91bb6154218524bf69a5b | [] | no_license | https://github.com/LuisPerez64/Prac | 735756a3bfa7b33f2fcba5bdb92abb58d3a71dc1 | ef2c7fcb65c574317c83c3f632e066b96222b5f3 | refs/heads/master | 2021-01-18T03:43:08.566645 | 2020-11-12T04:47:16 | 2020-11-12T04:47:16 | 44,716,313 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Base implementation of the defaultdict object extending the base dict class.
"""
__all__ = ["DefaultDict"]
from typing import Callable
class DefaultDict(dict):
def __init__(self, missing_func: Callable, **kwargs):
self.missing_func = missing_func
super(DefaultDict, self).__init__(**kwargs)
... | UTF-8 | Python | false | false | 508 | py | 493 | default_dict.py | 415 | 0.639764 | 0.639764 | 0 | 18 | 27.222222 | 76 |
hhhernandez/pym | 9,783,935,533,581 | befa3c74a96bf3bce451039b1f59eecb35f1799b | 69fcb7c7eb2485f2ffd0f2a2d7858d97b4fe4275 | /python/PYM.py | 1596897f31b5420c06111488cd3c75f8e1bd970f | [] | no_license | https://github.com/hhhernandez/pym | 3fdf8f57f4ac7cc57cc15ca77ae2cef2e29eceae | 5eccf449c7548175dbc2eb34b6dfa722573f00f3 | refs/heads/master | 2020-03-24T05:31:06.576519 | 2017-10-08T10:36:05 | 2017-10-08T10:36:05 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Jan 10 17:03:41 2017
@author: valle
"""
def PYM_image_transformation(original, filename):
"This function performs the PYM calculation and returns a new frame"
h, w = original[:,:,0].shape # get original image shape
pym = np.zeros((h, w),np.int) # blank b/w image... | UTF-8 | Python | false | false | 4,902 | py | 2 | PYM.py | 2 | 0.639331 | 0.618931 | 0 | 117 | 40.769231 | 129 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.